From db32911468c4dd93f83aede593a269ee4bb3ca83 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Sat, 25 Oct 2014 16:34:30 +0800 Subject: [PATCH 001/316] Updating by ZTinoZ --- ...ts Alienating Developers with Strong Language.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sources/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md b/sources/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md index b68395bf7e..a538502451 100644 --- a/sources/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md +++ b/sources/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md @@ -1,15 +1,14 @@ -Translating by ZTinoZ -Linus Torvalds Regrets Alienating Developers with Strong Language +Linus Torvalds对于骂那些开发者感到后悔 ================================================================================ -> He didn't name anyone, but this sounds like an apology +> 他没有提到任何人的名字,但是这像一次道歉 -**Linus Torvalds talked today at LinuxCon and CloudOpen Europe, a conference organized by the Linux Foundation that reunites all the big names in the open source world. He answered a lot of questions and he also talked about the effects of the strong language he uses in the mailing list.** +**Linus Torvalds在前几天的欧洲LinuxCon和CloudOpen大会上做了讲话,这次大会由Linux基金会组织并且汇聚了开源世界的所有大佬。他回答了很多问题,也谈到了他在邮件发送清单里使用脏话的事情。** -Linus Torvalds is recognized as the creator of the Linux kernel and the maintainer of the latest development version. He makes sure that we get a new RC almost every week and he is very involved in the discussions that take place in the mailing list. He doesn't really choose his words and has been blamed for using strong language with some of the developers. +Linus Torvalds被认为是Linux内核的创造者和最新的Linux开发版的维护者。他确保我们几乎每个星期都会得到一个新的RC内核并且涉及发生在邮件发送清单中的对话里,他口不择言地用脏话大骂一些开发者们。 The latest problem of this kind, which surfaced in the news as well, was when [he decided to block code from a particular developer][1], after making some very harsh remarks. He is known to be very abrasive, especially when kernel developers break user space to fix something in the kernel. The same happened in this case and he basically went mental on the guy. -### This is the closest he's been to an apology ### +### 这是他最接近道歉的一次谈话 ### Linus Torvalds never really talked about that particular discussion since and people moved on, but recently a systemd developer talked about the strong language in the open source community and he mentioned Linus Torvalds by name. He's not known to apologize, so this admission of guilt during LinuxCon is a big step forward. The moderator asked him what single decision in the last 23 years he would change. @@ -26,7 +25,7 @@ It also looks like Linux kernel 3.18 RC1 will arrive later this week and we'll s via: http://news.softpedia.com/news/Linus-Torvalds-Regrets-Alienating-Developers-with-Strong-Language-462191.shtml 作者:[Silviu Stahie][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9439a8bf0695f16b9604aedc54563f4a957b7f29 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Oct 2014 21:15:52 +0800 Subject: [PATCH 002/316] PUB:20140811 Check how much do you type with WhatPulse on Linux @GOLinux --- ...k how much do you type with WhatPulse on Linux.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20140811 Check how much do you type with WhatPulse on Linux.md (90%) diff --git a/translated/tech/20140811 Check how much do you type with WhatPulse on Linux.md b/published/20140811 Check how much do you type with WhatPulse on Linux.md similarity index 90% rename from translated/tech/20140811 Check how much do you type with WhatPulse on Linux.md rename to published/20140811 Check how much do you type with WhatPulse on Linux.md index 7be54ae2ca..853c195b23 100644 --- a/translated/tech/20140811 Check how much do you type with WhatPulse on Linux.md +++ b/published/20140811 Check how much do you type with WhatPulse on Linux.md @@ -2,11 +2,11 @@ Linux输入统计神器——WhatPulse ================================================================================ ![](http://cdn.linuxaria.com/wp-content/uploads/2014/08/whatpulse.png) -如果,你想我这样,是个对统计数据有着狂热癖好的人,那么你必须在你的计算机上安装这个小应用:[WhatPulse][1] +如果,你像我这样,是个对统计数据有着狂热癖好的人,那么你必须在你的计算机上安装这个小应用:[WhatPulse][1] 此软件会追踪用户的击键、鼠标点击以及使用的[带宽][2]和系统开机时间。用户可以周期性地,或者手动上传击键的数量到服务器上,这称之为“脉动”。 -用户可以看到他们在所有加入该程序的人的领先选手排名板的所处位置,并且与他们自己国家的人作比较。用户也可以加入团队,在团队中他们可以和有着相同爱好的人作对比(去吧,Linux用户们!!)。 +用户可以看到他们在所有加入该程序的人的领先选手排行板的所处位置,并且与他们自己国家的人作比较。用户也可以加入团队,在团队中他们可以和有着相同爱好的人作对比(去吧,Linux用户们!!)。 软件分为免费的基础版和高级版,在基础版中你可以查看并检查所有的基本统计数据,而在高级版中你可以看到更多。 @@ -16,11 +16,11 @@ Linux输入统计神器——WhatPulse 第一步,你必须在[WhatPulse网站][1]注册帐号,或者也可以在你第一次启动WhatPulse客户端时出现的实用向导中创建帐号,以用于上传自己的统计数据(你也可以使用Facebook的帐号登录)。 -你会被提示需要登录,登录之后,你必须搜索你的计算机名,这是因为你可以通过该帐号登录到多台计算机,而它们的数据都会上传到同一统计帐号。一旦你登入后,一个小小的W将出现在你的系统托盘中,那就对了,你已搞定! +你会被提示需要登录,登录之后,你必须找到你的计算机名,这是因为你可以通过该帐号登录到多台计算机,而它们的数据都会上传到同一统计帐号。一旦你登入后,一个小小的W将出现在你的系统托盘中,那就对了,你已搞定! ### 在Linux上安装WhatPulse ### -官方网站在[下载页][3]提供了一个通用版本.tar.gz归档压缩包(用于32位和64位)和一个debian包。 +官方网站在[下载页][3]提供了一个通用版本的.tar.gz归档压缩包(用于32位和64位)和一个debian包。 就我个人而言,我已经在我的Mint Qiana上安装了debian包,在我的Arch Linux[Aur包][4]一点问题都没有。 @@ -57,7 +57,7 @@ Linux输入统计神器——WhatPulse 在网站上,你会看到与客户端上相同的所有统计数据。 -免责声明:上面的WhatPulse网站链接包含了我的参考链接,注册时请使用该链接,这会让我的帐号在某天升级到高级帐号。 +免责声明:上面的WhatPulse网站链接包含了我的参考链接,注册时可以使用该链接,这会让我的帐号在某天升级到高级帐号。 -------------------------------------------------------------------------------- @@ -65,7 +65,7 @@ via: http://linuxaria.com/recensioni/check-how-much-do-you-type-with-whatpulse-o 作者:[linuxari][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 82c41ab10e2a5474284952c8e8a3cbe521ff61ad Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Oct 2014 21:40:27 +0800 Subject: [PATCH 003/316] PUB:20140922 How to Run Android Apps on Ubuntu using ARChon @GOLinux --- ...Run Android Apps on Ubuntu using ARChon.md | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) rename {translated/tech => published}/20140922 How to Run Android Apps on Ubuntu using ARChon.md (60%) diff --git a/translated/tech/20140922 How to Run Android Apps on Ubuntu using ARChon.md b/published/20140922 How to Run Android Apps on Ubuntu using ARChon.md similarity index 60% rename from translated/tech/20140922 How to Run Android Apps on Ubuntu using ARChon.md rename to published/20140922 How to Run Android Apps on Ubuntu using ARChon.md index 56d0e74b8d..11dbadf22f 100644 --- a/translated/tech/20140922 How to Run Android Apps on Ubuntu using ARChon.md +++ b/published/20140922 How to Run Android Apps on Ubuntu using ARChon.md @@ -2,9 +2,8 @@ ================================================================================ ![Android, Chrome, Ubuntu](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/android-ubuntu.jpg) -Android, Chrome, Ubuntu -**Google最近发布了首批[能在Chrome OS本地运行的安卓应用集][1],通过‘安卓运行时’扩展完成了该壮举。** +**Google最近发布了首批[能在Chrome OS本地运行的安卓应用集][1],通过‘安卓运行时’扩展完成了该壮举。** 现在,一位开发者已经[指明了将安卓应用带入桌面版Chrome的路][2]。 @@ -12,51 +11,51 @@ Android, Chrome, Ubuntu ![IMDB, Flipboard and Twitter Android Apps running on Ubuntu 14.04 LTS](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/android-apps-on-linux.jpg) -运行在Ubuntu 14.04 LTS上的安卓应用:IMDB,Flipboard和Twitter +*运行在Ubuntu 14.04 LTS上的安卓应用:IMDB,Flipboard和Twitter* -通过运行时运行的应用的性能不是很令人惊异,任何想要运行Dead Trigger 2或者其它图形密集型游戏的雄心壮志可以放到一边了。 +通过‘安卓运行时’运行的应用的性能不是很令人惊异,任何想要运行Dead Trigger 2或者其它图形密集型游戏的雄心壮志可以放到一边了。 -同样地,作为官方运行时的非官方重构包并在Chrome OS之外运行,系统整合(如网络摄像头,扬声器等)可能不完整或者根本不可能。 +同样地,要运行官方的‘安卓运行时’的非官方重构包,或者在Chrome OS之外运行的话,其系统完整性(如网络摄像头,扬声器等)可能不完整或者根本不可能。 -下面的指南只是提供原样,并不保证一定成功。它只能作为高度实验性进行,里面遍布漏洞,很不稳定——甚至平出恶魔。只能出于好奇而尝试,不去高度寄予厚望,那么你就不会深受其困扰。 +按照下面的指南一步步来,并不保证一定成功。它只能作为高度实验性进行,里面遍布漏洞,很不稳定——甚至白日见鬼。只能出于好奇而尝试,不要高度寄予厚望,这样你就不会深受其困扰。 ### 安卓应用转战Linux大法 ### -要通过Chrome在Linux上运行安卓应用,很明显,你需要安装Chrome,要求的版本是37,或者更高。坦率地讲,如果你打算玩玩潜在不稳定的版本,那么你也可以下载并[为Linux安装不稳定的Google Chrome版本][6]。 +要通过Chrome在Linux上运行安卓应用,很明显,你需要安装Chrome,要求的版本是37,或者更高。坦率地讲,如果你打算玩玩不稳定的Chrome版本,那么你也可以下载并[为Linux安装][6]。 -已经安装了Chrome的某个版本?你可以通过命令行来安装开发版,命令如下: +如果已经安装了Chrome的某个版本?你可以通过命令行来安装不稳定版,命令如下: sudo apt-get install google-chrome-unstable -接下来,你需要下载官方定制版,而不是Google或Chronium捐赠的版本——由弗拉德·菲利波夫创建的安卓运行时。这个版本和官方的有着诸多的不同,最突出的就是它可以运行在桌面版的浏览器上。 +有了 Chrome 之后,你需要下载定制版的‘安卓运行时’扩展,而不是Google或Chronium提供的版本——由弗拉德·菲利波夫创建的‘安卓运行时’。这个版本和官方的有着诸多的不同,最突出的不同就是它可以运行在桌面版的浏览器上。 - [从BitBucket下载ARChon v1.0][7] -下载好运行时后,你需要从.zip解压内容,并移动解压后的文件夹到你的Home文件夹。 +下载好‘安卓运行时’扩展后,你需要从.zip解压内容,并移动解压后的文件夹到你的Home文件夹。 -要安装,打开Google Chrome,点击汉堡式菜单按钮,然后导航到扩展页。检查‘启用开发者模式’并点击‘加载解包的扩展’按钮。 +要安装它,打开Google Chrome,点击汉堡式菜单按钮,然后导航到扩展页。检查‘启用开发者模式’并点击‘加载解包的扩展’按钮。 ![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/chromeos-apk-extensions.jpg) -运行时本身不会做太多事情,所以你需要从安卓应用创建兼容包。要完成这项工作,你需要‘[chromeos-apk][8]’[命令行Javascript工具][9],它可以从节点封装模块管理器安装。 +‘安卓运行时’扩展本身不会做太多事情,所以你需要从安卓应用创建兼容包。要完成这项工作,你需要‘[chromeos-apk][8]’[命令行Javascript工具][9],它可以从“Node 封装模块管理器(npm )”安装。 首先运行: sudo apt-get install npm nodejs nodejs-legacy -Ubuntu 64位用户?你也需要攫取以下库: +Ubuntu 64位用户?你还需要获取以下库: sudo apt-get install lib32stdc++6 -现在,运行命令来暗转脚本吧: +现在,运行npm命令来安装该脚本吧: npm install -g chromeos-apk -根据你的配置,你可能需要过会儿使用sudo来运行。如果你不喜欢[通过sudo安装npm模块,你可以][10]玩玩鬼把戏。 +根据你的配置,你可能需要过会儿使用sudo来运行。如果你不喜欢[通过sudo安装npm模块,你可以][10]试着骗过它。 ![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/chromeos-apk-npm.jpg) -现在,你直接回家了。去Google找找你想要试试的应用的APK吧,请牢记**不是所有的安卓应用都会工作**,而**那些可以工作的也未必工作得很好**,或者缺少功能。 +现在,搞定了。去Google找找你想要试试的应用的APK吧,请牢记**不是所有的安卓应用都会工作**,而**那些可以工作的也未必工作得很好**,或者缺少功能。 把你想要的安卓APK放到~/Home,然后回到终端中使用以下命令来转换,你可以将APK命名成任何你想要的名字: @@ -68,9 +67,9 @@ Ubuntu 64位用户?你也需要攫取以下库: 现在,在你的Home文件夹内有个ARChon生成的Chrome APK extension-y folder-y这样的东西。所有剩下来要做的事,就是安装并查看它是否正常工作! -回到chrome://extensions页面,再次轻敲‘加载解封装扩展’按钮,但这次选择上面脚本创建的文件夹。 +回到chrome://extensions页面,再次轻敲‘加载解封装扩展’按钮,但这次选择上面脚本创建出来的文件夹。 -应用应该会继续安装,不会有任何问题,但是它确实会没有问题吗?打开Chrome应用启动器或应用页面并启动它来看看是否有问题。 +应用应该会正确安装,但是它确实会没有问题吗?打开Chrome应用启动器或应用页面并启动它来看看是否有问题。 #### 深度探索 #### @@ -82,7 +81,7 @@ via: http://www.omgubuntu.co.uk/2014/09/install-android-apps-ubuntu-archon 作者:[Joey-Elijah Sneddon][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d5a1747373c7ce6b491b5a55faaaadb04f91a406 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Oct 2014 22:26:16 +0800 Subject: [PATCH 004/316] PUB:20140910 How to download GOG games from the command line on Linux @geekpi --- ...o download GOG games from the command line on Linux.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20140910 How to download GOG games from the command line on Linux.md (79%) diff --git a/translated/tech/20140910 How to download GOG games from the command line on Linux.md b/published/20140910 How to download GOG games from the command line on Linux.md similarity index 79% rename from translated/tech/20140910 How to download GOG games from the command line on Linux.md rename to published/20140910 How to download GOG games from the command line on Linux.md index 8ed3e8e792..b168d9365b 100644 --- a/translated/tech/20140910 How to download GOG games from the command line on Linux.md +++ b/published/20140910 How to download GOG games from the command line on Linux.md @@ -1,12 +1,12 @@ 如何在Linux命令行中下载GOG游戏 ================================================================================ -如果你是一个玩家同时也是一个Linux用户,你可能很高兴在[GOG][1]在几个月前宣布它会在你最喜欢的操作系统上推出游戏。如果你之前从来没有听说过GOG,我鼓励你看看他们的产品目录中的“很棒的老游戏”,价格合理,无DRM限制,而且充满了很棒的东西。然而现在的Windows上的GOG存在了很长的时间按,正式的Linux版本却是无处可见。因此,你不想等待官方的正式版本,一个名为LGOGDownloader非官方的开放源码计划能让你在命令行中访问你的库。 +如果你是一个游戏玩家同时也是一个Linux用户,你可能很高兴在[GOG][1]在几个月前宣布它会在你最喜欢的操作系统上推出游戏。如果你之前从来没有听说过GOG,我鼓励你看看他们的产品目录中的“很棒的老游戏”,价格合理,无DRM限制,而且充满了很棒的东西。虽然Windows上的GOG客户端已经存在了很长的时间,但是官方的Linux版本客户端却是无处可见。因此,如果你不想等待官方的正式版本,一个名为LGOGDownloader非官方的开放源码计划能让你在命令行中访问你的库。 ![](https://farm4.staticflickr.com/3843/15121593356_b13309c70f_z.jpg) ### 在Linux中安装 LGOGDownloader ### -对于Ubuntu用户来说,[官方页面][2]建议您下载源代码并执行: +对于Ubuntu用户来说,其[官方页面][2]建议您下载源代码并执行: $ sudo apt-get install build-essential libcurl4-openssl-dev liboauth-dev libjsoncpp-dev libhtmlcxx-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-program-options-dev libboost-date-time-dev libtinyxml-dev librhash-dev help2man $ tar -xvzf lgogdownloader-2.17.tar.gz @@ -14,7 +14,7 @@ $ make release $ sudo make install -如果你是ArchLinux用户。有一个[AUR 包][2]等着你 +如果你是ArchLinux用户。有一个[AUR 包][2]等着你: ### LGOGDownloader 的使用### @@ -65,7 +65,7 @@ via: http://xmodulo.com/2014/09/download-gog-games-command-line-linux.html 作者:[Adrien Brochard][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1e1598b71b535b1e4bed79cb0daf41945101eb26 Mon Sep 17 00:00:00 2001 From: johnhoow Date: Sat, 25 Oct 2014 22:32:50 +0800 Subject: [PATCH 005/316] translated --- ...and Find Statistics for Linux Procesess.md | 69 ++++++++++--------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/sources/tech/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md b/sources/tech/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md index 401e88b7ac..7709f77f11 100644 --- a/sources/tech/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md +++ b/sources/tech/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md @@ -1,78 +1,79 @@ -johnhoow translating... -pidstat - Monitor and Find Statistics for Linux Procesess +pidstat - 监控并统计Linux进程的数据 ================================================================================ -The **pidstat** command is used for monitoring individual tasks currently being managed by the Linux kernel. It writes to standard output activities for every task managed by the Linux kernel. The pidstat command can also be used for monitoring the child processes of selected tasks. The interval parameter specifies the amount of time in seconds between each report. A value of 0 (or no parameters at all) indicates that tasks statistics are to be reported for the time since system startup (boot). +**pidstat**命令用来监控被Linux内核管理的独立任务(进程)。它输出每个受内核管理的任务的相关信息。pidstat命令也可以用来监控特定进程的子进程。区间参数具体说明各个报告间的时间间隔。它的值为0(或者没有参数)说明进程的统计数据的时间是从系统启动开始计算的。 -### How to Install pidstat ### +### 如何安装pidstat ### -pidstat is part of the sysstat suite that contains various system performance tools for Linux, it's available on the repository of most Linux distributions. +pidstat 是sysstat软件套件的一部分,sysstat包含很多监控linux系统行为的工具,它能够从大多数linux发行版的软件源中获得。 -To install it on Debian / Ubuntu Linux systems you can use the following command: +在Debian/Ubuntu系统中可以使用下面的命令来安装 # apt-get install sysstat -If you are using CentOS / Fedora / RHEL Linux you can install the packages like this: +CentOS/Fedora/RHEL版本的linux中则使用下面的命令: # yum install sysstat -### Using pidstat ### +### 使用pidstat ### -Running pidstat without any argument is equivalent to specifying -p ALL but only active tasks (tasks with non-zero statistics values) will appear in the report. +使用pidstat不加任何参数等价于加上-p但是只有正在活动的任务会被显示出来。 # pidstat ![pidstat](http://blog.linoxide.com/wp-content/uploads/2014/09/pidstat.jpg) -In the output you can see: +在结果中你能看到如下内容: -- **PID** - The identification number of the task being monitored. -- **%usr** - Percentage of CPU used by the task while executing at the user level (application), with or without nice priority. Note that this field does NOT include time spent running a virtual processor. -- **%system** - Percentage of CPU used by the task while executing at the system level. -- **%guest** - Percentage of CPU spent by the task in virtual machine (running a virtual processor). -- **%CPU** - Total percentage of CPU time used by the task. In an SMP environment, the task's CPU usage will be divided by the total number of CPU's if option -I has been entered on the command line. -- **CPU** - Processor number to which the task is attached. -- **Command** - The command name of the task. +- **PID** - 被监控的进程的进程号 +- **%usr** - 当在用户层执行(应用程序)时这个进程的cpu使用率。注意这个字段计算的cpu时间不包括在虚拟处理器中使用花去的时间。 +- **%system** - 这个进程在系统级别使用时的cpu使用率。 +- **%guest** - 在虚拟机中的cpu使用率 +- **%CPU** - 进程总的cpu使用率。在SMP环境(多处理器)中,cpu使用率会根据cpu的数量进行划分当你在命令行中输入-I参数。 +- **CPU** - 这个进程能够使用的处理器数目 +- **Command** - 这个进程的命令名称。 -### I/O Statistics ### +### I/O 统计数据 ### -We can use pidstat to get I/O statistics about a process using the -d flag. For example: +通过使用-d参数来得到I/O的统计数据。比如: # pidstat -d -p 8472 ![pidstat io](http://blog.linoxide.com/wp-content/uploads/2014/09/pidstat-io.jpg) -The IO output will display a few new columns: +IO 输出会显示一些内的条目: -- **kB_rd/s** - Number of kilobytes the task has caused to be read from disk per second. -- **kB_wr/s** - Number of kilobytes the task has caused, or shall cause to be written to disk per second. -- **kB_ccwr/s** - Number of kilobytes whose writing to disk has been cancelled by the task. +- **kB_rd/s** - 进程从硬盘上的读取速度 +- **kB_wr/s** - 进程向硬盘中的写入速度 +- **kB_ccwr/s** - 进程写入磁盘被取消的速率 ### Page faults and memory usage ### +### Page faults和内存使用 ### -Using the -r flag you can get information about memory usage and page faults. +使用-r标记你能够得到内存使用情况的数据。 ![pidstat pf mem](http://blog.linoxide.com/wp-content/uploads/2014/09/pidstat-pfmem.jpg) -Important columns: +重要的条目: -- **minflt/s** - Total number of minor faults the task has made per second, those which have not required loading a memory page from disk. -- **majflt/s** - Total number of major faults the task has made per second, those which have required loading a memory page from disk. -- **VSZ** - Virtual Size: The virtual memory usage of entire task in kilobytes. -- **RSS** - Resident Set Size: The non-swapped physical memory used by the task in kilobytes. +- **minflt/s** - 从内存中加载数据时每秒钟出现的小的错误的数目 +- **majflt/s** - 从内存中加载数据时每秒出现的较大错误的数目 +- **VSZ** - 虚拟容量:整个进程的虚拟内存使用 +- **RSS** - 长期的内存使用:进程非交换物理内存的使用 -### Examples ### +### 举例 ### -**1.** You can use pidstat to find a memory leek using the following command: +**1.** 你可以通过使用下面的命令来监测内存使用 # pidstat -r 2 5 -This will give you 5 reports, one every 2 seconds, about the current page faults statistics, it should be easy to spot the problem process. +这会给你5份关于page faults的统计数据结果,间隔2s。这将会更容易的定位出现问题的进程。 -**2.** To show all children of the mysql server you can use the following command +**2.** 显示所有mysql server的子进程 # pidstat -T CHILD -C mysql **3.** To combine all statistics in a single report you can use: +**3.** 将所有的统计数据结合到一个简单的结果记录中: # pidstat -urd -h @@ -81,7 +82,7 @@ This will give you 5 reports, one every 2 seconds, about the current page faults via: http://linoxide.com/linux-command/linux-pidstat-monitor-statistics-procesess/ 作者:[Adrian Dinu][a] -译者:[译者ID](https://github.com/译者ID) +译者:[John](https://github.com/johnhoow) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 286121b30480ee404d63a201ff0ca3c5138c83e3 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Oct 2014 22:41:43 +0800 Subject: [PATCH 006/316] PUB:20140829 Fun in Linux Terminal--Play with Word and Character Counts @MikeCoder --- ...rminal--Play with Word and Character Counts.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) rename {translated/tech => published}/20140829 Fun in Linux Terminal--Play with Word and Character Counts.md (89%) diff --git a/translated/tech/20140829 Fun in Linux Terminal--Play with Word and Character Counts.md b/published/20140829 Fun in Linux Terminal--Play with Word and Character Counts.md similarity index 89% rename from translated/tech/20140829 Fun in Linux Terminal--Play with Word and Character Counts.md rename to published/20140829 Fun in Linux Terminal--Play with Word and Character Counts.md index 679da192a0..5051c3c46d 100644 --- a/translated/tech/20140829 Fun in Linux Terminal--Play with Word and Character Counts.md +++ b/published/20140829 Fun in Linux Terminal--Play with Word and Character Counts.md @@ -1,6 +1,6 @@ -Linux终端的乐趣之把玩Word Counts +Linux终端的乐趣之把玩字词计数 ================================================================================ -Linux 命令行有很多的乐趣,我们可以很容易并且完善地执行很多繁琐的任务。比如,我们计算一个文本文件中字和字符的出现频率,则是我们打算在这篇文章中讲到的。 +Linux 命令行有很多的乐趣,我们可以很容易并且完善地执行很多繁琐的任务。比如,我们计算一个文本文件中字和字符的出现频率,这就是我们打算在这篇文章中讲到的。 立刻来到我们脑海的命令,计算字和字符在一个文本文件中出现频率的 Linux 命令是 [wc 命令] [1]。 @@ -49,7 +49,7 @@ Linux 命令行有很多的乐趣,我们可以很容易并且完善地执行 a m -**Note**: `-w1`只是设定了长度 +**注**: `-w1`只是设定了长度 现在我们将从那个文本文件中掰下来的每一个字母,对结果进行排序,得到所需的输出频率的十个最常见的字符。 @@ -68,7 +68,7 @@ Linux 命令行有很多的乐趣,我们可以很容易并且完善地执行 1224 r 1021 l -如何区分大小写呢?之前我们都是乎略大小写的。所以,用如下命令。 +如何区分大小写呢?之前我们都是忽略大小写的。所以,用如下命令。 $ fold -w1 < man.txt | sort | tr '[:lower:]' '[:upper:]' | uniq -c | sort -rn | head -20 @@ -154,18 +154,19 @@ Linux 命令行有很多的乐趣,我们可以很容易并且完善地执行 1 activate local mode format and display local manual files 1 acute accent -**Note**: 上面的.越来越多,其实,我们可以使用.{10} 得到同样的效果。 +**注**: 上面的.越来越多,其实,我们可以使用.{10} 得到同样的效果。 这些简单的脚本,让我们知道最频繁出现的单词和英语中的字符。 -这就是现在。我会在这里再一次提到另一个有趣的话题,你应该会喜欢读。还有别忘了向我们提供您的宝贵意见的评论部分。 +现在结束了。下次我会在这里讲到另一个有趣的话题,你应该会喜欢读。还有别忘了向我们提供您的宝贵意见。 + -------------------------------------------------------------------------------- via: http://www.tecmint.com/play-with-word-and-character-counts-in-linux/ 作者:[Avishek Kumar][a] 译者:[MikeCoder](https://github.com/MikeCoder) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ba97e594b1e58c9cfbb8261a7b9939dcc6c192f1 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Oct 2014 22:58:58 +0800 Subject: [PATCH 007/316] PUB:20140930 How to Boot Linux ISO Images Directly From Your Hard Drive @GOLinux --- ...SO Images Directly From Your Hard Drive.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) rename {translated/tech => published}/20140930 How to Boot Linux ISO Images Directly From Your Hard Drive.md (56%) diff --git a/translated/tech/20140930 How to Boot Linux ISO Images Directly From Your Hard Drive.md b/published/20140930 How to Boot Linux ISO Images Directly From Your Hard Drive.md similarity index 56% rename from translated/tech/20140930 How to Boot Linux ISO Images Directly From Your Hard Drive.md rename to published/20140930 How to Boot Linux ISO Images Directly From Your Hard Drive.md index 3dcc1a95c3..563bc89c50 100644 --- a/translated/tech/20140930 How to Boot Linux ISO Images Directly From Your Hard Drive.md +++ b/published/20140930 How to Boot Linux ISO Images Directly From Your Hard Drive.md @@ -1,8 +1,8 @@ 直接从硬盘启动Linux ISO镜像 ================================================================================ -![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAooAAAEsAgMAAAA5t3pxAAAABGdBTUEAALGPC/xhBQAAAAxQTFRFAAAALAAeqKio/v7+NGqafgAABflJREFUeNrt3L1u4zgQB/DU7q+/8qCnuJegBQcQVLlY98RWhoKrDu4V4LZaHCAgp/chUuYpWAY6DofUh6PdtXcVcZL8ZUSmaSf5mSKHY0rJzQ22RbbflPTtTxhhhBFGGGGEEUYYYYQRRhhhhBFGGGH8zrY9e/xpVycxHup6X+/pvnWltp4zHlztrdvfe+Mu1BzqtYz1vvFGkrJ27jVK7em9NNHI35HSWO8P9Zf6UFPbfamjiPZU29bU9qsa1T9sVGMjy7f+HbgKFrk91e5COYVx6I+hTdU2tN7WtyXvyah8+dCsZbxv7r3D3avYjvu6dT3vU2/kHsj7ttk53Y5GzIr98T72x3owuiPvWi8a9/51vK/VLpTXNLrROmtU+2isg24w1usam2BshjFz6xX1yHjr3f2YabjbrhbD9xRp4j2PGYo5tfs6NBxl2ubW1bUNx55tfdhT+YD5GkYYYYQRRhhhhBFGGGGEEUYYYfyhsewEbm/RKPAYlzDCCCOMML4zoxFvNJqNBYy/aHwy9NW5vVyj1fRVKMlGvsEIo5gxY73RSjVW5slUrh1zt8d8DSOM78Y4Hs99Oe+r8j7BNImM5ayxGBlj1rZOFjdndL941qhEGSmC+0hON81RvTMlR3dDJiqtlWl+Y762RnMWSWWeHelYc51SZLJ6rUzz2zmFor0vcw0b+egWo/rXzz7mjJ1rRXe8qS19eWo8RqNKaaTfqg23mVHnxtzIN9I4F2G0peJxcz5muB8OxjUyzXljpV2c8fFniD0um7SVoTqOPWa1TPPS+Trl6sp7MiI3+2DG2U6pkxin8bjo9/lZTWVKs8YK4K8Y3WykUhmti9XPluIz52EUyTvfYs/+mVhDc00+ys7XNRr9WMRcsQizNZWo9rGINSmNT5qN47n5hdH3x86kM3bWGxUbO3vsjfRMrKH30D3nicaMUWOjO6Kmb0fl29HX+GxSpTZqy0alz41KJzdyf1TlZMzkL8eMM6aKj5V5LHyGqGlNgiINfUIgIz0Ta6rwOTbxXKilzoXDVqVMG5GbwfgT+eOwXRIp9WKx55r8cWosZ346xfnOZUyle1ysbOT88XttmYefWfr1DkpSljJelz9yjKJX0/pk3j/ycd5Hr8/uZsIaR76Y8Zr8UYXZ02paa8n7Ryyin0DHmuasJY3X5Y88mMLvZ2NYpxwb3SvNssZr8kf6riOtUzpJZQfj0Rs7y8YhT0qRP/qxYWgVsD/WYZ3St6OKRv1KxkvyRw57L41KT41maeMV+WO/gk5Gm49WTidjht7xgrHnuvwxRhvjemOlKxse8dqlpVe4vbvv7JIx/Lr88bqjpxc3XpI/Js/DkZt9AKMRbvRnjUbjIfcPS7+nKLL2J7FLjKU/769DjORMI7VRm+l56c/KTYHOVggzjs9L5zTZ+jzaG5UEY3l2rtK5vNF44/ENGHMj5VhPjZSpunzW56tKyzQq345K0Jihc9bj89JkLDmNFWSs9Pi8tMsJ/ed3STEcOQWMMP6EUcs20nwyGFNEmwvi46QdU0TtS4x05VG81lGqka+A5PXHFBnjBf2xzyn8WkqCjPGSduz4ejiaqZNkjBcd634lNk3GeL1R8pgxIXuUHHvcvZYaw5FTLGDcttK2/2B8XWPWPog23kyMd5u77C6TZswyMsbtoc1O2UmWkUx32e/Z15b2Mo1//EumzYlsm5M3ttKMf58yf3P90bffQ/uXOOPXLDvdbMh4t2HjQyayHdvsFPthbE9x/XFiFDmuszBmNlKNFMMp6rjY7W0yYzhyigWMyMM/mHF8HUcu0mhGLr5qqEi6DvnN9cfeqFS8+jHVWsC8sVRPhkXWUrkz8oy5sjoaqRzaUcky8t/l0nWGVGbjUaCRr4UcjKnWIX9kNCOj0jKP9dho5BnDX9nLNHaW/hdAFf4rAZXpyh5ZMRw5BYwwwggjjDDCCCOMMMIII4wwwggjjDDCCCOMMMIII4wwwggjjDDCCCOMMMIII4wwwggjjDDCCCOMMMIII4wwwggjjDDCCCOMMMIIo3TjG9j+B4tUkGfI5p/jAAAAAElFTkSuQmCC) +![](http://cdn8.howtogeek.com/wp-content/uploads/2014/09/boot-iso-files-directly-from-hard-drive-in-grub2.png) -Linux的GRUB2启动加载器可以直接从硬盘启动Linux ISO文件,可以启动Live CD,甚至可以不用烧录到磁盘来安装Linux到另外一个硬盘分区或从USB驱动启动。 +Linux的GRUB2启动加载器可以直接从硬盘启动Linux ISO文件,可以启动Live CD的 ISO,而不用烧录到光盘来安装Linux到一个硬盘分区,或从USB驱动启动。 我们在Ubuntu 14.04上实施了该过程——Ubuntu及基于Ubuntu的Linux版本对此支持良好。[其它Linux发行版][1]上的工作原理也类似。 @@ -14,15 +14,15 @@ Linux的GRUB2启动加载器可以直接从硬盘启动Linux ISO文件,可以 ### 检查ISO文件内容 ### -你可能需要检查ISO文件来明确确定指定的文件在哪里。例如,你可以通过使用Ubuntu及其它基于GNOME的桌面环境中的归档管理器/File Roller文件管理器这些图形化应用程序来打开ISO文件来完成此项工作。在Nautilus文件管理器中,右击ISO文件并选择使用归档管理器打开。 +你可能需要查看ISO文件的内部来知道那些特定的的文件在哪里。例如,你可以通过使用Ubuntu及其它基于GNOME的桌面环境中的归档管理器/文件管理器这些图形化应用程序来打开ISO文件。在Nautilus文件管理器中,右击ISO文件并选择使用归档管理器打开。 -定位内核文件和initrd映像。如果你正在使用Ubuntu ISO文件,你会在卡斯帕文件夹中找到这些文件——vmlinuz文件时Linux内核,而initrd文件是initrd映像。后面,你需要知道它们在ISO文件中所处的位置。 +找到内核文件和initrd映像。如果你正在使用Ubuntu ISO文件,你会在casper文件夹中找到这些文件——vmlinuz文件是Linux内核,而initrd文件是initrd映像。后面,你需要知道它们在ISO文件中所处的位置。 ![](http://cdn8.howtogeek.com/wp-content/uploads/2014/09/650x350xvmlinuz-and-initrd-file-locations.png.pagespeed.ic.hB1yMlHMr2.png) ### 检查硬盘分区路径 ### -GRUB使用与Linux不同的“设备命名”结构。在Linux系统中,/dev/sda0是硬盘上的第一个分区——**a**是指第一个硬盘,而**0**是指第一个分区。在GRUB中,与/dev/sda0相对应的是(hd0,1)。**0**指第一个硬盘,而**1**则指它上面的第一个分区。换句话说,在GRUB设备名中,磁盘编号从0开始计数,而分区编号则从1开始计数——是啊,这真是突然令人困惑。例如,(hd3,6)是指第四磁盘上的第六分区。 +GRUB使用与Linux不同的“设备命名”方式。在Linux系统中,/dev/sda0是硬盘上的第一个分区——**a**是指第一个硬盘,而**0**是指第一个分区。在GRUB中,与/dev/sda0相对应的是(hd0,1)。**0**指第一个硬盘,而**1**则指它上面的第一个分区。换句话说,在GRUB设备名中,磁盘编号从0开始计数,而分区编号则从1开始计数——是啊,这真是突然令人困惑。例如,(hd3,6)是指第四磁盘上的第六分区。 你可以使用**fdisk -l**命令来查看该信息。在Ubuntu上,打开终端并运行以下命令: @@ -34,7 +34,7 @@ GRUB使用与Linux不同的“设备命名”结构。在Linux系统中,/dev/s ### 创建GRUB2启动条目 ### -添加自定义启动条目的最简单的方式是编辑/etc/grub.d/40_custom脚本,该文件设计用于用户自行添加启动条目。在编辑该文件后,/etc/defaults/grub文件和/etc/grub.d/脚本的内容将合成创建/boot/grub/grub.cfg文件——你不应该手工编辑该文件。它设计用于通过你在其它文件指定的设置自动生成。 +添加自定义启动条目的最简单的方式是编辑/etc/grub.d/40_custom脚本,该文件设计用于用户自行添加启动条目。在编辑该文件后,/etc/defaults/grub文件和/etc/grub.d/脚本的内容将合成创建/boot/grub/grub.cfg文件——你不应该手工编辑这个文件。它被设计为通过你在另外的文件中指定的设置自动生成。 你需要以root特权打开/etc/grub.d/40_custom文件来编辑。在Ubuntu上,你可以通过打开终端窗口,并运行以下命令来完成: @@ -48,22 +48,22 @@ GRUB使用与Linux不同的“设备命名”结构。在Linux系统中,/dev/s 这里为你展示了怎样来从ISO文件启动Ubuntu或基于Ubuntu的发行版,我们在Ubuntu 14.04下作了测试: - menuentry “Ubuntu 14.04 ISO” { - set isofile=”/home/name/Downloads/ubuntu-14.04.1-desktop-amd64.iso” + menuentry "Ubuntu 14.04 ISO" { + set isofile="/home/name/Downloads/ubuntu-14.04.1-desktop-amd64.iso" loopback loop (hd0,1)$isofile linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash initrd (loop)/casper/initrd.lz } -自定义启动条目以包含你期望的菜单的条目名称,计算机上到ISO文件的正确路径,以及包含ISO文件的硬盘和分区设备名。如果vmlinuz和initrd文件的名称或路径不同,请为这些文件指定正确的路径。 +自定义启动条目以包含你期望的菜单的条目名称,并指定计算机上该ISO文件的正确路径,以及包含ISO文件的硬盘和分区设备名。如果vmlinuz和initrd文件的名称或路径不同,请为这些文件指定正确的路径。 -(如果你有一个独立的/home/分区,忽略/home位,像这样:**set isofile=”/name/Downloads/${isoname}”**)。 +(如果你的/home/ 目录是一个分区,请忽略/home部分,像这样:**set isofile="/name/Downloads/${isoname}"**)。 -**重要说明**:不同的Linux版本要求带有不同启动选项的不同的启动条目,GRUB Live ISO多启动项目提供了[用于不同Linux发行版的菜单条目][6]的各种不同类型。你应当可以为你想要启动的ISO文件调整这些示例菜单条目。你也可以仅仅从网页搜索你想要启动的Linux发行版的名称和发行编号,并附带关键词“在GRUB中从ISO启动”,以获取更多信息。 +**重要说明**:不同的Linux版本要求带有不同启动选项的不同的启动条目,GRUB Live ISO多启动项目提供了[用于不同Linux发行版的菜单条目][6]的各种不同类型。你应当为你想要启动的ISO文件调整这些示例菜单条目。你也可以仅仅从网页搜索你想要启动的Linux发行版的名称和发行编号,并附带关键词“在GRUB中从ISO启动”,以获取更多信息。 ![](http://cdn8.howtogeek.com/wp-content/uploads/2014/09/650x392xadd-a-linux-iso-file-to-grub-boot-loader.png.pagespeed.ic.2FR0nOtugC.png) -如果你想要添加更多ISO启动选项,请为该文件添加额外章节。 +如果你想要添加更多ISO启动选项,请为该文件添加额外部分。 完成后保存文件,返回终端窗口并运行以下命令: @@ -73,7 +73,7 @@ GRUB使用与Linux不同的“设备命名”结构。在Linux系统中,/dev/s 再次启动计算机时,你将看到ISO启动条目,你可以选择它来启动ISO文件。在启动时,你可能需要按Shift键来显示GRUB菜单。 -如果在尝试启动ISO文件时你看见错误信息或黑屏,那么你的启动条目配置不管怎么说配置错误了。即使ISO文件路径和设备名是正确的,ISO文件上的vmlinuz和initrd文件的路径可能是不正确的,或者你启动Linux系统可能需要不同的选项。 +如果在尝试启动ISO文件时你看见错误信息或黑屏,那么你的启动条目配置肯定配置错误了。即使ISO文件路径和设备名是正确的,ISO文件上的vmlinuz和initrd文件的路径可能是不正确的,或者你启动Linux系统可能需要不同的选项。 -------------------------------------------------------------------------------- @@ -81,7 +81,7 @@ via: http://www.howtogeek.com/196933/how-to-boot-linux-iso-images-directly-from- 作者:[Chris Hoffman][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 89fa4d19b5845fca6a0704707f645b783be2d761 Mon Sep 17 00:00:00 2001 From: runningwater Date: Sat, 25 Oct 2014 23:21:26 +0800 Subject: [PATCH 008/316] =?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 --- sources/share/20141013 UbuTricks 14.10.08.md | 56 ------------------- .../share/20141013 UbuTricks 14.10.08.md | 56 +++++++++++++++++++ 2 files changed, 56 insertions(+), 56 deletions(-) delete mode 100644 sources/share/20141013 UbuTricks 14.10.08.md create mode 100644 translated/share/20141013 UbuTricks 14.10.08.md diff --git a/sources/share/20141013 UbuTricks 14.10.08.md b/sources/share/20141013 UbuTricks 14.10.08.md deleted file mode 100644 index 2443845e5e..0000000000 --- a/sources/share/20141013 UbuTricks 14.10.08.md +++ /dev/null @@ -1,56 +0,0 @@ -(translating by runningwater) -UbuTricks 14.10.08 -================================================================================ -> An Ubuntu utility that allows you to install the latest versions of popular apps and games - -UbuTricks is a freely distributed script written in Bash and designed from the ground up to help you install the latest version of the most acclaimed games and graphical applications on your Ubuntu Linux operating system, as well as on various other Ubuntu derivatives. - -![](http://i1-linux.softpedia-static.com/screenshots/UbuTricks_1.png) - -### What apps can I install with UbuTricks? ### - -Currently, the latest versions of the Calibre, Fotoxx, Geary, GIMP, Google Earth, HexChat, jAlbum, Kdenlive, LibreOffice, PCManFM, Qmmp, QuiteRSS, QupZilla, Shutter, SMPlayer, Ubuntu Tweak, Wine and XBMC (Kodi), PlayOnLinux, Red Notebook, NeonView, Sunflower, Pale Moon, QupZilla Next, FrostWire and RSSOwl applications can be installed with UbuTricks. - -### What games can I install with UbuTricks? ### - -In addition, the latest versions of the 0 A.D., Battle for Wesnoth, Transmageddon, Unvanquished and VCMI (Heroes III Engine) games can be installed with the UbuTricks program. Users can also install the latest version of the Cinnamon and LXQt desktop environments. - -### Getting started with UbuTricks ### - -The program is distributed as a .sh file (shell script) that can be run from the command-line using the “sh ubutricks.sh” command (without quotes) or make it executable and double-click it from your Home folder or desktop. All you have to do is to select and app or game and click the OK button to install it. - -### How does it work? ### - -When accessed for the first time, the program will display a welcome screen from the get-to, notifying users about how it actually works. There are three methods to install an app or game, via PPA, DEB file or source tarball. Please note that apps and games will be automatically downloaded and installed. - -### What distributions are supported? ### - -Several versions of the Ubuntu Linux operating systems are supported, but if not specified, it will default to the current stable version, Ubuntu 14.04 LTS (Trusty Tahr). At the moment, the program will not work if you don’t have the gksu package installed on your Ubuntu box. It is based on Zenity, which should be installed too. - -![](http://i1-linux.softpedia-static.com/screenshots/UbuTricks_2.jpg) - -- last updated on:October 9th, 2014, 11:29 GMT -- price:FREE! -- developed by:Dan Craciun -- homepage:[www.tuxarena.com][1] -- license type:[GPL (GNU General Public License)][3] -- category:ROOT \ Desktop Environment \ Tools - -### Download for UbuTricks: ### - -- [ubutricks.sh][2] - --------------------------------------------------------------------------------- - -via: http://linux.softpedia.com/get/Desktop-Environment/Tools/UbuTricks-103626.shtml - -作者:[Marius Nestor][a] -译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.softpedia.com/editors/browse/marius-nestor -[1]:http://www.tuxarena.com/apps/ubutricks/ -[2]:http://www.tuxarena.com/intro/files/ubutricks.sh -[3]:http://www.gnu.org/licenses/gpl-2.0.html \ No newline at end of file diff --git a/translated/share/20141013 UbuTricks 14.10.08.md b/translated/share/20141013 UbuTricks 14.10.08.md new file mode 100644 index 0000000000..6da65a3f3c --- /dev/null +++ b/translated/share/20141013 UbuTricks 14.10.08.md @@ -0,0 +1,56 @@ +UbuTricks 14.10.08 +================================================================================ +> 是一款 Ubuntu 系统上的实用工具软件,使用它可以让您安装上最新版本的流行应用程序和游戏。 + +UbuTricks 是一款免费发布的用 Bash 语言编写的脚本型应用程序。它被设计为从最初版本一直向上搜索的方式来帮助您在 Ubuntu Linux 操作系统以及其它 Ubuntu 衍生版本系统上安装最受好评的游戏和图形应用程序的最高版本软件。 + +![](http://i1-linux.softpedia-static.com/screenshots/UbuTricks_1.png) + +### 我能利用 UbuTricks 来安装哪些应用程序呢? ### + +目前,最新版本的 Calibre(译者注:calibre 是一款开源的电子书软体套装,可以用来组织、存放、以及管理电子书,支持大多数的电子书格式。 同时也支持与许多流行的电子书阅读器进行同步,并可能在DRM的限制下转换电子书的格式) 、Fotoxx(译者注:一款图像管理和图像编辑程序)、Geary(译者注:适配于GNOME3 桌面环境的 IMAP 邮件客户端)、GIMP、Google Earth、HexChat(译者注:一款基于 XChat 的 IRC 客户端)、jAlbum(译者注:网页在线相册)、Kdenlive、LibreOffice、PCManFM、Qmmp(译者注:基于 Qt 库的音频播放器)、QuiteRSS, QupZilla、Shutter(译者注:多功能屏发屏幕截屏工具)、SMPlayer、Ubuntu Tweak、Wine 和 [XBMC (Kodi)][4](译者注:开源免费的媒体播放器,13.2 “Gotham” 版本后改名为 Kodi)、PlayOnLinux、Red Notebook、NeonView、Sunflower、Pale Moon、 QupZilla Next、FrostWire 以及 RSSOwl 等这些应用程序都可以用 UbuTricks 来安装。 + +### 我能利用 UbuTricks 来安装哪些游戏呢? ### + +此外,最新版本 0 A.D.、 韦诺之战、 Transmageddon、Unvanquished 和 VCMI (英雄 III 引擎) 这些游戏都可以用 UbuTricks 程序来安装。用户也可以安装最新版本的 Cinnamon 和 LXQt 桌面环境。 + +### UbuTricks 使用起步 ### + +此程序是以 .sh 文件(shell 脚本)形式发布的,可以在命令行下面运行 “sh ubutricks.sh” 命令(不加引号)来运行,或者使它具有可执行权限,然后双击存入在 Home 目录或桌面的此文件来运行。您所需要做的就是选择应用程序或游戏,再点击 OK 按纽来安装。 + +### 它的工作原理? ### + +首次启动时,一开始会显示一个欢迎画面,来告知用户是怎么样使用的。有三种方法来安装应用程序或游戏:通过 PPA,DEB 格式文件或源代码 tar 包。请注意,应用程序或游戏会自动的下载和安装。 + +### 它支持哪些系统发布版本? ### + +它对 Ubuntu Linux 操作系统的多个版本都支持,但如果没有特别说明的话,默认指的当前稳定版本,即 Ubuntu 14.04 LTS(Trusty Tahr)版本。您的 Ubuntu 盒子上如果还没有安装 gksu 包的话,此程序是没法运行的,而 gksu 又基于 Zenity 包,所以您也应该安装它。 + +![](http://i1-linux.softpedia-static.com/screenshots/UbuTricks_2.jpg) + +- 最新版本:格林威治标准时间 2014 年 10 月 9 号 11:29 +- 价格:免费! +- 开发者:Dan Craciun +- 主页:[www.tuxarena.com][1] +- 许可证类型:[GPL (GNU General Public License)][3] +- 类别:ROOT \ 桌面操作环境 \ 工具 + +### UbuTricks 下载: ### + +- [ubutricks.sh][2] + +-------------------------------------------------------------------------------- + +via: http://linux.softpedia.com/get/Desktop-Environment/Tools/UbuTricks-103626.shtml + +作者:[Marius Nestor][a] +译者:[runningwater](https://github.com/runningwater) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.softpedia.com/editors/browse/marius-nestor +[1]:http://www.tuxarena.com/apps/ubutricks/ +[2]:http://www.tuxarena.com/intro/files/ubutricks.sh +[3]:http://www.gnu.org/licenses/gpl-2.0.html +[4]:http://xbmc.org/about/ \ No newline at end of file From 7f2a1bb540c137bb6a64d978ea4bafeeb9cca77b Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Oct 2014 23:26:53 +0800 Subject: [PATCH 009/316] PUB:Linux FAQs with Answers--How to build a RPM or DEB package from the source with CheckInstall @luoyutiantang --- ...ckage from the source with CheckInstall.md | 84 ++++++++++++++++++ ...ckage from the source with CheckInstall.md | 86 ------------------- 2 files changed, 84 insertions(+), 86 deletions(-) create mode 100644 published/Linux FAQs with Answers--How to build a RPM or DEB package from the source with CheckInstall.md delete mode 100644 translated/tech/Linux FAQs with Answers--How to build a RPM or DEB package from the source with CheckInstall.md diff --git a/published/Linux FAQs with Answers--How to build a RPM or DEB package from the source with CheckInstall.md b/published/Linux FAQs with Answers--How to build a RPM or DEB package from the source with CheckInstall.md new file mode 100644 index 0000000000..b7552db9ba --- /dev/null +++ b/published/Linux FAQs with Answers--How to build a RPM or DEB package from the source with CheckInstall.md @@ -0,0 +1,84 @@ +Linux有问必答:怎么用CheckInstall从源码创建一个RPM或DEB包 +================================================================================ +> **问题**:我想要从源码创建安装的软件包。有没有一种方式从源码来创建和安装软件包,而不是运行“make install”?这样的话,以后如果我想,我可以容易的卸载程序。 + +如果你已经从它的源码运行“make install”安装了linux程序。想完整移除它将变得真的很麻烦,除非程序的开发者在Makefile里提供了uninstall的目标设置。否则你必须在安装前后比较你系统里文件的完整列表,然后手工移除所有在安装过程中加入的文件。 + +这时候Checkinstall就可以派上使用。Checkinstall会跟踪install命令行所创建或修改的所有文件的路径(例如:“make install”、“make install_modules”等)并建立一个标准的二进制包,让你能用你发行版的标准包管理系统安装或卸载它,(例如Red Hat的yum或者Debian的apt-get命令)。已知它在 Slackware、SuSe、Mandrake 和 Gentoo 上也工作很好,请参考其[官方文档][1]。 + +在这篇文章中,我们只集中在红帽子和Debian为基础的发行版,并展示怎样从源码使用Checkinstall创建一个RPM和DEB软件包 + +### 在linux上安装Checkinstall ### + +在Debian及其衍生发行版上安装Checkinstall: + + # aptitude install checkinstall + +在红帽子的发行版上安装Checkinstall,你需要下载一个已经打包好的Checkinstall rpm包(例如:从 [http://rpm.pbone.net][2]找到),不过它已经从Repoforge库里删除了。这个包是针对Cent OS6的,不过也可在Cent OS7里工作。 + + # wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/ikoinoba/CentOS_CentOS-6/x86_64/checkinstall-1.6.2-3.el6.1.x86_64.rpm + # yum install checkinstall-1.6.2-3.el6.1.x86_64.rpm + +一旦checkinstall安装好,你就可以用下列格式创建一个特定的软件包 + + # checkinstall + +如果没有参数,默认安装命令“make install”将被使用 + +### 用Checkinstall创建一个RPM或DEB包 ### + +在这个例子里,我们将创建一个htop包,这是一个linux交互式文本模式进程查看器(类似 top)。 + +首先,让我们从项目的官方网站下载源代码,作为一个好的习惯,我们存储源码包到/usr/local/src下,并解压它。 + + # cd /usr/local/src + # wget http://hisham.hm/htop/releases/1.0.3/htop-1.0.3.tar.gz + # tar xzf htop-1.0.3.tar.gz + # cd htop-1.0.3 + +让我们看看htop的安装命令是什么,以便我们能用Checkinstall命令调用它,如下面所示,htop用“make install”命令安装。 + + # ./configure + # make install + +因此,要创建一个htop安装包,我们可以不带任何参数的调用checkinstall,这将使用“make install”命令创建一个包。在这个过程中, checkinstall命令会问你几个问题。 + +简而言之,如下命令会创建一个htop包: + + # ./configure + # checkinstall + +“Should I create a default set of package docs?(我会创建一个默认设置的包文件?)”,回答“Y”: + +![](https://farm6.staticflickr.com/5577/15118597217_1fdd0e0346_z.jpg) + +你可以输入一个包的简短描述,然后按两次回车: + +![](https://farm4.staticflickr.com/3898/15118442190_604b71d9af.jpg) + +输入一个数字以修改下面的任何值或ENTER继续: + +![](https://farm4.staticflickr.com/3898/15118442180_428de59d68_z.jpg) + +然后checkinstall将自动地创建一个.rpm或者.deb包,根据你的linux系统是什么: + +在CentOS7: + +![](https://farm4.staticflickr.com/3921/15282103066_5d688b2217_z.jpg) + +在Debian 7: + +![](https://farm4.staticflickr.com/3905/15118383009_4909a7c17b_z.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/build-rpm-deb-package-source-checkinstall.html + +译者:[luoyutiantang](https://github.com/luoyutiantang) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://checkinstall.izto.org/docs/README +[2]:http://rpm.pbone.net/ +[3]:http://ask.xmodulo.com/install-htop-centos-rhel.html diff --git a/translated/tech/Linux FAQs with Answers--How to build a RPM or DEB package from the source with CheckInstall.md b/translated/tech/Linux FAQs with Answers--How to build a RPM or DEB package from the source with CheckInstall.md deleted file mode 100644 index 372030e6d0..0000000000 --- a/translated/tech/Linux FAQs with Answers--How to build a RPM or DEB package from the source with CheckInstall.md +++ /dev/null @@ -1,86 +0,0 @@ -Linux 常见问题解答 --怎么用checkinstall从源码创建一个RPM或DEB包 -================================================================================ -> **问题**:我想要从源码创建安装的软件程序。有没有一种方式来创建并且从源码安装包,而不是运行“make install”?那样,以后如果我想,我可以容易的卸载程序。 - -如果你已经从从它的源码运行“make install”安装了linux程序。想完整移除它将变得真的很麻烦,除非程序的创造者在Makefile里提供卸载的目标。你会有在你系统里文件的完整列表来和从源码安装之后比较,然后手工移除所有在制作安装过程中加入的文件 - - -这时候Checkinstall就可以派上使用。Checkinstall保留命令行创建或修改的所有文件的路径(例如:“make install”“make install_modules”等)并建立一个标准的二进制包,让你能用你发行版的标准包管理系统安装或卸载它,(例子:Red Hat的yum或者Debian的apt-get命令) It has been also known to work with Slackware, SuSe, Mandrake and Gentoo as well, as per the official documentation. [official documentation][1]. - -在这篇文章中,我们只集中在红帽子和Debian为基础的发行版,并展示怎样从源码使用Checkinstall创建一个RPM和DEB软件包 - -### 在linux上安装Checkinstall ### - -在Debian衍生上安装Checkinstall: - - # aptitude install checkinstall - -在红帽子的发行版上安装Checkinstall,你需要下载一个预先建立的Checkinstall rpm(例如:从 [http://rpm.pbone.net][2]),他已经从Repoforge库里删除。对于Cent OS6这个rpm包也可在Cent OS7里工作。 - - # wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/ikoinoba/CentOS_CentOS-6/x86_64/checkinstall-1.6.2-3.el6.1.x86_64.rpm - # yum install checkinstall-1.6.2-3.el6.1.x86_64.rpm - -一旦checkinstall安装,你可以用下列格式创建一个特定的软件包 - - # checkinstall - -如果没有参数,默认安装命令“make install”将被使用 - -### 用Checkinstall创建一个RPM或DEB包 ### - -在这个例子里,我们将创建一个htop包,对于linux交互式文本模式进程查看器(就像上面的 steroids) - - -首先,让我们从项目的官方网站下载源代码,一个最佳的练习,我们存储源码到/usr/local/src,并解压它 - - # cd /usr/local/src - # wget http://hisham.hm/htop/releases/1.0.3/htop-1.0.3.tar.gz - # tar xzf htop-1.0.3.tar.gz - # cd htop-1.0.3 - -让我们找出htop安装命令,那样我们就能调用Checkinstall命令,下面展示了,htop用“make install”命令安装 - - # ./configure - # make install - -因此,创建一个htop包,我们可以调用checkinstall不带任何参数安装,这将使用“make install”命令创建一个包。随着这个过程 checkinstall命令会问你一个连串的问题。 - -总之,这个命令会创建一个htop包: **htop**: - - # ./configure - # checkinstall - -回答“Y”“我会创建一个默认设置的包文件?” - -![](https://farm6.staticflickr.com/5577/15118597217_1fdd0e0346_z.jpg) - -你可以输入一个包的简短描述,然后按两次ENTER - -![](https://farm4.staticflickr.com/3898/15118442190_604b71d9af.jpg) - -输入一个数值修改下面的任何值或ENTER前进 - -![](https://farm4.staticflickr.com/3898/15118442180_428de59d68_z.jpg) - -然后checkinstall将自动地创建一个.rpm或者.deb包,根据你的linux系统是什么: - -在CentOS7: - -![](https://farm4.staticflickr.com/3921/15282103066_5d688b2217_z.jpg) - -在Debian 7: - -![](https://farm4.staticflickr.com/3905/15118383009_4909a7c17b_z.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/build-rpm-deb-package-source-checkinstall.html - -译者:[luoyutiantang](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://checkinstall.izto.org/docs/README -[2]:http://rpm.pbone.net/ -[3]:http://ask.xmodulo.com/install-htop-centos-rhel.html From b8699338d1817c0defba00d4a0d18c750116d007 Mon Sep 17 00:00:00 2001 From: runningwater Date: Sat, 25 Oct 2014 23:46:18 +0800 Subject: [PATCH 010/316] translating by runningwater --- ...0141021 How to monitor a log file on Linux with logwatch.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141021 How to monitor a log file on Linux with logwatch.md b/sources/tech/20141021 How to monitor a log file on Linux with logwatch.md index 5f00ff77df..28b9f5bfde 100644 --- a/sources/tech/20141021 How to monitor a log file on Linux with logwatch.md +++ b/sources/tech/20141021 How to monitor a log file on Linux with logwatch.md @@ -1,3 +1,4 @@ +(translating by runningwater) How to monitor a log file on Linux with logwatch ================================================================================ Linux operating system and many applications create special files commonly referred to as "logs" to record their operational events. These system logs or application-specific log files are an essential tool when it comes to understanding and troubleshooting the behavior of the operating system and third-party applications. However, log files are not precisely what you would call "light" or "easy" reading, and analyzing raw log files by hand is often time-consuming and tedious. For that reason, any utility that can convert raw log files into a more user-friendly log digest is a great boon for sysadmins. @@ -122,7 +123,7 @@ Hope this helps. Feel free to comment to share your own tips and ideas with the via: http://xmodulo.com/monitor-log-file-linux-logwatch.html 作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) +译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 5895acb58da02e854bf08cf741df8712bc8e3ccc Mon Sep 17 00:00:00 2001 From: barney-ro Date: Sun, 26 Oct 2014 11:02:08 +0800 Subject: [PATCH 011/316] [translated]20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit --- ...of Changes and Fixes for POODLE Exploit.md | 45 ------------------- ...of Changes and Fixes for POODLE Exploit.md | 43 ++++++++++++++++++ 2 files changed, 43 insertions(+), 45 deletions(-) delete mode 100644 sources/share/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md create mode 100644 translated/share/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md diff --git a/sources/share/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md b/sources/share/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md deleted file mode 100644 index 41b5cca16a..0000000000 --- a/sources/share/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md +++ /dev/null @@ -1,45 +0,0 @@ -barney-ro translating - -Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit -================================================================================ -> This email client is getting better with each new release - -![](http://i1-news.softpedia-static.com/images/news2/Claws-Mail-3-11-0-Brings-a-Ton-of-Changes-and-Fix-for-POODLE-Exploit-462808-2.jpg) - -**Claws Mail is an open source email client that is fast, easy to use, and full of interesting features and that is gaining some traction in the Linux community. The developers have pushed another big update for this application and it would be a very good idea to upgrade.** - -Some users might not know this, but Claws Mail is actually a very old application. It's been around for more than 13 years, but it operated under the name of Sylpheed-Claws. It was forked a while back, and since then, the new project has managed to become a much better alternative. - -There are quite a few email clients for Linux right now and they are all fighting for supremacy, although it's been done in a very polite fashion. Claws Mail is now being integrated in quite a few Linux distros by default, and this is actually very good news for fans of the app. - -### What are some of the features in Claws Mail 3.11.0 ### - -Just like any other application that deals with online connections and online protocols, Claws Mail has also been affected by the recent vulnerabilities identified in the community, like POODLE for example. The developers had a very busy schedule and the changelog reflects this entirely. - -"A new version of the RSSyl plugin, completely redesigned and rewritten. Migration from the previous version is automatic, it has a new storage format in ~/.claws-mail/RSSyl/ (hierarchical directories instead of flat file format). It uses the expat library instead of libxml2 for parsing feed data." - -"Due to popular demand, use of the Up key in the message body in the Compose window stops at the top of the message body and does not continue up to the header fields. This reverts the behavior introduced in version 3.10.0," say the developers in the [announcement][1]. - -Also, users can relax now because the POODLE vulnerability has been closed in the email client, feat that has been achieved by disabling all the SSLv3 connections. - -The TAB address completion has also received some improvements and it should work much better, especially for New Messages, nagivation with the help of arrows has been tweaked, and numerous smaller enhancements have been made. - -The developers have repositories for most of the major distributions out there, but you can always install it from source. You can check the official announcement for more details about this release. - -Download the Claws Mail 3.11.0 source package, if you want to compile the software yourself. - -- [Claws Mail 3.11.0 tar.xz File size: 5.6 MB][2] - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/Claws-Mail-3-11-0-Brings-a-Ton-of-Changes-and-Fix-for-POODLE-Exploit-462808.shtml - -作者:[Silviu Stahie][a] -译者:[barney-ro](https://github.com/barney-ro) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/silviu-stahie -[1]:http://www.claws-mail.org/news.php -[2]:http://sourceforge.net/projects/claws-mail/files/Claws%20Mail/3.11.0/claws-mail-3.11.0.tar.xz \ No newline at end of file diff --git a/translated/share/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md b/translated/share/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md new file mode 100644 index 0000000000..49da5b82bd --- /dev/null +++ b/translated/share/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md @@ -0,0 +1,43 @@ +针对POODLE 漏洞,Claws Mail 3.11.0 给我们带来了很多的变化和更新。 +================================================================================ +> 随着每一个新版本的推出,Claws Mail 将会越来越好。 + +![](http://i1-news.softpedia-static.com/images/news2/Claws-Mail-3-11-0-Brings-a-Ton-of-Changes-and-Fix-for-POODLE-Exploit-462808-2.jpg) + +**Claws Mail 发起于Linux 社区,是一款快速、简单易用,并且充满了很多有趣的特性的开源邮件客户端。开发者们推送了一次大的更新和升级,这是一个非常好的主意。** + +有些人可能不知道这个邮件客户端,但Claws Mail 实际上是一个非常老的软件。它以前名称是Sylpheed-Claws ,已经走过了13个年头。Claws Mail 不久以前分支(forked)了出来,从此,新分支变成了很好的可能替代Sylpheed-Claws 产品。 + +现在还有很多针对Linux 的邮件客户端正在进行着霸权地位的争夺战,尽管这是在很礼貌的方式下完成的。很多的Linux发行版都默认集成了Claws Mail,对于Claws Mail 的粉丝,这将是一个好消息。 + +### Claws Mail 3.11.0 给我们带来了哪些新的特性呢 ### + +就像其他的应用程序一样,在处理网络连接和网络协议时,Claws Mail 也一直受到漏洞识别社区的关注,比如说POODLE 漏洞。开发者很紧张的时间表和大量的更新日志就很好的反应了这个。 + +“新版本的RSSyl 插件已经完全被重新设计和重写。从先前版本的迁移是自动完成的,它拥有一个新的存储格式在~/.claws-mail/RSSyl/ (用分级目录代替了平面文件的格式)。并且用expat 库代替了libxml2 库来解析提要数据。” + +“应广大朋友的要求,当消息的编辑窗口停留着消息体的上部,在消息体中使用上键(UP key)时,不再会回到头文字段了。这是在3.10.0版本中引入的。详见开发者的[宣告][1]” + +当然,大家也可以放心了,因为POODLE 漏洞,在新的邮件客户端中已经被关闭,是通过禁用了所有的SSLv3 连接实现的。 + +标签地址也收到了一些改进,并变得更好,特别是对于新邮件,导航箭头的帮助已经做了调整,有很多较小的改进。 + +开发者为大多数发行版创建了很多仓库,但是你也依然可以使用源来安装。想要进一步的了解,你可以关注官方关于每个版本的公告。 + +去下载Claws Mail 3.11.0 的源码包吧,如果你想要自己编译软件。 + +- [Claws Mail 3.11.0 tar.xz File size: 5.6 MB][2] + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Claws-Mail-3-11-0-Brings-a-Ton-of-Changes-and-Fix-for-POODLE-Exploit-462808.shtml + +作者:[Silviu Stahie][a] +译者:[barney-ro](https://github.com/barney-ro) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:http://www.claws-mail.org/news.php +[2]:http://sourceforge.net/projects/claws-mail/files/Claws%20Mail/3.11.0/claws-mail-3.11.0.tar.xz \ No newline at end of file From b1b8fb6f6edf04857436f393d9f5b63833d57360 Mon Sep 17 00:00:00 2001 From: johnhoow Date: Sun, 26 Oct 2014 19:43:37 +0800 Subject: [PATCH 012/316] =?UTF-8?q?=E5=B0=86=E7=BF=BB=E8=AF=91=E5=A5=BD?= =?UTF-8?q?=E7=9A=84=E6=96=87=E7=AB=A0=E7=A7=BB=E5=8A=A8=E5=88=B0translate?= =?UTF-8?q?d=E5=91=BD=E4=BB=A4=EF=BC=8C=E4=B9=8B=E5=89=8D=E5=BF=98?= =?UTF-8?q?=E8=AE=B0mv=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...7 pidstat - Monitor and Find Statistics for Linux Procesess.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md (100%) diff --git a/sources/tech/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md b/translated/tech/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md similarity index 100% rename from sources/tech/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md rename to translated/tech/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md From 93cb1c725cad61884fa410794a92461af12c5bdb Mon Sep 17 00:00:00 2001 From: alim0x Date: Sun, 26 Oct 2014 20:02:38 +0800 Subject: [PATCH 013/316] 08 translated, add 09 --- .../08 - The history of Android.md | 130 ------------------ .../09 - The history of Android.md | 4 +- .../08 - The history of Android.md | 128 +++++++++++++++++ 3 files changed, 131 insertions(+), 131 deletions(-) delete mode 100644 sources/talk/The history of Android/08 - The history of Android.md create mode 100644 translated/talk/The history of Android/08 - The history of Android.md diff --git a/sources/talk/The history of Android/08 - The history of Android.md b/sources/talk/The history of Android/08 - The history of Android.md deleted file mode 100644 index 589822dbc7..0000000000 --- a/sources/talk/The history of Android/08 - The history of Android.md +++ /dev/null @@ -1,130 +0,0 @@ -alim0x translating - -The history of Android -================================================================================ -![Android 1.5’s on-screen keyboard showing the suggestion bar while typing, the capital letters keyboard, the number and symbols screen, and an additional key popup.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/kb5.png) -Android 1.5’s on-screen keyboard showing the suggestion bar while typing, the capital letters keyboard, the number and symbols screen, and an additional key popup. -Photo by Ron Amadeo - -### Android 1.5, Cupcake—a virtual keyboard opens up device design ### - -In April 2009, almost three months after the release of 1.1, Android 1.5 was released. It was the first Android version to have a public, marketed code name: Cupcake. From here on out, Android releases would have alphabetical, snack-themed names. - -The most important Cupcake addition was easily the on-screen keyboard. For the first time, it was possible for OEMs to build a slate-style Android device without a thousand hardware keyboard keys and a complicated slide mechanism. - -Android's key labels could switch between uppercase and lowercase, depending on if caps lock was on or not. While it was off by default, there was an option to turn on the suggestion bar, which appeared along the top edge of the keyboard. Keys with ellipses in the popup, like the "u," above, could be held down to input [diacritical marks][1], which would display in a popup. The keyboard could switch to numbers and alternate characters, and long pressing on the period key would bring up even more punctuation. - -![Composite images of the app lineup in 1.5 and 1.1 and the notification panels from each version.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/abweave.png) -Composite images of the app lineup in 1.5 and 1.1 and the notification panels from each version. -Photo by Ron Amadeo - -New icons were added for the new "Camcorder" functionality, and Google Talk was broken out from IM into its own separate app. The Amazon MP3 and Browser icons were redesigned, too. The Amazon MP3 icon was changed primarily because Amazon was planning on launching other Android apps soon, and the "A" icon was far too generic. The browser icon was easily the worst in Android 1.1, so it was changed and no longer resembled a desktop OS dialog box. The last app drawer change was to "Pictures," which was renamed to "Gallery." - -The notification panel was redesigned again as well. The panel background got a weave texture, and the gradients on notifications were smoothed out. Android 1.5 had a lot of little design changes to core OS pieces that affected all apps. On the "Clear notifications" button, you could see the new system-wide button style, which had a gradient, a thinner outline, and less shadowing than the old version. - -![The “Add to Home" dialog boxes in 1.5 and 1.1.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/widget.png) -The “Add to Home" dialog boxes in 1.5 and 1.1. -Photo by Ron Amadeo - -Third-party widgets were another headline feature of Cupcake, and they still remain one of Android's defining features. Developers could bundle a home screen widget along with their apps that would either control or display information from that app. Google showed off a few new widgets of its own, too, with the Calendar and Music apps. - -![Left: a screenshot of the calendar widget, music widget, and a row of live folders. Center: the folder list. Right: an open view of the “contacts with phone numbers" live folder.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/folders-and-widgets-and-stuff.png) -Left: a screenshot of the calendar widget, music widget, and a row of live folders. Center: the folder list. Right: an open view of the “contacts with phone numbers" live folder. -Photo by Ron Amadeo - -On the left screenshot, above, you can see the new Calendar and Music icons. The Calendar widget could only show a single event for the day, and tapping it would open the calendar. It wouldn't let you choose what calendars to display, and widgets weren't resizable—it only ever looked like this. The music widget was blue—despite the music app not having a drop of blue in it—and showed the song and artist name, along with play and next buttons. - -Also in the left shot, the first three folders on the bottom row were a new feature called "Live Folders." These were accessible under the new top-level "Folders" section in the "Add to Home" menu, which you can see in the center picture. Live Folders showed the content of an application without having to open that application. The ones that came with Cupcake were all contacts-related, showing all of the user's contacts, contacts with phone numbers, or starred contacts. - -Rather than icons, Live Folders used a simple list view that popped up over the home screen. Contacts were just for starters, Live Folders was a whole API that developers could use. Google demoed a folder of books from the Google Books app, and it was possible to have an RSS feed or top stories from a website as a live folder. Live folders were one of the few Android ideas that didn't work out, and the feature was shut down in Honeycomb. - -![The camcorder and camera UI, with on-screen shutter buttons.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/device-2013-12-26-11016071.png) -The camcorder and camera UI, with on-screen shutter buttons. -Photo by Ron Amadeo - -If you couldn't tell from the new "Camcorder" icon, video recording was added to Android in 1.5. The two icons, camera and camcorder, were actually the same app, and you could jump between the two of them with an option in the menu labeled "Switch to camera" and "Switch to camcorder." Video quality on the T-Mobile G1 was not that great. A test video on "High" quality output; a .3GP video file with a resolution of 352 x 288 and a lagtastic frame rate of 4 FPS. - -Along with the new video feature, the Camera app saw a few much-needed UI tweaks. A thumbnail in the top left showed the last picture that was taken, and tapping on it would jump to the camera roll in the Gallery. The circle icon on the top right of both screens was an on-screen shutter button, meaning that, post 1.5, Android devices no longer required a hardware camera button. - -This interface was actually much closer to the Android 4.2 design than many of the subsequent camera apps. While later designs would add silly leather textures and more controls to the camera, Android went back to basics with later designs, and that 4.2 redesign shares a lot in common with this. What was a primitive layout in Android 1.5 became a minimal, full-screen viewfinder in Android 4.2. - -![Google Talk running in the Google Talk app versus Google Talk running in the IM app.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/gtalk-im.png) -Google Talk running in the Google Talk app versus Google Talk running in the IM app. -Photo by Ron Amadeo - -Android 1.0's IM app was used for Google Talk functionality, but in Android 1.5, Google Talk was broken off into its own app. Support for it in the IM app was removed. Google Talk (above, left) was clearly based on the IM app (above, right), but as soon as the stand alone app was released in 1.5, work on the IM app was abandoned. - -The new Google Talk app had a redesigned status bar, presence lights on the right side, and a redesigned mobile icon, which was a gray monogram of the bugdroid. The blue compose bar switched to a more sensible gray in the chat view, and the message backgrounds changed from light green and white to light green and green. With a stand alone app, Google could add Gtalk-only features like chatting "off the record," which would stop Gmail from saving a copy of every chat. - -![The calendar in Android 1.5 got a lot lighter.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/cal15.png) -The calendar in Android 1.5 got a lot lighter. -Photo by Ron Amadeo - -The calendar dumped the ugly white squares on a black background and changed to an all-light app. The background of everything became white, and day-of-the-week headers were changed to blue. The individual appointment blocks switched from a small color strip to entirely colored, and the text changed to white. This will be the last time the calendar is touched for a long time. - -![From left to right: the browser’s new controls, the zoomed-out magnifying view, and highlighting text for copy/pasting.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/browser-craziness.png) -From left to right: the browser’s new controls, the zoomed-out magnifying view, and highlighting text for copy/pasting. -Photo by Ron Amadeo - -Android 1.5 changed the zoom controls system-wide. Instead of two big circles, the zoom controls became two halves of a rectangle with rounded corners. These new controls applied to the browser, Google Maps, and the gallery. - -The browser had lots of work done on the zoom functionality. After zooming in or out, the "1x" button would return you to the standard zoom level. The button in the bottom right corner would zoom all the way out of the page and display a magnifying rectangle over the page, which you can see in the center image. Grabbing the rectangle and releasing it would zoom that part of the page to a "1x" view. Android didn't have acceleratable scrolling, which made the max scrolling speed pretty slow—this was Google's solution for navigating a long webpage. - -Another addition to the browser was the ability to copy text on a webpage—previously you could only copy text from an input box. Selecting "copy text" from the menu would activate highlight mode, and dragging your finger over text in a Web page would highlight it. The G1’s trackball was very handy for super-precise movement like this and could control the mouse cursor. There were no draggable handles, and as soon as you lifted your finger off the screen, Android would copy the text and remove the highlight, so you had to be ridiculously precise to get any use out of the copy feature. - -The browser in Android 1.5 would crash a lot—much more than in previous versions. Just viewing Ars Technica in desktop mode would crash the browser, as did many other sites. - -![](http://cdn.arstechnica.net/wp-content/uploads/2013/12/lockscreen.png) -Photo by Ron Amadeo - -The default lock screen and pattern lock screen both changed their empty, black backgrounds to the same wallpaper as the home screen. - -The lighter background on the pattern unlock screen revealed the sloppy job Google did on the alignment of the circles. The white circles were nowhere near centered inside the black circles—basic alignment issues like this continued to be a frequent problem for Android in these early days. - -![The YouTube uploader, contacts thumbnails, the auto rotate setting, and the new music design.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/TWEAKS2.png) -The YouTube uploader, contacts thumbnails, the auto rotate setting, and the new music design. -Photo by Ron Amadeo - -![The HTC Magic, the second Android device, and the first without a hardware keyboard.](http://cdn.arstechnica.net/wp-content/uploads/2014/04/htc-magic-white.jpg) -The HTC Magic, the second Android device, and the first without a hardware keyboard. -Photo by HTC - -> #### Google Maps is the first built-in app to hit the Android Market #### -> -> While this article is (mostly) organizing app updates by Android version for simplicity's sake, there are a few outliers that deserve special recognition. On June 14, 2009, Google Maps was the first packed-in Android app to be updated via the Android Market. While every other app required a full system release to be updated, Maps was broken out of the OS, free to receive out-of-cycle updates whenever a new feature was ready. -> -> Moving apps out of the core OS and onto the Android Market would be a big focus for Google going forward. In general, OTA updates were a big initiative—they required the cooperation of the OEM and the carrier, both of which could drag their feet. Updates also didn’t make it to every device. Today, the Android Market gives Google a direct line to every Android phone with no such interference from outside parties. -> -> These were problems for a later date, though. In 2009, Google had only two unskinned phones to support, and the early Android carriers were seemingly responsive to Google’s update needs. This early move would prove to be a very proactive decision on Google’s part. At first, the company went this route only with its most important properties—Maps and Gmail—but later it would port the majority of the packed-in apps to the Android Market. Later initiatives like Google Play Services even brought app APIs out of the OS and into Google’s store. -> -> As for the new Maps at the time, it gained a new directions interface, along with the ability to give mass transit and walking directions. For now, directions were given on a plain black list—turn-by-turn-style navigation would come later. -> -> June 2009 was also the time Apple launched the third iPhone—the 3GS—and the third version of iPhone OS. iPhone OS 3's headline features were mostly catch-up items like copy/paste and MMS support. Apple's hardware was still nicer, and the software was smoother, more cohesive, and better designed. Google's insane pace of development was putting it on a path to parity though. iPhone OS 2 launched just before the Milestone 5 build of Android 0.5, which makes five Android releases in the span of the yearly iOS release cycle. - -Android 1.5 gave the YouTube app the ability to upload videos to the site. Uploading was accomplished by sharing a video from the Gallery to the YouTube app, or by opening a video directly from the YouTube app. This would bring up an upload screen, where the user would set things like the video title, tags, and access rights. Photos could be uploaded to Picasa, Google's original photo site, in a similar fashion. - -There were little tweaks all over the OS. Favorite contacts now showed a picture in the contacts list (although regular contacts were still pictureless). The third picture shows the new auto-rotate option in the settings—this was also the first version to support automatically switching orientations based on readings from the devices’ internal sensors. - -Cupcake did a great job of improving Android, particularly in terms of hardware options. The on-screen keyboard meant a hardware keyboard was no longer necessary. Auto rotate brought the OS a little closer to the iPhone, and an on-screen camera shutter button meant that hardware camera buttons were now optional, too. Shortly after the release of 1.5, a second Android device came out that would show the future direction of the platform: the HTC Magic. The Magic (right) didn’t have a hardware keyboard or a camera button. It was a solid, slider-less slate device that relied on Android’s on-screen buttons to get the job done. - -Android flagships started with the most buttons possible—a hardware qwerty phone—and slowly began whittling the button count down over time. While the Magic was a big step, eliminating an entire keyboard and a camera button, it still used start and end call buttons, four system buttons, and a trackball. - ----------- - -![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/8/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://en.wikipedia.org/wiki/Diacritic -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo diff --git a/sources/talk/The history of Android/09 - The history of Android.md b/sources/talk/The history of Android/09 - The history of Android.md index c629e9cc75..8a30a320b9 100644 --- a/sources/talk/The history of Android/09 - The history of Android.md +++ b/sources/talk/The history of Android/09 - The history of Android.md @@ -1,3 +1,5 @@ +alim0x translating + The history of Android ================================================================================ ![The new Android Market—less black, more white and green.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/marketab2.png) @@ -73,4 +75,4 @@ via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-histor 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo \ No newline at end of file +[t]:https://twitter.com/RonAmadeo diff --git a/translated/talk/The history of Android/08 - The history of Android.md b/translated/talk/The history of Android/08 - The history of Android.md new file mode 100644 index 0000000000..15dc0515d6 --- /dev/null +++ b/translated/talk/The history of Android/08 - The history of Android.md @@ -0,0 +1,128 @@ +安卓编年史 +================================================================================ +![安卓1.5的屏幕软键盘输入时的输入建议栏,大写状态键盘,数字与符号界面,更多符号弹窗。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/kb5.png) +安卓1.5的虚拟键盘输入时的输入建议栏,大写状态键盘,数字与符号界面,更多符号弹窗。 +Ron Amadeo供图 + +### Android 1.5 Cupcake——虚拟键盘打开设备设计的大门 ### + +在2009年4月,安卓1.1发布后将近三个月后,安卓1.5发布了。这是第一个拥有公开的,市场化代号的安卓版本:纸杯蛋糕(Cupcake)。从这个版本开始,每个版本的安卓将会拥有一个按字母表排序,以小吃为主题的代号。 + +纸杯蛋糕新增功能中最重要的明显当属虚拟键盘。这是OEM厂商第一次有可能抛开数不清按键的实体键盘以及复杂的滑动结构,创造出平板风格的安卓设备。 + +安卓的按键标识可以在大小写之间切换,这取决于大写锁定是否开启。尽管默认情况下它是关闭的,显示在键盘顶部的建议栏有个选项可以打开它。在按键的弹框中带有省略号的,就像“u”,上面图那样的,可以在按住的情况下可以输入弹框中的[发音符号][1]。键盘可以切换到数字和符号,长按句号键可以打开更多符号。 + +![1.5和1.1中的应用程序界面和通知面板的对比。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/abweave.png) +1.5和1.1中的应用程序界面和通知面板的对比。 +Ron Amadeo供图 + +“摄像机”功能加入了新图标,Google Talk从IM中分离出来成为了一个独立的应用。亚马逊MP3和浏览器的图标同样经过了重新设计。亚马逊MP3图标更改的主要原因是亚马逊即将计划推出其它的安卓应用,而“A”图标所指范围太泛了。浏览器图标无疑是安卓1.1中最糟糕的设计,所以它被重新设计了,并且不再像是一个桌面操作系统的对话框。应用抽屉的最后一个改变是“图片”,它被重新命名为了“相册”。 + +通知面板同样经过了重新设计。面板背景加上了布纹纹理,通知的渐变效果也被平滑化了。安卓1.5在系统核心部分有许多设计上的微小改变,这些改变影响到所有的应用。在“清除通知”按钮上,你可以看到全新的系统按钮风格,相比与旧版本的按钮有了渐变,更细的边框线以及更少的阴影。 + +![安卓1.5和1.1中的“添加到主屏幕”对话框。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/widget.png) +安卓1.5和1.1中的“添加到主屏幕”对话框。 +Ron Amadeo供图 + +第三方小部件是纸杯蛋糕的另一个头等特性,它们现在仍然是安卓的本质特征之一。无论是用来控制应用还是显示应用的信息,开发者们都可以为他们的应用捆绑一个主屏幕小部件。谷歌同样展示了一些它们自己的新的小部件,分别来自日历和音乐这两个应用。 + +![左:日历小部件,音乐小部件以及一排实时文件夹的截图。中:文件夹列表。右:“带电话号码的联系人”实时文件夹的打开视图。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/folders-and-widgets-and-stuff.png) +左:日历小部件,音乐小部件以及一排实时文件夹的截图。中:文件夹列表。右:“带电话号码的联系人”实时文件夹的打开视图。 +Ron Amadeo供图 + +在上方左边的截图里你可以看到新的日历和音乐图标。日历小部件只能显示当天的一个事件,点击它会打开日历。你不能够选择日历所显示的内容,小部件也不能够重新设置大小——它就是上面看起来的那个样子。音乐小部件是蓝色的——尽管音乐应用里没有一丁点的蓝色——它展示了歌曲名和歌手名,此外还有播放和下一曲按钮。 + +同样在左侧截图里,底部一排的头三个文件夹是一个叫做“实时文件夹”的新特性。它们可以在“添加到主屏幕”菜单中的新顶层选项“文件夹”中被找到,就像你在中间那张图看到的那样。实时文件夹可以展示一个应用的内容而不用打开这个应用。纸杯蛋糕带来的都是和联系人相关的实时文件夹,能够显示所有联系人,带有电话号码的联系人和加星标的联系人。 + +实时文件夹在主屏的弹窗使用了一个简单的列表视图,而不是图标。联系人只是实时文件夹的一个初级应用,它是给开发者使用的一个完整API。谷歌用Google Books应用做了个图书文件夹的演示,它可以显示RSS订阅或是一个网站的热门故事。实时文件夹是安卓没有成功实现的想法之一,这个特性最终在蜂巢(3.x)中被取消。 + +![摄像机和相机界面,屏幕上有触摸快门。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/device-2013-12-26-11016071.png) +摄像机和相机界面,屏幕上有触摸快门。 +Ron Amadeo供图 + +如果你不能认出新的“摄像机”图标,这不奇怪,视频录制是在安卓1.5中才被添加进来的。相机和摄像机两个图标其实是同一个应用,你可用过菜单中的“切换至相机”和“切换至摄像机”选项在它们之间切换。T-Mobile G1上录制的视频质量并不高。一个“高”质量的测试视频输出一个.3GP格式的视频文件,其分辨率仅为352 x 288,帧率只有4FPS。 + +除了新的视频特性,相机应用中还可以看到一些急需的UI调整。上方左侧的快照展示了最近拍摄的那张照片,点击它会跳转到相册中的相机胶卷。各个界面上方右侧的圆形图标是触摸快门,这意味着,从1.5开始,安卓设备不再需要一个实体相机按钮。 + +这个界面相比于之后版本的相机应用实际上更加接近于安卓4.2的设计。尽管后续的设计会向相机加入愚蠢的皮革纹理毅力更多的控制设置,安卓最终还是回到了基本的设计,安卓4.2的重新设计和这里有很多共同之处。安卓1.5中的原始布局演变成了安卓4.2中的最小化的,全屏的取景器。 + +![Google Talk运行在Google Talk中vs运行在IM应用中。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/gtalk-im.png) +Google Talk运行在Google Talk中vs运行在IM应用中。 +Ron Amadeo供图 + +安卓1.0的IM即时通讯应用功能上支持Google Talk,但在安卓1.5中,Google Talk从中分离出来成为独立应用。IM应用中对其的支持已经被移除。Google Talk(上图左侧)明显是基于IM应用(上图右侧)的,但随着独立应用在1.5中的发布,在IM应用的工作被放弃了。 + +新的Google Talk应用拥有重新设计过的状态栏,右侧状态指示灯,重新设计过的移动设备标识,是个灰色的安卓小绿人图案。聊天界面的蓝色的输入框变成了更加合理的灰色,消息的背景从淡绿和白色变成了淡绿和绿色。有了独立的应用,谷歌可以向其中添加Gtalk独有的特性,比如“不保存聊天记录”聊天,该特性可以阻止Gmail保存每个聊天记录。 + +![安卓1.5的日历更加明亮。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/cal15.png) +安卓1.5的日历更加明亮。 +Ron Amadeo供图 + +日历抛弃了丑陋的黑色背景上白色方块的设计,转变为全浅色主题。所有东西的背景都变成了白色,顶部的星期日变成了蓝色。单独的约会方块从带有颜色的细条变成了拥有整个颜色背景,文字也变为白色。这将是很长一段时间内日历的最后一次改动。 + +![从左到右:新的浏览器控件,缩放视图,复制/粘贴文本高亮。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/browser-craziness.png) +从左到右:新的浏览器控件,缩放视图,复制/粘贴文本高亮。 +Ron Amadeo供图 + +安卓1.5从系统全局修改了缩放控件。缩放控件不再是两个大圆形,取而代之的是一个圆角的椭圆形从中间分开为左右两个按钮。这些新的控件被用在了浏览器,谷歌地图和相册之中。 + +浏览器在缩放功能上做了很多工作。在放大或缩小之后,点击“1x”按钮可以回到正常缩放状态。底部右侧的按钮会将页面缩放整个页面并在页面上显示一个放大矩形框,就像你能在上面中间截图看到的那样。抓住矩形框并且释放会将页面的那一部分显示回“1x”视图。安卓并没有加速滚动,这使得最大滚动速度着实很慢——这就是谷歌对长网页页面导航的解决方案。 + +浏览器的另一个新增功能就是从网页上复制文本——之前你只能从输入框中复制文本。在菜单中选择“复制文本”会激活高亮模式,在网页文本上拖动你的手指会使它们高亮。G1的轨迹球对于这种精准的移动十分的方便,并且能够控制鼠标指针。这里并没有可以拖动的光标,当你的手指离开屏幕的时候,安卓就会复制文本并且移除高亮。所以你必须做到荒谬般的精确来使用复制功能。 + +安卓1.5中的浏览器很容易崩溃——比之前的版本经常多了。仅仅是以桌面模式浏览Ars Technica就会导致崩溃,许多其它的站点也是一样。 + +![](http://cdn.arstechnica.net/wp-content/uploads/2013/12/lockscreen.png) +Ron Amadeo供图 + +默认的锁屏界面和图形锁屏都不再是空荡荡的黑色背景,而是和主屏幕一致的壁纸。 + +图形解锁界面的浅色背景显示出了谷歌在圆圈对齐工作上的草率和马虎。白色圆圈在黑圆圈里从来都不是在正中心的位置——像这样基本的对齐问题对于这一时期的安卓是个频繁出现的问题。 + +![Youtube上传工具,内容快照,自动旋转设置,全新的音乐应用设计。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/TWEAKS2.png) +Youtube上传工具,内容快照,自动旋转设置,全新的音乐应用设计。 +Ron Amadeo供图 + +安卓1.5给予了YouTube应用向其网站上传视频的能力。上传通过从相册中分享视频到YouTube应用来完成,或从YouTube应用中直接打开一个视频。这将会打开一个上传界面,用户在这里可以设置像视频标题,标签和权限这样的选项。照片可以以类似的方式上传到Picasa,一个谷歌建立的图片网站。 + +整个系统的调整没有多少。现在喜爱的联系人在联系人列表中可以显示图片(尽管常规联系人还是没有图片)。第三张截图展示了设置中全新的自动旋转选项——这个版本同样也是第一个支持基于从设备内部传感器读取的数据自动切换方向的版本。 + +> #### 谷歌地图是第一个登陆谷歌市场的内置应用 #### +> +> 尽管这篇文章为了简单起见,(主要)以安卓版本顺序来组织应用更新,但还是有一些在这时间线之外的东西值得我们特别注意一下。2009年6月14日,谷歌地图成为第一个通过谷歌市场更新的预置应用。尽管其它的所有应用更新还是要求一个完整的系统更新,地图从系统中脱离了出来,只要新特性已经就绪就可以随时接收升级周期之外的更新。 +> +> 将应用从核心系统分离发布到安卓市场上将成为谷歌前进的主要关注点。总的来说,OTA更新是个重大的主动改进——这需要OEM厂商和运营商的合作,二者都是拖着后退的角色。更新同样没有做到到达每个设备。今天,谷歌市场给了谷歌一个与每个安卓手机之间的联系,而没有了这样的外界干扰。 +> +> 然而,这是后来才需要考虑的问题。在2009年,谷歌只有两部裸机需要支持,而且早期的安卓运营商似乎对谷歌的升级需要反应积极。这些早期的行动对谷歌部分来说将被证明是非常积极的决定。一开始,公司只在最重要的应用——地图和Gmail上——走这条路线,但后来它将大部分预置应用导入安卓市场。后来的举措比如Google Play服务甚至将应用API从系统移除加入了谷歌商店。 +> +> 至于这时的新地图应用,得到了一个新的路线界面,此外还有提供公共交通和步行方向的能力。现在,路线只有个朴素的黑色列表界面——逐向风格的导航很快就会登场。 +> +> 2009年6月同时还是苹果发布第三代iPhone——3GS——以及第三版iPhone OS的时候。iPhone OS 3的主要特性大多是追赶上来的项目,比如复制/粘贴和对彩信的支持。苹果的硬件依然是更好的,软件更流畅,更整合,还有更好的设计。尽管谷歌疯狂的开发步伐使得它不得不走上追赶的道路。iPhone OS 2是在安卓0.5的Milestone 5版本之前发布的,在iOS一年的发布周期里安卓发布了五个版本。 + +![HTC Magic,第二部安卓设备,第一个不带实体键盘的设备。](http://cdn.arstechnica.net/wp-content/uploads/2014/04/htc-magic-white.jpg) +HTC Magic,第二部安卓设备,第一个不带实体键盘的设备。 +HTC供图 + +纸杯蛋糕在改进安卓上做了巨大的工作,特别是从硬件方面。虚拟键盘意味着不再需要实体键盘。自动旋转使得系统更加接近iPhone,屏幕上的虚拟快门按键同样也意味着实体相机按键变成了可选选项。1.5发布后不久,第二部安卓设备的出现将会展示出这个平台未来的方向:HTC Magic。Magic(上图)没有实体键盘或相机按钮。它是没有间隙,没有滑动结构的平板状设备,依赖于安卓的虚拟按键来完成任务。 + +安卓旗舰机开始可能有着最多按键——一个实体qwerty键盘——后来随着时间流逝开始慢慢减少按键数量。而Magic是重大的一步,去除了整个键盘和相机按钮,它仍然使用通话和挂断键,四个系统键以及轨迹球。 + +---------- + +![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/8/ + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://en.wikipedia.org/wiki/Diacritic +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo From 53c5c07a8ee97bd6703fda77ccb055929d54c207 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Sun, 26 Oct 2014 21:06:45 +0800 Subject: [PATCH 014/316] Translating by ZTinoZ --- ...alds Regrets Alienating Developers with Strong Language.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md b/sources/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md index a538502451..ff0eb8e822 100644 --- a/sources/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md +++ b/sources/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md @@ -6,9 +6,9 @@ Linus Torvalds对于骂那些开发者感到后悔 Linus Torvalds被认为是Linux内核的创造者和最新的Linux开发版的维护者。他确保我们几乎每个星期都会得到一个新的RC内核并且涉及发生在邮件发送清单中的对话里,他口不择言地用脏话大骂一些开发者们。 -The latest problem of this kind, which surfaced in the news as well, was when [he decided to block code from a particular developer][1], after making some very harsh remarks. He is known to be very abrasive, especially when kernel developers break user space to fix something in the kernel. The same happened in this case and he basically went mental on the guy. +最近出现了一个问题,就是他在做了一些苛刻的评论之后[决定从指定的开发者的手中阉割掉一些代码][1],这种事件在新闻里也报道过。大家都知道Linus很招人厌烦,尤其是当内核开发者为了修复内核中的一些问题而破坏了用户空间。同样的事情就发生在这种情况下,他基本上已经把那个家伙给气疯了。 -### 这是他最接近道歉的一次谈话 ### +### 这是他最接近道歉意味的一次谈话 ### Linus Torvalds never really talked about that particular discussion since and people moved on, but recently a systemd developer talked about the strong language in the open source community and he mentioned Linus Torvalds by name. He's not known to apologize, so this admission of guilt during LinuxCon is a big step forward. The moderator asked him what single decision in the last 23 years he would change. From 073906bcd5f1e56646d41c3b074cad0570ef5420 Mon Sep 17 00:00:00 2001 From: andyxue Date: Sun, 26 Oct 2014 22:40:24 +0800 Subject: [PATCH 015/316] AndyXue translating --- .../20141024 Amazing 25 Linux Performance Monitoring Tools.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141024 Amazing 25 Linux Performance Monitoring Tools.md b/sources/tech/20141024 Amazing 25 Linux Performance Monitoring Tools.md index 87c9d3ed92..9f6f386f33 100644 --- a/sources/tech/20141024 Amazing 25 Linux Performance Monitoring Tools.md +++ b/sources/tech/20141024 Amazing 25 Linux Performance Monitoring Tools.md @@ -1,3 +1,4 @@ +andyxue translating Amazing ! 25 Linux Performance Monitoring Tools ================================================================================ Over the time our website has shown you how to configure various performance tools for Linux and Unix-like operating systems. In this article we have made a list of the most used and most useful tools to monitor the performance for your box. We provided a link for each of them and split them into 2 categories: command lines one and the ones that offer a graphical interface. @@ -288,4 +289,4 @@ via: http://linoxide.com/monitoring-2/linux-performance-monitoring-tools/ [22]:http://linoxide.com/monitoring-2/collectl-tool-install-examples/ [23]:http://linoxide.com/tools/multi-router-traffic-grapher/ [24]:http://linoxide.com/monitoring-2/monit-linux/ -[25]:http://linoxide.com/ubuntu-how-to/install-munin/ \ No newline at end of file +[25]:http://linoxide.com/ubuntu-how-to/install-munin/ From 7670b986958ef5093eb1f687b1a85280d53bafa2 Mon Sep 17 00:00:00 2001 From: Jonathan Kang Date: Mon, 27 Oct 2014 07:01:18 +0800 Subject: [PATCH 016/316] translated --- ...a good command-line calculator on Linux.md | 116 ------------------ ...a good command-line calculator on Linux.md | 115 +++++++++++++++++ 2 files changed, 115 insertions(+), 116 deletions(-) delete mode 100644 sources/tech/20141023 What is a good command-line calculator on Linux.md create mode 100644 translated/tech/20141023 What is a good command-line calculator on Linux.md diff --git a/sources/tech/20141023 What is a good command-line calculator on Linux.md b/sources/tech/20141023 What is a good command-line calculator on Linux.md deleted file mode 100644 index b4da9dad5c..0000000000 --- a/sources/tech/20141023 What is a good command-line calculator on Linux.md +++ /dev/null @@ -1,116 +0,0 @@ -JonathanKang is translating -What is a good command-line calculator on Linux -================================================================================ -Every modern Linux desktop distribution comes with a default GUI-based calculator app. On the other hand, if your workspace is full of terminal windows, and you would rather crunch some numbers within one of those terminals quickly, you are probably looking for a **command-line calculator**. In this category, [GNU bc][1] (short for "basic calculator") is a hard to beat one. While there are many command-line calculators available on Linux, I think GNU bc is hands-down the most powerful and useful. - -Predating the GNU era, bc is actually a historically famous arbitrary precision calculator language, with its first implementation dating back to the old Unix days in 1970s. Initially bc was a better known as a programming language whose syntax is similar to C language. Over time the original bc evolved into POSIX bc, and then finally GNU bc of today. - -### Features of GNU bc ### - -Today's GNU bc is a result of many enhancements of earlier implementations of bc, and now it comes standard on all major GNU/Linux distros. It supports standard arithmetic operators with arbitrary precision numbers, and multiple numeric base (e.g., binary, decimal hexadecimal) of input and output. - -If you are familiar with C language, you will see that the same or similar mathematical operators are used in bc. Some of supported operators include arithmetic (+,-,*,/,%,++,--), comparison (<,>,==,!=,<=,>=), logical (!,&&,||), bitwise (&,|,^,~,<<,>>), compound assignment (+=,-=,*=,/=,%=,&=,|=,^=,&&=,||=,<<=,>>=) operators. bc comes with many useful built-in functions such as square root, sine, cosine, arctangent, natural logarithm, exponential, etc. - -### How to Use GNU bc ### - -As a command-line calculator, possible use cases of GNU bc are virtually limitless. In this tutorial, I am going to describe a few popular features of bc command. For a complete manual, refer to the [official source][2]. - -Unless you have a pre-written bc script, you typically run bc in interactive mode, where any typed statement or expression terminated with a newline is interpreted and executed on the spot. Simply type the following to enter an interactive bc session. To quit a session, type 'quit' and press Enter. - - $ bc - -![](https://farm4.staticflickr.com/3939/15403325480_d0db97d427_z.jpg) - -The examples presented in the rest of the tutorial are supposed to be typed inside a bc session. - -### Type expressions ### - -To calculate an arithmatic expression, simply type the expression at the blinking cursor, and press Enter. If you want, you can store an intermediate result to a variable, then access the variable in other expressions. - -![](https://farm6.staticflickr.com/5604/15403325460_b004b3f8da_o.png) - -Within a given session, bc maintains a unlimited history of previously typed lines. Simply use UP arrow key to retrieve previously typed lines. If you want to limit the number of lines to keep in the history, assign that number to a special variable named history. By default the variable is set to -1, meaning "unlimited." - -### Switch input/output base ### - -Often times you want to type input expressions and display results in binary or hexadecimal formats. For that, bc allows you switch the numeric base of input or output numbers. Input and output bases are stored in ibase and obase, respectively. The default value of these special variables is 10, and valid values are 2 through 16 (or the value of BC_BASE_MAX environment variable in case of obase). To switch numeric base, all you have to do is to change the values of ibase and obase. For example, here are examples of summing up two hexadecimal/binary numbers: - -![](https://farm6.staticflickr.com/5604/15402320019_f01325f199_z.jpg) - -Note that I specify obase=16 before ibase=16, not vice versa. That is because if I specified ibase=16 first, the subsequent obase=16 statement would be interpreted as assigning 16 in base 16 to obase (i.e., 22 in decimal), which is not what we want. - -### Adjust precision ### - -In bc, the precision of numbers is stored in a special variable named scale. This variable represents the number of decimal digits after the decimal point. By default, scale is set to 0, which means that all numbers and results and truncated/stored in integers. To adjust the default precision, all you have to do is to change the value of scale variable. - - scale=4 - -![](https://farm6.staticflickr.com/5597/15586279541_211312597b.jpg) - -### Use built-in functions ### - -Beyond simple arithmatic operations, GNU bc offers a wide range of advanced mathematical functions built-in, via an external math library. To use those functions, launch bc with "-l" option from the command line. - -Some of these built-in functions are illustrated here. - -Square root of N: - - sqrt(N) - -Sine of X (X is in radians): - - s(X) - -Cosine of X (X is in radian): - - c(X) - -Arctangent of X (The returned value is in radian): - - a(X) - -Natural logarithm of X: - - l(X) - -Exponential function of X: - - e(X) - -### Other goodies as a language ### - -As a full-blow calculator language, GNU bc supports simple statements (e.g., variable assignment, break, return), compound statements (e.g., if, while, for loop), and custom function definitions. I am not going to cover the details of these features, but you can easily learn how to use them from the [official manual][2]. Here is a very simple function definition example: - - define dummy(x){ - return(x * x); - } - dummy(9) - 81 - dummy(4) - 16 - -### Use GNU bc Non-interactively ### - -So far we have used bc within an interactive session. However, quite popular use cases of bc in fact involve running bc within a shell script non-interactively. In this case, you can send input to bc using echo through a pipe. For example: - - $ echo "40*5" | bc - $ echo "scale=4; 10/3" | bc - $ echo "obase=16; ibase=2; 11101101101100010" | bc - -![](https://farm4.staticflickr.com/3943/15565252976_f50f453c7f_z.jpg) - -To conclude, GNU bc is a powerful and versatile command-line calculator that really lives up to your expectation. Preloaded on all modern Linux distributions, bc can make your number crunching tasks much easy to handle without leaving your terminals. For that, GNU bc should definitely be in your productivity toolset. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/command-line-calculator-linux.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://www.gnu.org/software/bc/ -[2]:https://www.gnu.org/software/bc/manual/bc.html diff --git a/translated/tech/20141023 What is a good command-line calculator on Linux.md b/translated/tech/20141023 What is a good command-line calculator on Linux.md new file mode 100644 index 0000000000..e86cb16ebd --- /dev/null +++ b/translated/tech/20141023 What is a good command-line calculator on Linux.md @@ -0,0 +1,115 @@ +怎么样称得上是Linux下优秀的命令行计算器 +================================================================================ +每个现代的Linux桌面发行版都预装着一个带有图形界面的计算器程序。不过如果你的工作区中全是命令行窗口,那么你一定会在其中的一个命令行窗口中处理一些数字相关的问题。或许你在寻找一款基于命令行的计算器程序。如果是这样的话,[GNU bc][1](“basic calculator”的缩写)会是你不二的选择。当然Linux下又很多基于命令行的计算器应用,我认为GNU bc是功能最强大和最有用的。 + +在GNU时代之前,bc实际上是一个著名的精密计算语言。它的诞生要追溯到70年代的Unix时期了。最初bc作为一个语法和C语言相似的编程语言而著名。随着时间的改变,最开始的bc演化成POSIX bc,最后变成了今天的GNU bc。 + +### GNU bc的特性 ### + +现在的GNU bc是早期bc经过若干次改进和功能增强的结果。目前它被所有的主流GNU/Linux发行版所收纳。GNU bc支持高精度数字和多种数值类型(例如二进制、十进制、十六进制)的输入输出。 + +如果你对C语言很熟悉的话,你会发现bc使用了和C语言一样或相似的算术操作符。受支持的操作符包括算术运算符(+,-,*,/,%,++,--)、比较运算符(<,>,==,!=,<=,>=)、逻辑运算符(!,&&,||)、位运算符(&,|,^,~,<<,>>)和复合赋值运算符(+=,-=,*=,/=,%=,&=,|=,^=,&&=,||=,<<=,>>=)。bc内置了很多有用的函数,像是平方根、正弦、余弦、反正弦、自然对数、指数等。 + +### 如何使用GNU bc ### + +作为一个基于命令行的计算器,GNU bc的使用是没有限制的。在本文中,我会向大家介绍bc命令的几个常用的特性。如果你想要更加详细的指导,你可以查阅[官方指南][2]。 + +如果你没有一个预先写好的bc脚本,那么你需要在交互模式下运行bc。在这种模式下,你输入的以回车结束的任何声明或者表达式会被立刻计算出结果。你需要输入以下命令来进入bc的交互界面。如果向退出bc,你可以输入'quit'并且按回车。 + + $ bc + +![](https://farm4.staticflickr.com/3939/15403325480_d0db97d427_z.jpg) + +本文下面展示的例子应该在bc交互界面中输入。 + +### 输入表达式 ### + +如果想要计算一个算术表达式,我们可以在闪烁的光标处输入该表达式,然后按回车确认。你也可以将该结果存储到一个变量中,然后在其他表达式中使用该变量。 + +![](https://farm6.staticflickr.com/5604/15403325460_b004b3f8da_o.png) + +在一个bc的交互界面中,存在没有个数限制的命令历史记录。使用上方向键来查看之前输入的命令。如果你想限制历史记录保存的命令数量,你可以将一个名为history的特殊变量设置成你希望的数值。该变量默认为-1,也就是“历史记录数量没有限制”。 + +### 输入输出进制切换 ### + +经常会发生的是,你输入一个表达式并且想使用二进制或者十六进制来显示结果。bc允许你在输入输出数字的进制间转换。输入和输出的数系基分别存储在ibase和obase变量中,默认值为10,有效的数值是2到16(或者环境变量BC_BASE_MAX的值).你只需要更改ibase和obase的值就可以在不同进制之间转换了。下面是一个求两个十六进制/二进制数和的例子: + +![](https://farm6.staticflickr.com/5604/15402320019_f01325f199_z.jpg) + +需要注意的是,我有意地将obase=16放到了ibase=16前面,反过来则是不可以的。这个是因为如果我先输入ibase=16,那么随后输入的obase=16中的16会被认为是16进制的数字,也就是十进制的22。当然这个不是我们所期望的。 + +### 调整精度 ### + +在bc中,数字的精度存储在一个名为scale的特殊变量中。该变量表示小数点后数字的个数。scale默认为0,意味着所有的数字和结果以整数形式储存。你可以通过改变scale这个特殊变量的值,来调整数值的精度。 + + scale=4 + +![](https://farm6.staticflickr.com/5597/15586279541_211312597b.jpg) + +### 使用内置函数 ### + +除了简单的算术操作符,GNU bc还通过外部的数学函数库来提供许多高级的数学函数。你可以在命令行界面使用“-l”选项来打开bc。 + +这里描述了一些内置的函数。 + +N的二次方根: + + sqrt(N) + +X的正弦(X是弧度): + + s(X) + +X的余弦(X是弧度): + + c(X) + +X的反正弦(返回值是弧度): + + a(X) + +X的自然对数: + + l(X) + +X的指数对数: + + e(X) + +### Other goodies as a language ### + +作为一个计算语言,GNU bc支持简单的声明(变量赋值、中断、返回等)、复合语句(if、while、for loop等)和自定义函数。在这里我不会涉及到这些特性的细节,不过你可以通过[官方指南][2]来学习如何使用这些特性。下面是一个简单的函数示例: + + define dummy(x){ + return(x * x); + } + dummy(9) + 81 + dummy(4) + 16 + +### 在非交互界面下使用GNU bc ### + +到目前为止,我们一直在交互界面下使用bc。不过更加流行的使用bc的方法是在没有交互界面的脚本中运行bc。这种情况下,你可以使用echo命令并且借助管道来向bc发送输入内容。例如: + + $ echo "40*5" | bc + $ echo "scale=4; 10/3" | bc + $ echo "obase=16; ibase=2; 11101101101100010" | bc + +![](https://farm4.staticflickr.com/3943/15565252976_f50f453c7f_z.jpg) + +总结以下,GNU bc是一款强大并且通用的基于命令行的计算器应用,因此它绝对不会让你失望。它预装在所有的现代Linux发行版中,bc可以让你不用离开命令行就可以进行高效的数学计算。所以,GNU bc一定会是你的最爱。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/command-line-calculator-linux.html + +作者:[Dan Nanni][a] +译者:[JonathanKang](https://github.com/JonathanKang) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://www.gnu.org/software/bc/ +[2]:https://www.gnu.org/software/bc/manual/bc.html From eb28b512ed319b47959434013954aff774942b98 Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Mon, 27 Oct 2014 09:11:29 +0800 Subject: [PATCH 017/316] [translating] 20140729 Don't Fear The Command Line.md --- sources/talk/20140729 Don't Fear The Command Line.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20140729 Don't Fear The Command Line.md b/sources/talk/20140729 Don't Fear The Command Line.md index 660fecbe74..e84704f6e4 100644 --- a/sources/talk/20140729 Don't Fear The Command Line.md +++ b/sources/talk/20140729 Don't Fear The Command Line.md @@ -1,3 +1,4 @@ +zpl1025 Don't Fear The Command Line ================================================================================ ![](http://a4.files.readwrite.com/image/upload/c_fill,h_900,q_70,w_1600/MTE5NTU2MzIyNTM0NTg5OTYz.jpg) @@ -134,4 +135,4 @@ via: http://readwrite.com/2014/07/18/command-line-tutorial-intro [9]:http://lifehacker.com/5633909/who-needs-a-mouse-learn-to-use-the-command-line-for-almost-anything [10]:http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line [11]:http://readwrite.com/2013/09/30/understanding-github-a-journey-for-beginners-part-1 -[12]:http://en.wikipedia.org/wiki/Computer_terminal#mediaviewer/File:DEC_VT100_terminal.jpg \ No newline at end of file +[12]:http://en.wikipedia.org/wiki/Computer_terminal#mediaviewer/File:DEC_VT100_terminal.jpg From acfd111b4db923ebc8e388ee886b53a8c1ad7d42 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Oct 2014 14:41:22 +0800 Subject: [PATCH 018/316] PUB:20141013 UbuTricks 14.10.08 @runningwater --- .../share => published}/20141013 UbuTricks 14.10.08.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/share => published}/20141013 UbuTricks 14.10.08.md (95%) diff --git a/translated/share/20141013 UbuTricks 14.10.08.md b/published/20141013 UbuTricks 14.10.08.md similarity index 95% rename from translated/share/20141013 UbuTricks 14.10.08.md rename to published/20141013 UbuTricks 14.10.08.md index 6da65a3f3c..322eacf5fa 100644 --- a/translated/share/20141013 UbuTricks 14.10.08.md +++ b/published/20141013 UbuTricks 14.10.08.md @@ -1,6 +1,6 @@ UbuTricks 14.10.08 ================================================================================ -> 是一款 Ubuntu 系统上的实用工具软件,使用它可以让您安装上最新版本的流行应用程序和游戏。 +> 这是一款 Ubuntu 系统上的实用工具软件,使用它可以让您安装上最新版本的流行应用程序和游戏。 UbuTricks 是一款免费发布的用 Bash 语言编写的脚本型应用程序。它被设计为从最初版本一直向上搜索的方式来帮助您在 Ubuntu Linux 操作系统以及其它 Ubuntu 衍生版本系统上安装最受好评的游戏和图形应用程序的最高版本软件。 @@ -45,7 +45,7 @@ via: http://linux.softpedia.com/get/Desktop-Environment/Tools/UbuTricks-103626.s 作者:[Marius Nestor][a] 译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a3cca0ad54f60ed3bc01fe49e55d0f7b6ab26ba3 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Oct 2014 15:03:14 +0800 Subject: [PATCH 019/316] PUB:20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit @barney-ro --- ...of Changes and Fixes for POODLE Exploit.md | 43 +++++++++++++++++++ ...of Changes and Fixes for POODLE Exploit.md | 43 ------------------- 2 files changed, 43 insertions(+), 43 deletions(-) create mode 100644 published/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md delete mode 100644 translated/share/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md diff --git a/published/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md b/published/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md new file mode 100644 index 0000000000..44c550cb42 --- /dev/null +++ b/published/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md @@ -0,0 +1,43 @@ +Claws Mail 3.11.0 修复了POODLE 漏洞 +================================================================================ +> 随着每一个新版本的推出,Claws Mail 将会越来越好。 + +![](http://i1-news.softpedia-static.com/images/news2/Claws-Mail-3-11-0-Brings-a-Ton-of-Changes-and-Fix-for-POODLE-Exploit-462808-2.jpg) + +**Claws Mail 发起于Linux 社区,是一款快速、简单易用,并且充满了很多有趣的特性的开源邮件客户端。开发者们推送了一次大的更新和升级,建议使用者进行升级。** + +有些人可能不知道这个邮件客户端,但Claws Mail 实际上是一个非常老的软件。它以前名称是Sylpheed-Claws ,已经走过了13个年头。Claws Mail 不久以前从其分支(forked)了出来,新分支的目的是成为Sylpheed-Claws更好的替代产品。 + +现在还有很多针对Linux 的邮件客户端正在进行着霸权地位的争夺战,尽管并没有打的硝烟四起。很多的Linux发行版都默认集成了Claws Mail,对于Claws Mail 的粉丝而言,这将是一个好消息。 + +### Claws Mail 3.11.0 给我们带来了哪些新的特性呢 ### + +就像其他的采用网络连接和网络协议的应用程序一样,Claws Mail 被发现也受到了安全漏洞的影响,比如说POODLE 漏洞。开发者的反应很迅速,可以从其更新日志中看出。 + +“新版本的RSSyl 插件已经完全被重新设计和重写。从先前版本的迁移是自动完成的,采用新的存储格式,存储在~/.claws-mail/RSSyl/ (用分级目录代替了普通文件的格式)。并且用expat 库代替了libxml2 库来解析提要数据。” + +“应广大朋友的要求,在邮件的编辑窗口里,在邮件内容中使用向上光标键时,会停留在邮件的内容的最上一行,而不再会跳到信头字段了。这是在3.10.0版本中引入的。详见开发者的[公告][1]。” + +当然,大家也可以放心了,因为在新的邮件客户端中已经解决了POODLE 漏洞,这是通过禁用了所有的SSLv3 连接实现的。 + +使用制表符进行地址补完的功能也进行了一些改进,并变得更好,特别是对于撰写新邮件,通过光标箭头帮助导航的功能已经做了调整,有很多较小的改进。 + +开发者为大多数发行版创建了很多仓库,但是你也依然可以使用源代码来安装。想要进一步的了解,你可以关注官方关于每个版本的公告。 + +去下载Claws Mail 3.11.0 的源码包吧,如果你想要自己编译软件的话。 + +- [Claws Mail 3.11.0 tar.xz File size: 5.6 MB][2] + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Claws-Mail-3-11-0-Brings-a-Ton-of-Changes-and-Fix-for-POODLE-Exploit-462808.shtml + +作者:[Silviu Stahie][a] +译者:[barney-ro](https://github.com/barney-ro) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:http://www.claws-mail.org/news.php +[2]:http://sourceforge.net/projects/claws-mail/files/Claws%20Mail/3.11.0/claws-mail-3.11.0.tar.xz \ No newline at end of file diff --git a/translated/share/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md b/translated/share/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md deleted file mode 100644 index 49da5b82bd..0000000000 --- a/translated/share/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md +++ /dev/null @@ -1,43 +0,0 @@ -针对POODLE 漏洞,Claws Mail 3.11.0 给我们带来了很多的变化和更新。 -================================================================================ -> 随着每一个新版本的推出,Claws Mail 将会越来越好。 - -![](http://i1-news.softpedia-static.com/images/news2/Claws-Mail-3-11-0-Brings-a-Ton-of-Changes-and-Fix-for-POODLE-Exploit-462808-2.jpg) - -**Claws Mail 发起于Linux 社区,是一款快速、简单易用,并且充满了很多有趣的特性的开源邮件客户端。开发者们推送了一次大的更新和升级,这是一个非常好的主意。** - -有些人可能不知道这个邮件客户端,但Claws Mail 实际上是一个非常老的软件。它以前名称是Sylpheed-Claws ,已经走过了13个年头。Claws Mail 不久以前分支(forked)了出来,从此,新分支变成了很好的可能替代Sylpheed-Claws 产品。 - -现在还有很多针对Linux 的邮件客户端正在进行着霸权地位的争夺战,尽管这是在很礼貌的方式下完成的。很多的Linux发行版都默认集成了Claws Mail,对于Claws Mail 的粉丝,这将是一个好消息。 - -### Claws Mail 3.11.0 给我们带来了哪些新的特性呢 ### - -就像其他的应用程序一样,在处理网络连接和网络协议时,Claws Mail 也一直受到漏洞识别社区的关注,比如说POODLE 漏洞。开发者很紧张的时间表和大量的更新日志就很好的反应了这个。 - -“新版本的RSSyl 插件已经完全被重新设计和重写。从先前版本的迁移是自动完成的,它拥有一个新的存储格式在~/.claws-mail/RSSyl/ (用分级目录代替了平面文件的格式)。并且用expat 库代替了libxml2 库来解析提要数据。” - -“应广大朋友的要求,当消息的编辑窗口停留着消息体的上部,在消息体中使用上键(UP key)时,不再会回到头文字段了。这是在3.10.0版本中引入的。详见开发者的[宣告][1]” - -当然,大家也可以放心了,因为POODLE 漏洞,在新的邮件客户端中已经被关闭,是通过禁用了所有的SSLv3 连接实现的。 - -标签地址也收到了一些改进,并变得更好,特别是对于新邮件,导航箭头的帮助已经做了调整,有很多较小的改进。 - -开发者为大多数发行版创建了很多仓库,但是你也依然可以使用源来安装。想要进一步的了解,你可以关注官方关于每个版本的公告。 - -去下载Claws Mail 3.11.0 的源码包吧,如果你想要自己编译软件。 - -- [Claws Mail 3.11.0 tar.xz File size: 5.6 MB][2] - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/Claws-Mail-3-11-0-Brings-a-Ton-of-Changes-and-Fix-for-POODLE-Exploit-462808.shtml - -作者:[Silviu Stahie][a] -译者:[barney-ro](https://github.com/barney-ro) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/silviu-stahie -[1]:http://www.claws-mail.org/news.php -[2]:http://sourceforge.net/projects/claws-mail/files/Claws%20Mail/3.11.0/claws-mail-3.11.0.tar.xz \ No newline at end of file From 358f2f3be6703362276371e230017fb2c6fec2c2 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Oct 2014 15:17:57 +0800 Subject: [PATCH 020/316] PUB:How to configure SNMPv3 on ubuntu 14.04 server @SPccman --- ... configure SNMPv3 on ubuntu 14.04 server.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename {translated/tech => published}/How to configure SNMPv3 on ubuntu 14.04 server.md (73%) diff --git a/translated/tech/How to configure SNMPv3 on ubuntu 14.04 server.md b/published/How to configure SNMPv3 on ubuntu 14.04 server.md similarity index 73% rename from translated/tech/How to configure SNMPv3 on ubuntu 14.04 server.md rename to published/How to configure SNMPv3 on ubuntu 14.04 server.md index 946e866977..4c09ea3636 100644 --- a/translated/tech/How to configure SNMPv3 on ubuntu 14.04 server.md +++ b/published/How to configure SNMPv3 on ubuntu 14.04 server.md @@ -1,8 +1,8 @@ 在ubuntu14.04上配置SNMPv3 ============================================ -简单网络管理协议(SNMP)是用于IP网络设备管理的标准协议。典型的支持SNMP协议的设备有路由器、交换机、服务器、工作站、打印机及数据机柜等等。SNMP一般被网络管理系统用于监视网络附加设备,以确保行政监管。SNMP是因特网协议套件中的一个组成部分,它由IETF机构定义。它包含一系列的网络管理标准,其中有一个应用层协议,一个数据库架构以及一组数据对象。 +简单网络管理协议(SNMP)是用于IP网络设备管理的标准协议。典型的支持SNMP协议的设备有路由器、交换机、服务器、工作站、打印机及数据机柜等等。SNMP一般被网络管理系统用于按照管理员设定的条件来监视网络附加设备。SNMP是因特网协议套件中的一个组成部分,它由IETF机构定义。它包含一系列的网络管理标准,其中有一个应用层协议,一个数据库架构以及一组数据对象。 -SNMP将管理数据以变量的形式暴露出来,这些变量描述了系统配置。同时这些变量可以被管理应用查询(或者被设置)。 +SNMP将管理数据以变量的形式展示出来,这些变量描述了系统配置。同时这些变量可以被用于管理的应用查询(或者被设置)。 ### 为什么需要使用SNMPv3 ### @@ -14,11 +14,11 @@ SNMPv3在SNMP的基础之上增强了安全性以及远程配置功能。 SNMPv3提供了重要的安全特性: -保密性 —— 加密数据包以防止未经授权的源监听。 +- 保密性 —— 加密数据包以防止未经授权的源监听。 -完整性 —— 数据的完整性特性确保数据在传输的时候没有被干扰,并且包含了课选的数据响应保护机制。 +- 完整性 —— 数据的完整性特性确保数据在传输的时候没有被干扰,并且包含了可选的数据响应保护机制。 -身份验证 —— 检查数据是否来自一个合法的源 +- 身份验证 —— 检查数据是否来自一个合法的源。 ### 在ubuntu中安装SNMP服务器及客户端 ### @@ -30,7 +30,7 @@ SNMPv3提供了重要的安全特性: ###配置SNMPv3### -获得从外部守护进程的权限 +获得从外部守护进程访问的权限 默认的安装仅提供本地的访问权限,如果想要获得外部访问权限,打开文件 /etc/default/snmpd。 @@ -54,11 +54,11 @@ SNMPv3提供了重要的安全特性: “securityLevel”参数使得SNMPv3有多种不同的用途。 -noAuthNoPriv —— 没有授权,加密以及任何安全保护! +- noAuthNoPriv —— 没有授权,加密以及任何安全保护! -authNoPriv —— 需要身份认证,但是不对通过网络发送的数据进行加密。 +- authNoPriv —— 需要身份认证,但是不对通过网络发送的数据进行加密。 -autoPriv —— 最健模式。需要身份认证而且数据会被加密。 +- autoPriv —— 最可靠模式。需要身份认证而且数据会被加密。 snmpd 的配置以及设置都保存在文件 /etc/snmp/snmpd.conf。使用编辑器编辑文件: From 54e758983f87c6ad4323b09779ed6c49ac24486e Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 27 Oct 2014 15:49:11 +0800 Subject: [PATCH 021/316] =?UTF-8?q?20141027-1=20=E9=80=89=E9=A2=98=20felix?= =?UTF-8?q?onmars=20=E6=8E=A8=E8=8D=90=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20141027 ntpq -p output.md | 301 ++++++++++++++++++++++++ 1 file changed, 301 insertions(+) create mode 100644 sources/tech/20141027 ntpq -p output.md diff --git a/sources/tech/20141027 ntpq -p output.md b/sources/tech/20141027 ntpq -p output.md new file mode 100644 index 0000000000..c834e43585 --- /dev/null +++ b/sources/tech/20141027 ntpq -p output.md @@ -0,0 +1,301 @@ +“ntpq -p” output +================================================================================ +The [Gentoo][1] (and others?) [incomplete man pages for “ntpq -p”][2] merely give the description: “*Print a list of the peers known to the server as well as a summary of their state.*” + +I had not seen this documented, hence here is a summary that can be used in addition to the brief version of the man page “[man ntpq][3]“. More complete details are given on: “[ntpq – standard NTP query program][4]” (source author), and [other examples of the man ntpq pages][5]. + +[NTP][6] is a protocol designed to synchronize the clocks of computers over a ([WAN][7] or [LAN][8]) [udp][9] network. From [Wikipedia – NTP][10]: + +> The Network Time Protocol (NTP) is a protocol and software implementation for synchronizing the clocks of computer systems over packet-switched, variable-latency data networks. Originally designed by David L. Mills of the University of Delaware and still maintained by him and a team of volunteers, it was first used before 1985 and is one of the oldest Internet protocols. + +For an awful lot more than you might ever want to know about time and NTP, see “[The NTP FAQ, Time, what Time?][11]” and the current [RFCs for NTP][12]. The earlier “Network Time Protocol (Version 3) RFC” ([txt][13], or [pdf][14], Appendix E, The NTP Timescale and its Chronometry, p70) includes an interesting explanation of the changes in, and relations between, our timekeeping systems over the past 5000 years or so. Wikipedia gives a broader view in the articles [Time][15] and [Calendar][16]. + +The command “ntpq -p” outputs a table such as for example: + + remote refid st t when poll reach delay offset jitter + ============================================================================== + LOCAL(0) .LOCL. 10 l 96h 64 0 0.000 0.000 0.000 + *ns2.example.com 10.193.2.20 2 u 936 1024 377 31.234 3.353 3.096 + +### Further detail: ### + +#### Table headings: #### + + +- **remote** – The remote peer or server being synced to. “LOCAL” is this local host (included in case there are no remote peers or servers available); +- **refid** – Where or what the remote peer or server is itself synchronised to; +- **st** – The remote peer or server [Stratum][17] +- **t** – Type (u: [unicast][18] or [manycast][19] client, b: [broadcast][20] or [multicast][21] client, l: local reference clock, s: symmetric peer, A: manycast server, B: broadcast server, M: multicast server, see “[Automatic Server Discovery][22]“); +- **when** – When last polled (seconds ago, “h” hours ago, or “d” days ago); +- **poll** – Polling frequency: [rfc5905][23] suggests this ranges in NTPv4 from 4 (16s) to 17 (36h) (log2 seconds), however observation suggests the actual displayed value is seconds for a much smaller range of 64 (26) to 1024 (210) seconds; +- **reach** – An 8-bit left-shift shift register value recording polls (bit set = successful, bit reset = fail) displayed in [octal][24]; +- **delay** – Round trip communication delay to the remote peer or server (milliseconds); +- **offset** – Mean offset (phase) in the times reported between this local host and the remote peer or server ([RMS][25], milliseconds); +- **jitter** – Mean deviation (jitter) in the time reported for that remote peer or server (RMS of difference of multiple time samples, milliseconds); + +#### Select Field tally code: #### + +The first character displayed in the table (Select Field tally code) is a state flag (see [Peer Status Word][26]) that follows the sequence ” “, “x”, “-“, “#”, “+”, “*”, “o”: + + +- ”** **” – No state indicated for: + - non-communicating remote machines, + - “LOCAL” for this local host, + - (unutilised) high stratum servers, + - remote machines that are themselves using this host as their synchronisation reference; +- “**x**” – Out of tolerance, do not use (discarded by intersection algorithm); +- “**-**” – Out of tolerance, do not use (discarded by the cluster algorithm); +- “**#**” – Good remote peer or server but not utilised (not among the first six peers sorted by synchronization distance, ready as a backup source); +- “**+**” – Good and a preferred remote peer or server (included by the combine algorithm); +- “*****” – The remote peer or server presently used as the primary reference; +- “**o**” – PPS peer (when the prefer peer is valid). The actual system synchronization is derived from a pulse-per-second (PPS) signal, either indirectly via the PPS reference clock driver or directly via kernel interface. + +See the [Clock Select Algorithm][27]. + +#### “refid”: #### + +The **refid** can have the status values: + + +- An IP address – The [IP address][28] of a remote peer or server; +- **.LOCL.** – This local host (a place marker at the lowest stratum included in case there are no remote peers or servers available); +- **.PPS.** – “[Pulse Per Second][29]” from a time standard; +- **.IRIG.** – [Inter-Range Instrumentation Group][30] time code; +- **.ACTS.** – American [NIST time standard][31] telephone modem; +- **.NIST.** – American NIST time standard telephone modem; +- **.PTB.** – German [PTB][32] time standard telephone modem; +- **.USNO.** – American [USNO time standard][33] telephone modem; +- **.CHU.** – [CHU][34] ([HF][35], Ottawa, ON, Canada) time standard radio receiver; +- **.DCFa.** – [DCF77][36] ([LF][37], Mainflingen, Germany) time standard radio receiver; +- **.HBG.** – [HBG][38] (LF Prangins, Switzerland) time standard radio receiver; +- **.JJY.** – [JJY][39] (LF Fukushima, Japan) time standard radio receiver; +- **.LORC.** – [LORAN][40]-C station ([MF][41]) time standard radio receiver. Note, [no longer operational][42] (superseded by [eLORAN][43]); +- **.MSF.** – [MSF][44] (LF, Anthorn, Great Britain) time standard radio receiver; +- **.TDF.** – [TDF][45] (MF, Allouis, France) time standard radio receiver; +- **.WWV.** – [WWV][46] (HF, Ft. Collins, CO, America) time standard radio receiver; +- **.WWVB.** – [WWVB][47] (LF, Ft. Collins, CO, America) time standard radio receiver; +- **.WWVH.** – [WWVH][48] (HF, Kauai, HI, America) time standard radio receiver; +- **.GOES.** – American [Geosynchronous Orbit Environment Satellite][49]; +- **.GPS.** – American [GPS][50]; +- **.GAL.** – [Galileo][51] European [GNSS][52]; +- **.ACST.** – manycast server; +- **.AUTH.** – authentication error; +- **.AUTO.** – Autokey sequence error; +- **.BCST.** – broadcast server; +- **.CRYPT.** – Autokey protocol error; +- **.DENY.** – access denied by server; +- **.INIT.** – association initialized; +- **.MCST.** – multicast server; +- **.RATE.** – (polling) rate exceeded; +- **.TIME.** – association timeout; +- **.STEP.** – step time change, the offset is less than the panic threshold (1000ms) but greater than the step threshold (125ms). + +#### Operation notes #### + +A time server will report time information with no time updates from clients (unidirectional updates), whereas a peer can update fellow participating peers to converge upon a mutually agreed time (bidirectional updates). + +During [initial startup][53]: + +> Unless using the iburst option, the client normally takes a few minutes to synchronize to a server. If the client time at startup happens to be more than 1000s distant from NTP time, the daemon exits with a message to the system log directing the operator to manually set the time within 1000s and restart. If the time is less than 1000s but more than 128s distant, a step correction occurs and the daemon restarts automatically. + +> When started for the first time and a frequency file is not present, the daemon enters a special mode in order to calibrate the frequency. This takes 900s during which the time is not [disciplined][54]. When calibration is complete, the daemon creates the frequency file and enters normal mode to amortize whatever residual offset remains. + +Stratum 0 devices are such as atomic (caesium, rubidium) clocks, GPS clocks, or other time standard radio clocks providing a time signal to the Stratum 1 time servers. NTP reports [UTC][55] (Coordinated Universal Time) only. Client programs/utilities then use [time zone][56] data to report local time from the synchronised UTC. + +The protocol is highly accurate, using a resolution of less than a nanosecond (about 2-32 seconds). The time resolution achieved and other parameters for a host (host hardware and operating system limited) is reported by the command “ntpq -c rl” (see [rfc1305][57] Common Variables and [rfc5905][58]). + +#### “ntpq -c rl” output parameters: #### + +- **precision** is rounded to give the next larger integer power of two. The achieved resolution is thus 2precision (seconds) +- **rootdelay** – total roundtrip delay to the primary reference source at the root of the synchronization subnet. Note that this variable can take on both positive and negative values, depending on clock precision and skew (seconds) +- **rootdisp** – maximum error relative to the primary reference source at the root of the synchronization subnet (seconds) +- **tc** – NTP algorithm [PLL][59] (phase locked loop) or [FLL][60] (frequency locked loop) time constant (log2) +- **mintc** – NTP algorithm PLL/FLL minimum time constant or ‘fastest response’ (log2) +- **offset** – best and final offset determined by the combine algorithm used to discipline the system clock (ms) +- **frequency** – system clock period (log2 seconds) +- **sys_jitter** – best and final jitter determined by the combine algorithm used to discipline the system clock (ms) +- **clk_jitter** – host hardware(?) system clock jitter (ms) +- **clk_wander** – host hardware(?) system clock wander ([PPM][61] – parts per million) + +Jitter (also called timing jitter) refers to short-term variations in frequency with components greater than 10Hz, while wander refers to long-term variations in frequency with components less than 10Hz. (Stability refers to the systematic variation of frequency with time and is synonymous with aging, drift, trends, etc.) + +#### Operation notes (continued) #### + +The NTP software maintains a continuously updated drift correction. For a correctly configured and stable system, a reasonable expectation for modern hardware synchronising over an uncongested internet connection is for network client devices to be synchronised to within a few milliseconds of UTC at the time of synchronising to the NTP service. (What accuracy can be expected between peers on an uncongested Gigabit LAN?) + +Note that for UTC, a [leap second][62] can be inserted into the reported time up to twice a year to allow for variations in the Earth’s rotation. Also beware of the one hour time shifts for when local times are reported for “[daylight savings][63]” times. Also, the clock for a client device will run independently of UTC until resynchronised oncemore, unless that device is calibrated or a drift correction is applied. + +#### [What happens during a Leap Second?][64] #### + +> During a leap second, either one second is removed from the current day, or a second is added. In both cases this happens at the end of the UTC day. If a leap second is inserted, the time in UTC is specified as 23:59:60. In other words, it takes two seconds from 23:59:59 to 0:00:00 instead of one. If a leap second is deleted, time will jump from 23:59:58 to 0:00:00 in one second instead of two. See also [The Kernel Discipline][65]. + +So… What actually is the value for the step threshold: 125ms or 128ms? And what are the PLL/FLL tc units (log2 s? ms?)? And what accuracy can be expected between peers on an uncongested Gigabit LAN? + + + +Thanks for comments from Camilo M and Chris B. Corrections and further details welcomed. + +Cheers, +Martin + +### Apocrypha: ### + +- The [epoch for NTP][66] starts in year 1900 while the epoch in UNIX starts in 1970. +- [Time corrections][67] are applied gradually, so it may take up to three hours until the frequency error is compensated. +- [Peerstats and loopstats][68] can be logged to [summarise/plot time offsets and errors][69] +- [RMS][70] – Root Mean Square +- [PLL][71] – Phase locked loop +- [FLL][72] – Frequency locked loop +- [PPM][73] – Parts per million, used here to describe rate of time drift +- [man ntpq (Gentoo brief version)][74] +- [man ntpq (long version)][75] +- [man ntpq (Gentoo long version)][76] + +### See: ### + +- [ntpq – standard NTP query program][77] +- [The Network Time Protocol (NTP) Distribution][78] +- A very brief [history][79] of NTP +- A more detailed brief history: “Mills, D.L., A brief history of NTP time: confessions of an Internet timekeeper. Submitted for publication; please do not cite or redistribute” ([pdf][80]) +- [NTP RFC][81] standards documents +- Network Time Protocol (Version 3) RFC – [txt][82], or [pdf][83]. Appendix E, The NTP Timescale and its Chronometry, p70, includes an interesting explanation of the changes in, and relations between, our timekeeping systems over the past 5000 years or so +- Wikipedia: [Time][84] and [Calendar][85] +- [John Harrison and the Longitude problem][86] +- [Clock of the Long Now][87] – The 10,000 Year Clock +- John C Taylor – [Chronophage][88] +- [Orders of magnitude of time][89] +- The [Greenwich Time Signal][90] + +### Others: ### + +SNTP (Simple Network Time Protocol, [RFC 4330][91]) is basically also NTP, but lacks some internal algorithms for servers where the ultimate performance of a full NTP implementation based on [RFC 1305][92] is neither needed nor justified. + +The W32Time [Windows Time Service][93] is a non-standard implementation of SNTP, with no accuracy guarantees, and an assumed accuracy of no better than about a 1 to 2 second range. (Is that due to there being no system clock drift correction and a time update applied only once every 24 hours assumed for a [PC][94] with typical clock drift?) + +There is also the [PTP (IEEE 1588)][95] Precision Time Protocol. See Wikipedia: [Precision Time Protocol][96]. A software demon is [PTPd][97]. The significant features are that it is intended as a [LAN][98] high precision master-slave synchronisation system synchronising at the microsecond scale to a master clock for [International Atomic Time][99] (TAI, [monotonic][100], no leap seconds). Data packet timestamping can be appended by hardware at the physical layer by a network interface card or switch for example. Network kit supporting PTP can timestamp data packets in and out in a way that removes the delay effect of processing within the switch/router. You can run PTP without hardware timestamping but it might not synchronise if the time errors introduced are too great. Also it will struggle to work through a router (large delays) for the same reason. + +### Older time synchronization protocols: ### + +- DTSS – Digital Time Synchronisation Service by Digital Equipment Corporation, superseded by NTP. See an example of [DTSS VMS C code c2000][101]. (Any DTSS articles/documentation anywhere?) +- [DAYTIME protocol][102], synchronization protocol using [TCP][103] or [UDP][104] port 13 +- [ICMP Timestamp][105] and [ICMP Timestamp Reply][106], synchronization protocol using [ICMP][107] +- [Time Protocol][108], synchronization protocol using TCP or UDP port 37 + +-------------------------------------------------------------------------------- + +via: http://nlug.ml1.co.uk/2012/01/ntpq-p-output/831 + +作者:Martin L +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.gentoo.org/ +[2]:http://nlug.ml1.co.uk/2012/01/man-ntpq-gentoo-brief-version/853 +[3]:http://www.thelinuxblog.com/linux-man-pages/1/ntpq +[4]:http://www.eecis.udel.edu/~mills/ntp/html/ntpq.html +[5]:http://linux.die.net/man/8/ntpq +[6]:http://www.ntp.org/ +[7]:http://en.wikipedia.org/wiki/Wide_area_network +[8]:http://en.wikipedia.org/wiki/Local_area_network +[9]:http://en.wikipedia.org/wiki/User_Datagram_Protocol +[10]:http://en.wikipedia.org/wiki/Network_Time_Protocol +[11]:http://www.ntp.org/ntpfaq/NTP-s-time.htm +[12]:http://www.ntp.org/rfc.html +[13]:http://www.ietf.org/rfc/rfc1305.txt +[14]:http://www.rfc-editor.org/rfc/rfc1305.pdf +[15]:http://en.wikipedia.org/wiki/Time +[16]:http://en.wikipedia.org/wiki/Calendar +[17]:http://en.wikipedia.org/wiki/Network_Time_Protocol#Clock_strata +[18]:http://en.wikipedia.org/wiki/Unicast +[19]:http://www.eecis.udel.edu/~mills/ntp/html/manyopt.html#mcst +[20]:http://en.wikipedia.org/wiki/Broadcasting_%28computing%29 +[21]:http://en.wikipedia.org/wiki/Multicast +[22]:http://www.eecis.udel.edu/~mills/ntp/html/manyopt.html +[23]:http://www.ietf.org/rfc/rfc5905.txt +[24]:http://en.wikipedia.org/wiki/Octal#In_computers +[25]:http://en.wikipedia.org/wiki/Root_mean_square +[26]:http://www.eecis.udel.edu/~mills/ntp/html/decode.html#peer +[27]:http://www.eecis.udel.edu/~mills/ntp/html/select.html +[28]:http://en.wikipedia.org/wiki/Ip_address +[29]:http://en.wikipedia.org/wiki/Pulse_per_second +[30]:http://en.wikipedia.org/wiki/Inter-Range_Instrumentation_Group +[31]:http://en.wikipedia.org/wiki/Standard_time_and_frequency_signal_service +[32]:http://www.ptb.de/index_en.html +[33]:http://en.wikipedia.org/wiki/United_States_Naval_Observatory#Time_service +[34]:http://en.wikipedia.org/wiki/CHU_%28radio_station%29 +[35]:http://en.wikipedia.org/wiki/High_frequency +[36]:http://en.wikipedia.org/wiki/DCF77 +[37]:http://en.wikipedia.org/wiki/Low_frequency +[38]:http://en.wikipedia.org/wiki/HBG_%28time_signal%29 +[39]:http://en.wikipedia.org/wiki/JJY#Time_standards +[40]:http://en.wikipedia.org/wiki/LORAN#Timing_and_synchronization +[41]:http://en.wikipedia.org/wiki/Medium_frequency +[42]:http://en.wikipedia.org/wiki/LORAN#The_future_of_LORAN +[43]:http://en.wikipedia.org/wiki/LORAN#eLORAN +[44]:http://en.wikipedia.org/wiki/Time_from_NPL#The_.27MSF_signal.27_and_the_.27Rugby_clock.27 +[45]:http://en.wikipedia.org/wiki/T%C3%A9l%C3%A9_Distribution_Fran%C3%A7aise +[46]:http://en.wikipedia.org/wiki/WWV_%28radio_station%29#Time_signals +[47]:http://en.wikipedia.org/wiki/WWVB +[48]:http://en.wikipedia.org/wiki/WWVH +[49]:http://en.wikipedia.org/wiki/GOES#Further_reading +[50]:http://en.wikipedia.org/wiki/Gps#Timekeeping +[51]:http://en.wikipedia.org/wiki/Galileo_%28satellite_navigation%29#The_concept +[52]:http://en.wikipedia.org/wiki/Gnss +[53]:http://www.eecis.udel.edu/~mills/ntp/html/debug.html +[54]:http://www.ntp.org/ntpfaq/NTP-s-algo-kernel.htm +[55]:http://en.wikipedia.org/wiki/Coordinated_Universal_Time +[56]:http://en.wikipedia.org/wiki/Time_zone +[57]:http://www.ietf.org/rfc/rfc1305.txt +[58]:http://www.ietf.org/rfc/rfc5905.txt +[59]:http://en.wikipedia.org/wiki/PLL +[60]:http://en.wikipedia.org/wiki/Frequency-locked_loop +[61]:http://en.wikipedia.org/wiki/Parts_per_million +[62]:http://en.wikipedia.org/wiki/Leap_second +[63]:http://en.wikipedia.org/wiki/Daylight_saving_time +[64]:http://www.ntp.org/ntpfaq/NTP-s-time.htm#Q-TIME-LEAP-SECOND +[65]:http://www.ntp.org/ntpfaq/NTP-s-algo-kernel.htm +[66]:http://www.ntp.org/ntpfaq/NTP-s-algo.htm#AEN1895 +[67]:http://www.ntp.org/ntpfaq/NTP-s-algo.htm#Q-ACCURATE-CLOCK +[68]:http://www.ntp.org/ntpfaq/NTP-s-trouble.htm#Q-TRB-MON-STATFIL +[69]:http://www.ntp.org/ntpfaq/NTP-s-trouble.htm#AEN5086 +[70]:http://en.wikipedia.org/wiki/Root_mean_square +[71]:http://en.wikipedia.org/wiki/PLL +[72]:http://en.wikipedia.org/wiki/Frequency-locked_loop +[73]:http://en.wikipedia.org/wiki/Parts_per_million +[74]:http://nlug.ml1.co.uk/2012/01/man-ntpq-gentoo-brief-version/853 +[75]:http://nlug.ml1.co.uk/2012/01/man-ntpq-long-version/855 +[76]:http://nlug.ml1.co.uk/2012/01/man-ntpq-gentoo-long-version/856 +[77]:http://www.eecis.udel.edu/~mills/ntp/html/ntpq.html +[78]:http://www.eecis.udel.edu/~mills/ntp/html/index.html +[79]:http://www.ntp.org/ntpfaq/NTP-s-def-hist.htm +[80]:http://www.eecis.udel.edu/~mills/database/papers/history.pdf +[81]:http://www.ntp.org/rfc.html +[82]:http://www.ietf.org/rfc/rfc1305.txt +[83]:http://www.rfc-editor.org/rfc/rfc1305.pdf +[84]:http://en.wikipedia.org/wiki/Time +[85]:http://en.wikipedia.org/wiki/Calendar +[86]:http://www.rmg.co.uk/harrison +[87]:http://longnow.org/clock/ +[88]:http://johnctaylor.com/ +[89]:http://en.wikipedia.org/wiki/Orders_of_magnitude_%28time%29 +[90]:http://en.wikipedia.org/wiki/Greenwich_Time_Signal +[91]:http://tools.ietf.org/html/rfc4330 +[92]:http://tools.ietf.org/html/rfc1305 +[93]:http://en.wikipedia.org/wiki/Network_Time_Protocol#Microsoft_Windows +[94]:http://en.wikipedia.org/wiki/Personal_computer +[95]:http://www.nist.gov/el/isd/ieee/ieee1588.cfm +[96]:http://en.wikipedia.org/wiki/IEEE_1588 +[97]:http://ptpd.sourceforge.net/ +[98]:http://en.wikipedia.org/wiki/Local_area_network +[99]:http://en.wikipedia.org/wiki/International_Atomic_Time +[100]:http://en.wikipedia.org/wiki/Monotonic_function +[101]:http://antinode.info/ftp/dtss_ntp/ +[102]:http://en.wikipedia.org/wiki/DAYTIME +[103]:http://en.wikipedia.org/wiki/Transmission_Control_Protocol +[104]:http://en.wikipedia.org/wiki/User_Datagram_Protocol +[105]:http://en.wikipedia.org/wiki/ICMP_Timestamp +[106]:http://en.wikipedia.org/wiki/ICMP_Timestamp_Reply +[107]:http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol +[108]:http://en.wikipedia.org/wiki/Time_Protocol \ No newline at end of file From c0707b66d5ec46c4eff7ee043b11aa0e210c5122 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Oct 2014 16:02:14 +0800 Subject: [PATCH 022/316] PUB:20141009 Linux Terminal--An lsof Primer @GOLinux --- ...20141009 Linux Terminal--An lsof Primer.md | 123 +++++++++--------- 1 file changed, 62 insertions(+), 61 deletions(-) rename {translated/tech => published}/20141009 Linux Terminal--An lsof Primer.md (67%) diff --git a/translated/tech/20141009 Linux Terminal--An lsof Primer.md b/published/20141009 Linux Terminal--An lsof Primer.md similarity index 67% rename from translated/tech/20141009 Linux Terminal--An lsof Primer.md rename to published/20141009 Linux Terminal--An lsof Primer.md index 2485801eb3..76266736b9 100644 --- a/translated/tech/20141009 Linux Terminal--An lsof Primer.md +++ b/published/20141009 Linux Terminal--An lsof Primer.md @@ -1,12 +1,10 @@ -Linux终端:lsof入门 +Linux 命令神器:lsof 入门 ================================================================================ ![](http://cdn.linuxaria.com/wp-content/uploads/2011/06/tux-terminal.jpg) -Daniel Miessler撰写,首次在他[博客][1]上贴出 +**lsof**是系统管理/[安全][2]的尤伯工具。我大多数时候用它来从系统获得与[网络][3]连接相关的信息,但那只是这个强大而又鲜为人知的应用的第一步。将这个工具称之为lsof真实名副其实,因为它是指“**列出打开文件(lists openfiles)**”。而有一点要切记,在Unix中一切(包括网络套接口)都是文件。 -**lsof**是系统管理/[安全][2]尤伯工具。我大多数时候用它来从系统获得与[网络][3]连接相关的信息,但那只是这个强大而又鲜为人知的应用的第一步。将这个工具称之为lsof真实名副其实,因为它是指“**列出打开文件(lists openfiles)**”。而有一点要切记,在Unix中一切(包括网络套接口)都是文件。 - -有趣的是,lsof也是有着最多开关的Linux/Unix命令。它有那么多的开关,它必须同时使用-和+。 +有趣的是,lsof也是有着最多开关的Linux/Unix命令之一。它有那么多的开关,它有许多选项支持使用-和+前缀。 usage: [-?abhlnNoOPRstUvV] [+|-c c] [+|-d s] [+D D] [+|-f[cgG]] [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+|-M] [-o [o]] @@ -18,105 +16,105 @@ Daniel Miessler撰写,首次在他[博客][1]上贴出 ### 关键选项 ### -理解一些关于lsof如何工作的关键性东西是很重要的。最重要的是,当你给它传递选项时,默认行为是对结果进行或运算。因此,如果你正是用-i来拉出一个端口列表,同时又用-p来拉出一个进程列表,那么默认情况下你会获得两者的结果。 +理解一些关于lsof如何工作的关键性东西是很重要的。最重要的是,当你给它传递选项时,**默认行为**是对结果进行“或”运算。因此,如果你正是用-i来拉出一个端口列表,同时又用-p来拉出一个进程列表,那么默认情况下你会获得两者的结果。 下面的一些其它东西需要牢记: -- **default** : 没有选项,lsof列出活跃进程的所有打开文件 -- **grouping** : 可以分组选项,如-abc,但要当心哪些选项需要参数 -- **-a** : 结果进行与运算(而不是或) +- **默认** : 没有选项,lsof列出活跃进程的所有打开文件 +- **组合** : 可以将选项组合到一起,如-abc,但要当心哪些选项需要参数 +- **-a** : 结果进行“与”运算(而不是“或”) - **-l** : 在输出显示用户ID而不是用户名 - **-h** : 获得帮助 - **-t** : 仅获取进程ID - **-U** : 获取UNIX套接口地址 -- **-F** : 输出结果为其它命令准备好,可以通过多种方式格式化,如-F pcfn(用于进程id、命令名、文件描述符、文件名,并以空终止) +- **-F** : 格式化输出结果,用于其它命令。可以通过多种方式格式化,如-F pcfn(用于进程id、命令名、文件描述符、文件名,并以空终止) -#### 获取网络信息 #### +### 获取网络信息 ### 正如我所说的,我主要将lsof用于获取关于系统怎么和网络交互的信息。这里提供了关于此信息的一些主题: -### 使用-i显示所有连接 ### +#### 使用-i显示所有连接 #### -有些人喜欢用netstat来获取网络连接,但是我更喜欢使用lsof来进行此项工作。结果以对我来说很直观的方式呈现,而我了解到,我仅仅只需改变我的语法,就可以通过同样的命令来获取更多信息。 +有些人喜欢用netstat来获取网络连接,但是我更喜欢使用lsof来进行此项工作。结果以对我来说很直观的方式呈现,我仅仅只需改变我的语法,就可以通过同样的命令来获取更多信息。 -# lsof -i + # lsof -i COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME dhcpcd 6061 root 4u IPv4 4510 UDP *:bootpc sshd 7703 root 3u IPv6 6499 TCP *:ssh (LISTEN) sshd 7892 root 3u IPv6 6757 TCP 10.10.1.5:ssh->192.168.1.5:49901 (ESTABLISHED) -### 使用-i 6仅获取IPv6流量 ### +#### 使用-i 6仅获取IPv6流量 #### -# lsof -i 6 + # lsof -i 6 -### 仅显示TCP连接(同理可获得UDP连接) ### +#### 仅显示TCP连接(同理可获得UDP连接) #### 你也可以通过在-i后提供对应的协议来仅仅显示TCP或者UDP连接信息。 -# lsof -iTCP + # lsof -iTCP COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME sshd 7703 root 3u IPv6 6499 TCP *:ssh (LISTEN) sshd 7892 root 3u IPv6 6757 TCP 10.10.1.5:ssh->192.168.1.5:49901 (ESTABLISHED) -### 使用-i:port来显示与指定端口相关的网络信息 ### +#### 使用-i:port来显示与指定端口相关的网络信息 #### 或者,你也可以通过端口搜索,这对于要找出什么阻止了另外一个应用绑定到指定端口实在是太棒了。 -# lsof -i :22 + # lsof -i :22 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME sshd 7703 root 3u IPv6 6499 TCP *:ssh (LISTEN) sshd 7892 root 3u IPv6 6757 TCP 10.10.1.5:ssh->192.168.1.5:49901 (ESTABLISHED) -### 使用@host来显示指定到指定主机的连接 ### +#### 使用@host来显示指定到指定主机的连接 #### 这对于你在检查是否开放连接到网络中或互联网上某个指定主机的连接时十分有用。 -# lsof -i@172.16.12.5 + # lsof -i@172.16.12.5 sshd 7892 root 3u IPv6 6757 TCP 10.10.1.5:ssh->172.16.12.5:49901 (ESTABLISHED) -### 使用@host:port显示基于主机与端口的连接 ### +#### 使用@host:port显示基于主机与端口的连接 #### 你也可以组合主机与端口的显示信息。 -# lsof -i@172.16.12.5:22 + # lsof -i@172.16.12.5:22 - sshd 7892 root 3u IPv6 6757 TCP 10.10.1.5:ssh->192.168.1.5:49901 (ESTABLISHED) + sshd 7892 root 3u IPv6 6757 TCP 10.10.1.5:ssh->172.16.12.5:49901 (ESTABLISHED) -### 找出监听端口 ### +#### 找出监听端口 #### 找出正等候连接的端口。 -# lsof -i -sTCP:LISTEN + # lsof -i -sTCP:LISTEN 你也可以grep “LISTEN”来完成该任务。 -# lsof -i | grep -i LISTEN + # lsof -i | grep -i LISTEN iTunes 400 daniel 16u IPv4 0x4575228 0t0 TCP *:daap (LISTEN) -### 找出已建立的连接 ### +#### 找出已建立的连接 #### 你也可以显示任何已经连接的连接。 -# lsof -i -sTCP:ESTABLISHED + # lsof -i -sTCP:ESTABLISHED 你也可以通过grep搜索“ESTABLISHED”来完成该任务。 -# lsof -i | grep -i ESTABLISHED + # lsof -i | grep -i ESTABLISHED firefox-b 169 daniel 49u IPv4 0t0 TCP 1.2.3.3:1863->1.2.3.4:http (ESTABLISHED) -#### 用户信息 #### +### 用户信息 ### 你也可以获取各种用户的信息,以及它们在系统上正干着的事情,包括它们的网络活动、对文件的操作等。 -### 使用-u显示指定用户打开了什么 ### +#### 使用-u显示指定用户打开了什么 #### -# lsof -u daniel + # lsof -u daniel -- snipped -- Dock 155 daniel txt REG 14,2 2798436 823208 /usr/lib/libicucore.A.dylib @@ -126,9 +124,9 @@ Daniel Miessler撰写,首次在他[博客][1]上贴出 Dock 155 daniel txt REG 14,2 212160 823214 /usr/lib/libauto.dylib -- snipped -- -### 使用-u ^user来显示除指定用户以外的其它所有用户所做的事情 ### +#### 使用-u ^user来显示除指定用户以外的其它所有用户所做的事情 #### -# lsof -u ^daniel + # lsof -u ^daniel -- snipped -- Dock 155 jim txt REG 14,2 2798436 823208 /usr/lib/libicucore.A.dylib @@ -138,19 +136,19 @@ Daniel Miessler撰写,首次在他[博客][1]上贴出 Dock 155 jim txt REG 14,2 212160 823214 /usr/lib/libauto.dylib -- snipped -- -### 杀死指定用户所做的一切事情 ### +#### 杀死指定用户所做的一切事情 #### 可以消灭指定用户运行的所有东西,这真不错。 -# kill -9 `lsof -t -u daniel` + # kill -9 `lsof -t -u daniel` -#### 命令和进程 #### +### 命令和进程 ### -可以查看指定程序或进程由什么决定,这通常会很有用,而你可以使用lsof通过名称或进程ID过滤来完成这个任务。下面列出了一些选项: +可以查看指定程序或进程由什么启动,这通常会很有用,而你可以使用lsof通过名称或进程ID过滤来完成这个任务。下面列出了一些选项: -### 使用-c查看指定的命令正在使用的文件和网络连接 ### +#### 使用-c查看指定的命令正在使用的文件和网络连接 #### -# lsof -c syslog-ng + # lsof -c syslog-ng COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME syslog-ng 7547 root cwd DIR 3,3 4096 2 / @@ -158,9 +156,9 @@ Daniel Miessler撰写,首次在他[博客][1]上贴出 syslog-ng 7547 root txt REG 3,3 113524 1064970 /usr/sbin/syslog-ng -- snipped -- -### 使用-p查看指定进程ID已打开的内容 ### +#### 使用-p查看指定进程ID已打开的内容 #### -# lsof -p 10075 + # lsof -p 10075 -- snipped -- sshd 10068 root mem REG 3,3 34808 850407 /lib/libnss_files-2.4.so @@ -176,69 +174,72 @@ Daniel Miessler撰写,首次在他[博客][1]上贴出 sshd 10068 root mem REG 3,3 9992 850416 /lib/libutil-2.4.so -- snipped -- -### -t选项只返回PID ### +#### -t选项只返回PID #### -# lsof -t -c Mail + # lsof -t -c Mail 350 -#### 文件和目录 #### +### 文件和目录 ### 通过查看指定文件或目录,你可以看到系统上所有正与其交互的资源——包括用户、进程等。 #### 显示与指定目录交互的所有一切 #### -# lsof /var/log/messages/ + # lsof /var/log/messages/ COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME syslog-ng 7547 root 4w REG 3,3 217309 834024 /var/log/messages ### 显示与指定文件交互的所有一切 ### -# lsof /home/daniel/firewall_whitelist.txt + # lsof /home/daniel/firewall_whitelist.txt -#### 高级用法 #### +### 高级用法 ### 与[tcpdump][4]类似,当你开始组合查询时,它就显示了它强大的功能。 -### 显示daniel连接到1.1.1.1所做的一切 ### +#### 显示daniel连接到1.1.1.1所做的一切 #### -# lsof -u daniel -i @1.1.1.1 + # lsof -u daniel -i @1.1.1.1 bkdr 1893 daniel 3u IPv6 3456 TCP 10.10.1.10:1234->1.1.1.1:31337 (ESTABLISHED) -### 同时使用-t和-c选项以挂起进程 ### +#### 同时使用-t和-c选项以给进程发送 HUP 信号 #### -# kill -HUP `lsof -t -c sshd` + # kill -HUP `lsof -t -c sshd` -### lsof +L1显示所有打开的链接数小于1的文件 ### +#### lsof +L1显示所有打开的链接数小于1的文件 #### -这通常(当不总是)表示某个攻击者正尝试通过取消文件链接来隐藏文件。 +这通常(当不总是)表示某个攻击者正尝试通过删除文件入口来隐藏文件内容。 -# lsof +L1 + # lsof +L1 (hopefully nothing) -### 显示某个端口范围的开放连接 ### +#### 显示某个端口范围的打开的连接 #### # lsof -i @fw.google.com:2150=2180 -#### 结尾 #### +### 结尾 ### -This primer just scratches the surface of lsof‘s functionality. For a full reference, run man lsof or check out [the online version][5]. I hope this has been useful to you, and as always,[comments and corrections are welcomed][6]. 本入门教程只是管窥了lsof功能的一斑,要查看完整参考,运行man lsof命令或查看[在线版本][5]。希望本文对你有所助益,也随时[欢迎你的评论和指正][6]。 ### 资源 ### - lsof手册页:[http://www.netadmintools.com/html/lsof.man.html][7] + +本文由 Daniel Miessler撰写,首次在他[博客][1]上贴出 + + -------------------------------------------------------------------------------- via: http://linuxaria.com/howto/linux-terminal-an-lsof-primer 作者:[Daniel Miessler][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d046d387e43b98dbe75c16cce79164eb949f4792 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 27 Oct 2014 16:27:31 +0800 Subject: [PATCH 023/316] Finish the translation by ZTinoZ --- ...s Alienating Developers with Strong Language.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {sources => translated}/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md (55%) diff --git a/sources/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md b/translated/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md similarity index 55% rename from sources/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md rename to translated/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md index ff0eb8e822..09d4a7d831 100644 --- a/sources/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md +++ b/translated/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md @@ -2,23 +2,23 @@ Linus Torvalds对于骂那些开发者感到后悔 ================================================================================ > 他没有提到任何人的名字,但是这像一次道歉 -**Linus Torvalds在前几天的欧洲LinuxCon和CloudOpen大会上做了讲话,这次大会由Linux基金会组织并且汇聚了开源世界的所有大佬。他回答了很多问题,也谈到了他在邮件发送清单里使用脏话的事情。** +**Linus Torvalds在前几天的欧洲LinuxCon和CloudOpen大会上做了讲话,这次大会由Linux基金会组织并且汇聚了开源世界的所有大佬。他回答了很多问题,也谈到了他在邮件发送清单里使用粗话的事情。** -Linus Torvalds被认为是Linux内核的创造者和最新的Linux开发版的维护者。他确保我们几乎每个星期都会得到一个新的RC内核并且涉及发生在邮件发送清单中的对话里,他口不择言地用脏话大骂一些开发者们。 +Linus Torvalds被认为是Linux内核的创造者和最新的Linux开发版的维护者。他确保我们几乎每个星期都会得到一个新的RC内核并且涉及发生在邮件发送清单中的对话里,他口不择言地用粗话大骂一些开发者们。 最近出现了一个问题,就是他在做了一些苛刻的评论之后[决定从指定的开发者的手中阉割掉一些代码][1],这种事件在新闻里也报道过。大家都知道Linus很招人厌烦,尤其是当内核开发者为了修复内核中的一些问题而破坏了用户空间。同样的事情就发生在这种情况下,他基本上已经把那个家伙给气疯了。 ### 这是他最接近道歉意味的一次谈话 ### -Linus Torvalds never really talked about that particular discussion since and people moved on, but recently a systemd developer talked about the strong language in the open source community and he mentioned Linus Torvalds by name. He's not known to apologize, so this admission of guilt during LinuxCon is a big step forward. The moderator asked him what single decision in the last 23 years he would change. +以前Linus Torvalds从不真正去特地谈论一些事情,大家也在稳步地前进。但是最近一个systemd开发者谈到了在开源社区充斥着粗话并且点名提到了Linus Torvalds。他不太知道去道歉,所以这次在LinuxCon大会上的这次“认错”是他跨出的一大步。主持人询问他在过去的23年里所做过的单一的决定。 -"From a technical standpoint, no single decision has ever been that important... The problems tend to be around alienating users or developers and I'm pretty good at that. I use strong language. But again there's not a single instance I'd like to fix. There's a metric [expletive]load of those." +"从技术角度来看,没有一个单一的决定向来就是重要的...这个问题慢慢地疏远用户和开发者而我却恰恰很擅长这个。我说了粗话。但是我不想再修复单独实例了,都是一坨坨狗X一样的东西。" -"One of the reasons we have this culture of strong language, that admittedly many people find off-putting, is that when it comes to technical people with strong opinions and with a strong drive to do something technically superior, you end up having these opinions show up as sometimes pretty strong language," [said][2] Linus Torvalds. +"其中一个原因是我们有说粗话的传统,很多人觉得倒胃口,当有强烈提议欲的技术人员和在技术上拥有巨大推动力的上级时,你就会把这些建议想成了一堆堆粗话了。" Linus Torvalds [如是说][2] 。 -He didn't mention anyone by name or any specific incident, but the proximity to the complaints issued by Leonart Pottering, the systemd developer, seems to point towards that issue. +他没提到任何人或者任何事件的名字,但很像是对于一位名为Leonart Pottering的systemd开发者挑起事端的回应,看上去就是针对这起事件。 -It also looks like Linux kernel 3.18 RC1 will arrive later this week and we'll soon have something new to play with. +Linux内核3.18 RC1也在上周发布了,我们又有新东西玩了。 -------------------------------------------------------------------------------- From 777a0b601408daff5584f49b44f1a325603b6ab2 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 27 Oct 2014 16:33:44 +0800 Subject: [PATCH 024/316] =?UTF-8?q?20141027-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share/20141027 Handy Disk Image Tools.md | 170 ++++++++++++++++++ ...t fast and safely from the command line.md | 125 +++++++++++++ ... and directories with eCryptFS on Linux.md | 107 +++++++++++ 3 files changed, 402 insertions(+) create mode 100644 sources/share/20141027 Handy Disk Image Tools.md create mode 100644 sources/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md create mode 100644 sources/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md diff --git a/sources/share/20141027 Handy Disk Image Tools.md b/sources/share/20141027 Handy Disk Image Tools.md new file mode 100644 index 0000000000..b69a0962b0 --- /dev/null +++ b/sources/share/20141027 Handy Disk Image Tools.md @@ -0,0 +1,170 @@ +Handy Disk Image Tools +================================================================================ +Disk images are computer files of a disk volume or an entire data storage device, such as a hard drive, optical disk (e.g. DVD, CD, Blu-ray), tape drive, USB flash drive, or floppy disk. A disk image represents the content exactly as it is on the original storage device, including both data and structure information. + +Disk image file formats can be open standards, such as the ISO image format for optical disk images, or proprietary to particular software applications. The name "ISO" is taken from the ISO 9660 file system used with CD-ROM media. Converting from a proprietary image format to an open format often crops up as an issue when users migrate to Linux. + +Disk images have many different uses such as burning optical media, system backup, data recovery, disk cloning, computer forensics, and operating systems (as Live CD/DVDs). + +There are a number of different ways of mounting an ISO image under Linux. The venerable mount command offers an easy solution. But if you need tools that offer more functionality for working with disk images, try some of the following excellent open source tools. + +Most of the tools have not seen a recent release, so if you are looking to get involved with a good open source tool, you could pitch in. + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/FuriusISOMount.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-FuriusISOMountTool.png) + +Furius ISO Mount is a simple open source application for mounting .iso, .img, .bin, .mdf and .nrg image files without burning them to disk. + +Features include: + +- Automatically mounts ISO, IMG, BIN, MDF and NRG image files +- Supports mounting UDF images through loop +- Automatically creates a mount point in your home directory +- Automatically unmounts the Image files +- Automatically removes the mount directory to return your home directory to its previous state +- Automatically saves the history of the last 10 images mounted +- Mounts multiple images +- Burn ISO and IMG Files to optical disk +- Generate MD5 and SHA1 checksums +- Automatically retrieves any previously unmounted images +- Automatically generates a log file of all commands needed to mount and unmount images manually +- Language support (currently Bulgarian, Chinese (Simplified), Czech, Dutch, French, German, Hungarian, Italian, Greek, Italian, Japanese, Polish, Portuguese, Russian, Slovenian, Spanish, Swedish and Turkish) + +- Website: [launchpad.net/furiusisomount/][1] +- Developer: Dean Harris (Marcus Furius) +- License: GNU GPL v3 +- Version Number: 0.11.3.1 + + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/fuseiso.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-fuseiso.png) + +fuseiso is an open source FUSE module to mount ISO filesystem images. + +With FUSE it is possible to implement a fully functional filesystem in a userspace program. + +Features include: + +- Read ISO, BIN and NRG images containing ISO9660 filesystems +- Supports plain ISO9660 Level 1 and 2 +- Supports some common extensions, like Joliet, RockRidge and zisofs +- Supports non-standard images, like CloneCD's IMGs and Alcohol 120%'s MDFs, as their format looks exactly like BIN images + +- Website: [sourceforge.net/projects/fuseiso][2] +- Developer: Dmitry Morozhnikov +- License: GNU GPL v2 +- Version Number: 20070708 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/iat.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-iat.png) + +iat (Iso9660 Analyzer Tool) is a versatile, open source tool for detecting the structure of many types of image file formats, such as BIN, MDF, PDI, CDI, NRG, and B5I, and converting them into ISO-9660. + +Features include: + +- Supports reading (input) NRG, MDF, PDI, CDI, BIN, CUE and B5I images +- Burn disc images directly using cdrecord +- Outputs information including a progress-bar, Block size, ECC sector (size), header sector (size), image offset start and more + +- Website: [sourceforge.net/projects/iat.berlios][3] +- Developer: Salvatore Santagati +- License: GNU GPL v2 +- Version Number: 0.1.3 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/AcetoneISO.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-AcetoneISO.png) + +AcetoneISO is a feature-rich open source graphical application to mount and manage CD/DVD images. + +The utility opens a graphical file manager to mount image formats, including proprietary image formats, including ISO, BIN, NRG, MDF, IMG etc, and lets you perform a number of actions. + +AcetoneISO is written with Qt 4, which means that it integrates well in Qt-based desktop environments like KDE, LXQt or Razor-qt. + +This software is meant for all those people looking for a "Daemon Tools for Linux". + +Features include: + +- Mount most common Windows images in a clean and easy GUI +- Convert all known images to ISO or extract the contents to a folder +- Encrypt, compress, split any type of image +- Convert DVD video to xvid avi and any generic video to xvid avi +- Extract audio from a video +- Extract images content to a folder: bin mdf nrg img daa dmg cdi b5i bwi pdi +- Play a DVD Movie Image with Kaffeine / VLC / SMplayer with auto-cover download from Amazon +- Generate an ISO from a Folder or CD/DVD +- Check MD5 file of an image and/or generate it to a text file +- Calculate ShaSums of images in 128, 256, and 384 bit +- Encrypt / Decrypt an image +- Split / Merge image in X megabyte +- Compress with high ratio an image in 7z format +- Rip a PSX CD to *.bin to make it work with ePSXe/pSX emulators +- Restore a lost CUE file of *.bin *.img +- Convert Mac OS *.dmg to a mountable image +- Mount an image in a specified folder from the user +- Create a database of images to manage big collections +- Extract the Boot Image file of a CD/DVD or ISO +- Backup a CD-Audio to a *.bin image +- Quick and simple utility to rip a DVD to Xvid AVI +- Quick and simple utility to convert a generic video (avi, mpeg, mov, wmv, asf) to Xvid AVI +- Quick and simple utility to convert a FLV video to AVI +- Utility to download videos from YouTube and Metacafe +- Extract audio from a video file +- Extract a *.rar archive that has a password +- Utility to convert any video for Sony PSP PlayStation Portable +- Internationalization support English, Italian, Polish, Spanish, Romanian, Hungarian, German, Czech, and Russian + +- Website: [sourceforge.net/projects/acetoneiso][4] +- Developer: Marco Di Antonio +- License: GNU GPL v3 +- Version Number: 2.3 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/ISOMaster.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-ISOMaster.png) + +ISO Master is an open-source, easy to use, graphical CD image editor for Linux and BSD. This tool extracts files from an ISO, add files to an ISO, and create bootable ISOs - all in a graphical user interface. It can open ISO, NRG, and some MDF files but can only save as ISO. + +ISO Master is based on bkisofs, a simple and stable library for reading, modifying and writing ISO images which supports the Joliet, RockRidge, and EL Torito extensions. + +Features include: + +- Reads .ISO files (ISO9660, Joliet, RockRidge, and El Torito), most .NRG files, and some single-track .MDF files; it can save only as .ISO +- Create or customise CD/DVD images +- Add or remove files and directories to/from a CD image +- Make bootable CDs/DVDs +- Internationalization support + +- Website: [www.littlesvr.ca/isomaster/][5] +- Developer: Andrew Smith +- License: GNU GPL v2 +- Version Number: 1.3.11 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20141025082352476/DiskImageTools.html + +作者:Frazer Kline +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://launchpad.net/furiusisomount/ +[2]:http://sourceforge.net/projects/fuseiso/ +[3]:http://sourceforge.net/projects/iat.berlios/ +[4]:http://sourceforge.net/projects/acetoneiso/ +[5]:http://www.littlesvr.ca/isomaster/ \ No newline at end of file diff --git a/sources/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md b/sources/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md new file mode 100644 index 0000000000..e42f1c363b --- /dev/null +++ b/sources/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md @@ -0,0 +1,125 @@ +How to download an ISO image with BitTorrent fast and safely from the command line +================================================================================ +If you are one of those guys who have urge to try out every new (or even beta) release of Linux distribution to satisfy your curiosity and stay up-to-date, you will need to deal with the hassle of downloading big ISO images every now and then. ISO providers typically put up .torrent file of their ISO images to ease up on the bandwidth consumption of their servers. The benefit of peer-to-peer download is obvious for users as well (in terms of speed), especially when a new release of a popular Linux distribution is up for grab, and everyone is downloading and seeding the release at the same time. + +Ubuntu 14.10 (Utopic Unicorn) was just released this week. So there should be plenty of seeds to download the release from in the BitTorrent network at the moment. While there are many GUI-based BitTorrent clients out there, I am going to show you **how to download ISO images via a simple command-line interface (CLI) BitTorrent client**, which can be handy if you are on a remote headless server. Later in this tutorial, I will also demonstrate **how to verify the integrity of a downloaded ISO image**. + +The CLI BitTorrent client I am going to use today is transmission-cli. As you may know, [Transmission][1] is one of the most popular GUI-based BitTorrent client. transmission-cli is its stripped-down CLI version. + +### Install Transmission-cli on Linux ### + +To install **transmission-cli**, you don't need to install a full-blown GUI-based Transmission, which is nice. + +On Debian, Ubuntu or their derivatives: + + $ sudo apt-get install transmission-cli + +On Fedora: + + $ sudo yum install transmission-cli + +On CentOS or RHEL (after enabling [EPEL repository][2]): + + $ sudo yum install transmission-cli + +### Download an ISO Image Fast with transmission-cli ### + +**transmission-cli** is really simple to use. If you are too lazy to study its command line options, all you have to do is to download .torrent file, and launch the command with the torrent file. It will automatically look for available peers, and download an ISO file from them. + + $ wget http://releases.ubuntu.com/14.10/ubuntu-14.10-desktop-amd64.iso.torrent + $ transmission-cli ubuntu-14.10-desktop-amd64.iso.torrent + +![](https://farm4.staticflickr.com/3933/14999528344_9af3ea5d2e_z.jpg) + +Once an ISO image is fully downloaded, it will be stored in ~/Downloads directory by default. It took me only 5 minutes to download 1GB Ubuntu ISO image. + +![](https://farm6.staticflickr.com/5605/15433651319_745df6633a_z.jpg) + +Once it finishes downloading an ISO image, you will see the message "State changed from Incomplete to Complete" in the console. Note that transmission-cli will continue to run afterwards, becoming a seed for other downloaders. Press Ctrl+C to quit. + +### Customize Download Options for Repeat Use ### + +If you are a repeat user of **transmission-cli**, it may be worth your time to be familiar with some of its command line options. + +The "-w /path/to/download-directory" option specifies the directory where a downloaded file will be saved. + +The "-f /path/to/finish-script" option sets a script to run when current download is completed. Recall that transmission-cli, by default, continues running even after a file is fully downloaded. If you want to auto-terminate transmission-cli upon successful download, you can use this option. The following simple finish script will do. + + #!/bin/sh + sleep 10 + killall transmission-cli + +If you want to allocate limited upload/download bandwidth to transmission-cli, you can use "-d and "-u options. If you want to allow unlimited bandwidth instead, simply specify "-D" or "-U" option without any value. + +Here is a more advanced usage example of transmission-cli. In this example, the CLI client will automatically exit upon successful download. Download rate is unlimited while upload rate is capped at 50KB/s. + + $ transmission-cli -w ~/iso -D -u 50 -f ~/finish.sh ubuntu-14.10-desktop-amd64.iso.torrent + +![](https://farm6.staticflickr.com/5599/15434697690_e9a19f0d97_z.jpg) + +### Verify the Integrity of a Downloaded ISO Image ### + +When you download an ISO image, especially from many unknown peers in the BitTorrent network, it is always recommended to verify the integrity of the downloaded image. + +In case of Ubuntu releases, Canonical provides several checksum files (e.g., MD5SUM, SHA1SUMS and SHA256SUMS) for verification purpose. Let's use SHA256SUMS in this example. + +![](https://farm4.staticflickr.com/3943/15434697700_3b3e6077ee_z.jpg) + +First, download the following two files. + + $ wget http://releases.ubuntu.com/14.10/SHA256SUMS + $ wget http://releases.ubuntu.com/14.10/SHA256SUMS.gpg + +The first file is a SHA256 checksum file for ISO images, while the second file (*.gpg) is a signature of the checksum file. The purpose of the second file is to verify the validity of the checksum file itself. + +Let's verify the validity of SHA256SUMS file by running this command: + + $ gpg --verify SHA256SUMS.gpg SHA256SUMS + +---------- + + gpg: Signature made Thu 23 Oct 2014 09:36:00 AM EDT using DSA key ID FBB75451 + gpg: Can't check signature: public key not found + +If you are getting the above error, this is because you have not imported the public key used to generate the signature. So now let's import the required public key. + +To do that, you need to know the "key ID" of the public key, which is shown in the output of gpg command above. In this example, the key ID is "FBB75451". Run the following command to import the public key from the official Ubuntu keyserver. + + $ gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys FBB75451 + +![](https://farm4.staticflickr.com/3953/15620291035_bcdb3cffb9_z.jpg) + +Now that the public key has been imported, go ahead and re-run the previous command to verify the signature. + + gpg --verify SHA256SUMS.gpg SHA256SUMS + +![](https://farm6.staticflickr.com/5600/15433651369_d22905e65b_z.jpg) + +This time you will not see "public key not found" error. If the SHA256SUMS file is valid, you will see "Good signature from " message. Note that you will also see a warning message saying that "This key is not certified with a trusted signature". Basically this warning message is telling you that you have not [assigned any explicit trust][3] to the imported public key. To avoid this warning, you could choose to assign your full trust to the imported public key, but you should do that only after the key has been fully vetted in some other means. Otherwise, you can ignore the warning for now. + +After verifying the integrity of SHA256SUMS file, the final last step is to compare the SHA256 checksum of the downloade ISO image against the corresponding checksum value in SHA256SUMS file. For that you can use sha256sum command line tool. + +For your convenience, the following one-liner compares the SHA256 checksums and reports the result. + + $ sha256sum -c <(grep ubuntu-14.10-desktop-amd64.iso SHA256SUMS) + +---------- + + ubuntu-14.10-desktop-amd64.iso: OK + +If you see the above output, that means that two checksum values match. So the integrity of the downloaded ISO image has been successfully verified. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/download-iso-image-bittorrent-command-line.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:https://www.transmissionbt.com/ +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[3]:http://xmodulo.com/verify-authenticity-integrity-downloaded-file.html \ No newline at end of file diff --git a/sources/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md b/sources/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md new file mode 100644 index 0000000000..4619bf9cfe --- /dev/null +++ b/sources/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md @@ -0,0 +1,107 @@ +How to encrypt files and directories with eCryptFS on Linux +================================================================================ +You do not have to be a criminal or work for the CIA to use encryption. You simply don't want anybody to spy on your financial data, family pictures, unpublished manuscripts, or secret notes where you have jotted down startup ideas which you think can make you super rich. + +I have heard people telling me "I'm not important enough to be spied" or "I don't hide anything to care about." Well, my opinion is that even if I don't have anything to hide, or I can publish a picture of my kids with my dog, I have the right to not do it and want to protect my privacy. + +### Types of Encryption ### + +We have largely two different ways to encrypt files and directories. One method is filesystem-level encryption, where only certain files or directories (e.g., /home/alice) are encrypted selectively. To me, this is a perfect way to start. You don't need to re-install everything to enable or test encryption. Filesystem-level encryption has some disadvantages, though. For example, many modern applications cache (part of) files in unencrypted portions of your hard drive, such as swap partition, /tmp and /var folders, which can result in privacy leaks. + +The other way is so-called full-disk encryption, which means that the entire disk is encrypted (possibly except for a master boot record). Full disk encryption works at the physical disk level; every bit written to the disk is encrypted, and anything read from the disk is automatically decrypted on the fly. This will prevent any potential unauthorized access to unencrypted data, and ensure that everything in the entire filesystem is encrypted, including swap partition or any temporarily cached data. + +### Available Encryption Tools ### + +There are several options to implement encryption in Linux. In this tutorial, I am going to describe one option: **eCryptFS** a user-space cryptographic filesystem tool. For your reference, here is a roundup of available Linux encryption tools. + +#### Filesystem-level encryption #### + +- [EncFS][1]: one of the easiest ways to try encryption. EncFS works as a FUSE-based pseudo filesystem, so you just create an encrypted folder and mount it to a folder to work with. +- [eCryptFS][2]: a POSIX compliant cryptographic filesystem, eCryptFS works in the same way as EncFS, so you have to mount it. + +#### Filesystem-level encryption #### + +- [Loop-AES][3]: the oldest disk encryption method. It is really fast and works on old system (e.g., kernel 2.0 branch). +- [DMCrypt][4]: the most common disk encryption scheme supported by the modern Linux kernel. +- [CipherShed][5]: an open-source fork of the discontinued TrueCrypt disk encryption program. + +### Basics of eCryptFS ### + +eCryptFS is a FUSE-based user-space cryptographic filesystem, which has been available in the Linux kernel since 2.6.19 (as ecryptfs module). An eCryptFS-encrypted pseudo filesystem is mounted on top of your current filesystem. It works perfectly on EXT filesystem family and others like JFS, XFS, ReiserFS, Btrfs, even NFS/CIFS shares. Ubuntu uses eCryptFS as its default method to encrypt home directory, and so does ChromeOS. Underneath it, eCryptFS uses AES algorithm by default, but it supports others algorithms, such as blowfish, des3, cast5, cast6. You will be able to choose among them in case you create a manual setup of eCryptFS. + +Like I said, Ubuntu lets us choose whether to encrypt our /home directory during installation. Well, this is the easiest way to use eCryptFS. + +![](https://farm6.staticflickr.com/5600/15639040345_8d74cd54a8_z.jpg) + +Ubuntu provides a set of user-friendly tools that make our life easier with eCryptFS, but enabling eCryptFS during Ubuntu installation only creates a specific pre-configured setup. So in case the default setup doesn't fit your needs, you will need to perform a manual setup. In this tutorial, I will describe **how to set up eCryptFS manually on major Linux distros**. + +### Installation of eCryptFS ### + +Debian, Ubuntu or its derivatives: + + $ sudo apt-get install ecryptfs-utils + +Note that if you chose to encrypt your home directory during Ubuntu installation, eCryptFS should be already installed. + +CentOS, RHEL or Fedora: + + # yum install ecryptfs-utils + +Arch Linux: + + $ sudo pacman -S ecryptfs-utils + +After installing the package, it is a good practice to load the eCryptFS kernel module just to be sure: + + $ sudo modprobe ecryptfs + +### Configure eCryptFS ### + +Now let's start encrypting some directory by running eCryptFS configuration tool: + + $ ecryptfs-setup-private + +![](https://farm6.staticflickr.com/5608/15453440890_3b4be6d5a7_z.jpg) + +It will ask for a login passphrase and a mount passphrase. The login passphrase is the same as your normal login password. The mount passphrase is used to derive a file encryption master key. Leave it blank to generate one as it's safer. Log out and log back in. + +You will notice that eCryptFS created two directories by default: Private and .Private in your home directory. The ~/.Private directory contains encrypted data, while you can access corresponding decrypted data in the ~/Private directory. At the time you log in, the ~/.Private directory is automatically decrypted and mapped to the ~/Private directory, so you can access it. When you log out, the ~/Private directory is automatically unmounted and the content in the ~/Private directory is encrypted back into the ~/.Private directory. + +The way eCryptFS knows that you own the ~/.Private directory, and automatically decrypts it into the ~/Private directory without needing us to type a password is through an eCryptFS PAM module which does the trick for us. + +In case you don't want to have the ~/Private directory automatically mounted upon login, just add the "--noautomount" option when running ecryptfs-setup-private tool. Similarly, if you do not want the ~/Private directory to be automatically unmounted after logout, specify "--noautoumount" option. But then, you will have to mount or unmount ~/Private directory manually by yourself: + + $ ecryptfs-mount-private ~/.Private ~/Private + $ ecryptfs-umount-private ~/Private + +You can verify that .Private folder is mounted by running: + + $ mount + +![](https://farm6.staticflickr.com/5610/15452374739_2ffb73cf05_z.jpg) + +Now we can start putting any sensitive files in ~/Private folder, and they will automatically be encrypted and locked down in ~/.Private folder when we log out. + +All this seems pretty magical. Basically ecryptfs-setup-private tool makes everything easy to set up. If you want to play a little more and set up specific aspects of eCryptFS, go to the [official documentation][6]. + +### Conclusion ### + +To conclude, if you care a great deal about your privacy, the best setup I recommend is to combine eCryptFS-based filesystem-level encryption with full-disk encryption. Always remember though, file encryption alone does not guarantee your privacy. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/encrypt-files-directories-ecryptfs-linux.html + +作者:[Christopher Valerio][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/valerio +[1]:http://www.arg0.net/encfs +[2]:http://ecryptfs.org/ +[3]:http://sourceforge.net/projects/loop-aes/ +[4]:https://code.google.com/p/cryptsetup/wiki/DMCrypt +[5]:https://ciphershed.org/ +[6]:http://ecryptfs.org/documentation.html \ No newline at end of file From a6de4f7d2f09e07dbfe361bfb115d32910091d04 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Mon, 27 Oct 2014 20:36:38 +0800 Subject: [PATCH 025/316] translated --- ...isk health on Linux using smartmontools.md | 147 ----------------- ...isk health on Linux using smartmontools.md | 150 ++++++++++++++++++ 2 files changed, 150 insertions(+), 147 deletions(-) delete mode 100644 sources/tech/20141017 How to check hard disk health on Linux using smartmontools.md create mode 100644 translated/tech/20141017 How to check hard disk health on Linux using smartmontools.md diff --git a/sources/tech/20141017 How to check hard disk health on Linux using smartmontools.md b/sources/tech/20141017 How to check hard disk health on Linux using smartmontools.md deleted file mode 100644 index ef88153c9f..0000000000 --- a/sources/tech/20141017 How to check hard disk health on Linux using smartmontools.md +++ /dev/null @@ -1,147 +0,0 @@ -[translating by KayGuoWhu] -How to check hard disk health on Linux using smartmontools -================================================================================ -If there is something that you never want to happen on your Linux system, that is having hard drives die on you without any warning. [Backups][1] and storage technologies such as [RAID][2] can get you back on your feet in no time, but the cost associated with a sudden loss of a hardware device can take a considerable toll on your budget, especially if you haven't planned ahead of time what to do in such circumstances. - -To avoid running into this kind of setbacks, you can try [smartmontools][3] which is a software package that manages and monitors storage hardware by using Self-Monitoring, Analysis and Reporting Technology (S.M.A.R.T. or just SMART). Most modern ATA/SATA, SCSI/SAS, and solid-state hard disks nowadays come with the SMART system built-in. The purpose of SMART is to monitor the reliability of the hard drive, to predict drive failures, and to carry out different types of drive self-tests. The smartmontools consists of two utility programs called smartctl and smartd. Together, they will provide advanced warnings of disk degradation and failure on Linux platforms. - -This tutorial will provide installation and configuration guide for smartmontools on Linux. - -### Installing Smartmontools ### - -Installation of smartmontools is straightforward as it available in base repositories of most Linux distros. - -#### Debian and derivatives: #### - - # aptitude install smartmontools - -#### Red Hat-based distributions: #### - - # yum install smartmontools - -### Checking Hard Drive Health with Smartctl ### - -First off, list the hard drives connected to your system with the following command: - - # ls -l /dev | grep -E 'sd|hd' - -The output should be similar to: - -![](https://farm4.staticflickr.com/3953/15352881249_96c09f7ccc_o.png) - -where sdx indicate device names assigned to the hard drives installed on your machine. - -To display information about a particular hard disk (e.g., device model, S/N, firmware version, size, ATA version/revision, availability and status of SMART capability), run smartctl with "--info" flag, and specify the hard drive's device name as follows. - -In this example, we will choose /dev/sda. - - # smartctl --info /dev/sda - -![](https://farm4.staticflickr.com/3928/15353873870_00a8dddf89_z.jpg) - -Although the ATA version information may seem to go unnoticed at first, it is one of the most important factors when looking for a replacement part. Each ATA version is backward compatible with the previous versions. For example, older ATA-1 or ATA-2 devices work fine on ATA-6 and ATA-7 interfaces, but unfortunately, that is not true for the other way around. In cases where the device version and interface version don't match, they work together at the capabilities of the lesser of the two. That being said, an ATA-7 hard drive is the safest choice for a replacement part in this case. - -You can examine the health status of a particular hard drive with: - - # smartctl -s on -a /dev/sda - -In this command, "-s on" flag enables SMART on the specified device. You can ommit it if SMART support is already enabled for /dev/sda. - -The SMART information for a disk consists of several sections. Among other things, "READ SMART DATA" section shows the overall health status of the drive. - - === START OF READ SMART DATA SECTION === - SMART overall-health self-assessment rest result: PASSED - -The result of this test can be either PASSED or FAILED. In the latter case, a hardware failure is imminent, so you may want to start backing up your important data from that drive! - -The next thing you will want to look at is the [SMART attribute][4] table, as shown below. - -![](https://farm6.staticflickr.com/5612/15539511935_dd62f6c9ef_z.jpg) - -Basically, SMART attribute table lists values of a number of attributes defined for a particular drive by its manufacturer, as well as failure threshold for these attributes. This table is automatically populated and updated by drive firmware. - -- **ID#**: attribute ID, usually a decimal (or hex) number between 1 and 255. -- **ATTRIBUTE_NAME**: attribute names defined by a drive manufacturer. -- **FLAG**: attribute handling flag (we can ignore it). -- **VALUE**: this is one of the most important information in the table, indicating a "normalized" value of a given attribute, whose range is between 1 and 253. 253 means the best condition, while 1 means the worse condition. Depending on attributes and manufacturers, an initial VALUE can be set to either 100 or 200. -- **WORST**: the lowest VALUE ever recorded. -- **THRESH**: the lowest value that WORST should ever be allowed to fall to, before reporting a given hard drive as FAILED. -- **TYPE**: the type of attribute (either Pre-fail or Old_age). A Pre-fail attribute is considered a critical attribute; one that participates in the overall SMART health assessment (PASSED/FAILED) of the drive. If any Pre-fail attribute fails, then the drive is considered "about to fail." On the other hand, an Old_age attribute is considered (for SMART purposes) a non-critical attribute (e.g., normal wear and tear); one that does not fail the drive per se. -- **UPDATED**: indicates how often an attribute is updated. Offline represents the case when offline tests are being performed on the drive. -- **WHEN_FAILED**: this will be set to "FAILING_NOW" (if VALUE is less than or equal to THRESH), or "In_the_past" (if WORST is less than equal to THRESH), or "-" (if none of the above). In case of "FAILING_NOW", back up your important files ASAP, especially if the attribute is of TYPE Pre-fail. "In_the_past" means that the attribute has failed before, but that it's OK at the time of running the test. "-" indicates that this attribute has never failed. -- **RAW_VALUE**: a manufacturer-defined raw value, from which VALUE is derived. - -At this point you may be thinking, "Yes, smartctl seems like a nice tool. but I would like to avoid the hassle of having to run it manually." Wouldn't it be nice if it could be run at specified intervals, and at the same time inform me of the testsresults? - -Fortunately, the answer is yes. And that's when smartd comes in. - -### Configuring Smartctl and Smartd for Live Monitoring ### - -First, edit smartctl's configuration file (/etc/default/smartmontools) to tell it to start smartd at system startup, and to specify check intervals in seconds (e.g., 7200 = 2 hours). - - start_smartd=yes - smartd_opts="--interval=7200" - -Next, edit smartd's configuration file (/etc/smartd.conf) to add the followign line. - - /dev/sda -m myemail@mydomain.com -M test - - -- **-m **: specifies an email address to send test reports to. This can be a system user such as root, or an email address such as myemail@mydomain.com if the server is configured to relay emails to the outside of your system. -- **-M **: specifies the desired type of delivery for an email report. - - **once**: sends only one warning email for each type of disk problem detected. - - **daily**: sends additional warning reminder emails, once per day, for each type of disk problem detected. - - **diminishing**: sends additional warning reminder emails, after a one-day interval, then a two-day interval, then a four-day interval, and so on for each type of disk problem detected. Each interval is twice as long as the previous interval. - - **test**: sends a single test email immediately upon smartd startup. - - **exec PATH**: runs the executable PATH instead of the default mail command. PATH must point to an executable binary file or script. This allows to specify a desired action (beep the console, shutdown the system, and so on) when a problem is detected. - -Save the changes and restart smartd. - -You should expect this kind of email sent by smartd. - -![](https://farm6.staticflickr.com/5612/15539511945_b344814c74_o.png) - -Luckily for us, no error was detected. Had it not been so, the errors would have appeared below the line "The following warning/error was logged by the smartd daemon." - -Finally, you can schedule tests at your preferred schedule using the "-s" flag and the regular expression in the form of "T/MM/DD/d/HH", where: - -T in the regular expression indicates the kind of test: - -- L: long test -- S: short test -- C: Conveyance test (ATA only) -- O: Offline (ATA only) - -and the remaining characters represent the date and time when the test should be performed: - -- MM is the month of the year. -- DD is the day of the month. -- HH is the hour of day. -- d is the day of the week (ranging from 1=Monday through 7=Sunday). -- MM, DD, and HH are expressed with two decimal digits. - -A dot in any of these places indicates all possible values. An expression inside parentheses such as ‘(A|B|C)’ denotes any one of the three possibilities A, B, or C. An expression inside square brackets such as [1-5] denotes a range (1 through 5 inclusive). - -For example, to perform a long test every business day at 1 pm for all disks, add the following line to /etc/smartd.conf. Make sure to restart smartd. - - DEVICESCAN -s (L/../../[1-5]/13) - -### Conclusion ### - -Whether you want to quickly check the electrical and mechanical performance of a disk, or perform a longer and more thorough test scans the entire disk surface, do not let yourself get so caught up in your day-to-day responsibilities as to forget to regularly check on the health of your disks. You will thank yourself later! - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/check-hard-disk-health-linux-smartmontools.html - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/gabriel -[1]:http://xmodulo.com/how-to-create-secure-incremental-offsite-backup-in-linux.html -[2]:http://xmodulo.com/create-software-raid1-array-mdadm-linux.html -[3]:http://www.smartmontools.org/ -[4]:http://en.wikipedia.org/wiki/S.M.A.R.T. \ No newline at end of file diff --git a/translated/tech/20141017 How to check hard disk health on Linux using smartmontools.md b/translated/tech/20141017 How to check hard disk health on Linux using smartmontools.md new file mode 100644 index 0000000000..9a3a743eda --- /dev/null +++ b/translated/tech/20141017 How to check hard disk health on Linux using smartmontools.md @@ -0,0 +1,150 @@ +在Linux上使用smartmontools查看硬盘的健康状态 +================================================================================ +要说Linux用户最不愿意看到的事情,莫过于在毫无警告的情况下发现硬盘崩溃了。诸如[RAID][2]的[备份][1]和存储技术可以在任何时候帮用户恢复数据,但为预防硬件突然崩溃造成数据丢失所花费的代价却是相当可观的,特别是在用户从来没有提前考虑过在这些情况下的应对措施时。 + +为了避免遇到这种困境,用户可以试用一款叫做[smartmontools][3]的软件包程序,它通过使用自我监控(Self-Monitoring)、分析(Analysis)和报告(Reporting)三种技术(缩写为S.M.A.R.T或SMART)来管理和监控存储硬件。如今大部分的ATA/SATA、SCSI/SAS和固态硬盘都搭载内置的SMART系统。SMART的目的是监控硬盘的可靠性、预测磁盘故障和执行各种类型的磁盘自检。smartmontools由smartctl和smartd两部分工具程序组成,它们一起为Linux平台提供对磁盘退化和故障的高级警告。 + +这篇文章会描述Linux上smartmontools的安装和配置方法。 + +### 安装Smartmontools ### + +由于smartmontools在大部分Linux发行版的基本软件库中都可用,所以安装很方便。 + +#### Debian和其衍生版:#### + + # aptitude install smartmontools + +#### 基于Red Hat的发行版:#### + + # yum install smartmontools + +### 使用Smartctl检测硬盘的健康状况 ### + +首先,使用下面的命令列出和系统相连的硬盘: + + # ls -l /dev | grep -E 'sd|hd' + +输出结果和下图类似: + +![](https://farm4.staticflickr.com/3953/15352881249_96c09f7ccc_o.png) + +其中sdx代表分配给机器上对应硬盘上的设备名。 + +如果想要显示出某个指定硬盘的信息(比如设备模式、S/N、固件版本、大小、ATA版本/修订号、SMART功能的可用性和状态),在运行smartctl命令时添加"--info"选项,并按如下所示指定硬盘的设备名。 + +在本例中,选择/dev/sda。 + + # smartctl --info /dev/sda + +![](https://farm4.staticflickr.com/3928/15353873870_00a8dddf89_z.jpg) + +尽管最开始可能不会注意到ATA(译者注:硬盘接口技术)的版本信息,但当需要替换硬盘时它确实是最重要的因素之一。每一代ATA版本都保持向下兼容。例如,老的ATA-1或ATA-2设备可以正常工作在ATA-6和ATA-7接口上,但反过来就不行了。在设备版本和接口版本两者不匹配的情况下,它们会按照两者中版本较小的规范来运行。也就是说,在这种情况下,需要替换硬盘时,ATA-7硬盘是最安全的选择。 + +可以通过这个命令来检测某个硬盘的健康状况: + + # smartctl -s on -a /dev/sda + +在这个命令中,"-s on"标志开启指定设备上的SMART功能。如果/dev/sda上已开启SMART支持,那就省略它。 + +硬盘的SMART信息包含很多部分。其中,"READ SMART DATA"部分显示出硬盘的整体健康状况。 + + === START OF READ SMART DATA SECTION === + SMART overall-health self-assessment rest result: PASSED + +这个测试的结果是PASSED或FAILED。后者表示即将出现硬件故障,所以需要开始备份这块磁盘上的重要数据! + +下一个需要关注的地方是[SMART属性][4]表,如下所示。 + +![](https://farm6.staticflickr.com/5612/15539511935_dd62f6c9ef_z.jpg) + +基本上,SMART属性表列出了制造商在硬盘中定义好的属性值,以及这些属性相关的故障阈值。这个表由驱动固件自动生成和更新。 + +- **ID**:属性ID,通常是一个1到255之间的十进制或十六进制的数字。 +- **ATTRIBUTE_NAME**:硬盘制造商定义的属性名。 +- **FLAG**:属性操作标志(可以忽略)。 +- **VALUE**:这是表格中最重要的信息之一,代表给定属性的标准化值,在1到253之间。253意味着最好情况,1意味着最坏情况。取决于属性和制造商,初始化VALUE可以被设置成100或200. +- **WORST**:所记录的最小VALUE。 +- **THRESH**:在报告硬盘FAILED状态前,WORST可以允许的最小值。 +- **TYPE**:属性的类型(Pre-fail或Old_age)。Pre-fail类型的属性可被看成一个关键属性,表示参与磁盘的整体SMART健康评估(PASSED/FAILED)。如果任何Pre-fail类型的属性故障,那么可视为磁盘将要发生故障。另一方面,Old_age类型的属性可被看成一个非关键的属性(如正常的磁盘磨损),表示不会使磁盘本身发生故障。 +- **UPDATED**:表示属性的更新频率。Offline代表磁盘上执行离线测试的时间。 +- **WHEN_FAILED**:如果VALUE小于等于THRESH,会被设置成“FAILING_NOW”;如果WORST小于等于THRESH会被设置成“In_the_past”;如果都不是,会被设置成“-”。在“FAILING_NOW”情况下,需要备份重要文件ASAP,特别是属性是Pre-fail类型时。“In_the_past”代表属性已经故障了,但在运行测试的时候没问题。“-”代表这个属性从没故障过。 +- **RAW_VALUE**:制造商定义的原始值,从VALUE派生。 + +这时候你可能会想,“是的,smartctl看起来是个不错的工具,但我更想知道如何避免手动运行的麻烦。”如果能够以指定的间隔运行,同时又能通知我测试结果,那不是更好吗?” + +好消息是,这个功能已经有了。是smartd发挥作用的时候了! + +### 配置Smartctl和Smartd实现实时监控 ### + +首先,编辑smartctl的配置文件(/etc/default/smartmontools)以便在系统启动时启动smartd,并以秒为单位指定间隔时间(如7200 = 2小时)。 + + start_smartd=yes + smartd_opts="--interval=7200" + +下一步,编辑smartd的配置文件(/etc/smartd.conf),添加以下行内容。 + + /dev/sda -m myemail@mydomain.com -M test + +- **-m **:指定发送测试报告到某个电子邮件地址。这里可以是系统用户比如root,或者如果服务器已经配置成发送电子邮件到系统外部,则是类似于myemail@mydomain.com的邮件地址。 +- **-M **:指定发送邮件报告的期望类型。 + - **once**:为检测到的每种磁盘问题只发送一封警告邮件。 + - **daily**:为检测到的每种磁盘问题每隔一天发送一封额外的警告提醒邮件。 + - **diminishing**:为检测到的每种问题发送一封额外的警告提醒邮件,开始是每隔一天,然后每隔两天,每隔四天,以此类推。每个间隔是前一次间隔的2倍。 + - **test**:只要smartd一启动,立即发送一封测试邮件。 + - **exec PATH**:取代默认的邮件命令,运行PATH路径下的可执行文件。PATH必须指向一个可执行的二进制文件或脚本。当检测到一个问题时,可以指定执行一个期望的动作(闪烁控制台、关闭系统等等)。 + +保存改动并重启smartd。 + +smartd发送的邮件应该是这个样子。 + +![](https://farm6.staticflickr.com/5612/15539511945_b344814c74_o.png) + +在上图中,没有检测到错误。如果实际上检测到了错误,那么错误会出现在“下列警告/错误由smartd守护进程写入日志”这一行的下面。 + +最后,可以使用“-s”标志和形如“T/MM/DD/d/HH”的正则表达式按照想要的调度方案执行测试,其中: + +正则表达式中的T代表测试的类型: + +- L:长测试 +- S:短测试 +- C:传输测试(仅限ATA) +- O:离线测试(仅限ATA) + +其它的字符代表测试执行的日期和时间: + +- MM是一年中的月份。 +- DD是一月中的天份。 +- HH是一天中的小时。 +- d是一个星期中的某天(从1=周一到7=周日)。 +- MM、DD和HH使用两位十进制数字表示。 + +在上述表达中的小圆点表示所有可能的值。形如'(A|B|C)'在圆括号里的表达式表示三个可能值A、B和C中的任意一个。形如[1-5]在方括号中的表达式表示1到5的范围(包含5). + +例如,想要在每个工作日的下午一点为所有的磁盘执行一次长测试,在/etc/smartd.conf中添加如下行内容。确保编辑完重启smartd。 + + DEVICESCAN -s (L/../../[1-5]/13) + +### 总结 ### + +无论你想要快速查看磁盘的电子和机械性能,还是对整个磁盘执行一次长时间扫描测试,都不要让自己陷入日复一日地执行命令中而忘记了定期检测磁盘的健康状态。多关注磁盘的健康状况,你会受益的! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/check-hard-disk-health-linux-smartmontools.html + +作者:[Gabriel Cánepa][a] +译者:[KayGuoWhu](https://github.com/KayGuoWhu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:http://xmodulo.com/how-to-create-secure-incremental-offsite-backup-in-linux.html +[2]:http://xmodulo.com/create-software-raid1-array-mdadm-linux.html +[3]:http://www.smartmontools.org/ +[4]:http://en.wikipedia.org/wiki/S.M.A.R.T. + + + + + From fdce025f503c1c0228fe9562b5fa6de9eeabb297 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Mon, 27 Oct 2014 22:14:52 +0800 Subject: [PATCH 026/316] translating --- ...0140905 Linux TCP or IP networking--net-tools vs. iproute2.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md b/sources/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md index ccda81ca08..e7fdc11d7f 100644 --- a/sources/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md +++ b/sources/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md @@ -1,3 +1,4 @@ +[translating by KayGuoWhu] Linux TCP/IP networking: net-tools vs. iproute2 ================================================================================ Many sysadmins still manage and troubleshoot various network configurations by using a combination of ifconfig, route, arp and netstat command-line tools, collectively known as net-tools. Originally rooted in the BSD TCP/IP toolkit, the net-tools was developed to configure network functionality of older Linux kernels. Its development in the Linux community so far has ceased since 2001. Some Linux distros such as Arch Linux and CentOS/RHEL 7 have already deprecated net-tools in favor of iproute2. From 989d3a6cdc358a80aaeec4cd76c5169ee01bb646 Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Mon, 27 Oct 2014 22:38:48 +0800 Subject: [PATCH 027/316] translated --- ...To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md | 51 ------------------- ...To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md | 51 +++++++++++++++++++ 2 files changed, 51 insertions(+), 51 deletions(-) delete mode 100644 sources/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md create mode 100644 translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md diff --git a/sources/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md b/sources/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md deleted file mode 100644 index ac64df2371..0000000000 --- a/sources/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md +++ /dev/null @@ -1,51 +0,0 @@ -How To Upgrade Ubuntu 14.04 To Ubuntu 14.10 -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/04/Ubuntu_Unicorn_Utopia.jpeg) - -Ubuntu 14.10 has been released yesterday. Wondering **how to upgrade to Ubuntu 14.10 from Ubuntu 14.04**? Don’t worry, it’s extremely easy to upgrade to Ubuntu 14.10. In fact, it is just a matter of few clicks and a good internet connection. - -### Do you need to switch to Ubuntu 14.10 from Ubuntu 14.04? ### - -Before you go on upgrading to Ubuntu 14.10, make sure that you really want to ditch Ubuntu 14.04 for 14.10. It is important for the reason that you won’t be able to downgrade Ubuntu 14.10 back to Ubuntu 14.04. You’ll have to go for a fresh install instead. - -Ubuntu 14.04 is long-term support (LTS) release. Which means more stability and support for greater period. If you upgrade to 14.10, you’ll be forced to further upgrade to Ubuntu 15.04 as the support for 14.10 will last for 9 months only while 14.04 will go on for more than 3 years. - -Moreover, there are not many new features in Ubuntu 14.10 that could compel many users to switch to it. But yes, you’ll get the cutting edge OS for sure. So, at the end of the day it is your call whether to upgrade to Ubuntu 14.10 or not. - -### Upgrade to Ubuntu 14.10 from Ubuntu 14.04 ### - -To upgrade Ubuntu 14.04 to Ubuntu 14.10, follow the steps below: - -#### Step 1: #### - -Open **Software & Updates**. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Software_Update_Ubuntu.jpeg) - -Go to **Updates** tab. In here make sure that **Notify me of a new Ubuntu version** is set to **For any new version**. By default Ubuntu will notify you only when there is another LTS release available. You must change it to upgrade to any new interim release. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Upgrade_Ubuntu.png) - -#### Step 2: #### - -Now run **Software Updater**. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/04/Ubuntu_Updater.jpg) - -After the updates, it should prompt for the availability of a newer version. Click on upgrade and follow the next few obvious steps. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Upgrade_to_Ubuntu_1410.jpeg) - -I hope this quick tutorial helped you to **upgrade Ubuntu 14.04 to Ubuntu 14.10**. Though this tutorial was written for Ubuntu, you can use the exact same steps to upgrade to Xubuntu 14.10, Kubuntu 14.10 or Lubuntu 14.10. Stay tuned for more Ubuntu 14.10 related articles. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/upgrade-ubuntu-14-04-to-14-10/ - -作者:[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/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md b/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md new file mode 100644 index 0000000000..142f1d9538 --- /dev/null +++ b/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md @@ -0,0 +1,51 @@ +如何升级Ubuntu 14.04 到Ubuntu 14.10 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/04/Ubuntu_Unicorn_Utopia.jpeg) + +Ubuntu 14.10已于昨日发布。想知道**如何从Ubuntu 14.04升级到Ubuntu 14.10**么?别担心,这很容易升级到Ubuntu 14.10。事实上,它只是点击几下和有良好的互联网连接的事情而已。 + +### 你需要从Ubuntu 14.04 切换到Ubuntu 14.10么? ### + +在你升级到Ubuntu 14.10之前,请确保你真的想为14.10抛弃Ubuntu14.04。一个很重要的原因是你不能从Ubuntu 14.10 降级到14.04。 你需要完全重新安装。 + +Ubuntu 14.04是长期支持(LTS)版本。这意味着更长的支持周期和更稳定和支持。如果升级到14.10,你将被迫在9个月后从Ubuntu 14.10 升级到15.04,而14.04将会持续3年以上。 + +此外,目前Ubuntu的14.10没有很多使用户迫切切换到14.10 的新功能。但是,你肯定会得到最前沿的操作系统。所以,在这之前是否升级到Ubuntu 14.10是你自己的决定。 + +### 从Ubuntu 14.04 升级到 Ubuntu 14.10 ### + +要从Ubuntu 14.04 升级到 Ubuntu 14.10,遵循下面的步骤: + +#### 步骤 1: #### + +打开 **软件和更新**. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Software_Update_Ubuntu.jpeg) + +进入**更新**选项卡。这里要确保**Ubuntu新版本通知我** 设置成**对于任何新版本**。默认Ubuntu只会在另一个LTS发布时通知你。你必须要把它改成在任何中间版本都升级。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Upgrade_Ubuntu.png) + +#### 步骤 2: #### + +现在运行 **软件升级**。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/04/Ubuntu_Updater.jpg) + +升级完成后,他应该会提示一个可用的新版本。点击升级,接着按照提示的步骤来。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Upgrade_to_Ubuntu_1410.jpeg) + +我希望本篇可以帮助你**从Ubuntu 14.04 升级到 Ubuntu 14.10**。虽然本教程是为Ubuntu写的,但是你可以用同样的步骤升级到Xubuntu 14.10和Kubuntu 14.10或者Lubuntu。敬请期待下一篇Ubuntu 14.10相关文章。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/upgrade-ubuntu-14-04-to-14-10/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/Abhishek/ \ No newline at end of file From f0dc981eb47735638aa9022495d1670980ac1f2a Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Mon, 27 Oct 2014 22:39:51 +0800 Subject: [PATCH 028/316] translated --- .../20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md b/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md index 142f1d9538..1fd579521d 100644 --- a/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md +++ b/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md @@ -32,7 +32,7 @@ Ubuntu 14.04是长期支持(LTS)版本。这意味着更长的支持周期 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/04/Ubuntu_Updater.jpg) -升级完成后,他应该会提示一个可用的新版本。点击升级,接着按照提示的步骤来。 +升级完成后,它应该会提示一个可用的新版本。点击升级,接着按照提示的步骤来。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Upgrade_to_Ubuntu_1410.jpeg) From 5bd044dde24d760c60eb759f54d8a418951bcbd9 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Oct 2014 22:58:18 +0800 Subject: [PATCH 029/316] PUB:20140910 How to set up Nagios Remote Plugin Executor (NRPE) in Linux @felixonmars --- ...w to set up Nagios Remote Plugin Executor (NRPE) in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {translated/tech => published}/20140910 How to set up Nagios Remote Plugin Executor (NRPE) in Linux.md (99%) diff --git a/translated/tech/20140910 How to set up Nagios Remote Plugin Executor (NRPE) in Linux.md b/published/20140910 How to set up Nagios Remote Plugin Executor (NRPE) in Linux.md similarity index 99% rename from translated/tech/20140910 How to set up Nagios Remote Plugin Executor (NRPE) in Linux.md rename to published/20140910 How to set up Nagios Remote Plugin Executor (NRPE) in Linux.md index af1d0267c1..9dc66f147d 100644 --- a/translated/tech/20140910 How to set up Nagios Remote Plugin Executor (NRPE) in Linux.md +++ b/published/20140910 How to set up Nagios Remote Plugin Executor (NRPE) in Linux.md @@ -231,6 +231,6 @@ via: http://xmodulo.com/2014/03/nagios-remote-plugin-executor-nrpe-linux.html [a]:http://xmodulo.com/author/sarmed [1]:http://xmodulo.com/2012/08/how-to-measure-average-cpu-utilization.html -[2]:http://xmodulo.com/2013/12/install-configure-nagios-linux.html +[2]:http://linux.cn/article-2436-1.html [3]:http://xmodulo.com/2013/01/how-to-set-up-rpmforge-repoforge-repository-on-centos.html [4]:http://xmodulo.com/2013/01/how-to-set-up-rpmforge-repoforge-repository-on-centos.html From 17a179f4cbf01bf48a37fbabf01613f44383ac1b Mon Sep 17 00:00:00 2001 From: wangjiezhe Date: Mon, 27 Oct 2014 23:54:53 +0800 Subject: [PATCH 030/316] [translated]20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md --- ...racter encoding of a text file on Linux.md | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/sources/tech/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md b/sources/tech/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md index 5ce0b7be75..a2bec2833b 100644 --- a/sources/tech/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md +++ b/sources/tech/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md @@ -1,46 +1,44 @@ -wangjiezhe translating... - -Linux FAQs with Answers--How to change character encoding of a text file on Linux +Linux 有问必答 -- 在 Linux 如何更改文本文件的字符编码 ================================================================================ -> **Question**: I have an "iso-8859-1"-encoded subtitle file which shows broken characters on my Linux system, and I would like to change its text encoding to "utf-8" character set. In Linux, what is a good tool to convert character encoding in a text file? +> **问题**:在我的 Linux 系统中有一个编码为 iso-8859-1 的字幕文件,其中部分字符无法正常显示,我想把文本改为 utf8 编码。在 Linux 张, 有没有一个好的工具来转换文本文件的字符编码? -As you already know, computers can only handle binary numbers at the lowest level - not characters. When a text file is saved, each character in that file is mapped to bits, and it is those "bits" that are actually stored on disk. When an application later opens that text file, each of those binary numbers are read and mapped back to the original characters that are understood by us human. This "save and open" process is best performed when all applications that need access to a text file "understand" its encoding, meaning the way binary numbers are mapped to characters, and thus can ensure a "round trip" of understandable data. +正如我们所知道的那样,电脑只能够处理低级的二进制数字,并不能直接处理字符。当一个文本文件被存储时,文件中的每一个字符都被映射成二进制数字,实际存储在硬盘中的正是这些“二进制数字”。之后当程序打开文本文件时,所有二进制数字都被读入并映射回原始的可读字符。只有当所有需要访问这个文件的程序都能够“理解”它的编码,即二进制数字到字符的映射时,这个“保存和打开”的过程才能很好地完成,这也确保了可理解数据的往返过程。 -If different applications do not use the same encoding while dealing with a text file, non-readable characters will be shown wherever special characters are found in the original file. By special characters we mean those that are not part of the English alphabet, such as accented characters (e.g., ñ, á, ü). +如果不同的程序使用不同的编码来处理同一个文件,源文件中的特殊字符就无法正常显示。这里的特殊字符指的是非英文字母的字符,例如带重音的字符(比如 ñ,á,ü)。 -The questions then become: 1) how can I know which character encoding a certain text file is using?, and 2) how can I convert it to some other encoding of my choosing? +然后问题就来了: 1)我们如何确定一个确定的文本文件使用的是什么字符编码? 2)我们如何把文件转换成已选择的字符编码? -### Step One ### +### 步骤一 ### -In order to find out the character encoding of a file, we will use a commad-line tool called file. Since the file command is a standard UNIX program, we can expect to find it in all modern Linux distros. +为了确定文件的字符编码,我们使用一个名为 “file” 的命令行工具。因为 file 命令是一个标准的 UNIX 程序,所以我们可以在所有现代的 Linux 发行版中找到它。 -Run the following command: +运行下面的命令: $ file --mime-encoding filename ![](https://farm6.staticflickr.com/5602/15595534261_1a7b4d16a2.jpg) -### Step Two ### +### 步骤二 ### -The next step is to check what kinds of text encodings are supported on your Linux system. For this, we will use a tool called iconv with the "-l" flag (lowercase L), which will list all the currently supported encodings. +下一步是查看你的 Linux 系统所支持的文件编码种类。为此,我们使用名为 iconv 短工具及 “-l” 选项(L 的小写)来列出所有当前支持的编码。 $ iconv -l -The iconv utility is part of the the GNU libc libraries, so it is available in all Linux distributions out-of-the-box. +iconv 工具是 GNU libc 库组成部分,因此它在所有 Linux 发行版中都是开箱即用的。 -### Step Three ### +### 步骤三 ### -Once we have selected a target encoding among those supported on our Linux system, let's run the following command to perform the conversion: +在我们在我们的 Linux 系统所支持的编码里面选定了目标编码之后,运行下面的命令来完成编码转换: $ iconv -f old_encoding -t new_encoding filename -For example, to convert iso-8859-1 to utf-8: +例如,把 iso-8859-1 编码转换为 utf-8 编码: $ iconv -f iso-8859-1 -t utf-8 input.txt ![](https://farm4.staticflickr.com/3943/14978042143_a516e0b10b_o.png) -Knowing how to use these tools together as we have demonstrated, you can for example fix a broken subtitle file: +了解了我们演示的如何使用这些工具之后,你可以像下面这样修复一个受损的字幕文件: ![](https://farm6.staticflickr.com/5612/15412197967_0dfe5078f9_z.jpg) From 36deab6a60862d00c7b6baeeda8da213d3a10d9b Mon Sep 17 00:00:00 2001 From: wangjiezhe Date: Mon, 27 Oct 2014 23:57:06 +0800 Subject: [PATCH 031/316] moved to translated --- ...s--How to change character encoding of a text file on Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md (100%) diff --git a/sources/tech/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md b/translated/tech/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md similarity index 100% rename from sources/tech/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md rename to translated/tech/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md From 34ae3be482fe7d82df8d86636e718e9f557a9055 Mon Sep 17 00:00:00 2001 From: wangjiezhe Date: Tue, 28 Oct 2014 00:06:13 +0800 Subject: [PATCH 032/316] [translating]20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md --- ...e with BitTorrent fast and safely from the command line.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md b/sources/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md index e42f1c363b..e71c1a66cf 100644 --- a/sources/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md +++ b/sources/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md @@ -1,3 +1,5 @@ +wangjiezhe translating... + How to download an ISO image with BitTorrent fast and safely from the command line ================================================================================ If you are one of those guys who have urge to try out every new (or even beta) release of Linux distribution to satisfy your curiosity and stay up-to-date, you will need to deal with the hassle of downloading big ISO images every now and then. ISO providers typically put up .torrent file of their ISO images to ease up on the bandwidth consumption of their servers. The benefit of peer-to-peer download is obvious for users as well (in terms of speed), especially when a new release of a popular Linux distribution is up for grab, and everyone is downloading and seeding the release at the same time. @@ -122,4 +124,4 @@ via: http://xmodulo.com/download-iso-image-bittorrent-command-line.html [a]:http://xmodulo.com/author/nanni [1]:https://www.transmissionbt.com/ [2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[3]:http://xmodulo.com/verify-authenticity-integrity-downloaded-file.html \ No newline at end of file +[3]:http://xmodulo.com/verify-authenticity-integrity-downloaded-file.html From e1cdc41298d581671e0ca2271951d486c92ffc8a Mon Sep 17 00:00:00 2001 From: joeren Date: Tue, 28 Oct 2014 08:22:45 +0800 Subject: [PATCH 033/316] Update 20141027 How to encrypt files and directories with eCryptFS on Linux.md --- ... to encrypt files and directories with eCryptFS on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md b/sources/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md index 4619bf9cfe..dee739ed1f 100644 --- a/sources/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md +++ b/sources/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How to encrypt files and directories with eCryptFS on Linux ================================================================================ You do not have to be a criminal or work for the CIA to use encryption. You simply don't want anybody to spy on your financial data, family pictures, unpublished manuscripts, or secret notes where you have jotted down startup ideas which you think can make you super rich. @@ -104,4 +105,4 @@ via: http://xmodulo.com/encrypt-files-directories-ecryptfs-linux.html [3]:http://sourceforge.net/projects/loop-aes/ [4]:https://code.google.com/p/cryptsetup/wiki/DMCrypt [5]:https://ciphershed.org/ -[6]:http://ecryptfs.org/documentation.html \ No newline at end of file +[6]:http://ecryptfs.org/documentation.html From 4df0f6ac84798278f506fe13e94c611a6f208acc Mon Sep 17 00:00:00 2001 From: GOLinux Date: Tue, 28 Oct 2014 10:20:12 +0800 Subject: [PATCH 034/316] [Translated] 20141027 How to encrypt files and directories with eCryptFS on Linux.md --- ... and directories with eCryptFS on Linux.md | 108 ------------------ ... and directories with eCryptFS on Linux.md | 107 +++++++++++++++++ 2 files changed, 107 insertions(+), 108 deletions(-) delete mode 100644 sources/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md create mode 100644 translated/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md diff --git a/sources/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md b/sources/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md deleted file mode 100644 index dee739ed1f..0000000000 --- a/sources/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md +++ /dev/null @@ -1,108 +0,0 @@ -Translating by GOLinux! -How to encrypt files and directories with eCryptFS on Linux -================================================================================ -You do not have to be a criminal or work for the CIA to use encryption. You simply don't want anybody to spy on your financial data, family pictures, unpublished manuscripts, or secret notes where you have jotted down startup ideas which you think can make you super rich. - -I have heard people telling me "I'm not important enough to be spied" or "I don't hide anything to care about." Well, my opinion is that even if I don't have anything to hide, or I can publish a picture of my kids with my dog, I have the right to not do it and want to protect my privacy. - -### Types of Encryption ### - -We have largely two different ways to encrypt files and directories. One method is filesystem-level encryption, where only certain files or directories (e.g., /home/alice) are encrypted selectively. To me, this is a perfect way to start. You don't need to re-install everything to enable or test encryption. Filesystem-level encryption has some disadvantages, though. For example, many modern applications cache (part of) files in unencrypted portions of your hard drive, such as swap partition, /tmp and /var folders, which can result in privacy leaks. - -The other way is so-called full-disk encryption, which means that the entire disk is encrypted (possibly except for a master boot record). Full disk encryption works at the physical disk level; every bit written to the disk is encrypted, and anything read from the disk is automatically decrypted on the fly. This will prevent any potential unauthorized access to unencrypted data, and ensure that everything in the entire filesystem is encrypted, including swap partition or any temporarily cached data. - -### Available Encryption Tools ### - -There are several options to implement encryption in Linux. In this tutorial, I am going to describe one option: **eCryptFS** a user-space cryptographic filesystem tool. For your reference, here is a roundup of available Linux encryption tools. - -#### Filesystem-level encryption #### - -- [EncFS][1]: one of the easiest ways to try encryption. EncFS works as a FUSE-based pseudo filesystem, so you just create an encrypted folder and mount it to a folder to work with. -- [eCryptFS][2]: a POSIX compliant cryptographic filesystem, eCryptFS works in the same way as EncFS, so you have to mount it. - -#### Filesystem-level encryption #### - -- [Loop-AES][3]: the oldest disk encryption method. It is really fast and works on old system (e.g., kernel 2.0 branch). -- [DMCrypt][4]: the most common disk encryption scheme supported by the modern Linux kernel. -- [CipherShed][5]: an open-source fork of the discontinued TrueCrypt disk encryption program. - -### Basics of eCryptFS ### - -eCryptFS is a FUSE-based user-space cryptographic filesystem, which has been available in the Linux kernel since 2.6.19 (as ecryptfs module). An eCryptFS-encrypted pseudo filesystem is mounted on top of your current filesystem. It works perfectly on EXT filesystem family and others like JFS, XFS, ReiserFS, Btrfs, even NFS/CIFS shares. Ubuntu uses eCryptFS as its default method to encrypt home directory, and so does ChromeOS. Underneath it, eCryptFS uses AES algorithm by default, but it supports others algorithms, such as blowfish, des3, cast5, cast6. You will be able to choose among them in case you create a manual setup of eCryptFS. - -Like I said, Ubuntu lets us choose whether to encrypt our /home directory during installation. Well, this is the easiest way to use eCryptFS. - -![](https://farm6.staticflickr.com/5600/15639040345_8d74cd54a8_z.jpg) - -Ubuntu provides a set of user-friendly tools that make our life easier with eCryptFS, but enabling eCryptFS during Ubuntu installation only creates a specific pre-configured setup. So in case the default setup doesn't fit your needs, you will need to perform a manual setup. In this tutorial, I will describe **how to set up eCryptFS manually on major Linux distros**. - -### Installation of eCryptFS ### - -Debian, Ubuntu or its derivatives: - - $ sudo apt-get install ecryptfs-utils - -Note that if you chose to encrypt your home directory during Ubuntu installation, eCryptFS should be already installed. - -CentOS, RHEL or Fedora: - - # yum install ecryptfs-utils - -Arch Linux: - - $ sudo pacman -S ecryptfs-utils - -After installing the package, it is a good practice to load the eCryptFS kernel module just to be sure: - - $ sudo modprobe ecryptfs - -### Configure eCryptFS ### - -Now let's start encrypting some directory by running eCryptFS configuration tool: - - $ ecryptfs-setup-private - -![](https://farm6.staticflickr.com/5608/15453440890_3b4be6d5a7_z.jpg) - -It will ask for a login passphrase and a mount passphrase. The login passphrase is the same as your normal login password. The mount passphrase is used to derive a file encryption master key. Leave it blank to generate one as it's safer. Log out and log back in. - -You will notice that eCryptFS created two directories by default: Private and .Private in your home directory. The ~/.Private directory contains encrypted data, while you can access corresponding decrypted data in the ~/Private directory. At the time you log in, the ~/.Private directory is automatically decrypted and mapped to the ~/Private directory, so you can access it. When you log out, the ~/Private directory is automatically unmounted and the content in the ~/Private directory is encrypted back into the ~/.Private directory. - -The way eCryptFS knows that you own the ~/.Private directory, and automatically decrypts it into the ~/Private directory without needing us to type a password is through an eCryptFS PAM module which does the trick for us. - -In case you don't want to have the ~/Private directory automatically mounted upon login, just add the "--noautomount" option when running ecryptfs-setup-private tool. Similarly, if you do not want the ~/Private directory to be automatically unmounted after logout, specify "--noautoumount" option. But then, you will have to mount or unmount ~/Private directory manually by yourself: - - $ ecryptfs-mount-private ~/.Private ~/Private - $ ecryptfs-umount-private ~/Private - -You can verify that .Private folder is mounted by running: - - $ mount - -![](https://farm6.staticflickr.com/5610/15452374739_2ffb73cf05_z.jpg) - -Now we can start putting any sensitive files in ~/Private folder, and they will automatically be encrypted and locked down in ~/.Private folder when we log out. - -All this seems pretty magical. Basically ecryptfs-setup-private tool makes everything easy to set up. If you want to play a little more and set up specific aspects of eCryptFS, go to the [official documentation][6]. - -### Conclusion ### - -To conclude, if you care a great deal about your privacy, the best setup I recommend is to combine eCryptFS-based filesystem-level encryption with full-disk encryption. Always remember though, file encryption alone does not guarantee your privacy. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/encrypt-files-directories-ecryptfs-linux.html - -作者:[Christopher Valerio][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/valerio -[1]:http://www.arg0.net/encfs -[2]:http://ecryptfs.org/ -[3]:http://sourceforge.net/projects/loop-aes/ -[4]:https://code.google.com/p/cryptsetup/wiki/DMCrypt -[5]:https://ciphershed.org/ -[6]:http://ecryptfs.org/documentation.html diff --git a/translated/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md b/translated/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md new file mode 100644 index 0000000000..655c8a27b1 --- /dev/null +++ b/translated/tech/20141027 How to encrypt files and directories with eCryptFS on Linux.md @@ -0,0 +1,107 @@ +在Linux上使用eCryptFS加密文件和目录 +================================================================================ +作为罪犯,你需要为自己的身份保密;而作为中情局成员,你同样也需要为自己的身份保密。但是,你却不是他们其中的任何一员,你只是不想其他人查探到你的金融数据、家庭照片、尚未出版的手稿,或者记录着你能发家致富的最初想法的私密笔记。 + +我时常听到有人告诉我“我只是个微不足道的人,没人会查探我”或者“我没有什么东西要隐藏的。”好吧,告诉你我的想法,即便我没有什么要隐藏的,或者我也可以公开我带着狗的孩子的照片,那我也有权利不这么去做,也有权利来保护我的隐私。 + +### 加密类型 ### + +我们主要有两种加密文件和目录的方法。一种是文件系统级别的加密,在这种加密中,你可以选择性地加密某些文件或者目录(如,/home/alice)。对我而言,这是个十分不错的方法,你不需要为了启用或者测试加密而把所有一切重新安装一遍。然而,文件系统级别的加密也有一些缺点。例如,许多现代应用程序会缓存(部分)文件你硬盘中未加密的部分中,比如交换分区、/tmp和/var文件夹,而这会导致隐私泄漏。 + +另外一种方式,就是所谓的全盘加密,这意味着整个磁盘都会被加密(可能除了主引导记录外)。全盘加密工作在物理磁盘级别,写入到磁盘的每个比特都会被加密,而从磁盘中读取的任何东西都会在运行中解密。这会阻止任何潜在的对未加密数据的未经授权的访问,并且确保整个文件系统中的所有东西都被加密,包括交换分区或任何临时缓存数据。 + +### 可用的加密工具 ### + +在Linux中要实施加密,有几个可供选择的工具。在本教程中,我打算介绍其中一个:**eCryptFS**,一个用户空间文件系统加密工具。下面提供了一个Linux上可用的加密工具摘要供您参考。 + +#### 文件系统级别加密 #### + +- [EncFS][1]:尝试加密的最简单方式之一。EncFS工作在基于FUSE的伪文件系统上,所以你只需要创建一个加密文件夹并将它挂载到某个文件夹就可以工作了。 +- [eCryptFS][2]:一个POSIX兼容的加密文件系统,eCryptFS工作方式和EncFS相同,所以你必须挂载它。 + +#### 磁盘级别加密 #### + +- [Loop-AES][3]:最古老的磁盘加密方法。它真的很快,并且适用于旧系统(如,2.0内核分支)。 +- [DMCrypt][4]:最常见的磁盘加密方案,支持现代Linux内核。 +- [CipherShed][5]:已停止的TrueCrypt磁盘加密程序的一个开源分支。 + +### eCryptFS基础 ### + +eCrypFS是一个基于FUSE的用户空间加密文件系统,在Linux内核2.6.19及更高版本中可用(作为encryptfs模块)。eCryptFS加密的伪文件系统挂载到当前文件系统的顶部。它可以很好地工作在EXT文件系统家族和其它文件系统如JFS、XFS、ReiserFS、Btrfs,甚至是NFS/CIFS共享文件系统上。Ubuntu使用eCryptFS作为加密其家目录的默认方法,ChromeOS也是。在eCryptFS底层,默认使用的是AES算法,但是它也支持其它算法,如blowfish、des3、cast5、cast6。如果你是通过手工创建eCryptFS设置,你可以选择其中一种算法。 + +就像我所的,Ubuntu让我们在安装过程中选择是否加密/home目录。好吧,这是使用eCryptFS的最简单的一种方法。 + +![](https://farm6.staticflickr.com/5600/15639040345_8d74cd54a8_z.jpg) + +Ubuntu提供了一个用户友好的工具集,通过eCryptFS可以让我们的生活更轻松,但是在Ubuntu安装过程中启用eCryptFS只创建了一个指定的预配置的设置。所以,如果默认的设置不适合你的需求,你需要进行手工设置。在本教程中,我将介绍**如何在主流Linux发行版上手工设置eCryptFS**。 + +### eCryptFS的安装 ### + +Debian,Ubuntu或其衍生版: + + $ sudo apt-get install ecryptfs-utils + +注意,如果你在Ubuntu安装过程中选择加密家目录,eCryptFS应该已经安装了。 + +CentOS, RHEL or Fedora: + + # yum install ecryptfs-utils + +Arch Linux: + + $ sudo pacman -S ecryptfs-utils + +在安装完包后,加载eCryptFS内核模块当然会是一个很好的实践: + + $ sudo modprobe ecryptfs + +### 配置eCryptFS ### + +现在,让我们开始加密一些目录,运行eCryptFS配置工具: + + $ ecryptfs-setup-private + +![](https://farm6.staticflickr.com/5608/15453440890_3b4be6d5a7_z.jpg) + +它会要求你输入登录密码和挂载密码。登录密码和你常规登录的密码一样,而挂载密码用于派生一个文件加密主密钥。留空来生成一个,这样会更安全。登出然后重新登录。 + +你会注意到,eCryptFS默认在你的家目录中创建了两个目录:Private和.Private。~/.Private目录包含有加密的数据,而你可以在~/Private目录中访问到相应的解密后的数据。在你登录时,~/.Private目录会自动解密并映射到~/Private目录,因此你可以访问它。当你登出时,~/Private目录会自动卸载,而~/Private目录中的内容会加密回到~/.Private目录。 + +eCryptFS怎么会知道你拥有~/.Private目录,并自动将其解密到~/Private目录而不需要我们输入密码呢?这就是eCryptFS的PAM模块捣的鬼,它为我们提供了这项便利服务。 + +如果你不想要~/Private目录在登录时自动挂载,只需要在运行ecryptfs-setup-private工具时添加“--noautomount”选项。同样,如果你不想要~/Private目录在登出后自动卸载,也可以自动“--noautoumount”选项。但是,那样后,你需要自己手工挂载或卸载~/Private目录: + + $ ecryptfs-mount-private ~/.Private ~/Private + $ ecryptfs-umount-private ~/Private + +你可以来验证一下.Private文件夹是否被挂载,运行: + + $ mount + +![](https://farm6.staticflickr.com/5610/15452374739_2ffb73cf05_z.jpg) + +现在,我们可以开始把任何敏感文件放进~/Private文件夹里头了,它们会在我们登出时自动被加密并锁在~/.Private文件内。 + +所有这一切看起来是那么得神奇。这主要是ecryptfs-setup-private工具让一切设置变得简单。如果你想要深究一点,对eCryptFS指定的方面进行设置,那么请转到[官方文档][6]。 + +### 结尾 ### + +综上所述,如果你十分关注你的隐私,最好是将基于eCryptFS文件系统级别的加密和全盘加密相结合。切记,只进行文件加密并不能保证你的隐私不受侵犯。 + +------------------------------------------------------------------------------ + +via: http://xmodulo.com/encrypt-files-directories-ecryptfs-linux.html + +作者:[Christopher Valerio][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/valerio +[1]:http://www.arg0.net/encfs +[2]:http://ecryptfs.org/ +[3]:http://sourceforge.net/projects/loop-aes/ +[4]:https://code.google.com/p/cryptsetup/wiki/DMCrypt +[5]:https://ciphershed.org/ +[6]:http://ecryptfs.org/documentation.html From b303e861923e082ceb0e700116631d38a73e3640 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 28 Oct 2014 15:24:00 +0800 Subject: [PATCH 035/316] Translating by ZTinoZ --- ...17 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md b/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md index a2434e23bb..1ab487b234 100644 --- a/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md +++ b/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ Linus Torvalds' Best Quotes from LinuxCon Europe 2014 ================================================================================ ![](http://www.linux.com/images/stories/41373/Linus-Dirk-2014.jpg) @@ -57,4 +58,4 @@ via: http://www.linux.com/news/featured-blogs/200-libby-clark/791788-linus-torva 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.linux.com/community/forums/person/41373/catid/200-libby-clark -[1]:http://events.linuxfoundation.org/events/linuxcon-europe \ No newline at end of file +[1]:http://events.linuxfoundation.org/events/linuxcon-europe From f03b9c01ecd52a648bb95c4af220955e16a57c81 Mon Sep 17 00:00:00 2001 From: johnhoow Date: Tue, 28 Oct 2014 21:19:12 +0800 Subject: [PATCH 036/316] johnhoow translating --- ...ow To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md b/sources/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md index 78777b46a0..dee546fd1e 100644 --- a/sources/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md +++ b/sources/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md @@ -1,3 +1,4 @@ +johnhoow translating... How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic ================================================================================ Hello all! Greetings! Today, we will discuss about how to upgrade from Ubuntu 14.04 to 14.10 final beta. As you may know, Ubuntu 14.10 final beta has already been released. According to the [Ubuntu release schedule][1], the final stable version will be available today in a couple of hours. @@ -106,4 +107,4 @@ via: http://www.unixmen.com/upgrade-ubuntu-14-04-trusty-ubuntu-14-10-utopic/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[1]:https://wiki.ubuntu.com/UtopicUnicorn/ReleaseSchedule \ No newline at end of file +[1]:https://wiki.ubuntu.com/UtopicUnicorn/ReleaseSchedule From 42850cb72ce1588b7b6d2cd4d8640448786cc23c Mon Sep 17 00:00:00 2001 From: disylee Date: Tue, 28 Oct 2014 22:23:43 +0800 Subject: [PATCH 037/316] Update 20141023 How to turn your CentOS box into a BGP router using Quagga.md --- ...w to turn your CentOS box into a BGP router using Quagga.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md b/sources/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md index 63bda4a215..366d5a2861 100644 --- a/sources/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md +++ b/sources/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md @@ -1,3 +1,4 @@ +disylee占一个 How to turn your CentOS box into a BGP router using Quagga ================================================================================ In a [previous tutorial][1](注:此文原文做过,文件名:“20140928 How to turn your CentOS box into an OSPF router using Quagga.md”,如果前面翻译发布了,可以修改此链接), I described how we can easily turn a Linux box into a fully-fledged OPSF router using Quagga, an open source routing software suite. In this tutorial, I will focus on **converting a Linux box into a BGP router, again using Quagga**, and demonstrate how to set up BGP peering with other BGP routers. @@ -309,4 +310,4 @@ via: http://xmodulo.com/centos-bgp-router-quagga.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/sarmed -[1]:http://xmodulo.com/turn-centos-box-into-ospf-router-quagga.html \ No newline at end of file +[1]:http://xmodulo.com/turn-centos-box-into-ospf-router-quagga.html From a402b006ec9c1dccec89e5153e85e208af54adf5 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 29 Oct 2014 12:58:39 +0800 Subject: [PATCH 038/316] Translating by ZTinoZ --- ...rvalds' Best Quotes from LinuxCon Europe 2014.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md b/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md index 1ab487b234..15347f50bd 100644 --- a/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md +++ b/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md @@ -1,19 +1,18 @@ -Translating by ZTinoZ -Linus Torvalds' Best Quotes from LinuxCon Europe 2014 +2014年欧洲LinuxCon大会Linus Torvalds的最佳语录 ================================================================================ ![](http://www.linux.com/images/stories/41373/Linus-Dirk-2014.jpg) -Linux creator Linus Torvalds answered questions from Dirk Hohndel, Intel's chief Linux and open source technologist, on Wednesday, Oct. 15, 2014 at LinuxCon and CloudOpen Europe. +在今年的10月15日星期三,Linux的创造者Linus Torvalds出席了欧洲LinuxCon和CloudOpen大会并回答了英特尔的Linux及开源技术专家Dirk Hohndel提出的问题。 -Linus Torvalds doesn't regret any of the technical decisions he's made over the past 23 years since he first created Linux, he said Wednesday at [LinuxCon and CloudOpen Europe][1]. +Linus Torvalds在那天的 [欧洲LinuxCon和CloudOpen大会][1] 上说,从他首次创造出Linux操作系统到现在的23年里,他没后悔过任何他做过的技术决策。 -“Technical issues, even when they're completely wrong, and they have been, you can fix them later,” said Torvalds, a Linux Foundation fellow. +“技术问题,甚至是完全错误的技术问题,你也可以之后再去修复它。” Torvalds说。 ![](http://www.linux.com/images/stories/41373/Linus-Torvalds-2014.jpg) -Despite these personal issues and disagreements the community has thrived, and created the best technology they possibly can, said Linus Torvalds at LinuxCon Europe 2014. +他还说,尽管这些个人问题和异议在社区里“日益繁荣”,但是这些人或许能创造出最好的技术。 -He does, however, regret the times he has alienated developers and users with his use of strong language on the kernel mailing list, he said. Relationships can't be so easily fixed. +他本人就是这样的,然而,他regret the times he has alienated developers and users with his use of strong language on the kernel mailing list, he said. Relationships can't be so easily fixed. Despite these personal issues and disagreements the community has thrived, and created the best technology they possibly can. This is, Torvalds said, the ultimate goal. From ae3d7383d0b27f53b0444c1e60f9d78fff0b888d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 29 Oct 2014 13:09:25 +0800 Subject: [PATCH 039/316] =?UTF-8?q?20141029-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... to Install MariaDB in Ubuntu 14.04 LTS.md | 52 +++++++ ...uplex not supported in this QEMU binary.md | 40 +++++ ...stall REMI repository on CentOS or RHEL.md | 52 +++++++ ... port in the firewall on CentOS or RHEL.md | 68 ++++++++ ... Scripting--Checking Conditions with if.md | 146 ++++++++++++++++++ 5 files changed, 358 insertions(+) create mode 100644 sources/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md create mode 100644 sources/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md create mode 100644 sources/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md create mode 100644 sources/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md create mode 100644 sources/tech/20141029 Shell Scripting--Checking Conditions with if.md diff --git a/sources/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md b/sources/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md new file mode 100644 index 0000000000..3392cfdc8c --- /dev/null +++ b/sources/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md @@ -0,0 +1,52 @@ +How to Install MariaDB in Ubuntu 14.04 LTS +================================================================================ +MariaDB is an Open Source database Server & It is 100 % compatible with MySQL, drop-in replacement to MySQL database server. + +### Background of MariaDB : ### + +In 2008, MySQL was acquired by **Sun Microsystems**, which was in turn acquired by Oracle Corporation in 2010. While the initial acquisition by Sun was hailed by many in the MySQL community as exactly what the project needed, that sentiment did not last, and the subsequent acquisition by Oracle was unfortunately met with far lower expectations. Many of MySQL’s developers left Sun and Oracle to work on new projects . Among them was **Michael ‘Monty’ Widenius**, creator of MySQL and one of the project’s longtime technical lead. Monty and his team created a fork (offshoot) of the MySQL code base and named his new DBMS **MariaDB** + +In this Post we will discuss how to install MariaDB in Ubuntu Linux. By default mariadb packages are not included in Ubuntu Repositories. So to install mariadb , we we have set MariaDB repository. + +#### Setting Up MariaDB Repository #### + + $ sudo apt-get install software-properties-common + $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db + $ sudo add-apt-repository 'deb http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main' + +#### Installation of MariaDB : #### + + $ sudo apt-get update + $ sudo apt-get install mariadb-server + +While Installing MariaDB , you will be asked to set Maria DB root Password. + +![](http://www.linuxtechi.com/wp-content/uploads/2014/10/mariadb-root-1024x442-1.jpg) + +#### Connect To MariaDB From the Command Line : #### + + linuxtechi@mail:~$ mysql -uroot -p + Enter password: + Welcome to the MariaDB monitor. Commands end with ; or \g. + Your MariaDB connection id is 40 + Server version: 10.0.14-MariaDB-1~trusty-log mariadb.org binary distribution + Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others. + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + MariaDB [(none)]> + +#### Maria DB Service #### + + $ sudo /etc/init.d/mysql stop + $ sudo /etc/init.d/mysql start + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/install-mariadb-in-ubuntu/ + +作者:[Pradeep Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file diff --git a/sources/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md b/sources/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md new file mode 100644 index 0000000000..eafc88f00c --- /dev/null +++ b/sources/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md @@ -0,0 +1,40 @@ +Linux FAQs with Answers--How to fix “hda-duplex not supported in this QEMU binary” +================================================================================ +> **Question**: When I try to install Linux on a new VM in virt-manager, the VM fails to boot with the following error: "unsupported configuration: hda-duplex not supported in this QEMU binary." How can I fix this error? + +The cause for this VM error may originate from a qemu bug where a configured default sound card model is not recognized. + +![](https://farm4.staticflickr.com/3935/15000012754_b8b147fb16_o.png) + + Unable to complete install: 'unsupported configuration: hda-duplex not supported in this QEMU library' + +To solve this problem, do the following. + +### Solution One: Virt-Manager ### + +On **virt-manager**, open the VM's virtual hardware details menu, go to sound device section, and change the device model from default to ac97. + +![](https://farm4.staticflickr.com/3956/15435183020_d97856170c_z.jpg) + +Click on "Apply" button to save the change. See if you can start the VM now. + +### Solution Two: Virsh ### + +If you are using **virsh**, not **virt-manager**, you can edit the VM's XML file accordingly. Look for **sound** section inside section, and change the sound model to **ac97** as follows. + + + . . . + +
+ + . . . + + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/hda-duplex-not-supported-in-this-qemu-binary.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md b/sources/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md new file mode 100644 index 0000000000..10f5805987 --- /dev/null +++ b/sources/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md @@ -0,0 +1,52 @@ +Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL +================================================================================ +> **Question**: How can I configure the REMI repository on CentOS or RHEL, and install packages from the REMI repository? + +The [REMI repository][1] offers updated versions of core CentOS and RHEL packages, notably the latest PHP/MySQL stack. + +One thing to remember before installing the REMI repository is that it is not recommended to run yum update with the REMI repository. Since the package names of the REMI repository are the same as those used in the official RHEL/CentOS repositories, running yum update may trigger accidental upgrades of core packages. It is a good idea to keep the REMI repository disabled, and enable it only when you need to install packages that are only available in REMI. + +### Prerequisite ### + +Before installing REMI repository, you first need to enable the EPEL repository because some packages in REMI depend on EPEL. Follow [this guide][2] to set up EPEL repository on CentOS or RHEL. + +### Install REMI Repository ### + +Now go ahead and install REMI repository as follows. + +On CentOS 7: + + $ sudo rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi + $ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm + +On CentOS 6: + + $ sudo rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi + $ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm + +By default, the REMI repository is set disabled. To check whether the REMI repository is successfully installed, use this command. You will see several REMI repositories such as remi, remi-php55 and remi-php56. + + $ yum repolist disabled | grep remi + +![](https://farm4.staticflickr.com/3956/15443851690_a1abe9eb40_z.jpg) + +### Install a Package from REMI Repository ### + +As clarified, it is a good idea to keep the REMI repository disabled, and use it only when necessary. + +To search or install a package in the REMI repository, use these commands: + + $ sudo yum --enablerepo=remi search + $ sudo yum --enablerepo=remi install + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-remi-repository-centos-rhel.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://rpms.famillecollet.com/ +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file diff --git a/sources/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md b/sources/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md new file mode 100644 index 0000000000..32277122b3 --- /dev/null +++ b/sources/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md @@ -0,0 +1,68 @@ +Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL +================================================================================ +> **Question**: I am running a web/file server on my CentOS box, and to access the server remotely, I need to modify a firewall to allow access to a TCP port on the box. What is a proper way to open a TCP/UDP port in the firewall of CentOS/RHEL? + +Out of the box, enterprise Linux distributions such as CentOS or RHEL come with a powerful firewall built-in, and their default firewall rules are pretty restrictive. Thus if you install any custom services (e.g., web server, NFS, Samba), chances are their traffic will be blocked by the firewall rules. You need to open up necessary ports on the firewall to allow their traffic. + +On CentOS/RHEL 6 or earlier, the iptables service allows users to interact with netfilter kernel modules to configure firewall rules in the user space. Starting with CentOS/RHEL 7, however, a new userland interface called firewalld has been introduced to replace iptables service. + +To check the current firewall rules, use this command: + + $ sudo iptables -L + +![](https://farm6.staticflickr.com/5601/15604533686_a8c0ae7b89_z.jpg) + +Now let's see how we can update the firewall to open a port on CentOS/RHEL. + +### Open a Port on CentOS/RHEL 7 ### + +Starting with CentOS and RHEL 7, firewall rule settings are managed by firewalld service daemon. A command-line client called firewall-cmd can talk to this deamon to update firewall rules permanently. + +To open up a new port (e.g., TCP/80) permanently, use these commands. + + $ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent + $ sudo firewall-cmd --reload + +Without "--permanent" flag, the firewall rule would not persist across reboots. + +### Open a Port on CentOS/RHEL 6 ### + +On CentOS/RHEL 6 or earlier, a iptables service is responsible for maintaining firewall rules. + +Use iptables command to open up a new TCP/UDP port in the firewall. To save the updated rule permanently, you need the second command. + + $ sudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT + $ sudo service iptables save + +Another way to open up a port on CentOS/RHEL 6 is to use a terminal-user interface (TUI) firewall client, named system-config-firewall-tui. + + $ sudo system-config-firewall-tui + +Choose "Customize" button in the middle and press ENTER. + +![](https://farm6.staticflickr.com/5602/15628237745_4409cff52f_z.jpg) + +If you are trying to update the firewall for any well-known service (e.g., web server), you can easily enable the firewall for the service here, and close the tool. If you are trying to open up any arbitrary TCP/UDP port, choose "Forward" button and go to a next window. + +![](https://farm4.staticflickr.com/3941/15604533696_12857827ea_z.jpg) + +Add a new rule by choosing "Add" button. + +![](https://farm4.staticflickr.com/3941/15008065383_4b92cbd843_z.jpg) + +Specify a port (e.g., 80) or port range (e.g., 3000-3030), and protocol (e.g., tcp or udp). + +![](https://farm4.staticflickr.com/3946/15007474154_bef75d8c72_z.jpg) + +Finally, save the updated configuration, and close the tool. At this point, the firewall will be saved permanently. + +![](https://farm4.staticflickr.com/3942/15628237765_0299a638ab_z.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/open-port-firewall-centos-rhel.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20141029 Shell Scripting--Checking Conditions with if.md b/sources/tech/20141029 Shell Scripting--Checking Conditions with if.md new file mode 100644 index 0000000000..400718b185 --- /dev/null +++ b/sources/tech/20141029 Shell Scripting--Checking Conditions with if.md @@ -0,0 +1,146 @@ +Shell Scripting – Checking Conditions with if +================================================================================ +In Bourne Shell if statement checks whether a condition is true or not. If so , the shell executes the block of code associated with the if statement. If the statement is not true , the shell jumps beyond the end of the if statement block & Continues on. + +### Syntax of if Statement : ### + + if [ condition_command ] + then + command1 + command2 + …….. + last_command + fi + +#### Example: #### + + #!/bin/bash + number=150 + if [ $number -eq 150 ] + then + echo "Number is 150" + fi + +#### if-else Statement : #### + +In addition to the normal if statement , we can extend the if statement with an else block. The basic idea is that if the statement is true , then execute the if block. If the statement is false , then execute the else block. + +#### Syntax : #### + + if [ condition_command ] + then + command1 + command2 + …….. + last_command + else + command1 + command2 + …….. + last_command + fi + +#### Example: #### + + #!/bin/bash + number=150 + if [ $number -gt 250 ] + then + echo "Number is greater" + else + echo "Number is smaller" + fi + +### If..elif..else..fi Statement (Short for else if) ### + +The Bourne shell syntax for the if statement allows an else block that gets executed if the test is not true. We can nest if statement , allowing for multiple conditions. As an alternative, we can use the elif construct , shot for else if. + +#### Syntax : #### + + if [ condition_command ] + then + command1 + command2 + …….. + last_command + elif [ condition_command2 ] + then + command1 + command2 + …….. + last_command + else + command1 + command2 + …….. + last_command + fi + +#### Example : #### + + #!/bin/bash + number=150 + if [ $number -gt 300 ] + then + echo "Number is greater" + elif [ $number -lt 300 ] + then + echo "Number is Smaller" + else + echo "Number is equal to actual value" + fi + +### Nested if statements : ### + +If statement and else statement can be nested in a bash script. The keyword ‘fi’ shows the end of the inner if statement and all if statement should end with the keyword ‘fi’. + +Basic **syntax of nested** if is shown below : + + if [ condition_command ] + then + command1 + command2 + …….. + last_command + else + if [ condition_command2 ] + then + command1 + command2 + …….. + last_command + else + command1 + command2 + …….. + last_command + fi + fi + +#### Example: #### + + #!/bin/bash + number=150 + if [ $number -eq 150 ] + then + echo "Number is 150" + else + if [ $number -gt 150 ] + then + echo "Number is greater" + else + echo "'Number is smaller" + fi + fi + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/shell-scripting-checking-conditions-with-if/ + +作者:[Pradeep Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file From 0ef9cf09fad51738535cf8dc0fde6726ef296d9b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 29 Oct 2014 16:41:20 +0800 Subject: [PATCH 040/316] =?UTF-8?q?20141029-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...up My Weather Indicator in Ubuntu 14.10.md | 75 ++++++ ...ate and manage LXC containers on Ubuntu.md | 141 ++++++++++ ...ginx MariaDB or MySQL and php on CentOS.md | 248 ++++++++++++++++++ 3 files changed, 464 insertions(+) create mode 100644 sources/tech/20141029 How to Install and Setup My Weather Indicator in Ubuntu 14.10.md create mode 100644 sources/tech/20141029 How to create and manage LXC containers on Ubuntu.md create mode 100644 sources/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md diff --git a/sources/tech/20141029 How to Install and Setup My Weather Indicator in Ubuntu 14.10.md b/sources/tech/20141029 How to Install and Setup My Weather Indicator in Ubuntu 14.10.md new file mode 100644 index 0000000000..a5e06daef8 --- /dev/null +++ b/sources/tech/20141029 How to Install and Setup My Weather Indicator in Ubuntu 14.10.md @@ -0,0 +1,75 @@ +How to Install and Setup ‘My Weather Indicator’ in Ubuntu 14.10 +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/my-weather-indicator.jpg) + +**There’s no drought of ways to be kept abreast of the weather on the Ubuntu desktop, with the Unity Dash and desktop apps like [Typhoon][1] all offering to help.** + +But panel applets that offer quick glance condition and temperature stats, with a ream of detailed meteorological data never more than a quick click away, are by far the most popular weather utilities on Linux. + +[My Weather Indicator][2] by Atareao is one of this breed, and arguably the best. + +It displays current temperature and conditions on the Unity panel, and has a menu stuffed full of stats, including ‘feels like’, cloudiness and sunrise/set times. In addition, there’s a desktop widget, multiple location support, a choice of backend data providers, and plenty of configuration options. + +Sounds pretty comprehensive, right? Let’s walk through how to install and set it up on Ubuntu. + +### Install My Weather Indicator in Ubuntu ### + +My Weather Indicator is not available to install from the Ubuntu Software Center directly, but both a .deb installer and an officially maintained PPA (providing packages for both Ubuntu 14.04 LTS and 14.10) are provided by the developers. + +- Download My Weather Indicator (.deb) + +To ensure you’re always kept up-to-date with the latest release I recommend adding the [Atareao PPA][3] to your Software Sources and installing from there. + +How? **Open a new Terminal** window (Unity Dash > Terminal, or press Ctrl+Alt+T) and **enter the following two commands carefully**, entering your system password when prompted: + + sudo add-apt-repository ppa:atareao/atareao + + sudo apt-get update && sudo apt-get install my-weather-indicator + +#### Setting Up My Weather Indicator #### + +Regardless of how you install the tool, once you have you can launch it from the Unity Dash by searching for “weather”. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/weather-icon.jpg) + +The first time you open the app the following Preferences window will open. From here you can search for a location manually or set it to auto-detect using geo-ip — the latter of which can sometimes be a little imprecise, but saves the need to faff. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/Screen-Shot-2014-10-27-at-17.39.07.jpeg) + +If you’re travelling (or in need of some small talk fodder) **you can monitor a second locale**, too. This is set up in the same way as the first but in the ‘Second Location’ tab. + +Checking the ‘**Show Widget**’ box in the “**Widget Options**” section adds a small forecast desklet to your desktop. There are a number of different skins included, so be sure to play around to find the one you like the most (note: widget changes are applied on clicking ‘Ok’). + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/widgets.jpg) + +My Weather Indicator uses [Open Weather Map][4] as its forecast backend by default, but other options can be selected from the ‘**Weather Services**’ pane (*require an API key to function): + +- Open Weather Map +- Yahoo! Weather +- Weather Underground* +- World Weather Online* + +The ‘**Units**’ tab is where you can configure measurements for temperature, pressure, wind speed, etc. These are applied globally to all configured locations; you can’t have one location in Celsius and the other in Fahrenheit. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/Screen-Shot-2014-10-27-at-17.38.54.jpeg) + +Finally, in the ‘General Options‘ section you can set the refresh interval, set autostart preference, and choose from one of two panel icons. + +MWI not your thing? Why not try [the nerdy way to view weather forecasts on Linux][5]? + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/10/install-weather-indicator-ubuntu-14-10 + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://launchpad.net/typhoon +[2]:https://launchpad.net/my-weather-indicator +[3]:https://launchpad.net/~atareao/+archive/ubuntu/atareao +[4]:http://openweathermap.org/ +[5]:http://www.omgubuntu.co.uk/2014/02/get-weather-forecast-terminal-linux \ No newline at end of file diff --git a/sources/tech/20141029 How to create and manage LXC containers on Ubuntu.md b/sources/tech/20141029 How to create and manage LXC containers on Ubuntu.md new file mode 100644 index 0000000000..5731a7d737 --- /dev/null +++ b/sources/tech/20141029 How to create and manage LXC containers on Ubuntu.md @@ -0,0 +1,141 @@ +How to create and manage LXC containers on Ubuntu +================================================================================ +While the concept of containers was introduced more than a decade ago to manage shared hosting environments securely (e.g., FreeBSD jails), Linux containers such as LXC or [Docker][1] have gone mainstream only recently with the rising need to deploy applications for the cloud. While [Docker][2] is getting all the media spotlight these days with strong backing from major cloud providers (e.g., Amazon AWS, Microsoft Azure) and distro providers (e.g., Red Hat, Ubuntu), LXC is in fact the original container technology developed for Linux platforms. + +If you are an average Linux user, what good does Docker/LXC bring to you? Well, containers are actually a great means to switch between distros literally instantly. Suppose your current desktop is Debian. You want Debian's stability. At the same time, you also want to play the latest Ubuntu games. Then instead of bothering to dual boot into a Ubuntu partition, or boot up a heavyweight Ubuntu VM, simply spin off a Ubuntu container on the spot, and you are done. + +Even without all the goodies of Docker, what I like about LXC containers is the fact that LXC can be managed by libvirt interface, which is not the case for Docker. If you have been using libvirt-based management tools (e.g., virt-manager or virsh), you can use those same tools to manage LXC containers. + +In this tutorial, I focus on the command-line usage of standard LXC container tools, and demonstrate **how to create and manage LXC containers from the command line on Ubuntu**. + +### Install LXC on Ubuntu ### + +To use LXC on Ubuntu, install LXC user-space tools as follows. + + $ sudo apt-get install lxc + +After that, check the current Linux kernel for LXC support by running lxc-checkconifg tool. If everything is enabled, kernel's LXC support is ready. + + $ lxc-checkconfig + +![](https://farm4.staticflickr.com/3955/15655792445_d462957ee9_z.jpg) + +After installing LXC tools, you will find that an LXC's default bridge interface (lxcbr0) is automatically created (as configured in /etc/lxc/default.conf). + +![](https://farm6.staticflickr.com/5598/15035046834_a53c092230_z.jpg) + +When you create an LXC container, the container's interface will automatically be attached to this bridge, so the container can communicate with the world. + +### Create an LXC Container ### + +To be able to create an LXC container of a particular target environment (e.g., Debian Wheezy 64bit), you need a corresponding LXC template. Fortunately, LXC user space tools on Ubuntu come with a collection of ready-made LXC templates. You can find available LXC templates in /usr/share/lxc/templates directory. + + $ ls /usr/share/lxc/templates + +![](https://farm4.staticflickr.com/3954/15035046824_d15d1cbf6e_z.jpg) + +An LXC template is nothing more than a script which builds a container for a particular Linux environment. When you create an LXC container, you need to use one of these templates. + +To create a Ubuntu container, for example, use the following command-line: + + $ sudo lxc-create -n -t ubuntu + +![](https://farm8.staticflickr.com/7559/15035638763_07d63e23ef_z.jpg) + +By default, it will create a minimal Ubuntu install of the same release version and architecture as the local host, in this case Saucy Salamander (13.10) 64-bit. + +If you want, you can create Ubuntu containers of any arbitrary version by passing the release parameter. For example, to create a Ubuntu 14.10 container: + + $ sudo lxc-create -n -t ubuntu -- --release utopic + +It will download and validate all the packages needed by a target container environment. The whole process can take a couple of minutes or more depending on the type of container. So be patient. + +![](https://farm4.staticflickr.com/3933/15469152369_6a48943cf3_z.jpg) + +After a series of package downloads and validation, an LXC container image are finally created, and you will see a default login credential to use. The container is stored in /var/lib/lxc/. Its root filesystem is found in /var/lib/lxc//rootfs. + +All the packages downloaded during LXC creation get cached in /var/cache/lxc, so that creating additional containers with the same LXC template will take no time. + +Let's see a list of LXC containers on the host: + + $ sudo lxc-ls --fancy + +---------- + + NAME STATE IPV4 IPV6 AUTOSTART + ------------------------------------ + test-lxc STOPPED - - NO + +To boot up a container, use the command below. The "-d" option launches the container as a daemon. Without this option, you will directly be attached to console right after you launch the container. + + $ sudo lxc-start -n -d + +After launching the container, let's check the state of the container again: + + $ sudo lxc-ls --fancy + +---------- + + NAME STATE IPV4 IPV6 AUTOSTART + ----------------------------------------- + lxc RUNNING 10.0.3.55 - NO + +You will see that the container is in "RUNNING" state with an IP address assigned to it. + +You can also verify that the container's interface (e.g., vethJ06SFL) is automatically attached to LXC's internal bridge (lxcbr0) as follows. + + $ brctl show lxcbr0 + +![](https://farm4.staticflickr.com/3932/15656618342_53c4bc19ca_z.jpg) + +### Manage an LXC Container ### + +Now that we know how to create and start an LXC container, let's see what we can do with a running container. + +First of all, we want to access the container's console. For this, type this command: + + $ sudo lxc-console -n + +![](https://farm8.staticflickr.com/7538/15470225050_d093cb1028_z.jpg) + +Type to exit the console. + +To stop and destroy a container: + + $ sudo lxc-stop -n + $ sudo lxc-destroy -n + +To clone an existing container to another, use these commands: + + $ sudo lxc-stop -n + $ sudo lxc-clone -o -n + +### Troubleshooting ### + +For those of you who encounter errors with LXC, here are some troubleshooting tips. + +1. You fail to create an LXC container with the following error. + + $ sudo lxc-create -n test-lxc -t ubuntu + +---------- + + lxc-create: symbol lookup error: /usr/lib/x86_64-linux-gnu/liblxc.so.1: undefined symbol: cgmanager_get_pid_cgroup_abs_sync + +This means that you are running the latest LXC, but with an older libcgmanager. To fix this problem, you need to update libcgmanager. + + $ sudo apt-get install libcgmanager0 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/lxc-containers-ubuntu.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/docker-containers-centos-fedora.html +[2]:http://xmodulo.com/manage-linux-containers-docker-ubuntu.html \ No newline at end of file diff --git a/sources/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md b/sources/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md new file mode 100644 index 0000000000..0554534f82 --- /dev/null +++ b/sources/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md @@ -0,0 +1,248 @@ +How to install LEMP stack (nginx, MariaDB/MySQL and php) on CentOS +================================================================================ +The LEMP stack is an increasingly popular web service stack, powering mission-critical web services in many production environments. As the name implies, the LEMP stack is composed of Linux, nginx, MariaDB/MySQL and PHP. nginx is a high performance and lightweight replacement of slow and hard-to-scale Apache HTTP server used in the traditional LAMP stack. MariaDB is a community-driven fork of MySQL, with more features and better performance. PHP, a server-side language for generating dynamic content, is processed by PHP-FPM, an enhanced implementation of PHP FastCGI. + +In this tutorial, I demonstrate **how to set up the LEMP stack on CentOS platforms**. I target both CentOS 6 and CentOS 7 platforms, and point out differences where necessary. + +### Step One: Nginx ### + +As the first step, let's install nginx on CentOS, and do basic configuration for nginx, such as enabling auto-start and [customizing the firewall][1]. + +#### Install Nginx #### + +Let's install a pre-built stable version of nginx package from its official RPM source. + +On CentOS 7: + + $ sudo rpm --import http://nginx.org/keys/nginx_signing.key + $ sudo rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm + $ sudo yum install nginx + +On CentOS 6: + + $ sudo rpm --import http://nginx.org/keys/nginx_signing.key + $ sudo rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm + $ sudo yum install nginx + +Note that if you do not import the official nginx GPG key before installing nginx RPM, you will get this warning: + + warning: /var/tmp/rpm-tmp.KttVHD: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY + +#### Start Nginx #### + +After installation, nginx does not start automatically. Let's start nginx right now, and configure it to auto-start upon boot. Also, we need to open a TCP/80 port in the firewall so that you can access nginx webserver remotely. All of these are achieved by entering the following commands. + +On CentOS 7: + + $ sudo systemctl start nginx + $ sudo systemctl enable nginx + $ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent + $ sudo firewall-cmd --reload + +On CentOS 6: + + $ sudo service nginx start + $ sudo chkconfig nginx on + $ sudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT + $ sudo service iptables save + +#### Test Nginx #### + +The default document root directory of nginx is /usr/share/nginx/html. A default index.html file must be already placed in this directory. Let's check if you can access this test web page by going to http:/// + +![](https://farm4.staticflickr.com/3940/15461279287_8573948074_b.jpg) + +If you see the above page, nginx must be set up correctly. Proceed to the next. + +### Step Two: MariaDB/MySQL ### + +The next step is to install a database component of the LEMP stack. While CentOS/RHEL 6 or earlier provides MySQL server/client packages, CentOS/RHEL 7 has adopted MariaDB as the default implementation of MySQL. As a drop-in replacement of MySQL, MariaDB ensures maximum compatibility with MySQL in terms of APIs and command-line usages. Here is how to install and configure MariaDB/MySQL on CentOS. + +On CentOS 7: + +Install MariaDB server/client package and start MariaDB server as follows. + + $ sudo yum install mariadb-server + $ sudo systemctl start mariadb + $ sudo systemctl enable mariadb + +On CentOS 6: + +Install MySQL server/client package, and start MySQL server as follows. + + $ sudo yum install mysql-server + $ sudo service mysqld start + $ sudo chkconfig mysqld on + +After launching MariaDB/MySQL server successfully, execute the following add-on script that comes with MariaDB/MySQL server package. This one-time run conducts several security hardening steps for the database server, such as setting the (non-empty) root password, removing anonymous user, and locking down remote access. + + $ sudo mysql_secure_installation + +![](https://farm8.staticflickr.com/7545/15644566071_8c39875512_z.jpg) + +That's it for the database setup. Now move to the next step. + +### Step Three: PHP ### + +PHP is an important component of the LEMP stack, which is responsible for generating dynamic content from data stored in a MariaDB/MySQL server. For the LEMP stack, you need, at a minimum, to install PHP-FPM and PHP-MySQL. PHP-FPM (FastCGI Process Manager) implements an interface between nginx and PHP applications which generate dynamic content. The PHP-MySQL module allows PHP programs to access MariaDB/MySQL. + +#### Install PHP Modules #### + +On CentOS 7: + + $ sudo yum php php-fpm php-mysql + +On CentOS 6: + +First you need to install REMI repository (refer to [this guide][2]), and install the packages from the repository. + + $ sudo yum --enablerepo=remi install php php-fpm php-mysql + +![](https://farm4.staticflickr.com/3934/15644566121_60cbaab8b7_z.jpg) + +Two observations worth noting while installing PHP: + +On CentOS 6, MySQL server and client packages will automatically be upgraded as part of dependencies of the latest php-mysql in REMI. + +On both CentOS 6 and 7, installing the php package will also install Apache web server (i.e., httpd) as part of its dependencies. This can cause conflicts with nginx web server. We will take care of this problem in the next section. + +Depending on your use cases, you may want to install any of the following additional PHP module packages with yum command to customize your PHP engine. + +- **php-cli**: command-line interface for PHP. Useful for testing PHP from the command line. +- **php-gd**: image processing support for PHP. +- **php-bcmath**: arbitrary mathematics support for PHP. +- **php-mcrypt**: encryption algorithm support for PHP (e.g., DES, Blowfish, CBC, CFB, ECB ciphers). +- **php-xml**: XML parsing and manipulation support for PHP. +- **php-dba**: database abstraction layer support for PHP. +- **php-pecl-apc**: PHP accelerator/caching support. + +To see a complete list of available PHP modules to install, run: + + $ sudo yum search php- (CentOS 7) + $ sudo yum --enablerepo=remi search php- (CentOS 6) + +#### Start PHP-FPM #### + +You will need to start PHP-FPM, and add it to auto-start list. + +On CentOS 7: + + $ sudo systemctl start php-fpm + $ sudo systemctl enable php-fpm + +On CentOS 6: + + $ sudo chkconfig php-fpm on + $ sudo service php-fpm start + +### Step Four: Configure the LEMP Stack ### + +The final step of the tutorial is tuning the LEMP stack configuration. + +#### Disable Httpd #### + +Let's first disable httpd which was installed along with the PHP package earlier. + +On CentOS 7: + + $ sudo systemctl disable httpd + +On CentOS 6: + + $ sudo chkconfig httpd off + +#### Configure Nginx #### + +Next, let's configure nginx virtual hosts, so that nginx can process PHP via PHP-FPM. For that, open /etc/nginx/conf.d/default.conf with a text editor, and change it to the following. + + $ sudo vi /etc/nginx/conf.d/default.conf + +---------- + + server { + listen 80; + server_name www.server_domain.com; + root /usr/share/nginx/html; + index index.php index.html index.htm; + + location / { + } + + # redirect server error pages to the static page /50x.html + error_page 500 502 503 504 /50x.html; + location = /50x.html { + } + + # nginx passes PHP scripts to FastCGI server via a TCP/9000 socket + # this setting much be consistent with /etc/php-fpm.d/www.conf + # try_files prevents nginx from passing bad scripts to FastCGI server + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + } + +Also, let's adjust the number of nginx worker threads (specified in /etc/nginx/nginx.conf), which is set to one by default. Typically, we create as many worker threads as the number of CPU cores you have. To check how many CPU core you have, run this command: + + $ grep processor /proc/cpuinfo | wc -l + +If you have 4 cores, change /etc/nginx/nginx.conf as follows. + + $ sudo vi /etc/nginx/nginx.conf + +---------- + + worker_processes 4; + +#### Configure PHP #### + +Next, let's customize PHP configuration in /etc/php.ini file. More specifically, add the following lines in /etc/php.ini. + + cgi.fix_pathinfo=0 + date.timezone = "America/New York" + +As a security precaution, we want the PHP interpreter to process only an exact file path, instead of guessing any non-existing file. The first line above achieves this goal. + +The second line specifies the default timezone used by date/time related PHP functions. Use [this guide][3] to find out your timezone, and set the value of **date.timezone** accordingly. + +#### Test PHP #### + +Finally, let's check if nginx can process a PHP page. Before testing, make sure to restart nginx and PHP-FPM. + +On CentOS 7: + + $ sudo systemctl restart nginx + $ sudo systemctl restart php-fpm + +On CentOS 6: + + $ sudo service nginx restart + $ sudo service php-fpm restart + +Create a PHP file named test.php with the following content, and place it in /var/www/html/ + + + +Open a web browser, and go to http:///test.php. + +![](https://farm6.staticflickr.com/5608/15647258715_9d7bcd8c73_z.jpg) + +If you see the above page, you are all set with the LEMP stack! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/install-lemp-stack-centos.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/open-port-firewall-centos-rhel.html +[2]:http://ask.xmodulo.com/install-remi-repository-centos-rhel.html +[3]:http://ask.xmodulo.com/set-default-timezone-php.html \ No newline at end of file From 8e2f6bdc237be18c47d3c4281a8b62a6fb375424 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 29 Oct 2014 23:38:19 +0800 Subject: [PATCH 041/316] PUB:20141017 Linus Torvalds Regrets Alienating Developers with Strong Language @ZTinoZ --- ...enating Developers with Strong Language.md | 38 +++++++++++++++++++ ...enating Developers with Strong Language.md | 35 ----------------- 2 files changed, 38 insertions(+), 35 deletions(-) create mode 100644 published/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md delete mode 100644 translated/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md diff --git a/published/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md b/published/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md new file mode 100644 index 0000000000..a99457b834 --- /dev/null +++ b/published/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md @@ -0,0 +1,38 @@ +Linus Torvalds 对于向那些开发者说粗话而感到遗憾 +================================================================================ +> 他没有提到任何人的名字,但是这像一次道歉 + +**Linus Torvalds在前几天的欧洲LinuxCon和CloudOpen大会上做了讲话,这次大会由Linux基金会组织并且汇聚了开源世界的所有大佬。他回答了很多问题,也谈到了他在邮件发送清单里使用粗话的事情。** + +Linus Torvalds被认为是Linux内核的创造者和Linux最新的开发版本的维护者。他给我们几乎每个星期都带来一个新的内核RC 版本,并且会在邮件列表里面进行大量的讨论。在这些讨论中,他经常口不择言地用粗话大骂一些开发者们。 + +最近又出现了一个这种事情,就像我们在新闻里报道过的一样,他在做了一些苛刻的评论之后,[决定砍掉一些他认定的开发者的代码][1]。大家都知道Linus很招人厌烦,尤其是当内核开发者为了修复内核中的一些问题而破坏了用户空间。这次又发生了同样的事情,他基本上已经把那个家伙给气疯了。 + +### 这是他最接近道歉意味的一次谈话 ### + +以前Linus Torvalds从不真正去特地谈论这些事情,大家也习惯了。但是最近一个[systemd开发者谈到了在开源社区充斥着粗话,并且点名提到了Linus Torvalds][3]。他不太习惯于道歉,所以这次在LinuxCon大会上的这次“认错”是他跨出的一大步。 + +主持人询问他在过去的23年里所做过的决定有什么最后悔的吗? + +"从技术角度来看,没有哪个决定重要到这个程度...有个问题是慢慢地疏远了用户和开发者,而我却恰恰很擅长这个。我说了粗话,但是这不是我想要改变的某一个决定,这些粗话应该有所限制。" + +"其中一个原因是我们有说粗话的传统,很多人觉得倒胃口,特别是当有强烈的意愿和推动力的技术人员要做一些技术上的进步时,你就需要用一些强烈的语言来表达你的意愿。" Linus Torvalds [如是说][2] 。 + +他没提到任何人或者任何事件的名字,但很像是对于一位[名为Leonart Pottering的systemd开发者挑起事端][3]的回应,看上去就是针对这起事件。 + +Linux内核3.18 RC1也在上周发布了,我们又有新东西玩了。 + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Linus-Torvalds-Regrets-Alienating-Developers-with-Strong-Language-462191.shtml + +作者:[Silviu Stahie][a] +译者:[ZTinoZ](https://github.com/ZTinoZ) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:http://news.softpedia.com/news/Linus-Torvalds-Block-All-Code-from-Systemd-Developer-for-the-Linux-Kernel-435714.shtml +[2]:http://www.linux.com/news/featured-blogs/200-libby-clark/791788-linus-torvalds-best-quotes-from-linuxcon-europe-2014 +[3]:http://linux.cn/article-3978-1.html diff --git a/translated/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md b/translated/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md deleted file mode 100644 index 09d4a7d831..0000000000 --- a/translated/news/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md +++ /dev/null @@ -1,35 +0,0 @@ -Linus Torvalds对于骂那些开发者感到后悔 -================================================================================ -> 他没有提到任何人的名字,但是这像一次道歉 - -**Linus Torvalds在前几天的欧洲LinuxCon和CloudOpen大会上做了讲话,这次大会由Linux基金会组织并且汇聚了开源世界的所有大佬。他回答了很多问题,也谈到了他在邮件发送清单里使用粗话的事情。** - -Linus Torvalds被认为是Linux内核的创造者和最新的Linux开发版的维护者。他确保我们几乎每个星期都会得到一个新的RC内核并且涉及发生在邮件发送清单中的对话里,他口不择言地用粗话大骂一些开发者们。 - -最近出现了一个问题,就是他在做了一些苛刻的评论之后[决定从指定的开发者的手中阉割掉一些代码][1],这种事件在新闻里也报道过。大家都知道Linus很招人厌烦,尤其是当内核开发者为了修复内核中的一些问题而破坏了用户空间。同样的事情就发生在这种情况下,他基本上已经把那个家伙给气疯了。 - -### 这是他最接近道歉意味的一次谈话 ### - -以前Linus Torvalds从不真正去特地谈论一些事情,大家也在稳步地前进。但是最近一个systemd开发者谈到了在开源社区充斥着粗话并且点名提到了Linus Torvalds。他不太知道去道歉,所以这次在LinuxCon大会上的这次“认错”是他跨出的一大步。主持人询问他在过去的23年里所做过的单一的决定。 - -"从技术角度来看,没有一个单一的决定向来就是重要的...这个问题慢慢地疏远用户和开发者而我却恰恰很擅长这个。我说了粗话。但是我不想再修复单独实例了,都是一坨坨狗X一样的东西。" - -"其中一个原因是我们有说粗话的传统,很多人觉得倒胃口,当有强烈提议欲的技术人员和在技术上拥有巨大推动力的上级时,你就会把这些建议想成了一堆堆粗话了。" Linus Torvalds [如是说][2] 。 - -他没提到任何人或者任何事件的名字,但很像是对于一位名为Leonart Pottering的systemd开发者挑起事端的回应,看上去就是针对这起事件。 - -Linux内核3.18 RC1也在上周发布了,我们又有新东西玩了。 - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/Linus-Torvalds-Regrets-Alienating-Developers-with-Strong-Language-462191.shtml - -作者:[Silviu Stahie][a] -译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/silviu-stahie -[1]:http://news.softpedia.com/news/Linus-Torvalds-Block-All-Code-from-Systemd-Developer-for-the-Linux-Kernel-435714.shtml -[2]:http://www.linux.com/news/featured-blogs/200-libby-clark/791788-linus-torvalds-best-quotes-from-linuxcon-europe-2014 From 8ec8f2756bf542893c9139647a863d8fe9b03d7a Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 30 Oct 2014 00:05:31 +0800 Subject: [PATCH 042/316] PUB:20140819 How to Encrypt Email in Linux @KayGuoWhu --- .../20140819 How to Encrypt Email in Linux.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20140819 How to Encrypt Email in Linux.md (79%) diff --git a/translated/tech/20140819 How to Encrypt Email in Linux.md b/published/20140819 How to Encrypt Email in Linux.md similarity index 79% rename from translated/tech/20140819 How to Encrypt Email in Linux.md rename to published/20140819 How to Encrypt Email in Linux.md index 9dadd06e8f..6996d816ea 100644 --- a/translated/tech/20140819 How to Encrypt Email in Linux.md +++ b/published/20140819 How to Encrypt Email in Linux.md @@ -1,9 +1,9 @@ 在Linux中加密邮件 ================================================================================ ![Kgpg provides a nice GUI for creating and managing your encryption keys.](http://www.linux.com/images/stories/41373/fig-1-kgpg.png) -Kgpg为了创建了管理加密秘钥提供了一个很好的GUI界面. +*Kgpg为了创建了管理加密秘钥提供了一个很好的GUI界面.* -如果你一直在考虑如何加密电子邮件,那么在众多的邮件服务和邮件客户端中挑来挑去一定是件头痛的事情.可以考虑两种加密方法:SSL或TLS加密会保护发送到邮件服务器的登录名和密码.[Gunpg][1]是一款标准有用的Linux加密工具,可以加密和认证消息.如果你可以管理自己的GPG加密,并不考虑第三方工具,那它就够了,其它的我们将在稍后讨论. +如果你一直在考虑如何加密电子邮件,那么在众多的邮件服务和邮件客户端中挑来挑去一定是件头痛的事情.可以考虑两种加密方法:SSL或TLS加密会保护发送到邮件服务器的登录名和密码.[Gunpg][1]是一款标准的、强大的Linux加密工具,可以加密和认证消息.如果你可以管理自己的GPG加密,并不考虑第三方工具,那它就够了,其它的我们将在稍后讨论. 即便加密了消息,你仍然会暴露在流量分析中,因为消息头部必须是明文形式.所以需要另一款比如[Tor network][2]来隐藏你在互联网上的足迹.我们会看看各种邮件服务和客户端,以及其中的利弊. @@ -11,27 +11,27 @@ Kgpg为了创建了管理加密秘钥提供了一个很好的GUI界面. 如果你使用过GMail, Yahoo,Hotmail或者其它Web邮件提供商的邮件服务,那就忘掉它们吧.你在Web浏览器里输入的任何信息都会暴露在JavaScript攻击中,而且无论服务提供商提供什么保障都是过眼云烟(译者注:此说法靠谱否?).GMail,Yahoo和Hotmail均提供SSL/TLS加密来防止消息被窃听.但是它们不会提供任何保护来阻碍它们自己的数据挖掘,因此并不会提供端到端的加密.Yahoo和Google都声称将在明年推出端到端的加密.对此我持怀疑态度,因为如果一旦它们的核心业务数据挖掘受到干预,它们就什么都干不了了. -市面上也有各式各样的声称可以为所有类型的电子邮件都能提供安全加密的第三方邮件加密服务,比如[Virtru][3]和[SafeMess][4].对此我依旧表示怀疑,因为无论是谁,只要持有加密秘钥就可以访问你的消息,所以你还是要依赖于可信而不是技术. +市面上也有各式各样的声称可以为所有类型的电子邮件都能提供安全加密的第三方邮件加密服务,比如[Virtru][3]和[SafeMess][4].对此我依旧表示怀疑,因为无论是谁,只要持有加密秘钥就可以访问你的消息,所以你还是要依赖于对他们的信任而不是技术. -对等消息可以避免许多使用集中化服务中的缺陷.[RetroShare][5]和[Bitmessage][6]是两种流行的范例.我不知道它们是否如实所述,但这么说肯定由可取之处. +对等消息可以避免许多使用集中化服务中的缺陷.[RetroShare][5]和[Bitmessage][6]是两种流行的范例.我不知道它们是否如实所述,但这么说肯定有其可取之处. 那Anddroid和iOS又如何呢?假设大部分的Android和iOS应用都没有权限获取你的消息的话,那就是最安全的.不要照搬我说的 -- 在应用将要安装到你的设备上时麻烦读读相关的服务条款并检查所要求的权限.即便在初次安装时它们的条款是可接受的,也记得单方面的条款改变是行业的标准,所以做最坏的打算是最安全的. -### 零基础知识 ### +### 零知识(Zero Knowledge) ### -[Proton Mail][7]是一款全新的邮件服务,声称无需任何基础就可以实现消息加密.认证和消息加密分为两个单独的步骤,Proton受到Swiss隐私条款的保护,它们不会通过日志记录用户的活动.零基础知识加密提供真正的安全.这代表只有你拥有你的加密秘钥,如果你丢了它们,你的消息就无法恢复了. +[Proton Mail][7]是一款全新的邮件服务,声称采用零知识就可以实现消息加密.认证和消息加密分为两个单独的步骤,Proton遵照Swiss隐私条款,它们不会通过日志记录用户的活动.零知识加密提供真正的安全.这代表只有你拥有你的加密秘钥,如果你丢了它们,你的消息就无法恢复了. 也有许多加密电子邮件服务声称可以保护你的隐私.认真阅读细则,查看红色标注的地方,比如受限的用户数据采集,与好友分享,与执法部门的合作等.这些条款暗示它们会收集和共享用户数据,拥有权限获取你的加密秘钥,并读取你的消息. ### Linux邮件客户端 ### -一款独立的开源邮件客户端,比如, Mutt, Claws, Evolution, Sylpheed和Alpine,可建立你自己控制的GnuPG秘钥,给你大部分的保护.(建立更安全的电子邮件和Web浏览的最容易的方式是运行TAILS live的Linux发行版.详情查看[Protect Yourself Online With Tor, TAILS, and Debian][8].) +一款独立的开源邮件客户端,比如, Mutt, Claws, Evolution, Sylpheed和Alpine,可建立你自己控制的GnuPG秘钥,给你大部分的保护.(建立更安全的电子邮件和Web浏览的最容易的方式是运行TAILS live的Linux发行版.详情查看[通过 Tor、TAILS 和 Debian 在网上保护你自己][8]。) 无论你使用的是TAILS还是一款标准Linux发行版,管理GnuPG的方法是相同的,所以下面来学习如何使用GnuPG加密消息. ### 使用GnuPG ### -首先,熟悉一下相关术语。OpenPGP是一种开放的电子邮件加密和认证协议,基于菲利普·齐默曼的Pretty Good Privacy (PGP)。GNU Privacy Guard (GnuPG or GPG)是OpenPGP的GPL实现。GnuPG使用对称公钥加密算法,也就是说会生成一堆密钥:一个任何人都可以用来加密发送给你的消息的公钥和一个只有你自己拥有用来解密消息的的私钥。GnuPG执行两个分开的函数:数字化签名消息以证明消息来自你和加密消息。任何人都可以读到你的数字签名消息,但只有那些与你交换密钥的人才可以读取加密消息。切记千万不要与他人分享你的密钥!只能分享公钥。 +首先,熟悉一下相关术语。OpenPGP是一种开放的电子邮件加密和认证协议,基于菲利普·齐默曼的Pretty Good Privacy (PGP)。GNU Privacy Guard (GnuPG or GPG)是OpenPGP的GPL实现。GnuPG使用对称公钥加密算法,也就是说会生成一对密钥:一个任何人都可以用来加密发送给你的消息的公钥和一个只有你自己拥有用来解密消息的的私钥。GnuPG执行两个分开的函数:数字化签名消息以证明消息来自你和加密消息。任何人都可以读到你的数字签名消息,但只有那些与你交换密钥的人才可以读取加密消息。切记千万不要与他人分享你的密钥!只能分享公钥。 Seahorse是GnuPG对应的GNOME图形化前端,KGpg是KDE图形化的GnuPG工具。 @@ -39,7 +39,7 @@ Seahorse是GnuPG对应的GNOME图形化前端,KGpg是KDE图形化的GnuPG工 $ gpg --gen-key -这个过程有许多步骤;对于大部分人来说,只需要回答所有的问题,遵循默认设置就好。当你生成你的密钥时,记下来并将其保存在一个安全的地方,因为如果你丢掉了它,你就不能解密任何消息了。任何关于不要写下密码的建议都是错误的。我们中的大部分人要记住许多登录名和密码,包括那些我们几乎从来不会用到的,所以全部记住它们是不现实的。你知道当人们不写下他们的密码时会发生什么吗?他们会选择生成简单的密码并不断重复使用。你存储在电脑里的任何东西都潜在地会被攻击窃取;一个保存在上锁的柜子里的小本是无法通过渗透获取的,除了物理的入侵,当然入侵者要知道如何去寻找它。 +这个过程有许多步骤;对于大部分人来说,只需要回答所有的问题,遵循默认设置就好。当你生成你的密钥时,记下来并将其保存在一个安全的地方,因为如果你丢掉了它,你就不能解密任何消息了。**任何关于不要写下密码的建议都是错误的。**我们中的大部分人要记住许多登录名和密码,包括那些我们几乎从来不会用到的,所以全部记住它们是不现实的。你知道当人们不写下他们的密码时会发生什么吗?**他们会选择生成简单的密码并不断重复使用。**你存储在电脑里的任何东西都潜在地会被攻击窃取;一个保存在上锁的柜子里的小本是无法通过渗透获取的,除了物理的入侵,当然入侵者要知道如何去寻找它。 我必须叮嘱你们去弄清楚如何使用新密钥去配置邮件客户端,因为每一个都不同。你可以按照如下操作列出你的密钥: @@ -54,11 +54,11 @@ Seahorse是GnuPG对应的GNOME图形化前端,KGpg是KDE图形化的GnuPG工 $ gpg --send-keys 'Carla Schroder' --keyserver http://example.com -当你为上传到公钥服务器生成了一个新的密钥,你也应该生成一个撤销证书。不要推迟到以后做———当你生成新密钥时就生成它。你可以给它取任意的名称,比如使用一个像mycodeproject.asc的描述性名称来代替revoke.asc: +当你生成了一个新的密钥要上传到公钥服务器,你也应该生成一个撤销证书。不要推迟到以后做———当你生成新密钥时就生成它。你可以给它取任意的名称,比如使用一个像mycodeproject.asc的描述性名称来代替revoke.asc: $ gpg --output revoke.asc --gen-revoke 'Carla Schroder' -如果你的密钥缺乏抵抗力,你可以通过向keyring导入撤销证书来撤销它: +如果你的密钥变得不可靠了,你可以通过向keyring导入撤销证书来撤销它: $ gpg --import ~/.gnupg/revoke.asc @@ -89,7 +89,7 @@ via: http://www.linux.com/learn/tutorials/784165-how-to-encrypt-email-in-linux 作者:[Carla Schroder][a] 译者:[KayGuoWhu](https://github.com/KayGuoWhu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 694ee08a4a470005f7627727af5013c5035230bb Mon Sep 17 00:00:00 2001 From: bazz2 Date: Thu, 30 Oct 2014 08:55:02 +0800 Subject: [PATCH 043/316] [half work]The Why and How of Ansible and Docker --- ...8 The Why and How of Ansible and Docker.md | 104 ------------------ ...8 The Why and How of Ansible and Docker.md | 103 +++++++++++++++++ 2 files changed, 103 insertions(+), 104 deletions(-) delete mode 100644 sources/tech/20141008 The Why and How of Ansible and Docker.md create mode 100644 translated/tech/20141008 The Why and How of Ansible and Docker.md diff --git a/sources/tech/20141008 The Why and How of Ansible and Docker.md b/sources/tech/20141008 The Why and How of Ansible and Docker.md deleted file mode 100644 index 59bbc0ea2e..0000000000 --- a/sources/tech/20141008 The Why and How of Ansible and Docker.md +++ /dev/null @@ -1,104 +0,0 @@ -[bazz222222222222222222222] -The Why and How of Ansible and Docker -================================================================================ -There is a lot of interest from the tech community in both [Docker][1] and [Ansible][2], I am hoping that after reading this article you will share our enthusiasm. You will also gain a practical insight into using Ansible and Docker for setting up a complete server environment for a Rails application. - -Many reading this might be asking, “Why don’t you just use Heroku?”. First of all, I can run Docker and Ansible on any host, with any provider. Secondly, I prefer flexibility over convenience. I can run anything in this manner, not just web applications. Last but not least, because I am a tinkerer at heart, I get a kick from understanding how all the pieces fit together. The fundamental building block of Heroku is the Linux Container. The same technology lies at the heart of Docker’s versatility. As a matter of fact, one of Docker’s mottoes is: “Containerization is the new virtualization”. - -### Why Ansible? ### - -After 4 years of heavy Chef usage, the **infrastructure as code** mentality becomes really tedious. I was spending most of my time with the code that was managing my infrastructure, not with the infrastructure itself. Any change, regardless how small, would require a considerable amount of effort for a relatively small gain. With [Ansible][3], there’s data describing infrastructure on one hand, and the constraints of the interactions between various components on the other hand. It’s a much simpler model that enables me to move quicker by letting me focus on what makes my infrastructure personal. Similar to the Unix model, Ansible provides simple modules with a single responsibility that can be combined in endless ways. - -Ansible has no dependencies other than Python and SSH. It doesn’t require any agents to be set up on the remote hosts and it doesn’t leave any traces after it runs either. What’s more, it comes with an extensive, built-in library of modules for controlling everything from package managers to cloud providers, to databases and everything else in between. - -### Why Docker? ### - -[Docker][4] is establishing itself as the most reliable and convenient way of deploying a process on a host. This can be anything from mysqld to ![](Docker container as a VM. The)redis, to a Rails application. Just like git snapshots and distributes code in the most efficient way, Docker does the same with processes. It guarantees that everything required to run that process will be available regardless of the host that it runs on. - -A common but understandable mistake is to treat a Docker container as a VM. The [Single Responsibility Principle][5] still applies, running a single process per container will give it a single reason to change, it will make it re-usable and easy to reason about. This model has stood the test of time in the form of the Unix philosophy, it makes for a solid foundation to build on. - -### The Setup ### - -Without leaving my terminal, I can have Ansible provision a new instance for me with any of the following: Amazon Web Services, Linode, Rackspace or DigitalOcean. To be more specific, I can have Ansible create a new DigitalOcean 2GB droplet in Amsterdam 2 region in precisely 1 minute and 25 seconds. In a further 1 minute and 50 seconds I can have the system setup with Docker and a few other personal preferences. Once I have this base system in place, I can deploy my application. Notice that I didn’t setup any database or programming language. Docker will handle all application dependencies. - -Ansible runs all remote commands via SSH. My SSH keys stored in the local ssh-agent will be shared remotely during Ansible’s SSH sessions. When my application code will be cloned or updated on remote hosts, no git credentials will be required, the forwarded ssh-agent will be used to authenticate with the git host. - -### Docker and application dependencies ### - -I find it amusing that most developers are specific about the version of the programming language which their application needs, the version of the dependencies in the form of Python packages, Ruby gems or node.js modules, but when it comes to something as important as the database or the message queue, they just use whatever is available in the environment that the application runs. I believe this is one of the reasons behind the devops movement, developers taking responsibility for the application’s environment. Docker makes this task easier and more straightforward by adding a layer of pragmatism and confidence to the existing practices. - -My application defines dependencies on processes such as MySQL 5.5 and Redis 2.8 by including the following `.docker_container_dependencies` file: - - gerhard/mysql:5.5 - gerhard/redis:2.8 - -The Ansible playbook will notice this file and will instruct Docker to pull the correct images from the Docker index and start them as containers. It also links these service containers to my application container. If you want to find out how Docker container linking works, refer to the [Docker 0.6.5 announcement][6]. - -My application also comes with a Dockerfile which is specific about the Ruby Docker image that is required. As this is already built, the steps in my Dockerfile will have the guarantee that the correct Ruby version will be available to them. - - FROM howareyou/ruby:2.0.0-p353 - - ADD ./ /terrabox - - RUN \ - . /.profile ;\ - rm -fr /terrabox/.git ;\ - cd /terrabox ;\ - bundle install --local ;\ - echo '. /.profile && cd /terrabox && RAILS_ENV=test bundle exec rake db:create db:migrate && bundle exec rspec' > /test-terrabox ;\ - echo '. /.profile && cd /terrabox && export RAILS_ENV=production && rake db:create db:migrate && bundle exec unicorn -c config/unicorn.rails.conf.rb' > /run-terrabox ;\ - # END RUN - - ENTRYPOINT ["/bin/bash"] - CMD ["/run-terrabox"] - - EXPOSE 3000 - -The first step is to copy all my application’s code into the Docker image and load the global environment variables added by previous images. The Ruby Docker image for example will append PATH configuration which ensures that the correct Ruby version gets loaded. - -Next, I remove the git history as this is not useful in the context of a Docker container. I install all the gems and then create a `/test-terrabox` command which will be run by the test-only container. The purpose of this is to have a “canary” which ensures that the application and all its dependencies are properly resolved, that the Docker containers are linked correctly and all tests pass before the actual application container will be started. - -The command that gets run when a new web application container gets started is defined in the CMD step. The `/run-terrabox` command was defined part of the build process, right after the test one. - -The last instruction in this application’s Dockerfile maps port 3000 from inside the container to an automatically allocated port on the host that runs Docker. This is the port that the reverse proxy or load balancer will use when proxying public requests to my application running inside the Docker container. - -### Running a Rails application inside a Docker container ### - -For a medium-sized Rails application, with about 100 gems and just as many integration tests running under Rails, this takes 8 minutes and 16 seconds on a 2GB and 2 core instance, without any local Docker images. If I already had Ruby, MySQL & Redis Docker images on that host, this would take 4 minutes and 45 seconds. Furthermore, if I had a master application image to base a new Docker image build of the same application, this would take a mere 2 minutes and 23 seconds. To put this into perspective, it takes me just over 2 minutes to deploy a new version of my Rails application, including dependent services such as MySQL and Redis. - -I would like to point out that my application deploys also run a full test suite which alone takes about a minute end-to-end. Without intending, Docker became a simple Continuous Integration environment that leaves test-only containers behind for inspection when tests fail, or starts a new application container with the latest version of my application when the test suite passes. All of a sudden, I can validate new code with my customers in minutes, with the guarantee that different versions of my application are isolated from one another, all the way to the operating system. Unlike traditional VMs which take minutes to boot, a Docker container will take under a second. Furthermore, once a Docker image is built and tests pass for a specific version of my application, I can have this image pushed into a private Docker registry, waiting to be pulled by other Docker hosts and started as a new Docker container, all within seconds. - -### Conclusion ### - -Ansible made me re-discover the joy of managing infrastructures. Docker gives me confidence and stability when dealing with the most important step of application development, the delivery phase. In combination, they are unmatched. - -To go from no server to a fully deployed Rails application in just under 12 minutes is impressive by any standard. To get a very basic Continuous Integration system for free and be able to preview different versions of an application side-by-side, without affecting the “live” version which runs on the same hosts in any way, is incredibly powerful. This makes me very excited, and having reached the end of the article, I can only hope that you share my excitement. - -I gave a talk at the January 2014 London Docker meetup on this subject, [I have shared the slides on Speakerdeck][7]. - -For more Ansible and Docker content, subscribe to [The Changelog Weekly][8] — it ships every Saturday and regularly includes the week’s best links for both topics. - -[Use the Draft repo][9] if you’d like to write a post like this for The Changelog. They’ll work with you through the process too. - -Until next time, [Gerhard][a]. - --------------------------------------------------------------------------------- - -via: http://thechangelog.com/ansible-docker/ - -作者:[Gerhard Lazu][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://twitter.com/gerhardlazu -[1]:https://www.docker.io/ -[2]:https://github.com/ansible/ansible -[3]:http://ansible.com/ -[4]:http://docker.io/ -[5]:http://en.wikipedia.org/wiki/Single_responsibility_principle -[6]:http://blog.docker.io/2013/10/docker-0-6-5-links-container-naming-advanced-port-redirects-host-integration/ -[7]:https://speakerdeck.com/gerhardlazu/ansible-and-docker-the-path-to-continuous-delivery-part-1 -[8]:http://thechangelog.com/weekly/ -[9]:https://github.com/thechangelog/draft diff --git a/translated/tech/20141008 The Why and How of Ansible and Docker.md b/translated/tech/20141008 The Why and How of Ansible and Docker.md new file mode 100644 index 0000000000..6386a82cb3 --- /dev/null +++ b/translated/tech/20141008 The Why and How of Ansible and Docker.md @@ -0,0 +1,103 @@ +Ansible和Docker的作用和用法 +================================================================================ +在 [Docker][1] 和 [Ansible][2] 的技术社区内存在着很多好玩的东西,我希望在你阅读完这篇文章后也能获取到我们对它们的那种热爱。当然,你也会收获一些实践知识,那就是如何通过部署 Ansible 和 Docker 来为 Rails 应用搭建一个完整的服务器环境。 + +也许有人会问:你怎么不去用 Heroku?首先,我可以在任何供应商提供的主机上运行 Docker 和 Ansible;其次,相比于方便性,我更偏向于喜欢灵活性。我可以在这种组合中运行任何程序,而不仅仅是 web 应用。最后,我骨子里是一个工匠,我非常理解如何把零件拼凑在一起工作。Heroku 的基础模块是 Linux Container,而 Docker 表现出来的多功能性也是基于这种技术。事实上,Docker 的其中一个座右铭是:容器化是新虚拟化技术。 + +### 为什么使用 Ansible? ### + +我重度使用 Chef 已经有4年了(LCTT:Chef 是与 puppet 类似的配置管理工具),**基础设施即代码**的观念让我觉得非常无聊。我花费大量时间来管理代码,而不是管理基础设施本身。不论多小的改变,都需要相当大的努力来实现它。使用 [Ansible][3],你可以一手掌握拥有可描述性数据的基础架构,另一只手掌握不同组件之间的交互作用。这种更简单的操作模式让我把精力集中在如何将我的技术设施私有化,提高了我的工作效率。与 Unix 的模式一样,Ansible 提供大量功能简单的模块,我们可以组合这些模块,达到不同的工作要求。 + +除了 Python 和 SSH,Ansible 不再依赖其他软件,在它的远端主机上不需要部署代理,也不会留下任何运行痕迹。更厉害的是,它提供一套内建的、可扩展的模块库文件,通过它你可以控制所有:包管理器、云服务供应商、数据库等等等等。 + +### 为什么要使用 Docker? ### + +[Docker][4] 的定位是:提供最可靠、最方便的方式来部署服务。这些服务可以是 mysqld,可以是 redis,可以是 Rails 应用。先聊聊 git,它的快照功能让它可以以最有效的方式发布代码,Docker 的处理方法与它类似。它保证应用可以无视主机环境,随心所欲地跑起来。 + +一种最普遍的误解是人们总是把 Docker 容器看成是一个虚拟机,当然,我表示理解你们的误解。Docker 满足[单一功能原则][5],在一个容器里面只跑一个进程,所以一次修改只会影响一个进程,而这些进程可以被重用。这种模型参考了 Unix 的哲学思想,当前还处于试验阶段,并且正变得越来越稳定。 + +### 设置选项 ### + +不需要离开终端,我就可以使用 Ansible 来生成以下实例:Amazon Web Services,Linode,Rackspace 以及 DigitalOcean。如果想要更详细的信息,我于1分25秒内在位于阿姆斯特丹的2号数据中心上创建了一个 2GB 的 DigitalOcean 虚拟机。另外的1分50秒用于系统配置,包括设置 Docker 和其他个人选项。当我完成这些基本设定后,就可以部署我的应用了。值得一提的是这个过程中我没有配置任何数据库或程序开发语言,Docker 已经帮我把应用所需要的事情都安排好了。 + +Ansible 通过 SSH 为远端主机发送命令。我保存在本地 ssh 代理上面的 SSH 密钥会通过 Ansible 提供的 SSH 会话分享到远端主机。当我把应用代码从远端 clone 下来,或者上传到远端时,我就不再需要提供 git 所需的证书了,我的 ssh 代理会帮我通过 git 主机的身份验证程序的。 + +### Docker 和应用的依赖性 ### + +我发现有一点挺有意思的:大部分开发者非常了解他们的应用需要什么版本的编程语言,这些语言依赖关系有多种形式:Python 的包、Ruby 的打包系统 gems、node.js 的模块等等,但与数据库或消息队列这种重要的概念相比起来,这些语言就处于很随便的境地了——随便给我个编程语言环境,我都能把数据库和消息队列系统跑起来。我认为这是 DevOps 运动(它旨在促进开发与运维团队的和谐相处)的动机之一,开发者负责搭建应用所需要的环境。Docker 使这个任务变得简单明了直截了当,它为现有环境加了实用的一层配置。 + +我的应用依赖于 MySQL 5.5和 Redis 2.8,依赖关系放在“.docker_container_dependencies”文件里面: + + gerhard/mysql:5.5 + gerhard/redis:2.8 + +Ansible 会查看这个文件,并且通知 Docker 加载正确的镜像,然后在容器中启动。它还会把这些服务容器链接到应用容器。如果你想知道 Docker 容器的链接功能是怎么工作的,可以参考[Docker 0.6.5 发布通知][6]. + +我的应用包括一个 Dockerfile,它详细指定了 Ruby Docker 镜像的信息,这里面的步骤能够保证把正确的 Ruby 版本加载到镜像中。 + + FROM howareyou/ruby:2.0.0-p353 + + ADD ./ /terrabox + + RUN \ + . /.profile ;\ + rm -fr /terrabox/.git ;\ + cd /terrabox ;\ + bundle install --local ;\ + echo '. /.profile && cd /terrabox && RAILS_ENV=test bundle exec rake db:create db:migrate && bundle exec rspec' > /test-terrabox ;\ + echo '. /.profile && cd /terrabox && export RAILS_ENV=production && rake db:create db:migrate && bundle exec unicorn -c config/unicorn.rails.conf.rb' > /run-terrabox ;\ + # END RUN + + ENTRYPOINT ["/bin/bash"] + CMD ["/run-terrabox"] + + EXPOSE 3000 + +第一步是复制应用的所有代码到 Docker 镜像,加载上一个镜像的全局环境变量。这个例子中的 Ruby Docker 镜像会加载 PATH 配置,这个配置能确保镜像加载正确的 Ruby 版本。 + +接下来,删除 git 历史,Docker 容器不需要它们。我安装了所有 Ruby 的 gems,创建一个名为“/test-terrabox”的命令,这个命令会被名为“test-only”的容器执行。这个步骤的目的是能正确解决应用和它的依赖关系,让 Docker 容器正确链接起来,保证在真正的应用容器启动前能通过所有测试项目。 + +CMD 这个步骤是在新的 web 应用容器启动后执行的。在测试环节结束后马上就执行`/run-terrabox`命令进行编译。 + +最后,Dockerfile 为应用指定了一个端口号,将容器内部端口号为3000的端口映射到主机(运行着 Docker 的机器)的一个随机分配的端口上。当 Docker 容器里面的应用需要响应来自外界的请求时,这个端口可用于反向代理或负载均衡。 + +### Docker 容器内运行 Rails 应用 ### + +For a medium-sized Rails application, with about 100 gems and just as many integration tests running under Rails, this takes 8 minutes and 16 seconds on a 2GB and 2 core instance, without any local Docker images. If I already had Ruby, MySQL & Redis Docker images on that host, this would take 4 minutes and 45 seconds. Furthermore, if I had a master application image to base a new Docker image build of the same application, this would take a mere 2 minutes and 23 seconds. To put this into perspective, it takes me just over 2 minutes to deploy a new version of my Rails application, including dependent services such as MySQL and Redis. + +I would like to point out that my application deploys also run a full test suite which alone takes about a minute end-to-end. Without intending, Docker became a simple Continuous Integration environment that leaves test-only containers behind for inspection when tests fail, or starts a new application container with the latest version of my application when the test suite passes. All of a sudden, I can validate new code with my customers in minutes, with the guarantee that different versions of my application are isolated from one another, all the way to the operating system. Unlike traditional VMs which take minutes to boot, a Docker container will take under a second. Furthermore, once a Docker image is built and tests pass for a specific version of my application, I can have this image pushed into a private Docker registry, waiting to be pulled by other Docker hosts and started as a new Docker container, all within seconds. + +### 总结 ### + +Ansible made me re-discover the joy of managing infrastructures. Docker gives me confidence and stability when dealing with the most important step of application development, the delivery phase. In combination, they are unmatched. + +To go from no server to a fully deployed Rails application in just under 12 minutes is impressive by any standard. To get a very basic Continuous Integration system for free and be able to preview different versions of an application side-by-side, without affecting the “live” version which runs on the same hosts in any way, is incredibly powerful. This makes me very excited, and having reached the end of the article, I can only hope that you share my excitement. + +I gave a talk at the January 2014 London Docker meetup on this subject, [I have shared the slides on Speakerdeck][7]. + +For more Ansible and Docker content, subscribe to [The Changelog Weekly][8] — it ships every Saturday and regularly includes the week’s best links for both topics. + +[Use the Draft repo][9] if you’d like to write a post like this for The Changelog. They’ll work with you through the process too. + +Until next time, [Gerhard][a]. + +-------------------------------------------------------------------------------- + +via: http://thechangelog.com/ansible-docker/ + +作者:[Gerhard Lazu][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://twitter.com/gerhardlazu +[1]:https://www.docker.io/ +[2]:https://github.com/ansible/ansible +[3]:http://ansible.com/ +[4]:http://docker.io/ +[5]:http://en.wikipedia.org/wiki/Single_responsibility_principle +[6]:http://blog.docker.io/2013/10/docker-0-6-5-links-container-naming-advanced-port-redirects-host-integration/ +[7]:https://speakerdeck.com/gerhardlazu/ansible-and-docker-the-path-to-continuous-delivery-part-1 +[8]:http://thechangelog.com/weekly/ +[9]:https://github.com/thechangelog/draft From fb8f5c6f1b7f2cf3d7405bf687813e6f1a4ecbaa Mon Sep 17 00:00:00 2001 From: bazz2 Date: Thu, 30 Oct 2014 13:10:02 +0800 Subject: [PATCH 044/316] [translated]The Why and How of Ansible and Docker --- ...08 The Why and How of Ansible and Docker.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/translated/tech/20141008 The Why and How of Ansible and Docker.md b/translated/tech/20141008 The Why and How of Ansible and Docker.md index 6386a82cb3..748d7eb15b 100644 --- a/translated/tech/20141008 The Why and How of Ansible and Docker.md +++ b/translated/tech/20141008 The Why and How of Ansible and Docker.md @@ -63,30 +63,30 @@ CMD 这个步骤是在新的 web 应用容器启动后执行的。在测试环 ### Docker 容器内运行 Rails 应用 ### -For a medium-sized Rails application, with about 100 gems and just as many integration tests running under Rails, this takes 8 minutes and 16 seconds on a 2GB and 2 core instance, without any local Docker images. If I already had Ruby, MySQL & Redis Docker images on that host, this would take 4 minutes and 45 seconds. Furthermore, if I had a master application image to base a new Docker image build of the same application, this would take a mere 2 minutes and 23 seconds. To put this into perspective, it takes me just over 2 minutes to deploy a new version of my Rails application, including dependent services such as MySQL and Redis. +没有本地 Docker 镜像,从零开始部署一个中级规模的 Rails 应用大概需要100个 gems,进行100次整体测试,在使用2个核心实例和2GB内存的情况下,这些操作需要花费8分16秒。装上 Ruby、MySQL 和 Redis Docker 镜像后,部署应用花费了4分45秒。另外,如果从一个已存在的主应用镜像编译出一个新的 Docker 应用镜像出来,只需花费2分23秒。综上所述,部署一套新的 Rails 应用,解决其所有依赖关系(包括 MySQL 和 Redis),只需花我2分钟多一点的时间就够了。 -I would like to point out that my application deploys also run a full test suite which alone takes about a minute end-to-end. Without intending, Docker became a simple Continuous Integration environment that leaves test-only containers behind for inspection when tests fail, or starts a new application container with the latest version of my application when the test suite passes. All of a sudden, I can validate new code with my customers in minutes, with the guarantee that different versions of my application are isolated from one another, all the way to the operating system. Unlike traditional VMs which take minutes to boot, a Docker container will take under a second. Furthermore, once a Docker image is built and tests pass for a specific version of my application, I can have this image pushed into a private Docker registry, waiting to be pulled by other Docker hosts and started as a new Docker container, all within seconds. +需要指出的一点是,我的应用上运行着一套完全测试套件,跑完测试需要花费额外1分钟时间。尽管是无意的,Docker 可以变成一套简单的持续集成环境,当测试失败后,Docker 会把“test-only”这个容器保留下来,用于分析出错原因。我可以在1分钟之内和我的客户一起验证新代码,保证不同版本的应用之间是完全隔离的,同操作系统也是隔离的。传统虚拟机启动系统时需要花费好几分钟,Docker 容器只花几秒。另外,一旦一个 Dockedr 镜像编译出来,并且针对我的某个版本的应用的测试都被通过,我就可以把这个镜像提交到 Docker 私服 Registry 上,可以被其他 Docker 主机下载下来并启动一个新的 Docker 容器,而这不过需要几秒钟时间。 ### 总结 ### -Ansible made me re-discover the joy of managing infrastructures. Docker gives me confidence and stability when dealing with the most important step of application development, the delivery phase. In combination, they are unmatched. +Ansible 让我重新看到管理基础设施的乐趣。Docker 让我有充分的信心能稳定处理应用部署过程中最重要的步骤——交付环节。双剑合璧,威力无穷。 -To go from no server to a fully deployed Rails application in just under 12 minutes is impressive by any standard. To get a very basic Continuous Integration system for free and be able to preview different versions of an application side-by-side, without affecting the “live” version which runs on the same hosts in any way, is incredibly powerful. This makes me very excited, and having reached the end of the article, I can only hope that you share my excitement. +从无到有搭建一个完整的 Rails 应用可以在12分钟内完成,这种速度放在任何场合都是令人印象深刻的。能获得一个免费的持续集成环境,可以查看不同版本的应用之间的区别,不会影响到同主机上已经在运行的应用,这些功能强大到难以置信,让我感到很兴奋。在文章的最后,我只希望你能感受到我的兴奋。 -I gave a talk at the January 2014 London Docker meetup on this subject, [I have shared the slides on Speakerdeck][7]. +我在2014年1月伦敦 Docker 会议上讲过这个主题,[已经分享到 Speakerdeck][7]了。 -For more Ansible and Docker content, subscribe to [The Changelog Weekly][8] — it ships every Saturday and regularly includes the week’s best links for both topics. +如果想获得更多的关于 Ansible 和 Docker 的内容,请订阅 [changlog 周报][8],它会在每周六推送一周最有价值的关于这两个主题的新闻链接。 -[Use the Draft repo][9] if you’d like to write a post like this for The Changelog. They’ll work with you through the process too. +如果你想为我们的 Changlog 写一篇文章,请[使用 Draft repo][9],他们会帮到你的。 -Until next time, [Gerhard][a]. +下次见,[Gerhard][a]。 -------------------------------------------------------------------------------- via: http://thechangelog.com/ansible-docker/ 作者:[Gerhard Lazu][a] -译者:[译者ID](https://github.com/译者ID) +译者:[bazz2](https://github.com/bazz2) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1246c2d549e0d10b5d8b968df0dd44e3ba7438de Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 30 Oct 2014 13:58:06 +0800 Subject: [PATCH 045/316] Translating by ZTinoZ --- ...Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md b/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md index 15347f50bd..93c1421407 100644 --- a/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md +++ b/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md @@ -12,11 +12,11 @@ Linus Torvalds在那天的 [欧洲LinuxCon和CloudOpen大会][1] 上说,从他 他还说,尽管这些个人问题和异议在社区里“日益繁荣”,但是这些人或许能创造出最好的技术。 -他本人就是这样的,然而,他regret the times he has alienated developers and users with his use of strong language on the kernel mailing list, he said. Relationships can't be so easily fixed. +他本人就是这样的,然而,他对他在内核邮件列表中用粗话对待开发者和用户的事情感到遗憾。但是彼此间的关系不可能那么轻易就缓和。 -Despite these personal issues and disagreements the community has thrived, and created the best technology they possibly can. This is, Torvalds said, the ultimate goal. +社区里的那些人能创造出最好的技术同样也是Torvalds的终极目标和期望。 -In a Q&A on stage with Dirk Hohndel, Intel's chief Linux and open source technologist, Torvalds spoke about the state of the community, the kernel development process, what it takes to be a kernel developer, and the future of Linux. Here are some highlights of the discussion. +在英特尔的Linux及开源技术专家Dirk Hohndel的问答环节里,Torvalds 谈了社区里的一些现状和内核开发进展,谈了怎么成为一名内核开发者以及Linux的未来。以下是对话中的一些闪光点。 **1.** “The speed of development has not really slowed down the last few years. We have had around 10,000 patches every release from more than 1,000 people and the end result has been very good.” From 3526fb4c91933f3a5d6422c31ad13e07864dc707 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 30 Oct 2014 15:33:57 +0800 Subject: [PATCH 046/316] =?UTF-8?q?20141030-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Linux can take your system back in time.md | 58 ++++ ...ke Disk Full Or Can't Write to the Disk.md | 288 ++++++++++++++++++ ...eries against Apache log files on Linux.md | 138 +++++++++ 3 files changed, 484 insertions(+) create mode 100644 sources/news/20141030 Suse enterprise Linux can take your system back in time.md create mode 100644 sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md create mode 100644 sources/tech/20141030 How to run SQL queries against Apache log files on Linux.md diff --git a/sources/news/20141030 Suse enterprise Linux can take your system back in time.md b/sources/news/20141030 Suse enterprise Linux can take your system back in time.md new file mode 100644 index 0000000000..5615c8a7d0 --- /dev/null +++ b/sources/news/20141030 Suse enterprise Linux can take your system back in time.md @@ -0,0 +1,58 @@ +Suse enterprise Linux can take your system back in time +================================================================================ +> Suse Linux Enterprise Server 12 features a new system snapshot and rollback capability + +The newest enterprise edition of the Suse Linux distribution allows administrators to go back in time, for instance, to immediately before they made that fatal system-crippling mistake. + +Suse Linux Enterprise Server 12 (SLES 12) features a system snapshot and rollback capability that allows the user to boot the system to an earlier configuration, should the latest one unexpectedly fail. + +Such a capability can be handy for undoing a system configuration change that did not turn out as expected. For instance, an administrator might have the SLES computer in a perfectly fine running state, but then install a botched software update, or make a change that destroys the kernel. Typically, Unix systems have been unforgiving about such mistakes, forcing the administrator to reinstall the system software from scratch, should they not know how to undo the unfortunate change. + +"This stuff happens, for whatever reason," said Matthias Eckermann, Suse senior product manager. "So the admin has an emergency exit, so to speak." + +Users of Microsoft Windows and Apple Macintosh systems have long enjoyed rollback functionality within their respective OSes, but this capability had been missing in Unix-based systems such as Linux, at least as a native function of the OS. + +For this functionality, the Suse team used the [Btrfs][1] file system (B-tree file system, often pronounced as "Butter FS"), an open-source file system developed by Oracle engineer Chris Mason ([now at Facebook][2]). Mason created Btrfs to address emerging enterprise requirements such as the ability to make snapshots and to scale across multiple storage nodes. + +Although Btrfs is supported in the mainline Linux kernel, SLES is the first major Linux distribution to use Btrfs as the default file system. "Over the last five years, we specifically focused on making Btrfs enterprise-ready," Eckermann said. + +The rollback capability also relies on the open-source tool [Snapper][3], first developed by Suse, to manage the snapshots. + +The Suse team integrated Snapper with SLES so that users now have the ability, when the OS is first being loaded, to boot into an earlier snapshot of the system. "Whoever installs SLES 12 gets this capability by default," Eckermann said. + +SLES also integrated Btrfs with the [Samba Windows file server][4], which makes Linux files accessible to Windows machines. For Windows users, SLES can now make multiple snapshots of a file appear as different versions of a file, which are all accessible. + +Initially, Enterprise Suse supports rollbacks for only system changes, though users can also deploy it to handle changes in a user's home directory, in which data is typically kept. "We already have it running, but it is not supported," Eckermann said. Users can continue to use ext3, ext4 or some other traditional Linux file system as their default. + +SLES 12, released Monday, comes with a number of other features as well. Like other distributions, SLES has [caught the fever for Docker containers][5] and now comes with a built-in framework to run this virtualization technology. For the first time, the package also provides geo-clustering, which allows the user to build replicate clusters across different geographic regions. + +An organization could use geo-clustering, for instance, to set up multiple copies of a single cluster in data centers around the world, so if one or more regions go offline, the others can continue operations unabated, Eckermann said. + +Suse [is among the world's most widely used distributions][6] of Linux, along with Ubuntu/Debian, and Red Hat Enterprise Linux. A free version is available under OpenSuse and Suse Linux offers a commercial edition packaged for enterprise usage. + +Suse Linux's parent company, Attachmate, is in the process of merging with Micro Focus. Eckermann expects no major changes in the operations of Suse Linux resulting from the new ownership. + +SLES 12 is [offered at an annual subscription][7] of US$349 per server. A free 60-day trial is also available. + +![](http://images.techhive.com/images/article/2014/10/sle_12_installed_system_08_snapper_gui-2-100527225-large.idge.png) + +Through the combined powers of the Btrfs file system and the Snapper utility, SUSE Enterprise Linux can now take snapshots of the system, and roll back to an earlier configuration if necessary. + +-------------------------------------------------------------------------------- + +via: http://www.computerworld.com/article/2838950/suse-enterprise-linux-can-take-your-system-back-in-time.html + +作者:[Joab Jackson][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.computerworld.com/author/Joab-Jackson/ +[1]:https://btrfs.wiki.kernel.org/index.php/Main_Page +[2]:http://www.phoronix.com/scan.php?page=news_item&px=MTUzNTE +[3]:http://snapper.io/ +[4]:http://www.samba.org/ +[5]:http://www.pcworld.com/article/2838452/canonical-celebrates-cloud-freedoms-with-new-ubuntu.html +[6]:http://distrowatch.com/table.php?distribution=suse +[7]:https://www.suse.com/products/server/how-to-buy/ \ No newline at end of file diff --git a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md new file mode 100644 index 0000000000..1fbed0ced1 --- /dev/null +++ b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md @@ -0,0 +1,288 @@ +8 Tips to Solve Linux & Unix Systems Hard Disk Problmes Like Disk Full Or Can’t Write to the Disk +================================================================================ +Can't write to the hard disk on a Linux or Unix-like systems? Want to diagnose corrupt disk issues on a server? Want to find out why you are getting "disk full" messages on screen? Want to learn how to solve full/corrupt and failed disk issues. Try these eight tips to diagnose a Linux and Unix server hard disk drive problems. + +![](http://s0.cyberciti.org/uploads/cms/2014/10/welcome-0-disk-problems.001.jpg) + +### #1 - Error: No space left on device ### + +When the Disk is full on Unix-like system you get an error message on screen. In this example, I'm running [fallocate command][1] and my system run out of disk space: + + $ fallocate -l 1G test4.img + fallocate: test4.img: fallocate failed: No space left on device + +The first step is to run the df command to find out information about total space and available space on a file system including partitions: + + $ df + +OR try human readable output format: + + $ df -h + +Sample outputs: + + Filesystem Size Used Avail Use% Mounted on + /dev/sda6 117G 54G 57G 49% / + udev 993M 4.0K 993M 1% /dev + tmpfs 201M 264K 200M 1% /run + none 5.0M 0 5.0M 0% /run/lock + none 1002M 0 1002M 0% /run/shm + /dev/sda1 1.8G 115M 1.6G 7% /boot + /dev/sda7 4.7G 145M 4.4G 4% /tmp + /dev/sda9 9.4G 628M 8.3G 7% /var + /dev/sda8 94G 579M 89G 1% /ftpusers + /dev/sda10 4.0G 4.0G 0 100% /ftpusers/tmp + +From the df command output it is clear that /dev/sda10 has 4.0Gb of total space of which 4.0Gb is used. + +#### Fixing problem when the disk is full #### + +1.[Compress uncompressed log and other files][2] using gzip or bzip2 or tar command: + + gzip /ftpusers/tmp/*.log + bzip2 /ftpusers/tmp/large.file.name + +2.Delete [unwanted files using rm command][3] on a Unix-like system: + + m -rf /ftpusers/tmp/*.bmp + +3.Move files to other [system or external hard disk using rsync command][4]: + + rsync --remove-source-files -azv /ftpusers/tmp/*.mov /mnt/usbdisk/ + rsync --remove-source-files -azv /ftpusers/tmp/*.mov server2:/path/to/dest/dir/ + +4.[Find out the largest directories or files eating disk space][5] on a Unix-like systesm: + + du -a /ftpusers/tmp | sort -n -r | head -n 10 + du -cks * | sort -rn | head + +5.[Truncate a particular file][6]. This is useful for log file: + + truncate -s 0 /ftpusers/ftp.upload.log + ### bash/sh etc ## + >/ftpusers/ftp.upload.log + ## perl ## + perl -e'truncate "filename", LENGTH' + +6.Find and remove large files that are open but have been deleted on Linux or Unix: + + ## Works on Linux/Unix/OSX/BSD etc ## + lsof -nP | grep '(deleted)' + + ## Only works on Linux ## + find /proc/*/fd -ls | grep '(deleted)' + +To truncate it: + + ## works on Linux/Unix/BSD/OSX etc all ## + > "/path/to/the/deleted/file.name" + ## works on Linux only ## + > "/proc/PID-HERE/fd/FD-HERE" + +### #2 - Is the file system is in read-only mode? ### + +You may end up getting an error such as follows when you try to create a file or save a file: + + $ cat > file + -bash: file: Read-only file system + +Run mount command to find out if the file system is mounted in read-only mode: + + $ mount + $ mount | grep '/ftpusers' + +To fix this problem, simply remount the file system in read-write mode on a Linux based system: + + # mount -o remount,rw /ftpusers/tmp + +Another example, from my [FreeBSD 9.x server to remount / in rw mode][7]: + + # mount -o rw /dev/ad0s1a / + +### #3 - Am I running out of inodes? ### + +Sometimes, df command reports that there is enough free space but system claims file-system is full. You need to check [for the inode][8] which identifies the file and its attributes on a file systems using the following command: + + $ df -i + $ df -i /ftpusers/ + +Sample outputs: + + Filesystem Inodes IUsed IFree IUse% Mounted on + /dev/sda8 6250496 11568 6238928 1% /ftpusers + +So /ftpusers has 62,50,496 total inodes but only 11,568 are used. You are free to create another 62,38,928 files on /ftpusers partition. If 100% of your inodes are used, try the following options: + +- Find unwanted files and delete or move to another server. +- Find unwanted large files and delete or move to another server. + +### #4 - Is my hard drive is dying? ### + +[I/O errors in log file (such as /var/log/messages) indicates][9] that something is wrong with the hard disk and it may be failing. You can check hard disk for errors using smartctl command, which is control and monitor utility for SMART disks under Linux and UNIX like operating systems. The syntax is: + + smartctl -a /dev/DEVICE + # check for /dev/sda on a Linux server + smartctl -a /dev/sda + +You can also use "Disk Utility" to get the same information + +[![](http://s0.cyberciti.org/uploads/l/tips/2007/07/500-GB-Hard-Disk-ATA-TOSHIBA-MK5061GSYF-dev-sda-%E2%80%94-Disk-Utility_014.png)][10] + +Fig. 01: Gnome disk utility (Applications > System Tools > Disk Utility) + +> **Note**: Don't expect too much from SMART tool. It may not work in some cases. Make backup on a regular basis. + +### #5 - Is my hard drive and server is too hot? ### + +High temperatures can cause server to function poorly. So you need to maintain the proper temperature of the server and disk. High temperatures can result into server shutdown or damage to file system and disk. [Use hddtemp or smartctl utility to find out the temperature of your hard on a Linux or Unix based system][11] by reading data from S.M.A.R.T. on drives that support this feature. Only modern hard drives have a temperature sensor. hddtemp supports reading S.M.A.R.T. information from SCSI drives too. hddtemp can work as simple command line tool or as a daemon to get information from all servers: + + hddtemp /dev/DISK + hddtemp /dev/sg0 + +Sample outputs: + +[![](http://s0.cyberciti.org/uploads/cms/2014/10/hddtemp-on-rhel-300x85.jpg)][12] + +Fig.02: hddtemp in action + +You can use the smartctl command as follows too: + + smartctl -d ata -A /dev/sda | grep -i temperature + +#### How do I get the CPU temperature? #### + +You can use Linux hardware monitoring tool such as [lm_sensor to get the cpu temperature on a Linux based][13] system: + + sensors + +Sample outputs from Debian Linux server: + +[![](http://s0.cyberciti.org/uploads/cms/2014/10/sensors-command-on-debian-server.jpg)][14] + +Fig.03: sensors command providing cpu core temperature and other info on a Linux + +### #6 - Dealing with corrupted file systems ### + +File system on server may be get corrupted due to a hard reboot or some other error such as bad blocks. You can [repair corrupted file systems with the following fsck command][15]: + + umount /ftpusers + fsck -y /dev/sda8 + +See [how to surviving a Linux filesystem failures][16] for more info. + +### #7 - Dealing with software RAID on a Linux ### + +To find the current status of a Linux software raid type the following command: + + ## get detail on /dev/md0 raid ## + mdadm --detail /dev/md0 + + ## Find status ## + cat /proc/mdstat + watch cat /proc/mdstat + +Sample outputs: + +[![](http://s0.cyberciti.org/uploads/cms/2014/10/linux-mdstat-output.jpg)][17] + +Fig. 04: Find the status of a Linux software raid command + +You need to replace a failed hard drive. You must u remove the correct failed drive. In this example, I'm going to replace /dev/sdb (2nd hard drive of RAID 6). It is not necessary to take the storage offline to repair the RAID on Linux. This only works if your server support hot-swappable hard disk: + + ## remove disk from an array md0 ## + mdadm --manage /dev/md0 --fail /dev/sdb1 + mdadm --manage /dev/md0 --remove /dev/sdb1 + + # Do the same steps again for rest of /dev/sdbX ## + # Power down if not hot-swappable hard disk: ## + shutdown -h now + + ## copy partition table from /dev/sda to newly replaced /dev/sdb ## + sfdisk -d /dev/sda | sfdisk /dev/sdb + fdisk -l + + ## Add it ## + mdadm --manage /dev/md0 --add /dev/sdb1 + # do the same steps again for rest of /dev/sdbX ## + + # Now md0 will sync again. See it on screen ## + watch cat /proc/mdstat + +See our [tips on increasing RAID sync speed on Linux][18] for more information. + +### #8 - Dealing with hardware RAID ### + +You can use the samrtctl command or vendor specific command to find out the status of RAID and disks in your controller: + + ## SCSI disk + smartctl -d scsi --all /dev/sgX + + ## Adaptec RAID array + /usr/StorMan/arcconf getconfig 1 + + ## 3ware RAID Array + tw_cli /c0 show + +See your vendor specific documentation to replace a failed disk. + +### Monitoring disk health ### + +See our previous tutorials: + +1. [Monitoring hard disk health with smartd under Linux or UNIX operating systems][19] +1. [Shell script to watch the disk space][20] +1. [UNIX get an alert when disk is full][21] +1. [Monitor UNIX / Linux server disk space with a shell scrip][22] +1. [Perl script to monitor disk space and send an email][23] +1. [NAS backup server disk monitoring shell script][24] + +### Conclusion ### + +I hope these tips will help you troubleshoot system disk issue on a Linux/Unix based server. I also recommend implementing a good backup plan in order to have the ability to recover from disk failure, accidental file deletion, file corruption, or complete server destruction: + +- [Debian / Ubuntu: Install Duplicity for encrypted backup in cloud][25] +- [HowTo: Backup MySQL databases, web server files to a FTP server automatically][26] +- [How To Set Red hat & CentOS Linux remote backup / snapshot server][27] +- [Debian / Ubuntu Linux install and configure remote filesystem snapshot with rsnapshot incremental backup utility][28] +- [Linux Tape backup with mt And tar command tutorial][29] + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/datacenter/linux-unix-bsd-osx-cannot-write-to-hard-disk/ + +作者:[nixCraft][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.cyberciti.biz/tips/about-us +[1]:http://www.cyberciti.biz/faq/howto-create-lage-files-with-dd-command/ +[2]:http://www.cyberciti.biz/howto/question/general/compress-file-unix-linux-cheat-sheet.php +[3]:http://www.cyberciti.biz/faq/howto-linux-unix-delete-remove-file/ +[4]:http://www.cyberciti.biz/faq/linux-unix-bsd-appleosx-rsync-delete-file-after-transfer/ +[5]:http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/ +[6]:http://www.cyberciti.biz/faq/truncate-large-text-file-in-unix-linux/ +[7]:http://www.cyberciti.biz/faq/howto-freebsd-remount-partition/ +[8]:http://www.cyberciti.biz/tips/understanding-unixlinux-filesystem-inodes.html +[9]:http://www.cyberciti.biz/tips/linux-find-out-if-harddisk-failing.html +[10]:http://www.cyberciti.biz/tips/linux-find-out-if-harddisk-failing.html +[11]:http://www.cyberciti.biz/tips/howto-monitor-hard-drive-temperature.html +[12]:http://www.cyberciti.biz/datacenter/linux-unix-bsd-osx-cannot-write-to-hard-disk/attachment/hddtemp-on-rhel/ +[13]:http://www.cyberciti.biz/faq/howto-linux-get-sensors-information/ +[14]:http://www.cyberciti.biz/datacenter/linux-unix-bsd-osx-cannot-write-to-hard-disk/attachment/sensors-command-on-debian-server/ +[15]:http://www.cyberciti.biz/tips/repairing-linux-ext2-or-ext3-file-system.html +[16]:http://www.cyberciti.biz/tips/surviving-a-linux-filesystem-failures.html +[17]:http://www.cyberciti.biz/datacenter/linux-unix-bsd-osx-cannot-write-to-hard-disk/attachment/linux-mdstat-output/ +[18]:http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html +[19]:http://www.cyberciti.biz/tips/monitoring-hard-disk-health-with-smartd-under-linux-or-unix-operating-systems.html +[20]:http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html +[21]:http://www.cyberciti.biz/faq/mac-osx-unix-get-an-alert-when-my-disk-is-full/ +[22]:http://bash.cyberciti.biz/monitoring/shell-script-monitor-unix-linux-diskspace/ +[23]:http://www.cyberciti.biz/tips/howto-write-perl-script-to-monitor-disk-space.html +[24]:http://bash.cyberciti.biz/backup/monitor-nas-server-unix-linux-shell-script/ +[25]:http://www.cyberciti.biz/faq/duplicity-installation-configuration-on-debian-ubuntu-linux/ +[26]:http://www.cyberciti.biz/tips/how-to-backup-mysql-databases-web-server-files-to-a-ftp-server-automatically.html +[27]:http://www.cyberciti.biz/faq/redhat-cetos-linux-remote-backup-snapshot-server/ +[28]:http://www.cyberciti.biz/faq/linux-rsnapshot-backup-howto/ +[29]:http://www.cyberciti.biz/faq/linux-tape-backup-with-mt-and-tar-command-howto/ \ No newline at end of file diff --git a/sources/tech/20141030 How to run SQL queries against Apache log files on Linux.md b/sources/tech/20141030 How to run SQL queries against Apache log files on Linux.md new file mode 100644 index 0000000000..9ae1a5a76b --- /dev/null +++ b/sources/tech/20141030 How to run SQL queries against Apache log files on Linux.md @@ -0,0 +1,138 @@ +How to run SQL queries against Apache log files on Linux +================================================================================ +One of the distinguishing features of Linux is that, under normal circumstances, you should be able to know what is happening and has happened on your system by analyzing one or more system logs. Indeed, system logs are the first resource a system administrator tends to look to while troubleshooting system or application issues. In this article, we will focus on the Apache access log files generated by Apache HTTP web server. We will explore an alternative way of analyzing Apache access logs using [asql][1], an open-source tool that allows one to run SQL queries against the logs in order to view the same information in a more friendly format. + +### Background on Apache Logs ### + +There are two kinds of Apache logs: + +- **Access log**: Found at /var/log/apache2/access.log (for Debian) or /var/log/httpd/access_log (for Red Hat). Contains records of every request served by an Apache web server. +- **Error log**: Found at /var/log/apache2/error.log (for Debian) or /var/log/httpd/error_log (for Red Hat). Contains records of all error conditions reported by an Apache web server. Error conditions include, but are not limited to, 403 (Forbidden, usually returned after a valid request missing access credentials or insufficient read permissions), and 404 (Not found, returned when the requested resource does not exist). + +Although the verbosity of Apache access log file can be customized through Apache's configuration files, we will assume the default format in this article, which is as follows: + + Remote IP - Request date - Request type - Response code - Requested resource - Remote browser (may also include operating system) + +So a typical Apache log entry looks like: + + 192.168.0.101 - - [22/Aug/2014:12:03:36 -0300] "GET /icons/unknown.gif HTTP/1.1" 200 519 "http://192.168.0.10/test/projects/read_json/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0" + +But what about Apache error log? Since error log entries dealing with particular requests have corresponding entries in the access log (which you can customize), you can use the access log file to obtain more information about error conditions (refer to example 5 for more details). + +That being said, please note that access log is a system-wide log file. To find the log files of virtual hosts, you may also need to check their corresponding configuration files (e.g., within /etc/apache2/sites-available/[virtual host name] on Debian). + +### Installing asql on Linux ### + +asql is written in Perl, and requires two Perl modules: a DBI driver for SQLite and GNU readline. + +#### Install asql on Debian, Ubuntu or their derivatives #### + +asql and its dependencies will automatically be installed with aptitude on Debian-based distributions. + + # aptitude install asql + +#### Install asql on Fedora, CentOS or RHEL #### + +On CentOS or RHEL, you will need to enable [EPEL repository][2] first, and then run the commands below. On Fedora, proceed to the following commands directly. + + # sudo yum install perl-DBD-SQLite perl-Term-ReadLine-Gnu + # wget http://www.steve.org.uk/Software/asql/asql-1.7.tar.gz + # tar xvfvz asql-1.7.tar.gz + # cd asql + # make install + +### How Does asql Work? ### + +As you can guess from the dependencies listed above, asql converts unstructured plain-text Apache log files into a structured SQLite database, which can be queried using standard SQL commands. This database can be populated with the contents of current and past log files - including compressed rotated logs such as access.log.X.gz. or access_log.old. + +First, launch asql from the command line with the following command + + # asql + +You will be entering asql's built-in shell interface. + +![](https://farm8.staticflickr.com/7493/15477783969_ebedc61afc_o.png) + +Let's type help to list the available commands in the asql shell: + +![](https://farm8.staticflickr.com/7471/15478852650_ffed84ddc2_o.png) + +We will begin by loading all the access logs in asql, which can be done with: + + asql> load + +In case of Debian, the following command will do: + + asql> load /var/log/apache2/access.* + +In case of CentOS/RHEL, use this command instead: + + asql> load /var/log/httpd/access_log* + +When asql finishes loading access logs, we can start querying the database. Note that the database created after loading is "temporary," meaning that if you exit the asql shell, the database will be lost. If you want to preserve the database, you have to save it to a file first. We will see how to do that later (refer to examples 3 and 4). + +![](https://farm8.staticflickr.com/7489/15044293173_f21e38692b_o.png) + +The database contains a table named logs. The available fields in the logs table can be displayed using the show command: + +![](https://farm4.staticflickr.com/3955/15664433685_465e8f47bd_o.png) + +The .asql hidden file, which is stored in each user's home directory, records the history of the commands that were typed by the user in an asql shell. Thus, you can browse through it using the arrow keys, and repeat previous commands by just pressing ENTER when you find the right one. + +### SQL Query Examples with asql ### + +Here a few examples of running SQL queries against Apache log files with asql. + +**Example 1**: Listing the request sources / dates and HTTP status codes returned during the month of October 2014. + + SELECT source, date, status FROM logs WHERE date >= '2014-10-01T00:00:00' ORDER BY source; + +![](https://farm8.staticflickr.com/7488/15664433665_dde4ac1319_z.jpg) + +**Example 2**: Displaying the total size (in bytes) of requests served per client in descending order. + + SELECT source,SUM(size) AS Number FROM logs GROUP BY source ORDER BY Number DESC; + +![](https://farm4.staticflickr.com/3938/15478271548_369541b56c_z.jpg) + +**Example 3**: Saving the database to [filename] in the current working directory. + + save [filename] + +![](https://farm8.staticflickr.com/7576/15664433645_16510d8938_o.png) + +This allows us to avoid the need for waiting while the log parsing is performed with the load command as shown earlier. + +**Example 4**: Restoring the database in a new asql session after exiting the current one. + + restore [filename] + +![](https://farm4.staticflickr.com/3941/15664433635_737e714780_o.png) + +**Example 5**: Returning error conditions logged in the access file. In this example, we will display all the requests that returned a 403 (access forbidden) HTTP code. + + SELECT source,date,status,request FROM logs WHERE status='403' ORDER BY date + +![](https://farm8.staticflickr.com/7551/15478271518_0444582a3d_z.jpg) + +This goes to show that although asql only analyzes access logs, we can use the status field of a request to display requests with error conditions. + +### Summary ### + +We have seen how asql can help us analyze Apache logs and present the results in a user friendly output format. Although you could obtain similar results by using command line utilities such as cat in conjunction with grep, uniq, sort, and wc (to name a few), in comparison asql represents a Swiss army knife due to the fact that it allows us to use standard SQL syntax to filter the logs according to our needs. + +Feel free to leave your questions or comments below. Hope it helps. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/sql-queries-apache-log-files-linux.html + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:http://www.steve.org.uk/Software/asql/ +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file From a2b874c777bc18c0f0ef7ddd18c00647cf5aa8a3 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 30 Oct 2014 15:50:18 +0800 Subject: [PATCH 047/316] PUB:20140924 How to use CloudFlare as a ddclient provider under Ubuntu @GOLinux --- ...are as a ddclient provider under Ubuntu.md | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) rename {translated/tech => published}/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md (78%) diff --git a/translated/tech/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md b/published/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md similarity index 78% rename from translated/tech/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md rename to published/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md index bd5f5a49ea..fb78dd7867 100644 --- a/translated/tech/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md +++ b/published/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md @@ -1,15 +1,16 @@ -Ubuntu下使用CloudFlare作为ddclient提供商 +Ubuntu下使用CloudFlare 动态域名 ================================================================================ -DDclient是一个Perl客户端,用于更新动态DNS网络服务提供商帐号下的动态DNS条目。它最初是由保罗·巴利编写的,现在大多数是由维姆潘科在做。它能做的不仅仅是动态DNS,也可以通过几种不同的方式获取你的WAN口IP地址。 - -CloudFlare有一点已知的功能,它允许你通过API或叫做ddclient的命令行脚本更新你的DNS记录。不管哪一个,结果都一样,而且它是个免费软件。 - -不幸的是,ddclient并不能在CloudFlare中即开即用。它需要打补丁,这里就是要介绍怎样在Debian或Ubuntu上破解它,它也能在带有Raspberry Pi的Raspbian上工作。 ### 需求 ### 首先保证你有一个自有域名,然后登录到CloudFlare,添加你的域名。遵循指令操作,使用它给出的默认值就行了。你将让CloudFlare来托管你的域,所以你需要调整你的注册机构的设置。如果你想要使用子域名,请为它添加一条‘A’记录。目前,任何IP地址都可以。 +DDclient是一个Perl客户端,用于更新动态DNS网络服务提供商帐号下的动态DNS条目。它最初是由保罗·巴利编写的,现在大多数是由维姆潘科在做。它能做的不仅仅是动态DNS,也可以通过几种不同的方式获取你的WAN口IP地址。 + +CloudFlare 的一个功能是它允许你通过API或叫做ddclient的命令行脚本更新你的DNS记录。不管哪一个,结果都一样,而且它是个免费软件。 + +不幸的是,ddclient并不能在CloudFlare中即开即用。它需要打补丁,这里就是要介绍怎样在Debian或Ubuntu上破解它,它也能在带有Raspberry Pi的Raspbian上工作。 + ### 在Ubuntu上安装ddclient ### 打开终端,并运行以下命令 @@ -50,15 +51,11 @@ CloudFlare有一点已知的功能,它允许你通过API或叫做ddclient的 #daemon=300 -来自CloudFlare帐号页面的api密钥 +你的 api-key 可以从 CloudFlare帐号页面找到,ssl=yes 可能已经设置,use=web, web=dyndns 表示使用 dyndns 来确定 IP(用于 NAT)。 -ssl=yes might already be in that file +你已经搞定了。登录到 https://www.cloudflare.com 并检查列出的与你域名对应的IP地址是否与 http://checkip.dyndns.com 列出的相匹配。 -use=web, web=dyndns will use dyndns to check IP (useful for NAT) - -你已经搞定了。登录到https://www.cloudflare.com并检查列出的与你域名对应的IP地址是否匹配到了http://checkip.dyndns.com。 - -使用以下命令来验证你的设置 +使用以下命令来验证你的设置: sudo ddclient -daemon=0 -debug -verbose -noquiet @@ -67,6 +64,6 @@ use=web, web=dyndns will use dyndns to check IP (useful for NAT) via: http://www.ubuntugeek.com/how-to-use-cloudflare-as-a-ddclient-provider-under-ubuntu.html 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 11ab45f5568a1b3e9101295766abc7fb2d912578 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 30 Oct 2014 16:01:57 +0800 Subject: [PATCH 048/316] =?UTF-8?q?20141030-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...d Give a Fatal Blow to Windows in China.md | 36 +++++ ...s Civil War--Has It Really Come to This.md | 136 ++++++++++++++++++ ...ve Linux with nothing but a flash drive.md | 75 ++++++++++ ... List of Files and Directories in Linux.md | 42 ++++++ 4 files changed, 289 insertions(+) create mode 100644 sources/news/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md create mode 100644 sources/talk/20141030 Debian's Civil War--Has It Really Come to This.md create mode 100644 sources/tech/20141030 Test drive Linux with nothing but a flash drive.md create mode 100644 sources/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md diff --git a/sources/news/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md b/sources/news/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md new file mode 100644 index 0000000000..4e3c4ceb21 --- /dev/null +++ b/sources/news/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md @@ -0,0 +1,36 @@ +Ubuntu Could Give a Fatal Blow to Windows in China +================================================================================ +> Ubuntu Kylin might be able to replace Windows in China + +**The Windows operating systems is going out the front door in China and its place will be taken by a Linux distribution that will be used by the authorities and the governing body. The problem is that there is no real alternative, although at least one OS might be ready for the task, and that is Ubuntu Kylin.** + +The Chinese government and Microsoft now have a rocky relationship, to say the least. [As detailed in today's news][1], a plan to replace Windows gradually throughout the country with a Linux counterpart is in the works. It's unclear what system will be used to take over, especially since this a very complex situation and a very big country. + +Usually, there is no size-fits-all solution to this kind of problem and the Chinese approach does seem to be a little too blunt. In any case, this opens up a great window of opportunity for Ubuntu Kylin, a distribution based on Ubuntu and developed by Chinese devs and Canonical. It's been stable for quite some time and they already had a few consecutive launches. + +### Ubuntu Kylin is knocking on Windows' door ### + +It's interesting to see that in the same day that this piece of news about the Chinese intentions surfaces, an interview with Dr. Jonas Zhang, vice professor of the National University of Defense Technology (NUDT), about the [recent launch of the 14.10 branch][2] has been published. + +"In our 14.10 release, there are some sweet new features. For example, beginners can find a replacement of Windows software via Ubuntu Kylin Software Center easily; users can login to Ubuntu Kylin applications and community via the SSO of Ubuntu Kylin (Single Sign-On System of Ubuntu Kylin, we call it UKID); Sogou IM (one of the most famous Chinese input method in the world, which has been launched on Apple’s App Store since last month) reduces 40% of the CPU and memory usage." + +"More than 50 project managers, engineers and community managers from CSIP (one service agency of China government), Canonical and NUDT (National University of Defense Technology) are working on Ubuntu Kylin. Most of the full-time engineers are from NUDT. Many developers from Ubuntu, Debian and other communities also take part in the development of Ubuntu Kylin," [said][2] Dr. Jonas Zhang. + +The Chinese government might be looking to build yet another Linux distro by itself (not their first attempt), but it looks like they could already have a very good candidate to take over Windows. This would also be very good business for Canonical, at least in terms of recognition. + +If Ubuntu, through its Kylin connection, manages to replace Windows in a country as big as China, it would be a huge boost for the company. It remains to be seen if the developers' efforts to make Ubuntu Kylin a competitive OS were not in vain. + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Ubuntu-Could-Give-a-Fatal-Blow-to-Windows-in-China-463500.shtml + +作者:[Silviu Stahie][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:http://news.softpedia.com/news/China-Starts-Windows-Eradication-15-of-Govt-PCs-to-Switch-to-Linux-Every-Year-463393.shtml +[2]:http://news.softpedia.com/news/Ubuntu-Kylin-14-10-Utopic-Unicorn-Consolidates-Its-Position-in-China-463068.shtml +[3]:https://insights.ubuntu.com/2014/10/29/interview-nudt-talks-ubuntu-kylin-and-its-14-10-release/ \ No newline at end of file diff --git a/sources/talk/20141030 Debian's Civil War--Has It Really Come to This.md b/sources/talk/20141030 Debian's Civil War--Has It Really Come to This.md new file mode 100644 index 0000000000..090ffb1f03 --- /dev/null +++ b/sources/talk/20141030 Debian's Civil War--Has It Really Come to This.md @@ -0,0 +1,136 @@ +Debian's Civil War: Has It Really Come to This? +================================================================================ +![](http://www.linuxinsider.com/ai/254566/debian.jpg) + +**"The 'new' Debian would be rather weak," said blogger Robert Pogson. "Would it have the hundreds of mirrors that make Debian wonderful? I doubt that. Debian is a great distro. Disemboweling it out of spite is just wrong. Why can't we come to some amicable agreement? Why do we have to race at full speed to the edge of a cliff when we don't know if we can stop?"** + +Well it seems no matter how loudly we here in the Linux blogosphere try to hum a happy tune or discuss [cheerful FOSS matters][1], we just can't seem to drown out the shouts and screams coming from those standing too close to the Systemd Inferno. + +Stand back, people! It's dangerous! + +The embers, of course, [had been hot][2] for some time already before the blaze [flared sky-high][3] a few months ago. Now, the conflagration appears to be completely out of control. + +Need proof? Two words: [Debian fork][4]. + +That's right: Debian, the granddaddy of Linux distributions and embodiment of everything so many FOSS fans hold dear, may be forked, and it's apparently all because of Systemd. + +A more upsetting development would be hard to conceive. + +### 'Roll Up Your Sleeves' ### + +![](http://www.linuxinsider.com/images/article_images/linuxgirl_bg_pinkswirl_150x245.jpg) + +"Debian today is haunted by the tendency to betray its own mandate, a base principle of the Free Software movement: put the user's rights first," explained the anonymous developers behind the Debian Fork site. "What is happening now instead is that through a so-called 'do-ocracy,' developers and package maintainers are imposing their choices on users." + +Their conclusion: "Roll up your sleeves, we may need to fork Debian." + +Quick as a flash, [word traveled][5] to [Slashdot][6], [LXer][7] and beyond. + +Down at the Linux blogosphere's Punchy Penguin Saloon, a profound hush fell as soon as the news arrived. Fortunately, it lasted only a fraction of a second. + +### 'I Say Go for It' ### + +"Freedom of choice implies the freedom to be a complete idiot, and clearly Free Software has its share," Google+ blogger Kevin O'Brien said. + +"I have been skeptical about Systemd, but I have trouble believing there are enough people this crazy to actually pull off a fork of Debian," O'Brien added. "I predict a year from now we won't remember what this was all about." + +On the other hand: "I say go for it if you're that passionate about it," offered [Linux Rants][8] blogger Mike Stone. "This is Linux we're talking about, after all, and Linux is open source. Anybody should always feel free to do what they want with Linux, as long as they're willing to share. + +"The fact that SysVinit will still be available on standard Debian kind of makes forking it over Systemd seem a little silly, but I'm not going to stand in the way of anybody that wants to fork any FOSS for their own use," Stone added. + +Indeed, "Linux's strength is also its Achilles' Heel," Google+ blogger Rodolfo Saenz opined. 'In the Linux world, forking is inevitable. It is part of Linux's evolution." + +### 'A Lot of Misinformation' ### + +At the same time, "I think if they were likely to actually fork Debian, they would have just gone and done it rather than throw a massive public temper tantrum," consultant and Slashdot blogger Gerhard Mack suggested. + +"Secondly, I think there is a lot of misinformation out there about what Systemd does and how it works," Mack added. 'At the beginning of all of this I was very worried about the stability and security of the systems I maintain after reading the nerd rage on Slashdot, The Register, and sites like [Boycott Systemd][9], so I looked into Systemd for myself. + +"What I have discovered is that they seem to be confusing Systemd with things that are bundled with Systemd but run separately using a 'least privilege needed for the task' type design," he explained. "There are things I don't like, such as the binary logs, but then I can just configure it to run through syslogd as usual and ignore the binary logs." + +Particularly "hilarious," Mack added, is that people "suggest that only desktops need to boot quickly," he said. "I have seen some automated systems that load VMs on demand, and they would be much more effective if they booted faster." + +### 'I'm Really Confused' ### + +It will be "a sad day if Debian forks over this Systemd thing," longtime Debian user [Robert Pogson][10] told Linux Girl. + +"I am one of the haters, I guess," Pogson said. "I see adopting Systemd as something that kept Jessie's bug count high for months. I just don't see the need for it. I've read that some desktop users complain that Systemd is all for server users and I've read that some server users complain that Systemd is all for desktop users. I'm both and I'm really confused." + +Meanwhile, "do I need to learn a lot about Systemd to use it?" Pogson wondered. "I'm too old to learn too many new tricks. Does it give me any benefits, or is it just a nuisance? + +"I see faster booting as a rather small benefit for a lot of nuisance value like binary logs... what's with that?" he added. "I've learned to use grep on current logs to get what I need. Hiding them is just making GNU/Linux more like that other OS. Yuck!" + +### 'Nonfree Software Is the Real Enemy' ### + +Debian is an organization of roughly a thousand developers, Pogson pointed out. + +"They work hard and make the world a better place," he said. "Forcing them to choose which fork to take is really cruel and unusual punishment for such generous people. If the fork is 50/50, Debian might take years of recruitment to recover. That does no one any good. + +"The 'new' Debian would be rather weak," Pogson added. "Would it have the hundreds of mirrors that make Debian wonderful? I doubt that. Debian is a great distro. Disemboweling it out of spite is just wrong. Why can't we come to some amicable agreement? Why do we have to race at full speed to the edge of a cliff when we don't know if we can stop?" + +Bottom line: "If this civil war gets any worse, I may switch back to Debian Stable/Wheezy, my 'bomb shelter,' in the hope that I can wait for peace to break out," he concluded. "I don't need the drama. Bill Gates must be laughing at this waste of energy. Nonfree software is the real enemy -- not folks building/using Debian GNU/Linux." + +### 'It Is What Happens' ### + +It is a sad development, Google+ blogger Gonzalo Velasco C. agreed. + +At the same time, "it is what happens in the FLOSS world when you don't listen to your peers and users and listen to others that have their own (commercial) agenda and 'suggest' you use a tool as hungry as Systemd, regardless of its merits and modernism comparing to old sisVinit," he said. + +"There are a lot of technical discussions and arguments out there, and Debian must show it is neither deaf nor blind and re-discuss the issue," he added. + +### Red Hat's Influence ### + +"Do the users wish to be beholden to [Red Hat's][11] corporate roadmap? If the answer is 'no,' then a fork is the only choice left open, as it's pretty plain to see that Debian will go Systemd whether their users like it or not," SoylentNews blogger hairyfeet said. + +"It all comes down to cloud computing, and RH intends to foist its version of SVCHOSTS for Linux onto Debian and Ubuntu," he added. "The reason why is obvious: it gives them pretty much every major Linux distro, as they are nearly all built on RH, Debian or Ubuntu." + +So, the answer is simple, hairyfeet said: "If you want RH calling the shots, then stay; if not, fork." + +### 'Seems Like a Lot of Work' ### + +Of course, there's nothing to prevent a fork, Google+ blogger Brett Legree pointed out. + +"If someone wants to do it, that's their choice," he noted. + +"Seems like a lot of work, though," Legree added. "I mean, I figure that most people wouldn't care either way what init system is being used, and those who do know can probably figure out how to configure Debian (or whatever) to use a different init system. That's been possible up to now, and I'd expect it will continue to be so." + +Forks are a lot of work to maintain, agreed Chris Travers, a [blogger][12] who works on the [LedgerSMB][13] project. + +"Trust me -- I know from experience, as LedgerSMB began life as a fork of SQL-Ledger," Travers said. + +Still, "there are huge differences in philosophy between init scripts and Systemd, and this is an area where there is probably room for a good Unix-like distro to keep the old ways," Travers said. "There are certainly worse things than forks developing. This being said, I wonder if people who really want Unix should instead switch to the BSDs." + +### 'Like Killing Mosquitoes With Shotguns' ### + +The Debian community was not aware of everything the changes in the init system would bring, Google+ blogger Alessandro Ebersol suggested. "They thought it was a non-issue." + +Now that "a large number of Debian sysadmins are not pleased," however, forking would be "an extreme measure," he said, "and a last resort. There are still a lot of things that can be done." + +After all, Debian is "the GNU/Linux that runs on anything, in any *nix setup -- remember the Debian BSD flavor, and that Debian BSD will have to be accommodated to work with the new init system," Ebersol pointed out. + +"So, I believe all is not lost for Debian, but a fork, right now, is too extreme, like killing mosquitoes with shotguns," he concluded. "There's still time and place to make peace and amendments in the Debian community." + +-------------------------------------------------------------------------------- + +via: http://www.linuxinsider.com/story/81262.html + +作者:[Katherine Noyes][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://twitter.com/noyesk +[1]:http://www.reglue.org/ +[2]:http://www.linuxinsider.com/story/80472.html +[3]:http://www.linuxinsider.com/story/80980.html +[4]:http://debianfork.org/ +[5]:http://linux.slashdot.org/story/14/10/20/1944226/debians-systemd-adoption-inspires-threat-of-fork +[6]:http://slashdot.org/ +[7]:http://lxer.com/module/forums/t/35625/ +[8]:http://linuxrants.com/ +[9]:http://boycottsystemd.org/ +[10]:http://mrpogson.com/ +[11]:http://www.redhat.com/ +[12]:http://ledgersmbdev.blogspot.com/ +[13]:http://www.ledgersmb.org/ \ No newline at end of file diff --git a/sources/tech/20141030 Test drive Linux with nothing but a flash drive.md b/sources/tech/20141030 Test drive Linux with nothing but a flash drive.md new file mode 100644 index 0000000000..84d5b7a9d4 --- /dev/null +++ b/sources/tech/20141030 Test drive Linux with nothing but a flash drive.md @@ -0,0 +1,75 @@ +Test drive Linux with nothing but a flash drive +================================================================================ +![Penguins gathered together: Linux for the win](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/OSDC_Penguin_Image_520x292_12324207_0714_mm_v1a.png) +Image by : Opensource.com + +Maybe you’ve heard about Linux and are intrigued by it. So intrigued that you want to give it a try. But you might not know where to begin. + +You’ve probably done a bit of research online and have run across terms like dual booting and virtualization. Those terms might mean nothing to you, and you’re definitely not ready to sacrifice the operating system that you’re currently using to give Linux a try. So what can you do? + +If you have a USB flash drive lying around, you can test drive Linux by creating a live USB. It’s a USB flash drive that contains an operating system that can start from the flash drive. It doesn’t take much technical ability to create one. Let’s take a look at how to do that and how to run Linux using a live USB. + +### What you’ll need ### + +Aside from a desktop or laptop computer, you’ll need: + +- A blank USB flash drive—preferably one that has a capacity of 4 GB or more. +- An [ISO image][1] (an archive of the contents of a hard disk) of the Linux distribution that you want to try. More about this in a moment. +- An application called [Unetbootin][2], an open source tool, cross platform tool that creates a live USB. You don’t need to be running Linux to use it. In the instructions that below, I’m running Unetbootin on a MacBook. + +### Getting to work ### + +Plug your flash drive into a USB port on your computer and then fire up Unetbootin. You’ll be asked for the password that you use to log into your computer. + +![Unetbootin main window](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-main.png) + +Remember the ISO image that was mentioned a few moments ago? There are two ways you can get one: either by downloading it from the website of the Linux distribution that you want to try, or by having Unetbootin download it for you. To do that latter, click **Select Distribution** at the top of the window, choose the distribution that you want to download, and then click **Select Version** to select the version of the distribution that you want to try. + +![Downloading a Linux distribution](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-download-distro.png) + +Or, you can download the distribution yourself. Usually, the Linux distributions that I want to try aren’t in the list. If you go the second route, click **Disk image** and then click the button to search for the .iso file that you downloaded. + +Notice the **Space used to preserve files across reboots (Ubuntu only)** option? If you’re testing Ubuntu or one of its derivatives (like Lubuntu or Xubuntu), you can set aside a few megabytes of space on your flash drive to save files like web browser bookmarks or documents that you create. When you load Ubuntu from the flash drive again, you can reuse those files. + +![Ready to create a live USB](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-ready-to-go.png) + +Once the ISO image is loaded, click **OK**. It takes anywhere from a couple of minutes to 10 minutes for Unetbootin to create the live USB. + +![Creating the live USB](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-creating-disk.png) + +### Testing out the live USB ### + +This is the point where you have to embrace your inner geek a bit. Not too much, but you will be taking a peek into the innards of your computer by going into the [BIOS][3]. Your computer’s BIOS starts various bits of hardware and controls where the computer’s operating system starts, or boots, from. + +The BIOS usually looks for the operating system in this order (or something like it): hard drive, then CD-ROM or DVD drive, and then an external drive. You’ll want to change that order so that the external drive (in this case, your live USB) is the one that the BIOS checks first. + +To do that, restart your computer with the flash drive plugged into a USB port. When you see the message **Press F2 to enter setup**, do just that. On some computers, the key might be F10. + +In the BIOS, use the right arrow key on your keyboard to navigate to the **Boot** menu. You’ll see a list of drives on your computer. Use the down arrow key on your keyboard to navigate to the item labeled **USB HDD** and then press **F6** to move that item to the top of the list. + +Once you’ve done that, press **F10** to save the changes. You’ll be kicked out of the BIOS and your computer will start up. After a short amount of time, you’ll be presented with a menu listing the options for starting the Linux distribution you’re trying out. Select **Run without installing** (or the menu item closest to it). + +Once the desktop loads, you can connect to a wireless or wired network, browse the web, and give the pre-installed software a whirl. You can also check to see if, for example, your printer or scanner works with the Linux distribution you’re testing. If you really, really want to you can also fiddle at the command line. + +### What to expect ### + +Depending on the Linux distribution you’re testing and the speed of the flash drive you’re using, the operating system might take longer to load and it might run a bit slower than it would if it was installed on your hard drive. + +As well, you’ll only have the basic software that the Linux distribution packs out of the box. You generally get a web browser, a word processor, a text editor, a media player, an image viewer, and a set of utilities. That should be enough to give you a feel for what it’s like to use Linux. + +If you decide that you like using Linux, you can install it from the flash drive by double clicking on the installer. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/14/10/test-drive-linux-nothing-flash-drive + +作者:[Scott Nesbitt][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/scottnesbitt +[1]:http://en.wikipedia.org/wiki/ISO_image +[2]:http://unetbootin.sourceforge.net/ +[3]:http://en.wikipedia.org/wiki/BIOS \ No newline at end of file diff --git a/sources/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md b/sources/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md new file mode 100644 index 0000000000..23bec502f8 --- /dev/null +++ b/sources/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md @@ -0,0 +1,42 @@ +rsync Command to Exclude a List of Files and Directories in Linux +================================================================================ +**rsync** is a very useful and popular linux tool being used for backup and restoring files, but also for comparing and syncing them. We already shown you in the past [how to use rsync command in linux with examples][1] and today we will add a few more useful tricks you can use rsync at. + +### Exclude a list of files and directories ### + +Sometimes when we do large syncs we may wish to exclude a list of files and directories from syncing, in general files that can't by synced like device files and some system files, or files that would take up unnecessary disk space like temporary or cache files. + +First let's make a file called "excluded" (you can name it whatever you wish) and write each folder or file we would like to exclude on a separate line like this. For our example if you wish to do a full backup of your root partition you should exclude devices directories that get created at boot time and directories that hold temporary files, your list may look like this: + +![rsync excluded](http://blog.linoxide.com/wp-content/uploads/2014/10/rsync-excluded.jpg) + +Then you can run the following command to backup your system: + + $ sudo rsync -aAXhv --exclude-from=excluded / /mnt/backup + +![rsync exclude file](http://blog.linoxide.com/wp-content/uploads/2014/10/rsync-exclude-file.jpg) + +### Exclude files from the command line ### + +You can also exclude files directly from the command line, this is useful when you have a smaller number of files to exclude and you wish to include this in a script or crontab and don't want your script or cron to depend on another file to run successful. + +For example if you wish to sync /var to a backup directory but you don't wish to include cache and tmp folder that usualy don't hold important content between restarts you can use the following command: + + $ sudo rsync -aAXhv --exclude={"/var/cache","/var/tmp"} /var /home/adrian/var + +![rsync exclude](http://blog.linoxide.com/wp-content/uploads/2014/10/rsync-exclude.jpg) + +This command will be easy to use in any script or cron and will not depend on another file. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/exclude-files-rsync-examples/ + +作者:[Adrian Dinu][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/adriand/ +[1]:http://linoxide.com/how-tos/rsync-copy/ \ No newline at end of file From 623892b120b794dc9c97a5753b71b7cd9372c36b Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 30 Oct 2014 16:22:09 +0800 Subject: [PATCH 049/316] =?UTF-8?q?PUB:Wine=201.7.29=20(Development=20Vers?= =?UTF-8?q?ion)=20Released=20=E2=80=93=20Install=20in=20RedHat=20and=20Deb?= =?UTF-8?q?ian=20Based=20Systems?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @SPccman --- ... – Install in RedHat and Debian Based Systems.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) rename {translated/tech => published}/Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md (92%) diff --git a/translated/tech/Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md b/published/Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md similarity index 92% rename from translated/tech/Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md rename to published/Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md index 322ce30076..6c5720bd9b 100644 --- a/translated/tech/Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md +++ b/published/Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md @@ -1,10 +1,11 @@ -Wine 1.7.29(开发版本)已发布-在基于RedHat与Debian的系统上安装 +在基于RedHat与Debian的系统上安装Wine 最新的开发版本 ========================= + **Wine**,一个在Linux平台上非常受欢迎并且强大的开源应用,有了它,我们可以在Linux平台上完美运行Windows应用与游戏。 ![Install Wine (Development Version) in Linux](http://www.tecmint.com/wp-content/uploads/2014/05/Install-Wine-Development-Version.png) -在Linux上安装Wine(开发版本) +*在Linux上安装Wine(开发版本)* WineHQ团队,近期宣布了一个新的开发版本**Wine1.7.29**。这个版本带来了诸多重要的特性,并且修复了**44**个bug。 @@ -19,7 +20,7 @@ Wine团队几乎每周都会发布新的开发版本,并且加入许多新特 在官方的 [变更日志][1] 中可以找到关于这个版本更多更深入的细节。 -这篇文章指导你在基于**RedHat**与**Debian**的系统,如CentOS,Fedora,Ubuntu,Linux Mint以及其他的发型版中安装最新的开发版本**Wine 1.7.29**。 +这篇文章指导你在基于**RedHat**与**Debian**的系统,如CentOS,Fedora,Ubuntu,Linux Mint以及其他的发行版中安装最新的开发版本**Wine 1.7.29**。 ##在Linux中安装 Wine 1.7.29 开发版本## @@ -32,8 +33,8 @@ Wine团队几乎每周都会发布新的开发版本,并且加入许多新特 然后,使用如下命令下载Wine最新的开发版本(**1.7.29**)以及解压源码包。 - $cd /tmp - $wget http://citylan.dl.sourceforge.net/project/wine/Source/wine-1.7.29.tar.bz2 + $ cd /tmp + $ wget http://citylan.dl.sourceforge.net/project/wine/Source/wine-1.7.29.tar.bz2 $ tar -xvf wine-1.7.29.tar.bz2 -C /tmp/ 接下来,使用下列命令编译及安装Wine。 @@ -85,7 +86,7 @@ via: http://www.tecmint.com/install-wine-in-linux/ 作者:[Ravi Saive][a] 译者:[SPccman](https://github.com/SPccman) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7d0876d4717842120054010f3ffccc734e0fdb51 Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Thu, 30 Oct 2014 22:05:53 +0800 Subject: [PATCH 050/316] =?UTF-8?q?[Translating]=20Linux=20FAQs=20with=20A?= =?UTF-8?q?nswers--How=20to=20fix=20=E2=80=9Chda-duplex=20not=20supported?= =?UTF-8?q?=20in=20this=20QEMU=20binary=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...--How to fix hda-duplex not supported in this QEMU binary.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md b/sources/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md index eafc88f00c..d89384c5b9 100644 --- a/sources/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md +++ b/sources/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md @@ -1,3 +1,5 @@ +Translating------geekpi + Linux FAQs with Answers--How to fix “hda-duplex not supported in this QEMU binary” ================================================================================ > **Question**: When I try to install Linux on a new VM in virt-manager, the VM fails to boot with the following error: "unsupported configuration: hda-duplex not supported in this QEMU binary." How can I fix this error? From 0939c9c62d5ec4f80fb3485ebb9f12ec9140f025 Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Thu, 30 Oct 2014 22:22:55 +0800 Subject: [PATCH 051/316] =?UTF-8?q?[Translated]=20Linux=20FAQs=20with=20An?= =?UTF-8?q?swers--How=20to=20fix=20=E2=80=9Chda-duplex=20not=20supported?= =?UTF-8?q?=20in=20this=20QEMU=20binary=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...uplex not supported in this QEMU binary.md | 42 ------------------- ...uplex not supported in this QEMU binary.md | 40 ++++++++++++++++++ 2 files changed, 40 insertions(+), 42 deletions(-) delete mode 100644 sources/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md create mode 100644 translated/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md diff --git a/sources/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md b/sources/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md deleted file mode 100644 index d89384c5b9..0000000000 --- a/sources/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md +++ /dev/null @@ -1,42 +0,0 @@ -Translating------geekpi - -Linux FAQs with Answers--How to fix “hda-duplex not supported in this QEMU binary” -================================================================================ -> **Question**: When I try to install Linux on a new VM in virt-manager, the VM fails to boot with the following error: "unsupported configuration: hda-duplex not supported in this QEMU binary." How can I fix this error? - -The cause for this VM error may originate from a qemu bug where a configured default sound card model is not recognized. - -![](https://farm4.staticflickr.com/3935/15000012754_b8b147fb16_o.png) - - Unable to complete install: 'unsupported configuration: hda-duplex not supported in this QEMU library' - -To solve this problem, do the following. - -### Solution One: Virt-Manager ### - -On **virt-manager**, open the VM's virtual hardware details menu, go to sound device section, and change the device model from default to ac97. - -![](https://farm4.staticflickr.com/3956/15435183020_d97856170c_z.jpg) - -Click on "Apply" button to save the change. See if you can start the VM now. - -### Solution Two: Virsh ### - -If you are using **virsh**, not **virt-manager**, you can edit the VM's XML file accordingly. Look for **sound** section inside section, and change the sound model to **ac97** as follows. - - - . . . - -
- - . . . - - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/hda-duplex-not-supported-in-this-qemu-binary.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/translated/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md b/translated/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md new file mode 100644 index 0000000000..e3a6f3b4af --- /dev/null +++ b/translated/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md @@ -0,0 +1,40 @@ +Linux 有问必答 -- 如何修复“hda-duplex not supported in this QEMU binary”(hda-duplex在此QEMU文件中不支持) +================================================================================ +> **提问**: 当我尝试在虚拟机中安装一个新的Linux时,虚拟机不能启动且报了下面这个错误:“不支持的配置:hda-duplex在此QEMU文件中不支持。” 我该如何修复? + +这个错误可能来自一个当默认声卡型号不能被识别时的一个qemu bug。 + +![](https://farm4.staticflickr.com/3935/15000012754_b8b147fb16_o.png) + + 无法完成安装:‘不支持的配置:hda-duplex在此QEMU文件中不支持’ + +要解决这个问题,按照下面的做。 + +### 方案一: virt-manager ### + +在**virt-manager**中,打开虚拟机的虚拟硬件详细菜单,进入声卡选项,改变默认的设备型号为ac97。 + +![](https://farm4.staticflickr.com/3956/15435183020_d97856170c_z.jpg) + +点击“应用”按钮并保存设置。看一下虚拟机现在是否可以启动了。 + +### 方案二: Virsh ### + +如果你使用的是**virt-manager** 而不是**virt-manager**, 你可以编辑VM相应的配置文件。在节点中查找**sound**节点,并按照下面的默认声卡型号改成**ac97**。 + + + . . . + +
+ + . . . + + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/hda-duplex-not-supported-in-this-qemu-binary.html + +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file From 7bcf9e715a5c11a68284c63664c537e9d790bf13 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 30 Oct 2014 23:10:39 +0800 Subject: [PATCH 052/316] PUB:20140922 How to use logrotate to manage log files in Linux @GOLinux --- ...e logrotate to manage log files in Linux.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename {translated/tech => published}/20140922 How to use logrotate to manage log files in Linux.md (90%) diff --git a/translated/tech/20140922 How to use logrotate to manage log files in Linux.md b/published/20140922 How to use logrotate to manage log files in Linux.md similarity index 90% rename from translated/tech/20140922 How to use logrotate to manage log files in Linux.md rename to published/20140922 How to use logrotate to manage log files in Linux.md index c4f03e9dcc..abe0d52984 100644 --- a/translated/tech/20140922 How to use logrotate to manage log files in Linux.md +++ b/published/20140922 How to use logrotate to manage log files in Linux.md @@ -1,8 +1,8 @@ Linux日志文件总管——logrotate ================================================================================ -日志文件包含了关于系统中发生的事件的有用信息,在排障过程中或者系统性能分析时经常被用到。对于忙碌的服务器,日志文件大小会快速增长,服务器会很快消耗磁盘空间,这成了个问题。除此之外,处理一个单个的庞大日志文件也常常是件十分棘手的事。 +日志文件包含了关于系统中发生的事件的有用信息,在排障过程中或者系统性能分析时经常被用到。对于忙碌的服务器,日志文件大小会增长极快,服务器会很快消耗磁盘空间,这成了个问题。除此之外,处理一个单个的庞大日志文件也常常是件十分棘手的事。 -logrotate是个十分有用的工具,它可以自动对日志进行分解(或轮循)、压缩以及删除旧日志文件。例如,你可以设置logrotate,让/var/log/foo日志文件每30天轮循,并删除超过6个月的日志。配置完后,logrotate的运作完全自动化,不必进行任何进一步的认为干预。另外,旧日志也可以通过电子邮件发送,不过该选项超出了本教程的讨论范围。 +logrotate是个十分有用的工具,它可以自动对日志进行截断(或轮循)、压缩以及删除旧的日志文件。例如,你可以设置logrotate,让/var/log/foo日志文件每30天轮循,并删除超过6个月的日志。配置完后,logrotate的运作完全自动化,不必进行任何进一步的人为干预。另外,旧日志也可以通过电子邮件发送,不过该选项超出了本教程的讨论范围。 主流Linux发行版上都默认安装有logrotate包,如果出于某种原因,logrotate没有出现在里头,你可以使用apt-get或yum命令来安装。 @@ -50,16 +50,16 @@ logrotate的配置文件是/etc/logrotate.conf,通常不需要对它进行修 - **rotate 5**: 一次将存储5个归档日志。对于第六个归档,时间最久的归档将被删除。 - **compress**: 在轮循任务完成后,已轮循的归档将使用gzip进行压缩。 - **delaycompress**: 总是与compress选项一起用,delaycompress选项指示logrotate不要将最近的归档压缩,压缩将在下一次轮循周期进行。这在你或任何软件仍然需要读取最新归档时很有用。 -- **missingok**: 在日志轮循其间,任何错误将被忽略,例如“文件无法找到”之类的错误。 +- **missingok**: 在日志轮循期间,任何错误将被忽略,例如“文件无法找到”之类的错误。 - **notifempty**: 如果日志文件为空,轮循不会进行。 - **create 644 root root**: 以指定的权限创建全新的日志文件,同时logrotate也会重命名原始日志文件。 -- **postrotate/endscript**: 在所有其它指令完成后,postrotate和endscript之间指定的命令将被执行。在这种情况下,rsyslogd 进程将立即再次读取其配置并继续运行。 +- **postrotate/endscript**: 在所有其它指令完成后,postrotate和endscript里面指定的命令将被执行。在这种情况下,rsyslogd 进程将立即再次读取其配置并继续运行。 上面的模板是通用的,而配置参数则根据你的需求进行调整,不是所有的参数都是必要的。 ### 样例二 ### -在本例中,我们只想要轮循一个日志文件,然而日志文件大小会增长到50MB。 +在本例中,我们只想要轮循一个日志文件,然而日志文件大小可以增长到50MB。 # vim /etc/logrotate.d/log-file @@ -92,7 +92,7 @@ logrotate的配置文件是/etc/logrotate.conf,通常不需要对它进行修 endscript } -这将导致归档文件在它们的文件名中包含日期信息。 +这将让归档文件在它们的文件名中包含日期信息。 ### 排障 ### @@ -120,7 +120,7 @@ logrotate的配置文件是/etc/logrotate.conf,通常不需要对它进行修 正如我们从上面的输出结果可以看到的,logrotate判断该轮循是不必要的。如果文件的时间小于一天,这就会发生了。 -#### 3. 强制运行 #### +#### 3. 强制轮循 #### 即使轮循条件没有满足,我们也可以通过使用‘-f’选项来强制logrotate轮循日志文件,‘-v’参数提供了详细的输出。 @@ -153,7 +153,7 @@ logrotate的配置文件是/etc/logrotate.conf,通常不需要对它进行修 running postrotate script compressing log with: /bin/gzip -#### 4. Logrotate记录日志 #### +#### 4. Logrotate的记录日志 #### logrotate自身的日志通常存放于/var/lib/logrotate/status目录。如果处于排障目的,我们想要logrotate记录到任何指定的文件,我们可以指定像下面这样从命令行指定。 @@ -192,7 +192,7 @@ via: http://xmodulo.com/2014/09/logrotate-manage-log-files-linux.html 作者:[Sarmed Rahman][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 03b7164590a5a249334befc0f8d20b901467919a Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 30 Oct 2014 23:20:38 +0800 Subject: [PATCH 053/316] PUB:20141017 Linux FAQs with Answers--How to create a video DVD on Linux desktop @GOLinux --- ... with Answers--How to create a video DVD on Linux desktop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {translated/tech => published}/20141017 Linux FAQs with Answers--How to create a video DVD on Linux desktop.md (98%) diff --git a/translated/tech/20141017 Linux FAQs with Answers--How to create a video DVD on Linux desktop.md b/published/20141017 Linux FAQs with Answers--How to create a video DVD on Linux desktop.md similarity index 98% rename from translated/tech/20141017 Linux FAQs with Answers--How to create a video DVD on Linux desktop.md rename to published/20141017 Linux FAQs with Answers--How to create a video DVD on Linux desktop.md index f95827799e..169c19171b 100644 --- a/translated/tech/20141017 Linux FAQs with Answers--How to create a video DVD on Linux desktop.md +++ b/published/20141017 Linux FAQs with Answers--How to create a video DVD on Linux desktop.md @@ -67,7 +67,7 @@ via: http://ask.xmodulo.com/create-video-dvd-linux-desktop.html 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 383fd5e7797905cb7abda26b0ca5cbbcbeb06960 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 30 Oct 2014 23:41:16 +0800 Subject: [PATCH 054/316] =?UTF-8?q?PUB:20140829=206=20Interesting=20Funny?= =?UTF-8?q?=20Commands=20of=20Linux=20(Fun=20in=20Terminal)=20=E2=80=93=20?= =?UTF-8?q?Part=20II?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wangjiezhe --- ...ds of Linux (Fun in Terminal) – Part II.md | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) rename {translated/tech => published}/20140829 6 Interesting Funny Commands of Linux (Fun in Terminal) – Part II.md (89%) diff --git a/translated/tech/20140829 6 Interesting Funny Commands of Linux (Fun in Terminal) – Part II.md b/published/20140829 6 Interesting Funny Commands of Linux (Fun in Terminal) – Part II.md similarity index 89% rename from translated/tech/20140829 6 Interesting Funny Commands of Linux (Fun in Terminal) – Part II.md rename to published/20140829 6 Interesting Funny Commands of Linux (Fun in Terminal) – Part II.md index 84dc635d0d..8cce36ecbb 100644 --- a/translated/tech/20140829 6 Interesting Funny Commands of Linux (Fun in Terminal) – Part II.md +++ b/published/20140829 6 Interesting Funny Commands of Linux (Fun in Terminal) – Part II.md @@ -1,12 +1,13 @@ -6个有趣的Linux命令行工具(终端中的乐趣)—— 第二部分 +终端中的乐趣:6个有趣的Linux命令行工具 ================================================================================ 之前, 我们展示了一些有关有趣的 Linux 命令行命令的文章, 这些文章告诉我们, Linux 并不像看起来那样复杂, 如果我们知道如何使用的话, 反而会非常有趣. Linux 命令行可以简洁而完美地执行一些复杂的任务, 并且十分有趣. - [Linux命令及Linux终端的20个趣事][3] -- [Fun in Linux Terminal – Play with Word and Character Counts][2] +- [Linux终端的乐趣之把玩字词计数][2] ![Funny Linux Commands](http://www.tecmint.com/wp-content/uploads/2014/08/Funny-Linux-Commands.png) -有趣的 Linux 命令 + +*有趣的 Linux 命令* 前者包含了20个有趣的 Linux 命令/脚本(和子命令), 得到了读者的高度赞扬. 而另一篇文章虽然没有之前那篇文章那么受欢迎,包含了一些命令/脚本和改进,让你能够玩儿转文本文件、单词和字符串. @@ -27,9 +28,10 @@ $ echo "Tecmint[dot]com is a community of Linux Nerds and Geeks" | pv -qL 10 ![pv command in action](http://www.tecmint.com/wp-content/uploads/2014/08/pv-command.gif) -正在运行的 pv 命令 -**注意**: '**q**' 选项表示'安静',没有其他输出信息, '**L**' 选项表示每秒转化的字节数上限. 数字变量可以调整任何一个方向(必须是整数) 来获得所需的模拟文本. +*正在运行的 pv 命令* + +**注意**: '**q**' 选项表示'安静',没有其他输出信息, '**L**' 选项表示每秒转化的字节数上限. 调整数字的值(必须是整数)可以以另外的方向显示文字效果。 ### 2. toilet 命令 ### @@ -38,7 +40,8 @@ $ while true; do echo “$(date | toilet -f term -F border –Tecmint)”; sleep 1; done ![toilet command in action](http://www.tecmint.com/wp-content/uploads/2014/08/toilet-command.gif) -正在运行的 toilet 命令 + +*正在运行的 toilet 命令* **注意**: 上面的脚本需要使用 **ctrl+z** 键来暂停. @@ -49,7 +52,8 @@ # rig ![rig command in action](http://www.tecmint.com/wp-content/uploads/2014/08/rig-command.gif) -正在运行的 rig 命令 + +*正在运行的 rig 命令* ### 4. aview 命令 ### @@ -58,7 +62,8 @@ $ asciiview elephant.jpg -driver curses ![aview command in action](http://www.tecmint.com/wp-content/uploads/2014/08/elephant.gif) -正在运行的 aview 命令 + +*正在运行的 aview 命令* ### 5. xeyes 命令 ### @@ -67,7 +72,8 @@ $ xeyes ![xeyes command in action](http://www.tecmint.com/wp-content/uploads/2014/08/xeyes.gif) -正在运行的 xeyes 命令 + +*正在运行的 xeyes 命令* ### 6. cowsay 命令 ### @@ -80,14 +86,16 @@ $ cowsay -f elephant-in-snake Tecmint is Best ![cowsay command in action](http://www.tecmint.com/wp-content/uploads/2014/08/cowsay.gif) -正在运行的 cowsay 命令 + +*正在运行的 cowsay 命令* 换作山羊又会怎样? $ cowsay -f gnu Tecmint is Best ![cowsay goat in action](http://www.tecmint.com/wp-content/uploads/2014/08/cowsay-goat.gif) -正在运行的 山羊cowsay 命令 + +*正在运行的 山羊cowsay 命令* 今天就到这里吧. 我将带着另一篇有趣的文章回来. 不要忘记在下面留下您的评论. @@ -103,6 +111,6 @@ via: http://www.tecmint.com/linux-funny-commands/ [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/20-funny-commands-of-linux-or-linux-is-fun-in-terminal/ -[2]:http://www.tecmint.com/play-with-word-and-character-counts-in-linux/ +[2]:http://linux.cn/article-4088-1.html [3]:http://linux.cn/article-2831-1.html [4]:http://aa-project.sourceforge.net/aview/ From fec865c9dce7627cc0c86002530be47d7cda9154 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 30 Oct 2014 23:56:14 +0800 Subject: [PATCH 055/316] PUB:20141009 Linux or UNIX wget command with practical examples @GOLinux --- ...IX wget command with practical examples.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) rename {translated/tech => published}/20141009 Linux or UNIX wget command with practical examples.md (85%) diff --git a/translated/tech/20141009 Linux or UNIX wget command with practical examples.md b/published/20141009 Linux or UNIX wget command with practical examples.md similarity index 85% rename from translated/tech/20141009 Linux or UNIX wget command with practical examples.md rename to published/20141009 Linux or UNIX wget command with practical examples.md index 7a720c725b..429e997c1d 100644 --- a/translated/tech/20141009 Linux or UNIX wget command with practical examples.md +++ b/published/20141009 Linux or UNIX wget command with practical examples.md @@ -1,16 +1,16 @@ -Linux/Unix wget命令实例 +wget 命令实例 ================================================================================ wget是Linux/Unix命令行**文件下载器**,它是下载网站上文件的免费的非交互下载工具,它支持**HTTP**、**HTTPS**和**FTP**协议,也支持通过HTTP代理检索。Wget是非交互的,这就是说它可以在用户没有登录到系统时在后台工作。 在本帖中,我们将讨论wget命令的一些不同使用实例。 -### 实例:1 下载单个文件 ### +### 实例1 :下载单个文件 ### # wget http://mirror.nbrc.ac.in/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso 该命令会下载CentOS 7 ISO文件到用户当前工作目录中。 -### 实例:2 续传分段下载文件 ### +### 实例2:续传分段下载文件 ### 总有那么一些场景,当我们开始下载一个大文件时,中途互联网却断开了。那样的话,我们可以使用wget命令的‘**-c**’选项,让下载从断点续传。 @@ -18,7 +18,7 @@ wget是Linux/Unix命令行**文件下载器**,它是下载网站上文件的 ![](http://www.linuxtechi.com/wp-content/uploads/2014/09/wget-resume-download-1024x111-1.jpg) -### 实例:3 后台下载文件 ### +### 实例3:后台下载文件 ### 我们可以通过在wget命令中使用‘-b’选项来让它在后台下载文件。 @@ -43,7 +43,7 @@ wget是Linux/Unix命令行**文件下载器**,它是下载网站上文件的 2800K ………. ………. ………. ………. ………. 0% 58.2K 18h16m 2850K ………. ………. ………. ………. ………. 0% 52.2K 18h20m -### 实例:4 限制下载速率 ### +### 实例4:限制下载速率 ### 默认情况下,wget命令尝试以全速下载,但是有时候你可能使用的是共享互联网,那么如果你尝试使用wget来下载庞大的文件时,就会把其它用户的网络拖慢。这时,你如果使用‘-limit-rate’选项来限制下载速率,就可以避免这种情况的发生。 @@ -51,7 +51,7 @@ wget是Linux/Unix命令行**文件下载器**,它是下载网站上文件的 在上例中,下载速率被限制到了100k。 -### 实例:5 使用‘-i’选项来下载多个文件 ### +### 实例5:使用‘-i’选项来下载多个文件 ### 如果你想要使用wget命令来下载多个文件,那么首先要创建一个文本文件,并将所有的URL添加到该文件中。 @@ -65,15 +65,15 @@ wget是Linux/Unix命令行**文件下载器**,它是下载网站上文件的 # wget -i download-list.txt -### 实例:6 增加重试次数 ### +### 实例6:增加重试次数 ### -我们可以使用‘-tries’选项来增加重试次数。默认情况下,wget命令会重试20次以使下载成功。 +我们可以使用‘-tries’选项来增加重试次数。默认情况下,wget命令会重试20次,直到下载成功。 该选项在你下载一个大文件的过程中互联网连接发生问题时十分有用,因为在那种情况下,会增加下载失败的几率。 # wget --tries=75 http://mirror.nbrc.ac.in/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso -### 实例:7 使用-o选项来重定向wget日志到文件 ### +### 实例7:使用-o选项来重定向wget日志到文件 ### 我们可以使用‘-o’选项来重定向wget命令的日志到一个日志文件。 @@ -81,7 +81,7 @@ wget是Linux/Unix命令行**文件下载器**,它是下载网站上文件的 上面的命令会在用户当前目录下创建download.log文件。 -### 实例:8 下载整个网站用于本地查看 ### +### 实例8:下载整个网站用于本地查看 ### # wget --mirror -p --convert-links -P ./ website-url @@ -92,21 +92,21 @@ wget是Linux/Unix命令行**文件下载器**,它是下载网站上文件的 - **–convert-links** : 下载完成后,转换文档中的链接以用于本地查看。 - -**P ./Local-Folder** : 保存所有文件和目录到指定的目录。 -### 实例:9 下载过程中拒绝文件类型 ### +### 实例9:下载过程中拒绝文件类型 ### 当你正打算下载整个网站时,我们可以使用‘-reject’选项来强制wget不下载图片。 # wget --reject=png Website-To-Be-Downloaded -### 实例:10 使用wget -Q设置下载配额 ### +### 实例10:使用wget -Q设置下载配额 ### 我们可以使用‘-Q’选项强制wget命令在下载大小超过特定大小时退出下载。 # wget -Q10m -i download-list.txt -注意,配额不会对单个文件的下载产生影响。所以,如果你指定wget -Q10m ftp://wuarchive.wustl.edu/ls-lR.gz,ls-lR的全部内容都会被下载。这在下载命令行指定的多个URL时也一样。然而,在递归或从一个输入文件检索时,还是值得一用。因此,你可以安全地输入‘wget -Q10m -i download-list.txt’,在超过配额时,下载会退出。 +注意,配额不会对单个文件的下载产生影响。所以,如果你指定wget -Q10m ftp://wuarchive.wustl.edu/ls-lR.gz,ls-lR.gz的全部内容都会被下载。这在下载命令行指定的多个URL时也一样。然而,在递归或从一个输入文件检索时,还是值得一用。因此,你可以安全地输入‘wget -Q10m -i download-list.txt’,在超过配额时,下载会退出。 -### 实例:11 从密码保护的网站下载文件 ### +### 实例11:从密码保护的网站下载文件 ### # wget --ftp-user= --ftp-password= Download-URL @@ -120,7 +120,7 @@ via: http://www.linuxtechi.com/wget-command-practical-examples/ 作者:[Pradeep Kumar][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 3d959e81d7daa842f57aec96ee1ef0f6781e9acc Mon Sep 17 00:00:00 2001 From: barney-ro Date: Fri, 31 Oct 2014 14:39:48 +0800 Subject: [PATCH 056/316] [translating]20141027 Handy Disk Image Tools --- sources/share/20141027 Handy Disk Image Tools.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20141027 Handy Disk Image Tools.md b/sources/share/20141027 Handy Disk Image Tools.md index b69a0962b0..6cbd2caf33 100644 --- a/sources/share/20141027 Handy Disk Image Tools.md +++ b/sources/share/20141027 Handy Disk Image Tools.md @@ -1,3 +1,5 @@ +barney-ro translating + Handy Disk Image Tools ================================================================================ Disk images are computer files of a disk volume or an entire data storage device, such as a hard drive, optical disk (e.g. DVD, CD, Blu-ray), tape drive, USB flash drive, or floppy disk. A disk image represents the content exactly as it is on the original storage device, including both data and structure information. @@ -158,7 +160,7 @@ Features include: via: http://www.linuxlinks.com/article/20141025082352476/DiskImageTools.html 作者:Frazer Kline -译者:[译者ID](https://github.com/译者ID) +译者:[barney-ro](https://github.com/barney-ro) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1f387ffb07b1c259bc46b110939ba8c2fced2607 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Fri, 31 Oct 2014 15:24:55 +0800 Subject: [PATCH 057/316] =?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 --- .../20140915 10 Open Source Cloning Software For Linux Users.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/talk/20140915 10 Open Source Cloning Software For Linux Users.md b/translated/talk/20140915 10 Open Source Cloning Software For Linux Users.md index 9dddef3570..1fef50289f 100644 --- a/translated/talk/20140915 10 Open Source Cloning Software For Linux Users.md +++ b/translated/talk/20140915 10 Open Source Cloning Software For Linux Users.md @@ -12,7 +12,7 @@ Clonezilla 是一个基于 Ubuntu 和 Debian 的 Live CD。它可以像 Windows ![](http://1-ps.googleusercontent.com/h/www.efytimes.com/admin/useradmin/rte/my_documents/my_pictures/600x450xZ34_clonezilla-600x450.png.pagespeed.ic.8Jq7pL2dwo.png) -### 2. [Redo Backup][2]:### +### 2. [Redo Backup][2]:### Redo Backup 是另一个用来方便地克隆磁盘的 Live CD。它是自由和开源的软件,使用 GPL 3 许可协议授权。它的主要功能和特点包括从 CD 引导的简单易用的 GUI、无需安装,可以恢复 Linux 和 Windows 等系统、无需登陆访问文件,以及已删除的文件等。 From 26511f2d24427b6bdb19b6c032129c26659aa0ff Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 31 Oct 2014 16:53:28 +0800 Subject: [PATCH 058/316] Translating by ZTinoZ --- ...valds' Best Quotes from LinuxCon Europe 2014.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md b/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md index 93c1421407..37b15fd779 100644 --- a/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md +++ b/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md @@ -18,17 +18,17 @@ Linus Torvalds在那天的 [欧洲LinuxCon和CloudOpen大会][1] 上说,从他 在英特尔的Linux及开源技术专家Dirk Hohndel的问答环节里,Torvalds 谈了社区里的一些现状和内核开发进展,谈了怎么成为一名内核开发者以及Linux的未来。以下是对话中的一些闪光点。 -**1.** “The speed of development has not really slowed down the last few years. We have had around 10,000 patches every release from more than 1,000 people and the end result has been very good.” +**1.** “在过去的几年里,我们开发的速度真的没有慢下来。每个版本我们都能从超过1000个人中得到大约100000个补丁,最终效果自然是非常好的。” -**2.** Dirk Hohndel: “You said you wanted subsystem maintainers to consider following the x86 model and have more than one maintainer share the role. How about applying your own advice at the top? +**2.** Dirk Hohndel: “你说你希望不只一个子系统的维护人员考虑对x86模型产生兴趣,你是怎么把自己的建议应用到实际中的? -Torvalds: “I'll probably have to do that someday. Right now I'm not getting a lot of complaints for not being responsive. Being responsive is one of the most important things a kernel developer at any level can be... So far, partly thanks to Git, I've been able to keep up.” +Torvalds: “某一天我可能不得不这么做。目前我还没有收到关于不主动的任何投诉。主动是一个内核开发者最重要的东西,不论水平档次...迄今为止,一定程度上要感谢Git,我才能一直保持着前进的动力。” -**3.** “A lot of people want to have market share numbers, lots of users, because that's how they view their self worth. For me, one of the most important things for Linux is having a big community that is actively testing new kernels; it's the only way to support the absolute insane amount of different hardware we deal with.” +**3.** “很多人都想要得到市场份额数,包括很多用户,因为那是体现自我价值的一种方式。就我来说,对Linux最重要的事情之一,就是拥有一个一直在不停测试新内核的大社区,这是支持我们处理大量硬件问题的唯一办法。” -**4.** Hohndel: “If you could change a single decision you've made in the last 23 years, what would you do differently?” +**4.** Hohndel: “如果你能改变在过去23年里尼做过的一个决策,你会怎么做?” -Torvalds: “From a technical standpoint, no single decision has ever been that important... The problems tend to be around alienating users or developers and I'm pretty good at that. I use strong language. But again there's not a single instance I'd like to fix. There's a metric shitload of those.” +Torvalds: “从技术角度看,no single decision has ever been that important... The problems tend to be around alienating users or developers and I'm pretty good at that. I use strong language. But again there's not a single instance I'd like to fix. There's a metric shitload of those.” **5.** “Most people even if though they don't always necessarily like each other, do tend to respect the code they generate. For Linux that's the important part. What really matters is people are very involved in generating the best technology we can.” @@ -51,7 +51,7 @@ Torvalds: “The boldest prediction I can say is, I will probably release rc1 in via: http://www.linux.com/news/featured-blogs/200-libby-clark/791788-linus-torvalds-best-quotes-from-linuxcon-europe-2014 作者:[Libby Clark][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 3629092c0dab26a065c5e1260f30a50a5b4ef6f6 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 31 Oct 2014 17:51:26 +0800 Subject: [PATCH 059/316] Translating by ZTinoZ --- ...valds' Best Quotes from LinuxCon Europe 2014.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md b/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md index 37b15fd779..b043c18f0a 100644 --- a/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md +++ b/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md @@ -28,19 +28,19 @@ Torvalds: “某一天我可能不得不这么做。目前我还没有收到关 **4.** Hohndel: “如果你能改变在过去23年里尼做过的一个决策,你会怎么做?” -Torvalds: “从技术角度看,no single decision has ever been that important... The problems tend to be around alienating users or developers and I'm pretty good at that. I use strong language. But again there's not a single instance I'd like to fix. There's a metric shitload of those.” +Torvalds: “从技术角度来看,没有哪个决定重要到这个程度...有个问题是慢慢地疏远了用户和开发者,而我却恰恰很擅长这个。我说了粗话,但是这不是我想要改变的某一个决定,这些粗话应该有所限制。” -**5.** “Most people even if though they don't always necessarily like each other, do tend to respect the code they generate. For Linux that's the important part. What really matters is people are very involved in generating the best technology we can.” +**5.** “大多数人即使他们不一定彼此喜欢,但会尊重他们写出的代码。对于Linux来说这是很重要的一部分。真正重要的是大家都在尽自己所能产出最佳的代码。” -**6.** “On the internet nobody can hear you being subtle.” +**6.** “在互联网上没人能察觉到渺小的你。” -**7.** “One of the reasons we have this culture of strong language, that admittedly many people find off-putting, is that when it comes to technical people with strong opinions and with a strong drive to do something technically superior, you end up having these opinions show up as sometimes pretty strong language.” +**7.** “我们说粗话这个传统导致很多人倒胃口,其中有一个原因是当有强烈的意愿和推动力的技术人员要做一些技术上的进步时,你就需要用一些强烈的语言来表达你的意愿。” -**8.** Hohndel: What will you tell a student who wants to become the next Linus? +**8.** Hohndel: “你跟那个想成为下一个Linus的学生是怎么说的?” -Torvalds: “Find something that you're passionate about and just do it.” +Torvalds: “寻找能让你充满热情的事情并去完成它。” -**9.** “Becoming a maintainer is easy; you just need an infinite amount of time and respond to email from random people.” +**9.** “成为一个维护人员很容易,你只需要无限的时间并且回复人们的邮件就行。” **10.** Hohndel: “Make a bold prediction about the future of Linux.” From 3cec9a8360738051096be62c9b3a918d2905706c Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Fri, 31 Oct 2014 19:20:15 +0800 Subject: [PATCH 060/316] translating --- ...wers--How to open a port in the firewall on CentOS or RHEL.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md b/sources/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md index 32277122b3..c36dcac0e8 100644 --- a/sources/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md +++ b/sources/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md @@ -1,3 +1,4 @@ +[translating by KayGuoWhu] Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL ================================================================================ > **Question**: I am running a web/file server on my CentOS box, and to access the server remotely, I need to modify a firewall to allow access to a TCP port on the box. What is a proper way to open a TCP/UDP port in the firewall of CentOS/RHEL? From 5daacff93c8c49ac8ea85ff575cae50d73cdd81d Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Sat, 1 Nov 2014 09:57:06 +0800 Subject: [PATCH 061/316] [Translating] Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL --- ...Answers--How to install REMI repository on CentOS or RHEL.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md b/sources/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md index 10f5805987..e82b3faa70 100644 --- a/sources/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md +++ b/sources/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md @@ -1,3 +1,5 @@ +Translating--------geekpi + Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL ================================================================================ > **Question**: How can I configure the REMI repository on CentOS or RHEL, and install packages from the REMI repository? From 172e156f5f74bfe6ab832a97c978458ede19d65e Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Sat, 1 Nov 2014 10:35:44 +0800 Subject: [PATCH 062/316] [Translated] Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL --- ...stall REMI repository on CentOS or RHEL.md | 54 ------------------- ...stall REMI repository on CentOS or RHEL.md | 52 ++++++++++++++++++ 2 files changed, 52 insertions(+), 54 deletions(-) delete mode 100644 sources/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md create mode 100644 translated/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md diff --git a/sources/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md b/sources/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md deleted file mode 100644 index e82b3faa70..0000000000 --- a/sources/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md +++ /dev/null @@ -1,54 +0,0 @@ -Translating--------geekpi - -Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL -================================================================================ -> **Question**: How can I configure the REMI repository on CentOS or RHEL, and install packages from the REMI repository? - -The [REMI repository][1] offers updated versions of core CentOS and RHEL packages, notably the latest PHP/MySQL stack. - -One thing to remember before installing the REMI repository is that it is not recommended to run yum update with the REMI repository. Since the package names of the REMI repository are the same as those used in the official RHEL/CentOS repositories, running yum update may trigger accidental upgrades of core packages. It is a good idea to keep the REMI repository disabled, and enable it only when you need to install packages that are only available in REMI. - -### Prerequisite ### - -Before installing REMI repository, you first need to enable the EPEL repository because some packages in REMI depend on EPEL. Follow [this guide][2] to set up EPEL repository on CentOS or RHEL. - -### Install REMI Repository ### - -Now go ahead and install REMI repository as follows. - -On CentOS 7: - - $ sudo rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi - $ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm - -On CentOS 6: - - $ sudo rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi - $ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm - -By default, the REMI repository is set disabled. To check whether the REMI repository is successfully installed, use this command. You will see several REMI repositories such as remi, remi-php55 and remi-php56. - - $ yum repolist disabled | grep remi - -![](https://farm4.staticflickr.com/3956/15443851690_a1abe9eb40_z.jpg) - -### Install a Package from REMI Repository ### - -As clarified, it is a good idea to keep the REMI repository disabled, and use it only when necessary. - -To search or install a package in the REMI repository, use these commands: - - $ sudo yum --enablerepo=remi search - $ sudo yum --enablerepo=remi install - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/install-remi-repository-centos-rhel.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://rpms.famillecollet.com/ -[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file diff --git a/translated/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md b/translated/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md new file mode 100644 index 0000000000..66ed92b64d --- /dev/null +++ b/translated/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md @@ -0,0 +1,52 @@ +Linux 有问必答 -- 如何在CentOS或者RHEL上安装REMI仓库 +================================================================================ +> **Question**:我该如何在CentOS或者RHEL中配置REMI仓库,并在其中安装包? + +[REMI 仓库][1] 提供了核心CentOS和RHEL包的更新版本,尤其是最新的PHP/MySQL系列。 + +安装REMI仓库要记住的一件事是不要在REMI仓库中运行yum update。因为REMI仓库的包名RHEL/CentOS中的相同,运行yum update可能会触发意外的更新。一个好办法是禁用REMI仓库,在你需要安装RMEI仓库中独有的包时再启用。 + +### 预备工作 ### + +安装REMI仓库之前,你首先需要启用EPEL仓库,因为REMI中的一些包依赖与EPEL。按照[这份指南][2]在CentOS或者RHEL中设置EPEL仓库。 + +### 安装REMI仓库 ### + +现在按照下面的步骤安装REMI仓库。 + +在CentOS 7上: + + $ sudo rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi + $ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm + +在CentOS 6上: + + $ sudo rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi + $ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm + +默认上,REMI是禁用的。要检查REMI是否已经成功安装,使用这个命令。你会看到几个REMI仓库,比如remi、remi-php55和remi-php56。 + + $ yum repolist disabled | grep remi + +![](https://farm4.staticflickr.com/3956/15443851690_a1abe9eb40_z.jpg) + +### 从REMI仓库中安装一个包 ### + +如上所述,最好保持禁用REMI仓库,只有在需要的时候再启用。 + +要搜索或安装REMI仓库中的包,使用这些命令: + + $ sudo yum --enablerepo=remi search + $ sudo yum --enablerepo=remi install + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-remi-repository-centos-rhel.html + +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://rpms.famillecollet.com/ +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file From 9c31a9021d1f0bf843dba08bfe84494ccef28a2a Mon Sep 17 00:00:00 2001 From: Andy Date: Sat, 1 Nov 2014 19:02:47 +0800 Subject: [PATCH 063/316] Delete 20141024 Amazing 25 Linux Performance Monitoring Tools.md --- ...g 25 Linux Performance Monitoring Tools.md | 292 ------------------ 1 file changed, 292 deletions(-) delete mode 100644 sources/tech/20141024 Amazing 25 Linux Performance Monitoring Tools.md diff --git a/sources/tech/20141024 Amazing 25 Linux Performance Monitoring Tools.md b/sources/tech/20141024 Amazing 25 Linux Performance Monitoring Tools.md deleted file mode 100644 index 9f6f386f33..0000000000 --- a/sources/tech/20141024 Amazing 25 Linux Performance Monitoring Tools.md +++ /dev/null @@ -1,292 +0,0 @@ -andyxue translating -Amazing ! 25 Linux Performance Monitoring Tools -================================================================================ -Over the time our website has shown you how to configure various performance tools for Linux and Unix-like operating systems. In this article we have made a list of the most used and most useful tools to monitor the performance for your box. We provided a link for each of them and split them into 2 categories: command lines one and the ones that offer a graphical interface. - -### Command line performance monitoring tools ### - -#### 1. dstat - Versatile resource statistics tool #### - -A versatile combination of **vmstat**, **iostat** and **ifstat**. It adds new features and functionality allowing you to view all the different resources instantly, allowing you to compare and combine the different resource usage. It uses colors and blocks to help you see the information clearly and easily. It also allows you to export the data in **CVS** format to review it in a spreadsheet application or import in a **database**. You can use this application to [monitor cpu, memory, eth0 activity related to time][1]. - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/dstat.png) - -#### 2. atop - Improved top with ASCII #### - -A command line tool using **ASCII** to display a **performance monitor** that is capable of reporting the activity of all processes. It shows daily logging of system and process activity for long-term analysis and it highlights overloaded system resources by using colors. It includes metrics related to **CPU**, **memory**, **swap**, **disks** and **network layers**. All the functions of atop can be accessed by simply running: - - # atop - -And you will be able to [use the interactive interface to display][2] and order data. - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/atop1.jpg) - -#### 3. Nmon - performance monitor for Unix-like systems #### - -Nmon stands for **Nigel's Monitor** and it's a system monitor tool originally developed for **AIX**. If features an **Online Mode** that uses curses for efficient screen handling, which updates the terminal frequently for real-time monitoring and a **Capture Mode** where the data is saved in a file in **CSV** format for later processing and graphing. - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/nmon_interface.png) - -**More info** in our [nmon performance track article][3]. - -#### 4. slabtop - information on kernel slab cache #### - -This application will show you how the **caching memory allocator** manages in the Linux kernel caches various type of objects. The command is a top like command but is focused on showing real-time kernel slab cache information. It displays a listing of the top caches sorted by one of the listed sort criteria. It also displays a statistics header filled with slab layer information. Here are a few examples: - - # slabtop --sort=a - # slabtop -s b - # slabtop -s c - # slabtop -s l - # slabtop -s v - # slabtop -s n - # slabtop -s o - -**More info** is available [kernel slab cache article][4] - -#### 5. sar - performance monitoring and bottlenecks check #### - -The **sar** command writes to standard output the contents of selected cumulative activity counters in the operating system. The **accounting system**, based on the values in the count and interval parameters, writes information the specified number of times spaced at the specified intervals in seconds. If the interval parameter is set to zero, [the sar command displays the average statistics][5] for the time since the system was started. Useful commands: - - # sar -u 2 3 - # sar –u –f /var/log/sa/sa05 - # sar -P ALL 1 1 - # sar -r 1 3 - # sar -W 1 3 - -#### 6. Saidar - simple stats monitor #### - -Saidar is a **simple** and **lightweight** tool for system information. It doesn't have major performance reports but it does show the most useful system metrics in a short and nice way. You can easily see the [**up-time, average load, CPU, memory, processes, disk and network interfaces**][6] stats. - - Usage: saidar [-d delay] [-c] [-v] [-h] - - -d Sets the update time in seconds - -c Enables coloured output - -v Prints version number - -h Displays this help information. - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/saidar-e1413370985588.png) - -#### 7. top - The classical Linux task manager #### - -top is one of the best known **Linux** utilities, it's a **task manager** found on most **Unix-like** operating systems. It shows the current list of running processes that the user can order using different criteria. It mainly shows how much **CPU** and **memory** is used by the **system processes**. top is a quick place to go a check what process or **processes** hangs your system. You can also find here a [list of examples of top usage][7] . You can access it by running the top command and entering the interactive mode: - - Quick cheat sheet for interactive mode: - - GLOBAL_Commands: ?, =, A, B, d, G, h, I, k, q, r, s, W, Z - SUMMARY_Area_Commands: l, m, t, 1 - TASK_Area_Commands Appearance: b, x, y, z Content: c, f, H, o, S, u Size: #, i, n Sorting: <, >, F, O, R - COLOR_Mapping: , a, B, b, H, M, q, S, T, w, z, 0 - 7 - COMMANDS_for_Windows: -, _, =, +, A, a, G, g, w - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/top.png) - -#### 8. Sysdig - Advanced view of system processes #### - -**Sysdig** is a tool that gives admins and developers unprecedented visibility into the behavior of their systems. The team that develops it wants to improve the way system-level **monitoring** and **troubleshooting** is done by offering a unified, coherent, and granular visibility into the **storage**, **processing**, **network**, and **memory** subsystems making it possible to create trace files for system activity so you can easily analyze it at any time. - -Quick examples: - - # sysdig proc.name=vim - # sysdig -p"%proc.name %fd.name" "evt.type=accept and proc.name!=httpd" - # sysdig evt.type=chdir and user.name=root - # sysdig -l - # sysdig -L - # sysdig -c topprocs_net - # sysdig -c fdcount_by fd.sport "evt.type=accept" - # sysdig -p"%proc.name %fd.name" "evt.type=accept and proc.name!=httpd" - # sysdig -c topprocs_file - # sysdig -c fdcount_by proc.name "fd.type=file" - # sysdig -p "%12user.name %6proc.pid %12proc.name %3fd.num %fd.typechar %fd.name" evt.type=open - # sysdig -c topprocs_cpu - # sysdig -c topprocs_cpu evt.cpu=0 - # sysdig -p"%evt.arg.path" "evt.type=chdir and user.name=root" - # sysdig evt.type=open and fd.name contains /etc - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/sysdig.jpg) - -**More info** is available in our article on [how to use sysdig for improved system-level monitoring and troubleshooting][8] - -#### 9. netstat - Shows open ports and connections #### - -Is the tool **Linux administrators** use to show various **network** information, like what ports are open and what network connections are established and what process runs that connection. It also shows various information about the **Unix sockets** that are open between various programs. It is part of most Linux distributions A lot of the commands are explained in the [article on netstat and its various outputs][9]. Most used commands are: - - $ netstat | head -20 - $ netstat -r - $ netstat -rC - $ netstat -i - $ netstat -ie - $ netstat -s - $ netstat -g - $ netstat -tapn - -### 10. tcpdump - insight on network packets ### - -**tcpdump** can be used to see the content of the **packets** on a **network connection**. It shows various information about the packet content that pass. To make the output useful, it allows you to use various filters to only get the information you wish. A few examples on how you can use it: - - # tcpdump -i eth0 not port 22 - # tcpdump -c 10 -i eth0 - # tcpdump -ni eth0 -c 10 not port 22 - # tcpdump -w aloft.cap -s 0 - # tcpdump -r aloft.cap - # tcpdump -i eth0 dst port 80 - -**You can find them described in** [detail in our article on tcpdump and capturing packets][10] - -#### 11. vmstat - virtual memory statistics #### - -**vmstat** stands for **virtual memory** statistics and it's a **memory monitoring** tool that collects and displays summary information about **memory**, **processes**, **interrupts**, **paging** and **block I/O**. It is an open source program available on most Linux distributions, Solaris and FreeBSD. It is used to diagnose most memory performance problems and much more. - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/vmstat_delay_5.png) - -**More info** in [our article on vmstat commands][11]. - -#### 12. free - memory statistics #### - -Another **command line** tool that will show to standard output a few stats about **memory** usage and swap usage. Because it's a simple tool it can be used to either find **quick information** about memory usage or it can be used in different scripts and applications. You can see that [this small application has a lot of uses][12] and almost all system admin use this tool daily :-) - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/free_hs3.png) - -#### 13. Htop - friendlier top #### - -**Htop** is basically an improved version of top showing more stats and in a more colorful way allowing you to sort them in different ways as you can see in our article. It provides a more a more **user-friendly** interface. - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/htop.png) - -You can find **more info** in [our comparison of htop and top][13] - -#### 14. ss - the modern net-tools replacement #### - -**ss** is part of the **iproute2** package. iproute2 is intended to replace an entire suite of standard **Unix networking tools** that were previously used for the tasks of [configuring network interfaces, routing tables, and managing the ARP table][14]. The ss utility is used to dump socket statistics, it allows showing information similar to **netstat** and its able display more TCP and state information. A few examples: - - # ss -tnap - # ss -tnap6 - # ss -tnap - # ss -s - # ss -tn -o state established -p - -#### 15. lsof - list open files #### - -**lsof** is a command meaning "**list open files**", which is used in many Unix-like systems to report a list of all open files and the processes that opened them. It is used by most Linux distributions and other Unix-like operating systems by **system administrators** to check what files are open by various processes. - - # lsof +p process_id - # lsof | less - # lsof –u username - # lsof /etc/passwd - # lsof –i TCP:ftp - # lsof –i TCP:80 - -You can find **more examples** in the [lsof article][15] - -#### 16. iftop - top for your network connections #### - -**iftop** is yet another top like application that will is based on networking information. It shows various current **network connection** sorted by **bandwidth usage** or the amount of data uploaded or downloaded. It also provides various estimations of the time it will take to download them. - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/iftop.png) - -For **more info** see [article on network traffic with iftop][16] - -#### 17. iperf - network performance tool #### - -**iperf** is a **network testing** tool that can create **TCP** and **UDP** data connections and measure the **performance** of a network that is carrying them. It supports tuning of various parameters related to timing, protocols, and buffers. For each test it reports the bandwidth, loss, and other parameters. - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/iperf-e1413378331696.png) - -If you wish to use the tool check out our article on [how to install and use iperf][17] - -#### 18. Smem - advanced memory reporting #### - -**Smem** is one of the most advanced tools for **Linux** command line, it offers information about the actual **memory** that is used and shared in the system, attempting to provide a more realistic image of the actual **memory** being used. - - $ smem -m - $ smem -m -p | grep firefox - $ smem -u -p - $ smem -w -p - -Check out our [article on Smem for more examples][18] - -### GUI or Web based performance tools ### - -#### 19. Icinga - community fork of Nagios #### - -**Icinga** is **free** and **open source** system and network monitoring application. It’s a fork of Nagios retaining most of the existing features of its predecessor and building on them to add many long awaited patches and features requested by the user community. - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/Icinga-e1413377995731.png) - -**More info** about installing and configuring [can be found in our Icinga article][19]. - -#### 20. Nagios - the most popular monitoring tool. #### - -The most used and popular **monitoring solution** found on Linux. It has a daemon that collects information about various process and has the ability to collect information from remote hosts. All the information is then provided via a nice and powerful **web interface**. - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/nagios-e1413305858732.png) - -You can find **information** on [how to install Nagios in our article][20] - -#### 21. Linux process explorer - procexp for Linux #### - -**Linux process explorer** is a graphical process explorer for **Linux**. It shows various **process information** like the process tree, TCP/IP connections and performance figures for each process. It's a replica of procexp found in Windows and developed by **Sysinternals** and aims to be more user friendly then top and ps. - -Check our [linux process explorer article][21] for more info. - -#### 22. Collectl - performance monitoring tool #### - -This is a **performance monitoring** tool that you can use either in an **interactive mode** or you can have it **write reports** to disk and access them with a web server. It reports statistics on **CPU**, **disk**, **memory**, **network**, **nfs**, **process**, **slabs** and more in easy to read and manage format. - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/collectl.png) - -**More info** in our [Collectl article][22] - -#### 23. MRTG - the classic graph tool #### - -This is a **network traffic** monitor that will provide you **graphs** using the **rrdtool**. It is one of the oldest tools that provides graphics and is one of the most used on Unix-like operating systems. Check our article on [how to use MRTG][23] for information on the installation and configuration process - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/mrtg.png) - -#### 24. Monit - simple and easy to use monitor tool #### - -**Monit** is an **open source** small **Linux** utility designed to monitor **processes**, **system load**, **filesystems**, **directories** and **files**. You can have it run automatic maintenance and repair and can execute actions in error situations or send email reports to alert the system administrator. If you wish to use this tool you can check out our [how to use Monit article][24]. - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/monit.png) - -#### 25. Munin - monitoring and alerting services for servers #### - -**Munin** is a **networked resource monitoring** tool that can help analyze **resource trends** and see what is the weak point and what caused **performance issues**. The team that develops it wishes it for it to be very easy to use and user-friendly. The application is written in Perl and uses the rrdtool to generate graphs, which are with the web interface. The developers advertise the application "plug and play" capabilities with about 500 monitoring plugins currently available. - -**More info** can be found in our [article on Munin][25] - --------------------------------------------------------------------------------- - -via: http://linoxide.com/monitoring-2/linux-performance-monitoring-tools/ - -作者:[Adrian Dinu][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/adriand/ -[1]:http://linoxide.com/monitoring-2/dstat-monitor-linux-performance/ -[2]:http://linoxide.com/monitoring-2/guide-using-linux-atop/ -[3]:http://linoxide.com/monitoring-2/install-nmon-monitor-linux-performance/ -[4]:http://linoxide.com/linux-command/kernel-slab-cache-information/ -[5]:http://linoxide.com/linux-command/linux-system-performance-monitoring-using-sar-command/ -[6]:http://linoxide.com/monitoring-2/monitor-linux-saidar-tool/ -[7]:http://linoxide.com/linux-command/linux-top-command-examples-screenshots/ -[8]:http://linoxide.com/tools/sysdig-performance-linux-tool/ -[9]:http://linoxide.com/linux-command/netstat-commad-with-all-variant-outputs/ -[10]:http://linoxide.com/linux-how-to/network-traffic-capture-tcp-dump-command/ -[11]:http://linoxide.com/linux-command/linux-vmstat-command-tool-report-virtual-memory-statistics/ -[12]:http://linoxide.com/linux-command/linux-free-command/ -[13]:http://linoxide.com/linux-command/linux-htop-command/ -[14]:http://linoxide.com/linux-command/ss-sockets-network-connection/ -[15]:http://linoxide.com/how-tos/lsof-command-list-process-id-information/ -[16]:http://linoxide.com/monitoring-2/iftop-network-traffic/ -[17]:http://linoxide.com/monitoring-2/install-iperf-test-network-speed-bandwidth/ -[18]:http://linoxide.com/tools/memory-usage-reporting-smem/ -[19]:http://linoxide.com/monitoring-2/install-configure-icinga-linux/ -[20]:http://linoxide.com/how-tos/install-configure-nagios-centos-7/ -[21]:http://sourceforge.net/projects/procexp/ -[22]:http://linoxide.com/monitoring-2/collectl-tool-install-examples/ -[23]:http://linoxide.com/tools/multi-router-traffic-grapher/ -[24]:http://linoxide.com/monitoring-2/monit-linux/ -[25]:http://linoxide.com/ubuntu-how-to/install-munin/ From 4cb9cc02a1eab782b26665c136e3c39af76a4fb5 Mon Sep 17 00:00:00 2001 From: andy xue Date: Sat, 1 Nov 2014 19:03:52 +0800 Subject: [PATCH 064/316] andyxue translated --- ...g 25 Linux Performance Monitoring Tools.md | 290 ++++++++++++++++++ 1 file changed, 290 insertions(+) create mode 100644 translated/tech/20141024 Amazing 25 Linux Performance Monitoring Tools.md diff --git a/translated/tech/20141024 Amazing 25 Linux Performance Monitoring Tools.md b/translated/tech/20141024 Amazing 25 Linux Performance Monitoring Tools.md new file mode 100644 index 0000000000..05b4b00e5c --- /dev/null +++ b/translated/tech/20141024 Amazing 25 Linux Performance Monitoring Tools.md @@ -0,0 +1,290 @@ +25个linux性能监控工具 +================================================================================ +一段时间以来,我们在网上向读者介绍了如何为Linux以及类Linux操作系统配置多种不同的性能监控工具。在这篇文章中我们将罗列一系列使用最频繁的性能监控工具,并对介绍到的每一个工具提供了相应的简介链接,大致将其划分为两类,基于命令行的和提供图形化接口的。 + +### 基于命令行的性能监控工具 ### + +#### 1. dstat - 多类型资源统计工具 #### + +该命令整合了**vmstat**,**iostat**和**ifstat**三种命令。同时增加了新的特性和功能允许你能够看到及时的不同的资源使用情况,从而能够使你对比和整合不同的资源使用情况。通过不同颜色和代码块布局的界面帮助你能够更加清晰容易的获取信息。它同时支持将信息数据导出到**cvs**格式文件中,从而用其他应用程序打开,或者导入到数据库中。你可以用该命令来[监控cpu,内存和网络状态随着时间的变化][1]。 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/dstat.png) + +#### 2. atop - 相比top更好的ASCII码体验 #### + +使用**ASCII**码的命令行工具来显示一个性能监控工具能够记录显示所有进程活动。它不但能够展示每日的系统日志,也能够进行长期的进程活动分析,同时也能够高亮过载的系统使用资源。它包含了CPU,内存,交换空间,磁盘和网络层的度量指标。使用所用的功能只需在终端运行**atop**即可。当然你也可以使用[交互接口来显示][2]数据并进行排序。 + + # atop + + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/atop1.jpg) + +#### 3. Nmon - 类Unix系统的性能监控 #### + +Nmon为**Nigel's Monitor**缩写,它最早开发用来作为**AIX**的系统监控工具。它的特征是**在线模式**,该模式在终端中实时更新监控信息,同时使用光标操作来提高屏幕事件处理效率。使用**捕捉模式**能够将数据保存为**CSV**格式,方便进一步的处理和图形化展示。 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/nmon_interface.png) + +更多的信息参考我们的[nmon性能监控文章][3]。 + +#### 4. slabtop - 显示内核slab缓存信息 #### + +个应用能够显示**缓存分配器**是如何管理Linux内核缓存不同类型的对象的。这个命令类似于top命令,区别是它重点实时显示内核slab缓存信息。它能够显示按照不同排序条件来显示最靠前的缓存列表。它同时也能够显示一个以slab层信息填充的统计题头。举例如下: + + # slabtop --sort=a + # slabtop -s b + # slabtop -s c + # slabtop -s l + # slabtop -s v + # slabtop -s n + # slabtop -s o + +**更多信息参阅**[内核slab缓存文章][4]。 + +#### 5. sar - 性能监控和瓶颈检查 #### + +**sar** 命令是为了标准输出在操作系统上所选的累积活动计数器内容信息。该基于计数值和时间间隔参数的**审计系统**,会按照指定的时间间隔输出指定次数的监控信息。如果时间间隔参数为设置为0,那么[sar命令将会显示系统从开机到当时时刻的平均统计信息][5]。有用的命令如下: + + # sar -u 2 3 + # sar –u –f /var/log/sa/sa05 + # sar -P ALL 1 1 + # sar -r 1 3 + # sar -W 1 3 + +#### 6. Saidar - 简单的统计监控工具 #### + +Saidar是一个**简单**且**轻量**的系统信息监控工具。虽然它无法提供大多性能报表,但是它能够通过一个简短友好的方式显示最有用的系统运行状况数据。你可以很容易地看到[up-time, average load,CPU,内存,进程,磁盘和网络接口][6]统计信息。 + + Usage: saidar [-d delay] [-c] [-v] [-h] + + -d Sets the update time in seconds + -c Enables coloured output + -v Prints version number + -h Displays this help information. + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/saidar-e1413370985588.png) + +#### 7. top - 经典的Linux任务管理工具 #### + +作为一个广为认知的**Linux**工具,**top**出现在大多数的类Unix操作系统任务管理中。它可以显示当前正在运行的进程的列表,同时用户可以按照不同的查询条件对该列表进行排序。它主要显示了系统进程对**CPU**和内存的使用状况。top可以快速检查是哪个或哪几个进程挂起了你的系统。你可以在[这里][7]看到top使用的例子。 你可以在终端输入top来运行它并进入到交互模式: + + Quick cheat sheet for interactive mode: + + GLOBAL_Commands: ?, =, A, B, d, G, h, I, k, q, r, s, W, Z + SUMMARY_Area_Commands: l, m, t, 1 + TASK_Area_Commands Appearance: b, x, y, z Content: c, f, H, o, S, u Size: #, i, n Sorting: <, >, F, O, R + COLOR_Mapping: , a, B, b, H, M, q, S, T, w, z, 0 - 7 + COMMANDS_for_Windows: -, _, =, +, A, a, G, g, w + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/top.png) + +#### 8. Sysdig - 系统进程的高级视图 #### + +**Sasdig**是一个能够让系统管理员和开发人员前所未有的洞察其系统行为的监控工具。其开发团队出于改善系统层次的监控方式以及通过提供关于**存储,进程,网络和内存**子系统的**统一有序**以及**粒度可见**的方式来进行错误排查,通过创建系统活动记录文件使得你可以在任何时间轻松分析。 + +简单例子: + + # sysdig proc.name=vim + # sysdig -p"%proc.name %fd.name" "evt.type=accept and proc.name!=httpd" + # sysdig evt.type=chdir and user.name=root + # sysdig -l + # sysdig -L + # sysdig -c topprocs_net + # sysdig -c fdcount_by fd.sport "evt.type=accept" + # sysdig -p"%proc.name %fd.name" "evt.type=accept and proc.name!=httpd" + # sysdig -c topprocs_file + # sysdig -c fdcount_by proc.name "fd.type=file" + # sysdig -p "%12user.name %6proc.pid %12proc.name %3fd.num %fd.typechar %fd.name" evt.type=open + # sysdig -c topprocs_cpu + # sysdig -c topprocs_cpu evt.cpu=0 + # sysdig -p"%evt.arg.path" "evt.type=chdir and user.name=root" + # sysdig evt.type=open and fd.name contains /etc + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/sysdig.jpg) + +**更多信息** 可以在 [如何利用sysdig改善系统层次的监控和错误排查][8] + +#### 9. netstat - 显示开放的端口和连接 #### + +它是**Linux管理员**使用来显示不同网络信息的工具,如查看什么端口开放和什么网络连接已经建立以及何种进程运行在这种连接之上。同时它也显示了**Unix套接**字的信息,这些套接字在不同的程序中为打开状态。作为大多数Linux发行版本的一部分,netstat的许多命令在 [netstat和它的不同输出][9]中有详细的描述。最为常用的如下: + + $ netstat | head -20 + $ netstat -r + $ netstat -rC + $ netstat -i + $ netstat -ie + $ netstat -s + $ netstat -g + $ netstat -tapn + +### 10. tcpdump - 洞察网络包 ### + +**tcpdump**可以用来查看**网络连接**包的内容。它显示了传输过程中包内容的各种信息。为了使得输出信息更为有用,它允许使用者通过不同的过滤器获取自己想要的信息。可以参照的例子如下: + + # tcpdump -i eth0 not port 22 + # tcpdump -c 10 -i eth0 + # tcpdump -ni eth0 -c 10 not port 22 + # tcpdump -w aloft.cap -s 0 + # tcpdump -r aloft.cap + # tcpdump -i eth0 dst port 80 + +你可以找到详细的[描述在topdump和捕捉包][10]文章中。 + +#### 11. vmstat - 虚拟内存统计信息 #### + +**vmstat**是虚拟内存(**virtual memory** statistics)的缩写,作为一个**内存监控**工具,它收集和显示概括关于**内存**,**进程**,**终端**和**分页**和**I/O阻塞**的信息。作为一个开源程序,它可以再大部分Linux发行版本中找到,包括Solaris和FreeBSD。它用来诊断大部分的内存性能问题和其他相关问题 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/vmstat_delay_5.png) + +**M更多信息** 参考 [vmstat命令文章][11]。 + +#### 12. free - 内存统计信息 #### + +free是另一个能够在终端中标准输出内存和交换空间使用的命令行工具。由于它的简易,它经常用于快速查看内存使用或者是应用于不同的脚本和应用程序中。在这里你可以看到[这个小程序的许多应用][12]。几乎所有的系统管理员日常都会用这个工具。:-) + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/free_hs3.png) + +#### 13. Htop - 更加友好的top #### + +**Htop**基本上是一个top改善版本,它能够显示更多的统计信息和更加多彩的方式,同时允许你采用不同的方式进行排序,它提供了一个**用户友好**的接口。 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/htop.png) + +你可以找到 **更多的信息** 在 [关于htop和top的比较][13]文章中。 + +#### 14. ss - 更现代感的网络管理替代工具 #### + +**ss**是**iproute2**包的一部分。iproute2趋向于替代一整套标准的**Unix网络**工具组件,它曾经用来完成[网络接口配置,路由表和管理ARP表][14]任务。ss工具用来存储套接字统计信息,也能够类似netstat一样显示信息,同时也能显示更多TCP和状态信息。一些例子如下: + + # ss -tnap + # ss -tnap6 + # ss -tnap + # ss -s + # ss -tn -o state established -p + +#### 15. lsof - 列表显示打开的文件 #### + +**lsof**命令,意为“**list open files**”, 用于在许多类Unix系统中显示所有打开状态的文件和打开它们的进程。在大部分Linux发行版和其他类Linux操作系统中系统管理员用它来检查不同的进程打开了哪些文件。你可以在这里找到更多的例子。 + + # lsof +p process_id + # lsof | less + # lsof –u username + # lsof /etc/passwd + # lsof –i TCP:ftp + # lsof –i TCP:80 + +你可以找到 **更多例子** 在[lsof 文章][15] + +#### 16. iftop - 类似top的了网络连接工具 #### + +**iftop**是一个基于网络信息的类似top的程序。它能够显示当前时刻按照**带宽使用**量或者上传或者下载量排序的**网络连接**状况。它同事提供了下载文件的预估完成时间。 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/iftop.png) + +**更多信息**可以参考[网络流量iftop文章][16] + +#### 17. iperf - 网络性能工具 #### + +**iperf**是一个**网络测试**工具,能够创建**TCP**和**UDP**数据连接和测量该网络能够传输它们的**性能**。它支持调节关于时间,协议和缓冲等不同的参数。对于每一个测试,它会报告带宽,丢包和其他的一些参数。 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/iperf-e1413378331696.png) + +如果你想用使用这个工具,可以参考这篇文章: [如何安装和使用iperf][17] + +#### 18. Smem - 高级内存报表工具 #### + +**Smem**是一个比较高级的**Linux**命令行工具,它提供关于系统中已经使用的和共享的实际内存,试图提供一个更为可靠地当前**内存**使用数据。 + + $ smem -m + $ smem -m -p | grep firefox + $ smem -u -p + $ smem -w -p + +参考我们的文章:[Smem更多的例子][18] + +### 图形化或基于Web的性能工具 ### + +#### 19. Icinga - Nagios的社区分支版本 #### + +**Icinga**是一个**开源免费**的网络监控程序,作为Nagios的分支,它获取了前者现存的大部分功能,同时基于这些功能又增加了社区用户要求已久的功能和补丁。 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/Icinga-e1413377995731.png) + +**更多信息**参考[安装和配置lcinga文章][19]. + +#### 20. Nagios - 最为流行的监控工具. #### + +作为在Linux上使用最为广泛和流行的**监控方案**,它有一个守护程序用来收集不同进程和远程主机的信息,这些收集到的信息都通过功能强大**的web界面**进行呈现。 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/nagios-e1413305858732.png) + +你可以在 **找到更多的信息** 在[如何安装nagios][20] + +#### 21. Linux process explorer - Linux下的procexp #### + +**Linux process explorer**是一个Linux下的图形化进程浏览工具。它能够显示不同的进程信息,如进程数,TCP/IP连接和每一个进程的性能指标。作为**Windows**下**procexp**在Linux的替代品,是由**Sysinternals**开发的,其目标是相比**top**和**ps**用户体验更加的友好。 + +查看 [linux process explorer 文章][21]获取更多信息。 + +#### 22. Collectl - 性能监控工具 #### + +你可以既可以通过交互的方式使用这个**性能监控**工具,也可以用它产生**报表**,并通过web服务器来访问它在磁盘上的数据。它以一种**易读易管理**的文件格式,记录了**CPU,磁盘,内存,网络,网络文件系统,进程,slabs**等统计信息于。 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/collectl.png) + +**更多** 关于[Collectl的文章][22]。 + +#### 23. MRTG - 经典网络流量监控图形工具 #### + +这是一个采用**rrdtool**的提供给用户图形化流量监控工具。作为**最早**的提供**图形化界面**的工具,它被广泛应用在类Unix的操作系统中。查看我们关于[如何使用MRTG][23]的文章获取更多关于安装和配置的信息。 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/mrtg.png) + +#### 24. Monit - 简单易用的监控工具 #### + +**Monit**是一个用来**监控进程**,**系统加载**,**文件系统**和**目录文件**等的开源的Linux工具。你能够让它自动化维护和修复,也能够在运行错误的情景下执行动作或者发邮件报告提醒系统管理员。如果你想要用这个工具,你可以查看[如何使用Monit的文章][24]。 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/monit.png) + +#### 25. Munin - 为服务器提供监控和提醒服务 #### + +作为一个网络资源监控工具,*Munin**能够帮助分析**资源趋势**和**查看弱节点**以及导致产生**性能问题**的原因。开发此软件的团队系统它能够易用和用户体验友好。该软件是用Perl开发的同时采用**rrdtool**来绘制图形,使用了**web接口**进行呈现。开发人员推广此应用时声称“**插件化和易用**”,目前已有500多个监控插件可结合使用。 + +**更多信息**可以在[关于Munin的文章][25]。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/monitoring-2/linux-performance-monitoring-tools/ + +作者:[Adrian Dinu][a] +译者:[译者ID](https://github.com/andyxue) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/adriand/ +[1]:http://linoxide.com/monitoring-2/dstat-monitor-linux-performance/ +[2]:http://linoxide.com/monitoring-2/guide-using-linux-atop/ +[3]:http://linoxide.com/monitoring-2/install-nmon-monitor-linux-performance/ +[4]:http://linoxide.com/linux-command/kernel-slab-cache-information/ +[5]:http://linoxide.com/linux-command/linux-system-performance-monitoring-using-sar-command/ +[6]:http://linoxide.com/monitoring-2/monitor-linux-saidar-tool/ +[7]:http://linoxide.com/linux-command/linux-top-command-examples-screenshots/ +[8]:http://linoxide.com/tools/sysdig-performance-linux-tool/ +[9]:http://linoxide.com/linux-command/netstat-commad-with-all-variant-outputs/ +[10]:http://linoxide.com/linux-how-to/network-traffic-capture-tcp-dump-command/ +[11]:http://linoxide.com/linux-command/linux-vmstat-command-tool-report-virtual-memory-statistics/ +[12]:http://linoxide.com/linux-command/linux-free-command/ +[13]:http://linoxide.com/linux-command/linux-htop-command/ +[14]:http://linoxide.com/linux-command/ss-sockets-network-connection/ +[15]:http://linoxide.com/how-tos/lsof-command-list-process-id-information/ +[16]:http://linoxide.com/monitoring-2/iftop-network-traffic/ +[17]:http://linoxide.com/monitoring-2/install-iperf-test-network-speed-bandwidth/ +[18]:http://linoxide.com/tools/memory-usage-reporting-smem/ +[19]:http://linoxide.com/monitoring-2/install-configure-icinga-linux/ +[20]:http://linoxide.com/how-tos/install-configure-nagios-centos-7/ +[21]:http://sourceforge.net/projects/procexp/ +[22]:http://linoxide.com/monitoring-2/collectl-tool-install-examples/ +[23]:http://linoxide.com/tools/multi-router-traffic-grapher/ +[24]:http://linoxide.com/monitoring-2/monit-linux/ +[25]:http://linoxide.com/ubuntu-how-to/install-munin/ From a5196129b1ca27637200918daa44b24dae04b4af Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 1 Nov 2014 21:02:39 +0800 Subject: [PATCH 065/316] =?UTF-8?q?201409=20=E5=AD=98=E6=A1=A3=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20140610 How does the cloud affect the everyday linux user.md | 0 .../20140624 Staying free--should GCC allow non-free plug ins.md | 0 ...--How to define PATH environment variable for sudo commands.md | 0 ...ed Microsoft Office on Ubuntu--Install the Official Webapps.md | 0 ...ge DigitalOcean VPS droplets from the command line on Linux.md | 0 ...723 How to access SoundCloud from the command line in Linux.md | 0 .../{201410 => 201409}/20140723 Top 10 Fun On The Command Line.md | 0 .../20140724 diff -u--What is New in Kernel Development.md | 0 ...quid Proxy Server' Interview Questions and Answers in Linux.md | 0 ... to access Linux command cheat sheets from the command line.md | 0 .../20140730 How to use variables in shell Scripting.md | 0 .../20140731 Easy Steps to Make GNOME 3 More Efficient.md | 0 .../20140801 How To Install Java On Ubuntu 14.04.md | 0 .../20140801 How to Create an Ubuntu Kiosk Computer.md | 0 ...d Line 'Cheat-Sheet' for Linux Beginners and Administrators.md | 0 .../{201410 => 201409}/20140808 When Linux Was Perfect Enough.md | 0 ...rd Protect Single User Mode or RHEL ro CentOS ro 5.x ro 6.x.md | 0 ...20140811 How to Image and Clone Hard Drives with Clonezilla.md | 0 ...rs--How to check the last time system was rebooted on Linux.md | 0 ... to set a static MAC address on VMware ESXi virtual machine.md | 0 ...8 Where And How To Code--Choosing The Best Free Code Editor.md | 0 ...tions to Trace or Debug Programs using Linux strace Command.md | 0 ...20140819 A Pocket Guide for Linux ssh Command with Examples.md | 0 ... 5--For those Linux users undecided on the kernel' s future.md | 0 ...temd--Start or Stop or Restart Services in RHEL or CentOS 7.md | 0 .../20140822 15 Practical Examples of 'cd' Command in Linux.md | 0 ...5 China Will Change The Way All Software Is Bought And Sold.md | 0 ...wers--How to enable Nux Dextop repository on CentOS or RHEL.md | 0 ...w to fix 'failed to run aclocal--No such file or directory'.md | 0 ...ux Terminal--speedtest_cli checks your real bandwidth speed.md | 0 ... Linus Torvalds is my hero, says 13 year old Zachary DuPont.md | 0 ...8 GIMP 2.8.12 Released--Here' s How to Install it on Ubuntu.md | 0 .../20140829 Linux Doesn't Need to Own the Desktop.md | 0 .../20140901 Awesome systemd Commands to Manage Linux System.md | 0 .../20140901 Remarkable--A New MarkDown Editor For Linux.md | 0 ...0901 Ubuntu Wallpaper Contest Closes, These Are Our 8 Faves.md | 0 published/{201410 => 201409}/20140902 Happy Birthday Email.md | 0 ...902 How to share on linux the output of your shell commands.md | 0 ...ey To Search Text In All Files Within A Directory In Ubuntu.md | 0 published/{201410 => 201409}/20140904 The Masked Avengers.md | 0 ...5 Ubuntu Touch Now Has a Torrent Client in the Ubuntu Store.md | 0 .../20140910 Colourful systemd vs sysVinit Linux Cheatsheet.md | 0 ...elly Conky Adds Simple, Stylish Stats To Your Linux Desktop.md | 0 ...Meet the 12 Ubuntu 14.10 Wallpaper Contest Winners (So Far).md | 0 ...] How To List All Installed Packages On Linux Distributions.md | 0 ...20140911 Install UberWriter Markdown Editor In Ubuntu 14.04.md | 0 ...40912 How to Go Hands On With the Utopic Unicorn--Literally.md | 0 .../20140912 QuiteRSS--RSS Reader For Desktop Linux.md | 0 ...0915 How To Uninstall Ubuntu Linux From Windows 8 Dual Boot.md | 0 ...-How to find and remove obsolete PPA repositories on Ubuntu.md | 0 ...allest Distros in the World, Tiny Core, Gets a Fresh Update.md | 0 .../20140915 Potenza Icon Themes 2.0 Available For Download.md | 0 ... Control Center 3.14 RC1 Corrects Lots of Potential Crashes.md | 0 ...Goodbye To Microsoft Office, Will Switch To OpenOffice Soon.md | 0 ...0919 Mir and Unity 8 Status Update Arrives from Ubuntu Devs.md | 0 ... Offers to Work with Ubuntu to Bring Native Playback to All.md | 0 ...res FeedHenry for $82 Million to Advance Mobile Development.md | 0 .../20140922 Ten Blogs Every Ubuntu User Must Follow.md | 0 ...20140924 Canonical Closes nginx Exploit in Ubuntu 14.04 LTS.md | 0 ...140924 Debian 8 Jessie to Have GNOME as the Default Desktop.md | 0 .../20140924 End of the Line for Red Hat Enterprise Linux 5.md | 0 ...ugfix Release for KDE Plasma 5 Arrives with Lots of Changes.md | 0 .../20140924 Wal Commander GitHub Edition 0.17 released.md | 0 ... to listen to Internet radio from the command line on Linux.md | 0 .../The Open Source Witch Hunts Have Returned.md | 0 65 files changed, 0 insertions(+), 0 deletions(-) rename published/{201410 => 201409}/20140610 How does the cloud affect the everyday linux user.md (100%) rename published/{201410 => 201409}/20140624 Staying free--should GCC allow non-free plug ins.md (100%) rename published/{201410 => 201409}/20140716 Linux FAQs with Answers--How to define PATH environment variable for sudo commands.md (100%) rename published/{201410 => 201409}/20140718 Need Microsoft Office on Ubuntu--Install the Official Webapps.md (100%) rename published/{201410 => 201409}/20140722 How to manage DigitalOcean VPS droplets from the command line on Linux.md (100%) rename published/{201410 => 201409}/20140723 How to access SoundCloud from the command line in Linux.md (100%) rename published/{201410 => 201409}/20140723 Top 10 Fun On The Command Line.md (100%) rename published/{201410 => 201409}/20140724 diff -u--What is New in Kernel Development.md (100%) rename published/{201410 => 201409}/20140729 10 Useful 'Squid Proxy Server' Interview Questions and Answers in Linux.md (100%) rename published/{201410 => 201409}/20140729 How to access Linux command cheat sheets from the command line.md (100%) rename published/{201410 => 201409}/20140730 How to use variables in shell Scripting.md (100%) rename published/{201410 => 201409}/20140731 Easy Steps to Make GNOME 3 More Efficient.md (100%) rename published/{201410 => 201409}/20140801 How To Install Java On Ubuntu 14.04.md (100%) rename published/{201410 => 201409}/20140801 How to Create an Ubuntu Kiosk Computer.md (100%) rename published/{201410 => 201409}/20140804 Cheat--An Ultimate Command Line 'Cheat-Sheet' for Linux Beginners and Administrators.md (100%) rename published/{201410 => 201409}/20140808 When Linux Was Perfect Enough.md (100%) rename published/{201410 => 201409}/20140811 Disable or Password Protect Single User Mode or RHEL ro CentOS ro 5.x ro 6.x.md (100%) rename published/{201410 => 201409}/20140811 How to Image and Clone Hard Drives with Clonezilla.md (100%) rename published/{201410 => 201409}/20140811 Linux FAQs with Answers--How to check the last time system was rebooted on Linux.md (100%) rename published/{201410 => 201409}/20140818 Linux FAQs with Answers--How to set a static MAC address on VMware ESXi virtual machine.md (100%) rename published/{201410 => 201409}/20140818 Where And How To Code--Choosing The Best Free Code Editor.md (100%) rename published/{201410 => 201409}/20140819 8 Options to Trace or Debug Programs using Linux strace Command.md (100%) rename published/{201410 => 201409}/20140819 A Pocket Guide for Linux ssh Command with Examples.md (100%) rename published/{201410 => 201409}/20140819 KDE Plasma 5--For those Linux users undecided on the kernel' s future.md (100%) rename published/{201410 => 201409}/20140819 Linux Systemd--Start or Stop or Restart Services in RHEL or CentOS 7.md (100%) rename published/{201410 => 201409}/20140822 15 Practical Examples of 'cd' Command in Linux.md (100%) rename published/{201410 => 201409}/20140825 China Will Change The Way All Software Is Bought And Sold.md (100%) rename published/{201410 => 201409}/20140825 Linux FAQs with Answers--How to enable Nux Dextop repository on CentOS or RHEL.md (100%) rename published/{201410 => 201409}/20140825 Linux FAQs with Answers--How to fix 'failed to run aclocal--No such file or directory'.md (100%) rename published/{201410 => 201409}/20140825 Linux Terminal--speedtest_cli checks your real bandwidth speed.md (100%) rename published/{201410 => 201409}/20140826 Linus Torvalds is my hero, says 13 year old Zachary DuPont.md (100%) rename published/{201410 => 201409}/20140828 GIMP 2.8.12 Released--Here' s How to Install it on Ubuntu.md (100%) rename published/{201410 => 201409}/20140829 Linux Doesn't Need to Own the Desktop.md (100%) rename published/{201410 => 201409}/20140901 Awesome systemd Commands to Manage Linux System.md (100%) rename published/{201410 => 201409}/20140901 Remarkable--A New MarkDown Editor For Linux.md (100%) rename published/{201410 => 201409}/20140901 Ubuntu Wallpaper Contest Closes, These Are Our 8 Faves.md (100%) rename published/{201410 => 201409}/20140902 Happy Birthday Email.md (100%) rename published/{201410 => 201409}/20140902 How to share on linux the output of your shell commands.md (100%) rename published/{201410 => 201409}/20140902 Use SearchMonkey To Search Text In All Files Within A Directory In Ubuntu.md (100%) rename published/{201410 => 201409}/20140904 The Masked Avengers.md (100%) rename published/{201410 => 201409}/20140905 Ubuntu Touch Now Has a Torrent Client in the Ubuntu Store.md (100%) rename published/{201410 => 201409}/20140910 Colourful systemd vs sysVinit Linux Cheatsheet.md (100%) rename published/{201410 => 201409}/20140910 Jelly Conky Adds Simple, Stylish Stats To Your Linux Desktop.md (100%) rename published/{201410 => 201409}/20140910 Meet the 12 Ubuntu 14.10 Wallpaper Contest Winners (So Far).md (100%) rename published/{201410 => 201409}/20140910 [Quick Tip] How To List All Installed Packages On Linux Distributions.md (100%) rename published/{201410 => 201409}/20140911 Install UberWriter Markdown Editor In Ubuntu 14.04.md (100%) rename published/{201410 => 201409}/20140912 How to Go Hands On With the Utopic Unicorn--Literally.md (100%) rename published/{201410 => 201409}/20140912 QuiteRSS--RSS Reader For Desktop Linux.md (100%) rename published/{201410 => 201409}/20140915 How To Uninstall Ubuntu Linux From Windows 8 Dual Boot.md (100%) rename published/{201410 => 201409}/20140915 Linux FAQs with Answers--How to find and remove obsolete PPA repositories on Ubuntu.md (100%) rename published/{201410 => 201409}/20140915 One of the Smallest Distros in the World, Tiny Core, Gets a Fresh Update.md (100%) rename published/{201410 => 201409}/20140915 Potenza Icon Themes 2.0 Available For Download.md (100%) rename published/{201410 => 201409}/20140917 GNOME Control Center 3.14 RC1 Corrects Lots of Potential Crashes.md (100%) rename published/{201410 => 201409}/20140919 Another Italian City Says Goodbye To Microsoft Office, Will Switch To OpenOffice Soon.md (100%) rename published/{201410 => 201409}/20140919 Mir and Unity 8 Status Update Arrives from Ubuntu Devs.md (100%) rename published/{201410 => 201409}/20140919 Netflix Offers to Work with Ubuntu to Bring Native Playback to All.md (100%) rename published/{201410 => 201409}/20140919 Red Hat Acquires FeedHenry for $82 Million to Advance Mobile Development.md (100%) rename published/{201410 => 201409}/20140922 Ten Blogs Every Ubuntu User Must Follow.md (100%) rename published/{201410 => 201409}/20140924 Canonical Closes nginx Exploit in Ubuntu 14.04 LTS.md (100%) rename published/{201410 => 201409}/20140924 Debian 8 Jessie to Have GNOME as the Default Desktop.md (100%) rename published/{201410 => 201409}/20140924 End of the Line for Red Hat Enterprise Linux 5.md (100%) rename published/{201410 => 201409}/20140924 Second Bugfix Release for KDE Plasma 5 Arrives with Lots of Changes.md (100%) rename published/{201410 => 201409}/20140924 Wal Commander GitHub Edition 0.17 released.md (100%) rename published/{201410 => 201409}/How to listen to Internet radio from the command line on Linux.md (100%) rename published/{201410 => 201409}/The Open Source Witch Hunts Have Returned.md (100%) diff --git a/published/201410/20140610 How does the cloud affect the everyday linux user.md b/published/201409/20140610 How does the cloud affect the everyday linux user.md similarity index 100% rename from published/201410/20140610 How does the cloud affect the everyday linux user.md rename to published/201409/20140610 How does the cloud affect the everyday linux user.md diff --git a/published/201410/20140624 Staying free--should GCC allow non-free plug ins.md b/published/201409/20140624 Staying free--should GCC allow non-free plug ins.md similarity index 100% rename from published/201410/20140624 Staying free--should GCC allow non-free plug ins.md rename to published/201409/20140624 Staying free--should GCC allow non-free plug ins.md diff --git a/published/201410/20140716 Linux FAQs with Answers--How to define PATH environment variable for sudo commands.md b/published/201409/20140716 Linux FAQs with Answers--How to define PATH environment variable for sudo commands.md similarity index 100% rename from published/201410/20140716 Linux FAQs with Answers--How to define PATH environment variable for sudo commands.md rename to published/201409/20140716 Linux FAQs with Answers--How to define PATH environment variable for sudo commands.md diff --git a/published/201410/20140718 Need Microsoft Office on Ubuntu--Install the Official Webapps.md b/published/201409/20140718 Need Microsoft Office on Ubuntu--Install the Official Webapps.md similarity index 100% rename from published/201410/20140718 Need Microsoft Office on Ubuntu--Install the Official Webapps.md rename to published/201409/20140718 Need Microsoft Office on Ubuntu--Install the Official Webapps.md diff --git a/published/201410/20140722 How to manage DigitalOcean VPS droplets from the command line on Linux.md b/published/201409/20140722 How to manage DigitalOcean VPS droplets from the command line on Linux.md similarity index 100% rename from published/201410/20140722 How to manage DigitalOcean VPS droplets from the command line on Linux.md rename to published/201409/20140722 How to manage DigitalOcean VPS droplets from the command line on Linux.md diff --git a/published/201410/20140723 How to access SoundCloud from the command line in Linux.md b/published/201409/20140723 How to access SoundCloud from the command line in Linux.md similarity index 100% rename from published/201410/20140723 How to access SoundCloud from the command line in Linux.md rename to published/201409/20140723 How to access SoundCloud from the command line in Linux.md diff --git a/published/201410/20140723 Top 10 Fun On The Command Line.md b/published/201409/20140723 Top 10 Fun On The Command Line.md similarity index 100% rename from published/201410/20140723 Top 10 Fun On The Command Line.md rename to published/201409/20140723 Top 10 Fun On The Command Line.md diff --git a/published/201410/20140724 diff -u--What is New in Kernel Development.md b/published/201409/20140724 diff -u--What is New in Kernel Development.md similarity index 100% rename from published/201410/20140724 diff -u--What is New in Kernel Development.md rename to published/201409/20140724 diff -u--What is New in Kernel Development.md diff --git a/published/201410/20140729 10 Useful 'Squid Proxy Server' Interview Questions and Answers in Linux.md b/published/201409/20140729 10 Useful 'Squid Proxy Server' Interview Questions and Answers in Linux.md similarity index 100% rename from published/201410/20140729 10 Useful 'Squid Proxy Server' Interview Questions and Answers in Linux.md rename to published/201409/20140729 10 Useful 'Squid Proxy Server' Interview Questions and Answers in Linux.md diff --git a/published/201410/20140729 How to access Linux command cheat sheets from the command line.md b/published/201409/20140729 How to access Linux command cheat sheets from the command line.md similarity index 100% rename from published/201410/20140729 How to access Linux command cheat sheets from the command line.md rename to published/201409/20140729 How to access Linux command cheat sheets from the command line.md diff --git a/published/201410/20140730 How to use variables in shell Scripting.md b/published/201409/20140730 How to use variables in shell Scripting.md similarity index 100% rename from published/201410/20140730 How to use variables in shell Scripting.md rename to published/201409/20140730 How to use variables in shell Scripting.md diff --git a/published/201410/20140731 Easy Steps to Make GNOME 3 More Efficient.md b/published/201409/20140731 Easy Steps to Make GNOME 3 More Efficient.md similarity index 100% rename from published/201410/20140731 Easy Steps to Make GNOME 3 More Efficient.md rename to published/201409/20140731 Easy Steps to Make GNOME 3 More Efficient.md diff --git a/published/201410/20140801 How To Install Java On Ubuntu 14.04.md b/published/201409/20140801 How To Install Java On Ubuntu 14.04.md similarity index 100% rename from published/201410/20140801 How To Install Java On Ubuntu 14.04.md rename to published/201409/20140801 How To Install Java On Ubuntu 14.04.md diff --git a/published/201410/20140801 How to Create an Ubuntu Kiosk Computer.md b/published/201409/20140801 How to Create an Ubuntu Kiosk Computer.md similarity index 100% rename from published/201410/20140801 How to Create an Ubuntu Kiosk Computer.md rename to published/201409/20140801 How to Create an Ubuntu Kiosk Computer.md diff --git a/published/201410/20140804 Cheat--An Ultimate Command Line 'Cheat-Sheet' for Linux Beginners and Administrators.md b/published/201409/20140804 Cheat--An Ultimate Command Line 'Cheat-Sheet' for Linux Beginners and Administrators.md similarity index 100% rename from published/201410/20140804 Cheat--An Ultimate Command Line 'Cheat-Sheet' for Linux Beginners and Administrators.md rename to published/201409/20140804 Cheat--An Ultimate Command Line 'Cheat-Sheet' for Linux Beginners and Administrators.md diff --git a/published/201410/20140808 When Linux Was Perfect Enough.md b/published/201409/20140808 When Linux Was Perfect Enough.md similarity index 100% rename from published/201410/20140808 When Linux Was Perfect Enough.md rename to published/201409/20140808 When Linux Was Perfect Enough.md diff --git a/published/201410/20140811 Disable or Password Protect Single User Mode or RHEL ro CentOS ro 5.x ro 6.x.md b/published/201409/20140811 Disable or Password Protect Single User Mode or RHEL ro CentOS ro 5.x ro 6.x.md similarity index 100% rename from published/201410/20140811 Disable or Password Protect Single User Mode or RHEL ro CentOS ro 5.x ro 6.x.md rename to published/201409/20140811 Disable or Password Protect Single User Mode or RHEL ro CentOS ro 5.x ro 6.x.md diff --git a/published/201410/20140811 How to Image and Clone Hard Drives with Clonezilla.md b/published/201409/20140811 How to Image and Clone Hard Drives with Clonezilla.md similarity index 100% rename from published/201410/20140811 How to Image and Clone Hard Drives with Clonezilla.md rename to published/201409/20140811 How to Image and Clone Hard Drives with Clonezilla.md diff --git a/published/201410/20140811 Linux FAQs with Answers--How to check the last time system was rebooted on Linux.md b/published/201409/20140811 Linux FAQs with Answers--How to check the last time system was rebooted on Linux.md similarity index 100% rename from published/201410/20140811 Linux FAQs with Answers--How to check the last time system was rebooted on Linux.md rename to published/201409/20140811 Linux FAQs with Answers--How to check the last time system was rebooted on Linux.md diff --git a/published/201410/20140818 Linux FAQs with Answers--How to set a static MAC address on VMware ESXi virtual machine.md b/published/201409/20140818 Linux FAQs with Answers--How to set a static MAC address on VMware ESXi virtual machine.md similarity index 100% rename from published/201410/20140818 Linux FAQs with Answers--How to set a static MAC address on VMware ESXi virtual machine.md rename to published/201409/20140818 Linux FAQs with Answers--How to set a static MAC address on VMware ESXi virtual machine.md diff --git a/published/201410/20140818 Where And How To Code--Choosing The Best Free Code Editor.md b/published/201409/20140818 Where And How To Code--Choosing The Best Free Code Editor.md similarity index 100% rename from published/201410/20140818 Where And How To Code--Choosing The Best Free Code Editor.md rename to published/201409/20140818 Where And How To Code--Choosing The Best Free Code Editor.md diff --git a/published/201410/20140819 8 Options to Trace or Debug Programs using Linux strace Command.md b/published/201409/20140819 8 Options to Trace or Debug Programs using Linux strace Command.md similarity index 100% rename from published/201410/20140819 8 Options to Trace or Debug Programs using Linux strace Command.md rename to published/201409/20140819 8 Options to Trace or Debug Programs using Linux strace Command.md diff --git a/published/201410/20140819 A Pocket Guide for Linux ssh Command with Examples.md b/published/201409/20140819 A Pocket Guide for Linux ssh Command with Examples.md similarity index 100% rename from published/201410/20140819 A Pocket Guide for Linux ssh Command with Examples.md rename to published/201409/20140819 A Pocket Guide for Linux ssh Command with Examples.md diff --git a/published/201410/20140819 KDE Plasma 5--For those Linux users undecided on the kernel' s future.md b/published/201409/20140819 KDE Plasma 5--For those Linux users undecided on the kernel' s future.md similarity index 100% rename from published/201410/20140819 KDE Plasma 5--For those Linux users undecided on the kernel' s future.md rename to published/201409/20140819 KDE Plasma 5--For those Linux users undecided on the kernel' s future.md diff --git a/published/201410/20140819 Linux Systemd--Start or Stop or Restart Services in RHEL or CentOS 7.md b/published/201409/20140819 Linux Systemd--Start or Stop or Restart Services in RHEL or CentOS 7.md similarity index 100% rename from published/201410/20140819 Linux Systemd--Start or Stop or Restart Services in RHEL or CentOS 7.md rename to published/201409/20140819 Linux Systemd--Start or Stop or Restart Services in RHEL or CentOS 7.md diff --git a/published/201410/20140822 15 Practical Examples of 'cd' Command in Linux.md b/published/201409/20140822 15 Practical Examples of 'cd' Command in Linux.md similarity index 100% rename from published/201410/20140822 15 Practical Examples of 'cd' Command in Linux.md rename to published/201409/20140822 15 Practical Examples of 'cd' Command in Linux.md diff --git a/published/201410/20140825 China Will Change The Way All Software Is Bought And Sold.md b/published/201409/20140825 China Will Change The Way All Software Is Bought And Sold.md similarity index 100% rename from published/201410/20140825 China Will Change The Way All Software Is Bought And Sold.md rename to published/201409/20140825 China Will Change The Way All Software Is Bought And Sold.md diff --git a/published/201410/20140825 Linux FAQs with Answers--How to enable Nux Dextop repository on CentOS or RHEL.md b/published/201409/20140825 Linux FAQs with Answers--How to enable Nux Dextop repository on CentOS or RHEL.md similarity index 100% rename from published/201410/20140825 Linux FAQs with Answers--How to enable Nux Dextop repository on CentOS or RHEL.md rename to published/201409/20140825 Linux FAQs with Answers--How to enable Nux Dextop repository on CentOS or RHEL.md diff --git a/published/201410/20140825 Linux FAQs with Answers--How to fix 'failed to run aclocal--No such file or directory'.md b/published/201409/20140825 Linux FAQs with Answers--How to fix 'failed to run aclocal--No such file or directory'.md similarity index 100% rename from published/201410/20140825 Linux FAQs with Answers--How to fix 'failed to run aclocal--No such file or directory'.md rename to published/201409/20140825 Linux FAQs with Answers--How to fix 'failed to run aclocal--No such file or directory'.md diff --git a/published/201410/20140825 Linux Terminal--speedtest_cli checks your real bandwidth speed.md b/published/201409/20140825 Linux Terminal--speedtest_cli checks your real bandwidth speed.md similarity index 100% rename from published/201410/20140825 Linux Terminal--speedtest_cli checks your real bandwidth speed.md rename to published/201409/20140825 Linux Terminal--speedtest_cli checks your real bandwidth speed.md diff --git a/published/201410/20140826 Linus Torvalds is my hero, says 13 year old Zachary DuPont.md b/published/201409/20140826 Linus Torvalds is my hero, says 13 year old Zachary DuPont.md similarity index 100% rename from published/201410/20140826 Linus Torvalds is my hero, says 13 year old Zachary DuPont.md rename to published/201409/20140826 Linus Torvalds is my hero, says 13 year old Zachary DuPont.md diff --git a/published/201410/20140828 GIMP 2.8.12 Released--Here' s How to Install it on Ubuntu.md b/published/201409/20140828 GIMP 2.8.12 Released--Here' s How to Install it on Ubuntu.md similarity index 100% rename from published/201410/20140828 GIMP 2.8.12 Released--Here' s How to Install it on Ubuntu.md rename to published/201409/20140828 GIMP 2.8.12 Released--Here' s How to Install it on Ubuntu.md diff --git a/published/201410/20140829 Linux Doesn't Need to Own the Desktop.md b/published/201409/20140829 Linux Doesn't Need to Own the Desktop.md similarity index 100% rename from published/201410/20140829 Linux Doesn't Need to Own the Desktop.md rename to published/201409/20140829 Linux Doesn't Need to Own the Desktop.md diff --git a/published/201410/20140901 Awesome systemd Commands to Manage Linux System.md b/published/201409/20140901 Awesome systemd Commands to Manage Linux System.md similarity index 100% rename from published/201410/20140901 Awesome systemd Commands to Manage Linux System.md rename to published/201409/20140901 Awesome systemd Commands to Manage Linux System.md diff --git a/published/201410/20140901 Remarkable--A New MarkDown Editor For Linux.md b/published/201409/20140901 Remarkable--A New MarkDown Editor For Linux.md similarity index 100% rename from published/201410/20140901 Remarkable--A New MarkDown Editor For Linux.md rename to published/201409/20140901 Remarkable--A New MarkDown Editor For Linux.md diff --git a/published/201410/20140901 Ubuntu Wallpaper Contest Closes, These Are Our 8 Faves.md b/published/201409/20140901 Ubuntu Wallpaper Contest Closes, These Are Our 8 Faves.md similarity index 100% rename from published/201410/20140901 Ubuntu Wallpaper Contest Closes, These Are Our 8 Faves.md rename to published/201409/20140901 Ubuntu Wallpaper Contest Closes, These Are Our 8 Faves.md diff --git a/published/201410/20140902 Happy Birthday Email.md b/published/201409/20140902 Happy Birthday Email.md similarity index 100% rename from published/201410/20140902 Happy Birthday Email.md rename to published/201409/20140902 Happy Birthday Email.md diff --git a/published/201410/20140902 How to share on linux the output of your shell commands.md b/published/201409/20140902 How to share on linux the output of your shell commands.md similarity index 100% rename from published/201410/20140902 How to share on linux the output of your shell commands.md rename to published/201409/20140902 How to share on linux the output of your shell commands.md diff --git a/published/201410/20140902 Use SearchMonkey To Search Text In All Files Within A Directory In Ubuntu.md b/published/201409/20140902 Use SearchMonkey To Search Text In All Files Within A Directory In Ubuntu.md similarity index 100% rename from published/201410/20140902 Use SearchMonkey To Search Text In All Files Within A Directory In Ubuntu.md rename to published/201409/20140902 Use SearchMonkey To Search Text In All Files Within A Directory In Ubuntu.md diff --git a/published/201410/20140904 The Masked Avengers.md b/published/201409/20140904 The Masked Avengers.md similarity index 100% rename from published/201410/20140904 The Masked Avengers.md rename to published/201409/20140904 The Masked Avengers.md diff --git a/published/201410/20140905 Ubuntu Touch Now Has a Torrent Client in the Ubuntu Store.md b/published/201409/20140905 Ubuntu Touch Now Has a Torrent Client in the Ubuntu Store.md similarity index 100% rename from published/201410/20140905 Ubuntu Touch Now Has a Torrent Client in the Ubuntu Store.md rename to published/201409/20140905 Ubuntu Touch Now Has a Torrent Client in the Ubuntu Store.md diff --git a/published/201410/20140910 Colourful systemd vs sysVinit Linux Cheatsheet.md b/published/201409/20140910 Colourful systemd vs sysVinit Linux Cheatsheet.md similarity index 100% rename from published/201410/20140910 Colourful systemd vs sysVinit Linux Cheatsheet.md rename to published/201409/20140910 Colourful systemd vs sysVinit Linux Cheatsheet.md diff --git a/published/201410/20140910 Jelly Conky Adds Simple, Stylish Stats To Your Linux Desktop.md b/published/201409/20140910 Jelly Conky Adds Simple, Stylish Stats To Your Linux Desktop.md similarity index 100% rename from published/201410/20140910 Jelly Conky Adds Simple, Stylish Stats To Your Linux Desktop.md rename to published/201409/20140910 Jelly Conky Adds Simple, Stylish Stats To Your Linux Desktop.md diff --git a/published/201410/20140910 Meet the 12 Ubuntu 14.10 Wallpaper Contest Winners (So Far).md b/published/201409/20140910 Meet the 12 Ubuntu 14.10 Wallpaper Contest Winners (So Far).md similarity index 100% rename from published/201410/20140910 Meet the 12 Ubuntu 14.10 Wallpaper Contest Winners (So Far).md rename to published/201409/20140910 Meet the 12 Ubuntu 14.10 Wallpaper Contest Winners (So Far).md diff --git a/published/201410/20140910 [Quick Tip] How To List All Installed Packages On Linux Distributions.md b/published/201409/20140910 [Quick Tip] How To List All Installed Packages On Linux Distributions.md similarity index 100% rename from published/201410/20140910 [Quick Tip] How To List All Installed Packages On Linux Distributions.md rename to published/201409/20140910 [Quick Tip] How To List All Installed Packages On Linux Distributions.md diff --git a/published/201410/20140911 Install UberWriter Markdown Editor In Ubuntu 14.04.md b/published/201409/20140911 Install UberWriter Markdown Editor In Ubuntu 14.04.md similarity index 100% rename from published/201410/20140911 Install UberWriter Markdown Editor In Ubuntu 14.04.md rename to published/201409/20140911 Install UberWriter Markdown Editor In Ubuntu 14.04.md diff --git a/published/201410/20140912 How to Go Hands On With the Utopic Unicorn--Literally.md b/published/201409/20140912 How to Go Hands On With the Utopic Unicorn--Literally.md similarity index 100% rename from published/201410/20140912 How to Go Hands On With the Utopic Unicorn--Literally.md rename to published/201409/20140912 How to Go Hands On With the Utopic Unicorn--Literally.md diff --git a/published/201410/20140912 QuiteRSS--RSS Reader For Desktop Linux.md b/published/201409/20140912 QuiteRSS--RSS Reader For Desktop Linux.md similarity index 100% rename from published/201410/20140912 QuiteRSS--RSS Reader For Desktop Linux.md rename to published/201409/20140912 QuiteRSS--RSS Reader For Desktop Linux.md diff --git a/published/201410/20140915 How To Uninstall Ubuntu Linux From Windows 8 Dual Boot.md b/published/201409/20140915 How To Uninstall Ubuntu Linux From Windows 8 Dual Boot.md similarity index 100% rename from published/201410/20140915 How To Uninstall Ubuntu Linux From Windows 8 Dual Boot.md rename to published/201409/20140915 How To Uninstall Ubuntu Linux From Windows 8 Dual Boot.md diff --git a/published/201410/20140915 Linux FAQs with Answers--How to find and remove obsolete PPA repositories on Ubuntu.md b/published/201409/20140915 Linux FAQs with Answers--How to find and remove obsolete PPA repositories on Ubuntu.md similarity index 100% rename from published/201410/20140915 Linux FAQs with Answers--How to find and remove obsolete PPA repositories on Ubuntu.md rename to published/201409/20140915 Linux FAQs with Answers--How to find and remove obsolete PPA repositories on Ubuntu.md diff --git a/published/201410/20140915 One of the Smallest Distros in the World, Tiny Core, Gets a Fresh Update.md b/published/201409/20140915 One of the Smallest Distros in the World, Tiny Core, Gets a Fresh Update.md similarity index 100% rename from published/201410/20140915 One of the Smallest Distros in the World, Tiny Core, Gets a Fresh Update.md rename to published/201409/20140915 One of the Smallest Distros in the World, Tiny Core, Gets a Fresh Update.md diff --git a/published/201410/20140915 Potenza Icon Themes 2.0 Available For Download.md b/published/201409/20140915 Potenza Icon Themes 2.0 Available For Download.md similarity index 100% rename from published/201410/20140915 Potenza Icon Themes 2.0 Available For Download.md rename to published/201409/20140915 Potenza Icon Themes 2.0 Available For Download.md diff --git a/published/201410/20140917 GNOME Control Center 3.14 RC1 Corrects Lots of Potential Crashes.md b/published/201409/20140917 GNOME Control Center 3.14 RC1 Corrects Lots of Potential Crashes.md similarity index 100% rename from published/201410/20140917 GNOME Control Center 3.14 RC1 Corrects Lots of Potential Crashes.md rename to published/201409/20140917 GNOME Control Center 3.14 RC1 Corrects Lots of Potential Crashes.md diff --git a/published/201410/20140919 Another Italian City Says Goodbye To Microsoft Office, Will Switch To OpenOffice Soon.md b/published/201409/20140919 Another Italian City Says Goodbye To Microsoft Office, Will Switch To OpenOffice Soon.md similarity index 100% rename from published/201410/20140919 Another Italian City Says Goodbye To Microsoft Office, Will Switch To OpenOffice Soon.md rename to published/201409/20140919 Another Italian City Says Goodbye To Microsoft Office, Will Switch To OpenOffice Soon.md diff --git a/published/201410/20140919 Mir and Unity 8 Status Update Arrives from Ubuntu Devs.md b/published/201409/20140919 Mir and Unity 8 Status Update Arrives from Ubuntu Devs.md similarity index 100% rename from published/201410/20140919 Mir and Unity 8 Status Update Arrives from Ubuntu Devs.md rename to published/201409/20140919 Mir and Unity 8 Status Update Arrives from Ubuntu Devs.md diff --git a/published/201410/20140919 Netflix Offers to Work with Ubuntu to Bring Native Playback to All.md b/published/201409/20140919 Netflix Offers to Work with Ubuntu to Bring Native Playback to All.md similarity index 100% rename from published/201410/20140919 Netflix Offers to Work with Ubuntu to Bring Native Playback to All.md rename to published/201409/20140919 Netflix Offers to Work with Ubuntu to Bring Native Playback to All.md diff --git a/published/201410/20140919 Red Hat Acquires FeedHenry for $82 Million to Advance Mobile Development.md b/published/201409/20140919 Red Hat Acquires FeedHenry for $82 Million to Advance Mobile Development.md similarity index 100% rename from published/201410/20140919 Red Hat Acquires FeedHenry for $82 Million to Advance Mobile Development.md rename to published/201409/20140919 Red Hat Acquires FeedHenry for $82 Million to Advance Mobile Development.md diff --git a/published/201410/20140922 Ten Blogs Every Ubuntu User Must Follow.md b/published/201409/20140922 Ten Blogs Every Ubuntu User Must Follow.md similarity index 100% rename from published/201410/20140922 Ten Blogs Every Ubuntu User Must Follow.md rename to published/201409/20140922 Ten Blogs Every Ubuntu User Must Follow.md diff --git a/published/201410/20140924 Canonical Closes nginx Exploit in Ubuntu 14.04 LTS.md b/published/201409/20140924 Canonical Closes nginx Exploit in Ubuntu 14.04 LTS.md similarity index 100% rename from published/201410/20140924 Canonical Closes nginx Exploit in Ubuntu 14.04 LTS.md rename to published/201409/20140924 Canonical Closes nginx Exploit in Ubuntu 14.04 LTS.md diff --git a/published/201410/20140924 Debian 8 Jessie to Have GNOME as the Default Desktop.md b/published/201409/20140924 Debian 8 Jessie to Have GNOME as the Default Desktop.md similarity index 100% rename from published/201410/20140924 Debian 8 Jessie to Have GNOME as the Default Desktop.md rename to published/201409/20140924 Debian 8 Jessie to Have GNOME as the Default Desktop.md diff --git a/published/201410/20140924 End of the Line for Red Hat Enterprise Linux 5.md b/published/201409/20140924 End of the Line for Red Hat Enterprise Linux 5.md similarity index 100% rename from published/201410/20140924 End of the Line for Red Hat Enterprise Linux 5.md rename to published/201409/20140924 End of the Line for Red Hat Enterprise Linux 5.md diff --git a/published/201410/20140924 Second Bugfix Release for KDE Plasma 5 Arrives with Lots of Changes.md b/published/201409/20140924 Second Bugfix Release for KDE Plasma 5 Arrives with Lots of Changes.md similarity index 100% rename from published/201410/20140924 Second Bugfix Release for KDE Plasma 5 Arrives with Lots of Changes.md rename to published/201409/20140924 Second Bugfix Release for KDE Plasma 5 Arrives with Lots of Changes.md diff --git a/published/201410/20140924 Wal Commander GitHub Edition 0.17 released.md b/published/201409/20140924 Wal Commander GitHub Edition 0.17 released.md similarity index 100% rename from published/201410/20140924 Wal Commander GitHub Edition 0.17 released.md rename to published/201409/20140924 Wal Commander GitHub Edition 0.17 released.md diff --git a/published/201410/How to listen to Internet radio from the command line on Linux.md b/published/201409/How to listen to Internet radio from the command line on Linux.md similarity index 100% rename from published/201410/How to listen to Internet radio from the command line on Linux.md rename to published/201409/How to listen to Internet radio from the command line on Linux.md diff --git a/published/201410/The Open Source Witch Hunts Have Returned.md b/published/201409/The Open Source Witch Hunts Have Returned.md similarity index 100% rename from published/201410/The Open Source Witch Hunts Have Returned.md rename to published/201409/The Open Source Witch Hunts Have Returned.md From ec0d19874d471627ee3922bca6138f5c432ad155 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 1 Nov 2014 21:03:29 +0800 Subject: [PATCH 066/316] =?UTF-8?q?=E5=BD=92=E6=A1=A3201410?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...stat, pidstat, iostat and sar) for Linux Performance Monitoring.md | 0 ...0711 How to use systemd for system administration on Debian.md | 0 ...cri Cube--An Offline And Portable Package Management System.md | 0 .../20140724 What are useful online tools for Linux.md | 0 .../{ => 201410}/20140729 How to use awk command in Linux.md | 0 ...hat are better alternatives to basic command line utilities.md | 0 ...ow to install and configure Nvidia Optimus driver on Ubuntu.md | 0 ... How to install Puppet server and client on CentOS and RHEL.md | 0 ...20140811 Check how much do you type with WhatPulse on Linux.md | 0 ...improve your productivity in terminal environment with Tmux.md | 0 ...Reduce LVM' s (Logical Volume Management) in Linux--Part II.md | 0 .../{ => 201410}/20140813 How to remove file metadata on Linux.md | 0 ...orage with Logical Volume Management (LVM) in Linux--PART 1.md | 0 ...40815 How to manage a WiFi connection from the command line.md | 0 ...untu Do This--Answers to The 4 Questions New Users Ask Most.md | 0 ...18 Disable reboot using Ctrl-Alt-Del Keys in RHEL or CentOS.md | 0 ...40818 How to configure Access Control Lists (ACLs) on Linux.md | 0 ...s--How to fix 'X11 forwarding request failed on channel 0'.md | 0 published/{ => 201410}/20140819 How to Encrypt Email in Linux.md | 0 .../20140822 15 Practical Examples of 'echo' command in Linux.md | 0 .../20140822 Want To Start An Open Source Project--Here's How.md | 0 ...5 Linux FAQs with Answers--How to install Shutter on CentOS.md | 0 ...h Answers--How to show a MAC learning table of Linux bridge.md | 0 ...us Torvalds Promotes Linux for Desktops, Embedded Computing.md | 0 ...resting Funny Commands of Linux (Fun in Terminal) – Part II.md | 0 ... Fun in Linux Terminal--Play with Word and Character Counts.md | 0 .../20140902 Mount Google drive in Ubuntu 14.04 LTS.md | 0 .../{ => 201410}/20140902 Photo Editing on Linux with Krita.md | 0 published/{ => 201410}/20140904 Making MySQL Better at GitHub.md | 0 ...4 Use LaTeX In Ubuntu 14.04 and Linux Mint 17 With Texmaker.md | 0 ...0 How To Recover Default Openbox Config Files On Crunchbang.md | 0 ...10 How to download GOG games from the command line on Linux.md | 0 ...How to set up Nagios Remote Plugin Executor (NRPE) in Linux.md | 0 ...s--How to capture TCP SYN, ACK and FIN packets with tcpdump.md | 0 ...Qs with Answers--How to change hostname on CentOS or RHEL 7.md | 0 ...AQs with Answers--How to create a new Amazon AWS access key.md | 0 ...5 Linux FAQs with Answers--How to expand an XFS file system.md | 0 ...s--How to remove PPA repository from command line on Ubuntu.md | 0 ...swers--How to create a MySQL database from the command line.md | 0 .../20140922 How to Run Android Apps on Ubuntu using ARChon.md | 0 .../20140922 How to use logrotate to manage log files in Linux.md | 0 .../20140922 Reset Unity and Compiz Settings in Ubuntu 14.04.md | 0 .../{ => 201410}/20140924 How To Install Vmware 10 On CentOS 7.md | 0 ...How to delete recently opened files history in ubuntu 14.04.md | 0 ...4 How to use CloudFlare as a ddclient provider under Ubuntu.md | 0 published/{ => 201410}/20140924 Unix----stat -- more than ls.md | 0 ...FAQs with Answers--How to catch and handle a signal in Perl.md | 0 ...Answers--How to change a network interface name on CentOS 7.md | 0 ...h Answers--How to configure a static IP address on CentOS 7.md | 0 ...Qs with Answers--How to detect a Linux distribution in Perl.md | 0 ...w to embed all fonts in a PDF document generated with LaTex.md | 0 .../20140926 How To Reset Root Password On CentOS 7.md | 0 published/{ => 201410}/20140928 How to Use Systemd Timers.md | 0 ...Oracle Linux 5.11 Features Updated Unbreakable Linux Kernel.md | 0 ...929 Git Rebase Tutorial--Going Back in Time with Git Rebase.md | 0 .../20140929 Learning Vim in 2014--Working with Files.md | 0 .../20140929 Using GIT to backup your website files on linux.md | 0 ...If Your Linux System Is Vulnerable To Shellshock And Fix It.md | 0 ... How to Boot Linux ISO Images Directly From Your Hard Drive.md | 0 ...0141008 Adobe Pulls Linux PDF Reader Downloads From Website.md | 0 .../20141008 Linux Calendar App California 0.2 Released.md | 0 ...141008 Linux Kernel 3.17 Is Out With Plenty of New Features.md | 0 published/{ => 201410}/20141009 Linux Terminal--An lsof Primer.md | 0 ...20141009 Linux or UNIX wget command with practical examples.md | 0 published/{ => 201410}/20141013 UbuTricks 14.10.08.md | 0 .../20141013 Ubuntu's Unity Turns 4 Happy Birthday.md | 0 ...0141013 What is good reference management software on Linux.md | 0 ...an ISO or NRG image to a DVD from the command line on Linux.md | 0 ...e name and its writing speed from the command line on Linux.md | 0 ...s--How to detect and patch Shellshock vulnerability in bash.md | 0 ...Torvalds Regrets Alienating Developers with Strong Language.md | 0 ...Qs with Answers--How to create a video DVD on Linux desktop.md | 0 ...ight on the cost of dropping Linux and returning to Windows.md | 0 .../20141021 Debian 7.7 Is Out with Security Fixes.md | 0 published/{ => 201410}/20141021 Nifty Free Image Viewers.md | 0 ...3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md | 0 ...hieve Better Security With Proper Management of Open Source.md | 0 .../How to configure SNMPv3 on ubuntu 14.04 server.md | 0 ...uild a RPM or DEB package from the source with CheckInstall.md | 0 ...inux Performance Monitoring with Vmstat and Iostat Commands.md | 0 ...stem Performance and Usage Activity Monitoring Tool For Linux.md | 0 ...sion) Released – Install in RedHat and Debian Based Systems.md | 0 82 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201410}/20 Useful Commands of ‘Sysstat’ Utilities (mpstat, pidstat, iostat and sar) for Linux Performance Monitoring.md (100%) rename published/{ => 201410}/20140711 How to use systemd for system administration on Debian.md (100%) rename published/{ => 201410}/20140724 Camicri Cube--An Offline And Portable Package Management System.md (100%) rename published/{ => 201410}/20140724 What are useful online tools for Linux.md (100%) rename published/{ => 201410}/20140729 How to use awk command in Linux.md (100%) rename published/{ => 201410}/20140801 What are better alternatives to basic command line utilities.md (100%) rename published/{ => 201410}/20140804 How to install and configure Nvidia Optimus driver on Ubuntu.md (100%) rename published/{ => 201410}/20140808 How to install Puppet server and client on CentOS and RHEL.md (100%) rename published/{ => 201410}/20140811 Check how much do you type with WhatPulse on Linux.md (100%) rename published/{ => 201410}/20140811 How to improve your productivity in terminal environment with Tmux.md (100%) rename published/{ => 201410}/20140813 How to Extend or Reduce LVM' s (Logical Volume Management) in Linux--Part II.md (100%) rename published/{ => 201410}/20140813 How to remove file metadata on Linux.md (100%) rename published/{ => 201410}/20140813 Setup Flexible Disk Storage with Logical Volume Management (LVM) in Linux--PART 1.md (100%) rename published/{ => 201410}/20140815 How to manage a WiFi connection from the command line.md (100%) rename published/{ => 201410}/20140818 Can Ubuntu Do This--Answers to The 4 Questions New Users Ask Most.md (100%) rename published/{ => 201410}/20140818 Disable reboot using Ctrl-Alt-Del Keys in RHEL or CentOS.md (100%) rename published/{ => 201410}/20140818 How to configure Access Control Lists (ACLs) on Linux.md (100%) rename published/{ => 201410}/20140818 Linux FAQs with Answers--How to fix 'X11 forwarding request failed on channel 0'.md (100%) rename published/{ => 201410}/20140819 How to Encrypt Email in Linux.md (100%) rename published/{ => 201410}/20140822 15 Practical Examples of 'echo' command in Linux.md (100%) rename published/{ => 201410}/20140822 Want To Start An Open Source Project--Here's How.md (100%) rename published/{ => 201410}/20140825 Linux FAQs with Answers--How to install Shutter on CentOS.md (100%) rename published/{ => 201410}/20140825 Linux FAQs with Answers--How to show a MAC learning table of Linux bridge.md (100%) rename published/{ => 201410}/20140826 Linus Torvalds Promotes Linux for Desktops, Embedded Computing.md (100%) rename published/{ => 201410}/20140829 6 Interesting Funny Commands of Linux (Fun in Terminal) – Part II.md (100%) rename published/{ => 201410}/20140829 Fun in Linux Terminal--Play with Word and Character Counts.md (100%) rename published/{ => 201410}/20140902 Mount Google drive in Ubuntu 14.04 LTS.md (100%) rename published/{ => 201410}/20140902 Photo Editing on Linux with Krita.md (100%) rename published/{ => 201410}/20140904 Making MySQL Better at GitHub.md (100%) rename published/{ => 201410}/20140904 Use LaTeX In Ubuntu 14.04 and Linux Mint 17 With Texmaker.md (100%) rename published/{ => 201410}/20140910 How To Recover Default Openbox Config Files On Crunchbang.md (100%) rename published/{ => 201410}/20140910 How to download GOG games from the command line on Linux.md (100%) rename published/{ => 201410}/20140910 How to set up Nagios Remote Plugin Executor (NRPE) in Linux.md (100%) rename published/{ => 201410}/20140915 Linux FAQs with Answers--How to capture TCP SYN, ACK and FIN packets with tcpdump.md (100%) rename published/{ => 201410}/20140915 Linux FAQs with Answers--How to change hostname on CentOS or RHEL 7.md (100%) rename published/{ => 201410}/20140915 Linux FAQs with Answers--How to create a new Amazon AWS access key.md (100%) rename published/{ => 201410}/20140915 Linux FAQs with Answers--How to expand an XFS file system.md (100%) rename published/{ => 201410}/20140915 Linux FAQs with Answers--How to remove PPA repository from command line on Ubuntu.md (100%) rename published/{ => 201410}/20140919 Linux FAQs with Answers--How to create a MySQL database from the command line.md (100%) rename published/{ => 201410}/20140922 How to Run Android Apps on Ubuntu using ARChon.md (100%) rename published/{ => 201410}/20140922 How to use logrotate to manage log files in Linux.md (100%) rename published/{ => 201410}/20140922 Reset Unity and Compiz Settings in Ubuntu 14.04.md (100%) rename published/{ => 201410}/20140924 How To Install Vmware 10 On CentOS 7.md (100%) rename published/{ => 201410}/20140924 How to delete recently opened files history in ubuntu 14.04.md (100%) rename published/{ => 201410}/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md (100%) rename published/{ => 201410}/20140924 Unix----stat -- more than ls.md (100%) rename published/{ => 201410}/20140925 Linux FAQs with Answers--How to catch and handle a signal in Perl.md (100%) rename published/{ => 201410}/20140925 Linux FAQs with Answers--How to change a network interface name on CentOS 7.md (100%) rename published/{ => 201410}/20140925 Linux FAQs with Answers--How to configure a static IP address on CentOS 7.md (100%) rename published/{ => 201410}/20140925 Linux FAQs with Answers--How to detect a Linux distribution in Perl.md (100%) rename published/{ => 201410}/20140925 Linux FAQs with Answers--How to embed all fonts in a PDF document generated with LaTex.md (100%) rename published/{ => 201410}/20140926 How To Reset Root Password On CentOS 7.md (100%) rename published/{ => 201410}/20140928 How to Use Systemd Timers.md (100%) rename published/{ => 201410}/20140928 Oracle Linux 5.11 Features Updated Unbreakable Linux Kernel.md (100%) rename published/{ => 201410}/20140929 Git Rebase Tutorial--Going Back in Time with Git Rebase.md (100%) rename published/{ => 201410}/20140929 Learning Vim in 2014--Working with Files.md (100%) rename published/{ => 201410}/20140929 Using GIT to backup your website files on linux.md (100%) rename published/{ => 201410}/20140930 Check If Your Linux System Is Vulnerable To Shellshock And Fix It.md (100%) rename published/{ => 201410}/20140930 How to Boot Linux ISO Images Directly From Your Hard Drive.md (100%) rename published/{ => 201410}/20141008 Adobe Pulls Linux PDF Reader Downloads From Website.md (100%) rename published/{ => 201410}/20141008 Linux Calendar App California 0.2 Released.md (100%) rename published/{ => 201410}/20141008 Linux Kernel 3.17 Is Out With Plenty of New Features.md (100%) rename published/{ => 201410}/20141009 Linux Terminal--An lsof Primer.md (100%) rename published/{ => 201410}/20141009 Linux or UNIX wget command with practical examples.md (100%) rename published/{ => 201410}/20141013 UbuTricks 14.10.08.md (100%) rename published/{ => 201410}/20141013 Ubuntu's Unity Turns 4 Happy Birthday.md (100%) rename published/{ => 201410}/20141013 What is good reference management software on Linux.md (100%) rename published/{ => 201410}/20141014 Linux FAQs with Answers--How to burn an ISO or NRG image to a DVD from the command line on Linux.md (100%) rename published/{ => 201410}/20141014 Linux FAQs with Answers--How to detect DVD writer' s device name and its writing speed from the command line on Linux.md (100%) rename published/{ => 201410}/20141014 Linux FAQs with Answers--How to detect and patch Shellshock vulnerability in bash.md (100%) rename published/{ => 201410}/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md (100%) rename published/{ => 201410}/20141017 Linux FAQs with Answers--How to create a video DVD on Linux desktop.md (100%) rename published/{ => 201410}/20141017 Munich sheds light on the cost of dropping Linux and returning to Windows.md (100%) rename published/{ => 201410}/20141021 Debian 7.7 Is Out with Security Fixes.md (100%) rename published/{ => 201410}/20141021 Nifty Free Image Viewers.md (100%) rename published/{ => 201410}/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md (100%) rename published/{ => 201410}/How to Achieve Better Security With Proper Management of Open Source.md (100%) rename published/{ => 201410}/How to configure SNMPv3 on ubuntu 14.04 server.md (100%) rename published/{ => 201410}/Linux FAQs with Answers--How to build a RPM or DEB package from the source with CheckInstall.md (100%) rename published/{ => 201410}/Linux Performance Monitoring with Vmstat and Iostat Commands.md (100%) rename published/{ => 201410}/Sysstat – All-in-One System Performance and Usage Activity Monitoring Tool For Linux.md (100%) rename published/{ => 201410}/Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md (100%) diff --git a/published/20 Useful Commands of ‘Sysstat’ Utilities (mpstat, pidstat, iostat and sar) for Linux Performance Monitoring.md b/published/201410/20 Useful Commands of ‘Sysstat’ Utilities (mpstat, pidstat, iostat and sar) for Linux Performance Monitoring.md similarity index 100% rename from published/20 Useful Commands of ‘Sysstat’ Utilities (mpstat, pidstat, iostat and sar) for Linux Performance Monitoring.md rename to published/201410/20 Useful Commands of ‘Sysstat’ Utilities (mpstat, pidstat, iostat and sar) for Linux Performance Monitoring.md diff --git a/published/20140711 How to use systemd for system administration on Debian.md b/published/201410/20140711 How to use systemd for system administration on Debian.md similarity index 100% rename from published/20140711 How to use systemd for system administration on Debian.md rename to published/201410/20140711 How to use systemd for system administration on Debian.md diff --git a/published/20140724 Camicri Cube--An Offline And Portable Package Management System.md b/published/201410/20140724 Camicri Cube--An Offline And Portable Package Management System.md similarity index 100% rename from published/20140724 Camicri Cube--An Offline And Portable Package Management System.md rename to published/201410/20140724 Camicri Cube--An Offline And Portable Package Management System.md diff --git a/published/20140724 What are useful online tools for Linux.md b/published/201410/20140724 What are useful online tools for Linux.md similarity index 100% rename from published/20140724 What are useful online tools for Linux.md rename to published/201410/20140724 What are useful online tools for Linux.md diff --git a/published/20140729 How to use awk command in Linux.md b/published/201410/20140729 How to use awk command in Linux.md similarity index 100% rename from published/20140729 How to use awk command in Linux.md rename to published/201410/20140729 How to use awk command in Linux.md diff --git a/published/20140801 What are better alternatives to basic command line utilities.md b/published/201410/20140801 What are better alternatives to basic command line utilities.md similarity index 100% rename from published/20140801 What are better alternatives to basic command line utilities.md rename to published/201410/20140801 What are better alternatives to basic command line utilities.md diff --git a/published/20140804 How to install and configure Nvidia Optimus driver on Ubuntu.md b/published/201410/20140804 How to install and configure Nvidia Optimus driver on Ubuntu.md similarity index 100% rename from published/20140804 How to install and configure Nvidia Optimus driver on Ubuntu.md rename to published/201410/20140804 How to install and configure Nvidia Optimus driver on Ubuntu.md diff --git a/published/20140808 How to install Puppet server and client on CentOS and RHEL.md b/published/201410/20140808 How to install Puppet server and client on CentOS and RHEL.md similarity index 100% rename from published/20140808 How to install Puppet server and client on CentOS and RHEL.md rename to published/201410/20140808 How to install Puppet server and client on CentOS and RHEL.md diff --git a/published/20140811 Check how much do you type with WhatPulse on Linux.md b/published/201410/20140811 Check how much do you type with WhatPulse on Linux.md similarity index 100% rename from published/20140811 Check how much do you type with WhatPulse on Linux.md rename to published/201410/20140811 Check how much do you type with WhatPulse on Linux.md diff --git a/published/20140811 How to improve your productivity in terminal environment with Tmux.md b/published/201410/20140811 How to improve your productivity in terminal environment with Tmux.md similarity index 100% rename from published/20140811 How to improve your productivity in terminal environment with Tmux.md rename to published/201410/20140811 How to improve your productivity in terminal environment with Tmux.md diff --git a/published/20140813 How to Extend or Reduce LVM' s (Logical Volume Management) in Linux--Part II.md b/published/201410/20140813 How to Extend or Reduce LVM' s (Logical Volume Management) in Linux--Part II.md similarity index 100% rename from published/20140813 How to Extend or Reduce LVM' s (Logical Volume Management) in Linux--Part II.md rename to published/201410/20140813 How to Extend or Reduce LVM' s (Logical Volume Management) in Linux--Part II.md diff --git a/published/20140813 How to remove file metadata on Linux.md b/published/201410/20140813 How to remove file metadata on Linux.md similarity index 100% rename from published/20140813 How to remove file metadata on Linux.md rename to published/201410/20140813 How to remove file metadata on Linux.md diff --git a/published/20140813 Setup Flexible Disk Storage with Logical Volume Management (LVM) in Linux--PART 1.md b/published/201410/20140813 Setup Flexible Disk Storage with Logical Volume Management (LVM) in Linux--PART 1.md similarity index 100% rename from published/20140813 Setup Flexible Disk Storage with Logical Volume Management (LVM) in Linux--PART 1.md rename to published/201410/20140813 Setup Flexible Disk Storage with Logical Volume Management (LVM) in Linux--PART 1.md diff --git a/published/20140815 How to manage a WiFi connection from the command line.md b/published/201410/20140815 How to manage a WiFi connection from the command line.md similarity index 100% rename from published/20140815 How to manage a WiFi connection from the command line.md rename to published/201410/20140815 How to manage a WiFi connection from the command line.md diff --git a/published/20140818 Can Ubuntu Do This--Answers to The 4 Questions New Users Ask Most.md b/published/201410/20140818 Can Ubuntu Do This--Answers to The 4 Questions New Users Ask Most.md similarity index 100% rename from published/20140818 Can Ubuntu Do This--Answers to The 4 Questions New Users Ask Most.md rename to published/201410/20140818 Can Ubuntu Do This--Answers to The 4 Questions New Users Ask Most.md diff --git a/published/20140818 Disable reboot using Ctrl-Alt-Del Keys in RHEL or CentOS.md b/published/201410/20140818 Disable reboot using Ctrl-Alt-Del Keys in RHEL or CentOS.md similarity index 100% rename from published/20140818 Disable reboot using Ctrl-Alt-Del Keys in RHEL or CentOS.md rename to published/201410/20140818 Disable reboot using Ctrl-Alt-Del Keys in RHEL or CentOS.md diff --git a/published/20140818 How to configure Access Control Lists (ACLs) on Linux.md b/published/201410/20140818 How to configure Access Control Lists (ACLs) on Linux.md similarity index 100% rename from published/20140818 How to configure Access Control Lists (ACLs) on Linux.md rename to published/201410/20140818 How to configure Access Control Lists (ACLs) on Linux.md diff --git a/published/20140818 Linux FAQs with Answers--How to fix 'X11 forwarding request failed on channel 0'.md b/published/201410/20140818 Linux FAQs with Answers--How to fix 'X11 forwarding request failed on channel 0'.md similarity index 100% rename from published/20140818 Linux FAQs with Answers--How to fix 'X11 forwarding request failed on channel 0'.md rename to published/201410/20140818 Linux FAQs with Answers--How to fix 'X11 forwarding request failed on channel 0'.md diff --git a/published/20140819 How to Encrypt Email in Linux.md b/published/201410/20140819 How to Encrypt Email in Linux.md similarity index 100% rename from published/20140819 How to Encrypt Email in Linux.md rename to published/201410/20140819 How to Encrypt Email in Linux.md diff --git a/published/20140822 15 Practical Examples of 'echo' command in Linux.md b/published/201410/20140822 15 Practical Examples of 'echo' command in Linux.md similarity index 100% rename from published/20140822 15 Practical Examples of 'echo' command in Linux.md rename to published/201410/20140822 15 Practical Examples of 'echo' command in Linux.md diff --git a/published/20140822 Want To Start An Open Source Project--Here's How.md b/published/201410/20140822 Want To Start An Open Source Project--Here's How.md similarity index 100% rename from published/20140822 Want To Start An Open Source Project--Here's How.md rename to published/201410/20140822 Want To Start An Open Source Project--Here's How.md diff --git a/published/20140825 Linux FAQs with Answers--How to install Shutter on CentOS.md b/published/201410/20140825 Linux FAQs with Answers--How to install Shutter on CentOS.md similarity index 100% rename from published/20140825 Linux FAQs with Answers--How to install Shutter on CentOS.md rename to published/201410/20140825 Linux FAQs with Answers--How to install Shutter on CentOS.md diff --git a/published/20140825 Linux FAQs with Answers--How to show a MAC learning table of Linux bridge.md b/published/201410/20140825 Linux FAQs with Answers--How to show a MAC learning table of Linux bridge.md similarity index 100% rename from published/20140825 Linux FAQs with Answers--How to show a MAC learning table of Linux bridge.md rename to published/201410/20140825 Linux FAQs with Answers--How to show a MAC learning table of Linux bridge.md diff --git a/published/20140826 Linus Torvalds Promotes Linux for Desktops, Embedded Computing.md b/published/201410/20140826 Linus Torvalds Promotes Linux for Desktops, Embedded Computing.md similarity index 100% rename from published/20140826 Linus Torvalds Promotes Linux for Desktops, Embedded Computing.md rename to published/201410/20140826 Linus Torvalds Promotes Linux for Desktops, Embedded Computing.md diff --git a/published/20140829 6 Interesting Funny Commands of Linux (Fun in Terminal) – Part II.md b/published/201410/20140829 6 Interesting Funny Commands of Linux (Fun in Terminal) – Part II.md similarity index 100% rename from published/20140829 6 Interesting Funny Commands of Linux (Fun in Terminal) – Part II.md rename to published/201410/20140829 6 Interesting Funny Commands of Linux (Fun in Terminal) – Part II.md diff --git a/published/20140829 Fun in Linux Terminal--Play with Word and Character Counts.md b/published/201410/20140829 Fun in Linux Terminal--Play with Word and Character Counts.md similarity index 100% rename from published/20140829 Fun in Linux Terminal--Play with Word and Character Counts.md rename to published/201410/20140829 Fun in Linux Terminal--Play with Word and Character Counts.md diff --git a/published/20140902 Mount Google drive in Ubuntu 14.04 LTS.md b/published/201410/20140902 Mount Google drive in Ubuntu 14.04 LTS.md similarity index 100% rename from published/20140902 Mount Google drive in Ubuntu 14.04 LTS.md rename to published/201410/20140902 Mount Google drive in Ubuntu 14.04 LTS.md diff --git a/published/20140902 Photo Editing on Linux with Krita.md b/published/201410/20140902 Photo Editing on Linux with Krita.md similarity index 100% rename from published/20140902 Photo Editing on Linux with Krita.md rename to published/201410/20140902 Photo Editing on Linux with Krita.md diff --git a/published/20140904 Making MySQL Better at GitHub.md b/published/201410/20140904 Making MySQL Better at GitHub.md similarity index 100% rename from published/20140904 Making MySQL Better at GitHub.md rename to published/201410/20140904 Making MySQL Better at GitHub.md diff --git a/published/20140904 Use LaTeX In Ubuntu 14.04 and Linux Mint 17 With Texmaker.md b/published/201410/20140904 Use LaTeX In Ubuntu 14.04 and Linux Mint 17 With Texmaker.md similarity index 100% rename from published/20140904 Use LaTeX In Ubuntu 14.04 and Linux Mint 17 With Texmaker.md rename to published/201410/20140904 Use LaTeX In Ubuntu 14.04 and Linux Mint 17 With Texmaker.md diff --git a/published/20140910 How To Recover Default Openbox Config Files On Crunchbang.md b/published/201410/20140910 How To Recover Default Openbox Config Files On Crunchbang.md similarity index 100% rename from published/20140910 How To Recover Default Openbox Config Files On Crunchbang.md rename to published/201410/20140910 How To Recover Default Openbox Config Files On Crunchbang.md diff --git a/published/20140910 How to download GOG games from the command line on Linux.md b/published/201410/20140910 How to download GOG games from the command line on Linux.md similarity index 100% rename from published/20140910 How to download GOG games from the command line on Linux.md rename to published/201410/20140910 How to download GOG games from the command line on Linux.md diff --git a/published/20140910 How to set up Nagios Remote Plugin Executor (NRPE) in Linux.md b/published/201410/20140910 How to set up Nagios Remote Plugin Executor (NRPE) in Linux.md similarity index 100% rename from published/20140910 How to set up Nagios Remote Plugin Executor (NRPE) in Linux.md rename to published/201410/20140910 How to set up Nagios Remote Plugin Executor (NRPE) in Linux.md diff --git a/published/20140915 Linux FAQs with Answers--How to capture TCP SYN, ACK and FIN packets with tcpdump.md b/published/201410/20140915 Linux FAQs with Answers--How to capture TCP SYN, ACK and FIN packets with tcpdump.md similarity index 100% rename from published/20140915 Linux FAQs with Answers--How to capture TCP SYN, ACK and FIN packets with tcpdump.md rename to published/201410/20140915 Linux FAQs with Answers--How to capture TCP SYN, ACK and FIN packets with tcpdump.md diff --git a/published/20140915 Linux FAQs with Answers--How to change hostname on CentOS or RHEL 7.md b/published/201410/20140915 Linux FAQs with Answers--How to change hostname on CentOS or RHEL 7.md similarity index 100% rename from published/20140915 Linux FAQs with Answers--How to change hostname on CentOS or RHEL 7.md rename to published/201410/20140915 Linux FAQs with Answers--How to change hostname on CentOS or RHEL 7.md diff --git a/published/20140915 Linux FAQs with Answers--How to create a new Amazon AWS access key.md b/published/201410/20140915 Linux FAQs with Answers--How to create a new Amazon AWS access key.md similarity index 100% rename from published/20140915 Linux FAQs with Answers--How to create a new Amazon AWS access key.md rename to published/201410/20140915 Linux FAQs with Answers--How to create a new Amazon AWS access key.md diff --git a/published/20140915 Linux FAQs with Answers--How to expand an XFS file system.md b/published/201410/20140915 Linux FAQs with Answers--How to expand an XFS file system.md similarity index 100% rename from published/20140915 Linux FAQs with Answers--How to expand an XFS file system.md rename to published/201410/20140915 Linux FAQs with Answers--How to expand an XFS file system.md diff --git a/published/20140915 Linux FAQs with Answers--How to remove PPA repository from command line on Ubuntu.md b/published/201410/20140915 Linux FAQs with Answers--How to remove PPA repository from command line on Ubuntu.md similarity index 100% rename from published/20140915 Linux FAQs with Answers--How to remove PPA repository from command line on Ubuntu.md rename to published/201410/20140915 Linux FAQs with Answers--How to remove PPA repository from command line on Ubuntu.md diff --git a/published/20140919 Linux FAQs with Answers--How to create a MySQL database from the command line.md b/published/201410/20140919 Linux FAQs with Answers--How to create a MySQL database from the command line.md similarity index 100% rename from published/20140919 Linux FAQs with Answers--How to create a MySQL database from the command line.md rename to published/201410/20140919 Linux FAQs with Answers--How to create a MySQL database from the command line.md diff --git a/published/20140922 How to Run Android Apps on Ubuntu using ARChon.md b/published/201410/20140922 How to Run Android Apps on Ubuntu using ARChon.md similarity index 100% rename from published/20140922 How to Run Android Apps on Ubuntu using ARChon.md rename to published/201410/20140922 How to Run Android Apps on Ubuntu using ARChon.md diff --git a/published/20140922 How to use logrotate to manage log files in Linux.md b/published/201410/20140922 How to use logrotate to manage log files in Linux.md similarity index 100% rename from published/20140922 How to use logrotate to manage log files in Linux.md rename to published/201410/20140922 How to use logrotate to manage log files in Linux.md diff --git a/published/20140922 Reset Unity and Compiz Settings in Ubuntu 14.04.md b/published/201410/20140922 Reset Unity and Compiz Settings in Ubuntu 14.04.md similarity index 100% rename from published/20140922 Reset Unity and Compiz Settings in Ubuntu 14.04.md rename to published/201410/20140922 Reset Unity and Compiz Settings in Ubuntu 14.04.md diff --git a/published/20140924 How To Install Vmware 10 On CentOS 7.md b/published/201410/20140924 How To Install Vmware 10 On CentOS 7.md similarity index 100% rename from published/20140924 How To Install Vmware 10 On CentOS 7.md rename to published/201410/20140924 How To Install Vmware 10 On CentOS 7.md diff --git a/published/20140924 How to delete recently opened files history in ubuntu 14.04.md b/published/201410/20140924 How to delete recently opened files history in ubuntu 14.04.md similarity index 100% rename from published/20140924 How to delete recently opened files history in ubuntu 14.04.md rename to published/201410/20140924 How to delete recently opened files history in ubuntu 14.04.md diff --git a/published/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md b/published/201410/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md similarity index 100% rename from published/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md rename to published/201410/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md diff --git a/published/20140924 Unix----stat -- more than ls.md b/published/201410/20140924 Unix----stat -- more than ls.md similarity index 100% rename from published/20140924 Unix----stat -- more than ls.md rename to published/201410/20140924 Unix----stat -- more than ls.md diff --git a/published/20140925 Linux FAQs with Answers--How to catch and handle a signal in Perl.md b/published/201410/20140925 Linux FAQs with Answers--How to catch and handle a signal in Perl.md similarity index 100% rename from published/20140925 Linux FAQs with Answers--How to catch and handle a signal in Perl.md rename to published/201410/20140925 Linux FAQs with Answers--How to catch and handle a signal in Perl.md diff --git a/published/20140925 Linux FAQs with Answers--How to change a network interface name on CentOS 7.md b/published/201410/20140925 Linux FAQs with Answers--How to change a network interface name on CentOS 7.md similarity index 100% rename from published/20140925 Linux FAQs with Answers--How to change a network interface name on CentOS 7.md rename to published/201410/20140925 Linux FAQs with Answers--How to change a network interface name on CentOS 7.md diff --git a/published/20140925 Linux FAQs with Answers--How to configure a static IP address on CentOS 7.md b/published/201410/20140925 Linux FAQs with Answers--How to configure a static IP address on CentOS 7.md similarity index 100% rename from published/20140925 Linux FAQs with Answers--How to configure a static IP address on CentOS 7.md rename to published/201410/20140925 Linux FAQs with Answers--How to configure a static IP address on CentOS 7.md diff --git a/published/20140925 Linux FAQs with Answers--How to detect a Linux distribution in Perl.md b/published/201410/20140925 Linux FAQs with Answers--How to detect a Linux distribution in Perl.md similarity index 100% rename from published/20140925 Linux FAQs with Answers--How to detect a Linux distribution in Perl.md rename to published/201410/20140925 Linux FAQs with Answers--How to detect a Linux distribution in Perl.md diff --git a/published/20140925 Linux FAQs with Answers--How to embed all fonts in a PDF document generated with LaTex.md b/published/201410/20140925 Linux FAQs with Answers--How to embed all fonts in a PDF document generated with LaTex.md similarity index 100% rename from published/20140925 Linux FAQs with Answers--How to embed all fonts in a PDF document generated with LaTex.md rename to published/201410/20140925 Linux FAQs with Answers--How to embed all fonts in a PDF document generated with LaTex.md diff --git a/published/20140926 How To Reset Root Password On CentOS 7.md b/published/201410/20140926 How To Reset Root Password On CentOS 7.md similarity index 100% rename from published/20140926 How To Reset Root Password On CentOS 7.md rename to published/201410/20140926 How To Reset Root Password On CentOS 7.md diff --git a/published/20140928 How to Use Systemd Timers.md b/published/201410/20140928 How to Use Systemd Timers.md similarity index 100% rename from published/20140928 How to Use Systemd Timers.md rename to published/201410/20140928 How to Use Systemd Timers.md diff --git a/published/20140928 Oracle Linux 5.11 Features Updated Unbreakable Linux Kernel.md b/published/201410/20140928 Oracle Linux 5.11 Features Updated Unbreakable Linux Kernel.md similarity index 100% rename from published/20140928 Oracle Linux 5.11 Features Updated Unbreakable Linux Kernel.md rename to published/201410/20140928 Oracle Linux 5.11 Features Updated Unbreakable Linux Kernel.md diff --git a/published/20140929 Git Rebase Tutorial--Going Back in Time with Git Rebase.md b/published/201410/20140929 Git Rebase Tutorial--Going Back in Time with Git Rebase.md similarity index 100% rename from published/20140929 Git Rebase Tutorial--Going Back in Time with Git Rebase.md rename to published/201410/20140929 Git Rebase Tutorial--Going Back in Time with Git Rebase.md diff --git a/published/20140929 Learning Vim in 2014--Working with Files.md b/published/201410/20140929 Learning Vim in 2014--Working with Files.md similarity index 100% rename from published/20140929 Learning Vim in 2014--Working with Files.md rename to published/201410/20140929 Learning Vim in 2014--Working with Files.md diff --git a/published/20140929 Using GIT to backup your website files on linux.md b/published/201410/20140929 Using GIT to backup your website files on linux.md similarity index 100% rename from published/20140929 Using GIT to backup your website files on linux.md rename to published/201410/20140929 Using GIT to backup your website files on linux.md diff --git a/published/20140930 Check If Your Linux System Is Vulnerable To Shellshock And Fix It.md b/published/201410/20140930 Check If Your Linux System Is Vulnerable To Shellshock And Fix It.md similarity index 100% rename from published/20140930 Check If Your Linux System Is Vulnerable To Shellshock And Fix It.md rename to published/201410/20140930 Check If Your Linux System Is Vulnerable To Shellshock And Fix It.md diff --git a/published/20140930 How to Boot Linux ISO Images Directly From Your Hard Drive.md b/published/201410/20140930 How to Boot Linux ISO Images Directly From Your Hard Drive.md similarity index 100% rename from published/20140930 How to Boot Linux ISO Images Directly From Your Hard Drive.md rename to published/201410/20140930 How to Boot Linux ISO Images Directly From Your Hard Drive.md diff --git a/published/20141008 Adobe Pulls Linux PDF Reader Downloads From Website.md b/published/201410/20141008 Adobe Pulls Linux PDF Reader Downloads From Website.md similarity index 100% rename from published/20141008 Adobe Pulls Linux PDF Reader Downloads From Website.md rename to published/201410/20141008 Adobe Pulls Linux PDF Reader Downloads From Website.md diff --git a/published/20141008 Linux Calendar App California 0.2 Released.md b/published/201410/20141008 Linux Calendar App California 0.2 Released.md similarity index 100% rename from published/20141008 Linux Calendar App California 0.2 Released.md rename to published/201410/20141008 Linux Calendar App California 0.2 Released.md diff --git a/published/20141008 Linux Kernel 3.17 Is Out With Plenty of New Features.md b/published/201410/20141008 Linux Kernel 3.17 Is Out With Plenty of New Features.md similarity index 100% rename from published/20141008 Linux Kernel 3.17 Is Out With Plenty of New Features.md rename to published/201410/20141008 Linux Kernel 3.17 Is Out With Plenty of New Features.md diff --git a/published/20141009 Linux Terminal--An lsof Primer.md b/published/201410/20141009 Linux Terminal--An lsof Primer.md similarity index 100% rename from published/20141009 Linux Terminal--An lsof Primer.md rename to published/201410/20141009 Linux Terminal--An lsof Primer.md diff --git a/published/20141009 Linux or UNIX wget command with practical examples.md b/published/201410/20141009 Linux or UNIX wget command with practical examples.md similarity index 100% rename from published/20141009 Linux or UNIX wget command with practical examples.md rename to published/201410/20141009 Linux or UNIX wget command with practical examples.md diff --git a/published/20141013 UbuTricks 14.10.08.md b/published/201410/20141013 UbuTricks 14.10.08.md similarity index 100% rename from published/20141013 UbuTricks 14.10.08.md rename to published/201410/20141013 UbuTricks 14.10.08.md diff --git a/published/20141013 Ubuntu's Unity Turns 4 Happy Birthday.md b/published/201410/20141013 Ubuntu's Unity Turns 4 Happy Birthday.md similarity index 100% rename from published/20141013 Ubuntu's Unity Turns 4 Happy Birthday.md rename to published/201410/20141013 Ubuntu's Unity Turns 4 Happy Birthday.md diff --git a/published/20141013 What is good reference management software on Linux.md b/published/201410/20141013 What is good reference management software on Linux.md similarity index 100% rename from published/20141013 What is good reference management software on Linux.md rename to published/201410/20141013 What is good reference management software on Linux.md diff --git a/published/20141014 Linux FAQs with Answers--How to burn an ISO or NRG image to a DVD from the command line on Linux.md b/published/201410/20141014 Linux FAQs with Answers--How to burn an ISO or NRG image to a DVD from the command line on Linux.md similarity index 100% rename from published/20141014 Linux FAQs with Answers--How to burn an ISO or NRG image to a DVD from the command line on Linux.md rename to published/201410/20141014 Linux FAQs with Answers--How to burn an ISO or NRG image to a DVD from the command line on Linux.md diff --git a/published/20141014 Linux FAQs with Answers--How to detect DVD writer' s device name and its writing speed from the command line on Linux.md b/published/201410/20141014 Linux FAQs with Answers--How to detect DVD writer' s device name and its writing speed from the command line on Linux.md similarity index 100% rename from published/20141014 Linux FAQs with Answers--How to detect DVD writer' s device name and its writing speed from the command line on Linux.md rename to published/201410/20141014 Linux FAQs with Answers--How to detect DVD writer' s device name and its writing speed from the command line on Linux.md diff --git a/published/20141014 Linux FAQs with Answers--How to detect and patch Shellshock vulnerability in bash.md b/published/201410/20141014 Linux FAQs with Answers--How to detect and patch Shellshock vulnerability in bash.md similarity index 100% rename from published/20141014 Linux FAQs with Answers--How to detect and patch Shellshock vulnerability in bash.md rename to published/201410/20141014 Linux FAQs with Answers--How to detect and patch Shellshock vulnerability in bash.md diff --git a/published/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md b/published/201410/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md similarity index 100% rename from published/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md rename to published/201410/20141017 Linus Torvalds Regrets Alienating Developers with Strong Language.md diff --git a/published/20141017 Linux FAQs with Answers--How to create a video DVD on Linux desktop.md b/published/201410/20141017 Linux FAQs with Answers--How to create a video DVD on Linux desktop.md similarity index 100% rename from published/20141017 Linux FAQs with Answers--How to create a video DVD on Linux desktop.md rename to published/201410/20141017 Linux FAQs with Answers--How to create a video DVD on Linux desktop.md diff --git a/published/20141017 Munich sheds light on the cost of dropping Linux and returning to Windows.md b/published/201410/20141017 Munich sheds light on the cost of dropping Linux and returning to Windows.md similarity index 100% rename from published/20141017 Munich sheds light on the cost of dropping Linux and returning to Windows.md rename to published/201410/20141017 Munich sheds light on the cost of dropping Linux and returning to Windows.md diff --git a/published/20141021 Debian 7.7 Is Out with Security Fixes.md b/published/201410/20141021 Debian 7.7 Is Out with Security Fixes.md similarity index 100% rename from published/20141021 Debian 7.7 Is Out with Security Fixes.md rename to published/201410/20141021 Debian 7.7 Is Out with Security Fixes.md diff --git a/published/20141021 Nifty Free Image Viewers.md b/published/201410/20141021 Nifty Free Image Viewers.md similarity index 100% rename from published/20141021 Nifty Free Image Viewers.md rename to published/201410/20141021 Nifty Free Image Viewers.md diff --git a/published/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md b/published/201410/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md similarity index 100% rename from published/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md rename to published/201410/20141023 Claws Mail 3.11.0 Brings a Ton of Changes and Fixes for POODLE Exploit.md diff --git a/published/How to Achieve Better Security With Proper Management of Open Source.md b/published/201410/How to Achieve Better Security With Proper Management of Open Source.md similarity index 100% rename from published/How to Achieve Better Security With Proper Management of Open Source.md rename to published/201410/How to Achieve Better Security With Proper Management of Open Source.md diff --git a/published/How to configure SNMPv3 on ubuntu 14.04 server.md b/published/201410/How to configure SNMPv3 on ubuntu 14.04 server.md similarity index 100% rename from published/How to configure SNMPv3 on ubuntu 14.04 server.md rename to published/201410/How to configure SNMPv3 on ubuntu 14.04 server.md diff --git a/published/Linux FAQs with Answers--How to build a RPM or DEB package from the source with CheckInstall.md b/published/201410/Linux FAQs with Answers--How to build a RPM or DEB package from the source with CheckInstall.md similarity index 100% rename from published/Linux FAQs with Answers--How to build a RPM or DEB package from the source with CheckInstall.md rename to published/201410/Linux FAQs with Answers--How to build a RPM or DEB package from the source with CheckInstall.md diff --git a/published/Linux Performance Monitoring with Vmstat and Iostat Commands.md b/published/201410/Linux Performance Monitoring with Vmstat and Iostat Commands.md similarity index 100% rename from published/Linux Performance Monitoring with Vmstat and Iostat Commands.md rename to published/201410/Linux Performance Monitoring with Vmstat and Iostat Commands.md diff --git a/published/Sysstat – All-in-One System Performance and Usage Activity Monitoring Tool For Linux.md b/published/201410/Sysstat – All-in-One System Performance and Usage Activity Monitoring Tool For Linux.md similarity index 100% rename from published/Sysstat – All-in-One System Performance and Usage Activity Monitoring Tool For Linux.md rename to published/201410/Sysstat – All-in-One System Performance and Usage Activity Monitoring Tool For Linux.md diff --git a/published/Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md b/published/201410/Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md similarity index 100% rename from published/Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md rename to published/201410/Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md From 3d3e7d432cb6d2e58545228c2ecfddb3be5a1fb3 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 1 Nov 2014 21:03:57 +0800 Subject: [PATCH 067/316] PUB:20140812 How to set up a USB network printer and scanner server on Debian @GOLinux --- ...rk printer and scanner server on Debian.md | 60 ++++++++++--------- 1 file changed, 31 insertions(+), 29 deletions(-) rename {translated/tech => published}/20140812 How to set up a USB network printer and scanner server on Debian.md (79%) diff --git a/translated/tech/20140812 How to set up a USB network printer and scanner server on Debian.md b/published/20140812 How to set up a USB network printer and scanner server on Debian.md similarity index 79% rename from translated/tech/20140812 How to set up a USB network printer and scanner server on Debian.md rename to published/20140812 How to set up a USB network printer and scanner server on Debian.md index 20d69fb363..3783deed01 100644 --- a/translated/tech/20140812 How to set up a USB network printer and scanner server on Debian.md +++ b/published/20140812 How to set up a USB network printer and scanner server on Debian.md @@ -25,33 +25,35 @@ 然后,编辑原始文件(下面只显示了最为有关联的部分): - **Listen**:监听指定的地址和端口,或者域套接口路径。 -- **Location /path**:为命名的位置指定访问控制。 +- **Location /path**:为该名字所代表的位置指定访问控制。 - **Order**:指定HTTP访问控制顺序(allow,deny或deny,allow)。Order allow,deny是说允许规则先于(并且优先处理)拒绝规则。 - **DefaultAuthType** (也可以用**AuthType**): 指定默认使用的认证类型。Basic是指使用/etc/passwd文件来认证CUPS中的用户。 -- **DefaultEncryption**:指定认证请求说使用的加密类型。 +- **DefaultEncryption**:指定认证请求所使用的加密类型。 - **WebInterface**:指定是否启用网页接口。 - # Listen for connections from the local machine - Listen 192.168.0.15:631 +--- + + # Listen for connections from the local machine + Listen 192.168.0.15:631 - # Restrict access to the server - - Order allow,deny - Allo 192.168.0.0/24 - + # Restrict access to the server + + Order allow,deny + Allow 192.168.0.0/24 + - # Default authentication type, when authentication is required - DefaultAuthType Basic - DefaultEncryption IfRequested + # Default authentication type, when authentication is required + DefaultAuthType Basic + DefaultEncryption IfRequested - # Web interface setting - WebInterface Yes + # Web interface setting + WebInterface Yes - # Restrict access to the admin pages - - Order allow,deny - Allow 192.168.0.0/24 - + # Restrict access to the admin pages + + Order allow,deny + Allow 192.168.0.0/24 + 现在,让我们重启CUPS来应用修改: @@ -66,27 +68,27 @@ ### 通过网页接口配置网络打印机 ### -1. 启动网页浏览器,并打开CUPS接口http://:Port,这里在我们的例子中是http://192.168.0.15:631: +1、 启动网页浏览器,并打开CUPS接口http://:Port,这里在我们的例子中是http://192.168.0.15:631: ![](https://farm4.staticflickr.com/3878/14889544591_284015bcb5_z.jpg) -2. 转到**管理**标签,然后点击*添加打印机*: +2、 转到**管理**标签,然后点击*添加打印机*: ![](https://farm4.staticflickr.com/3910/14705919940_fe0a08a8f7_o.png) -3. 选择你的打印机;在本例中,**EPSON Stylus CX3900 @ debian (Inkjet Inkjet Printer)**,然后点击**继续**: +3、 选择你的打印机;在本例中,**EPSON Stylus CX3900 @ debian (Inkjet Inkjet Printer)**,然后点击**继续**: ![](https://farm6.staticflickr.com/5567/14706059067_233fcf9791_z.jpg) -4. 是时候为打印机取个名字,并指定我们是否想要从当前工作站共享它: +4、 是时候为打印机取个名字,并指定我们是否想要从当前工作站共享它: ![](https://farm6.staticflickr.com/5570/14705957499_67ea16d941_z.jpg) -5. 安装驱动——选择品牌并点击**继续**。 +5、 安装驱动——选择品牌并点击**继续**。 ![](https://farm6.staticflickr.com/5579/14889544531_77f9f1258c_o.png) -6. 如果打印机如果不被CUPS支持(没有在下一页中列出来),我们必须从生产厂家的网站上下载驱动(如[http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX][2]),安装完后回到该页。 +6、 如果打印机如果不被CUPS支持(没有在下一页中列出来),我们必须从生产厂家的网站上下载驱动(如[http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX][2]),安装完后回到该页。 ![](https://farm4.staticflickr.com/3896/14706058997_e2a2214338_z.jpg) @@ -94,11 +96,11 @@ ![](https://farm4.staticflickr.com/3837/14706058977_e494433068_o.png) -7. 注意,预编译的.deb文件必须从我们使用的机器上发送(例如,通过sftp或scp)到打印服务器(当然,如果我们有一个直接的下载链接就更加简单了,而不用下载按钮了): +7、 注意,预编译的.deb文件必须从我们使用的机器上发送(例如,通过sftp或scp)到打印服务器(当然,如果我们有一个直接的下载链接就更加简单了,而不用下载按钮了): ![](https://farm6.staticflickr.com/5581/14706000878_f202497d0a_z.jpg) -8. 在将.deb文件放到服务器上后,我们就可以安装了: +8、 在将.deb文件放到服务器上后,我们就可以安装了: # dpkg -i epson-inkjet-printer-escpr_1.4.1-1lsb3.2_i386.deb @@ -111,7 +113,7 @@ # aptitude install lsb # dpkg -i epson-inkjet-printer-escpr_1.4.1-1lsb3.2_i386.deb -9. 现在,我们可以返回到第五步并安装打印机: +9、 现在,我们可以返回到第五步并安装打印机: ![](https://farm6.staticflickr.com/5569/14705957349_3acdc26f91_z.jpg) @@ -161,7 +163,7 @@ via: http://xmodulo.com/2014/08/usb-network-printer-and-scanner-server-debian.ht 作者:[Gabriel Cánepa][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From face865b70ef17d27afe7fd5796e1d362dec34dd Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 1 Nov 2014 23:02:01 +0800 Subject: [PATCH 068/316] PUB:20140821 How to configure a network printer and scanner on Ubuntu desktop @disylee --- ...twork printer and scanner on Ubuntu desktop.md | 32 +++++-------------- 1 file changed, 8 insertions(+), 24 deletions(-) rename translated/tech/[翻译完成]20140821 How to configure a network printer and scanner on Ubuntu desktop.md => published/20140821 How to configure a network printer and scanner on Ubuntu desktop.md (92%) diff --git a/translated/tech/[翻译完成]20140821 How to configure a network printer and scanner on Ubuntu desktop.md b/published/20140821 How to configure a network printer and scanner on Ubuntu desktop.md similarity index 92% rename from translated/tech/[翻译完成]20140821 How to configure a network printer and scanner on Ubuntu desktop.md rename to published/20140821 How to configure a network printer and scanner on Ubuntu desktop.md index c4218936dd..d405588726 100644 --- a/translated/tech/[翻译完成]20140821 How to configure a network printer and scanner on Ubuntu desktop.md +++ b/published/20140821 How to configure a network printer and scanner on Ubuntu desktop.md @@ -2,8 +2,7 @@ 如何在ubuntu桌面配置一个网络打印机和扫描仪 ================================================================================ - -在[之前的文章中](注:这篇文章在2014年8月12号的原文里做过,不知道翻译了没有,如果翻译发布了,发布此文章的时候可改成翻译后的链接), 我们讨论过如何在Linux服务器安装各种各样的打印机(当然也包括网络扫描仪)。今天我们将来处理另一端:如何通过桌面客户端来访问网络打印机/扫描仪。 +在[之前的文章中][1], 我们讨论过如何在Linux服务器安装各种各样的打印机(当然也包括网络扫描仪)。今天我们将来处理另一端:如何通过桌面客户端来访问网络打印机/扫描仪。 ### 网络环境 ### @@ -31,49 +30,39 @@ ![](https://farm4.staticflickr.com/3903/14777969919_7b7b25a4a4_z.jpg) - - ### 在Ubuntu桌面安装网络打印机 ### - 在我们的Ubuntu 12.04的客户端,我们将打开"Printing"菜单(Dash -> Printing).你会注意到在其它发行版中,这个名字也许会有一点差别(例如会叫做"Printers" 或者 "Print & Fax"): ![](https://farm4.staticflickr.com/3837/14964314992_d8bd0c0d04_o.png) - 还没有打印机添加到我们的客户端: ![](https://farm4.staticflickr.com/3887/14941655516_80430529b5_o.png) 下面是在Ubuntu桌面客户端安装一台网络打印机的一些步骤。 - -**1)** “Add”按钮将弹出New Printer" 菜单。我们将选择"Network printer" -> "Find Network Printer"并输入我们服务器的IP地址,接着点击"Find": +**1)** “Add”按钮将弹出 "New Printer" 菜单。我们将选择"Network printer" -> "Find Network Printer"并输入我们服务器的IP地址,接着点击"Find": ![](https://farm6.staticflickr.com/5581/14777977730_74c29a99b2_z.jpg) - **2)** 在最下面我们将会看到可使用的打印机的名称。我们来选择这台三星打印机并按"Forward": ![](https://farm6.staticflickr.com/5585/14941655566_c1539a3ea0.jpg) - **3)** 我们将会被要求填写一些关于我们打印机的信息。当我们输入完成时,将点击 "Apply"按钮。 ![](https://farm4.staticflickr.com/3908/14941655526_0982628fc9_z.jpg) - **4)** 我们接下来将被询问是否打印一张测试页。让我们点击"Print test page"吧: ![](https://farm4.staticflickr.com/3853/14964651435_cc83bb35aa.jpg) - 这个打印任务将被创建为本地id 2: ![](https://farm6.staticflickr.com/5562/14777977760_b01c5338f2.jpg) - 5)适用我们服务器上的CUPS网络借口,我们可以观察到打印任务已经提交成功了(打印机 -> SamsungML1640系列 -> 显示完成任务): ![](https://farm4.staticflickr.com/3887/14778110127_359009cbbc_z.jpg) @@ -91,7 +80,6 @@ 这个page_log日志显示每一页被打印过的信息,只包括哪些用户发送这些打印任务,打印日期&时间,以及客户端的IPv4地址。 - 要安装Epson喷墨和PDF打印机,我们只需重复第1-5的步骤即可,并每一次选择左边的打印队列。例如,在下图中选择PDF打印机: ![](https://farm4.staticflickr.com/3926/14778046648_c094c8422c_o.png) @@ -112,17 +100,12 @@ #### 实例 #1 #### - - 从Ubuntu12.04中打印,通常在本地用gacanepa(具有相同名字存在打印机服务器上)。 ![](https://farm4.staticflickr.com/3845/14778046698_57b6e552f3_z.jpg) - 打印到PDF打印机之后,让我们来检查打印机服务器上的/home/gacanepa/PDF目录下的内容: - - root@debian:~# ls -l /home/gacanepa/PDF ---------- @@ -133,7 +116,6 @@ -rw------- 1 gacanepa gacanepa 74911 Aug 18 14:36 Welcome_to_Conference_-_Thomas_S__Monson.pdf - 这个PDF文件被创建时的,权限已经设置为600(-rw-------),这意味着只有打印任务的所有者(在这个例子中是gacanepa )可以访问它们。我们可以通过修改the /etc/cups/cups-pdf.conf文件**UserUMask**变量的值来改变这种行为。例如,0033的umask值将可以使PDF打印者以及其它所有者拥有创建文件的权限,但是只读权限也会赋予给其它所有者。 root@debian:~# grep -i UserUMask /etc/cups/cups-pdf.conf @@ -190,7 +172,8 @@ **2)** 现在我们需要启用saned进程,用来预装Ubuntu桌面。要启用它,我们需要编辑/etc/default/saned文件,并设置RUN变量为yes: - $ sudo vim /etc/default/saned + + $ sudo vim /etc/default/saned ---------- @@ -205,7 +188,8 @@ **4)** 重启saned进程: - $ sudo service saned restart + + $ sudo service saned restart @@ -235,11 +219,11 @@ via: http://xmodulo.com/2014/08/configure-network-printer-scanner-ubuntu-desktop 作者:[Gabriel Cánepa][a] 译者:[disylee](https://github.com/disylee) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/gabriel -[1]:http://xmodulo.com/2014/08/usb-network-printer-and-scanner-server-debian.html +[1]:http://linux.cn/article-4139-1.html [2]:http://www.cups-pdf.de/documentation.shtml [3]:http://xmodulo.com/2014/08/usb-network-printer-and-scanner-server-debian.html#scanner From 2d3b17c4b6d5ccdc79c521a4664b455772641523 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 1 Nov 2014 23:23:44 +0800 Subject: [PATCH 069/316] PUB:20140910 How to monitor server memory usage with Nagios Remote Plugin Executor (NRPE) @geekpi --- ...sage with Nagios Remote Plugin Executor (NRPE).md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20140910 How to monitor server memory usage with Nagios Remote Plugin Executor (NRPE).md (85%) diff --git a/translated/tech/20140910 How to monitor server memory usage with Nagios Remote Plugin Executor (NRPE).md b/published/20140910 How to monitor server memory usage with Nagios Remote Plugin Executor (NRPE).md similarity index 85% rename from translated/tech/20140910 How to monitor server memory usage with Nagios Remote Plugin Executor (NRPE).md rename to published/20140910 How to monitor server memory usage with Nagios Remote Plugin Executor (NRPE).md index d0ace6a56b..f6707b0080 100644 --- a/translated/tech/20140910 How to monitor server memory usage with Nagios Remote Plugin Executor (NRPE).md +++ b/published/20140910 How to monitor server memory usage with Nagios Remote Plugin Executor (NRPE).md @@ -1,8 +1,8 @@ 如何用Nagios远程执行插件(NRPE)来检测服务器内存使用率 ================================================================================ -在[先前的教程中][1]注:此篇文章在同一个更新中,如果也翻译了,发布的时候可修改相应的链接,我们已经见到了如何在Nagios设置中设置Nagios远程执行插件(NRPE)。然而,监控内存使用率的脚本和插件并没有在原生的Nagios中。本篇中,我们会看到如何配置NRPE来监控远程服务器上的内存使用率。 +在[先前的教程中][1],我们已经见到了如何在Nagios设置中设置Nagios远程执行插件(NRPE)。然而,监控内存使用率的脚本和插件并没有在原生的Nagios中。本篇中,我们会看到如何配置NRPE来监控远程服务器上的内存使用率。 -我们要用的监控内存的脚本在[Nagios 市场][2]上,也在创建者的[Github仓库][3]中。 +我们要用的监控内存的脚本在[Nagios 市场][2]上,在创建者的[Github仓库][3]中也可以找到。 假设我们已经安装了NRPE,我们首先在我们想要监控的服务器上下载脚本。 @@ -133,8 +133,8 @@ Nagios应该开始在使用NRPE的远程服务器上检查内存使用率了。 - 确保NRPE的端口在远程主机上是总是允许的。默认NRPE的端口是TCP 5666。 -- 你可以尝试通过执行check_nrpe 命令: /usr/lib/nagios/plugins/check_nrpe -H remote-server 手工检查NRPE操作。 -- 你同样可以尝试运行check_mem 命令:/usr/lib/nagios/plugins/check_nrpe -H remote-server –c check_mem +- 你可以尝试通过执行check\_nrpe 命令: /usr/lib/nagios/plugins/check\_nrpe -H remote-server 手工检查NRPE操作。 +- 你同样可以尝试运行check\_mem 命令:/usr/lib/nagios/plugins/check\_nrpe -H remote-server –c check\_mem - 在远程服务器上,在/etc/nagios/nrpe.cfg中设置debug=1。重启NRPE服务并检查这些日志文件,/var/log/messages (RHEL/CentOS)或者/var/log/syslog (Debain/Ubuntu)。如果有任何的配置或者权限错误,日志中应该包含了相关的信息。如果日志中没有反映出什么,很有可能是由于请求在某些端口上有过滤而没有到达远程服务器上。 总结一下,这边教程描述了我们该如何调试NRPE来监控远程服务器的内存使用率。过程只需要下载脚本、定义命令和重启服务就行了。希望这对你们有帮助。 @@ -145,11 +145,11 @@ via: http://xmodulo.com/2014/09/monitor-server-memory-usage-nagios-remote-plugin 作者:[Sarmed Rahman][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/sarmed -[1]:http://xmodulo.com/2014/03/nagios-remote-plugin-executor-nrpe-linux.html +[1]:http://linux.cn/article-4101-1.html [2]:http://exchange.nagios.org/directory/Plugins/Operating-Systems/Solaris/check_mem-2Epl/details [3]:https://github.com/justintime/nagios-plugins/blob/master/check_mem/check_mem.pl \ No newline at end of file From 3063528bc6d5d4240a961f39907dce30191e92cd Mon Sep 17 00:00:00 2001 From: disylee Date: Sun, 2 Nov 2014 03:40:46 +0800 Subject: [PATCH 070/316] Translated Over: disylee --- ...ntOS box into a BGP router using Quagga.md | 313 ------------------ 1 file changed, 313 deletions(-) delete mode 100644 sources/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md diff --git a/sources/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md b/sources/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md deleted file mode 100644 index 366d5a2861..0000000000 --- a/sources/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md +++ /dev/null @@ -1,313 +0,0 @@ -disylee占一个 -How to turn your CentOS box into a BGP router using Quagga -================================================================================ -In a [previous tutorial][1](注:此文原文做过,文件名:“20140928 How to turn your CentOS box into an OSPF router using Quagga.md”,如果前面翻译发布了,可以修改此链接), I described how we can easily turn a Linux box into a fully-fledged OPSF router using Quagga, an open source routing software suite. In this tutorial, I will focus on **converting a Linux box into a BGP router, again using Quagga**, and demonstrate how to set up BGP peering with other BGP routers. - -Before we get into details, a little background on BGP may be useful. Border Gateway Protocol (or BGP) is the de-facto standard inter-domain routing protocol of the Internet. In BGP terminology, the global Internet is a collection of tens of thousands of interconnected Autonomous Systems (ASes), where each AS represents an administrative domain of networks managed by a particular provider. - -To make its networks globally routable, each AS needs to know how to reach all other ASes in the Internet. That is when BGP comes into play. BGP is the language used by an AS to exchange route information with other neighboring ASes. The route information, often called BGP routes or BGP prefixes, contains AS number (ASN; a globally unique number) and its associated IP address block(s). Once all BGP routes are learned and populated in local BGP routing tables, each AS will know how to reach any public IP addresses on the Internet. - -The ability to route across different domains (ASes) is the primary reason why BGP is called an Exterior Gateway Protocol (EGP) or inter-domain protocol. Whereas routing protocols such as OSPF, IS-IS, RIP and EIGRP are all Interior Gateway Protocols (IGPs) or intra-domain routing protocols. - -### Test Scenarios ### - -For this tutorial, let us consider the following topology. - -![](https://farm6.staticflickr.com/5598/15603223841_4c76343313_z.jpg) - -We assume that service provider A wants to establish a BGP peering with service provider B to exchange routes. The details of their AS and IP address spaces are like the following. - -- **Service provider A**: ASN (100), IP address space (100.100.0.0/22), IP address assigned to eth1 of a BGP router (100.100.1.1) -- **Service provider B**: ASN (200), IP address space (200.200.0.0/22), IP address assigned to eth1 of a BGP router (200.200.1.1) - -Router A and router B will be using the 100.100.0.0/30 subnet for connecting to each other. In theory, any subnet reachable from both service providers can be used for interconnection. In real life, it is advisable to use a /30 subnet from service provider A or service provider B's public IP address space. - -### Installing Quagga on CentOS ### - -If Quagga is not already installed, we install Quagga using yum. - - # yum install quagga - -If you are using CentOS 7, you need to apply the following policy change for SELinux. Otherwise, SELinux will prevent Zebra daemon from writing to its configuration directory. You can skip this step if you are using CentOS 6. - - # setsebool -P zebra_write_config 1 - -The Quagga software suite contains several daemons that work together. For BGP routing, we will focus on setting up the following two daemons. - -- **Zebra**: a core daemon responsible for kernel interfaces and static routes. -- **BGPd**: a BGP daemon. - -### Configuring Logging ### - -After Quagga is installed, the next step is to configure Zebra to manage network interfaces of BGP routers. We start by creating a Zebra configuration file and enabling logging. - - # cp /usr/share/doc/quagga-XXXXX/zebra.conf.sample /etc/quagga/zebra.conf - -On CentOS 6: - - # service zebra start - # chkconfig zebra on - -For CentOS 7: - - # systemctl start zebra - # systemctl enable zebra - -Quagga offers a dedicated command-line shell called vtysh, where you can type commands which are compatible with those supported by router vendors such as Cisco and Juniper. We will be using vtysh shell to configure BGP routers in the rest of the tutorial. - -To launch vtysh command shell, type: - - # vtysh - -The prompt will be changed to hostname, which indicates that you are inside vtysh shell. - - Router-A# - -Now we specify the log file for Zebra by using the following commands: - - Router-A# configure terminal - Router-A(config)# log file /var/log/quagga/quagga.log - Router-A(config)# exit - -Save Zebra configuration permanently: - - Router-A# write - -Repeat this process on Router-B as well. - -### Configuring Peering IP Addresses ### - -Next, we configure peering IP addresses on available interfaces. - - Router-A# show interface - ----------- - - Interface eth0 is up, line protocol detection is disabled - . . . . . - Interface eth1 is up, line protocol detection is disabled - . . . . . - -Configure eth0 interface's parameters: - - site-A-RTR# configure terminal - site-A-RTR(config)# interface eth0 - site-A-RTR(config-if)# ip address 100.100.0.1/30 - site-A-RTR(config-if)# description "to Router-B" - site-A-RTR(config-if)# no shutdown - site-A-RTR(config-if)# exit - -Go ahead and configure eth1 interface's parameters: - - site-A-RTR(config)# interface eth1 - site-A-RTR(config-if)# ip address 100.100.1.1/24 - site-A-RTR(config-if)# description "test ip from provider A network" - site-A-RTR(config-if)# no shutdown - site-A-RTR(config-if)# exit - -Now verify configuration: - - Router-A# show interface - ----------- - - Interface eth0 is up, line protocol detection is disabled - Description: "to Router-B" - inet 100.100.0.1/30 broadcast 100.100.0.3 - Interface eth1 is up, line protocol detection is disabled - Description: "test ip from provider A network" - inet 100.100.1.1/24 broadcast 100.100.1.255 - ----------- - - Router-A# show interface description - ----------- - - Interface Status Protocol Description - eth0 up unknown "to Router-B" - eth1 up unknown "test ip from provider A network" - -If everything looks alright, don't forget to save. - - Router-A# write - -Repeat to configure interfaces on Router-B as well. - -Before moving forward, verify that you can ping each other's IP address. - - Router-A# ping 100.100.0.2 - ----------- - - PING 100.100.0.2 (100.100.0.2) 56(84) bytes of data. - 64 bytes from 100.100.0.2: icmp_seq=1 ttl=64 time=0.616 ms - -Next, we will move on to configure BGP peering and prefix advertisement settings. - -### Configuring BGP Peering ### - -The Quagga daemon responsible for BGP is called bgpd. First, we will prepare its configuration file. - - # cp /usr/share/doc/quagga-XXXXXXX/bgpd.conf.sample /etc/quagga/bgpd.conf - -On CentOS 6: - - # service bgpd start - # chkconfig bgpd on - -For CentOS 7 - - # systemctl start bgpd - # systemctl enable bgpd - -Now, let's enter Quagga shell. - - # vtysh - -First verify that there are no configured BGP sessions. In some versions, you may find a BGP session with AS 7675. We will remove it as we don't need it. - - Router-A# show running-config - ----------- - - ... ... ... - router bgp 7675 - bgp router-id 200.200.1.1 - ... ... ... - -We will remove any pre-configured BPG session, and replace it with our own. - - Router-A# configure terminal - Router-A(config)# no router bgp 7675 - Router-A(config)# router bgp 100 - Router-A(config)# no auto-summary - Router-A(config)# no synchronizaiton - Router-A(config-router)# neighbor 100.100.0.2 remote-as 200 - Router-A(config-router)# neighbor 100.100.0.2 description "provider B" - Router-A(config-router)# exit - Router-A(config)# exit - Router-A# write - -Router-B should be configured in a similar way. The following configuration is provided as reference. - - Router-B# configure terminal - Router-B(config)# no router bgp 7675 - Router-B(config)# router bgp 200 - Router-B(config)# no auto-summary - Router-B(config)# no synchronizaiton - Router-B(config-router)# neighbor 100.100.0.1 remote-as 100 - Router-B(config-router)# neighbor 100.100.0.1 description "provider A" - Router-B(config-router)# exit - Router-B(config)# exit - Router-B# write - -When both routers are configured, a BGP peering between the two should be established. Let's verify that by running: - - Router-A# show ip bgp summary - -![](https://farm6.staticflickr.com/5614/15420135700_e3568d2e5f_z.jpg) - -In the output, we should look at the section "State/PfxRcd." If the peering is down, the output will show 'Idle' or 'Active'. Remember, the word 'Active' inside a router is always bad. It means that the router is actively seeking for a neighbor, prefix or route. When the peering is up, the output under "State/PfxRcd" should show the number of prefixes received from this particular neighbor. - -In this example output, the BGP peering is just up between AS 100 and AS 200. Thus no prefixes are being exchanged, and the number in the rightmost column is 0. - -### Configuring Prefix Advertisements ### - -As specified at the beginning, AS 100 will advertise a prefix 100.100.0.0/22, and AS 200 will advertise a prefix 200.200.0.0/22 in our example. Those prefixes need to be added to BGP configuration as follows. - -On Router-A: - - Router-A# configure terminal - Router-A(config)# router bgp 100 - Router-A(config)# network 100.100.0.0/22 - Router-A(config)# exit - Router-A# write - -On Router-B: - - Router-B# configure terminal - Router-B(config)# router bgp 200 - Router-B(config)# network 200.200.0.0/22 - Router-B(config)# exit - Router-B# write - -At this point, both routers should start advertising prefixes as required. - -### Testing Prefix Advertisements ### - -First of all, let's verify whether the number of prefixes has changed now. - - Router-A# show ip bgp summary - -![](https://farm6.staticflickr.com/5608/15419095659_0ebb384eee_z.jpg) - -To view more details on the prefixes being received, we can use the following command, which shows the total number of prefixes received from neighbor 100.100.0.2. - - Router-A# show ip bgp neighbors 100.100.0.2 advertised-routes - -![](https://farm6.staticflickr.com/5597/15419618208_4604e5639a_z.jpg) - -To check which prefixes we are receiving from that neighbor: - - Router-A# show ip bgp neighbors 100.100.0.2 routes - -![](https://farm4.staticflickr.com/3935/15606556462_e17eae7f49_z.jpg) - -We can also check all the BGP routes: - - Router-A# show ip bgp - -![](https://farm6.staticflickr.com/5609/15419618228_5c776423a5_z.jpg) - -These commands below can be used to check which routes in the routing table are learned via BGP. - - Router-A# show ip route - ----------- - - Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, - I - ISIS, B - BGP, > - selected route, * - FIB route - - C>* 100.100.0.0/30 is directly connected, eth0 - C>* 100.100.1.0/24 is directly connected, eth1 - B>* 200.200.0.0/22 [20/0] via 100.100.0.2, eth0, 00:06:45 - ----------- - - Router-A# show ip route bgp - ----------- - - B>* 200.200.0.0/22 [20/0] via 100.100.0.2, eth0, 00:08:13 - -The BGP-learned routes should also be present in the Linux routing table. - - [root@Router-A~]# ip route - ----------- - - 100.100.0.0/30 dev eth0 proto kernel scope link src 100.100.0.1 - 100.100.1.0/24 dev eth1 proto kernel scope link src 100.100.1.1 - 200.200.0.0/22 via 100.100.0.2 dev eth0 proto zebra - -Finally, we are going to test with ping command. ping should be successful. - - [root@Router-A~]# ping 200.200.1.1 -c 2 - -To sum up, this tutorial focused on how we can run basic BGP on a CentOS box. While this should get you started with BGP, there are other advanced settings such as prefix filters, BGP attribute tuning such as local preference and path prepend. I will be covering these topics in future tutorials. - -Hope this helps. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/centos-bgp-router-quagga.html - -作者:[Sarmed Rahman][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/sarmed -[1]:http://xmodulo.com/turn-centos-box-into-ospf-router-quagga.html From 38e5c246850f40ec03e90cb91fef50fa41ae69ea Mon Sep 17 00:00:00 2001 From: disylee Date: Sun, 2 Nov 2014 03:42:47 +0800 Subject: [PATCH 071/316] Translated Over: disylee --- ...ntOS box into a BGP router using Quagga.md | 365 ++++++++++++++++++ 1 file changed, 365 insertions(+) create mode 100644 translated/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md diff --git a/translated/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md b/translated/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md new file mode 100644 index 0000000000..261abb7767 --- /dev/null +++ b/translated/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md @@ -0,0 +1,365 @@ +How to turn your CentOS box into a BGP router using Quagga +如何使用Quagga把你的CentOS系统变成一个BGP路由器? +================================================================================ + + +在[之前的教程中][1](注:此文原文做过,文件名:“20140928 How to turn your CentOS box into an OSPF router using Quagga.md”,如果前面翻译发布了,可以修改此链接),我对如何简单地使用Quagga把CentOS系统变成一个不折不扣地OSPF路由器做了一些描述,Quagga是一个开源路由软件套件.在这个教程中,我将会着重**把一个Linux系统变成一个BGP路由器,又是使用Quagga**,演示如何建立BGP与其它BGP路由器对等. + + +在我们进入细节之前,一些BGP的背景知识还是必要的.边界网关协议(或者BGP)是互联网的域间路由协议的实际标准。在BGP术语中,全球互联网是由成千上万相关联的自治系统(ASE)组成,其中每一个AS代表每一个特定运营商提供的一个网络管理域. + + + +为了使其网络在全球范围内路由可达,每一个AS需要知道如何在英特网中到达其它的AS.这时候BGP出来取代这个角色了.BGP作为一种语言用于一个AS去与相邻的AS交换路由信息的一种工具.这些路由信息通常被称为BGP线路或者BGP前缀,包括AS号(ASN;全球唯一号码)以及相关的IP地址块.一旦所有的BGP线路被当地的BGP路由表学习和填充,每一个AS将会知道如何到达互联网的任何公网IP. + + +路由在不同域(ASes)的能力是BGP被称为外部网关协议(EGP)或者域间协议的主要原因.就如一些路由协议例如OSPF,IS-IS,RIP和EIGRP都是内部网关协议(IGPs)或者域内路由协议. + + +### 测试方案 ### + + +在这个教程中,让我们来关注以下拓扑. + +![](https://farm6.staticflickr.com/5598/15603223841_4c76343313_z.jpg) + + +我们假设运营商A想要建立一个BGP来与运营商B对等交换路由.它们的AS号和IP地址空间登细节如下所示. + +- **运营商 A**: ASN (100), IP地址空间 (100.100.0.0/22), 分配给BGP路由器eth1网卡的IP地址(100.100.1.1) + + +- **运营商 B**: ASN (200), IP地址空间 (200.200.0.0/22), 分配给BGP路由器eth1网卡的IP地址(200.200.1.1) + + +路由器A和路由器B使用100.100.0.0/30子网来连接到对方.从理论上来说,任何子网从运营商那里都是可达的,可互连的.在真实场景中,建议使用掩码为30位的公网IP地址空间来实现运营商A和运营商B之间的连通. + + +### 在 CentOS中安装Quagga ### + +如果Quagga还没被安装,我们可以使用yum来安装Quagga. + + # yum install quagga + + +如果你正在使用的是CentOS7系统,你需要应用一下策略来设置SELinux.否则,SElinux将会阻止Zebra守护进程写入它的配置目录.如果你正在使用的是CentOS6,你可以跳过这一步. + + # setsebool -P zebra_write_config 1 + + + +Quagga软件套件包含几个守护进程,这些进程可以一起工作.关于BGP路由,我们将把重点放在建立一下2个守护进程. + + +- **Zebra**:一个核心守护进程用于内核接口和静态路由. +- **BGPd**:一个BGP守护进程. + + +### 配置日志记录 ### + +在Quagga被安装猴,下一步就是配置Zebra来管理BGP路由器的网络接口.我们通过创建一个Zebra配置文件和启用日志记录来开始第一步. + + # cp /usr/share/doc/quagga-XXXXX/zebra.conf.sample /etc/quagga/zebra.conf + + +在CentOS6系统中: + + # service zebra start + # chkconfig zebra on + + +在CentOS7系统中: + # systemctl start zebra + # systemctl enable zebra + + +Quagga提供了一个叫做vtysh特有的命令行工具,你可以输入路由器厂商(例如Cisco和Juniper)兼容和支持的命令.我们将使用vtysh shell来配置BGP路由在教程的其余部分. + +启动vtysh shell 命令,输入: + + # vtysh + + +提示将被改成主机名,这表明你是在vtysh shell中. + + + Router-A# + +现在我们将使用以下命令来为Zebra配置日志文件: + + Router-A# configure terminal + Router-A(config)# log file /var/log/quagga/quagga.log + Router-A(config)# exit + +永久保存Zebra配置: + + Router-A# write + +在路由器B操作同样的步骤. + + +### 配置对等的IP地址 ### + + +下一步,我们将在可用的接口上配置对等的IP地址. + + Router-A# show interface #显示接口信息 + +---------- + + Interface eth0 is up, line protocol detection is disabled + . . . . . + Interface eth1 is up, line protocol detection is disabled + . . . . . + +配置eth0接口的参数: + + site-A-RTR# configure terminal + site-A-RTR(config)# interface eth0 + site-A-RTR(config-if)# ip address 100.100.0.1/30 + site-A-RTR(config-if)# description "to Router-B" + site-A-RTR(config-if)# no shutdown + site-A-RTR(config-if)# exit + + +继续配置eth1接口的参数: + + site-A-RTR(config)# interface eth1 + site-A-RTR(config-if)# ip address 100.100.1.1/24 + site-A-RTR(config-if)# description "test ip from provider A network" + site-A-RTR(config-if)# no shutdown + site-A-RTR(config-if)# exit + +现在确认配置: + + Router-A# show interface + +---------- + + Interface eth0 is up, line protocol detection is disabled + Description: "to Router-B" + inet 100.100.0.1/30 broadcast 100.100.0.3 + Interface eth1 is up, line protocol detection is disabled + Description: "test ip from provider A network" + inet 100.100.1.1/24 broadcast 100.100.1.255 + +---------- + + Router-A# show interface description #现实接口描述 + +---------- + + Interface Status Protocol Description + eth0 up unknown "to Router-B" + eth1 up unknown "test ip from provider A network" + + +如果一切看起来正常,别忘记保存配置. + + Router-A# write + +同样地,在路由器B重复一次配置. + + +在我们继续下一步之前,确认下彼此的IP是可以ping通的. + + Router-A# ping 100.100.0.2 + +---------- + + PING 100.100.0.2 (100.100.0.2) 56(84) bytes of data. + 64 bytes from 100.100.0.2: icmp_seq=1 ttl=64 time=0.616 ms + +下一步,我们将继续配置BGP对等和前缀设置. + + +### 配置BGP对等 ### + + + +Quagga守护进程负责BGP的服务叫bgpd.首先我们来准备它的配置文件. + + # cp /usr/share/doc/quagga-XXXXXXX/bgpd.conf.sample /etc/quagga/bgpd.conf + + +在CentOS6系统中: + + # service bgpd start + # chkconfig bgpd on + + +在CentOS7中 + + # systemctl start bgpd + # systemctl enable bgpd + +现在,让我们来进入Quagga 的shell. + + # vtysh + + +第一步,我们要确认当前没有已经配置的BGP会话.在一些版本,我们可能会发现一个AS号为7675的BGP会话.由于我们不需要这个会话,所以把它移除. + + Router-A# show running-config + +---------- + + ... ... ... + router bgp 7675 + bgp router-id 200.200.1.1 + ... ... ... + + +我们将移除一些预先配置好的BGP会话,并建立我们所需的会话取而代之. + + Router-A# configure terminal + Router-A(config)# no router bgp 7675 + Router-A(config)# router bgp 100 + Router-A(config)# no auto-summary + Router-A(config)# no synchronizaiton + Router-A(config-router)# neighbor 100.100.0.2 remote-as 200 + Router-A(config-router)# neighbor 100.100.0.2 description "provider B" + Router-A(config-router)# exit + Router-A(config)# exit + Router-A# write + + + +路由器B将用同样的方式来进行配置,以下配置提供作为参考. + + Router-B# configure terminal + Router-B(config)# no router bgp 7675 + Router-B(config)# router bgp 200 + Router-B(config)# no auto-summary + Router-B(config)# no synchronizaiton + Router-B(config-router)# neighbor 100.100.0.1 remote-as 100 + Router-B(config-router)# neighbor 100.100.0.1 description "provider A" + Router-B(config-router)# exit + Router-B(config)# exit + Router-B# write + + +当相关的路由器都被配置好,两台路由器之间的对等将被建立.现在让我们通过运行下面的命令来确认: + + Router-A# show ip bgp summary + +![](https://farm6.staticflickr.com/5614/15420135700_e3568d2e5f_z.jpg) + + +从输出中,我们可以看到"State/PfxRcd"部分.如果对等关闭,输出将会现实"空闲"或者"活动'.请记住,单词'Active'这个词在路由器中总是不好的意思.它意味着路由器正在积极地寻找邻居,前缀或者路由.当对等是up状态,"State/PfxRcd"下的输出状态将会从特殊邻居接收到前缀号. + +在这个例子的输出中,BGP对等知识在AS100和AS200之间呈up状态.因此,没有前缀被更改,所以最右边列的数值是0. + + +### 配置前缀通告 ### + +正如一开始提到,AS 100将以100.100.0.0/22作为通告,在我们的例子中AS 200将同样以200.200.0.0/22作为通告.这些前缀需要被添加到BGP配置如下. + +在路由器-A中: + + Router-A# configure terminal + Router-A(config)# router bgp 100 + Router-A(config)# network 100.100.0.0/22 + Router-A(config)# exit + Router-A# write + + +在路由器-B中: + Router-B# configure terminal + Router-B(config)# router bgp 200 + Router-B(config)# network 200.200.0.0/22 + Router-B(config)# exit + Router-B# write + + +在这一点上,两个路由器会根据需要开始通告前缀. + + +### 测试前缀通告 ### + +首先,让我们来确认前缀的数量是否被改变了. + + Router-A# show ip bgp summary + +![](https://farm6.staticflickr.com/5608/15419095659_0ebb384eee_z.jpg) + + + +为了查看所接收的更多前缀细节,我们可以使用一下命令,这个命令用于显示邻居100.100.0.2所接收到的前缀总数. + + Router-A# show ip bgp neighbors 100.100.0.2 advertised-routes + +![](https://farm6.staticflickr.com/5597/15419618208_4604e5639a_z.jpg) + + +查看哪一个前缀是我们从邻居接收到的: + + Router-A# show ip bgp neighbors 100.100.0.2 routes + +![](https://farm4.staticflickr.com/3935/15606556462_e17eae7f49_z.jpg) + + +我们也可以查看所有的BGP路由器: + + Router-A# show ip bgp + +![](https://farm6.staticflickr.com/5609/15419618228_5c776423a5_z.jpg) + + +以上的命令都可以被用于检查哪个路由器通过BGP在路由器表中被学习到. + + Router-A# show ip route + +---------- + + + 代码: K - 内核路由, C - 已链接 , S - 静态 , R - 路由信息协议 , O - 开放式最短路径优先协议, + + + I - 中间系统到中间系统的路由选择协议, B - 边界网关协议, > - 选择路由, * - FIB 路由 + + C>* 100.100.0.0/30 is directly connected, eth0 + C>* 100.100.1.0/24 is directly connected, eth1 + B>* 200.200.0.0/22 [20/0] via 100.100.0.2, eth0, 00:06:45 + +---------- + + Router-A# show ip route bgp + +---------- + + B>* 200.200.0.0/22 [20/0] via 100.100.0.2, eth0, 00:08:13 + + +BGP学习到的路由也将会在Linux路由表中出现. + + [root@Router-A~]# ip route + +---------- + + 100.100.0.0/30 dev eth0 proto kernel scope link src 100.100.0.1 + 100.100.1.0/24 dev eth1 proto kernel scope link src 100.100.1.1 + 200.200.0.0/22 via 100.100.0.2 dev eth0 proto zebra + + +最后,我们将使用ping命令来测试连通.结果将成功ping通. + + [root@Router-A~]# ping 200.200.1.1 -c 2 + + +总而言之,该教程将重点放在如何运行一个基本的BGP在CentOS系统中.当这个教程让你开始BGP的配置,那么一些更高级的设置例如设置过滤器,BGP属性调整,本地优先级和预先路径准备等.我将会在后续的教程中覆盖这些主题. + +希望这篇教程能给大家一些帮助. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/centos-bgp-router-quagga.html + +作者:[Sarmed Rahman][a] +译者:[disylee](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/sarmed +[1]:http://xmodulo.com/turn-centos-box-into-ospf-router-quagga.html From 3d81ca12f0cd42882287e1f1bd682b7afda87a8c Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Sun, 2 Nov 2014 10:24:05 +0800 Subject: [PATCH 072/316] [Translating] How to Install MariaDB in Ubuntu 14.04 LTS --- .../tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md b/sources/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md index 3392cfdc8c..fb48c9a2fe 100644 --- a/sources/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md +++ b/sources/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md @@ -1,3 +1,5 @@ +Translating----geekpi + How to Install MariaDB in Ubuntu 14.04 LTS ================================================================================ MariaDB is an Open Source database Server & It is 100 % compatible with MySQL, drop-in replacement to MySQL database server. From 74c0745509b9c8d17da0354fa7dcd3e233fa46f0 Mon Sep 17 00:00:00 2001 From: barney-ro Date: Sun, 2 Nov 2014 10:45:59 +0800 Subject: [PATCH 073/316] [translated]20141027 Handy Disk Image Tools --- .../share/20141027 Handy Disk Image Tools.md | 172 ------------------ .../share/20141027 Handy Disk Image Tools.md | 168 +++++++++++++++++ 2 files changed, 168 insertions(+), 172 deletions(-) delete mode 100644 sources/share/20141027 Handy Disk Image Tools.md create mode 100644 translated/share/20141027 Handy Disk Image Tools.md diff --git a/sources/share/20141027 Handy Disk Image Tools.md b/sources/share/20141027 Handy Disk Image Tools.md deleted file mode 100644 index 6cbd2caf33..0000000000 --- a/sources/share/20141027 Handy Disk Image Tools.md +++ /dev/null @@ -1,172 +0,0 @@ -barney-ro translating - -Handy Disk Image Tools -================================================================================ -Disk images are computer files of a disk volume or an entire data storage device, such as a hard drive, optical disk (e.g. DVD, CD, Blu-ray), tape drive, USB flash drive, or floppy disk. A disk image represents the content exactly as it is on the original storage device, including both data and structure information. - -Disk image file formats can be open standards, such as the ISO image format for optical disk images, or proprietary to particular software applications. The name "ISO" is taken from the ISO 9660 file system used with CD-ROM media. Converting from a proprietary image format to an open format often crops up as an issue when users migrate to Linux. - -Disk images have many different uses such as burning optical media, system backup, data recovery, disk cloning, computer forensics, and operating systems (as Live CD/DVDs). - -There are a number of different ways of mounting an ISO image under Linux. The venerable mount command offers an easy solution. But if you need tools that offer more functionality for working with disk images, try some of the following excellent open source tools. - -Most of the tools have not seen a recent release, so if you are looking to get involved with a good open source tool, you could pitch in. - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/FuriusISOMount.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-FuriusISOMountTool.png) - -Furius ISO Mount is a simple open source application for mounting .iso, .img, .bin, .mdf and .nrg image files without burning them to disk. - -Features include: - -- Automatically mounts ISO, IMG, BIN, MDF and NRG image files -- Supports mounting UDF images through loop -- Automatically creates a mount point in your home directory -- Automatically unmounts the Image files -- Automatically removes the mount directory to return your home directory to its previous state -- Automatically saves the history of the last 10 images mounted -- Mounts multiple images -- Burn ISO and IMG Files to optical disk -- Generate MD5 and SHA1 checksums -- Automatically retrieves any previously unmounted images -- Automatically generates a log file of all commands needed to mount and unmount images manually -- Language support (currently Bulgarian, Chinese (Simplified), Czech, Dutch, French, German, Hungarian, Italian, Greek, Italian, Japanese, Polish, Portuguese, Russian, Slovenian, Spanish, Swedish and Turkish) - -- Website: [launchpad.net/furiusisomount/][1] -- Developer: Dean Harris (Marcus Furius) -- License: GNU GPL v3 -- Version Number: 0.11.3.1 - - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/fuseiso.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-fuseiso.png) - -fuseiso is an open source FUSE module to mount ISO filesystem images. - -With FUSE it is possible to implement a fully functional filesystem in a userspace program. - -Features include: - -- Read ISO, BIN and NRG images containing ISO9660 filesystems -- Supports plain ISO9660 Level 1 and 2 -- Supports some common extensions, like Joliet, RockRidge and zisofs -- Supports non-standard images, like CloneCD's IMGs and Alcohol 120%'s MDFs, as their format looks exactly like BIN images - -- Website: [sourceforge.net/projects/fuseiso][2] -- Developer: Dmitry Morozhnikov -- License: GNU GPL v2 -- Version Number: 20070708 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/iat.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-iat.png) - -iat (Iso9660 Analyzer Tool) is a versatile, open source tool for detecting the structure of many types of image file formats, such as BIN, MDF, PDI, CDI, NRG, and B5I, and converting them into ISO-9660. - -Features include: - -- Supports reading (input) NRG, MDF, PDI, CDI, BIN, CUE and B5I images -- Burn disc images directly using cdrecord -- Outputs information including a progress-bar, Block size, ECC sector (size), header sector (size), image offset start and more - -- Website: [sourceforge.net/projects/iat.berlios][3] -- Developer: Salvatore Santagati -- License: GNU GPL v2 -- Version Number: 0.1.3 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/AcetoneISO.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-AcetoneISO.png) - -AcetoneISO is a feature-rich open source graphical application to mount and manage CD/DVD images. - -The utility opens a graphical file manager to mount image formats, including proprietary image formats, including ISO, BIN, NRG, MDF, IMG etc, and lets you perform a number of actions. - -AcetoneISO is written with Qt 4, which means that it integrates well in Qt-based desktop environments like KDE, LXQt or Razor-qt. - -This software is meant for all those people looking for a "Daemon Tools for Linux". - -Features include: - -- Mount most common Windows images in a clean and easy GUI -- Convert all known images to ISO or extract the contents to a folder -- Encrypt, compress, split any type of image -- Convert DVD video to xvid avi and any generic video to xvid avi -- Extract audio from a video -- Extract images content to a folder: bin mdf nrg img daa dmg cdi b5i bwi pdi -- Play a DVD Movie Image with Kaffeine / VLC / SMplayer with auto-cover download from Amazon -- Generate an ISO from a Folder or CD/DVD -- Check MD5 file of an image and/or generate it to a text file -- Calculate ShaSums of images in 128, 256, and 384 bit -- Encrypt / Decrypt an image -- Split / Merge image in X megabyte -- Compress with high ratio an image in 7z format -- Rip a PSX CD to *.bin to make it work with ePSXe/pSX emulators -- Restore a lost CUE file of *.bin *.img -- Convert Mac OS *.dmg to a mountable image -- Mount an image in a specified folder from the user -- Create a database of images to manage big collections -- Extract the Boot Image file of a CD/DVD or ISO -- Backup a CD-Audio to a *.bin image -- Quick and simple utility to rip a DVD to Xvid AVI -- Quick and simple utility to convert a generic video (avi, mpeg, mov, wmv, asf) to Xvid AVI -- Quick and simple utility to convert a FLV video to AVI -- Utility to download videos from YouTube and Metacafe -- Extract audio from a video file -- Extract a *.rar archive that has a password -- Utility to convert any video for Sony PSP PlayStation Portable -- Internationalization support English, Italian, Polish, Spanish, Romanian, Hungarian, German, Czech, and Russian - -- Website: [sourceforge.net/projects/acetoneiso][4] -- Developer: Marco Di Antonio -- License: GNU GPL v3 -- Version Number: 2.3 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/ISOMaster.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-ISOMaster.png) - -ISO Master is an open-source, easy to use, graphical CD image editor for Linux and BSD. This tool extracts files from an ISO, add files to an ISO, and create bootable ISOs - all in a graphical user interface. It can open ISO, NRG, and some MDF files but can only save as ISO. - -ISO Master is based on bkisofs, a simple and stable library for reading, modifying and writing ISO images which supports the Joliet, RockRidge, and EL Torito extensions. - -Features include: - -- Reads .ISO files (ISO9660, Joliet, RockRidge, and El Torito), most .NRG files, and some single-track .MDF files; it can save only as .ISO -- Create or customise CD/DVD images -- Add or remove files and directories to/from a CD image -- Make bootable CDs/DVDs -- Internationalization support - -- Website: [www.littlesvr.ca/isomaster/][5] -- Developer: Andrew Smith -- License: GNU GPL v2 -- Version Number: 1.3.11 - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20141025082352476/DiskImageTools.html - -作者:Frazer Kline -译者:[barney-ro](https://github.com/barney-ro) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:https://launchpad.net/furiusisomount/ -[2]:http://sourceforge.net/projects/fuseiso/ -[3]:http://sourceforge.net/projects/iat.berlios/ -[4]:http://sourceforge.net/projects/acetoneiso/ -[5]:http://www.littlesvr.ca/isomaster/ \ No newline at end of file diff --git a/translated/share/20141027 Handy Disk Image Tools.md b/translated/share/20141027 Handy Disk Image Tools.md new file mode 100644 index 0000000000..4f96bccede --- /dev/null +++ b/translated/share/20141027 Handy Disk Image Tools.md @@ -0,0 +1,168 @@ +不得不说的磁盘镜像工具 +================================================================================ +磁盘镜像包括整个磁盘卷的文件或者是全部的存储设备的数据,比如说硬盘,光盘(DVD,CD,蓝光光碟),磁带机,USB闪存,软盘。一个完整的磁盘镜像应该像在原来的存储设备上一样完整、准确,包括数据和结构信息。 + +磁盘镜像文件格式可以是开放的标准,像ISO格式的光盘镜像,或者是专有的特别的软件应用程序。"ISO"这个名字来源于用CD存储的ISO 9660文件系统。但是,当用户转向Linux的时候,经常遇到这样的问题,需要把专有的的镜像格式转换为开放的格式。 + +磁盘镜像有很多不同的用处,像烧录光盘,系统备份,数据恢复,硬盘克隆,电子取证和提供操作系统(即LiveCD/DVDs)。 + +有很多不同非方法可以把ISO镜像挂载到Linux系统下。强大的mount 命令给我们提供了一个简单的解决方案。但是如果你需要很多工具来操作磁盘镜像,你可以试一试下面的这些完美的开源工具。 + +很多工具还没有看到最新的版本,所以如果你正在寻找一个很好用的开源工具,你也可以加入,一起来为开源做出一点贡献。 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/FuriusISOMount.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-FuriusISOMountTool.png) + +Furius ISO Mount是一个简单易用的开源应用程序用来挂载镜像文件,它支持直接打开ISO,IMG,BIN,MDF和NRG格式的镜像而不用把他们烧录到磁盘。 + +特性: + +- 支持自动挂载ISO, IMG, BIN, MDF and NRG镜像文件 +- 支持通过loop 挂载 UDF 镜像 +- 自动在根目录创建挂载点 +- 自动解挂镜像文件 +- 自动删除挂载目录,并返回到主目录之前的状态 +- 自动存档最近10次挂载历史 +- 支持挂载多个镜像文件 +- 支持烧录ISO文件及IMG文件到光盘 +- 支持MD5校验和SHA1校验 +- 自动检索之前解挂的镜像 +- 自动创建手动挂载和解挂的日志文件 +- 语言支持(目前支持保加利亚语,中文(简体),捷克语,荷兰语,法语,德语,匈牙利语,意大利语,希腊语,日语,波兰语,葡萄牙语,俄语,斯洛文尼亚语,西班牙语,瑞典语和土耳其语) + +- 项目网址: [launchpad.net/furiusisomount/][1] +- 开发者: Dean Harris (Marcus Furius) +- 许可: GNU GPL v3 +- 版本号: 0.11.3.1 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/fuseiso.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-fuseiso.png) + +fuseiso 是用来挂载ISO文件系统的一个开源的安全模块。 + +使用FUSE,我们完全可以在用户空间里运行一个完整的文件系统。 + +特性: + +- 支持读ISO,BIN和NRG镜像,包括ISO9660文件系统 +- 支持普通的ISO9660级别1和级别2 +- 支持一些常用的扩展,想Joliet,RockRidge和zisofs +- 支持非标准的镜像,包括CloneCD's IMGs 、Alcohol 120%'s MDFs 因为他们的格式看起来恰好像BIN镜像一样 + +- 项目网址: [sourceforge.net/projects/fuseiso][2] +- 开发者: Dmitry Morozhnikov +- 许可: GNU GPL v2 +- 版本号: 20070708 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/iat.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-iat.png) + +iat(Iso9660分析工具)是一个通用的开源工具,能够检测很多不同镜像格式文件的结构,包括BIN,MDF,PDI,CDI,NRG和B5I,并转化成ISO-9660格式. + +特性: + +- 支持读(输入)NRG,MDF,PDI,CDI,BIN,CUE 和B5I镜像 +- 支持用cd 刻录机直接烧录光盘镜像 +- 输出信息包括:进度条,块大小,ECC扇形分区(大小),头分区(大小),镜像偏移地址等等 + +- 项目网址: [sourceforge.net/projects/iat.berlios][3] +- 开发者: Salvatore Santagati +- 许可: GNU GPL v2 +- 版本号: 0.1.3 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/AcetoneISO.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-AcetoneISO.png) + +AcetoneISO 是一个功能丰富的开源图形化应用程序,用来挂载和管理CD/DVD镜像。 + +当你打开这个程序,你就会看到一个图形化的文件管理器用来挂载镜像文件,包括专有的镜像格式,也包括像ISO, BIN, NRG, MDF, IMG 等等,并且允许您执行一系列的动作。 + +AcetoneISO是用QT 4写的,也就是说,对于基于QT的桌面环境能很好的兼容,像KDE,LXQT或是Razor-qt。 + +这个软件适用于所有正在寻找Linux版本的Daemon Tools的人。 + +特性: + +- 支持挂载大多数windowns 镜像,在一个简洁易用的界面 +- 支持所有镜像格式转换到ISO,或者是从中提取内容。 +- 支持加密,压缩,解压任何类型的镜像 +- 支持转换DVD成xvid avi,支持任何格式的转换成xvid avi +- 支持从录像里提取声音 +- 支持从不同格式中提取镜像文件,包括bin mdf nrg img daa dmg cdi b5i bwi pdi +- 支持用Kaffeine / VLC / SMplayer播放DVD镜像,可以从Amazon 自动下载。 +- 支持从文件夹或者是CD/DVD生成ISO镜像 +- 支持文件MD5校验,或者是生成一个MD5校验码 +- 支持计算镜像的ShaSums,以128,256和384位的速度 +- 支持加密,解密一个镜像文件 +- 支持以M字节的速度,分开、合并镜像 +- 支持高比例压缩镜像成7z 格式 +- 支持翻录PSX CD成BIN格式,以便在ePSXe/pSX模拟器里运行 +- 支持修复CUE文件为BIN和IMG格式 +- 支持把MAC OS的DMG镜像转换成可挂载的镜像 +- 支持从指定的文件夹中挂载镜像 +- 支持创建数据库来管理一个大的镜像集合 +- 支持从CD/DVD 或者是ISO镜像中提取启动文件 +- 支持备份CD成BIN镜像 +- 支持简单快速的把DVD翻录成Xvid AVI +- 支持简单快速的把常见的视频(avi, mpeg, mov, wmv, asf)转换成Xvid AVI +- 支持简单快速的把FLV 换换成AVI 格式 +- 支持从YouTube和一些视频网站下载视频 +- 支持提取一个有密码的RAR存档 +- 支持转换任何的视频到索尼便携式PSP上 +- 国际化的语言支持支持(英语,意大利语,波兰语,西班牙语,罗马尼亚语,匈牙利语,德语,捷克语和俄语) + +- 项目网址: [sourceforge.net/projects/acetoneiso][4] +- 开发者: Marco Di Antonio +- 许可: GNU GPL v3 +- 版本号: 2.3 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/ISOMaster.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-ISOMaster.png) + +ISO Master是一个开源、易用的、图形化CD 镜像编辑器,适用于Linux 和BSD 。可以从ISO 里提取文件,给ISO 添加文件,创建一个可引导的ISO,这些都是在一个可视化的用户界面完成的。可以打开ISO,NRG 和一些MDF文件,但是只能保存成ISO 格式。 + +ISO Master 是基于bkisofs 创建的,一个简单、稳定的阅读库,修改和编写ISO 镜像,支持Joliet, RockRidge 和EL Torito扩展, + +特性: + +- 支持读ISO 格式文件(ISO9660, Joliet, RockRidge 和 El Torito),大多数的NRG 格式文件和一些单向的MDF文件,但是,只能保存成ISO 格式 +- 创建和修改一个CD/DVD 格式文件 +- 支持CD 格式文件的添加或删除文件和目录 +- 支持创建可引导的CD/DVD +- 国际化的支持 + +- 项目网址: [www.littlesvr.ca/isomaster/][5] +- 开发者: Andrew Smith +- 许可: GNU GPL v2 +- 版本号: 1.3.11 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20141025082352476/DiskImageTools.html + +作者:Frazer Kline +译者:[barney-ro](https://github.com/barney-ro) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://launchpad.net/furiusisomount/ +[2]:http://sourceforge.net/projects/fuseiso/ +[3]:http://sourceforge.net/projects/iat.berlios/ +[4]:http://sourceforge.net/projects/acetoneiso/ +[5]:http://www.littlesvr.ca/isomaster/ \ No newline at end of file From ede3a6ea00d83db147b76fac6486d0351a2aec0c Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Sun, 2 Nov 2014 11:28:43 +0800 Subject: [PATCH 074/316] [Translated] How to Install MariaDB in Ubuntu 14.04 LTS --- ... to Install MariaDB in Ubuntu 14.04 LTS.md | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) rename {sources => translated}/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md (50%) diff --git a/sources/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md b/translated/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md similarity index 50% rename from sources/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md rename to translated/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md index fb48c9a2fe..cbc1f4bd69 100644 --- a/sources/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md +++ b/translated/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md @@ -1,31 +1,29 @@ -Translating----geekpi - -How to Install MariaDB in Ubuntu 14.04 LTS +如何在Ubuntu 14.04 LTS上安装MariaDB ================================================================================ -MariaDB is an Open Source database Server & It is 100 % compatible with MySQL, drop-in replacement to MySQL database server. +MariaDB是一个开源数据库且100%与MySQL兼容,目标是替代MySQL数据库。 -### Background of MariaDB : ### +### MariaDB的背景 : ### -In 2008, MySQL was acquired by **Sun Microsystems**, which was in turn acquired by Oracle Corporation in 2010. While the initial acquisition by Sun was hailed by many in the MySQL community as exactly what the project needed, that sentiment did not last, and the subsequent acquisition by Oracle was unfortunately met with far lower expectations. Many of MySQL’s developers left Sun and Oracle to work on new projects . Among them was **Michael ‘Monty’ Widenius**, creator of MySQL and one of the project’s longtime technical lead. Monty and his team created a fork (offshoot) of the MySQL code base and named his new DBMS **MariaDB** +2008年,MySQL被后来被Oracle在2010年收购的**Sun Microsystems**收购了。 最初被Sun公司的收购由于符合项目的需要受到MySQL社区的欢呼,但是这种情绪并没有持续他热爱就,接下来被Oracle的收购不幸期望远远低于预期。许多MySql的开发者离开了Sun和Oracle公司开始新的项目。在他们中间就有MySQL的创建者以及项目长期技术带头人之一的**Michael ‘Monty’ Widenius**。Monty和他的团队创建了MySQL的一个fork版本并且命名它为**MariaDB**。 -In this Post we will discuss how to install MariaDB in Ubuntu Linux. By default mariadb packages are not included in Ubuntu Repositories. So to install mariadb , we we have set MariaDB repository. +本篇我们会讨论如何在Ubuntu上安装MariaDB。默认上MariaDB的包并没有在Ubuntu仓库中。要安装MariaDB,我们首先要设置MariaDB仓库。 -#### Setting Up MariaDB Repository #### +#### 设置 MariaDB 仓库 #### $ sudo apt-get install software-properties-common $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db $ sudo add-apt-repository 'deb http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main' -#### Installation of MariaDB : #### +#### 安装 MariaDB : #### $ sudo apt-get update $ sudo apt-get install mariadb-server -While Installing MariaDB , you will be asked to set Maria DB root Password. +在安装中,你会被要求设置MariaDB的root密码。 ![](http://www.linuxtechi.com/wp-content/uploads/2014/10/mariadb-root-1024x442-1.jpg) -#### Connect To MariaDB From the Command Line : #### +#### 从命令行连接到MariaDB : #### linuxtechi@mail:~$ mysql -uroot -p Enter password: @@ -36,7 +34,7 @@ While Installing MariaDB , you will be asked to set Maria DB root Password. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> -#### Maria DB Service #### +#### Maria DB 服务 #### $ sudo /etc/init.d/mysql stop $ sudo /etc/init.d/mysql start @@ -46,7 +44,7 @@ While Installing MariaDB , you will be asked to set Maria DB root Password. via: http://www.linuxtechi.com/install-mariadb-in-ubuntu/ 作者:[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中国](http://linux.cn/) 荣誉推出 From c20a22934fbf473dc463d603b486b2cd56a251fe Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 2 Nov 2014 14:31:06 +0800 Subject: [PATCH 075/316] PUB:20140818 How to Take 'Snapshot of Logical Volume and Restore' in LVM--Part III @GOLinux --- ...al Volume and Restore' in LVM--Part III.md | 112 ++++++++++-------- 1 file changed, 63 insertions(+), 49 deletions(-) rename {translated/tech => published}/20140818 How to Take 'Snapshot of Logical Volume and Restore' in LVM--Part III.md (64%) diff --git a/translated/tech/20140818 How to Take 'Snapshot of Logical Volume and Restore' in LVM--Part III.md b/published/20140818 How to Take 'Snapshot of Logical Volume and Restore' in LVM--Part III.md similarity index 64% rename from translated/tech/20140818 How to Take 'Snapshot of Logical Volume and Restore' in LVM--Part III.md rename to published/20140818 How to Take 'Snapshot of Logical Volume and Restore' in LVM--Part III.md index 6213ea22d4..5f34b81685 100644 --- a/translated/tech/20140818 How to Take 'Snapshot of Logical Volume and Restore' in LVM--Part III.md +++ b/published/20140818 How to Take 'Snapshot of Logical Volume and Restore' in LVM--Part III.md @@ -1,20 +1,19 @@ -在LVM中“录制逻辑卷快照并恢复”——第三部分 +在 LVM中 录制逻辑卷快照并恢复(第三部分) ================================================================================ -**LVM快照**是空间有效指向时间的lvm卷副本。它只在lvm中工作,并只在源逻辑卷发生改变时消耗快照卷的空间。如果源卷的变化达到1GB这么大,快照卷同样也会产生这样大的改变。因而,对于空间有效利用的最佳途径,就是总是进行小的修改。如果快照将存储空间消耗殆尽,我们可以使用lvextend来扩容。而如果我们需要缩减快照,可以使用lvreduce。 +**LVM快照**是以空间换时间时间的方式制作的lvm卷副本。它只在lvm中工作,并只在源逻辑卷发生改变时占用快照卷的空间。如果源卷的变化达到1GB这么大,快照卷同样也会产生这样大的改变。因而,对于空间有效利用的最佳途径,就是总是进行小的修改。如果快照将存储空间消耗殆尽,我们可以使用lvextend来扩容。而如果我们需要缩减快照所占用卷的大小,可以使用lvreduce。 ![Take Snapshot in LVM](http://www.tecmint.com/wp-content/uploads/2014/08/Take-Snapshot-in-LVM.jpg) -在LVM中录制快照 -如果我们在创建快照后意外地删除了无论什么文件,我们没有必要担心,因为快照里包含了我们所删除的文件的原始文件。创建快照时,很有可能文件每次都在那。不要改变快照卷,保持创建时的样子,因为它用于快速恢复。 +*在LVM中录制快照* + +如果我们在创建快照后意外地删除了无论什么文件,我们没有必要担心,因为快照里包含了我们所删除的文件的原始文件。创建快照时,很有可能文件已经存在了。不要改变快照卷,保持创建时的样子,因为它用于快速恢复。 快照不可以用于备份选项。备份是某些数据的基础副本,因此我们不能使用快照作为备份的一个选择。 -#### 需求 #### +#### 前置阅读 #### -注:此两篇文章如果发布后可换成发布后链接,原文在前几天更新中 - -- [在Linux中使用LVM创建磁盘存储 — 第一部分][1] -- [在Linux中扩展/缩减LVM — 第二部分][2] +- [在Linux中使用LVM构建灵活的磁盘存储(第一部分)][1] +- [在Linux中扩展/缩减LVM(第二部分)][2] ### 我的服务器设置 ### @@ -29,9 +28,10 @@ # lvs ![Check LVM Disk Space](http://www.tecmint.com/wp-content/uploads/2014/08/Check-LVM-Disk-Space.jpg) -检查LVM磁盘空间 -正如你所见,在**vgs**命令输出中,我们可以看到有8GB的剩余空闲空间。所以,让我们为我的名为**tecmint_datas**的卷之一创建快照。处于演示的目的,我将会使用以下命令来创建1GB的快照卷。 +*检查LVM磁盘空间* + +正如你所见,在**vgs**命令输出中,我们可以看到有8GB的剩余空闲空间。所以,让我们为我的名为**tecmint_datas**的卷创建快照。处于演示的目的,我将会使用以下命令来创建1GB的快照卷。 # lvcreate -L 1GB -s -n tecmint_datas_snap /dev/vg_tecmint_extra/tecmint_datas @@ -45,79 +45,87 @@ - **-n** – 为快照命名 ![Create LVM Snapshot](http://www.tecmint.com/wp-content/uploads/2014/08/Create-LVM-Snapshot.jpg) -创建LVM快照 + +*创建LVM快照* 此处,是对上面高亮要点的说明。 -- 我在此创建的快照的大小。 -- 创建快照。 -- 创建快照名。 -- 新的快照名。 -- 要创建快照的卷。 +1. 我在此创建的快照的大小。 +2. 创建快照。 +3. 创建快照名。 +4. 新的快照名。 +5. 要创建快照的卷。 如果你想要移除快照,可以使用‘**lvremove**’命令。 -# lvremove /dev/vg_tecmint_extra/tecmint_datas_snap + # lvremove /dev/vg_tecmint_extra/tecmint_datas_snap ![Remove LVM Snapshot](http://www.tecmint.com/wp-content/uploads/2014/08/Remove-LVM-Snapshot.jpg) -移除LVM快照 + +*移除LVM快照* 现在,使用以下命令列出新创建的快照。 - # lvs + # lvs ![Verify LVM Snapshot](http://www.tecmint.com/wp-content/uploads/2014/08/Verify-LVM-Snapshot.jpg) -验证LVM快照 + +*验证LVM快照* 上面的你看到了吧,成功创建了一个快照。上面我用箭头标出了快照创建的源,它就是**tecmint_datas**。是的,因为我已经为**tecmint_datas l-volume**创建了一个快照。 ![Check LVM Snapshot Space](http://www.tecmint.com/wp-content/uploads/2014/08/Check-LVM-Snapshot-Space.jpg) -检查LVM快照空间 + +*检查LVM快照空间* 让我们添加一些新文件到**tecmint_datas**里头。现在卷里大概有650MB左右的数据,而我我们的快照有1GB大。因此,有足够的空间在快照卷里备份我们的修改。这里我们可以使用下面的命令来查看到,我们的快照当前的状态。 # lvs ![Check Snapshot Status](http://www.tecmint.com/wp-content/uploads/2014/08/Check-Snapshot-Status.jpg) -检查快照状态 + +*检查快照状态* 你看到了,现在已经用掉了**51%**的快照卷,你要对你的文件作更多的修改都没有问题。使用下面的命令来查看更多详细信息。 # lvdisplay vg_tecmint_extra/tecmint_data_snap ![View Snapshot Information](http://www.tecmint.com/wp-content/uploads/2014/08/Snapshot-Information.jpg) -查看快照信息 + +*查看快照信息* 再来对上面图片中高亮的要点作个清楚的说明。 -- 快照逻辑卷名称。 -- 当前使用的卷组名。 -- 读写模式下的快照卷,我们甚至可以挂载并使用该卷。 -- 快照创建时间。这个很重要,因为快照将跟踪此时间之后的每个改变。 -- 该快照属于tecmint_datas逻辑卷。 -- 逻辑卷在线并可用。 -- 我们录制快照的源卷大小。 -- 写时复制表大小,Cow = copy on Write,这是说对tecmint_data卷所作的任何改变都会写入此快照。 -- 当前使用的快照大小,我们的tecmint_data有10GB,而我们的快照大小是1GB,这就意味着我们的数据大概有650MB。所以,如果tecmint_datas中的文件增长到2GB,现在的51%中的内容将增加到超过所分配的快照的大小,当然,我们在创建快照时会出现问题。这就意味着我们需要扩展逻辑卷大小(快照逻辑卷) -- 给出快照组块的大小。 +1. 快照逻辑卷名称。 +2. 当前使用的卷组名。 +3. 读写模式下的快照卷,我们甚至可以挂载并使用该卷。 +4. 快照创建时间。这个很重要,因为快照将跟踪此时间之后的每个改变。 +5. 该快照属于tecmint_datas逻辑卷。 +6. 逻辑卷在线并可用。 +7. 我们录制快照的源卷大小。 +8. 写时复制表大小,Cow = copy on Write,这是说对tecmint_data卷所作的任何改变都会写入此快照。 +9. 当前使用的快照大小,我们的tecmint_data有10GB,而我们的快照大小是1GB,这就意味着我们的数据大概有650MB。所以,如果tecmint_datas中的文件增长到2GB,现在的51%中的内容将增加到超过所分配的快照的大小,当然,我们在创建快照时会出现问题。这就意味着我们需要扩展逻辑卷大小(快照逻辑卷) +10. 给出快照组块的大小。 现在,让我们复制超过1GB的文件到**tecmint_datas**。让我们看看会发生什么。如果你那么做了,你将会见到‘**Input/output error**’这样的错误信息,它告诉你快照超出空间大小了。 ![Add Files to Snapshot](http://www.tecmint.com/wp-content/uploads/2014/08/Add-Files-to-Snapshot.jpg) -添加文件到快照 -如果逻辑卷满了,它就会自动下线,我们就不能再使用了,就算我们去扩展快照卷的大小也不行。最好的方法就是在创建快照时,创建一个和源一样大小的快照卷。**tecmint_datas**的大小是10GB,如果我们创建一个10GB大小的快照,它就永远都不会像上面那样超载,因为它有足够的空间来录制你的逻辑卷的快照。 +*添加文件到快照* + +如果该逻辑卷满了,它就会自动丢失新的数据,我们就不能再使用了,就算我们去扩展快照卷的大小也不行。最好的方法就是在创建快照时,创建一个和源一样大小的快照卷。**tecmint_datas**的大小是10GB,如果我们创建一个10GB大小的快照,它就永远都不会像上面那样超载,因为它有足够的空间来录制你的逻辑卷的快照。 #### 步骤2: 在LVM中扩展快照 #### -如果我们需要在超载前扩展快照大小,我们可以使用以下命令来完成此项任务。 +如果我们需要在超过容量前扩展快照卷的大小,我们可以使用以下命令来完成此项任务。 # lvextend -L +1G /dev/vg_tecmint_extra/tecmint_data_snap 现在,那里有总计2GB大小的快照空间。 ![Extend LVM Snapshot](http://www.tecmint.com/wp-content/uploads/2014/08/Extend-LVM-Snapshot.jpg) -扩展LVM快照 + +*扩展LVM快照* 接下来,使用以下命令来验证新的大小和写时复制表。 @@ -128,7 +136,8 @@ # lvs ![Check Size of Snapshot](http://www.tecmint.com/wp-content/uploads/2014/08/Check-Size-of-Snapshot.jpg) -检查快照大小 + +*检查快照大小* 然而,如果你的快照大小和源卷一样,我们就没有必要担心这些问题了。 @@ -139,21 +148,24 @@ # unmount /mnt/tecmint_datas/ ![Un-mount File System](http://www.tecmint.com/wp-content/uploads/2014/08/Unmount-File-System.jpg) -卸载文件系统 -只想检查挂载点是否卸载,可以使用下面的命令。 +*卸载文件系统* + +只想检查挂载点是否卸载成功,可以使用下面的命令。 # df -h ![Check File System Mount Points](http://www.tecmint.com/wp-content/uploads/2014/08/Check-Mount-Points.jpg) -检查文件系统挂载点 + +*检查文件系统挂载点* 这里,我们的挂载已经被卸载,所以我们可以继续恢复快照。要恢复快照,可以使用**lvconvert**命令。 # lvconvert --merge /dev/vg_tecmint_extra/tecmint_data_snap ![Restore LVM Snapshot](http://www.tecmint.com/wp-content/uploads/2014/08/Restore-Snapshot.jpg) -恢复LVM快照 + +*恢复LVM快照* 在合并完成后,快照卷将被自动移除。现在我们可以使用**df**命令来查看分区大小。 @@ -166,7 +178,8 @@ # lvs ![Check Size of Logical Volume](http://www.tecmint.com/wp-content/uploads/2014/08/Check-Size-of-LV.jpg) -检查逻辑卷大小 + +*检查逻辑卷大小* **重要**:要自动扩展快照,我们可以通过修改配置文件来进行。对于手动扩展,我们可以使用lvextend。 @@ -177,13 +190,14 @@ 搜索单词autoextend。默认情况下,该值和下图中的类似。 ![LVM Configuration](http://www.tecmint.com/wp-content/uploads/2014/08/LVM-Configuration.jpg) -LVM配置 + +*LVM配置* 修改此处的**100**为**75**,这样自动扩展的起始点就是**75**,而自动扩展百分比为20,它将自动扩容**百分之20**。 如果快照卷达到**75%**,它会自动为快照卷扩容**20%**。这样,我们可以自动扩容了。使用**wq!**来保存并退出。 -这将把快照从超载下线中拯救出来,这也会帮助你节省更多时间。LVM是我们扩容以及获得其它众多特性如精简资源调配、拆卸、虚拟卷和使用精简池的唯一方法,让我们在下一个话题中来讨论吧。 +这将把快照从超载导致下线事故中拯救出来,这也会帮助你节省更多时间。LVM是我们扩容以及获得其它众多特性如精简资源调配、拆卸、虚拟卷和使用精简池的唯一方法,让我们在下一个话题中来讨论吧。 -------------------------------------------------------------------------------- @@ -191,10 +205,10 @@ via: http://www.tecmint.com/take-snapshot-of-logical-volume-and-restore-in-lvm/ 作者:[Babin Lonston][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/babinlonston/ -[1]:http://www.tecmint.com/create-lvm-storage-in-linux/ -[2]:http://www.tecmint.com/extend-and-reduce-lvms-in-linux/ +[1]:http://linux.cn/article-3965-1.html +[2]:http://linux.cn/article-3974-1.html From c6faef5ffdc784046aafffa11f82ae642b427070 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 2 Nov 2014 14:49:17 +0800 Subject: [PATCH 076/316] PUB:20140919 Network Installation of Debian 7 (Whezzy) on Client Machines using DNSMASQ Network Boot Server @GOLinux --- ...hines using DNSMASQ Network Boot Server.md | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) rename {translated/tech => published}/20140919 Network Installation of Debian 7 (Whezzy) on Client Machines using DNSMASQ Network Boot Server.md (89%) diff --git a/translated/tech/20140919 Network Installation of Debian 7 (Whezzy) on Client Machines using DNSMASQ Network Boot Server.md b/published/20140919 Network Installation of Debian 7 (Whezzy) on Client Machines using DNSMASQ Network Boot Server.md similarity index 89% rename from translated/tech/20140919 Network Installation of Debian 7 (Whezzy) on Client Machines using DNSMASQ Network Boot Server.md rename to published/20140919 Network Installation of Debian 7 (Whezzy) on Client Machines using DNSMASQ Network Boot Server.md index 1d7ac429a0..684dd87fbd 100644 --- a/translated/tech/20140919 Network Installation of Debian 7 (Whezzy) on Client Machines using DNSMASQ Network Boot Server.md +++ b/published/20140919 Network Installation of Debian 7 (Whezzy) on Client Machines using DNSMASQ Network Boot Server.md @@ -1,16 +1,16 @@ -客户机通过DNSMASQ网络启动服务器网络安装“Debian 7(Wheezy)” +通过网络方式安装 Debian 7(Wheezy) ================================================================================ -本教程将指引你直接通过使用**DNSMASQ**作为**PXE服务器(预启动执行环境)**的网络位置安装**Debian 7(Wheezy)**,此种情况是假定你的服务器不提供任何CD/DVD/USB介质驱动器,或者它只能通过相连的监视器、键盘和鼠标操作。 +本教程将指引你直接通过使用**DNSMASQ**作为**PXE服务器(预启动执行环境)**,以网络方式安装**Debian 7(Wheezy)**,此种情况是假定你的服务器不提供任何CD/DVD/USB介质驱动器,或者它只能通过相连的监视器、键盘和鼠标操作。 ![Debian 7 Network Installation on Client Machines](http://www.tecmint.com/wp-content/uploads/2014/09/Network-Debian-Instalaltion.png) -客户机上的Debian 7网络安装 +*客户机上的Debian 7网络安装* **DNSMASQ**是一个轻量级网络基础架构服务器,它可以通过内建的DNS、DHCP和TFTP服务器提供如DNS、DHCP和网络启动等关键服务。 一旦PXE服务器启动并运行,你可以指示你所有的客户机直接从网络启动,前提是你的客户机必须拥有一张支持网络启动的网卡,网络启动可以从BIOS的网络启动或启动服务选项中启用。 -### 需求 ### +### 前置阅读 ### - [Debian 7 (Wheezy)安装指南][1] @@ -22,7 +22,7 @@ ![Install Dnsmasq Package](http://www.tecmint.com/wp-content/uploads/2014/09/Install-Dnsmasq-in-Debian.png) -安装Dnsmasq包 +*安装Dnsmasq包* **2.** 安装好DNSMASQ包后,你可以开始编辑配置文件。首先创建一个主配置文件的备份,然后使用下面的命令对**dnsmasq.conf**文件进行编辑。 @@ -31,9 +31,9 @@ ![Backup Dnsmasq Configuration](http://www.tecmint.com/wp-content/uploads/2014/09/Backup-dnsmasq-Configuration-file.png) -备份Dnsmasq配置 +*备份Dnsmasq配置* -**3.** 上面的备份过程适合重命名配置文件,所以新的文件应该是空,你可以使用以下下面描述的**DNSMASQ**配置文件节录。 +**3.** 上面的备份过程适合重命名配置文件,所以新的文件应该是空,你可以使用以下描述的**DNSMASQ**配置文件节录。 interface=eth0 domain=debian.lan @@ -47,7 +47,7 @@ ![Configuration of Dnsmasq](http://www.tecmint.com/wp-content/uploads/2014/09/Configure-dnsmasq.png) -Dnsmasq配置 +*Dnsmasq配置* - **interface** – 服务器监听的网络接口。 - **domain** – 用你自己的域名替换。 @@ -79,7 +79,7 @@ Dnsmasq配置 ![Download Debian NetBoot Files](http://www.tecmint.com/wp-content/uploads/2014/09/Download-Debian-NetBoot-Files.png) -下载Debian网络启动文件 +*下载Debian网络启动文件* 使用以下变量用于**Debian网络安装**镜像和架构。 @@ -95,9 +95,10 @@ Dnsmasq配置 ![Start Dnsmasq Service](http://www.tecmint.com/wp-content/uploads/2014/09/Start-Dnsmasq-Service.png) -启动Dnsmasq服务 +*启动Dnsmasq服务* **6.** 基于Debian的发行版通常附带了**UFW防火墙**包。使用以下命令来打开需要的**DNSMASQ**端口号:**67**(Bootps),**69**(TFTP),**53**(DNS)**4011**(代理DHCP)udp和**53** tcp(DNS)。 + # ufw allow 69/udp # ufw allow 4011/udp ## Only if you have a ProxyDHCP on the network # ufw allow 67/udp @@ -106,9 +107,8 @@ Dnsmasq配置 ![Open Dnsmasq Ports](http://www.tecmint.com/wp-content/uploads/2014/09/Open-Dnsmasq-Ports-620x303.png) -开启Dnsmasq端口 +*开启Dnsmasq端口* -Now, the PXE loader located on your client network interface will load **pxelinux** configuration files from **/srv/tftp/pxelinux.cfg** directory using this order. 现在,位于你的客户机网络接口上的PXE加载器将使用按以下顺序从**/srv/tftp/pxelinux.cfg**目录加载**pxelinux**配置文件。 - GUID文件 @@ -123,7 +123,7 @@ Now, the PXE loader located on your client network interface will load **pxelinu ![Select BIOS Settings](http://www.tecmint.com/wp-content/uploads/2014/09/Select-BIOS-Settings.png) -选择BIOS设置 +*选择BIOS设置* **8。** 在编辑启动顺序后,通常按**F10**来保存BIOS设置。重启后,你的客户端计算机应该可以直接从网络启动了,应该会出第一个**PXE**提示,要求你按**F8**键进入菜单。 @@ -131,15 +131,15 @@ Now, the PXE loader located on your client network interface will load **pxelinu ![Boot Menu Selection](http://www.tecmint.com/wp-content/uploads/2014/09/Boot-Menu-Selection.png) -启动菜单选择 +*启动菜单选择* ![Select Debian Installer Boot](http://www.tecmint.com/wp-content/uploads/2014/09/Select-Debian-Installer-Boot.png) -选择Debian安装器启动 +*选择Debian安装器启动* ![Select Debian Install](http://www.tecmint.com/wp-content/uploads/2014/09/Select-Debian-Install.png) -选择Debian安装 +*选择Debian安装* 从这里开始,你可以使用Debian 7 Wheezy安装进程将Debian安装到你的机器上了(安装链接见上面)。然而,为了能够完成安装进程,你也需要确保你的机器上互联网连接已经激活。 @@ -151,7 +151,7 @@ Now, the PXE loader located on your client network interface will load **pxelinu ![Debug DNSMASQ Server](http://www.tecmint.com/wp-content/uploads/2014/09/Debbug-DNSMASQ-Server.png) -DNSMASQ服务器排障 +*DNSMASQ服务器排障* **10.** 如果服务器测试中已一切就绪,你现在可以在**sysv-rc-conf**包的帮助下,启用**DNSMASQ**守护进程自启动,以使该进程在系统重启后自动启动。 @@ -160,11 +160,11 @@ DNSMASQ服务器排障 ![Enable DNSMASQ Daemon](http://www.tecmint.com/wp-content/uploads/2014/09/Enable-DNSMASQ-Daemon.png) -启用DNSMASQ守护进程 +*启用DNSMASQ守护进程* 到此为止吧!现在你的**PXE**服务器已经整装待发,随时准备好分配IP地址了(**DHCP**),并为你所有网段中的客户端提供需要的启动信息,这些信息配置用来从网络启动并安装Debian Wheezy。 -使用PXE网络启动安装在服务器主机数量增长时很有优势,因为你可以在短时间内火同时设置整个网络基础架构,为版本升级提供了方便,也可以通过kickstart文件使整个安装的全自动化。 +使用PXE网络启动安装在服务器主机数量很多时很有优势,因为你可以在短时间内火同时设置整个网络基础架构,为版本升级提供了方便,也可以通过kickstart文件使整个安装的全自动化。 -------------------------------------------------------------------------------- @@ -172,7 +172,7 @@ via: http://www.tecmint.com/network-installation-of-debian-7-on-client-machines/ 作者:[Matei Cezar][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From bcb77309c8158928a5b4a226ab7258ef49097e7e Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 2 Nov 2014 14:59:10 +0800 Subject: [PATCH 077/316] PUB:20141022 Linux FAQs with Answers--How to fix fatal error--openssl or aes.h--No such file or directory @geekpi --- ...l error--openssl or aes.h--No such file or directory.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) rename {translated/tech => published}/20141022 Linux FAQs with Answers--How to fix fatal error--openssl or aes.h--No such file or directory.md (86%) diff --git a/translated/tech/20141022 Linux FAQs with Answers--How to fix fatal error--openssl or aes.h--No such file or directory.md b/published/20141022 Linux FAQs with Answers--How to fix fatal error--openssl or aes.h--No such file or directory.md similarity index 86% rename from translated/tech/20141022 Linux FAQs with Answers--How to fix fatal error--openssl or aes.h--No such file or directory.md rename to published/20141022 Linux FAQs with Answers--How to fix fatal error--openssl or aes.h--No such file or directory.md index 99d2cc28c6..c91b027cb7 100644 --- a/translated/tech/20141022 Linux FAQs with Answers--How to fix fatal error--openssl or aes.h--No such file or directory.md +++ b/published/20141022 Linux FAQs with Answers--How to fix fatal error--openssl or aes.h--No such file or directory.md @@ -1,10 +1,10 @@ -Linux 有问必答 -- 如何修复“fatal error: openssl/aes.h: No such file or directory” +Linux 有问必答:如何修复“fatal error: openssl/aes.h: No such file or directory” ================================================================================ > **Question**:我尝试在Linux编译一个程序,但是编译失败并报了一个错,“fatal error: openssl/aes.h: No such file or directory”。我该怎样安装要求的头文件并在我的Linux上解决这个问题? fatal error: openssl/aes.h: No such file or directory -如果你在编译时遇到这个错误,这可能是下面的原因:你尝试编译的程序使用OpenSSL,但是需要和OpenSSL链接的文件(库和头文件)在你Linux平台上缺少。 +如果你在编译时遇到这个错误,这可能是下面的原因:你尝试编译的程序使用OpenSSL,但是需要和OpenSSL链接的文件(库和头文件)在你Linux平台上缺少。(LCTT 译注:其它类似的错误也可以照此处理) 要解决这个问题,你需要安装**OpenSSL 开发包**,这在所有的现代Linux发行版的标准软件仓库中都有。 @@ -22,8 +22,7 @@ Linux 有问必答 -- 如何修复“fatal error: openssl/aes.h: No such file or via: http://ask.xmodulo.com/fix-fatal-error-openssl.html -作者:[作者名][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/) 荣誉推出 \ No newline at end of file From 7b4d669c07ea3659be6d3930619126e49be40694 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 2 Nov 2014 15:16:24 +0800 Subject: [PATCH 078/316] PUB:How to sniff HTTP traffic from the command line on Linux @SPccman --- ... traffic from the command line on Linux.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/How to sniff HTTP traffic from the command line on Linux.md (73%) diff --git a/translated/tech/How to sniff HTTP traffic from the command line on Linux.md b/published/How to sniff HTTP traffic from the command line on Linux.md similarity index 73% rename from translated/tech/How to sniff HTTP traffic from the command line on Linux.md rename to published/How to sniff HTTP traffic from the command line on Linux.md index 7b8ba77878..849ed9e86d 100644 --- a/translated/tech/How to sniff HTTP traffic from the command line on Linux.md +++ b/published/How to sniff HTTP traffic from the command line on Linux.md @@ -1,14 +1,14 @@ -使用Linux命令行嗅探HTTP流量 +Linux 命令行下嗅探 HTTP 流量的工具:httpry ================================================================================ 假设由于某种原因,你需要嗅探HTTP站点的流量(如HTTP请求与响应)。举个例子,你可能在测试一个web服务器的实验性功能,或者你在为某个web应用或RESTful服务排错,又或者你正在为PAC(proxy auto config)排错或寻找某个站点下载的恶意软件。不论什么原因,在这些情况下,进行HTTP流量嗅探对于系统管理、开发者、甚至最终用户来说都是很有帮助的。 -数据包嗅工具tcpdump被广泛用于实时数据包的导出,但是你需要设置过滤规则来捕获HTTP流量,甚至它的原始输出通常不能方便的停在HTTP协议层。实时web服务器日志解析器如[ngxtop][3]提供可读的实时web流量跟踪痕迹,但这仅适用于可完全访问live web服务器日志的情况。 +数据包嗅工具tcpdump被广泛用于实时数据包的导出,但是你需要设置过滤规则来捕获HTTP流量,甚至它的原始输出通常不能方便的停在HTTP协议层。实时web服务器日志解析器如[ngxtop][3]可以提供可读的实时web流量跟踪痕迹,但这仅适用于可完全访问live web服务器日志的情况。 -要是有一个仅用于抓取HTTP流量的类tcpdump的数据包嗅探工具就非常好了。事实上,[httpry][4]就是:**HTTP包嗅探工具**。httpry捕获HTTP数据包,并且将HTTP协议层的数据内容以可读形式列举出来。通过这篇指文章,让我们了解如何使用httpry工具嗅探HTTP流量。 +要是有一个仅用于抓取HTTP流量的类似tcpdump的数据包嗅探工具就非常好了。事实上,[httpry][4]就是:**HTTP包嗅探工具**。httpry捕获HTTP数据包,并且将HTTP协议层的数据内容以可读形式列举出来。通过这篇指文章,让我们了解如何使用httpry工具嗅探HTTP流量。 ###在Linux上安装httpry### -基于Debian系统(Ubuntu 或 LinuxMint),基础仓库中没有httpry安装包(译者注:本人ubuntu14.04,仓库中已有包,可直接安装)。所以我们需要通过源码安装: +基于Debian系统(Ubuntu 或 LinuxMint),基础仓库中没有httpry安装包(译者注:本人ubuntu14.04,仓库中已有包,可直接安装)。所以我们需要通过源码安装: $ sudo apt-get install gcc make git libpcap0.8-dev $ git clone https://github.com/jbittel/httpry.git @@ -16,7 +16,7 @@ $ make $ sudo make install -在Fedora,CentOS 或 RHEL系统,可以使用如下yum命令安装httpry。在CentOS/RHEL系统上,运行yum之前使齐能够[EPEL repo][5]。 +在Fedora,CentOS 或 RHEL系统,可以使用如下yum命令安装httpry。在CentOS/RHEL系统上,运行yum之前使其能够访问[EPEL repo][5]。 $ sudo yum install httpry @@ -62,11 +62,11 @@ httpry就会监听指定的网络接口,并且实时的显示捕获到的HTTP ![](https://farm6.staticflickr.com/5551/14799184220_3b449d422c_z.jpg) -如果你下载了httpry的源码,你会发现源码下有一系Perl脚本,这些脚本用于分析httpry输出。脚本位于目录httpry/scripts/plugins。如果你想写一个定制的httpry输出分析器,则这些脚可以作为很好的例子。其中一些有如下的功能: +如果你下载了httpry的源码,你会发现源码下有一些Perl脚本,这些脚本用于分析httpry输出。脚本位于目录httpry/scripts/plugins。如果你想写一个定制的httpry输出分析器,则这些脚可以作为很好的例子。其中一些有如下的功能: -- **hostnames**: 显示唯一主机名列表. -- **find_proxies**: 探测web代理. -- **search_terms**: 查找及计算在搜索服务里面的搜索词。 +- **hostnames**: 显示唯一主机名列表。 +- **find_proxies**: 探测web代理。 +- **search_terms**: 查找及统计在搜索服务里面的搜索词。 - **content_analysis**: 查找含有指定关键的URL。 - **xml_output**: 将输出转换为XML形式。 - **log_summary**: 生成日志汇总。 @@ -77,9 +77,9 @@ httpry就会监听指定的网络接口,并且实时的显示捕获到的HTTP $ cd httpry/scripts $ perl parse_log.pl -d ./plugins -你可能在使用插件的时候遇到警告。比如,如果你没有安装带有DBI接口的MySQL数据库那么使用db_dump插件时可能会失败。如果一个插件初始化失败的话,那么这个插件不能使用。所以你可以忽略那些警告。 +你可能在使用插件的时候遇到警告。比如,如果你没有安装带有DBI接口的MySQL数据库,那么使用db\_dump插件时可能会失败。如果一个插件初始化失败的话,那么只是这个插件不能使用,所以你可以忽略那些警告。 -当parse_log.pl完成后,你将在httpry/scripts 目录下看到数个分析结果。例如,log_summary.txt 与如下内容类似。 +当parse\_log.pl完成后,你将在httpry/scripts 目录下看到数个分析结果。例如,log\_summary.txt 与如下内容类似。 ![](https://farm4.staticflickr.com/3845/14799162189_b85abdf21d_z.jpg) @@ -91,7 +91,7 @@ via: http://xmodulo.com/2014/08/sniff-http-traffic-command-line-linux.html 作者:[Dan Nanni][a] 译者:[DoubleC](https://github.com/DoubleC) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 05e8be79873de3c6f57b12b49f5968193c13e8a6 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 2 Nov 2014 17:46:07 +0800 Subject: [PATCH 079/316] =?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 --- .../20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md b/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md index 1fd579521d..a0b92babb0 100644 --- a/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md +++ b/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md @@ -43,9 +43,9 @@ Ubuntu 14.04是长期支持(LTS)版本。这意味着更长的支持周期 via: http://itsfoss.com/upgrade-ubuntu-14-04-to-14-10/ 作者:[Abhishek][a] -译者:[geekpi](https://github.com/geekpi) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://itsfoss.com/author/Abhishek/ \ No newline at end of file +[a]:http://itsfoss.com/author/Abhishek/ From 7ca88d9fe2711e0c0f7085ce6eafb4152d5a28ce Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 2 Nov 2014 19:10:22 +0800 Subject: [PATCH 080/316] =?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 Upgrade Ubuntu 14.04 To Ubuntu 14.10.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md b/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md index a0b92babb0..0283522090 100644 --- a/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md +++ b/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md @@ -1,16 +1,16 @@ -如何升级Ubuntu 14.04 到Ubuntu 14.10 +如何从 Ubuntu 14.04 升级到 Ubuntu 14.10 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/04/Ubuntu_Unicorn_Utopia.jpeg) -Ubuntu 14.10已于昨日发布。想知道**如何从Ubuntu 14.04升级到Ubuntu 14.10**么?别担心,这很容易升级到Ubuntu 14.10。事实上,它只是点击几下和有良好的互联网连接的事情而已。 +Ubuntu 14.10已于前段时间发布。想知道**如何从 Ubuntu 14.04 升级到 Ubuntu 14.10 **么?别担心,这很容易做到。事实上,只要网络连接速度好,升级只是点击几下鼠标的事情而已。 -### 你需要从Ubuntu 14.04 切换到Ubuntu 14.10么? ### +### 你需要从 Ubuntu 14.04 切换到 Ubuntu 14.10 么? ### -在你升级到Ubuntu 14.10之前,请确保你真的想为14.10抛弃Ubuntu14.04。一个很重要的原因是你不能从Ubuntu 14.10 降级到14.04。 你需要完全重新安装。 +在你升级到Ubuntu 14.10之前,请确定你真的想为升级 14.10 而抛弃 Ubuntu 14.04。一个很重要的原因是你不能从Ubuntu 14.10 回归到14.04。 你需要完全重新安装。 -Ubuntu 14.04是长期支持(LTS)版本。这意味着更长的支持周期和更稳定和支持。如果升级到14.10,你将被迫在9个月后从Ubuntu 14.10 升级到15.04,而14.04将会持续3年以上。 +Ubuntu 14.04是长期支持(LTS)版本。这意味着有更多的稳定性和更长的支持周期。如果升级到14.10,你将被迫在9个月后从Ubuntu 14.10 升级到15.04,而14.04将会持续3年以上。 -此外,目前Ubuntu的14.10没有很多使用户迫切切换到14.10 的新功能。但是,你肯定会得到最前沿的操作系统。所以,在这之前是否升级到Ubuntu 14.10是你自己的决定。 +此外,目前Ubuntu 14.10没有很多的新功能使吸引用户切换到14.10。当然了,你肯定会得到最前沿的操作系统。所以,在这之前是否升级到Ubuntu 14.10是你自己的决定。 ### 从Ubuntu 14.04 升级到 Ubuntu 14.10 ### @@ -22,7 +22,7 @@ Ubuntu 14.04是长期支持(LTS)版本。这意味着更长的支持周期 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Software_Update_Ubuntu.jpeg) -进入**更新**选项卡。这里要确保**Ubuntu新版本通知我** 设置成**对于任何新版本**。默认Ubuntu只会在另一个LTS发布时通知你。你必须要把它改成在任何中间版本都升级。 +进入**更新**选项卡。这里要确保**Ubuntu有新版本时通知我** 设置成**对于任何新版本**。默认Ubuntu只会在另一个LTS发布时通知你。你必须要把它改成在任何中间版本都升级。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Upgrade_Ubuntu.png) @@ -36,7 +36,7 @@ Ubuntu 14.04是长期支持(LTS)版本。这意味着更长的支持周期 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Upgrade_to_Ubuntu_1410.jpeg) -我希望本篇可以帮助你**从Ubuntu 14.04 升级到 Ubuntu 14.10**。虽然本教程是为Ubuntu写的,但是你可以用同样的步骤升级到Xubuntu 14.10和Kubuntu 14.10或者Lubuntu。敬请期待下一篇Ubuntu 14.10相关文章。 +我希望本篇教程可以帮助你**从 Ubuntu 14.04 升级到 Ubuntu 14.10**。虽然本教程是为Ubuntu写的,但是你可以用同样的步骤升级到 Xubuntu 14.10、Kubuntu 14.10 或者Lubuntu。敬请期待下一篇Ubuntu 14.10相关文章。 -------------------------------------------------------------------------------- @@ -44,7 +44,7 @@ via: http://itsfoss.com/upgrade-ubuntu-14-04-to-14-10/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b756f3f335c0923d87276d9410a8fb4668fd09d5 Mon Sep 17 00:00:00 2001 From: ThomazL Date: Sun, 2 Nov 2014 20:49:55 +0800 Subject: [PATCH 081/316] Translating by ThomazL --- ...n) Released – Install in RedHat and Debian Based Systems.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141022 Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md b/sources/tech/20141022 Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md index 509a4cd35c..0817db2d62 100644 --- a/sources/tech/20141022 Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md +++ b/sources/tech/20141022 Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md @@ -1,3 +1,4 @@ +>> Translating by ThomazL Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems ================================================================================ **Wine**, a most popular and powerful open source application for Linux, that used to run Windows based applications and games on Linux Platform without any trouble. @@ -93,4 +94,4 @@ via: http://www.tecmint.com/install-wine-in-linux/ [1]:http://www.winehq.org/announce/1.7.29 [2]:http://www.tecmint.com/install-wine-in-rhel-centos-and-fedora/ [3]:http://www.tecmint.com/install-wine-on-ubuntu-and-linux-mint/ -[4]:http://www.winehq.org/ \ No newline at end of file +[4]:http://www.winehq.org/ From 7aa10b6796107b2dcdd711ee744ed191c43de303 Mon Sep 17 00:00:00 2001 From: ThomazL Date: Sun, 2 Nov 2014 20:57:05 +0800 Subject: [PATCH 082/316] Translating by ThomazL --- ...nstall in RedHat and Debian Based Systems.md | 97 ------------------- 1 file changed, 97 deletions(-) delete mode 100644 sources/tech/20141022 Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md diff --git a/sources/tech/20141022 Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md b/sources/tech/20141022 Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md deleted file mode 100644 index 0817db2d62..0000000000 --- a/sources/tech/20141022 Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems.md +++ /dev/null @@ -1,97 +0,0 @@ ->> Translating by ThomazL -Wine 1.7.29 (Development Version) Released – Install in RedHat and Debian Based Systems -================================================================================ -**Wine**, a most popular and powerful open source application for Linux, that used to run Windows based applications and games on Linux Platform without any trouble. - -![Install Wine (Development Version) in Linux](http://www.tecmint.com/wp-content/uploads/2014/05/Install-Wine-Development-Version.png) - -Install Wine (Development Version) in Linux - -WineHQ team, recently announced a new development version of **Wine 1.7.29**. This new development build arrives with a number of new important features and **44** bug fixes. - -Wine team, keep releasing their development builds almost on weekly basis and adding numerous new features and fixes. Each new version brings support for new applications and games, making Wine a most popular and must have tool for every user, who want to run Windows based software in a Linux platform. - -According to the changelog, following key features are added in this release: - -- Added much improved shaping and BiDi mirroring in DirectWrite. -- Few page fault handling problems have been udpated. -- Included few more C runtime functions. -- Various bug fixes. - -For more in-depth details about this build can be found at the official [changelog][1] page. - -This article guides you how to install most recent development version of **Wine 1.7.29** on **Red Hat** and **Debian** based systems such as CentOS, Fedora, Ubuntu, Linux Mint and other supported distributions. - -### Installing Wine 1.7.29 Development Version in Linux ### - -Unfortunately, there are no official Wine repository available for the **Red Hat** based systems and the only way to install Wine, is to compile it from source. To do this, you need to install some dependency packages such as gcc, flex, bison, libX11-devel freetype-devel and Development Tools, etc. These packages are must required to compile Wine from source. Let’s install them using following **YUM** command. - -### On RedHat, Fedora and CentOS ### - - # yum -y groupinstall 'Development Tools' - # yum -y install flex bison libX11-devel freetype-devel - -Next, download the latest development version of Wine (i.e. **1.7.29**) and extract the source tallball package using the following commands. - - $ cd /tmp - $ wget http://citylan.dl.sourceforge.net/project/wine/Source/wine-1.7.29.tar.bz2 - $ tar -xvf wine-1.7.29.tar.bz2 -C /tmp/ - -Now, it’s time to compile and build Wine installer using the following commands as normal user. - -Note: The installation process might take up-to **15-20** minutes depending upon your internet and hardware speed, during installation it will ask you to enter **root** password. - -#### On 32-Bit Systems #### - - $ cd wine-1.7.29/ - $ ./tools/wineinstall - -#### On 64-Bit Systems #### - - $ cd wine-1.7.29/ - $ ./configure --enable-win64 - $ make - # make install - -### On Ubuntu, Debian and Linux Mint ### - -Under **Ubuntu** based systems, you can easily install the latest development build of Wine using the official **PPA**. Open a terminal and run the following commands with sudo privileges. - - $ sudo add-apt-repository ppa:ubuntu-wine/ppa - $ sudo apt-get update - $ sudo apt-get install wine 1.7 winetricks - -**Note**: At the time of writing this article, available version was **1.7.26** and the new build not yet updated in official Wine Repository, but the above instructions will install **1.7.29** when they made available. - -Once the installation completes successfully, you can install or run any windows based applications or games using wine as shown below. - - $ wine notepad - $ wine notepad.exe - $ wine c:\\windows\\notepad.exe - -**Note**: Please remember, this is a development build and cannot be installed or used on production systems. It is advised to use this version only for testing purpose. - -If you’re looking for a most recent stable version of Wine, you can go through our following articles, that describes how to install most latest version on almost all Linux environments. - -- [Install Wine 1.6.2 (Stable) in RHEL, CentOS and Fedora][2] -- [Install Wine 1.6.2 (Stable) in Debian, Ubuntu and Mint][3] - -### Reference Links ### - -- [WineHQ Homepage][4] - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-wine-in-linux/ - -作者:[Ravi Saive][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/admin/ -[1]:http://www.winehq.org/announce/1.7.29 -[2]:http://www.tecmint.com/install-wine-in-rhel-centos-and-fedora/ -[3]:http://www.tecmint.com/install-wine-on-ubuntu-and-linux-mint/ -[4]:http://www.winehq.org/ From 79ff28626c54db42db50efd272d80dea341065af Mon Sep 17 00:00:00 2001 From: Junkai <2q1w2007@users.noreply.github.com> Date: Sun, 2 Nov 2014 21:09:29 +0800 Subject: [PATCH 083/316] Update 20141009 How to convert image audio and video formats on Ubuntu.md --- ...009 How to convert image audio and video formats on Ubuntu.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/tech/20141009 How to convert image audio and video formats on Ubuntu.md b/sources/tech/20141009 How to convert image audio and video formats on Ubuntu.md index a3571253fd..b60bd11479 100644 --- a/sources/tech/20141009 How to convert image audio and video formats on Ubuntu.md +++ b/sources/tech/20141009 How to convert image audio and video formats on Ubuntu.md @@ -1,4 +1,3 @@ -2q1w2007翻译中 How to convert image, audio and video formats on Ubuntu ================================================================================ If you need to work with a variety of image, audio and video files encoded in all sorts of different formats, you are probably using more than one tools to convert among all those heterogeneous media formats. If there is a versatile all-in-one media conversion tool that is capable of dealing with all different image/audio/video formats, that will be awesome. From 9db52ddf680d679b2ce7191c3721711893a9378a Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Sun, 2 Nov 2014 23:15:51 +0800 Subject: [PATCH 084/316] Finish the Translation by ZTinoZ --- ...7 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {sources => translated}/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md (96%) diff --git a/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md b/translated/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md similarity index 96% rename from sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md rename to translated/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md index b043c18f0a..986f5a3730 100644 --- a/sources/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md +++ b/translated/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md @@ -42,9 +42,9 @@ Torvalds: “寻找能让你充满热情的事情并去完成它。” **9.** “成为一个维护人员很容易,你只需要无限的时间并且回复人们的邮件就行。” -**10.** Hohndel: “Make a bold prediction about the future of Linux.” +**10.** Hohndel: “给Linux的未来做个大胆的预测吧。” -Torvalds: “The boldest prediction I can say is, I will probably release rc1 in about a week.” +Torvalds: “我能做的一个最大的猜测,就是我可能会一周更新一次RC1版本。” -------------------------------------------------------------------------------- From e872052b3edcd8e9876750401ce088c9af565b9e Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 3 Nov 2014 08:18:06 +0800 Subject: [PATCH 085/316] Update 20141030 rsync Command to Exclude a List of Files and Directories in Linux.md --- ...mand to Exclude a List of Files and Directories in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md b/sources/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md index 23bec502f8..8447795193 100644 --- a/sources/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md +++ b/sources/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! rsync Command to Exclude a List of Files and Directories in Linux ================================================================================ **rsync** is a very useful and popular linux tool being used for backup and restoring files, but also for comparing and syncing them. We already shown you in the past [how to use rsync command in linux with examples][1] and today we will add a few more useful tricks you can use rsync at. @@ -39,4 +40,4 @@ via: http://linoxide.com/linux-command/exclude-files-rsync-examples/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/adriand/ -[1]:http://linoxide.com/how-tos/rsync-copy/ \ No newline at end of file +[1]:http://linoxide.com/how-tos/rsync-copy/ From f4cdd01ec5375435d27a1586c2e81a93e5af001d Mon Sep 17 00:00:00 2001 From: disylee Date: Mon, 3 Nov 2014 09:03:59 +0800 Subject: [PATCH 086/316] Update 20141023 How to turn your CentOS box into a BGP router using Quagga.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 改了个错别字 --- ...ow to turn your CentOS box into a BGP router using Quagga.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md b/translated/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md index 261abb7767..fbf2665d44 100644 --- a/translated/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md +++ b/translated/tech/20141023 How to turn your CentOS box into a BGP router using Quagga.md @@ -57,7 +57,7 @@ Quagga软件套件包含几个守护进程,这些进程可以一起工作.关于 ### 配置日志记录 ### -在Quagga被安装猴,下一步就是配置Zebra来管理BGP路由器的网络接口.我们通过创建一个Zebra配置文件和启用日志记录来开始第一步. +在Quagga被安装后,下一步就是配置Zebra来管理BGP路由器的网络接口.我们通过创建一个Zebra配置文件和启用日志记录来开始第一步. # cp /usr/share/doc/quagga-XXXXX/zebra.conf.sample /etc/quagga/zebra.conf From 20c87a61411b120fdef42acae1e280a3573797ed Mon Sep 17 00:00:00 2001 From: GOLinux Date: Mon, 3 Nov 2014 10:01:22 +0800 Subject: [PATCH 087/316] [Translated] 20141030 rsync Command to Exclude a List of Files and Directories in Linux.md --- ... List of Files and Directories in Linux.md | 43 ------------------- ... List of Files and Directories in Linux.md | 42 ++++++++++++++++++ 2 files changed, 42 insertions(+), 43 deletions(-) delete mode 100644 sources/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md create mode 100644 translated/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md diff --git a/sources/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md b/sources/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md deleted file mode 100644 index 8447795193..0000000000 --- a/sources/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md +++ /dev/null @@ -1,43 +0,0 @@ -Translating by GOLinux! -rsync Command to Exclude a List of Files and Directories in Linux -================================================================================ -**rsync** is a very useful and popular linux tool being used for backup and restoring files, but also for comparing and syncing them. We already shown you in the past [how to use rsync command in linux with examples][1] and today we will add a few more useful tricks you can use rsync at. - -### Exclude a list of files and directories ### - -Sometimes when we do large syncs we may wish to exclude a list of files and directories from syncing, in general files that can't by synced like device files and some system files, or files that would take up unnecessary disk space like temporary or cache files. - -First let's make a file called "excluded" (you can name it whatever you wish) and write each folder or file we would like to exclude on a separate line like this. For our example if you wish to do a full backup of your root partition you should exclude devices directories that get created at boot time and directories that hold temporary files, your list may look like this: - -![rsync excluded](http://blog.linoxide.com/wp-content/uploads/2014/10/rsync-excluded.jpg) - -Then you can run the following command to backup your system: - - $ sudo rsync -aAXhv --exclude-from=excluded / /mnt/backup - -![rsync exclude file](http://blog.linoxide.com/wp-content/uploads/2014/10/rsync-exclude-file.jpg) - -### Exclude files from the command line ### - -You can also exclude files directly from the command line, this is useful when you have a smaller number of files to exclude and you wish to include this in a script or crontab and don't want your script or cron to depend on another file to run successful. - -For example if you wish to sync /var to a backup directory but you don't wish to include cache and tmp folder that usualy don't hold important content between restarts you can use the following command: - - $ sudo rsync -aAXhv --exclude={"/var/cache","/var/tmp"} /var /home/adrian/var - -![rsync exclude](http://blog.linoxide.com/wp-content/uploads/2014/10/rsync-exclude.jpg) - -This command will be easy to use in any script or cron and will not depend on another file. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-command/exclude-files-rsync-examples/ - -作者:[Adrian Dinu][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/adriand/ -[1]:http://linoxide.com/how-tos/rsync-copy/ diff --git a/translated/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md b/translated/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md new file mode 100644 index 0000000000..5664e54c3b --- /dev/null +++ b/translated/tech/20141030 rsync Command to Exclude a List of Files and Directories in Linux.md @@ -0,0 +1,42 @@ +Linux中使用rsync——文件和目录排除列表 +================================================================================ +**rsync**是一个十分有用,而且十分流行的linux工具。它用于备份和恢复文件,也用于对比和同步文件。我们已经在前面的文章讲述了[Linux中rsync命令的使用实例][1],而今天我们将增加一些更为有用的rsync使用技巧。 + +### 排除文件和目录列表 ### + +有时候,当我们做大量同步的时候,我们可能想要从同步的文件和目录中排除一个文件和目录的列表。一般来说,像不能被同步的设备文件和某些系统文件,或者像临时文件或者缓存文件这类占据不必要磁盘空间的文件,这类文件时我们需要排除的。 + +首先,让我们创建一个名为“excluded”的文件(当然,你想取什么名都可以),然后将我们想要排除的文件夹或文件写入该文件,一行一个。在我们的例子中,如果你想要对根分区进行完整的备份,你应该排除一些在启动时创建的设备目录和放置临时文件的目录,列表看起来像下面这样: + +![rsync excluded](http://blog.linoxide.com/wp-content/uploads/2014/10/rsync-excluded.jpg) + +然后,你可以运行以下命令来备份系统: + + $ sudo rsync -aAXhv --exclude-from=excluded / /mnt/backup + +![rsync exclude file](http://blog.linoxide.com/wp-content/uploads/2014/10/rsync-exclude-file.jpg) + +### 从命令行排除文件 ### + +你也可以从命令行直接排除文件,该方法在你要排除的文件数量较少,并且在你想要将它写成脚本或加到crontab中又不想脚本或cron依赖于另外一个文件运行时十分有用。 +For example if you wish to sync /var to a backup directory but you don't wish to include cache and tmp folder that usualy don't hold important content between restarts you can use the following command: +例如,如果你想要同步/var到一个备份目录,但是你不想要包含cache和tmp这些通常不会有重要内容的文件夹,你可以使用以下命令: + + $ sudo rsync -aAXhv --exclude={"/var/cache","/var/tmp"} /var /home/adrian/var + +![rsync exclude](http://blog.linoxide.com/wp-content/uploads/2014/10/rsync-exclude.jpg) + +该命令易于在脚本或cron中使用,也不会依赖其它文件。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/exclude-files-rsync-examples/ + +作者:[Adrian Dinu][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/adriand/ +[1]:http://linoxide.com/how-tos/rsync-copy/ From 4f077c7c50245184e52de3fd73408fbbb3e545c7 Mon Sep 17 00:00:00 2001 From: ThomazL Date: Mon, 3 Nov 2014 11:41:30 +0800 Subject: [PATCH 088/316] translated by ThomazL --- ... Scripting--Checking Conditions with if.md | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) rename {sources => translated}/tech/20141029 Shell Scripting--Checking Conditions with if.md (60%) diff --git a/sources/tech/20141029 Shell Scripting--Checking Conditions with if.md b/translated/tech/20141029 Shell Scripting--Checking Conditions with if.md similarity index 60% rename from sources/tech/20141029 Shell Scripting--Checking Conditions with if.md rename to translated/tech/20141029 Shell Scripting--Checking Conditions with if.md index bcd368b908..4f2eb787de 100644 --- a/sources/tech/20141029 Shell Scripting--Checking Conditions with if.md +++ b/translated/tech/20141029 Shell Scripting--Checking Conditions with if.md @@ -1,11 +1,10 @@ ->>> Translating by ThomazL -Shell Scripting – Checking Conditions with if +Shell 脚本 - 使用 if 语句进行条件检测 ================================================================================ -In Bourne Shell if statement checks whether a condition is true or not. If so , the shell executes the block of code associated with the if statement. If the statement is not true , the shell jumps beyond the end of the if statement block & Continues on. +[Bourne Shell](http://en.wikipedia.org/wiki/Bourne_shell) 的 if 语句和大部分编程语言一样 - 检测条件是否真实,如果条件为真,shell 会执行这个 if 语句指定的代码块,如果条件为假,shell 就会跳过 if 代码块,继续执行之后的代码。 -### Syntax of if Statement : ### +### if 语句的语法: ### - if [ condition_command ] + if [ 判断条件 ] then command1 command2 @@ -22,13 +21,13 @@ In Bourne Shell if statement checks whether a condition is true or not. If so , echo "Number is 150" fi -#### if-else Statement : #### +#### if-else 语句: #### -In addition to the normal if statement , we can extend the if statement with an else block. The basic idea is that if the statement is true , then execute the if block. If the statement is false , then execute the else block. +除了标准的 if 语句之外,我们还可以加入 else 代码块来扩展 if 语句。这么做的主要目的是:如果 if 条件为真,执行 if 语句里的代码块,如果 if 条件为假,执行 else 语句里的代码块。 -#### Syntax : #### +#### 语法: #### - if [ condition_command ] + if [ 判断条件 ] then command1 command2 @@ -52,19 +51,19 @@ In addition to the normal if statement , we can extend the if statement with an echo "Number is smaller" fi -### If..elif..else..fi Statement (Short for else if) ### +### If..elif..else..fi 语句 (Short for else if) ### -The Bourne shell syntax for the if statement allows an else block that gets executed if the test is not true. We can nest if statement , allowing for multiple conditions. As an alternative, we can use the elif construct , shot for else if. +Bourne Shell 的 if 语句语法中,else 语句里的代码块会在 if 条件为假时执行。我们还可以将 if 语句嵌套到一起,来实现多重条件的检测。我们可以使用 elif 语句(else if 的缩写)来构建多重条件的检测。 -#### Syntax : #### +#### 语法 : #### - if [ condition_command ] + if [ 判断条件1 ] then command1 command2 …….. last_command - elif [ condition_command2 ] + elif [ 判断条件2 ] then command1 command2 @@ -91,20 +90,20 @@ The Bourne shell syntax for the if statement allows an else block that gets exec echo "Number is equal to actual value" fi -### Nested if statements : ### +### 多重 if 语句 : ### -If statement and else statement can be nested in a bash script. The keyword ‘fi’ shows the end of the inner if statement and all if statement should end with the keyword ‘fi’. +If 和 else 语句可以在一个 bash 脚本里相互嵌套。关键词 “fi” 表示里层 if 语句的结束,所有 if 语句必须使用 关键词 “fi” 来结束。 -Basic **syntax of nested** if is shown below : +基本 if 语句的 **嵌套语法**: - if [ condition_command ] + if [ 判断条件1 ] then command1 command2 …….. last_command else - if [ condition_command2 ] + if [ 判断条件2 ] then command1 command2 @@ -139,7 +138,7 @@ Basic **syntax of nested** if is shown below : via: http://www.linuxtechi.com/shell-scripting-checking-conditions-with-if/ 作者:[Pradeep Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ThomazL](https://github.com/ThomazL) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 177c92db73c22fd685f21d6f8434a1ab4fcdc875 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 3 Nov 2014 16:46:01 +0800 Subject: [PATCH 089/316] =?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 --- .../20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {translated/tech => published}/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md (94%) diff --git a/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md b/published/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md similarity index 94% rename from translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md rename to published/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md index 0283522090..4059bbcf00 100644 --- a/translated/tech/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md +++ b/published/20141024 How To Upgrade Ubuntu 14.04 To Ubuntu 14.10.md @@ -2,7 +2,7 @@ ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/04/Ubuntu_Unicorn_Utopia.jpeg) -Ubuntu 14.10已于前段时间发布。想知道**如何从 Ubuntu 14.04 升级到 Ubuntu 14.10 **么?别担心,这很容易做到。事实上,只要网络连接速度好,升级只是点击几下鼠标的事情而已。 +Ubuntu 14.10已于前段时间发布。想知道**如何从 Ubuntu 14.04 升级到 Ubuntu 14.10**么?别担心,这很容易做到。事实上,只要网络连接速度好,升级只是点击几下鼠标的事情而已。 ### 你需要从 Ubuntu 14.04 切换到 Ubuntu 14.10 么? ### From eac40431531a86afed1cde5484375004e80aa5a0 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 3 Nov 2014 17:53:51 +0800 Subject: [PATCH 090/316] Update 20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md --- ... Disk Problmes Like Disk Full Or Can't Write to the Disk.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md index 1fbed0ced1..7a34bb7197 100644 --- a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md +++ b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ 8 Tips to Solve Linux & Unix Systems Hard Disk Problmes Like Disk Full Or Can’t Write to the Disk ================================================================================ Can't write to the hard disk on a Linux or Unix-like systems? Want to diagnose corrupt disk issues on a server? Want to find out why you are getting "disk full" messages on screen? Want to learn how to solve full/corrupt and failed disk issues. Try these eight tips to diagnose a Linux and Unix server hard disk drive problems. @@ -285,4 +286,4 @@ via: http://www.cyberciti.biz/datacenter/linux-unix-bsd-osx-cannot-write-to-hard [26]:http://www.cyberciti.biz/tips/how-to-backup-mysql-databases-web-server-files-to-a-ftp-server-automatically.html [27]:http://www.cyberciti.biz/faq/redhat-cetos-linux-remote-backup-snapshot-server/ [28]:http://www.cyberciti.biz/faq/linux-rsnapshot-backup-howto/ -[29]:http://www.cyberciti.biz/faq/linux-tape-backup-with-mt-and-tar-command-howto/ \ No newline at end of file +[29]:http://www.cyberciti.biz/faq/linux-tape-backup-with-mt-and-tar-command-howto/ From 8d9c55d64eca86eab0eed033bfd315196ddd9b7b Mon Sep 17 00:00:00 2001 From: wangjiezhe Date: Mon, 3 Nov 2014 22:34:35 +0800 Subject: [PATCH 091/316] [translated]20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md --- ...t fast and safely from the command line.md | 68 +++++++++---------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/sources/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md b/sources/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md index e71c1a66cf..0c7f1126f5 100644 --- a/sources/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md +++ b/sources/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md @@ -1,80 +1,78 @@ -wangjiezhe translating... - -How to download an ISO image with BitTorrent fast and safely from the command line +如何使用命令行通过 BitTorrent 快速安全地下载 ISO 镜像 ================================================================================ -If you are one of those guys who have urge to try out every new (or even beta) release of Linux distribution to satisfy your curiosity and stay up-to-date, you will need to deal with the hassle of downloading big ISO images every now and then. ISO providers typically put up .torrent file of their ISO images to ease up on the bandwidth consumption of their servers. The benefit of peer-to-peer download is obvious for users as well (in terms of speed), especially when a new release of a popular Linux distribution is up for grab, and everyone is downloading and seeding the release at the same time. +如果你喜欢尝试最新版甚至是 beta 版的 Linux 发行版来满足你的好奇心,并始终保持是最新版,那么你就会时常受到下载较大的 ISO 镜像的烦恼。提供 ISO 的人通常会使用 ISO 镜像的 .torrent 文件来减少服务器的带宽消耗。P2P 下载对于使用者来说好处也是很明显的(就下载速度而言),特别是当流行的 Linux 发行版有新版本发布并上传供下载,每个人同时在下载做种的时候。 -Ubuntu 14.10 (Utopic Unicorn) was just released this week. So there should be plenty of seeds to download the release from in the BitTorrent network at the moment. While there are many GUI-based BitTorrent clients out there, I am going to show you **how to download ISO images via a simple command-line interface (CLI) BitTorrent client**, which can be handy if you are on a remote headless server. Later in this tutorial, I will also demonstrate **how to verify the integrity of a downloaded ISO image**. +Ubuntu 14.10 (utopic Unicorn) 这周刚刚发布。因此现在在 BitTorrent 网络上应该有很多种子可以下载该版本。虽然有很多基于图形界面的 BitTorrent 客户端,我将展示**如何通过基于简单的命令行界面的 BitTorrent 客户端下载 ISO 镜像**,如果是在远程无图形界面的服务器上的话这会很方便。在这片教程靠后的部分,我还会演示**如何验证已下载的 ISO 镜像的完整性**。 -The CLI BitTorrent client I am going to use today is transmission-cli. As you may know, [Transmission][1] is one of the most popular GUI-based BitTorrent client. transmission-cli is its stripped-down CLI version. +我今天要使用的基于命令行的 BitTorrent 客户端是 transmission-cli。正如你可能知道的那样,[Transmission][1] 是最流行的基于图形界面的 BitTorrent 客户端之一。transmission-cli 是它的简装的命令行版本。 -### Install Transmission-cli on Linux ### +### 在 Linux 上安装 Transmission-cli ### -To install **transmission-cli**, you don't need to install a full-blown GUI-based Transmission, which is nice. +要安装 **transmission-cli**,你不必安装完整的基于图形界面的 Transmission,这是一个很好的消息。 -On Debian, Ubuntu or their derivatives: +在 Debian、Ubuntu 或者是基于它们的发行版上: $ sudo apt-get install transmission-cli -On Fedora: +在 Fedora 上: $ sudo yum install transmission-cli -On CentOS or RHEL (after enabling [EPEL repository][2]): +在 CentOS 或者 RHEL 上(在安装了 [EPEL 仓库][2]之后): $ sudo yum install transmission-cli -### Download an ISO Image Fast with transmission-cli ### +### 通过 transmission-cli 快速地下载 ISO 镜像 ### -**transmission-cli** is really simple to use. If you are too lazy to study its command line options, all you have to do is to download .torrent file, and launch the command with the torrent file. It will automatically look for available peers, and download an ISO file from them. +**transmission-cli**的使用非常简单。如果你懒于学习它的命令行选项,所有你要做的事情就是下载 .torrent 文件并运行命令。这会自动寻找可用的种子并从那里下载 ISO 文件。 $ wget http://releases.ubuntu.com/14.10/ubuntu-14.10-desktop-amd64.iso.torrent $ transmission-cli ubuntu-14.10-desktop-amd64.iso.torrent ![](https://farm4.staticflickr.com/3933/14999528344_9af3ea5d2e_z.jpg) -Once an ISO image is fully downloaded, it will be stored in ~/Downloads directory by default. It took me only 5 minutes to download 1GB Ubuntu ISO image. +一旦 ISO 镜像下载完成,它默认存储在 ~/Downloads 文件夹中。下载 1GB 的 Ubuntu ISO 镜像只用了我 5 分钟的时间。 ![](https://farm6.staticflickr.com/5605/15433651319_745df6633a_z.jpg) -Once it finishes downloading an ISO image, you will see the message "State changed from Incomplete to Complete" in the console. Note that transmission-cli will continue to run afterwards, becoming a seed for other downloaders. Press Ctrl+C to quit. +程序下载 ISO 镜像完成后,你会在终端中看到“状态由未完成变为完成”的提示。要注意的是 transmission-cli 会继续运行并做种以便于其他下载者下载。按 Ctrl+C 来退出。 -### Customize Download Options for Repeat Use ### +### 为重复使用定制下载选项 ### -If you are a repeat user of **transmission-cli**, it may be worth your time to be familiar with some of its command line options. +如果你是 **transmission-cli** 的重复使用者,那么值得花时间来熟悉一下它的命令行选项。 -The "-w /path/to/download-directory" option specifies the directory where a downloaded file will be saved. +"-w /path/to/download-directory" 选项指定下载文件保存的文件夹。 -The "-f /path/to/finish-script" option sets a script to run when current download is completed. Recall that transmission-cli, by default, continues running even after a file is fully downloaded. If you want to auto-terminate transmission-cli upon successful download, you can use this option. The following simple finish script will do. +"-f /path/to/finish-script" 选项设置当前下载完成后要运行的脚本。注意 transmission-cli 默认在文件下载完成后继续运行。如果你想在成功下载完成后自动关闭 transmission-cli,你可以使用这个选项。下面这个简单的脚本可以完成这个功能。 #!/bin/sh sleep 10 killall transmission-cli -If you want to allocate limited upload/download bandwidth to transmission-cli, you can use "-d and "-u options. If you want to allow unlimited bandwidth instead, simply specify "-D" or "-U" option without any value. +如果你想为 transmission-cli 分配上传/下载带宽限制,你可以使用 “-d ” 和 “-u ” 选项。如果你不想限制带宽使用,仅仅指定 “D” 或 “-U” 选项即可。 -Here is a more advanced usage example of transmission-cli. In this example, the CLI client will automatically exit upon successful download. Download rate is unlimited while upload rate is capped at 50KB/s. +这有一个更高级的 transmission-cli 使用范例。在这个例子中,命令行客户端在成功下载后自动退出。下载速度不限而上传速度限制为 50KB/s。 $ transmission-cli -w ~/iso -D -u 50 -f ~/finish.sh ubuntu-14.10-desktop-amd64.iso.torrent ![](https://farm6.staticflickr.com/5599/15434697690_e9a19f0d97_z.jpg) -### Verify the Integrity of a Downloaded ISO Image ### +### 验证已下载的 ISO 镜像的完整性 ### -When you download an ISO image, especially from many unknown peers in the BitTorrent network, it is always recommended to verify the integrity of the downloaded image. +当你下载了一个 ISO 镜像,特别是从 BitTorrent 网络上很多未知的种子处下载的,通常建议要验证下载镜像的完整性。 -In case of Ubuntu releases, Canonical provides several checksum files (e.g., MD5SUM, SHA1SUMS and SHA256SUMS) for verification purpose. Let's use SHA256SUMS in this example. +对于 Ubuntu 发行版的情况, Canonical 提供了几个供验证使用的验校文件(如 MD5SUM, SHA1SUMS 和 SHA256SUMS)。在这个例子中我们使用 SHA256SUMS。 ![](https://farm4.staticflickr.com/3943/15434697700_3b3e6077ee_z.jpg) -First, download the following two files. +首先,下载下面两个文件。 $ wget http://releases.ubuntu.com/14.10/SHA256SUMS $ wget http://releases.ubuntu.com/14.10/SHA256SUMS.gpg -The first file is a SHA256 checksum file for ISO images, while the second file (*.gpg) is a signature of the checksum file. The purpose of the second file is to verify the validity of the checksum file itself. +第一个文件是 ISO 镜像的 SHA256 验校文件,而第二个文件(*.gpg)是验校文件的签名。第二个文件的目的是验证验校文件本身的有效性。 -Let's verify the validity of SHA256SUMS file by running this command: +我们通过运行下面的命令来验证 SHA256SUMS 文件的有效性。 $ gpg --verify SHA256SUMS.gpg SHA256SUMS @@ -83,25 +81,25 @@ Let's verify the validity of SHA256SUMS file by running this command: gpg: Signature made Thu 23 Oct 2014 09:36:00 AM EDT using DSA key ID FBB75451 gpg: Can't check signature: public key not found -If you are getting the above error, this is because you have not imported the public key used to generate the signature. So now let's import the required public key. +如果你得到上面的错误信息,是因为你还没有导入生成这个签名的公共密钥。因此我们现在导入需要的公共密钥。 -To do that, you need to know the "key ID" of the public key, which is shown in the output of gpg command above. In this example, the key ID is "FBB75451". Run the following command to import the public key from the official Ubuntu keyserver. +这样做之前,你需要知道公共密钥的 “key ID”,而这在上面的 gpg 命令的输出中有显示。在这个例子中,密钥 ID 时 “FBB75451”。运行下面的命令来从官方 Ubuntu 密钥服务器导入公共密钥。 $ gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys FBB75451 ![](https://farm4.staticflickr.com/3953/15620291035_bcdb3cffb9_z.jpg) -Now that the public key has been imported, go ahead and re-run the previous command to verify the signature. +既然公共密钥已经被导入,我们可以继续并重新运行之前的命令来验证签名。 gpg --verify SHA256SUMS.gpg SHA256SUMS ![](https://farm6.staticflickr.com/5600/15433651369_d22905e65b_z.jpg) -This time you will not see "public key not found" error. If the SHA256SUMS file is valid, you will see "Good signature from " message. Note that you will also see a warning message saying that "This key is not certified with a trusted signature". Basically this warning message is telling you that you have not [assigned any explicit trust][3] to the imported public key. To avoid this warning, you could choose to assign your full trust to the imported public key, but you should do that only after the key has been fully vetted in some other means. Otherwise, you can ignore the warning for now. +这次你没有看到 “public key not found” 的错误信息。如果 SHA256SUMS 文件时有效的,你会看到 “Good signature from ” 的信息。注意到你还看到一个 “This key is not certified with a trusted signature” 的警告信息。基本上这个警告信息时告诉你对导入的公共密钥[指定任何明确的信任][3]。要避免这个警告,你可以选择指定完全信任导入的公共密钥,但你应该只有在通过其他方式审查了这个密钥之后才这样做。否则的话,你可以暂时忽略这个警告。 -After verifying the integrity of SHA256SUMS file, the final last step is to compare the SHA256 checksum of the downloade ISO image against the corresponding checksum value in SHA256SUMS file. For that you can use sha256sum command line tool. +在验证了 SHA256SUMS 文件的完整性后,最后一个步骤是比较已下载 ISO 文件的 SHA256 验校和和 SHA256SUMS 文件中对应的验校值。你可以使用 sha256sum 命令行工具来完成这个步骤。 -For your convenience, the following one-liner compares the SHA256 checksums and reports the result. +为方便起见,下面一行命令比较 SHA256 验校和并报告结果。 $ sha256sum -c <(grep ubuntu-14.10-desktop-amd64.iso SHA256SUMS) @@ -109,14 +107,14 @@ For your convenience, the following one-liner compares the SHA256 checksums and ubuntu-14.10-desktop-amd64.iso: OK -If you see the above output, that means that two checksum values match. So the integrity of the downloaded ISO image has been successfully verified. +如果你看到了上面的输出信息,这表明两个验校值相匹配。这样已下载 ISO 镜像的完整性就被成功的验证了。 -------------------------------------------------------------------------------- via: http://xmodulo.com/download-iso-image-bittorrent-command-line.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[wangjiezhe](https://github.com/wangjiezhe) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 0ba5087b70780030573a144094e5477484f9cd1a Mon Sep 17 00:00:00 2001 From: wangjiezhe Date: Mon, 3 Nov 2014 22:35:25 +0800 Subject: [PATCH 092/316] moved to translated --- ...image with BitTorrent fast and safely from the command line.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md (100%) diff --git a/sources/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md b/translated/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md similarity index 100% rename from sources/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md rename to translated/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md From bb22fac27f62786994d1c96b3a8c99f24be9d308 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 3 Nov 2014 23:13:23 +0800 Subject: [PATCH 093/316] =?UTF-8?q?=E6=B8=85=E7=90=86=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 --- ...Microsoft loves Linux--for Azure's sake.md | 64 ------ ...Ubuntu 15.04--And It’s Not Velociraptor.md | 28 --- ...021 Ubuntu 15.04 Is Called Vivid Vervet.md | 34 ---- ...mes You'll Want to Play Again and Again.md | 190 ------------------ ...se Steam Music Player on Ubuntu Desktop.md | 1 - ...x Administration--A Smart Career Choice.md | 41 ---- ...d Give a Fatal Blow to Windows in China.md | 0 ...l Google Docs on Linux with Grive Tools.md | 141 ------------- ...rotect your Unix, Linux and Mac servers.md | 101 ---------- 9 files changed, 600 deletions(-) delete mode 100644 sources/news/20141021 Microsoft loves Linux--for Azure's sake.md delete mode 100644 sources/news/20141021 This is the name of Ubuntu 15.04--And It’s Not Velociraptor.md delete mode 100644 sources/news/20141021 Ubuntu 15.04 Is Called Vivid Vervet.md delete mode 100644 sources/share/20140623 9 ASCII Games You'll Want to Play Again and Again.md rename sources/{news => share}/20141008 How To Use Steam Music Player on Ubuntu Desktop.md (99%) delete mode 100644 sources/talk/20140626 Linux Administration--A Smart Career Choice.md rename sources/{news => talk}/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md (100%) delete mode 100644 sources/tech/20140724 Install Google Docs on Linux with Grive Tools.md delete mode 100644 sources/tech/20140929 Shellshock--How to protect your Unix, Linux and Mac servers.md diff --git a/sources/news/20141021 Microsoft loves Linux--for Azure's sake.md b/sources/news/20141021 Microsoft loves Linux--for Azure's sake.md deleted file mode 100644 index 4152f4219e..0000000000 --- a/sources/news/20141021 Microsoft loves Linux--for Azure's sake.md +++ /dev/null @@ -1,64 +0,0 @@ -Microsoft loves Linux -- for Azure's sake -================================================================================ -![](http://images.techhive.com/images/article/2014/10/microsoft_guthrie_azure-100525983-primary.idge.jpg) - -Scott Guthrie, executive vice president, Microsoft Cloud and Enterprise group, shows how Microsoft differentiates Azure. Credit: James Niccolai/IDG News Service - -### Microsoft adds CoreOS and Cloudera to its growing set of Azure services ### - -Microsoft now loves Linux. - -This was the message from Microsoft CEO Satya Nadella, standing in front of an image that read "Microsoft [heart symbol] Linux," during a Monday webcast to announce a number of services it had added to its Azure cloud, including the Cloudera Hadoop package and the CoreOS Linux distribution. - -In addition, the company launched a marketplace portal, now in preview mode, designed to make it easier for customers to procure and manage their cloud operations. - -Microsoft is also planning to release an Azure appliance, in conjunction with Dell, that will allow organizations to run hybrid clouds where they can easily move operations between Microsoft's Azure cloud and their own in-house version. - -The declaration of affection for Linux indicates a growing acceptance of software that wasn't created at Microsoft, at least for the sake of making its Azure cloud platform as comprehensive as possible. - -For decades, the company tied most of its new products and innovations to its Windows platform, and saw other OSes, such as Linux, as a competitive threat. Former CEO Steve Ballmer [once infamously called Linux a cancer][1]. - -This animosity may be evaporating as Microsoft is finding that customers want cloud services that incorporate software from other sources in addition to Microsoft. About 20 percent of the workloads run on Azure are based on Linux, Nadella admitted. - -Now, the company considers its newest competitors to be the cloud services offered by Amazon and Google. - -Nadella said that by early 2015, Azure will be operational in 19 regions around the world, which will provide more local coverage than either Google or Amazon. - -He also noted that the company is investing more than $4.5 billion in data centers, which by Microsoft's estimation is twice as much as Amazon's investments and six times as much as Google's. - -To compete, Microsoft has been adding widely-used third party software packages to Azure at a rapid clip. Nadella noted that Azure now supports all the major data integration stacks, such as those from Oracle and IBM, as well as major new entrants such as MongoDB and Hadoop. - -The results seem to be paying off. Today Azure is generating about $4.48 billion in annual revenue for Microsoft, and we are "still at the early days," of cloud computing, Nadella said. - -The service attracts about 10,000 new customers per week. About 2 million developers have signed on to Visual studio online since its launch. The service runs about 1.2 million SQL databases. - -CoreOS is now actually the fifth Linux distribution that Azure offers, joining Ubuntu, CentOS, OpenSuse, and Oracle Linux (a variant of Red Hat Enterprise Linux). Customers [can also package their own Linux distributions][2] to run in Azure. - -CoreOS was developed as [a lightweight Linux distribution][3] to be used primarily in cloud environments. Officially launched in December, CoreOS is already offered as a service by Google, Rackspace, DigitalOcean and others. - -Cloudera is the second Hadoop distribution offered on Azure, following Hortonworks. Cloudera CEO Mike Olson joined the Microsoft executives onstage to demonstrate how easily one can use the Cloudera Hadoop software within Azure. - -Using the new portal, Olson showed how to start up a 90-node instance of Cloudera with a few clicks. Such a deployment can be connected to an Excel spreadsheet, where the user can query the dataset using natural language. - -Microsoft also announced a number of other services and products. - -Azure will have a new type of virtual machine, which is being called the "G Family." These virtual machines can have up to 32 CPU cores, 450GB of working memory and 6.5TB of storage, making it in effect "the largest virtual machine in the cloud," said Scott Guthrie, who is the Microsoft executive vice president overseeing Azure. - -This family of virtual machines is equipped to handle the much larger workloads Microsoft is anticipating its customers will want to run. It has also upped the amount of storage each virtual machine can access, to 32TB. - -The new cloud platform appliance, available in November, will allow customers to run Azure services on-premise, which can provide a way to bridge their on-premise and cloud operations. One early customer, integrator General Dynamics, plans to use this technology to help its U.S. government customers migrate to the cloud. - --------------------------------------------------------------------------------- - -via: http://www.computerworld.com/article/2836315/microsoft-loves-linux-for-azures-sake.html - -作者:[Joab Jackson][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.computerworld.com/author/Joab-Jackson/ -[1]:http://www.theregister.co.uk/2001/06/02/ballmer_linux_is_a_cancer/ -[2]:http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-create-upload-vhd/ -[3]:http://www.itworld.com/article/2696116/open-source-tools/coreos-linux-does-away-with-the-upgrade-cycle.html \ No newline at end of file diff --git a/sources/news/20141021 This is the name of Ubuntu 15.04--And It’s Not Velociraptor.md b/sources/news/20141021 This is the name of Ubuntu 15.04--And It’s Not Velociraptor.md deleted file mode 100644 index fb5d8688fb..0000000000 --- a/sources/news/20141021 This is the name of Ubuntu 15.04--And It’s Not Velociraptor.md +++ /dev/null @@ -1,28 +0,0 @@ -This is the name of Ubuntu 15.04 — And It’s Not Velociraptor -================================================================================ -**Ubuntu 14.10 may not be out of the door yet, but attention is already turning to Ubuntu 15.04. Today it got its name: ‘[Vivid Vervet][1]’.** - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/Unknown.jpg) - -Announcing the monkey-themed moniker in his usual loquacious style, Mark Shuttleworth cites the ‘upstart’ and playful nature of the mascot as in tune with its own foray into the mobile space. - -> “This is a time when every electronic thing can be an Internet thing, and that’s a chance for us to bring our platform, with its security and its long term support, to a vast and important field. In a world where almost any device can be smart, and also subverted, our shared efforts to make trusted and trustworthy systems might find fertile ground. - -Talking of plans for the release Shuttleworth states one goal is to “show the way past a simple Internet of things, to a world of Internet things-you-can-trust.” - -Ubuntu 15.04 is due for release in April 2015. It’s not expected to arrive with either Mir or Unity 8 by default, but given the veracious speed of acceleration in ambitions, it may find its way out for testing. - -Do you like the name? Were you hoping for velociraptor? - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2014/10/ubuntu-15-04-named-vivid-vervet - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.markshuttleworth.com/archives/1425 \ No newline at end of file diff --git a/sources/news/20141021 Ubuntu 15.04 Is Called Vivid Vervet.md b/sources/news/20141021 Ubuntu 15.04 Is Called Vivid Vervet.md deleted file mode 100644 index c767085a91..0000000000 --- a/sources/news/20141021 Ubuntu 15.04 Is Called Vivid Vervet.md +++ /dev/null @@ -1,34 +0,0 @@ -Ubuntu 15.04 Is Called Vivid Vervet -================================================================================ -> Mark Shuttleworth decided on the new name for Ubuntu 15.04 - -![](http://i1-news.softpedia-static.com/images/news2/Ubuntu-15-04-Is-Called-Vivid-Vervet-462621-2.jpg) - -**One of Mark Shuttleworth's privileges is to decide what the code name for upcoming Ubuntu versions is. It's usually a real animal and now it's a monkey whose name starts with V and, as usual, it's probably a species you’ve never heard of before.** - -With very few exceptions, some of the names chosen for Ubuntu releases send the older users to the Encyclopedia Britannica and the new ones to Google. Shuttleworth generally chooses animals that are less known and the names usually have something in common with the release. - -For example, Trusty Tahr, the name of Ubuntu 14.04 LTS, followed the idea of long term support for the operating system, hence the trusty adjective. Precise Pangolin did the same for Ubuntu 12.04 LTS, and so on. Intermediary releases are not all that obvious and the Ubuntu 14.10 Utopic Unicorn is proof of that. - -### Still thinking about the monkey whose name starts with a V? ### - -The way the version number is chosen is pretty clear. The first part is for the year and the second one is for the month, so Ubuntu 14.10 is actually Ubuntu 2014 October. On the other hand, the names only follow a simple rule, one adjective and one animal, so the choice is rather simple. Unlike other communities, where the designation is decided by users or at least with their participation, Ubuntu is different, although it's not a singular example. - -"Release week! Already! I wouldn't call Trusty 'vintage' just yet, but Utopic is poised to leap into the torrent stream. We've all managed to land our final touches to *buntu and are excited to bring the next wave of newness to users around the world. Glad to see the unicorn theme went down well, judging from the various desktops I see on G+." - -"In my favourite places, the smartest thing around is a particular kind of monkey. Vexatious at times, volant and vogie at others, a vervet gets in anywhere and delights in teasing cats and dogs alike. As the upstart monkey in this business I can think of no better mascot. And so let's launch our vicenary cycle, our verist varlet, the Vivid Vervet!" says Mark Shuttleworth on his [blog][1]. - -So, there you have it, Ubuntu 15.04, the operating system that is scheduled to arrive in April 2015, will be called Vivid Vervet. I won't keep you anymore for details, I'm sure you are already looking up the vervet on Wikipedia. - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/Ubuntu-15-04-Is-Called-Vivid-Vervet-462621.shtml - -作者:[Silviu Stahie][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/silviu-stahie -[1]:http://www.markshuttleworth.com/archives/1425 \ No newline at end of file diff --git a/sources/share/20140623 9 ASCII Games You'll Want to Play Again and Again.md b/sources/share/20140623 9 ASCII Games You'll Want to Play Again and Again.md deleted file mode 100644 index cc1cf60b2b..0000000000 --- a/sources/share/20140623 9 ASCII Games You'll Want to Play Again and Again.md +++ /dev/null @@ -1,190 +0,0 @@ -9 ASCII Games You'll Want to Play Again and Again -================================================================================ -Modern Graphics Processing Units (GPUs) offer exceptional gaming capabilities, and have contributed to the trend of astonishing leaps in graphics fidelity. There is not a year that has gone by without a game being released that makes significant advances in technical graphics wizardry. Computer graphics have been advancing at a staggering pace. At the current rate of progress, in the next 10 years it may not be possible to distinguish computer graphics from reality. - -Personally, these developments do not overly interest me. I find little fascination playing games that focus so much on the visuals they neglect the essential elements. Too often the storyline and game play has been compromised for visual quality. Most of my favourite games are somewhat deficient in the graphics department. Gameplay is always king in my eyes. - -Linux has an excellent library of free games many of which are released under an open source license. The vast majority of these games are aesthetically pleasing. Popular games often have full motion video, vector graphics, 3D graphics, realistic 3D rendering, animation, texturing, a physics engine, and much more. Early computer games did not have these graphic techniques. The earliest video games were text games or text-based games that used text characters rather than vector or bitmapped graphics. - -Text-based games often receive little coverage in the Linux press. However, there are some real ASCII gems out there waiting to be explored which are immensely addictive and great fun to play. - -The idiom 'don't judge a book by its cover' can be extended to 'don't judge a computer game by its graphics'. Whilst the games featured in this article have extremely basic graphics, they have many redeeming qualities beyond evoking fond memories of the early days of computer gaming. - -There are no fancy graphics here, just great gameplay coupled with the urge of always having just one more play. - -![](http://www.linuxlinks.com/portal/content2/png/UnNetHack.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-UnNetHack.png) - -The first game in this roundup is UnNetHack, a fork of NetHack, originally based on the hugely popular roguelike game NetHack. NetHack was first released in 1987, and is considered by many gamers to be one of the best gaming experiences the computing world offers. - -UnNetHack adds a number of enhancements to NetHack, such as additional monsters, more levels, a few new objects, additional dangers, more challenging gameplay, and most importantly more entertainment than vanilla NetHack. It offers a tutorial to help new players get started. - -Be warned, UnNetHack is fiendishly addictive. - -- Website: [sourceforge.net/apps/trac/unnethack][1] -- Authors: Patric Mueller -- License: Nethack General Public License -- Version Number: 5.1.0 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/VMSEmpire.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-vms-empire.png) - -Empire is a simulation of a full-scale war between two emperors, the computer and you. Naturally, there is only room for one, so the object of the game is to destroy the other. The computer plays by the same rules that you do. - -This game is the ancestor of all the multiplayer 4X simulations out there, including Civilization and Master of Orion. The classic game from the 1980s uses text mode graphical output, drawing your units, cities and the world in color. Commands are issued using the keyboard. - -The world on which the game takes place is a square rectangle containing cities, land, and water. Cities are used to build armies, planes, and ships which can move across the world destroying enemy pieces, exploring, and capturing more cities. The objective of the game is to destroy all the enemy pieces, and capture all the cities. - -The game starts by assigning you one city and the computer one city. Cities can produce new pieces. Every city that you own produces more pieces for you according to the cost of the desired piece. The typical play of the game is to issue the Automove command until you decide to do something special. During movement in each round, the player is prompted to move each piece that does not otherwise have an assigned function. - -- Website: [www.catb.org/~esr/vms-empire][2] -- Authors: Chuck Simmons, Eric S. Raymond -- License: GNU GPL v2 -- Version Number: 1.12 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/Intricacy.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Intricacy.png) - -Intricacy is an addictive, open source, networked, video puzzle game. It is written in Haskell, using the Curses and SDL libraries. - -Intricacy runs directly from the command-line, and provides a turn-based, abstract puzzle game where the players need to pick locks, simply by coordinating a couple of tools in order to manipulate the lock’s mechanism. Constructing and solving difficult puzzles within certain strict design constraints is both challenging and good fun. - -The catch is that you will be able to pick locks that are designed by other players. It has multi-platform support, with binaries for both Linux and Windows. - -- Website: [mbays.freeshell.org/intricacy][3] -- Authors: Chuck Simmons, Eric S. Raymond -- License: GNU GPL v3 -- Version Number: 0.2.6.3 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/XorCurses.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-XorCurses.png) - -XorCurses is a puzzle game set inside a series of mazes. It is a remake of XOR by Astral Software, a game published in 1987 and released on the popular home computers of the day including the Commodore 64, ZX Spectrum, Atari ST, and Amiga. XOR is a pure puzzle game with no random or arcade elements. - -In some respects, XorCurses is a regression from the graphics of the old 8 bit computers as it uses even more simplistic graphics, with coloured ASCII characters instead of pixel based graphics. - -XorCurses attempts to faithfully recreate that game for Linux, with particular attention placed on the behaviour of the objects within the original game. - -The basic premise of Xor is to roam around a series of mazes collecting all of the blue masks and then finding the exit. You have two player-shields to aid you and you can use either one at any time and switch between them. The first few levels are easy to progress, but the rest are progressively harder to solve. A particularly challenging and difficult puzzle game that will keep you engaged for hours. - -- Website: [www.jwm-art.net/dark.php?p=XorCurses][4] -- Authors: James W. Morris -- License: GNU GPL -- Version Number: 0.2.2 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/GoblinHack.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-GoblinHack.png) - -Goblin Hack is an open source roguelike OpenGL-based smooth-scrolling ASCII graphics game. The game is inspired by the likes of NetHack, but faster with fewer keys. - -Goblin Hack has a simple interface that appears to appeal to players of all ages, and fires their imagination in today's world of over-rendered games. - -Players can choose one of several classes before being thrown into the first floor of a randomized, ongoing dungeon. - -- Website: [goblinhack.sourceforge.net][5] -- Authors: Neil McGill -- License: GNU GPL v2 -- Version Number: 1.18 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/CurseofWar.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-CurseofWar.png) - -Curse of War is a fast-paced real time strategy game released under an open source license. It is implemented using C and ncurses. There is also an SDL version available. - -The core game mechanics turns out to be quite close to WWI-WWII type of warfare, however, there is no explicit reference to any historical period. - -Unlike most real time strategy games, in Curse of War players do not control units, but instead they concentrate on high-level strategic planning: Building infrastructure, securing resources, and moving armies. - -A multiplayer mode is available. Computer opponents differ in personality, and it affects the way they fight. - -- Website: [a-nikolaev.github.io/curseofwar][6] -- Authors: Alexey Nikolaev -- License: GNU GPL v3 -- Version Number: 1.2.0 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/Brogue.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Brogue.png) - -Brogue is an open source Roguelike game for Mac OS X, Windows, Linux, iOS and Android. - -Brogue is a direct descendant of Rogue, a dungeon crawling video game first developed by Michael Toy and Glenn Wichman around 1980. Unlike other popular modern roguelikes, Brogue favors simplicity over complexity, while trying to ensure that the interactions between components are interesting and varied. - -Your goal is to travel to the 26th subterranean floor of the dungeon, retrieve the Amulet of Yendor and return with it to the surface. For the truly skillful who desire further challenge, depths below 26 contain three lumenstones each, items which confer an increased score upon victory. - -Brogue is a challenging game, but still great fun to play. Try not to be disheartened by the difficulty of the game; with some application, Brogue will become very addictive. - -- Website: [sites.google.com/site/broguegame][7] -- Authors: Brian Walker -- License: GNU Affero GPL -- Version Number: 1.7.3 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/DiabloRL.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-DiabloRL.png) - -DiabloRL is a roguelike "unmake" of the popular Blizzard game Diablo 1 classic RPG to a turn-based ASCII roguelike. - -The game was created for the 7 Day Roguelike Competition, but has since been expanded with magic items, spells, more classes and levels, as well as fast travelling to known locations, and high scores. - -DiabloRL gives you a choice of classes, the Warrior, Rogue, or Sorcerer. Each of these has different starting and maximum stats, as well as completely different play styles. - -- Website: [diablo.chaosforge.org][8] -- Authors: Kornel Kisielewicz, Chris Johnson and Mel'nikova Anastasia -- License: GNU GPL -- Version Number: 0.5.0 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/CataclysmDarkDaysAhead.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Cataclysm.png) - -Cataclysm is an open source post-apocalyptic roguelike, set in the countryside of fictional New England after a devastating plague of monsters and zombies. It is a continuation of Whale's original Cataclysm, which expands it with numerous new creatures, buildings, gameplay mechanics and many other features. - -While some have described it as a "zombie game", there's far more to Cataclysm than that. Struggle to survive in a harsh, persistent, procedurally generated world. Scavenge the remnants of a dead civilization for for food, equipment, or, if you're lucky, a vehicle with a full tank of gas to get you the hell out of Dodge. Fight to defeat or escape from a wide variety of powerful monstrosities, from zombies to giant insects to killer robots and things far stranger and deadlier, and against the others like yourself, that want what you have... - -Cataclysm is very different from most roguelikes in many ways. Rather than being set in a vertical, linear dungeon, it is set in an unbounded, 3D world. This means that exploration plays a much bigger role than in most roguelikes, and the game is much less linear. As the map is so huge, it is actually completely persistant between games. If you die, and start a new character, your new game will be set in the same game world as your last. Like in many roguelikes, you will be able to loot the dead bodies of previous characters; unlike most roguelikes, you will also be able to retrace their steps completely, and any dramatic changes made to the world will persist into your next game. - -- Website: [en.cataclysmdda.com][9] -- Authors: Kevin Granade -- License: Creative Commons Attribution-ShareAlike 3.0 Unported License -- Version Number: 0.A - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20140621060017503/9ASCIIGames.html - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://sourceforge.net/apps/trac/unnethack/ -[2]:http://www.catb.org/~esr/vms-empire/ -[3]:http://mbays.freeshell.org/intricacy/ -[4]:http://www.jwm-art.net/dark.php?p=XorCurses -[5]:http://goblinhack.sourceforge.net/ -[6]:http://a-nikolaev.github.io/curseofwar/ -[7]:https://sites.google.com/site/broguegame/ -[8]:http://diablo.chaosforge.org/ -[9]:http://en.cataclysmdda.com/ \ No newline at end of file diff --git a/sources/news/20141008 How To Use Steam Music Player on Ubuntu Desktop.md b/sources/share/20141008 How To Use Steam Music Player on Ubuntu Desktop.md similarity index 99% rename from sources/news/20141008 How To Use Steam Music Player on Ubuntu Desktop.md rename to sources/share/20141008 How To Use Steam Music Player on Ubuntu Desktop.md index 5e21453a88..127d5f8dad 100644 --- a/sources/news/20141008 How To Use Steam Music Player on Ubuntu Desktop.md +++ b/sources/share/20141008 How To Use Steam Music Player on Ubuntu Desktop.md @@ -1,4 +1,3 @@ -Translating by instdio How To Use Steam Music Player on Ubuntu Desktop ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/steam-music.jpg) diff --git a/sources/talk/20140626 Linux Administration--A Smart Career Choice.md b/sources/talk/20140626 Linux Administration--A Smart Career Choice.md deleted file mode 100644 index 924056cdd1..0000000000 --- a/sources/talk/20140626 Linux Administration--A Smart Career Choice.md +++ /dev/null @@ -1,41 +0,0 @@ -Linux Administration: A Smart Career Choice -================================================================================ -![](http://www.opensourceforu.com/wp-content/uploads/2014/04/linux.jpeg) - -> This is a good year for IT professionals with a number of new jobs in emerging technologies like Big Data and Analytics, and Social Mobile Analytics and Cloud (SMAC) as employers look to strengthen their technological force. - -If we were to believe the reports by [Dice.com][1] and Linux foundation released in mid Feb, 2014, this year will be a high octane year for Linux professionals and aspirants particularly. Thus it only makes sense to be future-ready and find out about the details of career opportunities such as that of a Linux administrator. - -Dice.com, the leading job site for tech professionals and Linux Foundation did a comprehensive survey to find out about the advantage Linux professionals have in the current technology landscape. The findings were heavily skewed in favor of those who are looking for a good job opportunity on Linux platform. - -While seventy seven percent of hiring managers surveyed consider hiring Linux talent as one of their top priorities (up from 70 percent in 2013), 64 percent of professionals chose to work with Linux owing to its ubiquitous nature in the present day technology infrastructure. More than nine in ten recruitment manager is planning to hire a Linux professional in the next six months. This demand is surely going to translate in form of a lot of interview calls from employers. Most hiring managers also agree to the fact that it is rather difficult to find experienced professionals, and those who have the right mix of skills, knowledge, certifications and experience are being aggressively recruited. - -### Why Linux administration? ### - -The findings of this report make it clear that Linux professionals are amongst the most sought after in the current tech market. However, a more interesting finding of the report is that amongst all the skills, the hiring managers are most actively seeking system administration, with 58 percent confirming they were on look out of professionals with good system administration skills. The reason is quite simple. There aren’t too many good system administrators out there, which is also driving the salaries of system admins northwards. -Getting started in Linux administration - -Armed with all this data, it wouldn’t come as surprise if you decide right away to pursue a career in Linux administration. So, how do you become a pro Linux system admin? Well, the right mix of certification, education and experience will obviously land you the perfect Linux job, but if you are clueless about a place to start, then a degree in computers is what you should be looking at. This could be B.Tech with Computer Science or IT as specialisation or Bachelors in Computer Application or even a Bachelor in Science with IT as specialisation will do. This would actually make you familiar with the various aspects of computer science as a subject, likes of programming, hardware, and software. This understanding would come handy in the advancement of your career, when you climb the next ladder through certifications. - -### Certifications ### - -It is widely believed that IT certifications do help one in career advancement. However, it ultimately boils down to selecting the right certification to gain the maximum RoI. There are many Linux based certifications, the most famous of which is Red Hat Certification Program, which teaches general Linux related skills along with specific system administration skills. - -In addition to the vendor sponsored certifications, there is a vendor-independent Linux Professional Institute Certification offered by Linux Professional Institute, a non-profit organisation based in Toronto, Canada. - -These exams can be taken by anyone irrespective of their nationalities. The LPI programs have three level hierarchies that include LPIC-1: Junior Level Linux Administration, LPIC-2: Advanced Level Linux Administration and LPIC 3: Senior Level Linux Administration. In order to be considered seriously for any system administrator job opportunity in one must possess at least one of the above described certifications. The LPI also has partnerships with SUSE, which is the vendor for a famous enterprise operating system going by the same name. CompTIA, which is a global IT certification agency also provided a Linux+ certification which was phased out after an agreement between LPI and CompTIA. - -### Salaries and Benefits ### - -The compensations for Linux administrators are generally on the higher side. As per PayScale, the annual median salary is around INR 3 lacs for entry level professionals (as updated on 27th March, 2014). With experience, there is an exponential increase in the salary levels as individuals with 5+ years of experience getting annual packages in seven figures. -Well, with the grass being greener for Linux professionals this year, you won’t get a better opportunity or time for pursuing career as a Linux system administrator. - --------------------------------------------------------------------------------- - -via: http://www.opensourceforu.com/2014/04/career-overview-linux-administrator/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://dice.com/ \ No newline at end of file diff --git a/sources/news/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md b/sources/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md similarity index 100% rename from sources/news/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md rename to sources/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md diff --git a/sources/tech/20140724 Install Google Docs on Linux with Grive Tools.md b/sources/tech/20140724 Install Google Docs on Linux with Grive Tools.md deleted file mode 100644 index 45160b49d2..0000000000 --- a/sources/tech/20140724 Install Google Docs on Linux with Grive Tools.md +++ /dev/null @@ -1,141 +0,0 @@ -Install Google Docs on Linux with Grive Tools -================================================================================ -Google Drive is two years old now and Google’s cloud storage solution seems to be still going strong thanks to its integration with Google Docs and Gmail. There’s one thing still missing though: a lack of an official Linux client. Apparently Google has had one floating around their offices for a while now, however it’s not seen the light of day on any Linux system. - -Thankfully, there is an alternative solution using Grive Tools. We’ve covered Grive once before when it was in its infancy, but it’s received a fair few upgrades since then thanks to Grive Tools and is now compatible with Fedora and OpenSUSE to cover a better selection of distros. Over the course of this tutorial, we’ll show you how to set up Grive Tools and get it syncing files to and from Google Drive on a regular basis, so your work is always perfectly backed up. With the death of Ubuntu One, it’s a great alternative to Canonical’s own cloud storage solution. - -![Accesss your backed up Linux files from anywhere with an internet connection by making use of the Drive connection](http://www.linuxuser.co.uk/wp-content/uploads/2014/07/griveanno.png) -Accesss your backed up Linux files from anywhere with an internet connection by making use of the Drive connection - -### Resources ### - -A Google account - -- [Grive Tools][1] - -### Step-by-step ### - -#### Step 01 Ubuntu repository #### - -Grive Tools is not included in Ubuntu or Ubuntu-based distros yet, so you’ll need to add a third-party repository to access it. Add this with: - - $ sudo add-apt-repository ppa:thefanclub/grive-tools - -Follow this up with the usual sudo apt-get update before we continue. - -#### Step 02 Ubuntu install #### - -After the apt-get update, Grive Tools will appear in the software centre. If you want to go there and install it you can, however as we already have a terminal open we might as well use: - - $ sudo apt-get install grive-tools - -#### Step 03 Fedora dependencies #### - -You’ll need to install some specific dependencies for OpenSUSE, Fedora and other RHEL-based distros. In Fedora specifically, open a terminal and install them with: - - $ sudo yum install json-c json-c-devel qt-devel boost-devel openssl-devel libxslt libcurl libcurl-devel - -The same packages will need to be installed on the other distros. - -#### Step 04 Grive package #### - -Grive is not in the repositories of any of -these distros, however binaries exist if you won’t want to build it from source. Go to RPMSEEK.com and search for Grive; look out for the version for your distro and download it. - -#### Step 05 Install the download #### - -Once downloaded, install the package; you can either do it graphical or install with: - - $ sudo yum install grive-tools-1.9.noarch.rpm - -After that, go to the Resources link for Grive Tools and locate the Fedora package on the website: download this binary and install it alongside Grive. - -#### Step 06 Start the setup #### - -The method to actually get Grive and Grive Tools working on both systems is basically the same, so we’ll cover both at once while mentioning any extras that need to be done for a specific distro. The first thing you’ll need to do is look for Grive Setup in your list of programs. - -#### Step 07 Log into your account #### - -If you haven’t already created a Google account, you’ll need to get one sorted now before continuing. Otherwise, click Next to bring up a browser that will point you towards Google and ask you to log in. Make sure you’re logged in to the correct email address before continuing. - -#### Step 08 Connect your account #### - -You’ll be asked if the specific info it can look at is okay – you’ll need to confirm to continue, otherwise it can’t download or sync your Drive data. It will then give you a code to paste into a pop-up that launched when the browser opened. - -#### Step 09 Code input #### - -Press Next for Grive to accept the code. It will automatically open up a new Google Drive window and show your files being synced straight to your PC. This may take a while depending on how much you have stored on your account. - -#### Step 10 Desktop notifications #### - -Once the sync is complete, search again for Grive in your programs and look for Google Drive Indicator. Click on this and it will automatically launch a Dropbox-style toolbar notifier for Google Drive. This is also similar to the kind of notifier on desktops with an official client. - -#### Step 11 Access Google Drive #### - -You can quick access the contents of your Google Drive by finding the app of the same name in your program list. It links straight to your folder for ease of access, so you can add it to favourites or quick bar if you wish. There’s also an option to open it from the notifier. - -#### Step 12 Drive options #### - -You can access syncing options from the indicator to make sure Grive works as you want it to. Access them by clicking on the toolbar icon and select preferences. A couple of options you’d probably want checked are ‘Start Drive when computer turns on’, and ‘On screen notifications’. - -#### Step 13 Auto-syncing #### - -Unlike the official clients, you cannot select which folders do and do not get synced on your client. Depending on how you plan to use it, you can turn on Auto-sync so that everything is synced up and down at all times, or you can turn it off and sync manually when everything is ready. - -#### Step 14 Large file tip #### - -Google Drive – not just Grive – always seems to have issues with uploading larger files. We suggest splitting them up into smaller files using split on a compressed file to make them all a specific size. You can do it in a terminal with: - - split -b 500m file.mp4 newfilename - -#### Step 15 File types #### - -One of the major things you may have noticed is which documents have and have not been downloaded by Grive. On the official clients, links will be added that can let you jump straight to pure Google Docs files, while files that are actually DOC, ODF or PDF will be downloaded outright to the system. Only the latter files are downloaded with Grive as they’re purely stored in the cloud on Drive. The upside is they’re properly stored locally and will still sync between the cloud and other systems. - -#### Step 16 Location #### - -Very simply, the Google Drive folder is kept in the home folder under Google Drive. If you’re using standard GNOME it’s actually opening the files in the GNOME file manager; for some reason it also does that in Unity and any non-GNOME desktop environment. - -#### Step 17 Backup to Grive #### - -One of the benefits of cloud storage for files is that the storage itself is off-site and difficult to lose. This makes it ideal for backing up other important documents and settings. The simplest and quickest way to do this is to periodically copy a file over to the Drive folder and watch it upload. - -#### Step 18 Better backup #### - -This is not the most efficient way to backup such files though; fortunately Linux comes with many tools to back up data that also includes backup scheduling thanks to cron. We’ll be using luckyBackup for this: find it in your package manager and install it. - -#### Step 19 Set up the backup #### - -Click Add to create a new task and name it however you wish. Keep the Type setting to ‘Backup Source inside Destination’, choose your Source and finally set the Destination as the Google Drive folder. Click OK to save it, followed by the checkbox next to the task to activate it. - -#### Step 20 First backup #### - -Click Run at the top to do the first backup operation. It will print out a verbose list of the files and operations and will inform you once it’s finished, along with any errors that occurred along the way. If you have automatic sync on, it will start uploading the backed up files to Drive. - -#### Step 21 Timed backup #### - -Click Done to return to the main menu. Click Profile followed by Schedule to bring up the scheduling dialog. The schedules are done by profiles, which can all contain a number of different backup tasks. Click Add to start creating a schedule for our Drive backup. - -#### Step 22 To schedule #### - -The schedule creates a cron job, so you can set it to occur on specific days of the week or specific months of the year and at what time the backup should occur. You can have it do so every hour at a specific minute past the hour if you need it to back up so frequently. - -#### Step 23 Reverse backup #### - -Google Drive helpfully keeps a record of past versions of files on its servers; however they do not extend forever. If you’re backing up or saving to the cloud you may want to consider creating a backup of the Drive files to your PC or network as well. - -#### Step 24 Driven #### - -While there are no official tools for Linux just yet, Grive and Grive Tools at least enable you to emulate what they should be relatively well. Look out for updates to Drive and Grive Tools to see if any new functions would work well for you. - --------------------------------------------------------------------------------- - -via: http://www.linuxuser.co.uk/tutorials/install-google-docs-on-linux-with-grive-tools - -原文作者:Rob Zwetsloot - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.thefanclub.co.za/ \ No newline at end of file diff --git a/sources/tech/20140929 Shellshock--How to protect your Unix, Linux and Mac servers.md b/sources/tech/20140929 Shellshock--How to protect your Unix, Linux and Mac servers.md deleted file mode 100644 index c053e6d9e9..0000000000 --- a/sources/tech/20140929 Shellshock--How to protect your Unix, Linux and Mac servers.md +++ /dev/null @@ -1,101 +0,0 @@ -luoyutiantan -Shellshock: How to protect your Unix, Linux and Mac servers -================================================================================ -> **Summary**: The Unix/Linux Bash security hole can be deadly to your servers. Here's what you need to worry about, how to see if you can be attacked, and what to do if your shields are down. - -The only thing you have to fear with [Shellshock, the Unix/Linux Bash security hole][1], is fear itself. Yes, Shellshock can serve as a highway for worms and malware to hit your Unix, Linux, and Mac servers, but you can defend against it. - -![](http://cdn-static.zdnet.com/i/r/story/70/00/034072/cybersecurity-v1-620x464.jpg?hash=BQMxZJWuZG&upscale=1) - -If you don't patch and defend yourself against Shellshock today, you may have lost control of your servers by tomorrow. - -However, Shellshock is not as bad as [HeartBleed][2]. Not yet, anyway. - -While it's true that the [Bash shell][3] is the default command interpreter on most Unix and Linux systems and all Macs — the majority of Web servers — for an attacker to get to your system, there has to be a way for him or her to actually get to the shell remotely. So, if you're running a PC without [ssh][4], [rlogin][5], or another remote desktop program, you're probably safe enough. - -A more serious problem is faced by devices that use embedded Linux — such as routers, switches, and appliances. If you're running an older, no longer supported model, it may be close to impossible to patch it and will likely be vulnerable to attacks. If that's the case, you should replace as soon as possible. - -The real and present danger is for servers. According to the National Institute of Standards (NIST), [Shellshock scores a perfect 10][6] for potential impact and exploitability. [Red Hat][7] reports that the most common attack vectors are: - -- **httpd (Your Web server)**: CGI [Common-Gateway Interface] scripts are likely affected by this issue: when a CGI script is run by the web server, it uses environment variables to pass data to the script. These environment variables can be controlled by the attacker. If the CGI script calls Bash, the script could execute arbitrary code as the httpd user. mod_php, mod_perl, and mod_python do not use environment variables and we believe they are not affected. -- **Secure Shell (SSH)**: It is not uncommon to restrict remote commands that a user can run via SSH, such as rsync or git. In these instances, this issue can be used to execute any command, not just the restricted command. -- **dhclient**: The [Dynamic Host Configuration Protocol Client (dhclient)][8] is used to automatically obtain network configuration information via DHCP. This client uses various environment variables and runs Bash to configure the network interface. Connecting to a malicious DHCP server could allow an attacker to run arbitrary code on the client machine. -- **[CUPS][9] (Linux, Unix and Mac OS X's print server)**: It is believed that CUPS is affected by this issue. Various user-supplied values are stored in environment variables when cups filters are executed. -- **sudo**: Commands run via sudo are not affected by this issue. Sudo specifically looks for environment variables that are also functions. It could still be possible for the running command to set an environment variable that could cause a Bash child process to execute arbitrary code. -- **Firefox**: We do not believe Firefox can be forced to set an environment variable in a manner that would allow Bash to run arbitrary commands. It is still advisable to upgrade Bash as it is common to install various plug-ins and extensions that could allow this behavior. -- **Postfix**: The Postfix [mail] server will replace various characters with a ?. While the Postfix server does call Bash in a variety of ways, we do not believe an arbitrary environment variable can be set by the server. It is however possible that a filter could set environment variables. - -So much for Red Hat's thoughts. Of these, the Web servers and SSH are the ones that worry me the most. The DHCP client is also troublesome, especially if, as it the case with small businesses, your external router doubles as your Internet gateway and DHCP server. - -Of these, Web server attacks seem to be the most common by far. As Florian Weimer, a Red Hat security engineer, wrote: "[HTTP requests to CGI scripts][10] have been identified as the major attack vector." Attacks are being made against systems [running both Linux and Mac OS X][11]. - -Jaime Blasco, labs director at [AlienVault][12], a security management services company, ran a [honeypot][13] looking for attackers and found "[several machines trying to exploit the Bash vulnerability][14]. The majority of them are only probing to check if systems are vulnerable. On the other hand, we found two worms that are actively exploiting the vulnerability and installing a piece of malware on the system." - -Other security researchers have found that the malware is the usual sort. They typically try to plant distributed denial of service (DDoS) IRC bots and attempt to guess system logins and passwords using a list of poor passwords such as 'root', 'admin', 'user', 'login', and '123456.' - -So, how do you know if your servers can be attacked? First, you need to check to see if you're running a vulnerable version of Bash. To do that, run the following command from a Bash shell: - -env x='() { :;}; echo vulnerable' bash -c "echo this is a test" - -If you get the result: - -*vulnerable this is a test* - -Bad news, your version of Bash can be hacked. If you see: - -*bash: warning: x: ignoring function definition attempt bash: error importing function definition for `x' this is a test* - -You're good. Well, to be more exact, you're as protected as you can be at the moment. - -While all major Linux distributors have released patches that stop most attacks — [Apple has not released a patch yet][15] — it has been discovered that "[patches shipped for this issue are incomplete][16]. An attacker can provide specially-crafted environment variables containing arbitrary commands that will be executed on vulnerable systems under certain conditions." While it's unclear if these attacks can be used to hack into a system, it is clear that they can be used to crash them, thanks to a null-pointer exception. - -Patches to fill-in the [last of the Shellshock security hole][17] are being worked on now. In the meantime, you should update your servers as soon as possible with the available patches and keep an eye open for the next, fuller ones. - -In the meantime, if, as is likely, you're running the Apache Web server, there are some [Mod_Security][18] rules that can stop attempts to exploit Shellshock. These rules, created by Red Hat, are: - - Request Header values: - SecRule REQUEST_HEADERS "^\(\) {" "phase:1,deny,id:1000000,t:urlDecode,status:400,log,msg:'CVE-2014-6271 - Bash Attack'" - - SERVER_PROTOCOL values: - SecRule REQUEST_LINE "\(\) {" "phase:1,deny,id:1000001,status:400,log,msg:'CVE-2014-6271 - Bash Attack'" - - GET/POST names: - SecRule ARGS_NAMES "^\(\) {" "phase:2,deny,id:1000002,t:urlDecode,t:urlDecodeUni,status:400,log,msg:'CVE-2014-6271 - Bash Attack'" - - GET/POST values: - SecRule ARGS "^\(\) {" "phase:2,deny,id:1000003,t:urlDecode,t:urlDecodeUni,status:400,log,msg:'CVE-2014-6271 - Bash Attack'" - - File names for uploads: - SecRule FILES_NAMES "^\(\) {" "phase:2,deny,id:1000004,t:urlDecode,t:urlDecodeUni,status:400,log,msg:'CVE-2014-6271 - Bash Attack'" - -It is vital that you patch your servers as soon as possible, even with the current, incomplete ones, and to set up defenses around your Web servers. If you don't, you could come to work tomorrow to find your computers completely compromised. So get out there and start patching! - --------------------------------------------------------------------------------- - -via: http://www.zdnet.com/shellshock-how-to-protect-your-unix-linux-and-mac-servers-7000034072/ - -作者:[Steven J. Vaughan-Nichols][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.zdnet.com/meet-the-team/us/steven-j-vaughan-nichols/ -[1]:http://www.zdnet.com/unixlinux-bash-critical-security-hole-uncovered-7000034021/ -[2]:http://www.zdnet.com/heartbleed-serious-openssl-zero-day-vulnerability-revealed-7000028166 -[3]:http://www.gnu.org/software/bash/ -[4]:http://www.openbsd.org/cgi-bin/man.cgi?query=ssh&sektion=1 -[5]:http://unixhelp.ed.ac.uk/CGI/man-cgi?rlogin -[6]:http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-7169 -[7]:http://www.redhat.com/ -[8]:http://www.isc.org/downloads/dhcp/ -[9]:https://www.cups.org/ -[10]:http://seclists.org/oss-sec/2014/q3/650 -[11]:http://www.zdnet.com/first-attacks-using-shellshock-bash-bug-discovered-7000034044/ -[12]:http://www.alienvault.com/ -[13]:http://www.sans.org/security-resources/idfaq/honeypot3.php -[14]:http://www.alienvault.com/open-threat-exchange/blog/attackers-exploiting-shell-shock-cve-2014-6721-in-the-wild -[15]:http://apple.stackexchange.com/questions/146849/how-do-i-recompile-bash-to-avoid-the-remote-exploit-cve-2014-6271-and-cve-2014-7 -[16]:https://bugzilla.redhat.com/show_bug.cgi?id=1141597#c27 -[17]:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-7169 -[18]:http://www.inmotionhosting.com/support/website/modsecurity/what-is-modsecurity-and-why-is-it-important From 1d003ad3614d8bb6312b1f2b6a24d1b67e5e3ec7 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 3 Nov 2014 23:30:47 +0800 Subject: [PATCH 094/316] PUB:20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @ZTinoZ 这篇翻译质量挺高,我一字未易。:> --- ...Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/news => published}/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md (89%) diff --git a/translated/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md b/published/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md similarity index 89% rename from translated/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md rename to published/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md index 986f5a3730..25122894c8 100644 --- a/translated/news/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md +++ b/published/20141017 Linus Torvalds' Best Quotes from LinuxCon Europe 2014.md @@ -4,7 +4,7 @@ 在今年的10月15日星期三,Linux的创造者Linus Torvalds出席了欧洲LinuxCon和CloudOpen大会并回答了英特尔的Linux及开源技术专家Dirk Hohndel提出的问题。 -Linus Torvalds在那天的 [欧洲LinuxCon和CloudOpen大会][1] 上说,从他首次创造出Linux操作系统到现在的23年里,他没后悔过任何他做过的技术决策。 +Linus Torvalds在那天的[欧洲LinuxCon和CloudOpen大会][1]上说,从他首次创造出Linux操作系统到现在的23年里,他没后悔过任何他做过的技术决策。 “技术问题,甚至是完全错误的技术问题,你也可以之后再去修复它。” Torvalds说。 @@ -22,7 +22,7 @@ Linus Torvalds在那天的 [欧洲LinuxCon和CloudOpen大会][1] 上说,从他 **2.** Dirk Hohndel: “你说你希望不只一个子系统的维护人员考虑对x86模型产生兴趣,你是怎么把自己的建议应用到实际中的? -Torvalds: “某一天我可能不得不这么做。目前我还没有收到关于不主动的任何投诉。主动是一个内核开发者最重要的东西,不论水平档次...迄今为止,一定程度上要感谢Git,我才能一直保持着前进的动力。” +Torvalds: “某一天我可能不得不这么做。目前我还没有收到关于'不主动'的任何投诉。主动是一个内核开发者最重要的东西,不论水平档次...迄今为止,一定程度上要感谢Git,我才能一直保持着前进的动力。” **3.** “很多人都想要得到市场份额数,包括很多用户,因为那是体现自我价值的一种方式。就我来说,对Linux最重要的事情之一,就是拥有一个一直在不停测试新内核的大社区,这是支持我们处理大量硬件问题的唯一办法。” @@ -52,7 +52,7 @@ via: http://www.linux.com/news/featured-blogs/200-libby-clark/791788-linus-torva 作者:[Libby Clark][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From c2989792af2f3b16cc22b10ec9624628f1cad15c Mon Sep 17 00:00:00 2001 From: bazz2 Date: Tue, 4 Nov 2014 08:27:01 +0800 Subject: [PATCH 095/316] [Translating] How to create and manage LXC containers on Ubuntu --- ...141029 How to create and manage LXC containers on Ubuntu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141029 How to create and manage LXC containers on Ubuntu.md b/sources/tech/20141029 How to create and manage LXC containers on Ubuntu.md index 5731a7d737..956d64dc69 100644 --- a/sources/tech/20141029 How to create and manage LXC containers on Ubuntu.md +++ b/sources/tech/20141029 How to create and manage LXC containers on Ubuntu.md @@ -1,3 +1,4 @@ +[bazz222222222] How to create and manage LXC containers on Ubuntu ================================================================================ While the concept of containers was introduced more than a decade ago to manage shared hosting environments securely (e.g., FreeBSD jails), Linux containers such as LXC or [Docker][1] have gone mainstream only recently with the rising need to deploy applications for the cloud. While [Docker][2] is getting all the media spotlight these days with strong backing from major cloud providers (e.g., Amazon AWS, Microsoft Azure) and distro providers (e.g., Red Hat, Ubuntu), LXC is in fact the original container technology developed for Linux platforms. @@ -138,4 +139,4 @@ via: http://xmodulo.com/lxc-containers-ubuntu.html [a]:http://xmodulo.com/author/nanni [1]:http://xmodulo.com/docker-containers-centos-fedora.html -[2]:http://xmodulo.com/manage-linux-containers-docker-ubuntu.html \ No newline at end of file +[2]:http://xmodulo.com/manage-linux-containers-docker-ubuntu.html From eec339e3e2a2408f3f82f82d5425ef02d630f2ac Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 4 Nov 2014 11:05:10 +0800 Subject: [PATCH 096/316] PUB:20140617 7 Improvements The Linux Desktop Needs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @ZTinoZ 这篇压了很久,主要是行文比较艰涩,我校对也很吃力。 --- ... 7 Improvements The Linux Desktop Needs.md | 97 +++++++++++++++++++ ... 7 Improvements The Linux Desktop Needs.md | 94 ------------------ 2 files changed, 97 insertions(+), 94 deletions(-) create mode 100644 published/20140617 7 Improvements The Linux Desktop Needs.md delete mode 100644 translated/talk/20140617 7 Improvements The Linux Desktop Needs.md diff --git a/published/20140617 7 Improvements The Linux Desktop Needs.md b/published/20140617 7 Improvements The Linux Desktop Needs.md new file mode 100644 index 0000000000..a3a133c4ed --- /dev/null +++ b/published/20140617 7 Improvements The Linux Desktop Needs.md @@ -0,0 +1,97 @@ +7个Linux桌面需要改进之处 +====================================== + +在过去的15年内,Linux桌面从一个还算凑合的边缘化解决方案集合发展为一个独特的创新来源和选择之一。它的标准特点中有许多是要么不适用于Windows系统,要么就只适合作为一个专有的扩展软件。因此,使用Linux愈发变得不仅是一个原则问题,也是一种偏好。 + +然而,尽管Linux桌面不停在进步,但是仍然存在差距。一些特点正在丢失,而一些已经丢失了,还有一些令人惊喜的附加功能可以轻易地提升桌面体验,而不用挑战用户的容忍度。 + +比如说,以下是7个有利于Linux桌面发展的改善建议: + +### 7. 简单的Email加密技术 + +如今,各种Email阅读器从Alpine到Thunderbird再到Kmail,都带有Email加密技术。然而,关于它们的文档手册通常是不存在或者非常简陋。 + +但是,即使你了解加密理论,但是使用起来仍然很困难。这些控件通常分散在配置菜单和选项卡中,需要为所有你需要和想要的设置进行一次彻底的搜索才行。如果你未能进行适当的加密设置,通常你找不到任何有用的反馈。 + +易用性方面最接近的是 [Enigmail][1] ,它是一个带有面向初学者的设置向导的Thunderbird扩展。但是你一定要知道怎么用Enigmail,新的加密设置菜单埋藏在撰写窗口里一级菜单下,和其他选项混在一起,这让日常用户很迷惑。 + +不管是那种桌面环境,如你所知的,你应该对邮件加密,今天对安全和隐私的媒体不断报道让你知道加密有多重要。 + +### 6. 虚拟工作空间缩略图 + +不需要额外的显示器,虚拟工作空间提供了更多桌面空间。然而,尽管它们很实用,但是虚拟工作空间的管理并没有在过去十年发生改变。在大多数桌面上,你能通过每个工作空间上的pager程序(一个提供很少指示除了它的名字和数字的简单矩形框)来控制它们 -- 或者,在Ubuntu的Unity 环境中,可以指出哪个工作空间是当前激活的。 + +确实,GNOME和Cinnamon能提供出不错的视图,但是它们的实用性受限于它们需要显示屏大小的事实。而 KDE 写出内容列表则和主流的图形桌面不太协调。 + +一个比较不错的解决方案应该是鼠标悬停在足够大的缩略图上来获取正常的视图,这样就精确地查看每个工作空间上的东西了。 + +### 5. 一个合用的菜单 + +现代型桌面很久之前就已经舍弃了级联子菜单铺满整个桌面的经典型菜单了。如今,一般的电脑都有太多的应用程序以至于不能适应这样的模式。 + +糟糕的是,没有什么主要的替代品能与经典型菜单一样方便。把菜单根植于一个单一的窗口,其效果是不理想的,因为你要么必须截掉子菜单要么就用鼠标不断地调整窗口大小。 + +但是全屏幕菜单的产品还要差,这意味着你甚至要在开始工作之前就调整屏幕,并且哪个搜索框其实只在你已经知道什么应用程序可用的情况下才有用 -- 这种情况下你还不如直接用命令行。 + +坦白地说,我不知道拿什么来解决这个问题,OS X下的spinner racks吗?我可以肯定地说,所有现代型菜单产品在桌面上呈现出一个个精心构造的图标似乎更是一个合理的选择。 + +### 4. 一个专业的、实惠的视频编辑器 + +多年来,Linux已经慢慢地填充了软件生产力上的空白。然而即便如此,它仍然缺少价格合理的视频编辑软件。 + +问题不在于没有这样的自由软件。[Maya][2] 是动画产业的标准之一,但是问题在于这样的软件的售价达数千美金。 + +另一边,比如Pitivi或者是Blender这样的免费软件, 它们的功能性 -- 尽管它们的开发者足够的努力 -- 只能保证基本功能。虽然取得了进步,但还是和用户们所期望的相去甚远。 + +尽管我听说一些非主流的厂家使用的是原生态Linux视频编辑器,原因通常是因为他们抱怨其它编辑器不好,但其余的人更愿意减少麻烦,从而在其它操作系统上对视频进行编辑。 + +### 3. 一个文档处理器 + +有一个极端是,那些需要进行文字处理的用户,Google Docs就让他们满意了;而另一个极端是对于那些排版设计的专家来说,Scribus是唯一比较可行的应用。 + +这两种极端之间还有一层,是那些比如那些写作很长的文本的文件的出版商和作家。这类用户有些是由基于Windows的 [Adobe FrameMaker][3] 来服务, 有些则由基于Linux的LibreOffice Writer来服务。 + +不幸的是,这些用户显然不会优先考虑LibreOffice,Calligra Words, AbiWord或者是任何其它的办公套件。应该提供给用户的办公套件的特色功能包括: + +- 为每个文件建立引用书目数据库。 +- 表格的样式能和段落与字符保持一致。 +- 除了页眉和页脚,带有持续性内容的页面样式,在每次使用样式时都一样。 +- 交叉引用存储格式,以便不需要每次都手动创建。 + +无论是LibreOffice还是其它同类应用,提供这些特色功能与它们是否可用是并不相干的。但是没有它们,Linux桌面对于一群潜在的用户来说就是个不完善的东西。 + + +### 2.彩色标题栏 + +浏览器的扩展软件向我们展示了彩色编码标签对于工作空间的作用。打开了八九个标签后,它的标题栏就看不全了,所以颜色通常是最快区分标签关系的方法。 + +同样的系统也能用到桌面上。更好的是,彩色编码也许可以按会话保存,允许用户同时打开某个任务所需的所有应用。到目前为止,我知道没有任何一个桌面有这个特点。 + +### 1. 图标栏 + +多年以来,Stardock公司一直销售着一个名叫 [Fences][4] 的扩展软件,它用来分类和组织桌面上的图标,你能用它给每个组取名并且可以把每个图标都放在一起。另外,你可以指定不同的文件类型自动加入到一个组里,并且按个人需要来隐藏和整理。 + +换句话说,fences让用户整天在桌面上干的事情自动有序地分组排列。然而,除了一两个小功能与KDE的文件夹视图类似之外,fences的功能仍然没有出现在Linux桌面上。这也许是因为开发人员把注意力放到移动设备上作为灵感来源,而使用fences无疑是传统工作站桌面的一大特征。 + +### 我个人的列表 + +我做了这种列表之后,让我震惊的是这些不多的改进都是普适性的,其中几项改进将会吸引大量特定的用户,只有一个是来自专有软件的移植,其中一个至少是修饰性的而不是功能性的。 + +这一观察表明,对于普通用户来说,Linux能添加的功能已经所剩无几了。作为一个通用的桌面,Linux从几年前到现在都很多元化,到今天,用户能从超过半打的主流桌面中选择出一个来使用。 + +当然这不意味着,一些专家就不会有其它意见。另外,没有人会关心不断变化的需求会不会使改进令人满意。但是它意味着这份充斥着改进建议的名单上的许多项目将会高度个人化。 + +所有这些都是为了抛砖引玉:你认为还有什么其它的对桌面有益的建议吗? + +-------------------------------------------------------------------------------- + +via: http://www.datamation.com/open-source/7-improvements-the-linux-desktop-needs-1.html + +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://addons.mozilla.org/en-US/thunderbird/addon/enigmail/ +[2]:http://en.wikipedia.org/wiki/Autodesk_Maya +[3]:http://www.adobe.com/products/framemaker.html +[4]:http://www.stardock.com/products/fences/ diff --git a/translated/talk/20140617 7 Improvements The Linux Desktop Needs.md b/translated/talk/20140617 7 Improvements The Linux Desktop Needs.md deleted file mode 100644 index 886ab430a3..0000000000 --- a/translated/talk/20140617 7 Improvements The Linux Desktop Needs.md +++ /dev/null @@ -1,94 +0,0 @@ -7个Linux桌面需要改善之处 -====================================== - -在过去的15年内,Linux桌面从一个还算凑合的边缘化解决方案集合发展到了一个空前的创新和选择源。它的标准特点中有许多是要么不适用于Windows系统,要么就只适合作为一个专有的扩展软件。因此,使用Linux愈发变得不仅是一个原则问题,也是一种偏好。 - -然而,尽管Linux桌面不停在进步,但是仍然存在差距。一些正在丢失它们的特点,一些已经丢失了,还有一些如同天上掉的馅饼般的附加设备能轻易地实现在不考虑用户对于改变的容忍度的情况下来扩展桌面。 - -比如说,以下是7个有利于Linux桌面发展的改善建议: - -### 7. 简单的Email加密技术 - -如今,每个Email阅读器从Alpine到Thunderbird再到Kmail,都包括了Email加密技术。然而,文件编制通常是不存在或者非常劣质。 - -但是,即使你理论上看懂了,但是实践起来还是很困难的。控件通常分散在整个配置菜单和选项卡中,需要为所有你需要和想要的设置进行一次彻底的搜索。如果你未能进行适当的加密,你就收不到反馈。 - -最新的一个简易加密进程是 [Enigmail][1] ,一个包含面向初学者设置向导的Thunderbird扩展。但是你一定要知道怎么用Enigmail,而且菜单新增了合成窗口并把加密设置项添加了进去,如果把它弄到其它的设置里势必会使每个用户都难以理解。 - -无论桌面怎么样,假设如果你想接收加密过的Email,你就要先知道密码。可如今,不断有媒体涉及安全和隐私方面就已经确定了这样的假设不再适用。 - -### 6. 虚拟工作空间缩略图 - -虚拟工作空间提供了更多不需要额外监听的桌面空间。然而,尽管它们很实用,但是虚拟工作空间的管理并没有在过去十年发生改变。在大多数桌面上,你能通过每个工作空间上的pager程序(一个提供很少指示除了它的名字和数字的简单矩形框)来控制它们 -- 但是,在Ubuntu的统一实例中,工作空间目前来说还是很常用的。 - -确实,GNOME和Cinnamon能提供出不错的视图,但是它们的实用性受限于它们需要显示屏大小的事实和会与主要的图形化桌面发生冲突的KDE内容书面列表。 - -一个比较不错的解决方案应该是鼠标悬停在足够大的缩略图上来获取正常的视图,这样就精确地查看每个工作空间上的东西了。 - -### 5. 一个可操作的菜单 - -现代型桌面很久之前就已经舍弃搭配着子菜单的经典型菜单了。如今,一般的电脑都有太多的应用程序以至于不能适应这样的模式。 - -糟糕的是,没有什么主要的替代品能与经典型菜单一样方便。把菜单限制进一个单一的窗口,其效果是不理想的,因为你要么必须截掉子菜单要么就用鼠标不断地调整窗口。 - -但是全屏幕菜单的产品还要差,意思是你甚至要在开始工作之前就调整屏幕,并且依赖于仅仅可用的搜索框,当然如果你已经知道什么应用程序可用 -- 这种情况下你还不如直接用命令行。 - -坦白地说,我不知道拿什么来解决这个问题,OS X下的spinner racks吗?我可以肯定地说,所有现代型菜单产品在桌面上呈现出一个个精心构造的图标似乎更是一个合理的选择。 - -### 4. 一个专业的、实惠的视频编辑器 - -多年来,Linux已经慢慢地填充了软件生产力上的空白。然而即便如此,它仍然缺少价格合理的视频编辑软件。 - -问题不在于自由软件不存在。毕竟, [Maya][2] 是动画产业的标准之一,问题是在于这些软件的售价达数千美金。 - -另一边,是那些像Pitivi或者是Blender那样的免费软件, 它们的功能性 -- 尽管它们的开发者足够的努力 -- 一些基本功能仍然被保持着。虽然取得了进步,但还是和用户们所期望的相去甚远。 - -尽管我听说独立的部门使用的是原生态Linux视频编辑器,原因通常是因为他们抱怨其它编辑器不好,但其余的人更愿意减少麻烦从而在其它操作系统上对视频进行编辑。 - -### 3. 一个文档处理器 - -有一个极端是,那些需要进行文字处理的用户是由Google Docs负责,而另一个极端是对于那些布局设计的专家来说,Scribus是唯一比较可信的应用。 - -这两种极端之间还有一层,是那些比如那些生产长期的、面向文本的文件的出版商和作家。这类用户有些是由基于Windows的 [Adobe FrameMaker][3] 来服务, 有些则由基于Linux的LibreOffice Writer来服务。 - -不幸的是,这些用户显然不会优先考虑LibreOffice,Calligra Words, AbiWord或者是任何其它的办公套件。应该提供给用户的办公套件的特色功能包括: - -- 为每个文件建立书目数据库。 -- 表格在样式上表格和段落与字符保持一致。 -- 带有持续性内容的页面样式,除了页眉和页脚,在每次样式要被使用的时候就会出现。 -- 交叉引用存储格式,以便不需要每次都手动创建。 - -无论是LibreOffice还是其它同类应用,提供这些特色功能与它们是否可用是不相干的。没有它们,Linux桌面对于一群潜在的用户来说就是个不完善的东西。 - -浏览器的扩展软件向我们展示了彩色编码标签对于工作空间的作用。开放标签的标题在开放程度超过八九成或完全开放的时候会消失,所以颜色通常是最快区分标签关系的方法。 - -系统也能和桌面一样实用。更好的是,彩色编码能保存在会话之间,在同一时间允许用户打开所有需要一个特点任务的应用。到目前为止,我知道没有任何一个桌面有这个特点。 - -### 2. 图标栏 - -多年以来,Stardock公司一直销售着一个名叫 [Fences][4] 的扩展软件,它用来分类和组织桌面上的图标,你能用它给每个组取名并且可以把每个图标都放在一起。另外,你可以指定不同的文件类型自动加入到一个组里,并且按个人需要来隐藏和整理。 - -换句话说,fences让用户整天在桌面上干的事情自动有序地分组排列。然而,除了一两个小功能,它们与KDE的文件夹视图差不多,fences在Linux桌面上仍然鲜有人使用。这也许是因为开发人员把专注于移动设备作为主要目标,使用fences无疑是传统工作站桌面的一大特征。 - -### 1. 个性化列表 - -由于我做过这种列表,让我震惊的是鲜有提出的改进得到了推广普及。 这些改进能吸引大量特定的用户,并且甚至只有一个意味着专有应用程序的进入端口,至少它肯定是花拳绣腿。 - -这一观察表明,对于普通用户来说,Linux能添加的功能已经所剩无几了。作为一个通用的桌面,Linux从几年前到现在都很多元化,直到今天用户都能从超过半打的主流桌面中选择出一个来使用。 - -当然这不意味着,一些专家就不会有其它意见。另外,没有人会关心不断变化的需求会不会使改进令人满意。但是它意味着这份充斥着改进建议的名单上的许多项目将会高度个人化。 - -所有这些都是为了抛砖引玉:你认为还有什么其它的对桌面有益的建议吗? - --------------------------------------------------------------------------------- - -via: http://www.datamation.com/open-source/7-improvements-the-linux-desktop-needs-1.html - -译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:https://addons.mozilla.org/en-US/thunderbird/addon/enigmail/ -[2]:http://en.wikipedia.org/wiki/Autodesk_Maya -[3]:http://www.adobe.com/products/framemaker.html -[4]:http://www.stardock.com/products/fences/ From 5a6ee8c8596e96c2c6b7559b742dd66c610eb750 Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Tue, 4 Nov 2014 11:12:30 +0800 Subject: [PATCH 097/316] [translated] 20140729 Don't Fear The Command Line.md --- .../20140729 Don't Fear The Command Line.md | 138 ------------------ .../20140729 Don't Fear The Command Line.md | 135 +++++++++++++++++ 2 files changed, 135 insertions(+), 138 deletions(-) delete mode 100644 sources/talk/20140729 Don't Fear The Command Line.md create mode 100644 translated/talk/20140729 Don't Fear The Command Line.md diff --git a/sources/talk/20140729 Don't Fear The Command Line.md b/sources/talk/20140729 Don't Fear The Command Line.md deleted file mode 100644 index e84704f6e4..0000000000 --- a/sources/talk/20140729 Don't Fear The Command Line.md +++ /dev/null @@ -1,138 +0,0 @@ -zpl1025 -Don't Fear The Command Line -================================================================================ -![](http://a4.files.readwrite.com/image/upload/c_fill,h_900,q_70,w_1600/MTE5NTU2MzIyNTM0NTg5OTYz.jpg) - -> Embrace your computer's most useful tool. - -You've probably seen it in movies, even if you haven't ever called it up on your own computer: a blank screen with a simple text prompt and a cursor, just waiting for you to enter the appropriate arcane commands to do your bidding. - -This is the command line. It's a text-based interface that predates the far more familiar windows, icons and tiles of today's major computer operating systems, from Windows to Mac OS X to Linux. - -The command line is an extremely powerful tool for accessing basic functions of your computer. For most people, it's also a confusing, complicated and seemingly irrelevant distraction. It doesn't have to be. - -### Computers Under Your Command ### - -Typing text instructions and hitting Return to get a computer to do something sounds like a major step back compared to the swipe-and-tap touch-sensitive interfaces of mobile devices. Even a toddler can use an iPad, right? Yet the command line can save you time and aggravation, if you know when to use it. - -If you're serious about learning to code—or just understanding computer technology—you absolutely need to get to know your command line. - -Diving into the command line will teach you a lot about how your computer works and organizes information. You might find that some tasks you perform every day with a mouse are actually faster when you type a command or two instead. - -Most important, you’ll be better prepared to learn [languages like Python][1] and [programs like Git][2] that require some command-line setup. By getting familiar with the command line, you’ll break down barriers that may have kept you from learning to program in the past. - -So here's a quick, basic guide to getting around on the command line. It's focused on Mac OS X's Unix-based environment, simply because that's what I'm familiar with. Linux users probably know the command line well already, although newcomers might also find these tips useful. If you're running a Chromebook, Google has some helpful instructions for getting to its [version of the command line][3], which is similar to Mac and Linux systems. Windows users, unfortunately, are stuck with a command language derived from MS-DOS that just barely overlaps with Unix, so this guide isn't going to be much use to you; you might check out [this dosprompt.info tutorial][4]. - -### How To Find Your Way Around ### - -The very first thing you’ll need to do is figure out how to access the command line, which is typically done through a program called a "shell." On any Mac running OS X, you'll need to start the Terminal application. You can do this through the Finder (it's in the Utilities folder under Applications), or just click the magnifying glass in the upper right hand corner of your screen and type “terminal,” then select it from the drop-down. - -![](http://a4.files.readwrite.com/image/upload/c_fit,w_630/MTE4MDAzNDE2ODYxMjc5NzU4.png) - -You’re in, but all you see is a blank box with a space to type prompts. This is the command line! Let’s get to know this window a little bit better. - -Type pwd, which stands for Print Working Directory. In computer parlance, “printing” something has nothing to do with paper. It really just means spitting it out on the screen. The command should result in the computer returning the directory you are currently working in. - -![](http://a4.files.readwrite.com/image/upload/c_fit,w_630/MTIyMzk5Mjg5MDMzMjYyNjA0.png) - -And indeed, /Users/laurenorsini is my home directory. Advanced tip: You can use the tilde symbol (~) as a shortcut for your home directory—it means the same thing as /Users/yourusername. So you can reference your Downloads subdirectory, for instance, as ~/Downloads. (If you look closely at the command prompt above, you'll see a tilde there. That indicates that I'm in my home directory.) - -We don’t want to muddy up our main directory with all our command-line experimenting, so let’s make a new directory with the mkdir command. This is the same as creating a new folder on your desktop operating system. Let's call it "experiments": - -![](http://a4.files.readwrite.com/image/upload/c_fit,w_630/MTE5NDg0MDYxMTMwODUxODU1.png) - -Now we have a new directory. Using the graphic interface, we can visually verify that we actually created a new one. Sure enough, if I open the Finder and go into my home directory—here marked with a little house icon—I now see a folder named “experiments.” I made that on the command line! (The reverse works, too: You can create a folder on your desktop, and see it in the command line. They're just two different ways of looking at the same system.) - -![](http://a5.files.readwrite.com/image/upload/c_fit,w_630/MTE5NTU2MzIyNTM0MzI3ODE5.png) - -Now I need to change directories and enter the ~/experiments directory with the **cd** (change directory) command. - -![](http://a5.files.readwrite.com/image/upload/c_fit,w_630/MTE5NDg0MDYxMTMxMTEzOTk5.png) - -I have my command prompt on the default setting, so it automatically shows where my working directory is. But if yours looks different, here's how to make sure “experiments” is truly your working directory: type **pwd** again. It should tell you that your working directory is “experiments.” - -### Getting Filed Away ### - -I create and edit files on the command line every day that I code. It's faster than using the graphical user interface because I can test out my programs on the command line as soon as I finish editing them. And if I also happen to be pushing things to [GitHub][5] at the same time, well, it's even more convenient. - -Now you have a new directory (also called a repository or folder) on your computer to mess around with. Let's start by creating a new file that contains only the words, "Hello World." There are a lot of ways to do this; here I'm using the echo command. - -Now you have a new directory (also called a repository or folder) on your computer to mess around with. Let's start by creating a new file that contains only the words, "Hello World." There are a [lot of ways][6] to do this; here I'm using the **echo** command. - -![](http://a2.files.readwrite.com/image/upload/c_fit,w_630/MTE5NDg0MDYxMjQxMjgwMDE1.png) - -Oh no! I spelled "newfile" incorrectly. That happens. Let's fix it in two steps. First, I'll create a new file with the correct spelling... - -![](http://a3.files.readwrite.com/image/upload/c_fit,w_630/MTIxNDI3Mjk0MjA5ODAzNzg5.png) - -And then, I'll use the **mv** (move) command to replace my old, misspelled file with my new file. This always takes the form "**mv oldfile newfile**." - -![](http://a1.files.readwrite.com/image/upload/c_fit,w_630/MTIxNDI3Mjk0MjA5NzM4MjUz.png) - -A note about **mv**: like many commands, it's a deceptively powerful one. When we're "moving" newfil.txt into newfile.txt, what we're actually doing is completely overwriting the first file and replacing it with the second. So the text I wrote into newfil.txt is gone forever, replaced by what I wrote into newfile.txt. - -To prove that I only have one file in my directory, I can use **ls** , the list command, to get a list of all the files in this directory. - -![](http://a1.files.readwrite.com/image/upload/c_fit,w_630/MTIxNDI3Mjk0MTA3NTAyMDkz.png) - -See? Just the one. And if I look inside the folder using my computer's graphical user interface, I can see the file there, too. - -![](http://a3.files.readwrite.com/image/upload/c_fit,w_630/MTIyMzk5Mjg5MDM4OTY0MjM2.png) - -But it's just a blank text file. Let's put something inside it using a text editor. On the command line, I tend to use the nano editor since it's simple and it works on just about every type of computer. - -This should immediately bring up a new editing screen right inside your command line window. The basic commands are all laid out for you. - -![](http://a3.files.readwrite.com/image/upload/c_fit,w_630/MTIyMzk5Mjg5MDM5NjE5NTk2.png) - -Write what you want, and then exit with CTRL + X. If it asks you to save and you'd like to, type "Y." - -![](http://a4.files.readwrite.com/image/upload/c_fit,w_630/MTIxNDI3Mjk0MTA4MDkxOTE3.png) - -As you've probably guessed by now, it's possible to also see these changes by using the operating system and navigating to newfile.txt with your mouse. Here you can open and edit the file you've created in any text editor of your choice. - -If you want to delete the file forever, do that with the **rm** (remove) command: - -![](http://a2.files.readwrite.com/image/upload/c_fit,w_630/MTE5NTU2MzIyNTQxMzQwMTcx.png) - -Keep in mind that the **rm** command is very powerful! A [common trick][7] on hacker forums is to convince a command-line newbie to type **rm -rf** / so she ends up deleting her whole computer. The "/" means the very top-level directory of your computer—and everything underneath it. NEVER type that command! - -### Further Reading ### - -This is just the beginning of the endless possibilities of the command line. You can use this tool to control every aspect of your computer, which is what makes it as dangerous as it is powerful. Make sure to always read up on new command-line prompts before you use them, and never blindly input a prompt that a stranger suggests to you online. - -I've outlined the commands I use every day so I can code, but there are a lot more reasons to master the command line than that. If you're looking for a more thorough overview, you might want to try: - -[The Command Line Crash Course][8]. A free, extended course that covers the basics of command line usage. - -[A Command Line Primer For Beginners][9]. Lifehacker’s collection of helpful commands for first time users. - -[Introduction to the Mac OS X Command Line][10]. Online-education site Treehouse covers the very basics in extreme detail. - -Now that you've finished reading, you're better prepared for any code tutorial I've written in the past, since it's impossible to do any of them without typing in some commands. If you're ready to go, I suggest you check out ReadWrite's [Git tutorial][11], which utilizes the command line to introduce you to collaborative coding. Happy computing! - -*Lead photo by [Jason Scott][12]; all other screenshots by Lauren Orsini for ReadWrite* - --------------------------------------------------------------------------------- - -via: http://readwrite.com/2014/07/18/command-line-tutorial-intro - -作者:[Lauren Orsini][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://readwrite.com/author/lauren-orsini -[1]:http://readwrite.com/2014/07/08/what-makes-python-easy-to-learn -[2]:http://readwrite.com/2013/09/30/understanding-github-a-journey-for-beginners-part-1 -[3]:http://www.chromium.org/chromium-os/poking-around-your-chrome-os-device -[4]:http://dosprompt.info/ -[5]:http://www.github.com/ -[6]:http://www.cyberciti.biz/faq/unix-create-file-from-terminal-window-shell-prompt/ -[7]:http://www.urbandictionary.com/define.php?term=rm+-rf+%2F -[8]:http://cli.learncodethehardway.org/book/ -[9]:http://lifehacker.com/5633909/who-needs-a-mouse-learn-to-use-the-command-line-for-almost-anything -[10]:http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line -[11]:http://readwrite.com/2013/09/30/understanding-github-a-journey-for-beginners-part-1 -[12]:http://en.wikipedia.org/wiki/Computer_terminal#mediaviewer/File:DEC_VT100_terminal.jpg diff --git a/translated/talk/20140729 Don't Fear The Command Line.md b/translated/talk/20140729 Don't Fear The Command Line.md new file mode 100644 index 0000000000..166dd0f7d2 --- /dev/null +++ b/translated/talk/20140729 Don't Fear The Command Line.md @@ -0,0 +1,135 @@ +不要害怕命令行 +================================================================================ +![](http://a4.files.readwrite.com/image/upload/c_fill,h_900,q_70,w_1600/MTE5NTU2MzIyNTM0NTg5OTYz.jpg) + +> 接纳你电脑上最有用的工具。 + +你应该在电影中见到过,尽管从没在自己电脑上调出来:一个空白屏幕,带有一些简单文字提示和一个光标,等着你去输入几个神秘的命令,就会听你的吩咐。 + +这就是命令行。它是基于字符的接口,早于现在更加熟悉的主流操作系统上的窗口,图标和`瓦片 tiles`,包括Windows到Mac OS X和Linux。 + +命令行是一个使用你电脑基本功能的超级强大的工具。对于大多数人来说,它也是一个让人困惑的,难以理解的,看上去无关紧要的东西。不必那么夸张。 + +### 在你的命令控制下的电脑 ### + +输入字符指令再敲下回车来让电脑做点事情,和在移动设备的触摸界面上滑动点击比较,听起来像是退了一大步。即使是刚学走路的小孩都可以用iPad,对吧?不过,如果你知道怎么用的话,命令可以节省你的时间和烦恼。 + +如果你很认真想学习编程-或者想理解计算机技术-你完全有必要掌握命令行。 + +深入到命令行里,将教会你很多关于电脑如何工作以及管理信息的。你也许会发现有些平常使用鼠标操作的功能,当改为敲一两个命令后,实际上会更快。 + +更重要的是,你会更容易理解[像Python那样的编程语言][1]和[像Git那样的软件][2],需要有一点命令行基础。在熟悉了命令行以后,你就可以打破过去阻止你学习编程的障碍了。 + +所以在这里介绍一点关于命令行的快速,基础指导。它主要专注于Mac OS X的类Unix环境,只是因为这是我比较熟悉的。Linux用户应该已经很熟悉命令行了,不过新手也许还是会觉得这些小窍门有点用。如果你用的是Chromebook,Google已经给出了有用的指导,用来打开它自带的[命令行工具][3],它和Mac或Linux系统有点类似。对于Windows用户,很不幸,受限于从MS-DOS衍生出的命令语言,它和Unix只有一点点交集,所以这篇指导对你没什么用;不过可以去看下[dosprompt.info网站里的资料][4]。 + +### 如何开始 ### + +你需要做的第一件事是搞清楚如何进入命令行,通常这是通过一个叫“shell”的软件来做的。在任意一台运行OS X的Mac上,需要启动终端应用。你可以通过Finder来打开(它是在应用程序下的实用工具目录里),或者点击屏幕右上角的放大镜然后输入“terminal”,然后在下拉列表里选择。 + +![](http://a4.files.readwrite.com/image/upload/c_fit,w_630/MTE4MDAzNDE2ODYxMjc5NzU4.png) + +你进来了,但是所有你看到的只是一个有输入空间的空白盒子。这就是命令行!让我们来更好地了解一下这个窗口。 + +输入`pwd`,它的意思是打印当前工作目录。在计算机语言里,“打印”什么和纸没一点关系。它实际上只是意味着吐点东西到屏幕上。这个命令运行的结果是让计算机返回你当前正处在的目录路径。 + +![](http://a4.files.readwrite.com/image/upload/c_fit,w_630/MTIyMzk5Mjg5MDMzMjYyNjA0.png) + +实际上,`/Users/laurenorsini`是我的主目录。高级提示:你可以使用波浪符(~)作为自己主目录的简写 - 它和`/Users/你的用户名`是一样的。比如,你可以像`~/Downloads`这样引用你的下载目录。(如果你仔细看前面的命令提示,你会发现那里有一个波浪符。这说明我当前正在自己的主目录下。) + +我们肯定不希望我们的命令行试验把自己的主目录弄的一团糟,所以让我通过`mkdir`命令来创建一个新目录。这和在桌面操作系统里创建一个新目录是一样的。让我们把它叫做“experiments”: + +![](http://a4.files.readwrite.com/image/upload/c_fit,w_630/MTE5NDg0MDYxMTMwODUxODU1.png) + +现在我们有一个新目录了。如果使用图形界面的话,我们可以用自己的眼睛判断我们已经创建了一个新目录。当然,如果我打开Finder然后进入我的主目录-用一个小房子图标标记的-就会看到一个叫“experiments”的目录。我通过命令行实现的!(反过来:你可以在桌面系统里建立一个文件夹,然后在命令行下去查看。这只是同一套系统的两种不同表现方式。) + +![](http://a5.files.readwrite.com/image/upload/c_fit,w_630/MTE5NTU2MzIyNTM0MzI3ODE5.png) + +现在我需要通过**cd**(改变路径)命令改变路径进入到`~/experiments`目录中 + +![](http://a5.files.readwrite.com/image/upload/c_fit,w_630/MTE5NDg0MDYxMTMxMTEzOTk5.png) + +我的命令提示是系统默认设定,所以它自动显示我当前的工作目录。但是如果你的看起来不一样的话,这样可以让你确定“experiments”是当前工作目录:再一次输入**pwd**。它应该会告诉你当前工作目录是“experiments”。 + +### 建立存档 ### + +在写代码的每一天里我都通过命令行创建和编辑文件。它比使用图形用户界面更快是因为我可以在编辑完后马上就在命令行里测试我的程序。如果我正好同时需要推送到[GitHub][5]的话,好吧,那就更方便了。 + +现在你有一个新目录(也可以叫做仓库或文件夹)在你电脑上用来折腾。让我们从创建一个包含“你好世界”这句话的文件开始吧。有[很多种方式][6],在这里我用了**echo**命令。 + +![](http://a2.files.readwrite.com/image/upload/c_fit,w_630/MTE5NDg0MDYxMjQxMjgwMDE1.png) + +哦不!我拼错“newfile”了。这经常会碰到。让我们用两个步骤来改正它。首先,我将创建一个拼写正确的文件... + +![](http://a3.files.readwrite.com/image/upload/c_fit,w_630/MTIxNDI3Mjk0MjA5ODAzNzg5.png) + +然后,我讲使用**mv**(移动)命令把拼写错误的就文件替换成我的新文件。通常都是这样,“**mv 旧文件 新文件**”。 + +![](http://a1.files.readwrite.com/image/upload/c_fit,w_630/MTIxNDI3Mjk0MjA5NzM4MjUz.png) + +关于**mv**要注意的:跟大多数命令一样,它是一个容易误导的强大命令。当我们“移动”`newfil.txt`到`newfile.txt`的时候,实际上会把第一个文件完全覆盖到第二个文件上。这样我写到newfile.txt里的内容将彻底消失,替换成我写到newfil.txt里的内容。 + +为了证明我的目录下只有一个文件,可以使用**ls**,清单命令,来获得目录下的所有文件清单。 + +![](http://a1.files.readwrite.com/image/upload/c_fit,w_630/MTIxNDI3Mjk0MTA3NTAyMDkz.png) + +看到了没?只有一个。然后如果我在图形界面下看下这个目录的话,也可以看到这个文件。 + +![](http://a3.files.readwrite.com/image/upload/c_fit,w_630/MTIyMzk5Mjg5MDM4OTY0MjM2.png) + +但是,它只是个空白文本文件。让我们用文本编辑器来输入点内容进去。在命令行下,我喜欢用`nano`编辑器,因为它很简单而且几乎在所有类型电脑上都可以使用。 + +这会在你的命令行窗口中马上打开编辑屏幕。一些基本的命令都为你列出来了。 + +![](http://a3.files.readwrite.com/image/upload/c_fit,w_630/MTIyMzk5Mjg5MDM5NjE5NTk2.png) + +写下你想说的话,然后通过CTRL + X退出。在它问你是否保存的时候,当然键入"Y"。 + +![](http://a4.files.readwrite.com/image/upload/c_fit,w_630/MTIxNDI3Mjk0MTA4MDkxOTE3.png) + +你也许已经猜到了,也可以在操作系统中用鼠标找到newfile.txt文件看到这些改动。这里你可以用任意喜欢的文本编辑器打开编辑这个你创建的文件。 + +如果你想永远删除这个文件,可以用**rm**(移除)命令: + +![](http://a2.files.readwrite.com/image/upload/c_fit,w_630/MTE5NTU2MzIyNTQxMzQwMTcx.png) + +注意一下,**rm**命令非常强大!在黑客论坛里有个[常用伎俩][7]就是说服一个命令行新手输入**rm -rf /**,然后他就把自己整个电脑上的所有文件都删掉了。命令里的“/”意思是电脑的最高级根目录-所有一切都在它之下。千万不要输入那行命令! + +### 延伸阅读 ### + +这只是无限可能的命令行的一个开始。你可以使用这个工具控制电脑的每一个方面,这也使得它强大的同时也很危险。保证在使用它们之前先看一下命令行提示,然后永远不要盲目输入任何陌生人推荐给你的语句。 + +我已经大概介绍了平时敲代码时常用的几个命令,但是有比这更多的理由去掌握命令行。如果你想更彻底地了解,也许可以试试: + +[命令行速成教程][8]。一套免费的扩展课程,涵盖了命令行应用的基础。 + +[命令行初学者启蒙][9]。Lifehacker收藏的一些适合初学者的很有用的命令。 + +[Mac OS X命令行入门][10]。在线教育网站Treehouse极尽详细地介绍了命令行的基础。 + +现在文章看完了,你就更容易理解我之前写的那些代码教程了,因为如果不敲几个命令根本没法完成。如果你准备好了,我建议你去看看ReadWrite的[Git教程][11],它使用命令行来向你介绍协同编程。运算快乐! + +*开头图片来自[Jason Scott][12];其他屏幕截图由Lauren Orsini提供给ReadWrite* + +-------------------------------------------------------------------------------- + +via: http://readwrite.com/2014/07/18/command-line-tutorial-intro + +作者:[Lauren Orsini][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://readwrite.com/author/lauren-orsini +[1]:http://readwrite.com/2014/07/08/what-makes-python-easy-to-learn +[2]:http://readwrite.com/2013/09/30/understanding-github-a-journey-for-beginners-part-1 +[3]:http://www.chromium.org/chromium-os/poking-around-your-chrome-os-device +[4]:http://dosprompt.info/ +[5]:http://www.github.com/ +[6]:http://www.cyberciti.biz/faq/unix-create-file-from-terminal-window-shell-prompt/ +[7]:http://www.urbandictionary.com/define.php?term=rm+-rf+%2F +[8]:http://cli.learncodethehardway.org/book/ +[9]:http://lifehacker.com/5633909/who-needs-a-mouse-learn-to-use-the-command-line-for-almost-anything +[10]:http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line +[11]:http://readwrite.com/2013/09/30/understanding-github-a-journey-for-beginners-part-1 +[12]:http://en.wikipedia.org/wiki/Computer_terminal#mediaviewer/File:DEC_VT100_terminal.jpg From 941b4e49456bb7968e764b523680dc35c9bf452c Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Tue, 4 Nov 2014 11:17:17 +0800 Subject: [PATCH 098/316] [translating] 20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md --- ...41030 Ubuntu Could Give a Fatal Blow to Windows in China.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md b/sources/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md index 4e3c4ceb21..deea3d30a2 100644 --- a/sources/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md +++ b/sources/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md @@ -1,3 +1,4 @@ +zpl1025 Ubuntu Could Give a Fatal Blow to Windows in China ================================================================================ > Ubuntu Kylin might be able to replace Windows in China @@ -33,4 +34,4 @@ via: http://news.softpedia.com/news/Ubuntu-Could-Give-a-Fatal-Blow-to-Windows-in [a]:http://news.softpedia.com/editors/browse/silviu-stahie [1]:http://news.softpedia.com/news/China-Starts-Windows-Eradication-15-of-Govt-PCs-to-Switch-to-Linux-Every-Year-463393.shtml [2]:http://news.softpedia.com/news/Ubuntu-Kylin-14-10-Utopic-Unicorn-Consolidates-Its-Position-in-China-463068.shtml -[3]:https://insights.ubuntu.com/2014/10/29/interview-nudt-talks-ubuntu-kylin-and-its-14-10-release/ \ No newline at end of file +[3]:https://insights.ubuntu.com/2014/10/29/interview-nudt-talks-ubuntu-kylin-and-its-14-10-release/ From fe69be902d531c36b4bbec951eb0fae5f1e6cf6e Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 4 Nov 2014 11:20:29 +0800 Subject: [PATCH 099/316] =?UTF-8?q?20141104-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...and New Developer Web Browser Next Week.md | 41 +++++++++++ ...es GTK HeaderBar, Squashes Umpteen Bugs.md | 69 +++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 sources/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md create mode 100644 sources/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md diff --git a/sources/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md b/sources/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md new file mode 100644 index 0000000000..154943e4f0 --- /dev/null +++ b/sources/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md @@ -0,0 +1,41 @@ +Mozilla to Launch Brand New Developer Web Browser Next Week +================================================================================ +**When you woke up this morning you probably didn’t expect to come online and see the words ‘Mozilla’, ‘New’, and ‘Web Browser’ writ large across the web. ** + +But that my bed-headed compadre is precisely what you’re looking at. + +注:youtube 视频地址,发布的时候不行做个链接吧 + + +### Mozilla – Pushing Boundaries ### + +Mozilla has always been at the forefront of pushing open source, open standards and open access. They steer one of the most popular desktop browsers in the world. Their open-source Linux mobile OS [is sold on 12 smartphones from 13 operators in 24 countries][1]. They’re [even taking on the Google Chromecast][2]! + +Their desire to democratise the web shows no sign of abating. In a teaser posted on the Mozilla Blog this morning the company has announced a new effort to push boundaries further — this time for developers rather than users. + +Teased as something “unique but familiar”, the company intend to release a brand new browser based on Firefox but designed by developers, for developers. Mozilla say it integrates “powerful new tools like [WebIDE][3] and the [Firefox Tools Adapter][4]”. + +> “When building for the Web, developers tend to use a myriad of different tools which often don’t work well together. This means you end up switching between different tools, platforms and browsers which can slow you down and make you less productive.” + +### #Fx10 ### + +The “Firefox Developer Browser” is being touted for an initial release date of November 10. It’s not yet known what platforms it will target but since this is a) Mozilla and b) aimed at developers it’d be a huge shock if Linux builds weren’t readily available on day dot. + +Mozilla say those interested should sign up for their [Hacks newsletter][5] to receive notification when the browser is released. + +-------------------------------------------------------------------------------- + +via: www.omgubuntu.co.uk/2014/11/mozilla-launch-brand-new-developer-focused-web-browser + +作者:[Joey-Elijah Sneddon ][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://twitter.com/firefox/status/522175938952716289 +[2]:http://www.omgchrome.com/mozillas-chromecast-rival-leaks-online/ +[3]:https://hacks.mozilla.org/2014/06/webide-lands-in-nightly/ +[4]:https://hacks.mozilla.org/2014/09/firefox-tools-adapter/ +[5]:https://hacks.mozilla.org/newsletter/ \ No newline at end of file diff --git a/sources/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md b/sources/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md new file mode 100644 index 0000000000..c8c052c82f --- /dev/null +++ b/sources/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md @@ -0,0 +1,69 @@ +Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs +================================================================================ +**I’m a big fan of the [Pitivi video editor][1]. It might not (yet, at least) be the most whizz-bang or feature-filled non-linear editor available on Linux but it is one of the most reliable! ** + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/pitivi-tile.jpg) + +So, naturally, I was expecting to see a new beta release of the open-source editor [go live at the weekend][2]. + +Pitivi 0.94 is the fourth release based on the new ‘GStreamer Editing Services’ library (GES). + +Project member Jean-François Fortin Tam, also known by the handle ‘Nekohayo‘, describes the update on his blog as ”**…mainly a maintenance release, but it does pack a few interesting improvements & features in addition to the bug fixes.**” + +### What’s new? ### + +Interesting improvements indeed! The most noticeable change in Pitivi 0.94 is the switch to GNOME’s client-side GTK HeaderBar decoration. HeaderBars unify the window bar, title bar and toolbar into one, saving a huge amount of wasted vertical and horizontal space in the process. + +“*Once you try it, you can’t go back,*” says Fortin Tam. A quick glance at the screenshot below and you’ll be nodding in agreement. + +![Pitivi now uses GTK HeaderBar and menu button (image: Nekohayo)](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/pitivi-0.94-headerbar.jpeg) + +Pitivi now uses GTK HeaderBar and menu button (image: Nekohayo) + +What about the app menu? No fear; the consolidation sees the introduction of an app menu button, as per the GNOME human interface guidelines. + +#### Fixes, Fixes, Fixes #### + +There’s also a slew of important bug fixes and stability improvements bundled up, including fixes for those running the editor outside of GNOME Shell and/or a Linux distribution shipping with a broken version of [COGL][3] (yes, even Ubuntu). + +Elsewhere: + +- Positioning of UI components on fresh install has been improved +- Undocked window components do not shift position on startup +- Effects can be reordered within a clip’s properties +- Title editor UI has been simplified +- Global undo/redo fix +- Timeline UI animations have been tweaked +- Editor ported to Python 3 + +Further details can be found in the official [release notes][4]. + +### Getting Better ### + +All of the above reads great, right? Well, the next release should be even better. That’s not just usual developer hyperbole, as Jean-François explains: + +> “The next release (0.95) will run on top of a refined and incredibly more robust backend thanks to the work that Mathieu [Duponchelle] and Thibault [Saunier] have been doing to replace GNonLin by NLE (the new non-linear engine for GES) and fixing video mixing issues.” + +Ubuntu 14.10 ships with an older (crash-prone) version in the Software Center. To try the latest release in all its glory you can grab an [all-in-one bundle][5] from the Pitivi website¹. + +**Almost €20,000 has been raised as part of the Pitivi [fundraiser][6] helping it creep over the halfway point to a promised 1.0 release. If you’d like to see that arrive faster, skip a grande skinny vanilla latte at Starbucks and donate instead! ** + +*¹At the time of writing the bundles for 0.94 are not linked but you can grab the nightly tars instead. * + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/pitivi-0-94-header-bar-more-features + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://pitivi.org/ +[2]:http://jeff.ecchi.ca/blog/2014/11/02/tricks-or-tracebacks-pitivi-0-94-is-here/ +[3]:http://www.cogl3d.org/about.html +[4]:http://wiki.pitivi.org/wiki/0.94 +[5]:http://fundraiser.pitivi.org/download-bundles +[6]:http://www.omgubuntu.co.uk/2014/02/pitivi-video-editor-fundraising-campaign \ No newline at end of file From fa7b750ec3919473b628650dad12fda32b8fbfa4 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 4 Nov 2014 11:38:00 +0800 Subject: [PATCH 100/316] =?UTF-8?q?20141104-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...res, Here's How To Install It In Ubuntu.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md diff --git a/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md b/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md new file mode 100644 index 0000000000..bab4a4d787 --- /dev/null +++ b/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md @@ -0,0 +1,72 @@ +Cinnamon 2.4 Debuts With New Features, Here’s How To Install It In Ubuntu +================================================================================ +**Adding a pinch of spice to the weekend, Linux Mint has announced a new release of its Cinnamon desktop environment.** + +![New Wallpaper Slideshow Feature](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/wallpaper-sildeshow-applet.jpg) + +New Wallpaper Slideshow Feature + +The latest version of the user-friendly shell will be the centrepiece of Linux Mint 17.1, [the first point release in the distro’s new LTS approach][1], due later this month. + +### New In Cinnamon 2.4 ### + +Cinnamon 2.4 comes with a raft of welcome features, improvements and overall polish, such as reduced memory usage, new ‘Privacy’ and ‘Notifications’ settings and desktop wallpaper slideshows. + +The [official release notes][2] highlight some of the bigger changes, including: + +- Cinnamon desktop starts with “zoom” animation +- 30 memory leaks fixed as part of code review +- ‘Super+e’ shortcut opens ‘Home’ folder +- Desktop font can now be customised +- Timeout in ‘Logout dialog’ has been removed +- ‘Theme and Background’ settings redesigned +- Background slideshow support (plus new panel applet controller) +- ‘Notification and Privacy’ settings pane added + +![Some say Nemo is the best file manager for Linux](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/nemo-file-manager-24-750x368.jpg) + +Some say Nemo is the best file manager for Linux + +The Nemo file manager also benefits from the following improvements: + +- Redesigned toolbar +- ‘nemo-emblems‘ extension supports adding emblems to folders +- Sidebar hover highlight effects +- ‘Smarter dynamic bookmark section’ in sidebar +- Folder colours can be quickly configured using nemo-folder-color-switcher (not yet released) + +### Upgrade to or Install Cinnamon 2.4 in Ubuntu ### + +If **you favour stability you should not upgrade to Cinnamon 2.4 in Ubuntu** yet. New releases of Cinnamon arrive a month before Linux Mint for the specific purpose of testing, ironing out bugs and gathering feedback. + +But if the above sounds more like a reason to try rather than avoid, Cinnamon 2.4 can be installed in Ubuntu 14.04 LTS and Ubuntu 14.10 using the following Cinnamon nightly PPA: + + sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-nightly + +Followed by: + + sudo apt-get update && sudo apt-get install cinnamon + +Already have Cinnamon installed? I’d advise running the following command in lieu of the one above. This will ensure that any package conflicts are automatically resolved by the package manager: + + sudo apt-get update && sudo apt-get dist-upgrade + +Installed and want shot? That’s easy enough; you can remove Cinnamon 2.4 and the bulk of its configuration files, dependencies and cruft by running this command: + + sudo apt-get purge cinnamon + +**If you try it out, let us know what you make of the changes in the comments below — and be sure to share a screenshot or two, too! ** + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/install-cinnamon-2-4-ubuntu-14-04-lts + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://blog.linuxmint.com/?p=2688 +[2]:http://segfault.linuxmint.com/2014/11/cinnamon-2-4/ \ No newline at end of file From b6abae648b02dd940c7350cda3e58b54450a1920 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 4 Nov 2014 11:56:43 +0800 Subject: [PATCH 101/316] =?UTF-8?q?20141104-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dmin) On Ubuntu 14.10 or 14.04 or 13.10.md | 348 ++++++++++++++++++ 1 file changed, 348 insertions(+) create mode 100644 sources/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md diff --git a/sources/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md b/sources/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md new file mode 100644 index 0000000000..a7623855cc --- /dev/null +++ b/sources/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md @@ -0,0 +1,348 @@ +Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10/14.04/13.10 +================================================================================ +**LEMP** is a combination of the operating system and open-source software stack. The acronym LEMP comes from the first letters of **L**inux, Nginx(**e**ngine-x) HTTP Server, **M**ySQL database, and **P**HP/**P**erl/**P**ython. + +In this tutorial, let us see how to install Nginx, MySQL or MariaDB, PHP and phpMyAdmin on Ubuntu 14.10. + +### Install Nginx ### + +**Nginx** (pronounced as engine-x) is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server written by Igor Sysoev. + +To install Nginx enter the following command in your terminal: + +**Note**: If you have already installed apache2 in your system, remove it first to avoid conflicts. To uninstall apache, run the following commands: + + sudo apt-get purge apache2* + sudo apt-get autoremove -y + +Now, install nginx using command: + + sudo apt-get install nginx + +Start Nginx service using the command: + + sudo service nginx start + +### Test nginx ### + +Open up your web browser and navigate to http://ip-address/ or http://localhost/. You will see a screen something like below. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Welcome-to-nginx-Mozilla-Firefox_005.png) + +### Configure Nginx ### + +Open the file **/etc/nginx/nginx.conf** in any editor: + + sudo nano /etc/nginx/nginx.conf + +Set the worker_processes (i.e No. of CPU’s in your system). To see the no. of CPU’s, use the command “lscpu”. In my case it’s “1″. So I set this as ’1′. + + worker_processes 1; + +Restart Nginx service: + + sudo service nginx restart + +The default vhost(server block) is defined in the **/etc/nginx/sites-available/default** file. + +Open the file /etc/nginx/sites-available/default in any editor. + + sudo nano /etc/nginx/sites-available/default + +Under the Server section, set the server FQDN or IP address as shown below. Make sure you’ve added a index.php line. + + [...] + server { + listen 80 default_server; + listen [::]:80 default_server ipv6only=on; + root /usr/share/nginx/html; + index index.php index.html index.htm; + # Make site accessible from http://localhost/ + server_name server.unixmen.local; + [...] + +Here, + +- **listen 80;** –> listen for ipv4 +- **listen [::]:80 default_server ipv6only=on;** –> listen for ipv6 +- **root /usr/share/nginx/html;** –> document root directory. +- **server_name server.unixmen.local;** –> Server FQDN. + +Now, scroll down further and find the section #location **~ \.php$**. Uncomment and modify the following lines as shown below. + + location ~ \.php$ { + try_files $uri =404; ---------> Add this line + fastcgi_split_path_info ^(.+\.php)(/.+)$; + # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini + # + # # With php5-cgi alone: + # fastcgi_pass 127.0.0.1:9000; + # # With php5-fpm: + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_index index.php; + include fastcgi.conf; + } + +Here, I added an extra line **‘try_files $uri =404;’** to prevent zero day exploits. + +Save and exit the file. + +### Test nginx configuration ### + +Test the nginx configuration for any syntax errors using command: + + sudo nginx -t + +Sample output: + + nginx: the configuration file /etc/nginx/nginx.conf syntax is ok + nginx: configuration file /etc/nginx/nginx.conf test is successful + +Finally restart nginx service + + sudo service nginx restart + +### Install MySQL ### + +**MySQL** is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases, though SQLite probably has more total embedded deployments + + sudo apt-get install mysql-server mysql-client + +During installation, you’ll be asked to setup the MySQL root user password. Enter the password and click Ok. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_001.png) + +Re-enter the password. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_0021.png) + +Now, MySQL server has been installed. + +You can verify the MySQL server status using command: + + sudo service mysql status + +Sample output: + + mysql start/running, process 5671 + +**Note**: If you want to use MariaDB instead of MySQL, then follow the below steps. + +### Install MariaDB ### + +**MariaDB** is a drop in replacement for MySQL. It is a robust, scalable and reliable SQL server that comes rich set of enhancements. + +First you have to remove existing MySQL packages if any. To completely uninstall MySQL with configuration files, enter the following command: + + sudo apt-get purge mysql* + +Run the following command to remove unwanted packages. + + sudo apt-get autoremove + +After removing MySQL, run the following command to install MariaDB. + + sudo apt-get install mariadb-server mariadb-client + +Alternatively, you can install it from [MariaDB repository][1] if you want to try most recent version of MariaDB. Run the following commands to add PPA. As of writing this, MariaDB PPA is not yet updated to Ubuntu 14.10. However, we can use the repository of Ubuntu 14.04 instead. + + sudo apt-get install software-properties-common + sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db + sudo add-apt-repository 'deb http://sgp1.mirrors.digitalocean.com/mariadb/repo/5.5/ubuntu trusty main' + +Update the software sources list and install MariaDB using following commands: + + sudo apt-get update + sudo apt-get install mariadb-server mariadb-client -y + +During installation you will be asked to set database ‘root’ user password. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_0031.png) + +Re-enter password: + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_004.png) + +Click Yes to migrate to MariaDB. Note that you’ll not be asked this question if you install MariaDB before MySQL. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_005.png) + +You can check the MariaDB version using command: + + sudo mysql -v -u root -p + +Sample output: + + Welcome to the MariaDB monitor. Commands end with ; or \g. + Your MariaDB connection id is 34 + Server version: 5.5.39-MariaDB-2 (Ubuntu) + + Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. + + Reading history-file /home/sk/.mysql_history + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + +Check if mariadb is running or not, using the following command: + + sudo service mysql status + +Sample output: + + * /usr/bin/mysqladmin Ver 9.0 Distrib 5.5.39-MariaDB, for debian-linux-gnu on x86_64 + Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. + + Server version 5.5.39-MariaDB-2 + Protocol version 10 + Connection Localhost via UNIX socket + UNIX socket /var/run/mysqld/mysqld.sock + Uptime: 2 min 21 sec + + Threads: 1 Questions: 566 Slow queries: 0 Opens: 330 Flush tables: 4 Open tables: 22 Queries per second avg: 4.014 + +### Install PHP ### + +**PHP** (recursive acronym for PHP: Hypertext Preprocessor) is a widely used open-source general purpose scripting language that is especially suited for web development and can be embedded into HTML. + +Install PHP with following command: + + sudo apt-get install php5 php5-fpm php5-mysql + +### Configure PHP ### + +Open **php.ini** file in any editor: + + sudo nano /etc/php5/fpm/php.ini + +Find the line ‘cgi.fix_pathinfo=1′, uncomment it and change the value 1 to 0. + + cgi.fix_pathinfo=0 + +Now restart php-fpm service. + + sudo service php5-fpm restart + +### Test PHP ### + +Create a sample “testphp.php” file in nginx document root folder. + + sudo nano /usr/share/nginx/html/testphp.php + +Add the following lines in it. + + + +Save and exit the file. + +Navigate to **http://server-ip-address/testphp.php**. It will display all the details about php such as version, build date and commands etc. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/phpinfo-Mozilla-Firefox_0012.png) + +PHP-FPM listens on the socket **/var/run/php5-fpm.sock** by default. If you want to make PHP-FPM use a TCP connection, open the file **/etc/php5/fpm/pool.d/www.conf**, + + sudo nano /etc/php5/fpm/pool.d/www.conf + +Find the line listen = /var/run/php5-fpm.sock, + + ;listen = /var/run/php5-fpm.sock + +and modify it to **listen = 127.0.0.1:9000**. + + listen = 127.0.0.1:9000 + +Save and exit the file. Restart php5-fpm service. + + sudo service php5-fpm restart + +Now open the nginx configuration file: + + sudo nano /etc/nginx/sites-available/default + +Find the line **fastcgi_pass unix:/var/run/php5-fpm.sock;** and change it to fastcgi_pass 127.0.0.1:9000; as shown below. + + location ~ \.php$ { + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$;fastcgi_pass 127.0.0.1:9000; + # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini + # + # # With php5-cgi alone: + fastcgi_pass 127.0.0.1:9000; + # # With php5-fpm: + # fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_index index.php; + include fastcgi.conf; + } + +Save and exit the file. Finally restart nginx service. + + sudo service nginx restart + +### Manage MySQL Databases Using phpMyAdmin (Optional) ### + +**phpMyAdmin** is a free open-source web interface tool used to manage your MySQL databases. + +### Install phpMyAdmin ### + +It is available in the Official Debian repositories. So install it with command: + + sudo apt-get install phpmyadmin + +Select any webserver. By default, nginx will not be displayed here. So, select apache or lighttpd, and we will link phpmyadmin to work with nginx webserver later. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_007.png) + +Select Yes to configure database for phpmyadmin with dbconfig-common. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_008.png) + +Enter password of the database’s administrative user. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_009.png) + +Enter MySQL application password phpmyadmin. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_010.png) + +Re-enter the password. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_011.png) + +The phpMyAdmin installation has been completed. + +Create a symbolic link between phpMyAdmin and the website root directory. Here our website root document directory is /usr/share/nginx/html/. + + sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/html + +Restart nginx server. + + sudo service nginx restart + +### Access phpMyAdmin Web Console ### + +Now you can access the phpmyadmin console by navigating to **http://server-ip-address/phpmyadmin/** from your browser. + +Enter your MySQL username and password which you have given in previous steps. In my case its “root” and “ubuntu”. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/phpMyAdmin-Mozilla-Firefox_0021.png) + +You will be redirected to PhpMyAdmin main web interface. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/192.168.1.100-localhost-phpMyAdmin-4.2.6deb1-Mozilla-Firefox_0031.png) + +Now you can manage your MySQL databases from phpMyAdmin web interface. + +That’s it. Your LEMP server is now up and ready to use. + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/install-lemp-server-nginx-mysql-mariadb-php-phpmyadmin-ubuntu-14-1014-0413-10/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:https://downloads.mariadb.org/mariadb/repositories/#mirror=tsinghua \ No newline at end of file From 44d1390f75492caa067a2f3efab990c9d394fb6c Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 4 Nov 2014 13:43:54 +0800 Subject: [PATCH 102/316] =?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 --- translated/talk/20140828 Interesting facts about Linux.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/translated/talk/20140828 Interesting facts about Linux.md b/translated/talk/20140828 Interesting facts about Linux.md index 689003b93b..f00d843c44 100644 --- a/translated/talk/20140828 Interesting facts about Linux.md +++ b/translated/talk/20140828 Interesting facts about Linux.md @@ -1,8 +1,8 @@ -Linux趣事 +关于Linux的趣事 ================================================================================ -今天,8月25号,是Linux的第23个生日。1991年,8月25日,21岁的赫尔辛基大学的学生发布了举世闻名的[新闻组][1](Usenet post),标志着现在世界著名的Linux正式诞生。 +8月25号,是Linux的第23个生日。1991年,8月25日,一位21岁的赫尔辛基大学的学生发布了举世闻名的[新闻组][1](Usenet post),标志着现在世界著名的Linux正式诞生。 -23年以后的今天,linux已经无处不在,不仅仅被安装于桌面系统,[智能手机][2]和嵌入式系统,甚至也被[龙头企业][3]用于他们的关键系统,比如说像[美国海军的核潜艇][4](US Navy's nuclear submarines)和[联邦航空局的空中管制系统][5](FAA's air traffic control)。进入无处不在的云计算时代,linux在云计算平台方面仍然保持着它的优势。 +23年以后的现在,Linux已经无处不在,不仅仅被安装于终端用户的桌面系统,[智能手机][2]和嵌入式系统,甚至也被[龙头企业][3]用于他们的关键系统,比如[美国海军的核潜艇][4](US Navy's nuclear submarines)和[联邦航空局的空中管制系统][5](FAA's air traffic control)。Linux进入了无处不在的云计算时代,在云计算平台方面仍然保持着它的优势。 今天,我们一起庆祝linux 23岁生日,就让我们告诉你**一些你可能不知道的linux趣事和linux历史**。如果有什么要补充的,请在评论中分享出来。在这篇文章里,我可能用会用“linux”,“kernel”和“Linux kernel”来表示同一个意思。 @@ -14,7 +14,7 @@ Linux趣事 3.在世界上,Linux已经被[13,036个贡献者][10]创建和修改。当然,贡献最多的还是Linus Torvalds自己。直到目前,他提交了20,000次以上的代码。下图显示了所有提交次数最多的前十位Linux贡献者。 -![](https://farm4.staticflickr.com/3837/14841786838_7a50625f9d_b.jpg) +![](https://farm4.staticflickr.com/3837/14841786838_7a50625f9d_b.jpg) 4.Linux的代码行(SLOC)有超过1700万行。估计整个代码库的花费大概是5,526人年,或者是超过300M(1M=10*1000万亿)美元,[基于模型的基本估算法][11](basic COCOMO model)。 From 573b37680a1983fe3ab61cf2c941dbabb62dc407 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 4 Nov 2014 14:15:57 +0800 Subject: [PATCH 103/316] PUB:20140924 7 killer open source monitoring tools @barney-ro --- ...4 7 killer open source monitoring tools.md | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) rename {translated/talk => published}/20140924 7 killer open source monitoring tools.md (71%) diff --git a/translated/talk/20140924 7 killer open source monitoring tools.md b/published/20140924 7 killer open source monitoring tools.md similarity index 71% rename from translated/talk/20140924 7 killer open source monitoring tools.md rename to published/20140924 7 killer open source monitoring tools.md index 125ddf62e8..f86ab1bd4f 100644 --- a/translated/talk/20140924 7 killer open source monitoring tools.md +++ b/published/20140924 7 killer open source monitoring tools.md @@ -2,31 +2,33 @@ ================================================================================ 想要更清晰的了解你的网络吗?没有比这几个免费的工具更好用的了。 -网络和系统监控是一个很宽的范畴。有监控服务器正常工作,网络设备,应用的方案。也有跟踪这些系统和设备性能,提供趋势性能分析的解决方案。有些工具像个闹钟一样,当发现问题的时候就会报警,而另外的一些工具甚至可以在警报响起的时候触发一些动作。这里,收集了一些开源的工具,旨在解决上述的一些甚至大部分问题。 +![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_01-netmon-intro-100448913-gallery.idge.jpg) + +网络和系统监控是一个很宽的范畴。有监控服务器、网络设备、应用正常工作的方案,也有跟踪这些系统和设备性能,提供趋势性能分析的解决方案。有些工具像个闹钟一样,当发现问题的时候就会报警,而另外的一些工具甚至可以在警报响起的时候触发一些动作。这里,收集了一些开源的工具,旨在解决上述的一些甚至大部分问题。 ### Cacti ### ![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_02-netmon-cacti-100448914-orig.jpg) -Cacti是一个性能广泛的图表和趋势分析工具,可以用来跟踪,并且几乎可以绘制出任何可监测指标,并描绘出图表。从硬盘的利用率到风扇的转速,在一个电脑管理系统中,只要是可以被监测的指标,Cacti都可以监测,并快速的转换成可视化的图表。 +Cacti是一个性能广泛的图表和趋势分析工具,可以用来跟踪并几乎可以绘制出任何可监测指标,描绘出图表。从硬盘的利用率到风扇的转速,在一个电脑管理系统中,只要是可以被监测的指标,Cacti都可以监测,并快速的转换成可视化的图表。 ### Nagios ### ![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_03-netmon-nagios-100448915-orig.jpg) -Nagios是一个经典的老牌系统和网络监测工具。运行速度快,可靠,需要针对应用定制。Nagios对于初学者是一个挑战。但是它的极其复杂的配置正好也反应出它的强大,因为它几乎可以适用于任何监控任务。要说缺点的话就是不怎么耐看,但是其强劲的动力和可靠性弥补了这个缺点。 +Nagios是一个经典的老牌系统和网络监测工具。运行速度快,可靠,需要针对应用定制。Nagios对于初学者是一个挑战。但是它的极其复杂的配置正好也反应出它的强大,因为它几乎可以适用于任何监控任务。要说缺点的话就是不怎么耐看,但是其强劲的功能和可靠性弥补了这个缺点。 ### Icinga ### ![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_04-netmon-icinga-100448916-orig.jpg) -Icinga 是一个正在重建的Nagios的分支,它提供了一个全面的监控和警报的框架,致力于设计一个像Nagios一样的开放的和可扩展性的平台。但是和Nagios拥有不一样的Web界面。Icinga 1 是Nagios非常的相近,不过Icinga 2就重写了。两个版本都能很好的兼容,而且,Nagios用户可以很轻松的转到Icinga 1平台。 +Icinga 是一个正在重建的Nagios的分支,它提供了一个全面的监控和警报的框架,致力于设计一个像Nagios一样的开放和可扩展性的平台。但是和Nagios拥有不一样的Web界面。Icinga 1 和 Nagios非常的相近,不过Icinga 2就重写了。两个版本都能很好的兼容,而且,Nagios用户可以很轻松的转到Icinga 1平台。 ### NeDi ### ![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_05-netmon-nedi-100448917-orig.jpg) -NeDi可能不如其他的工具一样文明全世界,但它确是一个跟踪网络接入的一个强大的解决方案。它可以很流畅的运行网络基础设施和设备目录,保持对任何事件的跟踪。并且可以提供任意设备的当前位置,也包括历史位置。 +NeDi可能不如其他的工具一样闻名全世界,但它确是一个跟踪网络接入的一个强大的解决方案。它可以很流畅的运行网络基础设施和设备目录,保持对任何事件的跟踪。并且可以提供任意设备的当前地点,也包括历史地点。 NeDi可以被用于定位被偷的,或者是丢失掉的设备,只要设备出现在网络上。它甚至可以在地图上显示所有已发现的节点。并且很清晰的告诉人们网络是怎么互联的到物理设备端口的。 @@ -34,15 +36,15 @@ NeDi可以被用于定位被偷的,或者是丢失掉的设备,只要设备 ![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_06-netmon-observium-100448918-orig.jpg) -Observium 综合系统网路在性能趋势监测上有很好的表现,它支持静态和动态发现来确认服务器和网络设备,利用多种监测方法,可以监测任何可用的指标。Web界面非常的整洁,易用。 +Observium 综合了系统和网路监控,在性能趋势监测上有很好的表现,它支持静态和动态发现来确认服务器和网络设备,利用多种监测方法,可以监测任何可用的指标。Web界面非常的整洁,易用。 -就如我们看到的,Observium也可以在地图上显示任何被监测节点的实际位置。需要注意的是面板上关于活跃设备和警报的计数。 +就如我们看到的,Observium也可以在地图上显示任何被监测节点的实际地点。需要注意的是面板上关于活跃设备和警报的计数。 ### Zabbix ### ![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_07-netmon-zabbix-100448919-orig.jpg) -Zabbix 利用广泛的矩阵工具监测服务器和网络。代理商的Zabbix针对大多数的操作系统,你可以被动的或者是使用外部检查,包括SNMP来监控主机和网络设备。你也会发现很多提醒和通知设施,和一个非常人性化的Web界面,适用于不同的面板,此外,Zabbix还拥有一些特殊的管理工具来监测Web应用和虚拟化的管理程序。 +Zabbix 利用一系列的工具监测服务器和网络。Zabbix的监控代理支持大多数的操作系统,你可以被动的或者是使用外部检查,包括SNMP来监控主机和网络设备。你也会发现很多提醒和通知设施,和一个非常人性化的Web界面,适用于不同的面板,此外,Zabbix还拥有一些特殊的管理工具来监测Web应用和虚拟化的管理程序。 Zabbix 还可以提供详细的互联图,以便于我们了解某些对象是怎么连接的。这些图是可以定制的,并且,图也可以以被监测的服务器和主机的分组形式被创建。 @@ -50,7 +52,7 @@ Zabbix 还可以提供详细的互联图,以便于我们了解某些对象是 ![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_08-netmon-ntop-100448920-orig.jpg) -Ntop是一个数据包嗅探工具。有一个整洁的Web界面,用来显示被监测网络的实时数据。即时的网络数据通过一个高级的绘图工具可以可视化。主机信息流和主机通信信息对也可以被实时的进行可视化显示。 +Ntop是一个数据包嗅探工具。有一个整洁的Web界面,用来显示被监测网络的实时数据。即时的网络数据通过一个高级的绘图工具可以可视化。主机数据流和与之对应的主机通信信息可以被实时的进行可视化显示。 -------------------------------------------------------------------------------- @@ -58,7 +60,7 @@ via: http://www.networkworld.com/article/2686794/asset-management/164219-7-kille 作者:[Paul Venezia][a] 译者:[barney-ro](https://github.com/barney-ro) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From cd0c5af2508467f1ff48f8c24c1e05078b516023 Mon Sep 17 00:00:00 2001 From: ThomazL Date: Tue, 4 Nov 2014 14:48:50 +0800 Subject: [PATCH 104/316] Translating by ThomazL --- ...w to run SQL queries against Apache log files on Linux.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141030 How to run SQL queries against Apache log files on Linux.md b/sources/tech/20141030 How to run SQL queries against Apache log files on Linux.md index 9ae1a5a76b..1179f663f2 100644 --- a/sources/tech/20141030 How to run SQL queries against Apache log files on Linux.md +++ b/sources/tech/20141030 How to run SQL queries against Apache log files on Linux.md @@ -1,3 +1,6 @@ +>> Translating by ThomazL 11/04/2014 + + How to run SQL queries against Apache log files on Linux ================================================================================ One of the distinguishing features of Linux is that, under normal circumstances, you should be able to know what is happening and has happened on your system by analyzing one or more system logs. Indeed, system logs are the first resource a system administrator tends to look to while troubleshooting system or application issues. In this article, we will focus on the Apache access log files generated by Apache HTTP web server. We will explore an alternative way of analyzing Apache access logs using [asql][1], an open-source tool that allows one to run SQL queries against the logs in order to view the same information in a more friendly format. @@ -135,4 +138,4 @@ via: http://xmodulo.com/sql-queries-apache-log-files-linux.html [a]:http://xmodulo.com/author/gabriel [1]:http://www.steve.org.uk/Software/asql/ -[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html From a3065ecf37b93566fe64f0a28715d0fd11bf8a4e Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 4 Nov 2014 14:53:31 +0800 Subject: [PATCH 105/316] =?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 --- .../20140828 Interesting facts about Linux.md | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/translated/talk/20140828 Interesting facts about Linux.md b/translated/talk/20140828 Interesting facts about Linux.md index f00d843c44..b609bf0397 100644 --- a/translated/talk/20140828 Interesting facts about Linux.md +++ b/translated/talk/20140828 Interesting facts about Linux.md @@ -1,48 +1,46 @@ 关于Linux的趣事 ================================================================================ -8月25号,是Linux的第23个生日。1991年,8月25日,一位21岁的赫尔辛基大学的学生发布了举世闻名的[新闻组][1](Usenet post),标志着现在世界著名的Linux正式诞生。 +2014年8月25日,是Linux的第23个生日。1991年8月25日,一位21岁的赫尔辛基大学的学生发布了举世闻名的[新闻组][1](Usenet post),标志着现在世界著名的Linux正式诞生。 23年以后的现在,Linux已经无处不在,不仅仅被安装于终端用户的桌面系统,[智能手机][2]和嵌入式系统,甚至也被[龙头企业][3]用于他们的关键系统,比如[美国海军的核潜艇][4](US Navy's nuclear submarines)和[联邦航空局的空中管制系统][5](FAA's air traffic control)。Linux进入了无处不在的云计算时代,在云计算平台方面仍然保持着它的优势。 -今天,我们一起庆祝linux 23岁生日,就让我们告诉你**一些你可能不知道的linux趣事和linux历史**。如果有什么要补充的,请在评论中分享出来。在这篇文章里,我可能用会用“linux”,“kernel”和“Linux kernel”来表示同一个意思。 +今天,让我来告诉大家**一些你们可能不知道的Linux趣事和Linux历史**。如果有什么要补充的,请在评论中分享出来。在这篇文章里,我将会用“linux”、“kernel”和“Linux kernel”来表示同一个意思。 -1.关于linux是否是一个开源的操作系统这种争论一直是无休无止的。事实上,“Linux”操作系统的核心组件参照的是Linux kernel(内核)。而反派认为Linux不是一个纯粹的操作系统,因为他们认为仅仅一个内核(kernel),并不是一个操作系统,自由软件的推崇者认为最大的操作系统应叫做“[GNU/Linux][7]”把功劳归于应得的人。(比如:[GNU project][8])。另一方面,一些linux的开发者认为,linux拥有成为一个操作系统的资格,因为它实现了[POSIX标准][9]。 +1.关于linux是否是一个开源的操作系统这种争论一直是无休无止的。事实上,“Linux”操作系统的核心组件参照的是Linux kernel(内核)。而反派认为Linux不是一个纯粹的操作系统,因为他们认为仅仅一个内核(kernel),并不是一个操作系统,自由软件的推崇者认为最大的操作系统应叫做“[GNU/Linux][7]”,把功劳归于应得的人。(比如:[GNU project][8])。另一方面,一些Linux的开发者和程序员认为,Linux拥有成为一个操作系统的资格,因为它实现了[POSIX标准][9]。 -2.从openhub网站的统计来看,绝大部分(95%)的Linux是用C语言写的。第二(2.8%)受欢迎的是汇编语言。毫无疑问,C语言比C++ 的更受欢迎,也表明了linus对C++的立场。下面是Linus编程语言的分类。 +2.从openhub网站的统计来看,绝大部分(95%)的Linux是用C语言写的。第二(2.8%)受欢迎的是汇编语言。毫无疑问,C语言比C++ 的更受欢迎,也表明了Linus对C++的立场。下面是Linus编程语言的分类。 ![](https://farm4.staticflickr.com/3845/15025332121_055cfe3a2c_z.jpg) -3.在世界上,Linux已经被[13,036个贡献者][10]创建和修改。当然,贡献最多的还是Linus Torvalds自己。直到目前,他提交了20,000次以上的代码。下图显示了所有提交次数最多的前十位Linux贡献者。 +3.在全世界,Linux已经被[13,036个贡献者][10]创建和修改。当然,贡献最多的还是Linus Torvalds自己。从Linux创建至今,他提交了20,000次以上的代码。下图显示了总提交次数最多的前十位Linux贡献者。 ![](https://farm4.staticflickr.com/3837/14841786838_7a50625f9d_b.jpg) -4.Linux的代码行(SLOC)有超过1700万行。估计整个代码库的花费大概是5,526人年,或者是超过300M(1M=10*1000万亿)美元,[基于模型的基本估算法][11](basic COCOMO model)。 +4.Linux的代码行(SLOC)超过了1700万行。估计整个代码库的花费大概是5,526人年,或者是超过300M(1M=10*1000万亿)美元,[基于模型的基本估算法][11](basic COCOMO model)。 -5.企业并不是单纯的Linux消费者。他们的员工也在[积极参与][12]Linux的开发。下图显示了前十的Linux内核开发参与的企业员工2013年提交次数的总和。他们包括linux的商业版发行者(Red Hat,SUSE),芯片/嵌入式系统制造商(Intel,Texas Instrument,wolfson),非盈利性组织(Linaro)和其他的IT公司(IBM,Samsung,Google)。 +5.企业并不是单纯的Linux消费者。他们的员工也在[积极参与][12]Linux的开发。下图显示了参与Linux内核开发的企业员工2013年提交次数总和的前十位。他们包括Linux商业版发行者(Red Hat,SUSE),芯片/嵌入式系统制造商(Intel,Texas Instrument,wolfson),非盈利性组织(Linaro)和其它的IT公司(IBM,Samsung,Google)。 ![](https://farm6.staticflickr.com/5573/14841856427_a5a1828245_o.png) -6.Linux的官方吉祥物是“小企鹅”,一个非常可爱的企鹅标志。[第一次提出][13]并决定小企鹅作为Linux吉祥物/标志这个想法的是Linus自己。为什么是小企鹅呢?因为Linus本人很喜欢企鹅,尽管他曾经被一只凶猛的企鹅咬伤过,还导致他得了一场病。 +6.Linux的官方吉祥物是一个非常可爱的小企鹅“Tux”。[第一次提出][13]并决定用小企鹅作为Linux吉祥物/标志这个想法的是Linus自己。为什么是小企鹅呢?因为Linus本人很喜欢企鹅,尽管他曾经被一只凶猛的企鹅咬伤过,还导致他得了一场病。 -7.一个Linux系统“包括”Linux内核、支持GUN的组件和库、和一些第三方的应用。[distrowatch网站][14]显示,现在总共有286个活跃的Linux发行版。其中最老的一个版本叫[Slackware][15],它是从1993年正式发布出来的一个可用的版本。 +7.一个Linux“发行版”包括Linux内核、支持GUN的组件和库、和一些第三方的应用。根据[distrowatch网站][14]的报告,现在总共有286个活跃的Linux发行版。其中最老的一个版本叫[Slackware][15],它是从1993年正式发布出来的一个可用的版本。 -8.Kernel.org是一个Linux源码的主要仓库,曾经在2011年8月被一个匿名的攻击者[攻陷][16],攻击者打算篡改kernel.org的服务器。为了加强linux内核的访问策略的安全性,Linux基金会最近在Linux内核的Git官方托管的仓库上[开启了][17]双重认证。 +8.Kernel.org是一个Linux源码的主要仓库,曾经在2011年8月被一个匿名的攻击者[攻陷][16],攻击者打算篡改kernel.org的服务器。为了加强Linux内核访问策略的安全性,Linux基金会最近在Linux内核的Git官方托管的仓库上[开启了][17]双重认证。 -9.Linux在500强超级计算机中的优势还在[增加][18]。截至2014年6月,运算速度最快的计算机97%都是运行在Linux上面的。 +9.Linux在500强超级计算机中的优势还在[增加][18]。截至2014年6月,世界范围内运算速度最快的计算机97%都是运行在Linux上面的。 10.太空监视(spacewatch),是亚利桑那大学月球与行星实验室的一个研究项目,在GNU/Linux和它的创造者们出现之后,用他们名字命名了几颗小行星([小行星9793 Torvalds][19],[小行星9882 Stallman][20],[小行星9885 Linux][21],[小行星9965 GUN][22]),以表彰他们把开源操作系统用于他们的小行星调查活动。 -11.纵观Linux内核发展得近代史,版本从2.6到3.0有一个很大的跳跃。这个[重编的版本号3][23]实际上并不是意味着Linux内核有什么重大的构建,但却标志着Linux 20周年的一个里程碑。 +11.纵观Linux内核发展的近代史,版本从2.6到3.0有一个很大的跳跃。这个[重编的版本号3][23]实际上并不是意味着Linux内核有什么重大的构建,但却标志着Linux 20周年的一个里程碑。 -12.在2000年的时候,乔帮主还在苹果。他当时就[尝试雇佣][24]Linus Torvalds,让他放弃Linux的开发,转而为“Unix最大的用户群工作”,这个项目后面发展成了MAC OS X。当时,linus拒绝了乔帮主的邀请。 +12.在2000年的时候,乔帮主还在苹果。他当时就[尝试雇佣][24]Linus Torvalds,让他放弃Linux的开发,转而为“Unix最大的用户群工作”,这个项目后面发展成了MAC OS X。当时,Linus拒绝了乔帮主的邀请。 -13.Linux 内核的重启函数[reboot()][25]要求两个神奇的数字,而这第二个数字来自Linus Torvalds和他的3个女儿的出生日期。 +13.Linux 内核的重启函数[reboot()][25]需要两个神奇的数字,而这第二个数字来自Linus Torvalds和他3个女儿的出生日期。 -14.虽然全世界都有Linux的很多粉丝,但是也仍然存在很多对Linux的批评(主要是桌面系统),如缺乏硬件支持,缺乏标准化,由于很短的升级和发布周期导致系统的不稳定,等。2014年Linux内核小组在linuxCon大会上,当Linus被问及Linux的未来将何去何从,他表示“I still want the desktop”(我仍然希望桌面化)。 +14.虽然全世界都有Linux的很多粉丝,但是也仍然存在很多对Linux的批评(主要是针对桌面系统),如缺乏硬件支持,缺乏标准化,由于很短的升级和发布周期导致系统的不稳定等等。2014年Linux内核小组在LinuxCon大会上,当Linus被问及Linux的未来将何去何从,他表示“I still want the desktop”(我仍然希望桌面化)。 -如果你还知道些关于Linux的趣事,请写在评论里。 - -生日快乐,Linux! +如果你还知道一些关于Linux的趣事,请在评论中与我们分享。 -------------------------------------------------------------------------------- @@ -50,7 +48,7 @@ via: http://xmodulo.com/2014/08/interesting-facts-linux.html 作者:[Dan Nanni][a] 译者:[barney-ro](https://github.com/barney-ro) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 8a5567447312cee434fec9f4c1a101d655b1435d Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 4 Nov 2014 16:59:34 +0800 Subject: [PATCH 106/316] =?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 --- .../talk => published}/20140828 Interesting facts about Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/talk => published}/20140828 Interesting facts about Linux.md (100%) diff --git a/translated/talk/20140828 Interesting facts about Linux.md b/published/20140828 Interesting facts about Linux.md similarity index 100% rename from translated/talk/20140828 Interesting facts about Linux.md rename to published/20140828 Interesting facts about Linux.md From b88bab185b1d5529886666767acee80c5e8921aa Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 4 Nov 2014 18:00:42 +0800 Subject: [PATCH 107/316] Translating by ZTinoZ --- ...ke Disk Full Or Can't Write to the Disk.md | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md index 7a34bb7197..d3c2397f39 100644 --- a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md +++ b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md @@ -1,26 +1,25 @@ -Translating by ZTinoZ -8 Tips to Solve Linux & Unix Systems Hard Disk Problmes Like Disk Full Or Can’t Write to the Disk +磁盘写满或磁盘不可写?解决Linux和UNIX系统这些硬盘问题的8个小贴士 ================================================================================ -Can't write to the hard disk on a Linux or Unix-like systems? Want to diagnose corrupt disk issues on a server? Want to find out why you are getting "disk full" messages on screen? Want to learn how to solve full/corrupt and failed disk issues. Try these eight tips to diagnose a Linux and Unix server hard disk drive problems. +不能在Linux或者类UNIX系统的硬盘上写入数据?想解决服务器上磁盘损坏的问题吗?想知道你为什么总是在屏幕上看到“磁盘已满”的字眼吗?想学习处理这些问题的办法吗?试试一下这8个解决Linux及UNIX服务器硬盘问题的小贴士吧。 ![](http://s0.cyberciti.org/uploads/cms/2014/10/welcome-0-disk-problems.001.jpg) -### #1 - Error: No space left on device ### +### #1 - 错误: 设备上无剩余空间 ### -When the Disk is full on Unix-like system you get an error message on screen. In this example, I'm running [fallocate command][1] and my system run out of disk space: +当你的类UNIX系统磁盘写满了时你会在屏幕上看到这样的信息。在这种情况下,我运行[fallocate命令][1]然后我的系统就会提示磁盘空间已经耗尽: $ fallocate -l 1G test4.img fallocate: test4.img: fallocate failed: No space left on device -The first step is to run the df command to find out information about total space and available space on a file system including partitions: +第一步是运行df命令来查看一个有分区的文件系统的总磁盘空间和可用空间的信息: $ df -OR try human readable output format: +或者试试可读性比较强的输出格式: $ df -h -Sample outputs: +部分输出内容: Filesystem Size Used Avail Use% Mounted on /dev/sda6 117G 54G 57G 49% / @@ -34,20 +33,20 @@ Sample outputs: /dev/sda8 94G 579M 89G 1% /ftpusers /dev/sda10 4.0G 4.0G 0 100% /ftpusers/tmp -From the df command output it is clear that /dev/sda10 has 4.0Gb of total space of which 4.0Gb is used. +使用df命令输出可以清楚地发现,在 /dev/sda10 分区下总共4.0Gb的空间被全部写满了。 -#### Fixing problem when the disk is full #### +#### 修复磁盘写满的问题 #### -1.[Compress uncompressed log and other files][2] using gzip or bzip2 or tar command: +1.[用gzip,bzip2或tar命令压缩未压缩的日志和其它文件][2]: gzip /ftpusers/tmp/*.log bzip2 /ftpusers/tmp/large.file.name -2.Delete [unwanted files using rm command][3] on a Unix-like system: +2.在类UNIX系统中[用rm命令删除不想要的文件][3]: m -rf /ftpusers/tmp/*.bmp -3.Move files to other [system or external hard disk using rsync command][4]: +3.[用rsync命令移动文件至其它系统或外置硬盘][4]: rsync --remove-source-files -azv /ftpusers/tmp/*.mov /mnt/usbdisk/ rsync --remove-source-files -azv /ftpusers/tmp/*.mov server2:/path/to/dest/dir/ @@ -252,7 +251,7 @@ I hope these tips will help you troubleshoot system disk issue on a Linux/Unix b via: http://www.cyberciti.biz/datacenter/linux-unix-bsd-osx-cannot-write-to-hard-disk/ 作者:[nixCraft][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 291096c96555e5b6a4802d8c57c6f483d4dd2cdb Mon Sep 17 00:00:00 2001 From: ThomazL Date: Tue, 4 Nov 2014 19:05:52 +0800 Subject: [PATCH 108/316] translated by ThomazL --- ...eries against Apache log files on Linux.md | 141 ----------------- ...eries against Apache log files on Linux.md | 145 ++++++++++++++++++ 2 files changed, 145 insertions(+), 141 deletions(-) delete mode 100644 sources/tech/20141030 How to run SQL queries against Apache log files on Linux.md create mode 100644 translated/tech/20141030 How to run SQL queries against Apache log files on Linux.md diff --git a/sources/tech/20141030 How to run SQL queries against Apache log files on Linux.md b/sources/tech/20141030 How to run SQL queries against Apache log files on Linux.md deleted file mode 100644 index 1179f663f2..0000000000 --- a/sources/tech/20141030 How to run SQL queries against Apache log files on Linux.md +++ /dev/null @@ -1,141 +0,0 @@ ->> Translating by ThomazL 11/04/2014 - - -How to run SQL queries against Apache log files on Linux -================================================================================ -One of the distinguishing features of Linux is that, under normal circumstances, you should be able to know what is happening and has happened on your system by analyzing one or more system logs. Indeed, system logs are the first resource a system administrator tends to look to while troubleshooting system or application issues. In this article, we will focus on the Apache access log files generated by Apache HTTP web server. We will explore an alternative way of analyzing Apache access logs using [asql][1], an open-source tool that allows one to run SQL queries against the logs in order to view the same information in a more friendly format. - -### Background on Apache Logs ### - -There are two kinds of Apache logs: - -- **Access log**: Found at /var/log/apache2/access.log (for Debian) or /var/log/httpd/access_log (for Red Hat). Contains records of every request served by an Apache web server. -- **Error log**: Found at /var/log/apache2/error.log (for Debian) or /var/log/httpd/error_log (for Red Hat). Contains records of all error conditions reported by an Apache web server. Error conditions include, but are not limited to, 403 (Forbidden, usually returned after a valid request missing access credentials or insufficient read permissions), and 404 (Not found, returned when the requested resource does not exist). - -Although the verbosity of Apache access log file can be customized through Apache's configuration files, we will assume the default format in this article, which is as follows: - - Remote IP - Request date - Request type - Response code - Requested resource - Remote browser (may also include operating system) - -So a typical Apache log entry looks like: - - 192.168.0.101 - - [22/Aug/2014:12:03:36 -0300] "GET /icons/unknown.gif HTTP/1.1" 200 519 "http://192.168.0.10/test/projects/read_json/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0" - -But what about Apache error log? Since error log entries dealing with particular requests have corresponding entries in the access log (which you can customize), you can use the access log file to obtain more information about error conditions (refer to example 5 for more details). - -That being said, please note that access log is a system-wide log file. To find the log files of virtual hosts, you may also need to check their corresponding configuration files (e.g., within /etc/apache2/sites-available/[virtual host name] on Debian). - -### Installing asql on Linux ### - -asql is written in Perl, and requires two Perl modules: a DBI driver for SQLite and GNU readline. - -#### Install asql on Debian, Ubuntu or their derivatives #### - -asql and its dependencies will automatically be installed with aptitude on Debian-based distributions. - - # aptitude install asql - -#### Install asql on Fedora, CentOS or RHEL #### - -On CentOS or RHEL, you will need to enable [EPEL repository][2] first, and then run the commands below. On Fedora, proceed to the following commands directly. - - # sudo yum install perl-DBD-SQLite perl-Term-ReadLine-Gnu - # wget http://www.steve.org.uk/Software/asql/asql-1.7.tar.gz - # tar xvfvz asql-1.7.tar.gz - # cd asql - # make install - -### How Does asql Work? ### - -As you can guess from the dependencies listed above, asql converts unstructured plain-text Apache log files into a structured SQLite database, which can be queried using standard SQL commands. This database can be populated with the contents of current and past log files - including compressed rotated logs such as access.log.X.gz. or access_log.old. - -First, launch asql from the command line with the following command - - # asql - -You will be entering asql's built-in shell interface. - -![](https://farm8.staticflickr.com/7493/15477783969_ebedc61afc_o.png) - -Let's type help to list the available commands in the asql shell: - -![](https://farm8.staticflickr.com/7471/15478852650_ffed84ddc2_o.png) - -We will begin by loading all the access logs in asql, which can be done with: - - asql> load - -In case of Debian, the following command will do: - - asql> load /var/log/apache2/access.* - -In case of CentOS/RHEL, use this command instead: - - asql> load /var/log/httpd/access_log* - -When asql finishes loading access logs, we can start querying the database. Note that the database created after loading is "temporary," meaning that if you exit the asql shell, the database will be lost. If you want to preserve the database, you have to save it to a file first. We will see how to do that later (refer to examples 3 and 4). - -![](https://farm8.staticflickr.com/7489/15044293173_f21e38692b_o.png) - -The database contains a table named logs. The available fields in the logs table can be displayed using the show command: - -![](https://farm4.staticflickr.com/3955/15664433685_465e8f47bd_o.png) - -The .asql hidden file, which is stored in each user's home directory, records the history of the commands that were typed by the user in an asql shell. Thus, you can browse through it using the arrow keys, and repeat previous commands by just pressing ENTER when you find the right one. - -### SQL Query Examples with asql ### - -Here a few examples of running SQL queries against Apache log files with asql. - -**Example 1**: Listing the request sources / dates and HTTP status codes returned during the month of October 2014. - - SELECT source, date, status FROM logs WHERE date >= '2014-10-01T00:00:00' ORDER BY source; - -![](https://farm8.staticflickr.com/7488/15664433665_dde4ac1319_z.jpg) - -**Example 2**: Displaying the total size (in bytes) of requests served per client in descending order. - - SELECT source,SUM(size) AS Number FROM logs GROUP BY source ORDER BY Number DESC; - -![](https://farm4.staticflickr.com/3938/15478271548_369541b56c_z.jpg) - -**Example 3**: Saving the database to [filename] in the current working directory. - - save [filename] - -![](https://farm8.staticflickr.com/7576/15664433645_16510d8938_o.png) - -This allows us to avoid the need for waiting while the log parsing is performed with the load command as shown earlier. - -**Example 4**: Restoring the database in a new asql session after exiting the current one. - - restore [filename] - -![](https://farm4.staticflickr.com/3941/15664433635_737e714780_o.png) - -**Example 5**: Returning error conditions logged in the access file. In this example, we will display all the requests that returned a 403 (access forbidden) HTTP code. - - SELECT source,date,status,request FROM logs WHERE status='403' ORDER BY date - -![](https://farm8.staticflickr.com/7551/15478271518_0444582a3d_z.jpg) - -This goes to show that although asql only analyzes access logs, we can use the status field of a request to display requests with error conditions. - -### Summary ### - -We have seen how asql can help us analyze Apache logs and present the results in a user friendly output format. Although you could obtain similar results by using command line utilities such as cat in conjunction with grep, uniq, sort, and wc (to name a few), in comparison asql represents a Swiss army knife due to the fact that it allows us to use standard SQL syntax to filter the logs according to our needs. - -Feel free to leave your questions or comments below. Hope it helps. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/sql-queries-apache-log-files-linux.html - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/gabriel -[1]:http://www.steve.org.uk/Software/asql/ -[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html diff --git a/translated/tech/20141030 How to run SQL queries against Apache log files on Linux.md b/translated/tech/20141030 How to run SQL queries against Apache log files on Linux.md new file mode 100644 index 0000000000..7b6cf358b3 --- /dev/null +++ b/translated/tech/20141030 How to run SQL queries against Apache log files on Linux.md @@ -0,0 +1,145 @@ +如何在 Linux 上针对 Apache 日志文件运行 SQL 查询语句 +================================================ + +Linux 有一个显著的特点,在正常情况下,你可以通过分析系统日志来了解你的系统中发生了什么,或正在发生什么。的确,系统日志是系统管理员在解决系统和应用问题时最需要的第一手资源。我们将在这篇文章中着重讲解 Apache HTTP web server 生成的 Apache access 日志。 + +我们会通过另类的途径分析 Apache access 日志,我们使用的工具是 [asql][1]。asql 是一个开源的工具,它能够允许使用者针对日志运行 SQL 查询,从而通过更加友好的格式展现相同的信息。 + +### Apache 日志背景知识 ### + +Apache 有两种日志: + +- **Access log**:存放在路径 /var/log/apache2/access.log (Debian) 或者 /var/log/httpd/access_log (Red Hat)。Access Log 记录所有 Apache web server 执行的请求。 +- **Error log**:存放在路径 /var/log/apache2/error.log (Debian) 或者 /var/log/httpd/error_log (Red Hat)。Error log 记录所有 Apache web server 报告的错误以及错误的情况。Error 情况包括(不限于)403(Forbidden,通常在有效请求丢失访问许可时被报告),404(Not found,在请求资源不存在时被报告)。 + +虽然管理员可以通过配置 Apache 的配置文件来自定义 Apache access log 的罗嗦程度,在这篇文章中,我们会使用默认的配置,如下: + + Remote IP - Request date - Request type - Response code - Requested resource - Remote browser (may also include operating system) + +因此一个典型的 Apache 日志条目就是下面这个样子: + + 192.168.0.101 - - [22/Aug/2014:12:03:36 -0300] "GET /icons/unknown.gif HTTP/1.1" 200 519 "http://192.168.0.10/test/projects/read_json/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0" + +但是 Apache error log 又是怎么样的呢?因为 error log 条目主要记录 access log 中特殊的请求(你可以自定义),你可以通过 access log 来获得关于错误情况的更多信息(example 5 有更多细节)。 + +话在前头, access log 是系统级别的日志文件。要分析 virtual hosts 的日志文件,你需要检查它们相应的配置文件(e.g. 在 /etc/apache2/sites-available/[virtual host name] 里(Debian))。 + +### 在 Linux 上安装 asql ### + +asql 由 Perl 编写,而且需求以下两个 Perl module:SQLite 的 DBI 驱动以及 GNU readline. + +### 在 Debian, Ubuntu 以及其衍生发行版上安装 asql ### + +使用基于 Debian 发行版上的 aptitude,asql 以及其依赖会被自动安装。 + + # aptitude install asql + +### 在 Fedora,CentOS,RHEL 上安装 asql ### + +在 CentOS 或 RHEL 上,你需要启用 [EPEL repository][2],然后运行以下代码。在 Fedora 中,直接运行以下代码: + + # sudo yum install perl-DBD-SQLite perl-Term-Readline-Gnu + # wget http://www.steve.org.uk/Software/asql/asql-1.7.tar.gz + # tar xvfvz asql-1.7.tar.gz + # cd asql + # make install + +### asql 是如何工作的? ### + +从上面代码中的依赖中你就可以看出来,asql 转换未结构化的明文 Apache 日志成结构化的 SQLite 数据库信息。生成的 SQLite 数据库接受正常的 SQL 查询语句。数据库可以通过当前以及曾经的日志文件生成,其中包括压缩转换过的日志文件,类似 access.log.X.gz 或者 access_log.old。 + +首先,从命令行启动 asql: + + # asql + +你会进入 asql 内置的 shell 交互界面。 + +![](https://farm8.staticflickr.com/7493/15477783969_ebedc61afc_o.png) + +输入 help 列表可执行的命令: + +![](https://farm8.staticflickr.com/7471/15478852650_ffed84ddc2_o.png) + +首先在 asql 中加载所有的 access 日志: + + asql > load + +比如在 Debian 下: + + asql > load /var/log/apache2/access.* + +在 CentOS/RHEL 下: + + asql > load /var/log/httpd/access_log* + +当 asql 完成对 access 日志的加载后,我们就可以开始数据库查询了。注意一下,加载后生成的数据库是 "temporary" 的,意思就是数据库会在你退出 asql 的时候被清除。如果你想要保留数据库,你必须先将其保存为一个文件。我们会在后面介绍如何这么做(参考 example 3 和 4)。 + +![](https://farm8.staticflickr.com/7489/15044293173_f21e38692b_o.png) + +生成的数据库有一个名为 logs 的表。输入下面的命令列出 logs 表中提供的域: + +![](https://farm4.staticflickr.com/3955/15664433685_465e8f47bd_o.png) + +名为 .asql 的隐藏文件,保存于用户的 home 目录下,记录用户在 asql shell 中输入的命令历史。因此你可以使用方向键浏览历史命令,按下 ENTER 来重复执行之前的命令。 + +### asql 上的示例 SQL 查询 ### + +下面是几个使用 asql 针对 Apache 日志文件运行 SQL 查询的示例: + +**Example 1**:列出在 2014 年 10 月中请求的来源 / 时间以及 HTTP 状态码。 + + SELECT source, date, status FROM logs WHERE date >= '2014-10-01T00:00:00' ORDER BY source; + +![](https://farm8.staticflickr.com/7488/15664433665_dde4ac1319_z.jpg) + +**Example 2**:从小到大显示单个客户端处理的请求大小(bytes)。 + + SELECT source, SUM(size), AS NUMBER FROM logs GROUP BY source ORDER BY Number DESC; + +![](https://farm4.staticflickr.com/3938/15478271548_369541b56c_z.jpg) + +**Example 3**:在当前目录中保存数据库为 [filename]。 + + save [filename] + +![](https://farm8.staticflickr.com/7576/15664433645_16510d8938_o.png) + +这样做可以避免使用 load 命令对日志的语法分析所占用的处理时间。 + +**Example 4**:在重新启动 asql 后载入数据库。 + + restore [filename] + +![](https://farm4.staticflickr.com/3941/15664433635_737e714780_o.png) + +**Example 5**:返回 access 日志中记录的 error 情况。在这个例子中,我们将显示所有返回 HTTP 状态码为 403(access forbidden)的请求。 + + SELECT source, date, status, request FROM logs WHERE status='403' ORDER BY date + +![](https://farm8.staticflickr.com/7551/15478271518_0444582a3d_z.jpg) + +这个例子想要表现的是:虽然 asql 只分析 access 日志,我们还是可以通过使用请求的状态域来显示有 error 情况的请求。 + +### 小结: ### + +我们体验了 asql 如何帮助我们分析 Apache 日志文件,并将结果通过友好的格式输出。虽然你也可以通过使用命令行的工具(例如 cat 与 grep,uniq,sort,wc 等等之间的管道)来实现类似功能,与此比较起来 asql 展示了它如同瑞士军刀一般的强大功能,使我们在自己的需求下能够通过标准 SQL 查询语句来过滤日志。 + +希望这篇教程能帮助到你们。 + +请不要拘束地将评论文章,分享文章,提出疑问。 + + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/sql-queries-apache-log-files-linux.html + +作者:[Gabriel Cánepa][a] +译者:[ThomazL](https://github.com/ThomazL) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:http://www.steve.org.uk/Software/asql/ +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html + From 865ec046298077c6e32e36857dc93a3e8052fa7b Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Tue, 4 Nov 2014 21:43:36 +0800 Subject: [PATCH 109/316] [Translating] Mozilla to Launch Brand New Developer Web Browser Next Week --- ...zilla to Launch Brand New Developer Web Browser Next Week.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md b/sources/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md index 154943e4f0..be831ebc7e 100644 --- a/sources/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md +++ b/sources/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md @@ -1,3 +1,5 @@ +Translating---------geekpi + Mozilla to Launch Brand New Developer Web Browser Next Week ================================================================================ **When you woke up this morning you probably didn’t expect to come online and see the words ‘Mozilla’, ‘New’, and ‘Web Browser’ writ large across the web. ** From 02ce08143c8cb6d71a604aeee1b102e9fb72d545 Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Tue, 4 Nov 2014 22:17:16 +0800 Subject: [PATCH 110/316] [Translated] Mozilla to Launch Brand New Developer Web Browser Next Week --- ...and New Developer Web Browser Next Week.md | 43 ------------------- ...and New Developer Web Browser Next Week.md | 42 ++++++++++++++++++ 2 files changed, 42 insertions(+), 43 deletions(-) delete mode 100644 sources/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md create mode 100644 translated/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md diff --git a/sources/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md b/sources/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md deleted file mode 100644 index be831ebc7e..0000000000 --- a/sources/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md +++ /dev/null @@ -1,43 +0,0 @@ -Translating---------geekpi - -Mozilla to Launch Brand New Developer Web Browser Next Week -================================================================================ -**When you woke up this morning you probably didn’t expect to come online and see the words ‘Mozilla’, ‘New’, and ‘Web Browser’ writ large across the web. ** - -But that my bed-headed compadre is precisely what you’re looking at. - -注:youtube 视频地址,发布的时候不行做个链接吧 - - -### Mozilla – Pushing Boundaries ### - -Mozilla has always been at the forefront of pushing open source, open standards and open access. They steer one of the most popular desktop browsers in the world. Their open-source Linux mobile OS [is sold on 12 smartphones from 13 operators in 24 countries][1]. They’re [even taking on the Google Chromecast][2]! - -Their desire to democratise the web shows no sign of abating. In a teaser posted on the Mozilla Blog this morning the company has announced a new effort to push boundaries further — this time for developers rather than users. - -Teased as something “unique but familiar”, the company intend to release a brand new browser based on Firefox but designed by developers, for developers. Mozilla say it integrates “powerful new tools like [WebIDE][3] and the [Firefox Tools Adapter][4]”. - -> “When building for the Web, developers tend to use a myriad of different tools which often don’t work well together. This means you end up switching between different tools, platforms and browsers which can slow you down and make you less productive.” - -### #Fx10 ### - -The “Firefox Developer Browser” is being touted for an initial release date of November 10. It’s not yet known what platforms it will target but since this is a) Mozilla and b) aimed at developers it’d be a huge shock if Linux builds weren’t readily available on day dot. - -Mozilla say those interested should sign up for their [Hacks newsletter][5] to receive notification when the browser is released. - --------------------------------------------------------------------------------- - -via: www.omgubuntu.co.uk/2014/11/mozilla-launch-brand-new-developer-focused-web-browser - -作者:[Joey-Elijah Sneddon ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://twitter.com/firefox/status/522175938952716289 -[2]:http://www.omgchrome.com/mozillas-chromecast-rival-leaks-online/ -[3]:https://hacks.mozilla.org/2014/06/webide-lands-in-nightly/ -[4]:https://hacks.mozilla.org/2014/09/firefox-tools-adapter/ -[5]:https://hacks.mozilla.org/newsletter/ \ No newline at end of file diff --git a/translated/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md b/translated/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md new file mode 100644 index 0000000000..786f2b12c1 --- /dev/null +++ b/translated/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md @@ -0,0 +1,42 @@ +Mozilla 下周发布全新的开发者浏览器 +================================================================================ +**当你早晨醒来的时候,你可能没有期望在网上看到‘Mozilla’、‘新的’,‘浏览器’这样的词。** + +但是我手上的正是你要找的。 + + +注:youtube 视频地址,发布的时候不行做个链接吧 + + +### Mozilla – 推动前沿 ### + +Mozilla已经一直在推动开源,开放标准和开放的最前沿。他们引导了世界上最流行的桌面浏览器之一。他们的开源Linux移动操作系统[在24个国家的13个运营商的12款手机上出售][1]。他们[甚至在谷歌的Chromecast上运行][2]! + +他们渴望民主化web没有减弱的迹象。今早在Mozilla博客上发布的一篇文章传达了公司宣布在推动前沿上的努力- 这次是对于开发者而不是用户而言的。 + +这被打趣为“独特但又熟悉”,公司打算发布基于Firefox,由开发人员设计,针对开发人员提供的全新的浏览器。 Mozilla说它集成了“像[WebIDE][3]和[Firefox工具适配器][4]这样强大的新工具。 + +>“在构建Web时,开发人员倾向于使用不同的工具,但这往往不能很好地协同工作。这意味着你不用在不同的工具、平台和浏览器等这些会减缓你开发效率的工作中切换了 + +### #Fx10 ### + +“Firefox开发者”版声称会在11.10发布。 现在还不知道它支持的平台,但是它第一它是Mozilla,第二针对的是开发者,所以如果在那天没有Linux版本的话将会是一件很意外的事情。 + +Mozilla说感兴趣的人可以注册他们的[黑客简讯][5]来在浏览器发布的时候收到通知。 + +-------------------------------------------------------------------------------- + +via: www.omgubuntu.co.uk/2014/11/mozilla-launch-brand-new-developer-focused-web-browser + +作者:[Joey-Elijah Sneddon ][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://twitter.com/firefox/status/522175938952716289 +[2]:http://www.omgchrome.com/mozillas-chromecast-rival-leaks-online/ +[3]:https://hacks.mozilla.org/2014/06/webide-lands-in-nightly/ +[4]:https://hacks.mozilla.org/2014/09/firefox-tools-adapter/ +[5]:https://hacks.mozilla.org/newsletter/ \ No newline at end of file From 53cfcac763006f4b758e3cea844aaa9225d673b3 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 5 Nov 2014 10:16:59 +0800 Subject: [PATCH 111/316] Translating by ZTinoZ --- ...ke Disk Full Or Can't Write to the Disk.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md index d3c2397f39..1ba0bca947 100644 --- a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md +++ b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md @@ -44,42 +44,42 @@ 2.在类UNIX系统中[用rm命令删除不想要的文件][3]: - m -rf /ftpusers/tmp/*.bmp + rm -rf /ftpusers/tmp/*.bmp 3.[用rsync命令移动文件至其它系统或外置硬盘][4]: rsync --remove-source-files -azv /ftpusers/tmp/*.mov /mnt/usbdisk/ rsync --remove-source-files -azv /ftpusers/tmp/*.mov server2:/path/to/dest/dir/ -4.[Find out the largest directories or files eating disk space][5] on a Unix-like systesm: +4.在类UNIX系统中[找出最占磁盘空间的目录或文件][5]: du -a /ftpusers/tmp | sort -n -r | head -n 10 du -cks * | sort -rn | head -5.[Truncate a particular file][6]. This is useful for log file: +5.[清空指定文件][6]。这招对日志文件很有效: truncate -s 0 /ftpusers/ftp.upload.log - ### bash/sh etc ## + ### bash/sh等 ## >/ftpusers/ftp.upload.log ## perl ## perl -e'truncate "filename", LENGTH' -6.Find and remove large files that are open but have been deleted on Linux or Unix: +6.找出并删除打开着但是Find and remove large files that are open but have been deleted on Linux or Unix: - ## Works on Linux/Unix/OSX/BSD etc ## + ## 基于Linux/Unix/OSX/BSD等系统 ## lsof -nP | grep '(deleted)' - ## Only works on Linux ## + ## 只基于Linux ## find /proc/*/fd -ls | grep '(deleted)' -To truncate it: +清空它: - ## works on Linux/Unix/BSD/OSX etc all ## + ## 基于Linux/Unix/OSX/BSD等所有系统 ## > "/path/to/the/deleted/file.name" - ## works on Linux only ## + ## 只基于Linux ## > "/proc/PID-HERE/fd/FD-HERE" -### #2 - Is the file system is in read-only mode? ### +### #2 - 文件系统是只读模式吗? ### You may end up getting an error such as follows when you try to create a file or save a file: From fbcbe940403ee84f28ddc88f07011cf83090027d Mon Sep 17 00:00:00 2001 From: ThomazL Date: Wed, 5 Nov 2014 10:35:42 +0800 Subject: [PATCH 112/316] translating by thomazl --- ...4 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md b/sources/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md index c8c052c82f..ac1462043f 100644 --- a/sources/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md +++ b/sources/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md @@ -1,3 +1,5 @@ +>> Translating by ThomazL + Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs ================================================================================ **I’m a big fan of the [Pitivi video editor][1]. It might not (yet, at least) be the most whizz-bang or feature-filled non-linear editor available on Linux but it is one of the most reliable! ** @@ -66,4 +68,4 @@ via: http://www.omgubuntu.co.uk/2014/11/pitivi-0-94-header-bar-more-features [3]:http://www.cogl3d.org/about.html [4]:http://wiki.pitivi.org/wiki/0.94 [5]:http://fundraiser.pitivi.org/download-bundles -[6]:http://www.omgubuntu.co.uk/2014/02/pitivi-video-editor-fundraising-campaign \ No newline at end of file +[6]:http://www.omgubuntu.co.uk/2014/02/pitivi-video-editor-fundraising-campaign From 304689d0f5c6c5433d6d89aa7cc32cf800b21f37 Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 5 Nov 2014 10:43:32 +0800 Subject: [PATCH 113/316] Update 20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md --- ...ts With New Features, Here's How To Install It In Ubuntu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md b/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md index bab4a4d787..897bfa3dd7 100644 --- a/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md +++ b/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Cinnamon 2.4 Debuts With New Features, Here’s How To Install It In Ubuntu ================================================================================ **Adding a pinch of spice to the weekend, Linux Mint has announced a new release of its Cinnamon desktop environment.** @@ -69,4 +70,4 @@ via: http://www.omgubuntu.co.uk/2014/11/install-cinnamon-2-4-ubuntu-14-04-lts [a]:https://plus.google.com/117485690627814051450/?rel=author [1]:http://blog.linuxmint.com/?p=2688 -[2]:http://segfault.linuxmint.com/2014/11/cinnamon-2-4/ \ No newline at end of file +[2]:http://segfault.linuxmint.com/2014/11/cinnamon-2-4/ From be4d22a692509cd6989e9e439bb7d0689a092c2a Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 5 Nov 2014 10:45:25 +0800 Subject: [PATCH 114/316] =?UTF-8?q?20141105-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Images Arrive on Google Cloud Platform.md | 30 ++++++++++++++++ ...Touch RTM Gets Major Update--Video Tour.md | 36 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 sources/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md create mode 100644 sources/news/20141105 Ubuntu Touch RTM Gets Major Update--Video Tour.md diff --git a/sources/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md b/sources/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md new file mode 100644 index 0000000000..a3c23ffeaa --- /dev/null +++ b/sources/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md @@ -0,0 +1,30 @@ +The Latest Ubuntu Images Arrive on Google Cloud Platform +================================================================================ +![](http://ostatic.com/files/images/ubuntu_image_5.png) + +Canonical, working with Google, has announced that it is launching the public beta of Ubuntu 14.04 LTS, 12.04 LTS and 14.10 on Google Cloud Platform. "Starting today, it is possible to select optimized, up to date, fully secure and consistent Ubuntu images on Google Cloud Platform," Canonical's post noted, adding that "Canonical continually maintains, tests and updates certified Ubuntu images, making the latest versions available on Google Cloud Platform within minutes of them being officially released." + +Ubuntu has been shown to be an increasingly popular platform for use in the cloud and as the basis for cloud deployments, and making it available on Google's cloud platform should attract many users. + +For all Ubuntu LTS versions, Canonical provides maintenance and security updates for five years, which will appeal to the enterprise users that Canonical is increasingly focused on. + +“The lack of official Ubuntu images had been holding us back in migrating portions of our infrastructure to Google Cloud Platform,” says Sebastian Stadil, founder of the leading open source cloud management platform, Scalr. “We are pleased to see Ubuntu technologies be made available to all our enterprise customers.” + +Federico Lucifredi, Certified Public Cloud product manager said, in a statement: “As more enterprises join start-ups in turning to public cloud environments to run mission critical and scale-out workloads, Google Cloud Platform has quickly established itself as one of the world’s leading contenders for their business. Bringing Ubuntu to Google Cloud Platform is a logical first step in what we believe will be a great collaboration, benefitting developers and enterprises looking for an easy to use, reliable OS for their cloud deployments.” + +Ubuntu actually has a remarkable track record as a guest operating system of choice on all major public clouds, with around 70 percent of workloads running on Ubuntu, according to Canonical. Ubuntu is also the basis for many OpenStack deployments, according to data from the OpenStack Foundation. + +Check in on the [Google Cloud Platform][1] site for more information. + +-------------------------------------------------------------------------------- + +via: http://ostatic.com/blog/the-latest-ubuntu-images-arrive-on-google-cloud-platform + +作者:[Sam Dean][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ostatic.com/member/samdean +[1]:https://cloud.google.com/compute/docs/operating-systems \ No newline at end of file diff --git a/sources/news/20141105 Ubuntu Touch RTM Gets Major Update--Video Tour.md b/sources/news/20141105 Ubuntu Touch RTM Gets Major Update--Video Tour.md new file mode 100644 index 0000000000..03c92c31bf --- /dev/null +++ b/sources/news/20141105 Ubuntu Touch RTM Gets Major Update--Video Tour.md @@ -0,0 +1,36 @@ +Ubuntu Touch RTM Gets Major Update – Video Tour +================================================================================ +**new Ubuntu Touch RTM version has been released and the developers have made a number of important fixes, not to mention all the improvements that have been made to the backend.** + +The Ubuntu Touch RTM stable images don't arrive all that often. Only six have been launched so far and each new version is sensibly better than the previous one. The current release is no exception, although it seems to have a longer and more complex changelog than the previous one. + +Long gone are the days when a Mir update would break Ubuntu, but now all sorts of smaller problems are cropping up. In fact, all landings have been suspended before this new update was released, in an effort to track down and correct all the major bugs. Some problems still remain, but none of them should be an inconvenience. + +### This is just the RTM branch, not the final version ### + +Ubuntu Touch is still a work in progress, but, from the looks of it, the developers are homing in the final version. It shouldn't take too long now and we might get it in a month or so. That would be a fair assessment, if Meizu's plans to launch an Ubuntu phone in December holds. + +"Good news! As per earlier announcement we promoted a new image to the ubuntu-rtm/14.09 channel! Please enjoy image #6 (previously known as #140 for krillin, #118 for mako and #112 for x86). Because of those we plan on promoting another image as soon as possible if those issues get fixed. But no worries - no freezes required this time. The landing gates will remain opened until the next serious promotion! Once again big thanks to everyone involved!" [said][1] Canonical's Łukasz Zemczak. + +There are still a few minor issues, they will be corrected very soon. For example, the user metrics that could be found on the lock screen are no longer changing with a double tap, the media hug might strain the CPU in certain situations, and the Unity 8 environment might crash from time to time. + +On the upside, Ubuntu Touch should be much more stable now, the video playback now works properly in landscape mode, the Unity 8 desktop has been updated, and a lot of critical changes have been made. + +Users can test Ubuntu Touch RTM on Nexus 4 and Nexus 7 devices, and the official website has comprehensive [wiki][2] that details the installation. + +youtu.be链接地址:[http://youtu.be/_DtNvz_WVu8][3] + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Ubuntu-Touch-RTM-Gets-Major-Update-Video-Tour-464075.shtml + +作者:[Silviu Stahie][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:https://lists.launchpad.net/ubuntu-phone/msg10368.html +[2]:https://wiki.ubuntu.com/Touch/DualBootInstallation +[3]:http://youtu.be/_DtNvz_WVu8 \ No newline at end of file From 436f97f6d08a9890fe480164e06bf5840aa8f97f Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 5 Nov 2014 11:02:47 +0800 Subject: [PATCH 115/316] =?UTF-8?q?20141105-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...s--How to disable HTTP redirect in wget.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sources/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md diff --git a/sources/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md b/sources/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md new file mode 100644 index 0000000000..39baa09d77 --- /dev/null +++ b/sources/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md @@ -0,0 +1,33 @@ +Linux FAQs with Answers--How to disable HTTP redirect in wget +================================================================================ +> **Question**: When I run wget to fetch a URL X which is redirected to another URL Y, wget, by default, goes fetch URL Y automatically. However, I would like to force wget to only fetch the original URL X without following the redirection. How can I stop wget from following a redirected URL? + +In the HTTP specification, a redirect response (with 3XX HTTP response) indicates to the web browser that the requested URL is moved at another location. The redirect response then contains the URL of the redirect target. + +Like regular HTTP clients, wget supports URL redirection (also known as URL forwarding), which means that when you attempt to download a redirected URL, wget will automatically follow URL redirect to fetch the redirected target. If for some reason you want to disable URL direction, and stop with 3XX status code, you can use "--max-redirect=number" option with wget. This option is used to specify the maximum number of (recursive) redirections to follow, which is set to 20 by default. + +If you want to disable HTTP redirects in wget, use "--max-redirect=0" option as follows. + + $ wget --max-redirect=0 http://www.aaa.com/a.html + +---------- + + --2014-10-31 23:08:58-- http://www.aaa.com/a.html + Resolving aaa.com (aaa.com)... 1.2.3.4 + Connecting to aaa.com (aaa.com)|1.2.3.4|:80... connected. + HTTP request sent, awaiting response... 301 Moved Permanently + Location: http://www.bbb.com/b.html [following] + 0 redirections exceeded. + +As you can see, when wget encounters a HTTP redirect reponse, it does not follow the redirection, and simply stop with "0 redirections exceeded" error message. It will also show a received HTTP status code (e.g., 301). + +Note that curl, which is another similar HTTP client, behave oppositely. By default, curl does NOT follow URL redirection. To force curl to redirect a URL, you have to use "-L" option. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/disable-http-redirect-wget.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file From c9f2ebeaf833293164db6715a021350367ee90cf Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 5 Nov 2014 11:38:24 +0800 Subject: [PATCH 116/316] =?UTF-8?q?20141105-3=20=E9=80=89=E9=A2=98=20?= =?UTF-8?q?=E5=85=B6=E4=B8=ADMozilla=E4=B8=8B=E5=91=A8=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=96=B0=E6=B5=8F=E8=A7=88=E5=99=A8=E7=9A=84=E8=85=BE=E8=AE=AF?= =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E5=8F=91=E4=BA=86=E6=96=B0=E9=97=BB=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E8=BF=87=E4=BB=96=E4=BB=AC=E4=B8=8D=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E8=BD=AC=E8=BD=BDhttp://tech.qq.com/a/20141104/005444.htm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...res, Here's How To Install It In Ubuntu.md | 72 +++++++++++++++++++ ...and New Developer Web Browser Next Week.md | 41 +++++++++++ 2 files changed, 113 insertions(+) create mode 100644 sources/news/20141105 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md create mode 100644 sources/news/20141105 Mozilla to Launch Brand New Developer Web Browser Next Week.md diff --git a/sources/news/20141105 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md b/sources/news/20141105 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md new file mode 100644 index 0000000000..b0ade0ee4f --- /dev/null +++ b/sources/news/20141105 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md @@ -0,0 +1,72 @@ +Cinnamon 2.4 Debuts With New Features, Here’s How To Install It In Ubuntu +================================================================================ +![New Wallpaper Slideshow Feature](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/wallpaper-sildeshow-applet.jpg) + +New Wallpaper Slideshow Feature + +**Adding a pinch of spice to the weekend, Linux Mint has announced a new release of its Cinnamon desktop environment.** + +The latest version of the user-friendly shell will be the centrepiece of Linux Mint 17.1, [the first point release in the distro’s new LTS approach][1], due later this month. + +### New In Cinnamon 2.4 ### + +Cinnamon 2.4 comes with a raft of welcome features, improvements and overall polish, such as reduced memory usage, new ‘Privacy’ and ‘Notifications’ settings and desktop wallpaper slideshows. + +The [official release notes][2] highlight some of the bigger changes, including: + +- Cinnamon desktop starts with “zoom” animation +- 30 memory leaks fixed as part of code review +- ‘Super+e’ shortcut opens ‘Home’ folder +- Desktop font can now be customised +- Timeout in ‘Logout dialog’ has been removed +- ‘Theme and Background’ settings redesigned +- Background slideshow support (plus new panel applet controller) +- ‘Notification and Privacy’ settings pane added + +![Some say Nemo is the best file manager for Linux](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/nemo-file-manager-24-750x368.jpg) + +Some say Nemo is the best file manager for Linux + +The Nemo file manager also benefits from the following improvements: + +- Redesigned toolbar +- ‘*nemo-emblems*‘ extension supports adding emblems to folders +- Sidebar hover highlight effects +- ‘Smarter dynamic bookmark section’ in sidebar +- Folder colours can be quickly configured using nemo-folder-color-switcher (not yet released) + +### Upgrade to or Install Cinnamon 2.4 in Ubuntu ### + +If you favour stability **you should not upgrade to Cinnamon 2.4 in Ubuntu** yet. New releases of Cinnamon arrive a month before Linux Mint for the specific purpose of testing, ironing out bugs and gathering feedback. + +But if the above sounds more like a reason to try rather than avoid, Cinnamon 2.4 can be installed in Ubuntu 14.04 LTS and Ubuntu 14.10 using the following Cinnamon nightly PPA: + + sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-nightly + +Followed by: + + sudo apt-get update && sudo apt-get install cinnamon + +Already have Cinnamon installed? I’d advise running the following command in lieu of the one above. This will ensure that any package conflicts are automatically resolved by the package manager: + + sudo apt-get update && sudo apt-get dist-upgrade + +Installed and want shot? That’s easy enough; you can remove Cinnamon 2.4 and the bulk of its configuration files, dependencies and cruft by running this command: + + sudo apt-get purge cinnamon + +**If you try it out, let us know what you make of the changes in the comments below — and be sure to share a screenshot or two, too! ** + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/install-cinnamon-2-4-ubuntu-14-04-lts + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://blog.linuxmint.com/?p=2688 +[2]:http://segfault.linuxmint.com/2014/11/cinnamon-2-4/ \ No newline at end of file diff --git a/sources/news/20141105 Mozilla to Launch Brand New Developer Web Browser Next Week.md b/sources/news/20141105 Mozilla to Launch Brand New Developer Web Browser Next Week.md new file mode 100644 index 0000000000..ef94ebda7b --- /dev/null +++ b/sources/news/20141105 Mozilla to Launch Brand New Developer Web Browser Next Week.md @@ -0,0 +1,41 @@ +Mozilla to Launch Brand New Developer Web Browser Next Week +================================================================================ +**When you woke up this morning you probably didn’t expect to come online and see the words ‘Mozilla’, ‘New’, and ‘Web Browser’ writ large across the web. ** + +But that my bed-headed compadre is precisely what you’re looking at. + +注:youtube 地址,发布的时候不行做个链接吧 + + +### Mozilla – Pushing Boundaries ### + +Mozilla has always been at the forefront of pushing open source, open standards and open access. They steer one of the most popular desktop browsers in the world. Their open-source Linux mobile OS [is sold on 12 smartphones from 13 operators in 24 countries][1]. They’re [even taking on the Google Chromecast][2]! + +Their desire to democratise the web shows no sign of abating. In a teaser posted on the Mozilla Blog this morning the company has announced a new effort to push boundaries further — this time for developers rather than users. + +Teased as something “unique but familiar”, the company intend to release a brand new browser based on Firefox but designed by developers, for developers. Mozilla say it integrates “powerful new tools like [WebIDE][3] and the [Firefox Tools Adapter][4]”. + +> “When building for the Web, developers tend to use a myriad of different tools which often don’t work well together. This means you end up switching between different tools, platforms and browsers which can slow you down and make you less productive.” + +### #Fx10 ### + +The “Firefox Developer Browser” is being touted for an initial release date of November 10. It’s not yet known what platforms it will target but since this is a) Mozilla and b) aimed at developers it’d be a huge shock if Linux builds weren’t readily available on day dot. + +Mozilla say those interested should sign up for their [Hacks newsletter][5] to receive notification when the browser is released. + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/mozilla-launch-brand-new-developer-focused-web-browser + +作者:[ Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://twitter.com/firefox/status/522175938952716289 +[2]:http://www.omgchrome.com/mozillas-chromecast-rival-leaks-online/ +[3]:https://hacks.mozilla.org/2014/06/webide-lands-in-nightly/ +[4]:https://hacks.mozilla.org/2014/09/firefox-tools-adapter/ +[5]:https://hacks.mozilla.org/newsletter/ \ No newline at end of file From 44f5d40b245dc34fd4f2c72783d3b7b8965b6a70 Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 5 Nov 2014 11:49:30 +0800 Subject: [PATCH 117/316] Delete 20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md --- ...res, Here's How To Install It In Ubuntu.md | 73 ------------------- 1 file changed, 73 deletions(-) delete mode 100644 sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md diff --git a/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md b/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md deleted file mode 100644 index 897bfa3dd7..0000000000 --- a/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md +++ /dev/null @@ -1,73 +0,0 @@ -Translating by GOLinux! -Cinnamon 2.4 Debuts With New Features, Here’s How To Install It In Ubuntu -================================================================================ -**Adding a pinch of spice to the weekend, Linux Mint has announced a new release of its Cinnamon desktop environment.** - -![New Wallpaper Slideshow Feature](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/wallpaper-sildeshow-applet.jpg) - -New Wallpaper Slideshow Feature - -The latest version of the user-friendly shell will be the centrepiece of Linux Mint 17.1, [the first point release in the distro’s new LTS approach][1], due later this month. - -### New In Cinnamon 2.4 ### - -Cinnamon 2.4 comes with a raft of welcome features, improvements and overall polish, such as reduced memory usage, new ‘Privacy’ and ‘Notifications’ settings and desktop wallpaper slideshows. - -The [official release notes][2] highlight some of the bigger changes, including: - -- Cinnamon desktop starts with “zoom” animation -- 30 memory leaks fixed as part of code review -- ‘Super+e’ shortcut opens ‘Home’ folder -- Desktop font can now be customised -- Timeout in ‘Logout dialog’ has been removed -- ‘Theme and Background’ settings redesigned -- Background slideshow support (plus new panel applet controller) -- ‘Notification and Privacy’ settings pane added - -![Some say Nemo is the best file manager for Linux](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/nemo-file-manager-24-750x368.jpg) - -Some say Nemo is the best file manager for Linux - -The Nemo file manager also benefits from the following improvements: - -- Redesigned toolbar -- ‘nemo-emblems‘ extension supports adding emblems to folders -- Sidebar hover highlight effects -- ‘Smarter dynamic bookmark section’ in sidebar -- Folder colours can be quickly configured using nemo-folder-color-switcher (not yet released) - -### Upgrade to or Install Cinnamon 2.4 in Ubuntu ### - -If **you favour stability you should not upgrade to Cinnamon 2.4 in Ubuntu** yet. New releases of Cinnamon arrive a month before Linux Mint for the specific purpose of testing, ironing out bugs and gathering feedback. - -But if the above sounds more like a reason to try rather than avoid, Cinnamon 2.4 can be installed in Ubuntu 14.04 LTS and Ubuntu 14.10 using the following Cinnamon nightly PPA: - - sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-nightly - -Followed by: - - sudo apt-get update && sudo apt-get install cinnamon - -Already have Cinnamon installed? I’d advise running the following command in lieu of the one above. This will ensure that any package conflicts are automatically resolved by the package manager: - - sudo apt-get update && sudo apt-get dist-upgrade - -Installed and want shot? That’s easy enough; you can remove Cinnamon 2.4 and the bulk of its configuration files, dependencies and cruft by running this command: - - sudo apt-get purge cinnamon - -**If you try it out, let us know what you make of the changes in the comments below — and be sure to share a screenshot or two, too! ** - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2014/11/install-cinnamon-2-4-ubuntu-14-04-lts - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://blog.linuxmint.com/?p=2688 -[2]:http://segfault.linuxmint.com/2014/11/cinnamon-2-4/ From fe66db5482d5fb56c2db761859c45ef91481b213 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 5 Nov 2014 12:31:10 +0800 Subject: [PATCH 118/316] =?UTF-8?q?=E6=B8=85=E9=99=A4=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...res, Here's How To Install It In Ubuntu.md | 72 ------------------- 1 file changed, 72 deletions(-) delete mode 100644 sources/news/20141105 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md diff --git a/sources/news/20141105 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md b/sources/news/20141105 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md deleted file mode 100644 index b0ade0ee4f..0000000000 --- a/sources/news/20141105 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md +++ /dev/null @@ -1,72 +0,0 @@ -Cinnamon 2.4 Debuts With New Features, Here’s How To Install It In Ubuntu -================================================================================ -![New Wallpaper Slideshow Feature](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/wallpaper-sildeshow-applet.jpg) - -New Wallpaper Slideshow Feature - -**Adding a pinch of spice to the weekend, Linux Mint has announced a new release of its Cinnamon desktop environment.** - -The latest version of the user-friendly shell will be the centrepiece of Linux Mint 17.1, [the first point release in the distro’s new LTS approach][1], due later this month. - -### New In Cinnamon 2.4 ### - -Cinnamon 2.4 comes with a raft of welcome features, improvements and overall polish, such as reduced memory usage, new ‘Privacy’ and ‘Notifications’ settings and desktop wallpaper slideshows. - -The [official release notes][2] highlight some of the bigger changes, including: - -- Cinnamon desktop starts with “zoom” animation -- 30 memory leaks fixed as part of code review -- ‘Super+e’ shortcut opens ‘Home’ folder -- Desktop font can now be customised -- Timeout in ‘Logout dialog’ has been removed -- ‘Theme and Background’ settings redesigned -- Background slideshow support (plus new panel applet controller) -- ‘Notification and Privacy’ settings pane added - -![Some say Nemo is the best file manager for Linux](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/nemo-file-manager-24-750x368.jpg) - -Some say Nemo is the best file manager for Linux - -The Nemo file manager also benefits from the following improvements: - -- Redesigned toolbar -- ‘*nemo-emblems*‘ extension supports adding emblems to folders -- Sidebar hover highlight effects -- ‘Smarter dynamic bookmark section’ in sidebar -- Folder colours can be quickly configured using nemo-folder-color-switcher (not yet released) - -### Upgrade to or Install Cinnamon 2.4 in Ubuntu ### - -If you favour stability **you should not upgrade to Cinnamon 2.4 in Ubuntu** yet. New releases of Cinnamon arrive a month before Linux Mint for the specific purpose of testing, ironing out bugs and gathering feedback. - -But if the above sounds more like a reason to try rather than avoid, Cinnamon 2.4 can be installed in Ubuntu 14.04 LTS and Ubuntu 14.10 using the following Cinnamon nightly PPA: - - sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-nightly - -Followed by: - - sudo apt-get update && sudo apt-get install cinnamon - -Already have Cinnamon installed? I’d advise running the following command in lieu of the one above. This will ensure that any package conflicts are automatically resolved by the package manager: - - sudo apt-get update && sudo apt-get dist-upgrade - -Installed and want shot? That’s easy enough; you can remove Cinnamon 2.4 and the bulk of its configuration files, dependencies and cruft by running this command: - - sudo apt-get purge cinnamon - -**If you try it out, let us know what you make of the changes in the comments below — and be sure to share a screenshot or two, too! ** - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2014/11/install-cinnamon-2-4-ubuntu-14-04-lts - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://blog.linuxmint.com/?p=2688 -[2]:http://segfault.linuxmint.com/2014/11/cinnamon-2-4/ \ No newline at end of file From f1a6c3becbe2e1b02e8cb3652430724a4c8f92e9 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 5 Nov 2014 12:37:19 +0800 Subject: [PATCH 119/316] =?UTF-8?q?=E6=92=A4=E9=94=80=E8=AE=A4=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @GOLinux --- ...buts With New Features, Here's How To Install It In Ubuntu.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md b/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md index 897bfa3dd7..45d50545c9 100644 --- a/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md +++ b/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md @@ -1,4 +1,3 @@ -Translating by GOLinux! Cinnamon 2.4 Debuts With New Features, Here’s How To Install It In Ubuntu ================================================================================ **Adding a pinch of spice to the weekend, Linux Mint has announced a new release of its Cinnamon desktop environment.** From 424e174d4fc499710d41d8c0eee31699fd72b64b Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 5 Nov 2014 13:13:48 +0800 Subject: [PATCH 120/316] PUB:20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu --- ...res, Here's How To Install It In Ubuntu.md | 72 +++++++++++++++++++ ...res, Here's How To Install It In Ubuntu.md | 72 ------------------- 2 files changed, 72 insertions(+), 72 deletions(-) create mode 100644 published/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md delete mode 100644 sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md diff --git a/published/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md b/published/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md new file mode 100644 index 0000000000..df48101bba --- /dev/null +++ b/published/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md @@ -0,0 +1,72 @@ +Cinnamon 2.4 携新功能来袭 +================================================================================ +**上个周末,Linux Mint 为我们带来了新的气息,发布了 Cinnamon 桌面的一个新版本。** + +[ Linux Mint 发布了其新 LTS 版本的第一个更新 17.1 ][1],它的易用 shell 的最新版本将是该发行版的重中之重。 + +![New Wallpaper Slideshow Feature](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/wallpaper-sildeshow-applet.jpg) + +*新的墙纸幻灯片功能 * + +### Cinnamon 2.4 新特性 ### + +Cinnamon 2.4 带来了大量受欢迎的功能,包括改进了波兰语支持、降低内存占用,新的“隐私”和“提醒”设置和桌面墙纸幻灯片功能。 + +其[官方发布公告][2]里面主要提到了如下变化: + +- Cinnamon 桌面启动时带有缩放动画 +- 通过代码审核修复了30个内存泄露问题 +- 使用‘Super+e’ 可以打开“home”文件夹 +- 桌面字体现在可以定制了 +- 去除了“退出对话框”的超时设置 +- 重新设计了“主题与背景”设置 +- 支持桌面幻灯片功能(增加了一个新的面板小应用来控制它) +- 增加了“提醒与隐私”设置面板 + +![Some say Nemo is the best file manager for Linux](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/nemo-file-manager-24-750x368.jpg) + +*有些人说 Nemo 是 Linux 上最好的文件管理器* + +Nemo 文件管理器也做了如下改进: + +- 重新设计了工具条 +- ‘nemo-emblems‘扩展支持为文件夹增加标志(emblems) +- 边栏在鼠标移动上去时会有高亮效果 +- “智能动态书签区”放到边栏 +- 文件夹的颜色可以通过 nemo-folder-color-switcher 快速设置(还没有发布) + +### 在 Ubuntu 中升级或安装 Cinnamon 2.4 ### + +如果**你更在意稳定的话**就不要升级到 Cinnamon 2.4。新的 Cinnamon 在 Linux Mint 发布前一个月才释出,主要是为了测试、解决 bug 和搜集反馈。 + +不过要是你不在意的话,你可以使用如下的每夜构建 PPA 在 Ubuntu 14.04 LTS 和 Ubuntu 14.10 中安装Cinnamon 2.4: + + sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-nightly + +然后: + + sudo apt-get update && sudo apt-get install cinnamon + +如果你已经安装了(旧版本的) Cinnamon,我建议你运行下列命令来替代上面的安装命令。这会自动通过包管理器解决冲突的包依赖关系: + + sudo apt-get update && sudo apt-get dist-upgrade + +安装后如果不喜欢了,那也很容易,你可以使用如下命令将 Cinnamon 2.4 和它的一大堆配置统统移走: + + sudo apt-get purge cinnamon + +**如果你体验过了,请让我们知道你的意见,反馈到下面,最好带上一两张截屏!** + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/install-cinnamon-2-4-ubuntu-14-04-lts + +作者:[Joey-Elijah Sneddon][a] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://blog.linuxmint.com/?p=2688 +[2]:http://segfault.linuxmint.com/2014/11/cinnamon-2-4/ diff --git a/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md b/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md deleted file mode 100644 index 45d50545c9..0000000000 --- a/sources/tech/20141104 Cinnamon 2.4 Debuts With New Features, Here's How To Install It In Ubuntu.md +++ /dev/null @@ -1,72 +0,0 @@ -Cinnamon 2.4 Debuts With New Features, Here’s How To Install It In Ubuntu -================================================================================ -**Adding a pinch of spice to the weekend, Linux Mint has announced a new release of its Cinnamon desktop environment.** - -![New Wallpaper Slideshow Feature](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/wallpaper-sildeshow-applet.jpg) - -New Wallpaper Slideshow Feature - -The latest version of the user-friendly shell will be the centrepiece of Linux Mint 17.1, [the first point release in the distro’s new LTS approach][1], due later this month. - -### New In Cinnamon 2.4 ### - -Cinnamon 2.4 comes with a raft of welcome features, improvements and overall polish, such as reduced memory usage, new ‘Privacy’ and ‘Notifications’ settings and desktop wallpaper slideshows. - -The [official release notes][2] highlight some of the bigger changes, including: - -- Cinnamon desktop starts with “zoom” animation -- 30 memory leaks fixed as part of code review -- ‘Super+e’ shortcut opens ‘Home’ folder -- Desktop font can now be customised -- Timeout in ‘Logout dialog’ has been removed -- ‘Theme and Background’ settings redesigned -- Background slideshow support (plus new panel applet controller) -- ‘Notification and Privacy’ settings pane added - -![Some say Nemo is the best file manager for Linux](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/nemo-file-manager-24-750x368.jpg) - -Some say Nemo is the best file manager for Linux - -The Nemo file manager also benefits from the following improvements: - -- Redesigned toolbar -- ‘nemo-emblems‘ extension supports adding emblems to folders -- Sidebar hover highlight effects -- ‘Smarter dynamic bookmark section’ in sidebar -- Folder colours can be quickly configured using nemo-folder-color-switcher (not yet released) - -### Upgrade to or Install Cinnamon 2.4 in Ubuntu ### - -If **you favour stability you should not upgrade to Cinnamon 2.4 in Ubuntu** yet. New releases of Cinnamon arrive a month before Linux Mint for the specific purpose of testing, ironing out bugs and gathering feedback. - -But if the above sounds more like a reason to try rather than avoid, Cinnamon 2.4 can be installed in Ubuntu 14.04 LTS and Ubuntu 14.10 using the following Cinnamon nightly PPA: - - sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-nightly - -Followed by: - - sudo apt-get update && sudo apt-get install cinnamon - -Already have Cinnamon installed? I’d advise running the following command in lieu of the one above. This will ensure that any package conflicts are automatically resolved by the package manager: - - sudo apt-get update && sudo apt-get dist-upgrade - -Installed and want shot? That’s easy enough; you can remove Cinnamon 2.4 and the bulk of its configuration files, dependencies and cruft by running this command: - - sudo apt-get purge cinnamon - -**If you try it out, let us know what you make of the changes in the comments below — and be sure to share a screenshot or two, too! ** - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2014/11/install-cinnamon-2-4-ubuntu-14-04-lts - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://blog.linuxmint.com/?p=2688 -[2]:http://segfault.linuxmint.com/2014/11/cinnamon-2-4/ From 865b51d6e7ed46355e51976e401577bf6ece6a28 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 5 Nov 2014 17:00:47 +0800 Subject: [PATCH 121/316] Translating by ZTinoZ --- ...ike Disk Full Or Can't Write to the Disk.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md index 1ba0bca947..1c5ac87e79 100644 --- a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md +++ b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md @@ -64,7 +64,7 @@ ## perl ## perl -e'truncate "filename", LENGTH' -6.找出并删除打开着但是Find and remove large files that are open but have been deleted on Linux or Unix: +6.在Linux和UNIX中找出并删除显示着但已经被删除的大文件: ## 基于Linux/Unix/OSX/BSD等系统 ## lsof -nP | grep '(deleted)' @@ -81,32 +81,32 @@ ### #2 - 文件系统是只读模式吗? ### -You may end up getting an error such as follows when you try to create a file or save a file: +当你尝试新建或保存一个文件时,你可能最终得到诸如以下的错误: $ cat > file -bash: file: Read-only file system -Run mount command to find out if the file system is mounted in read-only mode: +运行mount命令来查看被挂载的文件系统是否处于只读状态: $ mount $ mount | grep '/ftpusers' -To fix this problem, simply remount the file system in read-write mode on a Linux based system: +在基于Linux的系统中要修复这个问题,只需将这个处于只读状态的文件系统重新挂载即可: # mount -o remount,rw /ftpusers/tmp -Another example, from my [FreeBSD 9.x server to remount / in rw mode][7]: +另外,我是这样[用rw模式重新挂载FreeBSD 9.x服务器的根目录][7]的: # mount -o rw /dev/ad0s1a / ### #3 - Am I running out of inodes? ### -Sometimes, df command reports that there is enough free space but system claims file-system is full. You need to check [for the inode][8] which identifies the file and its attributes on a file systems using the following command: +有时候,df命令能显示出磁盘有空余的空间但是系统却声称文件系统已经写满了。此时你需要用以下命令来检查能在文件系统中识别文件及其属性的[索引节点][8]: $ df -i $ df -i /ftpusers/ -Sample outputs: +部分输出内容: Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda8 6250496 11568 6238928 1% /ftpusers @@ -116,7 +116,7 @@ So /ftpusers has 62,50,496 total inodes but only 11,568 are used. You are free t - Find unwanted files and delete or move to another server. - Find unwanted large files and delete or move to another server. -### #4 - Is my hard drive is dying? ### +### #4 - 我的硬盘驱动器宕了吗? ### [I/O errors in log file (such as /var/log/messages) indicates][9] that something is wrong with the hard disk and it may be failing. You can check hard disk for errors using smartctl command, which is control and monitor utility for SMART disks under Linux and UNIX like operating systems. The syntax is: @@ -132,7 +132,7 @@ Fig. 01: Gnome disk utility (Applications > System Tools > Disk Utility) > **Note**: Don't expect too much from SMART tool. It may not work in some cases. Make backup on a regular basis. -### #5 - Is my hard drive and server is too hot? ### +### #5 - 我的硬盘驱动器和服务器是不是太热了? ### High temperatures can cause server to function poorly. So you need to maintain the proper temperature of the server and disk. High temperatures can result into server shutdown or damage to file system and disk. [Use hddtemp or smartctl utility to find out the temperature of your hard on a Linux or Unix based system][11] by reading data from S.M.A.R.T. on drives that support this feature. Only modern hard drives have a temperature sensor. hddtemp supports reading S.M.A.R.T. information from SCSI drives too. hddtemp can work as simple command line tool or as a daemon to get information from all servers: From dd568949888fbaed272cff160e07ee875fee0453 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 5 Nov 2014 17:37:15 +0800 Subject: [PATCH 122/316] [Translating] ntpq -p output --- sources/tech/20141027 ntpq -p output.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141027 ntpq -p output.md b/sources/tech/20141027 ntpq -p output.md index c834e43585..be5ece39db 100644 --- a/sources/tech/20141027 ntpq -p output.md +++ b/sources/tech/20141027 ntpq -p output.md @@ -1,3 +1,5 @@ +[felixonmars translating...] + “ntpq -p” output ================================================================================ The [Gentoo][1] (and others?) [incomplete man pages for “ntpq -p”][2] merely give the description: “*Print a list of the peers known to the server as well as a summary of their state.*” @@ -298,4 +300,4 @@ via: http://nlug.ml1.co.uk/2012/01/ntpq-p-output/831 [105]:http://en.wikipedia.org/wiki/ICMP_Timestamp [106]:http://en.wikipedia.org/wiki/ICMP_Timestamp_Reply [107]:http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol -[108]:http://en.wikipedia.org/wiki/Time_Protocol \ No newline at end of file +[108]:http://en.wikipedia.org/wiki/Time_Protocol From 2b14ddf6dc152a0b231f51b6db306ac008a6931e Mon Sep 17 00:00:00 2001 From: ThomazL Date: Wed, 5 Nov 2014 19:21:32 +0800 Subject: [PATCH 123/316] translated by ThomazL --- ...es GTK HeaderBar, Squashes Umpteen Bugs.md | 71 ---------------- ...es GTK HeaderBar, Squashes Umpteen Bugs.md | 83 +++++++++++++++++++ 2 files changed, 83 insertions(+), 71 deletions(-) delete mode 100644 sources/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md create mode 100644 translated/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md diff --git a/sources/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md b/sources/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md deleted file mode 100644 index ac1462043f..0000000000 --- a/sources/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md +++ /dev/null @@ -1,71 +0,0 @@ ->> Translating by ThomazL - -Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs -================================================================================ -**I’m a big fan of the [Pitivi video editor][1]. It might not (yet, at least) be the most whizz-bang or feature-filled non-linear editor available on Linux but it is one of the most reliable! ** - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/pitivi-tile.jpg) - -So, naturally, I was expecting to see a new beta release of the open-source editor [go live at the weekend][2]. - -Pitivi 0.94 is the fourth release based on the new ‘GStreamer Editing Services’ library (GES). - -Project member Jean-François Fortin Tam, also known by the handle ‘Nekohayo‘, describes the update on his blog as ”**…mainly a maintenance release, but it does pack a few interesting improvements & features in addition to the bug fixes.**” - -### What’s new? ### - -Interesting improvements indeed! The most noticeable change in Pitivi 0.94 is the switch to GNOME’s client-side GTK HeaderBar decoration. HeaderBars unify the window bar, title bar and toolbar into one, saving a huge amount of wasted vertical and horizontal space in the process. - -“*Once you try it, you can’t go back,*” says Fortin Tam. A quick glance at the screenshot below and you’ll be nodding in agreement. - -![Pitivi now uses GTK HeaderBar and menu button (image: Nekohayo)](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/pitivi-0.94-headerbar.jpeg) - -Pitivi now uses GTK HeaderBar and menu button (image: Nekohayo) - -What about the app menu? No fear; the consolidation sees the introduction of an app menu button, as per the GNOME human interface guidelines. - -#### Fixes, Fixes, Fixes #### - -There’s also a slew of important bug fixes and stability improvements bundled up, including fixes for those running the editor outside of GNOME Shell and/or a Linux distribution shipping with a broken version of [COGL][3] (yes, even Ubuntu). - -Elsewhere: - -- Positioning of UI components on fresh install has been improved -- Undocked window components do not shift position on startup -- Effects can be reordered within a clip’s properties -- Title editor UI has been simplified -- Global undo/redo fix -- Timeline UI animations have been tweaked -- Editor ported to Python 3 - -Further details can be found in the official [release notes][4]. - -### Getting Better ### - -All of the above reads great, right? Well, the next release should be even better. That’s not just usual developer hyperbole, as Jean-François explains: - -> “The next release (0.95) will run on top of a refined and incredibly more robust backend thanks to the work that Mathieu [Duponchelle] and Thibault [Saunier] have been doing to replace GNonLin by NLE (the new non-linear engine for GES) and fixing video mixing issues.” - -Ubuntu 14.10 ships with an older (crash-prone) version in the Software Center. To try the latest release in all its glory you can grab an [all-in-one bundle][5] from the Pitivi website¹. - -**Almost €20,000 has been raised as part of the Pitivi [fundraiser][6] helping it creep over the halfway point to a promised 1.0 release. If you’d like to see that arrive faster, skip a grande skinny vanilla latte at Starbucks and donate instead! ** - -*¹At the time of writing the bundles for 0.94 are not linked but you can grab the nightly tars instead. * - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2014/11/pitivi-0-94-header-bar-more-features - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://pitivi.org/ -[2]:http://jeff.ecchi.ca/blog/2014/11/02/tricks-or-tracebacks-pitivi-0-94-is-here/ -[3]:http://www.cogl3d.org/about.html -[4]:http://wiki.pitivi.org/wiki/0.94 -[5]:http://fundraiser.pitivi.org/download-bundles -[6]:http://www.omgubuntu.co.uk/2014/02/pitivi-video-editor-fundraising-campaign diff --git a/translated/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md b/translated/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md new file mode 100644 index 0000000000..6ca5abd7c0 --- /dev/null +++ b/translated/share/20141104 Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs.md @@ -0,0 +1,83 @@ +Pitivi 发布 0.94 版本,使用 GTK HeaderBar,修复无数 Bugs +===================================== + +** 我是 [Pitivi 视频编辑器][1] 的狂热爱好者。Pitivi 可能不是(至少现在不是)Linux 上可用的最拉风的,功能完善的非线性视频编辑器,但是它绝对是最可靠的一个。 ** + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/pitivi-tile.jpg) + +自然而然地,我一直在期待这个开源视频编辑器在 [这周末][2] 发布的新的 beta 测试版。 + +Pitivi 0.94 是基于新的 “GStreamer Editing Service”(GES)的第四个发行版本。 + +开发组成员 Jean-François Fortin Tam,称号 “Nekohayo” 将本次升级描述为 “** ...主要作为一个维护版本发布,但是除了对 Bug 的修复之外,还是增加了几个有意思的改进和功能。 **” + +## 有什么新改进? ## + +有不少有意思的改进!作为 Pitivi 0.94 版本中最明显的变化,Pitivi 添加了如同 GNOME 客户端一般的 GTK HeaderBar 装饰。HeaderBar 整合了桌面窗口栏,标题栏以及工具栏,节省了大块浪费的垂直以及水平的占用空间。 + +“*当你用过一次后,你就在也回不来了,*” Fortin Tam 介绍说。欣赏一下下面这张截图,你肯定会同意的。 + +![Pitivi now uses GTK HeaderBar and menu button (image: Nekohayo)](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/pitivi-0.94-headerbar.jpeg) + +Pitivi 现在使用了 GTK HeaderBar 以及菜单键。(image: Nekohayo) + +那么应用菜单又怎么样呢?别担心,应用菜单遵循了 GNOME 交互界面的标准,看一下自己机器上的应用菜单确认一下吧。 + +#### Fixes, Fixes, Fixes #### + +这次发布版本还囊括了大量的重要的 bug 修复,包括在 GNOME Shell 之外或基于损坏的 [COGL][3] 版本的 Linux 发行版(是的,Ubuntu 也是)运行 Pitivi 所产生的 bug。 + +其他的: + +- 改进首次安装时 UI 部件的位置调整 + +- 启动时未固定的窗口组件不再随意移位 + +- 在视频属性中可以记录编辑的效果 + +- 精简修改标题功能的 UI + +- 修复全局撤销/重做 + +- 重新调试时间轴的 UI 动画 + +- 移植编辑器到 Python 3 + +在 [官方发布记录][4] 里有更多细节。 + +### 进一步提升 ### + +上面这些信息听起来都很不错吧?下一次更新会更好!这不只是一个通常的来自开发者的夸张,如同 Jean François 解释的一般: + +> “下一次更新(0.95)会运行在难以置信的强大的后端上。感谢 Mathieu [Duponchelle] 和 Thibault [Saunier] 在用 NLE(新的为了 GES 的非线性引擎)替代 GNonLin 并修复问题等工作中做出的努力。” + +Ubuntu 14.10 带有老的(更容易崩溃)的软件中心,进入 Pitivi 官网¹下载 [安装包][5] 来体验最新杰作。 + +** Pitivi 基金会酬了将近 €20,000,使我们能够向着约定的 1.0 版本迈出一大步。如果你也想早点看到 1.0 版本的到来的话,省下你在星巴克买的格郎德香草奶油咖啡,捐赠我们! ** + +*¹目前 0.94 安装包还没发布,你可以下载 nightly tar* + + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/pitivi-0-94-header-bar-more-features + +作者:[Joey-Elijah Sneddon][a] +译者:[ThomazL](https://github.com/ThomazL) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://pitivi.org/ +[2]:http://jeff.ecchi.ca/blog/2014/11/02/tricks-or-tracebacks-pitivi-0-94-is-here/ +[3]:http://www.cogl3d.org/about.html +[4]:http://wiki.pitivi.org/wiki/0.94 +[5]:http://fundraiser.pitivi.org/download-bundles +[6]:http://www.omgubuntu.co.uk/2014/02/pitivi-video-editor-fundraising-campaign + + + + + + From 79ce5672dd0557bac424cbd0edebd2a410262550 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Wed, 5 Nov 2014 22:24:24 +0800 Subject: [PATCH 124/316] tranlsted --- ... port in the firewall on CentOS or RHEL.md | 69 ------------------- ... port in the firewall on CentOS or RHEL.md | 68 ++++++++++++++++++ 2 files changed, 68 insertions(+), 69 deletions(-) delete mode 100644 sources/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md create mode 100644 translated/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md diff --git a/sources/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md b/sources/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md deleted file mode 100644 index c36dcac0e8..0000000000 --- a/sources/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md +++ /dev/null @@ -1,69 +0,0 @@ -[translating by KayGuoWhu] -Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL -================================================================================ -> **Question**: I am running a web/file server on my CentOS box, and to access the server remotely, I need to modify a firewall to allow access to a TCP port on the box. What is a proper way to open a TCP/UDP port in the firewall of CentOS/RHEL? - -Out of the box, enterprise Linux distributions such as CentOS or RHEL come with a powerful firewall built-in, and their default firewall rules are pretty restrictive. Thus if you install any custom services (e.g., web server, NFS, Samba), chances are their traffic will be blocked by the firewall rules. You need to open up necessary ports on the firewall to allow their traffic. - -On CentOS/RHEL 6 or earlier, the iptables service allows users to interact with netfilter kernel modules to configure firewall rules in the user space. Starting with CentOS/RHEL 7, however, a new userland interface called firewalld has been introduced to replace iptables service. - -To check the current firewall rules, use this command: - - $ sudo iptables -L - -![](https://farm6.staticflickr.com/5601/15604533686_a8c0ae7b89_z.jpg) - -Now let's see how we can update the firewall to open a port on CentOS/RHEL. - -### Open a Port on CentOS/RHEL 7 ### - -Starting with CentOS and RHEL 7, firewall rule settings are managed by firewalld service daemon. A command-line client called firewall-cmd can talk to this deamon to update firewall rules permanently. - -To open up a new port (e.g., TCP/80) permanently, use these commands. - - $ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent - $ sudo firewall-cmd --reload - -Without "--permanent" flag, the firewall rule would not persist across reboots. - -### Open a Port on CentOS/RHEL 6 ### - -On CentOS/RHEL 6 or earlier, a iptables service is responsible for maintaining firewall rules. - -Use iptables command to open up a new TCP/UDP port in the firewall. To save the updated rule permanently, you need the second command. - - $ sudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT - $ sudo service iptables save - -Another way to open up a port on CentOS/RHEL 6 is to use a terminal-user interface (TUI) firewall client, named system-config-firewall-tui. - - $ sudo system-config-firewall-tui - -Choose "Customize" button in the middle and press ENTER. - -![](https://farm6.staticflickr.com/5602/15628237745_4409cff52f_z.jpg) - -If you are trying to update the firewall for any well-known service (e.g., web server), you can easily enable the firewall for the service here, and close the tool. If you are trying to open up any arbitrary TCP/UDP port, choose "Forward" button and go to a next window. - -![](https://farm4.staticflickr.com/3941/15604533696_12857827ea_z.jpg) - -Add a new rule by choosing "Add" button. - -![](https://farm4.staticflickr.com/3941/15008065383_4b92cbd843_z.jpg) - -Specify a port (e.g., 80) or port range (e.g., 3000-3030), and protocol (e.g., tcp or udp). - -![](https://farm4.staticflickr.com/3946/15007474154_bef75d8c72_z.jpg) - -Finally, save the updated configuration, and close the tool. At this point, the firewall will be saved permanently. - -![](https://farm4.staticflickr.com/3942/15628237765_0299a638ab_z.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/open-port-firewall-centos-rhel.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/translated/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md b/translated/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md new file mode 100644 index 0000000000..9656d83e42 --- /dev/null +++ b/translated/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md @@ -0,0 +1,68 @@ +Linux有问必答——在CentOS或RHEL防火墙上开启端口 +================================================================================ +> **问题**:我在CentOS系统上运行一台网页或文件服务器,打算远程访问服务器。因此,我需要更改防火墙规则以允许访问系统上的某个TCP端口。那么,有什么好方法在CentOS或RHEL系统的防火墙上开启TCP/UDP端口? + +Out of the box,诸如CentOS或RHEL的企业级Linux发行版包含内置的强大防火墙,它们默认的防火墙规则十分严格。因此,如果你安装了任何定制服务(比如web服务器、NFS和Samba),那么它们的流量很有可能被防火墙规则阻塞。所以需要在防火墙上开启必要的端口以允许流量通过。 + +在CentOS/RHEL 6或更早的版本上,iptables服务允许用户与netfilter内核模块交互来在用户空间中配置防火墙规则。然而,从CentOS/RHEL 7开始,一个叫做firewalld新用户空间接口被引入以取代iptables服务。 + +使用这个命令察看当前的防火墙规则: + + $ sudo iptables -L + +![](https://farm6.staticflickr.com/5601/15604533686_a8c0ae7b89_z.jpg) + +现在,让我们看看如何在CentOS/RHEL上修改防火墙来开启一个端口。 + +### 在CentOS/RHEL 7上开启端口 ### + +启动CentOS或RHEL 7后,防火墙规则设置由firewalld服务进程默认管理。一个叫做firewall-cm的命令行客户端支持和这个守护进程通信以永久修改防火墙规则。 + +使用这些命令来长久打开一个新端口(如TCP/80)。 + + $ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent + $ sudo firewall-cmd --reload + +如果不使用“--permanent”标记,把么防火墙规则在重启后会失效。 + +### 在CentOS/RHEL 6上开启端口 ### + +在CentOS/RHEL 6甚至更早版本系统上,iptables服务负责维护防火墙规则。 + +使用iptables的第一条命令可以通过防火墙开启一个新TCP/UDP端口。为了永久保存修改过的规则,还需要第二条命令。 + + $ sudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT + $ sudo service iptables save + +另一种方法是通过一个名为system-config-firewall-tui的命令行用户接口(TUI)的防火墙客户端。 + + $ sudo system-config-firewall-tui + +选择位于中间的“Customize”按钮,按下ENTER键即可。 + +![](https://farm6.staticflickr.com/5602/15628237745_4409cff52f_z.jpg) + +如果想要为任何已知的服务(如web服务器)修改防火墙,只需使防火墙对该服务可用,然后关闭工具。如果想要开启任意一个TCP/UDP端口,选择“Forward”按钮,然后进入下一个界面。 + +![](https://farm4.staticflickr.com/3941/15604533696_12857827ea_z.jpg) + +选择“Add”按钮添加一条新规则。 + +![](https://farm4.staticflickr.com/3941/15008065383_4b92cbd843_z.jpg) + +指定一个端口(如80)或者端口范围(如3000-3030)和协议(如tcp或udp)。 + +![](https://farm4.staticflickr.com/3946/15007474154_bef75d8c72_z.jpg) + +最后,保存修改过的配置,关闭工具。这样,防火墙就永久保存了。 + +![](https://farm4.staticflickr.com/3942/15628237765_0299a638ab_z.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/open-port-firewall-centos-rhel.html + +译者:[KayGuoWhu](https://github.com/KayGuoWhu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file From 46e9a02918133fe3f05ee681ff81302371a540c2 Mon Sep 17 00:00:00 2001 From: runningwater Date: Wed, 5 Nov 2014 23:58:51 +0800 Subject: [PATCH 125/316] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90=20?= =?UTF-8?q?by=20runningwater?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nitor a log file on Linux with logwatch.md | 133 ------------------ ...nitor a log file on Linux with logwatch.md | 132 +++++++++++++++++ 2 files changed, 132 insertions(+), 133 deletions(-) delete mode 100644 sources/tech/20141021 How to monitor a log file on Linux with logwatch.md create mode 100644 translated/tech/20141021 How to monitor a log file on Linux with logwatch.md diff --git a/sources/tech/20141021 How to monitor a log file on Linux with logwatch.md b/sources/tech/20141021 How to monitor a log file on Linux with logwatch.md deleted file mode 100644 index 28b9f5bfde..0000000000 --- a/sources/tech/20141021 How to monitor a log file on Linux with logwatch.md +++ /dev/null @@ -1,133 +0,0 @@ -(translating by runningwater) -How to monitor a log file on Linux with logwatch -================================================================================ -Linux operating system and many applications create special files commonly referred to as "logs" to record their operational events. These system logs or application-specific log files are an essential tool when it comes to understanding and troubleshooting the behavior of the operating system and third-party applications. However, log files are not precisely what you would call "light" or "easy" reading, and analyzing raw log files by hand is often time-consuming and tedious. For that reason, any utility that can convert raw log files into a more user-friendly log digest is a great boon for sysadmins. - -[logwatch][1] is an open-source log parser and analyzer written in Perl, which can parse and convert raw log files into a structured format, making a customizable report based on your use cases and requirements. In logwatch, the focus is on producing more easily consumable log summary, not on real-time log processing and monitoring. As such, logwatch is typically invoked as an automated cron task with desired time and frequency, or manually from the command line whenever log processing is needed. Once a log report is generated, logwatch can email the report to you, save it to a file, or display it on the screen. - -A logwatch report is fully customizable in terms of verbosity and processing coverage. The log processing engine of logwatch is extensible, in a sense that if you want to enable logwatch for a new application, you can write a log processing script (in Perl) for the application's log file, and plug it under logwatch. - -One downside of logwatch is that it does not include in its report detailed timestamp information available in original log files. You will only know that a particular event was logged in a requested range of time, and you will have to access original log files to get exact timing information. - -### Installing Logwatch ### - -On Debian and derivatives: - - # aptitude install logwatch - -On Red Hat-based distributions: - - # yum install logwatch - -### Configuring Logwatch ### - -During installation, the main configuration file (logwatch.conf) is placed in /etc/logwatch/conf. Configuration options defined in this file override system-wide settings defined in /usr/share/logwatch/default.conf/logwatch.conf. - -If logwatch is launched from the command line without any arguments, the custom options defined in /etc/logwatch/conf/logwatch.conf will be used. However, if any command-line arguments are specified with logwatch command, those arguments in turn override any default/custom settings in /etc/logwatch/conf/logwatch.conf. - -In this article, we will customize several default settings of logwatch by editing /etc/logwatch/conf/logwatch.conf file. - - Detail = - -"Detail" directive controls the verbosity of a logwatch report. It can be a positive integer, or High, Med, Low, which correspond to 10, 5, and 0, respectively. - - MailTo = youremailaddress@yourdomain.com - -"MailTo" directive is used if you want to have a logwatch report emailed to you. To send a logwatch report to multiple recipients, you can specify their email addresses separated with a space. To be able to use this directive, however, you will need to configure a local mail transfer agent (MTA) such as sendmail or Postfix on the server where logwatch is running. - - Range = - -"Range" directive specifies the time duration of a logwatch report. Common values for this directive are Yesterday, Today or All. When "Range = All" is used, "Archive = yes" directive is also needed, so that all archived versions of a given log file (e.g., /var/log/maillog, /var/log/maillog.X, or /var/log/maillog.X.gz) are processed. - -Besides such common range values, you can also use more complex range options such as the following. - -- Range = "2 hours ago for that hour" -- Range = "-5 days" -- Range = "between -7 days and -3 days" -- Range = "since September 15, 2014" -- Range = "first Friday in October" -- Range = "2014/10/15 12:50:15 for that second" - -To be able to use such free-form range examples, you need to install Date::Manip Perl module from CPAN. Refer to [this post][2] for CPAN module installation instructions. - - Service = - Service = - . . . - -"Service" option specifies one or more services to monitor using logwath. All available services are listed in /usr/share/logwatch/scripts/services, which cover essential system services (e.g., pam, secure, iptables, syslogd), as well as popular application services such as sudo, sshd, http, fail2ban, samba. If you want to add a new service to the list, you will have to write a corresponding log processing Perl script, and place it in this directory. - -If this option is used to select specific services, you need to comment out the line "Service = All" in /usr/share/logwatch/default.conf/logwatch.conf. - -![](https://farm6.staticflickr.com/5612/14948933564_94cbc5353c_z.jpg) - - Format = - -"Format" directive specifies the format (e.g., text or HTML) of a logwatch report. - - Output = - -"Output" directive indicates where a logwatch report should be sent. It can be saved to a file (file), emailed (mail), or shown to screen (stdout). - -### Analyzing Log Files with Logwatch ### - -To understand how to analyze log files using logwatch, consider the following logwatch.conf example: - - Detail = High - MailTo = youremailaddress@yourdomain.com - Range = Today - Service = http - Service = postfix - Service = zz-disk_space - Format = html - Output = mail - -Under these settings, logwatch will process log files generated by three services (http, postfix and zz-disk_space) today, produce an HTML report with high verbosity, and email it to you. - -If you do not want to customize /etc/logwatch/conf/logwatch.conf, you can leave the default configuration file unchanged, and instead run logwatch from the command line as follows. It will achieve the same outcome. - - # logwatch --detail 10 --mailto youremailaddress@yourdomain.com --range today --service http --service postfix --service zz-disk_space --format html --output mail - -The emailed report looks like the following. - -![](https://farm6.staticflickr.com/5611/15383540608_57dc37e3d6_z.jpg) - -The email header includes links to navigate the report sections, one per each selected service, and also "Back to top" links. - -You will want to use the email report option when the list of recipients is small. Otherwise, you can have logwatch save a generated HTML report within a network share that can be accessed by all the individuals who need to see the report. To do so, make the following modifications in our previous example: - - Detail = High - Range = Today - Service = http - Service = postfix - Service = zz-disk_space - Format = html - Output = file - Filename = /var/www/html/logs/dev1.html - -Equivalently, run logwatch from the command line as follows. - - # logwatch --detail 10 --range today --service http --service postfix --service zz-disk_space --format html --output file --filename /var/www/html/logs/dev1.html - -Finally, let's configure logwatch to be executed by cron on your desired schedules. The following example will run a logwatch cron job every business day at 12:15 pm: - - # crontab -e - ----------- - - 15 12 * * 1,2,3,4,5 /sbin/logwatch - -Hope this helps. Feel free to comment to share your own tips and ideas with the community! - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/monitor-log-file-linux-logwatch.html - -作者:[Gabriel Cánepa][a] -译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/gabriel -[1]:http://sourceforge.net/projects/logwatch/ -[2]:http://xmodulo.com/how-to-install-perl-modules-from-cpan.html \ No newline at end of file diff --git a/translated/tech/20141021 How to monitor a log file on Linux with logwatch.md b/translated/tech/20141021 How to monitor a log file on Linux with logwatch.md new file mode 100644 index 0000000000..88f4b732a7 --- /dev/null +++ b/translated/tech/20141021 How to monitor a log file on Linux with logwatch.md @@ -0,0 +1,132 @@ +Linux 系统中使用 logwatch 监控日志文件 +================================================================================ +Linux 操作系统和许多应用程序会创建特殊的文件来记录它们的运行事件,这些文件通常被称作“日志”。当要了解操作系统或第三方应用程序的行为或进行故障排队的话,这些系统日志或特写的应用程序日志文件是必不可少的的工具。但是,日志文件并没有您们所谓的“清晰”或“容易”这种程度的可读性。手工分析原始的日志文件简直是浪费时间,并且单调乏味。出于这个原因,对于系统管理员来说,发现任何一款能把原始的日志文件转换成更人性化的记录摘要的工具,将会受益无穷。 + +[logwatch][1] 是一款用 Perl 语言编写的开源日志解析分析器。它能对原始的日志文件进行解析并转换成结构化格式的文档,也能根据您的使用情况和需求来定制报告。logwatch 的主要目的是生成更易于使用的日志摘要,并不是用来对日志进行实时的处理和监控的。正因为如此,logwatch 通常被设定好时间和频率的自动定时任务来调度运行或者是有需要日志处理的时候从命令行里手动运行。一旦日志报告生成,logwatch 会通过电子邮件把这报告发送给您,您可以把它保存成文件或者在屏幕上直接显示。 + +Logwatch 报告的详细程度和报告覆盖范围是完全可定制化的。Logwatch 的日志处理引擎也是可扩展的,从某种意义上来说,如果您想在一个新的应用程序中使用 logwatch 功能的话,只需要为这个应用程序的日志文件编写一个日志处理脚本(使用 Perl 语言),然后挂接到 logwatch 上就行。 + +logwatch 有一点不好的就是,在它生成的报告中没有详细的时间戳信息,而原来的日志文件中是存在的。您只能知道被记录下来的一段时间之内的特定事件,如果想要知道精确的时间点的信息,就不得不去查看原日志文件了。 + +### 安装 Logwatch ### + +在 Debian 系统或其派生的系统上: + + # aptitude install logwatch + +在基于 Red Hat 的发布系统上: + + # yum install logwatch + +### 配置 Logwatch ### + +安装时,主要的配置文件(logwatch.conf)被放到 **/etc/logwatch/conf** 目录中。此文件定义的设置选项会覆盖掉定义在 /usr/share/logwatch/default.conf/logwatch.conf 文件中的系统级设置。 + +在命令行中,启动 logwatch, 如果不带参数的话,将会使用 /etc/logwatch/conf/logwatch.conf 文件中定义的自定义选项。但,只要一指定参数,它们就会覆盖 /etc/logwatch/conf/logwatch.conf 文件中的任意默认/自定义设置。 + +这篇文章里,我们会编辑 /etc/logwatch/conf/logwatch.conf 文件来对一些默认的设置项做些个性化设置。 + + Detail = + +“Detail” 配置指令控制着 logwatch 报告的详细程度。它可以是个正整数,也可以是分别代表着10、5和0数字的 High、Med、Low 几个选项。 + + MailTo = youremailaddress@yourdomain.com + +如果您让把一份 logwatch 的报告邮件给您,就要使用 “MailTo” 这个配置指令。要把一份报告发送给多个用户,只需要把他们的邮件地址用空格格开,然后配置上去。但是,您需要在 logwatch 运行的服务器上配置好本地邮件传输代理(MTA)如,sendmail、 Postfix 等,这个配置指令项才能起作用。 + + Range = + +"Range" 配置指令定义了生成 logwatch 报告的时间段信息。这个指令通常可选的值是 Yesterday、Today、All。当作用了“Rang = All”时,“Archive = yes” 这个指令项也必须配置上,那么所有的已存档的日志文件 (比如,/var/log/maillog、/var/log/maillog.X 或 /var/log/maillog.X.gz 文件)都会被处理到。 + +除了这些通用的 range 值,您也可以使用复杂点的选择值,如下所示: + +- Range = "2 hours ago for that hour" +- Range = "-5 days" +- Range = "between -7 days and -3 days" +- Range = "since September 15, 2014" +- Range = "first Friday in October" +- Range = "2014/10/15 12:50:15 for that second" + +要使用上面例子中自由形式的 range,您需要从 CPAN(注:Comprehensive Perl Archive Network) 上下载安装 Perl 的 Date::Manip 模块。关于 CPAN 模块的安装说明,请请参阅[此帖][2] 。 + + Service = + Service = + . . . + +“Service” 选项指定想要监控的一个或多个服务。在 /usr/share/logwatch/scripts/services 目录下列出的服务都能被监控,它们已经涵盖了重要的系统服务(例如,pam,secure,iptables,syslogd 等),也涵盖了一些像 sudo、sshd、http、fail2ban、samba等主流的应用服务。如果您想添加新的服务到列表中,得编写一个相应的日志处理 Perl 脚本,并把它放在这个目录中。 + +如果这个选项要用来选择特定的服务话,您需要把 /usr/share/logwatch/default.conf/logwatch.conf 文件中的 "Service = All " 这一行注释掉。 + +![](https://farm6.staticflickr.com/5612/14948933564_94cbc5353c_z.jpg) + + Format = + +“Format” 配置指令定义了一份 logwatch 报告的格式(比如 text 或者 HTML)。 + + Output = + +"Output" 配置指令定义生成的 logwatch 报告要发送的目的地。它能被保存成文件(file),生成电子邮件(mail)或者是直接在屏幕上显示(stdout)。 + +### 用 Logwatch 来分析日志文件 ### + +要弄明白怎么使用 logwatch 来分析日志文件,可以参考下面的 logwatch.conf 文件例子: + + Detail = High + MailTo = youremailaddress@yourdomain.com + Range = Today + Service = http + Service = postfix + Service = zz-disk_space + Format = html + Output = mail + +使用这些设置,logwatch 将会处理三个应用服务(http、postfix 和 zz-disk_space)当天产生的日志,生成一份非常详细的 HTML 格式报告,然后邮件给您。 + +如果您不想个性化 /etc/logwatch/conf/logwatch.conf,您可以不修改此文件让其默认,然后在命令行里运行如下所示的命令。也会得到同样的输出。 + + # logwatch --detail 10 --mailto youremailaddress@yourdomain.com --range today --service http --service postfix --service zz-disk_space --format html --output mail + +电子邮件发送的报告样子如图示: + +![](https://farm6.staticflickr.com/5611/15383540608_57dc37e3d6_z.jpg) + +这份电子邮件头部包含指向导航到报告细节的链接,在每个选中的服务细节,也会有“返回顶部”的链接。 + +接收人很少的情况下您可能会使用电子邮件发送报告这个选项。其它情况下,您可能会把让其生成为 HTML 格式的报告,这样每个想看这份报告的人都可以从网络共享里看到。只需要把上面例子中的配置做些修改就可以实现: + + Detail = High + Range = Today + Service = http + Service = postfix + Service = zz-disk_space + Format = html + Output = file + Filename = /var/www/html/logs/dev1.html + +同样的,也可以在命令行中运行如下的命令。 + + # logwatch --detail 10 --range today --service http --service postfix --service zz-disk_space --format html --output file --filename /var/www/html/logs/dev1.html + +最后,让我们使用 cron 来配置 logwatch 的定时执行任务。下面的例子中,将会在每个工作日的下午 12:15 分运行 logwatch 调度任务。 + + # crontab -e + +---------- + + 15 12 * * 1,2,3,4,5 /sbin/logwatch + +希望这会有所帮助。欢迎到社区发表评论或分享自己的心得和体会! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/monitor-log-file-linux-logwatch.html + +作者:[Gabriel Cánepa][a] +译者:[runningwater](https://github.com/runningwater) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:http://sourceforge.net/projects/logwatch/ +[2]:http://xmodulo.com/how-to-install-perl-modules-from-cpan.html \ No newline at end of file From 485bd6f8196fe6214b4c466f1c6fb73e3ae9b86c Mon Sep 17 00:00:00 2001 From: runningwater Date: Thu, 6 Nov 2014 11:54:49 +0800 Subject: [PATCH 126/316] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD=20by=20runn?= =?UTF-8?q?ingwater?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tall LEMP stack nginx MariaDB or MySQL and php on CentOS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md b/sources/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md index 0554534f82..a55493e6b1 100644 --- a/sources/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md +++ b/sources/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md @@ -1,3 +1,4 @@ +(translating by runningwater) How to install LEMP stack (nginx, MariaDB/MySQL and php) on CentOS ================================================================================ The LEMP stack is an increasingly popular web service stack, powering mission-critical web services in many production environments. As the name implies, the LEMP stack is composed of Linux, nginx, MariaDB/MySQL and PHP. nginx is a high performance and lightweight replacement of slow and hard-to-scale Apache HTTP server used in the traditional LAMP stack. MariaDB is a community-driven fork of MySQL, with more features and better performance. PHP, a server-side language for generating dynamic content, is processed by PHP-FPM, an enhanced implementation of PHP FastCGI. @@ -237,7 +238,7 @@ If you see the above page, you are all set with the LEMP stack! via: http://xmodulo.com/install-lemp-stack-centos.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ae9eac1550fb83dfb3788b01a2222d2218714845 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 6 Nov 2014 13:12:38 +0800 Subject: [PATCH 127/316] =?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 --- .../20140928 How to use xargs command in Linux.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/translated/tech/20140928 How to use xargs command in Linux.md b/translated/tech/20140928 How to use xargs command in Linux.md index 5f5e5e120d..2f22f1ee1c 100644 --- a/translated/tech/20140928 How to use xargs command in Linux.md +++ b/translated/tech/20140928 How to use xargs command in Linux.md @@ -1,6 +1,6 @@ 如何在Linux里使用xargs命令 ================================================================================ -你是否遇到过这样的情况,需要一遍又一遍地对多个文件执行同样的操作?如果有过,那你肯定会深有感触这是多么的无聊和效率低下。还好有种简单的方式,可以在类Unix操作系统中使用xargs命令解决这个烦恼。通过这个命令你可以有效地处理多个文件,节省你的时间和精力。在这篇教程中,你可以学到如何一次性对多个文件执行命令或脚本操作,再也不用担心像单独处理无数个日志或数据文件那样吓人的任务了。 +你是否遇到过这样的情况,需要一遍又一遍地对多个文件执行同样的操作?如果有过,那你肯定会深有感触这是多么的无聊和效率低下。还好有种简单的方式,可以在基于Unix的操作系统中使用xargs命令解决这个烦恼。通过这个命令你可以有效地处理多个文件,节省你的时间和精力。在这篇教程中,你可以学到如何一次性对多个文件执行命令或脚本操作,再也不用担心像单独处理无数个日志或数据文件那样吓人的任务了。 xargs命令有两个要点。第一,你必须列出目标文件。第二,你必须指定对每个文件需要执行的命令或脚本。 @@ -50,7 +50,7 @@ xargs命令有两个要点。第一,你必须列出目标文件。第二,你 xargstest/dir3/file3A xargstest/dir3/file3B -然后我们需要第二个部分,就是需要执行的命令。我们使用带有-l选项的wc命令来计算每个文件包含的换行符数目(会在输出的每一行的前面打印出来): +然后我们需要第二个要素,就是需要执行的命令。我们使用带有-l选项的wc命令来计算每个文件包含的换行符数目(会在输出的每一行的前面打印出来): $ find xargstest/ -name 'file??' | sort | xargs wc -l @@ -64,11 +64,11 @@ xargs命令有两个要点。第一,你必须列出目标文件。第二,你 6 xargstest/dir3/file3B 21 total -可以看到,不用对每个文件手动执行一次wc -l命令,而xargs命令可以让你在一步里完成所有操作。那些之前看起来无法完成的任务,例如单独处理数百个文件,现在可以轻松进行了。 +可以看到,不用对每个文件手动执行一次wc -l命令,而xargs命令可以让你在一步里完成所有操作。那些之前看起来无法完成的任务,例如单独处理数百个文件,现在可以相当轻松地完成了。 ### 场景2:打印指定文件的第一行 ### -既然对xargs命令的使用已经有一点基础了,你可以自由选择执行什么命令。有时,你也许希望只对一部分文件执行操作而忽略其他的。在这种情况下,你可以使用find命令的-name选项以及?通配符(匹配任意单个字符)来选中特定文件并通过管道输出给xargs命令。举个例子,如果你想打印以“B”字符结尾的文件而忽略以“A”结尾的文件的第一行,可以使用下面的find、xargs和head命令组合来完成(head -n1会打印一个文件的第一行): +既然你已经有一些使用xargs命令的基础,你可以自由选择执行什么命令。有时,你也许希望只对一部分文件执行操作而忽略其他的。在这种情况下,你可以使用find命令的-name选项以及?通配符(匹配任意单个字符)来选中特定文件并通过管道输出给xargs命令。举个例子,如果你想打印以“B”字符结尾的文件而忽略以“A”结尾的文件的第一行,可以使用下面的find、xargs和head命令组合来完成(head -n1会打印一个文件的第一行): $ find xargstest/ -name 'file?B' | sort | xargs head -n1 @@ -87,7 +87,7 @@ xargs命令有两个要点。第一,你必须列出目标文件。第二,你 ### 场景3:对每个文件执行一个自定义脚本 ### -最后,你也许希望对一些文件执行一个自定义脚本(例如Bash、Python或是Perl)。要做到这个,只要简单地把你的自定义脚本名字替换掉之前例子中的wc和head命令就好了: +最后,你也许希望对一些文件执行一个自定义脚本(例如Bash、Python或是Perl)。要做到这一点,只要简单地用你的自定义脚本名字替换掉之前例子中的wc和head命令就好了: $ find xargstest/ -name 'file??' | xargs myscript.sh @@ -101,7 +101,7 @@ xargs命令有两个要点。第一,你必须列出目标文件。第二,你 ### 总结 ### -在看完这篇教程后你应该会理解xargs命令的作用,以及如何应用到自己的工作中。很快你就可以有时间享受这个命令所带来的高效率,而不哟给你花时间在一些重复的任务上了。想了解更详细的信息以及更多的选项,你可以在终端中输入'man xargs'命令来查看xargs的文档。 +在看完这篇教程后你应该会理解xargs命令的作用,以及如何应用到自己的工作中。很快你就可以有时间享受这个命令所带来的高效率,而不用把你的时间耗费在一些重复的任务上了。想了解更详细的信息以及更多的选项,你可以在终端中输入'man xargs'命令来查看xargs的文档。 -------------------------------------------------------------------------------- @@ -109,7 +109,7 @@ via: http://xmodulo.com/xargs-command-linux.html 作者:[Joshua Reed][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9f5ef599a0884f24c27b5480109383ad39040d63 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 6 Nov 2014 17:51:42 +0800 Subject: [PATCH 128/316] Translating by ZTinoZ --- ...ke Disk Full Or Can't Write to the Disk.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md index 1c5ac87e79..7e479fb27a 100644 --- a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md +++ b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md @@ -111,30 +111,30 @@ Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda8 6250496 11568 6238928 1% /ftpusers -So /ftpusers has 62,50,496 total inodes but only 11,568 are used. You are free to create another 62,38,928 files on /ftpusers partition. If 100% of your inodes are used, try the following options: +所以 /ftpusers 下有总计62,50,496KB大小的索引节点但是只有11,568KB被使用。你可以在 /ftpusers 位置下另外创建62,38,928KB大小的文件。如果你的索引节点100%被使用了,试试看以下的选项: -- Find unwanted files and delete or move to another server. -- Find unwanted large files and delete or move to another server. +- 找出不想要的文件并删除它,或者把它移动到其它服务器上。 +- 找出不想要的大文件并删除它,或者把它移动到其它服务器上。 ### #4 - 我的硬盘驱动器宕了吗? ### -[I/O errors in log file (such as /var/log/messages) indicates][9] that something is wrong with the hard disk and it may be failing. You can check hard disk for errors using smartctl command, which is control and monitor utility for SMART disks under Linux and UNIX like operating systems. The syntax is: +[日志文件中的输入/输出错误(例如 /var/log/messages)][9]说明硬盘出了一些问题并且可能已经失效,你可以用smartctl命令来查看硬盘的错误,这是一个在类UNIX系统下控制和监控硬盘状态的一个命令。语法如下: smartctl -a /dev/DEVICE # check for /dev/sda on a Linux server smartctl -a /dev/sda -You can also use "Disk Utility" to get the same information +你也可以用"Disk Utility"这个软件来获得同样的信息。 [![](http://s0.cyberciti.org/uploads/l/tips/2007/07/500-GB-Hard-Disk-ATA-TOSHIBA-MK5061GSYF-dev-sda-%E2%80%94-Disk-Utility_014.png)][10] -Fig. 01: Gnome disk utility (Applications > System Tools > Disk Utility) +图01: Gnome磁盘工具(Applications > System Tools > Disk Utility) -> **Note**: Don't expect too much from SMART tool. It may not work in some cases. Make backup on a regular basis. +> **注意**: 不要对SMART工具期望太高,它在某些状况下无法工作,我们要定期做备份。 ### #5 - 我的硬盘驱动器和服务器是不是太热了? ### -High temperatures can cause server to function poorly. So you need to maintain the proper temperature of the server and disk. High temperatures can result into server shutdown or damage to file system and disk. [Use hddtemp or smartctl utility to find out the temperature of your hard on a Linux or Unix based system][11] by reading data from S.M.A.R.T. on drives that support this feature. Only modern hard drives have a temperature sensor. hddtemp supports reading S.M.A.R.T. information from SCSI drives too. hddtemp can work as simple command line tool or as a daemon to get information from all servers: +高温会引起服务器低效,所以你需要把服务器和磁盘维持在一个平稳适当的温度。High temperatures can result into server shutdown or damage to file system and disk. [Use hddtemp or smartctl utility to find out the temperature of your hard on a Linux or Unix based system][11] by reading data from S.M.A.R.T. on drives that support this feature. Only modern hard drives have a temperature sensor. hddtemp supports reading S.M.A.R.T. information from SCSI drives too. hddtemp can work as simple command line tool or as a daemon to get information from all servers: hddtemp /dev/DISK hddtemp /dev/sg0 @@ -149,7 +149,7 @@ You can use the smartctl command as follows too: smartctl -d ata -A /dev/sda | grep -i temperature -#### How do I get the CPU temperature? #### +#### 我怎么获取CPU的温度 #### You can use Linux hardware monitoring tool such as [lm_sensor to get the cpu temperature on a Linux based][13] system: @@ -210,7 +210,7 @@ You need to replace a failed hard drive. You must u remove the correct failed dr See our [tips on increasing RAID sync speed on Linux][18] for more information. -### #8 - Dealing with hardware RAID ### +### #8 - 处理硬阵列 ### You can use the samrtctl command or vendor specific command to find out the status of RAID and disks in your controller: @@ -236,7 +236,7 @@ See our previous tutorials: 1. [Perl script to monitor disk space and send an email][23] 1. [NAS backup server disk monitoring shell script][24] -### Conclusion ### +### 结论 ### I hope these tips will help you troubleshoot system disk issue on a Linux/Unix based server. I also recommend implementing a good backup plan in order to have the ability to recover from disk failure, accidental file deletion, file corruption, or complete server destruction: From a73ab57a07764b7dc32f648829867c7b89664c39 Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Thu, 6 Nov 2014 19:44:24 +0800 Subject: [PATCH 129/316] Linux FAQs with Answers--How to disable HTTP redirect in wget --- ...x FAQs with Answers--How to disable HTTP redirect in wget.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md b/sources/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md index 39baa09d77..8b2551568f 100644 --- a/sources/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md +++ b/sources/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md @@ -1,3 +1,5 @@ +Translating-------geekpi + Linux FAQs with Answers--How to disable HTTP redirect in wget ================================================================================ > **Question**: When I run wget to fetch a URL X which is redirected to another URL Y, wget, by default, goes fetch URL Y automatically. However, I would like to force wget to only fetch the original URL X without following the redirection. How can I stop wget from following a redirected URL? From cf4041ca7fb36ecf2e8bcce17d6c503e4d5aaf64 Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Thu, 6 Nov 2014 20:03:25 +0800 Subject: [PATCH 130/316] Linux FAQs with Answers--How to disable HTTP redirect in wget --- ...s--How to disable HTTP redirect in wget.md | 35 ------------------- ...s--How to disable HTTP redirect in wget.md | 33 +++++++++++++++++ 2 files changed, 33 insertions(+), 35 deletions(-) delete mode 100644 sources/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md create mode 100644 translated/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md diff --git a/sources/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md b/sources/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md deleted file mode 100644 index 8b2551568f..0000000000 --- a/sources/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md +++ /dev/null @@ -1,35 +0,0 @@ -Translating-------geekpi - -Linux FAQs with Answers--How to disable HTTP redirect in wget -================================================================================ -> **Question**: When I run wget to fetch a URL X which is redirected to another URL Y, wget, by default, goes fetch URL Y automatically. However, I would like to force wget to only fetch the original URL X without following the redirection. How can I stop wget from following a redirected URL? - -In the HTTP specification, a redirect response (with 3XX HTTP response) indicates to the web browser that the requested URL is moved at another location. The redirect response then contains the URL of the redirect target. - -Like regular HTTP clients, wget supports URL redirection (also known as URL forwarding), which means that when you attempt to download a redirected URL, wget will automatically follow URL redirect to fetch the redirected target. If for some reason you want to disable URL direction, and stop with 3XX status code, you can use "--max-redirect=number" option with wget. This option is used to specify the maximum number of (recursive) redirections to follow, which is set to 20 by default. - -If you want to disable HTTP redirects in wget, use "--max-redirect=0" option as follows. - - $ wget --max-redirect=0 http://www.aaa.com/a.html - ----------- - - --2014-10-31 23:08:58-- http://www.aaa.com/a.html - Resolving aaa.com (aaa.com)... 1.2.3.4 - Connecting to aaa.com (aaa.com)|1.2.3.4|:80... connected. - HTTP request sent, awaiting response... 301 Moved Permanently - Location: http://www.bbb.com/b.html [following] - 0 redirections exceeded. - -As you can see, when wget encounters a HTTP redirect reponse, it does not follow the redirection, and simply stop with "0 redirections exceeded" error message. It will also show a received HTTP status code (e.g., 301). - -Note that curl, which is another similar HTTP client, behave oppositely. By default, curl does NOT follow URL redirection. To force curl to redirect a URL, you have to use "-L" option. - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/disable-http-redirect-wget.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/translated/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md b/translated/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md new file mode 100644 index 0000000000..c6beb3b802 --- /dev/null +++ b/translated/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md @@ -0,0 +1,33 @@ +Linux 有问必答 -- 如何在wget中禁用HTTP转发 +================================================================================ +> **提问**: 当我用wget获取一个重定向到URL Y的URL X的时候,wget默认会自动获取URL Y。然而我想要强制获取不带重定向的URL X。我该如何禁用wget重定向URL的功能。 + +在HTTP标准中,重定向响应(带3XX的HTTP响应)说明请求的URL被移到了新的位置。重定向相应接着包含了目标重定向的URL。 + +像常规的HTTP客户端,wget支持URL重定向(也叫URL转发),意味着当你尝试下载一个重定向的URL时,wget会自动跟随URL重定向获取重定向后的资源。如果你由于一些原因想要禁用URL重定向,并停止3XX的状态码,你可以使用wget的“--max-redirect=number”选项。这个选项用来指定最大(递归)重定向的数字,默认是20。 + +如果你想要禁用wget中的HTTP重定向,使用“--max-redirect=0” + + $ wget --max-redirect=0 http://www.aaa.com/a.html + +---------- + + --2014-10-31 23:08:58-- http://www.aaa.com/a.html + Resolving aaa.com (aaa.com)... 1.2.3.4 + Connecting to aaa.com (aaa.com)|1.2.3.4|:80... connected. + HTTP request sent, awaiting response... 301 Moved Permanently + Location: http://www.bbb.com/b.html [following] + 0 redirections exceeded. + +如你所见,当wget遇到HTTP重定向响应时,它不会跟着重定向,并以“0 redirections exceeded”(超出0次重定向)的错误信息停止。它同样会显示一个HTTP的状态码(比如301)。 + +注意一下curl,另外一个类似的HTTP客户端,行为正好相反。默认上,curl并不会跟随URL重定向。要强制使cutl重定向到一个URL,你要使用“-L”选项。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/disable-http-redirect-wget.html + +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file From bfaf1828d8bc3cb2a359fb8b6e6bf726496e68fd Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Thu, 6 Nov 2014 20:48:44 +0800 Subject: [PATCH 131/316] [translated] 20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md --- ...d Give a Fatal Blow to Windows in China.md | 37 ------------------- ...d Give a Fatal Blow to Windows in China.md | 36 ++++++++++++++++++ 2 files changed, 36 insertions(+), 37 deletions(-) delete mode 100644 sources/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md create mode 100644 translated/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md diff --git a/sources/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md b/sources/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md deleted file mode 100644 index deea3d30a2..0000000000 --- a/sources/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md +++ /dev/null @@ -1,37 +0,0 @@ -zpl1025 -Ubuntu Could Give a Fatal Blow to Windows in China -================================================================================ -> Ubuntu Kylin might be able to replace Windows in China - -**The Windows operating systems is going out the front door in China and its place will be taken by a Linux distribution that will be used by the authorities and the governing body. The problem is that there is no real alternative, although at least one OS might be ready for the task, and that is Ubuntu Kylin.** - -The Chinese government and Microsoft now have a rocky relationship, to say the least. [As detailed in today's news][1], a plan to replace Windows gradually throughout the country with a Linux counterpart is in the works. It's unclear what system will be used to take over, especially since this a very complex situation and a very big country. - -Usually, there is no size-fits-all solution to this kind of problem and the Chinese approach does seem to be a little too blunt. In any case, this opens up a great window of opportunity for Ubuntu Kylin, a distribution based on Ubuntu and developed by Chinese devs and Canonical. It's been stable for quite some time and they already had a few consecutive launches. - -### Ubuntu Kylin is knocking on Windows' door ### - -It's interesting to see that in the same day that this piece of news about the Chinese intentions surfaces, an interview with Dr. Jonas Zhang, vice professor of the National University of Defense Technology (NUDT), about the [recent launch of the 14.10 branch][2] has been published. - -"In our 14.10 release, there are some sweet new features. For example, beginners can find a replacement of Windows software via Ubuntu Kylin Software Center easily; users can login to Ubuntu Kylin applications and community via the SSO of Ubuntu Kylin (Single Sign-On System of Ubuntu Kylin, we call it UKID); Sogou IM (one of the most famous Chinese input method in the world, which has been launched on Apple’s App Store since last month) reduces 40% of the CPU and memory usage." - -"More than 50 project managers, engineers and community managers from CSIP (one service agency of China government), Canonical and NUDT (National University of Defense Technology) are working on Ubuntu Kylin. Most of the full-time engineers are from NUDT. Many developers from Ubuntu, Debian and other communities also take part in the development of Ubuntu Kylin," [said][2] Dr. Jonas Zhang. - -The Chinese government might be looking to build yet another Linux distro by itself (not their first attempt), but it looks like they could already have a very good candidate to take over Windows. This would also be very good business for Canonical, at least in terms of recognition. - -If Ubuntu, through its Kylin connection, manages to replace Windows in a country as big as China, it would be a huge boost for the company. It remains to be seen if the developers' efforts to make Ubuntu Kylin a competitive OS were not in vain. - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/Ubuntu-Could-Give-a-Fatal-Blow-to-Windows-in-China-463500.shtml - -作者:[Silviu Stahie][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/silviu-stahie -[1]:http://news.softpedia.com/news/China-Starts-Windows-Eradication-15-of-Govt-PCs-to-Switch-to-Linux-Every-Year-463393.shtml -[2]:http://news.softpedia.com/news/Ubuntu-Kylin-14-10-Utopic-Unicorn-Consolidates-Its-Position-in-China-463068.shtml -[3]:https://insights.ubuntu.com/2014/10/29/interview-nudt-talks-ubuntu-kylin-and-its-14-10-release/ diff --git a/translated/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md b/translated/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md new file mode 100644 index 0000000000..dbb885260d --- /dev/null +++ b/translated/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md @@ -0,0 +1,36 @@ +Ubuntu也许能在中国给Windows以致命打击 +================================================================================ +> Ubuntu Kylin也许能在中国用来替代Windows + +**Windows操作系统将退出中国的前门,而它的位置将由一个Linux发行版替代,用于官方和政府部门。问题是目前还没有一个真正的可替代系统,尽管还是有一款操作系统也许已经准备接下这个任务,它就是Ubuntu Kylin。** + +至少可以这么说,中国政府和微软目前的关系很紧张。[就像今天新闻里说的][1],一个用Linux类似系统在全国逐步替换Windows的计划已经在准备了。还不清楚具体会采用哪个系统,因为情况很复杂而且这是一个非常大的国家。 + +通常,这种问题没有一个普适的解决方案,而且中国的行动确实看起来有点呆板。不管怎样,这为Ubuntu Keylin打开了一扇巨大的机会之窗,它是一个基于Ubuntu由中国开发者和Canonical共同开发的发行版。它已经稳定一段时间了,而且已经发布了几个连续版本。 + +### Ubuntu Kylin在敲Windows的大门 ### + +有趣的是,在这个关于中国意图的新闻冒出来的同一天里,发布了一篇对国防科技大学(NUDT)副教授Dr. Jonas Zhang的采访,关于[最新的14.10分支开发计划][2]。 + +“在这次的14.10版本中,有许多很好的功能。比如,新手也可以轻松地通过Ubuntu Kylin软件中心找到Windows软件的替代;用户可以使用Ubuntu Kylin的SSO(Ubuntu Kylin的单一登录系统,我们叫它UKID)来登陆到Ubuntu Kylin的软件和社区;Sogou输入法(一款世界知名的中文输入法,上个月已经在苹果的应用市场上线了)减少了40%的CPU和内存占用。” + +“来自CSIP(中国政府的一个部门),Canonical和NUDT(国防科技大学)的超过50个项目经理,工程师和社区管理员在为Ubuntu Kylin工作。大部分全职工程师来自NUDT。许多来自Ubuntu,Debian和其他社区的开发者也参与到Ubuntu Kylin的开发中了。”Dr. Jonas Zhang[说][2]。 + +中国政府也许自己也正想办法搭建另一个Linux发行版(不是第一次尝试了),但是目前看来已经有一个很好的用来替代Windows的候选者了。这对于Canonical也是很好的商机,至少从被承认这个角度看。 + +如果Ubuntu,通过它和Kylin的联系,想在像中国这样一个大国里取代Windows,对这家公司是巨大的促进。让我们拭目以待,开发者们让Ubuntu Kylin变成一个有竞争力的操作系统的努力是不是白费力气。 + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Ubuntu-Could-Give-a-Fatal-Blow-to-Windows-in-China-463500.shtml + +作者:[Silviu Stahie][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:http://news.softpedia.com/news/China-Starts-Windows-Eradication-15-of-Govt-PCs-to-Switch-to-Linux-Every-Year-463393.shtml +[2]:http://news.softpedia.com/news/Ubuntu-Kylin-14-10-Utopic-Unicorn-Consolidates-Its-Position-in-China-463068.shtml +[3]:https://insights.ubuntu.com/2014/10/29/interview-nudt-talks-ubuntu-kylin-and-its-14-10-release/ From 32fe9b42ecaaaa160f2c4249f19f7109cfb50173 Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Thu, 6 Nov 2014 20:55:56 +0800 Subject: [PATCH 132/316] [translating] 20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md --- ...B, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md b/sources/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md index a7623855cc..2df4022de8 100644 --- a/sources/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md +++ b/sources/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md @@ -1,3 +1,4 @@ +zpl1025 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10/14.04/13.10 ================================================================================ **LEMP** is a combination of the operating system and open-source software stack. The acronym LEMP comes from the first letters of **L**inux, Nginx(**e**ngine-x) HTTP Server, **M**ySQL database, and **P**HP/**P**erl/**P**ython. @@ -345,4 +346,4 @@ via: http://www.unixmen.com/install-lemp-server-nginx-mysql-mariadb-php-phpmyadm 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.unixmen.com/author/sk/ -[1]:https://downloads.mariadb.org/mariadb/repositories/#mirror=tsinghua \ No newline at end of file +[1]:https://downloads.mariadb.org/mariadb/repositories/#mirror=tsinghua From ab33fbe74f32ecb7ad1476d63d9e7a06f2149c0d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 6 Nov 2014 21:51:58 +0800 Subject: [PATCH 133/316] =?UTF-8?q?20141106-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...s Mesa Driver Thanks to Valve's Efforts.md | 43 +++++++++++++++++++ ...Might End the Linux Packaging Nightmare.md | 36 ++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 sources/news/20141106 Massive 20% Improvement to Land in Intel's Mesa Driver Thanks to Valve's Efforts.md create mode 100644 sources/news/20141106 Ubuntu's Click Packages Might End the Linux Packaging Nightmare.md diff --git a/sources/news/20141106 Massive 20% Improvement to Land in Intel's Mesa Driver Thanks to Valve's Efforts.md b/sources/news/20141106 Massive 20% Improvement to Land in Intel's Mesa Driver Thanks to Valve's Efforts.md new file mode 100644 index 0000000000..f7d39124f8 --- /dev/null +++ b/sources/news/20141106 Massive 20% Improvement to Land in Intel's Mesa Driver Thanks to Valve's Efforts.md @@ -0,0 +1,43 @@ +Massive 20% Improvement to Land in Intel's Mesa Driver Thanks to Valve's Efforts +================================================================================ +> A group of devs from LunarG found a bottleneck in the driver + +**Intel users should see a major improvement with their hardware after a group of developers from LunarG found out that there was a bottleneck in the DRM driver.** + +![](http://i1-news.softpedia-static.com/images/news2/Massive-20-Improvement-to-Land-in-Intel-s-Mesa-Driver-Thanks-to-Valve-s-Efforts-464233-2.jpg) + +The drivers on the Linux platform are not stellar, and most of the time, pieces of hardware work better on other operating systems, like Windows, for example. It might be strange that the same game, on the same hardware, works better on one platform than it does on the other, but things have been like this forever and no one expects any kind of big breakthroughs. + +To be fair, the drivers from AMD, NVIDIA, and Intel have been improving in the last couple of years, especially after Steam for Linux was released. Actually, LunarG works with Valve to improve the state of the Intel drivers and to find ways to boost the performance on Linux. They had a big breakthrough and a kernel update should arrive very soon. + +### Users with Intel-powered machines should be very happy ### + +Valve tasked LunarG with improving the Intel drivers, which are lagging a little bit behind the competition, at least in terms of graphics. Some of the latest Intel processors are pretty powerful and you would expect them to be able to perform much better, at least as well as on Windows, but there was a problem. + +The guys from LunarG worked on a piece of software called GlassyMesa, which drastically improved Intel's shader compiler stack. They also made a number of improvements in the past few months, but none of these changes was reflected in the driver's performance. This led them to believe that there had to be a bottleneck somewhere along the line. + +"We started to suspect there was a bigger bottleneck masking the improvements, and sure enough we were able to generate a test program that showed a huge performance issue with how the hardware samplers were working as compared to the OpenGL driver running under windows. Something was slowing down the samplers on Linux, and we were determined to find out what," wrote the devs on their blog. + +They did all sorts of testing, but they don't have access to the way the hardware is set up. Therefore, they sent the test program to Intel and the engineers found the problem and corrected it. As you can imagine, the people at Intel didn't say anything about what they actually corrected. + +### 20% increase in performance is no small matter ### + +In any case, LunarG also published some of the improvements they saw, and one of them is a 20% increase in game framerate. + +- Left4Dead2 with frames that have hordes of zombies we've seen an increase of 17-25% +- Counter-Strike GO: 16-20% +- Lightsmark increased on a GT2 by 60% (HD4600) 4770 + +A kernel patch is required to make all these improvements available to users. It's not clear whether it will be available in Linux kernel 3.18 or 3.19, but it's coming. It also means that the kernel patch will be backported to the SteamOS kernel as well. + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Massive-20-Improvement-to-Land-in-Intel-s-Mesa-Driver-Thanks-to-Valve-s-Efforts-464233.shtml + +作者:[Silviu Stahie][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie \ No newline at end of file diff --git a/sources/news/20141106 Ubuntu's Click Packages Might End the Linux Packaging Nightmare.md b/sources/news/20141106 Ubuntu's Click Packages Might End the Linux Packaging Nightmare.md new file mode 100644 index 0000000000..9428333936 --- /dev/null +++ b/sources/news/20141106 Ubuntu's Click Packages Might End the Linux Packaging Nightmare.md @@ -0,0 +1,36 @@ +Ubuntu's Click Packages Might End the Linux Packaging Nightmare +================================================================================ +> It's time to have one type of package for all distros + +**The new Click packages that are already used on the Ubunu Touch platform by Canonical are also coming to the desktop and they might be able to change the Linux packaging paradigm.** + +![](http://i1-news.softpedia-static.com/images/news2/Ubuntu-s-Click-Packages-Might-End-the-Linux-Packaging-Nightmare-464271-3.jpg) + +Ubuntu is the most used Linux operating system, so it's very likely that, if something really catches on with users of this distribution, it will probably shake things up in the Linux ecosystem as well. For now, the app packaging for Linux operating systems is a mess. It has improved over the years, but it still poses many problems. + +There isn't any kind of unification and different distros use different packages. Debian-based distros use .deb and Fedora-based ones use .rpm, but you can also find packages with .sh or .run. The main problem is that they depend very much on the libraries that are already installed or available in the repos. Even if you have a .deb file for your Ubuntu system, it's not a guarantee that it will work. It might very well depend on a library that's not available for that particular version. + +### One package to rule them all ### + +For now, only the Ubuntu SDK can make Click packages, but they present some advantages over regular ones. For example, they are much safer than regular packages, mostly because there are no maintainer scripts that can run as root. In conjunction with the Ubuntu Software Center and Apparmor, the Click packages are pretty safe. + +One of the best features of Click packages is that they have no external dependencies, which means that you can basically run them on any system, regardless of the available libraries installed or in the repositories. Martin Albisetti from Canonical explains this feature in more detail on his [blog][1]. + +"Clicks, by design, can't express any external dependencies other than a base system (called a 'framework'). That means that if your app depends on a fancy library that isn't shipped by default, you just bundle it into the Click package and you're set. You get to update it whenever it suits you as a developer, and have predictability over how it will run on a user's computer (or device!). That opens up the possibility of shipping newer versions of a library, or just sticking with one that works for you." + +Another cool feature is that Click packages for different versions of the same app can be run on the same system. There are numerous applications out there that need to be alone on the system, otherwise they create problems for users, but the confinement provided by Click packages solves this issue. + +These are just a few of the features that are already implemented. It will take a while until they reach the desktop, however. They will land along with Unity 8, but they are coming nonetheless. We can only hope that other distros will adopt this kind of format and not do their own similar thing, which would preserve the current packaging problems. + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Ubuntu-s-Click-Packages-Might-End-the-Linux-Packaging-Nightmare-464271.shtml + +作者:[Silviu Stahie][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:http://beuno.com.ar/archives/334 \ No newline at end of file From 3cf6a4484d6772d4f916f62ceae9710c153f4041 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 6 Nov 2014 21:59:49 +0800 Subject: [PATCH 134/316] =?UTF-8?q?20141106-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...es Ahoy Ubuntu Scope Showdown Kicks Off.md | 48 ++++++++++++++ ... Player Returns With New Look, Features.md | 62 +++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 sources/news/20141106 Prizes Ahoy Ubuntu Scope Showdown Kicks Off.md create mode 100644 sources/share/20141106 Tomahawk Music Player Returns With New Look, Features.md diff --git a/sources/news/20141106 Prizes Ahoy Ubuntu Scope Showdown Kicks Off.md b/sources/news/20141106 Prizes Ahoy Ubuntu Scope Showdown Kicks Off.md new file mode 100644 index 0000000000..6025552df4 --- /dev/null +++ b/sources/news/20141106 Prizes Ahoy Ubuntu Scope Showdown Kicks Off.md @@ -0,0 +1,48 @@ +Prizes Ahoy! Ubuntu Scope Showdown Kicks Off +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/scope.jpg) + +**SDK at the ready: Ubuntu has launched a new development competition for its mobile platform, with some swish prizes up for grabs for the winners.** + +The ‘[Ubuntu Scope Showdown][1]‘ is the third such initiative to be held by the project and the second pitched squarely at mobile. + +But this time around amateur and l33t developers alike are being tasked with a new brief: creating custom home screen experiences — ‘[Scopes][2]’ — for Ubuntu on phones. + +### Er, What Is a Scope? ### + +We often refer to Scopes as mini search engines, little portals that help you find content from a specific web site, service or topic — think ‘eBay’, ‘Cat gifs’, or ‘Restaurants Nearby’ — from the home screen, no need to open an app. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/scopes-customization.jpg) + +Thanks to the rich variety of result layouts content can be surfaced and previewed in interesting, intuitive ways. And when you’re happy with what you’ve found you can (typically) click through to open it up in an app or a new tab in the Ubuntu web browser. + +Scopes can be added, removed, re-ordered and ‘favourited’ for easy access. Some Scopes can search multiple sources, others just the one. + +It’s because of this multifariousness that makes the lack of a traditional home screen as we know it from Android, iOS and other mobile platforms (pages and pages of scopes) less of a negative. There’s no desktop; no custom wallpaper you can cover with icons, folders, shortcuts and widgets, but there is, quite literally, a world of information at your fingertips. + +### The Competition ### + +The Ubuntu Scope Showdown runs for five weeks (October 30 – December 3) giving participants just about enough time to take a project from concept to completion using the Ubuntu SDK and submitted to the Ubuntu Store. + +The overall winner (decided by a judging panel of which, disclaimer ahoy, I am part of), will bag a brand new Dell XPS 13 Laptop (Developer Edition) preloaded with Ubuntu. + +Runners up nab a Logitech UE Boom Bluetooth speaker, a Nexus 7 (2013) running Ubuntu, or one of two bundles of Ubuntu merchandise. + +Interested in taking part? You’ll find more details on the entry requirements plus links to all the documentation you can eat on the [developer.ubuntu.com mini-site][3]. + +Will you be taking part? + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/ubuntu-scope-showdown-competition-launched + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://developer.ubuntu.com/2014/10/scope-development-competition/ +[2]:http://developer.ubuntu.com/scopes/ +[3]:http://developer.ubuntu.com/ \ No newline at end of file diff --git a/sources/share/20141106 Tomahawk Music Player Returns With New Look, Features.md b/sources/share/20141106 Tomahawk Music Player Returns With New Look, Features.md new file mode 100644 index 0000000000..187800d772 --- /dev/null +++ b/sources/share/20141106 Tomahawk Music Player Returns With New Look, Features.md @@ -0,0 +1,62 @@ +Tomahawk Music Player Returns With New Look, Features +================================================================================ +**After a quiet year Tomahawk, the Swiss Army knife of music players, is back with a brand new release to sing about. ** + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/tomahawk-tile-1.jpg) + +Version 0.8 of the open-source and cross-platform app adds **support for more online services**, refreshes its appearance, and doubles down on making sure its innovative social features work flawlessly. + +### Tomahawk — The Best of Both Worlds ### + +Tomahawk marries a traditional app structure with the modernity of our “on demand” culture. It can browse and play music from local libraries as well as online services like Spotify, Grooveshark, and SoundCloud. In its latest release it adds Google Play Music and Beats Music to its roster. + +That may sound cumbersome or confusing on paper but in practice it all works fantastically. + +When you want to play a song, and don’t care where it’s played back from, you just tell Tomahawk the track title and artist and it automatically finds a high-quality version from enabled sources — you don’t need to do anything. + +![](http://i.imgur.com/nk5oixy.jpg) + +The app also sports some additional features, like EchoNest profiling, Last.fm suggestions, and Jabber support so you can ‘play’ friends’ music. There’s also a built-in messaging service so you can quickly share playlists and tracks with others. + +> “This fundamentally different approach to music enables a range of new music consumption and sharing experiences previously not possible,” the project says on its website. And with little else like it, it’s not wrong. + +![Tomahawk supports the Sound Menu](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/tomahawk-controllers.jpg) + +Tomahawk supports the Sound Menu + +### Tomahawk 0.8 Release Highlights ### + +- New UI +- Support for Beats Music support +- Support for Google Play Music (stored and Play All Access) +- Support for drag and drop iTunes, Spotify, etc. web links +- Now Playing notifications +- Android app (beta) +- Inbox improvements + +### Install Tomahawk 0.8 in Ubuntu ### + +As a big music streaming user I’ll be using the app over the next few days to get a fuller appreciation of the changes on offer. In the mean time, to go hands on for yourself, you can. + +Tomahawk 0.8 is available for Ubuntu 14.04 LTS and Ubuntu 14.10 via an official PPA. + + sudo add-apt-repository ppa:tomahawk/ppa + + sudo apt-get update && sudo apt-get install tomahawk + +Standalone installers, and more information, can be found on the official project website. + +- [Visit the Official Tomahawk Website][1] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/tomahawk-media-player-returns-new-look-features + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://gettomahawk.com/ \ No newline at end of file From c7f4d6c00047d49bf06bdf60135067e2ca59e1f9 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 6 Nov 2014 22:09:11 +0800 Subject: [PATCH 135/316] =?UTF-8?q?20141106-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...w Services Through Firewall In openSUSE.md | 31 ++++++++ ...l Linux System Time and Date in Systemd.md | 71 +++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 sources/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md create mode 100644 sources/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md diff --git a/sources/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md b/sources/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md new file mode 100644 index 0000000000..b7ecd879a4 --- /dev/null +++ b/sources/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md @@ -0,0 +1,31 @@ +[Quick Tip] Allow Services Through Firewall In openSUSE +================================================================================ +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/openSUSE.png) + +As you may know, not all services are enabled and allowed by default in openSUSE/SUSE systems. For example, **ssh** service is not allowed through firewall on openSUSE systems. Of course, it’s a safety precaution, but sometimes we must need ssh service to access the system from a remote location. + +This quick tutorial will show how to allow services, not only ssh, but all other services such as http, ftp etc., through firewall. We can allow the services from **YaST**, which is the default installation and configuration tool for openSUSE, and SUSE enterprise. + +First, open YaST Control Center from menu. Go to **Security and Users -> Firewall**. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/openSUSE-13.1-Running-Oracle-VM-VirtualBox_001.png) + +Go to **Allowed Services** tab. Select **Secure Shell Service** from the Service to Allow drop-down box, and finally click **Add**, **Next** and **Finish** buttons to allow the service. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/openSUSE-13.1-Running-Oracle-VM-VirtualBox_002.png) + +That’s it. The ssh service has been allowed now, so you can access the system from a remote system. Like this way, we can also other required services. + +Cheers!! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/quick-tip-allow-services-firewall-opensuse/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ \ No newline at end of file diff --git a/sources/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md b/sources/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md new file mode 100644 index 0000000000..72a4187a85 --- /dev/null +++ b/sources/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md @@ -0,0 +1,71 @@ +timedatectl - Control Linux System Time and Date in Systemd +================================================================================ +**timedatectl** is a Linux utility that may be used to query and change the system clock and it's settings. It is distributed as part of the [systemd system and service manager][1] and allows you to review and change the configuration of the system clock. + +In this article we will cover all aspects of using this small but important utility + +### Current status of the time on the system ### + +To have a look at the current date/time on the system, as well as the current time settings on the system you can use the command without any arguments like this: + + # timedatectl + +And the output should look something like this: + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/timedatectl.jpg) + +### Changing the date ### + +To change the system date you simply have to type timedatectl set-time followed by the date in the format YYYY-MM-DD where YYYY stands for the year, MM for the month in 2 digit and DD for the day in 2 digit. For example if you wish to change the date to 4th of February 2015 you should use the following command: + + # timedatectl 2015-02-04 + +### Changing the time ### + +To change the time you will use the tool in a similar fashion, you will still use timedatectl set-time but use the format HH:MM:SS where HH stands for hour in 24-hour format, MM for minutes and SS for seconds. To set the current time to 22:04:43 use the following command: + + # timedatectl 22:04:43 + +### Changing the timezone ### + +Setting the correct timezone is crucial for time keeping specially if you synchronize it with the NTP protocol. First you you should list the available timezones in your region with the list-timezones option, you can also use grep and more to make the format easier to read like this: + + # timedatectl list-timezones | grep America | more + +This will display the list an easy to scroll format. + +After you know how the timezone you wish to set is named you can change it with the following command: + + # timedatectl set-timezone America/Los_Angeles + +### Setup the local-rtc ### + +The **real-time clock (RTC)**, commonly referred to as a hardware clock is completely independent of the current state of the operating system and runs even when the computer is shut down. You can configure the system to maintain the RTC in universal time or in local time. Note that maintaining the RTC in the local timezone is not fully supported and will create various problems with time zone changes and daylight saving adjustments. If at all possible, keep the RTC in UTC mode. The only issue with this may be that other operating systems may not fully support it (in case you run 2 operating systems on the same machine). + +To have the RTC set to UTC use the following setting: + + # timedatectl set-local-rtc 0 + +To have it set in local time, use this: + + # timedatectl set-local-rtc 1 + +### Setup NTP synchronization ### + +**Network Time Protocol (NTP)** is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks. NTP is intended to synchronize all participating computers to within [a few milliseconds of Coordinated Universal Time (UTC)][2]. If you wish to set NTP synchronization you can use the set-ntp option to have this setup. Use “no” to disable NTP synchronization and use “yes” to have it enabled. + + # timedatectl set-ntp yes + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/timedatectl-change-time-date-systemd/ + +作者:[Adrian Dinu][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/adriand/ +[1]:http://www.freedesktop.org/wiki/Software/systemd/ +[2]:https://en.wikipedia.org/wiki/Coordinated_Universal_Time \ No newline at end of file From 80579217f88e23ca8d45648e46fe653489f5fec7 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 6 Nov 2014 22:30:55 +0800 Subject: [PATCH 136/316] =?UTF-8?q?20141106-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...XD Open Source Virtualization Container.md | 39 +++++ ...oftware For Linux and Unix-like Systems.md | 162 ++++++++++++++++++ 2 files changed, 201 insertions(+) create mode 100644 sources/news/20141106 Canonical Launches LXD Open Source Virtualization Container.md create mode 100644 sources/share/20141106 5 Awesome Open Source Backup Software For Linux and Unix-like Systems.md diff --git a/sources/news/20141106 Canonical Launches LXD Open Source Virtualization Container.md b/sources/news/20141106 Canonical Launches LXD Open Source Virtualization Container.md new file mode 100644 index 0000000000..96f1747db1 --- /dev/null +++ b/sources/news/20141106 Canonical Launches LXD Open Source Virtualization Container.md @@ -0,0 +1,39 @@ +Canonical Launches LXD Open Source Virtualization Container +================================================================================ +> Canonical is launching a new container-based virtualization hypervisor for its open source Ubuntu Linux operating system, called LXD. How will it get along with Docker? + +As open source container-based virtualization explodes in popularity, perhaps it was only a matter of time before [Canonical][1] announced its own, homegrown virtualization container system to contend with [Docker][2]. That's what the company has now done with the launch of [LXD][3] for [Ubuntu Linux][4]. + +Canonical announced the hypervisor— which the company is pronouncing "lex-dee," the better, I suppose, to avoid confusion with the Schedule 1 drug of similar nomenclature—Nov. 4. The pitch for the tool, which is basically a server for the [LXC][5] virtualized container system built into the Linux kernel, goes like this: + +> Imagine you could launch a new machine in under a second, and that you could launch hundreds of them on a single server. Hundreds! Now, imagine that you have hardware-guaranteed security to ensure that those machines can’t pry or spy on one another. Imagine you can connect them separately and securely to networks. And imagine that you can run that on a single node or a million, live migrate machines between those nodes, and talk to all of it through a clean, extensible REST API. That's what LXD sets out to deliver. + +LXD will also feature tight integration with OpenStack—in fact, it's part of Canonical's [OpenStack][6] Juno for Ubuntu—as well as hardware-level security protections, according to the company, which said it is working with chip manufacturers (it hasn't indicated which ones) on the latter technology. + +This is all pretty cool. If Canonical fully implements these features, LXD could go a long way toward making LXC a truly enterprise-ready containerized virtualization platform. + +But to do that, Canonical needs to siphon off some of the momentum Docker is currently enjoying and reorient part of the open source container-based virtualization world toward LXD. So far, Canonical appears eager to position LXD as a technology that can complement and enhance Docker, not compete directly with it. That makes sense to a degree, since LXD and Docker are somewhat different sorts of beasts, at least for now. But Canonical has stated its ambition "to bring much of the awesome security and isolation of LXD to docker [sic] as well," an idea that may not sit well with the Docker community, especially if LXD remains closely intertwined with Ubuntu rather than being distribution-agnostic. + +It doesn't help that what Canonical is doing with LXD is very similar to what it has already done with technologies including [Unity][7], the desktop interface it designed for Ubuntu. Like LXD, Unity was a way for Canonical to replace a major part of the Ubuntu software stack—specifically, the [GNOME][8] desktop environment—with a homegrown alternative, providing the company more control over Ubuntu, yet also making Ubuntu less readily compatible with many open source apps that were not designed for Ubuntu and Unity. The move engendered more than a little ill-will among the Ubuntu user base, although most of that sentiment has long since dissipated. + +It's hard to imagine Canonical marginalizing Docker in the same way it has GNOME, and even harder to imagine many people feeling emotional about this in the way they did when Unity replaced GNOME. But time will tell. + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/ubuntu/110514/canonical-launches-lxd-open-source-virtualization-container + +作者:[Christopher Tozzi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://thevarguy.com/author/christopher-tozzi +[1]:http://canonical.com/ +[2]:http://docker.com/ +[3]:http://www.ubuntu.com/cloud/tools/lxd +[4]:http://ubuntu.com/ +[5]:https://linuxcontainers.org/ +[6]:http://openstack.org/ +[7]:http://unity.ubuntu.com/ +[8]:http://www.gnome.org/ \ No newline at end of file diff --git a/sources/share/20141106 5 Awesome Open Source Backup Software For Linux and Unix-like Systems.md b/sources/share/20141106 5 Awesome Open Source Backup Software For Linux and Unix-like Systems.md new file mode 100644 index 0000000000..9b99906519 --- /dev/null +++ b/sources/share/20141106 5 Awesome Open Source Backup Software For Linux and Unix-like Systems.md @@ -0,0 +1,162 @@ +5 Awesome Open Source Backup Software For Linux and Unix-like Systems +================================================================================ +A good backup plan is essential in order to have the ability to recover from + +- Human errors +- RAID or disk failure +- File system corruption +- Data center destruction and more. + +In this post I'm going to list amazingly awesome open source Backup software for you. + +### What to look for when choosing backup software for an enterprise? ### + +Make sure the following features are supported backup software you deploy: + +1. **Open source software** - You must use software for which the original source code is made freely available and may be and modified. This ensures that you can recover your data in case vendor/project stopped working on software or refused to provide patches. +1. **Cross-platform support** - Make sure backup software works well on the OS deployed on all desktop and server operating systems. +1. **Data format** - Open data format ensures that you can recover data in case vendor or project stopped working on software. +1. **Autochangers** - Autochangers are nothing but a variety of backup devices, including library, near-line storage, and autoloader. Autochangers allows you to automate the task of loading, mounting, and labeling backup media such as tape. +1. **Backup media** - Make sure you can backup data on tape, disk, DVD and in cloud storage such as AWS. +1. **Encryption datastream** - Make sure all client-to-server traffic will be encrypted to ensure transmission integrity over the LAN/WAN/Internet. +1. **Database support** - Make sure backup software can backup database server such as MySQL or Oracle. +1. **Backup span multiple volumes** - Backup software can split each backup (dumpfile) into a series of parts, allowing for different parts to existing on different volumes. This ensures that large backups (such as 100TB file) can be stored on larger than a single backup device such as disk or tape volume. +1. **VSS (Volume Shadow Copy)** - It is [Microsoft's Volume Shadow Copy Service (VSS)][1] and it is used to create snapshots of data that is to be backed up. Make sure backup software support VSS for MS-Windows client/server. +1. **[Deduplication][2]** - It is a data compression technique for eliminating duplicate copies of repeating data (for example, images). +1. **License and cost** - Make sure you [understand and use of open source license][3] under which the original backup software is made available to you. +1. **Commercial support** - Open source software can provide community based (such as email list or fourm) or professional (such as subscriptions provided at additional cost) based support. You can use paid professional support for training and consulting purpose. +1. **Reports and alerts** - Finally, you must able to see backup reports, current job status, and get alert when something goes wrong while making backups. + +### Bacula - Client/server backup tool for heterogeneous networks ### + +I personally use this software to manage backup and recovery across a network of computers including Linux, OSX and Windows. You can configure it via a CLI, GUI or web interface. + +![](http://s0.cyberciti.org/uploads/cms/2014/11/bacula-network-backup.jpg) + +- Operating system : Cross-platform +- Backup Levels : Full, differential, incremental, and consolidation. +- Data format: Custom but fully open. +- Autochangers: Yes +- Backup media: Tape/Disk/DVD +- Encryption datastream: Yes +- Database support: MSSQL/PostgreSQL/Oracle/ +- Backup span multiple volumes: Yes +- VSS: Yes +- License : Affero General Public License v3.0 +- Download url : [bacula.org][4] + +### Amanda - Another good client/server backup tool ### + +AMANDA is an acronym for Advanced Maryland Automatic Network Disk Archiver. It allows the sysadmin to set up a single backup server to back up other hosts over network to tape drives or disk or authchangers. + +- Operating system : Cross-platform +- Backup Levels : Full, differential, incremental, and consolidation. +- Data format: Open (can be recovered using tool such as tar). +- Autochangers: Yes +- Backup media: Tape/Disk/DVD +- Encryption datastream: Yes +- Database support: MSSQL/Oracle +- Backup span multiple volumes: Yes +- VSS: Yes +- License : GPL, LGPL, Apache, Amanda License +- Download url : [amanda.org][5] + +### Backupninja - Lightweight backup system ### + +Backupninja is a simple and easy to use backup system. You can simply drop a config files into /etc/backup.d/ to backup multiple hosts. + +![](http://s0.cyberciti.org/uploads/cms/2014/11/ninjabackup-helper-script.jpg) + +- Operating system : Linux/Unix +- Backup Levels : Full and incremental (rsync+hard links) +- Data format: Open +- Autochangers: N/A +- Backup media: Disk/DVD/CD/ISO images +- Encryption datastream: Yes (ssh) and [encrypted remote backups via duplicity][6] +- Database support: MySQL/PostgreSQL/OpenLDAP and subversion or trac repositories. +- Backup span multiple volumes: ?? +- VSS: ?? +- License : GPL +- Download url : [riseup.net][7] + +### Backuppc - High-performance client/server tool ### + +Backuppc is can be used to backup Linux and Windows based systems to a master server's disk. It comes with a clever pooling scheme minimizes disk storage, disk I/O and network I/O. + +![](http://s0.cyberciti.org/uploads/cms/2014/11/BackupPCServerStatus.jpg) + +- Operating system : Linux/Unix and Windows +- Backup Levels : Full and incremental (rsync+hard links and pooling scheme) +- Data format: Open +- Autochangers: N/A +- Backup media: Disk/RAID storage +- Encryption datastream: Yes +- Database support: Yes (via custom shell scripts) +- Backup span multiple volumes: ?? +- VSS: ?? +- License : GPL +- Download url : [backuppc.sourceforge.net][8] + +### UrBackup - Easy to setup client/server system ### + +It is an easy to setup open source client/server backup system, that through a combination of image and file backups accomplishes both data safety and a fast restoration time. Your files can be restored through the web interface or the Windows Explorer while the backups of drive volumes can be restored with a bootable CD or USB-Stick (bare metal restore). A web interface makes setting up your own backup server really easy. + +![](http://s0.cyberciti.org/uploads/cms/2014/11/urbackup.jpg) + +- Operating system : Linux/FreeBSD/Unix/Windows/several Linux based NAS operating systems. Client only runs on Linux and Windows. +- Backup Levels : Full and incremental +- Data format: Open +- Autochangers: N/A +- Backup media: Disk/Raid storage/DVD +- Encryption datastream: Yes +- Database support: ?? +- Backup span multiple volumes: ?? +- VSS: ?? +- License : GPL v3+ +- Download url : [urbackup.org][9] + +### Other awesome open source backup software for your consideration ### + +The Amanda, Bacula and above-mentioned software are feature rich but can be complicated to set for small network or a single server. I recommend that you study and use the following backup software: + +1. [Rsnapshot][10] - I recommend this tool for local and remote filesystem snapshot utility. See how to set and use [this tool on Debian/Ubuntu Linux][11] and [CentOS/RHEL based systems][12]. +1. [rdiff-backup][13] - Another great remote incremental backup tool for Unix-like systems. +1. [Burp][14] - Burp is a network backup and restore program. It uses librsync in order to save network traffic and to save on the amount of space that is used by each backup. It also uses VSS (Volume Shadow Copy Service) to make snapshots when backing up Windows computers. +1. [Duplicity][15] - Great encrypted bandwidth-efficient backup for Unix-like system. See how to [Install Duplicity for encrypted backup in cloud][16] for more infomation. +1. [SafeKeep][17] - SafeKeep is a centralized and easy to use backup application that combines the best features of a mirror and an incremental backup. +1. [DREBS][18] - DREBS is a tool for taking periodic snapshots of EBS volumes. It is designed to be run on the EC2 host which the EBS volumes to be snapshoted are attached. +1. Old good unix programs like rsync, tar, cpio, mt and dump. + +### Conclusion ### + +I hope you will find this post useful to backup your important data. Do not forgot to verify your backups and make multiple backup copies of your data. Also, RAID is not a backup solution. Use any one of the above-mentioned programs to backup your servers, desktop/laptop and personal mobile devices. If you know of any other open source backup software I didn't mention, share them in the comments below. + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/open-source/awesome-backup-software-for-linux-unix-osx-windows-systems/ + +作者:[nixCraft][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.cyberciti.biz/tips/about-us +[1]:http://technet.microsoft.com/en-us/library/cc785914(v=ws.10).aspx +[2]:http://en.wikipedia.org/wiki/Data_deduplication +[3]:http://opensource.org/licenses +[4]:http://www.bacula.org/ +[5]:http://www.amanda.org/ +[6]:http://www.cyberciti.biz/faq/duplicity-installation-configuration-on-debian-ubuntu-linux/ +[7]:https://labs.riseup.net/code/projects/backupninja +[8]:http://backuppc.sourceforge.net/ +[9]:http://www.urbackup.org/ +[10]:http://www.rsnapshot.org/ +[11]:http://www.cyberciti.biz/faq/linux-rsnapshot-backup-howto/ +[12]:http://www.cyberciti.biz/faq/redhat-cetos-linux-remote-backup-snapshot-server/ +[13]:http://www.nongnu.org/rdiff-backup/ +[14]:http://burp.grke.org/ +[15]:http://www.cyberciti.biz/open-source/awesome-backup-software-for-linux-unix-osx-windows-systems/ +[16]:http://www.cyberciti.biz/faq/duplicity-installation-configuration-on-debian-ubuntu-linux/ +[17]:http://safekeep.sourceforge.net/ +[18]:https://github.com/dojo4/drebs \ No newline at end of file From 4d8082635658aa77a536000890843d2884c11f4c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 6 Nov 2014 23:06:11 +0800 Subject: [PATCH 137/316] =?UTF-8?q?20141106-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...--A Feature-Complete GNOME Music Player.md | 75 +++++++++++++++++++ ...a Stylish Interface Ubuntu Installation.md | 55 ++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 sources/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md create mode 100644 sources/share/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md diff --git a/sources/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md b/sources/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md new file mode 100644 index 0000000000..cd650fca22 --- /dev/null +++ b/sources/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md @@ -0,0 +1,75 @@ +Exaile 3.4.1 Overview – A Feature-Complete GNOME Music Player +================================================================================ +**Exaile** has been a bit quiet in the past two years with maybe only one or two stable releases, but nevertheless, it’s one of the full-featured music players for GNOME which are on par with applications like [Rhythmbox][1] or [Banshee][2] in terms of features. However, over the past two months a new stable release, 3.4, has been put out under the slogan “We’re not dead yet”, as well as an incremental 3.4.1 release, which shipped on November 1. To be honest, Exaile has so many features that I could go on writing a lot more than an article to cover them all, so let’s have a look at some of the most notable ones. + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile02.jpg) + +[Exaile][3] is a GTK2-based music player written in Python which fits well into GNOME, has an interface which pretty much resembles the one of the old Amarok 1.4 or actual Clementine, and ships with some great features. The interface is composed mainly of two panels, both with support for tabs. The left panel provides access to the collection, Internet radio, smart and custom playlists, file browser, podcasts, Group Tagger and lyrics while the main area of the window is taken by the playlists (with multiple, tabbed playlist support) and control buttons. + +Exaile’s interface is very similar to the one of Clementine or Amarok 1.4 and the tabs on the left can be shown or hidden: + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile04.jpg) + +Version 3.4 shipped with a big number of major new features and changes while 3.4.1 was a small bug fix release. The major new features in 3.4 include new plugins like Icecast, Lyricsmania, Playlist Analyzer, Soma.fm, a new, simpler plugin API. Changes were done to the user interface and the general behavior as well, with the possibility to show playlists in multiple panels, close left panels, better BPM UI integration. + +The first time it starts you can add music folders to the collection – you can also choose to add directories and enable or disable monitoring or scanning them at start-up: + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile01.jpg) + +Exaile’s features are practically countless. You can organize your music in a collection, listen to podcasts, set song ratings, edit tags, view file properties, queue tracks, view lyrics and covers, sort the playlist by a huge number of criteria, change playback behavior or appearance style. + +Equalizer, cover manager and listening to Internet radio: + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile05.jpg) + +Local album covers are detected automatically and can be shown in full size, with the possibility to zoom in or out: + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile03.jpg) + +The preferences window allows to configure various aspects of Exaile, including enable or disable plugins, appearance, system tray integration, or playback. The appearance settings will allow you to change the tabs placement, show/hide the tab bar, enable or disable transparency, or disable the start-up splash screen. + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_preferences_01.jpg) + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_preferences_02.jpg) + +The system tray integration offers a menu to quickly play/pause songs, set a song rating or change the way the playlist handles playback (shuffle, repeat or dynamic). + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_tray.jpg) + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_tray.jpg) + +The countless features in Exaile I believe make it the perfect choice as a music player, especially for GNOME users. Any user should be satisfied with the wealth of options and the highly configurable approach. + +### Install Exaile 3.4.1 in Ubuntu 14.04 and 14.10 ### + +Compiling and installing from source should be pretty straightforward. First, get the dependencies: + + sudo apt-get build-dep exaile + sudo apt-get install python-gst0.10 + +Download the source tarball from the [downloads page][4] (direct link [here][5]), then uncompress it: + + tar -xf exaile-3.4.1.tar.gz + +Change the working directory to exaile-3.4.1 and issue the following commands: + + make + sudo make install + +The binary will be installed as **/usr/local/bin/exaile**. + +-------------------------------------------------------------------------------- + +via: http://www.tuxarena.com/2014/11/exaile-3-4-1-overview-a-feature-complete-gnome-music-player/ + +作者:Craciun Dan +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://wiki.gnome.org/Apps/Rhythmbox +[2]:http://banshee.fm/ +[3]:http://www.exaile.org/ +[4]:http://www.exaile.org/download/ +[5]:https://github.com/exaile-dev/exaile/archive/3.4.1.tar.gz \ No newline at end of file diff --git a/sources/share/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md b/sources/share/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md new file mode 100644 index 0000000000..357a3b6e6c --- /dev/null +++ b/sources/share/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md @@ -0,0 +1,55 @@ +Flow ‘N Play Movie Player Has a Stylish Interface [Ubuntu Installation] +================================================================================ +**Flow ‘N Play** is a new video player written in Qt which features a pretty slick and simple interface which provides only the basic features for playing movies. + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/flow_n_play.jpg) + +[Flow ‘N Play][1] is relatively new video player (the first release was made earlier this year in March) with a beautiful interface and a pretty simple approach, with one of the features being the possibility to slide over the list of movies by dragging the mouse. The player comes with basic functionality, a search function, support for colored themes. + +Opening a new video – you can also choose a custom cover in the same dialog: + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/flow_n_play_open.jpg) + +The Settings dialog – customize some basic options here: + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/flow_n_play_settings.jpg) + +Flow ‘N Play is still in early development though, and as such it has a few downsides over more advanced players. There are few options to customize it, no support for subtitles or video and audio filters. Currently there seems to be either a bug or strange behavior upon opening a new movie, which doesn’t always start automatically. + +I believe a few more features could be added before it gets to being usable as a decent alternative to other players, but given the time, Flow ‘N Play looks really promising. + +### Install Flow ‘N Play 0.922 in Ubuntu 14.04 ### + +There are several different ways to install Flow N’ Play in Ubuntu. There are DEB packages, RUN Bash installers, and standalone binaries available on the [Qt-Apps page][2]. + +To install Flow ‘N Play first get the dependencies: + + sudo apt-get install libqt5multimediaquick-p5 qtdeclarative5-controls-plugin qtdeclarative5 qtmultimedia-plugin qtdeclarative5-qtquick2-plugin qtdeclarative5-quicklayouts-plugin + +Then download the DEB package and either double click it or change the working directory to the one where you saved it and type the following in a terminal (for 64-bit, replace the DEB file for 32-bit): + + sudo dpkg -i flow-n-play_v0.926_qt-5.3.2_x64.deb + +Then type **flow-n-play** in a terminal to run it. Notice that in case you get dependency errors when trying to install the DEB file, you can run **sudo apt-get -f install**, which will fetch the missing dependencies automatically and will install Flow ‘N Play as well. + +To install Flow ‘N Play using the RUN script, install the dependencies mentioned above and then run the script: + + wget -O http://www.prest1ge-c0ding.24.eu/programs/Flow-N-Play/v0.926/bin/flow-n-play_v0.926_qt-5.3.2_x64.run + sudo ./flow-n-play_v0.926_qt-5.3.2_x64.run + +The third method is to install it manually to a location of your choice (just download the binary provided after installing the dependencies) e.g. for 32-bit: + + wget -O http://www.prest1ge-c0ding.24.eu/programs/Flow-N-Play/v0.926/bin/Flow-N-Play_v0.926_Qt-5.3.2_x86 + +-------------------------------------------------------------------------------- + +via: http://www.tuxarena.com/2014/11/flow-n-play-movie-player-has-a-stylish-interface-ubuntu-installation/ + +作者:Craciun Dan +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.prest1ge-c0ding.24.eu/programme-php/app-flow_n_play.php?lang=en +[2]:http://qt-apps.org/content/show.php/Flow+%27N+Play?content=167736 \ No newline at end of file From 40e6e608465543bb772d087b15982c6d4ac20fd5 Mon Sep 17 00:00:00 2001 From: johnhoow Date: Thu, 6 Nov 2014 23:21:18 +0800 Subject: [PATCH 138/316] translated --- ...ntu 14.04 Trusty To Ubuntu 14.10 Utopic.md | 59 +++++++++---------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/sources/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md b/sources/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md index dee546fd1e..489342c4f9 100644 --- a/sources/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md +++ b/sources/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md @@ -1,75 +1,72 @@ -johnhoow translating... -How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic +如何将Ubuntu14.04安全的升级到14.10 ================================================================================ -Hello all! Greetings! Today, we will discuss about how to upgrade from Ubuntu 14.04 to 14.10 final beta. As you may know, Ubuntu 14.10 final beta has already been released. According to the [Ubuntu release schedule][1], the final stable version will be available today in a couple of hours. +本文将讨论如何将Ubuntu14.04升级到14.10的beta版。Ubuntu14.10的最终beta版已经发布了 -Do you want to upgrade to Ubuntu 14.10 from Ubuntu 14.04/13.10/13,04/12,10/12.04, or older version on your system? Just follow the simple steps given below. Please note that you can’t directly upgrade from 13.10 to 14.04. First, you should upgrade from 13.10 to 14.04, and then upgrade from 14.04 to 14.10. Clear? Good. Now, Let us start the upgrade process. +如果想从Ubuntu14.04/13.10/13.04/12.10/12.04或者更老的版本升级到14.10,只要遵循下面给出的步骤。注意,你不能直接从13.10升级到14.10。你应该想将13.10升级到14.04在从14.04升级到14.10。下面是详细步骤。 -Though, the steps provided below are compatible for Ubuntu 14.10, It might work for other Ubuntu derivatives such as Lubuntu 14.10, Kubuntu 14.10, and Xubuntu 14.10 as well. +下面的步骤不仅能用于14.10,也兼容于一些像Lubuntu14.10,Kubuntu14.10和Xubuntu14.10等的Ubuntu衍生版本 -**Important**: Before upgrading, don’t forget to backup your important data to any external device like USB hdd or CD/DVD. +**重要**:在升级之前,保险起见,不要忘了将你的数据在U盘或外部硬盘上保存一下。 -### Desktop Upgrade ### +### 桌面升级 ### -Before going to upgrade, we need to update the system. Open up the Terminal and enter the following commands. +在升级之前,我们要先更新系统。打开终端输入以下命令 sudo apt-get update && sudo apt-get dist-upgrade -The above command will download and install the available latest packages. +上面的命令会下载安装最新的包。 -Reboot your system to finish installing updates. +重启你的电脑以完成更新。 -Now, enter the following command to upgrade to new available version. +然后输入下面的命令来升级到新的可获得的版本 sudo update-manager -d -Software Updater will show up and search for the new release. +软件更新器会出现并且搜索新的发行版。 -After a few seconds, you will see a screen like below that saying: “**However, Ubuntu 14.10 is available now (you have 14.04)**”. Click on the button Upgrade to start upgrading to Ubuntu 14.10. +几秒钟之后,你会在屏幕中看到如下字样:**ubuntu14.10现在可以获得(你现在是14.04系统)**。点击升级按钮开始升级。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Software-Updater_001.png) -The Software Updater will ask you to confirm still you want to upgrade. Click Start Upgrade to begin installing Ubuntu 14.10. +软件更新器会提示你确定更新。点击开始更新开始安装14.10 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Release-Notes_002.png) -**Please Note**: This is a beta release. Do not install it on production systems. The final stable version will be released in a couple of hours. - -Now, the Software Updater will prepare to start setting up new software channels. +**请注意**:这是beta版本。不要在生产用的机器上安装。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Distribution-Upgrade_003.png) -After a few minutes, the software updater will notify you the details the number of packages are going to be removed, and number of packages are going to be installed. Click **Start upgrade** to continue. Make sure you have good and stable Internet connection. +几分钟之后,软件更新器会提醒你一些将被移除的和将被安装的软件包的详细信息。点击**开始升级**继续。确保你更新时在稳定的网络下。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Untitled-window_004.png) -Now, the updater will start to getting new packages. It will take a while depending upon your Internet connection speed. +现在,更新程序会开始获取新的软件包。获取速度取决于你的网速。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Distribution-Upgrade_005.png) ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Distribution-Upgrade_001.png) -After a while, you’ll be asked to remove unnecessary applications. Finally, click **Restart** to complete the upgrade. +之后,你会被询问是否移除不必要的应用程序。最后,点击**重启**来完成整个升级过程。 -Congratulations! Now, you have successfully upgraded to Ubuntu 14.10. +这时侯,恭喜你已经成功的升级到了ubuntu14.10 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Details_002.png) -That’s it.. Start using the new Ubuntu version. +你可以开始使用新的ubuntu版本了。 -### Server Upgrade ### +### 服务器升级 ### -To upgrade from Ubuntu 14.04 server to Ubuntu 14.10 server, do the following steps. +从ubuntu14.04的服务器升级到14.10的服务器,采用下面的步骤。 -Install the update-manager-core package if it is not already installed: +安装update-manager-core 这个包如果之前没唷安装的话: sudo apt-get install update-manager-core -Edit the file /etc/update-manager/release-upgrades, +编辑 /etc/update-manager/release-upgrades这个文件。 sudo nano /etc/update-manager/release-upgrades -and set Prompt=normal or Prompt=lts as shown below. +像下面那样设置Prompt=normal或者Prompt=lts # Default behavior for the release upgrader. @@ -89,20 +86,18 @@ and set Prompt=normal or Prompt=lts as shown below. # determine if a newer release is available. Prompt=normal -Now, it is time to upgrade your server system to latest version using the following command: +现在可以通过下面的命令来更新你的服务系统了。 sudo do-release-upgrade -d -Follow the on-screen instructions. You’re done!!. - -Cheers!! +直到屏幕提示你已完成 -------------------------------------------------------------------------------- via: http://www.unixmen.com/upgrade-ubuntu-14-04-trusty-ubuntu-14-10-utopic/ 作者:SK -译者:[译者ID](https://github.com/译者ID) +译者:[译者ID](https://github.com/johnhoow) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 8a4359bb5eebb1907f8731568d4d37877e29bb76 Mon Sep 17 00:00:00 2001 From: johnhoow Date: Thu, 6 Nov 2014 23:24:00 +0800 Subject: [PATCH 139/316] mv file from source to translated --- ...4 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md (100%) diff --git a/sources/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md b/translated/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md similarity index 100% rename from sources/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md rename to translated/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md From 69b719240de723c1b633a172c7b8d8e1bdc879d8 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Fri, 7 Nov 2014 00:24:15 +0800 Subject: [PATCH 140/316] Update 20141106 Quick Tip Allow Services Through Firewall In openSUSE.md --- ...6 Quick Tip Allow Services Through Firewall In openSUSE.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md b/sources/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md index b7ecd879a4..360de0c7ba 100644 --- a/sources/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md +++ b/sources/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md @@ -1,3 +1,5 @@ +Vic020 + [Quick Tip] Allow Services Through Firewall In openSUSE ================================================================================ ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/openSUSE.png) @@ -28,4 +30,4 @@ via: http://www.unixmen.com/quick-tip-allow-services-firewall-opensuse/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.unixmen.com/author/sk/ \ No newline at end of file +[a]:http://www.unixmen.com/author/sk/ From e08a0cb09f11afb0b7f682610a2df3c51cd10305 Mon Sep 17 00:00:00 2001 From: luoyutiantang <304825802@qq.com> Date: Fri, 7 Nov 2014 10:59:29 +0800 Subject: [PATCH 141/316] [Translate]20141023 What are useful Bash aliases and functions.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 重新fork了 --- ...t are useful Bash aliases and functions.md | 254 ++++++++++++++++++ 1 file changed, 254 insertions(+) create mode 100644 translated/tech/20141023 What are useful Bash aliases and functions.md diff --git a/translated/tech/20141023 What are useful Bash aliases and functions.md b/translated/tech/20141023 What are useful Bash aliases and functions.md new file mode 100644 index 0000000000..28e4df89bc --- /dev/null +++ b/translated/tech/20141023 What are useful Bash aliases and functions.md @@ -0,0 +1,254 @@ + 什么是有用的bash别名和函数 +================================================================================ +作为一个命令行探索者,你或许发现你自己一遍又一遍. 如果你总是用ssh进入到同一台电脑, 同时你总是管道关联相同的命令,或者如果你时常用一些参数运行一个程序,你应该想要拯救你人生中的这个珍贵的助手。你一遍又一遍花费着重复相同的动作. +解决方案是使用一个别名.正如你可能知道的,别名用一种方式告诉你的shell记住详细的命令并且给它一个新的名字:别名,的方式。不管怎么样,别名是即时有效的,同样地它只是shell命令的快捷方式,没有能力传递或者控制参数.所以补充时,bash也允许你创建你自己的函数,那样可能更漫长和复杂,并且也允许任意数量的参数. +当然,当你有一个好的食谱-像汤,你要分享它.因此这里有一个列表,用一些最有用bash别名和函数的.注意"最有用的"是随意的定义,当然别名的有益依赖在于你每天shell的使用性 +在你用别名开始试验之前, 这里有一个便于使用的小技巧:如果你给予别名相同的名字作为常规命令,你可以选择开始原始的命令并且用技巧忽略别名 + \command +例如,第一个别名在下面替换ls命令。如果你想使用常规的ls命令而不是别名,通过调用它: + \ls + +### Productivity ### + +这些别名真的很简单并且真的很短,但他们大多数主要是以主题为依据,那样无论何时倘若你第二次保存一小部分,它允许在多年以后再结束.也许不会. + + alias ls="ls --color=auto" + +简单但非常重要.使ls命令带着彩色输出 + + alias ll = "ls --color -al" + +从一个目录采用列表格式快速显示全部文件. + + alias grep='grep --color=auto' + +相同地,把一些颜色在grep里输出 + + mcd() { mkdir -p "$1"; cd "$1";} + +我的最爱之一. 制造一个目录采用一个命令mcd[名字]和cd命令进入到目录里面 + + cls() { cd "$1"; ls;} + +类似于前面的功能,cd命令进入一个目录别且列出它的的内容:cls[名字] + + backup() { cp "$1"{,.bak};} + +简单的方法,使文件有一个备份: backup [文件]将会在相同的目录创建[文件].bak. + + md5check() { md5sum "$1" | grep "$2";} + +因为我讨厌通过手工比较文件的md5算法,这个函数计算它并且计算它使用grep:md5check[文件][钥匙] + +![](https://farm6.staticflickr.com/5616/15412389280_8be57841ae_o.jpg) + + alias makescript="fc -rnl | head -1 >" + +很容易地制造上个命令的脚本输出,你运行makescript[脚本名字.sh] + + alias genpasswd="strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo" + +只是瞬间产生一个强壮的密码 + +![](https://farm4.staticflickr.com/3955/15574321206_dd365f0f0e.jpg) + + alias c="clear" + +不能较为简单的清除你终端的屏幕 + + alias histg="history | grep" + +通过你的命令历史:histg[关键字]快速地搜索 + + alias ..='cd ..' + +不需要写cd命令到上层目录 + + alias ...='cd ../..' + +类似地,去到上两个目录 + + extract() { + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar e $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1 ;; + *.7z) 7z x $1 ;; + *) echo "'$1' cannot be extracted via extract()" ;; + esac + else + echo "'$1' is not a valid file" + fi + } + +很长,但是也是最有用的。解压任何的文档类型:extract:[文档文件] + + +### 系统信息 ### + +想尽快地知道一切关于你的系统? + + alias cmount="mount | column -t" + +mount到列队中的格式输出 + +![](https://farm6.staticflickr.com/5603/15598830622_587b77a363_z.jpg) + + alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'" + +递归树格式显示目录结构. + + sbs() { du -b --max-depth 1 | sort -nr | perl -pe 's{([0-9]+)}{sprintf "%.1f%s", $1>=2**30? ($1/2**30, "G"): $1>=2**20? ($1/2**20, "M"): $1>=2**10? ($1/2**10, "K"): ($1, "")}e';} + +在当前目录里“按大小排序”显示列表的文件,排序按它们在磁盘上的大小 + + alias intercept="sudo strace -ff -e trace=write -e write=1,2 -p" + +intercept[一些PID]阻止进程的标准输入输出文件和标准错误文件。注意你需要看着安装完成 + + alias meminfo='free -m -l -t' + +查看你还有剩下多少内存 + +![](https://farm4.staticflickr.com/3955/15411891448_0b9d6450bd_z.jpg) + + alias ps? = "ps aux | grep" + +ps?[名字]很容易地发现,这个任何进程的 + + alias volume="amixer get Master | sed '1,4 d' | cut -d [ -f 2 | cut -d ] -f 1" + +显示现在声音的音量. + +![](https://farm4.staticflickr.com/3939/15597995445_99ea7ffcd5_o.jpg) + +### 网络 ### + +对于所有涉及互联网和你本地网络的命令,也有奇特的别名给它们 + + + alias websiteget="wget --random-wait -r -p -e robots=off -U mozilla" + +websiteget[指定的位置]下载完整的网站地址 + + alias listen="lsof -P -i -n" + +显示出哪个应用程序连接到网络 + +![](https://farm4.staticflickr.com/3943/15598830552_c7e5eaaa0d_z.jpg) + + alias port='netstat -tulanp' + +显示出活动的端口 + + gmail() { curl -u "$1" --silent "https://mail.google.com/mail/feed/atom" | sed -e 's/<\/fullcount.*/\n/' | sed -e 's/.*fullcount>//'} + +gmail:[用户名]大概的显示你的谷歌邮件里未读邮件的数量 + + + alias ipinfo="curl ifconfig.me && curl ifconfig.me/host" + +获得你的公共IP地址和主机 + + getlocation() { lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|grep address|egrep 'city|state|country'|awk '{print $3,$4,$5,$6,$7,$8}'|sed 's\ip address flag \\'|sed 's\My\\';} + +以你的IP地址为基础返回你现在的位置 + +### 没用的 ### + +所以呢,如果一些别名是不是全部具有使用价值?它们可能仍然有趣 + + + kernelgraph() { lsmod | perl -e 'print "digraph \"lsmod\" {";<>;while(<>){@_=split/\s+/; print "\"$_[0]\" -> \"$_\"\n" for split/,/,$_[3]}print "}"' | dot -Tpng | display -;} + +要绘制内核模块依赖曲线图。需要镜像阅读器 + + alias busy="cat /dev/urandom | hexdump -C | grep "ca fe"" + +在非技术人员的眼里你看起来都在忙和构思 + +![](https://farm6.staticflickr.com/5599/15574321326_ab3fbc1ef9_z.jpg) + +最后,这些别名和函数的很大一部分来自于我个人的.bashrc.这些令人敬畏的网站 [alias.sh][1]和[commandlinefu.com][2]我早已经展示在我的[best online tools for Linux][3].当然去检测它们的输出,让你拥有特有的秘诀。如果你真的同意,在注释里分享你的智慧, + + +做为奖励,这里有我提到的全部别名和函数的纯文本版本,随时可以复制粘贴到你的.bashrc. + + #Productivity + alias ls="ls --color=auto" + alias ll="ls --color -al" + alias grep='grep --color=auto' + mcd() { mkdir -p "$1"; cd "$1";} + cls() { cd "$1"; ls;} + backup() { cp "$1"{,.bak};} + md5check() { md5sum "$1" | grep "$2";} + alias makescript="fc -rnl | head -1 >" + alias genpasswd="strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo" + alias c="clear" + alias histg="history | grep" + alias ..='cd ..' + alias ...='cd ../..' + extract() { + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar e $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1 ;; + *.7z) 7z x $1 ;; + *) echo "'$1' cannot be extracted via extract()" ;; + esac + else + echo "'$1' is not a valid file" + fi + } + + #System info + alias cmount="mount | column -t" + alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'" + sbs(){ du -b --max-depth 1 | sort -nr | perl -pe 's{([0-9]+)}{sprintf "%.1f%s", $1>=2**30? ($1/2**30, "G"): $1>=2**20? ($1/2**20, "M"): $1>=2**10? ($1/2**10, "K"): ($1, "")}e';} + alias intercept="sudo strace -ff -e trace=write -e write=1,2 -p" + alias meminfo='free -m -l -t' + alias ps?="ps aux | grep" + alias volume="amixer get Master | sed '1,4 d' | cut -d [ -f 2 | cut -d ] -f 1" + + #Network + alias websiteget="wget --random-wait -r -p -e robots=off -U mozilla" + alias listen="lsof -P -i -n" + alias port='netstat -tulanp' + gmail() { curl -u "$1" --silent "https://mail.google.com/mail/feed/atom" | sed -e 's/<\/fullcount.*/\n/' | sed -e 's/.*fullcount>//'} + alias ipinfo="curl ifconfig.me && curl ifconfig.me/host" + getlocation() { lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|grep address|egrep 'city|state|country'|awk '{print $3,$4,$5,$6,$7,$8}'|sed 's\ip address flag \\'|sed 's\My\\';} + + #Funny + kernelgraph() { lsmod | perl -e 'print "digraph \"lsmod\" {";<>;while(<>){@_=split/\s+/; print "\"$_[0]\" -> \"$_\"\n" for split/,/,$_[3]}print "}"' | dot -Tpng | display -;} + alias busy="cat /dev/urandom | hexdump -C | grep \"ca fe\"" + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/useful-bash-aliases-functions.html + +作者:[Adrien Brochard][a] +译者:[译者luoyutiantang](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/adrien +[1]:http://alias.sh/ +[2]:http://www.commandlinefu.com/commands/browse +[3]:http://xmodulo.com/useful-online-tools-linux.html From ed1a5d0aca46135bb43ac99e2eb718e425093905 Mon Sep 17 00:00:00 2001 From: luoyutiantang <304825802@qq.com> Date: Fri, 7 Nov 2014 11:04:15 +0800 Subject: [PATCH 142/316] Delete 20141023 What are useful Bash aliases and functions.md --- ...t are useful Bash aliases and functions.md | 256 ------------------ 1 file changed, 256 deletions(-) delete mode 100644 sources/tech/20141023 What are useful Bash aliases and functions.md diff --git a/sources/tech/20141023 What are useful Bash aliases and functions.md b/sources/tech/20141023 What are useful Bash aliases and functions.md deleted file mode 100644 index b5d6e3b6da..0000000000 --- a/sources/tech/20141023 What are useful Bash aliases and functions.md +++ /dev/null @@ -1,256 +0,0 @@ -luoyutiantang -What are useful Bash aliases and functions -================================================================================ -As a command line adventurer, you probably found yourself repeating the same lengthy commands over and over. If you always ssh into the same machine, if you always chain the same commands together, or if you constantly run a program with the same flags, you might want to save the precious seconds of your life that you spend repeating the same actions over and over. - -The solution to achieve that is to use an alias. As you may know, an alias is a way to tell your shell to remember a particular command and give it a new name: an alias. However, an alias is quickly limited as it is just a shortcut for a shell command, without the ability to pass or control the arguments. So to complement, bash also allows you create your own functions, which can be more lengthy and complex, and also accepts any number of arguments. - -Naturally, like with soup, when you have a good recipe you share it. So here is a list with some of the most useful bash aliases and functions. Note that "most useful" is loosely defined, and of course the usefulness of an alias is dependent on your everyday usage of the shell. - -Before you start experimenting with aliases, here is a handy tip: if you give an alias the same name as a regular command, you can choose to launch the original command and ignore the alias with the trick: - - \command - -For example, the first alias below replaces the ls command. If you wish to use the regular ls command and not the alias, call it via: - - \ls - -### Productivity ### - -So these aliases are really simple and really short, but they are mostly based on the idea that if you save yourself a fraction of a second every time, it might end up accumulating years at the end. Or maybe not. - - alias ls="ls --color=auto" - -Simple but vital. Make the ls command output in color. - - alias ll = "ls --color -al" - -Shortcut to display in color all the files from a directory in a list format. - - alias grep='grep --color=auto' - -Similarly, put some color in the grep output. - - mcd() { mkdir -p "$1"; cd "$1";} - -One of my favorite. Make a directory and cd into it in one command: mcd [name]. - - cls() { cd "$1"; ls;} - -Similar to the previous function, cd into a directory and list its content: cls [name]. - - backup() { cp "$1"{,.bak};} - -Simple way to make a backup of a file: backup [file] will create [file].bak in the same directory. - - md5check() { md5sum "$1" | grep "$2";} - -Because I hate comparing the md5sum of a file by hand, this function computes it and compares it using grep: md5check [file] [key]. - -![](https://farm6.staticflickr.com/5616/15412389280_8be57841ae_o.jpg) - - alias makescript="fc -rnl | head -1 >" - -Easily make a script out of the last command you ran: makescript [script.sh] - - alias genpasswd="strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo" - -Just to generate a strong password instantly. - -![](https://farm4.staticflickr.com/3955/15574321206_dd365f0f0e.jpg) - - alias c="clear" - -Cannot do simpler to clean your terminal screen. - - alias histg="history | grep" - -To quickly search through your command history: histg [keyword] - - alias ..='cd ..' - -No need to write cd to go up a directory. - - alias ...='cd ../..' - -Similarly, go up two directories. - - extract() { - if [ -f $1 ] ; then - case $1 in - *.tar.bz2) tar xjf $1 ;; - *.tar.gz) tar xzf $1 ;; - *.bz2) bunzip2 $1 ;; - *.rar) unrar e $1 ;; - *.gz) gunzip $1 ;; - *.tar) tar xf $1 ;; - *.tbz2) tar xjf $1 ;; - *.tgz) tar xzf $1 ;; - *.zip) unzip $1 ;; - *.Z) uncompress $1 ;; - *.7z) 7z x $1 ;; - *) echo "'$1' cannot be extracted via extract()" ;; - esac - else - echo "'$1' is not a valid file" - fi - } - -Longest but also the most useful. Extract any kind of archive: extract [archive file] - -### System Info ### - -Want to know everything about your system as quickly as possible? - - alias cmount="mount | column -t" - -Format the output of mount into columns. - -![](https://farm6.staticflickr.com/5603/15598830622_587b77a363_z.jpg) - - alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'" - -Display the directory structure recursively in a tree format. - - sbs() { du -b --max-depth 1 | sort -nr | perl -pe 's{([0-9]+)}{sprintf "%.1f%s", $1>=2**30? ($1/2**30, "G"): $1>=2**20? ($1/2**20, "M"): $1>=2**10? ($1/2**10, "K"): ($1, "")}e';} - -"Sort by size" to display in list the files in the current directory, sorted by their size on disk. - - alias intercept="sudo strace -ff -e trace=write -e write=1,2 -p" - -Intercept the stdout and stderr of a process: intercept [some PID]. Note that you will need strace installed. - - alias meminfo='free -m -l -t' - -See how much memory you have left. - -![](https://farm4.staticflickr.com/3955/15411891448_0b9d6450bd_z.jpg) - - alias ps? = "ps aux | grep" - -Easily find the PID of any process: ps? [name] - - alias volume="amixer get Master | sed '1,4 d' | cut -d [ -f 2 | cut -d ] -f 1" - -Displays the current sound volume. - -![](https://farm4.staticflickr.com/3939/15597995445_99ea7ffcd5_o.jpg) - -### Networking ### - -For all the commands that involve the Internet or your local network, there are fancy aliases for them. - - alias websiteget="wget --random-wait -r -p -e robots=off -U mozilla" - -Download entirely a website: websiteget [URL] - - alias listen="lsof -P -i -n" - -Show which applications are connecting to the network. - -![](https://farm4.staticflickr.com/3943/15598830552_c7e5eaaa0d_z.jpg) - - alias port='netstat -tulanp' - -Show the active ports - - gmail() { curl -u "$1" --silent "https://mail.google.com/mail/feed/atom" | sed -e 's/<\/fullcount.*/\n/' | sed -e 's/.*fullcount>//'} - -Rough function to display the number of unread emails in your gmail: gmail [user name] - - alias ipinfo="curl ifconfig.me && curl ifconfig.me/host" - -Get your public IP address and host. - - getlocation() { lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|grep address|egrep 'city|state|country'|awk '{print $3,$4,$5,$6,$7,$8}'|sed 's\ip address flag \\'|sed 's\My\\';} - -Returns your current location based on your IP address. - -### Useless ### - -So what if some aliases are not all that productive? They can still be fun. - - kernelgraph() { lsmod | perl -e 'print "digraph \"lsmod\" {";<>;while(<>){@_=split/\s+/; print "\"$_[0]\" -> \"$_\"\n" for split/,/,$_[3]}print "}"' | dot -Tpng | display -;} - -To draw the kernel module dependency graph. Requires image viewer. - - alias busy="cat /dev/urandom | hexdump -C | grep "ca fe"" - -Make you look all busy and fancy in the eyes of non-technical people. - -![](https://farm6.staticflickr.com/5599/15574321326_ab3fbc1ef9_z.jpg) - -To conclude, a good chunk of these aliases and functions come from my personal .bashrc, and the awesome websites [alias.sh][1] and [commandlinefu.com][2] which I already presented in my post on the [best online tools for Linux][3]. So definitely go check them out, make your own recipes, and if you are so inclined, share your wisdom in the comments. - -As a bonus, here is the plain text version of all the aliases and functions I mentioned, ready to be copy pasted in your bashrc. - - #Productivity - alias ls="ls --color=auto" - alias ll="ls --color -al" - alias grep='grep --color=auto' - mcd() { mkdir -p "$1"; cd "$1";} - cls() { cd "$1"; ls;} - backup() { cp "$1"{,.bak};} - md5check() { md5sum "$1" | grep "$2";} - alias makescript="fc -rnl | head -1 >" - alias genpasswd="strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo" - alias c="clear" - alias histg="history | grep" - alias ..='cd ..' - alias ...='cd ../..' - extract() { - if [ -f $1 ] ; then - case $1 in - *.tar.bz2) tar xjf $1 ;; - *.tar.gz) tar xzf $1 ;; - *.bz2) bunzip2 $1 ;; - *.rar) unrar e $1 ;; - *.gz) gunzip $1 ;; - *.tar) tar xf $1 ;; - *.tbz2) tar xjf $1 ;; - *.tgz) tar xzf $1 ;; - *.zip) unzip $1 ;; - *.Z) uncompress $1 ;; - *.7z) 7z x $1 ;; - *) echo "'$1' cannot be extracted via extract()" ;; - esac - else - echo "'$1' is not a valid file" - fi - } - - #System info - alias cmount="mount | column -t" - alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'" - sbs(){ du -b --max-depth 1 | sort -nr | perl -pe 's{([0-9]+)}{sprintf "%.1f%s", $1>=2**30? ($1/2**30, "G"): $1>=2**20? ($1/2**20, "M"): $1>=2**10? ($1/2**10, "K"): ($1, "")}e';} - alias intercept="sudo strace -ff -e trace=write -e write=1,2 -p" - alias meminfo='free -m -l -t' - alias ps?="ps aux | grep" - alias volume="amixer get Master | sed '1,4 d' | cut -d [ -f 2 | cut -d ] -f 1" - - #Network - alias websiteget="wget --random-wait -r -p -e robots=off -U mozilla" - alias listen="lsof -P -i -n" - alias port='netstat -tulanp' - gmail() { curl -u "$1" --silent "https://mail.google.com/mail/feed/atom" | sed -e 's/<\/fullcount.*/\n/' | sed -e 's/.*fullcount>//'} - alias ipinfo="curl ifconfig.me && curl ifconfig.me/host" - getlocation() { lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|grep address|egrep 'city|state|country'|awk '{print $3,$4,$5,$6,$7,$8}'|sed 's\ip address flag \\'|sed 's\My\\';} - - #Funny - kernelgraph() { lsmod | perl -e 'print "digraph \"lsmod\" {";<>;while(<>){@_=split/\s+/; print "\"$_[0]\" -> \"$_\"\n" for split/,/,$_[3]}print "}"' | dot -Tpng | display -;} - alias busy="cat /dev/urandom | hexdump -C | grep \"ca fe\"" - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/useful-bash-aliases-functions.html - -作者:[Adrien Brochard][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/adrien -[1]:http://alias.sh/ -[2]:http://www.commandlinefu.com/commands/browse -[3]:http://xmodulo.com/useful-online-tools-linux.html From 08a4208ab7c8799f15d25bb1d209c11bcc9fe6ba Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 7 Nov 2014 12:30:27 +0800 Subject: [PATCH 143/316] PUB:20141104 Mozilla to Launch Brand New Developer Web Browser Next Week @geekpi --- ...unch Brand New Developer Web Browser Next Week.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/news => published}/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md (66%) diff --git a/translated/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md b/published/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md similarity index 66% rename from translated/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md rename to published/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md index 786f2b12c1..5779aecdb1 100644 --- a/translated/news/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md +++ b/published/20141104 Mozilla to Launch Brand New Developer Web Browser Next Week.md @@ -10,27 +10,27 @@ Mozilla 下周发布全新的开发者浏览器 ### Mozilla – 推动前沿 ### -Mozilla已经一直在推动开源,开放标准和开放的最前沿。他们引导了世界上最流行的桌面浏览器之一。他们的开源Linux移动操作系统[在24个国家的13个运营商的12款手机上出售][1]。他们[甚至在谷歌的Chromecast上运行][2]! +Mozilla一直处于推动开源,开放标准和开放访问的最前沿。他们引导了世界上最流行的桌面浏览器之一。他们的开源的基于Linux的移动操作系统[在24个国家的13个运营商的12款手机上出售][1]。他们[甚至可以在谷歌的Chromecast上运行][2]! -他们渴望民主化web没有减弱的迹象。今早在Mozilla博客上发布的一篇文章传达了公司宣布在推动前沿上的努力- 这次是对于开发者而不是用户而言的。 +他们将 Web 推广到每个角落的追求依然旺盛。在Mozilla博客上发布的一篇文章传达了公司宣布在推动前沿上的努力- 这次是针对开发者而不是用户而言的。 -这被打趣为“独特但又熟悉”,公司打算发布基于Firefox,由开发人员设计,针对开发人员提供的全新的浏览器。 Mozilla说它集成了“像[WebIDE][3]和[Firefox工具适配器][4]这样强大的新工具。 +这被打趣为“独特但又熟悉”,公司打算发布基于Firefox、由开发人员设计、针对开发人员提供的全新的浏览器。 Mozilla说它集成了“像[WebIDE][3]和[Firefox工具适配器][4]这样强大的新工具。 >“在构建Web时,开发人员倾向于使用不同的工具,但这往往不能很好地协同工作。这意味着你不用在不同的工具、平台和浏览器等这些会减缓你开发效率的工作中切换了 ### #Fx10 ### -“Firefox开发者”版声称会在11.10发布。 现在还不知道它支持的平台,但是它第一它是Mozilla,第二针对的是开发者,所以如果在那天没有Linux版本的话将会是一件很意外的事情。 +“Firefox开发者”版声称会在11.10发布。 现在还不知道它支持的平台,但是第一它是Mozilla推出的,第二针对的是开发者,所以如果在那天没有Linux版本的话将会是一件很意外的事情。 Mozilla说感兴趣的人可以注册他们的[黑客简讯][5]来在浏览器发布的时候收到通知。 -------------------------------------------------------------------------------- -via: www.omgubuntu.co.uk/2014/11/mozilla-launch-brand-new-developer-focused-web-browser +via: http://www.omgubuntu.co.uk/2014/11/mozilla-launch-brand-new-developer-focused-web-browser 作者:[Joey-Elijah Sneddon ][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 029426e7d61b2751d1e076c274a6c72a63c3a9db Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 7 Nov 2014 12:52:49 +0800 Subject: [PATCH 144/316] PUB:20140702 The People Who Support Linux--Hacking on Linux Since Age 16 @jabirus --- ...rt Linux--Hacking on Linux Since Age 16.md | 29 +++++-------------- 1 file changed, 8 insertions(+), 21 deletions(-) rename {translated/talk => published}/20140702 The People Who Support Linux--Hacking on Linux Since Age 16.md (52%) diff --git a/translated/talk/20140702 The People Who Support Linux--Hacking on Linux Since Age 16.md b/published/20140702 The People Who Support Linux--Hacking on Linux Since Age 16.md similarity index 52% rename from translated/talk/20140702 The People Who Support Linux--Hacking on Linux Since Age 16.md rename to published/20140702 The People Who Support Linux--Hacking on Linux Since Age 16.md index 94ca2c688f..1d7f5a904f 100644 --- a/translated/talk/20140702 The People Who Support Linux--Hacking on Linux Since Age 16.md +++ b/published/20140702 The People Who Support Linux--Hacking on Linux Since Age 16.md @@ -7,35 +7,22 @@ 在软件开发者 [Yitao Li (李逸韬) 的 GitHub 仓库][1]中,几乎所有的项目都是在他的 Linux 机器上开发完成的。它们没有一个是必须特定需要 Linux 的,但李逸韬说他使用 Linux 来做“任何事情”。 -举些例子:“编码/脚本设计,网页浏览,网站托管,任何云相关的,发送/接受 PGP 签名的邮件,调整防火墙规则,将 OpenWrt 镜像刷入路由器,运行某版本的 Linux kernel 的同时编译另一个版本,从事研究,完成功课(例如,用 Tex 输入数学公式),以及其他许多......” Li 在邮件里如是说。 +举些例子:“编码/脚本设计,网页浏览,网站托管,任何云相关的,发送/接收 PGP 签名的邮件,调整防火墙规则,将 OpenWrt 镜像刷入路由器,运行某版本的 Linux kernel 的同时编译另一个版本,从事研究,完成功课(例如,用 Tex 输入数学公式),以及其他许多......” Li 在邮件里如是说。 -在李逸韬的 GitHub 仓库里所有项目中他的最爱是一个学校项目,调用 libpthread 和 libfuse 库使用 C++ 开发,用来理解和正确执行基于 PAXOS 的分布式加锁,键值对服务,最终实现一个分布式文件系统。他使用若干测试脚本分别在单核和多核的机器上对这个项目进行测试。 +在李逸韬的 GitHub 仓库里所有项目中他的最爱是一个学校项目,调用 libpthread 和 libfuse 库,使用 C++ 开发,用来理解和正确执行基于 PAXOS 的分布式加锁,键值对服务,最终实现一个分布式文件系统。他使用若干测试脚本分别在单核和多核的机器上对这个项目进行测试。 + +"可以借助正确地实现(或者至少大部分正确)PAXOS 协议,并且通过了所有测试,来学习关于分布式共识协议的知识,"他说,“当然一旦这完成了,他就可以获得一些炫耀的权利。除此之外,一个分布式文件系统在其他许多编程项目中也可以很有用。” -“One can learn something about distributed consensus protocol by implementing the PAXOS protocol correctly (or at least mostly correctly) such that the implementation will pass all the tests,” he said. “And of course once that is accomplished, one can also earn some bragging rights. Besides, a distributed filesystem can be useful in many other programming projects.” +Li 是在 16 岁的时候第一次开始使用 Linux,或是者说大约 7.47 年之前,他说,通过使用网站 [linuxfromscratch.org][2] ,从 Scratch book 中获得的免费可下载的 Linux 中学习了大量知识。那么他为什么会使用 Linux? ->"One can learn something about distributed consensus protocol by implementing the PAXOS protocol correctly (or at least mostly correctly) such that the implementation will pass all the tests" 不知道翻译的是不是有点混乱 - -"一个人可以通过正确实现(或者至少大部分正确)PAXOS 协议,让它通过所有测试,来学习关于分布式共识协议的知识,"他说,“当然一旦这完成了,他就可以获得一些炫耀的权利。除此之外,一个分布式文件系统在其他许多编程项目中也可以很有用。” - -Li first started using Linux at age 16, or about 7.47 years ago, he says, using the website [linuxfromscratch.org][2], with numerous hints from the free, downloadable Linux From Scratch book. Why? - ->with numerous hints from the free, downloadable Linux From Scratch book. 讲的应该是从 Linuxfromscratch 学习 LFS 编译安装 Linux,不知道该怎么翻译。 - -Li 是在 16 岁的时候第一次开始使用 Linux,或是者说大约 7.47 年之前,他说,通过使用网站 [linuxfromscratch.org][2] ,从 Scratch book 中获得免费可下载的 Linux,以及大量 Hints。那么他为什么会使用 Linux? - -“1. Linux is very hacker-friendly and I do not see any reason for not using it,” he writes. “2. The prefrontal cortex of the brain becoming well-developed at age 16 (?).” - ->2. The prefrontal cortex of the brain becoming well-developed at age 16 (?). 原文里的 16 (?) 是啥意思? - -"1. Linux 非常黑客友好所以我没看到任何不用它的理由,"他写道,“2. 大脑的前额叶皮质在16岁时正变得发达。” +"1. Linux 是黑客的天才工具,所以我没看到任何不用它的理由,"他写道,“2. 大脑的前额叶皮质(可能)在我16岁时正变得很发达。” [![](http://www.linux.com/images/stories/41373/ldc_peop_linux.png)][3] -他现在为 eBay工作,主要进行 Java 编程但有时也使用 Hadoop, Pig, Zookeeper, Cassandra, MongoDB,以及其他一些需要 POSIX 兼容平台的软件来工作。他主要通过给 Wikipedia 页面和 Linux 相关的论坛做贡献来支持 Linux 社区,另外当然还通过成为 Linux 基金会的个人会员。 +他现在为 eBay工作,主要进行 Java 编程但有时也使用 Hadoop, Pig, Zookeeper, Cassandra, MongoDB,以及其他一些需要 POSIX 兼容平台的软件来工作。他主要通过给 Wikipedia 页面和 Linux 相关的论坛做贡献来支持 Linux 社区,另外当然还成为了 Linux 基金会的个人会员。 他紧跟最新的 Linux 发展动态,最近还对 GCC 4.9 及之后版本新增的 “-fstack-protector-strong” 选项印象深刻。 - "虽然这并不与我的任何项目直接相关,但它对于安全和性能问题十分重要。"他说,“这个选项比 ‘-fstack-protector-all’ 更高效的多,却在安全上几乎没有影响,同时比 ‘-fstack-protector’ 选项提供了更好的栈溢出防护覆盖。” 欢迎来到 Linux 基金会,Yitao ! @@ -52,7 +39,7 @@ Li 是在 16 岁的时候第一次开始使用 Linux,或是者说大约 7.47 via: http://www.linux.com/news/featured-blogs/200-libby-clark/778559-the-people-who-support-linux-hacking-on-linux-since-age-16 -译者:[jabirus](https://github.com/jabirus) 校对:[校对者ID](https://github.com/校对者ID) +译者:[jabirus](https://github.com/jabirus) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d89a19bad9218949541e8d79ac433a069033e759 Mon Sep 17 00:00:00 2001 From: barney-ro Date: Fri, 7 Nov 2014 13:09:37 +0800 Subject: [PATCH 145/316] [translating]20141106 5 Awesome Open Source Backup Software For Linux and Unix-like Systems --- ... Source Backup Software For Linux and Unix-like Systems.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20141106 5 Awesome Open Source Backup Software For Linux and Unix-like Systems.md b/sources/share/20141106 5 Awesome Open Source Backup Software For Linux and Unix-like Systems.md index 9b99906519..82df484c82 100644 --- a/sources/share/20141106 5 Awesome Open Source Backup Software For Linux and Unix-like Systems.md +++ b/sources/share/20141106 5 Awesome Open Source Backup Software For Linux and Unix-like Systems.md @@ -1,3 +1,5 @@ +barney-ro translating + 5 Awesome Open Source Backup Software For Linux and Unix-like Systems ================================================================================ A good backup plan is essential in order to have the ability to recover from @@ -136,7 +138,7 @@ I hope you will find this post useful to backup your important data. Do not forg via: http://www.cyberciti.biz/open-source/awesome-backup-software-for-linux-unix-osx-windows-systems/ 作者:[nixCraft][a] -译者:[译者ID](https://github.com/译者ID) +译者:[barney-ro](https://github.com/barney-ro) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 715a49bf7ecd059d7b129a5ea4ddc65b1ec0d68f Mon Sep 17 00:00:00 2001 From: luoyutiantang <304825802@qq.com> Date: Fri, 7 Nov 2014 13:53:08 +0800 Subject: [PATCH 146/316] Create [Translated]20141023 What are useful Bash aliases and functions.md --- ...t are useful Bash aliases and functions.md | 254 ++++++++++++++++++ 1 file changed, 254 insertions(+) create mode 100644 translated/tech/[Translated]20141023 What are useful Bash aliases and functions.md diff --git a/translated/tech/[Translated]20141023 What are useful Bash aliases and functions.md b/translated/tech/[Translated]20141023 What are useful Bash aliases and functions.md new file mode 100644 index 0000000000..019db92296 --- /dev/null +++ b/translated/tech/[Translated]20141023 What are useful Bash aliases and functions.md @@ -0,0 +1,254 @@ + 什么是有用的bash别名和函数 +================================================================================ +作为一个命令行探索者,你或许发现你自己一遍又一遍. 如果你总是用ssh进入到同一台电脑, 同时你总是管道关联相同的命令,或者如果你时常用一些参数运行一个程序,你应该想要拯救你人生中的这个珍贵的助手。你一遍又一遍花费着重复相同的动作. +解决方案是使用一个别名.正如你可能知道的,别名用一种方式告诉你的shell记住详细的命令并且给它一个新的名字:别名,的方式。不管怎么样,别名是即时有效的,同样地它只是shell命令的快捷方式,没有能力传递或者控制参数.所以补充时,bash也允许你创建你自己的函数,那样可能更漫长和复杂,并且也允许任意数量的参数. +当然,当你有一个好的食谱-像汤,你要分享它.因此这里有一个列表,用一些最有用bash别名和函数的.注意"最有用的"是随意的定义,当然别名的有益依赖在于你每天shell的使用性 +在你用别名开始试验之前, 这里有一个便于使用的小技巧:如果你给予别名相同的名字作为常规命令,你可以选择开始原始的命令并且用技巧忽略别名 + \command +例如,第一个别名在下面替换ls命令。如果你想使用常规的ls命令而不是别名,通过调用它: + \ls + +### Productivity ### + +这些别名真的很简单并且真的很短,但他们大多数主要是以主题为依据,那样无论何时倘若你第二次保存一小部分,它允许在多年以后再结束.也许不会. + + alias ls="ls --color=auto" + +简单但非常重要.使ls命令带着彩色输出 + + alias ll = "ls --color -al" + +从一个目录采用列表格式快速显示全部文件. + + alias grep='grep --color=auto' + +相同地,把一些颜色在grep里输出 + + mcd() { mkdir -p "$1"; cd "$1";} + +我的最爱之一. 制造一个目录采用一个命令mcd[名字]和cd命令进入到目录里面 + + cls() { cd "$1"; ls;} + +类似于前面的功能,cd命令进入一个目录别且列出它的的内容:cls[名字] + + backup() { cp "$1"{,.bak};} + +简单的方法,使文件有一个备份: backup [文件]将会在相同的目录创建[文件].bak. + + md5check() { md5sum "$1" | grep "$2";} + +因为我讨厌通过手工比较文件的md5算法,这个函数计算它并且计算它使用grep:md5check[文件][钥匙] + +![](https://farm6.staticflickr.com/5616/15412389280_8be57841ae_o.jpg) + + alias makescript="fc -rnl | head -1 >" + +很容易地制造上个命令的脚本输出,你运行makescript[脚本名字.sh] + + alias genpasswd="strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo" + +只是瞬间产生一个强壮的密码 + +![](https://farm4.staticflickr.com/3955/15574321206_dd365f0f0e.jpg) + + alias c="clear" + +不能较为简单的清除你终端的屏幕 + + alias histg="history | grep" + +通过你的命令历史:histg[关键字]快速地搜索 + + alias ..='cd ..' + +不需要写cd命令到上层目录 + + alias ...='cd ../..' + +类似地,去到上两个目录 + + extract() { + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar e $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1 ;; + *.7z) 7z x $1 ;; + *) echo "'$1' cannot be extracted via extract()" ;; + esac + else + echo "'$1' is not a valid file" + fi + } + +很长,但是也是最有用的。解压任何的文档类型:extract:[文档文件] + + +### 系统信息 ### + +想尽快地知道一切关于你的系统? + + alias cmount="mount | column -t" + +mount到列队中的格式输出 + +![](https://farm6.staticflickr.com/5603/15598830622_587b77a363_z.jpg) + + alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'" + +递归树格式显示目录结构. + + sbs() { du -b --max-depth 1 | sort -nr | perl -pe 's{([0-9]+)}{sprintf "%.1f%s", $1>=2**30? ($1/2**30, "G"): $1>=2**20? ($1/2**20, "M"): $1>=2**10? ($1/2**10, "K"): ($1, "")}e';} + +在当前目录里“按大小排序”显示列表的文件,排序按它们在磁盘上的大小 + + alias intercept="sudo strace -ff -e trace=write -e write=1,2 -p" + +intercept[一些PID]阻止进程的标准输入输出文件和标准错误文件。注意你需要看着安装完成 + + alias meminfo='free -m -l -t' + +查看你还有剩下多少内存 + +![](https://farm4.staticflickr.com/3955/15411891448_0b9d6450bd_z.jpg) + + alias ps? = "ps aux | grep" + +ps?[名字]很容易地发现,这个任何进程的 + + alias volume="amixer get Master | sed '1,4 d' | cut -d [ -f 2 | cut -d ] -f 1" + +显示现在声音的音量. + +![](https://farm4.staticflickr.com/3939/15597995445_99ea7ffcd5_o.jpg) + +### 网络 ### + +对于所有涉及互联网和你本地网络的命令,也有奇特的别名给它们 + + + alias websiteget="wget --random-wait -r -p -e robots=off -U mozilla" + +websiteget[指定的位置]下载完整的网站地址 + + alias listen="lsof -P -i -n" + +显示出哪个应用程序连接到网络 + +![](https://farm4.staticflickr.com/3943/15598830552_c7e5eaaa0d_z.jpg) + + alias port='netstat -tulanp' + +显示出活动的端口 + + gmail() { curl -u "$1" --silent "https://mail.google.com/mail/feed/atom" | sed -e 's/<\/fullcount.*/\n/' | sed -e 's/.*fullcount>//'} + +gmail:[用户名]大概的显示你的谷歌邮件里未读邮件的数量 + + + alias ipinfo="curl ifconfig.me && curl ifconfig.me/host" + +获得你的公共IP地址和主机 + + getlocation() { lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|grep address|egrep 'city|state|country'|awk '{print $3,$4,$5,$6,$7,$8}'|sed 's\ip address flag \\'|sed 's\My\\';} + +以你的IP地址为基础返回你现在的位置 + +### 没用的 ### + +所以呢,如果一些别名是不是全部具有使用价值?它们可能仍然有趣 + + + kernelgraph() { lsmod | perl -e 'print "digraph \"lsmod\" {";<>;while(<>){@_=split/\s+/; print "\"$_[0]\" -> \"$_\"\n" for split/,/,$_[3]}print "}"' | dot -Tpng | display -;} + +要绘制内核模块依赖曲线图。需要镜像阅读器 + + alias busy="cat /dev/urandom | hexdump -C | grep "ca fe"" + +在非技术人员的眼里你看起来都在忙和构思 + +![](https://farm6.staticflickr.com/5599/15574321326_ab3fbc1ef9_z.jpg) + +最后,这些别名和函数的很大一部分来自于我个人的.bashrc.这些令人敬畏的网站 [alias.sh][1]和[commandlinefu.com][2]我早已经展示在我的[best online tools for Linux][3].当然去检测它们的输出,让你拥有特有的秘诀。如果你真的同意,在注释里分享你的智慧, + + +做为奖励,这里有我提到的全部别名和函数的纯文本版本,随时可以复制粘贴到你的.bashrc. + + #Productivity + alias ls="ls --color=auto" + alias ll="ls --color -al" + alias grep='grep --color=auto' + mcd() { mkdir -p "$1"; cd "$1";} + cls() { cd "$1"; ls;} + backup() { cp "$1"{,.bak};} + md5check() { md5sum "$1" | grep "$2";} + alias makescript="fc -rnl | head -1 >" + alias genpasswd="strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo" + alias c="clear" + alias histg="history | grep" + alias ..='cd ..' + alias ...='cd ../..' + extract() { + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar e $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1 ;; + *.7z) 7z x $1 ;; + *) echo "'$1' cannot be extracted via extract()" ;; + esac + else + echo "'$1' is not a valid file" + fi + } + + #System info + alias cmount="mount | column -t" + alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'" + sbs(){ du -b --max-depth 1 | sort -nr | perl -pe 's{([0-9]+)}{sprintf "%.1f%s", $1>=2**30? ($1/2**30, "G"): $1>=2**20? ($1/2**20, "M"): $1>=2**10? ($1/2**10, "K"): ($1, "")}e';} + alias intercept="sudo strace -ff -e trace=write -e write=1,2 -p" + alias meminfo='free -m -l -t' + alias ps?="ps aux | grep" + alias volume="amixer get Master | sed '1,4 d' | cut -d [ -f 2 | cut -d ] -f 1" + + #Network + alias websiteget="wget --random-wait -r -p -e robots=off -U mozilla" + alias listen="lsof -P -i -n" + alias port='netstat -tulanp' + gmail() { curl -u "$1" --silent "https://mail.google.com/mail/feed/atom" | sed -e 's/<\/fullcount.*/\n/' | sed -e 's/.*fullcount>//'} + alias ipinfo="curl ifconfig.me && curl ifconfig.me/host" + getlocation() { lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|grep address|egrep 'city|state|country'|awk '{print $3,$4,$5,$6,$7,$8}'|sed 's\ip address flag \\'|sed 's\My\\';} + + #Funny + kernelgraph() { lsmod | perl -e 'print "digraph \"lsmod\" {";<>;while(<>){@_=split/\s+/; print "\"$_[0]\" -> \"$_\"\n" for split/,/,$_[3]}print "}"' | dot -Tpng | display -;} + alias busy="cat /dev/urandom | hexdump -C | grep \"ca fe\"" + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/useful-bash-aliases-functions.html + +作者:[Adrien Brochard][a] +译者:[译者luoyutiantang](https://github.com/译者luoyutiantang) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/adrien +[1]:http://alias.sh/ +[2]:http://www.commandlinefu.com/commands/browse +[3]:http://xmodulo.com/useful-online-tools-linux.html From c429eceffde2c0a1036547d40e2f66f26fc9c53d Mon Sep 17 00:00:00 2001 From: luoyutiantang <304825802@qq.com> Date: Fri, 7 Nov 2014 13:55:34 +0800 Subject: [PATCH 147/316] Delete 20141023 What are useful Bash aliases and functions.md --- ...t are useful Bash aliases and functions.md | 256 ------------------ 1 file changed, 256 deletions(-) delete mode 100644 sources/tech/20141023 What are useful Bash aliases and functions.md diff --git a/sources/tech/20141023 What are useful Bash aliases and functions.md b/sources/tech/20141023 What are useful Bash aliases and functions.md deleted file mode 100644 index b5d6e3b6da..0000000000 --- a/sources/tech/20141023 What are useful Bash aliases and functions.md +++ /dev/null @@ -1,256 +0,0 @@ -luoyutiantang -What are useful Bash aliases and functions -================================================================================ -As a command line adventurer, you probably found yourself repeating the same lengthy commands over and over. If you always ssh into the same machine, if you always chain the same commands together, or if you constantly run a program with the same flags, you might want to save the precious seconds of your life that you spend repeating the same actions over and over. - -The solution to achieve that is to use an alias. As you may know, an alias is a way to tell your shell to remember a particular command and give it a new name: an alias. However, an alias is quickly limited as it is just a shortcut for a shell command, without the ability to pass or control the arguments. So to complement, bash also allows you create your own functions, which can be more lengthy and complex, and also accepts any number of arguments. - -Naturally, like with soup, when you have a good recipe you share it. So here is a list with some of the most useful bash aliases and functions. Note that "most useful" is loosely defined, and of course the usefulness of an alias is dependent on your everyday usage of the shell. - -Before you start experimenting with aliases, here is a handy tip: if you give an alias the same name as a regular command, you can choose to launch the original command and ignore the alias with the trick: - - \command - -For example, the first alias below replaces the ls command. If you wish to use the regular ls command and not the alias, call it via: - - \ls - -### Productivity ### - -So these aliases are really simple and really short, but they are mostly based on the idea that if you save yourself a fraction of a second every time, it might end up accumulating years at the end. Or maybe not. - - alias ls="ls --color=auto" - -Simple but vital. Make the ls command output in color. - - alias ll = "ls --color -al" - -Shortcut to display in color all the files from a directory in a list format. - - alias grep='grep --color=auto' - -Similarly, put some color in the grep output. - - mcd() { mkdir -p "$1"; cd "$1";} - -One of my favorite. Make a directory and cd into it in one command: mcd [name]. - - cls() { cd "$1"; ls;} - -Similar to the previous function, cd into a directory and list its content: cls [name]. - - backup() { cp "$1"{,.bak};} - -Simple way to make a backup of a file: backup [file] will create [file].bak in the same directory. - - md5check() { md5sum "$1" | grep "$2";} - -Because I hate comparing the md5sum of a file by hand, this function computes it and compares it using grep: md5check [file] [key]. - -![](https://farm6.staticflickr.com/5616/15412389280_8be57841ae_o.jpg) - - alias makescript="fc -rnl | head -1 >" - -Easily make a script out of the last command you ran: makescript [script.sh] - - alias genpasswd="strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo" - -Just to generate a strong password instantly. - -![](https://farm4.staticflickr.com/3955/15574321206_dd365f0f0e.jpg) - - alias c="clear" - -Cannot do simpler to clean your terminal screen. - - alias histg="history | grep" - -To quickly search through your command history: histg [keyword] - - alias ..='cd ..' - -No need to write cd to go up a directory. - - alias ...='cd ../..' - -Similarly, go up two directories. - - extract() { - if [ -f $1 ] ; then - case $1 in - *.tar.bz2) tar xjf $1 ;; - *.tar.gz) tar xzf $1 ;; - *.bz2) bunzip2 $1 ;; - *.rar) unrar e $1 ;; - *.gz) gunzip $1 ;; - *.tar) tar xf $1 ;; - *.tbz2) tar xjf $1 ;; - *.tgz) tar xzf $1 ;; - *.zip) unzip $1 ;; - *.Z) uncompress $1 ;; - *.7z) 7z x $1 ;; - *) echo "'$1' cannot be extracted via extract()" ;; - esac - else - echo "'$1' is not a valid file" - fi - } - -Longest but also the most useful. Extract any kind of archive: extract [archive file] - -### System Info ### - -Want to know everything about your system as quickly as possible? - - alias cmount="mount | column -t" - -Format the output of mount into columns. - -![](https://farm6.staticflickr.com/5603/15598830622_587b77a363_z.jpg) - - alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'" - -Display the directory structure recursively in a tree format. - - sbs() { du -b --max-depth 1 | sort -nr | perl -pe 's{([0-9]+)}{sprintf "%.1f%s", $1>=2**30? ($1/2**30, "G"): $1>=2**20? ($1/2**20, "M"): $1>=2**10? ($1/2**10, "K"): ($1, "")}e';} - -"Sort by size" to display in list the files in the current directory, sorted by their size on disk. - - alias intercept="sudo strace -ff -e trace=write -e write=1,2 -p" - -Intercept the stdout and stderr of a process: intercept [some PID]. Note that you will need strace installed. - - alias meminfo='free -m -l -t' - -See how much memory you have left. - -![](https://farm4.staticflickr.com/3955/15411891448_0b9d6450bd_z.jpg) - - alias ps? = "ps aux | grep" - -Easily find the PID of any process: ps? [name] - - alias volume="amixer get Master | sed '1,4 d' | cut -d [ -f 2 | cut -d ] -f 1" - -Displays the current sound volume. - -![](https://farm4.staticflickr.com/3939/15597995445_99ea7ffcd5_o.jpg) - -### Networking ### - -For all the commands that involve the Internet or your local network, there are fancy aliases for them. - - alias websiteget="wget --random-wait -r -p -e robots=off -U mozilla" - -Download entirely a website: websiteget [URL] - - alias listen="lsof -P -i -n" - -Show which applications are connecting to the network. - -![](https://farm4.staticflickr.com/3943/15598830552_c7e5eaaa0d_z.jpg) - - alias port='netstat -tulanp' - -Show the active ports - - gmail() { curl -u "$1" --silent "https://mail.google.com/mail/feed/atom" | sed -e 's/<\/fullcount.*/\n/' | sed -e 's/.*fullcount>//'} - -Rough function to display the number of unread emails in your gmail: gmail [user name] - - alias ipinfo="curl ifconfig.me && curl ifconfig.me/host" - -Get your public IP address and host. - - getlocation() { lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|grep address|egrep 'city|state|country'|awk '{print $3,$4,$5,$6,$7,$8}'|sed 's\ip address flag \\'|sed 's\My\\';} - -Returns your current location based on your IP address. - -### Useless ### - -So what if some aliases are not all that productive? They can still be fun. - - kernelgraph() { lsmod | perl -e 'print "digraph \"lsmod\" {";<>;while(<>){@_=split/\s+/; print "\"$_[0]\" -> \"$_\"\n" for split/,/,$_[3]}print "}"' | dot -Tpng | display -;} - -To draw the kernel module dependency graph. Requires image viewer. - - alias busy="cat /dev/urandom | hexdump -C | grep "ca fe"" - -Make you look all busy and fancy in the eyes of non-technical people. - -![](https://farm6.staticflickr.com/5599/15574321326_ab3fbc1ef9_z.jpg) - -To conclude, a good chunk of these aliases and functions come from my personal .bashrc, and the awesome websites [alias.sh][1] and [commandlinefu.com][2] which I already presented in my post on the [best online tools for Linux][3]. So definitely go check them out, make your own recipes, and if you are so inclined, share your wisdom in the comments. - -As a bonus, here is the plain text version of all the aliases and functions I mentioned, ready to be copy pasted in your bashrc. - - #Productivity - alias ls="ls --color=auto" - alias ll="ls --color -al" - alias grep='grep --color=auto' - mcd() { mkdir -p "$1"; cd "$1";} - cls() { cd "$1"; ls;} - backup() { cp "$1"{,.bak};} - md5check() { md5sum "$1" | grep "$2";} - alias makescript="fc -rnl | head -1 >" - alias genpasswd="strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo" - alias c="clear" - alias histg="history | grep" - alias ..='cd ..' - alias ...='cd ../..' - extract() { - if [ -f $1 ] ; then - case $1 in - *.tar.bz2) tar xjf $1 ;; - *.tar.gz) tar xzf $1 ;; - *.bz2) bunzip2 $1 ;; - *.rar) unrar e $1 ;; - *.gz) gunzip $1 ;; - *.tar) tar xf $1 ;; - *.tbz2) tar xjf $1 ;; - *.tgz) tar xzf $1 ;; - *.zip) unzip $1 ;; - *.Z) uncompress $1 ;; - *.7z) 7z x $1 ;; - *) echo "'$1' cannot be extracted via extract()" ;; - esac - else - echo "'$1' is not a valid file" - fi - } - - #System info - alias cmount="mount | column -t" - alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'" - sbs(){ du -b --max-depth 1 | sort -nr | perl -pe 's{([0-9]+)}{sprintf "%.1f%s", $1>=2**30? ($1/2**30, "G"): $1>=2**20? ($1/2**20, "M"): $1>=2**10? ($1/2**10, "K"): ($1, "")}e';} - alias intercept="sudo strace -ff -e trace=write -e write=1,2 -p" - alias meminfo='free -m -l -t' - alias ps?="ps aux | grep" - alias volume="amixer get Master | sed '1,4 d' | cut -d [ -f 2 | cut -d ] -f 1" - - #Network - alias websiteget="wget --random-wait -r -p -e robots=off -U mozilla" - alias listen="lsof -P -i -n" - alias port='netstat -tulanp' - gmail() { curl -u "$1" --silent "https://mail.google.com/mail/feed/atom" | sed -e 's/<\/fullcount.*/\n/' | sed -e 's/.*fullcount>//'} - alias ipinfo="curl ifconfig.me && curl ifconfig.me/host" - getlocation() { lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|grep address|egrep 'city|state|country'|awk '{print $3,$4,$5,$6,$7,$8}'|sed 's\ip address flag \\'|sed 's\My\\';} - - #Funny - kernelgraph() { lsmod | perl -e 'print "digraph \"lsmod\" {";<>;while(<>){@_=split/\s+/; print "\"$_[0]\" -> \"$_\"\n" for split/,/,$_[3]}print "}"' | dot -Tpng | display -;} - alias busy="cat /dev/urandom | hexdump -C | grep \"ca fe\"" - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/useful-bash-aliases-functions.html - -作者:[Adrien Brochard][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/adrien -[1]:http://alias.sh/ -[2]:http://www.commandlinefu.com/commands/browse -[3]:http://xmodulo.com/useful-online-tools-linux.html From 45858a746414587eb99e683f34da9386fe451593 Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Fri, 7 Nov 2014 16:43:59 +0800 Subject: [PATCH 148/316] [translated] 20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md --- ...dmin) On Ubuntu 14.10 or 14.04 or 13.10.md | 349 ------------------ ...dmin) On Ubuntu 14.10 or 14.04 or 13.10.md | 348 +++++++++++++++++ 2 files changed, 348 insertions(+), 349 deletions(-) delete mode 100644 sources/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md create mode 100644 translated/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md diff --git a/sources/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md b/sources/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md deleted file mode 100644 index 2df4022de8..0000000000 --- a/sources/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md +++ /dev/null @@ -1,349 +0,0 @@ -zpl1025 -Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10/14.04/13.10 -================================================================================ -**LEMP** is a combination of the operating system and open-source software stack. The acronym LEMP comes from the first letters of **L**inux, Nginx(**e**ngine-x) HTTP Server, **M**ySQL database, and **P**HP/**P**erl/**P**ython. - -In this tutorial, let us see how to install Nginx, MySQL or MariaDB, PHP and phpMyAdmin on Ubuntu 14.10. - -### Install Nginx ### - -**Nginx** (pronounced as engine-x) is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server written by Igor Sysoev. - -To install Nginx enter the following command in your terminal: - -**Note**: If you have already installed apache2 in your system, remove it first to avoid conflicts. To uninstall apache, run the following commands: - - sudo apt-get purge apache2* - sudo apt-get autoremove -y - -Now, install nginx using command: - - sudo apt-get install nginx - -Start Nginx service using the command: - - sudo service nginx start - -### Test nginx ### - -Open up your web browser and navigate to http://ip-address/ or http://localhost/. You will see a screen something like below. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Welcome-to-nginx-Mozilla-Firefox_005.png) - -### Configure Nginx ### - -Open the file **/etc/nginx/nginx.conf** in any editor: - - sudo nano /etc/nginx/nginx.conf - -Set the worker_processes (i.e No. of CPU’s in your system). To see the no. of CPU’s, use the command “lscpu”. In my case it’s “1″. So I set this as ’1′. - - worker_processes 1; - -Restart Nginx service: - - sudo service nginx restart - -The default vhost(server block) is defined in the **/etc/nginx/sites-available/default** file. - -Open the file /etc/nginx/sites-available/default in any editor. - - sudo nano /etc/nginx/sites-available/default - -Under the Server section, set the server FQDN or IP address as shown below. Make sure you’ve added a index.php line. - - [...] - server { - listen 80 default_server; - listen [::]:80 default_server ipv6only=on; - root /usr/share/nginx/html; - index index.php index.html index.htm; - # Make site accessible from http://localhost/ - server_name server.unixmen.local; - [...] - -Here, - -- **listen 80;** –> listen for ipv4 -- **listen [::]:80 default_server ipv6only=on;** –> listen for ipv6 -- **root /usr/share/nginx/html;** –> document root directory. -- **server_name server.unixmen.local;** –> Server FQDN. - -Now, scroll down further and find the section #location **~ \.php$**. Uncomment and modify the following lines as shown below. - - location ~ \.php$ { - try_files $uri =404; ---------> Add this line - fastcgi_split_path_info ^(.+\.php)(/.+)$; - # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini - # - # # With php5-cgi alone: - # fastcgi_pass 127.0.0.1:9000; - # # With php5-fpm: - fastcgi_pass unix:/var/run/php5-fpm.sock; - fastcgi_index index.php; - include fastcgi.conf; - } - -Here, I added an extra line **‘try_files $uri =404;’** to prevent zero day exploits. - -Save and exit the file. - -### Test nginx configuration ### - -Test the nginx configuration for any syntax errors using command: - - sudo nginx -t - -Sample output: - - nginx: the configuration file /etc/nginx/nginx.conf syntax is ok - nginx: configuration file /etc/nginx/nginx.conf test is successful - -Finally restart nginx service - - sudo service nginx restart - -### Install MySQL ### - -**MySQL** is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases, though SQLite probably has more total embedded deployments - - sudo apt-get install mysql-server mysql-client - -During installation, you’ll be asked to setup the MySQL root user password. Enter the password and click Ok. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_001.png) - -Re-enter the password. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_0021.png) - -Now, MySQL server has been installed. - -You can verify the MySQL server status using command: - - sudo service mysql status - -Sample output: - - mysql start/running, process 5671 - -**Note**: If you want to use MariaDB instead of MySQL, then follow the below steps. - -### Install MariaDB ### - -**MariaDB** is a drop in replacement for MySQL. It is a robust, scalable and reliable SQL server that comes rich set of enhancements. - -First you have to remove existing MySQL packages if any. To completely uninstall MySQL with configuration files, enter the following command: - - sudo apt-get purge mysql* - -Run the following command to remove unwanted packages. - - sudo apt-get autoremove - -After removing MySQL, run the following command to install MariaDB. - - sudo apt-get install mariadb-server mariadb-client - -Alternatively, you can install it from [MariaDB repository][1] if you want to try most recent version of MariaDB. Run the following commands to add PPA. As of writing this, MariaDB PPA is not yet updated to Ubuntu 14.10. However, we can use the repository of Ubuntu 14.04 instead. - - sudo apt-get install software-properties-common - sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db - sudo add-apt-repository 'deb http://sgp1.mirrors.digitalocean.com/mariadb/repo/5.5/ubuntu trusty main' - -Update the software sources list and install MariaDB using following commands: - - sudo apt-get update - sudo apt-get install mariadb-server mariadb-client -y - -During installation you will be asked to set database ‘root’ user password. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_0031.png) - -Re-enter password: - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_004.png) - -Click Yes to migrate to MariaDB. Note that you’ll not be asked this question if you install MariaDB before MySQL. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_005.png) - -You can check the MariaDB version using command: - - sudo mysql -v -u root -p - -Sample output: - - Welcome to the MariaDB monitor. Commands end with ; or \g. - Your MariaDB connection id is 34 - Server version: 5.5.39-MariaDB-2 (Ubuntu) - - Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. - - Reading history-file /home/sk/.mysql_history - Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. - -Check if mariadb is running or not, using the following command: - - sudo service mysql status - -Sample output: - - * /usr/bin/mysqladmin Ver 9.0 Distrib 5.5.39-MariaDB, for debian-linux-gnu on x86_64 - Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. - - Server version 5.5.39-MariaDB-2 - Protocol version 10 - Connection Localhost via UNIX socket - UNIX socket /var/run/mysqld/mysqld.sock - Uptime: 2 min 21 sec - - Threads: 1 Questions: 566 Slow queries: 0 Opens: 330 Flush tables: 4 Open tables: 22 Queries per second avg: 4.014 - -### Install PHP ### - -**PHP** (recursive acronym for PHP: Hypertext Preprocessor) is a widely used open-source general purpose scripting language that is especially suited for web development and can be embedded into HTML. - -Install PHP with following command: - - sudo apt-get install php5 php5-fpm php5-mysql - -### Configure PHP ### - -Open **php.ini** file in any editor: - - sudo nano /etc/php5/fpm/php.ini - -Find the line ‘cgi.fix_pathinfo=1′, uncomment it and change the value 1 to 0. - - cgi.fix_pathinfo=0 - -Now restart php-fpm service. - - sudo service php5-fpm restart - -### Test PHP ### - -Create a sample “testphp.php” file in nginx document root folder. - - sudo nano /usr/share/nginx/html/testphp.php - -Add the following lines in it. - - - -Save and exit the file. - -Navigate to **http://server-ip-address/testphp.php**. It will display all the details about php such as version, build date and commands etc. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/phpinfo-Mozilla-Firefox_0012.png) - -PHP-FPM listens on the socket **/var/run/php5-fpm.sock** by default. If you want to make PHP-FPM use a TCP connection, open the file **/etc/php5/fpm/pool.d/www.conf**, - - sudo nano /etc/php5/fpm/pool.d/www.conf - -Find the line listen = /var/run/php5-fpm.sock, - - ;listen = /var/run/php5-fpm.sock - -and modify it to **listen = 127.0.0.1:9000**. - - listen = 127.0.0.1:9000 - -Save and exit the file. Restart php5-fpm service. - - sudo service php5-fpm restart - -Now open the nginx configuration file: - - sudo nano /etc/nginx/sites-available/default - -Find the line **fastcgi_pass unix:/var/run/php5-fpm.sock;** and change it to fastcgi_pass 127.0.0.1:9000; as shown below. - - location ~ \.php$ { - try_files $uri =404; - fastcgi_split_path_info ^(.+\.php)(/.+)$;fastcgi_pass 127.0.0.1:9000; - # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini - # - # # With php5-cgi alone: - fastcgi_pass 127.0.0.1:9000; - # # With php5-fpm: - # fastcgi_pass unix:/var/run/php5-fpm.sock; - fastcgi_index index.php; - include fastcgi.conf; - } - -Save and exit the file. Finally restart nginx service. - - sudo service nginx restart - -### Manage MySQL Databases Using phpMyAdmin (Optional) ### - -**phpMyAdmin** is a free open-source web interface tool used to manage your MySQL databases. - -### Install phpMyAdmin ### - -It is available in the Official Debian repositories. So install it with command: - - sudo apt-get install phpmyadmin - -Select any webserver. By default, nginx will not be displayed here. So, select apache or lighttpd, and we will link phpmyadmin to work with nginx webserver later. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_007.png) - -Select Yes to configure database for phpmyadmin with dbconfig-common. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_008.png) - -Enter password of the database’s administrative user. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_009.png) - -Enter MySQL application password phpmyadmin. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_010.png) - -Re-enter the password. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_011.png) - -The phpMyAdmin installation has been completed. - -Create a symbolic link between phpMyAdmin and the website root directory. Here our website root document directory is /usr/share/nginx/html/. - - sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/html - -Restart nginx server. - - sudo service nginx restart - -### Access phpMyAdmin Web Console ### - -Now you can access the phpmyadmin console by navigating to **http://server-ip-address/phpmyadmin/** from your browser. - -Enter your MySQL username and password which you have given in previous steps. In my case its “root” and “ubuntu”. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/phpMyAdmin-Mozilla-Firefox_0021.png) - -You will be redirected to PhpMyAdmin main web interface. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/192.168.1.100-localhost-phpMyAdmin-4.2.6deb1-Mozilla-Firefox_0031.png) - -Now you can manage your MySQL databases from phpMyAdmin web interface. - -That’s it. Your LEMP server is now up and ready to use. - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/install-lemp-server-nginx-mysql-mariadb-php-phpmyadmin-ubuntu-14-1014-0413-10/ - -作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/sk/ -[1]:https://downloads.mariadb.org/mariadb/repositories/#mirror=tsinghua diff --git a/translated/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md b/translated/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md new file mode 100644 index 0000000000..892a3132a9 --- /dev/null +++ b/translated/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md @@ -0,0 +1,348 @@ +在Ubuntu 14.10/14.04/13.10上安装LEMP服务(Nginx,MySQL或MariaDB,PHP和phpMyAdmin) +================================================================================ +**LEMP**是一个操作系统和几个开源软件包的合称。缩写LEMP来自**L**inux,Nginx(发音是**e**ngine-x)HTTP服务器,**M**ySQL数据库,和**P**HP/**P**erl/**P**ython的首字母。 + +在这篇教程里,让我们看一下如何在Ubuntu 14.10上安装Nginx,MySQL或MariaDB,PHP和phpMyAdmin。 + +### 安装Nginx ### + +**Nginx** (发音是engine-x)是一个免费的、开源的、高性能HTTP服务器和反向代理,也可以用作IMAP/POP3代理服务器,由Igor Sysoev开发。 + +要安装Nginx,在你的终端里输入下面的命令: + +**注意**:如果你的系统里已经安装了apache2,先卸载掉以避免冲突。要卸载apache,运行下面的命令: + + sudo apt-get purge apache2* + sudo apt-get autoremove -y + +现在,用下面的命令安装nginx: + + sudo apt-get install nginx + +用下面的命令启用Nginx服务: + + sudo service nginx start + +### 测试nginx ### + +打开你的浏览器访问http://IP地址/或者http://localhost/。将可以看到类似下面的截图。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Welcome-to-nginx-Mozilla-Firefox_005.png) + +### 配置Nginx ### + +用任意文本编辑器打开文件**/etc/nginx/nginx.conf** + + sudo nano /etc/nginx/nginx.conf + +设置worker_processes(例如,你系统里CPU数目)。查看CPU数目,可以使用命令“lscpu”。在我这里是“1”。所以我把这个值设为1。 + + worker_processes 1; + +重启Nginx服务: + + sudo service nginx restart + +默认虚拟主机(服务器模块)定义在文件**/etc/nginx/sites-available/default**里。 + +用任意文本编辑器打开文件/etc/nginx/sites-available/default。 + + sudo nano /etc/nginx/sites-available/default + +在Server区域里,按如下设置服务器FQDN或IP地址。确保你增加了index.php这一行。 + + [...] + server { + listen 80 default_server; + listen [::]:80 default_server ipv6only=on; + root /usr/share/nginx/html; + index index.php index.html index.htm; + # Make site accessible from http://localhost/ + server_name server.unixmen.local; + [...] + +这里面 + +- **listen 80;** –> 监听ipv4端口 +- **listen [::]:80 default_server ipv6only=on;** –> 监听ipv6宽口 +- **root /usr/share/nginx/html;** –> 网站根目录 +- **server_name server.unixmen.local;** –> 服务器FQDN + +现在,向下滚动找到区域#location **~ \.php$**。去掉注释并按如下修改: + + location ~ \.php$ { + try_files $uri =404; ---------> Add this line + fastcgi_split_path_info ^(.+\.php)(/.+)$; + # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini + # + # # With php5-cgi alone: + # fastcgi_pass 127.0.0.1:9000; + # # With php5-fpm: + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_index index.php; + include fastcgi.conf; + } + +这里面,我增加了额外一行**‘try_files $uri =404;’**用于避免0day漏洞。 + +保存文件并退出。 + +### 测试nginx配置 ### + +使用下面的命令测试nginx配置是否存在语法错误: + + sudo nginx -t + +典型输出: + + nginx: the configuration file /etc/nginx/nginx.conf syntax is ok + nginx: configuration file /etc/nginx/nginx.conf test is successful + +最后重启nginx服务 + + sudo service nginx restart + +### 安装MySQL ### + +**MySQL**是一个关系型数据库管理系统(RDBMS),作为服务启动提供给多用户访问多种数据库,尽管可能大多集成布置的SQLite。 + + sudo apt-get install mysql-server mysql-client + +在安装过程中,会提示你设置MySQL超级用户密码。输入密码并按确认。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_001.png) + +重新输入密码。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_0021.png) + +现在,MySQL服务器就安装好了。 + +你可以用下面的命令检查MySQL服务器状态: + + sudo service mysql status + +典型输出: + + mysql start/running, process 5671 + +**注意**:如果你希望使用MariaDB而不是MySQL,可以参考下面的步骤。 + +### 安装MariaDB ### + +**MariaDB**是MySQL的一个直接替代软件。它是一个稳定的、可扩展的和可靠的SQL服务器,包含许多增强功能。 + +首先,如果有的话你得先卸载掉MySQL。要完全卸载MySQL包括配置文件,输入如下命令: + + sudo apt-get purge mysql* + +运行如下命令清除不需要的软件包。 + + sudo apt-get autoremove + +在卸载完MySQL后,运行如下命令安装MariaDB。 + + sudo apt-get install mariadb-server mariadb-client + +另外,如果你希望体验最新版的MariaDB的话,可以从[MariaDB仓库][1]安装。运行下面的命令添加PPA。在写这篇文章的时候,MariaDB PPA还没有更新Ubuntu 14.10。不过,我们还是可以使用Ubuntu 14.04的仓库。 + + sudo apt-get install software-properties-common + sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db + sudo add-apt-repository 'deb http://sgp1.mirrors.digitalocean.com/mariadb/repo/5.5/ubuntu trusty main' + +用如下命令更新一下软件源列表,然后安装MariaDB: + + sudo apt-get update + sudo apt-get install mariadb-server mariadb-client -y + +在安装过程中,会提示你设置数据库‘root’用户密码。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_0031.png) + +重新输入一次密码: + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_004.png) + +点击‘是’迁移到MariaDB。注意一下,如果在安装MariaDB之前没有装过MySQL的话,不会提示你这个问题。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_005.png) + +你可以用如下命令检查MariaDB版本: + + sudo mysql -v -u root -p + +典型输出: + + Welcome to the MariaDB monitor. Commands end with ; or \g. + Your MariaDB connection id is 34 + Server version: 5.5.39-MariaDB-2 (Ubuntu) + + Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. + + Reading history-file /home/sk/.mysql_history + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + +用如下命令检查MariaDB是否已经开始运行: + + sudo service mysql status + +典型输出: + + * /usr/bin/mysqladmin Ver 9.0 Distrib 5.5.39-MariaDB, for debian-linux-gnu on x86_64 + Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. + + Server version 5.5.39-MariaDB-2 + Protocol version 10 + Connection Localhost via UNIX socket + UNIX socket /var/run/mysqld/mysqld.sock + Uptime: 2 min 21 sec + + Threads: 1 Questions: 566 Slow queries: 0 Opens: 330 Flush tables: 4 Open tables: 22 Queries per second avg: 4.014 + +### 安装PHP ### + +**PHP**(PHP: Hypertext Preprocessor的递归缩写)是一个应用广泛的开源通用脚本语言,特别适合于网页开发,可以直接嵌入到HTML中。 + +使用如下命令安装PHP: + + sudo apt-get install php5 php5-fpm php5-mysql + +### 配置PHP ### + +用任意文本编辑器打开**php.ini**文件: + + sudo nano /etc/php5/fpm/php.ini + +找到这一行‘cgi.fix_pathinfo=1′,去掉注释并把值1改为0。 + + cgi.fix_pathinfo=0 + +现在重启php-fpm服务。 + + sudo service php5-fpm restart + +### 测试PHP ### + +在nginx文档根目录下创建一个测试文件“testphp.php”。 + + sudo nano /usr/share/nginx/html/testphp.php + +加入下面几行。 + + + +保存文件并退出。 + +访问地址**http://server-ip-address/testphp.php**。将打印出所有关于php的信息,比如版本、构建日期以及命令等等。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/phpinfo-Mozilla-Firefox_0012.png) + +PHP-FPM会默认监听套接字**/var/run/php5-fpm.sock**。如果你希望PHP-FPM使用TCP连接,打开文件**/etc/php5/fpm/pool.d/www.conf**, + + sudo nano /etc/php5/fpm/pool.d/www.conf + +找到这一行listen = /var/run/php5-fpm.sock, + + ;listen = /var/run/php5-fpm.sock + +把它改成**listen = 127.0.0.1:9000**。 + + listen = 127.0.0.1:9000 + +保存退出。重启php5-fpm服务。 + + sudo service php5-fpm restart + +现在打开nginx配置文件: + + sudo nano /etc/nginx/sites-available/default + +找到这一行**fastcgi_pass unix:/var/run/php5-fpm.sock;**,参考下面把它改成fastcgi_pass 127.0.0.1:9000;。 + + location ~ \.php$ { + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$;fastcgi_pass 127.0.0.1:9000; + # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini + # + # # With php5-cgi alone: + fastcgi_pass 127.0.0.1:9000; + # # With php5-fpm: + # fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_index index.php; + include fastcgi.conf; + } + +保存退出。最后重启nginx服务。 + + sudo service nginx restart + +### 使用phpMyAdmin管理MySQL数据库(可选) ### + +**phpMyAdmin**是一个免费的开源网页界面工具,用来管理你的MySQL数据库。 + +### 安装phpMyAdmin ### + +在Debian官方仓库里就有。所以可以用下面的命令安装: + + sudo apt-get install phpmyadmin + +选择一个网页服务器。默认情况下,这里不会显示nginx。所以,选择apache或者lighttpd,然后我们再把phpMyAdmin和nginx连接起来工作。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_007.png) + +选择‘是’通过dbconfig-common为phpMyAdmin配置数据库。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_008.png) + +输入数据库的管理员账号密码。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_009.png) + +输入phpmyadmin帐号的MySQL密码: + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_010.png) + +重新输入一次密码。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_011.png) + +phpMyAdmin的安装就完成了。 + +创建一个phpMyAdmin的软连接到网站根目录。这里我们的网站跟文档目录是/usr/share/nginx/html/。 + + sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/html + +重启nginx服务。 + + sudo service nginx restart + +### 访问phpMyAdmin网页控制台 ### + +现在你可以在浏览器中通过地址**http://server-ip-address/phpmyadmin/**访问phpMyAdmin的控制台了。 + +输入你在前面步骤里留下的MySQL用户名和密码。在我这里是“root”和“ubuntu”。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/phpMyAdmin-Mozilla-Firefox_0021.png) + +就可以重定向到phpMyAdmin的网页管理首页。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/192.168.1.100-localhost-phpMyAdmin-4.2.6deb1-Mozilla-Firefox_0031.png) + +现在你就可以在phpMyAdmin网页里管理你的MyQL数据库了。 + +就这样。你的LEMP服务器已经配置完毕可以投入使用了。 + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/install-lemp-server-nginx-mysql-mariadb-php-phpmyadmin-ubuntu-14-1014-0413-10/ + +作者:[SK][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:https://downloads.mariadb.org/mariadb/repositories/#mirror=tsinghua From ce9e2f909410b5075c12e5513626040fa69f668f Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 7 Nov 2014 17:23:50 +0800 Subject: [PATCH 149/316] Translating by ZTinoZ --- ...ke Disk Full Or Can't Write to the Disk.md | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md index 7e479fb27a..3e2286878c 100644 --- a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md +++ b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md @@ -128,49 +128,48 @@ [![](http://s0.cyberciti.org/uploads/l/tips/2007/07/500-GB-Hard-Disk-ATA-TOSHIBA-MK5061GSYF-dev-sda-%E2%80%94-Disk-Utility_014.png)][10] -图01: Gnome磁盘工具(Applications > System Tools > Disk Utility) +图 01: Gnome磁盘工具(Applications > System Tools > Disk Utility) > **注意**: 不要对SMART工具期望太高,它在某些状况下无法工作,我们要定期做备份。 ### #5 - 我的硬盘驱动器和服务器是不是太热了? ### -高温会引起服务器低效,所以你需要把服务器和磁盘维持在一个平稳适当的温度。High temperatures can result into server shutdown or damage to file system and disk. [Use hddtemp or smartctl utility to find out the temperature of your hard on a Linux or Unix based system][11] by reading data from S.M.A.R.T. on drives that support this feature. Only modern hard drives have a temperature sensor. hddtemp supports reading S.M.A.R.T. information from SCSI drives too. hddtemp can work as simple command line tool or as a daemon to get information from all servers: - +高温会引起服务器低效,所以你需要把服务器和磁盘维持在一个平稳适当的温度,高温甚至能导致服务器宕机或损坏文件系统和磁盘。[用hddtemp或smartctl功能,通过从支持此特点的驱动上的SMART技术来读取数据的方式,从而查出你的Linux或基于UNIX系统上的硬件温度。][11]只有现代硬驱动器有温度传感器。hddtemp功能也支持从SCSI驱动器读取SMART信息。hddtemp能作为一个简单的命令行工具或守护程序来从所有服务器中获取信息: hddtemp /dev/DISK hddtemp /dev/sg0 -Sample outputs: +部分输出内容: [![](http://s0.cyberciti.org/uploads/cms/2014/10/hddtemp-on-rhel-300x85.jpg)][12] -Fig.02: hddtemp in action +图 02: hddtemp正在运行 -You can use the smartctl command as follows too: +你也可以像下面显示的那样使用smartctl命令: smartctl -d ata -A /dev/sda | grep -i temperature #### 我怎么获取CPU的温度 #### -You can use Linux hardware monitoring tool such as [lm_sensor to get the cpu temperature on a Linux based][13] system: +你可以使用Linux硬件监控工具例如像[用基于Linux系统的lm_sensor功能来获取CPU温度][13]: sensors -Sample outputs from Debian Linux server: +Debian服务器的部分输出内容: [![](http://s0.cyberciti.org/uploads/cms/2014/10/sensors-command-on-debian-server.jpg)][14] -Fig.03: sensors command providing cpu core temperature and other info on a Linux +图 03: sensors命令提供了一台Linux计算机的CPU核心温度和其它信息 -### #6 - Dealing with corrupted file systems ### +### #6 - 处理损坏的文件系统 ### -File system on server may be get corrupted due to a hard reboot or some other error such as bad blocks. You can [repair corrupted file systems with the following fsck command][15]: +服务器上的文件系统可能会因为硬件重启或一些其它的错误比如坏区而损坏。你可以[用fsck命令来修复损坏的文件系统][15]: umount /ftpusers fsck -y /dev/sda8 -See [how to surviving a Linux filesystem failures][16] for more info. +来看看[怎么应对Linux文件系统故障][16]的更多信息。 -### #7 - Dealing with software RAID on a Linux ### +### #7 - 处理Linux中的软阵列 ### To find the current status of a Linux software raid type the following command: @@ -185,7 +184,7 @@ Sample outputs: [![](http://s0.cyberciti.org/uploads/cms/2014/10/linux-mdstat-output.jpg)][17] -Fig. 04: Find the status of a Linux software raid command +图 04: Find the status of a Linux software raid command You need to replace a failed hard drive. You must u remove the correct failed drive. In this example, I'm going to replace /dev/sdb (2nd hard drive of RAID 6). It is not necessary to take the storage offline to repair the RAID on Linux. This only works if your server support hot-swappable hard disk: From bce61f5d32b41208a4cdb8ed6d7767678cb4763b Mon Sep 17 00:00:00 2001 From: su-kaiyao <1250471161@qq.com> Date: Sat, 8 Nov 2014 10:11:58 +0800 Subject: [PATCH 150/316] su-kaiyao translating --- ...edatectl--Control Linux System Time and Date in Systemd.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md b/sources/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md index 72a4187a85..783516cbd8 100644 --- a/sources/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md +++ b/sources/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md @@ -1,3 +1,5 @@ +[su-kaiyao] translating + timedatectl - Control Linux System Time and Date in Systemd ================================================================================ **timedatectl** is a Linux utility that may be used to query and change the system clock and it's settings. It is distributed as part of the [systemd system and service manager][1] and allows you to review and change the configuration of the system clock. @@ -68,4 +70,4 @@ via: http://linoxide.com/linux-command/timedatectl-change-time-date-systemd/ [a]:http://linoxide.com/author/adriand/ [1]:http://www.freedesktop.org/wiki/Software/systemd/ -[2]:https://en.wikipedia.org/wiki/Coordinated_Universal_Time \ No newline at end of file +[2]:https://en.wikipedia.org/wiki/Coordinated_Universal_Time From 2f5122fe2f67d5ff36911ccc8f633101f0bc75d0 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 8 Nov 2014 21:45:46 +0800 Subject: [PATCH 151/316] PUB:20141014 Linux FAQs with Answers--How to change date and time from the command line on Linux @wangjiezhe --- ...date and time from the command line on Linux.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/tech => published}/20141014 Linux FAQs with Answers--How to change date and time from the command line on Linux.md (87%) diff --git a/translated/tech/20141014 Linux FAQs with Answers--How to change date and time from the command line on Linux.md b/published/20141014 Linux FAQs with Answers--How to change date and time from the command line on Linux.md similarity index 87% rename from translated/tech/20141014 Linux FAQs with Answers--How to change date and time from the command line on Linux.md rename to published/20141014 Linux FAQs with Answers--How to change date and time from the command line on Linux.md index 26bdb96cdb..c8511cf36c 100644 --- a/translated/tech/20141014 Linux FAQs with Answers--How to change date and time from the command line on Linux.md +++ b/published/20141014 Linux FAQs with Answers--How to change date and time from the command line on Linux.md @@ -1,10 +1,10 @@ -Linux 有问必答 -- 在 Linux 上如何通过命令行来更改日期和时间 +Linux 有问必答:在 Linux 上如何通过命令行来更改日期和时间 ================================================================================ > **问题**: 在 Linux 上, 我怎样通过命令行来改变日期和时间? -在 Linux 系统中保持日期和时间的同步是每一个 Linux 用户和系统管理员的重要责任. 很多程序都依靠精确的时间信息得以正常工作. 另外, 不精确的日期和时间会使得日志文件中的时间戳变得毫无意义, 减少了它们在系统检查和检修中的作用. 对于生产系统来说, 精确的日期和时间甚至更为重要. 例如, 在零售公司中, 所有产品必须时刻准确地计数(并储存在数据库服务器中)以便于财政部门计算每天及每周,每月,每年的支出和收入. +在 Linux 系统中保持日期和时间的同步是每一个 Linux 用户和系统管理员的重要责任. 很多程序都依靠精确的时间信息得以正常工作. 另外, 不精确的日期和时间会使得日志文件中的时间戳变得毫无意义, 减弱了它们在系统检查和检修中的作用. 对于生产系统来说, 精确的日期和时间甚至更为重要. 例如, 在零售公司中, 所有产品必须时刻准确地计数(并储存在数据库服务器中)以便于财政部门计算每天及每周,每月,每年的支出和收入. -我们必须注意, 在 Linux 机器上有两种时钟: 由内核维持的软件时钟(又称系统时钟)和在机器关机后记录时间的(电池驱动的)硬件时钟. 启动的时候, 内核会把系统时钟与硬件时钟同步. 之后, 两个时钟各自独立运行. +我们必须注意, 在 Linux 机器上有两种时钟: 由内核维持的软件时钟(又称系统时钟)和在机器关机后记录时间的(电池供电的)硬件时钟. 启动的时候, 内核会把系统时钟与硬件时钟同步. 之后, 两个时钟各自独立运行. ### 方法一: Date 命令 ### @@ -24,7 +24,7 @@ Linux 有问必答 -- 在 Linux 上如何通过命令行来更改日期和时间 ![](https://farm3.staticflickr.com/2944/15220890657_858528a186_o.png) -你也可以相对地增加或减少一定的天数,周数,月数和秒数,分钟数,小时数. 你也可以把日期和时间的参数放到一个命令中. +你也可以用相对的方式地增加或减少一定的天数,周数,月数和秒数,分钟数,小时数。 你也可以把日期和时间的参数放到一个命令中。 # date --set='+5 minutes' # date --set='-2 weeks' @@ -41,7 +41,7 @@ Linux 有问必答 -- 在 Linux 上如何通过命令行来更改日期和时间 另一方面, 如果硬件时钟是正确的, 但系统时钟有误, 可以用下面的命令更正: - # hwclock --hctosys + # hwclock --hctosys 在两种情况下, hwclock 命令都是将两个时钟同步. 否则, 重启后时间会是错误的, 因为当电源关闭时硬件时钟会记忆时间. 然而, 这对于虚拟机器并不适用, 因为虚拟机器并不能访问硬件时钟. @@ -63,7 +63,7 @@ Linux 有问必答 -- 在 Linux 上如何通过命令行来更改日期和时间 使用 NTP 同步系统时钟: - # ntpdate -u + # ntpdate -u # hwclock --systohc ![](https://farm4.staticflickr.com/3930/15404223021_8da3b44a62_z.jpg) @@ -75,7 +75,7 @@ Linux 有问必答 -- 在 Linux 上如何通过命令行来更改日期和时间 via: http://ask.xmodulo.com/change-date-time-command-line-linux.html 译者:[wangjiezhe](https://github.com/wangjiezhe) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From c516b95835ce483d9a7d4e02c169b74e3bf4ce75 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sat, 8 Nov 2014 22:30:31 +0800 Subject: [PATCH 152/316] =?UTF-8?q?20141108-1=20=E9=80=89=E9=A2=98=20Rorsc?= =?UTF-8?q?hach=20=E6=8E=A8=E8=8D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../talk/20141108 When hackers grow old.md | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 sources/talk/20141108 When hackers grow old.md diff --git a/sources/talk/20141108 When hackers grow old.md b/sources/talk/20141108 When hackers grow old.md new file mode 100644 index 0000000000..cf31c168ae --- /dev/null +++ b/sources/talk/20141108 When hackers grow old.md @@ -0,0 +1,65 @@ +When hackers grow old +================================================================================ +Lately I’ve been wrestling with various members of an ancient and venerable open-source development group which I am not going to name, though people who regularly follow my adventures will probably guess which one it is by the time I’m done venting. + +Why it so freaking hard to drag some people into the 21st century? Sigh… + +I’m almost 56, an age at which a lot of younger people expect me to issue semi-regular salvos of get-off-my-lawn ranting at them. But no – I find, that, especially in technical contexts, I am far more likely to become impatient with my age peers. + +A lot of them really have become grouchy, hidebound old farts. And, alas, it not infrequently falls to me to be the person who barges in and points out that practices well-adapted for 1995 (or, in the particular case I’m thinking of, 1985) are … not good things to hold on to decades later. + +Why me? Because the kids have little or no cred with a lot of my age peers. If anyone’s going to get them to change, it has to be someone who is their peer in their own perception. Even so, I spend a lot more time than seems just or right fighting inertia. + +Young people can be forgiven for lacking a clue. They’re young. Young means little experience, which often leads to unsound judgment. It’s more difficult for me to forgive people who have been around the track often enough that they should have a clue, but are so attached to The Way It’s Always Been Done that they can’t see what is in front of their freaking noses. + +(News flash: I really don’t have a conservative temperament. I find it wryly amusing how often both conservatives and non-conservatives who argue politics with me fail to notice this.) + +OK, now let’s talk about GNU ChangeLog files. They were a fine idea, a necessary one even, in 1985. The idea was to use a single ChangeLog entry to document a group of related changes to multiple files. This was a reasonable adaptation to absent or extremely primitive version control. I know this because I was there. + +Even in 1995, or as late as the early 2000s, many version control systems didn’t have changesets. That is, there was no or only weak support for grouping multiple file modifications into a single retrievable object with a comment attached to the object rather than to individual file modifications. CVS, the system in widest use then, only faked changesets – and did it so badly that many people felt they couldn’t rely on that feature. ChangeLog files still made some functional sense. + +But then Subversion – with real changesets – achieved wide acceptance through its beta releases around 2003 and its 1.0 in 2004. It should have been obvious then, even before the new wave of DVCSes that began a year later, that there was a culture clash a comin’. Because if your project both has a DVCS and uses the ChangeLog convention, they’re fighting for control of the same metadata. + +There are different ways you can adapt. One is to continue to treat the ChangeLogs as the authoritative record of the evolution of the code. In that case, you tend to get stubby or pro-forma commit comments. + +Another is to treat the commit comment log as authoritative. If you do that, you soon begin to wonder why you’re still writing ChangeLog entries at all. The commit metadata has better coherence with the code changes, after all – that’s what it’s designed for. + +(Now imagine a project in which, with the best of intentions, different people are making opposite choices out of these two. Now you have to read both the ChangeLogs and the commit logs to know what’s going on. Friction costs are rising…) + +A third is to try to have it both ways – duplicating commit comment data in a slightly different format in a ChangeLog entry that’s part of the commit. This has all the problems you’d expect with a representation in which there is no single point of truth; one copy gets garbled, or the ChangeLog entry gets modified so that it’s no longer in sync with the allegedly matching commit data, and life gets very confusing for anyone who comes along later and tries to figure out what people were thinking. + +Or, as a senior dev on a Certain Project I Won’t Name just did in email, declaring that commits can include multiple ChangeLog entries and the commit metadata is irrelevant to the Changelogs. Which we still have to write. + +My eyes crossed and my gorge rose when I read that. What kind of fool fails to realize that this is begging for trouble – that, actually, the whole edifice of custom around ChangeLog files is just dead weight and friction drag in a DVCS world with good browsing tools for reliable commit logs? + +Alas, it’s a very particular kind of fool: a hacker who has grown old and rigid. All the rationalizations he will ever utter fail to hide this. He’s attached to tactics that made sense a decade ago but have become counterproductive ceremonies now. If you tried to explain not just about git summary lines but that the correct adaptation for current toolsets is to scrap ChangeLogs entirely … well, that would be insupportable, inconceivable, and just crazy talk. + +Functionally this infuriates me. It is substantially harder to work on that project because of this and related nonsense. And, as badly as it happens to need young developers, that’s a real problem. It has a G+ community well into 4 digits, they’re mostly kids, and they’re not stepping up. Evidently the message has been received on the outside; the devs on this project are ancient mossbacks with inexplicable tribal fixations, and best admired from a good long distance. + +What gives this extra emotional edge for me is that whenever I have to butt heads with a mossback, I keep wondering: will I be like this someday? Worse, am I looking in a mirror, already rigidified and not knowing it? I mean, I get the impression from his web presence that this particular specimen is younger than me. By a good fifteen years. + +I feel mentally agile. I don’t get frustrated by people moving faster than I can handle, I get frustrated by people who can’t keep up with me, who can’t see the obvious. But this self-belief could be just a bad case of Dunning-Krueger effect biting me where I least understand it. Very few things terrify me; this possibility is high on the short list. + +A separately disconcerting thing is that as I get older this sort of collision is happening more often rather than less. Somehow I expected my hacker peers to age more gracefully, to retain their neotenous flexibility even if they were physically aging. Some do indeed seem to be going that way; too many, alas, are not. It is a sadness. + +I’m not sure I have a good finish for this. If I’ve escaped mentally rigidifying (and that’s an if) I think I know at least in part why, but I’m very unsure whether it can be generally replicated – you might need to have a wired-in brain chemistry that matches the strategy. Nevertheless, for whatever it’s worth, here is my advice to young hackers and indeed the young of all kinds. + +You – yes, even you – cannot count on retaining your mental flexibility into middle and old unless you work at it. You have to practice busting out of comfortable mental grooves and regularly checking your assumptions when you’re young, and you have to develop a habit of it that sustains into old age. + +It’s said that the best time for a middle-aged person to start (physically) exercising is thirty years ago. I think the same goes for the habits that might (might!) keep you mentally agile at 56, or 65. Push your envelope. Develop the regular practice of challenging yourself and exiting your comfort zone now so you’ll have it established when you really need it. + +You have to be realistic about this; there’s an optimal-challenge level where you choose an attainable goal and work mentally hard for it. This month I’m going to learn go. Not the game, I already play that (though not very well); the programming language. Not because I really need to for a specific project, but because it’s time to stretch myself. + +Develop that habit. And never let it go. + +-------------------------------------------------------------------------------- + +via: http://esr.ibiblio.org/?p=6485 + +作者:[Eric Raymond][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://esr.ibiblio.org/?author=2 \ No newline at end of file From 97aba5a4d481354f334fc1cc000071125d93ef63 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 8 Nov 2014 22:31:28 +0800 Subject: [PATCH 153/316] PUB:20140919 How to install Arch Linux the easy way with Evo or Lution @GOLinux --- ...h Linux the easy way with Evo or Lution.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/tech => published}/20140919 How to install Arch Linux the easy way with Evo or Lution.md (63%) diff --git a/translated/tech/20140919 How to install Arch Linux the easy way with Evo or Lution.md b/published/20140919 How to install Arch Linux the easy way with Evo or Lution.md similarity index 63% rename from translated/tech/20140919 How to install Arch Linux the easy way with Evo or Lution.md rename to published/20140919 How to install Arch Linux the easy way with Evo or Lution.md index b217691ce0..ff2b253bb0 100644 --- a/translated/tech/20140919 How to install Arch Linux the easy way with Evo or Lution.md +++ b/published/20140919 How to install Arch Linux the easy way with Evo or Lution.md @@ -1,20 +1,20 @@ -Arch Linux安装捷径:Evo/Lution +Arch Linux 安装捷径:Evo/Lution ================================================================================ -有些人只体验过Ubuntu或Mint的安装,却鼓起勇气想要安装Arch Linux,他们的学习道路是那样的陡峭和严峻,安装过程中半途而废的人数可能要比顺利过关的人多。如果你成功以有用的方式跑起并配置了Arch Linux,那么它已经把你培养成了一个饱经风霜的Linux用户。 +有些人只体验过Ubuntu或Mint的安装,却鼓起勇气想要安装Arch Linux,他们的学习道路是那样的陡峭和严峻,安装过程中半途而废的人数可能要比顺利过关的人多得多。如果你成功搭建并按你所需的配置好了Arch Linux,那么它已经把你培养成了一个饱经风霜的Linux用户。 -即使有[有帮助的维基][1]可以为新手提供指南,对于那些想要征服Arch的人而言要求仍然太高。你需要至少熟悉诸如fdisk或mkfs之类的终端命令,并且听过mc、nano或chroot这些,并努力掌握它们。这让我回想起了10年前的Debian安装。 +即使有[可以帮助你的维基][1]为新手提供指南,对于那些想要征服Arch的人而言要求仍然太高。你需要至少熟悉诸如fdisk或mkfs之类的终端命令,并且听过mc、nano或chroot这些,并努力掌握它们。这让我回想起了10年前的Debian安装。 -对于那些满怀抱负而又缺乏知识的生灵,有一个叫[Evo/Lution Live ISO][2]的ISO镜像格式安装器可以拯救他们。即便它貌似和自有发行版一样启动,但它也什么都没干,除了辅助安装Arch Linux准系统。Evo/Lution是一个项目,它旨在通过提供Arch的简单安装方式让Arch的用户基础多样化,就像为那些用户提供全面帮助和文档的社区一样。在这样一个组合中,Evo是Live CD(不可安装),而Lution是个安装器。项目创立者看到了Arch开发者和用户之间的巨大鸿沟及其衍生发行版,而想要在所有参与者之间构筑一个平等身份的社区。 +对于那些满怀抱负而又缺乏知识的生灵,有一个叫[Evo/Lution Live ISO][2]的ISO镜像格式安装器可以拯救他们。即便它貌似像发行版一样启动,但它其实除了辅助安装Arch Linux准系统之外啥都不干。Evo/Lution是一个项目,它旨在通过提供Arch的简单安装方式来为Arch的增加更多的用户基数,就像为那些用户提供全面帮助和文档的社区一样。在这样一个组合中,Evo是Live CD(不可安装),而Lution是个安装器本身。项目创立者看到了Arch及其衍生发行版的开发者和用户之间的巨大鸿沟,而想要在所有参与者之间构筑一个身份平等的社区。 ![](https://farm6.staticflickr.com/5559/15067088008_ecb221408c_z.jpg) -项目的软件部分是命令行安装器Lution-AIS,它解释了一个普通的纯净的Arch安装过程中的每一步。安装完毕后,你将获得Arch提供的没有从AUR添加任何东西的最新软件或其它任何自定义的包。 +项目的软件部分是命令行安装器Lution-AIS,它负责解释一个普通的纯净的Arch安装过程中的每一步。安装完毕后,你将获得Arch提供的没有从AUR添加任何东西的最新软件或其它任何自定义的包。 启动这个422MB大小的ISO镜像后,一个由显示在右边的带有选项快捷方式的Conky和一个左边等待运行安装器的LX-Terminal组成的工作区便呈现在我们眼前。 ![](https://farm6.staticflickr.com/5560/15067056888_6345c259db_z.jpg) -在通过右击桌面或使用ALT-i启动实际的安装器后,一个写满了16个等待运行的任务的列表就出现在你面前了。除非你有一个更好的了解,否则将这些命令全部运行一遍。你可以一次运行,也可以进行选择,如1 3 6,或者1-4,也可以一次将它们全部运行,输入1-16。大多数步骤需要‘y’,即yes,来确认,而下一个任务则等着你敲击回车来执行。在此期间,你有足够的时间来阅读安装指南,它可以通过ALT-g来打开。当然,你也可以出去溜达一圈再回来。 +在通过右击桌面或使用ALT-i启动实际的安装器后,一个写满了16个等待运行的任务列表就出现在你面前了。除非你知道你在做什么,否则请将这些任务全部运行一遍。你可以一次运行,也可以进行选择,如1 3 6,或者1-4,也可以一次将它们全部运行,输入1-16。大多数步骤需要‘y’,即‘yes’,来确认,敲击回车即可。在此期间,你有足够的时间来阅读安装指南,它可以通过ALT-g来打开。当然,你也可以出去溜达一圈再回来。 ![](https://farm4.staticflickr.com/3868/15253227082_5e7219f72d_z.jpg) @@ -48,13 +48,13 @@ Lution-AIS在Cinnamon和Awesome上像个妩媚的小妖精。在安装完成并 ![](https://farm4.staticflickr.com/3885/15270946371_c2def59f37_z.jpg) -我要提出两点非议:一是在安装器要我选择一个镜像列表时,另外一个是在创建fstab文件时。在这两种情况下,它都另外开了一个终端,给出了一些文本信息提示。这让我花了点时间才搞清楚,原来我得把它关了,安装器才会继续。在创建fstab后,它又会提示你,而你需要关闭终端,并在问你是否想要保存文件时回答‘是’。 +我要提出两点批评:一是在安装器要我选择一个镜像列表时,以及在创建fstab文件时。在这两种情况下,它都另外开了一个终端,给出了一些文本信息提示。这让我花了点时间才搞清楚,原来我得把它关了,安装器才会继续。在创建fstab后,它又会提示你,而你需要关闭终端,并在问你是否想要保存文件时回答‘是’。 ![](https://farm4.staticflickr.com/3874/15067056958_3bba63da60_z.jpg) -我碰到的第二个问题,可能与VirtualBox有关了。在启动的时候,你可以看到没有网络被检测到的提示信息。点击顶部左边的图标,将会打开wicd,这里所使用的网络管理器。点击“断开”,然后再点击“连接”并重启安装器,就可以让它自动检测到了。 +我碰到的第二个问题,可能与VirtualBox有关了。在启动的时候,你可以看到没有网络被检测到的提示信息。点击顶部左边的图标,将会打开我们所使用的网络管理器wicd。点击“断开”,然后再点击“连接”并重启安装器,就可以让它自动检测到了。 -Evo/Lution我以为是个有价值的项目,在这里Lution工作一切顺利,目前还没有什么可告诉社区的。他们开启了一个全新的网站、论坛和维基,需要填充内容进去啊。所以,如果你喜欢这主意,加入[他们的论坛][3]并告诉他们吧。本文中的ISO镜像可以从[此网站][4]下载。 +Evo/Lution看起来是个有价值的项目,在这里Lution工作一切顺利,目前还没有什么可告诉社区的。他们开启了一个全新的网站、论坛和维基,需要填充内容进去啊。所以,如果你喜欢这主意,加入[他们的论坛][3]并告诉他们吧。本文中的ISO镜像可以从[此网站][4]下载。 -------------------------------------------------------------------------------- @@ -62,7 +62,7 @@ via: http://xmodulo.com/2014/09/install-arch-linux-easy-way-evolution.html 作者:[Ferdinand Thommes][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 46db62ecaca5828bef5f2e90c667f5de1c08014c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sat, 8 Nov 2014 22:42:30 +0800 Subject: [PATCH 154/316] =?UTF-8?q?20141108-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...and Audio Using 'Avconv' Tool in Ubuntu.md | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 sources/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md diff --git a/sources/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md b/sources/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md new file mode 100644 index 0000000000..85ca3b9390 --- /dev/null +++ b/sources/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md @@ -0,0 +1,130 @@ +How to Record Your Desktop Video and Audio Using “Avconv” Tool in Ubuntu +================================================================================ +**Libav** is a set of cross-platform libraries and tools that are used to deal with multimedia files, streams and protocols, it was originally forked from the ffmpeg project. Libav includes many sub-tools like: + +- **Avplay**: a video & audio player. +- **Avconv**: a multimedia converter plus a video & audio recorder from different sources. +- **Avprobe**: a tool that connects to the multimedia file stream and returns many useful information and statistics about it. +- **Libavfilter**: a filtering API for different Libav tools. + +In this article, we’ll explain how to record the Linux desktop’s video & audio using the ‘Avconv’ program on **Debian/Ubuntu/Linux Mint** distributions. + +### Step 1: Installing Avconv Tool ### + +**1.** **avconv** is a part from the “**libav-tools**” package, which is available to install from the official repositories for all Debian-based distributions like Ubuntu and Mint, using following commands. + + $ sudo apt-get update + $ sudo apt-get install libav-tools + +![Install Avconv Tool](http://www.tecmint.com/wp-content/uploads/2014/11/Install-avconv-tool.jpeg) + +Install Avconv Tool + +**Note**: Installing packages from default repositories, might give you a little older version of ‘**avconv**‘ tool. Thus, we recommend you to get the latest version from the official git repository, as shown below. + + $ sudo apt-get install yasm + $ git clone git://git.libav.org/libav.git + $ cd libav + $ ./configure + $ make + $ sudo make install + +**Note**: You will have to run “**./configure –help**” in order to list all the available options for the configuration file and install codecs and libraries that you want, you will also need to do a lot of work in order to install the dependencies. + +Also note, if you’re used the compile-from-source way, you’ll always have to use “**sudo avconv**” instead of “**avconv**” to run the tool. + +### Step 2: Start Video Recording of Desktop ### + +**2.** You’re ready now, all what you have to do is to record your desktop video by issuing following command. + + $ avconv -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 $HOME/output.avi + +Now let’s explain the command in short: + +- **avconv -f x11grab** is the default command to capture video from the X server. +- **-r 25** is the frame rate you want, you may change it if you like. +- **-s 1920×1080** is your system’s screen resolution, change it to your current system resolution, it’s very important to do this. +- **-i :0.0** is where we want to set our recording start point, leave it like this. +- **-vcodec libx264** is the video codec that we’re using to record the desktop. +- **-threads 4** is the number of threads, you may change it as well if you like. +- **$HOME/output** is the destination path where you want to save the file. +- **.avi** is the video format, you may change it to “flv”, “mp4″, “wmv”, “mov”, “mkv”. + +**3.** After you enter the command, the recording will start automatically as a process running from the terminal, in order to stop it, hit “Ctrl + C” keys inside the terminal window. + +![Record Desktop Screen](http://www.tecmint.com/wp-content/uploads/2014/11/Record-Desktop-Screen.jpeg) + +Record Desktop Screen + +**4.** Now, you may run the file using VLC or any other multimedia player, or you may run it using “avplay” tool which is a multimedia player from the same Libav package. + + $ avplay $HOME/output.avi + +**Note:** Don’t forget to replace the destination file path. The recording’s quality is pretty good. + +![Play Recorded Video](http://www.tecmint.com/wp-content/uploads/2014/11/Play-Recorded-Video.jpeg) + +Play Recorded Video + +Here’s a video that I’ve recorded using the “**avconv**” tool. + +注:youtube 地址,发布的时候不行做个链接 + + +### Step 3: Start Video & Audio Recording of Desktop ### + +**5.** If you want to record the audio as well, first run this command to list all the available input sources for the audio. + + $ arecord -l + +It will give you some output like this. + +![Check Audio Input](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Audio-Input.png) + +Check Audio Input + +In my case, I’ve one input source for audio only, and its number is “**1**”, that’s why I am going to use the following command to capture both video & microphone audio. + + $ avconv -f alsa -i hw:1 -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 output-file2.avi + +You see that part which is colored in yellow? It’s the only modification that I did for the command. Now let’s explain the command in short: + +- **-f** alsa is an option to capture the sound from the alsa device. +- **-i** hw:1 is an option to take the audio input source from the “hw:1” device which is the first – and the only – input sound device in my computer. + +**Note**: Don’t forget to replace the “**1**” number with the number of the input device that you want when you list the available audio input sources using the **arecord -l** command. + +To stop the recording, you may hit the “**Ctrl + C**” keys again. + +### Step 4: Start Audio Recording of Desktop ### + +**6.** If you want to record the audio only, you may use the following command. + + $ avconv -f alsa -i hw:1 out.wav + +**7.** You may replace **.mp3** with any supported audio format by Libav, you can now play the **out.wav** using any mutlimedia player like VLC. + +![Record Desktop Audio](http://www.tecmint.com/wp-content/uploads/2014/11/Record-Desktop-Audio.png) + +Record Desktop Audio + +### Conclusion ### + +“**avconv**” tool can be used to do many other things, not just to record the desktop’s video and audio. For further usage and details about the “avconv” tool, you may visit the official guide at. + +- [https://libav.org/avconv.html][1] + +Have you used the “avconv” tool before to record your desktop? What do you think about it? Is there any other tools that you use to record your desktop? Share them with us in the comments. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/record-ubuntu-desktop-screen-using-avconv/ + +作者:[Hanny Helal][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/hannyhelal/ +[1]:https://libav.org/avconv.html \ No newline at end of file From 2926d2be28f743862b1b382c28638ba47c9d9faf Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sat, 8 Nov 2014 23:06:08 +0800 Subject: [PATCH 155/316] =?UTF-8?q?20141108-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...t Environment Setup on RHEL or CentOS 7.md | 265 ++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 sources/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md diff --git a/sources/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md b/sources/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md new file mode 100644 index 0000000000..d38bb22e24 --- /dev/null +++ b/sources/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md @@ -0,0 +1,265 @@ +Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL/CentOS 7 +================================================================================ +This tutorial will guide you on how to add **Ubuntu 14.10 Server, Ubuntu 14.04 Server** and **Debian 7 Wheezy** distributions to PXE Network Boot Environment Setup on **RHEL/CentOS 7**. + +![Add Ubuntu and Debian to PXE Network](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Ubuntu-and-Debian-to-PXE.png) + +Add Ubuntu and Debian to PXE Network + +Although for the purposes of this tutorial, I will only demonstrate how you can add **64-bit** Network Installation Images, the same procedure can also be applied for Ubuntu or Debian **32-bit** or other architectures images. Also, the process of adding Ubuntu 32-bit sources will be explained but not configured on my premises. + +Installing **Ubuntu** or **Debian** from a PXE Server requires that your client machines must have an active Internet connection, preferably configured through **NAT** with **DHCP** dynamic addresses allocation, in order for the installer to pull the required packages and finish the installation process. + +#### Requirements #### + +- [Install PXE Network Boot Server for Multiple Linux Distribution Installations in RHEL/CentOS 7][1] + +## Step 1: Add Ubuntu 14.10 and Ubuntu 14.04 Server to PXE Menu ## + +**1.** Adding Network Installation Sources for **Ubuntu 14.10** and **Ubuntu 14.04** to PXE Menu can be achieved in two ways: One is by downloading the Ubuntu CD ISO Image and mount it on PXE Server machine in order to access Ubuntu Netboot files and the other is by directly downloading Ubuntu Netboot archive and extract it onto the system. Further I will discuss both methods: + +### Using Ubuntu 14.10 and Ubuntu 14.04 CD ISO Image ### + +In order to use this method your PXE server needs a functional CD/DVD drive. On an arbitrary computer go to [Ubuntu 14.10 Download][2] and [Ubuntu 14.04 Download][3] page, grab the 64-bit **Server Install Image**, burn it to a CD, place the CD image to PXE Server DVD/CD drive and mount it on your system using the following command. + + # mount /dev/cdrom /mnt + +In case your PXE server machine has no CD/DVD drive you can download **Ubuntu 14.10** and **Ubuntu 14.04** ISO Image locally using **wget** command line and mount it on your server on the same above path by issuing the following commands (download and mount the CD). + +#### On Ubuntu 14.10 #### + + ------------------ On 32-Bit ------------------ + + # wget http://releases.ubuntu.com/14.10/ubuntu-14.10-server-i386.iso + # mount -o loop /path/to/ubuntu-14.10-server-i386.iso /mnt + +---------- + + ------------------ On 64-Bit ------------------ + + # wget http://releases.ubuntu.com/14.10/ubuntu-14.10-server-amd64.iso + # mount -o loop /path/to/ubuntu-14.10-server-amd64.iso /mnt + +#### On Ubuntu 14.04 #### + + ------------------ On 32-Bit ------------------ + + # wget http://releases.ubuntu.com/14.04/ubuntu-14.04.1-server-i386.iso + # mount -o loop /path/to/ubuntu-14.04.1-server-i386.iso /mnt + +---------- + + ------------------ On 64-Bit ------------------ + + # wget http://releases.ubuntu.com/14.04/ubuntu-14.04.1-server-amd64.iso + # mount -o loop /path/to/ubuntu-14.04.1-server-amd64.iso /mnt + +### Using Ubuntu 14.10 and Ubuntu 14.04 Netboot Image ### + +For this approach download Ubuntu Netboot Images onto PXE Server using the following commands. + +#### On Ubuntu 14.04 #### + + ------------------ On 32-Bit ------------------ + + # cd + # wget http://archive.ubuntu.com/ubuntu/dists/utopic/main/installer-i386/current/images/netboot/netboot.tar.gz + +---------- + + ------------------ On 64-Bit ------------------ + + # cd + # http://archive.ubuntu.com/ubuntu/dists/utopic/main/installer-amd64/current/images/netboot/netboot.tar.gz + +#### On Ubuntu 14.04 #### + + ------------------ On 32-Bit ------------------ + + # cd + # wget http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-i386/current/images/netboot/netboot.tar.gz + +---------- + + ------------------ On 64-Bit ------------------ + + # cd + # wget http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot/netboot.tar.gz + +For other processor architectures visit Ubuntu 14.10 and Ubuntu 14.04 Netboot Official pages at following locations and select your architecture type and download the required files. + +- [http://cdimage.ubuntu.com/netboot/14.10/][4] +- [http://cdimage.ubuntu.com/netboot/14.04/][5] + +**2.** After you have downloaded the **ISO Images** or **Netboot Installer** archives copy the entire **ubuntu-installer** folder to PXE tftp server location by issuing the following commands depending on the method you have chosen. + +**A).** For both CD ISO Images (**32-bit** or **64-bit**) use the following command after you mounted the specific architecture CD onto PXE Server **/mnt** system path. + + # cp -fr /mnt/install/netboot/ubuntu-installer/ /var/lib/tftpboot/ + +**B).** For Netboot archives run the following commands depending on the specific Ubuntu architecture. + + # cd + # tar xfz netboot.tar.gz + # cp -rf ubuntu-installer/ /var/lib/tftpboot/ + +If you want to use both Ubuntu Server architectures on PXE Server, first download, mount or extract, depending on the case, the 32-bit architecture and copy **ubuntu-installer** directory to **/var/lib/tftpboot**, then unmount the CD or delete the Netboot archive and the extracted files and folders, and, repeat the same steps with 64-bit architecture, so that the final **tftp** path should have the following structure. + + /var/lib/tftpboot/ubuntu-installer/amd64 + /var/lib/tftpboot/ubuntu-installer/i386 + +**3.** On the next step add the **Ubuntu 14.10** and **Ubuntu 14.04** Menu labels to **PXE Server** default configuration file by issuing the following command. + +**Important**: It’s not possible for me to show the instructions for both Ubuntu versions, that’s the reason for demonstration purpose, I’m adding **Ubuntu 14.04** Menu lable to PXE Server, but the same following instructions also applied to Ubuntu 14.10, only with minor changes to version numbers, just change the version numbers and path to OS architecture according to your Ubuntu distributions. + +Open PXE default configuration file with the help of your favourite text editor, in my case it’s nano editor. + + # nano /var/lib/tftpboot/pxelinux.cfg/default + +Next, add the following configurations to PXE Menu. + +#### For Ubuntu 14.04 32-bit #### + + label 1 + menu label ^1) Install Ubuntu 14.04 x32 + kernel ubuntu-installer/i386/linux + append vga=788 initrd=ubuntu-installer/i386/initrd.gz -- quiet + + label 2 + menu label ^2) Ubuntu 14.04 Rescue Mode x32 + kernel ubuntu-installer/i386/linux + append vga=788 initrd=ubuntu-installer/i386/initrd.gz rescue/enable=true -- quiet + +#### For Ubuntu 14.04 64-bit #### + + label 5 + menu label ^5) Install Ubuntu 14.04 x64 + kernel ubuntu-installer/amd64/linux + append vga=788 initrd=ubuntu-installer/amd64/initrd.gz -- quiet + + label 5 + menu label ^6) Ubuntu 14.04 Rescue Mode + kernel ubuntu-installer/amd64/linux + append vga=788 initrd=ubuntu-installer/amd64/initrd.gz rescue/enable=true -- quiet + +![Add Ubuntu to PXE Boot](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Ubuntu-to-PXE-Boot.jpg) + +Add Ubuntu to PXE Boot + +**Note**: If you want to include other Ubuntu architectures, follow the same above instructions and replace label numbers and **ubuntu-installer/$architecture_name/** directory accordingly on PXE default menu configuration file. + +**4.** After you have configured PXE menu configuration file, clean up the sources depending on the employed method and proceed with client PXE installations to test your configuration. + + ---------------------- For CD/DVD Method ---------------------- + + # umount /mnt + +---------- + + ---------------------- For Netboot Method ---------------------- + + # cd && rm -rf ubuntu-installer/netboot.tar.gz pxelinux.* version.info + +Below are some screenshots for **Ubuntu 14.04** PXE Clients installations testing. + +![Select Ubuntu from PXE Menu](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-from-PXE-Menu.jpg) + +Select Ubuntu from PXE Menu + +![Choose Ubuntu Installation Language](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-Installation-Language.jpg) + +Choose Ubuntu Installation Language + +![Choose Ubuntu Rescue Mode](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-Rescue-Mode.jpg) + +Choose Ubuntu Rescue Mode + +![Ubuntu Rescue Mode Shell](http://www.tecmint.com/wp-content/uploads/2014/11/Ubuntu-Rescue-Mode-Shell.jpg) + +Ubuntu Rescue Mode Shell + +## Step 2: Add Debian 7 Wheezy to PXE Menu ## + +**5.** Adding **Debian 7** to a PXE Server, requires the same steps as for Ubuntu Server Edition as explained above, the only differences being the Netboot archive images download links and the name for the sources directory, which is now **debian-installer**. + +To download **Debian Wheezy** Netboot archives, go to official [Debian Netinstall Download][6] page, choose your desired system architecture from **Network Boot** menu, then hit the **netboot** link from **Directory** list and download the **netboot.tar.gz** archive from **Filename** list. + +While Debian offers Netboot Installation Sources for a multitude of system architectures, such as Armel, ia64, Mips, PowerPC, Sparc etc, in this guide I will only discuss **64-bit** architecture because the process of adding other architectures sources is almost the same as the current one, the only difference being the **debian-installer/$directory_architecture name**. + +So, to proceed further, login to your **PXE Server** with root account and grab Debian 7 64-bit Netboot archive by issuing the below command. + + # wget http://ftp.nl.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/netboot.tar.gz + +![Download Debain 7 Netboot](http://www.tecmint.com/wp-content/uploads/2014/11/Download-Debain-7-Netboot.jpg) + +Download Debain 7 Netboot + +**6.** After **wget** finishes downloading the **netboot.tar.gz** file, extract it and copy **debian-installer** directory to tftp server default path by +running the following commands. + + # tar xfz netboot.tar.gz + # cp -rf debian-installer/ /var/lib/tftpboot/ + +![Extract Debain 7 Netboot](http://www.tecmint.com/wp-content/uploads/2014/11/Extract-Debain-7-Netboot.jpg) + +Extract Debain 7 Netboot + +![Copy Debain 7 Netboot to FTP](http://www.tecmint.com/wp-content/uploads/2014/11/Copy-Debain-7-Netboot-to-FTP.jpg) + +Copy Debain 7 Netboot to FTP + +**7.** To add **Debian Wheezy** labels to **PXE Menu**, open PXE Server default configuration file with your favorite text editor and add the below labels. + + # nano /var/lib/tftpboot/pxelinux.cfg/default + +PXE Label Menu for Debian Wheezy 64-bit. + + label 7 + menu label ^7) Install Debian 7 x64 + kernel debian-installer/amd64/linux + append vga=788 initrd=debian-installer/amd64/initrd.gz -- quiet + + label 8 + menu label ^8) Install Debian 7 x64 Automated + kernel debian-installer/amd64/linux + append auto=true priority=critical vga=788 initrd=debian-installer/amd64/initrd.gz -- quiet + +![Add Debian to PXE Boot](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Debian-to-PXE-Boot.jpg) + +Add Debian to PXE Boot + +**Note**: If you want to add other Debian architectures repeat the above steps and replace label numbers and **debian-installer/$architecture_name/** directory accordingly on PXE default menu configuration file. + +**8.** Before testing the configuration on clients side, clean up Debian sources by issuing the following command. + + # cd && rm -rf debian-installer/ netboot.tar.gz pxelinux.* version.info + +**9.** Then network boot a client machine, choose Install Debian from PXE menu and proceed further with the installation as normally. + +![Select Install Debian from PXE](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Install-Debian-from-PXE.jpg) + +Select Install Debian from PXE + +![Select Debian Install Language](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Debian-Install-Language.jpg) + +Select Debian Install Language + +That’s all the steps required to add and install **Ubuntu** or **Debian** from a RHEL/CentOS 7 PXE Server onto your network client machines. On my next article I will discuss a more complicated method on how you can add and perform network installation for **Windows 7** on client computers using RHEL/CentOS 7 PXE Network Boot Server. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/add-ubuntu-to-pxe-network-boot/ + +作者:[Matei Cezar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/cezarmatei/ +[1]:http://www.tecmint.com/install-pxe-network-boot-server-in-centos-7/ +[2]:http://releases.ubuntu.com/14.10/ +[3]:http://releases.ubuntu.com/14.04/ +[4]:http://cdimage.ubuntu.com/netboot/14.10/ +[5]:http://cdimage.ubuntu.com/netboot/14.04/ +[6]:https://www.debian.org/distrib/netinst \ No newline at end of file From d5865e6c8b8739a7f0430e2cac9708cdc8d779bc Mon Sep 17 00:00:00 2001 From: su-kaiyao <1250471161@qq.com> Date: Sun, 9 Nov 2014 15:00:13 +0800 Subject: [PATCH 156/316] su-kaiyao translated --- ...l Linux System Time and Date in Systemd.md | 73 ------------------- ...l Linux System Time and Date in Systemd.md | 72 ++++++++++++++++++ 2 files changed, 72 insertions(+), 73 deletions(-) delete mode 100644 sources/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md create mode 100644 translated/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md diff --git a/sources/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md b/sources/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md deleted file mode 100644 index 783516cbd8..0000000000 --- a/sources/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md +++ /dev/null @@ -1,73 +0,0 @@ -[su-kaiyao] translating - -timedatectl - Control Linux System Time and Date in Systemd -================================================================================ -**timedatectl** is a Linux utility that may be used to query and change the system clock and it's settings. It is distributed as part of the [systemd system and service manager][1] and allows you to review and change the configuration of the system clock. - -In this article we will cover all aspects of using this small but important utility - -### Current status of the time on the system ### - -To have a look at the current date/time on the system, as well as the current time settings on the system you can use the command without any arguments like this: - - # timedatectl - -And the output should look something like this: - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/timedatectl.jpg) - -### Changing the date ### - -To change the system date you simply have to type timedatectl set-time followed by the date in the format YYYY-MM-DD where YYYY stands for the year, MM for the month in 2 digit and DD for the day in 2 digit. For example if you wish to change the date to 4th of February 2015 you should use the following command: - - # timedatectl 2015-02-04 - -### Changing the time ### - -To change the time you will use the tool in a similar fashion, you will still use timedatectl set-time but use the format HH:MM:SS where HH stands for hour in 24-hour format, MM for minutes and SS for seconds. To set the current time to 22:04:43 use the following command: - - # timedatectl 22:04:43 - -### Changing the timezone ### - -Setting the correct timezone is crucial for time keeping specially if you synchronize it with the NTP protocol. First you you should list the available timezones in your region with the list-timezones option, you can also use grep and more to make the format easier to read like this: - - # timedatectl list-timezones | grep America | more - -This will display the list an easy to scroll format. - -After you know how the timezone you wish to set is named you can change it with the following command: - - # timedatectl set-timezone America/Los_Angeles - -### Setup the local-rtc ### - -The **real-time clock (RTC)**, commonly referred to as a hardware clock is completely independent of the current state of the operating system and runs even when the computer is shut down. You can configure the system to maintain the RTC in universal time or in local time. Note that maintaining the RTC in the local timezone is not fully supported and will create various problems with time zone changes and daylight saving adjustments. If at all possible, keep the RTC in UTC mode. The only issue with this may be that other operating systems may not fully support it (in case you run 2 operating systems on the same machine). - -To have the RTC set to UTC use the following setting: - - # timedatectl set-local-rtc 0 - -To have it set in local time, use this: - - # timedatectl set-local-rtc 1 - -### Setup NTP synchronization ### - -**Network Time Protocol (NTP)** is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks. NTP is intended to synchronize all participating computers to within [a few milliseconds of Coordinated Universal Time (UTC)][2]. If you wish to set NTP synchronization you can use the set-ntp option to have this setup. Use “no” to disable NTP synchronization and use “yes” to have it enabled. - - # timedatectl set-ntp yes - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-command/timedatectl-change-time-date-systemd/ - -作者:[Adrian Dinu][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/adriand/ -[1]:http://www.freedesktop.org/wiki/Software/systemd/ -[2]:https://en.wikipedia.org/wiki/Coordinated_Universal_Time diff --git a/translated/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md b/translated/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md new file mode 100644 index 0000000000..4bed25a2b5 --- /dev/null +++ b/translated/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md @@ -0,0 +1,72 @@ +timedatectl - 管理Linux系统的时间和日期 +=== + +**timedatectl**是用来查询和修改系统时间和配置的Linux应用程序。它是[系统服务管理][1]的一部分,并且允许你检查和修改系统时钟的配置。 + +在这篇文章中,我们将涉及该小巧但十分重要应用程序的所有方面 + +### 系统当前的时间状态 ### + +想要查看系统当前日期/时间,以及可使用不带任何参数的命令查看当前系统时间配置,可以这样: + + # timedatectl + +输入的结果就像这样: + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/timedatectl.jpg) + +### 修改日期 ### + +想要修改系统日期,你可以简单地使用timedatectl设置时间命令,紧随命令的是YYYY-MM-DD格式的日期,YYYY代表年,MM代表2位数字的月份,DD代表2位数字的天。举个例子,如果你想把日期改为2015年2月4号,你应该使用下面的命令: + + # timedatectl 2015-02-04 + +### 修改时间 ### + +想要修改时间,你可以以相同的方式使用该工具,但是使用的格式为HH:MM:SS,HH代表24小时制的时钟,MM代表分钟,SS代表秒钟。想将当前时间设为22:04:43,使用下面的命令: + + # timedatectl 22:04:43 + +### 修改时区 ### + +设置正确的时区是保持时间同步的关键,特别是在你使用NTP协议同步的时候。首先,你应该使用list-timezones选项列出你所在区域的可用时区,你也可以使用grep和more来让格式方便阅读: + + # timedatectl list-timezones | grep America | more + +这将显示一个简单的滚动列表格式。 + +之后,你就会知道你想设置的时区是如何命名的,然后使用下面的命令修改它: + + # timedatectl set-timezone America/Los_Angeles + +### 设置本地时钟 ### + +**实时时钟(RTC)**,通常被称为硬件时钟,完全独立于操作系统当前状态,甚至可以在计算机关闭的时候工作。你可以配置系统使用国际时间或当地时间维持RTC。注意,使用当地时区维持RTC并不完美支持,而且还有可能因为时区变化和夏令时调整引起许多问题。如果有可能,在UTC模式下保持RTC。这一做法的唯一问题是,其他操作系统可能不完全支持它(如果你在同一台机器上允许2个操作系统)。 + +使用UTC模式维持RTC,使用下面的命令: + + # timedatectl set-local-rtc 0 + +使用当地时间维护,使用: + + # timedatectl set-local-rtc 1 + +### 设置NTP同步 ### + +**网络时间协议(NTP)**是在分组交换计算机系统间进行时钟同步的,可变数据延迟的网络协议。NTP被设计使用[几毫秒的协调通用时间][2]来同步所有参与的计算机。如果你希望设置NTP同步,你可以使用set-ntp选项设置。使用“no”关闭NTP同步,使用“yes”开启。 + + # timedatectl set-ntp yes + +--- + +via: http://linoxide.com/linux-command/timedatectl-change-time-date-systemd/ + +作者:[Adrian Dinu][a] +译者:[su-kaiyao](https://github.com/su-kaiyao) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/adriand/ +[1]:http://www.freedesktop.org/wiki/Software/systemd/ +[2]:https://en.wikipedia.org/wiki/Coordinated_Universal_Time From 2de5d496ca4178a493731f32ae4811415ece4b82 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Sun, 9 Nov 2014 19:34:47 +0800 Subject: [PATCH 157/316] translated --- ...ow Services Through Firewall In openSUSE.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/sources/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md b/sources/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md index 360de0c7ba..f184bc7566 100644 --- a/sources/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md +++ b/sources/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md @@ -1,31 +1,29 @@ -Vic020 - -[Quick Tip] Allow Services Through Firewall In openSUSE +[小贴士] openSUSE设置服务服务通过防火墙 ================================================================================ ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/openSUSE.png) -As you may know, not all services are enabled and allowed by default in openSUSE/SUSE systems. For example, **ssh** service is not allowed through firewall on openSUSE systems. Of course, it’s a safety precaution, but sometimes we must need ssh service to access the system from a remote location. +正如你所知道的,在openSUSE/SUSE系统上,不是所有的服务是激活并且默认允许的。例如,**ssh**服务是默认不允许通过防火墙的。当然,这是一个安全措施,但是有时我们必须需要ssh服务从远程地点来连接服务器。 -This quick tutorial will show how to allow services, not only ssh, but all other services such as http, ftp etc., through firewall. We can allow the services from **YaST**, which is the default installation and configuration tool for openSUSE, and SUSE enterprise. +这个小教程将会展示如何允许服务,不单是ssh,也包括所有其他的服务,如http,ftp等,通过服务器。我们可以使用**YaST**命令允许服务通过防火墙,**YaST**命令是openSUSE和其企业版,默认安装配置工具。 -First, open YaST Control Center from menu. Go to **Security and Users -> Firewall**. +首先,在菜单中打开YaST控制中心。选择**Security and Users(安全和用户) -> Firewall(防火墙)** ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/openSUSE-13.1-Running-Oracle-VM-VirtualBox_001.png) -Go to **Allowed Services** tab. Select **Secure Shell Service** from the Service to Allow drop-down box, and finally click **Add**, **Next** and **Finish** buttons to allow the service. +接下来,打开**Allowed Services(已允许服务)**选项卡;从Service to Allow(选择需要允许的服务)下拉框中选择**Secure Shell Service(ssh服务)**,然后 **Add(增加)**,**Next(下一步)**,最后**Finish(完成)**,搞定。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/openSUSE-13.1-Running-Oracle-VM-VirtualBox_002.png) -That’s it. The ssh service has been allowed now, so you can access the system from a remote system. Like this way, we can also other required services. +就是如此简单!ssh服务已经允许通过防火墙,这样你就可以在远程系统连接这个系统了。就像这样,我们可以同样设置其他服务。 -Cheers!! +鼓掌!! -------------------------------------------------------------------------------- via: http://www.unixmen.com/quick-tip-allow-services-firewall-opensuse/ 作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) +译者:[VicYu/Vic020](http://www.vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From c0dbac2780fb7f4f80fafd8acd4bc0e64e70bba3 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Sun, 9 Nov 2014 19:36:28 +0800 Subject: [PATCH 158/316] moved --- ...41106 Quick Tip Allow Services Through Firewall In openSUSE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md (100%) diff --git a/sources/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md b/translated/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md similarity index 100% rename from sources/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md rename to translated/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md From 826e489951165e738f2474e9e353da056b3c2abe Mon Sep 17 00:00:00 2001 From: ggaaooppeenngg <471160171@qq.com> Date: Sun, 9 Nov 2014 21:34:24 +0800 Subject: [PATCH 159/316] translating --- ...ur Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md b/sources/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md index 85ca3b9390..d3850ac4ea 100644 --- a/sources/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md +++ b/sources/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md @@ -1,3 +1,4 @@ +ggaaooppeenngg translating How to Record Your Desktop Video and Audio Using “Avconv” Tool in Ubuntu ================================================================================ **Libav** is a set of cross-platform libraries and tools that are used to deal with multimedia files, streams and protocols, it was originally forked from the ffmpeg project. Libav includes many sub-tools like: @@ -127,4 +128,4 @@ via: http://www.tecmint.com/record-ubuntu-desktop-screen-using-avconv/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/hannyhelal/ -[1]:https://libav.org/avconv.html \ No newline at end of file +[1]:https://libav.org/avconv.html From 1b003f41152d13626e3daf23ddfd5ab18c58da7e Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 9 Nov 2014 23:59:23 +0800 Subject: [PATCH 160/316] PUB:20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL @geekpi --- ... install REMI repository on CentOS or RHEL.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md (63%) diff --git a/translated/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md b/published/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md similarity index 63% rename from translated/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md rename to published/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md index 66ed92b64d..f3004b32dd 100644 --- a/translated/tech/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md +++ b/published/20141029 Linux FAQs with Answers--How to install REMI repository on CentOS or RHEL.md @@ -1,14 +1,14 @@ -Linux 有问必答 -- 如何在CentOS或者RHEL上安装REMI仓库 +Linux 有问必答:如何在CentOS或者RHEL上安装REMI仓库 ================================================================================ -> **Question**:我该如何在CentOS或者RHEL中配置REMI仓库,并在其中安装包? +> **Question**:我该如何在CentOS或者RHEL中配置REMI仓库,并安装其中的包? -[REMI 仓库][1] 提供了核心CentOS和RHEL包的更新版本,尤其是最新的PHP/MySQL系列。 +[REMI 仓库][1]提供了CentOS和RHEL的核心包的更新版本,尤其是最新的PHP/MySQL系列(LCTT 译注:当你需要一个更新包,而 CentOS/RHEL 没有及时提供更新时, REMI 仓库可以帮助你)。 -安装REMI仓库要记住的一件事是不要在REMI仓库中运行yum update。因为REMI仓库的包名RHEL/CentOS中的相同,运行yum update可能会触发意外的更新。一个好办法是禁用REMI仓库,在你需要安装RMEI仓库中独有的包时再启用。 +安装REMI仓库要记住的一件事是不要在启用了REMI仓库时运行yum update。因为REMI仓库的包名与RHEL/CentOS中的相同,运行yum update可能会触发意外的更新。一个好办法是禁用REMI仓库,在你需要安装RMEI仓库中独有的包时再启用。 ### 预备工作 ### -安装REMI仓库之前,你首先需要启用EPEL仓库,因为REMI中的一些包依赖与EPEL。按照[这份指南][2]在CentOS或者RHEL中设置EPEL仓库。 +安装REMI仓库之前,你首先需要启用EPEL仓库,因为REMI中的一些包依赖于EPEL。按照[这份指南][2]在CentOS或者RHEL中设置EPEL仓库。 ### 安装REMI仓库 ### @@ -24,7 +24,7 @@ Linux 有问必答 -- 如何在CentOS或者RHEL上安装REMI仓库 $ sudo rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi $ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm -默认上,REMI是禁用的。要检查REMI是否已经成功安装,使用这个命令。你会看到几个REMI仓库,比如remi、remi-php55和remi-php56。 +默认地,REMI是禁用的。要检查REMI是否已经成功安装,使用这个命令。你会看到几个REMI仓库,比如remi、remi-php55和remi-php56。 $ yum repolist disabled | grep remi @@ -32,7 +32,7 @@ Linux 有问必答 -- 如何在CentOS或者RHEL上安装REMI仓库 ### 从REMI仓库中安装一个包 ### -如上所述,最好保持禁用REMI仓库,只有在需要的时候再启用。 +如上所述,最好保持禁用REMI仓库,**只有在需要的时候再启用**。 要搜索或安装REMI仓库中的包,使用这些命令: @@ -44,7 +44,7 @@ Linux 有问必答 -- 如何在CentOS或者RHEL上安装REMI仓库 via: http://ask.xmodulo.com/install-remi-repository-centos-rhel.html 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From c4ce75be9615b007416ec26aac348373e05a098e Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 10 Nov 2014 00:30:32 +0800 Subject: [PATCH 161/316] PUB:20141024 SUSE Linux--Zypper Command Examples @geekpi --- ...024 SUSE Linux--Zypper Command Examples.md | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) rename {translated/tech => published}/20141024 SUSE Linux--Zypper Command Examples.md (76%) diff --git a/translated/tech/20141024 SUSE Linux--Zypper Command Examples.md b/published/20141024 SUSE Linux--Zypper Command Examples.md similarity index 76% rename from translated/tech/20141024 SUSE Linux--Zypper Command Examples.md rename to published/20141024 SUSE Linux--Zypper Command Examples.md index 3fba3b6843..f43cb82eef 100644 --- a/translated/tech/20141024 SUSE Linux--Zypper Command Examples.md +++ b/published/20141024 SUSE Linux--Zypper Command Examples.md @@ -1,20 +1,20 @@ SUSE Linux – Zypper 命令示例 ================================================================================ -Zypper是SUSE Linux中的命令行接口,可以用于安装,升级,卸载,管理仓库、执行不同的请求等等。本篇将会讨论zypper的几个不同命令的例子。 +Zypper是SuSE Linux中用于安装,升级,卸载,管理仓库、进行各种包查询的命令行接口。本篇将会讨论zypper的几个不同命令的例子。 语法: # zypper [--global-opts] [--command-opts] [command-arguments] -中括号中的部分可以不需要。执行zypper最简单的方法是 后输入他的名字。 +中括号中的部分可以不需要。执行zypper最简单的方法是输入 zypper 及 。 -### 例子:1 列出可用的全局选项和命令 ### +### 例子1:列出可用的全局选项和命令 ### 打开终端,输入zypper并按回车,它会显示所有可用的全局选项和命令。 linux-xa3t:~ # zypper -### 例子:2 获得zypper的某个帮助 ### +### 例子2:获得zypper的某个命令的帮助 ### 语法: zypper help [command] @@ -38,23 +38,23 @@ Zypper是SUSE Linux中的命令行接口,可以用于安装,升级,卸载 -U, --no-clean-deps No automatic removal of unneeded dependencies. -D, --dry-run Test the removal, do not actually remove. -### 例子:3 打开zypper shell或者会话 ### +### 例子3:打开zypper shell/会话 ### linux-xa3t:~ # zypper sh zypper> - or +或 linux-xa3t:~ # zypper shell zypper> -### 例子:4 列出已定义的仓库 ### +### 例子4:列出已定义的仓库 ### linux-xa3t:~ # zypper repos ![](http://www.linuxtechi.com/wp-content/uploads/2014/10/zypper-repos.png) -or +或 linux-xa3t:~ # zypper lr @@ -68,7 +68,7 @@ or ![](http://www.linuxtechi.com/wp-content/uploads/2014/10/zypper-repos-priority.png) -### 例子:5 刷新仓库 ### +### 例子5:刷新仓库 ### linux-xa3t:~ # zypper ref Repository 'openSUSE-13.1-Non-Oss' is up to date. @@ -77,18 +77,18 @@ or Repository 'openSUSE-13.1-Update-Non-Oss' is up to date. All repositories have been refreshed. -### 例子:6 修改zypper仓库 ### +### 例子6:修改zypper仓库 ### zypper仓库可以通过别名、数字或者URI或者通过‘–all、 –remote、 –local、 –medium-type’这些选项修改。 -linux-xa3t:~ # zypper mr -d 6 #禁用6号仓库 -linux-xa3t:~ # zypper mr -rk -p 70 upd #启用自动书信并为‘upd’仓库设置rpm文件‘缓存’,且设置它的优先级为70 +linux-xa3t:~ # zypper mr -d 6 #禁用6号仓库 +linux-xa3t:~ # zypper mr -rk -p 70 upd #启用自动书信并为‘upd’仓库设置rpm文件‘缓存’,且设置它的优先级为70 linux-xa3t:~ # zypper mr -Ka #为所有的仓库禁用rpm文件缓存 linux-xa3t:~ # zypper mr -kt #为远程仓库设置rpm文件缓存 -### 例子:7 添加仓库 ### +### 例子7:添加仓库 ### -语法: zypper addrepo 或者 zypper ar +语法: zypper addrepo 或者 zypper ar <仓库的URL或者别名> linux-xa3t:~ # zypper ar http://download.opensuse.org/update/13.1/ update Adding repository 'update' .............................................[done] @@ -98,7 +98,7 @@ linux-xa3t:~ # zypper mr -kt #为远程仓库设置rpm文件缓存 GPG check: Yes URI: http://download.opensuse.org/update/13.1/ -### 例子:8 移除仓库 ### +### 例子8:移除仓库 ### 语法: zypper removerepo <仓库名> <别名> @@ -110,42 +110,42 @@ zypper rr <仓库名> <别名> Removing repository 'openSUSE-13.1-1.10' ............................[done] Repository 'openSUSE-13.1-1.10' has been removed. -### 例子:9 安装包 ### +### 例子9:安装软件包 ### 语法: zypper install <包名> 或者 zypper in <包名> linux-xa3t:~ # zypper install vlc -### 例子:10 卸载包 ### +### 例子10:卸载软件包 ### -语法: zypper remove <包名> OR zypper rm <包名> +语法: zypper remove <包名> 或者 zypper rm <包名> linux-xa3t:~ # zypper remove sqlite -### 例子:11 导出和导入仓库 ### +### 例子11:导出和导入仓库 ### -导出仓库语法 : zypper repos –export 或者 zypper lr -e +导出仓库的语法 : zypper repos –export 或者 zypper lr -e linux-xa3t:~ # zypper lr --export repo-backup/back.repo Repositories have been successfully exported to repo-backup/back.repo. -导入仓库语法 : +导入仓库的语法 : linux-xa3t:~ # zypper ar repo-backup/back.repo -### 例子:12 Updating a package ### +### 例子12:更新一个软件包 ### 语法: zypper update <包名> 或者 zypper up <包名> linux-xa3t:~ # zypper update bash -### 例子:13 安装源码包 ### +### 例子13:安装源码包 ### -语法: zypper source-install <源码包> OR zypper si <源码包> +语法: zypper source-install <源码包> 或 zypper si <源码包> linux-xa3t:~ # zypper source-install zypper -### 例子:只安装以来 ### +### 例子14:只安装依赖包 ### 例子13中的命令会安装和构建特定包的依赖。如果你想要安装源码包就用-D选项 @@ -161,7 +161,7 @@ via: http://www.linuxtechi.com/suse-linux-zypper-command-examples/ 作者:[Pradeep Kumar][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2bda6c95336a9af0a53ba1624db4945dddcc98fe Mon Sep 17 00:00:00 2001 From: ggaaooppeenngg <471160171@qq.com> Date: Mon, 10 Nov 2014 09:27:07 +0800 Subject: [PATCH 162/316] translated --- ...and Audio Using 'Avconv' Tool in Ubuntu.md | 131 ------------------ ...and Audio Using 'Avconv' Tool in Ubuntu.md | 129 +++++++++++++++++ 2 files changed, 129 insertions(+), 131 deletions(-) delete mode 100644 sources/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md create mode 100644 translated/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md diff --git a/sources/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md b/sources/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md deleted file mode 100644 index d3850ac4ea..0000000000 --- a/sources/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md +++ /dev/null @@ -1,131 +0,0 @@ -ggaaooppeenngg translating -How to Record Your Desktop Video and Audio Using “Avconv” Tool in Ubuntu -================================================================================ -**Libav** is a set of cross-platform libraries and tools that are used to deal with multimedia files, streams and protocols, it was originally forked from the ffmpeg project. Libav includes many sub-tools like: - -- **Avplay**: a video & audio player. -- **Avconv**: a multimedia converter plus a video & audio recorder from different sources. -- **Avprobe**: a tool that connects to the multimedia file stream and returns many useful information and statistics about it. -- **Libavfilter**: a filtering API for different Libav tools. - -In this article, we’ll explain how to record the Linux desktop’s video & audio using the ‘Avconv’ program on **Debian/Ubuntu/Linux Mint** distributions. - -### Step 1: Installing Avconv Tool ### - -**1.** **avconv** is a part from the “**libav-tools**” package, which is available to install from the official repositories for all Debian-based distributions like Ubuntu and Mint, using following commands. - - $ sudo apt-get update - $ sudo apt-get install libav-tools - -![Install Avconv Tool](http://www.tecmint.com/wp-content/uploads/2014/11/Install-avconv-tool.jpeg) - -Install Avconv Tool - -**Note**: Installing packages from default repositories, might give you a little older version of ‘**avconv**‘ tool. Thus, we recommend you to get the latest version from the official git repository, as shown below. - - $ sudo apt-get install yasm - $ git clone git://git.libav.org/libav.git - $ cd libav - $ ./configure - $ make - $ sudo make install - -**Note**: You will have to run “**./configure –help**” in order to list all the available options for the configuration file and install codecs and libraries that you want, you will also need to do a lot of work in order to install the dependencies. - -Also note, if you’re used the compile-from-source way, you’ll always have to use “**sudo avconv**” instead of “**avconv**” to run the tool. - -### Step 2: Start Video Recording of Desktop ### - -**2.** You’re ready now, all what you have to do is to record your desktop video by issuing following command. - - $ avconv -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 $HOME/output.avi - -Now let’s explain the command in short: - -- **avconv -f x11grab** is the default command to capture video from the X server. -- **-r 25** is the frame rate you want, you may change it if you like. -- **-s 1920×1080** is your system’s screen resolution, change it to your current system resolution, it’s very important to do this. -- **-i :0.0** is where we want to set our recording start point, leave it like this. -- **-vcodec libx264** is the video codec that we’re using to record the desktop. -- **-threads 4** is the number of threads, you may change it as well if you like. -- **$HOME/output** is the destination path where you want to save the file. -- **.avi** is the video format, you may change it to “flv”, “mp4″, “wmv”, “mov”, “mkv”. - -**3.** After you enter the command, the recording will start automatically as a process running from the terminal, in order to stop it, hit “Ctrl + C” keys inside the terminal window. - -![Record Desktop Screen](http://www.tecmint.com/wp-content/uploads/2014/11/Record-Desktop-Screen.jpeg) - -Record Desktop Screen - -**4.** Now, you may run the file using VLC or any other multimedia player, or you may run it using “avplay” tool which is a multimedia player from the same Libav package. - - $ avplay $HOME/output.avi - -**Note:** Don’t forget to replace the destination file path. The recording’s quality is pretty good. - -![Play Recorded Video](http://www.tecmint.com/wp-content/uploads/2014/11/Play-Recorded-Video.jpeg) - -Play Recorded Video - -Here’s a video that I’ve recorded using the “**avconv**” tool. - -注:youtube 地址,发布的时候不行做个链接 - - -### Step 3: Start Video & Audio Recording of Desktop ### - -**5.** If you want to record the audio as well, first run this command to list all the available input sources for the audio. - - $ arecord -l - -It will give you some output like this. - -![Check Audio Input](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Audio-Input.png) - -Check Audio Input - -In my case, I’ve one input source for audio only, and its number is “**1**”, that’s why I am going to use the following command to capture both video & microphone audio. - - $ avconv -f alsa -i hw:1 -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 output-file2.avi - -You see that part which is colored in yellow? It’s the only modification that I did for the command. Now let’s explain the command in short: - -- **-f** alsa is an option to capture the sound from the alsa device. -- **-i** hw:1 is an option to take the audio input source from the “hw:1” device which is the first – and the only – input sound device in my computer. - -**Note**: Don’t forget to replace the “**1**” number with the number of the input device that you want when you list the available audio input sources using the **arecord -l** command. - -To stop the recording, you may hit the “**Ctrl + C**” keys again. - -### Step 4: Start Audio Recording of Desktop ### - -**6.** If you want to record the audio only, you may use the following command. - - $ avconv -f alsa -i hw:1 out.wav - -**7.** You may replace **.mp3** with any supported audio format by Libav, you can now play the **out.wav** using any mutlimedia player like VLC. - -![Record Desktop Audio](http://www.tecmint.com/wp-content/uploads/2014/11/Record-Desktop-Audio.png) - -Record Desktop Audio - -### Conclusion ### - -“**avconv**” tool can be used to do many other things, not just to record the desktop’s video and audio. For further usage and details about the “avconv” tool, you may visit the official guide at. - -- [https://libav.org/avconv.html][1] - -Have you used the “avconv” tool before to record your desktop? What do you think about it? Is there any other tools that you use to record your desktop? Share them with us in the comments. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/record-ubuntu-desktop-screen-using-avconv/ - -作者:[Hanny Helal][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/hannyhelal/ -[1]:https://libav.org/avconv.html diff --git a/translated/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md b/translated/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md new file mode 100644 index 0000000000..3a584530ff --- /dev/null +++ b/translated/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md @@ -0,0 +1,129 @@ +用"Avconv"工具录制你的桌面视频和音频 +================================================================================ +**Libav**是一款跨平台的工具库,能够用来处理多媒体文件,流和协议,最初是fork自ffmpeg.Libav包含了子工具,比如: + +- **Avplay**: 一款视频音频播放器. +- **Avconv**: 能够记录多个设备输入源的一个多媒体转换器和视频音频录制器. +- **Avprobe**: 一个连接多媒体文件流并且返回关于这个文件流的统计信息的工具. +- **Libavfilter**:一个Libav工具的过滤器(filtering)API. + +接下来,我们就要展示如何通过'Avconv'程序在**Debian/Ubuntu/Linux Mint**发行版上录制Linux桌面视频音频. +### 步奏 1:下载 Avconv 工具 ### + +**1.** **avconv**是 “**libav-tools**” 的一部分, 可以通过官方的基于debian的仓库下载,比如Mint,Ubuntu.输入下面命令即可: + + $ sudo apt-get update + $ sudo apt-get install libav-tools + +![Install Avconv Tool](http://www.tecmint.com/wp-content/uploads/2014/11/Install-avconv-tool.jpeg) + +下载Avconv工具 + +**注意**: 如果从默认仓库下载的话 ‘**avconv**‘ 的版本可能比较老. 因此我们推荐你拉取最新的git官方版本. + + $ sudo apt-get install yasm + $ git clone git://git.libav.org/libav.git + $ cd libav + $ ./configure + $ make + $ sudo make install + +**注意**: 你必须运行 “**./configure –help**” 去列出所有的可选配置选项并且安装相应的解码器和库,你还需要做很多去下载依赖. +同样注意,如果你是从源代码编译的,就需要使用**sudo avconv**而不是**avconv**来运行这个工具. + +### 步奏 2:开启桌面录制 ### + +**2.**你已经准备好了,现在可以通过运行下面的命令录制你的视频了: + + $ avconv -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 $HOME/output.avi + +简单解释一下这个命令: + +- **avconv -f x11grab** 默认从x服务捕捉画面. +- **-r 25** 这是视频的帧率,可以自行设置. +- **-s 1920×1080** 是你的画面分辨率,要设置成你当前画面的分辨率,这一点非常重要. +- **-i :0.0** 记录的起点,设置成这样就可以了. +- **-vcodec libx264** 我们用来录制视频的解码器. +- **-threads 4**线程数, 可以根据情况更改. +- **$HOME/output** 目标文件路径. +- **.avi**视频格式,可以转换成 “flv”, “mp4″, “wmv”, “mov”, “mkv”. + +**3.**在运行命令之后,录像机就会打开,并且在terminal上自动运行,按"Ctrl+C"建来终止. + +![Record Desktop Screen](http://www.tecmint.com/wp-content/uploads/2014/11/Record-Desktop-Screen.jpeg) + +录制桌面视频 + +**4.** 你可能需要使用VLC或者其他的播放器,或者你需要使用"avplay",这是一个Libav包里的播放器. + + $ avplay $HOME/output.avi + +**注意:** 别忘了替换输出文件的路径,录制效果还是很好的. + +![Play Recorded Video](http://www.tecmint.com/wp-content/uploads/2014/11/Play-Recorded-Video.jpeg) + +播放录制的文件 + +这有一段我用 “**avconv**” 录制的视频. + +[视频地址](http://www.youtube.com/embed/g1FEh4wByGE) + + + +### 布奏 3: 开始桌面音频和视频录制 ### + +**5.** 如果想录制音频,先运行这个命令,列出所有的音频输入源: + + $ arecord -l + +如果结果是这样的 + +![Check Audio Input](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Audio-Input.png) + +检查音频输入源 + +在我的例子中,我只有一个音频输入源,所以数量是**1**,这就是为什么我使用下面的命令来捕捉我的视频以及麦克风的音频了. + + $ avconv -f alsa -i hw:1 -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 output-file2.avi + +看黄色的部分:那是我修改了的地方,下面做个简短的解释: +- **-f** alsa 一个从alsa设备捕捉声音的选项. +- **-i** hw:1 是一个从 “hw:1” 设备捕捉画面的选项,这个设备是我电脑上仅有的一个设备. + +**注意**: 别忘了替换 “**1**”,如果你想用**arecord -l**显示的**1**之外的设备的话. + +结束录制, 再来一次“**Ctrl + C**” 就可以. + +### 布奏 4:开始桌面音频的录制 ### + +**6.** 如果只想录制音频的话,使用下面的命令. + + $ avconv -f alsa -i hw:1 out.wav + +**7.** 替换成 **.mp3** Libav支持的格式都可以,播放 **out.wav**就能听到你自己的声音了 + +![Record Desktop Audio](http://www.tecmint.com/wp-content/uploads/2014/11/Record-Desktop-Audio.png) + +录制桌面音频 + +###最后 ### + +“**avconv**” 工具可以用来做很多其他事情,不仅仅是录制桌面视频,更多的教程和文档请移步到官网. + +- [https://libav.org/avconv.html][1] + +你对"avconv"的体验如何,你使用过其他工具录制桌面视频么?在评论里面和我们分享吧. + + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/record-ubuntu-desktop-screen-using-avconv/ + +作者:[Hanny Helal][a] +译者:[ggaaooppeenngg](https://github.com/ggaaooppeenngg) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/hannyhelal/ +[1]:https://libav.org/avconv.html From bee8fed3f8501739fefed6a156fe227ed0aaf69e Mon Sep 17 00:00:00 2001 From: ggaaooppeenngg <471160171@qq.com> Date: Mon, 10 Nov 2014 09:40:49 +0800 Subject: [PATCH 163/316] update --- ...r Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md b/translated/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md index 3a584530ff..ee3d3cedc0 100644 --- a/translated/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md +++ b/translated/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md @@ -70,7 +70,7 @@ -### 布奏 3: 开始桌面音频和视频录制 ### +### 步奏 3: 开始桌面音频和视频录制 ### **5.** 如果想录制音频,先运行这个命令,列出所有的音频输入源: @@ -94,7 +94,7 @@ 结束录制, 再来一次“**Ctrl + C**” 就可以. -### 布奏 4:开始桌面音频的录制 ### +### 步奏 4:开始桌面音频的录制 ### **6.** 如果只想录制音频的话,使用下面的命令. From 3ba409780f2a2fe478c78ff62dc5f689b6c17446 Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Mon, 10 Nov 2014 10:58:02 +0800 Subject: [PATCH 164/316] [translating] 20140818 What are useful CLI tools for Linux system admins.md --- ...20140818 What are useful CLI tools for Linux system admins.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20140818 What are useful CLI tools for Linux system admins.md b/sources/tech/20140818 What are useful CLI tools for Linux system admins.md index 6f0e3f1d0c..9f01704e1f 100644 --- a/sources/tech/20140818 What are useful CLI tools for Linux system admins.md +++ b/sources/tech/20140818 What are useful CLI tools for Linux system admins.md @@ -1,3 +1,4 @@ +zpl1025 What are useful CLI tools for Linux system admins ================================================================================ System administrators (sysadmins) are responsible for day-to-day operations of production systems and services. One of the critical roles of sysadmins is to ensure that operational services are available round the clock. For that, they have to carefully plan backup policies, disaster management strategies, scheduled maintenance, security audits, etc. Like every other discipline, sysadmins have their tools of trade. Utilizing proper tools in the right case at the right time can help maintain the health of operating systems with minimal service interruptions and maximum uptime. From 8d564a1fb0f04090dbc99080d0387794c45c1175 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 10 Nov 2014 17:59:35 +0800 Subject: [PATCH 165/316] Translating by ZTinoZ --- ...lmes Like Disk Full Or Can't Write to the Disk.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md index 3e2286878c..fbc7624bec 100644 --- a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md +++ b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md @@ -6,7 +6,7 @@ ### #1 - 错误: 设备上无剩余空间 ### -当你的类UNIX系统磁盘写满了时你会在屏幕上看到这样的信息。在这种情况下,我运行[fallocate命令][1]然后我的系统就会提示磁盘空间已经耗尽: +当你的类UNIX系统磁盘写满了时你会在屏幕上看到这样的信息。本例中,我运行[fallocate命令][1]然后我的系统就会提示磁盘空间已经耗尽: $ fallocate -l 1G test4.img fallocate: test4.img: fallocate failed: No space left on device @@ -171,7 +171,7 @@ Debian服务器的部分输出内容: ### #7 - 处理Linux中的软阵列 ### -To find the current status of a Linux software raid type the following command: +输入以下命令来查看Linux软阵列的最近状态: ## get detail on /dev/md0 raid ## mdadm --detail /dev/md0 @@ -180,13 +180,13 @@ To find the current status of a Linux software raid type the following command: cat /proc/mdstat watch cat /proc/mdstat -Sample outputs: +部分输出内容: [![](http://s0.cyberciti.org/uploads/cms/2014/10/linux-mdstat-output.jpg)][17] -图 04: Find the status of a Linux software raid command +图 04: 查看Linux软阵列状态命令 -You need to replace a failed hard drive. You must u remove the correct failed drive. In this example, I'm going to replace /dev/sdb (2nd hard drive of RAID 6). It is not necessary to take the storage offline to repair the RAID on Linux. This only works if your server support hot-swappable hard disk: +你需要把有故障的硬件驱动器更换掉,别删错了。本例中,我更换了 /dev/sdb (RAID 6中的第二个硬件驱动器)。没必要依靠离线存储文件来修复Linux上的磁盘阵列,因为这只在你的服务器支持热插拔硬盘的情况下才能工作: ## remove disk from an array md0 ## mdadm --manage /dev/md0 --fail /dev/sdb1 @@ -237,7 +237,7 @@ See our previous tutorials: ### 结论 ### -I hope these tips will help you troubleshoot system disk issue on a Linux/Unix based server. I also recommend implementing a good backup plan in order to have the ability to recover from disk failure, accidental file deletion, file corruption, or complete server destruction: +我希望以上这些小贴士会帮助你改善在基于Linux/Unix服务器上的系统磁盘问题。I also recommend implementing a good backup plan in order to have the ability to recover from disk failure, accidental file deletion, file corruption, or complete server destruction: - [Debian / Ubuntu: Install Duplicity for encrypted backup in cloud][25] - [HowTo: Backup MySQL databases, web server files to a FTP server automatically][26] From a213d5bac89592ea584e6013ec2704631ed1877d Mon Sep 17 00:00:00 2001 From: Vic___ Date: Tue, 11 Nov 2014 01:50:11 +0800 Subject: [PATCH 166/316] Update 20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md --- ...he Latest Ubuntu Images Arrive on Google Cloud Platform.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md b/sources/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md index a3c23ffeaa..b2cf4f8608 100644 --- a/sources/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md +++ b/sources/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md @@ -1,3 +1,5 @@ + Vic020 + The Latest Ubuntu Images Arrive on Google Cloud Platform ================================================================================ ![](http://ostatic.com/files/images/ubuntu_image_5.png) @@ -27,4 +29,4 @@ via: http://ostatic.com/blog/the-latest-ubuntu-images-arrive-on-google-cloud-pla 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://ostatic.com/member/samdean -[1]:https://cloud.google.com/compute/docs/operating-systems \ No newline at end of file +[1]:https://cloud.google.com/compute/docs/operating-systems From 5f7a3a5b84d0b92ae0d3e4ed2e30d55eac7c3cb2 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 11 Nov 2014 12:43:22 +0800 Subject: [PATCH 167/316] =?UTF-8?q?20141111-1=20=E9=80=89=E9=A2=98=20Vito-?= =?UTF-8?q?L=20=E6=8E=A8=E8=8D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ect taking over a Linux distro near you.md | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 sources/talk/20141111 Meet systemd the controversial project taking over a Linux distro near you.md diff --git a/sources/talk/20141111 Meet systemd the controversial project taking over a Linux distro near you.md b/sources/talk/20141111 Meet systemd the controversial project taking over a Linux distro near you.md new file mode 100644 index 0000000000..9e87b1c111 --- /dev/null +++ b/sources/talk/20141111 Meet systemd the controversial project taking over a Linux distro near you.md @@ -0,0 +1,90 @@ +Meet systemd, the controversial project taking over a Linux distro near you +================================================================================ +![](http://core4.staticworld.net/images/article/2014/10/linux-attack-100528169-gallery.jpg) + +Systemd is one of the most controversial projects in Linux-land right now. How controversial? So controversial that Lennart Poettering, one of systemd’s developers, even [claims][1] that horrible people have been pooling [Bitcoins][2] to hire a hitman on him. On a more reasonable level, there’s a [Boycott systemd website][3] that argues for a boycott of this software on various technical merits. + +All this backlash is a reaction to systemd’s success. It has been—or is being—adopted by Linux distributions from Fedora and OpenSuSE to Ubuntu, Debian, and even Arch Linux. GNOME is becoming more dependent on it over time—one of Debian’s stated reasons for [switching back to GNOME][4] was because of its systemd integration. It’s everywhere. + +So what’s all the hub-bub—and the fierce backlash—about? Let’s look a bit closer at this raging battle. + +### Systemd is a new init system ### + +At its core, [systemd][5] is a replacement for the old [SysV init][6] system. The init system is the software that initializes your system. When you boot up, init is responsible for loading the appropriate drivers, activating your network connection, launching various system services, and finally bringing up the graphical login screen where you log in. SysV init is an old system that basically just runs scripts located under **/etc/init.d**. + +> Want to stay up to date on Linux, BSD, Chrome OS, and the rest of the World Beyond Windows? Bookmark the [World Beyond Windows column page][7] or follow [our RSS feed][8]. + +At its core, systemd is a modern replacement for the old and crufty SysV init. It can also launch services in response to events; for example, when you plug in a USB printer, it could launch the printing service in response to the device being plugged in. When it receives a connection on a specific network port, it could launch a network service configured to listen on that port and pass the connection along. + +For more technical information about SysV init vs. systemd, read Jorgen Schäfer’s “[Why systemd?][9]” + +### But systemd is more than that ### + +Even systemd’s detractors largely agree that SysV is old and needs to be replaced. But critics correctly note that systemd is in fact more than that. It’s a large project containing many other bits of functionality. It’s a software suite, not just an init system. + +![An illustration of systemd's structure.](https://cms-images.idgesg.net/images/article/2014/10/systemd-diagram-100528171-orig.png) + +[Wikimedia Commons][10] + +An illustration of systemd's structure. + +The systemd project also contains logind, a daemon that manages user logins, and journald, an event-logging system that controversially writes to binary files and not text ones. Systemd has also absorbed [the udev project][11] and its code, which handles the management of virtual device files in the **/dev/** directory and events when devices are plugged in and unplugged. The list goes on and on: systemd also includes a [cron][12]-style task scheduler and networkd, a daemon for managing network connections. + +More recently, systemd is gaining consoled, a user-mode console daemon that can be used when Linux’s virtual terminal code is stripped out of the kernel itself. The kernel developers seem happy to get this stuff out of the kernel and into user-space , but some people have to be thinking: Does systemd really have to take over this as well? + +### Critics say it’s not Unix-like ### + +Many of the complaints to systemd stem from a feeling that this huge project is increasing in scope and taking over too much of the Linux system. Not surprisingly, the Boycott systemd site starts with this exact complaint: + +> “Systemd flies in the face of the Unix philosophy: ‘do one thing and do it well,’ representing a complex collection of dozens of tightly coupled binaries. Its responsibilities grossly exceed that of an init system, as it goes on to handle power management, device management, mount points, cron, disk encryption, socket API/inetd, syslog, network configuration, login/session management, readahead, GPT partition discovery, container registration, hostname/locale/time management, mDNS/DNS-SD, the Linux console and other things all wrapped into one.” + +Ubuntu’s Mark Shuttleworth originally [called systemd][13] “hugely invasive and hardly justified” when Ubuntu was sticking with their own “upstart” init system. Ubuntu eventually gave up that fight and is switching to systemd. The change will show up [in the Ubuntu Desktop Next images][14] starting in the 15.04 update cycle. + +### So, systemd: good or bad? ### + +Oh boy, here we go. This is the part of the article where I have to wrap everything up with a nice bow and make a pronouncement about which side is right. + +![](https://cms-images.idgesg.net/images/article/2013/09/linux-penguin-100055693-medium.png) + +The original idea of systemd is definitely good. Linux needs a replacement for the old SysV init system and clunky SysV init scripts, and a sleek, modern system daemon that can respond to more types events and manage daemons more intelligently is a great idea. However, it’s true that systemd seems to be growing into a monolithic system layer that lives just above the Linux kernel. + +*But*, although Linux is a community-developed project, it’s not for the peanut gallery—whether it’s a PCWorld columnist or a gaggle of Internet commenters—to decide how it evolves. It’s for the people actually getting their hands dirty with the code and involving themselves in these projects. And, interestingly enough, Linux distributions and the people involved in them seem mostly to be moving toward systemd integration. + +Even Linux creator Linus Torvalds (who [isn’t afraid to say what he thinks][15]) doesn’t seem to mind systemd. As he told [ZDNet][16]: + +> "I don't actually have any particularly strong opinions on systemd itself. I've had issues with some of the core developers that I think are much too cavalier about bugs and compatibility, and I think some of the design details are insane (I dislike the binary logs, for example), but those are details, not big issues." + +If Linus Torvalds doesn’t have any big issues with the design of systemd, perhaps it’s not all bad. If you’d like a calm look at why a Linux distribution might want to go with systemd, [Debian’s systemd discussion document][17] is good reading. + +What do you think of systemd? Sound off in the comments! Just try to keep it civil, folks—swaying opinions on contentious issues takes level-headed talk. + +*This article has been updated to clarify when systemd is appearing in the Ubuntu Desktop Next images. It originally erroneously stated the change already took place. * + +-------------------------------------------------------------------------------- + +via: http://www.pcworld.com/article/2841873/meet-systemd-the-controversial-project-taking-over-a-linux-distro-near-you.html + +作者:[Chris Hoffman][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.pcworld.com/article/2841873/meet-systemd-the-controversial-project-taking-over-a-linux-distro-near-you.html#chrishoffman +[1]:https://plus.google.com/app/basic/stream/z13rdjryqyn1xlt3522sxpugoz3gujbhh04 +[2]:http://www.pcworld.com/article/2033715/7-things-you-need-to-know-about-bitcoin.html +[3]:http://boycottsystemd.org/ +[4]:http://www.pcworld.com/article/2691192/how-gnome-3-14-is-winning-back-disillusioned-linux-users.html +[5]:http://www.freedesktop.org/wiki/Software/systemd/ +[6]:http://en.wikipedia.org/wiki/Init#SysV-style +[7]:http://www.pcworld.com/column/world-beyond-windows/ +[8]:http://www.pcworld.com/blog/world-beyond-windows/index.rss +[9]:http://blog.jorgenschaefer.de/2014/07/why-systemd.html +[10]:http://en.wikipedia.org/wiki/File:Systemd_components.svg +[11]:http://en.wikipedia.org/wiki/Udev +[12]:http://en.wikipedia.org/wiki/Cron +[13]:http://www.markshuttleworth.com/archives/1295 +[14]:http://www.pcworld.com/article/2836984/why-ubuntu-1410-utopic-unicorns-humble-changes-are-the-calm-before-the-storm.html +[15]:http://www.maximumpc.com/article/news/linus_torvalds_tosses_f-bombs_middle_fingers_and_general_disdain_nvidia +[16]:http://www.zdnet.com/linus-torvalds-and-others-on-linuxs-systemd-7000033847/ +[17]:https://wiki.debian.org/Debate/initsystem/systemd \ No newline at end of file From 1da69fb46af9409b5516eb62c0bfbebe85b52bf8 Mon Sep 17 00:00:00 2001 From: joeren Date: Tue, 11 Nov 2014 13:15:54 +0800 Subject: [PATCH 168/316] Update 20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md --- ...o PXE Network Boot Environment Setup on RHEL or CentOS 7.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md b/sources/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md index d38bb22e24..3f74381bb2 100644 --- a/sources/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md +++ b/sources/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL/CentOS 7 ================================================================================ This tutorial will guide you on how to add **Ubuntu 14.10 Server, Ubuntu 14.04 Server** and **Debian 7 Wheezy** distributions to PXE Network Boot Environment Setup on **RHEL/CentOS 7**. @@ -262,4 +263,4 @@ via: http://www.tecmint.com/add-ubuntu-to-pxe-network-boot/ [3]:http://releases.ubuntu.com/14.04/ [4]:http://cdimage.ubuntu.com/netboot/14.10/ [5]:http://cdimage.ubuntu.com/netboot/14.04/ -[6]:https://www.debian.org/distrib/netinst \ No newline at end of file +[6]:https://www.debian.org/distrib/netinst From 227822aad2df299614ccae1f85edaa6333583db3 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Tue, 11 Nov 2014 16:25:23 +0800 Subject: [PATCH 169/316] [Translated] 20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md --- ...t Environment Setup on RHEL or CentOS 7.md | 266 ------------------ ...t Environment Setup on RHEL or CentOS 7.md | 251 +++++++++++++++++ 2 files changed, 251 insertions(+), 266 deletions(-) delete mode 100644 sources/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md create mode 100644 translated/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md diff --git a/sources/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md b/sources/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md deleted file mode 100644 index 3f74381bb2..0000000000 --- a/sources/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md +++ /dev/null @@ -1,266 +0,0 @@ -Translating by GOLinux! -Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL/CentOS 7 -================================================================================ -This tutorial will guide you on how to add **Ubuntu 14.10 Server, Ubuntu 14.04 Server** and **Debian 7 Wheezy** distributions to PXE Network Boot Environment Setup on **RHEL/CentOS 7**. - -![Add Ubuntu and Debian to PXE Network](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Ubuntu-and-Debian-to-PXE.png) - -Add Ubuntu and Debian to PXE Network - -Although for the purposes of this tutorial, I will only demonstrate how you can add **64-bit** Network Installation Images, the same procedure can also be applied for Ubuntu or Debian **32-bit** or other architectures images. Also, the process of adding Ubuntu 32-bit sources will be explained but not configured on my premises. - -Installing **Ubuntu** or **Debian** from a PXE Server requires that your client machines must have an active Internet connection, preferably configured through **NAT** with **DHCP** dynamic addresses allocation, in order for the installer to pull the required packages and finish the installation process. - -#### Requirements #### - -- [Install PXE Network Boot Server for Multiple Linux Distribution Installations in RHEL/CentOS 7][1] - -## Step 1: Add Ubuntu 14.10 and Ubuntu 14.04 Server to PXE Menu ## - -**1.** Adding Network Installation Sources for **Ubuntu 14.10** and **Ubuntu 14.04** to PXE Menu can be achieved in two ways: One is by downloading the Ubuntu CD ISO Image and mount it on PXE Server machine in order to access Ubuntu Netboot files and the other is by directly downloading Ubuntu Netboot archive and extract it onto the system. Further I will discuss both methods: - -### Using Ubuntu 14.10 and Ubuntu 14.04 CD ISO Image ### - -In order to use this method your PXE server needs a functional CD/DVD drive. On an arbitrary computer go to [Ubuntu 14.10 Download][2] and [Ubuntu 14.04 Download][3] page, grab the 64-bit **Server Install Image**, burn it to a CD, place the CD image to PXE Server DVD/CD drive and mount it on your system using the following command. - - # mount /dev/cdrom /mnt - -In case your PXE server machine has no CD/DVD drive you can download **Ubuntu 14.10** and **Ubuntu 14.04** ISO Image locally using **wget** command line and mount it on your server on the same above path by issuing the following commands (download and mount the CD). - -#### On Ubuntu 14.10 #### - - ------------------ On 32-Bit ------------------ - - # wget http://releases.ubuntu.com/14.10/ubuntu-14.10-server-i386.iso - # mount -o loop /path/to/ubuntu-14.10-server-i386.iso /mnt - ----------- - - ------------------ On 64-Bit ------------------ - - # wget http://releases.ubuntu.com/14.10/ubuntu-14.10-server-amd64.iso - # mount -o loop /path/to/ubuntu-14.10-server-amd64.iso /mnt - -#### On Ubuntu 14.04 #### - - ------------------ On 32-Bit ------------------ - - # wget http://releases.ubuntu.com/14.04/ubuntu-14.04.1-server-i386.iso - # mount -o loop /path/to/ubuntu-14.04.1-server-i386.iso /mnt - ----------- - - ------------------ On 64-Bit ------------------ - - # wget http://releases.ubuntu.com/14.04/ubuntu-14.04.1-server-amd64.iso - # mount -o loop /path/to/ubuntu-14.04.1-server-amd64.iso /mnt - -### Using Ubuntu 14.10 and Ubuntu 14.04 Netboot Image ### - -For this approach download Ubuntu Netboot Images onto PXE Server using the following commands. - -#### On Ubuntu 14.04 #### - - ------------------ On 32-Bit ------------------ - - # cd - # wget http://archive.ubuntu.com/ubuntu/dists/utopic/main/installer-i386/current/images/netboot/netboot.tar.gz - ----------- - - ------------------ On 64-Bit ------------------ - - # cd - # http://archive.ubuntu.com/ubuntu/dists/utopic/main/installer-amd64/current/images/netboot/netboot.tar.gz - -#### On Ubuntu 14.04 #### - - ------------------ On 32-Bit ------------------ - - # cd - # wget http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-i386/current/images/netboot/netboot.tar.gz - ----------- - - ------------------ On 64-Bit ------------------ - - # cd - # wget http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot/netboot.tar.gz - -For other processor architectures visit Ubuntu 14.10 and Ubuntu 14.04 Netboot Official pages at following locations and select your architecture type and download the required files. - -- [http://cdimage.ubuntu.com/netboot/14.10/][4] -- [http://cdimage.ubuntu.com/netboot/14.04/][5] - -**2.** After you have downloaded the **ISO Images** or **Netboot Installer** archives copy the entire **ubuntu-installer** folder to PXE tftp server location by issuing the following commands depending on the method you have chosen. - -**A).** For both CD ISO Images (**32-bit** or **64-bit**) use the following command after you mounted the specific architecture CD onto PXE Server **/mnt** system path. - - # cp -fr /mnt/install/netboot/ubuntu-installer/ /var/lib/tftpboot/ - -**B).** For Netboot archives run the following commands depending on the specific Ubuntu architecture. - - # cd - # tar xfz netboot.tar.gz - # cp -rf ubuntu-installer/ /var/lib/tftpboot/ - -If you want to use both Ubuntu Server architectures on PXE Server, first download, mount or extract, depending on the case, the 32-bit architecture and copy **ubuntu-installer** directory to **/var/lib/tftpboot**, then unmount the CD or delete the Netboot archive and the extracted files and folders, and, repeat the same steps with 64-bit architecture, so that the final **tftp** path should have the following structure. - - /var/lib/tftpboot/ubuntu-installer/amd64 - /var/lib/tftpboot/ubuntu-installer/i386 - -**3.** On the next step add the **Ubuntu 14.10** and **Ubuntu 14.04** Menu labels to **PXE Server** default configuration file by issuing the following command. - -**Important**: It’s not possible for me to show the instructions for both Ubuntu versions, that’s the reason for demonstration purpose, I’m adding **Ubuntu 14.04** Menu lable to PXE Server, but the same following instructions also applied to Ubuntu 14.10, only with minor changes to version numbers, just change the version numbers and path to OS architecture according to your Ubuntu distributions. - -Open PXE default configuration file with the help of your favourite text editor, in my case it’s nano editor. - - # nano /var/lib/tftpboot/pxelinux.cfg/default - -Next, add the following configurations to PXE Menu. - -#### For Ubuntu 14.04 32-bit #### - - label 1 - menu label ^1) Install Ubuntu 14.04 x32 - kernel ubuntu-installer/i386/linux - append vga=788 initrd=ubuntu-installer/i386/initrd.gz -- quiet - - label 2 - menu label ^2) Ubuntu 14.04 Rescue Mode x32 - kernel ubuntu-installer/i386/linux - append vga=788 initrd=ubuntu-installer/i386/initrd.gz rescue/enable=true -- quiet - -#### For Ubuntu 14.04 64-bit #### - - label 5 - menu label ^5) Install Ubuntu 14.04 x64 - kernel ubuntu-installer/amd64/linux - append vga=788 initrd=ubuntu-installer/amd64/initrd.gz -- quiet - - label 5 - menu label ^6) Ubuntu 14.04 Rescue Mode - kernel ubuntu-installer/amd64/linux - append vga=788 initrd=ubuntu-installer/amd64/initrd.gz rescue/enable=true -- quiet - -![Add Ubuntu to PXE Boot](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Ubuntu-to-PXE-Boot.jpg) - -Add Ubuntu to PXE Boot - -**Note**: If you want to include other Ubuntu architectures, follow the same above instructions and replace label numbers and **ubuntu-installer/$architecture_name/** directory accordingly on PXE default menu configuration file. - -**4.** After you have configured PXE menu configuration file, clean up the sources depending on the employed method and proceed with client PXE installations to test your configuration. - - ---------------------- For CD/DVD Method ---------------------- - - # umount /mnt - ----------- - - ---------------------- For Netboot Method ---------------------- - - # cd && rm -rf ubuntu-installer/netboot.tar.gz pxelinux.* version.info - -Below are some screenshots for **Ubuntu 14.04** PXE Clients installations testing. - -![Select Ubuntu from PXE Menu](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-from-PXE-Menu.jpg) - -Select Ubuntu from PXE Menu - -![Choose Ubuntu Installation Language](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-Installation-Language.jpg) - -Choose Ubuntu Installation Language - -![Choose Ubuntu Rescue Mode](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-Rescue-Mode.jpg) - -Choose Ubuntu Rescue Mode - -![Ubuntu Rescue Mode Shell](http://www.tecmint.com/wp-content/uploads/2014/11/Ubuntu-Rescue-Mode-Shell.jpg) - -Ubuntu Rescue Mode Shell - -## Step 2: Add Debian 7 Wheezy to PXE Menu ## - -**5.** Adding **Debian 7** to a PXE Server, requires the same steps as for Ubuntu Server Edition as explained above, the only differences being the Netboot archive images download links and the name for the sources directory, which is now **debian-installer**. - -To download **Debian Wheezy** Netboot archives, go to official [Debian Netinstall Download][6] page, choose your desired system architecture from **Network Boot** menu, then hit the **netboot** link from **Directory** list and download the **netboot.tar.gz** archive from **Filename** list. - -While Debian offers Netboot Installation Sources for a multitude of system architectures, such as Armel, ia64, Mips, PowerPC, Sparc etc, in this guide I will only discuss **64-bit** architecture because the process of adding other architectures sources is almost the same as the current one, the only difference being the **debian-installer/$directory_architecture name**. - -So, to proceed further, login to your **PXE Server** with root account and grab Debian 7 64-bit Netboot archive by issuing the below command. - - # wget http://ftp.nl.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/netboot.tar.gz - -![Download Debain 7 Netboot](http://www.tecmint.com/wp-content/uploads/2014/11/Download-Debain-7-Netboot.jpg) - -Download Debain 7 Netboot - -**6.** After **wget** finishes downloading the **netboot.tar.gz** file, extract it and copy **debian-installer** directory to tftp server default path by -running the following commands. - - # tar xfz netboot.tar.gz - # cp -rf debian-installer/ /var/lib/tftpboot/ - -![Extract Debain 7 Netboot](http://www.tecmint.com/wp-content/uploads/2014/11/Extract-Debain-7-Netboot.jpg) - -Extract Debain 7 Netboot - -![Copy Debain 7 Netboot to FTP](http://www.tecmint.com/wp-content/uploads/2014/11/Copy-Debain-7-Netboot-to-FTP.jpg) - -Copy Debain 7 Netboot to FTP - -**7.** To add **Debian Wheezy** labels to **PXE Menu**, open PXE Server default configuration file with your favorite text editor and add the below labels. - - # nano /var/lib/tftpboot/pxelinux.cfg/default - -PXE Label Menu for Debian Wheezy 64-bit. - - label 7 - menu label ^7) Install Debian 7 x64 - kernel debian-installer/amd64/linux - append vga=788 initrd=debian-installer/amd64/initrd.gz -- quiet - - label 8 - menu label ^8) Install Debian 7 x64 Automated - kernel debian-installer/amd64/linux - append auto=true priority=critical vga=788 initrd=debian-installer/amd64/initrd.gz -- quiet - -![Add Debian to PXE Boot](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Debian-to-PXE-Boot.jpg) - -Add Debian to PXE Boot - -**Note**: If you want to add other Debian architectures repeat the above steps and replace label numbers and **debian-installer/$architecture_name/** directory accordingly on PXE default menu configuration file. - -**8.** Before testing the configuration on clients side, clean up Debian sources by issuing the following command. - - # cd && rm -rf debian-installer/ netboot.tar.gz pxelinux.* version.info - -**9.** Then network boot a client machine, choose Install Debian from PXE menu and proceed further with the installation as normally. - -![Select Install Debian from PXE](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Install-Debian-from-PXE.jpg) - -Select Install Debian from PXE - -![Select Debian Install Language](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Debian-Install-Language.jpg) - -Select Debian Install Language - -That’s all the steps required to add and install **Ubuntu** or **Debian** from a RHEL/CentOS 7 PXE Server onto your network client machines. On my next article I will discuss a more complicated method on how you can add and perform network installation for **Windows 7** on client computers using RHEL/CentOS 7 PXE Network Boot Server. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/add-ubuntu-to-pxe-network-boot/ - -作者:[Matei Cezar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/cezarmatei/ -[1]:http://www.tecmint.com/install-pxe-network-boot-server-in-centos-7/ -[2]:http://releases.ubuntu.com/14.10/ -[3]:http://releases.ubuntu.com/14.04/ -[4]:http://cdimage.ubuntu.com/netboot/14.10/ -[5]:http://cdimage.ubuntu.com/netboot/14.04/ -[6]:https://www.debian.org/distrib/netinst diff --git a/translated/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md b/translated/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md new file mode 100644 index 0000000000..c5531d97f3 --- /dev/null +++ b/translated/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md @@ -0,0 +1,251 @@ +添加Ubuntu 14.10,Ubuntu 14.04和Debian 7到RHEL/CentOS 7的PXE网络启动环境 +================================================================================ +本教程将指引你添加**Ubuntu 14.10 Server, Ubuntu 14.04 Server**和**Debian 7 Wheezy**发行版到**RHEL/CentOS 7**的PXE网络启动环境中。 +![Add Ubuntu and Debian to PXE Network](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Ubuntu-and-Debian-to-PXE.png) +添加Ubuntu和Debian到PXE网络 + +虽然对于本教程,我只会演示怎样来添加**64位**网络安装镜像,但对于Ubuntu或者Debian的**32位**系统,或者其它架构的镜像,操作步骤也基本相同。同时,就我而言,我会解释添加Ubuntu 32位源的方法,但不会演示配置。 + +从PXE服务器安装 **Ubuntu**或者**Debian**要求你的客户机必须激活网络连接,最好是使用**DHCP**通过**NAT**来进行动态分配地址。以便安装器拉取需求包并完成安装进程。 + +#### 需求 #### + +- [在RHEL/CentOS 7中为多种Linux发行版安装PXE网络启动服务器][1] + +## 步骤 1: 添加Ubuntu 14.10和Ubuntu 14.04服务器到PXE菜单 ## + +**1.** 为**Ubuntu 14.10**何**Ubuntu 14.04**添加网络安装源到PXE菜单可以通过两种方式实现:其一是通过下载Ubuntu CD ISO镜像并挂载到PXE服务器机器上以便可以读取Ubuntu网络启动文件,其二是通过直接下载Ubuntu网络启动归档包并将其解压缩到系统中。下面,我将进一步讨论这两种方法: + +### 使用Ubuntu 14.10和Ubuntu 14.04 CD ISO镜像 ### + +为了能使用此方法,你的PXE服务器需要有一台可工作的CD/DVD驱动器。在一台专有计算机上,转到[Ubuntu 14.10下载][2]和[Ubuntu 14.04 下载][3]页,抓取64位**服务器安装镜像**,将它烧录到CD,并将CD镜像放到PXE服务器DVD/CD驱动器,然后使用以下命令挂载到系统。 + + # mount /dev/cdrom /mnt + +如果你的PXE服务器没有CD/DVD驱动器,你可以使用**wget**命令下载**Ubuntu 14.10** 和**Ubuntu 14.04**的ISO镜像到本地,然后通过下面的命令(下载并挂载CD)挂载到服务器上上述相同位置。 + +#### 在Ubuntu 14.10上 #### + + ------------------ 32位上 ------------------ + + # wget http://releases.ubuntu.com/14.10/ubuntu-14.10-server-i386.iso + # mount -o loop /path/to/ubuntu-14.10-server-i386.iso /mnt + +---------- + + ------------------ 64位上 ------------------ + + # wget http://releases.ubuntu.com/14.10/ubuntu-14.10-server-amd64.iso + # mount -o loop /path/to/ubuntu-14.10-server-amd64.iso /mnt + +#### 在Ubuntu 14.04上 #### + + ------------------ 32位上 ------------------ + + # wget http://releases.ubuntu.com/14.04/ubuntu-14.04.1-server-i386.iso + # mount -o loop /path/to/ubuntu-14.04.1-server-i386.iso /mnt + +---------- + + ------------------ 64位上 ------------------ + + # wget http://releases.ubuntu.com/14.04/ubuntu-14.04.1-server-amd64.iso + # mount -o loop /path/to/ubuntu-14.04.1-server-amd64.iso /mnt + +### 使用Ubuntu 14.10和Ubuntu 14.04网络启动镜像 ### + +对于该方法,使用以下命令下载Ubuntu网络启动镜像到PXE服务器。 + +#### 在Ubuntu 14.04上 #### + + ------------------ 32位上 ------------------ + + # cd + # wget http://archive.ubuntu.com/ubuntu/dists/utopic/main/installer-i386/current/images/netboot/netboot.tar.gz + +---------- + + ------------------ 64位上 ------------------ + + # cd + # http://archive.ubuntu.com/ubuntu/dists/utopic/main/installer-amd64/current/images/netboot/netboot.tar.gz + +#### 在Ubuntu 14.04上 #### + + ------------------ 32位上 ------------------ + + # cd + # wget http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-i386/current/images/netboot/netboot.tar.gz + +---------- + + ------------------ 64位上 ------------------ + + # cd + # wget http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot/netboot.tar.gz + +对于其它处理器架构,请访问下面的Ubuntu 14.10和Ubuntu 14.04网络启动官方页面,选择你的架构类型并下载需求文件。 + +- [http://cdimage.ubuntu.com/netboot/14.10/][4] +- [http://cdimage.ubuntu.com/netboot/14.04/][5] + +**2.** 在下载完**ISO镜像**或**网络启动安装器**归档包后,通过执行以下命令拷贝整个**ubuntu-installer**文件夹到PXE tftp服务器位置。 + +**A).** 对于两种CD ISO镜像(**32位**或**64位**),在挂载特定架构的CD到PXE服务器**/mnt**系统路径后,请使用以下命令。 + + # cp -fr /mnt/install/netboot/ubuntu-installer/ /var/lib/tftpboot/ + +**B).** 对于网络启动归档,根据特定的Ubuntu架构,请运行以下命令。 + + # cd + # tar xfz netboot.tar.gz + # cp -rf ubuntu-installer/ /var/lib/tftpboot/ + +如果你想要在PXE服务器上同时使用两种Ubuntu服务器架构,先请下载,然后根据不同的情况挂载并解压缩32位并拷贝**ubuntu-installer**目录到**/var/lib/tftpboot**,然后卸载CD或删除网络启动归档以及解压缩的文件和文件夹。对于64位架构,请重复上述步骤,以便让最终的**tftp**路径形成以下结构。 + + /var/lib/tftpboot/ubuntu-installer/amd64 + /var/lib/tftpboot/ubuntu-installer/i386 + +**3.** 在接下来的步骤,通过执行以下命令添加**Ubuntu 14.10**和**Ubuntu 14.04**菜单标签到**PXE服务器**默认配置文件中。 + +**重要**:我不可能同时演示两个Ubuntu版本的操作,出于演示的目的,我添加了**Ubuntu 14.04**菜单标签到PXE服务器,下述同样的操作也可应用到Ubuntu 14.10,只需对版本号稍作修改,仅仅只要根据你的Ubuntu版本修改版本号和到OS架构的路径。 + +在你最喜爱的文本编辑器的帮助下,打开PXE默认配置文件,而我偏好nano编辑器。 + + # nano /var/lib/tftpboot/pxelinux.cfg/default + +接下来,添加以下配置到PXE菜单。 + +#### 对于Ubuntu 14.04 32位 #### + + label 1 + menu label ^1) Install Ubuntu 14.04 x32 + kernel ubuntu-installer/i386/linux + append vga=788 initrd=ubuntu-installer/i386/initrd.gz -- quiet + + label 2 + menu label ^2) Ubuntu 14.04 Rescue Mode x32 + kernel ubuntu-installer/i386/linux + append vga=788 initrd=ubuntu-installer/i386/initrd.gz rescue/enable=true -- quiet + +#### 对于Ubuntu 14.04 64位 #### + + label 5 + menu label ^5) Install Ubuntu 14.04 x64 + kernel ubuntu-installer/amd64/linux + append vga=788 initrd=ubuntu-installer/amd64/initrd.gz -- quiet + + label 5 + menu label ^6) Ubuntu 14.04 Rescue Mode + kernel ubuntu-installer/amd64/linux + append vga=788 initrd=ubuntu-installer/amd64/initrd.gz rescue/enable=true -- quiet + +![Add Ubuntu to PXE Boot](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Ubuntu-to-PXE-Boot.jpg) +添加Ubuntu到PXE启动 + +**注**:如果你想要包含其它Ubuntu架构,请遵循以上相同的操作,并相应替换PXE默认菜单配置文件中的标签号和**ubuntu-installer/$architecture_name/**目录。 + +**4.** 在配置完PXE菜单配置文件后,根据采用的方法清除源文件,并继续进行客户端PXE安装以测试配置是否正确。 + + ---------------------- 对于CD/DVD方法 ---------------------- + + # umount /mnt + +---------- + + ---------------------- 对于网络启动方法 ---------------------- + + # cd && rm -rf ubuntu-installer/netboot.tar.gz pxelinux.* version.info + +下面是**Ubuntu 14.04**PXE客户端安装测试的截图。 + +![Select Ubuntu from PXE Menu](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-from-PXE-Menu.jpg) +从PXE菜单选择Ubuntu + +![Choose Ubuntu Installation Language](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-Installation-Language.jpg) +选择Ubuntu安装语言 + +![Choose Ubuntu Rescue Mode](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-Rescue-Mode.jpg) +选择Ubuntu救援模式 + +![Ubuntu Rescue Mode Shell](http://www.tecmint.com/wp-content/uploads/2014/11/Ubuntu-Rescue-Mode-Shell.jpg) +Ubuntu救援模式Shell + +## 步骤 2: 添加Debian 7 Wheezy到PXE菜单 ## + +**5.** 添加**Debian 7**到PXE服务器,需要上述Ubuntu服务器版本相同的步骤。唯一不同点在于网络启动归档镜像下载链接和源目录的名称,现在改为**debian-installer**。 + +要下载**Debian Wheezy**网络启动归档,请转到[Debian网络安装下载][6]页,从**网络启动**菜单选择你想要的系统架构,然后点击**目录**列表中的**网络启动**链接,并从**文件名**列表中下载**netboot.tar.gz**归档包。 + +因为Debian为众多系统架构如Armel,ia64,Mips,PowerPC,Sparc等等提供了网络安装源,所以在本指南中,我将只讨论**64位**架构。因为其它架构的配置过程和当前的几乎一样,唯一不同的是**debian-installer/$directory_architecture name**。 + +所以,要进一步深入,以root帐号登录到你的**PXE服务器**,并通过以下命令抓取Debian 7 64位网络启动归档包。 + + # wget http://ftp.nl.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/netboot.tar.gz + +![Download Debain 7 Netboot](http://www.tecmint.com/wp-content/uploads/2014/11/Download-Debain-7-Netboot.jpg) +下载Debian 7网络启动包 + +**6.** 在**wget**下载完成**netboot.tar.gz**文件后,请将其解压缩并运行以下命令拷贝**debian-installer**目录到tftp服务器默认路径。 + + # tar xfz netboot.tar.gz + # cp -rf debian-installer/ /var/lib/tftpboot/ + +![Extract Debain 7 Netboot](http://www.tecmint.com/wp-content/uploads/2014/11/Extract-Debain-7-Netboot.jpg) +解压缩Debian 7网络启动包 + +![Copy Debain 7 Netboot to FTP](http://www.tecmint.com/wp-content/uploads/2014/11/Copy-Debain-7-Netboot-to-FTP.jpg) +拷贝Debian 7网络启动文件到FTP + +**7.** 要添加**Debian Wheezy**标签到**PXE菜单**,请用你最喜爱的文本编辑器打开PXE服务器默认配置文件并添加以下标签。 + + # nano /var/lib/tftpboot/pxelinux.cfg/default + +Debian Wheezy 64位的PXE标签菜单。 + + label 7 + menu label ^7) Install Debian 7 x64 + kernel debian-installer/amd64/linux + append vga=788 initrd=debian-installer/amd64/initrd.gz -- quiet + + label 8 + menu label ^8) Install Debian 7 x64 Automated + kernel debian-installer/amd64/linux + append auto=true priority=critical vga=788 initrd=debian-installer/amd64/initrd.gz -- quiet + +![Add Debian to PXE Boot](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Debian-to-PXE-Boot.jpg) +添加Debian到PXE启动 + +**注**:如果你想要添加其它Debian架构,请重复上述步骤,并相应替换PXE默认菜单配置文件中的标签号和**debian-installer/$architecture_name/**目录。 + +**8.** 在进行客户端测试配置之前,请执行以下命令来清除Debian源文件。 + + # cd && rm -rf debian-installer/ netboot.tar.gz pxelinux.* version.info + +**9.** 然后通过网络启动一台客户机,选择从PXE菜单安装Debian,并像正常安装一样进一步下去。 + +![Select Install Debian from PXE](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Install-Debian-from-PXE.jpg) +选择从PXE安装Debian + +![Select Debian Install Language](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Debian-Install-Language.jpg) +选择Debian安装语言 + +以上是要求添加并从RHEL/CentOS 7 PXE服务器安装**Ubuntu**或**Debian**到客户机上的全部步骤。在我的下一篇文章中,我将讨论一种更为复杂的方法,如何使用RHEL/CentOS 7 PXE网络启动服务器来安装**Windows 7**到客户机。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/add-ubuntu-to-pxe-network-boot/ + +作者:[Matei Cezar][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/cezarmatei/ +[1]:http://www.tecmint.com/install-pxe-network-boot-server-in-centos-7/ +[2]:http://releases.ubuntu.com/14.10/ +[3]:http://releases.ubuntu.com/14.04/ +[4]:http://cdimage.ubuntu.com/netboot/14.10/ +[5]:http://cdimage.ubuntu.com/netboot/14.04/ +[6]:https://www.debian.org/distrib/netinst From a92cbe27d3aaee9be5b3444a6af62cc2507da878 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 11 Nov 2014 17:59:31 +0800 Subject: [PATCH 170/316] Translating by ZTinoZ --- ...ke Disk Full Or Can't Write to the Disk.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md index fbc7624bec..360792663f 100644 --- a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md +++ b/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md @@ -121,7 +121,7 @@ [日志文件中的输入/输出错误(例如 /var/log/messages)][9]说明硬盘出了一些问题并且可能已经失效,你可以用smartctl命令来查看硬盘的错误,这是一个在类UNIX系统下控制和监控硬盘状态的一个命令。语法如下: smartctl -a /dev/DEVICE - # check for /dev/sda on a Linux server + # 在Linux服务器下检查 /dev/sda smartctl -a /dev/sda 你也可以用"Disk Utility"这个软件来获得同样的信息。 @@ -173,10 +173,10 @@ Debian服务器的部分输出内容: 输入以下命令来查看Linux软阵列的最近状态: - ## get detail on /dev/md0 raid ## + ## 获得 /dev/md0 上磁盘阵列的具体内容 ## mdadm --detail /dev/md0 - ## Find status ## + ## 查看状态 ## cat /proc/mdstat watch cat /proc/mdstat @@ -188,26 +188,26 @@ Debian服务器的部分输出内容: 你需要把有故障的硬件驱动器更换掉,别删错了。本例中,我更换了 /dev/sdb (RAID 6中的第二个硬件驱动器)。没必要依靠离线存储文件来修复Linux上的磁盘阵列,因为这只在你的服务器支持热插拔硬盘的情况下才能工作: - ## remove disk from an array md0 ## + ## 从一个md0阵列中删除磁盘 ## mdadm --manage /dev/md0 --fail /dev/sdb1 mdadm --manage /dev/md0 --remove /dev/sdb1 - # Do the same steps again for rest of /dev/sdbX ## - # Power down if not hot-swappable hard disk: ## + # 对 /dev/sdbX 的剩余部分做相同操作 ## + # 如果不是热插拔硬盘就执行关机操作 ## shutdown -h now - ## copy partition table from /dev/sda to newly replaced /dev/sdb ## + ## 从 /dev/sda 复制分区表至新的 /dev/sdb 下 ## sfdisk -d /dev/sda | sfdisk /dev/sdb fdisk -l - ## Add it ## + ## 添加 ## mdadm --manage /dev/md0 --add /dev/sdb1 - # do the same steps again for rest of /dev/sdbX ## + # 对 /dev/sdbX 的剩余部分做相同操作 ## - # Now md0 will sync again. See it on screen ## + # 现在md0会再次同步,通过显示屏查看 ## watch cat /proc/mdstat -See our [tips on increasing RAID sync speed on Linux][18] for more information. +来看看[加快Linux磁盘阵列同步速度的小贴士][18]来获取更多信息。 ### #8 - 处理硬阵列 ### From c38e4f98c820bf1fc1c5c834b479c04bb9779ca8 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 12 Nov 2014 01:34:10 +0800 Subject: [PATCH 171/316] =?UTF-8?q?20141112-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...GNOME Battle To Protect Their Trademark.md | 54 ++++++++++++++++ ...ve Music Players from Ubuntu Sound Menu.md | 64 +++++++++++++++++++ ... Fix Docky Compositing Error In Lubuntu.md | 39 +++++++++++ 3 files changed, 157 insertions(+) create mode 100644 sources/news/20141112 Open-Source Vs Groupon--GNOME Battle To Protect Their Trademark.md create mode 100644 sources/tech/20141112 How to Remove Music Players from Ubuntu Sound Menu.md create mode 100644 sources/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md diff --git a/sources/news/20141112 Open-Source Vs Groupon--GNOME Battle To Protect Their Trademark.md b/sources/news/20141112 Open-Source Vs Groupon--GNOME Battle To Protect Their Trademark.md new file mode 100644 index 0000000000..6afdda77ea --- /dev/null +++ b/sources/news/20141112 Open-Source Vs Groupon--GNOME Battle To Protect Their Trademark.md @@ -0,0 +1,54 @@ +Open-Source Vs Groupon: GNOME Battle To Protect Their Trademark +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/gnome-blank.jpg) + +**GNOME is a name synonymous with open-source software, but if the billion-dollar company Groupon has its way it could soon mean something different.** + +[Groupon][1], famed for its ‘deal-of-the-day’ website, recently unveiled a “tablet-based platform“ called ‘GNOME’, and has filed requisite trademark filings — 10 so far — seeking ownership of the name. + +Naturally, this has the GNOME Foundation ‘concerned’. GNOME is a [registered trademark][2] of the foundation, and has been since 2006. This mark was issued under a number of sections, including ‘operating system’ – which the Chicago-based Groupon is also claiming against. + +Could it just be that they’ve never heard of GNOME before? Highly unlikely. + +![Groupon’s POS system. Ahem.](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/Gnome-Stand.jpg) + +Groupon’s POS system. Ahem. + +Even the most Saul Goodman-y of lawyers would first check existing trademarks and investigate the company(s) owning or contesting. Even assuming that lapse in professionalism, most would have at least given the name a quick Google. Damningly, the company has previously [claimed to be ‘fuelled by open-source’][3]. + +Groupon clearly knows of GNOME, knows what it does, what it stands for and how long it’s been around yet considers itself better placed to “own” the name for its brand of hokey in-store point-of-sale terminals. + +*Hrm.* + +### Campaign to Protect GNOME ### + +Ask not what GNOME can do for you, but what you can do for GNOME. This morning the GNOME Foundation [launched a campaign][4] to raise (an estimated) US$80,000 to battle the first found of marks Groupon has applied to register. + +“**We must not let a billion-dollar-company take the well-established name of one of the biggest Free Software communities,**” says Tobias Mueller, a GNOME Foundation director. + +**“If you want to help GNOME defend its trademark and promote Free Software, visit the campaign’s page, share the link, and let Groupon know that they behaved terribly”.** + +Lucas Nussbaum, **Debian Project Leader**, sums the whole situation up succinctly: + +“**This legal defense is not just about protecting GNOME’s trademark; it is about asserting to the corporate world that FLOSS trademarks can and will be guarded. Not just by the project in question, but by the community as a whole. As a result, all FLOSS trademarks will be strengthened at once.**” + +More details can be found on the GNOME Groupon Campaign page. + +- [GNOME vs Groupon Campaign Page][5] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/gnome-groupon-trademark-battle + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://groupon.com/ +[2]:http://tsdr.uspto.gov/#caseNumber=76368848&caseType=SERIAL_NO&searchType=statusSearch +[3]:https://engineering.groupon.com/2014/open-source/sharing-is-caring-open-source-at-groupon/ +[4]:https://mail.gnome.org/archives/foundation-list/2014-November/msg00020.html +[5]:http://www.gnome.org/groupon/ \ No newline at end of file diff --git a/sources/tech/20141112 How to Remove Music Players from Ubuntu Sound Menu.md b/sources/tech/20141112 How to Remove Music Players from Ubuntu Sound Menu.md new file mode 100644 index 0000000000..07e6c6c148 --- /dev/null +++ b/sources/tech/20141112 How to Remove Music Players from Ubuntu Sound Menu.md @@ -0,0 +1,64 @@ +How to Remove Music Players from Ubuntu Sound Menu +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/music-players.jpg) + +**Since its introduction back in 2010, the Ubuntu Sound Menu has proven to be one of the most popular and unique features of the Unity desktop.** + +Allowing music players to integrate with the volume applet – i.e., where one would expect to find sound-related tomfoolery – through a standard interface is inspired. One wonders why other operating systems haven’t followed suit! + +#### Overstuffed #### + +Handy though it may be there is a “problem” with the applet as it currently exists: pretty much anything that so much as looks at an MP3 can, should it want, lodge itself inside. While useful, an omnipresent listing for apps you have installed but don’t use that often is annoying and unsightly. + +I’m going to wager that the screenshot above looks familiar to a great many of you reading this! Never fear, **dconf-editor** is here. + +### Remove Players from Ubuntu Sound Menu ### + +#### Part One: Basics #### + +The quickest and easiest way to remove entries from the Sound Menu is to uninstall the apps afflicting it. But that’s extreme; as I said, you may want the app, just not the integration. + +To remove players without ditching the apps we need to use a scary looking tool called dconf-editor. + +You may have it installed already, but if you don’t you’ll find it in the Ubuntu Software Center waiting. + +- [Click to Install Dconf-Editor in Ubuntu][1] + +Once installed, head to the Unity Dash to open it. Don’t panic when it opens; you’ve not been shunted back to the 2002, it’s supposed to look like that. + +Using the left-hand sidebar you need to navigate to com > canonical > indicator > sound. The following pane will appear. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/dconf-editor.jpg) + +Double click on the closed brackets next to interested-media-players and delete the players you wish to remove from the Sound Menu, but leave in the square brackets and don’t delete any commas or apostrophes from items you wish to keep. + +For example, I removed ‘**rhythmbox.desktop**’, ‘**pithos.desktop**’, ‘**clementine.desktop**’, to leave a line that reads: + + ['tomahawk.desktop'] + +Now, when I open the Sound menu I only see Tomahawk: + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/music-players-2.jpg) + +#### Part Two: Blacklisting #### + +Wait! Don’t close dconf-editor yet. While the steps above makes things look nice and tidy some players will instantly re-add themselves to the sound menu when opened. To avoid having to repeat the process add them to the **blacklisted-media-player** section. + +Remember to enclose each player in apostrophes with a comma separating multiple entries. They must also be inside the square brackets — so double check before exiting. + +The net result: + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/from-to-.jpg) + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/remove-players-ubuntu-sound-menu + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:apt://dconf-editor \ No newline at end of file diff --git a/sources/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md b/sources/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md new file mode 100644 index 0000000000..24c8f33039 --- /dev/null +++ b/sources/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md @@ -0,0 +1,39 @@ +[Quick Tip] How To Fix Docky Compositing Error In Lubuntu +================================================================================ +As you may know, **Docky** a is light weight application launcher in Unix/Linux like systems. I am a big fan of Lubuntu and Docky, because it doesn’t swallow all my system resources, so that I can use more application simultaneously. I use Docky application launcher in my production Laptop, powered by Lubuntu 14.04. + +If you’re using LXDE distros, you may definitely encounter with composting error while using Docky. See the following screenshot. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Docky.png) + +If you didn’t enable compositing feature, you can’t use some of Docky’s features such as 3D background and Auto-hide. If you want to enable this features on Docky, you need to enable the Compositing feature in your LXDE systems. + +To do that, first install the **xcompmgr** package. + + sudo apt-get install xcompmgr + +Then, go to **Menu -> Preferences -> Default applications for LXSession**. Navigate to the Autostart tab. Type “**@xcompmgr -n**” without quotes in the box that says **+Add**. Then, click Add button. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/LXSession-configuration_002.png) + +That’s it. Close the LXSession configuration window and log off or reboot your system. Now, you’ll see that Compositing feature has been enabled. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/unknown_006.png) + +Also, you can use 3D background and hiding features such as Auto-hide, Intellihide or Window dodge etc. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Docky-Settings_003.png) + +Cheers! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/quick-tip-fix-docky-compositing-error-lubuntu/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ \ No newline at end of file From 17560fdd5ddcd785288a08a49bf7da5a5d36bc02 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 12 Nov 2014 01:58:12 +0800 Subject: [PATCH 172/316] =?UTF-8?q?20141112-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ebug CPU Regressions Using Flame Graphs.md | 154 ++++++++++++++++++ ...nlevels and Service Management Commands.md | 127 +++++++++++++++ 2 files changed, 281 insertions(+) create mode 100644 sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md create mode 100644 sources/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md diff --git a/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md b/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md new file mode 100644 index 0000000000..c4dd252e27 --- /dev/null +++ b/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md @@ -0,0 +1,154 @@ +How to Debug CPU Regressions Using Flame Graphs +================================================================================ +How quickly can you debug a CPU performance regression? If your environment is complex and changing quickly, this becomes challenging with existing tools. If it takes a week to root cause a regression, the code may have changed multiple times, and now you have new regressions to debug. + +Debugging CPU usage is easy in most cases, thanks to [CPU flame graphs][1]. To debug regressions, I would load before and after flame graphs in separate browser tabs, and then blink between them like searching for [Pluto][2]. It got the job done, but I wondered about a better way. + +Introducing **red/blue differential flame graphs**: + +

+ +

+ +This is an interactive SVG (direct [link][3]). The color shows **red for growth**, and **blue for reductions**. + +The size and shape of the flame graph is the same as a CPU flame graph for the second profile (y-axis is stack depth, x-axis is population, and the width of each frame is proportional to its presence in the profile; the top edge is what's actually running on CPU, and everything beneath it is ancestry.) + +In this example, a workload saw a CPU increase after a system update. Here's the CPU flame graph ([SVG][4]): + +

+ +

+ +Normally, the colors are picked at random to differentiate frames and towers. Red/blue differential flame graphs use color to show the difference between two profiles. + +The deflate_slow() code and children were running more in the second profile, highlighted earlier as red frames. The cause was that ZFS compression was enabled in the system update, which it wasn't previously. + +While this makes for a clear example, I didn't really need a differential flame graph for this one. Imagine tracking down subtle regressions, of less than 5%, and where the code is also more complex. + +### Red/Blue Differential Flame Graphs ### + +I've had many discussions about this for years, and finally wrote an implementation that I hope makes sense. It works like this: + +1. Take stack profile 1. +1. Take stack profile 2. +1. Generate a flame graph using 2. (This sets the width of all frames using profile 2.) +1. Colorize the flame graph using the "2 - 1" delta. If a frame appeared more times in 2, it is red, less times, it is blue. The saturation is relative to the delta. + +The intent is for use with before & after profiles, such as for **non-regression testing** or benchmarking code changes. The flame graph is drawn using the "after" profile (such that the frame widths show the current CPU consumption), and then colorized by the delta to show how we got there. + +The colors show the difference that function directly contributed (eg, being on-CPU), not its children. + +### Generation ### + +I've pushed a simple implementation to github (see [FlameGraph][5]), which includes a new program, difffolded.pl. To show how it works, here are the steps using Linux [perf_events][6] (you can use other profilers). + +#### Collect profile 1: #### + + # perf record -F 99 -a -g -- sleep 30 + # perf script > out.stacks1 + +#### Some time later (or after a code change), collect profile 2: #### + + # perf record -F 99 -a -g -- sleep 30 + # perf script > out.stacks2 + +#### Now fold these profile files, and generate a differential flame graph: #### + + $ git clone --depth 1 http://github.com/brendangregg/FlameGraph + $ cd FlameGraph + $ ./stackcollapse-perf.pl ../out.stacks1 > out.folded1 + $ ./stackcollapse-perf.pl ../out.stacks2 > out.folded2 + $ ./difffolded.pl out.folded1 out.folded2 | ./flamegraph.pl > diff2.svg + +difffolded.pl operates on the "folded" style of stack profiles, which are generated by the stackcollapse collection of tools (see the files in [FlameGraph][7]). It emits a three column output, with the folded stack trace and two value columns, one for each profile. Eg: + + func_a;func_b;func_c 31 33 + [...] + +This would mean the stack composed of "func_a()->func_b()->func_c()" was seen 31 times in profile 1, and in 33 times in profile 2. If flamegraph.pl is handed this three column input, it will automatically generate a red/blue differential flame graph. + +### Options ### + +Some options you'll want to know about: + +**difffolded.pl -n**: This normalizes the first profile count to match the second. If you don't do this, and take profiles at different times of day, then all the stack counts will naturally differ due to varied load. Everything will look red if the load increased, or blue if load decreased. The -n option balances the first profile, so you get the full red/blue spectrum. + +**difffolded.pl -x**: This strips hex addresses. Sometimes profilers can't translate addresses into symbols, and include raw hex addresses. If these addresses differ between profiles, then they'll be shown as differences, when in fact the executed function was the same. Fix with -x. + +**flamegraph.pl --negate**: Inverts the red/blue scale. See the next section. + +### Negation ### + +While my red/blue differential flame graphs are useful, there is a problem: if code paths vanish completely in the second profile, then there's nothing to color blue. You'll be looking at the current CPU usage, but missing information on how we got there. + +One solution is to reverse the order of the profiles and draw a negated flame graph differential. Eg: + +

+ +

+ +Now the widths show the first profile, and the colors show what will happen. The blue highlighting on the right shows we're about to spend a lot less time in the CPU idle path. (Note that I usually filter out cpu_idle from the folded files, by including a grep -v cpu_idle.) + +This also highlights the vanishing code problem (or rather, doesn't highlight), as since compression wasn't enabled in the "before" profile, there is nothing to color red. + +This was generated using: + + $ ./difffolded.pl out.folded2 out.folded1 | ./flamegraph.pl --negate > diff1.svg + +Which, along with the earlier diff2.svg, gives us: + +- **diff1.svg**: widths show the before profile, colored by what WILL happen +- **diff2.svg**: widths show the after profile, colored by what DID happen + +If I were to automate this for non-regression testing, I'd generate and show both side by side. + +### CPI Flame Graphs ### + +I first used this code for my [CPI flame graphs][8], where instead of doing a difference between two profiles, I showed the difference between CPU cycles and stall cycles, which highlights what the CPUs were doing. + +### Other Differential Flame Graphs ### + +[![](http://www.brendangregg.com/blog/images/2014/rm-flamegraph-diff.jpg)][9] + +There's other ways flame graph differentials can be done. [Robert Mustacchi][10] experimented with [differentials][11] a while ago, and used an approach similar to a colored code review: only the difference is shown, colored red for added (increased) code paths, and blue for removed (decreased) code paths. The key difference is that the frame widths are now relative to the size of the difference only. An example is on the right. It's a good idea, but in practice I found it a bit weird, and hard to follow without the bigger picture context: a standard flame graph showing the full profile. + +[![](http://www.brendangregg.com/blog/images/2014/corpaul-flamegraph-diff.png)][12] + +Cor-Paul Bezemer has created [flamegraphdiff][13], which shows the profile difference using three flame graphs at the same time: the standard before and after flame graphs, and then a differential flame graph where the widths show the difference. See the [example][14]. You can mouse-over frames in the differential, which highlights frames in all profiles. This solves the context problem, since you can see the standard flame graph profiles. + +My red/blue flame graphs, Robert's hue differential, and Cor-Paul's triple-view, all have their strengths. These could be combined: the top two flame graphs in Cor-Paul's view could be my diff1.svg and diff2.svg. Then the bottom flame graph colored using Robert's approach. For consistency, the bottom flame graph could use the same palette range as mine: blue->white->red. + +Flame graphs are spreading, and are now used by many companies. I wouldn't be surprised if there were already other implementations of flame graph differentials I didn't know about. (Leave a comment!) + +### Conclusion ### + +If you have problems with performance regressions, red/blue differential flame graphs may be the quickest way to find the root cause. These take a normal flame graph and then use colors to show the difference between two profiles: red for greater samples, and blue for fewer. The size and shape of the flame graph shows the current ("after") profile, so that you can easily see where the samples are based on the widths, and then the colors show how we got there: the profile difference. + +These differential flame graphs could also be generated by a nightly non-regression test suite, so that performance regressions can be quickly debugged after the fact. + +-------------------------------------------------------------------------------- + +via: http://www.brendangregg.com/blog/2014-11-09/differential-flame-graphs.html + +作者:[Brendan Gregg][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/60160 +[1]:http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html +[2]:http://en.wikipedia.org/wiki/Planets_beyond_Neptune#Discovery_of_Pluto +[3]:http://www.brendangregg.com/blog/images/2014/zfs-flamegraph-diff.svg +[4]:http://www.brendangregg.com/blog/images/2014/zfs-flamegraph-after.svg +[5]:https://github.com/brendangregg/FlameGraph +[6]:http://www.brendangregg.com/perf.html +[7]:https://github.com/brendangregg/FlameGraph +[8]:http://www.brendangregg.com/blog/2014-10-31/cpi-flame-graphs.html +[9]:http://www.slideshare.net/brendangregg/blazing-performance-with-flame-graphs/167 +[10]:http://dtrace.org/blogs/rm +[11]:http://www.slideshare.net/brendangregg/blazing-performance-with-flame-graphs/167 +[12]:https://github.com/corpaul/flamegraphdiff +[13]:http://corpaul.github.io/flamegraphdiff/ +[14]:http://corpaul.github.io/flamegraphdiff/demos/dispersy/dispersy_diff.html \ No newline at end of file diff --git a/sources/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md b/sources/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md new file mode 100644 index 0000000000..d1f3ceb48c --- /dev/null +++ b/sources/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md @@ -0,0 +1,127 @@ +Intro to Systemd Runlevels and Service Management Commands +================================================================================ +![](http://www.linux.com/images/stories/41373/Linux_kernel_unified_hierarchy_cgroups_and_systemd.svg.png) + +In olden times we had static runlevels. systemd has mechanisms for more flexible and dynamic control of your system. + +Before we get into learning more useful systemd commands, let's take a little trip down memory lane. There is this weird dichotomy in Linux-land, where Linux and FOSS are always pushing ahead and progressing, and people are always complaining about it. Which is why I am taking all of this anti-systemd uproar with a grain of salt, because I remember when: + +- Packages were evil, because real Linux users built everything from source code and kept strict control of what went on their systems. +- Dependency-resolving package managers were evil, because real Linux users resolved dependency hells manually. +- Except for apt-get, which was always good, so only Yum was evil. +- Because Red Hat was the Microsoft of Linux. +- Yay Ubuntu! +- Boo hiss Ubuntu! + +And on and on...as I have said lo so many times before, changes are upsetting. They mess with our workflow, which is no small thing because any disruption has a real productivity cost. But we are still in the infant stage of computing, so it's going to keep changing and advancing rapidly for a long time. I'm sure you know people who are stuck in the mindset that once you buy something, like a wrench or a piece of furniture or a pink flamingo lawn ornament, it is forever. These are the people who are still running Windows Vista, or deity help us Windows 95 on some ancient, feeble PC with a CRT monitor, and who don't understand why you keep bugging them to replace it. It still works, right? + +Which reminds me of my greatest triumph in keeping an old computer running long after it should have been retired. Once upon a time a friend had this little old 286 running some ancient version of MS-DOS. She used it for a few basic tasks like appointments, diary, and a little old accounting program that I wrote in BASIC for her check register. Who cares about security updates, right? It's not connected to any network. So from time to time I replaced the occasional failed resistor or capacitor, power supply, and CMOS battery. It just kept going. Her tiny old amber CRT monitor grew dimmer and dimmer, and finally it died after 20+ years of service. Now she is using an old Thinkpad running Linux for the same tasks. + +If there is a moral to this tangent it escapes me, so let's get busy with systemd. + +### Runlevels vs. States ### + +SysVInit uses static runlevels to create different states to boot into, and most distros use five: + +- Single-user mode +- Multi-user mode without network services started +- Multi-user mode with network services started +- System shutdown +- System reboot. + +Me, I don't see a lot of practical value in having multiple runlevels, but there they are. Instead of runlevels, systemd allows you to create different states, which gives you a flexible mechanism for creating different configurations to boot into. These states are composed of multiple unit files bundled into targets. Targets have nice descriptive names instead of numbers. Unit files control services, devices, sockets, and mounts. You can see what these look like by examining the prefab targets that come with systemd, for example /usr/lib/systemd/system/graphical.target, which is the default on CentOS 7: + + [Unit] + Description=Graphical Interface + Documentation=man:systemd.special(7) + Requires=multi-user.target + After=multi-user.target + Conflicts=rescue.target + Wants=display-manager.service + AllowIsolate=yes + [Install] + Alias=default.target + +So what do unit files look like? Let us peer into one. Unit files are in two directories: + +- /etc/systemd/system/ +- /usr/lib/systemd/system/ + +The first one is for us to play with, and the second one is where packages install unit files. **/etc/systemd/system/** takes precedence over **/usr/lib/systemd/system/**. Hurrah, human over machine. This is the unit file for the Apache Web server: + + [Unit] + Description=The Apache HTTP Server + After=network.target remote-fs.target nss-lookup.target + [Service] + Type=notify + EnvironmentFile=/etc/sysconfig/httpd + ExecStart=/usr/sbin/httpd/ $OPTIONS -DFOREGROUND + ExecReload=/usr/sbin/httpd $OPTIONS -k graceful + ExecStop=/bin/kill -WINCH ${MAINPID} + KillSignal=SIGCONT + PrivateTmp=true + [Install] + WantedBy=multi.user.target + +These files are fairly understandable even for systemd newcomers, and unit files are quite a bit simpler than a SysVInit init file, as this snippet from /etc/init.d/apache2 shows: + + SCRIPTNAME="${0##*/}" + SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}" + if [ -n "$APACHE_CONFDIR" ] ; then + if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then + DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}" + else + DIR_SUFFIX= + +The whole file is 410 lines. + +You can view unit dependencies, and it's always surprising to me how complex they are: + + $ systemctl list-dependencies httpd.service + +### cgroups ### + +cgroups, or control groups, have been present in the Linux kernel for some years, but have not been used very much until systemd. [The kernel documentation][1] says: "Control Groups provide a mechanism for aggregating/partitioning sets of tasks, and all their future children, into hierarchical groups with specialized behaviour." In other words, it has the potential to control, limit, and allocate resources in multiple useful ways. systemd uses cgroups, and you can see them. This displays your entire cgroup tree: + + $ systemd-cgls + +You can generate a different view with the good old ps command: + + $ ps xawf -eo pid,user,cgroup,args + +### Useful Commands ### + +This command reloads the configuration file of a daemon, and not its systemd service file. Use this when you make a configuration change and want to activate it with least disruption, like this example for Apache: + + # systemctl reload httpd.service + +Reloading a service file completely stops and then restarts a service. If it is not running this starts it: + + # systemctl restart httpd.service + +You can restart all daemons with one command. This reloads all unit files, and re-creates the whole systemd dependency tree: + + # systemctl daemon-reload + +You can reboot, suspend, and poweroff as an ordinary unprivileged user: + + $ systemctl reboot + $ systemctl suspend + $ systemctl poweroff + +As always, there is much, much more to learn about systemd. [Here We Go Again, Another Linux Init: Intro to systemd][2] and [Understanding and Using Systemd][3] are good introductions to systemd, with links to more detailed resources. + +-------------------------------------------------------------------------------- + +via: http://www.linux.com/learn/tutorials/794615-systemd-runlevels-and-service-management + +作者:[Carla Schroder][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/3734 +[1]:https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt +[2]:http://www.linux.com/learn/tutorials/524577-here-we-go-again-another-linux-init-intro-to-systemd +[3]:http://www.linux.com/learn/tutorials/788613-understanding-and-using-systemd \ No newline at end of file From 91b6a98fc7972860faa0a2c64dbf5c5469c2c98b Mon Sep 17 00:00:00 2001 From: bazz2 Date: Wed, 12 Nov 2014 08:31:47 +0800 Subject: [PATCH 173/316] [translated] How to create and manage LXC containers on Ubuntu --- ...ate and manage LXC containers on Ubuntu.md | 142 ------------------ ...ate and manage LXC containers on Ubuntu.md | 141 +++++++++++++++++ 2 files changed, 141 insertions(+), 142 deletions(-) delete mode 100644 sources/tech/20141029 How to create and manage LXC containers on Ubuntu.md create mode 100644 translated/tech/20141029 How to create and manage LXC containers on Ubuntu.md diff --git a/sources/tech/20141029 How to create and manage LXC containers on Ubuntu.md b/sources/tech/20141029 How to create and manage LXC containers on Ubuntu.md deleted file mode 100644 index 956d64dc69..0000000000 --- a/sources/tech/20141029 How to create and manage LXC containers on Ubuntu.md +++ /dev/null @@ -1,142 +0,0 @@ -[bazz222222222] -How to create and manage LXC containers on Ubuntu -================================================================================ -While the concept of containers was introduced more than a decade ago to manage shared hosting environments securely (e.g., FreeBSD jails), Linux containers such as LXC or [Docker][1] have gone mainstream only recently with the rising need to deploy applications for the cloud. While [Docker][2] is getting all the media spotlight these days with strong backing from major cloud providers (e.g., Amazon AWS, Microsoft Azure) and distro providers (e.g., Red Hat, Ubuntu), LXC is in fact the original container technology developed for Linux platforms. - -If you are an average Linux user, what good does Docker/LXC bring to you? Well, containers are actually a great means to switch between distros literally instantly. Suppose your current desktop is Debian. You want Debian's stability. At the same time, you also want to play the latest Ubuntu games. Then instead of bothering to dual boot into a Ubuntu partition, or boot up a heavyweight Ubuntu VM, simply spin off a Ubuntu container on the spot, and you are done. - -Even without all the goodies of Docker, what I like about LXC containers is the fact that LXC can be managed by libvirt interface, which is not the case for Docker. If you have been using libvirt-based management tools (e.g., virt-manager or virsh), you can use those same tools to manage LXC containers. - -In this tutorial, I focus on the command-line usage of standard LXC container tools, and demonstrate **how to create and manage LXC containers from the command line on Ubuntu**. - -### Install LXC on Ubuntu ### - -To use LXC on Ubuntu, install LXC user-space tools as follows. - - $ sudo apt-get install lxc - -After that, check the current Linux kernel for LXC support by running lxc-checkconifg tool. If everything is enabled, kernel's LXC support is ready. - - $ lxc-checkconfig - -![](https://farm4.staticflickr.com/3955/15655792445_d462957ee9_z.jpg) - -After installing LXC tools, you will find that an LXC's default bridge interface (lxcbr0) is automatically created (as configured in /etc/lxc/default.conf). - -![](https://farm6.staticflickr.com/5598/15035046834_a53c092230_z.jpg) - -When you create an LXC container, the container's interface will automatically be attached to this bridge, so the container can communicate with the world. - -### Create an LXC Container ### - -To be able to create an LXC container of a particular target environment (e.g., Debian Wheezy 64bit), you need a corresponding LXC template. Fortunately, LXC user space tools on Ubuntu come with a collection of ready-made LXC templates. You can find available LXC templates in /usr/share/lxc/templates directory. - - $ ls /usr/share/lxc/templates - -![](https://farm4.staticflickr.com/3954/15035046824_d15d1cbf6e_z.jpg) - -An LXC template is nothing more than a script which builds a container for a particular Linux environment. When you create an LXC container, you need to use one of these templates. - -To create a Ubuntu container, for example, use the following command-line: - - $ sudo lxc-create -n -t ubuntu - -![](https://farm8.staticflickr.com/7559/15035638763_07d63e23ef_z.jpg) - -By default, it will create a minimal Ubuntu install of the same release version and architecture as the local host, in this case Saucy Salamander (13.10) 64-bit. - -If you want, you can create Ubuntu containers of any arbitrary version by passing the release parameter. For example, to create a Ubuntu 14.10 container: - - $ sudo lxc-create -n -t ubuntu -- --release utopic - -It will download and validate all the packages needed by a target container environment. The whole process can take a couple of minutes or more depending on the type of container. So be patient. - -![](https://farm4.staticflickr.com/3933/15469152369_6a48943cf3_z.jpg) - -After a series of package downloads and validation, an LXC container image are finally created, and you will see a default login credential to use. The container is stored in /var/lib/lxc/. Its root filesystem is found in /var/lib/lxc//rootfs. - -All the packages downloaded during LXC creation get cached in /var/cache/lxc, so that creating additional containers with the same LXC template will take no time. - -Let's see a list of LXC containers on the host: - - $ sudo lxc-ls --fancy - ----------- - - NAME STATE IPV4 IPV6 AUTOSTART - ------------------------------------ - test-lxc STOPPED - - NO - -To boot up a container, use the command below. The "-d" option launches the container as a daemon. Without this option, you will directly be attached to console right after you launch the container. - - $ sudo lxc-start -n -d - -After launching the container, let's check the state of the container again: - - $ sudo lxc-ls --fancy - ----------- - - NAME STATE IPV4 IPV6 AUTOSTART - ----------------------------------------- - lxc RUNNING 10.0.3.55 - NO - -You will see that the container is in "RUNNING" state with an IP address assigned to it. - -You can also verify that the container's interface (e.g., vethJ06SFL) is automatically attached to LXC's internal bridge (lxcbr0) as follows. - - $ brctl show lxcbr0 - -![](https://farm4.staticflickr.com/3932/15656618342_53c4bc19ca_z.jpg) - -### Manage an LXC Container ### - -Now that we know how to create and start an LXC container, let's see what we can do with a running container. - -First of all, we want to access the container's console. For this, type this command: - - $ sudo lxc-console -n - -![](https://farm8.staticflickr.com/7538/15470225050_d093cb1028_z.jpg) - -Type to exit the console. - -To stop and destroy a container: - - $ sudo lxc-stop -n - $ sudo lxc-destroy -n - -To clone an existing container to another, use these commands: - - $ sudo lxc-stop -n - $ sudo lxc-clone -o -n - -### Troubleshooting ### - -For those of you who encounter errors with LXC, here are some troubleshooting tips. - -1. You fail to create an LXC container with the following error. - - $ sudo lxc-create -n test-lxc -t ubuntu - ----------- - - lxc-create: symbol lookup error: /usr/lib/x86_64-linux-gnu/liblxc.so.1: undefined symbol: cgmanager_get_pid_cgroup_abs_sync - -This means that you are running the latest LXC, but with an older libcgmanager. To fix this problem, you need to update libcgmanager. - - $ sudo apt-get install libcgmanager0 - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/lxc-containers-ubuntu.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://xmodulo.com/docker-containers-centos-fedora.html -[2]:http://xmodulo.com/manage-linux-containers-docker-ubuntu.html diff --git a/translated/tech/20141029 How to create and manage LXC containers on Ubuntu.md b/translated/tech/20141029 How to create and manage LXC containers on Ubuntu.md new file mode 100644 index 0000000000..39ff48ae10 --- /dev/null +++ b/translated/tech/20141029 How to create and manage LXC containers on Ubuntu.md @@ -0,0 +1,141 @@ +教你在 Ubuntu 上使用 LXC 容器 +================================================================================ +使用“容器”来保证主机环境的安全性,这个概念早在十年前就已经存在(例如 FreeBSD 的 jail 虚拟化技术),但是直到最近,随着部署云架构需求越来越多,像 LXC 和 [Docker][1] 这种 Linux 下的容器才成为被关注的焦点。当然,由于主流厂商(云供应商如亚马逊主推 AWS,微软主推 Azure;发行版如红帽、Ubuntu等)组成的强大靠山,[Docker][2] 已经被放在媒体的聚光灯下面,其实,Docker 里面所谓的“容器”技术是由 LXC 提供的。 + +你只是一个普通的 Linux 用户,那 Docker/LXC 能为你带来什么好处呢?容器可以将你的应用在不同的 Linux 发行版之间迁移。想像一下这个场景:你正在用的发行版是 Debian,你喜欢它的稳定性,同时你又想玩一款最新的 Ubuntu 游戏,你不需要在电脑上装双系统然后重启进入 Ubuntu,也不需要在 Debian 上跑一个耗资源的 Ubuntu 虚拟机,你只需要简单地生成一个 Ubuntu 容器就够了。 + +抛开 Docker 的好处不谈,让我们聊一下 LXC 容器的好处:我可以使用 libvirt 提供的接口来管理 LXC,这些接口和 Docker 没有任何关系。如果你有使用基于 libvirt 库的管理工具(例如 virt-manager 和 virsh),你就可以使用它们来管理 LXC 容器。 + +在这篇教程中,我只介绍标准 LXC 容器管理工具的命令行操作,来教你**如何在 Ubuntu 下创建和管理 LXC 容器**。 + +### Ubuntu 下安装 LXC ### + +使用下面的命令安装 LXC 在用户态的工具: + + $ sudo apt-get install lxc + +然后检查当前内核是否支持 LXC。如果所有结果都是“enable”,说明内核支持: + + $ lxc-checkconfig + +![](https://farm4.staticflickr.com/3955/15655792445_d462957ee9_z.jpg) + +安装完 LXC 工具后,就能看到 LXC 自动创建了一块桥接网卡(lxcbr0,在 /etc/lxc/default.conf 中设置)。 + +![](https://farm6.staticflickr.com/5598/15035046834_a53c092230_z.jpg) + +当你创建了 LXC 容器后,它的网口会自动链接到这个桥接网卡上,然后这个容器就能和外部世界通信了。 + +### 创建 LXC 容器 ### + +为了在指定环境下(比如 Debian Wheezy 64位)创建 LXC 容器,你需要一个相应的 LXC 模板。幸运的是 LXC 提供的工具集成了一整套现成的 LXC 模板,你可以在 /usr/share/lxc/templates 目录下找到它们。 + + $ ls /usr/share/lxc/templates + +![](https://farm4.staticflickr.com/3954/15035046824_d15d1cbf6e_z.jpg) + +一个 LXC 模板实质上就是一个脚本,用于创建指定环境下的容器。当你创建 LXC 容器时,你需要用到它们。 + +比如你要新建 Ubuntu 容器,使用下面的命令即可: + + $ sudo lxc-create -n -t ubuntu + +![](https://farm8.staticflickr.com/7559/15035638763_07d63e23ef_z.jpg) + +默认情况下,这个命令会创建一个最小的 Ubuntu 环境,版本号与你的宿主机一致,我这边是“活泼的蝾螈”(版本号是13.10),64位。 + +当然你也可以创建任何你喜欢的版本,只要在命令里面加一个版本参数即可。举个例子,创建 Ubuntu 14.10 的容器: + + $ sudo lxc-create -n -t ubuntu -- --release utopic + +这个命令就会下载安装指定环境下的软件包,创建新容器。整个过程需要几分钟时间,与容器的类型有关,所以,你可能需要耐心等待。 + +![](https://farm4.staticflickr.com/3933/15469152369_6a48943cf3_z.jpg) + +下载安装完所有软件包后,LXC 容器镜像就创建完成了,你可以看到默认的登录界面。容器被放到 /var/lib/lxc/<容器名> 这个目录下,容器的根文件系统放在 /var/lib/lxc/<容器名>/rootfs 目录下。 + +创建过程中下载的软件包保存在 /var/cache/lxc 目录下面,当你想另外建一个一样的容器时,可以省去很多下载时间。 + +用下面的命令看看主机上所有的 LXC 容器: + + $ sudo lxc-ls --fancy + +---------- + + NAME STATE IPV4 IPV6 AUTOSTART + ------------------------------------ + test-lxc STOPPED - - NO + +使用下面的命令启动容器。参数“-d”将容器作为后台进程打开。如果没有指定这个参数,你可以在控制台界面上直接把容器的运行程序关闭(LCTT:Ctrl+C组合键)。 + + $ sudo lxc-start -n -d + +开容器后,看看状态: + + $ sudo lxc-ls --fancy + +---------- + + NAME STATE IPV4 IPV6 AUTOSTART + ----------------------------------------- + lxc RUNNING 10.0.3.55 - NO + +容器状态是“运行中”,容器 IP 是10.0.3.55。 + +你也可以看到容器的网络接口(比如我这里是 vethJ06SFL)自动与 LXC 内部网桥(lxcbr0)连上了: + + $ brctl show lxcbr0 + +![](https://farm4.staticflickr.com/3932/15656618342_53c4bc19ca_z.jpg) + +### 管理 LXC 容器 ### + +我们已经学习了怎么创建和启动 LXC 容器,现在来看看怎么玩一个正在运行着的容器。 + +第一步:打开容器控制台: + + $ sudo lxc-console -n + +![](https://farm8.staticflickr.com/7538/15470225050_d093cb1028_z.jpg) + +使用 退出控制台。 + +停止、删除容器: + + $ sudo lxc-stop -n + $ sudo lxc-destroy -n + +复制容器,用下面的命令: + + $ sudo lxc-stop -n + $ sudo lxc-clone -o -n + +### 常见问题 ### + +这个小节主要介绍你们在使用 LXC 过程中碰到过的问题。 + +1. 创建 LXC 容器时遇到下面的错误: + + $ sudo lxc-create -n test-lxc -t ubuntu + +---------- + + lxc-create: symbol lookup error: /usr/lib/x86_64-linux-gnu/liblxc.so.1: undefined symbol: cgmanager_get_pid_cgroup_abs_sync + +错误的原因是你运行了最新的 LXC,但是它所依赖的 libcgmanager 版本较老,两者不兼容。升级下 libcmanager 即可解决问题: + + $ sudo apt-get install libcgmanager0 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/lxc-containers-ubuntu.html + +作者:[Dan Nanni][a] +译者:[bazz2](https://github.com/bazz2) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/docker-containers-centos-fedora.html +[2]:http://xmodulo.com/manage-linux-containers-docker-ubuntu.html From 2bcfbdec12f8e7a8286bb2692a8ed42313cb3b04 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Wed, 12 Nov 2014 08:38:02 +0800 Subject: [PATCH 174/316] [translated + slef-check]How to create and manage LXC containers on Ubuntu --- ...0141029 How to create and manage LXC containers on Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20141029 How to create and manage LXC containers on Ubuntu.md b/translated/tech/20141029 How to create and manage LXC containers on Ubuntu.md index 39ff48ae10..a0b8a76e25 100644 --- a/translated/tech/20141029 How to create and manage LXC containers on Ubuntu.md +++ b/translated/tech/20141029 How to create and manage LXC containers on Ubuntu.md @@ -98,7 +98,7 @@ ![](https://farm8.staticflickr.com/7538/15470225050_d093cb1028_z.jpg) -使用 退出控制台。 +使用“Crtl+a q”组合键退出控制台。 停止、删除容器: From 2ea616f3701225e375baeff766987b3c26abddb9 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 12 Nov 2014 17:31:06 +0800 Subject: [PATCH 175/316] Finish the Translation by ZTinoZ --- ... Like Disk Full Or Can't Write to the Disk.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {sources => translated}/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md (95%) diff --git a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md b/translated/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md similarity index 95% rename from sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md rename to translated/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md index 360792663f..6e8784d5d8 100644 --- a/sources/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md +++ b/translated/tech/20141030 8 Tips to Solve Linux and Unix Systems Hard Disk Problmes Like Disk Full Or Can't Write to the Disk.md @@ -211,22 +211,22 @@ Debian服务器的部分输出内容: ### #8 - 处理硬阵列 ### -You can use the samrtctl command or vendor specific command to find out the status of RAID and disks in your controller: +你可以用samrtctl命令或者供应商特定的命令来查看磁盘阵列和你所管理的磁盘的状态: - ## SCSI disk + ## SCSI磁盘 smartctl -d scsi --all /dev/sgX - ## Adaptec RAID array + ## Adaptec磁盘阵列 /usr/StorMan/arcconf getconfig 1 - ## 3ware RAID Array + ## 3ware磁盘阵列 tw_cli /c0 show -See your vendor specific documentation to replace a failed disk. +对照供应商特定文档来更换你的故障磁盘。 -### Monitoring disk health ### +### 监控磁盘的健康状况 ### -See our previous tutorials: +来看看我们先前的教程: 1. [Monitoring hard disk health with smartd under Linux or UNIX operating systems][19] 1. [Shell script to watch the disk space][20] @@ -237,7 +237,7 @@ See our previous tutorials: ### 结论 ### -我希望以上这些小贴士会帮助你改善在基于Linux/Unix服务器上的系统磁盘问题。I also recommend implementing a good backup plan in order to have the ability to recover from disk failure, accidental file deletion, file corruption, or complete server destruction: +我希望以上这些小贴士会帮助你改善在基于Linux/Unix服务器上的系统磁盘问题。我还建议执行一个好的备份计划从而有能力从磁盘故障、意外的文件删除操作、文件损坏和服务器完全被破坏等意外情况中恢复: - [Debian / Ubuntu: Install Duplicity for encrypted backup in cloud][25] - [HowTo: Backup MySQL databases, web server files to a FTP server automatically][26] From 7f0254140a23e1c32355e518e334ea34f751d01e Mon Sep 17 00:00:00 2001 From: coloka Date: Wed, 12 Nov 2014 22:12:15 +0800 Subject: [PATCH 176/316] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD=20by=20colo?= =?UTF-8?q?ka?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Intro to Systemd Runlevels and Service Management Commands.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md b/sources/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md index d1f3ceb48c..ae54e89178 100644 --- a/sources/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md +++ b/sources/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md @@ -1,3 +1,4 @@ +翻译中 by coloka Intro to Systemd Runlevels and Service Management Commands ================================================================================ ![](http://www.linux.com/images/stories/41373/Linux_kernel_unified_hierarchy_cgroups_and_systemd.svg.png) From 90804a362f395e9599bd69fd8b3b53748c52f4d2 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 13 Nov 2014 10:45:45 +0800 Subject: [PATCH 177/316] =?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 --- .../20140928 How to use xargs command in Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20140928 How to use xargs command in Linux.md (100%) diff --git a/translated/tech/20140928 How to use xargs command in Linux.md b/published/20140928 How to use xargs command in Linux.md similarity index 100% rename from translated/tech/20140928 How to use xargs command in Linux.md rename to published/20140928 How to use xargs command in Linux.md From d7b7c4055e998b27a5bdde3cdcc57452ddeb752e Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 13 Nov 2014 14:58:14 +0800 Subject: [PATCH 178/316] PUB:20140926 How to monitor user login history on CentOS with utmpdump @GOLinux --- ...r login history on CentOS with utmpdump.md | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) rename {translated/tech => published}/20140926 How to monitor user login history on CentOS with utmpdump.md (75%) diff --git a/translated/tech/20140926 How to monitor user login history on CentOS with utmpdump.md b/published/20140926 How to monitor user login history on CentOS with utmpdump.md similarity index 75% rename from translated/tech/20140926 How to monitor user login history on CentOS with utmpdump.md rename to published/20140926 How to monitor user login history on CentOS with utmpdump.md index 1fcfaa5f55..a4b025b1ca 100644 --- a/translated/tech/20140926 How to monitor user login history on CentOS with utmpdump.md +++ b/published/20140926 How to monitor user login history on CentOS with utmpdump.md @@ -1,20 +1,20 @@ -CentOS监控用户登录历史之utmpdump +使用 utmpdump 监控 CentOS 用户登录历史 ================================================================================ -保留、维护和分析日志(如某个特定时期内发生过的,或正在发生的帐号事件),是Linux系统管理员最基础和最重要的任务之一。对于用户管理,检查用户的登入和登出日志(不管是失败的,还是成功的)可以让我们对任何潜在的安全隐患或未经授权使用系统的情况保持警惕。例如,工作时间之外或例假期间的来自未知IP地址或帐号的远程登录应当发出红色警报。 +保留、维护和分析日志(如某个特定时期内发生过的,或正在发生的帐号事件),是Linux系统管理员最基础和最重要的任务之一。对于用户管理,检查用户的登入和登出日志(不管是失败的,还是成功的)可以让我们对任何潜在的安全隐患或未经授权使用系统的情况保持警惕。例如,工作时间之外或放假期间的来自未知IP地址或帐号的远程登录应当发出红色警报。 在CentOS系统上,用户登录历史存储在以下这些文件中: -- /var/run/utmp(用于记录当前打开的会话)who和w工具用来记录当前有谁登录以及他们正在做什么,而uptime用来记录系统启动时间。 -- /var/log/wtmp (用于存储系统连接历史记录)last工具用来记录最后登录的用户的列表。 -- /var/log/btmp(记录失败的登录尝试)lastb工具用来记录最后失败的登录尝试的列表。 +- /var/run/utmp(用于记录当前打开的会话)被who和w工具用来记录当前有谁登录以及他们正在做什么,而uptime用来记录系统启动时间。 +- /var/log/wtmp (用于存储系统连接历史记录)被last工具用来记录最后登录的用户的列表。 +- /var/log/btmp(记录失败的登录尝试)被lastb工具用来记录最后失败的登录尝试的列表。 ![](https://farm4.staticflickr.com/3871/15106743340_bd13fcfe1c_o.png) -在本帖中,我将介绍如何使用utmpdump,这个小程序来自sysvinit-tools包,可以用于转储二进制日志文件到文本格式的文件以便检查。此工具默认在CentOS 6和7家族上可用。utmpdump收集到的信息比先前提到过的工具的输出要更全面,这让它成为一个胜任该工作的很不错的工具。除此之外,utmpdump可以用于修改utmp或wtmp。如果你想要修复二进制日志中的任何损坏条目,它会很有用。 +在本文中,我将介绍如何使用utmpdump,这个小程序来自sysvinit-tools包,可以用于转储二进制日志文件到文本格式的文件以便检查。此工具默认在CentOS 6和7系列上可用。utmpdump收集到的信息比先前提到过的工具的输出要更全面,这让它成为一个胜任该工作的很不错的工具。除此之外,utmpdump可以用于修改utmp或wtmp。如果你想要修复二进制日志中的任何损坏条目,它会很有用(LCTT 译注:我怎么觉得这像是做坏事的前奏?)。 ### Utmpdump的使用及其输出说明 ### -正如我们之前提到的,这些日志文件,与我们大多数人熟悉的其它日志相比(如/var/log/messages,/var/log/cron,/var/log/maillog),是以二进制格式存储的,因而我们不能使用像less或more这样的文件命令来查看它们的内容。那样看来,utmpdump拯救了世界。 +正如我们之前提到的,这些日志文件,与我们大多数人熟悉的其它日志相比(如/var/log/messages,/var/log/cron,/var/log/maillog),是以二进制格式存储的,因而我们不能使用像less或more这样的文件命令来查看它们的内容。所以,utmpdump的出现拯救了世界。 为了要显示/var/run/utmp的内容,请运行以下命令: @@ -34,15 +34,15 @@ CentOS监控用户登录历史之utmpdump ![](https://farm6.staticflickr.com/5562/15293066352_c40bc98ca4_z.jpg) -正如你所能看到的,三种情况下的输出结果是一样的,除了utmp和btmp的记录是按时间排序,而wtmp的顺序是颠倒的这个原因外。 +正如你所能看到的,三种情况下的输出结果是一样的,除了utmp和btmp的记录是按时间排序,而wtmp的顺序是颠倒的这个原因外(LCTT 译注:此处原文有误,实际上都是按照时间顺序排列的)。 -每个日志行格式化成了多列,说明如下。第一个字段显示了会话识别符,而第二个字段则是PID。第三个字段可以是以下值:~~(表示运行等级改变或系统重启),bw(启动守候进程),数字(表示TTY编号),或者字符和数字(表示伪终端)。第四个字段可以为空或用户名、重启或运行级别。第五个字段是主TTY或PTY(伪终端),如果此信息可获得的话。第六个字段是远程主机名(如果是本地登录,该字段为空,运行级别信息除外,它会返回内核版本)。第七个字段是远程系统的IP地址(如果是本地登录,该字段为0.0.0.0)。如果没有提供DNS解析,第六和第七字段会显示相同的信息(远程系统的IP地址)。最后一个(第八)字段指明了记录创建的日期和时间。 +每个日志行格式化成了多列,说明如下。第一个字段显示了会话识别符,而第二个字段则是PID。第三个字段可以是以下值:--(表示运行等级改变或系统重启),bw(启动守候进程),数字(表示TTY编号),或者字符和数字(表示伪终端)。第四个字段可以为空或用户名、重启或运行级别。第五个字段是主TTY或PTY(伪终端),如果此信息可获得的话。第六个字段是远程主机名(如果是本地登录,该字段为空,运行级别信息除外,它会返回内核版本)。第七个字段是远程系统的IP地址(如果是本地登录,该字段为0.0.0.0)。如果没有提供DNS解析,第六和第七字段会显示相同的信息(远程系统的IP地址)。最后一个(第八)字段指明了该记录创建的日期和时间。 ### Utmpdump使用样例 ### 下面提供了一些utmpdump的简单使用情况。 -1. 检查8月18日到9月17日之间某个特定用户(如gacanepa)的登录次数。 +1、 检查8月18日到9月17日之间某个特定用户(如gacanepa)的登录次数。 # utmpdump /var/log/wtmp | grep gacanepa @@ -50,13 +50,13 @@ CentOS监控用户登录历史之utmpdump 如果你需要回顾先前日期的登录信息,你可以检查/var/log下的wtmp-YYYYMMDD(或wtmp.[1...N])和btmp-YYYYMMDD(或btmp.[1...N])文件,这些是由[logrotate][1]生成的旧wtmp和btmp的归档文件。 -2. 统计来自IP地址192.168.0.101的登录次数。 +2、 统计来自IP地址192.168.0.101的登录次数。 # utmpdump /var/log/wtmp | grep 192.168.0.101 ![](https://farm4.staticflickr.com/3842/15106743480_55ce84c9fd_z.jpg) -3. 显示失败的登录尝试。 +3、 显示失败的登录尝试。 # utmpdump /var/log/btmp @@ -64,7 +64,7 @@ CentOS监控用户登录历史之utmpdump 在/var/log/btmp输出中,每个日志行都与一个失败的登录尝试相关(如使用不正确的密码,或者一个不存在的用户ID)。上面图片中高亮部分显示了使用不存在的用户ID登录,这警告你有人尝试猜测常用帐号名来闯入系统。这在使用tty1的情况下是个极其严重的问题,因为这意味着某人对你机器上的终端具有访问权限(该检查一下谁拿到了进入你数据中心的钥匙了,也许吧?) -4. 显示每个用户会话的登入和登出信息 +4、 显示每个用户会话的登入和登出信息 # utmpdump /var/log/wtmp @@ -72,9 +72,9 @@ CentOS监控用户登录历史之utmpdump 在/var/logwtmp中,一次新的登录事件的特征是,第一个字段为‘7’,第三个字段是一个终端编号(或伪终端id),第四个字段为用户名。相关的登出事件会在第一个字段显示‘8’,第二个字段显示与登录一样的PID,而终端编号字段空白。例如,仔细观察上面图片中PID 1463的行。 -- On [Fri Sep 19 11:57:40 2014 ART] the login prompt appeared in tty1. -- On [Fri Sep 19 12:04:21 2014 ART], user root logged on. -- On [Fri Sep 19 12:07:24 2014 ART], root logged out. +- 在 [Fri Sep 19 11:57:40 2014 ART],TTY1上显示登录提示符。 +- 在 [Fri Sep 19 12:04:21 2014 ART],用户 root 登入。 +- 在 [Fri Sep 19 12:07:24 2014 ART],用户 root 登出。 旁注:第四个字段的LOGIN意味着出现了一次登录到第五字段指定的终端的提示。 @@ -86,7 +86,7 @@ CentOS监控用户登录历史之utmpdump ![](https://farm4.staticflickr.com/3851/15293065352_91e1c1e4b6_z.jpg) -就像上面图片中三个块描绘的那样,过滤逻辑操作是由三个管道步骤组成的。第一步用于查找由用户gacanepa触发的登录事件([7]);第二步和第三部用于选择期望的字段,移除utmpdump输出的方括号并设置输出字段分隔符为逗号。 +就像上面图片中三个高亮区域描绘的那样,过滤逻辑操作是由三个管道步骤组成的。第一步用于查找由用户gacanepa触发的登录事件([7]);第二步和第三部用于选择期望的字段,移除utmpdump输出的方括号并设置输出字段分隔符为逗号。 当然,如果你想要在以后打开来看,你需要重定向上面的命令输出到文件(添加“>[文件名].csv”到命令后面)。 @@ -97,12 +97,12 @@ CentOS监控用户登录历史之utmpdump 在进行总结之前,让我们简要地展示一下utmpdump的另外一种使用情况:修改utmp或wtmp。由于这些都是二进制日志文件,你不能像编辑文件一样来编辑它们。取而代之是,你可以将其内容输出成为文本格式,并修改文本输出内容,然后将修改后的内容导入回二进制日志中。如下: # utmpdump /var/log/utmp > tmp_output - + <使用文本编辑器修改 tmp_output> # utmpdump -r tmp_output > /var/log/utmp 这在你想要移除或修复二进制日志中的任何伪造条目时很有用。 -下面小结一下,utmpdump通过转储详细的登录事件到utmp、wtmp和btmp日志文件,也可以是轮循的旧归档文件,来补充如who,w,uptime,last,lastb之类的标准工具的不足,这也使得它成为一个很棒的工具。 +下面小结一下,utmpdump从utmp、wtmp和btmp日志文件或轮循的旧归档文件来读取详细的登录事件,来补充如who,w,uptime,last,lastb之类的标准工具的不足,这也使得它成为一个很棒的工具。 你可以随意添加评论以加强本帖的含金量。 @@ -112,9 +112,9 @@ via: http://xmodulo.com/2014/09/monitor-user-login-history-centos-utmpdump.html 作者:[Gabriel Cánepa][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/gabriel -[1]:http://xmodulo.com/2014/09/logrotate-manage-log-files-linux.html +[1]:http://linux.cn/article-4126-1.html From 3cc0e65aaf8a2ddd73f952853458ae3c5e2e8611 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 13 Nov 2014 15:39:23 +0800 Subject: [PATCH 179/316] PUB:20140819 Build a Raspberry Pi Arcade Machine @zpl1025 --- ...819 Build a Raspberry Pi Arcade Machine.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename {translated/tech => published}/20140819 Build a Raspberry Pi Arcade Machine.md (90%) diff --git a/translated/tech/20140819 Build a Raspberry Pi Arcade Machine.md b/published/20140819 Build a Raspberry Pi Arcade Machine.md similarity index 90% rename from translated/tech/20140819 Build a Raspberry Pi Arcade Machine.md rename to published/20140819 Build a Raspberry Pi Arcade Machine.md index 498a05b8f3..989d059f75 100644 --- a/translated/tech/20140819 Build a Raspberry Pi Arcade Machine.md +++ b/published/20140819 Build a Raspberry Pi Arcade Machine.md @@ -1,6 +1,6 @@ -自制一台树莓派街机 +给那些怀旧的游戏骨灰粉丝们:自制一台树莓派街机 ================================================================================ -**利用当代神奇设备来重温80年代的黄金威严。** +**利用当代神奇设备来重温80年代的黄金记忆。** ### 你需要以下硬件 ### @@ -10,17 +10,17 @@ - 一个JAMMA街机游戏机外壳机箱 - J-Pac或者I-Pac -80年代有太多难忘的记忆;冷战结束,Quatro碳酸饮料,Korg Polysix合成器,以及Commodore 64家用电脑。但对于某些年轻人来说,这些都没有街机游戏机那样有说服力,或那种甜蜜的叛逆。笼罩着烟味和此起彼伏的8比特音效,它们就是在挤出来的时间里去探索的洞穴:50分钱和一份代币能让你消耗整个午餐时间,在这些游戏上磨练着你的技能:小蜜蜂,城市大金刚,蜈蚣,行星射击,吃豆小姐,火凤凰,R-Rype,大金刚,雷霆计划,铁手套,街头霸王,超越赛车,防卫者争战...这个列表太长了。 +80年代有太多难忘的记忆;冷战结束,Quatro碳酸饮料,Korg Polysix合成器,以及Commodore 64家用电脑。但对于某些年轻人来说,这些都没有街机游戏机那样有说服力,或那种甜蜜的叛逆。笼罩着烟味和此起彼伏的8比特音效,它们就是在挤出来的时间里去探索的洞穴:50分钱和一个游戏币能让你消耗整个午餐时间,在这些游戏上磨练着你的技能:小蜜蜂,城市大金刚,蜈蚣,行星射击,吃豆小姐,火凤凰,R-Rype,大金刚,雷霆计划,铁手套,街头霸王,超越赛车,防卫者争战...噢,这个列表太长了。 这些游戏,以及玩这些游戏的街机机器,仍然像30年前那样有吸引力。不像年轻时候那样,现在可以不用装一兜零钱就能玩了,最终让你超越那些有钱的孩子以及他们无休止的‘继续游戏’。所以是时候打造一个你自己的基于Linux的街机游戏机了,然后挑战一下过去的最高分。 -我们将会覆盖所有的步骤,来将一个便宜的街机游戏机器外壳变成一台Linux驱动的多平台复古游戏系统。但是这并不意味着你就一定要搭建一个同样的系统。比如说,你可以放弃那个又大又重还有潜在致癌性外壳的箱子本身,而是将内部控制核心装进一个旧游戏主机或同等大小的盒子里。或者说,你也可以简单地放弃小巧的树莓派,而将系统的大脑换成一台更强劲的Linux主机。举个例子,它可以作为运行SteamOS的一个理想平台,用来玩那些更优秀的现代街机游戏。 +我们将会包括所有的步骤,来将一个便宜的街机游戏机器外壳变成一台Linux驱动的多平台复古游戏系统。但是这并不意味着你就一定要搭建一个同样的系统。比如说,你可以放弃那个又大又重还有潜在致癌性外壳的箱子本身,而是将内部控制核心装进一个旧游戏主机或同等大小的盒子里。或者说,你也可以简单地放弃小巧的树莓派,而将系统的大脑换成一台更强劲的Linux主机。举个例子,它可以作为运行SteamOS的一个理想平台,用来玩那些更优秀的现代街机游戏。 在之后的几个页面里,我们将搭建一台基于树莓派的街机游戏机,你应该也能从其中发现很多点子应用到你自己的项目上,即使它们和我们这个项目不太一样。然后因为我们是用无比强大的MAME来做这件事情,你几乎可以让它在任意平台上运行。 ![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade3.png) -我们在B+型号出来以前完成的这个项目。它应该也可以同样工作在更新的主板上,你应该不用一个带电源的USB Hub也可以(点击看大图)。 +*我们是在B+型号出来以前完成的这个项目。它应该也可以同样工作在更新的主板上,你应该不用一个带电源的USB Hub也可以* ### 声明 ### @@ -34,9 +34,9 @@ ![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade4.jpg) -这种机柜可能很便宜,但是他们都很重。不要一个人去搬。一些更古老的机器可能还会需要一点小关怀,例如重新喷个漆以及一些修理工作(点击看大图)。 +*这种机柜可能很便宜,但是他们都很重。不要一个人去搬。一些更古老的机器可能还会需要一点小关怀,例如重新喷个漆以及一些修理工作* -除了获得更加真实的游戏体验以外,购买原版的街机机柜的一个绝佳理由是可以使用原版的控制器。从eBay上买到的大多数机器都支持两个人同时玩,有两个摇杆以及每个玩家各自的一些按钮,再加上玩家一和玩家二的选择按钮。为了兼容更多游戏,我们建议您找一台每个玩家都有6个按键,这个是通用配置。也许你还想看看支持超过两位玩家的控制台,或者有空间放其他游戏控制器的,比如说街机轨迹球(类似疯狂弹珠这种游戏需要的),或者一个旋钮(打砖块)。这些待会都可以轻松装上去,因为有现成的现代USB设备。 +除了获得更加真实的游戏体验以外,购买原版的街机机柜的一个绝佳理由是可以使用原版的控制器。从eBay上买到的大多数机器都支持两个人同时玩,有两个摇杆以及每个玩家各自的一些按钮,再加上玩家一和玩家二的选择按钮。为了兼容更多游戏,我们建议您找一台每个玩家都有6个按键的型号,这个是通用配置。也许你还想看看支持超过两位玩家的控制台,或者有空间放其他游戏控制器的,比如说街机轨迹球(类似疯狂弹珠这种游戏需要的),或者一个旋钮(打砖块)。这些待会都可以轻松装上去,因为有现成的现代USB设备。 控制器是第二考虑的,而且我们认为是最重要的,因为要通过它把你的摇动和拍打转变成游戏里的动作。当你准备买一个机柜时需要考虑一种叫JAMMA的东西,它是日本娱乐机械制造商协会(Japan Amusement Machinery Manufacturers Association)的缩写。JAMMA是街机游戏机里的行业标准,定义了包含游戏芯片的电路板和游戏控制器的连接方式,以及投币机制。它是一个连接两个玩家的摇杆和按钮的所有线缆的接口电路,把它们统一到一个标准的连接头。JAMMA就是这个连接头的大小以及引脚定义,这就意味着不管你安装的主板是什么,按钮和控制器都将会连接到相同功能接口,所以街机的主人只需要再更换下机柜上的外观图片,就可以招揽新玩家了。 @@ -48,13 +48,13 @@ 有一点非常方便,你可以买到这样一种设备,连接街机机柜里的JAMMA接头和电脑的USB端口,将机柜上的摇杆和按键动作都转换成(可配置的)键盘命令,它们可以在Linux里用来控制任何想玩的游戏。这个设备就叫J-Pac([www.ultimarc.com/jpac.html][1] – 大概£54)。 -它最大的特点不是它的连接性;而是它处理和转换输入信号的方式,因为它比标准的USB手柄强太多太多了。每一个输入都有自己独立的中断,而且没有限制同时按下或按住的按钮或摇杆方向的数量。这对于类似街头霸王的游戏来说非常关键,因为他们依赖于同时迅速按下的组合键,而且用来对那些发飙后按下自己所有按键的不良对手发出致命一击时也必不可少。许多其他控制器,特别是那些生成键盘输入的,受到他们所采用的USB控制器的同时六个输入的限制,以及一堆的Alt,Shift和Ctrl键的特殊处理的限制。J-Pac还可以接入倾角传感器,甚至某些投币装置,不用预先配置就可以在Linux下工作了。 +它最大的特点不是它的连接性;而是它处理和转换输入信号的方式,因为它比标准的USB手柄强太多太多了。每一个输入都有自己独立的中断,而且没有限制同时按下或按住的按钮或摇杆方向的数量。这对于类似街头霸王的游戏来说非常关键,因为他们依赖于同时迅速按下的组合键,而且用来对那些发飙后按下自己所有按键的不良对手发出致命一击时也必不可少。许多其他控制器,特别是那些生成键盘输入的,受到了他们所采用的USB控制器的同时六个输入的限制,以及一堆的Alt,Shift和Ctrl键的特殊处理的限制。J-Pac还可以接入倾角传感器,甚至某些投币装置,不用预先配置就可以在Linux下工作了。 另外的选择是一个类似的叫I-Pac的设备。它做了和J-Pac相同的事情,只不过不支持JAMMA接头。这意味着你不能把JAMMA控制器接上去,但同时也就是说你可以设计你自己的控制器布局,再把每个控制接到I-Pac上去。这对第一个项目来说也许有点小难,但是这却是许多街机迷们选择的方式,特别是他们想设计一个支持四个玩家的控制板的时候,或者是一个整合许多不同类型控制的面板的时候。我们采用的方式并不是我们推荐必须要做的,我们改造了一个输入有问题的二手X-Arcade Tankstick控制面板,换上了新的摇杆和按钮,再接到新的JAMMA接口,这样有一个非常好的地方就是可以用便宜的价格(£8)买到所有用到的线材包括电路板边缘插头。 ![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade5.jpg) -我们的已经装到机柜上的J-Pac。右边的蓝色和红色导线接到我们的机柜上额外的1号和2号玩家按钮(点击看大图)。 +*上图是我们已经装到机柜上的J-Pac。右边的蓝色和红色导线接到我们的机柜上额外的1号和2号玩家按钮* 不管你选择的是I-Pac或是J-Pac,它们产生的按键都是MAME的默认值。也就是说运行模拟器之后不需要手动调整输入。例如玩家1,会默认将键盘方向键映射成上下左右,以及将左边的Ctrl,左边的ALT,空格和左边的Shift键映射到按钮1-4。但是真正实用的功能是,对于我们来说,是双键快捷方式。当按下并按住玩家1按钮后,就可以通过把玩家1的摇杆拉到下的位置发出用来暂停游戏的P按键,推到上的位置调整音量,以及推到右的位置来进入MAME自己的设置界面。这些特殊组合键设计的很巧妙,不会对正常玩游戏带来任何干扰,因为他们只有在按住玩家1按钮后才会生效,然后可以让你正在运行游戏的时候也能做任何需要的事情。例如,你可以完全地重新配置MAME,使用它自己的菜单,在玩游戏的时候改变输入绑定和灵敏度。 @@ -76,13 +76,13 @@ J-Pac模块直接插到JAMMA接口上,但你可能还需要一点手动调整 ![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade6.jpg) -我们的树莓派已经接到J-Pac左边,也已经连接了显示屏和USB hub(点击看大图)。 +*我们的树莓派已经接到J-Pac左边,也已经连接了显示屏和USB hub* 然后把J-Pac或I-Pac模块通过PS2转USB连接线接到你的PC或树莓派,也可以直接接到PC的PS2接口。要用旧的PS2接头的话额外还有个要求,你的电脑得足够古老还有这个,但是我们测试发现用USB性能是一样的。当然,这个不能用于不带PS2的树莓派,而且别忘了树莓派也需要供电。我们一般建议使用一个带电源的USB hub,因为没有供电是树莓派不工作最常见的错误。你还需要保证树莓派的网络正常,要么通过以太网(也许使用一个藏到机柜里的电力线适配器),或者通过无线USB设备。网络很关键是因为在树莓派被藏到机柜里后你还可以重新配置它,不用接键盘或鼠标就可以让你调整设置以及执行管理任务。 > ### 投币装置 ### -> 在街机模拟社区里,让投币装置工作在模拟器上工作就会和商业产品太接近了。这就意味着你有潜在的可能对使用你机器的人收取费用。这不仅仅只是不正当,考虑到运行在你自己街机上的那些游戏的来源,这将会是非法的。这很显然违背了模拟的精神。不过,我们和其他热爱者觉得一个能工作的投币装置更进一步地靠近了街机的真实,而且值得付出努力来营造对那个过去街机的怀念。丢个10便士硬币到投币口然后再听到机器发出增加点数的声音,没有什么比得上。 +> 在街机模拟社区里,让投币装置工作在模拟器上工作就会和商业产品太接近了。这就意味着你有潜在的可能对使用你机器的人收取费用。这不仅仅只是不正当,考虑到运行在你自己街机上的那些游戏的来源,这将会是非法的。这很显然违背了模拟的精神。不过,我们和其他热爱者觉得一个能工作的投币装置更进一步地靠近了街机的真实,而且值得付出努力来营造对那个过去街机的怀念。丢个10便士硬币到投币口然后再听到机器发出增加点数的声音,没有什么比得上这种感受了。 > 实际上难度也不大。取决于你街机上的投币装置,以及它如何发信号通知投了几个币。大多数投币装置分为两个部分。较大的一部分是硬币接收和验证装置。这是投币过程的物理部分,用于检测硬币是否真实以及确定它的价值。这是通过一个游戏点数逻辑电路板来实现的,通常用一个排线连接,上边还带有很多DIP开关。这些开关用来决定接受哪种硬币,以及一个硬币能产生多少点数。然后就是简单地找到输出开关,每个点数都会触发它一次,然后把它接到JAMMA连接头的投币输入上,或者直接接到J-Pac。我们的投币装置型号是Mars MS111,在90年代早期的英国很常见,网上有大量关于每个DIP开关作用的信息,也有如何重新编程控制器来接受新硬币的方法。我们还能在这个装置的12V上接个小灯用来照亮投币孔。 @@ -90,7 +90,7 @@ J-Pac模块直接插到JAMMA接口上,但你可能还需要一点手动调整 MAME是这种规模项目唯一可行的模拟器,它如今支持运行在数不清的不同平台上的各种各样的游戏,从第一代街机到一些最近的机器。从这个项目中还孕育出了MESS,一个多模拟器的超级系统,针对的平台是80到90年代的家庭电脑以及电视游戏机。 -如何配置MAME本身都可以写上六页的文章了。它是一个复杂的,无序的,伟大的软件程序,模拟了如此之多的CPU,声卡,芯片,控制器以及那么多的选项,就像MythTV,你都永远不能真正停止配置它。 +如何配置MAME本身都可以写上六页的文章了。它是一个复杂的,无序的,伟大的软件程序,模拟了如此之多的CPU,声卡,芯片,控制器以及那么多的选项,就像MythTV,你都永远不能真正配置好它。 但是也有个相对省事的方式,一个特别为树莓派构建的版本。它叫PiMAME。它是一个可下载的发布版和脚本,基于Raspbian,这是树莓派的默认发布版。它不仅仅会把MAME装到树莓派上(这很有用因为没有哪个默认仓库里有这个),还会安装其他一些精选出来的模拟器,并通过一个前端来管理他们。MAME,举个例子,是一个有数十个参数的命令行应用。但是PiMAME还有一个妙招 - 它安装了一个简单的网页服务器,可以在连接上网络后让你通过浏览器来安装新游戏。这是一个很好的优点,因为把游戏文件放到正确的目录下是使用MAME的困难之一,这还能让你连接到树莓派的存储设备得到最优使用。还有,PiMAME会通过用来安装它的脚本更新自己,所以保持最新版本就太简单了。目前来说这个非常有用,因为在编写这个项目的时候,正好在0.8版这样一个重大更新发布的时间点上。我们在三月份早期时发现有一些轻微的不稳定,但是我们确定在你读到这篇文章的时候一切都会解决。 @@ -127,7 +127,7 @@ via: http://www.linuxvoice.com/arcade-machine/ 作者:[Ben Everard][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b1e655cd00a80b60ea9a22eaa5816f8dd7d3ee39 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 13 Nov 2014 16:05:12 +0800 Subject: [PATCH 180/316] PUB:20140826 Linux Tutorial--Install Ansible Configuration Management And IT Automation Tool @felixonmars --- ...onfiguration Management And IT Automation Tool.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) rename {translated/tech => published}/20140826 Linux Tutorial--Install Ansible Configuration Management And IT Automation Tool.md (98%) diff --git a/translated/tech/20140826 Linux Tutorial--Install Ansible Configuration Management And IT Automation Tool.md b/published/20140826 Linux Tutorial--Install Ansible Configuration Management And IT Automation Tool.md similarity index 98% rename from translated/tech/20140826 Linux Tutorial--Install Ansible Configuration Management And IT Automation Tool.md rename to published/20140826 Linux Tutorial--Install Ansible Configuration Management And IT Automation Tool.md index 748ec68ee5..37addffe32 100644 --- a/translated/tech/20140826 Linux Tutorial--Install Ansible Configuration Management And IT Automation Tool.md +++ b/published/20140826 Linux Tutorial--Install Ansible Configuration Management And IT Automation Tool.md @@ -1,19 +1,19 @@ -Linux 教程:安装 Ansible 配置管理和 IT 自动化工具 +Ansible :一个配置管理和IT自动化工具 ================================================================================ ![](http://s0.cyberciti.org/uploads/cms/2014/08/ansible_core_circle.png) -今天我来谈谈 ansible,一个由 Python 编写的强大的配置管理解决方案。尽管市面上已经有很多可供选择的配置管理解决方案,但他们各有优劣,而 ansible 的特点就在于它的简洁。让 ansible 在主流的配置管理系统中与众不同的一点便是,它并不需要你在想要配置的每个节点上安装自己的组件。同时提供的一个优点在于,如果需要的话,你可以在不止一个地方控制你的整个基础结构。最后一点是它的正确性,或许这里有些争议,但是我认为在大多数时候这仍然可以作为它的一个优点。说得足够多了,让我们来着手在 RHEL/CentOS 和基于 Debian/Ubuntu 的系统中安装和配置 Ansible. +今天我来谈谈 ansible,一个由 Python 编写的强大的配置管理解决方案。尽管市面上已经有很多可供选择的配置管理解决方案,但他们各有优劣,而 ansible 的特点就在于它的简洁。让 ansible 在主流的配置管理系统中与众不同的一点便是,它并不需要你在想要配置的每个节点上安装自己的组件。同时提供的一个优点在于,如果需要的话,你可以在不止一个地方控制你的整个基础架构。最后一点是它的正确性,或许这里有些争议,但是我认为在大多数时候这仍然可以作为它的一个优点。说得足够多了,让我们来着手在 RHEL/CentOS 和基于 Debian/Ubuntu 的系统中安装和配置 Ansible。 ### 准备工作 #### 1. 发行版:RHEL/CentOS/Debian/Ubuntu Linux 1. Jinja2:Python 的一个对设计师友好的现代模板语言 1. PyYAML:Python 的一个 YAML 编码/反编码函数库 -1. paramiko:纯 Python 编写的 SSHv2 协议函数库 (译者注:原文对函数库名有拼写错误,校对时请去掉此条注解) +1. paramiko:纯 Python 编写的 SSHv2 协议函数库 (译者注:原文对函数库名有拼写错误) 1. httplib2:一个功能全面的 HTTP 客户端函数库 1. 本文中列出的绝大部分操作已经假设你将在 bash 或者其他任何现代的 shell 中以 root 用户执行。 -Ansible 如何工作 +### Ansible 如何工作 ### Ansible 工具并不使用守护进程,它也不需要任何额外的自定义安全架构,因此它的部署可以说是十分容易。你需要的全部东西便是 SSH 客户端和服务器了。 @@ -442,15 +442,13 @@ ansible 的 hosts 文件包括了一系列它能操作的主机。默认情况 - [多级环境与 Ansible][9]. - - -------------------------------------------------------------------------------- via: http://www.cyberciti.biz/python-tutorials/linux-tutorial-install-ansible-configuration-management-and-it-automation-tool/ 作者:[Nix Craft][a] 译者:[felixonmars](https://github.com/felixonmars) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 09d5406368edab1b68ee26db84edae1c0550d472 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Thu, 13 Nov 2014 23:54:12 +0800 Subject: [PATCH 181/316] translated --- ... Images Arrive on Google Cloud Platform.md | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/sources/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md b/sources/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md index b2cf4f8608..8c303317a7 100644 --- a/sources/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md +++ b/sources/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md @@ -1,29 +1,27 @@ - Vic020 - -The Latest Ubuntu Images Arrive on Google Cloud Platform +最新版本Ubuntu到达Google云平台 ================================================================================ ![](http://ostatic.com/files/images/ubuntu_image_5.png) -Canonical, working with Google, has announced that it is launching the public beta of Ubuntu 14.04 LTS, 12.04 LTS and 14.10 on Google Cloud Platform. "Starting today, it is possible to select optimized, up to date, fully secure and consistent Ubuntu images on Google Cloud Platform," Canonical's post noted, adding that "Canonical continually maintains, tests and updates certified Ubuntu images, making the latest versions available on Google Cloud Platform within minutes of them being officially released." +自从Canonical和Google合作后,Canonical宣布已经在Google云平台发布Ubuntu14.04LTS、12.04LTS和14.10的公共beta版本。“从今天起,可以在Google云平台上选择优化的、最新的、充满安全和一致的Ubuntu镜像”Canonical推送道,并且接着说道:"Canonical将会继续地维持、测试和更新认证的Ubuntu镜像,官方版本发布后几分钟内,Google云平台就会拥有最新版本" -Ubuntu has been shown to be an increasingly popular platform for use in the cloud and as the basis for cloud deployments, and making it available on Google's cloud platform should attract many users. +在云和部署云的基础操作系统中,Ubuntu已经展示出一个日益流行的平台,因此为Google云平台提供可以吸引更多的用户。 -For all Ubuntu LTS versions, Canonical provides maintenance and security updates for five years, which will appeal to the enterprise users that Canonical is increasingly focused on. +对于所有Ubuntu LTS版本,Canonical会为之提供维护和安全更新5年的版本,这些版本会吸引更多的企业级用户,Canonical已经日益重视。 -“The lack of official Ubuntu images had been holding us back in migrating portions of our infrastructure to Google Cloud Platform,” says Sebastian Stadil, founder of the leading open source cloud management platform, Scalr. “We are pleased to see Ubuntu technologies be made available to all our enterprise customers.” +领先的开源云管理平台的创始人,Sebastian Stadil说道:“官方Ubuntu镜像的缺乏已经阻止我们部分迁移我们的基础设施到Google云平台,我们很高兴看到Ubuntu技术提供给我们所有企业客户。” -Federico Lucifredi, Certified Public Cloud product manager said, in a statement: “As more enterprises join start-ups in turning to public cloud environments to run mission critical and scale-out workloads, Google Cloud Platform has quickly established itself as one of the world’s leading contenders for their business. Bringing Ubuntu to Google Cloud Platform is a logical first step in what we believe will be a great collaboration, benefitting developers and enterprises looking for an easy to use, reliable OS for their cloud deployments.” +Federico Lucifredi,认证公有云(CPC)项目经理,在文档中提到:“因为更多的企业加入创业,从而转向公有云环境来运行大量的关键的向外扩展的工作负载,Google云平台为这项业务已经快速建立它作为全球领先的竞争者之一。带来Ubuntu镜像给Google云平台是合乎逻辑的一步,这样使我们相信将会有一个这样合作,它有利于开发者和企业为他们部署云寻找到一个易于使用和信赖的操作系统。” -Ubuntu actually has a remarkable track record as a guest operating system of choice on all major public clouds, with around 70 percent of workloads running on Ubuntu, according to Canonical. Ubuntu is also the basis for many OpenStack deployments, according to data from the OpenStack Foundation. +通过Canonical得知,在作为所有公有云的操作系统选择上,Ubuntu事实上已经有显著业绩,70%的工作负载运行在Ubuntu上。从OpenStack基金会也可知,Ubuntu已经是OpenStack部署的基础。 -Check in on the [Google Cloud Platform][1] site for more information. +浏览[Google Cloud Platform][1]获得更多信息。 -------------------------------------------------------------------------------- via: http://ostatic.com/blog/the-latest-ubuntu-images-arrive-on-google-cloud-platform 作者:[Sam Dean][a] -译者:[译者ID](https://github.com/译者ID) +译者:[Vic020/VicYu](http://www.vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From adbc7078e1bbc379bfa80528df80e70c915760c4 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Thu, 13 Nov 2014 23:56:13 +0800 Subject: [PATCH 182/316] moved --- ...05 The Latest Ubuntu Images Arrive on Google Cloud Platform.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md (100%) diff --git a/sources/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md b/translated/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md similarity index 100% rename from sources/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md rename to translated/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md From e6270a74fa982875692e9dd8abef6cb88d8e409b Mon Sep 17 00:00:00 2001 From: Vic___ Date: Thu, 13 Nov 2014 23:57:44 +0800 Subject: [PATCH 183/316] Update 20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md --- ...uick Tip] How To Fix Docky Compositing Error In Lubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md b/sources/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md index 24c8f33039..192cb936cb 100644 --- a/sources/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md +++ b/sources/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md @@ -1,3 +1,5 @@ + Vic020 + [Quick Tip] How To Fix Docky Compositing Error In Lubuntu ================================================================================ As you may know, **Docky** a is light weight application launcher in Unix/Linux like systems. I am a big fan of Lubuntu and Docky, because it doesn’t swallow all my system resources, so that I can use more application simultaneously. I use Docky application launcher in my production Laptop, powered by Lubuntu 14.04. @@ -36,4 +38,4 @@ via: http://www.unixmen.com/quick-tip-fix-docky-compositing-error-lubuntu/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.unixmen.com/author/sk/ \ No newline at end of file +[a]:http://www.unixmen.com/author/sk/ From 8fc4c42fe58752994a164d7290b3920016426eb8 Mon Sep 17 00:00:00 2001 From: disylee Date: Fri, 14 Nov 2014 09:23:44 +0800 Subject: [PATCH 184/316] Update 20141112 How to Remove Music Players from Ubuntu Sound Menu.md --- ...41112 How to Remove Music Players from Ubuntu Sound Menu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141112 How to Remove Music Players from Ubuntu Sound Menu.md b/sources/tech/20141112 How to Remove Music Players from Ubuntu Sound Menu.md index 07e6c6c148..d42bd88065 100644 --- a/sources/tech/20141112 How to Remove Music Players from Ubuntu Sound Menu.md +++ b/sources/tech/20141112 How to Remove Music Players from Ubuntu Sound Menu.md @@ -1,3 +1,4 @@ +disylee来翻译 How to Remove Music Players from Ubuntu Sound Menu ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/music-players.jpg) @@ -61,4 +62,4 @@ via: http://www.omgubuntu.co.uk/2014/11/remove-players-ubuntu-sound-menu 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:apt://dconf-editor \ No newline at end of file +[1]:apt://dconf-editor From 0b33244ca95738edbf8b64d1dee4a929491fe852 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 14 Nov 2014 10:24:58 +0800 Subject: [PATCH 185/316] =?UTF-8?q?20141114-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...om and Cool KDE 4.14.2 Desktop--Gallery.md | 56 +++++++++++++++++++ ...Officially Released Finally Drops SSLv3.md | 50 +++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 sources/news/20141114 Chakra Linux 2014.11 Brings a Custom and Cool KDE 4.14.2 Desktop--Gallery.md create mode 100644 sources/news/20141114 GNOME 3.14.2 Officially Released Finally Drops SSLv3.md diff --git a/sources/news/20141114 Chakra Linux 2014.11 Brings a Custom and Cool KDE 4.14.2 Desktop--Gallery.md b/sources/news/20141114 Chakra Linux 2014.11 Brings a Custom and Cool KDE 4.14.2 Desktop--Gallery.md new file mode 100644 index 0000000000..deaa73dbf5 --- /dev/null +++ b/sources/news/20141114 Chakra Linux 2014.11 Brings a Custom and Cool KDE 4.14.2 Desktop--Gallery.md @@ -0,0 +1,56 @@ +Chakra Linux 2014.11 Brings a Custom and Cool KDE 4.14.2 Desktop – Gallery +================================================================================ +> A new version of Chakra Linux has been released + +**Chakra Linux, a distribution specially built to take advantage of KDE Software Compilation and the Plasma desktop, has been upgraded to version 2014.11 and is now ready for download.** + +The developers of this distribution usually choose names of famous scientists. The current iteration of the Chakra Linux, which is actually the second version in the branch, has been dubbed Euler, after Swiss mathematician and physicist Leonhard Euler, who refined calculus and graph theory. Because it follows the KDE releases, it means that we will probably get another version in a few months. + +Surprisingly, if you already have Chakra Linux installed, it won't be enough just to keep your system up to date. Upgrading the OS with the provided ISO is quite easy, but if you're doing it manually, then you'll have to follow a rather intricate tutorial on how to do it properly. It's not unusual for developers to make such big changes that result in the usual updating process not working, but sometimes it's necessary. + +### The latest Chakra Linux is using KDE 4.14.2 ### + +The Chakra Linux developers are following the latest KDE branch very closely, but not the latest version. Case in point, KDE 4.14.3 was released yesterday, but Chakra features KDE 4.14.2. On the other hand, the developers go through great lengths to customize the KDE desktop so that it's unique to this particular distribution. + +"The Chakra team is happy to announce the second release of the Chakra Euler series, which follows the KDE Applications and Platform 4.14 releases. The main reason for providing this new ISO, in addition to providing a new KDE release, is that Chakra has now implemented the /usr merge changes. If you already have Chakra installed on your system manual intervention is needed, so please follow the [instructions][1] on how to properly update. For new installations using this ISO, this is of course not needed." + +"The extra repository, which is disabled by default, provides the must-have GTK-based applications and their dependencies. Kapudan, our desktop greeter which runs after the first boot, will allow you to enable it. Please have in mind that our installer, Tribe, does not currently officially support UEFI, RAID, LVM and GPT, although you might find some workarounds in our forums," [reads][2] the official website. + +The developers also say that the Linux kernel has been updated to version 3.16.4, the systemd component has been updated to version 216, and all of the video drivers, free or proprietary, have been updated as well. + +A complete list of new features and updates can be found in the official announcement. + +Download Chakra Linux 2014.11: + +- [Chakra GNU/Linux 2014.11 (ISO) 64-bitFile size: 1.7 GB][3] +- [MD5][4] + +![](http://i1-news.softpedia-static.com/images/news2/Chakra-Linux-2014-11-Brings-a-Custom-and-Cool-KDE-4-14-2-Desktop-Gallery-464889-1.jpg) + +![](http://i1-news.softpedia-static.com/images/news2/Chakra-Linux-2014-11-Brings-a-Custom-and-Cool-KDE-4-14-2-Desktop-Gallery-464889-2.jpg) + +![](http://i1-news.softpedia-static.com/images/news2/Chakra-Linux-2014-11-Brings-a-Custom-and-Cool-KDE-4-14-2-Desktop-Gallery-464889-3.jpg) + +![](http://i1-news.softpedia-static.com/images/news2/Chakra-Linux-2014-11-Brings-a-Custom-and-Cool-KDE-4-14-2-Desktop-Gallery-464889-4.jpg) + +![](http://i1-news.softpedia-static.com/images/news2/Chakra-Linux-2014-11-Brings-a-Custom-and-Cool-KDE-4-14-2-Desktop-Gallery-464889-5.jpg) + +![](http://i1-news.softpedia-static.com/images/news2/Chakra-Linux-2014-11-Brings-a-Custom-and-Cool-KDE-4-14-2-Desktop-Gallery-464889-6.jpg) + +![](http://i1-news.softpedia-static.com/images/news2/Chakra-Linux-2014-11-Brings-a-Custom-and-Cool-KDE-4-14-2-Desktop-Gallery-464889-7.jpg) + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Chakra-Linux-2014-11-Brings-a-Custom-and-Cool-KDE-4-14-2-Desktop-Gallery-464889.shtml + +作者:[Silviu Stahie][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:http://chakraos.org/news/index.php?/archives/134-Warning-Manual-intervention-needed-on-your-next-major-update.html +[2]:http://chakraos.org/news/index.php?/archives/135-Chakra-2014.11-Euler-released.html +[3]:http://sourceforge.net/projects/chakra/files/2014.11/chakra-2014.11-euler-x86_64.iso +[4]:http://chakra-project.org/get/checksums.txt \ No newline at end of file diff --git a/sources/news/20141114 GNOME 3.14.2 Officially Released Finally Drops SSLv3.md b/sources/news/20141114 GNOME 3.14.2 Officially Released Finally Drops SSLv3.md new file mode 100644 index 0000000000..396dd8904f --- /dev/null +++ b/sources/news/20141114 GNOME 3.14.2 Officially Released Finally Drops SSLv3.md @@ -0,0 +1,50 @@ +GNOME 3.14.2 Officially Released, Finally Drops SSLv3 +================================================================================ +> Users will find the new version in the repositories + +![](http://i1-news.softpedia-static.com/images/news2/GNOME-3-14-2-Officially-Released-Finally-Drops-SSLv3-464903-2.jpg) + +**The GNOME development team has released the second update for the for GNOME 3.14.x branch and it brings a large number of fixes and improvements for a lot of the packages from the stack.** + +GNOME 3.14 was initially released a few weeks ago and the developers are still ironing out a few issues. The new version has been received very well by the community and it's been adopted already by numerous Linux distributions. It's very likely that GNOME 3.14.2 will be integrated in most of the big repositories, as soon as possible. + +The GNOME project managed to stay on track and the new release has arrived on time. Not all of the packages in the stack have been updated, but there are more than enough to get the users interested. It's a good idea to upgrade your desktop environment as soon as possible in order to get all of these enhancement. + +### GNOME 3.14.2 gets a ton of improvements ### + +Just like the previous iteration, the 3.14.2 release does have a few things that really stand out. For example, the NetworkManager dependency of GNOME Shell has been removed, the queued up notifications are now summarized, the handling of multi-day events has been improved, the GtkMenu use has been refined, various fixes for Mutter have been added, and the SSLv3 use has been disabled. + +"Here comes our second update to GNOME 3.14, it has many fixes, various improvements, documentation and translation updates, we hope you'll enjoy it. Individual modules may get new stable 3.14 releases but our focus is now on the development branches, we released a first snapshot as 3.15.1 two weeks ago and will get another one by the end of the month.," [says][1] GNOME developer Frederic Peters. + +GNOME 3.14.2 comes with updates for these core apps: Adwaita Icon Theme, Eye of GNOME, Epiphany, evolution-data-server, Glib, GNOME Calculator, GNOME Contacts, GNOME Desktop, GNOME Shell, GNOME Terminal, Mutter, Nautilus, Tracker, and more. + +The apps that receive upgrades in the 3.14.2 branch include Aisleriot, Bijiben, Brasero, Cheese, Evolution, File Roller, Gedit, Four in a Row, GNOME Boxes, GNOME Maps, GNOME Music, Hitori, Orca, Rygel, Vinagre, and more. + +We [detailed the GNOME 3.14.x release][2] when it was made available and you can find more details in the original report. + +Download the GNOME 3.14.2 stack + +- [GNOME 3.14.2 Stable Sources][3] +- [GNOME 3.14.2 Stable Modules][4] +- [GNOME 3.15.1 Unstable Sources][5] +- [GNOME 3.15.1 Unstable Modules][6] + +But keep in mind that these are the source packages. If you want an easy upgrade or install, be sure to check the repositories. + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/GNOME-3-14-2-Officially-Released-Finally-Drops-SSLv3-464903.shtml + +作者:[Silviu Stahie][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:http://permalink.gmane.org/gmane.comp.gnome.devel.announce/397 +[2]:http://news.softpedia.com/news/GNOME-3-14-Officially-Released-Screenshot-Tour-and-Video-459865.shtml +[3]:https://download.gnome.org/core/3.14/3.14.2/sources/ +[4]:https://download.gnome.org/teams/releng/3.14.2/ +[5]:https://download.gnome.org/core/3.15/3.15.1/sources/ +[6]:https://download.gnome.org/teams/releng/3.15.1/ \ No newline at end of file From 26897658b9e71a6fb8432f214c92e33345130a17 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 14 Nov 2014 11:22:55 +0800 Subject: [PATCH 186/316] =?UTF-8?q?20141114-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ATE 14.04 LTS Now Available to Download.md | 45 +++++++++ ...here With Twitter's Open Source Library.md | 91 +++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 sources/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md create mode 100644 sources/tech/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md diff --git a/sources/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md b/sources/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md new file mode 100644 index 0000000000..59614afd07 --- /dev/null +++ b/sources/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md @@ -0,0 +1,45 @@ +Ubuntu MATE 14.04 LTS Now Available to Download +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/ubuntu-mate-lts.jpg) + +**Fans of the traditional desktop can rejoice, as the first long-term support release of Ubuntu MATE is now live and available for download.** + +The community flavor uses the GNOME 2-based MATE desktop environment, which while forked continues to see active development and improvements made. Ubuntu MATE 14.04 LTS follows on from version 14.10, released last month. + +### Retrospective Gap Filling ### + +Now, at this point you’re probably wondering if I’ve made a typo (I’m Joey Sneddon; that is a near certainty). But in this instance, no; you read correct. The Ubuntu MATE team has decided to retrospectively create an LTS release. + +**Ubuntu MATE 14.04 LTS** should really be called Ubuntu MATE 14.11 LTS. Not just because it has been released in November, but because its code base is more of a mix of 14.04 and 14.10, [as project lead Martin Wimpress notes][1]: + +> “This release is unusual in that it is based on Ubuntu MATE 14.10 but adds a number of new features and fixes many bugs. Although this is a 14.04 release you can consider it a newer version than 14.10[...]“ + +Like other community flavors Ubuntu MATE 14.04 is supported on the desktop for at least the next three years, but should also get critical security fixes through the duration of its parent. + +**Changes from 14.10** includes the following: + +- Theme & Wallpaper updates +- Two new apps: MATE Menu and MATE Tweak +- Accessibility improvements +- VLC replaces Totem as video player +- Various MATE desktop package updates + +### Downloads ### + +More details, including links to hardware requirements and support information, can be found on the official website, as can the download links I know you’re itching to click. + +- [Download Ubuntu MATE 14.04 LTS][2] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/ubuntu-mate-14-04-download-released + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://ubuntu-mate.org/blog/ubuntu-mate-trusty-final-release/ +[2]:https://ubuntu-mate.org/longterm/ \ No newline at end of file diff --git a/sources/tech/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md b/sources/tech/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md new file mode 100644 index 0000000000..eb028133b8 --- /dev/null +++ b/sources/tech/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md @@ -0,0 +1,91 @@ +How To Use Emoji Anywhere With Twitter's Open Source Library +================================================================================ +> Embed them in webpages and other projects via GitHub. + +![](http://a3.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2OTIyNTI3MjcxNTU1.png) + +Emoji, tiny characters from Japan that convey emotions through images, have already conquered the world of cellphone text messaging. + +Now, you can post them everywhere else in the virtual world, too. Twitter has just [open-sourced][1] its emoji library so you can use them for your own websites, apps, and projects. + +This will require a little bit of heavy lifting. Unicode has recognized and even standardized the emoji alphabet, but emoji still [aren’t fully compliant with all Web browsers][2], meaning they'll show up as “tofu,” or blank boxes, most of the time. When Twitter wanted to make emoji available, the social network teamed up with a company called [Icon Factory][3] to render browser imitations of the text message symbols. As a result, Twitter says there’s been lots of demand for access to its emoji. + +Now, you can clone Twitter’s entire library on [GitHub][4] to use in your development projects. Here’s how to do that, and how to make emoji easier to use after you do. + +### Obtain Unicode Support For Emoji ### + +Unicode is an international encoding standard that assigns a string of characters to any symbol, letter, or digit people want to use online. In other words, it’s the missing link between how you read text on a computer, and how the computer reads text. For example, while you are looking at an empty space between these words, the computer sees “&mbsp.” + +Unicode even has its own [primitive emoji][5] that can be read in the browser without any effort on your part. For example while you see a ♥, your computer is decoding the string “2665.” + +To use Twitter’s emoji library in most cases, you simply need to add a script inside the section of your HTML page: + + + +This grants your project access to the JavaScript library that contains the hundreds of emoji that work on Twitter. However, creating a document with simply this script isn’t going to make emoji appear on your site. You also need to actually insert some emoji! + +In the section, paste a few of the emoji strings you can find in Twitter’s [preview.html source code][6]. I used 🎹 and 🏁 without really knowing how they'd appear in the browser window. Yeah, you’ll have to just paste and guess. You can already see the problem we're going to fix in section two. + +However, through some trial and error, you can turn a raw HTML file that looks like this— + +![](http://a4.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2ODQyNTMzNTQ1OTk0.png) + +—into a webpage that looks something like this: + +![](http://a1.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2ODExNjYzNDU1NTA2.png) + +### Convert Emoji Into Readable Language ### + +Twitter’s solution is all well and good for making a site or app emoji compliant. But if you want to be able to easily insert your favorite emoji at will via HTML, you’re going to need an easier solution than memorizing all those Unicode strings. + +That’s where programmer Elle Kasai’s [Twemoji Awesome][7] styles come in. + +By adding Elle’s open-source stylesheet to any webpage, you can use English words to understand which emoji you’re inserting. So if you want a heart emoji to show up, you can simply type this : + + + +In order to do this, let’s download Elle’s project with the “Download ZIP” button on GitHub. + +Next, let’s make a new folder on the desktop. Inside this folder, we’ll put emoji.html—the raw HTML file I showed you before, and also Elle’s [twemoji-awesome.css][8]. + +We’ll need the HTML file to acknowledge the CSS file, so in the section of the html page you’ll want to add a link from the css file: + + + +Once you put this in, you can delete Twitter's script from before. Elle's styles each link to the Unicode string for the relevant emoji, so you no longer have to. + +Now, go down to the body section and add a few emoji. I used , , and . + +You'll end up with something like this: + +![](http://a2.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2ODcyMDYxNDU2MzU0.png) + +Save and view your creation in the browser: + +![](http://a1.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2ODExOTMxODkwOTYy.png) + +Ta-da! Not only have you gotten a basic webpage to support emoji in the browser, you’ve also made it easy to do. Feel free to check out this tutorial on [my GitHub][9] for actual files you can clone instead of screenshots. + +Lead image via [Get Emoji][10]; screenshots by Lauren Orsini + +-------------------------------------------------------------------------------- + +via: http://readwrite.com/2014/11/12/how-to-use-emoji-in-the-browser-window + +作者:[Lauren Orsini][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://readwrite.com/author/lauren-orsini +[1]:https://blog.twitter.com/2014/open-sourcing-twitter-emoji-for-everyone +[2]:http://www.unicode.org/reports/tr51/full-emoji-list.html +[3]:https://twitter.com/iconfactory +[4]:https://github.com/twitter/twemoji +[5]:http://www.unicode.org/reports/tr51/full-emoji-list.html +[6]:https://github.com/twitter/twemoji/blob/gh-pages/preview.html +[7]:http://ellekasai.github.io/twemoji-awesome/ +[8]:https://github.com/ellekasai/twemoji-awesome/blob/gh-pages/twemoji-awesome.css +[9]:https://github.com/laurenorsini/Emoji-Everywhere +[10]:http://getemoji.com/ \ No newline at end of file From a27517b986cc56d66b7e25a88d46708bd68a6a18 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 14 Nov 2014 14:46:36 +0800 Subject: [PATCH 187/316] PUB:20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform @Vic020 --- ... Images Arrive on Google Cloud Platform.md | 30 +++++++++++++++++++ ... Images Arrive on Google Cloud Platform.md | 30 ------------------- 2 files changed, 30 insertions(+), 30 deletions(-) create mode 100644 published/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md delete mode 100644 translated/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md diff --git a/published/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md b/published/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md new file mode 100644 index 0000000000..ae09f3adc3 --- /dev/null +++ b/published/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md @@ -0,0 +1,30 @@ +最新版本的 Ubuntu 在 Google 云平台上架 +================================================================================ +![](http://ostatic.com/files/images/ubuntu_image_5.png) + +自从Canonical和Google合作后,Canonical宣布已经在Google云平台发布Ubuntu14.04LTS、12.04LTS和14.10的公开beta版本。“从今天起,可以在Google云平台上选择优化过的、最新的、十分安全和一致的Ubuntu镜像”Canonical的公告称,“Canonical将会继续地维护、测试和更新认证的Ubuntu镜像,在官方版本发布后,Google云平台马上就会拥有最新版本”。 + +Ubuntu 在云环境和作为云分发基础中已经日益流行,因此为Google云平台提供镜像可以吸引更多的用户。 + +对于所有Ubuntu LTS版本,Canonical会为之提供维护和安全更新5年的版本,这些会吸引更多的Canonical已经日益重视的企业级用户。 + +领先的开源云管理平台Scalr的创始人Sebastian Stadil说道:“官方Ubuntu镜像的缺乏已经阻止我们部分迁移我们的基础设施到Google云平台,我们很高兴看到Ubuntu技术提供给我们所有企业客户。” + +认证公有云(CPC) 的项目经理Federico Lucifredi 提到:“越来越多的企业开始创业,从而转向公有云环境来运行大量的关键的向外扩展的工作负载,Google作为全球领先的竞争者之一,Google 云平台已经快速建成。给Google云平台增加Ubuntu镜像是顺理成章的一步,我们确信这样的合作在开发者和企业部署云时,便于寻找到一个易于使用和信赖的操作系统。” + +通过Canonical得知,在作为所有公有云的操作系统选择上,Ubuntu事实上已经有显著业绩,70%的工作负载运行在Ubuntu上。据OpenStack基金会消息,Ubuntu已经是OpenStack部署的基础。 + +浏览[Google Cloud Platform][1]获得更多信息。 + +-------------------------------------------------------------------------------- + +via: http://ostatic.com/blog/the-latest-ubuntu-images-arrive-on-google-cloud-platform + +作者:[Sam Dean][a] +译者:[Vic020/VicYu](http://www.vicyu.net) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ostatic.com/member/samdean +[1]:https://cloud.google.com/compute/docs/operating-systems diff --git a/translated/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md b/translated/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md deleted file mode 100644 index 8c303317a7..0000000000 --- a/translated/news/20141105 The Latest Ubuntu Images Arrive on Google Cloud Platform.md +++ /dev/null @@ -1,30 +0,0 @@ -最新版本Ubuntu到达Google云平台 -================================================================================ -![](http://ostatic.com/files/images/ubuntu_image_5.png) - -自从Canonical和Google合作后,Canonical宣布已经在Google云平台发布Ubuntu14.04LTS、12.04LTS和14.10的公共beta版本。“从今天起,可以在Google云平台上选择优化的、最新的、充满安全和一致的Ubuntu镜像”Canonical推送道,并且接着说道:"Canonical将会继续地维持、测试和更新认证的Ubuntu镜像,官方版本发布后几分钟内,Google云平台就会拥有最新版本" - -在云和部署云的基础操作系统中,Ubuntu已经展示出一个日益流行的平台,因此为Google云平台提供可以吸引更多的用户。 - -对于所有Ubuntu LTS版本,Canonical会为之提供维护和安全更新5年的版本,这些版本会吸引更多的企业级用户,Canonical已经日益重视。 - -领先的开源云管理平台的创始人,Sebastian Stadil说道:“官方Ubuntu镜像的缺乏已经阻止我们部分迁移我们的基础设施到Google云平台,我们很高兴看到Ubuntu技术提供给我们所有企业客户。” - -Federico Lucifredi,认证公有云(CPC)项目经理,在文档中提到:“因为更多的企业加入创业,从而转向公有云环境来运行大量的关键的向外扩展的工作负载,Google云平台为这项业务已经快速建立它作为全球领先的竞争者之一。带来Ubuntu镜像给Google云平台是合乎逻辑的一步,这样使我们相信将会有一个这样合作,它有利于开发者和企业为他们部署云寻找到一个易于使用和信赖的操作系统。” - -通过Canonical得知,在作为所有公有云的操作系统选择上,Ubuntu事实上已经有显著业绩,70%的工作负载运行在Ubuntu上。从OpenStack基金会也可知,Ubuntu已经是OpenStack部署的基础。 - -浏览[Google Cloud Platform][1]获得更多信息。 - --------------------------------------------------------------------------------- - -via: http://ostatic.com/blog/the-latest-ubuntu-images-arrive-on-google-cloud-platform - -作者:[Sam Dean][a] -译者:[Vic020/VicYu](http://www.vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://ostatic.com/member/samdean -[1]:https://cloud.google.com/compute/docs/operating-systems From 583a235bb4410e3e95241714b0d8fd574b5cf515 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 14 Nov 2014 15:15:24 +0800 Subject: [PATCH 188/316] PUB:How to create a site-to-site IPsec VPN tunnel using Openswan in Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @SPccman 翻译的不错! --- ...Psec VPN tunnel using Openswan in Linux.md | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) rename {translated/tech => published}/How to create a site-to-site IPsec VPN tunnel using Openswan in Linux.md (73%) diff --git a/translated/tech/How to create a site-to-site IPsec VPN tunnel using Openswan in Linux.md b/published/How to create a site-to-site IPsec VPN tunnel using Openswan in Linux.md similarity index 73% rename from translated/tech/How to create a site-to-site IPsec VPN tunnel using Openswan in Linux.md rename to published/How to create a site-to-site IPsec VPN tunnel using Openswan in Linux.md index 2a340add61..d5ba37285a 100644 --- a/translated/tech/How to create a site-to-site IPsec VPN tunnel using Openswan in Linux.md +++ b/published/How to create a site-to-site IPsec VPN tunnel using Openswan in Linux.md @@ -1,8 +1,8 @@ -在Linux中使用Openswan搭建站点到站点IPsec VPN 隧道 +在Linux中使用Openswan搭建站点到站点的IPsec VPN 隧道 ================================================================================ -虚拟私有网络(VPN)隧道通过Internet隧道技术将两个不同地理位置的网络安全的连接起来。当这两个网络是使用私有IP地址的私有局域网络时,那么两个网络之间是不能相互访问的,这时使用隧道技术就可以使得子网间的主机进行通讯。例如,VPN隧道技术经常被用于大型机构中不同办公区域子网的连接。 +虚拟私有网络(VPN)隧道是通过Internet隧道技术将两个不同地理位置的网络安全的连接起来的技术。当两个网络是使用私有IP地址的私有局域网络时,它们之间是不能相互访问的,这时使用隧道技术就可以使得两个子网内的主机进行通讯。例如,VPN隧道技术经常被用于大型机构中不同办公区域子网的连接。 -有时,使用VPN隧道仅仅是因为它很安全。服务提供商与公司会使用这样一种方式设网络,他们将重要的服务器(如,数据库,VoIP,银行服务器)放置到一个子网内,仅仅让有权限的用户通过VPN隧道进行访问。如果需要搭建一个安的VPN隧道,通常会选用[IPsec][1],因为IPsec VPN隧道被多重安全层所保护。 +有时,使用VPN隧道仅仅是因为它很安全。服务提供商与公司会使用这样一种方式架设网络,他们将重要的服务器(如,数据库,VoIP,银行服务器)放置到一个子网内,仅仅让有权限的用户通过VPN隧道进行访问。如果需要搭建一个安全的VPN隧道,通常会选用[IPsec][1],因为IPsec VPN隧道被多重安全层所保护。 这篇指导文章将会告诉你如何构建站点到站点的 VPN隧道。 @@ -58,17 +58,18 @@ 最后,我们为NAT创建防火墙规则。 # iptables -t nat -A POSTROUTING -s site-A-private-subnet -d site-B-private-subnet -j SNAT --to site-A-Public-IP -确保防火墙规则的健壮性。 + +请确保上述防火墙规则是持久有效的(LCTT 译注:你可以save这些规则或加到启动脚本中)。 #### 注意: #### -- 你可以使用MASQUERAD替代SNAT(iptables).理论上说它也能正常工作,但是有可能会与VPS发生冲突,所以我任然建议使用SNAT. +- 你可以使用MASQUERAD替代SNAT(iptables)。理论上说它也能正常工作,但是有可能会与VPS发生冲突,所以我仍然建议使用SNAT。 - 如果你同时在管理B点,那么在B点也设置同样的规则。 - 直连路由则不需要SNAT。 -### 准配置文件 ### +### 准备配置文件 ### -我们将要用配置的第一个文件是ipsec.conf。不论你将要配置哪一台服务器,总是将你这端的服务器看成是左边的,而将远端的看作是右边的。以下配置是在站点A的VPN服务器做的。 +我们将要用来配置的第一个文件是ipsec.conf。不论你将要配置哪一台服务器,总是将你这端的服务器看成是左边的,而将远端的看作是右边的。以下配置是在站点A的VPN服务器做的。 # vim /etc/ipsec.conf @@ -130,7 +131,7 @@ right= rightsubnet=/netmask -有许多方式实现身份验证。这里使用预共享密钥,并将它添加到文件 file /etc/ipsec.secrets。 +有许多方式实现身份验证。这里使用预共享密钥,并将它添加到文件 /etc/ipsec.secrets。 # vim /etc/ipsec.secrets @@ -148,10 +149,10 @@ 如果所有服务器没有问题的话,那么可以打通隧道了。注意以下内容后,你可以使用ping命令来测试隧道。 -1.A点不可达B点的子网,当隧道没有启动时ping无效。 -1.隧道启动后,在A点直接ping B点的子网IP。是可以ping通的。 +1. A点不可达B点的子网,当隧道没有启动时ping不通。 +1. 隧道启动后,在A点直接ping B点的子网IP,是可以ping通的。 -并且,到达目的子网的路由也会出现在服务器的路由表中。(译者:子网指的是site-B,服务器指的是site-A) +并且,到达目的子网的路由也会出现在服务器的路由表中。(LCTT译注:这里“子网”指的是site-B,“服务器”指的是site-A) # ip route @@ -192,21 +193,23 @@ 如果你确信所有配置都是正确的,但是你的隧道任然无法启动,那么你需要检查以下的事件。 -1.很多ISP会过滤IPsec端口。确认你的网络ISP允许使用UDP 500, TCP/UDP 4500端口。你可以试着在远端通过talnet连接服务器的IPsec端口。 -1.确认所用的端口在服务器防火墙规则中是允许的。 -1.确认两端服务器的预共享密钥是一致的。 -1.左边和右边的参数应该正确配置在两端的服务器上 -1.如果你遇到的是NAT问题,试着使用SNAT替换MASQUERADING。 +1. 很多ISP会过滤IPsec端口。确认你的网络ISP允许使用UDP 500, TCP/UDP 4500端口。你可以试着在远端通过telnet连接服务器的IPsec端口。 +1. 确认所用的端口在服务器防火墙规则中是允许的。 +1. 确认两端服务器的预共享密钥是一致的。 +1. 左边和右边的参数应该正确配置在两端的服务器上 +1. 如果你遇到的是NAT问题,试着使用SNAT替换MASQUERADING。 -总结,这篇指导重点在于使用Openswa搭建站点到站点IPsec VPN的流程。管理员可以使用VPN使得一些重要的资源仅能通过隧道来获取,这对于加强安全性很有效果。同时VPN确保数据不被监听以及截。 +总结,这篇指导重点在于使用Openswan搭建站点到站点IPsec VPN的流程。管理员可以使用VPN使得一些重要的资源仅能通过隧道来获取,这对于加强安全性很有效果。同时VPN确保数据不被监听以及劫持。 希望对你有帮助。让我知道你的意。 +--- + via: http://xmodulo.com/2014/08/create-site-to-site-ipsec-vpn-tunnel-openswan-linux.html 作者:[Sarmed Rahman][a] 译者:[SPccman](https://github.com/SPccman) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 39315d922afa1bb1371f7ff4cf2d1e0bb7619536 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 14 Nov 2014 15:43:33 +0800 Subject: [PATCH 189/316] PUB:20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux @wangjiezhe --- ...hange character encoding of a text file on Linux.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md (73%) diff --git a/translated/tech/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md b/published/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md similarity index 73% rename from translated/tech/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md rename to published/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md index a2bec2833b..bdba913853 100644 --- a/translated/tech/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md +++ b/published/20141022 Linux FAQs with Answers--How to change character encoding of a text file on Linux.md @@ -1,8 +1,8 @@ -Linux 有问必答 -- 在 Linux 如何更改文本文件的字符编码 +Linux 有问必答:在 Linux 如何更改文本文件的字符编码 ================================================================================ -> **问题**:在我的 Linux 系统中有一个编码为 iso-8859-1 的字幕文件,其中部分字符无法正常显示,我想把文本改为 utf8 编码。在 Linux 张, 有没有一个好的工具来转换文本文件的字符编码? +> **问题**:在我的 Linux 系统中有一个编码为 iso-8859-1 的字幕文件,其中部分字符无法正常显示,我想把文本改为 utf8 编码。在 Linux 中, 有没有一个好的工具来转换文本文件的字符编码? -正如我们所知道的那样,电脑只能够处理低级的二进制数字,并不能直接处理字符。当一个文本文件被存储时,文件中的每一个字符都被映射成二进制数字,实际存储在硬盘中的正是这些“二进制数字”。之后当程序打开文本文件时,所有二进制数字都被读入并映射回原始的可读字符。只有当所有需要访问这个文件的程序都能够“理解”它的编码,即二进制数字到字符的映射时,这个“保存和打开”的过程才能很好地完成,这也确保了可理解数据的往返过程。 +正如我们所知道的那样,电脑只能够处理低级的二进制值,并不能直接处理字符。当一个文本文件被存储时,文件中的每一个字符都被映射成二进制值,实际存储在硬盘中的正是这些“二进制值”。之后当程序打开文本文件时,所有二进制值都被读入并映射回原始的可读字符。只有当所有需要访问这个文件的程序都能够“理解”它的编码,即二进制值到字符的映射时,这个“保存和打开”的过程才能很好地完成,这也确保了可理解数据的往返过程。 如果不同的程序使用不同的编码来处理同一个文件,源文件中的特殊字符就无法正常显示。这里的特殊字符指的是非英文字母的字符,例如带重音的字符(比如 ñ,á,ü)。 @@ -20,7 +20,7 @@ Linux 有问必答 -- 在 Linux 如何更改文本文件的字符编码 ### 步骤二 ### -下一步是查看你的 Linux 系统所支持的文件编码种类。为此,我们使用名为 iconv 短工具及 “-l” 选项(L 的小写)来列出所有当前支持的编码。 +下一步是查看你的 Linux 系统所支持的文件编码种类。为此,我们使用名为 iconv 的工具及 “-l” 选项(L 的小写)来列出所有当前支持的编码。 $ iconv -l @@ -47,6 +47,6 @@ iconv 工具是 GNU libc 库组成部分,因此它在所有 Linux 发行版中 via: http://ask.xmodulo.com/change-character-encoding-text-file-linux.html 译者:[wangjiezhe](https://github.com/wangjiezhe) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a0d2afdfc26cb58055f5ea3858bc92fe3dc25151 Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Fri, 14 Nov 2014 21:58:47 +0800 Subject: [PATCH 190/316] [Translating] Ubuntu MATE 14.04 LTS Now Available to Download --- .../20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md b/sources/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md index 59614afd07..75070ee10f 100644 --- a/sources/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md +++ b/sources/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md @@ -1,3 +1,5 @@ +Translating----geekpi + Ubuntu MATE 14.04 LTS Now Available to Download ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/ubuntu-mate-lts.jpg) From a5d7a6fa3a567fa33b54b03532ee4a4459dc9204 Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Fri, 14 Nov 2014 22:26:23 +0800 Subject: [PATCH 191/316] [Translated] Ubuntu MATE 14.04 LTS Now Available to Download --- ...ATE 14.04 LTS Now Available to Download.md | 47 ------------------- ...ATE 14.04 LTS Now Available to Download.md | 45 ++++++++++++++++++ 2 files changed, 45 insertions(+), 47 deletions(-) delete mode 100644 sources/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md create mode 100644 translated/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md diff --git a/sources/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md b/sources/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md deleted file mode 100644 index 75070ee10f..0000000000 --- a/sources/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md +++ /dev/null @@ -1,47 +0,0 @@ -Translating----geekpi - -Ubuntu MATE 14.04 LTS Now Available to Download -================================================================================ -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/ubuntu-mate-lts.jpg) - -**Fans of the traditional desktop can rejoice, as the first long-term support release of Ubuntu MATE is now live and available for download.** - -The community flavor uses the GNOME 2-based MATE desktop environment, which while forked continues to see active development and improvements made. Ubuntu MATE 14.04 LTS follows on from version 14.10, released last month. - -### Retrospective Gap Filling ### - -Now, at this point you’re probably wondering if I’ve made a typo (I’m Joey Sneddon; that is a near certainty). But in this instance, no; you read correct. The Ubuntu MATE team has decided to retrospectively create an LTS release. - -**Ubuntu MATE 14.04 LTS** should really be called Ubuntu MATE 14.11 LTS. Not just because it has been released in November, but because its code base is more of a mix of 14.04 and 14.10, [as project lead Martin Wimpress notes][1]: - -> “This release is unusual in that it is based on Ubuntu MATE 14.10 but adds a number of new features and fixes many bugs. Although this is a 14.04 release you can consider it a newer version than 14.10[...]“ - -Like other community flavors Ubuntu MATE 14.04 is supported on the desktop for at least the next three years, but should also get critical security fixes through the duration of its parent. - -**Changes from 14.10** includes the following: - -- Theme & Wallpaper updates -- Two new apps: MATE Menu and MATE Tweak -- Accessibility improvements -- VLC replaces Totem as video player -- Various MATE desktop package updates - -### Downloads ### - -More details, including links to hardware requirements and support information, can be found on the official website, as can the download links I know you’re itching to click. - -- [Download Ubuntu MATE 14.04 LTS][2] - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2014/11/ubuntu-mate-14-04-download-released - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://ubuntu-mate.org/blog/ubuntu-mate-trusty-final-release/ -[2]:https://ubuntu-mate.org/longterm/ \ No newline at end of file diff --git a/translated/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md b/translated/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md new file mode 100644 index 0000000000..2693a1a1af --- /dev/null +++ b/translated/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md @@ -0,0 +1,45 @@ +Ubuntu MATE 14.04 LTS 现在可以下载了 +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/ubuntu-mate-lts.jpg) + +**传统桌面的粉丝现在可以庆幸Ubuntu MATE的第一个长期支持版本现在发布并且可以下载了** + +这个社区使用基于GNOME2 的MATE桌面环境,这个分支还继续着积极的开发和提升。Ubuntu MATE 14.04 LTS跟随着上月发布的Ubuntu 14.10一起发布了。 + +### 回顾间隙填充 ### + +你大概会想我是不是打错了(我是Joey Sneddon,这大概可以肯定)。但这时可以肯定,你看到的是对的。Ubuntu MATE团队决定追溯创建一个LTS版本 + +**Ubuntu MATE 14.04 LTS** 确切地应该叫Ubuntu MATE 14.11 LTS。[如项目领导者 Martin Wimpress 注明的][1]:不只是因为他在11月分发布,还因为它混合了14.04和14.10的代码。 + +> “该版本并不寻常,它虽然基于Ubuntu MATE 14.10 但是加入了很多新的特性,并且修复了很多bug。虽然这是一个14.04版本,但是你可以认为它是一个比14.10 更新的版本。” + +如其他社区一样,Ubuntu MATE 14.04也将至少支持接下来的三年,但是应该同样应该会得到来自上游的严重安全更新。 + +**14.10 的改变** 包括: + +- 主题和壁纸更新 +- T两个新的应用: MATE Menu 和 MATE Tweak +- 辅助功能提升 +- VLC 代替了 Totem 作为视频播放器 +- 不同的 MATE 桌面包更新 + +### 下载 ### + +要知道更多细节,包含硬件需求和支持信息,可以在官方网站上找到,也可以点击下面的链接。 + +- [下载 Ubuntu MATE 14.04 LTS][2] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/ubuntu-mate-14-04-download-released + +作者:[Joey-Elijah Sneddon][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://ubuntu-mate.org/blog/ubuntu-mate-trusty-final-release/ +[2]:https://ubuntu-mate.org/longterm/ \ No newline at end of file From 4145de83a16401f0ddb6c49477a51b32cacaf4e1 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sat, 15 Nov 2014 14:03:52 +0800 Subject: [PATCH 192/316] =?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 --- ...DB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md b/translated/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md index 892a3132a9..649fe6d357 100644 --- a/translated/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md +++ b/translated/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md @@ -20,7 +20,7 @@ sudo apt-get install nginx 用下面的命令启用Nginx服务: - + sudo service nginx start ### 测试nginx ### From 9fdd62f8f0525e4c25e3297bf0bad42d79055520 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sat, 15 Nov 2014 15:17:25 +0800 Subject: [PATCH 193/316] =?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 --- ...dmin) On Ubuntu 14.10 or 14.04 or 13.10.md | 89 ++++++++++--------- 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/translated/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md b/translated/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md index 649fe6d357..f30b5f7dfa 100644 --- a/translated/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md +++ b/translated/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md @@ -1,12 +1,15 @@ -在Ubuntu 14.10/14.04/13.10上安装LEMP服务(Nginx,MySQL或MariaDB,PHP和phpMyAdmin) +在 Ubuntu 14.10/14.04/13.10 上安装 LEMP 服务(Nginx,MySQL 或 MariaDB,PHP 和 phpMyAdmin) ================================================================================ -**LEMP**是一个操作系统和几个开源软件包的合称。缩写LEMP来自**L**inux,Nginx(发音是**e**ngine-x)HTTP服务器,**M**ySQL数据库,和**P**HP/**P**erl/**P**ython的首字母。 -在这篇教程里,让我们看一下如何在Ubuntu 14.10上安装Nginx,MySQL或MariaDB,PHP和phpMyAdmin。 +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/lemp.jpg) + +**LEMP**是一个操作系统和几个开源软件包的合称。缩写LEMP来自 **L** inux,Nginx(发音是 **e** ngine-x)HTTP服务器, **M** ySQL数据库,和 **P** HP/ **P** erl/ **P** ython的首字母。 + +在这篇教程里,让我们看一下如何在 Ubuntu 14.10 上安装 Nginx,MySQL 或 MariaDB,PHP 和 phpMyAdmin。 ### 安装Nginx ### -**Nginx** (发音是engine-x)是一个免费的、开源的、高性能HTTP服务器和反向代理,也可以用作IMAP/POP3代理服务器,由Igor Sysoev开发。 +**Nginx** (发音是engine-x)是一个免费的、开源的、高性能HTTP服务器和反向代理,也可以用作IMAP/POP3代理服务器,它是由Igor Sysoev开发。 要安装Nginx,在你的终端里输入下面的命令: @@ -23,23 +26,23 @@ sudo service nginx start -### 测试nginx ### +### 测试 nginx ### 打开你的浏览器访问http://IP地址/或者http://localhost/。将可以看到类似下面的截图。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Welcome-to-nginx-Mozilla-Firefox_005.png) -### 配置Nginx ### +### 配置 Nginx ### 用任意文本编辑器打开文件**/etc/nginx/nginx.conf** sudo nano /etc/nginx/nginx.conf -设置worker_processes(例如,你系统里CPU数目)。查看CPU数目,可以使用命令“lscpu”。在我这里是“1”。所以我把这个值设为1。 +设置 worker_processes(例如,你系统里CPU数目)。查看CPU数目,可以使用命令“lscpu”。在我这里是“1”。所以我把这个值设为1。 worker_processes 1; -重启Nginx服务: +重启 Nginx 服务: sudo service nginx restart @@ -65,7 +68,7 @@ - **listen 80;** –> 监听ipv4端口 - **listen [::]:80 default_server ipv6only=on;** –> 监听ipv6宽口 -- **root /usr/share/nginx/html;** –> 网站根目录 +- **root /usr/share/nginx/html;** –> 文件根目录 - **server_name server.unixmen.local;** –> 服务器FQDN 现在,向下滚动找到区域#location **~ \.php$**。去掉注释并按如下修改: @@ -87,7 +90,7 @@ 保存文件并退出。 -### 测试nginx配置 ### +### 测试 nginx 配置 ### 使用下面的命令测试nginx配置是否存在语法错误: @@ -102,9 +105,9 @@ sudo service nginx restart -### 安装MySQL ### +### 安装 MySQL ### -**MySQL**是一个关系型数据库管理系统(RDBMS),作为服务启动提供给多用户访问多种数据库,尽管可能大多集成布置的SQLite。 +**MySQL**是一个关系型数据库管理系统(RDBMS),作为服务启动提供给多用户访问多种数据库,尽管SQLite可能有更多的嵌入式部署。 sudo apt-get install mysql-server mysql-client @@ -118,7 +121,7 @@ 现在,MySQL服务器就安装好了。 -你可以用下面的命令检查MySQL服务器状态: +你可以用下面的命令检查 MySQL 服务器状态: sudo service mysql status @@ -128,11 +131,11 @@ **注意**:如果你希望使用MariaDB而不是MySQL,可以参考下面的步骤。 -### 安装MariaDB ### +### 安装 MariaDB ### -**MariaDB**是MySQL的一个直接替代软件。它是一个稳定的、可扩展的和可靠的SQL服务器,包含许多增强功能。 +**MariaDB**是 MySQL 的一个直接替代软件。它是一个稳定、可扩展又可靠的SQL服务器,包含许多增强功能。 -首先,如果有的话你得先卸载掉MySQL。要完全卸载MySQL包括配置文件,输入如下命令: +首先,如果有的话你得先卸载掉 MySQL。要完全卸载 MySQL 包括配置文件,输入如下命令: sudo apt-get purge mysql* @@ -144,7 +147,7 @@ sudo apt-get install mariadb-server mariadb-client -另外,如果你希望体验最新版的MariaDB的话,可以从[MariaDB仓库][1]安装。运行下面的命令添加PPA。在写这篇文章的时候,MariaDB PPA还没有更新Ubuntu 14.10。不过,我们还是可以使用Ubuntu 14.04的仓库。 +另外,如果你希望体验最新版的MariaDB,可以从[MariaDB仓库][1]安装。运行下面的命令添加PPA。在写这篇文章的时候,MariaDB PPA还没有更新 Ubuntu 14.10。不过,我们还是可以使用 Ubuntu 14.04 的仓库来替代。 sudo apt-get install software-properties-common sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db @@ -163,11 +166,11 @@ ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_004.png) -点击‘是’迁移到MariaDB。注意一下,如果在安装MariaDB之前没有装过MySQL的话,不会提示你这个问题。 +点击‘是’迁移到 MariaDB。注意一下,如果在安装MariaDB之前没有装过 MySQL 的话,不会提示你这个问题。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_005.png) -你可以用如下命令检查MariaDB版本: +你可以用如下命令检查 MariaDB 版本: sudo mysql -v -u root -p @@ -199,9 +202,9 @@ Threads: 1 Questions: 566 Slow queries: 0 Opens: 330 Flush tables: 4 Open tables: 22 Queries per second avg: 4.014 -### 安装PHP ### +### 安装 PHP ### -**PHP**(PHP: Hypertext Preprocessor的递归缩写)是一个应用广泛的开源通用脚本语言,特别适合于网页开发,可以直接嵌入到HTML中。 +**PHP**(PHP: Hypertext Preprocessor的递归缩写)是一个应用广泛的开源通用脚本语言,特别适合于网页开发,可以直接嵌入到 HTML 中。 使用如下命令安装PHP: @@ -221,7 +224,7 @@ sudo service php5-fpm restart -### 测试PHP ### +### 测试 PHP ### 在nginx文档根目录下创建一个测试文件“testphp.php”。 @@ -235,7 +238,7 @@ 保存文件并退出。 -访问地址**http://server-ip-address/testphp.php**。将打印出所有关于php的信息,比如版本、构建日期以及命令等等。 +访问地址**http://server-ip-address/testphp.php**。将显示出所有关于 php 的信息,比如版本、构建日期以及命令等等。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/phpinfo-Mozilla-Firefox_0012.png) @@ -251,15 +254,15 @@ PHP-FPM会默认监听套接字**/var/run/php5-fpm.sock**。如果你希望PHP-F listen = 127.0.0.1:9000 -保存退出。重启php5-fpm服务。 +保存退出。重启 php5-fpm 服务。 sudo service php5-fpm restart -现在打开nginx配置文件: +现在打开 nginx 配置文件: sudo nano /etc/nginx/sites-available/default -找到这一行**fastcgi_pass unix:/var/run/php5-fpm.sock;**,参考下面把它改成fastcgi_pass 127.0.0.1:9000;。 +找到这一行**fastcgi_pass unix:/var/run/php5-fpm.sock;**,参考下面把它改成 fastcgi_pass 127.0.0.1:9000;。 location ~ \.php$ { try_files $uri =404; @@ -274,21 +277,21 @@ PHP-FPM会默认监听套接字**/var/run/php5-fpm.sock**。如果你希望PHP-F include fastcgi.conf; } -保存退出。最后重启nginx服务。 +保存退出。最后重启 nginx 服务。 sudo service nginx restart -### 使用phpMyAdmin管理MySQL数据库(可选) ### +### 使用 phpMyAdmin 管理 MySQL 数据库(可选) ### -**phpMyAdmin**是一个免费的开源网页界面工具,用来管理你的MySQL数据库。 +**phpMyAdmin**是一个免费的开源网页界面工具,用来管理你的 MySQL 数据库。 -### 安装phpMyAdmin ### +### 安装 phpMyAdmin ### -在Debian官方仓库里就有。所以可以用下面的命令安装: +在 Debian 官方仓库里就有。所以可以用下面的命令安装: sudo apt-get install phpmyadmin -选择一个网页服务器。默认情况下,这里不会显示nginx。所以,选择apache或者lighttpd,然后我们再把phpMyAdmin和nginx连接起来工作。 +选择一个网页服务器。默认情况下,这里不会显示 nginx。所以,选择 apache 或者 lighttpd,然后我们再把 phpMyAdmin 和 nginx 连接起来工作。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_007.png) @@ -300,7 +303,7 @@ PHP-FPM会默认监听套接字**/var/run/php5-fpm.sock**。如果你希望PHP-F ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_009.png) -输入phpmyadmin帐号的MySQL密码: +输入 phpmyadmin 帐号的 MySQL 密码: ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_010.png) @@ -308,31 +311,31 @@ PHP-FPM会默认监听套接字**/var/run/php5-fpm.sock**。如果你希望PHP-F ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/sk@server-_011.png) -phpMyAdmin的安装就完成了。 +phpMyAdmin 就安装完成了。 -创建一个phpMyAdmin的软连接到网站根目录。这里我们的网站跟文档目录是/usr/share/nginx/html/。 +创建一个 phpMyAdmin 的软连接到网站根目录。这里我们的网站根文档目录是/usr/share/nginx/html/。 sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/html -重启nginx服务。 +重启 nginx 服务。 sudo service nginx restart -### 访问phpMyAdmin网页控制台 ### +### 访问 phpMyAdmin 网页控制台 ### -现在你可以在浏览器中通过地址**http://server-ip-address/phpmyadmin/**访问phpMyAdmin的控制台了。 +现在你可以在浏览器中通过地址**http://server-ip-address/phpmyadmin/**访问 phpMyAdmin 的控制台了。 -输入你在前面步骤里留下的MySQL用户名和密码。在我这里是“root”和“ubuntu”。 +输入你在前面步骤里留下的 MySQL 用户名和密码。在我这里是“root”和“ubuntu”。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/phpMyAdmin-Mozilla-Firefox_0021.png) -就可以重定向到phpMyAdmin的网页管理首页。 +就可以重定向到 phpMyAdmin 的网页管理首页。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/192.168.1.100-localhost-phpMyAdmin-4.2.6deb1-Mozilla-Firefox_0031.png) -现在你就可以在phpMyAdmin网页里管理你的MyQL数据库了。 +现在你就可以在 phpMyAdmin 网页里管理你的 MyQL 数据库了。 -就这样。你的LEMP服务器已经配置完毕可以投入使用了。 +就这样。你的 LEMP 服务器已经配置完毕,可以使用了。 -------------------------------------------------------------------------------- @@ -340,7 +343,7 @@ via: http://www.unixmen.com/install-lemp-server-nginx-mysql-mariadb-php-phpmyadm 作者:[SK][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 39ebbecbd5acb148a71bd58ac96bdf4895368d7f Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sat, 15 Nov 2014 16:46:45 +0800 Subject: [PATCH 194/316] =?UTF-8?q?20141115-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ith 60 Bug Fixes v4.4 Shaping Up Nicely.md | 57 +++++ ...tem backup with backup-manager on Linux.md | 155 +++++++++++++ ...re some obscure but useful Vim commands.md | 212 ++++++++++++++++++ 3 files changed, 424 insertions(+) create mode 100644 sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md create mode 100644 sources/tech/20141115 How to perform system backup with backup-manager on Linux.md create mode 100644 sources/tech/20141115 What are some obscure but useful Vim commands.md diff --git a/sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md b/sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md new file mode 100644 index 0000000000..f7836709c5 --- /dev/null +++ b/sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md @@ -0,0 +1,57 @@ +LibreOffice 4.3.4 Released With 60 Bug Fixes, v4.4 Shaping Up Nicely +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2010/12/libreoffice.png) + +**Two weeks on [from the last][1], The Document Foundation is back with yet another minor release of its open-source LibreOffice productivity suite.** + +LibreOffice 4.3.4, the fourth such minor release in the ‘fresh’ series, is composed solely of bug fixes, which is par for the course in these point releases. + +Adding to the sense of deja vu is the number of bugs the foundation say have been caught in the developers’ butterfly net: around 60 or so. + +- Sorting behaviour now defaults to old style again (Calc) +- Restore focus window after preview (Impress) +- Chart wizard dialog no longer ‘cut off’ +- Word count with recorded changes fixed (Writer) +- Various RTF fixes, including image border import (Writer) + +A full list of changes can be [found on the LibreOffice Wiki page][2]. + +### Download ### + +Many folks have the whole LibreOffice schaboodle installed but rarely ever use it. If you count yourself among them, you could hold off on this release and never notice. + +If you do fancy upgrading you can find all of the relevant download links on the official project website. + +- [Download LibreOffice 4.3.4][3] + +### Looking Ahead to LibreOffice 4.4 ### + +![Info bar coming in LibreOffice 4.4](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/libreoffice-infobar.jpg) + +Info bar coming in LibreOffice 4.4 + +LibreOffice 4.4 should be a little more promising. + +[A wiki page details][4] the ongoing GUI tweaks in progress, with a new color picker, restyled paragraph line-spacing selector and an info bar to denote ‘read only’ mode among the many, many highlights. + +While the sum of these won’t amount to the huge wholesale interface changes I know the desktop community clamours for, they are sure-footed steps in the right direction. + +It’s also salient to remember that LibreOffice is a staple — in some cases integral — software for businesses and institutions. Any dramatic overhaul in look or layout would have a big knock on effect. + +Thanks Tim W! + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/libreoffice-4-3-4-arrives-bundle-bug-fixes + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgubuntu.co.uk/2014/10/libreoffice-4-3-3-released-62-bug-fixes +[2]:https://wiki.documentfoundation.org/Releases/4.3.4/RC1 +[3]:http://www.libreoffice.org/download/libreoffice-fresh/ +[4]:https://wiki.documentfoundation.org/ReleaseNotes/4.4#GUI \ No newline at end of file diff --git a/sources/tech/20141115 How to perform system backup with backup-manager on Linux.md b/sources/tech/20141115 How to perform system backup with backup-manager on Linux.md new file mode 100644 index 0000000000..1a85d13f45 --- /dev/null +++ b/sources/tech/20141115 How to perform system backup with backup-manager on Linux.md @@ -0,0 +1,155 @@ +How to perform system backup with backup-manager on Linux +================================================================================ +One thing that we all may have had the chance to learn in either easy or hard ways is that the importance of backups can never be underestimated. Considering that there are as many backup methods as the number of fish in the sea, you may wonder how you can effectively choose the right tool and strategy for your system. + +In this article I will introduce you to [backup-manager][1], a simple yet handy command-line backup tool which is available in the standard repositories of most Linux distributions. + +What makes backup-manager stand out among other backup tools or strategies? Let me mention just a few of its distinguishing features: + + +- **Simple design and management**: configuration file is easy to read and edit, even for beginners. +- **Set and forget**: can be scheduled to run through cron on a periodic basis. +- **Multi-protocol support for remote backup**: integrates seamlessly with various transfer protocols, applications and cloud backend (e.g., FTP, SCP, SSH-GPG, rsync, AWS S3) to transfer generated archives to a list of remote hosts. +- **Database backup support**: includes out-of-the-box support for backing up MySQL/MariaDB and PostgreSQL databases. +- **Encryption support**: supports GPG-based file encryption during backup. + +### Installing Backup-Manager on Linux ### + +Installation of backup-manager is quick and effortless since it is included in the base repositories of most Linux distributions. + +#### Debian, Ubuntu and their derivatives #### + + # aptitude install backup-manager + +During the installation process on Debian-based systems, you will be prompted to enter the directory where you want to store generated backup archives. If the chosen directory does not exist, it will be created automatically when you run backup-manager for the first time. + +Select OK and press ENTER. + +![](https://farm6.staticflickr.com/5614/15600105060_8cf4491e3b_z.jpg) + +In the next step, you will be asked to enter all the directories (separated by space) that you want to be backed up. It is advised, though not strictly required, to list several sub-directories of the same parent directory instead of entering only the parent directory. + +You can skip this step and configure the list of directories later using the variable BM_TARBALL_DIRECTORIES in the configuration file. Otherwise, feel free to add as many directories as you wish, and then choose OK: + +![](https://farm6.staticflickr.com/5610/15761238616_c9651fea1c_z.jpg) + +#### Fedora or CentOS/RHEL #### + + # yum install backup-manager + +On CentOS/RHEL, you will need to enable [EPEL repository][2] first before running the above yum command. + +### Configuring Backup-Manager ### + +The main configuration file for backup-manager is /etc/backup-manager.conf. This file is divided into sections where the backup methods and their associated variables (or "keys") are defined, making backup-manager a versatile tool that can be used in a wide variety of cases. + +For demonstration purposes, we will consider the following scenario: + +- Perform a full system backup of the /etc, /home, and /var/log directories on a weekly basis (we will set up the frequency later through cron). +- Transfer generated .tar.gz backup archives to a specific target directory in two different hosts, dev1 and dev3, over SSH. +- Back up a local MySQL database to the same destination hosts over SSH. + +Open /etc/backup-manager.conf with your favorite text editor and edit the following variables. Feel free to disregard the lines beginning with # if you want. They are provided only as explanatory comments in this article: + + # Specify the backup method(s) that will be used. + # tarball: takes a list of directories and builds the corresponding tarballs. + # mysql: archives MySQL databases using mysqldump. To restore the database, you # need to use the same tool manually. + export BM_ARCHIVE_METHOD="tarball mysql" + + # Where to store the backups. + export BM_REPOSITORY_ROOT="/var/archives" + + # The following directive indicates backup-manager to name + # the generated files after the directory that was backed up. + export BM_TARBALL_NAMEFORMAT="long" + + # Define the compression type for the generated files. + export BM_TARBALL_FILETYPE="tar.gz" + + # List the directories that you want to backup. + export BM_TARBALL_DIRECTORIES="/etc /home /var/log" + + # Exclude some subdirectories or file extensions. + export BM_TARBALL_BLACKLIST="/var/log/myotherapp.log *.mp3 *.mp4" + + # List the database(s) that you want to backup, separated by spaces. + export BM_MYSQL_DATABASES="mysql mybase wordpress dotclear phpbb2" + + # MySQL username. + export BM_MYSQL_ADMINLOGIN="root" + + # MySQL password for username. + export BM_MYSQL_ADMINPASS="mypassword" + + # Add support for DROP statements (optional). + export BM_MYSQL_SAFEDUMPS="true" + + # The hostname or IP address where the database(s) reside. + export BM_MYSQL_HOST="localhost" + + # Port where MySQL server is listening. + export BM_MYSQL_PORT="3306" + + # Compression type (optional). + export BM_MYSQL_FILETYPE="gzip" + + # Do not archive remote hosts, but only localhost. + BM_TARBALL_OVER_SSH="false" + + # User account for SSH upload. + export BM_UPLOAD_SSH_USER="root" + + # Absolute path of the user's private key for passwordless SSH login. + export BM_UPLOAD_SSH_KEY="/root/.ssh/id_rsa" + + # Remote hosts (make sure you have exported your public key to them): + export BM_UPLOAD_SSH_HOSTS="dev1 dev3" + + # Remote destination for uploading backups. If it doesn't exist, + # this directory will be created automatically the first time + # backup-manager runs. + export BM_UPLOAD_SSH_DESTINATION="/var/archives/backups/$HOSTNAME" + +### Running Backup-Manager ### + +To run backup-manager manually, type the following command. Optionally, you can add the '-v' flag in order to examine the process step by step, in a verbose way. + + # backup-manager + +The directories listed in BM_TARBALL_DIRECTORIES will be backed up in BM_REPOSITORY_ROOT as tarballs, and then transferred over SSH to hosts dev1 and dev3 specified in BM_UPLOAD_SSH_DESTINATION. + +![](https://farm8.staticflickr.com/7497/15761238646_945620d8b7_z.jpg) + +As can be seen in the above image, backup-manager during runtime creates a file named /root/.backup-manager_my.cnf with the MySQL password provided in BM_MYSQL_ ADMINPASS. That way, mysqldump can authenticate to a MySQL server without having to accept login password through the command line in plain-text format, which poses a security risk. + +### Running Backup-Manager through Cron ### + +Once you have decided what is the best day of the week (and the best time) to perform your weekly backup, you can have cron run backup-manager for you. + +Open root's crontab file (note that you must be logged on as root): + + # crontab -e + +Assuming that you want to run backup-manager on Sunday at 5:15 am, add the following line. + + 15 05 * * 0 /usr/sbin/backup-manager > /dev/null 2>&1 + +### Summary ### + +In this article we have shown how backup-manager is a simple, yet powerful and easy-to-use backup tool. There are several other options that you may want to consider in your backup strategy, so feel free to refer to the man page or to the user guide, which also contains several implementation examples and advice. + +Hope it helps. Feel free to leave your questions and comments below. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/linux-backup-manager.html + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:https://github.com/sukria/Backup-Manager +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file diff --git a/sources/tech/20141115 What are some obscure but useful Vim commands.md b/sources/tech/20141115 What are some obscure but useful Vim commands.md new file mode 100644 index 0000000000..24470b3121 --- /dev/null +++ b/sources/tech/20141115 What are some obscure but useful Vim commands.md @@ -0,0 +1,212 @@ +What are some obscure but useful Vim commands +================================================================================ +If my [latest post on the topic][1] did not tip you off, I am a Vim fan. So before some of you start stoning me, let me present you a list of "obscure Vim commands." What I mean by that is: a collection of commands that you might have not encountered before, but that might be useful to you. As a second disclaimer, I do not know which commands you might know and which one you find useful. So this list really is a collection of relatively less known Vim commands, but which can still probably be useful. + +### Saving a file and exiting ### + +I am a bit ashamed of myself for that one, but I only recently learned that the command + + :x + +is equivalent to: + + :wq + +which is saving and quitting the current file. + +### Basic calculator ### + +While in insert mode, you can press Ctrl+r then type '=' followed by a simple calculation. Press ENTER, and the result will be inserted in the document. For example, try: + + Ctrl+r '=2+2' ENTER + +![](https://farm8.staticflickr.com/7486/15543918097_fbcf33ee6b.jpg) + +And 4 will be inserted in the document. + +### Finding duplicate consecutive words ### + +When you type something quickly, it happens that you write a word twice in a row. Just like this this. This kind of error can fool anyone, even when re-reading yourself. Hopefully, there is a simple regular expression to prevent this. Use the search ('/' by default) and type: + + \(\<\w\+\>\)\_s*\1 + +This should display all the duplicate words. And for maximum effect, don't forget to place: + + set hlsearch + +in your .vimrc file to highlight all search hits. + +![](https://farm8.staticflickr.com/7531/15730650082_c2764857e2.jpg) + +### Abbreviations ### + +Probably one of the most impressive tricks, you can define abbreviations in Vim, which will replace what you type with somethig else in real time. The syntax is the following: + + :ab [abbreviation] [what to replace it with] + +The generic example is: + + :ab asap as soon as possible + +Which will replace "asap" with "as soon as possible" as you write. + +### Save a file that you forgot to open as root ### + +This is maybe an all time favorite in the forums. Whenever you open a file that you do not have permission to write to (say a system configuration file for example) and make some changes, Vim will not save them with the normal command: ':w' + +Instead of redoing the changes after opening it again as root, simply run: + + :w !sudo tee % + +Which will save it as root directly. + +### Crypt your text on the go ### + +If you do not want someone to be able to read whatever is on your screen, Vim has the built in option to [ROT13][2]-encode your text with the following command: + + ggVGg? + +![](https://farm8.staticflickr.com/7487/15727174681_7773a97ea2.jpg) + +'gg' for moving the cursor to the first line of the Vim buffer, 'V' for entering visual mode, and 'G' for moving the cursor to the last line of the buffer. So 'ggVG' will make the visual mode cover the entire buffer. Finally 'g?' applies ROT13 encoding to the selected region. + +Notice that this should be mapped to a key for maximum efficiency. It also works best with alphabetical characters. And to undo it, the best is simply to use the undo command: 'u' + +### Auto-completion ### + +Another one to be ashamed of, but I see a lot of people around me not knowing it. Vim has by default an auto-completion features. Yes it is very basic, and can be enhanced by plugins, but it can still help you. The process is simple. Vim can try to guess the end of your word based on the word you wrote earlier. If you are typing the word "compiler" for the second time in the same file for example, just start typing "com" and still in insertion mode, press Ctrl+n to see Vim finish your word for you. Simple but handy. + +### Look at the diff between two files ### + +Probably a lot of you know about vimdiff command, which allows you to open Vim in split mode and compare two files with the syntax: + + $ vimdiff [file1] [file2] + +But the same result is achievable with the Vim command: + + :diffthis + +First open your initial file in Vim. Then open the second one in split mode with: + + :vsp [file2] + +Finally launch: + + :diffthis + +in the first buffer, switch buffer with Ctrl+w and type: + + :diffthis + +again. + +The two files will then be highlighted with focus on their differences. + +To turn the diff off, simply use: + + :diffoff + +### Revert the document in time ### + +Vim keeps track of the changes you make to a file, and can easily revert it to what it was earlier in time. The command is quite intuitive. For example: + + :earlier 1m + +will revert the document to what it was a minute ago. + +Note that you can inverse this with the command: + + :later + +### Delete inside markers ### + +Something that I always wanted to be comfortable doing when I started using Vim: easily delete text between brackets or parenthesis. Go to the first marker and simply use the syntax: + + di[marker] + +So for example, deleting between parenthesis would be: + + di( + +once your cursor is on the first parenthesis. For brackets or quotation marks, it would be: + + di{ + +and: + + di" + +### Delete until a specific maker ### + +A bit similar to deleting inside a marker but for different purpose, the command: + + dt[marker] + +will delete everything in between your cursor and the marker (leaving it safe) if the marker is found on the same line. For example: + + dt. + +will delete the end of your sentence, leaving the '.' intact. + +### Turn Vim into a hex editor ### + +This is not my favorite trick, but some might find it interesting. You can chain Vim and the xxd utility to convert the text into hexadecimal with the command: + + :%!xxd + +![](https://farm6.staticflickr.com/5607/15109142674_e99466f2db_z.jpg) + +And similarly, you can revert this with: + + :%!xxd -r + +### Place the text under your cursor in the middle of the screen ### + +Everything is in the title. If you want to force the screen to scroll and place whatever is under your cursor in the middle, use the command: + + zz + +in visual mode. + +### Jump to previous/next position ### + +When editing a very big file, it is frequent to make changes somewhere, and jump to another place right after. If you wish to jump back simply, use: + + Ctrl+o + +to go back to where you were. + +And similarly: + + Ctrl+i + +will revert such jump back. + +### Render the current file as a web page ### + +This will generate an HTML page displaying your text, and show the code in a split screen: + + :%Tohtml + +![](https://farm8.staticflickr.com/7550/15727174701_c405f85a84_z.jpg) + +Very basic but so fancy. + +To conclude, this list was assembled after reading some various forum threads and the [Vim Tips wiki][3], which I really recommend if you want to boost your knowledge about the editor. + +If you know any Vim command that you find useful and that you think most people do not know about, feel free to share it in the comments. As said in the introduction, an "obscure but useful" command is very subjective, but sharing is always good. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/useful-vim-commands.html + +作者:[Adrien Brochard][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/adrien +[1]:http://xmodulo.com/turn-vim-full-fledged-ide.html +[2]:https://en.wikipedia.org/wiki/ROT13 +[3]:http://vim.wikia.com/wiki/Vim_Tips_Wiki \ No newline at end of file From 9c837083cd08798f3427efd394701176db940971 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sat, 15 Nov 2014 17:17:43 +0800 Subject: [PATCH 195/316] =?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 --- ...iaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md (100%) diff --git a/translated/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md b/published/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md similarity index 100% rename from translated/tech/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md rename to published/20141104 Install LEMP Server (Nginx, MySQL or MariaDB, PHP And phpMyAdmin) On Ubuntu 14.10 or 14.04 or 13.10.md From 9bf201ed2f38fdd7485136510aec0a93659a958d Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 15 Nov 2014 22:38:27 +0800 Subject: [PATCH 196/316] PUB:20141022 Linux FAQs with Answers--How to fix sshd error--could not load host key @GOLinux --- ...swers--How to fix sshd error--could not load host key.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translated/tech/20141022 Linux FAQs with Answers--How to fix sshd error--could not load host key.md b/translated/tech/20141022 Linux FAQs with Answers--How to fix sshd error--could not load host key.md index 83c2dba40e..f30a6c904b 100644 --- a/translated/tech/20141022 Linux FAQs with Answers--How to fix sshd error--could not load host key.md +++ b/translated/tech/20141022 Linux FAQs with Answers--How to fix sshd error--could not load host key.md @@ -1,4 +1,4 @@ -Linux有问必答——如何修复“sshd error: could not load host key” +Linux有问必答:如何修复“sshd error: could not load host key” ================================================================================ > **问题**:当我尝试SSH到一台远程服务器时,SSH客户端登陆失败并提示“Connection closed by X.X.X.X”。在SSH服务器那端,我看到这样的错误消息:“sshd error: could not load host key.”。这发生了什么问题,我怎样才能修复该错误? @@ -23,7 +23,7 @@ Linux有问必答——如何修复“sshd error: could not load host key” ![](https://farm4.staticflickr.com/3931/15367231099_61b9087256_z.jpg) -如果SSH主机密钥在那里找不到,或者它们的大小被切短成为0(就像上面那样),你需要从头开始重新生成主机密钥。 +如果SSH主机密钥在那里找不到,或者它们的大小被截断成为0(就像上面那样),你需要从头开始重新生成主机密钥。 ### 重新生成SSH主机密钥 ### @@ -58,6 +58,6 @@ Linux有问必答——如何修复“sshd error: could not load host key” via: http://ask.xmodulo.com/sshd-error-could-not-load-host-key.html 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From fe89805981027804f0faab3ed385448e41984f1a Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 15 Nov 2014 22:38:45 +0800 Subject: [PATCH 197/316] PUB:20140928 How to turn your CentOS box into an OSPF router using Quagga @geekpi --- ...OS box into an OSPF router using Quagga.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) rename {translated/tech => published}/20140928 How to turn your CentOS box into an OSPF router using Quagga.md (83%) diff --git a/translated/tech/20140928 How to turn your CentOS box into an OSPF router using Quagga.md b/published/20140928 How to turn your CentOS box into an OSPF router using Quagga.md similarity index 83% rename from translated/tech/20140928 How to turn your CentOS box into an OSPF router using Quagga.md rename to published/20140928 How to turn your CentOS box into an OSPF router using Quagga.md index bfa2898e8c..544ea12a6d 100644 --- a/translated/tech/20140928 How to turn your CentOS box into an OSPF router using Quagga.md +++ b/published/20140928 How to turn your CentOS box into an OSPF router using Quagga.md @@ -1,8 +1,8 @@ -如何使用Quagga将CentOS放入OSPF路由器中 + 想玩路由器吗?使用 Quagga 将你的 CentOS 变成 OSPF 路由器 ================================================================================ -[Quagga][1]是一个可以将Linux放入支持如RIP、OSPF、BGP和IS-IS等主要路由协议的路由器的一个开源路由软件套件。它具有对IPv4和IPv6的完整规定,并支持路由/前缀过滤。Quagga可以是你生命中的救星,以防你的生产路由器一旦宕机,而你没有备用的设备而只能等待更换。通过适当的配置,Quagga甚至可以作为生产路由器。 +[Quagga][1]是一个开源路由软件套件,可以将Linux变成支持如RIP、OSPF、BGP和IS-IS等主要路由协议的路由器。它具有对IPv4和IPv6的完整支持,并支持路由/前缀过滤。Quagga可以是你生命中的救星,以防你的生产路由器一旦宕机,而你没有备用的设备而只能等待更换。通过适当的配置,Quagga甚至可以作为生产路由器。 -本教程中,我们将连接两个假设之间具有专线连接的分支机构网络(例如,192.168.1.0/24和172.17.1.0/24)。 +本教程中,我们将连接假设之间具有专线连接的两个分支机构网络(例如,192.168.1.0/24和172.17.1.0/24)。 ![](https://farm4.staticflickr.com/3861/15172727969_13cb7f037f_b.jpg) @@ -10,12 +10,12 @@ - **Site-A**: 192.168.1.0/24 - **Site-B**: 172.16.1.0/24 -- **Peering between 2 Linux boxes**: 10.10.10.0/30 +- **两个 Linux 路由器之间的对等网络**: 10.10.10.0/30 Quagga包括了几个协同工作的守护进程。在本教程中,我们将重点建立以下守护进程。 1. **Zebra**: 核心守护进程,负责内核接口和静态路由。 -1. **Ospfd**: IPv4 OSPF 守护进程. +1. **Ospfd**: IPv4 OSPF 守护进程。 ### 在CentOS上安装Quagga ### @@ -23,11 +23,11 @@ Quagga包括了几个协同工作的守护进程。在本教程中,我们将 # yum install quagga -在CentOS7,SELinux默认会阻止quagga将配置文件写到/usr/sbin/zebra。这个SELinux策略会干涉我们接下来要介绍的安装过程,所以我们要禁用此策略。对于这一点,无论是[关闭SELinux][2](这里不推荐),还是如下启用“zebra_write_config'。如果你使用的是CentOS 6的请跳过此步骤。 +在CentOS7,SELinux默认会阻止quagga将配置文件写到/usr/sbin/zebra。这个SELinux策略会干扰我们接下来要介绍的安装过程,所以我们要禁用此策略。对于这一点,无论是[关闭SELinux][2](这里不推荐),还是如下启用“zebra_write_config”都可以。如果你使用的是CentOS 6的请跳过此步骤。 # setsebool -P zebra_write_config 1 -如果没有这个改变,在我们尝试在Quagga命令行中保存配置的时候看到如下错误。 +如果没有做这个修改,在我们尝试在Quagga命令行中保存配置的时候看到如下错误。 Can't open configuration file /etc/quagga/zebra.conf.OS1Uu5. @@ -45,7 +45,7 @@ Quagga包括了几个协同工作的守护进程。在本教程中,我们将 # vtysh -首先,我们为Zebra被指日志文件。输入下面的命令进入vtysh的全局配置模式: +首先,我们为Zebra配置日志文件。输入下面的命令进入vtysh的全局配置模式: site-A-RTR# configure terminal @@ -117,7 +117,7 @@ Quagga包括了几个协同工作的守护进程。在本教程中,我们将 如果一切顺利,你应该可以在site-A的服务器上ping通site-B上的对等IP地址10.10.10.2了。 -注意一旦Zebra的守护进程启动了,在vtysh命令行中的任何改变都会立即生效。因此没有必要在更改配置后重启Zebra守护进程。 +注意:一旦Zebra的守护进程启动了,在vtysh命令行中的任何改变都会立即生效。因此没有必要在更改配置后重启Zebra守护进程。 ### 步骤 2: 配置OSPF ### @@ -157,7 +157,7 @@ Quagga包括了几个协同工作的守护进程。在本教程中,我们将 OSPF的邻居现在应该启动了。只要ospfd在运行,通过vtysh的任何OSPF相关配置的改变都会立即生效而不必重启ospfd。 -下一章节,我们会验证我们的Quagga设置。 +下一节,我们会验证我们的Quagga设置。 ### 验证 ### @@ -215,7 +215,7 @@ via: http://xmodulo.com/turn-centos-box-into-ospf-router-quagga.html 作者:[Sarmed Rahman][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1c2cfd196482685d729bab05b54dfe11726fbddc Mon Sep 17 00:00:00 2001 From: wangjiezhe Date: Sat, 15 Nov 2014 23:25:13 +0800 Subject: [PATCH 198/316] [translating]sources/tech/20141115 What are some obscure but useful Vim commands.md --- ...0141115 What are some obscure but useful Vim commands.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/tech/20141115 What are some obscure but useful Vim commands.md b/sources/tech/20141115 What are some obscure but useful Vim commands.md index 24470b3121..15cf1214d3 100644 --- a/sources/tech/20141115 What are some obscure but useful Vim commands.md +++ b/sources/tech/20141115 What are some obscure but useful Vim commands.md @@ -1,3 +1,5 @@ +wangjiezhe translating... + What are some obscure but useful Vim commands ================================================================================ If my [latest post on the topic][1] did not tip you off, I am a Vim fan. So before some of you start stoning me, let me present you a list of "obscure Vim commands." What I mean by that is: a collection of commands that you might have not encountered before, but that might be useful to you. As a second disclaimer, I do not know which commands you might know and which one you find useful. So this list really is a collection of relatively less known Vim commands, but which can still probably be useful. @@ -201,7 +203,7 @@ If you know any Vim command that you find useful and that you think most people via: http://xmodulo.com/useful-vim-commands.html 作者:[Adrien Brochard][a] -译者:[译者ID](https://github.com/译者ID) +译者:[wangjiezhe](https://github.com/wangjiezhe) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -209,4 +211,4 @@ via: http://xmodulo.com/useful-vim-commands.html [a]:http://xmodulo.com/author/adrien [1]:http://xmodulo.com/turn-vim-full-fledged-ide.html [2]:https://en.wikipedia.org/wiki/ROT13 -[3]:http://vim.wikia.com/wiki/Vim_Tips_Wiki \ No newline at end of file +[3]:http://vim.wikia.com/wiki/Vim_Tips_Wiki From 8b8c312d40c0b47dae2d46199e1b647e4bcfb57c Mon Sep 17 00:00:00 2001 From: Vic___ Date: Sat, 15 Nov 2014 23:34:31 +0800 Subject: [PATCH 199/316] translated --- ... Fix Docky Compositing Error In Lubuntu.md | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/sources/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md b/sources/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md index 192cb936cb..ec3b73a529 100644 --- a/sources/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md +++ b/sources/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md @@ -1,32 +1,30 @@ - Vic020 - -[Quick Tip] How To Fix Docky Compositing Error In Lubuntu +[Quick Tip]如何修复Lubuntu中的Docky混合错误 ================================================================================ -As you may know, **Docky** a is light weight application launcher in Unix/Linux like systems. I am a big fan of Lubuntu and Docky, because it doesn’t swallow all my system resources, so that I can use more application simultaneously. I use Docky application launcher in my production Laptop, powered by Lubuntu 14.04. +总所周知,**Docky**是Unix/Linux类系统中的轻量级应用启动器。我是 Lubuntu 和 Docky的忠实粉丝,因为他们不需要占用我的所有系统资源,这样就可以同时运行更多应用。我在笔记本上使用Docky应用启动器,系统为Lubuntu 14.04. -If you’re using LXDE distros, you may definitely encounter with composting error while using Docky. See the following screenshot. +但是,如果你使用LXDE发行版,你也许肯定遇到过使用Docky时报混合的错误。看下面的截图。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Docky.png) -If you didn’t enable compositing feature, you can’t use some of Docky’s features such as 3D background and Auto-hide. If you want to enable this features on Docky, you need to enable the Compositing feature in your LXDE systems. +如果不开启混合功能,就不能使用Docky一些特别功能,如3D背景、自动隐藏。如果你想开启这些Docky的功能,那么你需要在你的LXDE系统中开启混合功能。 -To do that, first install the **xcompmgr** package. +就像这样,首先安装 **xcompmgr**包: sudo apt-get install xcompmgr -Then, go to **Menu -> Preferences -> Default applications for LXSession**. Navigate to the Autostart tab. Type “**@xcompmgr -n**” without quotes in the box that says **+Add**. Then, click Add button. +然后,选择**菜单(Menu) -> 偏好(Preferences) -> LXSession默认程序(Default applications for LXSession)**。选择自动开始(Autostart)选项卡。 在**(+增加)+Add**框中输入“**@xcompmgr -n**”不带引号。最后点击增加按钮。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/LXSession-configuration_002.png) -That’s it. Close the LXSession configuration window and log off or reboot your system. Now, you’ll see that Compositing feature has been enabled. +这样就搞定了。关掉LXSession配置窗口,注销或重启系统。之后,你就可以看见混合功能已经打开。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/unknown_006.png) -Also, you can use 3D background and hiding features such as Auto-hide, Intellihide or Window dodge etc. +这时,你结可以使用3D背景和隐藏功能,如自动隐藏(Auto-hide),Intellihide和窗口闪烁(Window dodge)等。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Docky-Settings_003.png) -Cheers! +搞定!干杯! -------------------------------------------------------------------------------- From a73eedc1e8dc20be2df6308d9181a7143db08ba2 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Sat, 15 Nov 2014 23:35:14 +0800 Subject: [PATCH 200/316] moved --- ...2 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md (100%) diff --git a/sources/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md b/translated/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md similarity index 100% rename from sources/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md rename to translated/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md From ed2f5fcf20af9764d28b5b18b79ae73483cd604a Mon Sep 17 00:00:00 2001 From: Vic___ Date: Sat, 15 Nov 2014 23:38:42 +0800 Subject: [PATCH 201/316] add translator's info --- ...[Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md b/translated/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md index ec3b73a529..d355c95b8f 100644 --- a/translated/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md +++ b/translated/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md @@ -31,7 +31,7 @@ via: http://www.unixmen.com/quick-tip-fix-docky-compositing-error-lubuntu/ 作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) +译者:[Vic020/VicYu](http://www.vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a416f8779a38d3d4bb031a0e1edd09393314ec26 Mon Sep 17 00:00:00 2001 From: coloka Date: Sun, 16 Nov 2014 17:33:38 +0800 Subject: [PATCH 202/316] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90=20?= =?UTF-8?q?by=20coloka?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nlevels and Service Management Commands.md | 128 ------------------ ...nlevels and Service Management Commands.md | 125 +++++++++++++++++ 2 files changed, 125 insertions(+), 128 deletions(-) delete mode 100644 sources/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md create mode 100644 translated/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md diff --git a/sources/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md b/sources/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md deleted file mode 100644 index ae54e89178..0000000000 --- a/sources/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md +++ /dev/null @@ -1,128 +0,0 @@ -翻译中 by coloka -Intro to Systemd Runlevels and Service Management Commands -================================================================================ -![](http://www.linux.com/images/stories/41373/Linux_kernel_unified_hierarchy_cgroups_and_systemd.svg.png) - -In olden times we had static runlevels. systemd has mechanisms for more flexible and dynamic control of your system. - -Before we get into learning more useful systemd commands, let's take a little trip down memory lane. There is this weird dichotomy in Linux-land, where Linux and FOSS are always pushing ahead and progressing, and people are always complaining about it. Which is why I am taking all of this anti-systemd uproar with a grain of salt, because I remember when: - -- Packages were evil, because real Linux users built everything from source code and kept strict control of what went on their systems. -- Dependency-resolving package managers were evil, because real Linux users resolved dependency hells manually. -- Except for apt-get, which was always good, so only Yum was evil. -- Because Red Hat was the Microsoft of Linux. -- Yay Ubuntu! -- Boo hiss Ubuntu! - -And on and on...as I have said lo so many times before, changes are upsetting. They mess with our workflow, which is no small thing because any disruption has a real productivity cost. But we are still in the infant stage of computing, so it's going to keep changing and advancing rapidly for a long time. I'm sure you know people who are stuck in the mindset that once you buy something, like a wrench or a piece of furniture or a pink flamingo lawn ornament, it is forever. These are the people who are still running Windows Vista, or deity help us Windows 95 on some ancient, feeble PC with a CRT monitor, and who don't understand why you keep bugging them to replace it. It still works, right? - -Which reminds me of my greatest triumph in keeping an old computer running long after it should have been retired. Once upon a time a friend had this little old 286 running some ancient version of MS-DOS. She used it for a few basic tasks like appointments, diary, and a little old accounting program that I wrote in BASIC for her check register. Who cares about security updates, right? It's not connected to any network. So from time to time I replaced the occasional failed resistor or capacitor, power supply, and CMOS battery. It just kept going. Her tiny old amber CRT monitor grew dimmer and dimmer, and finally it died after 20+ years of service. Now she is using an old Thinkpad running Linux for the same tasks. - -If there is a moral to this tangent it escapes me, so let's get busy with systemd. - -### Runlevels vs. States ### - -SysVInit uses static runlevels to create different states to boot into, and most distros use five: - -- Single-user mode -- Multi-user mode without network services started -- Multi-user mode with network services started -- System shutdown -- System reboot. - -Me, I don't see a lot of practical value in having multiple runlevels, but there they are. Instead of runlevels, systemd allows you to create different states, which gives you a flexible mechanism for creating different configurations to boot into. These states are composed of multiple unit files bundled into targets. Targets have nice descriptive names instead of numbers. Unit files control services, devices, sockets, and mounts. You can see what these look like by examining the prefab targets that come with systemd, for example /usr/lib/systemd/system/graphical.target, which is the default on CentOS 7: - - [Unit] - Description=Graphical Interface - Documentation=man:systemd.special(7) - Requires=multi-user.target - After=multi-user.target - Conflicts=rescue.target - Wants=display-manager.service - AllowIsolate=yes - [Install] - Alias=default.target - -So what do unit files look like? Let us peer into one. Unit files are in two directories: - -- /etc/systemd/system/ -- /usr/lib/systemd/system/ - -The first one is for us to play with, and the second one is where packages install unit files. **/etc/systemd/system/** takes precedence over **/usr/lib/systemd/system/**. Hurrah, human over machine. This is the unit file for the Apache Web server: - - [Unit] - Description=The Apache HTTP Server - After=network.target remote-fs.target nss-lookup.target - [Service] - Type=notify - EnvironmentFile=/etc/sysconfig/httpd - ExecStart=/usr/sbin/httpd/ $OPTIONS -DFOREGROUND - ExecReload=/usr/sbin/httpd $OPTIONS -k graceful - ExecStop=/bin/kill -WINCH ${MAINPID} - KillSignal=SIGCONT - PrivateTmp=true - [Install] - WantedBy=multi.user.target - -These files are fairly understandable even for systemd newcomers, and unit files are quite a bit simpler than a SysVInit init file, as this snippet from /etc/init.d/apache2 shows: - - SCRIPTNAME="${0##*/}" - SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}" - if [ -n "$APACHE_CONFDIR" ] ; then - if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then - DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}" - else - DIR_SUFFIX= - -The whole file is 410 lines. - -You can view unit dependencies, and it's always surprising to me how complex they are: - - $ systemctl list-dependencies httpd.service - -### cgroups ### - -cgroups, or control groups, have been present in the Linux kernel for some years, but have not been used very much until systemd. [The kernel documentation][1] says: "Control Groups provide a mechanism for aggregating/partitioning sets of tasks, and all their future children, into hierarchical groups with specialized behaviour." In other words, it has the potential to control, limit, and allocate resources in multiple useful ways. systemd uses cgroups, and you can see them. This displays your entire cgroup tree: - - $ systemd-cgls - -You can generate a different view with the good old ps command: - - $ ps xawf -eo pid,user,cgroup,args - -### Useful Commands ### - -This command reloads the configuration file of a daemon, and not its systemd service file. Use this when you make a configuration change and want to activate it with least disruption, like this example for Apache: - - # systemctl reload httpd.service - -Reloading a service file completely stops and then restarts a service. If it is not running this starts it: - - # systemctl restart httpd.service - -You can restart all daemons with one command. This reloads all unit files, and re-creates the whole systemd dependency tree: - - # systemctl daemon-reload - -You can reboot, suspend, and poweroff as an ordinary unprivileged user: - - $ systemctl reboot - $ systemctl suspend - $ systemctl poweroff - -As always, there is much, much more to learn about systemd. [Here We Go Again, Another Linux Init: Intro to systemd][2] and [Understanding and Using Systemd][3] are good introductions to systemd, with links to more detailed resources. - --------------------------------------------------------------------------------- - -via: http://www.linux.com/learn/tutorials/794615-systemd-runlevels-and-service-management - -作者:[Carla Schroder][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linux.com/community/forums/person/3734 -[1]:https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt -[2]:http://www.linux.com/learn/tutorials/524577-here-we-go-again-another-linux-init-intro-to-systemd -[3]:http://www.linux.com/learn/tutorials/788613-understanding-and-using-systemd \ No newline at end of file diff --git a/translated/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md b/translated/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md new file mode 100644 index 0000000000..79ba55f097 --- /dev/null +++ b/translated/tech/20141112 Intro to Systemd Runlevels and Service Management Commands.md @@ -0,0 +1,125 @@ +运行级别与服务管理命令systemd简介 +================================================================================ +![](http://www.linux.com/images/stories/41373/Linux_kernel_unified_hierarchy_cgroups_and_systemd.svg.png) + +从很久很久以前我们就在使用静态运行级别。而systemd提供了更为动态灵活的机制,来管控你的系统。 + +在开始介绍systemd命令前,让我们先简单的回顾一下历史。在Linux世界里,有一个很奇怪的现象,一方面Linux和自由软件(FOSS)在不断的向前推进,另一方面人们对这些变化却不断的抱怨。这就是为什么我要在此稍稍提及那些反对systemd所引起的争论的原因,因为我依然记得历史上有不少类似的争论: + +- 软件包(Pacakge)是邪恶的,因为正真的Linux用户会从源码构建他所想要的的一切,并严格的管理系统中安装的软件。 +- 解析依赖关系的包管理器是邪恶的,正真的Linux用户会手动解决这些该死的依赖关系。 +- apt-get总能把事情干好,所以只有Yum是邪恶的。 +- Red Hat简直就是Linux中的微软。 +- 好样的,Ubuntu! +- 滚蛋吧,Ubuntu! + +诸如此类...就像我之前常常说的一样,变化总是让人沮丧。这些该死的变化搅乱了我的工作流程,这可不是一件小事情,任何业务流程的中断,都会直接影响到生产力。但是,我们现在还处于计算机发展的婴儿期,在未来的很长的一段时间内将会持续有快速的变化和发展。想必大家应该都认识一些因循守旧的人,在他们的心里,商品一旦买回家以后就是恒久不变的,就像是买了一把扳手、一套家具或是一个粉红色的火烈鸟草坪装饰品。就是这些人,仍然在坚持使用Windows Vista,甚至还有人在使用运行Windows95的老破烂机器和CRT显示器。他们不能理解为什么要去换一台新机器。老的还能用啊,不是么? + +这让我回忆起了我在维护老电脑上的一项伟大的成就,那台破电脑真的早就该淘汰掉。从前我有个朋友有一台286的老机器,安装了一个极其老的MS-DOS版本。她使用这台电脑来处理一些简单的任务,比如说约会、日记、记账等,我还用BASIC给她写了一个简单的记账软件。她不用关注任何安全更新,是这样么?因为它压根都没有联网。所以我会时不时给她维修一下电脑,更换电阻、电容、电源或者是CMOS电池什么的。它竟然还一直能用。它那袖珍的琥珀CRT显示器变得越来越暗,在使用了20多年后,终于退出了历史舞台。现在我的这位朋友,换了一台运行Linux的老Thinkpad,来干同样的活。 + +前面的话题有点偏题了,下面抓紧时间开始介绍systemd。 + +###运行级别 vs. 状态### +SysVInit使用静态的运行级别来构建不同的启动状态,大部分发布版本中提供了以下5个运行级别: + +- 单用户模式(Single-user mode) +- 多用户模式,不启动网络服务(Multi-user mode without network services started) +- 多用户模式,启动网络服务(Multi-user mode with network services started) +- 系统关机(System shutdown) +- 系统重启(System reboot) + +对于我来说,使用多个运行级别并没有太大的好处,但它们却一直在系统中存在着。 不同于运行级别,systemd可以创建不同的状态,状态提供了灵活的机制来设置启动时的配置项。这些状态是由多个unit文件组成的,状态又叫做启动目标(target)。启动目标有一个漂亮的描述性命名,而不是像运行级别那样使用数字。unit文件可以控制服务、设备、套接字和挂载点。参考/usr/lib/systemd/system/graphical.target,这是CentOS 7默认的启动目标: + + [Unit] + Description=Graphical Interface + Documentation=man:systemd.special(7) + Requires=multi-user.target + After=multi-user.target + Conflicts=rescue.target + Wants=display-manager.service + AllowIsolate=yes + [Install] + Alias=default.target + +现在再看看unit文件长什么样? 我来给大家找个例子。 unit文件存放在下面的两个目录下: + +- /etc/systemd/system/ +- /usr/lib/systemd/system/ + +我们可以修改第一个目录中的文件来进行自定义配置,而第二个目录中的文件是包安装时保存的备份。**/etc/systemd/system/**的优先级高于**/usr/lib/systemd/system/**。不错,用户优先级高于机器。下面是Apache Web server的unit文件: + + [Unit] + Description=The Apache HTTP Server + After=network.target remote-fs.target nss-lookup.target + [Service] + Type=notify + EnvironmentFile=/etc/sysconfig/httpd + ExecStart=/usr/sbin/httpd/ $OPTIONS -DFOREGROUND + ExecReload=/usr/sbin/httpd $OPTIONS -k graceful + ExecStop=/bin/kill -WINCH ${MAINPID} + KillSignal=SIGCONT + PrivateTmp=true + [Install] + WantedBy=multi.user.target + +就算是对于新手而言,上面的文件也是非常简单易懂的。这可比SysVInit的init文件要简单多了,为了便于比较,下面截取了/etc/init.d/apache2的一个片段: + + SCRIPTNAME="${0##*/}" + SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}" + if [ -n "$APACHE_CONFDIR" ] ; then + if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then + DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}" + else + DIR_SUFFIX= +整个文件一共有410行。 + +你可以检查unit件的依赖关系,我常常被这些复杂的依赖关系给吓到: + + $ systemctl list-dependencies httpd.service + +### cgroups ### + +cgroups,或者叫控制组,在Linux内核里已经出现好几年了,但直到systemd的出现才被真正使用起来。[The kernel documentation][1]中是这样描述cgroups的:“控制组提供层次化的机制来管理任务组,使用它可以聚合和拆分任务组,并管理任务组后续产生的子任务。”换句话说,它提供了多种有效的方式来控制、限制和分配资源。systemd使用了cgroups,你可以便捷得查看它,使用下面的命令可以展示你系统中的整个cgroup树: + + $ systemd-cgls + +你可以使用ps命令来进行查看cgroup树: + + $ ps xawf -eo pid,user,cgroup,args + +###常用命令集### + +下面的命令行展示了如何为守护进程重新装载配置文件,注意不是systemd服务文件。 使用这个命令能够激活新的配置项,且尽可能少的打断业务进程,下面以Apache为例: + + # systemctl reload httpd.service + +重新装载服务文件(service file)需要完全停止和重新启动服务。如果服务挂死了,用下面的命令行可以恢复它: + + # systemctl restart httpd.service + +你还可以用一个命令重启所有的守护进程。这个命令会重新装载所有守护进程的unit文件,然后重新生成依赖关系树: + + # systemctl daemon-reload + +在非特权模式下,你也可以进行重启、挂起、关机操作: + + $ systemctl reboot + $ systemctl suspend + $ systemctl poweroff + +按照惯例,最后给大家介绍一些systemd的学习材料。[Here We Go Again, Another Linux Init: Intro to systemd][2] 和 [Understanding and Using Systemd][3] 是不错的入门材料,这两份文档里会链接到更多其他资源。 + +-------------------------------------------------------------------------------- + +via: http://www.linux.com/learn/tutorials/794615-systemd-runlevels-and-service-management + +作者:[Carla Schroder][a] +译者:[coloka](https://github.com/coloka) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/3734 +[1]:https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt +[2]:http://www.linux.com/learn/tutorials/524577-here-we-go-again-another-linux-init-intro-to-systemd +[3]:http://www.linux.com/learn/tutorials/788613-understanding-and-using-systemd \ No newline at end of file From 1d5f95bc8bd8f01e5a1b90656334dcdd2c2db347 Mon Sep 17 00:00:00 2001 From: instdio <759552102@qq.com> Date: Sun, 16 Nov 2014 17:39:30 +0800 Subject: [PATCH 203/316] Project Aims to Put Pressure on Debian Community and Systemd Adoption --- ...to Put Pressure on Debian Community and Systemd Adoption.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/news/20141021 Fork Debian Project Aims to Put Pressure on Debian Community and Systemd Adoption.md b/sources/news/20141021 Fork Debian Project Aims to Put Pressure on Debian Community and Systemd Adoption.md index 7b50cfd778..41eba8a457 100644 --- a/sources/news/20141021 Fork Debian Project Aims to Put Pressure on Debian Community and Systemd Adoption.md +++ b/sources/news/20141021 Fork Debian Project Aims to Put Pressure on Debian Community and Systemd Adoption.md @@ -1,3 +1,4 @@ +Translating By instdio "Fork Debian" Project Aims to Put Pressure on Debian Community and Systemd Adoption ================================================================================ > There is still a great deal of resistance in the Debian community towards the upcoming adoption of systemd @@ -34,4 +35,4 @@ via: http://news.softpedia.com/news/Fork-Debian-Project-Started-to-Put-Pressure- [a]:http://news.softpedia.com/editors/browse/silviu-stahie [1]:http://debianfork.org/ -[2]:https://lists.debian.org/debian-vote/2014/10/msg00001.html \ No newline at end of file +[2]:https://lists.debian.org/debian-vote/2014/10/msg00001.html From 504e06603a4f62acad9b16197e0efbe4162fc5c9 Mon Sep 17 00:00:00 2001 From: coloka Date: Sun, 16 Nov 2014 17:56:40 +0800 Subject: [PATCH 204/316] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD=20by=20colo?= =?UTF-8?q?ka?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20141112 How to Debug CPU Regressions Using Flame Graphs.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md b/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md index c4dd252e27..dae63bf0d2 100644 --- a/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md +++ b/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md @@ -1,3 +1,4 @@ +翻译中 by coloka How to Debug CPU Regressions Using Flame Graphs ================================================================================ How quickly can you debug a CPU performance regression? If your environment is complex and changing quickly, this becomes challenging with existing tools. If it takes a week to root cause a regression, the code may have changed multiple times, and now you have new regressions to debug. From b0ef231554cdf57a58cbfab29e62bac5cd6791f0 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 16 Nov 2014 20:38:22 +0800 Subject: [PATCH 205/316] PUB:20141114 Ubuntu MATE 14.04 LTS Now Available to Download @geekpi --- ...ATE 14.04 LTS Now Available to Download.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) rename {translated/news => published}/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md (53%) diff --git a/translated/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md b/published/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md similarity index 53% rename from translated/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md rename to published/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md index 2693a1a1af..9701a6d27a 100644 --- a/translated/news/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md +++ b/published/20141114 Ubuntu MATE 14.04 LTS Now Available to Download.md @@ -1,32 +1,32 @@ -Ubuntu MATE 14.04 LTS 现在可以下载了 +对,你没看错!Ubuntu MATE 14.04 LTS 现在发布了 ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/ubuntu-mate-lts.jpg) -**传统桌面的粉丝现在可以庆幸Ubuntu MATE的第一个长期支持版本现在发布并且可以下载了** +**传统桌面的粉丝现在可以欢呼了,Ubuntu MATE的第一个长期支持版本现在发布了,马上去下载吧!** -这个社区使用基于GNOME2 的MATE桌面环境,这个分支还继续着积极的开发和提升。Ubuntu MATE 14.04 LTS跟随着上月发布的Ubuntu 14.10一起发布了。 +这个社区产物使用基于 GNOME2 的MATE桌面环境,这个分支还继续着积极的开发和提升。Ubuntu MATE 14.04 LTS跟随着上月发布的Ubuntu 14.10一起发布了。 -### 回顾间隙填充 ### +### 回顾补充 ### -你大概会想我是不是打错了(我是Joey Sneddon,这大概可以肯定)。但这时可以肯定,你看到的是对的。Ubuntu MATE团队决定追溯创建一个LTS版本 +你大概会想我是不是打错了(我是Joey Sneddon,这大概可以肯定)。但这此是没错的,你看到的是对的。Ubuntu MATE团队决定追溯创建一个LTS版本。 -**Ubuntu MATE 14.04 LTS** 确切地应该叫Ubuntu MATE 14.11 LTS。[如项目领导者 Martin Wimpress 注明的][1]:不只是因为他在11月分发布,还因为它混合了14.04和14.10的代码。 +**Ubuntu MATE 14.04 LTS** 确切地应该叫Ubuntu MATE 14.11 LTS。[如项目领导者 Martin Wimpress 注明的][1]:不只是因为他在11月份发布,还因为它混合了14.04和14.10的代码。 -> “该版本并不寻常,它虽然基于Ubuntu MATE 14.10 但是加入了很多新的特性,并且修复了很多bug。虽然这是一个14.04版本,但是你可以认为它是一个比14.10 更新的版本。” +> “该版本并不寻常,它虽然基于Ubuntu MATE 14.10 但是加入了很多新的特性,并且修复了很多bug。虽然这是一个14.04版本,但是你可以认为它是一个比14.10 更新的版本...” -如其他社区一样,Ubuntu MATE 14.04也将至少支持接下来的三年,但是应该同样应该会得到来自上游的严重安全更新。 +如其他社区产物一样,Ubuntu MATE 14.04也将至少支持接下来的三年,但是应该同样会得到来自上游的严重安全更新。 -**14.10 的改变** 包括: +**与14.10相比的改变**包括: -- 主题和壁纸更新 -- T两个新的应用: MATE Menu 和 MATE Tweak -- 辅助功能提升 -- VLC 代替了 Totem 作为视频播放器 -- 不同的 MATE 桌面包更新 +- 更新了主题和壁纸 +- 增加了两个新的应用: MATE Menu 和 MATE Tweak +- 改善辅助功能 +- VLC 代替了 Totem 视频播放器 +- 更新了几个 MATE 桌面包 ### 下载 ### -要知道更多细节,包含硬件需求和支持信息,可以在官方网站上找到,也可以点击下面的链接。 +要知道更多细节,以及硬件需求和支持信息,可以在官方网站上找到,也可以点击下面的链接。 - [下载 Ubuntu MATE 14.04 LTS][2] @@ -36,7 +36,7 @@ via: http://www.omgubuntu.co.uk/2014/11/ubuntu-mate-14-04-download-released 作者:[Joey-Elijah Sneddon][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9f2b34b3162c8d2bd2abec4f6230d7455dd0e10d Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 16 Nov 2014 21:19:15 +0800 Subject: [PATCH 206/316] PUB:20140729 Don't Fear The Command Line @zpl1025 --- .../20140729 Don't Fear The Command Line.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) rename {translated/talk => published}/20140729 Don't Fear The Command Line.md (78%) diff --git a/translated/talk/20140729 Don't Fear The Command Line.md b/published/20140729 Don't Fear The Command Line.md similarity index 78% rename from translated/talk/20140729 Don't Fear The Command Line.md rename to published/20140729 Don't Fear The Command Line.md index 166dd0f7d2..31b7fcc96a 100644 --- a/translated/talk/20140729 Don't Fear The Command Line.md +++ b/published/20140729 Don't Fear The Command Line.md @@ -1,4 +1,4 @@ -不要害怕命令行 +不要害怕命令行——Mac OS 篇 ================================================================================ ![](http://a4.files.readwrite.com/image/upload/c_fill,h_900,q_70,w_1600/MTE5NTU2MzIyNTM0NTg5OTYz.jpg) @@ -6,13 +6,13 @@ 你应该在电影中见到过,尽管从没在自己电脑上调出来:一个空白屏幕,带有一些简单文字提示和一个光标,等着你去输入几个神秘的命令,就会听你的吩咐。 -这就是命令行。它是基于字符的接口,早于现在更加熟悉的主流操作系统上的窗口,图标和`瓦片 tiles`,包括Windows到Mac OS X和Linux。 +这就是命令行。它是基于字符的接口,它比现在人们都熟悉的主流操作系统(包括Windows到Mac OS X和Linux)上的窗口,图标和`瓦片 tiles`都要早。 -命令行是一个使用你电脑基本功能的超级强大的工具。对于大多数人来说,它也是一个让人困惑的,难以理解的,看上去无关紧要的东西。不必那么夸张。 +命令行是一个使用你电脑基本功能的超级强大的工具。对于大多数人来说,它也是一个让人困惑的,难以理解的,看上去无关紧要的东西。但是其实不是这样的。 ### 在你的命令控制下的电脑 ### -输入字符指令再敲下回车来让电脑做点事情,和在移动设备的触摸界面上滑动点击比较,听起来像是退了一大步。即使是刚学走路的小孩都可以用iPad,对吧?不过,如果你知道怎么用的话,命令可以节省你的时间和烦恼。 +输入字符指令再敲下回车来让电脑做点事情,和在移动设备的触摸界面上滑动点击比较,听起来像是退了一大步。即使是刚学走路的小孩都可以用iPad,对吧?不过,如果你知道怎么用的话,命令可以节省你的时间,减少烦恼。 如果你很认真想学习编程-或者想理解计算机技术-你完全有必要掌握命令行。 @@ -20,7 +20,7 @@ 更重要的是,你会更容易理解[像Python那样的编程语言][1]和[像Git那样的软件][2],需要有一点命令行基础。在熟悉了命令行以后,你就可以打破过去阻止你学习编程的障碍了。 -所以在这里介绍一点关于命令行的快速,基础指导。它主要专注于Mac OS X的类Unix环境,只是因为这是我比较熟悉的。Linux用户应该已经很熟悉命令行了,不过新手也许还是会觉得这些小窍门有点用。如果你用的是Chromebook,Google已经给出了有用的指导,用来打开它自带的[命令行工具][3],它和Mac或Linux系统有点类似。对于Windows用户,很不幸,受限于从MS-DOS衍生出的命令语言,它和Unix只有一点点交集,所以这篇指导对你没什么用;不过可以去看下[dosprompt.info网站里的资料][4]。 +所以在这里介绍一点关于命令行的快速的、基础的指导。它**主要专注于Mac OS X的类Unix环境**,只是因为这是我比较熟悉的。Linux用户应该已经很熟悉命令行了,不过新手也许还是会觉得这些小窍门有点用。如果你用的是Chromebook,Google对如何打开它自带的[命令行工具][3]已经给出了有用的指导,它和Mac或Linux系统有点类似。对于Windows用户,很不幸,受限于从MS-DOS衍生出的命令语言,它和Unix只有一点点交集,所以这篇指导对你没什么用;不过可以去看下[dosprompt.info网站里的资料][4]。 ### 如何开始 ### @@ -30,7 +30,7 @@ 你进来了,但是所有你看到的只是一个有输入空间的空白盒子。这就是命令行!让我们来更好地了解一下这个窗口。 -输入`pwd`,它的意思是打印当前工作目录。在计算机语言里,“打印”什么和纸没一点关系。它实际上只是意味着吐点东西到屏幕上。这个命令运行的结果是让计算机返回你当前正处在的目录路径。 +输入`pwd`,它的意思是打印当前工作目录。在计算机语言里,“打印”什么和纸没一点关系。它实际上只是意味着吐点东西到屏幕上。这个命令运行的结果是让计算机返回你当前正处在的目录路径。(LCTT 译注,“打印”源于早期计算机的输出设备不是显示器,而是行式打印机,所以输出就是“打印”;在后期,有了显示器之后,在哑终端上操作远程主机时,输出才是“回显 echo”) ![](http://a4.files.readwrite.com/image/upload/c_fit,w_630/MTIyMzk5Mjg5MDMzMjYyNjA0.png) @@ -40,7 +40,7 @@ ![](http://a4.files.readwrite.com/image/upload/c_fit,w_630/MTE5NDg0MDYxMTMwODUxODU1.png) -现在我们有一个新目录了。如果使用图形界面的话,我们可以用自己的眼睛判断我们已经创建了一个新目录。当然,如果我打开Finder然后进入我的主目录-用一个小房子图标标记的-就会看到一个叫“experiments”的目录。我通过命令行实现的!(反过来:你可以在桌面系统里建立一个文件夹,然后在命令行下去查看。这只是同一套系统的两种不同表现方式。) +现在我们有一个新目录了。如果使用图形界面的话,我们可以用自己的眼睛判断我们已经创建了一个新目录。当然,如果我打开Finder然后进入我的主目录(用一个小房子图标标记的)就会看到一个叫“experiments”的目录。我通过命令行实现的!(反过来:你可以在桌面系统里建立一个文件夹,然后在命令行下去查看。这只是同一套系统的两种不同表现方式。) ![](http://a5.files.readwrite.com/image/upload/c_fit,w_630/MTE5NTU2MzIyNTM0MzI3ODE5.png) @@ -58,7 +58,7 @@ ![](http://a2.files.readwrite.com/image/upload/c_fit,w_630/MTE5NDg0MDYxMjQxMjgwMDE1.png) -哦不!我拼错“newfile”了。这经常会碰到。让我们用两个步骤来改正它。首先,我将创建一个拼写正确的文件... +哦不!我拼错“newfile”了。这经常会碰到。让我们用两个步骤来改正它。首先,我将创建一个拼写正确的文件...(LCTT 译注:完全不必创建新文件,直接 mv 即可,相当于改名。) ![](http://a3.files.readwrite.com/image/upload/c_fit,w_630/MTIxNDI3Mjk0MjA5ODAzNzg5.png) @@ -76,7 +76,7 @@ ![](http://a3.files.readwrite.com/image/upload/c_fit,w_630/MTIyMzk5Mjg5MDM4OTY0MjM2.png) -但是,它只是个空白文本文件。让我们用文本编辑器来输入点内容进去。在命令行下,我喜欢用`nano`编辑器,因为它很简单而且几乎在所有类型电脑上都可以使用。 +但是,它只是个空白文本文件(LCTT 译注,不是空白的,其内容是“Hello World”)。让我们用文本编辑器来输入点内容进去。在命令行下,我喜欢用`nano`编辑器,因为它很简单而且几乎在所有类型电脑上都可以使用。(LCTT 译注,作为 Linux 党,那肯定是要用 vi 的,不过 vi 对于初学者来说有一点点难。) 这会在你的命令行窗口中马上打开编辑屏幕。一些基本的命令都为你列出来了。 @@ -92,7 +92,7 @@ ![](http://a2.files.readwrite.com/image/upload/c_fit,w_630/MTE5NTU2MzIyNTQxMzQwMTcx.png) -注意一下,**rm**命令非常强大!在黑客论坛里有个[常用伎俩][7]就是说服一个命令行新手输入**rm -rf /**,然后他就把自己整个电脑上的所有文件都删掉了。命令里的“/”意思是电脑的最高级根目录-所有一切都在它之下。千万不要输入那行命令! +注意一下,**rm**命令非常强大!在黑客论坛里有个[常用伎俩][7]就是说服一个命令行新手输入**rm -rf /**,然后他就把自己整个电脑上的所有文件都删掉了。命令里的“/”意思是电脑的最高级根目录-所有一切都在它之下。千万不要输入那行命令!(LCTT 译注:希望你在看完这句话之前没有真的输入了 rm -rf / !!!) ### 延伸阅读 ### @@ -104,11 +104,11 @@ [命令行初学者启蒙][9]。Lifehacker收藏的一些适合初学者的很有用的命令。 -[Mac OS X命令行入门][10]。在线教育网站Treehouse极尽详细地介绍了命令行的基础。 +[Mac OS X 命令行入门][10]。在线教育网站Treehouse极尽详细地介绍了命令行的基础。 -现在文章看完了,你就更容易理解我之前写的那些代码教程了,因为如果不敲几个命令根本没法完成。如果你准备好了,我建议你去看看ReadWrite的[Git教程][11],它使用命令行来向你介绍协同编程。运算快乐! +现在文章看完了,你就更容易理解我之前写的那些代码教程了,因为如果不敲几个命令根本没法完成。如果你准备好了,我建议你去看看ReadWrite的[Git教程][11],它使用命令行来向你介绍协同编程。计算与你同在! -*开头图片来自[Jason Scott][12];其他屏幕截图由Lauren Orsini提供给ReadWrite* +*题图来自[Jason Scott][12];其他屏幕截图由Lauren Orsini提供给ReadWrite* -------------------------------------------------------------------------------- @@ -116,7 +116,7 @@ via: http://readwrite.com/2014/07/18/command-line-tutorial-intro 作者:[Lauren Orsini][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 71624a1b121853fa3d2f31cc748062ecbbcf61c2 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Sun, 16 Nov 2014 21:48:06 +0800 Subject: [PATCH 207/316] translated --- ...r IP networking--net-tools vs. iproute2.md | 259 ------------------ ...r IP networking--net-tools vs. iproute2.md | 234 ++++++++++++++++ 2 files changed, 234 insertions(+), 259 deletions(-) delete mode 100644 sources/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md create mode 100644 translated/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md diff --git a/sources/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md b/sources/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md deleted file mode 100644 index e7fdc11d7f..0000000000 --- a/sources/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md +++ /dev/null @@ -1,259 +0,0 @@ -[translating by KayGuoWhu] -Linux TCP/IP networking: net-tools vs. iproute2 -================================================================================ -Many sysadmins still manage and troubleshoot various network configurations by using a combination of ifconfig, route, arp and netstat command-line tools, collectively known as net-tools. Originally rooted in the BSD TCP/IP toolkit, the net-tools was developed to configure network functionality of older Linux kernels. Its development in the Linux community so far has ceased since 2001. Some Linux distros such as Arch Linux and CentOS/RHEL 7 have already deprecated net-tools in favor of iproute2. - -iproute2, which is another family of network configuration tools, emerged to replace the functionality of net-tools. While net-tools accesses and changes kernel network configurations via procfs (/proc) and ioctl system call, iproute2 communicates with the kernel via netlink socket interface. The /proc interface is known to be more heavyweight than netlink interface. Putting performance aside, the user interface of iproute2 is more intuitive than that of net-tools. For example, network resources (e.g., link, IP address, route, tunnel, etc.) are aptly defined with "object" abstraction, and you can manage different objects using consistant syntax. Most importantly, iproute2 has been under [active development][1] so far. - -If you are still using net-tools, it is time to switch to iproute2, especially if you want to catch up with the latest and greatest networking features of the latest Linux kernel. Chances are that there are many things you can do with iproute2, but cannot with net-tools. - -For those who want to make the switch, here is a round-up of net-tools vs. iproute2 comparison. - -### Show All Connected Network Interfaces ### - -The following commands show a list of all available network interfaces (whether or not they are active). - -With **net-tools**: - - $ ifconfig -a - -With **iproute2**: - - $ ip link show - -![](https://farm4.staticflickr.com/3852/15134851045_53a5135283_z.jpg) - -### Activate or Deactivate a Network Interface ### - -To activate/deactivate a particular network interface, use these commands. - -With **net-tools**: - - $ sudo ifconfig eth1 up - $ sudo ifconfig eth1 down - -With **iproute2**: - - $ sudo ip link set down eth1 - $ sudo ip link set up eth1 - -### Assign IPv4 address(es) to a Network Interface ### - -Use these commands to configure IPv4 addresses of a network interface. - -With **net-tools**: - - $ sudo ifconfig eth1 10.0.0.1/24 - -With **iproute2**: - - $ sudo ip addr add 10.0.0.1/24 dev eth1 - -Note that with iproute2, you can assign multiple IP addresses to an interface, which you cannot do with ifconfig. A workaround for this with ifconfig is to use [IP aliases][2]. - - $ sudo ip addr add 10.0.0.1/24 broadcast 10.0.0.255 dev eth1 - $ sudo ip addr add 10.0.0.2/24 broadcast 10.0.0.255 dev eth1 - $ sudo ip addr add 10.0.0.3/24 broadcast 10.0.0.255 dev eth1 - -### Remove an IPv4 address from a Network Interface ### - -As far as IP address removal is concerned, there is no proper way to remove an IPv4 address from a network interface with net-tools, other than assigning 0 to the interface. iproute2 can properly handle this. - -With **net-tools**: - - $ sudo ifconfig eth1 0 - -With **iproute2**: - - $ sudo ip addr del 10.0.0.1/24 dev eth1 - -### Show IPv4 Address(es) of a Network Interface ### - -Checking IPv4 addresses of a particular network interface can be done as follows. - -With **net-tools**: - - $ ifconfig eth1 - -With **iproute2**: - - $ ip addr show dev eth1 - -Again, if there are multiple IP addresses assigned to an interface, iproute2 shows all of them, while net-tools shows only one IP address. - -![](https://farm6.staticflickr.com/5552/15134470952_f478190693_z.jpg) - -### Assign an IPv6 address to a Network Interface ### - -Use these commands to add IPv6 address(es) to a network interface. Both net-tools and iproute2 allow you to add multiple IPv6 addresses to an interface. - -With **net-tools**: - - $ sudo ifconfig eth1 inet6 add 2002:0db5:0:f102::1/64 - $ sudo ifconfig eth1 inet6 add 2003:0db5:0:f102::1/64 - -With **iproute2**: - - $ sudo ip -6 addr add 2002:0db5:0:f102::1/64 dev eth1 - $ sudo ip -6 addr add 2003:0db5:0:f102::1/64 dev eth1 - -### Show IPv6 address(es) of a Network Interface ### - -Displaying IPv6 addresses of a particular network interface can be done as follows. Both net-tools and iproute2 can show all assigned IPv6 addresses. - -With **net-tools**: - - $ ifconfig eth1 - -With **iproute2**: - - $ ip -6 addr show dev eth1 - -![](https://farm4.staticflickr.com/3906/15111848536_f6cb7ddb4f_z.jpg) - -### Remove an IPv6 address from a Network Interface ### - -Use these commands to remove any unnecessary IPv6 address from an interface. - -With **net-tools**: - - $ sudo ifconfig eth1 inet6 del 2002:0db5:0:f102::1/64 - -With **iproute2**: - - $ sudo ip -6 addr del 2002:0db5:0:f102::1/64 dev eth1 - -### Change the MAC Address of a Network Interface ### - -To [spoof the MAC address][3] of a network interface, use the commands below. Note that before changing the MAC address, you need to deactivate the interface first. - -With **net-tools**: - - $ sudo ifconfig eth1 hw ether 08:00:27:75:2a:66 - -With **iproute2**: - - $ sudo ip link set dev eth1 address 08:00:27:75:2a:67 - -### View the IP Routing Table ### - -net-tools has two options for showing the kernel's IP routing table: route or netstat. With iproute2, use ip route command. - -With **net-tools**: - - $ route -n - ----------- - - $ netstat -rn - -With **iproute2**: - - $ ip route show - -![](https://farm6.staticflickr.com/5585/14948293867_c018df8efd_z.jpg) - -### Add or Modify a Default Route ### - -Here are the commands to add or modify a default route in the kernel's IP routing table. Note that with net-tools, modifying a default route can be achieved by adding a new default route, and then removing an old default route. With iproute2, use ip route replace command. - -With **net-tools**: - - $ sudo route add default gw 192.168.1.2 eth0 - $ sudo route del default gw 192.168.1.1 eth0 - -With **iproute2**: - - $ sudo ip route add default via 192.168.1.2 dev eth0 - $ sudo ip route replace default via 192.168.1.2 dev eth0 - -### Add or Remove a Static Route ### - -A static routing can be added or removed with the following commands. - -With **net-tools**: - - $ sudo route add -net 172.16.32.0/24 gw 192.168.1.1 dev eth0 - $ sudo route del -net 172.16.32.0/24 - -With **iproute2**: - - $ sudo ip route add 172.16.32.0/24 via 192.168.1.1 dev eth0 - $ sudo ip route del 172.16.32.0/24 - -### View Socket Statistics ### - -Here are the commands to check socket statistics (e.g., active/listening TCP/UDP sockets). - -With **net-tools**: - - $ netstat - $ netstat -l - -With **iproute2**: - - $ ss - $ ss -l - -![](https://farm4.staticflickr.com/3843/14948157419_564982b0e6_z.jpg) - -### View the ARP Table ### - -You can display the kernel's ARP table with these commands. - -With **net-tools**: - - $ arp -an - -With **iproute2**: - - $ ip neigh - -![](https://farm4.staticflickr.com/3908/14948193370_1c5256e8e1_z.jpg) - -### Add or Remove a Static ARP Entry ### - -Adding or removing a [static ARP entry][4] in the local ARP table is done as follows. - -With **net-tools**: - - $ sudo arp -s 192.168.1.100 00:0c:29:c0:5a:ef - $ sudo arp -d 192.168.1.100 - -With **iproute2**: - - $ sudo ip neigh add 192.168.1.100 lladdr 00:0c:29:c0:5a:ef dev eth0 - $ sudo ip neigh del 192.168.1.100 dev eth0 - -### Add, Remove or View Multicast Addresses ### - -To configure or view multicast addresses on a network interface, use the commands below. - -With **net-tools**: - - $ sudo ipmaddr add 33:44:00:00:00:01 dev eth0 - $ sudo ipmaddr del 33:44:00:00:00:01 dev eth0 - $ ipmaddr show dev eth0 - $ netstat -g - -With **iproute2**: - - $ sudo ip maddr add 33:44:00:00:00:01 dev eth0 - $ sudo ip maddr del 33:44:00:00:00:01 dev eth0 - $ ip maddr list dev eth0 - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/2014/09/linux-tcpip-networking-net-tools-iproute2.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:https://www.kernel.org/pub/linux/utils/net/iproute2/ -[2]:http://xmodulo.com/2013/02/how-to-assign-multiple-ip-addresses-to-one-network-interface-on-centos.html -[3]:http://xmodulo.com/2014/02/spoof-mac-address-network-interface-linux.html -[4]:http://xmodulo.com/2013/02/how-to-add-or-remove-static-arp-entry-on-linux.html diff --git a/translated/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md b/translated/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md new file mode 100644 index 0000000000..ae85d60919 --- /dev/null +++ b/translated/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md @@ -0,0 +1,234 @@ +Linux 中的TCP/IP网络配置:net-tools vs. iproute2 +================================================================================ +如今很多系统管理员依然通过组合使用诸如ifconfig、route、arp和netstat等命令行工具(统称为net-tools)来配置网络功能,解决网络故障。net-tools起源于BSD的TCP/IP工具箱,后来成为老版本Linux内核中配置网络功能的工具。但自2001年起,Linux社区已经对其停止维护。同时,一些比如Arch Linux和CentOS/RHEL 7的Linux发行版则已经完全抛弃了net-tools,以支持iproute2。 + +作为网络配置工具的一份子,iproute2的出现旨在在功能上取代net-tools。net-tools通过procfs(/proc)和ioctl系统调用去访问和改变内核网络配置,而iproute2则通过netlink套接字接口与内核通讯。抛开性能而言,iproute2的用户接口比net-tools显得更加直观。比如,各种网络资源(如link、IP地址、路由和隧道等)均使用合适的对象抽象去定义,使得用户可使用一致的语法去管理不同的对象。更重要的是,到目前为止,iproute2仍处在[持续开发][1]中。 + +如果你仍在使用net-tools,而且尤其需要跟上新版Linux内核中的最新最重要的网络特性的话,那么是时候转到iproute2的阵营了。原因就在于使用iproute2可以做很多net-tools无法做到的事情。 + +对于那些想要转到使用iproute2的用户,有必要了解下面有关net-tools和iproute2的众多对比。 + +### 显示所有已连接的网络接口 ### + +下面的命令显示出所有可用网络接口的列表(无论接口是否激活)。 + +使用**net-tools**: + + $ ifconfig -a + +使用**iproute2**: + + $ ip link show + +![](https://farm4.staticflickr.com/3852/15134851045_53a5135283_z.jpg) + +### 激活或停用网络接口 ### + +使用这些命令来激活或停用某个指定的网络接口。 + +使用**net-tools**: + $ sudo ifconfig eth1 up + $ sudo ifconfig eth1 down + +使用**iproute2**: + $ sudo ip link set down eth1 + $ sudo ip link set up eth1 + +### 为网络接口分配IPv4地址 ### + +使用这些命令配置网络接口的IPv4地址。 + +使用**net-tools**: + $ sudo ifconfig eth1 10.0.0.1/24 + +使用**iproute2**: + $ sudo ip addr add 10.0.0.1/24 dev eth1 + +值得注意的是,可以使用iproute2给同一个接口分配多个IP地址,ifconfig则无法这么做。使用ifconfig的变通方案是使用[IP别名][2]。 + + $ sudo ip addr add 10.0.0.1/24 broadcast 10.0.0.255 dev eth1 + $ sudo ip addr add 10.0.0.2/24 broadcast 10.0.0.255 dev eth1 + $ sudo ip addr add 10.0.0.3/24 broadcast 10.0.0.255 dev eth1 + +### 移除网络接口的IPv4地址 ### + +就IP地址的移除而言,除了给接口分配全0地址外,net-tools没有提供任何合适的方法来移除网络接口的IPv4地址。相反,iproute2则能很好地完全。 + +使用**net-tools**: + $ sudo ifconfig eth1 0 + +使用**iproute2**: + $ sudo ip addr del 10.0.0.1/24 dev eth1 + +### 显示网络接口的IPv4地址 ### + +按照如下操作可查看某个指定网络接口的IPv4地址。 + +使用**net-tools**: + $ ifconfig eth1 + +使用**iproute2**: + $ ip addr show dev eth1 + +同样,如果接口分配了多个IP地址,iproute2会显示出所有地址,而net-tools只能显示一个IP地址。 + +![](https://farm6.staticflickr.com/5552/15134470952_f478190693_z.jpg) + +### 为网络接口分配IPv6地址 ### + +使用这些命令为网络接口添加IPv6地址。net-tools和iproute2都允许用户为一个接口添加多个IPv6地址。 + +使用**net-tools**: + $ sudo ifconfig eth1 inet6 add 2002:0db5:0:f102::1/64 + $ sudo ifconfig eth1 inet6 add 2003:0db5:0:f102::1/64 + +使用**iproute2**: + $ sudo ip -6 addr add 2002:0db5:0:f102::1/64 dev eth1 + $ sudo ip -6 addr add 2003:0db5:0:f102::1/64 dev eth1 + +### 显示网络接口的IPv6地址 ### + +按照如下操作可显示某个指定网络接口的IPv6地。net-tools和iproute2都可以显示出所有已分配的IPv6地址。 + +使用**net-tools**: + $ ifconfig eth1 + +使用**iproute2**: + $ ip -6 addr show dev eth1 + +![](https://farm4.staticflickr.com/3906/15111848536_f6cb7ddb4f_z.jpg) + +### 移除网络设备的IPv6地址 ### + +使用这些命令可移除接口中不必要的IPv6地址。 + +使用**net-tools**: + $ sudo ifconfig eth1 inet6 del 2002:0db5:0:f102::1/64 + +使用**iproute2**: + $ sudo ip -6 addr del 2002:0db5:0:f102::1/64 dev eth1 + +### 改变网络接口的MAC地址 ### + +使用下面的命令可[篡改网络接口的MAC地址][3],请注意在更改MAC地址前,需要停用接口。 + +使用**net-tools**: + $ sudo ifconfig eth1 hw ether 08:00:27:75:2a:66 + +使用**iproute2**: + $ sudo ip link set dev eth1 address 08:00:27:75:2a:67 + +### 查看IP路由表 ### + +net-tools中有两个选择来显示内核的IP路由表:route和netstat。在iproute2中,使用命令ip route。 + +使用**net-tools**: + $ route -n + +---------- + + $ netstat -rn + +使用**iproute2**: + + $ ip route show + +![](https://farm6.staticflickr.com/5585/14948293867_c018df8efd_z.jpg) + +### 添加和修改默认路由 ### + +这里的命令用来添加或修改内核IP路由表中的默认路由规则。请注意在net-tools中可通过添加新的默认路由、删除旧的默认路由来实现修改默认路由。在iproute2使用ip route命令来代替。 + +使用**net-tools**: + $ sudo route add default gw 192.168.1.2 eth0 + $ sudo route del default gw 192.168.1.1 eth0 + +使用**iproute2**: + $ sudo ip route add default via 192.168.1.2 dev eth0 + $ sudo ip route replace default via 192.168.1.2 dev eth0 + +### 添加和移除静态路由 ### + +使用下面命令添加或移除一个静态路由。 + +使用**net-tools**: + $ sudo route add -net 172.16.32.0/24 gw 192.168.1.1 dev eth0 + $ sudo route del -net 172.16.32.0/24 + +使用**iproute2**: + $ sudo ip route add 172.16.32.0/24 via 192.168.1.1 dev eth0 + $ sudo ip route del 172.16.32.0/24 + +### 查看套接字统计信息 ### + +这里的命令用来查看套接字统计信息(比如活跃或监听状态的TCP/UDP套接字)。 + +使用**net-tools**: + + $ netstat + $ netstat -l + +使用**iproute2**: + $ ss + $ ss -l + +![](https://farm4.staticflickr.com/3843/14948157419_564982b0e6_z.jpg) + +### 查看ARP表 ### + +使用这些命令显示内核的ARP表。 + +使用**net-tools**: + $ arp -an + +使用**iproute2**: + + $ ip neigh + +![](https://farm4.staticflickr.com/3908/14948193370_1c5256e8e1_z.jpg) + +### 添加或删除静态ARP项 ### + +按照如下操作在本地ARP表中添加或删除一个[静态ARP项][4]。 + +使用**net-tools**: + $ sudo arp -s 192.168.1.100 00:0c:29:c0:5a:ef + $ sudo arp -d 192.168.1.100 + +使用**iproute2**: + + $ sudo ip neigh add 192.168.1.100 lladdr 00:0c:29:c0:5a:ef dev eth0 + $ sudo ip neigh del 192.168.1.100 dev eth0 + +### 添加、删除或查看多播地址 ### + +使用下面的命令配置或查看网络接口上的多播地址。 + +使用**net-tools**: + + $ sudo ipmaddr add 33:44:00:00:00:01 dev eth0 + $ sudo ipmaddr del 33:44:00:00:00:01 dev eth0 + $ ipmaddr show dev eth0 + $ netstat -g + +使用**iproute2**: + + $ sudo ip maddr add 33:44:00:00:00:01 dev eth0 + $ sudo ip maddr del 33:44:00:00:00:01 dev eth0 + $ ip maddr list dev eth0 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/2014/09/linux-tcpip-networking-net-tools-iproute2.html + +作者:[Dan Nanni][a] +译者:[KayGuoWhu](https://github.com/KayGuoWhu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:https://www.kernel.org/pub/linux/utils/net/iproute2/ +[2]:http://xmodulo.com/2013/02/how-to-assign-multiple-ip-addresses-to-one-network-interface-on-centos.html +[3]:http://xmodulo.com/2014/02/spoof-mac-address-network-interface-linux.html +[4]:http://xmodulo.com/2013/02/how-to-add-or-remove-static-arp-entry-on-linux.html \ No newline at end of file From 6c5de9237e5f6ada9cfed2be37f54d123c56280a Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 17 Nov 2014 08:31:34 +0800 Subject: [PATCH 208/316] Update 20141115 How to perform system backup with backup-manager on Linux.md --- ...ow to perform system backup with backup-manager on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141115 How to perform system backup with backup-manager on Linux.md b/sources/tech/20141115 How to perform system backup with backup-manager on Linux.md index 1a85d13f45..0214e19cce 100644 --- a/sources/tech/20141115 How to perform system backup with backup-manager on Linux.md +++ b/sources/tech/20141115 How to perform system backup with backup-manager on Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How to perform system backup with backup-manager on Linux ================================================================================ One thing that we all may have had the chance to learn in either easy or hard ways is that the importance of backups can never be underestimated. Considering that there are as many backup methods as the number of fish in the sea, you may wonder how you can effectively choose the right tool and strategy for your system. @@ -152,4 +153,4 @@ via: http://xmodulo.com/linux-backup-manager.html [a]:http://xmodulo.com/author/gabriel [1]:https://github.com/sukria/Backup-Manager -[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html From 7d0d8f12ebbdb99a099fe64affa5955c432e7e95 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 17 Nov 2014 09:56:11 +0800 Subject: [PATCH 209/316] Translating by ZTinoZ --- ... 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md b/sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md index f7836709c5..e083498361 100644 --- a/sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md +++ b/sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md @@ -1,3 +1,4 @@ +translating by ZTinoZ LibreOffice 4.3.4 Released With 60 Bug Fixes, v4.4 Shaping Up Nicely ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2010/12/libreoffice.png) @@ -54,4 +55,4 @@ via: http://www.omgubuntu.co.uk/2014/11/libreoffice-4-3-4-arrives-bundle-bug-fix [1]:http://www.omgubuntu.co.uk/2014/10/libreoffice-4-3-3-released-62-bug-fixes [2]:https://wiki.documentfoundation.org/Releases/4.3.4/RC1 [3]:http://www.libreoffice.org/download/libreoffice-fresh/ -[4]:https://wiki.documentfoundation.org/ReleaseNotes/4.4#GUI \ No newline at end of file +[4]:https://wiki.documentfoundation.org/ReleaseNotes/4.4#GUI From 007da53c3d28837271ef00999bc0a715afa4013e Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Mon, 17 Nov 2014 10:13:18 +0800 Subject: [PATCH 210/316] translating by KayGuoWhu --- sources/talk/20141108 When hackers grow old.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20141108 When hackers grow old.md b/sources/talk/20141108 When hackers grow old.md index cf31c168ae..1a9405241f 100644 --- a/sources/talk/20141108 When hackers grow old.md +++ b/sources/talk/20141108 When hackers grow old.md @@ -1,3 +1,4 @@ +[translating by KayGuoWhu] When hackers grow old ================================================================================ Lately I’ve been wrestling with various members of an ancient and venerable open-source development group which I am not going to name, though people who regularly follow my adventures will probably guess which one it is by the time I’m done venting. From 3a9f41347842383b6aaf8f74d39ae9b1a481162f Mon Sep 17 00:00:00 2001 From: GOLinux Date: Mon, 17 Nov 2014 11:54:46 +0800 Subject: [PATCH 211/316] [Translated] 20141115 How to perform system backup with backup-manager on Linux.md --- ...tem backup with backup-manager on Linux.md | 156 ------------------ ...tem backup with backup-manager on Linux.md | 154 +++++++++++++++++ 2 files changed, 154 insertions(+), 156 deletions(-) delete mode 100644 sources/tech/20141115 How to perform system backup with backup-manager on Linux.md create mode 100644 translated/tech/20141115 How to perform system backup with backup-manager on Linux.md diff --git a/sources/tech/20141115 How to perform system backup with backup-manager on Linux.md b/sources/tech/20141115 How to perform system backup with backup-manager on Linux.md deleted file mode 100644 index 0214e19cce..0000000000 --- a/sources/tech/20141115 How to perform system backup with backup-manager on Linux.md +++ /dev/null @@ -1,156 +0,0 @@ -Translating by GOLinux! -How to perform system backup with backup-manager on Linux -================================================================================ -One thing that we all may have had the chance to learn in either easy or hard ways is that the importance of backups can never be underestimated. Considering that there are as many backup methods as the number of fish in the sea, you may wonder how you can effectively choose the right tool and strategy for your system. - -In this article I will introduce you to [backup-manager][1], a simple yet handy command-line backup tool which is available in the standard repositories of most Linux distributions. - -What makes backup-manager stand out among other backup tools or strategies? Let me mention just a few of its distinguishing features: - - -- **Simple design and management**: configuration file is easy to read and edit, even for beginners. -- **Set and forget**: can be scheduled to run through cron on a periodic basis. -- **Multi-protocol support for remote backup**: integrates seamlessly with various transfer protocols, applications and cloud backend (e.g., FTP, SCP, SSH-GPG, rsync, AWS S3) to transfer generated archives to a list of remote hosts. -- **Database backup support**: includes out-of-the-box support for backing up MySQL/MariaDB and PostgreSQL databases. -- **Encryption support**: supports GPG-based file encryption during backup. - -### Installing Backup-Manager on Linux ### - -Installation of backup-manager is quick and effortless since it is included in the base repositories of most Linux distributions. - -#### Debian, Ubuntu and their derivatives #### - - # aptitude install backup-manager - -During the installation process on Debian-based systems, you will be prompted to enter the directory where you want to store generated backup archives. If the chosen directory does not exist, it will be created automatically when you run backup-manager for the first time. - -Select OK and press ENTER. - -![](https://farm6.staticflickr.com/5614/15600105060_8cf4491e3b_z.jpg) - -In the next step, you will be asked to enter all the directories (separated by space) that you want to be backed up. It is advised, though not strictly required, to list several sub-directories of the same parent directory instead of entering only the parent directory. - -You can skip this step and configure the list of directories later using the variable BM_TARBALL_DIRECTORIES in the configuration file. Otherwise, feel free to add as many directories as you wish, and then choose OK: - -![](https://farm6.staticflickr.com/5610/15761238616_c9651fea1c_z.jpg) - -#### Fedora or CentOS/RHEL #### - - # yum install backup-manager - -On CentOS/RHEL, you will need to enable [EPEL repository][2] first before running the above yum command. - -### Configuring Backup-Manager ### - -The main configuration file for backup-manager is /etc/backup-manager.conf. This file is divided into sections where the backup methods and their associated variables (or "keys") are defined, making backup-manager a versatile tool that can be used in a wide variety of cases. - -For demonstration purposes, we will consider the following scenario: - -- Perform a full system backup of the /etc, /home, and /var/log directories on a weekly basis (we will set up the frequency later through cron). -- Transfer generated .tar.gz backup archives to a specific target directory in two different hosts, dev1 and dev3, over SSH. -- Back up a local MySQL database to the same destination hosts over SSH. - -Open /etc/backup-manager.conf with your favorite text editor and edit the following variables. Feel free to disregard the lines beginning with # if you want. They are provided only as explanatory comments in this article: - - # Specify the backup method(s) that will be used. - # tarball: takes a list of directories and builds the corresponding tarballs. - # mysql: archives MySQL databases using mysqldump. To restore the database, you # need to use the same tool manually. - export BM_ARCHIVE_METHOD="tarball mysql" - - # Where to store the backups. - export BM_REPOSITORY_ROOT="/var/archives" - - # The following directive indicates backup-manager to name - # the generated files after the directory that was backed up. - export BM_TARBALL_NAMEFORMAT="long" - - # Define the compression type for the generated files. - export BM_TARBALL_FILETYPE="tar.gz" - - # List the directories that you want to backup. - export BM_TARBALL_DIRECTORIES="/etc /home /var/log" - - # Exclude some subdirectories or file extensions. - export BM_TARBALL_BLACKLIST="/var/log/myotherapp.log *.mp3 *.mp4" - - # List the database(s) that you want to backup, separated by spaces. - export BM_MYSQL_DATABASES="mysql mybase wordpress dotclear phpbb2" - - # MySQL username. - export BM_MYSQL_ADMINLOGIN="root" - - # MySQL password for username. - export BM_MYSQL_ADMINPASS="mypassword" - - # Add support for DROP statements (optional). - export BM_MYSQL_SAFEDUMPS="true" - - # The hostname or IP address where the database(s) reside. - export BM_MYSQL_HOST="localhost" - - # Port where MySQL server is listening. - export BM_MYSQL_PORT="3306" - - # Compression type (optional). - export BM_MYSQL_FILETYPE="gzip" - - # Do not archive remote hosts, but only localhost. - BM_TARBALL_OVER_SSH="false" - - # User account for SSH upload. - export BM_UPLOAD_SSH_USER="root" - - # Absolute path of the user's private key for passwordless SSH login. - export BM_UPLOAD_SSH_KEY="/root/.ssh/id_rsa" - - # Remote hosts (make sure you have exported your public key to them): - export BM_UPLOAD_SSH_HOSTS="dev1 dev3" - - # Remote destination for uploading backups. If it doesn't exist, - # this directory will be created automatically the first time - # backup-manager runs. - export BM_UPLOAD_SSH_DESTINATION="/var/archives/backups/$HOSTNAME" - -### Running Backup-Manager ### - -To run backup-manager manually, type the following command. Optionally, you can add the '-v' flag in order to examine the process step by step, in a verbose way. - - # backup-manager - -The directories listed in BM_TARBALL_DIRECTORIES will be backed up in BM_REPOSITORY_ROOT as tarballs, and then transferred over SSH to hosts dev1 and dev3 specified in BM_UPLOAD_SSH_DESTINATION. - -![](https://farm8.staticflickr.com/7497/15761238646_945620d8b7_z.jpg) - -As can be seen in the above image, backup-manager during runtime creates a file named /root/.backup-manager_my.cnf with the MySQL password provided in BM_MYSQL_ ADMINPASS. That way, mysqldump can authenticate to a MySQL server without having to accept login password through the command line in plain-text format, which poses a security risk. - -### Running Backup-Manager through Cron ### - -Once you have decided what is the best day of the week (and the best time) to perform your weekly backup, you can have cron run backup-manager for you. - -Open root's crontab file (note that you must be logged on as root): - - # crontab -e - -Assuming that you want to run backup-manager on Sunday at 5:15 am, add the following line. - - 15 05 * * 0 /usr/sbin/backup-manager > /dev/null 2>&1 - -### Summary ### - -In this article we have shown how backup-manager is a simple, yet powerful and easy-to-use backup tool. There are several other options that you may want to consider in your backup strategy, so feel free to refer to the man page or to the user guide, which also contains several implementation examples and advice. - -Hope it helps. Feel free to leave your questions and comments below. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/linux-backup-manager.html - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/gabriel -[1]:https://github.com/sukria/Backup-Manager -[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html diff --git a/translated/tech/20141115 How to perform system backup with backup-manager on Linux.md b/translated/tech/20141115 How to perform system backup with backup-manager on Linux.md new file mode 100644 index 0000000000..d3ba18be5e --- /dev/null +++ b/translated/tech/20141115 How to perform system backup with backup-manager on Linux.md @@ -0,0 +1,154 @@ +Linux上使用备份管理器进行系统备份 +================================================================================ +无论简单与否,我们都有机会去了解这么一件事,那就是备份的重要性从来都不可以被低估。考虑到备份的方法真的多如牛毛,你可能想要知道怎样来有效地为你的系统选择正确的工具和和合适的策略。 + +在本文中,我将为你介绍[备份管理器][1],一个简单易用的命令行备份工具,在大多数的Linux发行版的标准软件库中都能见到它的身影。 + +是什么让备份管理器在众多的备份工具或备份策略中脱颖而出呢?让我来简单介绍一些它的与众不同的特性吧: + +- **简单的设计与管理**:配置文件易于读懂和编辑,即便是初学者也很容易上手。 +- **一劳永逸**:它在配置好后就可以通过cron周期性运作。 +- **支持多种协议远程备份**:无缝整合多种传输协议、应用和云后端(如,FTP,SCP,SSH-GPG,rsync,AWS S3等等)来传输生成的归档包到一组远程主机。 +- **支持数据库备份**:包括支持开箱即用备份MySQL/MariaDB和PostgreSQL数据库。 +- **支持加密**:备份过程中支持基于GPG文件的加密。 + +### 在Linux上安装备份管理器 ### + +备份管理器的安装是快速而无痛的,因为它就包含在大多数Linux发行版的基础软件库中。 + +#### Debian,Ubuntu及其衍生版 #### + + # aptitude install backup-manager + +在基于Debian的系统中安装时,会提示你输入要存放备份归档文件的目录。如果选择的目录不存在,那么当你首次运行备份管理器时它会自动创建。 + +选择OK并按回车键。 + +![](https://farm6.staticflickr.com/5614/15600105060_8cf4491e3b_z.jpg) + +在下一步中,会询问你要备份的所有目录(用空格分隔)。建议,但不是严格要求,列出同一父目录中的几个子目录,而不要仅仅输入父目录。 + +你可以跳过该步骤并在以后对配置文件中BM_TARBALL_DIRECTORIESb变量进行设置。否则的话,就请尽可能多地添加你想要的目录,然后选择OK: + +![](https://farm6.staticflickr.com/5610/15761238616_c9651fea1c_z.jpg) + +#### Fedora或CentOS/RHEL #### + + # yum install backup-manager + +在CentOS/RHEL上,在运行以上yum命令前,你将需要先启用[EPEL仓库][2]。 + +### 配置备份管理器 ### + +备份管理器的主配置文件是/etc/backup-manager.conf。该文件被划分为几个章节,里面定义了备份方法和相关的变量(或“键值”),这些配置让备份管理器成为一个多样化的工具,可以广泛地应付各种状况。 + +出于演示目的,我们将考虑以下环境: + +- 每周对/etc,/home以及/var/log目录进行一次完整备份(我们将在下面通过cron设置备份的频率)。 +- 通过SSH传输.tar.gz备份归档文件到两台不同主机dev1和dev3上指定的目标目录。 +- 通过SSH备份本地MySQL数据库到相同目标主机。 + +用你喜爱的文本编辑器打开/etc/backup-manager.conf文件,并编辑以下变量。如果你愿意,你大可不必理会那些#开头的行。在本文中,它只是用作说明的注释: + + # Specify the backup method(s) that will be used. + # tarball: takes a list of directories and builds the corresponding tarballs. + # mysql: archives MySQL databases using mysqldump. To restore the database, you # need to use the same tool manually. + export BM_ARCHIVE_METHOD="tarball mysql" + + # Where to store the backups. + export BM_REPOSITORY_ROOT="/var/archives" + + # The following directive indicates backup-manager to name + # the generated files after the directory that was backed up. + export BM_TARBALL_NAMEFORMAT="long" + + # Define the compression type for the generated files. + export BM_TARBALL_FILETYPE="tar.gz" + + # List the directories that you want to backup. + export BM_TARBALL_DIRECTORIES="/etc /home /var/log" + + # Exclude some subdirectories or file extensions. + export BM_TARBALL_BLACKLIST="/var/log/myotherapp.log *.mp3 *.mp4" + + # List the database(s) that you want to backup, separated by spaces. + export BM_MYSQL_DATABASES="mysql mybase wordpress dotclear phpbb2" + + # MySQL username. + export BM_MYSQL_ADMINLOGIN="root" + + # MySQL password for username. + export BM_MYSQL_ADMINPASS="mypassword" + + # Add support for DROP statements (optional). + export BM_MYSQL_SAFEDUMPS="true" + + # The hostname or IP address where the database(s) reside. + export BM_MYSQL_HOST="localhost" + + # Port where MySQL server is listening. + export BM_MYSQL_PORT="3306" + + # Compression type (optional). + export BM_MYSQL_FILETYPE="gzip" + + # Do not archive remote hosts, but only localhost. + BM_TARBALL_OVER_SSH="false" + + # User account for SSH upload. + export BM_UPLOAD_SSH_USER="root" + + # Absolute path of the user's private key for passwordless SSH login. + export BM_UPLOAD_SSH_KEY="/root/.ssh/id_rsa" + + # Remote hosts (make sure you have exported your public key to them): + export BM_UPLOAD_SSH_HOSTS="dev1 dev3" + + # Remote destination for uploading backups. If it doesn't exist, + # this directory will be created automatically the first time + # backup-manager runs. + export BM_UPLOAD_SSH_DESTINATION="/var/archives/backups/$HOSTNAME" + +### 运行备份管理器 ### + +要手动运行备份管理器,请输入以下命令。你也可以选择添加‘-v’标识以便一步一步详细检查运行过程。 + + # backup-manager + +BM_TARBALL_DIRECTORIES列出的目录将作为tarball备份到BM_REPOSITORY_ROOT目录,然后通过SSH传输到BM_UPLOAD_SSH_DESTINATION指定的主机dev1和dev3。 + +![](https://farm8.staticflickr.com/7497/15761238646_945620d8b7_z.jpg) + +正如你在上面图片中看到的那样,备份管理器在运行的时候创建了一个名为/root/.back-manager_my.cnf的文件,MySQL密码通过BM_MYSQL_ ADMINPASS指定。那样,mysqldump可以验证到MySQL服务器,而不必在命令行以明文格式接受密码,那样会有安全风险。 + +### 通过cron运行备份管理器 ### + +一旦决定哪一天是进行每周备份的最佳日子(最佳时间),你可以让cron来为你运行备份管理器。 + +打开root的crontab文件(注意,你必须以root登录): + + # crontab -e + +假定你想要在星期天的上午5:15分运行备份管理器,那么就添加下面这行。 + + 15 05 * * 0 /usr/sbin/backup-manager > /dev/null 2>&1 + +### 小结 ### + +在本文中,我已经展示了备份管理器这个备份工具是怎样的简单而强大,并且易于使用。在你的备份策略中,你可能还有其它几个选项需要考虑,请参阅手册页或用户手册,里面也包含了几个部署实例和建议。 + +希望此文对你有所帮助,请在下面随意提问和评论。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/linux-backup-manager.html + +作者:[Gabriel Cánepa][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:https://github.com/sukria/Backup-Manager +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html From 2f781c30e2afe0adb935cee00d9f5c00c37b1edd Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 17 Nov 2014 16:50:31 +0800 Subject: [PATCH 212/316] =?UTF-8?q?20141117-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...U usage using nice cpulimit and cgroups.md | 199 ++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 sources/tech/20141117 Restricting process CPU usage using nice cpulimit and cgroups.md diff --git a/sources/tech/20141117 Restricting process CPU usage using nice cpulimit and cgroups.md b/sources/tech/20141117 Restricting process CPU usage using nice cpulimit and cgroups.md new file mode 100644 index 0000000000..2e45a45ad5 --- /dev/null +++ b/sources/tech/20141117 Restricting process CPU usage using nice cpulimit and cgroups.md @@ -0,0 +1,199 @@ +Restricting process CPU usage using nice, cpulimit, and cgroups +================================================================================ +注:本文中的图片似乎都需要翻墙后才能看到,发布的时候注意 + +![](https://dl.dropboxusercontent.com/u/468982/blog/cpu_usage_blog/juggle.jpg) + +The Linux kernel is an incredible circus performer, carefully juggling many processes and their resource needs to keep your server humming along. The kernel is also all about equity: when there is competition for resources, the kernel tries to distribute those resources fairly. + +However, what if you've got an important process that needs priority? What about a low-priority process? Or what about limiting resources for a group of a processes? + +**The kernel can't determine what CPU processes are important without your help. ** + +Most processes are started at the same priority level and the Linux kernel schedules time for each task evenly on the processor. Have a CPU intensive process that can be run at a lower priority? Then you need to tell the scheduler about it! + +There are at least three ways in which you can control how much CPU time a process gets: + +- Use the nice command to manually lower the task's priority. +- Use the cpulimit command to repeatedly pause the process so that it doesn’t exceed a certain limit. +- Use Linux’s built-in **control groups**, a mechanism which tells the scheduler to limit the amount of resources available to the process. + +Let's look at how these work and the pros and cons of each. + +### Simulating high CPU usage ### + +Before looking at these three techniques, we need to find a tool that will simulate high CPU usage on a system. We will be using CentOS as our base system, and to artificially load the processor we can use the prime number generator from the [Mathomatic toolkit][1]. + +There isn’t a prebuilt package for CentOS so you will need to build it yourself. Download the source code from http://mathomatic.orgserve.de/mathomatic-16.0.5.tar.bz2 and then unpack the archive file. Change directory into **mathomatic-16.0.5/primes**. Run **make** and **sudo make install** to build and install the binaries. You will now have the **matho-primes** binary in **/usr/local/bin**. + +Run the command like this: + + /usr/local/bin/matho-primes 0 9999999999 > /dev/null & + +This will generate a list of prime numbers from zero to nine billion nine hundred ninety-nine million nine hundred ninety-nine thousand nine hundred ninety-nine. Since we don’t really want to keep the list, the output is redirected to /dev/null. + +Now run top and you will see that the matho-primes process is using all the available CPU. + +![](https://dl.dropboxusercontent.com/u/468982/blog/cpu_usage_blog/image00.jpg) + +Exit top (press the q key) and kill the matho-primes process (fg to bring the process to the foreground and press CTRL+C). + +### nice ### + +The nice command tweaks the priority level of a process so that it runs less frequently. **This is useful when you need to run a CPU intensive task as a background or batch job**. The niceness level ranges from -20 (most favorable scheduling) to 19 (least favorable). Processes on Linux are started with a niceness of 0 by default. The nice command (without any additional parameters) will start a process with a niceness of 10. At that level the scheduler will see it as a lower priority task and give it less CPU resources. + +Start two **matho-primes** tasks, one with nice and one without: + + nice matho-primes 0 9999999999 > /dev/null & + matho-primes 0 9999999999 > /dev/null & + +Now run top. + +![](https://dl.dropboxusercontent.com/u/468982/blog/cpu_usage_blog/image05.jpg) + +Observe that the process started without nice (at niceness level 0) gets more processor time, whereas the process with a niceness level of 10 gets less. + +What this means in real terms is that if you want to run a CPU intensive task you can start it using nice and the scheduler will always ensure that other tasks have priority over it. This means that the server (or desktop) will remain responsive even when under heavy load. + +Nice has an associated command called renice. It changes the niceness level of an already running process. To use it, find out the PID of process hogging all the CPU time (using ps) and then run renice: + + renice +10 1234 + +Where 1234 is the PID. + +Don’t forget to kill the **matho-primes** processes once you have finished experimenting with the **nice** and **renice** commands. + +### cpulimit ### + +The **cpulimit** tool curbs the CPU usage of a process by pausing the process at different intervals to keep it under the defined ceiling. It does this by sending SIGSTOP and SIGCONT signals to the process. It does not change the **nice** value of the process, instead it monitors and controls the real-world CPU usage. + +cpulimit **is useful when you want to ensure that a process doesn't use more than a certain portion of the CPU**. The disadvantage over nice is that the process can't use all of the available CPU time when the system is idle. + +To install it on CentOS type: + + wget -O cpulimit.zip https://github.com/opsengine/cpulimit/archive/master.zip + unzip cpulimit.zip + cd cpulimit-master + make + sudo cp src/cpulimit /usr/bin + +The commands above will download the source code from GitHub, unpack the archive file, build the binary, and copy it to /usr/bin. + +cpulimit is used in a similar way to nice, however you need to explicitly define the maximum CPU limit for the process using the ‘-l’ parameter. For example: + + cpulimit -l 50 matho-primes 0 9999999999 > /dev/null & + +![](https://dl.dropboxusercontent.com/u/468982/blog/cpu_usage_blog/image03.jpg) + +Note how the matho-primes process is now only using 50% of the available CPU time. On my example system the rest of the time is spent in idle. + +You can also limit a currently running process by specifying its PID using the ‘-p’ parameter. For example + + cpulimit -l 50 -p 1234 + +Where 1234 is the PID of the process. + +### cgroups ### + +Control groups (cgroups) are a Linux kernel feature that allows you to specify how the kernel should allocate specific resources to a group of processes. With cgroups you can specify how much CPU time, system memory, network bandwidth, or combinations of these resources can be used by the processes residing in a certain group. + +**The advantage of control groups over** nice **or** cpulimit **is that the limits are applied to a set of processes, rather than to just one**. Also, nice or cpulimit only limit the CPU usage of a process, whereas cgroups can limit other process resources. + +By judiciously using cgroups the resources of entire subsystems of a server can be controlled. For example in CoreOS, the minimal Linux distribution designed for massive server deployments, the upgrade processes are controlled by a cgroup. This means the downloading and installing of system updates doesn’t affect system performance. + +To demonstrate cgroups, we will create two groups with different CPU resources allocated to each group. The groups will be called ‘cpulimited’ and ‘lesscpulimited’. + +The groups are created with the cgcreate command like this: + + sudo cgcreate -g cpu:/cpulimited + sudo cgcreate -g cpu:/lesscpulimited + +The “-g cpu” part of the command tell cgroups that the groups can place limits on the amount of CPU resources given to the processes in the group. Other contollers include cpuset, memory, and blkio. The cpuset controller is related to the cpu controller in that it allows the processes in a group to be bound to a specific CPU, or set of cores in a CPU. + +The cpu controller has a property known as cpu.shares. It is used by the kernel to determine the share of CPU resources available to each process across the cgroups. The default value is 1024. By leaving one group (lesscpulimited) at the default of 1024 and setting the other (cpulimited) to 512, we are telling the kernel to split the CPU resources using a 2:1 ratio. + +To set the cpu.shares to 512 in the cpulimited group, type: + + sudo cgset -r cpu.shares=512 cpulimited + +To start a task in a particular cgroup you can use the cgexec command. To test the two cgroups, start matho-primes in the cpulimited group, like this: + + sudo cgexec -g cpu:cpulimited /usr/local/bin/matho-primes 0 9999999999 > /dev/null & + +If you run top you will see that the process is taking all of the available CPU time. + +![](https://dl.dropboxusercontent.com/u/468982/blog/cpu_usage_blog/image01.jpg) + +This is because when a single process is running, it uses as much CPU as necessary, regardless of which cgroup it is placed in. The CPU limitation only comes into effect when two or more processes compete for CPU resources. + +Now start a second matho-primes process, this time in the lesscpulimited group: + + sudo cgexec -g cpu:lesscpulimited /usr/local/bin/matho-primes 0 9999999999 > /dev/null & + +The top command shows us that the process in the cgroup with the greater cpu.shares value is getting more CPU time. + +![](https://dl.dropboxusercontent.com/u/468982/blog/cpu_usage_blog/image02.jpg) + +Now start another matho-primes process in the cpulimited group: + + sudo cgexec -g cpu:cpulimited /usr/local/bin/matho-primes 0 9999999999 > /dev/null & + +![](https://dl.dropboxusercontent.com/u/468982/blog/cpu_usage_blog/image04.jpg) + +Observe how the CPU is still being proportioned in a 2:1 ratio. Now the two matho-primes tasks in the cpulimited group are sharing the CPU equally, while the process in the other group still gets more processor time. + +You can [read the full control groups documentation from Red Hat][2] (which applies equally to CentOS 7). + +### Monitoring process CPU usage with Scout ### + +What's the easiest way to monitor process CPU usage? [Scout][3] automatically tracks track process CPU + memory usage when our monitoring agent is installed on your servers. + +### Monitoring process CPU usage with Scout ### + +What's the easiest way to monitor process CPU usage? Scout automatically tracks track process CPU + memory usage when our monitoring agent is installed on your servers. + +![](https://dl.dropboxusercontent.com/u/468982/blog/server_view/processes.png) + +You can then create triggers to alert you when processes exceed specific CPU + memory usage thresholds. + +[Signup for a free trial of Scout][4] to try process CPU monitoring. + +### TL;DR ### + +![](https://dl.dropboxusercontent.com/u/468982/blog/cpu_usage_blog/overview.png) + +The finite resources of any server or desktop are a valuable commodity. The tools described above help you manage those resources, especially the CPU resource: + +- **nice** is a great tool for 'one off' tweaks to a system. +- **cpulimit** is useful when you need to run a CPU intensive job and having free CPU time is essential for the responsiveness of a system. +- **cgroups** are the Swiss army knife of process limiting and offer the greatest flexibility. + +-------------------------------------------------------------------------------- + +via: http://blog.scoutapp.com/articles/2014/11/04/restricting-process-cpu-usage-using-nice-cpulimit-and-cgroups + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.mathomatic.org/ +[2]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Resource_Management_and_Linux_Containers_Guide/chap-Introduction_to_Control_Groups.html +[3]:https://scoutapp.com/ +[4]:https://scoutapp.com/ +[5]: +[6]: +[7]: +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: \ No newline at end of file From f08143a843aca1275e1cf03a858cacbb925af1f7 Mon Sep 17 00:00:00 2001 From: wangjiezhe Date: Mon, 17 Nov 2014 18:15:14 +0800 Subject: [PATCH 213/316] [translated]20141115 What are some obscure but useful Vim commands.md --- ...re some obscure but useful Vim commands.md | 148 +++++++++--------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/sources/tech/20141115 What are some obscure but useful Vim commands.md b/sources/tech/20141115 What are some obscure but useful Vim commands.md index 15cf1214d3..6bbbcd29bb 100644 --- a/sources/tech/20141115 What are some obscure but useful Vim commands.md +++ b/sources/tech/20141115 What are some obscure but useful Vim commands.md @@ -1,202 +1,202 @@ -wangjiezhe translating... - -What are some obscure but useful Vim commands +一些不起眼但非常有用的 Vim 命令 ================================================================================ -If my [latest post on the topic][1] did not tip you off, I am a Vim fan. So before some of you start stoning me, let me present you a list of "obscure Vim commands." What I mean by that is: a collection of commands that you might have not encountered before, but that might be useful to you. As a second disclaimer, I do not know which commands you might know and which one you find useful. So this list really is a collection of relatively less known Vim commands, but which can still probably be useful. +如果我的[关于这个话题的最新帖子][1]没有提醒到你的话,那我明确地说,我是一个 Vim 的粉丝。所以在你们中的某些人向我扔石头之前,我先向你们展示一系列“鲜为人知的 Vim 命令”。我的意思是,一些你可能以前没有碰到过的命令,但可能对你来说很有用。作为第二免责声明,我不知道哪些命令是你可能知道的,以及哪些是对你来说有用的。因此这些命令实际上是一些相对少见,但很可能很有用的 Vim 命令。 -### Saving a file and exiting ### +### 保存文件并退出 ### -I am a bit ashamed of myself for that one, but I only recently learned that the command +说起来有些惭愧,我也是最近才学到这个命令 :x -is equivalent to: +和下面的命令是等价的: :wq -which is saving and quitting the current file. +都是保存当前文件并退出。 -### Basic calculator ### +(译者注:这两个命令实际上并不完全等价,当文件被修改时两个命令时相同的。但如果未被修改,使用 `:x` 不会更改文件的修改时间,而使用 `:wq` 会改变文件的修改时间。) -While in insert mode, you can press Ctrl+r then type '=' followed by a simple calculation. Press ENTER, and the result will be inserted in the document. For example, try: +### 基本计算器 ### + +在插入模式下,你可以使用 Ctrl+r 键然后输入 `=`,再输入一个简单的算式。按 Enter 键,计算结果就会插入到文件中。例如,尝试输入: Ctrl+r '=2+2' ENTER ![](https://farm8.staticflickr.com/7486/15543918097_fbcf33ee6b.jpg) -And 4 will be inserted in the document. +然后 4 会被插入到文件中。 -### Finding duplicate consecutive words ### +### 查找重复的连续的单词 ### -When you type something quickly, it happens that you write a word twice in a row. Just like this this. This kind of error can fool anyone, even when re-reading yourself. Hopefully, there is a simple regular expression to prevent this. Use the search ('/' by default) and type: +当你很快地打字时,很有可能会连续输入同一个单词两次,就像 this this。这种错误可能骗过任何一个人,即使是你自己重新阅读一边也不可避免。幸运的是,有一个简单的正则表达式可以用来预防这个错误。使用搜索命令(默认时 `/`)然后输入: \(\<\w\+\>\)\_s*\1 -This should display all the duplicate words. And for maximum effect, don't forget to place: +这会显示所有重复的单词。要达到最好的效果,不要忘记把下面的命令: set hlsearch -in your .vimrc file to highlight all search hits. +放到你的 .vimrc 文件中高亮所有的匹配。 ![](https://farm8.staticflickr.com/7531/15730650082_c2764857e2.jpg) -### Abbreviations ### +### 缩写 ### -Probably one of the most impressive tricks, you can define abbreviations in Vim, which will replace what you type with somethig else in real time. The syntax is the following: +一个很可能是最令人印象深刻的窍门是你可以在 Vim 中定义缩写,它可以实时地把你输入的东西替换为另外的东西。语法格式如下: - :ab [abbreviation] [what to replace it with] + :ab [缩写] [要替换的文字] -The generic example is: +一个通用的例子是: :ab asap as soon as possible -Which will replace "asap" with "as soon as possible" as you write. +会把你输入的 “asap” 替换为 “as soon as possible”。 -### Save a file that you forgot to open as root ### +### 在你忘记用 root 方式打开文件时的文件保存 ### -This is maybe an all time favorite in the forums. Whenever you open a file that you do not have permission to write to (say a system configuration file for example) and make some changes, Vim will not save them with the normal command: ':w' +这可能是一个在论坛中一直受欢迎的命令。每当你打开一个你没有写入权限的文件(比如系统配置文件)并做了一些修改,Vim 无法通过普通的 “:w” 命令来保存。 -Instead of redoing the changes after opening it again as root, simply run: +你不需要重新以 root 方式打开文件再进行修改,只需要运行: :w !sudo tee % -Which will save it as root directly. +这会直接以 root 方式保存。 -### Crypt your text on the go ### +### 实时加密文本 ### -If you do not want someone to be able to read whatever is on your screen, Vim has the built in option to [ROT13][2]-encode your text with the following command: +如果你不想让别人看懂你的屏幕上的内容,你可以使用一个内置的选项,通过下面的命令使用 [ROT13][2] 来对文本进行编码: ggVGg? ![](https://farm8.staticflickr.com/7487/15727174681_7773a97ea2.jpg) -'gg' for moving the cursor to the first line of the Vim buffer, 'V' for entering visual mode, and 'G' for moving the cursor to the last line of the buffer. So 'ggVG' will make the visual mode cover the entire buffer. Finally 'g?' applies ROT13 encoding to the selected region. +`gg` 把光标移动到 Vim 缓冲区的第一行,`V` 进入可视模式,`G` 把光标移动到缓冲区的最后一行。因此,`ggVG` 使可视模式覆盖这个当前缓冲区。最后 `g?` 使用 ROT13 对整个区域进行编码。 -Notice that this should be mapped to a key for maximum efficiency. It also works best with alphabetical characters. And to undo it, the best is simply to use the undo command: 'u' +注意它应该被映射到一个最长使用的键。它对字母符号也可以很好地工作。要对它进行撤销,最好的方法就是使用撤销命令:`u`。 -### Auto-completion ### +###自动补全 ### -Another one to be ashamed of, but I see a lot of people around me not knowing it. Vim has by default an auto-completion features. Yes it is very basic, and can be enhanced by plugins, but it can still help you. The process is simple. Vim can try to guess the end of your word based on the word you wrote earlier. If you are typing the word "compiler" for the second time in the same file for example, just start typing "com" and still in insertion mode, press Ctrl+n to see Vim finish your word for you. Simple but handy. +这是另外一个令我感到惭愧的功能,但我发现周围很多人并不知道。Vim 默认有自动补全的功能。的确这个功能是很基本的,并且可以通过插件来增强,但它也很有帮助。方法很简单。Vim 尝试通过已经输入的单词来预测单词的结尾。比如当你在同一个文件中第二次输入 “compiler” 时,仅仅输入 “com” 然后保持在插入模式,按 Ctrl+n 键就可以看到 Vim 为你补全了单词。很简单,但也很有用。 -### Look at the diff between two files ### +### 比较两个文件的不同 ### -Probably a lot of you know about vimdiff command, which allows you to open Vim in split mode and compare two files with the syntax: +你们中的大多数很可能都知道 vimdiff 命令,它可以使用分离模式打开 Vim 并比较两个文件的不同。语法如下: - $ vimdiff [file1] [file2] + $ vimdiff [文件1] [文件2] -But the same result is achievable with the Vim command: +但同样的结果也可以通过下面的 Vim 命令来获得: :diffthis -First open your initial file in Vim. Then open the second one in split mode with: +首先在 Vim 中打开原始文件。然后使用分离模式带来第二个文件: - :vsp [file2] + :vsp [文件2] -Finally launch: +最后在第一个缓冲区里输入: :diffthis -in the first buffer, switch buffer with Ctrl+w and type: +通过 Ctrl+w 来切换缓冲区并再次输入: :diffthis -again. +这样两个文件中不同的部分就会被高亮。 -The two files will then be highlighted with focus on their differences. +(译者注:可以直接在一个缓冲区里使用命令 `:windo diffthis`,而不用输入 `:diffthis` 两次) -To turn the diff off, simply use: +要停止比较,使用: :diffoff -### Revert the document in time ### +### 按时间回退文件 ### -Vim keeps track of the changes you make to a file, and can easily revert it to what it was earlier in time. The command is quite intuitive. For example: +Vim 会记录文件的更改,你很容易可以回退到之前某个时间。该命令时相当直观的。比如: :earlier 1m -will revert the document to what it was a minute ago. +会把文件回退到 1 分钟以前的状态。 -Note that you can inverse this with the command: +注意,你可以使用下面的命令进行相反的转换: :later -### Delete inside markers ### +### 删除标记内部的文字 ### -Something that I always wanted to be comfortable doing when I started using Vim: easily delete text between brackets or parenthesis. Go to the first marker and simply use the syntax: +当我开始使用 Vim 时一件我总是想很方便做的事情是如何轻松的删除方括号或圆括号里的内容。转到开始的标记,然后使用下面的语法: - di[marker] + di[标记] -So for example, deleting between parenthesis would be: +比如,把光标放在开始的圆括号上,使用下面的命令来删除圆括号内的文字: di( -once your cursor is on the first parenthesis. For brackets or quotation marks, it would be: +如果是方括号或者是引号,则使用: di{ -and: +和: di" -### Delete until a specific maker ### +### 删除指定标记前的内容 ### -A bit similar to deleting inside a marker but for different purpose, the command: +和删除标记内部有些相似,但目的不同。命令如下: - dt[marker] + dt[标记] -will delete everything in between your cursor and the marker (leaving it safe) if the marker is found on the same line. For example: +会删除所有光标和标记之间的内容(保持标记不动),如果在同一行有这个标记的话。例如 dt. -will delete the end of your sentence, leaving the '.' intact. +会删除至句子的末尾,但保持 ‘.’ 不动。 -### Turn Vim into a hex editor ### +### 把 Vim 变为十六进制编辑器 ### -This is not my favorite trick, but some might find it interesting. You can chain Vim and the xxd utility to convert the text into hexadecimal with the command: +这不是我最喜欢的窍门,但有时会很有趣。你可以把 Vim 和 xxd 功能连起来来把文件转换为十六进制模式。命令如下: :%!xxd ![](https://farm6.staticflickr.com/5607/15109142674_e99466f2db_z.jpg) -And similarly, you can revert this with: +类似的,你可以通过下面的命令恢复原来的状态: :%!xxd -r -### Place the text under your cursor in the middle of the screen ### +### 把光标下的文字置于屏幕中央 ### -Everything is in the title. If you want to force the screen to scroll and place whatever is under your cursor in the middle, use the command: +所有要做的事情都包含在标题中。如果你想强制滚动屏幕来把光标下的文字置于屏幕的中央,在可视模式中使用命令(译者注:在普通模式中也可以): zz -in visual mode. +### 跳到上一个/下一个 位置 ### -### Jump to previous/next position ### - -When editing a very big file, it is frequent to make changes somewhere, and jump to another place right after. If you wish to jump back simply, use: +当你编辑一个很大的文件时,经常要做的事是在某处进行修改,然后跳到另外一处。如果你想跳回之前修改的地方,使用命令: Ctrl+o -to go back to where you were. +来回到之前修改的地方 -And similarly: +类似的: Ctrl+i -will revert such jump back. +会回退上面的跳动。 -### Render the current file as a web page ### +### 把当前文件转化为网页 ### -This will generate an HTML page displaying your text, and show the code in a split screen: +这会生成一个 HTML 文件来显示文本,并在分开的窗口显示源代码: - :%Tohtml + :%TOhtml + +(译者注:原文是 `:%Tohtml`,但在我的电脑上是 `:%TOhtml`) ![](https://farm8.staticflickr.com/7550/15727174701_c405f85a84_z.jpg) -Very basic but so fancy. +很基本但很不错。 -To conclude, this list was assembled after reading some various forum threads and the [Vim Tips wiki][3], which I really recommend if you want to boost your knowledge about the editor. +总的来说,这一系列命令是在我读了许多论坛主题和 [Vim Tips wiki][3](如果你想学习更多关于编辑器的知识,我非常推荐这篇文章) 之后收集起来的。 -If you know any Vim command that you find useful and that you think most people do not know about, feel free to share it in the comments. As said in the introduction, an "obscure but useful" command is very subjective, but sharing is always good. +如果你还知道哪些非常有用但你认为大多数人并不知道的命令,可以随意在评论中分享出来。就像引言中所说的,一个“鲜为人知但很有用的”命令是很主观的,但分享出来总是好的。 -------------------------------------------------------------------------------- From af731d369dd0b86f544f9a1575c9aa06facab539 Mon Sep 17 00:00:00 2001 From: wangjiezhe Date: Mon, 17 Nov 2014 18:16:34 +0800 Subject: [PATCH 214/316] moved to translated --- .../20141115 What are some obscure but useful Vim commands.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20141115 What are some obscure but useful Vim commands.md (100%) diff --git a/sources/tech/20141115 What are some obscure but useful Vim commands.md b/translated/tech/20141115 What are some obscure but useful Vim commands.md similarity index 100% rename from sources/tech/20141115 What are some obscure but useful Vim commands.md rename to translated/tech/20141115 What are some obscure but useful Vim commands.md From f560b8452a1ec0f2b8653e23931c678aa1f04c70 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 17 Nov 2014 22:22:42 +0800 Subject: [PATCH 215/316] PUB:20141008 How to configure a host intrusion detection system on CentOS @GOLinux --- ...st intrusion detection system on CentOS.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) rename {translated/tech => published}/20141008 How to configure a host intrusion detection system on CentOS.md (67%) diff --git a/translated/tech/20141008 How to configure a host intrusion detection system on CentOS.md b/published/20141008 How to configure a host intrusion detection system on CentOS.md similarity index 67% rename from translated/tech/20141008 How to configure a host intrusion detection system on CentOS.md rename to published/20141008 How to configure a host intrusion detection system on CentOS.md index 90ec639b97..c671e46083 100644 --- a/translated/tech/20141008 How to configure a host intrusion detection system on CentOS.md +++ b/published/20141008 How to configure a host intrusion detection system on CentOS.md @@ -1,18 +1,18 @@ -在CentOS上配置主机入侵检测系统 +在CentOS上配置基于主机的入侵检测系统(IDS) ================================================================================ -所有系统管理员想要在他们生产服务器上部署的第一个安全手段之一,就是检测文件篡改的机制——不仅仅是文件内容,而且也包括它们的属性。 +所有系统管理员想要在他们生产服务器上首先要部署的安全手段之一,就是检测文件篡改的机制——不仅仅是文件内容,而且也包括它们的属性。 -[AIDE][1] (“高级入侵检测环境”的简称)是一个开源的基于主机的入侵检测系统。AIDE通过检查大量文件属性的不一致性来检查系统二进制文件和基本配置文件的完整性,这些文件属性包括权限、文件类型、索引节点、链接数、链接名、用户、组、文件大小、块计数、修改时间、添加时间、创建时间、acl、SELinux安全上下文、xattrs,以及md5/sha校验和在内。 +[AIDE][1] (“高级入侵检测环境”的简称)是一个开源的基于主机的入侵检测系统。AIDE通过检查大量文件属性的不一致性来检查系统二进制文件和基本配置文件的完整性,这些文件属性包括权限、文件类型、索引节点、链接数、链接名、用户、组、文件大小、块计数、修改时间、添加时间、创建时间、acl、SELinux安全上下文、xattrs,以及md5/sha校验值在内的各种特征。 -AIDE通过扫描一台(未被篡改)的Linux服务器的文件系统来构建文件属性数据库,以后将服务器文件属性与数据库中的进行校对,然后在服务器运行时对修改过的索引的文件发出警告。处于这个原因,AIDE必须在系统更新后或其配置文件进行合法修改后重新对受保护的文件做索引。 +AIDE通过扫描一台(未被篡改)的Linux服务器的文件系统来构建文件属性数据库,以后将服务器文件属性与数据库中的进行校对,然后在服务器运行时对被修改的索引了的文件发出警告。出于这个原因,AIDE必须在系统更新后或其配置文件进行合法修改后重新对受保护的文件做索引。 -对于某些客户,他们可能会根据他们的安全策略在他们的服务器上强制安装某种入侵检测系统。但是,不管客户是否要求,系统管理员都部署一个入侵检测系统,这通常是一个很好的做法。 +对于某些客户,他们可能会根据他们的安全策略在他们的服务器上强制安装某种入侵检测系统。但是,不管客户是否要求,系统管理员都应该部署一个入侵检测系统,这通常是一个很好的做法。 -### 安装AIDE到CentOS或RHEL ### +### 在 CentOS或RHEL 上安装AIDE ### -AIDE的初始安装(同时是首次运行)最好是在系统刚安装完后,并且没有任何服务暴露在互联网,甚至是局域网中。在这个早期阶段,我们可以将来自外部的一切闯入和破坏风险降到最低限度。事实上,这也是确保系统在AIDE构建其初始数据库时保持干净的唯一途径。 +AIDE的初始安装(同时是首次运行)最好是在系统刚安装完后,并且没有任何服务暴露在互联网甚至局域网时。在这个早期阶段,我们可以将来自外部的一切闯入和破坏风险降到最低限度。事实上,这也是确保系统在AIDE构建其初始数据库时保持干净的唯一途径。(LCTT 译注:当然,如果你的安装源本身就存在安全隐患,则无法建立可信的数据记录) -出于上面的原因,在安装完AIDE后,我们可以执行下面的命令: +出于上面的原因,在安装完系统后,我们可以执行下面的命令安装AIDE: # yum install aide @@ -20,7 +20,7 @@ AIDE的初始安装(同时是首次运行)最好是在系统刚安装完后 ### 配置AIDE ### -默认配置文件是/etc/aide.conf,该文件介绍了几个示例保护规则(如FIPSR,NORMAL,DIR,DATAONLY),各个规则后面跟着一个等于号以及要检查的文件属性列表,或者某些预定义的规则(由+分隔)。你也可以使用此种格式自定义规则。 +默认配置文件是/etc/aide.conf,该文件介绍了几个示例保护规则(如FIPSR,NORMAL,DIR,DATAONLY),各个规则后面跟着一个等号以及要检查的文件属性列表,或者某些预定义的规则(由+分隔)。你也可以使用此种格式自定义规则。 ![](https://farm3.staticflickr.com/2947/15446746115_7d0a291b0a_o.png) @@ -35,11 +35,11 @@ AIDE的初始安装(同时是首次运行)最好是在系统刚安装完后 条目之前的感叹号(!)告诉AIDE忽略子目录(或目录中的文件),对于这些可以另外定义规则。 -在上面的例子中,PERMS是用于/etc机器子目录和文件的默认规则。然而,没有规则将用于/etc中的备份文件(如/etc/.*~),也没有规则用于/etc/mtab文件。对于/etc中的一些选择性的子目录或文件,NORMAL规则会被应用,覆盖默认规则PERMS。 +在上面的例子中,PERMS是用于/etc机器子目录和文件的默认规则。然而,对于/etc中的备份文件(如/etc/.*~)则不应用任何规则,也没有规则用于/etc/mtab文件。对于/etc中的其它一些选定的子目录或文件,使用NORMAL规则替代默认规则PERMS。 -定义并应用正确的规则到系统中正确的位置,是使用AIDE最难的一部分,但作出好的判断是一个良好的开始。作为首要的一条规则,不要检查不必要的属性。例如,检查/var/log或/var/spool里头的文件的修改时间将导致大量误报,因为许多的应用程序和守护进程经常会写入内容到该位置,而这些内容都没有问题。此外,检查多个校验和可能加强安全性,但随之而来的是AIDE的运行时间的增加。 +定义并应用正确的规则到系统中正确的位置,是使用AIDE最难的一部分,但作一个好的判断是一个良好的开始。作为首要的一条规则,不要检查不必要的属性。例如,检查/var/log或/var/spool里头的文件的修改时间将导致大量误报,因为许多的应用程序和守护进程经常会写入内容到该位置,而这些内容都没有问题。此外,检查多个校验值可能会加强安全性,但随之而来的是AIDE的运行时间的增加。 -你可以选择将检查结果发送到你的邮箱,如果你使用MAILTO变量指定了电子邮件地址。将下面这一行放到/etc/aide.conf中的任何位置即可。 +可选的,如果你使用MAILTO变量指定电子邮件地址,就可以将检查结果发送到你的邮箱。将下面这一行放到/etc/aide.conf中的任何位置即可。 MAILTO=root@localhost @@ -51,7 +51,7 @@ AIDE的初始安装(同时是首次运行)最好是在系统刚安装完后 ![](https://farm3.staticflickr.com/2942/15446399402_198472e983_o.png) -根据/etc/aide.conf生成的/var/lib/aide/aide.db.new.gz文件需要被重命名为/var/lib/aide/aide.db.gz,以便AIDE能读取它: +根据/etc/aide.conf生成的/var/lib/aide/aide.db.new.gz文件需要被重命名为/var/lib/aide/aide.db.gz,以便AIDE能读取它: # mv /var/lib/aide/aide.db.new.gz /var/lib/aide.db.gz @@ -67,7 +67,7 @@ AIDE的初始安装(同时是首次运行)最好是在系统刚安装完后 ### 生产环境中管理AIDE ### -在构建了一个初始AIDE数据库后,作为不断推进的系统管理活动,你常常需要处于某些合法的理由更新受保护的服务器。每次服务器更新后,你必须重新构建AIDE数据库,以更新数据库内容。要完成该任务,请执行以下命令: +在构建了一个初始AIDE数据库后,作为不断进行的系统管理活动,你常常需要因为某些合法的理由更新受保护的服务器。每次服务器更新后,你必须重新构建AIDE数据库,以更新数据库内容。要完成该任务,请执行以下命令: # aide --update @@ -109,7 +109,7 @@ AIDE的初始安装(同时是首次运行)最好是在系统刚安装完后 ### 结尾 ### -如果你曾经发现你自己有很好的理由相信系统被入侵了,但是第一眼又不能确定到底哪些东西被改动了,那么像AIDE这样一个基于主机的入侵检测系统就会很有帮助了,因为它可以帮助你很快识别出哪些东西被改动过,而不是通过猜测来浪费宝贵的时间。 +如果你曾经发现你自己有很好的理由确信系统被入侵了,但是第一眼又不能确定到底哪些东西被改动了,那么像AIDE这样一个基于主机的入侵检测系统就会很有帮助了,因为它可以帮助你很快识别出哪些东西被改动过,而不是通过猜测来浪费宝贵的时间。 -------------------------------------------------------------------------------- @@ -117,7 +117,7 @@ via: http://xmodulo.com/host-intrusion-detection-system-centos.html 作者:[Gabriel Cánepa][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9e188b47b45e2fd9f5d260f9eca0b77227f60f8f Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 17 Nov 2014 22:35:16 +0800 Subject: [PATCH 216/316] PUB:20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL @KayGuoWhu --- ... open a port in the firewall on CentOS or RHEL.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md (74%) diff --git a/translated/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md b/published/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md similarity index 74% rename from translated/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md rename to published/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md index 9656d83e42..c569a622b4 100644 --- a/translated/tech/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md +++ b/published/20141029 Linux FAQs with Answers--How to open a port in the firewall on CentOS or RHEL.md @@ -1,8 +1,8 @@ -Linux有问必答——在CentOS或RHEL防火墙上开启端口 +Linux有问必答:在CentOS或RHEL防火墙上开启端口 ================================================================================ > **问题**:我在CentOS系统上运行一台网页或文件服务器,打算远程访问服务器。因此,我需要更改防火墙规则以允许访问系统上的某个TCP端口。那么,有什么好方法在CentOS或RHEL系统的防火墙上开启TCP/UDP端口? -Out of the box,诸如CentOS或RHEL的企业级Linux发行版包含内置的强大防火墙,它们默认的防火墙规则十分严格。因此,如果你安装了任何定制服务(比如web服务器、NFS和Samba),那么它们的流量很有可能被防火墙规则阻塞。所以需要在防火墙上开启必要的端口以允许流量通过。 +如果希望在服务器上提供服务,诸如CentOS或RHEL的企业级Linux发行版包含内置的强大防火墙,它们默认的防火墙规则十分严格。因此,如果你安装了任何定制的服务(比如web服务器、NFS和Samba),那么它们的流量很有可能被防火墙规则阻塞。所以需要在防火墙上开启必要的端口以允许流量通过。 在CentOS/RHEL 6或更早的版本上,iptables服务允许用户与netfilter内核模块交互来在用户空间中配置防火墙规则。然而,从CentOS/RHEL 7开始,一个叫做firewalld新用户空间接口被引入以取代iptables服务。 @@ -16,9 +16,9 @@ Out of the box,诸如CentOS或RHEL的企业级Linux发行版包含内置的强 ### 在CentOS/RHEL 7上开启端口 ### -启动CentOS或RHEL 7后,防火墙规则设置由firewalld服务进程默认管理。一个叫做firewall-cm的命令行客户端支持和这个守护进程通信以永久修改防火墙规则。 +启动CentOS/RHEL 7后,防火墙规则设置由firewalld服务进程默认管理。一个叫做firewall-cmd的命令行客户端支持和这个守护进程通信以永久修改防火墙规则。 -使用这些命令来长久打开一个新端口(如TCP/80)。 +使用这些命令来永久打开一个新端口(如TCP/80)。 $ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent $ sudo firewall-cmd --reload @@ -42,7 +42,7 @@ Out of the box,诸如CentOS或RHEL的企业级Linux发行版包含内置的强 ![](https://farm6.staticflickr.com/5602/15628237745_4409cff52f_z.jpg) -如果想要为任何已知的服务(如web服务器)修改防火墙,只需使防火墙对该服务可用,然后关闭工具。如果想要开启任意一个TCP/UDP端口,选择“Forward”按钮,然后进入下一个界面。 +如果想要为任何已知的服务(如web服务器)修改防火墙,只需勾选该服务,然后关闭工具。如果想要开启任意一个TCP/UDP端口,选择“Forward”按钮,然后进入下一个界面。 ![](https://farm4.staticflickr.com/3941/15604533696_12857827ea_z.jpg) @@ -63,6 +63,6 @@ Out of the box,诸如CentOS或RHEL的企业级Linux发行版包含内置的强 via: http://ask.xmodulo.com/open-port-firewall-centos-rhel.html 译者:[KayGuoWhu](https://github.com/KayGuoWhu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file From 18167c2ab088a96117297ef51bb81b294d61a302 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 17 Nov 2014 22:42:19 +0800 Subject: [PATCH 217/316] PUB:20141024 How to Upgrade Ubuntu 14.04 LTS to Ubuntu 14.10 @geekpi --- ...41024 How to Upgrade Ubuntu 14.04 LTS to Ubuntu 14.10.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20141024 How to Upgrade Ubuntu 14.04 LTS to Ubuntu 14.10.md (89%) diff --git a/translated/tech/20141024 How to Upgrade Ubuntu 14.04 LTS to Ubuntu 14.10.md b/published/20141024 How to Upgrade Ubuntu 14.04 LTS to Ubuntu 14.10.md similarity index 89% rename from translated/tech/20141024 How to Upgrade Ubuntu 14.04 LTS to Ubuntu 14.10.md rename to published/20141024 How to Upgrade Ubuntu 14.04 LTS to Ubuntu 14.10.md index 473bd5c72e..b01f4725d8 100644 --- a/translated/tech/20141024 How to Upgrade Ubuntu 14.04 LTS to Ubuntu 14.10.md +++ b/published/20141024 How to Upgrade Ubuntu 14.04 LTS to Ubuntu 14.10.md @@ -1,4 +1,4 @@ -如何从Ubuntu 14.04 LTS 升级到Ubuntu 14.10 +小白技巧:如何从Ubuntu 14.04 LTS 升级到Ubuntu 14.10 ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/software-and-updates.jpg) @@ -17,7 +17,7 @@ Canonical不会强迫14.04的用户升级到14.10这个中间版本 切换后你会想快点更新。 -现在准备就绪!Canonical此刻会弹出“升级”提示给用户(想比较普通的ISO镜像而言经常延迟)可以通过软件更新工具更新到14.10了。 +现在准备就绪!Canonical此刻会弹出“升级”提示给用户(相比较普通的ISO镜像而言经常延迟)可以通过软件更新工具更新到14.10了。 -------------------------------------------------------------------------------- @@ -25,7 +25,7 @@ via: http://www.omgubuntu.co.uk/2014/10/upgrade-ubuntu-14-04-to-14-10 作者:[Joey-Elijah Sneddon][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 4cf6ca906f3228eab6acedd889f24e505342f64f Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 17 Nov 2014 22:59:09 +0800 Subject: [PATCH 218/316] PUB:20141014 Linux FAQs with Answers--How to create and mount an XFS file system on Linux @Vic020 --- ...eate and mount an XFS file system on Linux.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20141014 Linux FAQs with Answers--How to create and mount an XFS file system on Linux.md (60%) diff --git a/translated/tech/20141014 Linux FAQs with Answers--How to create and mount an XFS file system on Linux.md b/published/20141014 Linux FAQs with Answers--How to create and mount an XFS file system on Linux.md similarity index 60% rename from translated/tech/20141014 Linux FAQs with Answers--How to create and mount an XFS file system on Linux.md rename to published/20141014 Linux FAQs with Answers--How to create and mount an XFS file system on Linux.md index 1ca62443da..e30ae8b532 100644 --- a/translated/tech/20141014 Linux FAQs with Answers--How to create and mount an XFS file system on Linux.md +++ b/published/20141014 Linux FAQs with Answers--How to create and mount an XFS file system on Linux.md @@ -1,16 +1,16 @@ Linux有问必答-如何创建和挂载XFS文件系统 ================================================================================ -> **问题**: 我听说一个厉害的文件系统XFS,打算在我的磁盘上试试XFS。那格式化和挂载XFS文件系统的Linux命令是什么呢? +> **问题**: 我听说一个牛X的文件系统XFS,打算在我的磁盘上试试XFS。那格式化和挂载XFS文件系统的Linux命令是什么呢? -[XFS][1]是高性能文件系统,SGI为他们的IRIX平台设计。自从2001年移植到Linux内核上,由于它的[高性能][2],XFS作为许多企业级系统的首选,特别是有大量数据,需要结构化伸缩性和稳定性的。例如,RHEL/CentOS 7 和Oracle Linux将XFS作为默认文件系统,SUSE/openSUSE已经为XFS做了长期支持。 +[XFS][1]是高性能文件系统,SGI为他们的IRIX平台而设计。自从2001年移植到Linux内核上,由于它的[高性能][2],XFS成为了许多企业级系统的首选,特别是有大量数据,需要结构化伸缩性和稳定性的。例如,RHEL/CentOS 7 和Oracle Linux将XFS作为默认文件系统,SUSE/openSUSE已经为XFS做了长期支持。 -XFS有许多独特的功能使他从众多文件系统中脱颖而出,像 伸缩/并行 IO,元数据日志,热整理,暂停/回复 IO,延迟分配等。 +XFS有许多独特的性能提升功能使他从众多文件系统中脱颖而出,像可伸缩/并行 IO,元数据日志,热碎片整理,IO 暂停/恢复,延迟分配等。 -如果你想要创建和挂载XFS文件系统到你的Linux平台,下面是相关命令。 +如果你想要创建和挂载XFS文件系统到你的Linux平台,下面是相关的操作命令。 ### 安装 XFS系统工具集 ### -首先,你需要安装XFS系统工具集,这样允许你执行许多XFS相关的管理任务。(例如,格式化,[扩展][3],修复,设置配额,改变参数等) +首先,你需要安装XFS系统工具集,这样允许你执行许多XFS相关的管理任务。(例如:格式化,[扩展][3],修复,设置配额,改变参数等) Debian, Ubuntu , Linux Mint系统: @@ -34,7 +34,7 @@ Fedora, CentOS, RHEL系统: 假设此创建的分区叫/dev/sdb1。 -接下来,格式化分区为XFS,使用mkfs.xfs命令。如果已有其他文件系统创建在此分区,必须加上"-f"参数来覆盖它。 +接下来,格式化分区为XFS,使用mkfs.xfs命令。如果已有其他文件系统创建在此分区,必须加上"-f"参数来覆盖它。 $ sudo mkfs.xfs -f /dev/sdb1 @@ -50,7 +50,7 @@ Fedora, CentOS, RHEL系统: ![](https://farm4.staticflickr.com/3938/15474273445_aeacdca6eb_o.png) -如果你想要启动时自动挂载XFS分区在/storage上,加入下行到/etc/fstab: +如果你想要启动时自动挂载XFS分区在/storage上,加入下列行到/etc/fstab: /dev/sdb1 /storage xfs defaults 0 0 @@ -59,7 +59,7 @@ Fedora, CentOS, RHEL系统: via: http://ask.xmodulo.com/create-mount-xfs-file-system-linux.html 译者:[Vic___/VicYu](http://www.vicyul.net/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 68da12315f65518d7bb16b76c45b7ac2139701f7 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 17 Nov 2014 23:11:30 +0800 Subject: [PATCH 219/316] PUB:20141008 How to speed up slow apt-get install on Debian or Ubuntu @su-kaiyao --- ...ed up slow apt-get install on Debian or Ubuntu.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20141008 How to speed up slow apt-get install on Debian or Ubuntu.md (87%) diff --git a/translated/tech/20141008 How to speed up slow apt-get install on Debian or Ubuntu.md b/published/20141008 How to speed up slow apt-get install on Debian or Ubuntu.md similarity index 87% rename from translated/tech/20141008 How to speed up slow apt-get install on Debian or Ubuntu.md rename to published/20141008 How to speed up slow apt-get install on Debian or Ubuntu.md index 2f5b5de8ba..425a19ae11 100644 --- a/translated/tech/20141008 How to speed up slow apt-get install on Debian or Ubuntu.md +++ b/published/20141008 How to speed up slow apt-get install on Debian or Ubuntu.md @@ -1,9 +1,9 @@ -如何加速Debian或Ubuntu上缓慢的apt-get安装 -=== +极速蜗牛:apt-fast +================ 如果你在Debian或Ubuntu系统上经常感觉到**apt-get** 或 **aptitude**包安装速度过慢,那么这里就有几种改善这一情况的方法。你有没有考虑过改变正被使用的默认镜像站点?你有没有排除因特网连接的上游带宽成为瓶颈的可能? -没有别的,你可以尝试第三个选择:使用[apt-fast][1]工具。apt-fast实际上是一个围绕apt-get和aptitude所写的shell脚本容器,它能过加速包的下载速度。apt-fast本质上采用[aria2][2]下载工具,这款工具能够以“块”的方式从多个镜像并行下载一个文件(就像BitTorrent下载)。 +如果不是这些原因,你可以尝试第三个选择:使用[apt-fast][1]工具。apt-fast实际上是一个围绕apt-get和aptitude所写的shell脚本容器,它能加速包的下载速度。apt-fast本质上采用[aria2][2]下载工具,这款工具能够以“块”的方式从多个镜像并行下载一个文件(就像BitTorrent下载)。 ### 在Debian或Ubuntu上安装apt-fast @@ -83,7 +83,7 @@ Ubuntu/Mint: ![](http://farm8.staticflickr.com/7309/10585846956_6c98c6dcc9_z.jpg) -如前面所示,apt-fast的并行下载是通过aria2完成的。你可以从下面多个镜像验证并行下载。 +如前面所示,apt-fast的并行下载是通过aria2完成的。你可以看到如下图般从多个镜像并行下载。 $ sudo netstat -nap | grep aria2c @@ -97,7 +97,7 @@ Ubuntu/Mint: ![](http://farm4.staticflickr.com/3810/10585846986_504d07b4a7_z.jpg) -正如你所见到的,**apt-fast**实质上比**apt-get**快(e.g. 快3--4秒),特别是安装庞大软件包的时候。 +正如你所见到的,**apt-fast**确实比**apt-get**快(e.g. 快3--4秒),特别是安装庞大软件包的时候。 当然,安装性能的提高程度还依赖你上游因特网连通性。以我为例,我有富足的带宽来支持我的上游连接。这也是为什么我看到并行下载带来了成功的提高。 @@ -107,7 +107,7 @@ via: http://xmodulo.com/speed-slow-apt-get-install-debian-ubuntu.html 作者:[Dan Nanni][a] 译者:[su-kaiyao](https://github.com/su-kaiyao) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2ce6257f9358c6fe741eac5ede7f89bc3033875c Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 18 Nov 2014 13:30:11 +0800 Subject: [PATCH 220/316] PUB:01 - The history of Android.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @alim0x 开始发布了,翻译的真不错,文章很长,辛苦啦! --- .../01 - The history of Android.md | 108 +++++++++--------- 1 file changed, 53 insertions(+), 55 deletions(-) rename {translated/talk => published}/The history of Android/01 - The history of Android.md (74%) diff --git a/translated/talk/The history of Android/01 - The history of Android.md b/published/The history of Android/01 - The history of Android.md similarity index 74% rename from translated/talk/The history of Android/01 - The history of Android.md rename to published/The history of Android/01 - The history of Android.md index ab569bcb92..44dc35b62d 100644 --- a/translated/talk/The history of Android/01 - The history of Android.md +++ b/published/The history of Android/01 - The history of Android.md @@ -1,57 +1,55 @@ -安卓编年史 +安卓编年史(1) ================================================================================ + > 让我们跟着安卓从0.5版本到4.4的无尽迭代来看看它的发展历史。 ![这些年来历代安卓的主屏幕。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/its-been-quite-a-journey1.jpg) -这些年来历代安卓的主屏幕。 -图片提供:Ron Amadeo -安卓已经以不止一种形式陪伴了我们六年以上。在这段时间内,我们已经看到了不同于任何已有开发周期的,绝对惊人变化速度。当Google卷入智能手机的战场中时,它拿出了它的快速迭代,Web风格的更新周期,把它们应用到了开发的这个操作系统之中,而结果就是突击式的持续改进。近来,安卓项目甚至以前所未闻的六个月开发周期在运行,这可比它之前的开发周期慢。在安卓的第一年商业运作时,Google每两个半月就会发布一个新版本。 +*这些年来历代安卓的主屏幕* [图片提供:Ron Amadeo] -注:youtube视频地址开始 - +安卓已经以不止一种形式陪伴了我们六年以上。在这段时间内,我们已经看到了不同于任何已有开发周期的,绝对惊人的变化速度。当Google卷入智能手机的战场中时,它拿出了它的快速迭代,Web风格的更新周期,把它们应用到了开发这个操作系统之中,而结果就是突击式的持续改进。近来,安卓项目甚至以前所未闻的六个月开发周期在运行,这可比它之前的开发周期慢。在安卓的第一年商业运作时,Google每两个半月就会发布一个新版本。 -Google在2007年11月时对安卓最初的介绍。 -注:youtube视频地址结束 +Google在2007年11月时对安卓最初的介绍:http://www.youtube-nocookie.com/embed/1FJHYqE0RDg?start=0&wmode=transparen (墙外)。 -同行业的其它公司和其相比,只能是以蜗牛的步伐在缓慢前进。微软每三到五年升级它的桌面操作系统,苹果对OS X和iOS以一年为一个更新周期。另外不是每个更新都是同等地位的。iOS在七年内有一个主要的设计上的大变动,而最新的Windows Phone 8看起来和Windows Phone 7十分相似。但在安卓上,如果用户能看到今年的任何东西看起来和去年一样,那简直是中彩票了一样。比如Play商店,五年内有五次的重新设计。对安卓来说那更是家常便饭。 +同行业的其它公司和之相比,只能是以蜗牛的步伐在缓慢前进。微软每三到五年升级它的桌面操作系统,苹果对OS X和iOS以一年为一个更新周期。另外不是每个更新都是同等地位的。iOS在七年内有一个主要的设计上的大变动,而最新的Windows Phone 8看起来和Windows Phone 7十分相似。但在安卓上,如果用户能看到今年的任何东西看起来和去年一样,那简直是中彩票了一样。比如Play商店,五年内有五次的重新设计。对安卓来说那更是家常便饭。 -回头看看,安卓的存在是很模糊的。从其历史来看,现在它是个使用量巨大的操作系统。近十亿的设备销量,以及每天一百五十万左右的激活量——但Google是如何达到这种地步的?安卓现在如此水平的规模和成功,可能会让你觉得安卓从零开始到万众瞩目的英雄中覆盖到了方方面面。但事实上不是这样的。安卓在早期并不流行,以及直到安卓4.0屏幕截图还只能通过开发者工具实现。这两个因素意味着你无法轻易找到许多安卓早期版本的图片或信息。 +回头看看,安卓的存在是很模糊的。从其历史来看,现在它是个使用量巨大的操作系统。近十亿的设备销量,以及每天一百五十万左右的激活量——但Google是如何达到这种地步的?安卓现在如此水平的规模和成功,可能会让你觉得安卓从零开始到万众瞩目的英雄,覆盖到了方方面面。但事实上不是这样的。安卓在早期并不流行,以及直到安卓4.0屏幕截图还只能通过开发者工具实现。这两个因素意味着你无法轻易找到许多安卓早期版本的图片或信息。 对于早期版本的缺乏覆盖问题现在称作*安卓早期版本正在消亡*。尽管像Windows 1.0这样的系统可以永远在你身边——只要找台旧电脑把它装上去就好了——安卓可以被认为是第一个基于云的操作系统。许多功能严重依赖Google的服务来实现。随着越来越少的人使用老版本的安卓,那些服务被逐渐关闭。当一个依赖云的应用其服务支持停止之后,它再也不能正常运作——应用崩溃并显示空白的屏幕,或直接无法启动。 -正是由于这种“[云腐烂][1]”现象,安卓回顾展在几年内不可能出现。早期版本的安卓没有了云的支持会是一个不能正常工作的破碎的空壳。尽管可以简单地认为这是早期版本安卓渐渐消失的一种方法,但这正是正在发生的。就在写到这里的时候,正有无数的应用因为服务器支持被关闭而失去作用。例如早期的谷歌地图和安卓市场客户端,已经不能和Google服务器交互。它们会弹出错误消息并崩溃或者是显示一个空白的界面。有些应用甚至在一个星期正常运行然后下个星期就宣告死亡,因为就在我们写下这篇文章的时候谷歌正在积极地关闭服务器! +正是由于这种“[云腐烂][1]”现象,安卓回顾展在几年内不可能出现。早期版本的安卓没有了云的支持会是一个不能正常工作的破碎的空壳。尽管可以简单地认为这是早期版本安卓渐渐消失的一种方法,但这就是正在发生的。就在写到这里的时候,正有无数的应用因为服务器支持被关闭而失去作用。例如早期的谷歌地图和安卓市场客户端,已经不能和Google服务器交互。它们会弹出错误消息并崩溃或者是显示一个空白的界面。有些应用甚至在前一个星期正常运行,然后下个星期就宣告死亡,因为就在我们写下这篇文章的时候谷歌正在积极地关闭服务器! -为了防止在滚滚历史里丢失掉更多关于安卓的过去,我们做了需要完成的工作。这里有20+个版本的安卓,七台设备,以及无数的屏幕截图被集合到一起。这就是安卓编年史,从最早的公开版本到罪行的KitKat。 +为了防止在滚滚历史里丢失掉更多关于安卓的过去,我们做了需要完成的工作。这里有20+个版本的安卓,七台设备,以及无数的屏幕截图被集合到一起。这就是安卓编年史,从最早的公开版本到最新的KitKat。 -注:下面一块为文章链接列表,发布后可以改为发布后的地址 ---------- ### 目录 ### +(以下各篇正在翻译中,链接会逐步更正过来) + - [Android 0.5 Milestone 3——第一个公开版本][10] - [Android 0.5 Milestone 5——报废接口的领地][11] - [Android 0.9 Beta——嘿,这看起来很眼熟!][12] - [Android 1.0——谷歌应用的引入和实体硬件][13] - [Android 1.1——第一个真正的增量更新][14] - [Android 1.5 Cupcake——虚拟键盘打开设备设计的大门][15] -- ----[谷歌地图———登陆安卓市场的第一个内置应用][16] + - ----[谷歌地图———登陆安卓市场的第一个内置应用][16] - [Android 1.6 Donut——CDMA支持将安卓带给了各个运营商][17] - [Android 2.0 Éclair‎——带动GPS产业][18] - [The Nexus One——迎来Google Phone][19] - [Android 2.1——动画的大发现(以及滥用)时代][20] -- ----[Android 2.1, update 1——无尽战争的开端][21] + - ----[Android 2.1, update 1——无尽战争的开端][21] - [Android 2.2 Froyo——更快更华丽][22] -- ----[语音操作——口袋里的超级电脑][23] + - ----[语音操作——口袋里的超级电脑][23] - [Android 2.3 Gingerbread——第一个UI大变][24] - [Android 3.0 Honeycomb——平板和设计的新生][25] -- ----[Google Music Beta——云存储的内容库][26] + - ----[Google Music Beta——云存储的内容库][26] - [Android 4.0 Ice Cream Sandwich——摩登时代][27] -- ----[Google Play以及直接面向消费者销售设备的回归][28] + - ----[Google Play以及直接面向消费者销售设备的回归][28] - [Android 4.1 Jelly Bean——Google Now指明未来][29] -- ----[Google Play服务——碎片化以及让系统版本(几乎)过时][30] + - ----[Google Play服务——碎片化以及让系统版本(几乎)过时][30] - [Android 4.2 Jelly Bean——新Nexus设备,新平板界面][31] -- ----[周期外更新——谁需要一个新系统?][32] + - ----[周期外更新——谁需要一个新系统?][32] - [Android 4.3 Jelly Bean——为可穿戴设备做好准备][33] - [Android 4.4 KitKat——更完美;更少的内存占用][34] - [今日安卓无处不在][35] @@ -60,89 +58,89 @@ Google在2007年11月时对安卓最初的介绍。 ### Android 0.5, Milestone 3——第一个公开版本 ### -在我们开始在实体硬件上研究安卓之前,我们要从很早,很早以前的安卓时光开始说起。尽管1.0是第一个运行在实体硬件上的版本,但在那之前其实还有若干个只随SDK发布的模拟器beta版本。这些模拟器只用于开发的目的,所以它们不含任何谷歌应用,甚至是一些核心系统应用。但它们仍然是回顾安卓的发布前时光的最好渠道。 +在我们开始在实体硬件上研究安卓之前,我们要从很早,很早以前的安卓时光开始说起。尽管1.0是第一个运行在实体硬件上的版本,但在那之前其实还有若干个只随SDK发布的模拟器beta版本。这些模拟器只用于开发的目的,所以它们不含任何谷歌应用,甚至只是一些核心系统应用。但它们仍然是回顾安卓的发布前时光的最好渠道。 ![模拟器默认的qwerty布局并运行Milestone 3。](http://cdn.arstechnica.net/wp-content/uploads/2013/11/blackberrrry.png) -模拟器默认的qwerty布局并运行Milestone 3。 -Ron Amadeo供图 -在异想天开的糖果版本代号和[与跨国食品公司跨界合作][2]之前,第一个安卓的公开发布版本的标签是“m3-rc20a”——“m3”代表“Milestone 3(里程碑3)”。尽管谷歌可能不会公布版本号——这个版本甚至没有一个设置应用来查看——浏览器用户标识识别为“Android 0.5”。 +*模拟器默认的qwerty布局并运行Milestone 3* [Ron Amadeo供图] -在2007年11月,谷歌获得安卓两年,iPhone发布五个月之后,[安卓正式发布][3],第一个模拟器正式释出。回到那时候看,这个系统才刚处于起步阶段。它很容易就被认为“只是个黑莓的山寨而已”。模拟器使用了一个qwerty布局的皮肤以及320×240的显示屏,是一台[原型设备][4]的复制品。这台设备由HTC制造,通过一些早期的安卓账户可以得知这台设备的代号似乎是“Sooner”。但是Sooner从未正式上市。 +在异想天开的糖果版本代号和[与跨国食品公司跨界合作][2]之前,第一个安卓的公开发布版本的标签是“m3-rc20a”——“m3”代表“Milestone 3(里程碑3)”。尽管谷歌可能不会公布版本号——这个版本甚至没有一个设置应用来查看——浏览器用户标识被识别为“Android 0.5”。 + +在2007年11月,谷歌获得安卓两年、iPhone发布五个月之后,[安卓正式发布][3],第一个模拟器正式释出。回到那时候看,这个系统才刚处于起步阶段。它很容易就被认为“只是个黑莓的山寨而已”。模拟器使用了一个qwerty布局的皮肤以及320×240的显示屏,是一台[原型设备][4]的复制品。这台设备由HTC制造,通过一些早期的安卓账户可以得知这台设备的代号似乎是“Sooner”。但是Sooner从未正式上市。 通过安卓早期[开发账号][5]得知,当苹果在2007年1月最终发布它革命性的智能手机后,谷歌不得不对安卓“从头来过”——包括放弃Sooner。考虑到Milestone 3模拟器在苹果的iPhone后近一年才推出,设备界面看起来还是那么像黑莓的模型是在是令人惊奇的事情。尽管在iPhone发布后的开发里任务毫无疑问地在优先保障下完成了,但模拟器仍然以被认为是“旧学院风”的界面发布。这使得它没能给人留下一个好的第一印象。 在早期阶段,安卓按键布局看起来并没有最终确定下来。尽管第一台商业安卓设备使用了“主屏幕”,“后退”,“菜单”以及“搜索”作为标准的按键套件,模拟器上有一个空白的标记为“X”的键,你可能会认为是那是搜索键应该在的地方。“Sooner”原型机看起来更奇怪——它在第四个键上有个星形标记。 ![从左到右:主屏幕,一个打开的通知,以及“应用”文件夹。](http://cdn.arstechnica.net/wp-content/uploads/2013/11/noti3.png) -从左到右:主屏幕,一个打开的通知,以及“应用”文件夹。 -Ron Amadeo供图 + +*从左到右:主屏幕,一个打开的通知,以及“应用”文件夹* [Ron Amadeo供图] 在这里没有可以配置的主屏幕或小插件,仅仅只是简单的在底部有聚合图标的dock,可以循环或是点击。尽管已经有一些特性支持触摸屏,Milestone 3主要还是使用五向十字键——一个时至今日安卓仍然支持的不合时宜的设计。甚至早期的安卓都能够实现动画效果。图标在进入dock的中心窗口时会变大或缩小。 -在这时候一样也还没有通知栏。通知图标显示在顶部状态栏(上面图片中的微笑标志),打开它的唯一方法是在主屏幕按下十字键的上键。你无法通过点击微笑的图标来打开它,也无法从除主屏幕以外的地方打开通知。当通知被打开的时候,状态栏些许地扩展开,通知文本会显示在一个聊天气泡中。一旦你阅读完通知,你无法手动清除它——应用本身负责清除它的通知消息。 +在这时候同样也还没有通知栏。通知图标显示在顶部状态栏(上面图片中的微笑标志),打开它的唯一方法是在主屏幕按下十字键的上键。你无法通过点击微笑的图标来打开它,也无法从除主屏幕以外的地方打开通知。当通知被打开的时候,状态栏扩展开些许,通知文本会显示在一个聊天气泡中。一旦你阅读完通知,你无法手动清除它——应用本身负责清除它的通知消息。 -应用抽屉的职责由一个dock左侧简单的“应用程序”文件夹负责。尽管有着不少标志性的功能,Milestone 3模拟器应用图标还不是十分完善。只有“浏览器”,“联系人” ,以及“地图”是这里面真正的应用。奇怪的是,“最近通话”被提升为一个独立的图标。因为这仅仅只是个模拟器,像闹钟,日历,拨号,计算器,照相机,相册,以及设置这样的智能手机核心功能的图标统统没有。硬件原型倒是有[其中的大部分][6],它还有一套谷歌应用出现并运行着。不幸的是我们没办法看到它们了。它们已经老到无论如何都连不上谷歌的服务器了。 +应用抽屉的职责由托盘左侧简单的“应用程序”文件夹负责。尽管有着不少标志性的功能,Milestone 3模拟器应用图标还不是十分完善。只有“浏览器”,“联系人” ,以及“地图”是这里面真正的应用。奇怪的是,“最近通话”被提升为一个独立的图标。因为这仅仅只是个模拟器,像闹钟,日历,拨号,计算器,照相机,相册,以及设置这样的智能手机核心功能的图标统统没有。硬件原型倒是有[其中的大部分][6],它还有一套谷歌应用出现并运行着。不幸的是我们没办法看到它们了。它们已经老到无论如何都连不上谷歌的服务器了。 ![Milestone 3的浏览器菜单系统,壁纸界面,以及音量控制。](http://cdn.arstechnica.net/wp-content/uploads/2013/11/menu.png) -Milestone 3的浏览器菜单系统,壁纸界面,以及音量控制。 -Ron Amadeo供图 -这套现在已经过时的菜单系统出现并运行在Milestone 3上。点击实体菜单键会打开一个灰色带有蓝色梯度高亮的列表,通过实体键盘完成操作。在上面的截图中,你可以看到在浏览器中打开的菜单。进入二级菜单,像缩放菜单,一级菜单变成有些奇怪的透明状态。 +*Milestone 3的浏览器菜单系统,壁纸界面,以及音量控制* [Ron Amadeo供图] + +这套现在已经过时的菜单系统出现并运行在Milestone 3上。点击实体菜单键会打开一个灰色带有蓝色梯度高亮的列表,通过实体键盘完成操作。在上面的截图中,你可以看到在浏览器中打开的菜单。进入二级菜单,像缩放菜单,一级菜单这些变成有些奇怪的透明状态。 令人惊喜的是,多任务及后台应用在Milestone 3上已经可以运作了。离开应用而不关闭它——应用会保存状态,甚至写入文本保存。这个特性iOS直到2010年推出iOS 4才能与其相比,这就真正显示出了这两个平台的不同。iOS最初是作为一个封闭的平台而没有第三方应用,所以平台的鲁棒性并没有得到很大的关注。安卓是从头开始被构建成一个强大的应用软件平台,轻松开发应用是它创造出来背后的推动力之一。 -在安卓之前,谷歌已经通过[WAP网站][7]和[J2ME手机应用][8]向移动端开始迁移,这使得它们强烈地意识到移动开发的难度。据[The Atlantic][9],拉里佩奇曾这么描述公司在移动端的努力“我们有一系列超过100台手机,我们在每一台设备上都要构建一次我们的应用”。开发者们现在经常抱怨安卓的碎片化,但在安卓出现之前,问题要比现在糟糕很多。 +在安卓之前,谷歌已经通过[WAP网站][7]和[J2ME手机应用][8]向移动端开始迁移,这使得它们强烈地意识到移动开发的难度。据[The Atlantic][9],拉里.佩奇曾这么描述公司在移动端的努力“我们有一系列超过100台的手机,我们在每一台设备上都要构建一次我们的应用”。开发者们现在经常抱怨安卓的碎片化,但在安卓出现之前,问题要比现在糟糕很多。 谷歌的平台战略实际上胜出了,iOS最终在不久后开始慢慢加入这些围绕应用的特性——多任务,跨应用分享,以及应用切换。 ![当你在主屏幕按数字键弹出的拨号界面,来电,以及电话会议界面。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/call10000.png) -当你在主屏幕按数字键弹出的拨号界面,来电,以及电话会议界面。 -Ron Amadeo供图 -尽管没有拨号图标,Milestone 3模拟器还是有办法拨号。按键盘上的任意键会打开左侧界面,这是拨号/联系人搜索混合界面。仅输入数字并点击绿色的实体拨号键来开始通话,输入字母会搜索联系人。但是联系人无法通过数字搜索。甚至直接点击一个号码也不会打开联系人。 +*当你在主屏幕按数字键弹出的拨号界面,来电,以及电话会议界面* [Ron Amadeo供图] -来电被显示成一个几乎全屏的令人愉快的透明背景弹窗。一旦进入通话,背景会变成深灰色,Milestone 3展现给用户一些令人惊奇的高级特性:静音,扬声器,保持,以及电话会议按钮。多方通话会显示成重叠,半透明的卡片状,用户有切换或者合并通话的选项可以选择。切换通话会触发一个漂亮的小卡片洗牌动画。 +尽管没有拨号图标,Milestone 3模拟器还是有办法拨号。按键盘上的任意键会打开上图左侧的界面,这是拨号/联系人搜索混合界面。仅输入数字并点击绿色的实体拨号键来开始通话,输入字母会搜索联系人。但是联系人无法通过数字搜索。甚至直接点击一个号码也不会打开联系人。 + +来电被显示成一个几乎全屏的令人愉快的透明背景弹窗。一旦进入通话,背景会变成深灰色,Milestone 3展现给用户一些令人惊奇的高级特性:静音,扬声器,通话保持,以及电话会议按钮。多方通话会显示成重叠,半透明的卡片状,用户有切换或者合并通话的选项可以选择。切换通话会触发一个漂亮的小卡片洗牌动画。 ![联系人列表,打开一个联系人,编缉联系人,以及最近通话界面。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/recent100.png) -联系人列表,打开一个联系人,编缉联系人,以及最近通话界面。 -Ron Amadeo供图 -联系人是一个质朴的,黑色和蓝色的姓名列表。联系人卡片中有个联系人头像的位置但是没办法设置一张图像上去(至少在模拟器中不行)。这里唯一的装饰是每个联系人名字左侧的XMPP状态点。传统来说一个保持在线的XMPP连接是安卓的核心,它的深度集成从Milestone 3就已经开始了。安卓使用XMPP来驱动一个24/7在线的与谷歌服务器之间的连接,驱动Google Talk,云到端消息推送,以及应用的安装和卸载信息。 +*联系人列表,打开一个联系人,编缉联系人,以及最近通话界面* [Ron Amadeo供图] + +联系人是一个质朴的,黑色和蓝色的姓名列表。联系人卡片中有个联系人头像的位置但是没办法设置一张图像上去(至少在模拟器中不行)。这里唯一的装饰是每个联系人名字左侧的XMPP状态点。就传统来说,一个保持在线的XMPP连接是安卓的核心,它的深度集成从Milestone 3就已经开始了。安卓使用XMPP来驱动一个24/7在线的与谷歌服务器之间的连接,以驱动Google Talk的云到端消息推送,以及应用的安装和卸载信息。 ![浏览器的假Google首页,地址栏,浏览历史界面。](http://cdn.arstechnica.net/wp-content/uploads/2013/11/browser3.png) -浏览器的假Google首页,地址栏,浏览历史界面。 -Ron Amadeo供图 + +*浏览器的假Google首页,地址栏,浏览历史界面* [Ron Amadeo供图] 浏览器运行Webkit 419.3,它也被用在相同时代的像Mac OS X 10.4的Safari 2上。浏览器主页并不是Google.com,而是一个包含在安卓里的硬编码的home.html文件。它看起来就像是千年之前的Google.com。浏览器的OS X遗留还可以辨认出来,用了光滑的,Aqua风格的搜索按钮来渲染浏览器按钮。 -这个小小的黑莓风格的屏幕需要一个分离的地址栏,可以通过浏览器菜单里的“前往”选项打开。尽管自动补全不起作用,地址栏会在你输入的时候实时搜索你的浏览历史。右侧图片显示的是历史界面,它使用了略缩图来显示各个站点。当前的略缩图在其它两个之前,滑动它们会触发一个猛扑的动画效果。但在早期阶段,浏览器不支持多标签或窗口——你可以看到当前站点,那就是全部了。 +这个小小的黑莓风格的屏幕需要一个分离的地址栏,可以通过浏览器菜单里的“前往”选项打开。尽管自动补全不起作用,地址栏会在你输入的时候实时搜索你的浏览历史。右侧图片显示的是历史界面,它使用了略缩图来显示各个站点。当前的略缩图在其它两个缩略图之前,滑动它们会触发一个俯冲动画效果。但在早期阶段,浏览器不支持多标签或窗口——你可以看到当前站点,那就是全部了。 ![一个视频屏幕抓取导出的谷歌地图界面,方向界面,相册测试界面。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/maps.png) -一个视频屏幕抓取导出的谷歌地图界面,方向界面,相册测试界面。 -Ron Amadeo供图 -在开始的时候,谷歌认识到在移动端地图将会非常重要,甚至在Milestone 5模拟器中内置了地图客户端。那个版本的谷歌地图是我们遇到的第一个死于云腐烂的。这个客户端无法从谷歌的服务器上载入信息,所以地图显示为一片空白,灰色的网格。没有什么能够运转。 +*一个视频屏幕抓取导出的谷歌地图界面,方向界面,相册测试界面* [Ron Amadeo供图] + +在开始的时候,谷歌认识到在移动端地图将会非常重要,甚至在Milestone 5模拟器中内置了地图客户端。那个版本的谷歌地图是我们遇到的第一个死于云腐烂的!这个客户端无法从谷歌的服务器上载入信息,所以地图显示为一片空白,灰色的网格。没有什么能够工作。 幸运的是,因为上面的第一张截图,我们能够从安卓启动视频中拼凑出准确的界面。旧的谷歌地图看起来完全是为非触摸设备准备的,实体键快捷方式列表排列在屏幕底部。这样在看地图时,或是在如果仅仅显示该点的地址的时候就不大清楚。 -隐藏在菜单之后的是搜索选项,路线,以及卫星和交通图层。中间的截图是方向的UI之一,你可以选择一个联系人的地址作为起点或者终点。但地图缺乏任何种类的集成GPS,你在哪都找不到“我的位置”这个按钮。 +隐藏在菜单之后的是搜索选项,路线,以及卫星和交通图层。中间的截图是获取路径的UI之一,你可以选择一个联系人的地址作为起点或者终点。但地图缺乏任何种类的集成GPS,你在哪都找不到“我的位置”这个按钮。 -尽管没有合适的相册,在右边是相册的测试界面,隐藏在“API Demos”应用里。图片可以向左向右滚动,但无法以全屏的方式打开一张照片。同样它也没有照片管理选项。它本质上就是个图片滚动界面的测试视图。 +尽管没有合适的相册,不过在右边是相册的测试界面,隐藏在“API Demos”应用里。图片可以向左向右滚动,但无法以全屏的方式打开一张照片。同样它也没有照片管理选项。它本质上就是个图片滚动界面的测试视图。 ![时间设置和日历,有点字间距问题,以及以Ars为特色的垂直列表测试。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/datetimeshoutout.png) -时间设置和日历,有点字间距问题,以及以Ars为特色的垂直列表测试。 -Ron Amadeo供图 + +*时间设置和日历,有点字间距问题,以及以Ars为特色的垂直列表测试* [Ron Amadeo供图] 同样模拟器中也没有设置应用,但是通过API Demos我们可以看到最初的日期时间设置界面。这个示例暴露出很多安卓没来得及处理的问题:到处都有的字间距问题,分钟数字间巨大的间隔,以及日历中星期日间不均等的间隔。尽管时间设置允许你单独更改每个数字,但除非你将当前日期移出本月到前一个或下一个月,否则你无法改变月份或年份。 -别忘了尽管这看起来像是一些被遗忘时代的恐龙级别遗留物,但这仅仅是六年前发布的。我们总趋向与适应科技的脚步。我们很容易将这样的东西看作是20年前的东西。比较一下2007年晚些时候这个时间段的桌面操作系统,微软尝试将Windows Vista售往全世界快要一年了,而苹果刚刚发布OS X 10.5 Leopard。 +别忘了尽管这看起来像是一些被遗忘时代的恐龙级别遗留物,但这仅仅是六年前发布的。我们总趋向与适应科技的脚步。我们很容易将这样的东西看作是20年前的东西。比较一下2007年晚些时候这个时间段的桌面操作系统,微软尝试将Windows Vista售往全世界快要一年了,而苹果刚刚发布了OS X 10.5 Leopard。 -最后一个关于Milestone 3的细节:谷歌在Milestone 3模拟器中给了Ars Technica一个快捷方式。打开“API Demos”应用并打开"Views," "Focus,"然后"Vertical"显示一个*this very Website*的头条测试列表。 +最后一个关于Milestone 3的细节:谷歌在Milestone 3模拟器中给了Ars Technica一个快捷方式。打开“API Demos”应用并打开"Views," "Focus,",然后"Vertical"显示一个*this very Website*的头条测试列表。 ![随Milestone 3,RC37a发布的更加现代,全触控风格的模拟器。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/bigscreen.png) -随Milestone 3,RC37a发布的更加现代,全触控风格的模拟器。 -Ron Amadeo供图 + +*随Milestone 3,RC37a发布的更加现代,全触控风格的模拟器* [Ron Amadeo供图] 两个月后,2007年12月,谷歌放出了一个Milestone 3的更新,带来了更大的480×320设备设置。这个更新的标签是“m3-rc37a”。软件看起来还是像黑莓一样,仅仅是带来了更多的屏幕分辨率支持。 @@ -158,7 +156,7 @@ Ron Amadeo供图 via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/ -译者:[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 5f5bff9861313044252f58820a15cbd8629976b6 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 18 Nov 2014 13:58:41 +0800 Subject: [PATCH 221/316] PUB:02 - The history of Android MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @cereuz ,@alim0x --- .../02 - The history of Android.md | 79 +++++++++++++++++++ .../02 - The history of Android.md | 79 ------------------- 2 files changed, 79 insertions(+), 79 deletions(-) create mode 100644 published/The history of Android/02 - The history of Android.md delete mode 100644 translated/talk/The history of Android/02 - The history of Android.md diff --git a/published/The history of Android/02 - The history of Android.md b/published/The history of Android/02 - The history of Android.md new file mode 100644 index 0000000000..04b6e15066 --- /dev/null +++ b/published/The history of Android/02 - The history of Android.md @@ -0,0 +1,79 @@ +安卓编年史(2) +============================================================================= +![左:Milestone 5,主屏幕展示了“All”按钮,两个dock图标,以及四个最近使用的应用。中:主屏幕与打开的应用程序列表。右边:电源菜单。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/homescree052n.jpg) + +*左:Milestone 5,主屏幕展示了“All”按钮,两个dock图标,以及四个最近使用的应用。中:主屏幕与打开的应用程序列表。右边:电源菜单* [Ron Amadeo供图] + +### 安卓0.5, Milestone 5——如今已经是报废接口的领地了 ### + +“M5-RC14”版本发布后——也就是第一个安卓模拟器发布三个月之后,安卓迎来了它的首次重大革新。 2008年2月发布的“Milestone5”甩掉了延伸自黑莓的界面,走向一个完全革新的设计——谷歌在触控友好界面上的第一次尝试。 + +在浏览器的用户代理字符串的中,此版本仍然被识别为“Android 0.5”,但Milestone 5与安卓的第一个版本相比已经完全不一样了。几个核心的Android功能直接追踪他们的血统会最终回到这个版本。通知面板的布局和功能几乎已经整装待发,并且,除了样式变化外,菜单也最终成型。距离安卓1.0项目发布的时间仅仅只剩八个月,一个操作系统的基础已经开始成型了。 + +有一件东西目前绝对不是它的最终模样,那就是是主屏幕。这是一个不可配置的,单屏壁纸的应用程序的抽屉和托盘。应用程序图标是气泡状的,三种颜色的组合,由一个圆角矩形的白色背景包围着。应用程序抽屉在右下角有一个“所有”按钮,轻按它,打开的应用程序列表显示在了左边。这个“所有”按钮正上面的是两个托盘图标,“联系人”和“拨号盘”分别获得了永久的专属主屏幕位置。然后上边有四个模块,它们是“最近的应用程序”的早期版本,展示了最后访问的应用程序。没有了左侧屏幕和右侧屏幕,要是没有托盘和“最近的应用程序”占用的一整列,这种布局下只能放下21个应用程序图标。模拟器仍然只带有尽量少的应用程序,但在实际的设备中,这样的设计看起来并不会很好的工作效果。 + +按住“挂断”按钮会出现电源菜单的一个相当早期的版本,就像你最右侧的图片中看到的。谷歌此时仍然没有标准的智能手机命名术语:对于“Turn Off Screen”(关闭屏幕)最好的形容也许是“Lock screen”(锁定屏幕——虽然当时没有锁屏)和“Turn Off Radio”(关闭射频)在今天被叫做“Airplane Mode”(飞行模式)。 + +![从左至右依次为:令人惊喜的现代通知面板,谷歌地图的菜单在打开着(地图已经不可用了),和新的适合触控的列表视图。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/noti2.png) + +*从左至右依次为:令人惊喜的现代通知面板,谷歌地图的菜单在打开着(地图已经不可用了),和新的适合触控的列表视图* [Ron Amadeo供图] + +回溯到Milestone 5,谷歌在那时对通知面板有着明确的认识。就像在任何现代的智能手机里一样,通知中心从屏幕顶部下拉下来以唤出。目前的通知都以列表的形式显示。通知面板的第一个版本是不透明的白色薄片以及底部中心有个橙色圆点的,带着棱纹的的“把手”。通知是可点击的,通过点击可以打开该通知关联的应用程序。没有人为此列表中垂直对齐应用程序图标而感到困扰,不过也没关系,随着接下来的更新,它已经是过去式了。 + +置顶通知能够进入一个在面板顶部的“正在进行”的部分。在这个版本中,这里似乎只包含通话。在“最近事件”里的通知只有打开相应的应用程序后才清楚。用户惊喜地发现可以通过内置的XMPP连接成功登录到谷歌talk。不过,虽然通知面板中显示“新会话信息”,这里实际上并不是一个即时消息应用程序。 + +Milestone 5里是全新的艺术设计。应用程序图标被重新绘制,并且菜单从一个无聊的黑莓风格的文本列表转变为一个全彩、卡通的大图标方阵。通知面板图标也从简单的、突兀的、白色的图标切换到一个绿色的气泡设计。当时信号指示下边有一条奇怪的黑线,没有明显的作用。早期开发版本的微小列表视图不适合手指使用,所以Milestone 5带来了更加强大的整体布局。 + +![拨号盘,最近通话,和来电。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/phonestuff.png) + +*拨号盘,最近通话,和来电。* [Ron Amadeo供图] + +M5是第一个有一个拨号盘的版本,即使她是一个相当难看的版本。数字被显示在包含一个奇怪的聊天气泡风格的退格键的渐变填充条里,看上去就像是从其他界面回收回来的。对齐问题随处可见。按钮上的数字没有正确的垂直居中,而且退格键的“X”也没有与对话框对齐。由于屏幕上没有的“拨号”按钮,你甚至不能从拨号盘打个电话,它强制要求有个拨号的硬件实体按钮。 + +Milestone 5 有几个选项卡式界面,所有这些都演示了一个关于标签应该如何工作的奇怪的想法。活跃的标签是白色的,而背景标签是底部拥有一小条白色条带的黑色标签。后台标签应该是表示向下下沉的吗?切换标签时,是没有动画效果的。直到目前还不清楚这个设计试图想表达什么。 + +在第二张图片中显示的最近通话记录项,是从一个单独的应用程序降级为拨号盘的选项卡。它抛弃了早期版本疯狂的十字UI,多亏了大块列表视图,现在所有必要的信息都是显示在一个正常的列表中。 + +不同于拨号盘,来电画面有显示在屏幕上的按钮来接听和结束通话。奇怪的是,来电屏幕贴在屏幕的底部,而不是顶部或中心。它可能是从旧的黑莓4:3屏幕遗留下来的问题。 + +![通话中,触摸屏不可用的显示错误信息,和显示第二通话暂停的通话界面。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/callsstuff.png) + +*通话中,触摸屏不可用的显示错误信息,和显示第二通话暂停的通话界面* [Ron Amadeo供图] + +通话中的界面看起来正常,但在实际中毫无意义。今天,在通话中为了阻止你的脸按到按钮,手机近距离传感器一旦检测到物体会关闭屏幕。尽管Milestone 5不支持近距离传感器。谷歌的随意的解决方案是在通话过程中禁用整个触摸屏。与此同时,通话中的屏幕显然会检测触摸。这时候是有大的,可触摸的按钮,*但就是不让你摸!* + +M5在这里让Milestone 3版本的几个功能回归了。许多旧的界面里体面的图标被替换成了文本。像“静音”按钮在激活的时候不再提供屏幕上的反馈。合并通话被完全去除了。 + +![浏览器的主要菜单,浏览器的二级菜单,疯狂的变焦控制和窗口界面。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/browser4.png) + +*浏览器的主要菜单,浏览器的二级菜单,疯狂的变焦控制和窗口界面* [Ron Amadeo供图] + +浏览器菜单中进行了常规的触摸功能大整修,并且“更多”按钮第一次出现。它充当一个[你菜单的额外菜单][1]。相对于将3x2的网格变成3x4的网格,Milestone 5(以及Android的许多后续版本一样)中使用很长的、滚动的列表来引出其他选项。不支持双指缩放(据说是[向苹果让步][2]),因此Android运行着荒谬的控件,就像上边第三张图片一样。谷歌将它显示在屏幕的中间,而不是明智地设置成比如一个水平的、底部对齐的缩放控件。最后一张图片显示浏览器的“窗口”界面,允许你打开多个网页并在它们之间更轻松地切换。 + +![谷歌地图的图层选择,搜索界面,以及路线界面。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/amps.png) + +*谷歌地图的图层选择,搜索界面,以及路线界面。* [Ron Amadeo供图] + +谷歌地图仍然不能使用,但我们接触的小小UI却有了显著更新。你可以选择地图图层,虽然只有两种可以选择:卫星和交通。顶部对齐的搜索界面奇怪地隐藏了状态栏,而底部对齐的路线没有隐藏状态栏。路线的输入按钮被标有“Go”,而且搜索的输入按钮却被标有一个奇怪的弯曲的箭头。这样的例子不胜枚举,并演示了保守的安卓在最坏时候的情况:在同一个应用程序,外观和工作方式*应该*类似的两个功能,在实现上却完全相反。 + +---------- + +![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/2/ + +译者:[cereuz](https://github.com/cereuz) 邮箱:[cereuz](mailto:sunedo@qq.com) +校对:[alim0x](https://github.com/alim0x)/[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://i.imgur.com/GIYGTnb.jpg +[2]:http://www.businessinsider.com/steve-jobs-on-android-founder-andy-rubin-big-arrogant-f-2013-11 +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo diff --git a/translated/talk/The history of Android/02 - The history of Android.md b/translated/talk/The history of Android/02 - The history of Android.md deleted file mode 100644 index d703d8b542..0000000000 --- a/translated/talk/The history of Android/02 - The history of Android.md +++ /dev/null @@ -1,79 +0,0 @@ - 安卓编年史 02 -============================================================================= -![Left: the Milestone 5 home screen showing the “all" button, two dock icons, and four recent apps. Center: the home screen with the app list open. Right: the power menu.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/homescree052n.jpg) -左:Milestone 5,主屏幕展示了“All”按钮,两个dock图标,以及四个最近使用的应用。中:主屏幕与打开的应用程序列表。右边:电源菜单。 -Ron Amadeo供图 - -### 安卓0.5, Milestone 5——如今已经是报废接口的领地了 ### - -“M5-RC14”版本发布后——也就是第一个安卓模拟器发布三个月之后,安卓迎来了它的首次重大革新。 2008年2月发布的“Milestone5”甩掉了延伸自黑莓的界面,走向一个完全革新的设计——谷歌在触控友好界面上的第一次尝试。 - -在浏览器的用户代理字符串的中,此版本仍然被识别为“Android 0.5”,但Milestone 5与安卓的第一个版本相比已经完全不一样了。几个核心的Android功能直接追踪他们的血统并最终回到这个版本。通知面板的布局和功能几乎已经整装待发,并且,除了样式变化外,菜单也最终成型。距离安卓1.0项目发布的时间仅仅只剩八个月,一个操作系统的基础已经开始成型了。 - -有一件东西目前绝对不是它的最终模样,那就是是主屏幕。这是一个不可配置的,单屏壁纸的应用程序的抽屉和dock。应用程序图标是气泡状的,三种颜色的组合,由一个圆角矩形的白色背景包围着。应用程序抽屉在右下角有一个“所有”按钮,轻按它,打开的应用程序列表显示在了左边。这个“所有”按钮正上面的是两个dock图标,“联系人”和“拨号盘”分别获得了永久的专属主屏幕位置。然后上边有四个模块,它们是最近应用程序的早期版本,展示了最后访问的应用程序。没有了左侧屏幕和右侧屏幕,要是没有dock和最近的应用程序占用的一整列,这种布局下只能放下21个应用程序图标。模拟器仍然只选择同等最少的应用程序,但在实际的设备中,这样的设计看起来并不会很好的工作效果。 - -按住“挂断”按钮会出现一个十分早期版本的电源菜单,就像你最右侧的图片中看到的。谷歌迄今为止没有标准的智能手机命名术语:对于“Turn Off Screen”(关闭屏幕)最好的形容也许是“Lock screen”(锁定屏幕——虽然当时没有锁屏)和“Turn Off Radio”(关闭射频)在今天被叫做“Airplane Mode”(飞行模式)。 - -![From left to right: the surprisingly modern notification panel, the menu open in Google Maps (Maps doesn't work anymore), and the new finger-friendly list view.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/noti2.png) -从左至右依次为:令人惊喜的现代通知面板,谷歌地图的菜单在打开着(地图已经不可用了),和新的触控友好列表视图。 -Ron Amadeo供图 - -回溯到Milestone 5,谷歌在那时对通知面板有着明确的认识。就像在任何现代的智能手机里一样,通知中心从屏幕顶部下拉下来来唤出。目前的通知都以列表的形式显示。通知面板的第一个版本是不透明的白色薄片以及底部中心有个橙色圆点的,带着棱纹的的“把手”。通知是可点击的,通过点击可以打开该通知关联的应用程序。没有人为此列表中垂直对齐应用程序图标而感到困扰,不过也没关系,随着接下来的更新,它已经是过去式了。 - -置顶通知能够进入一个在面板顶部的“正在进行”的部分。在这个版本中,这里似乎只包含通话。在“最近事件”里的通知只有打开相应的应用程序后才清楚。用户惊喜地发现可以通过内置的XMPP连接成功登录到谷歌talk。不过,虽然通知面板中显示“新会话信息”,这里实际上并不是一个即时消息应用程序。 - -Milestone 5里是全新的艺术设计。应用程序图标被重新绘制,并且菜单从一个无聊的黑莓风格的文本列表转变为一个全彩、卡通的大图标方阵。通知面板图标也从简单的、突兀的、白色的图标切换到一个绿色的气泡设计。当时信号指示下边有一条奇怪的黑线,没有明显的作用。早期开发版本的微小列表视图不适合手指使用,所以Milestone 5带来了更加强大的整体布局。 - -![The dialer, recent calls, and an incoming call.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/phonestuff.png) -拨号盘,最近通话,和来电。 -Ron Amadeo供图 - -M5是第一个有一个拨号盘的版本,即使她是一个相当难看的版本。数字被显示在包含一个奇怪的聊天气泡风格退格键的渐变填充条里,看上去就像是从其他界面回收回来的。对齐问题随处可见。按钮上的数字没有正确的垂直排列,而且退格键的“X”也没有与对话框对齐。由于屏幕上没有的“拨号”按钮,你甚至不能从拨号盘打个电话,它强制要求有个拨号的硬件实体按钮。 - -Milestone 5 有几个选项卡式界面,所有这些都演示了一个关于标签应该如何工作的奇怪的想法。活跃的标签是白色的,而背景标签是底部拥有一小条白色条带的黑色标签。后台标签应该是向下下沉的吗?切换标签时,是没有动画效果的。直到目前还不清楚这个设计试图想表达什么。 - -在第二张图片中显示的最近通话记录项,是从单独的应用程序降级到拨号盘选项卡的。它抛弃了早期版本疯狂的十字UI,多亏了大块列表视图,现在所有必要的信息都是显示在一个正常的列表中。 - -不同于拨号盘,来电画面有显示在屏幕上的按钮来接听和结束通话。奇怪的是,来电屏幕贴在屏幕的底部,而不是顶部或中心。它可能是从旧的黑莓4:3屏幕遗留下来的问题。 - -![An active call, the disabled touchscreen error message, and the call screen with a second call on hold.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/callsstuff.png) -通话中,触摸屏不可用的显示错误信息,和显示第二通话暂停的通话界面。 -Ron Amadeo供图 - -通话中界面看起来正常,但在实际中毫无意义。今天,在通话中为了阻止你的脸按到按钮,手机近距离传感器一旦检测到物体会关闭屏幕。尽管Milestone 5不支持近距离传感器。谷歌的随意的解决方案是在通话过程中禁用整个触摸屏。与此同时,通话中的屏幕显然会检测触摸。这时候是有大的,可触摸的按钮; *就是不让你摸*。 - -M5在这里让Milestone 3版本的几个功能回归了。许多旧的界面里体面的图标被替换成了文本。像“静音”按钮在激活的时候不再提供屏幕上的反馈。合并通话被完全去除了。 - -![The browser’s primary menu, the browser’s secondary menu, the crazy zoom control, and the window interface.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/browser4.png) -浏览器的主要菜单,浏览器的二级菜单,疯狂的变焦控制和窗口界面。 -Ron Amadeo供图 - -浏览器菜单中得到了常规的触摸功能大整修,并且“更多”按钮第一次出现。它充当一个[你菜单的额外菜单] [1]。相对于将3x2的网格变成3x4的网格,Milestone 5(以及Android的许多后续版本一样)中使用很长的、滚动的列表来引出其他选项。不支持双指缩放(据说是[向苹果让步] [2]),因此Android运行荒谬的控件,就像上边第三张图片一样。谷歌将它显示在屏幕的中间,而不是明智地设置成比如一个水平的、底部对齐的缩放控件。最后一张图片显示浏览器的“窗口”界面,允许你打开多个网页并在它们之间更轻松地切换。 - -![Google Maps’ layers section screen, search interface, and directions screen.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/amps.png) -谷歌地图的图层选择,搜索界面,以及路线界面。 -Ron Amadeo供图 - -谷歌地图仍然不能使用,但我们接触的小小UI却有了显著更新。你可以选择地图图层,虽然只有两种可以选择:卫星和交通。顶部对齐的搜索界面奇怪地隐藏了状态栏,而底部对齐的路线没有隐藏状态栏。路线的输入按钮被标有“Go”,而且搜索的输入按钮被标有一个奇怪的弯曲的箭头。这样的例子不胜枚举,并演示了保守的安卓在最坏时候的情况:在同一个应用程序,外观和工作方式*应该*类似的两个功能,在实现上却完全相反。 - ----------- - -![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/2/ - -译者:[cereuz](https://github.com/cereuz)邮箱:[cereuz](mailto:sunedo@qq.com) -校对:[alim0x](https://github.com/alim0x)/[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://i.imgur.com/GIYGTnb.jpg -[2]:http://www.businessinsider.com/steve-jobs-on-android-founder-andy-rubin-big-arrogant-f-2013-11 -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo From 148f9a4cdc002988d20466254f3fc3ebacd5177d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 18 Nov 2014 14:36:19 +0800 Subject: [PATCH 222/316] =?UTF-8?q?20141118-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...entative Release Date of April 23, 2015.md | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sources/news/20141118 Ubuntu 15.04 Gets Tentative Release Date of April 23, 2015.md diff --git a/sources/news/20141118 Ubuntu 15.04 Gets Tentative Release Date of April 23, 2015.md b/sources/news/20141118 Ubuntu 15.04 Gets Tentative Release Date of April 23, 2015.md new file mode 100644 index 0000000000..2fea27a4df --- /dev/null +++ b/sources/news/20141118 Ubuntu 15.04 Gets Tentative Release Date of April 23, 2015.md @@ -0,0 +1,51 @@ +Ubuntu 15.04 Gets Tentative Release Date of April 23, 2015 +================================================================================ +![](http://i.imgur.com/FfX14E9.jpg) + +**Doing anything special on April 23 next year? You might well be — it’s the tentative release date being given for Ubuntu 15.04 ‘Vivid Vervet’.** + +The date, along with those of various other development milestones, is listed as part of a [draft release schedule][1] on the Ubuntu Wiki page for the ‘V’ update. As of writing all dates are subject to approval from the Ubuntu release team and are therefore **not final**. + +Ubuntu’s previous spring release, 14.04 LTS, went live on April 17, 2014. + +### Veracity Potential is Void ### + +![Dates not yet ready to be inked in](http://www.omgubuntu.co.uk/wp-content/uploads/2014/05/california-calendar.jpg) + +Dates not yet ready to be inked in + +Draft means just that, but having covered some 10 Ubuntu release over five years I do know that the proposed dates don’t tend to differ too wildly from those that go final (famous last words, I’m sure!). + +Even so, take the proposals with a pinch of optimism for now. I’ll be keeping both this page and the fancy-schmancy graphic updated as, if or when anything changes. + +### Key Ubuntu 15.04 Release Dates ### + +As with all releases post-13.04, Ubuntu proper only makes fleeting appearances in select milestone releases, specifically the ‘final beta’ and the ‘release candidate’ stages. + +Ubuntu’s family of flavours, which may include Ubuntu MATE this cycle, take full advantage of the testing opportunities at hand. + +- **Alpha 1** – December 18th (for flavours) +- **Alpha 2** – January 22nd (for flavours) +- *Feature Freeze* — February 19th +- **Beta 1** – August 28th (for flavours) +- *UI Freeze* — March 12th +- **Final Beta** – March 26th +- *Kernel Freeze* — April 9th +- **Release Candidate** – April 16th + +The final release of the Vivid Vervet in all its vivacious glory is pencilled in for release on: + +- **Ubuntu 15.04 Final** – April 23rd + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/ubuntu-15-04-release-schedule-date-vivid-vervet + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://wiki.ubuntu.com/VividVervet/ReleaseSchedule \ No newline at end of file From 4b116f84a09895b4c38f55255ed34737ceec006f Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 18 Nov 2014 14:42:50 +0800 Subject: [PATCH 223/316] =?UTF-8?q?20141118-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...8 How to boot on an ISO image from Grub.md | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 sources/tech/20141118 How to boot on an ISO image from Grub.md diff --git a/sources/tech/20141118 How to boot on an ISO image from Grub.md b/sources/tech/20141118 How to boot on an ISO image from Grub.md new file mode 100644 index 0000000000..b4ba81d530 --- /dev/null +++ b/sources/tech/20141118 How to boot on an ISO image from Grub.md @@ -0,0 +1,112 @@ +How to boot on an ISO image from Grub +================================================================================ +If you need to use multiple Linux distributions, you do not have so many options. You can either install it, on your machine or in a virtual one, or you can boot on it from an ISO file in live mode. The second option, if less needy in hard drive space, is bothersome as you will need a USB stick or CD to hold the ISO file and boot from. However, there is a third alternative which is a bit of a compromise: have the ISO image on your hard drive, and boot into it in live mode at startup. Less needy in disk space than a full install, and fully functional, this seems to be a good alternative to a slow virtual machine. I will explain how to do this using the popular bootloader Grub. + +### What do you need? ### + +Obviously you will need to be using Grub, which is the case on pretty much all modern Linux distributions. You will also need to have an ISO file of the distribution of your choice, downloaded on your hard drive. Finally, you should know where your boot partition is, and how to express it in Grub language. For this, launch: + + # fdisk -l + +and the boot partition is the one with the '*'. For me it's /dev/sda1, which is written (hd0,1) in Grub language. + +![](https://farm6.staticflickr.com/5606/15174383814_a92a4eda3e_z.jpg) + +For reference, sda2 would be (hd0,2), sdb1 would be (hd1,1), etc. (You got the point). + +### What do we edit? ### + +First, open /etc/default/grub and check that the following line: + + #GRUB_HIDDEN_TIMEOUT=0 + +is indeed commented with a '#' in front. + +Save it and then go open /etc/grub.d/40_custom. + +This file will be where you put the arguments to boot on an ISO. The structure is of the form: + + menuentry "[Entry's title in the grub screen]" { + set isofile="[path to ISO file]" + loopback loop [boot partition in Grub language]$isofile + [some specific] arguments + } + +For example, if you wish to boot Ubuntu from an ISO file, you want to append this to your 40_custom file: + + menuentry "Ubuntu 14.04 (LTS) Live Desktop amd64" { + set isofile="/boot/ubuntu-14.04-desktop-amd64.iso" + loopback loop (hd0,1)$isofile + linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash + initrd (loop)/casper/initrd.lz + } + +![](https://farm8.staticflickr.com/7480/15608510369_ff50b28f5e_z.jpg) + +If you would like to launch Gparted instead: + + menuentry "GParted Live amd64" { + set isofile="/boot/gparted-live-0.18.0-2-amd64.iso" + loopback loop (hd0,1)$isofile + loopback loop $isofile + linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt ip=frommedia toram=filesystem.squashfs findiso=${isofile} + initrd (loop)/live/initrd.img + } + +Or even Fedora: + + menuentry "Fedora 20 Live Desktop x86_64" { + set isofile="/boot/Fedora-Live-Desktop-x86_64-20-1.iso" + loopback loop (hd0,1)$isofile + loopback loop $isofile + linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=Fedora-Live-Desktop-x86_64-20-1 rootfstype=auto ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0 iso-scan/filename=${isofile} + initrd (loop)/isolinux/initrd0.img + } + +Note that the arguments will change depending on the distribution. Hopefully, there are a few places where you can start looking. I like this one, but there are plenty of others. Also, take into consideration where you place your ISO files. If your home directory is encrypted or out of reach, you might prefer placing the files in your boot partition like in the example. But make sure that you have enough room first. + +Finally, don't forget to save 40_custom and update grub with: + + # sudo update-grub + +to see your changes appear at the next boot. + +![](https://farm8.staticflickr.com/7480/15795905012_47968033f7_z.jpg) + +### What next? ### + +Want more? Well by playing a bit with the arguments, you can boot on an ISO and have it do something instantly. For example, if you are completely paranoid and wish to have an option to erase your hard drive quickly, it is possible to set up something using [DBAN][1]. Now be really careful as this will wipe your disk without recovery option on startup: + + menuentry "Darik's Boot and Nuke" { + set isofile="/boot/dban.iso" + loopback loop (hd0,1)$isofile + linux (loop)/dban.bzi nuke="dwipe" silent + } + +Alternatively, + + menuentry "Darik's Boot and Nuke" { + set isofile="/boot/dban.iso" + loopback loop (hd0,1)$isofile + linux (loop)/dban.bzi + } + +will show you the DBAN's options and let you choose to wipe your drive. **Be careful as it is still very dangerous**. + +To conclude, there are plenty of things to do with ISO files and Grub: whether you want a quick live session or prefer to destroy everything with the tip of your finger. The next step would be to launch some privacy focused distribution like [Tails][2] for example. + +What do you think of booting on an ISO from Grub? Is it something you would consider doing? And why? Let us know in the comments. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/boot-iso-image-from-grub.html + +作者:[Adrien Brochard][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/adrien +[1]:http://www.dban.org/ +[2]:https://tails.boum.org/ \ No newline at end of file From 0e7a31c651de8dc92230c9fa63e92cc4f5031112 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 18 Nov 2014 14:48:27 +0800 Subject: [PATCH 224/316] =?UTF-8?q?20141118-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...p v8 Released With Improved Menu, Panel.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 sources/news/20141118 Budgie Desktop v8 Released With Improved Menu, Panel.md diff --git a/sources/news/20141118 Budgie Desktop v8 Released With Improved Menu, Panel.md b/sources/news/20141118 Budgie Desktop v8 Released With Improved Menu, Panel.md new file mode 100644 index 0000000000..6d07586de5 --- /dev/null +++ b/sources/news/20141118 Budgie Desktop v8 Released With Improved Menu, Panel.md @@ -0,0 +1,100 @@ +Budgie Desktop v8 Released With Improved Menu, Panel +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/budgie-desktop.jpg) + +**A new version of [Evolve OS][1]‘s simple ‘[Budgie Desktop Environment][2]‘ has been released, and the improvements under its wing are impressive.** + +Made up of 78 commits, the lightweight desktop lands with a host of new options and applets to play with. Its plumage has also benefitted from a bit of TLC, with key parts of the shell feeling fresher and looking more refined. + +But will the changes ruffle the feathers of the Budgie flock or leave them squawking in awe? Let’s take a closer look. + +### Budgie v8 ### + +#### Menu Changes #### + +The **Budgie Menu** now uses a narrower compact layout by default. This style lists the applications in categories (as previously) but sorted by usage rather than name. + +Software that you open most often sit nearer the top of each category header. It’s an efficacious decision that should help save time for those who hunt n’ scroll for apps rather than use the handy search filter. + +![The Menu uses ‘compact’ mode by default](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/budgie-desktop-8.jpg) + +The Menu uses ‘compact’ mode by default + +The old two-pane setup that featured in earlier builds remains available; you can toggle it back on in Budgie’s preferences (**right click on the menu applet > Preferences**). + +The power option menu that previously +resided in the main menu has been moved over to the System Tray applet (i.e., ‘volume‘). Additionally, you can now access System Settings entries from the menu itself — no more scratching of heads! + +#### Panel Changes #### + +![Quicklist support in Budgie 0.8](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/quicklist-support-in-budgie.jpg) + +Quicklist support in Budgie 0.8 + +The Budgie Panel and task list applet both benefit from a raft of improvements, including new auto-hide options, dynamic theming support and a new ‘GNOME 2′-style menu bar option. + +- Auto-hide (optional) +- Quicklist support +- Dark theme support +- Application pinning +- App ‘attention’ hint +- GNOME Panel theming +- Old-school ‘Menu Bar’ applet (optional) + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/classic-menu.jpg) + +#### Elsewhere #### + +Other changes include support for GNOME 3.10 and up; improved animations when changing wallpapers; and the run dialog has been hugely improved in design, sporting an almost Alfred/GNOME-Do-esque design. Mmmhm! + +![Run, Run, Run](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/budgie-run-dialog.jpg) + +Run, Run, Run + +### Install Budgie Desktop on Ubuntu ### + +Budgie 0.8 is, as with previous releases, available to install in Ubuntu 14.04 LTS and Ubuntu 14.10 by way of an official PPA. The desktop can be installed alongside Unity, GNOME Shell and Cinnamon without much (if any) issue. + +To install, open a new Terminal window and enter the following commands. Enter your password where prompted. + + sudo add-apt-repository ppa:evolve-os/ppa + + sudo apt-get update && sudo apt-get install budgie-desktop + +After the install has completed you will need to log out of Unity (or whichever desktop you’re currently using). At the Unity Greeter click the Ubuntu logo emblem, select the Budgie session from the session list, and then log in as normal. The Budgie desktop will load. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/select-budgie.jpg) + +#### Notes for Ubuntu Users #### + +![Expect Odd Theming Issues in Ubuntu](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/not-all-perfect.jpg) + +Expect Odd Theming Issues in Ubuntu + +While Budgie is now easy for Ubuntu users to install it is not designed for it specifically (the Evolve OS distribution is the best way to experience it). + +Naturally, you might not fancy upheaving to another OS. That’s fine, but if you plan on keeping Budgie caged in Ubuntu you’ll need to note the following caveats (lest you end up bird-brained). + +First up, **Budgie is under active development**. Several key features remain missing, including native network management support. An applet can be added to the panel that supports Ubuntu’s Indicator Applets, but it’s a little rough around the edges. + +You should also expect some theming issues when using the shell with Ambiance/Radiance. The Adwaita theme (and other GNOME themes) work best. You should also disable Ubuntu’s Overlay Scrollbars. + +Finally, logout (volume > power button) **does not work under Ubuntu**. To log out you should use the run dialog (Alt+F2) and the following command: + + gnome-session-quit + +If all of that sounds like fun rather than faff, there’s plenty to enjoy in Budgie – and not just its minimal system footprint! Let us know your own thoughts on it, what you’d like to see it add next, etc. in the comments below. + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/budgie-desktop-0-8-released-big-changes + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://evolve-os.com/ +[2]:http://www.omgubuntu.co.uk/2014/07/install-budgie-evolve-os-desktop-ubuntu-14-04 \ No newline at end of file From 180844ee1ffbd0d5fc652f44adbcd3355e661a9c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 18 Nov 2014 16:38:19 +0800 Subject: [PATCH 225/316] =?UTF-8?q?20141118-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...vert a text file to PDF format on Linux.md | 44 +++++ ...rs--How to install phpMyAdmin on CentOS.md | 179 ++++++++++++++++++ 2 files changed, 223 insertions(+) create mode 100644 sources/tech/20141118 Linux FAQs with Answers--How to convert a text file to PDF format on Linux.md create mode 100644 sources/tech/20141118 Linux FAQs with Answers--How to install phpMyAdmin on CentOS.md diff --git a/sources/tech/20141118 Linux FAQs with Answers--How to convert a text file to PDF format on Linux.md b/sources/tech/20141118 Linux FAQs with Answers--How to convert a text file to PDF format on Linux.md new file mode 100644 index 0000000000..e6a8538fca --- /dev/null +++ b/sources/tech/20141118 Linux FAQs with Answers--How to convert a text file to PDF format on Linux.md @@ -0,0 +1,44 @@ +Linux FAQs with Answers--How to convert a text file to PDF format on Linux +================================================================================ +> **Question**: I want to convert a plain text file into a PDF document. Is there an easy way to convert a text file to a PDF file from the command line on Linux? + +When you have a bunch of text documents to maintain, there are advantages in converting them into PDF format. For example, PDF is good for printing because PDF documents have pre-defined layout. Besides, with PDF format, there is less risk hat the documents are accidentally modified. + +To convert a text file to PDF format, you can follow two-step procedures. + +### Prerequisites ### + +First, you need to install two prerequisite packages. + +On Debian, Ubuntu or Linux Mint: + + $ sudo apt-get install enscript ghostscript + +On Fedora, CentOS/RHEL: + + $ sudo yum install enscript ghostscript + +On Arch Linux: + + $ sudo pacman -S enscript ghostscript + +### Convert a Text File to PDF Format ### + +Once all prerequisites are installed, follow these two steps to generate a PDF file from a text file. + +First, convert a text file to Postscript format by using enscript command-line tool. + + $ enscript -p output.ps input.txt + +Finally convert the generated postscript file to a PDF file. + + $ ps2pdf output.ps output.pdf + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/convert-text-to-pdf-linux.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20141118 Linux FAQs with Answers--How to install phpMyAdmin on CentOS.md b/sources/tech/20141118 Linux FAQs with Answers--How to install phpMyAdmin on CentOS.md new file mode 100644 index 0000000000..97b21584c4 --- /dev/null +++ b/sources/tech/20141118 Linux FAQs with Answers--How to install phpMyAdmin on CentOS.md @@ -0,0 +1,179 @@ +Linux FAQs with Answers--How to install phpMyAdmin on CentOS +================================================================================ +> **Question**: I am running a MySQL/MariaDB server on CentOS, and I would like to manage its databases via web-based interface using phpMyAdmin. What is a proper way to install phpMyAdmin on CentOS? + +phpMyAdmin is an open-source PHP application designed as a web-based MySQL/MariaDB database administration tool. While there exist lightweight database management tools such as [Adminer][1], phpMyAdmin is more popularly used among webmasters to conduct various MySQL/MariaDB administration tasks. It supports pretty much all MySQL database/table related operations such as browse, create, copy, drop, rename, alter, as well as MySQL user/privilege management, and database import/export. Here is **how to install phpMyAdmin on CentOS 6 or 7**. + +### Prerequisites ### + +To install phpMyAdmin on CentOS, you first need to set up a web server (e.g., Apache or nginx), MySQL/MariaDB and PHP. Depending on your preference or requirement, you can choose to install either [LAMP stack][2] or [LEMP stack][3]. + +Another requirement is to enable EPEL repository on your CentOS. Follow [this guide][4] to set up EPEL repository if you haven't done so. + +### Install phpMyAdmin on CentOS 6 or 7 ### + +Once you set up EPEL repository, you can install phpMyAdmin easily with yum command as follows. + +On CentOS 7: + + $ sudo yum install phpmyadmin + +On CentOS 6: + + $ sudo yum install phpmyadmin php-mcrypt + +### Configure phpMyAdmin on CentOS 7 ### + +By default, phpMyAdmin on CentOS 7 allows access only from loopback address (127.0.0.1). To enable remote access, you will need to update its configuration. + +Open phpMyAdmin's configuration (/etc/httpd/conf.d/phpMyAdmin.conf) with a text editor. Find and comment out every line that says "Require ip XXXX". There will be four such lines. Add "Require all granted" instead. The updated configuration file will look like the following. + + $ sudo vi /etc/httpd/conf.d/phpMyAdmin.conf + +---------- + + . . . . . + + AddDefaultCharset UTF-8 + + + # Apache 2.4 + + #Require ip 127.0.0.1 + #Require ip ::1 + Require all granted + + + + # Apache 2.2 + Order Deny,Allow + Deny from All + Allow from 127.0.0.1 + Allow from ::1 + + + + + + # Apache 2.4 + + #Require ip 127.0.0.1 + #Require ip ::1 + Require all granted + + + + # Apache 2.2 + Order Deny,Allow + Deny from All + Allow from 127.0.0.1 + Allow from ::1 + + + . . . . . + +Finally, restart httpd to activate the change. + + $ sudo systemctl restart httpd + +### Configure phpMyAdmin on CentOS 6 ### + +By default, phpMyAdmin on CentOS 6 blocks access from every IP address. To enable remote access, you will need to update its configuration. + +Open phpMyAdmin's configuration (/etc/httpd/conf.d/phpmyadmin.conf) with a text editor. Find a line that says "Deny from all", and comment it out. Then change the line that says "Allow from 127.0.0.1" to "Allow from 0.0.0.0". The updated configuration will look like the following. + + $ sudo vi /etc/httpd/conf.d/phpmyadmin.conf + +---------- + + + Order Deny,Allow + # Deny from all + Allow from 0.0.0.0 + + +The next step is to add a blowfish password to the phpMyAdmin's configuration. This step is needed to encrypt password in cookie as part of cookie-based authentication. + +Open the following file with a text editor, and set a random blowfish password as follows. + + $ sudo vi /usr/share/phpmyadmin/config.inc.php + +---------- + + $cfg['blowfish_secret'] = 'kd5G}d33aXDc50!'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ + +Finally, restart httpd to activate the change. + + $ sudo service httpd restart + +### Test phpMyAdmin ### + +To test if phpMyAdmin is successfully set up, go to http:///phpmyadmin + +![](https://farm6.staticflickr.com/5606/15550758749_0f7ab66b5b_z.jpg) + +You should be able to log with any MySQL user (e.g., root), and manage MySQL/MariaDB databases/tables via a web-based interface. + +![](https://farm8.staticflickr.com/7505/15551187008_86ac7e7db1_z.jpg) + +### Troubleshooting ### + +Here are a few troubleshooting tips during phpMyAdmin installation on CentOS. + +1. When you are trying to access phpMyAdmin page in web browser, you are getting "403 Forbidding" error with: + + You don't have permission to access /phpMyAdmin on this server. + +This error is happening because the default setting of phpMyAdmin blocks access from a remote IP address. To fix this error, you need to edit its configuration to allow remote access. See the above for more detail. + +2. When you access phpMyAdmin page, you are seeing "The configuration file now needs a secret passphrase (blowfish_secret)." message, and you cannot login. + +To fix this error, you need to edit /usr/share/phpmyadmin/config.inc.php to add a random blowfish password as follows, and restart httpd. + + $cfg['blowfish_secret'] = 'kd5G}d33aXDc50!'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ + +---------- + + $ sudo service httpd restart (CentOS 6) + $ sudo systemctl restart httpd (CentOS 7) + +3. When you access phpMyAdmin page, you are getting "Cannot load mcrypt extension. Please check your PHP configuration" error message. + +To solve this error, install the following package: + + $ sudo yum install php-mcrypt + +and restart httpd: + + $ sudo service httpd restart (CentOS 6) + $ sudo systemctl restart httpd (CentOS 7) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-phpmyadmin-centos.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://xmodulo.com/set-web-based-database-management-system-adminer.html +[2]:http://xmodulo.com/install-lamp-stack-centos.html +[3]:http://xmodulo.com/install-lemp-stack-centos.html +[4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[5]: +[6]: +[7]: +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: \ No newline at end of file From 1085a2e1682ac4fe415034876ad4c19e120c76df Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Tue, 18 Nov 2014 17:17:00 +0800 Subject: [PATCH 226/316] [translated] 20140818 What are useful CLI tools for Linux system admins.md --- ...seful CLI tools for Linux system admins.md | 188 ------------------ ...seful CLI tools for Linux system admins.md | 185 +++++++++++++++++ 2 files changed, 185 insertions(+), 188 deletions(-) delete mode 100644 sources/tech/20140818 What are useful CLI tools for Linux system admins.md create mode 100644 translated/tech/20140818 What are useful CLI tools for Linux system admins.md diff --git a/sources/tech/20140818 What are useful CLI tools for Linux system admins.md b/sources/tech/20140818 What are useful CLI tools for Linux system admins.md deleted file mode 100644 index 9f01704e1f..0000000000 --- a/sources/tech/20140818 What are useful CLI tools for Linux system admins.md +++ /dev/null @@ -1,188 +0,0 @@ -zpl1025 -What are useful CLI tools for Linux system admins -================================================================================ -System administrators (sysadmins) are responsible for day-to-day operations of production systems and services. One of the critical roles of sysadmins is to ensure that operational services are available round the clock. For that, they have to carefully plan backup policies, disaster management strategies, scheduled maintenance, security audits, etc. Like every other discipline, sysadmins have their tools of trade. Utilizing proper tools in the right case at the right time can help maintain the health of operating systems with minimal service interruptions and maximum uptime. - -This article will present some of the most popular and useful CLI tools recommended for sysadmins in their day to day activities. If you would like to recommend any useful tool which is not listed here, don't forget to share it in the comment section. - -### Network Tools ### - -1. **ping**: Check end-to-end connectivity (RTT delay, jitter, packet loss) of a remote host with ICMP echo/reply. Useful to check system status and reachability. - -2. **[phping][1]**: Network scanning and testing tool that can generate ICMP/TCP/UDP ping packets. Often used for advanced port scanning, firewall testing, manual path MTU discovery and fragmentation testing. - -3. **traceroute**: Discover a layer-3 forwarding path from a local host to a remote destination host with TTL-limited ICMP/UDP/TCP probe packets. Useful to troubleshoot network reachability and routing problems. - -4. **mtr**: A variation of traceroute which characterizes per-hop packet loss/jitter with running statistics. Useful to characterize routing path delays. - -5. **[netcat][2]/[socat][3]**: A swiss army knife of TCP/IP networking, allowing to read/write byte streams over TCP/UDP. Useful to troubleshoot firewall policies and service availability. - -6. **dig**: DNS troubleshooting tool that can generate forward queries, reverse queries, find authoritative name servers, check CNAME, MX and other DNS records. Can be instructed to query a specific DNS server of your choosing. - -7. **nslookup**: Another DNS checking/troubleshooting tool. Works with all DNS queries and records. Can query a particular DNS server. - -8. **dnsyo**: A DNS testing tool which checks DNS propagation by performing DNS lookup from over a number of open resolvers located across 1,500 different networks around the world. - -9. **lsof**: Show information about files (e.g., regular files, pipes or sockets) which are opened by processes. Useful to monitor open network connections. - -10. **iftop**: A ncurses-based TUI utility that can be used to monitor in real time bandwidth utilization and network connections for each network interfaces. Useful to keep track of bandwidth hogging applications, users, destinations and ports. - -11. **netstat**: A network statistics utility that can show status information and statistics about open network connections (TCP/UDP ports, IP addresses), routing tables, TX/RX traffic and protocols. Useful for network related diagnosis and performance tuning. - -12. **[tcpdump][4]**: A popular packet sniffer tool based on libpcap packet capture library. Can define packet capturing filters in Berkeley Packet Filters format. - -13. **[tshark][5]**: Another CLI packet sniffer software with full compatibility with its GUI counterpart, Wireshark. Supports [1,000 protocols][6] and the list is growing. Useful to troubleshoot, analyze and store information on live packets. - -14. **ip**: A versatile CLI networking tool which is part of iproute2 package. Used to check and modifying routing tables, network device state, and IP tunneling settings. Useful to view routing tables, add/remove static routes, configure network interfaces, and otherwise troubleshoot routing issues. - -15. **ifup/ifdown**: Used to bring up or shut down a particular network interface. Often a preferred alternative to restarting the entire network service. - -16. **[autossh][7]**: A program which create an SSH session and automatically restarts the session should it disconnect. Often useful to create a persistent reverse SSH tunnel across restrictive corporate networks. - -17. **iperf**: A network testing tool which measures maximum bi-directional throughput between a pair of hosts by injecting customizable TCP/UDP data streams in between. - -18. **[elinks][8]/[lynx][9]**: text-based web browsers for CLI-based server environment. - -### Security Tools ### - -19. **[iptables][10]**: A user-space CLI tool for configuring Linux kernel firewall. Provides means to create and modify rules for incoming, transit and outgoing packets within Linux kernel space. - -20. **[nmap][11]**: A popular port scanning and network discovery tool used for security auditing purposes. Useful to find out which hosts are up and running on the local network, and what ports are open on a particular host. - -21. **[TCP Wrappers][12]**: A host-based network ACL tool that can be used to filter incoming/outgoing reqeuests/replies. Often used alongside iptables as an additional layer of security. - -22. **getfacl/setfacl**: View and customize access control lists of files and directories, as extensions to traditional file permissions. - -23. **cryptsetup**: Used to create and manage LUKS-encrypted disk partitions. - -24. **lynis**: A CLI-based vulnerability scanner tool. Can scan the entire Linux system, and report potential vulnerabilities along with possible solutions. - -25. **maldet**: A malware scanner CLI tool which can detect and quarantine potentially malware-infected files. Can run as a background daemon for continuous monitoring. - -26. **[rkhunter][13]/[chkrootkit][14]**: CLI tools which scan for potential rootkits, hidden backdoors and suspected exploits on a local system, and disable them. - -### Storage Tools ### - -27. **fdisk**: A disk partition editor tool. Used to view, create and modify disk partitions on hard drives and removable media. - -28. **sfdisk**: A variant of fdisk which accesses or updates a partition table in a non-interactive fashion. Useful to automate disk partitioning as part of backup and recovery procedure. - -29. **[parted][15]**: Another disk partition editor which can support disk larger than 2TB with GPT (GUID Partitioning Table). Gparted is a GTK+ GUI front-end of parted. - -30. **df**: Used to check used/available storage and mount point of different partitions or file directories. A user-friendly variant dfc exists. - -31. **du**: Used to view current disk usage associated with different files and directories (e.g., du -sh *). - -32. **mkfs**: A disk formatting command used to build a filesystem on individual disk partitions. Filesystem-specific versions of mkfs exist for a number of filesystems including ext2, ext3, ext4, bfs, ntfs, vfat/fat. - -33. **fsck**: A CLI tool used to check a filesystem for errors and repair where possible. Typically run automatically upon boot when necessary, but also invoked manually on demand once unmounting a partition. - -34. **mount**: Used to map a physical disk partition, network share or remote storage to a local mount point. Any read/write in the mount point makes actual data being read/written in the correspoinding actual storage. - -35. **mdadm**: A CLI tool for managing software RAID devices on top of physical block devices. Can create, build, grow or monitor RAID array. - -36. **lvm**: A suite of CLI tools for managing volume groups and physical/logical volumes, which allows one to create, resize, split and merge volumes on top of multiple physical disks with minimum downtime. - -### Log Processing Tools ### - -37. **tail**: Used to monitor trailing part of a (growing) log file. Other variants include multitail (multi-window monitoring) and [ztail][16] (inotify support and regex filtering and coloring). - -38. **logrotate**: A CLI tool that can split, compresse and mail old/large log files in a pre-defined interval. Useful for administration of busy servers which may produce a large amount of log files. - -39. **grep/egrep**: Can be used to filter log content for a particular pattern or a regular expression. Variants include user-friendly ack and faster ag. - -40. **awk**: A versatile text scanning and processing tool. Often used to extract certain columns or fields from text/log files, and feed the result to other tools. - -41. **sed**: A text stream editor tool which can filter and transform (e.g., remove line/whitespace, substitute/convert a word, add numbering) text streams and pipeline the result to stdout/stderr or another tool. - -### Backup Tools ### - -42. **[rsync][17]**: A fast one-way incremental backup and mirroring tool. Often used to replicate a data repository to an offsite storage, optionally over a secure connection such as SSH or stunnel. - -43. **[rdiff-backup][18]**: Another bandwidth-efficient, incremental backup tool. Maintains differential of two consecutive snapshots. - -44. **duplicity**: An encrypted incremental backup utility. Uses GnuPG to encrypt a backup, and transfers to a remote server over SSH. - -### Performance Monitoring Tools ### - -45. **top**: A CLI-based process viewer program. Can monitor system load, process states, CPU and memory utilization. Variants include more user-friendly htop. - -46. **ps**: Shows a snapshot of all running processes in the system. The output can be customized to show PID, PPID, user, load, memory, cummulative user/system time, start time, and more. Variants include pstree which shows - -### processes in a tree hierarchy. ### - -47. **[nethogs][19]**: A bandwidth monitoring tool which groups active network connections by processes, and reports per-process (upload/download) bandwidth consumption in real-time. - -48. **ngxtop**: A web-server access log parser and monitoring tool whose interface is inspired by top command. It can report, in real time, a sorted list of web requests along with frequency, size, HTTP return code, IP address, etc. - -49. **vmstat**: A simple CLI tool which shows various run-time system properties such as process count, free memory, paging status, CPU utilization, block I/O activities, interrupt/context switch statistics, and more. - -50. **iotop**: An ncurses-based I/O monitoring tool which shows in real time disk I/O activities of all running processes in sorted order. - -51. **iostat**: A CLI tool which reports current CPU utilization, as well as device I/O utilization, where I/O utilization (e.g., block transfer rate, byte read/write rate) is reported on a per-device or per-partition basis. - -### Productivity Tools ### - -52. **screen**: Used to split a single terminal into multiple persistent virtual terminals, which can also be made accessible to remote users, like teamviewer-like screen sharing. - -53. **tmux**: Another terminal multiplexer tool which enables multiple persistent sessions, as well as horizontal/vertial splits of a terminal. - -54. **cheat**: A simple CLI tool which allows you to read cheat sheets of many common Linux commands, conveniently right at your fingertips. Pre-built cheat sheets are fully customizable. - -55. **apropos**: Useful when you are searching man pages for descriptions or keywords. - -### Package Management Tools ### - -56. **apt**: The de facto package manager for Debian based systems like Debain, Ubuntu or Backtrack. A life saver. - -57. **apt-fast**: A supporting utility for apt-get, which can significantly improve apt-get's download speed by using multiple concurrent connections. - -58. **apt-file**: Used to find out which .deb package a specific file belongs to, or to show all files in a particular .deb package. Works on both installed and non-installed packages. - -59. **dpkg**: A CLI utility to install a .deb package manually. Highly advised to use apt whenever possible. - -60. **yum**: The de facto automatic package manager for Red Hat based systems like RHEL, CentOS or Fedora. Yet another life saver. - -61. **rpm**: Typically I use rpmyum something. Has some useful parameters like -q, -f, -l for querying, files and locations, respectively. - -### Hardware Tools ### - -62. **lspci**: A command line tool which shows various information about installed PCI devices, such as model names, device drivers, capabilities, memory address, PCI bus address. - -63. **lshw**: A command line tool which queries and displays detailed information of hardware configuration in various categories (e.g., processor, memory, motherboard, network, storage). Supports multiple output formats: html, xml, json, text. - -64. **[inxi][20]**: A comprehensive hardware reporting tool which gives an overview of various hardware components such as CPU, graphics card, sound card, network card, temperature/fan sensors, etc. - -If you would like to recommend any useful tool which is not listed here, feel free to share it in the comment section. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/2014/08/useful-cli-tools-linux-system-admins.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://www.hping.org/ -[2]:http://netcat.sourceforge.net/ -[3]:http://www.dest-unreach.org/socat/ -[4]:http://www.tcpdump.org/ -[5]:https://www.wireshark.org/docs/man-pages/tshark.html -[6]:https://www.wireshark.org/docs/dfref/ -[7]:http://www.harding.motd.ca/autossh/ -[8]:http://elinks.or.cz/ -[9]:http://lynx.isc.org/ -[10]:http://www.netfilter.org/projects/iptables/ -[11]:http://nmap.org/ -[12]:http://en.wikipedia.org/wiki/TCP_Wrapper -[13]:http://rkhunter.sourceforge.net/ -[14]:http://www.chkrootkit.org/ -[15]:http://www.gnu.org/software/parted/ -[16]:https://hackage.haskell.org/package/ztail -[17]:http://rsync.samba.org/ -[18]:http://www.nongnu.org/rdiff-backup/ -[19]:http://nethogs.sourceforge.net/ -[20]:http://code.google.com/p/inxi/ diff --git a/translated/tech/20140818 What are useful CLI tools for Linux system admins.md b/translated/tech/20140818 What are useful CLI tools for Linux system admins.md new file mode 100644 index 0000000000..fb87e04967 --- /dev/null +++ b/translated/tech/20140818 What are useful CLI tools for Linux system admins.md @@ -0,0 +1,185 @@ +对Linux系统管理员有帮助的命令行工具 +================================================================================ +系统管理员(sysadmins)负责日常维护生产系统和服务。其中一个关键任务就是保证功能性服务能24小时工作。为了这个,他们得很小心地计划备份方式,灾难管理策略,定时维护,安全审查,等等。和任意其他管理一样,系统管理员也有他们的必备工具。在正确的时间正确的情况下使用合适的工具,可以帮助维护操作系统的健壮,达到最小的服务中断时间和最大的运行时间。 + +这篇文章会介绍一些系统管理员日常活动中最常用和有效的命令行工具。如果你想推荐其他没在这里列出来的好用的工具,别忘了在评论区里分享一下。 + +### 网络工具 ### + +1. **ping**:通过ICMP回应/回复报文来检查远端主机的端到端连接性(RTT延时,抖动,丢包)。用来检查系统状态和可连接性很不错。 + +2. **[phping][1]**:网络扫描和检测工具,可以产生ICMP/TCP/UDP ping数据包。常常用于高级端口扫描,防火墙测试,手动MTU路径发现和碎片测试。 + +3. **traceroute**:通过TTL限定的ICMP/UDP/TCP侦测包来发现从本地主机到远端目标主机之间的第三层转发路径。用来调试网络连接性和路由问题。 + +4. **mtr**:traceroute的一个变种,能根据运行时统计数据整理出每一跳的包丢失/抖动。用来评估路由路径延时很不错。 + +5. **[netcat][2]/[socat][3]**:TCP/IP网络里的瑞士军刀,可以读/写TCP/UDP协议字节流。用来调试防火墙策略和服务可用性很不错。 + +6. **dig**:DNS调试工具,可以生成正向查询,反向查询,搜索域名服务器,检查CNAME,MX和其他DNS记录。可以在侦错的时候查询特定的DNS服务器。 + +7. **nslookup**:另外一个DNS检查/调试工具。支持所有DNS查询和记录。可以查询特定DNS服务器。 + +8. **dnsyo**:一个DNS测试工具,通过对全世界1500个不同网络中的大量开放解析器执行DNS查询来测试DNS传输。 + +9. **lsof**:显示进程打开的文件信息(例如,普通文件,管道或套接字)。用来监视网络连接很不错。 + +10. **iftop**:一个基于ncurses的命令行界面应用,可以实时监视各个网络物理接口上的网络连接和带宽占用。用来记录霸占带宽的应用、用户、目的地和端口等很不错。 + +11. **netstat**:一个网络统计工具,可以显示状态以及统计信息,当前网络连接(TCP/UDP端口,IP地址)、路由表、TX/RX traffic以及网络协议。用来做网络相关诊断和性能调试很不错。 + +12. **[tcpdump][4]**:一个常用的基于libpcap抓包库的包侦测工具。可以按伯克利包过滤器格式定义抓包条件。 + +13. **[tshark][5]**:另一个命令行抓包工具,和它的GUI版本Wireshark完全兼容。支持[1000种协议][6]而且这个列表还在增加。用来调试、分析和保存实时网络封包信息很不错。 + +14. **ip**:一个多功能的命令行网络工具,是iproute2包的一部分。可以检查和修改路由表、网络设备状态以及IP隧道设置。用来查看路由表、增加/删除静态路由、配置网络接口、以及调试路由问题很有用。 + +15. **ifup/ifdown**:用来激活和关闭特定的网络接口。经常用于重启整个网络服务。 + +16. **[autossh][7]**:一个能建立SSH连接并在断线后自动重新连接的程序。用来创建长时间保持的穿越严格企业网络的SSH隧道很有用。 + +17. **iperf**:一个网络测试工具,通过在发送自定义TCP/UDP数据流来衡量主机间双向最大吞吐量。 + +18. **[elinks][8]/[lynx][9]**:为基于命令行的服务器环境下使用的基于文字的网页浏览器。 + +### 安全工具 ### + +19. **[iptables][10]**:一个用户空间下的命令行工具,用于配置Linux内核防火墙。可以创建和修改Linux内核空间的网络包接收、转发和发送规则。 + +20. **[nmap][11]**:一个常用的为了安全审查目的的端口扫描和网络发现工具。用来在本地网络中找出哪些主机开机并运行起来了以及某台特定主机打开了哪些端口很有用。 + +21. **[TCP Wrappers][12]**:一个主机端的网络访问控制列表工具,可以过滤进入/出去的网络请求/回复。经常配合iptables一起使用,作为额外一层安全保护。 + +22. **getfacl/setfacl**:查看和定制文件和目录的访问控制列表,作为传统文件权限的扩展。 + +23. **cryptsetup**:用于创建和管理LUKS加密磁盘分区。 + +24. **lynis**:一个命令行的漏洞扫描工具。可以扫描整个Linux系统,并汇报潜在的漏洞以及相关可能解决方案。 + +25. **maldet**:一个恶意软件扫描命令行工具,可以检测和隔离潜在的感染文件。可以在后台运行长期监视。 + +26. **[rkhunter][13]/[chkrootkit][14]**:一个命令行工具,可以扫描本地系统里的潜在木马、隐藏后门和可疑利用,并禁用它们。 + +### 存储工具 ### + +27. **fdisk**:一个磁盘分区编辑工具。用于查看、创建和修改本地磁盘或可移动磁盘的分区。 + +28. **sfdisk**:fdisk的一个变种,能用一种非交互的方式访问或更新磁盘分区表。用来自动化备份和恢复过程中的磁盘分区很有用。 + +29. **[parted][15]**:另一个磁盘分区编辑器,支持超过2TB的磁盘的GPT(GUID分区表)格式。gparted是parted的一个前端GTK+图形界面。 + +30. **df**:用来查看不同分区或文件路径的已用/可用存储空间和挂载点。存在一个用户友好的变种dfc。 + +31. **du**:用来查看不同文件和目录的当前磁盘占用情况(例如,du -sh *)。 + +32. **mkfs**:一个磁盘格式化命令,用来在独立磁盘分区上建立文件系统。有多个文件系统相关的版本:ext2、ext3、ext4、bfs、ntfs、vfat/fat。 + +33. **fsck**:一个命令行工具,用来检查文件系统错误并尝试可能的修复。通常在启动时自动运行,但是在卸载一个分区后也可以根据需要手动运行。 + +34. **mount**:用来映射一个物理磁盘分区、网络共享或远程存储到一个本地挂载点。任何对挂载点里的读/写操作都是对应实际存储的实际数据读/写。 + +35. **mdadm**:一个命令行工具,用来管理物理块设备上的软件RAID设备。可以创建、构造、增长或监视RAID阵列。 + +36. **lvm**:一套命令行工具集,用来管理卷分组和物理/逻辑卷,可以用最小的停机时间在多个物理磁盘上创建、调整大小、拆分和合并卷。 + +### 日志访问工具 ### + +37. **tail**:用来查看一个(增长中的)日志文件的尾部。有几个变种,包括multitail(多窗口查看)和[ztail][16](支持inotify和正则表达式过滤以及颜色)。 + +38. **logrotate**:一个命令行工具,可以在根据设定的时间段拆分、压缩并邮寄旧的/大的日志文件。用来管理可能产生大量日志文件的繁忙主机很有用。 + +39. **grep/egrep**:可以通过特定的模式或正则表达式过滤日志内容。变种包括用户更友好的ack和速度更快的ag。 + +40. **awk**:一个多功能的文本扫描和处理工具。常用于从文本/日志文件中找出特定的列或内容,并输出给其他工具。 + +41. **sed**:一个文本流编辑工具,可以过滤和改变(例如,删除行/空格、替换/转换单词、增加计数)文本流并通过管道连接到stdout/stderr或者其他工具。 + +### 备份工具 ### + +42. **[rsync][17]**:一个快速的单向增量备份和镜像工具。常用于复制一个数据仓库到线下存储,可以选择通过SSH或stunnel的加密连接。 + +43. **[rdiff-backup][18]**:另一个有效利用带宽的增量备份工具。管理两个连续快照之间的差分。 + +44. **duplicity**:一个加密的增量备份工具。使用GnuPG加密备份,并通过SSH上传到远程服务器。 + +### 性能监视工具 ### + +45. **top**:一个命令行的进程查看程序。可以监视系统负载、进程状态、CPU和内存占用。有一个更用户友好的变种htop。 + +46. **ps**:显示系统所有运行中进程的一个快照。输出可以定制成显示PID、PPID、用户、负载、内存、积累的用户/系统时间、启动时间、以及更多。有一个变种是pstree可以用树结构显示进程。 + +47. **[nethogs][19]**:一个带宽监视工具,按进程来分组显示活动网络连接,实时汇报每个进程占用的(上传/下载)带宽。 + +48. **ngxtop**:一个网页服务器访问日志解析和监视工具,界面是受top命令启发。它可以实时汇报整理过的页面请求列表,包括频率、大小、HTTP返回值、IP地址,等等。 + +49. **vmstat**:一个简单的命令行工具,可以显示多个实时系统特征,例如进程数、剩余内存、分页状态、CPU占用、块设备I/O活动、中断/上下文切换统计、等等。 + +50. **iotop**:一个基于ncurses的I/O监视工具,可以实时排序显示所有运行中进程的磁盘I/O活动。 + +51. **iostat**:一个命令行工具,可以汇报当前CPU使用情况,以及设备I/O使用情况,这里的I/O使用情况(例如,块传输速度、字节读/写速度)是按设备或分区来汇报的。 + +### 效率工具 ### + +52. **screen**:用来把一个单一的终端拆分成多个持久的虚拟终端,也支持远程用户访问,类似teamviewer的屏幕分享功能。 + +53. **tmux**:另一个终端复用工具,可以支持多个长期会话,还可以横向/纵向拆分终端。 + +54. **cheat**:一个简单的命令行工具,可以让你查看多个常用Linux命令的备忘录,就在手边非常方便。内建的备忘录也可以完全定制。 + +55. **apropos**:用来在帮助手册里查找描述或关键字很有用。 + +### 包管理工具 ### + +56. **apt**:基于Debian系统的事实上的包管理工具,例如Debian、Ubuntu或Backtrack。一个救生圈。 + +57. **apt-fast**:apt-get的一个支撑应用,可以通过多个并行连接明显提高apt-get的下载速度。 + +58. **apt-file**:用来查看某个特定文件属于哪个.deb包,或者显示一个特定.deb包里的所有文件。已安装和未安装的包都能支持。 + +59. **dpkg**:一个用来手动安装.deb包的命令行工具。强烈建议尽可能的使用apt。 + +60. **yum**:基于红帽的系统的事实上的自动包管理工具,比如RHEL、CentOS或Fedora。另一个救生圈。 + +61. **rpm**:通常我都是rpmyum一下。有很多有用的参数,比如-q、-f、-l可以分别用来查询、指定文件和路径。 + +### 硬件工具 ### + +62. **lspci**:一个命令行工具,可以显示已安装的PCI设备的各种信息,比如型号名称、设备驱动、设备功能、内存地址、PCI总线地址。 + +63. **lshw**:一个命令行工具,可以查询和显示不同分类下的硬件配置的详细信息(例如,处理器、内存、主板、网络、存储)。支持多重输出格式:html、xml、json、text。 + +64. **[inxi][20]**:一个综合硬件查看工具,可以提供不同硬件模块的总览,例如CPU,显卡,声卡,网卡,温度/风扇传感器,等等。 + +如果你希望推荐没有列在这里的好用的工具,不要客气,在评论区里分享一下。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/2014/08/useful-cli-tools-linux-system-admins.html + +作者:[Sarmed Rahman][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/sarmed +[1]:http://www.hping.org/ +[2]:http://netcat.sourceforge.net/ +[3]:http://www.dest-unreach.org/socat/ +[4]:http://www.tcpdump.org/ +[5]:https://www.wireshark.org/docs/man-pages/tshark.html +[6]:https://www.wireshark.org/docs/dfref/ +[7]:http://www.harding.motd.ca/autossh/ +[8]:http://elinks.or.cz/ +[9]:http://lynx.isc.org/ +[10]:http://www.netfilter.org/projects/iptables/ +[11]:http://nmap.org/ +[12]:http://en.wikipedia.org/wiki/TCP_Wrapper +[13]:http://rkhunter.sourceforge.net/ +[14]:http://www.chkrootkit.org/ +[15]:http://www.gnu.org/software/parted/ +[16]:https://hackage.haskell.org/package/ztail +[17]:http://rsync.samba.org/ +[18]:http://www.nongnu.org/rdiff-backup/ +[19]:http://nethogs.sourceforge.net/ +[20]:http://code.google.com/p/inxi/ From c3805ed6b1539bb5baa9599be1f00945b77c50b6 Mon Sep 17 00:00:00 2001 From: runningwater Date: Tue, 18 Nov 2014 19:40:32 +0800 Subject: [PATCH 227/316] =?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 --- ...ginx MariaDB or MySQL and php on CentOS.md | 249 ------------------ ...ginx MariaDB or MySQL and php on CentOS.md | 248 +++++++++++++++++ 2 files changed, 248 insertions(+), 249 deletions(-) delete mode 100644 sources/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md create mode 100644 translated/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md diff --git a/sources/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md b/sources/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md deleted file mode 100644 index a55493e6b1..0000000000 --- a/sources/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md +++ /dev/null @@ -1,249 +0,0 @@ -(translating by runningwater) -How to install LEMP stack (nginx, MariaDB/MySQL and php) on CentOS -================================================================================ -The LEMP stack is an increasingly popular web service stack, powering mission-critical web services in many production environments. As the name implies, the LEMP stack is composed of Linux, nginx, MariaDB/MySQL and PHP. nginx is a high performance and lightweight replacement of slow and hard-to-scale Apache HTTP server used in the traditional LAMP stack. MariaDB is a community-driven fork of MySQL, with more features and better performance. PHP, a server-side language for generating dynamic content, is processed by PHP-FPM, an enhanced implementation of PHP FastCGI. - -In this tutorial, I demonstrate **how to set up the LEMP stack on CentOS platforms**. I target both CentOS 6 and CentOS 7 platforms, and point out differences where necessary. - -### Step One: Nginx ### - -As the first step, let's install nginx on CentOS, and do basic configuration for nginx, such as enabling auto-start and [customizing the firewall][1]. - -#### Install Nginx #### - -Let's install a pre-built stable version of nginx package from its official RPM source. - -On CentOS 7: - - $ sudo rpm --import http://nginx.org/keys/nginx_signing.key - $ sudo rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm - $ sudo yum install nginx - -On CentOS 6: - - $ sudo rpm --import http://nginx.org/keys/nginx_signing.key - $ sudo rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm - $ sudo yum install nginx - -Note that if you do not import the official nginx GPG key before installing nginx RPM, you will get this warning: - - warning: /var/tmp/rpm-tmp.KttVHD: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY - -#### Start Nginx #### - -After installation, nginx does not start automatically. Let's start nginx right now, and configure it to auto-start upon boot. Also, we need to open a TCP/80 port in the firewall so that you can access nginx webserver remotely. All of these are achieved by entering the following commands. - -On CentOS 7: - - $ sudo systemctl start nginx - $ sudo systemctl enable nginx - $ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent - $ sudo firewall-cmd --reload - -On CentOS 6: - - $ sudo service nginx start - $ sudo chkconfig nginx on - $ sudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT - $ sudo service iptables save - -#### Test Nginx #### - -The default document root directory of nginx is /usr/share/nginx/html. A default index.html file must be already placed in this directory. Let's check if you can access this test web page by going to http:/// - -![](https://farm4.staticflickr.com/3940/15461279287_8573948074_b.jpg) - -If you see the above page, nginx must be set up correctly. Proceed to the next. - -### Step Two: MariaDB/MySQL ### - -The next step is to install a database component of the LEMP stack. While CentOS/RHEL 6 or earlier provides MySQL server/client packages, CentOS/RHEL 7 has adopted MariaDB as the default implementation of MySQL. As a drop-in replacement of MySQL, MariaDB ensures maximum compatibility with MySQL in terms of APIs and command-line usages. Here is how to install and configure MariaDB/MySQL on CentOS. - -On CentOS 7: - -Install MariaDB server/client package and start MariaDB server as follows. - - $ sudo yum install mariadb-server - $ sudo systemctl start mariadb - $ sudo systemctl enable mariadb - -On CentOS 6: - -Install MySQL server/client package, and start MySQL server as follows. - - $ sudo yum install mysql-server - $ sudo service mysqld start - $ sudo chkconfig mysqld on - -After launching MariaDB/MySQL server successfully, execute the following add-on script that comes with MariaDB/MySQL server package. This one-time run conducts several security hardening steps for the database server, such as setting the (non-empty) root password, removing anonymous user, and locking down remote access. - - $ sudo mysql_secure_installation - -![](https://farm8.staticflickr.com/7545/15644566071_8c39875512_z.jpg) - -That's it for the database setup. Now move to the next step. - -### Step Three: PHP ### - -PHP is an important component of the LEMP stack, which is responsible for generating dynamic content from data stored in a MariaDB/MySQL server. For the LEMP stack, you need, at a minimum, to install PHP-FPM and PHP-MySQL. PHP-FPM (FastCGI Process Manager) implements an interface between nginx and PHP applications which generate dynamic content. The PHP-MySQL module allows PHP programs to access MariaDB/MySQL. - -#### Install PHP Modules #### - -On CentOS 7: - - $ sudo yum php php-fpm php-mysql - -On CentOS 6: - -First you need to install REMI repository (refer to [this guide][2]), and install the packages from the repository. - - $ sudo yum --enablerepo=remi install php php-fpm php-mysql - -![](https://farm4.staticflickr.com/3934/15644566121_60cbaab8b7_z.jpg) - -Two observations worth noting while installing PHP: - -On CentOS 6, MySQL server and client packages will automatically be upgraded as part of dependencies of the latest php-mysql in REMI. - -On both CentOS 6 and 7, installing the php package will also install Apache web server (i.e., httpd) as part of its dependencies. This can cause conflicts with nginx web server. We will take care of this problem in the next section. - -Depending on your use cases, you may want to install any of the following additional PHP module packages with yum command to customize your PHP engine. - -- **php-cli**: command-line interface for PHP. Useful for testing PHP from the command line. -- **php-gd**: image processing support for PHP. -- **php-bcmath**: arbitrary mathematics support for PHP. -- **php-mcrypt**: encryption algorithm support for PHP (e.g., DES, Blowfish, CBC, CFB, ECB ciphers). -- **php-xml**: XML parsing and manipulation support for PHP. -- **php-dba**: database abstraction layer support for PHP. -- **php-pecl-apc**: PHP accelerator/caching support. - -To see a complete list of available PHP modules to install, run: - - $ sudo yum search php- (CentOS 7) - $ sudo yum --enablerepo=remi search php- (CentOS 6) - -#### Start PHP-FPM #### - -You will need to start PHP-FPM, and add it to auto-start list. - -On CentOS 7: - - $ sudo systemctl start php-fpm - $ sudo systemctl enable php-fpm - -On CentOS 6: - - $ sudo chkconfig php-fpm on - $ sudo service php-fpm start - -### Step Four: Configure the LEMP Stack ### - -The final step of the tutorial is tuning the LEMP stack configuration. - -#### Disable Httpd #### - -Let's first disable httpd which was installed along with the PHP package earlier. - -On CentOS 7: - - $ sudo systemctl disable httpd - -On CentOS 6: - - $ sudo chkconfig httpd off - -#### Configure Nginx #### - -Next, let's configure nginx virtual hosts, so that nginx can process PHP via PHP-FPM. For that, open /etc/nginx/conf.d/default.conf with a text editor, and change it to the following. - - $ sudo vi /etc/nginx/conf.d/default.conf - ----------- - - server { - listen 80; - server_name www.server_domain.com; - root /usr/share/nginx/html; - index index.php index.html index.htm; - - location / { - } - - # redirect server error pages to the static page /50x.html - error_page 500 502 503 504 /50x.html; - location = /50x.html { - } - - # nginx passes PHP scripts to FastCGI server via a TCP/9000 socket - # this setting much be consistent with /etc/php-fpm.d/www.conf - # try_files prevents nginx from passing bad scripts to FastCGI server - location ~ \.php$ { - try_files $uri =404; - fastcgi_pass 127.0.0.1:9000; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include fastcgi_params; - } - } - -Also, let's adjust the number of nginx worker threads (specified in /etc/nginx/nginx.conf), which is set to one by default. Typically, we create as many worker threads as the number of CPU cores you have. To check how many CPU core you have, run this command: - - $ grep processor /proc/cpuinfo | wc -l - -If you have 4 cores, change /etc/nginx/nginx.conf as follows. - - $ sudo vi /etc/nginx/nginx.conf - ----------- - - worker_processes 4; - -#### Configure PHP #### - -Next, let's customize PHP configuration in /etc/php.ini file. More specifically, add the following lines in /etc/php.ini. - - cgi.fix_pathinfo=0 - date.timezone = "America/New York" - -As a security precaution, we want the PHP interpreter to process only an exact file path, instead of guessing any non-existing file. The first line above achieves this goal. - -The second line specifies the default timezone used by date/time related PHP functions. Use [this guide][3] to find out your timezone, and set the value of **date.timezone** accordingly. - -#### Test PHP #### - -Finally, let's check if nginx can process a PHP page. Before testing, make sure to restart nginx and PHP-FPM. - -On CentOS 7: - - $ sudo systemctl restart nginx - $ sudo systemctl restart php-fpm - -On CentOS 6: - - $ sudo service nginx restart - $ sudo service php-fpm restart - -Create a PHP file named test.php with the following content, and place it in /var/www/html/ - - - -Open a web browser, and go to http:///test.php. - -![](https://farm6.staticflickr.com/5608/15647258715_9d7bcd8c73_z.jpg) - -If you see the above page, you are all set with the LEMP stack! - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/install-lemp-stack-centos.html - -作者:[Dan Nanni][a] -译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/open-port-firewall-centos-rhel.html -[2]:http://ask.xmodulo.com/install-remi-repository-centos-rhel.html -[3]:http://ask.xmodulo.com/set-default-timezone-php.html \ No newline at end of file diff --git a/translated/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md b/translated/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md new file mode 100644 index 0000000000..e86bfcbc81 --- /dev/null +++ b/translated/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md @@ -0,0 +1,248 @@ +CentOS 下安装 LEMP 包(nginx、MariaDB/MySQL 和 php) +================================================================================ +LEMP 组合包是一款日益流行的网站服务组合软件包,在许多生产环境中的核心网站服务上起着强有力的作用。正如其名称所暗示的, LEMP 包是由 Linux、ngix、MariaDB/MySQL 和 PHP 组成的。在传统的 LAMP 包中使用的 Apache HTTP 协议服务器性能低下而且难于大规模集群,相比来说 ngix 的高性能及轻量级等特性,正是其的替代方案。 MariaDB 是一款社区支持驱动的 MySQL 数据库的分支,其功能更多性能更佳。PHP,服务端编程语言,具体是由 PHP FastCGI 的增强版 PHP-FPM 组件来处理,生成网页动态内容。 + +这篇文章里,我们示范**如何在 CentOS 操作平台上安装 LEMP 包**。我们安装的目标是 CentOS 6 和 CentOS 7 两个操作平台,如有必要会指出它们的不同。 + +### 第一步: Nginx ### + +让我们在 CentOS 上安装 nginx 作为第一步,然后对它作些基本的配置,比如使其能自启动和[对防火墙做个性化设置][1]。 + +#### 安装 Nginx #### + +让我们从它的官方的 RPM 源来安装一个预构建的稳定版本的 nginx 包。 + +在 CentOS 7 系统上: + + $ sudo rpm --import http://nginx.org/keys/nginx_signing.key + $ sudo rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm + $ sudo yum install nginx + +在 CentOS 6 系统上: + + $ sudo rpm --import http://nginx.org/keys/nginx_signing.key + $ sudo rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm + $ sudo yum install nginx + +注意在安装 nginx RPM 包之前,如果您没有导入 nginx 的官方 GPG 密钥的话,会出一如下所示的警告: + + warning: /var/tmp/rpm-tmp.KttVHD: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY + +#### 启动 Nginx #### + +安装完成后,nginx 是不会自动启动的。现在让我们来启动它吧,还要做些配置让其可以随着操作系统启动而启动。我们也需要在防火墙里打开 TCP/80 端口,以使得可以远程访问 nginx 的 web 服务。所有这些操作、设置都只需要输入如下命令就可实现。 + +在 CentOS 7 系统上: + + $ sudo systemctl start nginx + $ sudo systemctl enable nginx + $ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent + $ sudo firewall-cmd --reload + +在 CentOS 6 系统上: + + $ sudo service nginx start + $ sudo chkconfig nginx on + $ sudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT + $ sudo service iptables save + +#### 测试 Nginx #### + +nginx 的默认文档要目录是 /usr/share/nginx/html。默认的 index.html 文件一定已经在这目录下了。让我们检测下是否可以访问到这个测试 web 页,输入 http:/// 访问。 + +![](https://farm4.staticflickr.com/3940/15461279287_8573948074_b.jpg) + + 如果您看到的是如上所示的页面的话,说明 nginx 已经正常启动。继续往下。 + +### 第二步: MariaDB/MySQL ### + +下一步就是安装 LEMP 包的数据库组件。CentOS/RHEL 6 或早期的版本中提供的是 MySQL 的服务/客户端安装包,但 CentOS/RHEL 7 已使用了 MySQL 默认实现的版本 MariaDB。作为 MySQL 的简单替代品,MariaDB 保证了与 MySQL 的 API 和命令行用法方面最大的兼容性。下面是关于怎么在 CentOS 上安装和配置 MaraDB/MySQL 的操作示例。 + +在 CentOS 7 系统上: + +如下所示操作来安装 MariaDB 服务/客户端包以及启动 MariaDB 服务。 + + $ sudo yum install mariadb-server + $ sudo systemctl start mariadb + $ sudo systemctl enable mariadb + +在 CentOS 6 系统上: + +如下示,安装 MySQL 服务/客户端包并且启动 MySQL 服务。 + + $ sudo yum install mysql-server + $ sudo service mysqld start + $ sudo chkconfig mysqld on + +在成功启动 MariaDB/MySQL 服务后,执行在 MariaDB/MySQL 服务包中的脚本。这一次的运行会为为数据库服务器进行一些安全强化措施,如设置(非空)的 root 密码、删除匿名用户、锁定远程访问。 + + $ sudo mysql_secure_installation + +![](https://farm8.staticflickr.com/7545/15644566071_8c39875512_z.jpg) + +这就是数据库的设置。现在进行下一步。 + +### 第三步: PHP ### + +PHP 是 LEMP 包中一个重要的组件,它负责把存储在 MariaDB/MySQL 服务器的数据取出生成动态内容。为了 LEMP 可用,您至少需要安装上 PHP-FPM 和 PHP-MySQL 两个模块。PHP-FPM(FastCGI 进程管理器)实现的是 nginx 服务器和生成动态内容的 PHP 应用程序的访问接口。PHP-MySQL 模块使 PHP 程序能访问 MariaDB/MySQL 数据库。 + +#### 安装 PHP 模块 #### + +在 CentOS 7 系统上: + + $ sudo yum php php-fpm php-mysql + +在 CentOS 6 系统上: + +首先,您需要从仓库中安装 REMI 库(参见[本指南][2]),并安装软件包。 + + $ sudo yum --enablerepo=remi install php php-fpm php-mysql + +![](https://farm4.staticflickr.com/3934/15644566121_60cbaab8b7_z.jpg) + +在安装 PHP 时,得注意两个地方: + +在 CentOS 6 系统中,安装 REMI仓库中最新的 php-mysql 模块时,MySQL 的服务端包和客户端包会被当做一部分依赖包而自动的更新。 + +在 CentOS 6 和 CentOS 7 中,在安装 PHP 包的同时会把 Apache web 服务器(即 httpd)当做它的依赖包一起安装。这会跟 nginx web 服务器起冲突。这个问题会在下一节来讨论。 + +取决于您的使用情况,可以使用 yum 命令来定制您的 PHP 引擎,也许会想安装下面的任意一个扩展 PHP 模块包。 + +- **php-cli**: PHP 的命令行界面。从命令行里测试 PHP 时非常有用。 +- **php-gd**: PHP 的图像处理支持。 +- **php-bcmath**: PHP 的数学支持。 +- **php-mcrypt**: PHP 的加密算法支持 (例如 DES、Blowfish、CBC、 CFB、ECB ciphers 等)。 +- **php-xml**: PHP 的 XML 解析和处理支持。 +- **php-dba**: PHP 的数据抽象层支持。 +- **php-pecl-apc**: PHP 加速器/缓存支持。 + +安装时,要查看可用的 PHP 模块的完整列表的话,可以运行: + + $ sudo yum search php- (CentOS 7) + $ sudo yum --enablerepo=remi search php- (CentOS 6) + +#### 启动 PHP-FPM #### + +您需要启动 PHP-FPM ,然后把它加放自动启动服务列表。 + +在 CentOS 7 系统上: + + $ sudo systemctl start php-fpm + $ sudo systemctl enable php-fpm + +在 CentOS 6 系统上: + + $ sudo chkconfig php-fpm on + $ sudo service php-fpm start + +### 第四步: 配置 LEMP 组合包 ### + +本教程的最后一步是调整 LEMP 组合包的配置。 + +#### 使 Httpd 不可用 #### + +首先,让我们把早先随 PHP 包安装的 httpd 服务给禁用掉。 + +在 CentOS 7 系统上: + + $ sudo systemctl disable httpd + +在 CentOS 6 系统上: + + $ sudo chkconfig httpd off + +#### 配置 Nginx #### + +接下来,让我们配置 nginx 虚拟主机,使得 nginx 可以通过 PHP-FPM 来处理 PHP 的任务。用文本编辑器打开 /etc/nginx/conf.d/default.conf ,然后按如下所示修改。 + + $ sudo vi /etc/nginx/conf.d/default.conf + +---------- + + server { + listen 80; + server_name www.server_domain.com; + root /usr/share/nginx/html; + index index.php index.html index.htm; + + location / { + } + + # redirect server error pages to the static page /50x.html + error_page 500 502 503 504 /50x.html; + location = /50x.html { + } + + # nginx passes PHP scripts to FastCGI server via a TCP/9000 socket + # this setting much be consistent with /etc/php-fpm.d/www.conf + # try_files prevents nginx from passing bad scripts to FastCGI server + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + } + +nginx 的默认工作线程(在 /etc/nginx/nginx.conf 文件中指定的)数是一个,让我们也来调整一下这个数字。通常来说我们创建的工作线程数应该和 CPU 核数相同。要确信您的 CPU 的核数,请运行下面这命令: + + $ grep processor /proc/cpuinfo | wc -l + +如果您的 CPU 是 4 核的,就如下所示修改 /etc/nginx/nginx.conf 文件。 + + $ sudo vi /etc/nginx/nginx.conf + +---------- + + worker_processes 4; + +#### 配置 PHP #### + +接下来,让我们对 PHP 的配置文件 /etc/php.ini 做自定义设置。更具体的就是在 /etc/php.ini 文件中增加以下两行。 + + cgi.fix_pathinfo=0 + date.timezone = "America/New York" + +为了安全起见,我们希望的是 PHP 解释器只是处理指定文件路径的文件任务,而不是预测搜索一些并不存在的文件任务。上面的第一行起的就是这个作用。 + +第二行定义的是 PHP 中 日期/时间相关函数使用相关的默认时区。使用[本指南] [3],找出您所在的时区,并设置相应 **date.timezone 的值**。 + +#### 测试 PHP #### + +最后,让我们来测试下 nginx 是否能处理 PHP 页面。在测试之前,请确保重启 nginx 和 PHP-FPM。 + +在 CentOS 7 系统上: + + $ sudo systemctl restart nginx + $ sudo systemctl restart php-fpm + +在 CentOS 6 系统上: + + $ sudo service nginx restart + $ sudo service php-fpm restart + +创建一个叫名叫 test.php 的文件,然后写入如下内容,并放入 /var/www/html/ 目录。 + + + +打开浏览器,输入 http:///test.php 。 + +![](https://farm6.staticflickr.com/5608/15647258715_9d7bcd8c73_z.jpg) + +如果您能看到如上所示的页面,说明设置的 LEMP 完全成功! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/install-lemp-stack-centos.html + +作者:[Dan Nanni][a] +译者:[runningwater](https://github.com/runningwater) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/open-port-firewall-centos-rhel.html +[2]:http://ask.xmodulo.com/install-remi-repository-centos-rhel.html +[3]:http://ask.xmodulo.com/set-default-timezone-php.html \ No newline at end of file From 6397b3ad4794b17876ebd8331127af346cd4152d Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Tue, 18 Nov 2014 22:25:36 +0800 Subject: [PATCH 228/316] translated --- ...vert a text file to PDF format on Linux.md | 44 ------------------ ...vert a text file to PDF format on Linux.md | 45 +++++++++++++++++++ 2 files changed, 45 insertions(+), 44 deletions(-) delete mode 100644 sources/tech/20141118 Linux FAQs with Answers--How to convert a text file to PDF format on Linux.md create mode 100644 translated/tech/20141118 Linux FAQs with Answers--How to convert a text file to PDF format on Linux.md diff --git a/sources/tech/20141118 Linux FAQs with Answers--How to convert a text file to PDF format on Linux.md b/sources/tech/20141118 Linux FAQs with Answers--How to convert a text file to PDF format on Linux.md deleted file mode 100644 index e6a8538fca..0000000000 --- a/sources/tech/20141118 Linux FAQs with Answers--How to convert a text file to PDF format on Linux.md +++ /dev/null @@ -1,44 +0,0 @@ -Linux FAQs with Answers--How to convert a text file to PDF format on Linux -================================================================================ -> **Question**: I want to convert a plain text file into a PDF document. Is there an easy way to convert a text file to a PDF file from the command line on Linux? - -When you have a bunch of text documents to maintain, there are advantages in converting them into PDF format. For example, PDF is good for printing because PDF documents have pre-defined layout. Besides, with PDF format, there is less risk hat the documents are accidentally modified. - -To convert a text file to PDF format, you can follow two-step procedures. - -### Prerequisites ### - -First, you need to install two prerequisite packages. - -On Debian, Ubuntu or Linux Mint: - - $ sudo apt-get install enscript ghostscript - -On Fedora, CentOS/RHEL: - - $ sudo yum install enscript ghostscript - -On Arch Linux: - - $ sudo pacman -S enscript ghostscript - -### Convert a Text File to PDF Format ### - -Once all prerequisites are installed, follow these two steps to generate a PDF file from a text file. - -First, convert a text file to Postscript format by using enscript command-line tool. - - $ enscript -p output.ps input.txt - -Finally convert the generated postscript file to a PDF file. - - $ ps2pdf output.ps output.pdf - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/convert-text-to-pdf-linux.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/translated/tech/20141118 Linux FAQs with Answers--How to convert a text file to PDF format on Linux.md b/translated/tech/20141118 Linux FAQs with Answers--How to convert a text file to PDF format on Linux.md new file mode 100644 index 0000000000..4562a624a1 --- /dev/null +++ b/translated/tech/20141118 Linux FAQs with Answers--How to convert a text file to PDF format on Linux.md @@ -0,0 +1,45 @@ +Linux FAQs with Answers--How to convert a text file to PDF format on Linux +Linux 有问必答 --如何在Linux上将文本文件转换成PDF格式 +================================================================================ +> **提问**: 我想要将一个纯文本文件转换成PDF文档。是否有一个简单的方法在Linux命令行下将文本文件转换成PDF文件? + +当你有一打文本文件要维护的时候,把它们转换成PDF文档有一些好处。比如,PDF对打印更友好因为PDF文档有预定义布局。除此之外,还可以减少文档被意外修改的风险。 + +要将文本文件转换成PDF格式,你要按照下面的两步。 + +### 准备工作 ### + +首先你要安装两个需要的包。 + +在 Debian、Ubuntu 或者 Linux Mint上: + + $ sudo apt-get install enscript ghostscript + +在 Fedora、CentOS/RHEL上: + + $ sudo yum install enscript ghostscript + +在 Arch Linux上: + + $ sudo pacman -S enscript ghostscript + +### 将文本文件转换成PDF格式 ### + +准备工作完成之后,按照下面的两步从文本文件生成一个PDF文件 + +首先,将文本文件使用enscript命令行工具转换成postscript格式。 + + $ enscript -p output.ps input.txt + +最后将postscript格式文件转换成PDF文件。 + + $ ps2pdf output.ps output.pdf + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/convert-text-to-pdf-linux.html + +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file From f23036007f7a525a7fad4e1962cabbe4558d433f Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 19 Nov 2014 13:43:51 +0800 Subject: [PATCH 229/316] Update 20141118 How to boot on an ISO image from Grub.md --- sources/tech/20141118 How to boot on an ISO image from Grub.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141118 How to boot on an ISO image from Grub.md b/sources/tech/20141118 How to boot on an ISO image from Grub.md index b4ba81d530..92fc2f51ad 100644 --- a/sources/tech/20141118 How to boot on an ISO image from Grub.md +++ b/sources/tech/20141118 How to boot on an ISO image from Grub.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How to boot on an ISO image from Grub ================================================================================ If you need to use multiple Linux distributions, you do not have so many options. You can either install it, on your machine or in a virtual one, or you can boot on it from an ISO file in live mode. The second option, if less needy in hard drive space, is bothersome as you will need a USB stick or CD to hold the ISO file and boot from. However, there is a third alternative which is a bit of a compromise: have the ISO image on your hard drive, and boot into it in live mode at startup. Less needy in disk space than a full install, and fully functional, this seems to be a good alternative to a slow virtual machine. I will explain how to do this using the popular bootloader Grub. @@ -109,4 +110,4 @@ via: http://xmodulo.com/boot-iso-image-from-grub.html [a]:http://xmodulo.com/author/adrien [1]:http://www.dban.org/ -[2]:https://tails.boum.org/ \ No newline at end of file +[2]:https://tails.boum.org/ From e3cd20adeb8bdb258cccd56a0c1f241da9d073b9 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Wed, 19 Nov 2014 14:29:48 +0800 Subject: [PATCH 230/316] [Translated] 20141118 How to boot on an ISO image from Grub.md --- ...8 How to boot on an ISO image from Grub.md | 113 ------------------ ...8 How to boot on an ISO image from Grub.md | 111 +++++++++++++++++ 2 files changed, 111 insertions(+), 113 deletions(-) delete mode 100644 sources/tech/20141118 How to boot on an ISO image from Grub.md create mode 100644 translated/tech/20141118 How to boot on an ISO image from Grub.md diff --git a/sources/tech/20141118 How to boot on an ISO image from Grub.md b/sources/tech/20141118 How to boot on an ISO image from Grub.md deleted file mode 100644 index 92fc2f51ad..0000000000 --- a/sources/tech/20141118 How to boot on an ISO image from Grub.md +++ /dev/null @@ -1,113 +0,0 @@ -Translating by GOLinux! -How to boot on an ISO image from Grub -================================================================================ -If you need to use multiple Linux distributions, you do not have so many options. You can either install it, on your machine or in a virtual one, or you can boot on it from an ISO file in live mode. The second option, if less needy in hard drive space, is bothersome as you will need a USB stick or CD to hold the ISO file and boot from. However, there is a third alternative which is a bit of a compromise: have the ISO image on your hard drive, and boot into it in live mode at startup. Less needy in disk space than a full install, and fully functional, this seems to be a good alternative to a slow virtual machine. I will explain how to do this using the popular bootloader Grub. - -### What do you need? ### - -Obviously you will need to be using Grub, which is the case on pretty much all modern Linux distributions. You will also need to have an ISO file of the distribution of your choice, downloaded on your hard drive. Finally, you should know where your boot partition is, and how to express it in Grub language. For this, launch: - - # fdisk -l - -and the boot partition is the one with the '*'. For me it's /dev/sda1, which is written (hd0,1) in Grub language. - -![](https://farm6.staticflickr.com/5606/15174383814_a92a4eda3e_z.jpg) - -For reference, sda2 would be (hd0,2), sdb1 would be (hd1,1), etc. (You got the point). - -### What do we edit? ### - -First, open /etc/default/grub and check that the following line: - - #GRUB_HIDDEN_TIMEOUT=0 - -is indeed commented with a '#' in front. - -Save it and then go open /etc/grub.d/40_custom. - -This file will be where you put the arguments to boot on an ISO. The structure is of the form: - - menuentry "[Entry's title in the grub screen]" { - set isofile="[path to ISO file]" - loopback loop [boot partition in Grub language]$isofile - [some specific] arguments - } - -For example, if you wish to boot Ubuntu from an ISO file, you want to append this to your 40_custom file: - - menuentry "Ubuntu 14.04 (LTS) Live Desktop amd64" { - set isofile="/boot/ubuntu-14.04-desktop-amd64.iso" - loopback loop (hd0,1)$isofile - linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash - initrd (loop)/casper/initrd.lz - } - -![](https://farm8.staticflickr.com/7480/15608510369_ff50b28f5e_z.jpg) - -If you would like to launch Gparted instead: - - menuentry "GParted Live amd64" { - set isofile="/boot/gparted-live-0.18.0-2-amd64.iso" - loopback loop (hd0,1)$isofile - loopback loop $isofile - linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt ip=frommedia toram=filesystem.squashfs findiso=${isofile} - initrd (loop)/live/initrd.img - } - -Or even Fedora: - - menuentry "Fedora 20 Live Desktop x86_64" { - set isofile="/boot/Fedora-Live-Desktop-x86_64-20-1.iso" - loopback loop (hd0,1)$isofile - loopback loop $isofile - linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=Fedora-Live-Desktop-x86_64-20-1 rootfstype=auto ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0 iso-scan/filename=${isofile} - initrd (loop)/isolinux/initrd0.img - } - -Note that the arguments will change depending on the distribution. Hopefully, there are a few places where you can start looking. I like this one, but there are plenty of others. Also, take into consideration where you place your ISO files. If your home directory is encrypted or out of reach, you might prefer placing the files in your boot partition like in the example. But make sure that you have enough room first. - -Finally, don't forget to save 40_custom and update grub with: - - # sudo update-grub - -to see your changes appear at the next boot. - -![](https://farm8.staticflickr.com/7480/15795905012_47968033f7_z.jpg) - -### What next? ### - -Want more? Well by playing a bit with the arguments, you can boot on an ISO and have it do something instantly. For example, if you are completely paranoid and wish to have an option to erase your hard drive quickly, it is possible to set up something using [DBAN][1]. Now be really careful as this will wipe your disk without recovery option on startup: - - menuentry "Darik's Boot and Nuke" { - set isofile="/boot/dban.iso" - loopback loop (hd0,1)$isofile - linux (loop)/dban.bzi nuke="dwipe" silent - } - -Alternatively, - - menuentry "Darik's Boot and Nuke" { - set isofile="/boot/dban.iso" - loopback loop (hd0,1)$isofile - linux (loop)/dban.bzi - } - -will show you the DBAN's options and let you choose to wipe your drive. **Be careful as it is still very dangerous**. - -To conclude, there are plenty of things to do with ISO files and Grub: whether you want a quick live session or prefer to destroy everything with the tip of your finger. The next step would be to launch some privacy focused distribution like [Tails][2] for example. - -What do you think of booting on an ISO from Grub? Is it something you would consider doing? And why? Let us know in the comments. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/boot-iso-image-from-grub.html - -作者:[Adrien Brochard][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/adrien -[1]:http://www.dban.org/ -[2]:https://tails.boum.org/ diff --git a/translated/tech/20141118 How to boot on an ISO image from Grub.md b/translated/tech/20141118 How to boot on an ISO image from Grub.md new file mode 100644 index 0000000000..742a0ea773 --- /dev/null +++ b/translated/tech/20141118 How to boot on an ISO image from Grub.md @@ -0,0 +1,111 @@ +用Grub启动ISO镜像 +================================================================================ +如果你需要使用多个Linux发行版,你没有那么多的选项。你可以安装到你的物理机或虚拟机中,也可以以live模式从ISO文件启动。第二个选择,如果对硬盘空间需求更少,就有点麻烦,因为你需要将ISO文件写入到USB棒或CD来启动。但是,这里有另外一个可选的折中方案:把ISO镜像放在硬盘中,然后以live模式来启动。该方案比完全安装更省空间,但是功能完备,这对于缓慢的虚拟机而言是个不错的替代方案。下面我将介绍怎样使用流行的Grub启动加载器来实现该方案。 + + +很明显,你将需要使用到Grub,这是几乎所有现代Linux发行版都使用的。你也需要你所想用的Linux版本的ISO文件,将它下载到本地磁盘。最后,你需要知道启动分区在哪里,并怎样在Grub中描述。对于此,请使用以下命令: + + # fdisk -l + +带有‘*’的就是启动分区。对于我,就是/dev/sda1,用Grub语言描述就是(hd0,1)。 + +![](https://farm6.staticflickr.com/5606/15174383814_a92a4eda3e_z.jpg) + +作为参考,sda2就是(hd0,2),sdb1就是(hd1,1),以此类推。(你明白了吧。) + +### 我们需要编辑什么? ### + +首先,打开/etc/default/grub并检查以下行: + + #GRUB_HIDDEN_TIMEOUT=0 + +需要在此行前添加‘#’进行注释。 + +保存,然后打开/etc/grub.d/40_custom。 + +在该文件中,你将添加启动到ISO的参数。结构如下: + + menuentry "[Entry's title in the grub screen]" { + set isofile="[path to ISO file]" + loopback loop [boot partition in Grub language]$isofile + [some specific] arguments + } + +例如,如果你想要从ISO文件启动Ubuntu,那么你就是想要添加该行到40_custom文件: + + menuentry "Ubuntu 14.04 (LTS) Live Desktop amd64" { + set isofile="/boot/ubuntu-14.04-desktop-amd64.iso" + loopback loop (hd0,1)$isofile + linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash + initrd (loop)/casper/initrd.lz + } + +![](https://farm8.staticflickr.com/7480/15608510369_ff50b28f5e_z.jpg) + +如果你想要启动Gparted: + + menuentry "GParted Live amd64" { + set isofile="/boot/gparted-live-0.18.0-2-amd64.iso" + loopback loop (hd0,1)$isofile + loopback loop $isofile + linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt ip=frommedia toram=filesystem.squashfs findiso=${isofile} + initrd (loop)/live/initrd.img + } + +或者甚至是Fedora: + + menuentry "Fedora 20 Live Desktop x86_64" { + set isofile="/boot/Fedora-Live-Desktop-x86_64-20-1.iso" + loopback loop (hd0,1)$isofile + loopback loop $isofile + linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=Fedora-Live-Desktop-x86_64-20-1 rootfstype=auto ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0 iso-scan/filename=${isofile} + initrd (loop)/isolinux/initrd0.img + } + +注意,参数可根据发行版进行修改。有幸的是,有许多地方你可以查阅。我喜欢这一个,但是还有很多其它的。同时,请考虑你放置ISO文件的地方。如果你的家目录被加密或者无法被访问到,你可能更喜欢将这些文件放到像例子中的启动分区。但是,请首先确保有足够的空间。 + +最后,不要忘了保存40_custom文件并使用以下命令来更新grub: + + # sudo update-grub + +以便在下次启动时看到修改。 + +![](https://farm8.staticflickr.com/7480/15795905012_47968033f7_z.jpg) + +### 接下来做什么? ### + +想要更多东西?好吧,那就修改下参数来玩玩。你可以启动一个ISO文件,并让它持续做一些事情。例如,如果你是个彻头彻尾的妄想症患者,想要有个可以快速清除硬盘的选项,那么可以使用[DBAN][1]来进行一些设置。现在,真的要当心啊,因为此设置会清除你的硬盘,而且在启动时也没有恢复选项: + + menuentry "Darik's Boot and Nuke" { + set isofile="/boot/dban.iso" + loopback loop (hd0,1)$isofile + linux (loop)/dban.bzi nuke="dwipe" silent + } + +另外一个选择 + + menuentry "Darik's Boot and Nuke" { + set isofile="/boot/dban.iso" + loopback loop (hd0,1)$isofile + linux (loop)/dban.bzi + } + +可以显示DBAN选项,让你选择清除驱动器。**当心,因为它仍然十分危险**。 + +小结一下,对于ISO文件和Grub有很多事情可做:从快速live会话到用你的指尖来破坏一切,都可以满足你。下一步是启动一些关注隐私的发行版如[Tails][2]。 + +你认为从Grub启动一个ISO这个主意怎样?这是不是你想要做的呢?为什么呢?请在下面留言。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/boot-iso-image-from-grub.html + +作者:[Adrien Brochard][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/adrien +[1]:http://www.dban.org/ +[2]:https://tails.boum.org/ From 40c82c77c78bd2c8898c9f60696dffd688cd0ae9 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 19 Nov 2014 15:35:06 +0800 Subject: [PATCH 231/316] =?UTF-8?q?20141119-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nitoring & Analysis tool for Hard drive.md | 226 ++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 sources/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md diff --git a/sources/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md b/sources/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md new file mode 100644 index 0000000000..c086e135ce --- /dev/null +++ b/sources/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md @@ -0,0 +1,226 @@ +Smartctl – Monitoring & Analysis tool for Hard drive +================================================================================ +**Smartctl** (Self-Monitoring, Analysis and Reporting Technology) is a command line utility or a tool in UNIX like operating system that perform SMART tasks such as printing the SMART **self-test** and **error logs**, enabling and disabling SMART **automatic testing**, and initiating device self-tests. + +Smartctl is useful on physical Linux servers where smart disks can be checked for errors and extract info regarding the disks that are used behind the **Hardware RAID**. + +In this post we will discuss some practical examples of smartctl command, Use below steps to install smartctl , if it is not installed on your linux box. + +### Installation of Smartcl in Ubuntu ### + + $ sudo apt-get install smartmontools + +### Installation of Smartcl in Redhat / CentOS ### + + # yum install smartmontools + +**Start the Smartctl Service** + +**For Ubuntu** + + $ sudo /etc/init.d/smartmontools start + +**For CentOS & RHEL** + + # service smartd start ; chkconfig smartd on + +**Example:1 Check Whether Smart Capability is enabled or not for the disk** + + root@linuxtechi:~# smartctl -i /dev/sdb + smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) + Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org + + === START OF INFORMATION SECTION === + Model Family: Seagate Momentus 5400.6 + Device Model: ST9320325AS + Serial Number: 5VD2V59T + LU WWN Device Id: 5 000c50 020a37ec4 + Firmware Version: 0002BSM1 + User Capacity: 320,072,933,376 bytes [320 GB] + Sector Size: 512 bytes logical/physical + Rotation Rate: 5400 rpm + Device is: In smartctl database [for details use: -P show] + ATA Version is: ATA8-ACS T13/1699-D revision 4 + SATA Version is: SATA 2.6, 1.5 Gb/s + Local Time is: Sun Nov 16 12:32:09 2014 IST + SMART support is: Available - device has SMART capability. + SMART support is: Enabled + +Where ‘/dev/sdb’ is your hard disk. Last Two lines in above output shows that SMART capability is enable for the device. + +**Example:2 Enable Smart Capability for the disk** + + root@linuxtechi:~# smartctl -s on /dev/sdb + smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) + Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org + + === START OF ENABLE/DISABLE COMMANDS SECTION === + SMART Enabled. + +**Example:3 Disable Smart Capability for the disk** + + root@linuxtechi:~# smartctl -s off /dev/sdb + smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) + Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org + + === START OF ENABLE/DISABLE COMMANDS SECTION === + SMART Disabled. Use option -s with argument 'on' to enable it. + +**Example:4 Display Detailed Smart info for the disk** + + root@linuxtechi:~# smartctl -a /dev/sdb // For IDE drive + root@linuxtechi:~# smartctl -a -d ata /dev/sdb // For SATA drive + +**Example:5 Display Overall health of the Disk** + + root@linuxtechi:~# smartctl -H /dev/sdb + smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) + Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org + + === START OF READ SMART DATA SECTION === + SMART overall-health self-assessment test result: PASSED + Warning: This result is based on an Attribute check. + Please note the following marginal Attributes: + ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE + 190 Airflow_Temperature_Cel 0x0022 067 045 045 Old_age Always In_the_past 33 (Min/Max 25/33) + +**Example:6 Test Hard drive using long & short option.** + +Long Test + + root@linuxtechi:~# smartctl --test=long /dev/sdb + smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) + Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org + + === START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION === + Sending command: "Execute SMART Extended self-test routine immediately in off-line mode". + Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful. + Testing has begun. + Please wait 102 minutes for test to complete. + Test will complete after Sun Nov 16 14:29:43 2014 + + Use smartctl -X to abort test. + +OR We can redirect test output to a log file , as shown below + + root@linuxtechi:~# smartctl --test=long /dev/sdb > /var/log/long.text + +**Short Test** + + root@linuxtechi:~# smartctl --test=short /dev/sdb + smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) + Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org + + === START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION === + Sending command: "Execute SMART Short self-test routine immediately in off-line mode". + Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful. + Testing has begun. + Please wait 1 minutes for test to complete. + Test will complete after Sun Nov 16 12:51:45 2014 + + Use smartctl -X to abort test. + +OR + + root@linuxtechi:~# smartctl --test=short /dev/sdb > /var/log/short.text + +**Note** : Short test will take maximum 2 minutes whereas in long test there is no time restriction because it read & verify every segment of the entire disk. + +**Example:7 To View Drive’s Self Test result ** + + root@linuxtechi:~# smartctl -l selftest /dev/sdb + smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) + Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org + + === START OF READ SMART DATA SECTION === + SMART Self-test log structure revision number 1 + Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error + # 1 Short offline Completed: read failure 90% 492 210841222 + # 2 Extended offline Completed: read failure 90% 492 210841222 + +**Example:8 Calculate Estimate time to perform test** + + root@linuxtechi:~# smartctl -c /dev/sdb + smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) + Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org + + === START OF READ SMART DATA SECTION === + General SMART Values: + Offline data collection status: (0x00) Offline data collection activity + was never started. + Auto Offline Data Collection: Disabled. + Self-test execution status: ( 121) The previous self-test completed having + the read element of the test failed. + Total time to complete Offline + data collection: ( 0) seconds. + Offline data collection + capabilities: (0x73) SMART execute Offline immediate. + Auto Offline data collection on/off support. + Suspend Offline collection upon new + command. + No Offline surface scan supported. + Self-test supported. + Conveyance Self-test supported. + Selective Self-test supported. + SMART capabilities: (0x0003) Saves SMART data before entering + power-saving mode. + Supports SMART auto save timer. + Error logging capability: (0x01) Error logging supported. + General Purpose Logging supported. + Short self-test routine + recommended polling time: ( 1) minutes. + Extended self-test routine + recommended polling time: ( 102) minutes. + Conveyance self-test routine + recommended polling time: ( 2) minutes. + SCT capabilities: (0x103b) SCT Status supported. + SCT Error Recovery Control supported. + SCT Feature Control supported. + SCT Data Table supported. + +**Example:9 Display Error logs of the disk ** + + root@linuxtechi:~# smartctl -l error /dev/sdb + + Sample Output + + smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) + Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org + + === START OF READ SMART DATA SECTION === + SMART Error Log Version: 1 + ATA Error Count: 5 + CR = Command Register [HEX] + FR = Features Register [HEX] + SC = Sector Count Register [HEX] + SN = Sector Number Register [HEX] + CL = Cylinder Low Register [HEX] + CH = Cylinder High Register [HEX] + DH = Device/Head Register [HEX] + DC = Device Command Register [HEX] + ER = Error register [HEX] + ST = Status register [HEX] + Powered_Up_Time is measured from power on, and printed as + DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes, + SS=sec, and sss=millisec. It "wraps" after 49.710 days. + + Commands leading to the command that caused the error were: + CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name + -- -- -- -- -- -- -- -- ---------------- -------------------- + 25 da 08 e7 e5 a5 4c 00 00:30:44.515 READ DMA EXT + 25 da 08 df e5 a5 4c 00 00:30:44.514 READ DMA EXT + 25 da 80 5f e5 a5 4c 00 00:30:44.502 READ DMA EXT + 25 da f0 5f e6 a5 4c 00 00:30:44.496 READ DMA EXT + 25 da 10 4f e6 a5 4c 00 00:30:44.383 READ DMA EXT + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/smartctl-monitoring-analysis-tool-hard-drive/ + +作者:[Pradeep Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file From 4c66073e1bec2e9b477622536afb8889bc08aa69 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 19 Nov 2014 15:44:27 +0800 Subject: [PATCH 232/316] =?UTF-8?q?20141119-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...119 Qshutdown--An avanced shutdown tool.md | 47 ++++++++ ...20141119 When Microsoft Went A-Courting.md | 106 ++++++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 sources/share/20141119 Qshutdown--An avanced shutdown tool.md create mode 100644 sources/talk/20141119 When Microsoft Went A-Courting.md diff --git a/sources/share/20141119 Qshutdown--An avanced shutdown tool.md b/sources/share/20141119 Qshutdown--An avanced shutdown tool.md new file mode 100644 index 0000000000..96d1aa319b --- /dev/null +++ b/sources/share/20141119 Qshutdown--An avanced shutdown tool.md @@ -0,0 +1,47 @@ +Qshutdown – An avanced shutdown tool +================================================================================ +qshutdown is a Qt program to shutdown/reboot/suspend/hibernate the computer at a given time or after a certain number of minutes. It shows the time until the corresponding request is send to either the Gnome- or KDE-session-manager, to HAL or to DeviceKit and if none of these works the command ‘sudo shutdown -P now' is used. This program may be useful for people who want to work with the computer only for a certain time. + +qshutdown will show it self 3 times as a warning if there are less than 70 seconds left. (if 1 Minute or local time +1 Minute was set it’ll appear only once.) + +This program uses qdbus to send a shutdown/reboot/suspend/hibernate request to either the gnome- or kde-session-manager, to HAL or to DeviceKit and if none of these works, the command ’sudo shutdown’ will be used (note that when sending the request to HAL or DeviceKit, or the shutdown command is used, the Session will never be saved. If the shutdown command is used, the program will only be able to shutdown and reboot). So if nothing happens when the shutdown- or reboot-time is reached, it means that one lacks the rights for the shutdown command. + +In this case one can do the following: + +Post the following in a terminal: "EDITOR:nano sudo -E visudo" and add this line: "* ALL = NOPASSWD:/sbin/shutdown" whereas * replaces the username or %groupname. + +Configurationfile qshutdown.conf + +The maximum Number of countdown_minutes is 1440 (24 hours).The configurationfile (and logfile) is located at ~/.qshutdown + +For admins: + +With the option Lock_all in qshutdown.conf set to true the user won’t be able to change any settings. If you change the permissions of qshutdown.conf with "sudo chown root -R ~/.qshutdown" and "sudo chmod 744 ~/.qshutdown/qshutdown.conf", the user won’t be able to change anything in the configurationfile. + +### Install Qshutdown in Ubuntu ### + +Open the terminal and run the following command + + sudo apt-get install qshutdown + +### Screenshots ### + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/12.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/23.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/31.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/41.png) + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/qshutdown-an-avanced-shutdown-tool.html + +作者:[ruchi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file diff --git a/sources/talk/20141119 When Microsoft Went A-Courting.md b/sources/talk/20141119 When Microsoft Went A-Courting.md new file mode 100644 index 0000000000..768f327b83 --- /dev/null +++ b/sources/talk/20141119 When Microsoft Went A-Courting.md @@ -0,0 +1,106 @@ +When Microsoft Went A-Courting +================================================================================ +![](http://www.linuxinsider.com/ai/769827/microsoft-linux-open-source.jpg) + +**Open-sourcing .Net "doesn't have a thing to do with Linux -- it has to do with SaaS and having a CEO that isn't a whackadoo living in the 90s," said SoylentNews blogger hairyfeet. "Nadella is smart and realizes the value of a programming language is not patents or OS exclusivity but in services and support for the language. ... The more platforms the language can be used on, the better."** + +Fans of free and open source software perhaps may be excused if they've felt a bit confused over the past few days. Dizziness, headaches and vertigo also have been common. + +What strange new ailment is this, you might ask? + +Well, it's no ailment, Linux Girl is glad to report. That, however, doesn't mean it's any simpler to remedy. + +The cause, it turns out, is none other than the news that Microsoft is open sourcing .Net and also expanding it to run on Linux and Mac OS. + +Yes, you heard that right: Steve Ballmer once may have [called Linux a "cancer,"][1] but today Redmond has a newfound "[love" for Linux][2] that can't be contained! + +It's making Microsoft behave in strange new ways -- and it's also driving FOSS fans to the blogosphere's seedy Broken Windows Lounge in greater numbers than ever. + +Can tequila help make sense of it all? That's one of many questions now being investigated. + +### 'A Chance to Thrive' ### + +"This is big news, and somewhat overdue," Chris Travers, a [blogger][3] who works on the [LedgerSMB][4] project, told Linux Girl. + +![](http://www.linuxinsider.com/images/article_images/linuxgirl_bg_pinkswirl_150x245.jpg) + +"We live in a world where new programming languages which are open sourced thrive even without being backed by big businesses, and closed source programming languages only survive with help from big businesses," Travers said. "Bing closed source killed REBOL 2.x," for example. + +"This move has clearly been in the works for some time -- a large company like Microsoft does not open source something of this complexity overnight -- and I think to some extent Microsoft must have seen the writing on the wall when Sun open sourced the OpenJDK," he suggested. + +Meanwhile, "this gives languages like C# and F# a chance to thrive well beyond their current markets," Travers said. + +### 'I Still Don't Trust You' ### + +"I want to be the first to say, 'Thank you Microsoft!'" [Linux Rants][5] blogger Mike Stone began. "We really appreciate you open sourcing .Net and taking it cross platform. It's a step in the right direction! + +"I still don't trust you, though," he added. + +"I love that Microsoft is considering open source, but I have seen no movement towards the GPL," Stone told Linux Girl. "This strikes me as an opportunity to get their software on multiple platforms but tie the developers down to Microsoft." + +Moreover, there are no guarantees that Microsoft will keep .Net open source over the years, he pointed out. + +"That means that Microsoft could withdraw and leave all applications developed with the intention of being cross platform legally Windows-only," he warned. "I won't put any faith in Microsoft's commitment, and I'll always be looking for their sudden but inevitable betrayal." + +### 'Watch for Greeks Bearing Gifts' ### + +The move reeks of desperation, Google+ blogger Alessandro Ebersol suggested. + +"They arrived too late," Ebersol said. "Java already ate the best dishes, and while .Net was a Windows/Microsoft-only thing, Java was everywhere. Good luck trying to be adopted." + +Besides, "I would only believe it if it was GPL'ed to protect the creators of the code," he added. "A fragile MIT license can be overturned at anytime." + +In any case, "with all the hatred the company generated towards the FLOSS community, they burned the bridge beyond repair," Ebersol concluded. "The bottom line: Timeo Danaos et dona ferentes -- Watch carefully for Greeks bearing gifts..." + +### 'Like a Cat Loves Mice' ### + +Microsoft loves Linux "like a cat loves mice," blogger [Robert Pogson][6] quipped. "Sure, they will play with */Linux, but they are not our friends." + +What's happened is that the FOSS and Linux communities have defeated "all the barriers to entry that M$ placed in the way of competition since M$ first made a deal with IBM to supply an OS," Pogson said. "You bet M$ is trying desperately to 'make friends' with 'the enemy' now that their position is overrun. + +"It's all good," he added. "M$ can still cause a lot of trouble by spending $billions foolishly or they can become a normal business and compete on price/performance. That's not 'love' -- that's accepting reality." + +### Adapt or Die ### + +The problem for Microsoft is that "open source development packages are starting to get good enough for developers," offered consultant and [Slashdot][7] blogger Gerhard Mack. + +"At my last job, most of the programmers wanted Eclipse rather than Visual Studio, even though the client software was Windows-only, and I had a slowly increasing number move their development to Linux while using Windows for testing," Mack recalled. + +"Very few people want to be locked into just one platform, so more of the mindshare is moving away from single-platform languages," he added. "Microsoft must now choose between adapting or dying." + +### No Warm Fuzzies Here ### + +art of what's driving the move is also that "the various cloud implementations are very heavily Linux, and even on Microsoft's own Azure cloud, Linux is a strong presence," Google+ blogger Kevin O'Brien suggested. + +"Nadella has made it clear he is taking Microsoft in a cloud direction, so he almost has to do this to even stay in the game," O'Brien asserted. + +That said, however, "I don't expect Microsoft to be cuddly and nice -- they will do whatever they think is in their best corporate interest," he said. + +In fact, "it doesn't have a thing to do with Linux -- it has to do with SaaS and having a CEO that isn't a whackadoo living in the 90s," SoylentNews blogger hairyfeet told Linux Girl. + +"Nadella is smart and realizes the value of a programming language is not patents or OS exclusivity but in services and support for the language," hairyfeet explained. "With that in mind, the more platforms the language can be used on, the better, as that adds value to the language and will give you that many more you can sell services to." + +### The Fall of an Empire ### + +ll in all, if anything is clear, it's that "Micro$oft's empire is tumbling down," said Google+ blogger Gonzalo Velasco C. + +"I don't know or care about why they are lying and saying they love Linux," he added. "I just hope the GNU/Linux community is smarter than recently (cough, Systemd, cough) and refuses Micro$oft .Net and other infections. GNU/Linux must use only FLOSS tools." + +-------------------------------------------------------------------------------- + +via: http://www.linuxinsider.com/story/When-Microsoft-Went-A-Courting-81374.html + +作者:[Katherine Noyes][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://twitter.com/noyesk +[1]:http://www.linuxinsider.com/perl/story/35697.html +[2]:http://www.theregister.co.uk/2014/10/20/microsoft_cloud_event/ +[3]:http://ledgersmbdev.blogspot.com/ +[4]:http://www.ledgersmb.org/ +[5]:http://linuxrants.com/ +[6]:http://mrpogson.com/ +[7]:http://slashdot.org/ \ No newline at end of file From 7b589f06d275b8d32e28bd8a15fbdbe527f12fa9 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 19 Nov 2014 16:20:57 +0800 Subject: [PATCH 233/316] =?UTF-8?q?20141119-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...s to Transfer Files or Folders in Linux.md | 238 ++++++++++++++++++ ... Raspberry Pi Boot In To GUI By Default.md | 61 +++++ 2 files changed, 299 insertions(+) create mode 100644 sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md create mode 100644 sources/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md diff --git a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md new file mode 100644 index 0000000000..1042c67783 --- /dev/null +++ b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md @@ -0,0 +1,238 @@ +10 SCP Commands to Transfer Files/Folders in Linux +================================================================================ +Linux administrator should be familiar with **CLI** environment. Since **GUI** mode in Linux servers is not a common to be installed. **SSH** may the most popular protocol to enable Linux administrator to manage the servers via remote in secure way. Built-in with **SSH** command there is **SCP** command. **SCP** is used to copy file(s) between servers in secure way. + +![](http://www.tecmint.com/wp-content/uploads/2013/10/SCP-Commands.png) + +The below command will read as “**copy source_file_name**” into “**destination_folder**” at “**destination_host**” using “**username account**”. + +#### Basic syntax of SCP #### + + scp source_file_name username@destination_host:destination_folder + +There are much parameters in **SCP** command that you can use. Here are the parameters that may useful on daily basis usage. + +### Provide the detail information of SCP process using -v parameter ### + +Basic **SCP** command without parameter will copy the files in background. User will see nothing unless the process is done or some error appears. You can use “**-v**” parameter to print debug information into the screen. It can help you debugging connection, authentication and configuration problems. + + pungki@mint ~/Documents $ scp -v Label.pdf mrarianto@202.x.x.x:. + +#### Sample Output #### + + Executing: program /usr/bin/ssh host 202.x.x.x, user mrarianto, command scp -v -t . + OpenSSH_6.0p1 Debian-3, OpenSSL 1.0.1c 10 May 2012 + debug1: Reading configuration data /etc/ssh/ssh_config + debug1: /etc/ssh/ssh_config line 19: Applying options for * + debug1: Connecting to 202.x.x.x [202.x.x.x] port 22. + debug1: Connection established. + debug1: Host '202.x.x.x' is known and matches the RSA host key. + debug1: Found key in /home/pungki/.ssh/known_hosts:1 + debug1: ssh_rsa_verify: signature correct + debug1: Next authentication method: password + mrarianto@202.x.x.x's password: + debug1: Authentication succeeded (password). + Authenticated to 202.x.x.x ([202.x.x.x]:22). + Sending file modes: C0770 3760348 Label.pdf + Sink: C0770 3760348 Label.pdf + Label.pdf 100% 3672KB 136.0KB/s 00:27 + Transferred: sent 3766304, received 3000 bytes, in 65.2 seconds + Bytes per second: sent 57766.4, received 46.0 + debug1: Exit status 0 + +### Provide modification times, access times, and modes from original files ### + +The “**-p**” parameter will help you on this. An estimated time and the connection speed will appear on the screen. + + pungki@mint ~/Documents $ scp -p Label.pdf mrarianto@202.x.x.x:. + +#### Sample Output #### + + mrarianto@202.x.x.x's password: + Label.pdf 100% 3672KB 126.6KB/s 00:29 + +### Make file transfer faster using -C parameter ### + +One of parameter that can faster your file transfer is “**-C**” parameter. The “**-C**” parameter will compress your files on the go. The unique thing is the compression is only happen in the network. When the file is arrived to the destination server, it will returning into the original size as before the compression happen. + +Take a look of these commands. It is using a single file of **93 Mb**. + + pungki@mint ~/Documents $ scp -pv messages.log mrarianto@202.x.x.x:. + +#### Sample Output #### + + Executing: program /usr/bin/ssh host 202.x.x.x, user mrarianto, command scp -v -p -t . + OpenSSH_6.0p1 Debian-3, OpenSSL 1.0.1c 10 May 2012 + debug1: Reading configuration data /etc/ssh/ssh_config + debug1: /etc/ssh/ssh_config line 19: Applying options for * + debug1: Connecting to 202.x.x.x [202.x.x.x] port 22. + debug1: Connection established. + debug1: identity file /home/pungki/.ssh/id_rsa type -1 + debug1: Found key in /home/pungki/.ssh/known_hosts:1 + debug1: ssh_rsa_verify: signature correct + debug1: Trying private key: /home/pungki/.ssh/id_rsa + debug1: Next authentication method: password + mrarianto@202.x.x.x's password: + debug1: Authentication succeeded (password). + Authenticated to 202.x.x.x ([202.x.x.x]:22). + debug1: Sending command: scp -v -p -t . + File mtime 1323853868 atime 1380425711 + Sending file timestamps: T1323853868 0 1380425711 0 + messages.log 100% 93MB 58.6KB/s 27:05 + Transferred: sent 97614832, received 25976 bytes, in 1661.3 seconds + Bytes per second: sent 58758.4, received 15.6 + debug1: Exit status 0 + +Copying file without “**-C**” parameter will result **1661.3** second. Yo may compare the result to the command below which using “**-C**” parameter. + + pungki@mint ~/Documents $ scp -Cpv messages.log mrarianto@202.x.x.x:. + +#### Sample Output #### + + Executing: program /usr/bin/ssh host 202.x.x.x, user mrarianto, command scp -v -p -t . + OpenSSH_6.0p1 Debian-3, OpenSSL 1.0.1c 10 May 2012 + debug1: Reading configuration data /etc/ssh/ssh_config + debug1: /etc/ssh/ssh_config line 19: Applying options for * + debug1: Connecting to 202.x.x.x [202.x.x.x] port 22. + debug1: Connection established. + debug1: identity file /home/pungki/.ssh/id_rsa type -1 + debug1: Host '202.x.x.x' is known and matches the RSA host key. + debug1: Found key in /home/pungki/.ssh/known_hosts:1 + debug1: ssh_rsa_verify: signature correct + debug1: Next authentication method: publickey + debug1: Trying private key: /home/pungki/.ssh/id_rsa + debug1: Next authentication method: password + mrarianto@202.x.x.x's password: + debug1: Enabling compression at level 6. + debug1: Authentication succeeded (password). + Authenticated to 202.x.x.x ([202.x.x.x]:22). + debug1: channel 0: new [client-session] + debug1: Sending command: scp -v -p -t . + File mtime 1323853868 atime 1380428748 + Sending file timestamps: T1323853868 0 1380428748 0 + Sink: T1323853868 0 1380428748 0 + Sending file modes: C0600 97517300 messages.log + messages.log 100% 93MB 602.7KB/s 02:38 + Transferred: sent 8905840, received 15768 bytes, in 162.5 seconds + Bytes per second: sent 54813.9, received 97.0 + debug1: Exit status 0 + debug1: compress outgoing: raw data 97571111, compressed 8806191, factor 0.09 + debug1: compress incoming: raw data 7885, compressed 3821, factor 0.48 + +As you can see, when you are using compression, transfer process is done in **162.5** second. It is **10** times faster than not using “**-C**” parameter. If you are copying a lot files across the network, “**-C**” parameter would help you to decrease the total time you need. + +The thing that we should notice that compression method will not work on any files. When the source file is already compressed, you will not find any improvement there. Files such as **.zip**, **.rar**, **pictures**, and **.iso** files will not affected by “**-C**” parameter. + +### Select another cipher to encrypt files ### + +By default **SCP** using “**AES-128**” to encrypt files. If you want to change to another cipher to encrypt it, you can use “**-c**” parameter. Take a look of this command. + + pungki@mint ~/Documents $ scp -c 3des Label.pdf mrarianto@202.x.x.x:. + + mrarianto@202.x.x.x's password: + Label.pdf 100% 3672KB 282.5KB/s 00:13 + +Above command tell **SCP** to use **3des algorithm** to encrypt file. Please be careful that this parameter using “**-c**” not “**-C**“. + +### Limiting bandwidth usage ### + +Another parameter that may useful is “**-l**” parameter. The “**-l**” parameter will limit the bandwidth to use. It will be useful if you do an automation script to copy a lot of file, but you don’t want the bandwidth is drained by the **SCP** process. + + pungki@mint ~/Documents $ scp -l 400 Label.pdf mrarianto@202.x.x.x:. + + mrarianto@202.x.x.x's password: + Label.pdf 100% 3672KB 50.3KB/s 01:13 + +The **400** value behind “**-l**” parameter is mean that we limit the bandwidth for **SCP** process only **50 KB/sec**. One thing to remember that bandwidth is specified in **Kilobits/sec** (**kbps**). It is mean that **8 bits** equal with **1 byte**. + +While **SCP** counts in **Kilobyte/sec** (**KB/s**). So if you want to limit your bandwidth for **SCP** maximum only **50 KB/s**, you need to set it into **50 x 8 = 400**. + +### Specify specific port to use with SCP ### + +Usually **SCP** is using port **22** as a default port. But for security reason, you may change the port into another port. For example, we are using port **2249**. Then the command should be like this. + + pungki@mint ~/Documents $ scp -P 2249 Label.pdf mrarianto@202.x.x.x:. + + mrarianto@202.x.x.x's password: + Label.pdf 100% 3672KB 262.3KB/s 00:14 + +Make sure that it use capital “**P**” not “**p**“, since “**p**” is already used for preserved times and modes. + +### Copy files inside directory recursively ### + +Sometimes we need to copy directory and all **files** / **directories** inside it. It will be better if we can do it in **1** command. **SCP** support that scenario using “**-r**” parameter. + + pungki@mint ~/Documents $ scp -r documents mrarianto@202.x.x.x:. + + mrarianto@202.x.x.x's password: + Label.pdf 100% 3672KB 282.5KB/s 00:13 + scp.txt 100% 10KB 9.8KB/s 00:00 + +When the copy process is done, at the destination server you will found a directory named “**documents**” with all it’s files. The folder “**documents**” is automatically created. + +### Disable progress meter and warning / diagnostic message ### + +If you choose not to see progress meter and warning / diagnostic messages from SCP, you may disable it using “**-q**” parameter. Here’s the example. + + pungki@mint ~/Documents $ scp -q Label.pdf mrarianto@202.x.x.x:. + + mrarianto@202.x.x.x's password: + pungki@mint ~/Documents $ + +As you can see, after the you enter the password, there is no any information about SCP process. After the process is complete, you will be see a prompt again. + +### Copy files using SCP through Proxy ### + +Proxy server is usually used in office environment. Natively, SCP is not proxy configured. When your environment using proxy, you have to “tell” SCP to communicate with the proxy. + +Here’s the scenario. The proxy address is **10.0.96.6** and the proxy port is **8080**. The proxy also implemented user authentication. First, you need to create “**~/.ssh/config**” file. Second you put this command inside it. + + ProxyCommand /usr/bin/corkscrew 10.0.96.6 8080 %h %p ~/.ssh/proxyauth + +Then you need to create file “**~/.ssh/proxyauth**” which contain. + + myusername:mypassword + +After that you can do SCP transparently as usual. + +Please notice that corkscrew is might not installed yet on your system. On my Linux Mint, I need to install it first, using standard Linux Mint installation procedure. + + $ apt-get install corkscrew + +For other yum based systems, users can install corkscrew using the following yum command. + + # yum install corkscrew + +Another thing that since “**~/.ssh/proxyauth**” file contain your “**username**” and “**password**” in clear-text format, please make sure that the file can be accessed by you only. + +### Select different ssh_config file ### + +For mobile user who often switch between company network and public network, it will be suffer to always change settings in SCP. It is better if we can put a different **ssh_config** file to match our needs. + +#### Here’s a sample scenario #### + +Proxy is used in company network but not in public network and you are regularly switch network. + + pungki@mint ~/Documents $ scp -F /home/pungki/proxy_ssh_config Label.pdf + + mrarianto@202.x.x.x:. + mrarianto@202.x.x.x's password: + Label.pdf 100% 3672KB 282.5KB/s 00:13 + +By default “**ssh_config**” file per user will be placed in “**~/.ssh/config**“. Creating a specific “**ssh_config**” file with proxy compatible, will make you easier to switch between networks. + +When you are on company network, you can use “**-F**” parameter. When you are on public network, you can skip “**-F**” parameter. + +That’s all about **SCP**. You can see **man pages** of **SCP** for more detail. Please feel free to leave comments and suggestions. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/scp-commands-examples/ + +作者:[Pungki Arianto][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/pungkiarianto/ \ No newline at end of file diff --git a/sources/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md b/sources/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md new file mode 100644 index 0000000000..3340ef1b08 --- /dev/null +++ b/sources/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md @@ -0,0 +1,61 @@ +How To Make Raspberry Pi Boot In To GUI By Default +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/raspberry_pi_gui.jpg) + +It’s been some times since I bought Raspberry Pi but honestly, I hardly did anything with it. Since my Dell Ultrabook is in Dell service center (for weeks now), I started using Raspberry Pi once again as an alternative. + +I have previously written about [how to install Raspbian OS on a SD card in Ubuntu][1]. I did the same once again and installed Raspberry Pi once again. Only thing which I missed at the first run was to set up the GUI. And thus when I booted in Raspberry Pi again, I landed in command line directly. So how to you run Raspbian GUI then? + +### Set up Raspbian GUI boot ### + +When you install Raspbian for the first time, it indeed present several option to configure for the first use. But since I did not pay attention in a hurry, I just tabbed finish on that screen. If you faced the same situation and end up with just command line in Raspbian OS, no need to despair, it is very easy to set up Raspberry Pi to boot in GUI by default. Let’s see how to do it. + +### Step 1: ### + +When you are in the command line, log in with default user password (if you did not change it). Default user for Raspbian OS is pi and the default password should be raspberry. + +#### Step 2: #### + +When you are logged in, run the following command: + + sudo raspi-config + +This command will open up the Raspberry Pi configuration, the same which we saw in the first boot. + +#### Step 3: #### + +In this configuration screen, look for the option of **Enable Boot to Desktop/Scratch**. Select it using a combination of arrow, tab and/or enter keys (I forgot which ones are used). + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/Raspbian_Gui_setup.jpg) + +#### Step 4: #### + +In the next screen, choose **Desktop Login as user ‘Pi’ at the graphical desktop. +** + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/Raspbian_Gui_setup_1.jpg) + +#### Step 5: #### + +You’ll be asked to reboot afterwards. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/Raspbian_Gui_setup_2.jpg) + +On the next boot, you will be logged in to LXDE desktop environment. And you can enjoy the GUI experience with Raspberry Pi. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/raspbian-welcome-screen-gui.jpeg) + +I hope this tutorial helped you to set up your Raspberry Pi to boot in GUI by default. Feel free to drop your questions and suggestions in the comment box. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/raspberry-pi-gui-boot/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/Abhishek/ +[1]:http://itsfoss.com/tutorial-how-to-install-raspberry-pi-os-raspbian-wheezy/ \ No newline at end of file From e0dec2fc5d62860b1d2ba7195a96700a7298d64c Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 18 Nov 2014 23:46:42 +0800 Subject: [PATCH 234/316] PUB:20141014 Linux FAQs with Answers--How to change default location of libvirt VM images @geekpi --- ...--How to change default location of libvirt VM images.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20141014 Linux FAQs with Answers--How to change default location of libvirt VM images.md (95%) diff --git a/translated/tech/20141014 Linux FAQs with Answers--How to change default location of libvirt VM images.md b/published/20141014 Linux FAQs with Answers--How to change default location of libvirt VM images.md similarity index 95% rename from translated/tech/20141014 Linux FAQs with Answers--How to change default location of libvirt VM images.md rename to published/20141014 Linux FAQs with Answers--How to change default location of libvirt VM images.md index 71570e40f0..af4b02c606 100644 --- a/translated/tech/20141014 Linux FAQs with Answers--How to change default location of libvirt VM images.md +++ b/published/20141014 Linux FAQs with Answers--How to change default location of libvirt VM images.md @@ -1,4 +1,4 @@ -Linux 有问必答 -- 如何改变libvirt VM镜像的默认位置 +Linux 有问必答:如何改变libvirt VM镜像的默认位置 ================================================================================ > **提问**: 我使用libvirt和virt-manager在我的Linux系统上创建虚拟机。我注意到虚拟机镜像位于/var/lib/libvirt/images目录。有没有办法改变虚拟机镜像的默认路径? @@ -16,7 +16,7 @@ Linux 有问必答 -- 如何改变libvirt VM镜像的默认位置 ![](https://farm4.staticflickr.com/3935/15433062592_0d89a8d132_o.png) -你可以看到如下所是的默认存储池。在窗口的左下角,点击叉形按钮,将会停止默认的存储池。存储池一旦停止后,点击右边的垃圾桶,将会删除存储池。注意这个动作不会删除池中的镜像。 +你可以看到如下所是的默认存储池。在窗口的左下角,点击叉形按钮,将会停止默认的存储池。存储池一旦停止后,点击右边的垃圾桶,将会删除存储池。**注意这个动作不会删除池中的镜像。** 现在点击左边的加号增加一个新的存储池。 @@ -85,6 +85,6 @@ Linux 有问必答 -- 如何改变libvirt VM镜像的默认位置 via: http://ask.xmodulo.com/change-default-location-libvirt-vm-images.html 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file From baac338842be5ee9e53cf10b14b5d5c6271bad3c Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 19 Nov 2014 21:54:56 +0800 Subject: [PATCH 235/316] PUB:20141029 How to Install MariaDB in Ubuntu 14.04 LTS @geekpi --- .../20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md (92%) diff --git a/translated/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md b/published/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md similarity index 92% rename from translated/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md rename to published/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md index cbc1f4bd69..5fe337a8d1 100644 --- a/translated/tech/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md +++ b/published/20141029 How to Install MariaDB in Ubuntu 14.04 LTS.md @@ -4,7 +4,7 @@ MariaDB是一个开源数据库且100%与MySQL兼容,目标是替代MySQL数 ### MariaDB的背景 : ### -2008年,MySQL被后来被Oracle在2010年收购的**Sun Microsystems**收购了。 最初被Sun公司的收购由于符合项目的需要受到MySQL社区的欢呼,但是这种情绪并没有持续他热爱就,接下来被Oracle的收购不幸期望远远低于预期。许多MySql的开发者离开了Sun和Oracle公司开始新的项目。在他们中间就有MySQL的创建者以及项目长期技术带头人之一的**Michael ‘Monty’ Widenius**。Monty和他的团队创建了MySQL的一个fork版本并且命名它为**MariaDB**。 +2008年,MySQL被后来被Oracle在2010年收购的**Sun Microsystems**收购了。 最初被Sun公司的收购由于符合项目的需要而受到MySQL社区的欢呼,但是这种情绪并没有持续太久,接下来被Oracle的收购,不幸期望远远低于预期。许多MySql的开发者离开了Sun和Oracle公司开始新的项目。在他们中间就有MySQL的创建者以及项目长期技术带头人之一的**Michael ‘Monty’ Widenius**。Monty和他的团队创建了MySQL的一个fork版本并且命名它为**MariaDB**。 本篇我们会讨论如何在Ubuntu上安装MariaDB。默认上MariaDB的包并没有在Ubuntu仓库中。要安装MariaDB,我们首先要设置MariaDB仓库。 @@ -45,7 +45,7 @@ via: http://www.linuxtechi.com/install-mariadb-in-ubuntu/ 作者:[Pradeep Kumar][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From e3f38d46bc428b411fcae720226efee930cf3713 Mon Sep 17 00:00:00 2001 From: joeren Date: Thu, 20 Nov 2014 08:49:28 +0800 Subject: [PATCH 236/316] Update 20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md --- ...1119 Smartctl--Monitoring & Analysis tool for Hard drive.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md b/sources/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md index c086e135ce..3aa99b2892 100644 --- a/sources/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md +++ b/sources/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Smartctl – Monitoring & Analysis tool for Hard drive ================================================================================ **Smartctl** (Self-Monitoring, Analysis and Reporting Technology) is a command line utility or a tool in UNIX like operating system that perform SMART tasks such as printing the SMART **self-test** and **error logs**, enabling and disabling SMART **automatic testing**, and initiating device self-tests. @@ -223,4 +224,4 @@ via: http://www.linuxtechi.com/smartctl-monitoring-analysis-tool-hard-drive/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file +[a]:http://www.linuxtechi.com/author/pradeep/ From 88f8b5e1204b81f4050beb104a8f35fd200a199a Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 20 Nov 2014 09:52:27 +0800 Subject: [PATCH 237/316] [Translated] 20141119 Smartctl--Monitor & Analysis tool for Hard drive.md --- ...nitoring & Analysis tool for Hard drive.md | 51 +++++++++---------- 1 file changed, 25 insertions(+), 26 deletions(-) rename {sources => translated}/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md (82%) diff --git a/sources/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md b/translated/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md similarity index 82% rename from sources/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md rename to translated/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md index 3aa99b2892..ba6f6862bd 100644 --- a/sources/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md +++ b/translated/tech/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md @@ -1,31 +1,30 @@ -Translating by GOLinux! -Smartctl – Monitoring & Analysis tool for Hard drive +硬盘监控和分析神器——Smartctl ================================================================================ -**Smartctl** (Self-Monitoring, Analysis and Reporting Technology) is a command line utility or a tool in UNIX like operating system that perform SMART tasks such as printing the SMART **self-test** and **error logs**, enabling and disabling SMART **automatic testing**, and initiating device self-tests. +**Smartctl**(自监控,分析和报告技术)是类Unix系统下实施SMART任务命令行套件或工具,它用于打印SMART**自检**和**错误日志**,启用并禁用SMRAT**自动检测**,以及初始化设备自检。 -Smartctl is useful on physical Linux servers where smart disks can be checked for errors and extract info regarding the disks that are used behind the **Hardware RAID**. +Smartctl对于Linux物理服务器十分有用,在这些服务器上,可以对智能磁盘进行错误检查,并将与**硬件RAID**上相关的磁盘信息摘录下来。 -In this post we will discuss some practical examples of smartctl command, Use below steps to install smartctl , if it is not installed on your linux box. +在本帖中,我们将讨论smartctl命令的一些实用样例。如果你的Linux上海没有安装smartctl,请按以下步骤来安装。 -### Installation of Smartcl in Ubuntu ### +### Ubuntu中smartctl的安装 ### $ sudo apt-get install smartmontools -### Installation of Smartcl in Redhat / CentOS ### +### Redhat / CentOS中smartctl的安装 ### # yum install smartmontools -**Start the Smartctl Service** +**启动Smartctl服务** -**For Ubuntu** +**对于Ubuntu** $ sudo /etc/init.d/smartmontools start -**For CentOS & RHEL** +**对于CentOS & RHEL** # service smartd start ; chkconfig smartd on -**Example:1 Check Whether Smart Capability is enabled or not for the disk** +**样例:1 检查针对磁盘的Smart负载量** root@linuxtechi:~# smartctl -i /dev/sdb smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) @@ -47,9 +46,9 @@ In this post we will discuss some practical examples of smartctl command, Use be SMART support is: Available - device has SMART capability. SMART support is: Enabled -Where ‘/dev/sdb’ is your hard disk. Last Two lines in above output shows that SMART capability is enable for the device. +这里‘/dev/sdb’是你的硬盘。上面输出中的最后两行显示了SMART负载量已启用。 -**Example:2 Enable Smart Capability for the disk** +**样例:2 为磁盘启用Smart负载量** root@linuxtechi:~# smartctl -s on /dev/sdb smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) @@ -58,7 +57,7 @@ Where ‘/dev/sdb’ is your hard disk. Last Two lines in above output shows tha === START OF ENABLE/DISABLE COMMANDS SECTION === SMART Enabled. -**Example:3 Disable Smart Capability for the disk** +**样例:3 为磁盘禁用Smart负载量** root@linuxtechi:~# smartctl -s off /dev/sdb smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) @@ -67,12 +66,12 @@ Where ‘/dev/sdb’ is your hard disk. Last Two lines in above output shows tha === START OF ENABLE/DISABLE COMMANDS SECTION === SMART Disabled. Use option -s with argument 'on' to enable it. -**Example:4 Display Detailed Smart info for the disk** +**样例:4 为磁盘显示详细Smart信息** root@linuxtechi:~# smartctl -a /dev/sdb // For IDE drive root@linuxtechi:~# smartctl -a -d ata /dev/sdb // For SATA drive -**Example:5 Display Overall health of the Disk** +**样例:5 显示磁盘总体健康状况** root@linuxtechi:~# smartctl -H /dev/sdb smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) @@ -85,9 +84,9 @@ Where ‘/dev/sdb’ is your hard disk. Last Two lines in above output shows tha ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 190 Airflow_Temperature_Cel 0x0022 067 045 045 Old_age Always In_the_past 33 (Min/Max 25/33) -**Example:6 Test Hard drive using long & short option.** +**样例:6 使用long和short选项测试硬盘** -Long Test +**Long测试** root@linuxtechi:~# smartctl --test=long /dev/sdb smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) @@ -102,11 +101,11 @@ Long Test Use smartctl -X to abort test. -OR We can redirect test output to a log file , as shown below +或者,我们可以重定向测试输出到日志文件,就像下面这样 root@linuxtechi:~# smartctl --test=long /dev/sdb > /var/log/long.text -**Short Test** +**Short测试** root@linuxtechi:~# smartctl --test=short /dev/sdb smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) @@ -121,13 +120,13 @@ OR We can redirect test output to a log file , as shown below Use smartctl -X to abort test. -OR +或 root@linuxtechi:~# smartctl --test=short /dev/sdb > /var/log/short.text -**Note** : Short test will take maximum 2 minutes whereas in long test there is no time restriction because it read & verify every segment of the entire disk. +**注意**:short测试将花费最多2分钟,而在long测试中没有时间限制,因为它会读取并验证磁盘的每个段。 -**Example:7 To View Drive’s Self Test result ** +**样例:7 查看驱动器的自检结果** root@linuxtechi:~# smartctl -l selftest /dev/sdb smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) @@ -139,7 +138,7 @@ OR # 1 Short offline Completed: read failure 90% 492 210841222 # 2 Extended offline Completed: read failure 90% 492 210841222 -**Example:8 Calculate Estimate time to perform test** +**样例:8 计算测试时间估值** root@linuxtechi:~# smartctl -c /dev/sdb smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) @@ -179,7 +178,7 @@ OR SCT Feature Control supported. SCT Data Table supported. -**Example:9 Display Error logs of the disk ** +**样例:9 显示磁盘错误日志** root@linuxtechi:~# smartctl -l error /dev/sdb @@ -219,7 +218,7 @@ OR via: http://www.linuxtechi.com/smartctl-monitoring-analysis-tool-hard-drive/ 作者:[Pradeep Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 958678ce476c174836a7eb5851efc4ca772b4ecc Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 20 Nov 2014 10:07:30 +0800 Subject: [PATCH 238/316] Finish the translation by ZTinoZ --- ...ith 60 Bug Fixes v4.4 Shaping Up Nicely.md | 58 ------------------- ...ith 60 Bug Fixes v4.4 Shaping Up Nicely.md | 57 ++++++++++++++++++ 2 files changed, 57 insertions(+), 58 deletions(-) delete mode 100644 sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md create mode 100644 translated/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md diff --git a/sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md b/sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md deleted file mode 100644 index e083498361..0000000000 --- a/sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md +++ /dev/null @@ -1,58 +0,0 @@ -translating by ZTinoZ -LibreOffice 4.3.4 Released With 60 Bug Fixes, v4.4 Shaping Up Nicely -================================================================================ -![](http://www.omgubuntu.co.uk/wp-content/uploads/2010/12/libreoffice.png) - -**Two weeks on [from the last][1], The Document Foundation is back with yet another minor release of its open-source LibreOffice productivity suite.** - -LibreOffice 4.3.4, the fourth such minor release in the ‘fresh’ series, is composed solely of bug fixes, which is par for the course in these point releases. - -Adding to the sense of deja vu is the number of bugs the foundation say have been caught in the developers’ butterfly net: around 60 or so. - -- Sorting behaviour now defaults to old style again (Calc) -- Restore focus window after preview (Impress) -- Chart wizard dialog no longer ‘cut off’ -- Word count with recorded changes fixed (Writer) -- Various RTF fixes, including image border import (Writer) - -A full list of changes can be [found on the LibreOffice Wiki page][2]. - -### Download ### - -Many folks have the whole LibreOffice schaboodle installed but rarely ever use it. If you count yourself among them, you could hold off on this release and never notice. - -If you do fancy upgrading you can find all of the relevant download links on the official project website. - -- [Download LibreOffice 4.3.4][3] - -### Looking Ahead to LibreOffice 4.4 ### - -![Info bar coming in LibreOffice 4.4](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/libreoffice-infobar.jpg) - -Info bar coming in LibreOffice 4.4 - -LibreOffice 4.4 should be a little more promising. - -[A wiki page details][4] the ongoing GUI tweaks in progress, with a new color picker, restyled paragraph line-spacing selector and an info bar to denote ‘read only’ mode among the many, many highlights. - -While the sum of these won’t amount to the huge wholesale interface changes I know the desktop community clamours for, they are sure-footed steps in the right direction. - -It’s also salient to remember that LibreOffice is a staple — in some cases integral — software for businesses and institutions. Any dramatic overhaul in look or layout would have a big knock on effect. - -Thanks Tim W! - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2014/11/libreoffice-4-3-4-arrives-bundle-bug-fixes - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.omgubuntu.co.uk/2014/10/libreoffice-4-3-3-released-62-bug-fixes -[2]:https://wiki.documentfoundation.org/Releases/4.3.4/RC1 -[3]:http://www.libreoffice.org/download/libreoffice-fresh/ -[4]:https://wiki.documentfoundation.org/ReleaseNotes/4.4#GUI diff --git a/translated/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md b/translated/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md new file mode 100644 index 0000000000..f0d72fc07b --- /dev/null +++ b/translated/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md @@ -0,0 +1,57 @@ +修复了60个bug的LibreOffice 4.3.4正式发布,4.4版本开发工作有序进行中 +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2010/12/libreoffice.png) + +**[上两周][1], 文档基金会带着它的开源LibreOffice生产力套件的又一个次版本回来了。** + +LibreOffice 4.3.4,新系列中的第四个次版本,是单独由修复好的bug构成的一个版本,不出乎意料地以点版本形式发行。 + +除了增加了即视感,基金会所说的在developers’ butterfly net上被揪出来并且修复的bug数量大概有:60个左右。 + +- 排序操作现在还是默认为旧的样式(Calc) +- 在预览后恢复焦点窗口(Impress) +- 图表向导对话框不再是‘切除’式 +- 修复了记录改变时的字数统计问题 (Writer) +- 各种各样的RTF修复,包括图像边框导入(Writer) + +完整列表可以在 [LibreOffice Wiki 页面][2]查看。 + +### 下载 ### + +许多家伙有完整的LibreOffice安装程序但是从来没用过它。如果你是其中一份子,你就当做没看到。 + +如果你喜欢升级,你可以在官方网站上找到所有相关的下载链接。 + +- [下载LibreOffice 4.3.4][3] + +### 预测一下LibreOffice 4.4 ### + +![Info bar coming in LibreOffice 4.4](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/libreoffice-infobar.jpg) + +来自LibreOffice 4.4的信息栏 + +LibreOffice 4.4应该给予大家多一点希望。 + +[维基上讲述了][4]正在进行中的不间断大范围GUI调整,包括一个新的颜色选择器,重新设计的段落行距选择器和一个在凸显部位表示该文件是否为只读模式的信息栏。 + +虽然以上大规模的界面变动我知道一些桌面社区的抗议声不断,但是他们还是朝着正确的方向稳步前进。 + +要记住,在一些必要情况下,LibreOffice对于企业和机构来说是一款非常重要的软件。在外观和布局上有任何引人注目的修改都会引发一串连锁效应。 + +感谢Tim W! + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/libreoffice-4-3-4-arrives-bundle-bug-fixes + +作者:[Joey-Elijah Sneddon][a] +译者:[ZTinoZ](https://github.com/ZTinoZ) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgubuntu.co.uk/2014/10/libreoffice-4-3-3-released-62-bug-fixes +[2]:https://wiki.documentfoundation.org/Releases/4.3.4/RC1 +[3]:http://www.libreoffice.org/download/libreoffice-fresh/ +[4]:https://wiki.documentfoundation.org/ReleaseNotes/4.4#GUI From 86e069b684cb49dd93af54df43b18c896676476b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 20 Nov 2014 13:30:14 +0800 Subject: [PATCH 239/316] =?UTF-8?q?20141120-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...t Open Source Web Browser Security Apps.md | 86 +++++++ ...l Xen hypervisor on unused old hardware.md | 228 ++++++++++++++++++ 2 files changed, 314 insertions(+) create mode 100644 sources/share/20141120 5 Best Open Source Web Browser Security Apps.md create mode 100644 sources/tech/20141120 How to install Xen hypervisor on unused old hardware.md diff --git a/sources/share/20141120 5 Best Open Source Web Browser Security Apps.md b/sources/share/20141120 5 Best Open Source Web Browser Security Apps.md new file mode 100644 index 0000000000..6dc3451eb9 --- /dev/null +++ b/sources/share/20141120 5 Best Open Source Web Browser Security Apps.md @@ -0,0 +1,86 @@ +5 Best Open Source Web Browser Security Apps +================================================================================ +The Web browser acts as the gateway for myriad online services these days. Computer security problems are far from solved, and technology advances provide new ways for malware to infect our devices and enter our business networks. For example, smartphones and tablets offer fresh new fields for malware—and its malicious cousin, "[malvertising][1]"—to exploit. + +Malvertising, or malicious advertising, injects malware into legitimate ads and ad networks. Granted, you could argue that there's a thin line between "legitimate" ads and ad networks and not-legitimate ads and ad networks. But don’t get distracted. Privacy and security are inextricably linked, and protecting your privacy is part of protecting your security. + +Firefox, Chrome, and Opera are the best Web browsers; they offer the best performance, the most compatibility, and the best security. These five open source security apps install in your Web browser, and they protect you from a variety of threats. + +### Protect Your Privacy: Open Source Web Browser Security Apps ### + +#### 1. [AdBlock][2] #### + +Ad networks are wonderful malware vectors. A single ad network serves thousands of sites, so compromising one ad network equals many thousands of compromised machines. AdBlock, and its derivatives—[AdBlock Plus][2], [AdBlock Pro][3], and [AdBlock Edge][4]—are all great tools for blocking ads, which has the added benefit of making cluttery annoying ads-infested sites more usable. + +Of course there is a downside: harming sites that depend on ad revenues. All of them have one-click whitelists, so you can selectively turn off ad-blocking on sites that you want to support. (Really, my dear Webmeisters, if you don't want your site visitors blocking your ads then don't be obnoxious.) + +![](http://www.smallbusinesscomputing.com/imagesvr_ce/5731/fig-1-easylist_1.jpg) + +Figure 1: Selecting additional filters for your Ad Blocker. + +Ad blockers do more than block ads; they also block Web-tracking bugs and malicious domains. To turn on additional filter lists, click on your ad blocker icon > click **Preferences**, and go to the **Filter Subscriptions** tab. Click the **Add Filter Subscription** button, and then add **Easy Privacy + EasyList**. The Malware Domains filter is a good one to include as well; it blocks domains that are known to host malware and spyware. Adblock works with Firefox, Chrome, Opera, Safari, Internet Explorer, and Android. + +#### 2. [HTTPS Everywhere][5] #### + +HTTPS Everywhere browser extension ensures that you will never accidentally connect to a Web site with HTTP when HTTPS is available. HTTPS means your connection is encrypted with SSL (secure sockets layer), which is a commonly-used protocol for encrypting Web and email connections. HTTPS Everywhere is available for Firefox, Chrome, and Opera. + +When you install HTTPS Everywhere, it asks if you want to enable the SSL Observatory. Say yes, as it offers additional protections against man-in-the-middle and bogus SSL certificate attacks. HTTPS Everywhere works with Firefox, Chrome, Opera, Android. + +#### 3. [Social Fixer][6] #### + +Social Fixer tames Facebook. It gives you mighty powers to filter your news feed so that you see what you want to see, creates tabbed feeds organized by topic, hides whatever you don't want to see, displays pictures full-sized on mouse-over, disables the Theater view of images, and lots more. + +It's not really designed to be a security tool, but Social Fixer offers two important security features: + +- It anonymizes Facebook pages for screenshots by replacing profile pictures with generic icons, and it changes usernames to fake names +- It reliably blocks Facebook games, which are notorious sources of trouble + +![](http://www.smallbusinesscomputing.com/imagesvr_ce/2858/fig-2-socialfixer_1.jpg) + +Figure 2: Anonymizing a Facebook screen with Social Fixer. + +#### 4. [Privacy Badger][7] #### + +The Electronic Frontier Foundation's Privacy Badger is a superb tracker-and spy-ads blocker. These days Web pages are composed of content from multiple sources: ad servers, comments servers, content farms, image farms, third-party login servers, and gosh knows what-all. + +AdBlock is good at blocking this junk, but Privacy Badger is better. It doesn't rely on filter lists, which have to be maintained by humans somewhere, but rather algorithms and policy methods, and you can easily override it if it blocks something in error. Privacy Badger works with Firefox and Chrome. + +![](http://www.smallbusinesscomputing.com/imagesvr_ce/9256/fig-3-privacybadger_1.jpg) + +Figure 3: Privacy Badger blocks tracking sites. + +Privacy Badger should just work. Click on its icon to see what it's blocking on any site you're visiting. Try it on Huffingtonpost.com, one of the champions of stuffing the maximum number of third-party components into each and every page (Figure 3). + +The sliders tell the status of each site: red means that site is completely blocked, so it can't set cookies or serve up any content to you. Yellow indicates a third-party domain that appears to be trying to track you, but it is on Privacy Badger's whitelist of allowed domains. Green is for a third-party domain that is not yet classified as a tracker, but this could change as you visit **multiple** sites and Privacy Badger observes its behavior. + +You can set the sliders yourself according to your preference; for example, on one site I visited Privacy Badger blocked bazaarvoice.com, which some shopping sites use to host their customer reviews. + +#### 5. [Disconnect][8] #### + +Disconnect is another anti-tracker and anti-cookie tool with a great feature set. It runs on Firefox, Chrome, Internet Explorer, and Safari, and offers special iOS and Android versions. Not only does it foil trackers, it also secures your wireless transmissions (Wi-fi, 3G, and 4G) with its own virtual private network, protecting you from wiretapping and malvertising. It protects you from widgetjacking, which is a technique used by attackers to gain access to your sites that require logins. With widgetjacking they don't even need your password; they use stolen cookies. + +Disconnect also provides a safe search feature that lets you use your favorite search engines while blocking their snoopy data-mining habits. + +Just assume that everyone on the Web is out to get you. It's all abstract and behind the scenes, and not obvious like someone bashing a window to get into your house. But the threats are numerous and real, and you have to take precautions to protect yourself. + +Carla Schroder is the author of The Book of Audacity, Linux Cookbook, Linux Networking Cookbook,and hundreds of Linux how-to articles. She's the former managing editor of Linux Planet and Linux Today. + +-------------------------------------------------------------------------------- + +via: http://www.smallbusinesscomputing.com/biztools/5-best-open-source-web-browser-security-apps.html + +作者:[Carla Schroder][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.smallbusinesscomputing.com/author/Carla-Schroder-6080.html +[1]:http://www.webopedia.com/TERM/M/malvertising.html +[2]:https://getadblock.com/ +[3]:https://chrome.google.com/webstore/detail/adblock-pro/ocifcklkibdehekfnmflempfgjhbedch?hl=en-US +[4]:https://addons.mozilla.org/en-us/firefox/addon/adblock-edge/ +[5]:https://www.eff.org/Https-everywhere +[6]:http://socialfixer.com/ +[7]:https://www.eff.org/privacybadger +[8]:https://disconnect.me/ \ No newline at end of file diff --git a/sources/tech/20141120 How to install Xen hypervisor on unused old hardware.md b/sources/tech/20141120 How to install Xen hypervisor on unused old hardware.md new file mode 100644 index 0000000000..4e8677f480 --- /dev/null +++ b/sources/tech/20141120 How to install Xen hypervisor on unused old hardware.md @@ -0,0 +1,228 @@ +How to install Xen hypervisor on unused old hardware +================================================================================ +Xen is a bare metal hypervisor, meaning that you must prepare a bare machine to install and run Xen. KVM is a little different - you can add it to any machine already running Linux. This tutorial describes how to install and configure Xen hypervisor on unused hardware. + +This procedure uses Debian Jessie (their testing distribution) as the host OS (also known as [Dom0][1]). Jessie is not the only choice - Xen support is built into the Linux kernel, and [plenty of Linux distributions][2] include one of these Xen-enabled kernels. + +### Find unused hardware ### + +As a start, find a suitable workstation which can be wiped out, such as an old laptop or desktop. Older hardware may not be good for gaming, but it is good enough for a host OS and a couple of guests. A PC with these specifications works fine. + +- 1 CPU with 2 cores (64-bit) +- 4GB memory +- 80GB hard disk +- ability to boot from CD, DVD or USB +- a network interface + +Note that the CPU must be a 64-bit processor since Debian dropped support for 32-bit Xen packages. If you don't have spare hardware, you could invest in an old machine. 2010's $1000 flagship laptop is today's $100 bargain. A second-hand laptop from eBay and a memory upgrade will do fine. + +### Burn a bootable CD/USB ### + +Download the ISO image for Debian Jessie. The small netinst image available from the [official Debian website][3] works fine. + + $ wget http://cdimage.debian.org/cdimage/jessie_di_beta_2/amd64/iso-cd/debian-jessie-DI-b2-amd64-netinst.iso + +Next, identify the device name assigned to your [CD/DVD][4] or [USB drive][5] (e.g., /dev/sdc). + +Burn the downloaded ISO image into a bootable CD or a USB using dd command. Replace /dev/sdc with the device name you identified above. + + $ sudo dd if=debian-jessie-DI-b2-amd64-netinst.iso of=/dev/sdc + +### Start the installation ### + +To start the installation, boot with the Debian installer CD/USB. + +It's a good idea to use a wired connection, not WiFi. If the WiFi won't connect because firmware or driver software is missing, you won't get very far. + +![](https://farm8.staticflickr.com/7516/15772286696_c31e4c7754_z.jpg) + +### Partition the disk ### + +This setup uses four primary disk partitions. Automatic OS installers usually set up an extended partition that contains logical partitions. Set up the four partitions like this. + +- sda1 mount on /boot, 200MB +- sda2 /, 20GB, Ubuntu uses 4GB +- sda3 swap, 6GB (4GB of memory x 1.5 = 6) +- sda4 reserved for LVM, not mounted, all the rest of the disk space + +### Install the base system ### + +It's a good idea to make the install as simple and short as possible. A basic working system can always be added to later. Debian's APT (Advanced Package Tool) makes adding software easy. Installing Debian on a workstation can cause pretty obscure time-wasting issues. Perhaps a graphics driver does not agree with the kernel or maybe the old CD-ROM drive only works intermittently. + +When it comes to choosing what to install, do install an SSH server and don't install a desktop like Gnome. + +![](https://farm9.staticflickr.com/8541/15176520633_5d31beda9c_z.jpg) + +A graphical desktop requires hundreds of package installs - it's a lot of extra work that can be done later. If you run into problems, waiting for that desktop install is a waste of time. Also, without desktop component, the system boot will be much quicker - seconds rather than minutes. This procedure requires a few reboots, so that's a handy time-saver. + +An SSH server lets you configure the workstation from another computer. This allows you to avoid some of the problems with old hardware - perhaps the old machine's keyboard is missing keys, the LCD screen has dead pixels or the trackpad is unresponsive etc. + +### Add LVM (Logical Volume Manager) ### + +Install the LVM tools as the root. + + # apt-get update + # apt-get install lvm2 + +Pick a physical volume to work with. + + # pvcreate /dev/sda4 + +Create a volume group. + + # vgcreate vg0 /dev/sda4 + +You don't need to create a logical volume. If you want to test LVM works, create a volume then delete it. + + # lvcreate -nmytempvol -L10G vg0 + # lvremove /dev/vg0/mytempvol + +Check LVM status. + + # pvs (to view information about physical volumes) + # vgs (to view information about volume groups) + # lvs (to view information about logical volumes) + +### Add a Linux Ethernet bridge ### + +We are going to set up a Linux bridge so that all Xen's guest domains can be connected to, and communicate through the bridge. + +Install the bridge tools. + + # apt-get install bridge-utils + +See what interfaces are configured. + + # ip addr + +![](https://farm8.staticflickr.com/7512/15610553338_2f9cf1d3a2_z.jpg) + +In this example, we have one primary interface assigned eth0. We are going to add eth0 to the Linux bridge by editing the network configuration file (/etc/network/interfaces). + +Before making any change, back up the network configuration file to keep the original working configuration safe. + + # cd /etc/network/ + # cp interfaces interfaces.backup + # vi /etc/network/interfaces + +The file contents look something like this. + + auto lo + iface lo inet loopback + + allow-hotplug eth0 + iface eth0 inet dhcp + +Change the file to this. + + auto lo + iface lo inet loopback + + auto eth0 + iface eth0 inet manual + + auto xenbr0 + iface xenbr0 inet dhcp + bridge_ports eth0 + +Activate the network configuration change: + + # systemctl restart networking + +### Verify networking settings ### + +Verify that a Linux bridge xenbr0 is created successfully. + + # ip addr show xenbr0 + +Also check that the primary interface eth0 is successfully added to the bridge. + + # brctl show + +![](https://farm6.staticflickr.com/5609/15795960355_673c71ab5c_z.jpg) + +You now have a working machine with Jessie installed. Xen is not yet installed at this point. Let's proceed to install Xen next. + +### Install the Xen hypervisor ### + +Install Xen and QEMU packages, and update the GRUB bootloader. + + # apt-get install xen-linux-system + +Reboot. + +When the GRUB screen appears, you can see extra booting options listed. + +![](https://farm8.staticflickr.com/7535/15794086091_bf1bce6b4b_z.jpg) + +The first option will boot automatically in five seconds (see the GRUB_TIMEOUT line in /etc/default/grub), so this is not the time to get a coffee. + +Press the down arrow to highlight the option "Debian GNU/Linux, with Xen hypervisor", and press RETURN. Many lines of information appear, followed by the usual login screen. + +### Check Xen works ### + +Xen hypervisor comes with Xen management command-line tool called xl, which can be used to create and manage Xen guest domains. Let's use xl command to check if Xen is successfully installed. + +Log in as root, and run: + + # xl info + +which will display various information about Xen host. + +![](https://farm9.staticflickr.com/8404/15610553388_db3b134a9d_z.jpg) + +To see a list of existing Xen domains: + + # xl list + +![](https://farm9.staticflickr.com/8393/15610135189_ffd8bd24e8_z.jpg) + +A little table of domains appears. Without any Xen guest domain created, the only entry should be Domain-0, your Debian installation. + +### Change the boot order ### + +When you reach this point, the Xen install is complete. There is one more thing to fix - the default boot will not load Xen. GRUB chooses the first item in the boot menu (Debian GNU/Linux), not the third (Debian GNU/Linux, with Xen hypervisor). + +The default option in the boot menu is defined in the grub configuration file /boot/grub/grub.cfg. To change the default option, don't edit that file, but edit /etc/default/grub instead. A little helper program called grub-mkconfig reads in this default configuration file and all the templates in /etc/grub.d/, then writes the grub.cfg file. + +Edit Debian's configuration file for grub-mkconfig. + + # vi /etc/default/grub + +Change the line: + + GRUB_DEFAULT=0 + +to + + GRUB_DEFAULT='Debian GNU/Linux, with Xen hypervisor' + +Then update the grub configuration file. + + # grub-mkconfig -o /boot/grub/grub.cfg + +Finally reboot. After a few seconds, the grub boot menu appears. Check that the third option "Debian GNU/Linux, with Xen hypervisor" is highlighted automatically. + +### Final note ### + +If you use this machine as your hands-on workstation, install a graphical desktop. The Debian library includes a few [desktop environments][6]. If you want a graphical desktop that includes everything and the kitchen sink, go for Gnome. If graphics just get in your way, try Awesome. + +Note that the Debian Jessie default environment Gnome comes with a huge amount of extra applications including the productivity suite LibreOffice, the Iceweasel web browser and the Rhythmbox music player. The install command "apt-get install gnome" adds 1,000 packages and takes up nearly 2GB of disk space. Running this heavyweight desktop takes up 1GB of memory. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/install-xen-hypervisor.html + +作者:[Nick Hardiman][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/nick +[1]:http://wiki.xen.org/wiki/Dom0 +[2]:http://wiki.xen.org/wiki/Dom0_Kernels_for_Xen +[3]:https://www.debian.org/devel/debian-installer/ +[4]:http://ask.xmodulo.com/detect-dvd-writer-device-name-writing-speed-command-line-linux.html +[5]:http://ask.xmodulo.com/find-device-name-usb-drive-linux.html +[6]:https://wiki.debian.org/DesktopEnvironment \ No newline at end of file From 90d296856cd8c86dceb80ff7e828d6c57fe27d44 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 20 Nov 2014 13:58:06 +0800 Subject: [PATCH 240/316] =?UTF-8?q?20141120-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 visualize memory usage on Linux.md | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 sources/tech/20141120 How to visualize memory usage on Linux.md diff --git a/sources/tech/20141120 How to visualize memory usage on Linux.md b/sources/tech/20141120 How to visualize memory usage on Linux.md new file mode 100644 index 0000000000..8ed16436f1 --- /dev/null +++ b/sources/tech/20141120 How to visualize memory usage on Linux.md @@ -0,0 +1,87 @@ +How to visualize memory usage on Linux +================================================================================ +Lack of sufficient physical memory can significantly hamper the performance of Linux desktop and server environments. When your desktop is sluggish, one of the first things to do is to free up RAMs. Memory usage is even more critical in multi-user shared hosting or mission-critical server environments, where different users or application threads constantly compete for more memory. + +When it comes to monitoring any type of system resources such as memory or CPUs, visualization is an effective means to help understand quickly how they are consumed by different processes and users. In this tutorial, I describe **how to visualize memory usage in Linux environment** using a command-line tool called [smem][1]. + +### Physical Memory Usage: RSS vs. PSS vs. USS ### + +In the presence of virtual memory abstraction, accurately quantifying physical memory usage of a process is actually not straightforward. The virtual memory size of a process is not meaningful because it does not tell how much of it is actually allocated physical memory. + +**Resident set size (RSS)**, reported by top command, is one popular metric which captures what portion of a process' reported memory is residing in RAM. However, aggregating RSS of existing processes can easily overestimate the overall physical memory usage of the Linux system because the same physical memory page can be shared by different processes. **Proportional set size (PSS)** is a more accurate measurement of effective memory usage of Linux processes since PSS properly discounts the memory page shared by more than one process. **Unique set size (USS)** of a process is a subset of the process' PSS, which is not shared by any other processes. + +### Install Smem on Linux ### + +The command-line tool smem can generate a variety of reports related to memory PSS/USS usage by pulling information from /proc. It comes with built-in graphical chart generation capabilities, so one can easily visualize overall memory consumption status. + +#### Install Smem on Debian, Ubuntu or Linux Mint #### + + $ sudo apt-get install smem + +#### Install Smem on Fedora or CentOS/RHEL #### + +On CentOS/RHEL, you need to [enable][2] EPEL repository first. + + $ sudo yum install smem python-matplotlib + +### Check Memory Usage with Smem ### + +When you run smem as a unprivileged user, it will report physical memory usage of every process launched by the current user, in an increasing order of PSS. + + $ smem + +![](https://farm8.staticflickr.com/7498/15801819892_d017280595_z.jpg) + +If you want to check the overall system memory usage for all users, run smem as the root. + + $ sudo smem + +![](https://farm9.staticflickr.com/8635/15776587626_1de74c4bcd_z.jpg) + +To view per-user memory usage: + + $ sudo smem -u + +![](https://farm9.staticflickr.com/8543/15798375491_510698d98f_z.jpg) + +smem allows you to filter memory usage results based on mapping, processes or users in the following format: + +- -M +- -P +- -U + +For a complete usage of smem, refer to its man page. + +### Visualize Memory Usage with Smem ### + +Visualized reports are often easier to read to identify the memory hogs of your system quickly. smem supports two kinds of graphical reports for memory usage visualization: bar and pie graphs. + +Here are examples of memory usage visualization. + +The following command will generate a bar graph that visualizes the PSS/USS memory usage of a user alice. + + $ sudo smem --bar name -c "pss uss" -U alice + +![](https://farm6.staticflickr.com/5616/15614838448_640e850cd8_z.jpg) + +The next command will plot a pie graph of the overall PSS memory usage of different processes. + + $ sudo smem --pie name -c "pss" + +![](https://farm8.staticflickr.com/7466/15614838428_eed7426cfe_z.jpg) + +As a summary, smem is a simple and effective memory analysis tool that comes in handy in various circumstances. Using its formatted output, you can run smem to identify any memory issues and take an action in an automatic fashion. If you know of any good memory monitoring tool, share it in the comment. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/visualize-memory-usage-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://www.selenic.com/smem/ +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file From ba3e265faee619a5b4d13727d7226a46cf95c2aa Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 20 Nov 2014 14:16:39 +0800 Subject: [PATCH 241/316] =?UTF-8?q?20141120-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...re and secure your Postfix email server.md | 141 ++++++++++++++++++ ...stall an Opensource VPN Server on Linux.md | 71 +++++++++ ...stfix tips and Troubleshooting Commands.md | 55 +++++++ 3 files changed, 267 insertions(+) create mode 100644 sources/tech/20141120 How to configure and secure your Postfix email server.md create mode 100644 sources/tech/20141120 How to install an Opensource VPN Server on Linux.md create mode 100644 sources/tech/20141120 Postfix tips and Troubleshooting Commands.md diff --git a/sources/tech/20141120 How to configure and secure your Postfix email server.md b/sources/tech/20141120 How to configure and secure your Postfix email server.md new file mode 100644 index 0000000000..7ed5437542 --- /dev/null +++ b/sources/tech/20141120 How to configure and secure your Postfix email server.md @@ -0,0 +1,141 @@ +How to configure and secure your Postfix email server +================================================================================ +![](http://techarena51.com/wp-content/uploads/2014/08/postfix.png) + +Once you have your application server up and running, you are going to need a good email server to deliver your emails. I have been using postfix for all my servers and below is the configuration I generally use. + +### Installation of Postfix on CentOS 6 ### + + yum install postfix + +Sendmail is installed by default, so it is better to stop and remove it + + service sendmail stop + yum remove sendmail + +Postfix contains **two configuration files main.cf and master.cf**, you will need to modify main.cf for basic configuration. Also, postfix parameters can be defined like shell variables and can be used with a dollar sign preceding them. They do not need to be defined before they are used. Postfix will only look for a parameter when it is needed at rumtime. + +### Configuring postfix ### + + vim /etc/postfix/main.cf + +Uncomment the lines below + + #Add the hostname of your machine + myhostname = yourhostname.com + + #From Domain to be used when mail is sent from this linux machine + myorigin = $myhostname + + #The network interface to receive mail on, I prefer localhost as I only want emails from this system to be delivered + inet_interfaces = localhost + + # The protocol to use when postfix will make or accept a connection. You can use “all” if you want to enable IPv6 support + inet_protocols = ipv4 + + + #Domains to receive email for + mydestination = $myhostname, localhost.$mydomain, localhost + + #Only forward emails for the local machine and not machines on the network. + mynetworks_style = host + +Start postfix + + service postfix start + +This basic postfix configuration should enable your machine to send emails. You can verify the same by sending an email and checking “maillog” log file. + + echo test mail | mail -s "test" leo@techarena51.com && sudo tail -f /var/log/maillog + + #Logs should output the following + Aug 25 14:16:21 vps postfix/smtp[32622]: E6A372DC065D: to=, relay=smtp.mailserver.org[50.56.21.176], delay=0.8, delays=0.1/0/0.43/0.27, dsn=2.0.0, status=sent (250 Great success) + Aug 25 14:16:21 vps postfix/qmgr[5355]: E6A372DC065D: removed + +But this configuration is not enough, as your emails will mostly end up in spam. You will need to add an SPF, PTR and DKIM record. You may still get emails delivered in spam due to your IP address being blacklisted, mostly due to a previous abuse of your vps. + +An alternative or a better way would be to use a third party provider like Gmail or even Mailgun. +I use Mailgun as they give you 10,000 emails free every month as compared to Gmails 100 or so per day. + +In “/etc/postfix/main.cf” you will need to add “smtp.mailgun.com” as your “relayhost”, enable “SASL” authentication so postfix can connect and authenticate to the remote Mailgun server. + +Add or uncomment the following lines. + + relayhost = [smtp.mailgun.org] + smtp_sasl_auth_enable = yes + smtp_sasl_password_maps=static:your_username:your_password + smtp_sasl_security_options=noanonymous + +Postfix does not implement “SASL” authentication by itself, hence you will need to install “cyrus-sasl-plain”. + + sudo yum install cyrus-sasl-plain + +If you do not install this package on Centos 6 then you will get an error “SASL authentication failed; cannot authenticate to server smtp.mailgun.org[50.56.21.176]: no mechanism available)” + +Restart postfix + + sudo service postfix restart + +### Securing Postfix with TLS ### + +Postfix supports TLS a successor to SSL which allows you to encrypt data using key based authentication. I recommend reading http://www.postfix.org/TLS_README.html on how tls works with postfix. + +In order to use TLS you will need to generate a private key and a certificate which is signed by a Certificate Authority. In this example, I will be using a Self Signed Certificate. + + sudo yum install mod_ssl openssl + # Generate private key + openssl genrsa -out smtp.key 2048 + + # Generate CSR + openssl req -new -key smtp.key -out smtp.csr + + # Generate Self Signed Key + openssl x509 -req -days 365 -in smtp.csr -signkey smtp.key -out smtp.crt + + # Copy the files to the correct locations + cp smtp.crt /etc/pki/tls/certs + cp smtp.key /etc/pki/tls/private/smtp.key + cp smtp.csr /etc/pki/tls/private/smtp.csr + +Open the postfix configuration files and add the following parameteres + + sudo vim /etc/postfix/main.cf + + smtp_tls_security_level = may + smtpd_tls_security_level = may + smtp_tls_note_starttls_offer = yes + + smtpd_tls_key_file = /etc/pki/tls/private/smtp.key + smtpd_tls_cert_file = /etc/pki/tls/certs + smtp_tls_CAfile = /etc/ssl/certs/ca.crt + smtp_tls_loglevel = 1 + +Security level “may” means announce STARTTLS support to remote SMTP clients, but clients do no need to use encryption., I have used it here as per [mailgun docs][1], but you can use “encrypt” if you want to force TLS encryption. + + service postfix restart + #Send a test email + echo test mail | mail -s "test" test@yourdomain.com && sudo tail -f /var/log/maillog + +You should see the below message + + Aug 21 00:00:06 vps postfix/smtp[4997]: setting up TLS connection to smtp.mailgun.org[50.56.21.176]:587 + Aug 21 00:00:06 vps postfix/smtp[4997]: Trusted TLS connection established to smtp.mailgun.org[50.56.21.176]:587: TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits) + +You can comment out the below parameter once everything is successful. +“smtp_tls_loglevel = 1” + +For Troubleshooting I recommend you read [Postfix tips and Troubleshooting Commands][2](注:此文在同一个原文更新中) + +-------------------------------------------------------------------------------- + +via: http://techarena51.com/index.php/configure-secure-postfix-email-server/ + +作者:[Leo G][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://techarena51.com/ +[1]:http://documentation.mailgun.com/user_manual.html#smtp-relay +[2]:http://techarena51.com/index.php/postfix-configuration-and-explanation-of-parameters/ \ No newline at end of file diff --git a/sources/tech/20141120 How to install an Opensource VPN Server on Linux.md b/sources/tech/20141120 How to install an Opensource VPN Server on Linux.md new file mode 100644 index 0000000000..f7ceea5598 --- /dev/null +++ b/sources/tech/20141120 How to install an Opensource VPN Server on Linux.md @@ -0,0 +1,71 @@ +How to install an Opensource VPN Server on Linux +================================================================================ +![](http://techarena51.com/wp-content/uploads/2014/10/open-vpn.png) + +One of the most concerning factors to me while browsing, Is how can I ensure that my data remains private and secure ? While searching for answers, I came cross a number of ways in which you can remain anonymous like using a proxy website. But still using a third party service was not assuring enough. What I needed was a software which could be installed and run by me thus ensuring that I and only I would have access to the data. + +So what is such a software called? + +It’s called a VPN service or short for Virtual Private Network. It allows you to encrypt your data via SSL when you connect through it. Since the connection is encrypted even your ISP cannot see what your browsing. + +In this Linux Tutorial , I will be installing an OpenVPN Access Server on CentOS 7 . OpenVPN is easy to use, OpenSource and has community based support. It has clients for Windows, Android, and Mac. + +### Step 1. Install OpenVPN Access Server on your Centos 7 Linux machine or [VPS][1]. ### + +Download the package from https://openvpn.net/index.php/access-server/download-openvpn-as-sw.html, Ubuntu users can download appropriate packages and install OpenVPN Access Server on Ubuntu as well. + + [leo@vps ]$ cd /tmp + [leo@vps tmp]$ wget http://swupdate.openvpn.org/as/openvpn-as-2.0.10-CentOS7.x86_64.rpm + [leo@vps tmp]$ sudo rpm -Uvh openvpn-as-2.0.10-CentOS7.x86_64.rpm + Preparing... ################################# [100%] + Updating / installing... + 1:openvpn-as-0:2.0.10-CentOSrelease################################# [100%] + The Access Server has been successfully installed in /usr/local/openvpn_as + Configuration log file has been written to /usr/local/openvpn_as/init.log + Please enter "passwd openvpn" to set the initial + administrative password, then login as "openvpn" to continue + configuration here: https://yourhostIP:943/admin + To reconfigure manually, use the /usr/local/openvpn_as/bin/ovpn-init tool. + + Access Server web UIs are available here: + Admin UI: https://yourhostIP:943/admin + Client UI: https://yourhostIP:943/ + +### Step 2: Setup a password for an OpenVPN client ### + + [leo_g@vps ]$passwd openvpn + +### Step 3: Log into the server via the admin Url https://yourhostIP:943/admin and start the server. ### + +![](http://techarena51.com/wp-content/uploads/2014/10/open-vpn.png) + +Type in the username “openvpn” and the password you set earlier + +![](http://techarena51.com/wp-content/uploads/2014/10/open-vpn-1.png) + +### Step 4: Install the client from the Client Url. ( It will give you an option to download the Installer) ### + +![](http://techarena51.com/wp-content/uploads/2014/10/open-vpn-client-url.png) + +You can read instructions [here][3] on how to install it for your OS. + +### Step 5: Connect to your server with your username and password that you created earlier. ### + +![](http://openvpn.net/images/howto/connecting/OpenVPN_Client_Connect_2.png) + +That’s it, you can goto whatismyip.com and check your IP, should be that of your CentOS 7 OpenVPN Access Server. + +-------------------------------------------------------------------------------- + +via: http://techarena51.com/index.php/how-to-install-an-opensource-vpn-server-on-linux/ + +作者:[Leo G][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://techarena51.com/ +[1]:https://play.google.com/store/apps/details?id=net.openvpn.openvpn&hl=en +[2]:http://supportinc.net/vps-hosting.php +[3]:https://openvpn.net/index.php/access-server/docs/admin-guides-sp-859543150/howto-connect-client-configuration.html \ No newline at end of file diff --git a/sources/tech/20141120 Postfix tips and Troubleshooting Commands.md b/sources/tech/20141120 Postfix tips and Troubleshooting Commands.md new file mode 100644 index 0000000000..8f3fbbbe5a --- /dev/null +++ b/sources/tech/20141120 Postfix tips and Troubleshooting Commands.md @@ -0,0 +1,55 @@ +Postfix tips and Troubleshooting Commands +================================================================================ +Here’s a list of stuff I user everyday and other email admins will also be using, Let me know if I missed anything + +List/Print current mail queue + + # postqueue –p + + # mailq + +If it’s a huge que, you can pipe it with tail + + # mailq | tail + +Flush the queue + + # postqueue -f + +Schedule immediate delivery of all mail that is queued for the named as domain.come. + + # postqueue -s domain.com + +TO delete all queue + + # postsuper -d ALL + +To delete a particular message + + # postsuper -d messageid + +Reque the mail or resend particular mail + + #postfix -r msgid + +To find mail version + + #postconf -d mail_version + mail_version = 2.6.6 + +You can also follow the steps in the link below which is the most simple and well explained documentation available with regards to Configuring postfix. + +[Postfix Configuration - ][1] + +-------------------------------------------------------------------------------- + +via: http://techarena51.com/index.php/postfix-configuration-and-explanation-of-parameters/ + +作者:[Leo G][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://techarena51.com/ +[1]:http://www.apricot.net/apricot2004/doc/cd_content/24th%20February%202004/04%20-%20TTF%20Anti%20Spam%20&%20Anti%20Net%20Abuse%20-%20Suresh%20Ramasubramaniam/Devdas%20Bhagat.pdf \ No newline at end of file From 19d59d03c9dee39be5358e8a7c91d9be6dda0036 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 20 Nov 2014 15:48:16 +0800 Subject: [PATCH 242/316] =?UTF-8?q?20141120-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...o Debian technical panel members resign.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sources/news/20141120 Systemd fallout--Two Debian technical panel members resign.md diff --git a/sources/news/20141120 Systemd fallout--Two Debian technical panel members resign.md b/sources/news/20141120 Systemd fallout--Two Debian technical panel members resign.md new file mode 100644 index 0000000000..b3f98e862d --- /dev/null +++ b/sources/news/20141120 Systemd fallout--Two Debian technical panel members resign.md @@ -0,0 +1,42 @@ +Systemd fallout: Two Debian technical panel members resign +================================================================================ +![](http://www.itwire.com/media/k2/items/cache/985881530be9dfdb268b3ae49be9a710_XL.jpg) + +**Two well-known and experienced Debian developers, both members of the project's technical committee, have announced they will be leaving the committee.** + +The resignations of [Colin Watson][1] and [Russ Allberry][2] from the panel come soon after senior developer Joey Hess [resigned][3] from the project altogether. + +There has been much acrimony recently over the adoption of the systemd init system as the default for Jessie, the next release of Debian, which is expected to come out in the next few months. + +The Debian Technical Committee [decided][4] back in February, via the casting vote of panel chief Bdale Garbee, to adopt systemd as the default. This decision came after months of discussion. + +Recently, there has been [another push][5] for reconsideration led by another technical committee member, Ian Jackson, and [a general resolution][6] was put up for vote. It is open for voting until midnight on November 18, UTC (10am on Wednesday AEST). There are a few options proposed by others, including one from the Debian Project leader Lucas Nussbaum, besides the main resolution. + +In the initial vote back in February, Allberry supported systemd as the default, while Watson, an employee of Canonical, the company that creates the Ubuntu GNU/Linux distribution, expressed a preference for upstart. Jackson also backed upstart. + +In [a post][7] explaining his decision, Watson, one of the first batch to join Canonical, attributed it to a general move on his part to start spending his Debian time on things he found enjoyable. Late last month, [he asked][8] to be moved from the Ubuntu Foundations team to the Launchpad engineering team. Watson has given the Debian Technical Committee time to appoint someone in his place before he moves on. + +In contrast, Allberry's [resignation post][9] said he wanted to leave immediately, though he later added that he would stay on for a while if needed. + +His frustration was clear: "If any part of this doesn't make sense, or if any of it feels like an attack or a reaction to any single person or event, I'm happy to clarify. I would appreciate it if people would ask for clarification rather than making assumptions, as assumptions about other people's motives are one of the things that I find the most demoralising about the Debian project right now." + +-------------------------------------------------------------------------------- + +via: http://www.itwire.com/business-it-news/open-source/66153-systemd-fallout-two-debian-technical-panel-members-resign + +作者:[Sam Varghese][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.itwire.com/business-it-news/open-source/itemlist/user/902-samvarghese +[1]:https://lists.debian.org/debian-ctte/2014/11/msg00052.html +[2]:https://lists.debian.org/debian-ctte/2014/11/msg00071.html +[3]:http://www.itwire.com/business-it-news/open-source/66014-systemd-fallout-joey-hess-quits-debian-project +[4]:http://www.itwire.com/business-it-news/open-source/63121-garbees-casting-vote-means-systemd-is-debian-init +[5]:http://www.itwire.com/business-it-news/open-source/65781-pushback-against-systemd-in-debian-gathers-steam +[6]:https://www.debian.org/vote/2014/vote_003 +[7]:https://lists.debian.org/debian-ctte/2014/11/msg00052.html +[8]:http://www.chiark.greenend.org.uk/ucgi/~cjwatson/blosxom/ubuntu/2014-10-26-moving-on-but-not-too-far.html +[9]:https://lists.debian.org/debian-ctte/2014/11/msg00071.html \ No newline at end of file From a0fadb6b623b9396250ddca4966525be37a54451 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Thu, 20 Nov 2014 18:43:30 +0800 Subject: [PATCH 243/316] Update 20141120 Postfix tips and Troubleshooting Commands.md --- .../20141120 Postfix tips and Troubleshooting Commands.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141120 Postfix tips and Troubleshooting Commands.md b/sources/tech/20141120 Postfix tips and Troubleshooting Commands.md index 8f3fbbbe5a..8f13fe516f 100644 --- a/sources/tech/20141120 Postfix tips and Troubleshooting Commands.md +++ b/sources/tech/20141120 Postfix tips and Troubleshooting Commands.md @@ -1,3 +1,5 @@ + Vic020 + Postfix tips and Troubleshooting Commands ================================================================================ Here’s a list of stuff I user everyday and other email admins will also be using, Let me know if I missed anything @@ -52,4 +54,4 @@ via: http://techarena51.com/index.php/postfix-configuration-and-explanation-of-p 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://techarena51.com/ -[1]:http://www.apricot.net/apricot2004/doc/cd_content/24th%20February%202004/04%20-%20TTF%20Anti%20Spam%20&%20Anti%20Net%20Abuse%20-%20Suresh%20Ramasubramaniam/Devdas%20Bhagat.pdf \ No newline at end of file +[1]:http://www.apricot.net/apricot2004/doc/cd_content/24th%20February%202004/04%20-%20TTF%20Anti%20Spam%20&%20Anti%20Net%20Abuse%20-%20Suresh%20Ramasubramaniam/Devdas%20Bhagat.pdf From 5a744677f9b815be74bd16f25c1b4773e96898e0 Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Thu, 20 Nov 2014 21:45:17 +0800 Subject: [PATCH 244/316] [Translating] How to install an Opensource VPN Server on Linux --- ...20141120 How to install an Opensource VPN Server on Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20141120 How to install an Opensource VPN Server on Linux.md b/sources/tech/20141120 How to install an Opensource VPN Server on Linux.md index f7ceea5598..28d0afcbd4 100644 --- a/sources/tech/20141120 How to install an Opensource VPN Server on Linux.md +++ b/sources/tech/20141120 How to install an Opensource VPN Server on Linux.md @@ -1,3 +1,5 @@ +Translating--------geekpi + How to install an Opensource VPN Server on Linux ================================================================================ ![](http://techarena51.com/wp-content/uploads/2014/10/open-vpn.png) From 3f1e7345e42ea25f84f229effad6ea3decf0ac5b Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Thu, 20 Nov 2014 22:22:39 +0800 Subject: [PATCH 245/316] [Translated] How to install an Opensource VPN Server on Linux --- ...stall an Opensource VPN Server on Linux.md | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) rename {sources => translated}/tech/20141120 How to install an Opensource VPN Server on Linux.md (51%) diff --git a/sources/tech/20141120 How to install an Opensource VPN Server on Linux.md b/translated/tech/20141120 How to install an Opensource VPN Server on Linux.md similarity index 51% rename from sources/tech/20141120 How to install an Opensource VPN Server on Linux.md rename to translated/tech/20141120 How to install an Opensource VPN Server on Linux.md index 28d0afcbd4..2484c31700 100644 --- a/sources/tech/20141120 How to install an Opensource VPN Server on Linux.md +++ b/translated/tech/20141120 How to install an Opensource VPN Server on Linux.md @@ -1,20 +1,18 @@ -Translating--------geekpi - -How to install an Opensource VPN Server on Linux +如何在Linux上安装一个开源VPN服务器 ================================================================================ ![](http://techarena51.com/wp-content/uploads/2014/10/open-vpn.png) -One of the most concerning factors to me while browsing, Is how can I ensure that my data remains private and secure ? While searching for answers, I came cross a number of ways in which you can remain anonymous like using a proxy website. But still using a third party service was not assuring enough. What I needed was a software which could be installed and run by me thus ensuring that I and only I would have access to the data. +我上网时最担心的一件事情是,我该如何确保我的数据安全和隐私。在搜索答案的过程中,我找到了很多保持匿名的方法,比如使用代理网站。但是使用第三方的服务不能完全保证。我需要的是有一款软件可以我自己安装并运行,那样我就能确保只有我才能访问数据。 -So what is such a software called? +这款软件叫什么呢? -It’s called a VPN service or short for Virtual Private Network. It allows you to encrypt your data via SSL when you connect through it. Since the connection is encrypted even your ISP cannot see what your browsing. +它叫VPN服务,就是虚拟隐私网络的简称。它允许访问时通过SSL加密你的数据。因为是加密的连接,所以你的ISP不能看到你的浏览信息。 -In this Linux Tutorial , I will be installing an OpenVPN Access Server on CentOS 7 . OpenVPN is easy to use, OpenSource and has community based support. It has clients for Windows, Android, and Mac. +在本篇Linux教程中,我会在CentOS 7上安装一个OpenVPN服务。OpenVPN很容易使用,开源且拥有基于社区的支持。它的客户端有Windows、Android和Mac。 -### Step 1. Install OpenVPN Access Server on your Centos 7 Linux machine or [VPS][1]. ### +### 第一步: 在你的Linux机器或者 [VPS][1]上安装OpenVPN服务 ### -Download the package from https://openvpn.net/index.php/access-server/download-openvpn-as-sw.html, Ubuntu users can download appropriate packages and install OpenVPN Access Server on Ubuntu as well. +从https://openvpn.net/index.php/access-server/download-openvpn-as-sw.html下载安装包,Ubuntu用户也可以找到合适的安装包并安装。 [leo@vps ]$ cd /tmp [leo@vps tmp]$ wget http://swupdate.openvpn.org/as/openvpn-as-2.0.10-CentOS7.x86_64.rpm @@ -33,36 +31,36 @@ Download the package from https://openvpn.net/index.php/access-server/download-o Admin UI: https://yourhostIP:943/admin Client UI: https://yourhostIP:943/ -### Step 2: Setup a password for an OpenVPN client ### +### 第二步: 为 OpenVPN 客户端设置密码 ### [leo_g@vps ]$passwd openvpn -### Step 3: Log into the server via the admin Url https://yourhostIP:943/admin and start the server. ### +### 第三步: 通过管理URL https://yourhostIP:943/admin 登录并启动服务 ### ![](http://techarena51.com/wp-content/uploads/2014/10/open-vpn.png) -Type in the username “openvpn” and the password you set earlier +输入用户名 “openvpn” 和你先前设置的密码 ![](http://techarena51.com/wp-content/uploads/2014/10/open-vpn-1.png) -### Step 4: Install the client from the Client Url. ( It will give you an option to download the Installer) ### +### 第四步: 从客户端URL安装客户端 (它会给你一个选项下载安装程序) ### ![](http://techarena51.com/wp-content/uploads/2014/10/open-vpn-client-url.png) -You can read instructions [here][3] on how to install it for your OS. +你可以在[这里][3]看指导来了解如何在你的操作系统上安装。 -### Step 5: Connect to your server with your username and password that you created earlier. ### +### 第五步: 用你先前创建的用户名和密码连接你的服务器 ### ![](http://openvpn.net/images/howto/connecting/OpenVPN_Client_Connect_2.png) -That’s it, you can goto whatismyip.com and check your IP, should be that of your CentOS 7 OpenVPN Access Server. +就是这样,你可以访问whatismyip.com来查看你的IP,应该已经是你的CentOS 7上的OpenVPN的地址了。 -------------------------------------------------------------------------------- via: http://techarena51.com/index.php/how-to-install-an-opensource-vpn-server-on-linux/ 作者:[Leo G][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 185437ae5ffd54394324dcb8ff3112c0b6553f12 Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 21 Nov 2014 08:49:48 +0800 Subject: [PATCH 246/316] Update 20141120 How to configure and secure your Postfix email server.md --- ...20 How to configure and secure your Postfix email server.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141120 How to configure and secure your Postfix email server.md b/sources/tech/20141120 How to configure and secure your Postfix email server.md index 7ed5437542..0974c0e8c5 100644 --- a/sources/tech/20141120 How to configure and secure your Postfix email server.md +++ b/sources/tech/20141120 How to configure and secure your Postfix email server.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How to configure and secure your Postfix email server ================================================================================ ![](http://techarena51.com/wp-content/uploads/2014/08/postfix.png) @@ -138,4 +139,4 @@ via: http://techarena51.com/index.php/configure-secure-postfix-email-server/ [a]:http://techarena51.com/ [1]:http://documentation.mailgun.com/user_manual.html#smtp-relay -[2]:http://techarena51.com/index.php/postfix-configuration-and-explanation-of-parameters/ \ No newline at end of file +[2]:http://techarena51.com/index.php/postfix-configuration-and-explanation-of-parameters/ From 8d4ebf90425194613619c702df674aedb1701c54 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Fri, 21 Nov 2014 09:57:33 +0800 Subject: [PATCH 247/316] [Translated] 20141120 How to configure and secure Postfix email server.md --- ...re and secure your Postfix email server.md | 53 +++++++++---------- 1 file changed, 26 insertions(+), 27 deletions(-) rename {sources => translated}/tech/20141120 How to configure and secure your Postfix email server.md (53%) diff --git a/sources/tech/20141120 How to configure and secure your Postfix email server.md b/translated/tech/20141120 How to configure and secure your Postfix email server.md similarity index 53% rename from sources/tech/20141120 How to configure and secure your Postfix email server.md rename to translated/tech/20141120 How to configure and secure your Postfix email server.md index 0974c0e8c5..40170ec535 100644 --- a/sources/tech/20141120 How to configure and secure your Postfix email server.md +++ b/translated/tech/20141120 How to configure and secure your Postfix email server.md @@ -1,26 +1,25 @@ -Translating by GOLinux! -How to configure and secure your Postfix email server +Postfix邮件服务器的配置与安全加固 ================================================================================ ![](http://techarena51.com/wp-content/uploads/2014/08/postfix.png) -Once you have your application server up and running, you are going to need a good email server to deliver your emails. I have been using postfix for all my servers and below is the configuration I generally use. +当你启动并运行应用服务器后,你就需要一台好的邮件服务器来为你传递邮件。我为我所有的服务器开通了postfix邮件服务,下面就是我常用的配置。 -### Installation of Postfix on CentOS 6 ### +### CentOS 6上安装Postfix ### yum install postfix -Sendmail is installed by default, so it is better to stop and remove it +默认安装了Sendmail,所以最好将它停掉并移除。 service sendmail stop yum remove sendmail -Postfix contains **two configuration files main.cf and master.cf**, you will need to modify main.cf for basic configuration. Also, postfix parameters can be defined like shell variables and can be used with a dollar sign preceding them. They do not need to be defined before they are used. Postfix will only look for a parameter when it is needed at rumtime. +Postfix包含了**两个配置文件main.cf和master.cf**,对于基本的配置,你需要修改main.cf。同时,postfix可以像shell变量一样定义参数,并通过美元符号来调用。这些参数不需要再使用前定义,Postfix只在运行中需要时才会查询某个参数。 -### Configuring postfix ### +### 配置postfix ### vim /etc/postfix/main.cf -Uncomment the lines below +去掉以下行的注释 #Add the hostname of your machine myhostname = yourhostname.com @@ -41,11 +40,11 @@ Uncomment the lines below #Only forward emails for the local machine and not machines on the network. mynetworks_style = host -Start postfix +启动postfix service postfix start -This basic postfix configuration should enable your machine to send emails. You can verify the same by sending an email and checking “maillog” log file. +这些基本的postfix配置可以让你的机器发送邮件,你可以通过发送邮件并检查“maillog”日志文件来验证。 echo test mail | mail -s "test" leo@techarena51.com && sudo tail -f /var/log/maillog @@ -53,35 +52,34 @@ This basic postfix configuration should enable your machine to send emails. You Aug 25 14:16:21 vps postfix/smtp[32622]: E6A372DC065D: to=, relay=smtp.mailserver.org[50.56.21.176], delay=0.8, delays=0.1/0/0.43/0.27, dsn=2.0.0, status=sent (250 Great success) Aug 25 14:16:21 vps postfix/qmgr[5355]: E6A372DC065D: removed -But this configuration is not enough, as your emails will mostly end up in spam. You will need to add an SPF, PTR and DKIM record. You may still get emails delivered in spam due to your IP address being blacklisted, mostly due to a previous abuse of your vps. +但是,上述配置并不够,因为邮件服务大多数时候都会被垃圾邮件挤满,你需要添加SPF、PTR和DKIM记录。你的邮件仍然可能被当作垃圾邮件来投递,因为你的IP地址被列入了黑名单,大多数时候是因为你的vps先前被入侵了。 -An alternative or a better way would be to use a third party provider like Gmail or even Mailgun. -I use Mailgun as they give you 10,000 emails free every month as compared to Gmails 100 or so per day. +另外一种选择,或者说是更好的方式是使用第三方邮件提供商提供的邮件服务,如Gmail,或者甚至是Mailgun。我使用Mailgun,因为它们提供了每个月10000封免费电子邮件,而Gmail则提供了每天100封左右的邮件。 -In “/etc/postfix/main.cf” you will need to add “smtp.mailgun.com” as your “relayhost”, enable “SASL” authentication so postfix can connect and authenticate to the remote Mailgun server. +在“/etc/postfix/main.cf”中,你需要添加“smtp.mailgun.com”作为你的“转发主机”,并启用“SASL”验证,这样postfix就可以连接并验证到远程Mailgun服务器。 -Add or uncomment the following lines. +添加或取消以下行的注释。 relayhost = [smtp.mailgun.org] smtp_sasl_auth_enable = yes smtp_sasl_password_maps=static:your_username:your_password smtp_sasl_security_options=noanonymous -Postfix does not implement “SASL” authentication by itself, hence you will need to install “cyrus-sasl-plain”. +Postfix本身不会实施“SASL”验证,因此你需要安装“cyrus-sasl-plain”。 sudo yum install cyrus-sasl-plain -If you do not install this package on Centos 6 then you will get an error “SASL authentication failed; cannot authenticate to server smtp.mailgun.org[50.56.21.176]: no mechanism available)” +如果你不安装此包,那么你就会收到这条错误信息“SASL authentication failed; cannot authenticate to server smtp.mailgun.org[50.56.21.176]: no mechanism available)” -Restart postfix +重启postfix sudo service postfix restart -### Securing Postfix with TLS ### +### 使用TLS加固Postfix安全 ### -Postfix supports TLS a successor to SSL which allows you to encrypt data using key based authentication. I recommend reading http://www.postfix.org/TLS_README.html on how tls works with postfix. +Postfix支持TLS,它是SSL的后继者,允许你使用基于密钥的验证来加密数据。我推荐你阅读http://www.postfix.org/TLS_README.html,以了解tls是怎么和postfix一起工作的。 -In order to use TLS you will need to generate a private key and a certificate which is signed by a Certificate Authority. In this example, I will be using a Self Signed Certificate. +为了使用TLS,你需要生成一个私钥和一个由证书授权机构颁发的证书。在本例中,我将使用自颁发的证书。 sudo yum install mod_ssl openssl # Generate private key @@ -98,7 +96,7 @@ In order to use TLS you will need to generate a private key and a certificate wh cp smtp.key /etc/pki/tls/private/smtp.key cp smtp.csr /etc/pki/tls/private/smtp.csr -Open the postfix configuration files and add the following parameteres +打开postfix配置文件,然后添加以下参数。 sudo vim /etc/postfix/main.cf @@ -111,28 +109,29 @@ Open the postfix configuration files and add the following parameteres smtp_tls_CAfile = /etc/ssl/certs/ca.crt smtp_tls_loglevel = 1 -Security level “may” means announce STARTTLS support to remote SMTP clients, but clients do no need to use encryption., I have used it here as per [mailgun docs][1], but you can use “encrypt” if you want to force TLS encryption. +安全级别“may”意味着宣告对远程SMTP客户端上的STARTTLS的支持,但是客户端不需要使用加密。我在这里用它作为每个[mailgun文档][1],但是如果你想要强制使用TLS加密,可以使用“encrypt”。 service postfix restart #Send a test email echo test mail | mail -s "test" test@yourdomain.com && sudo tail -f /var/log/maillog -You should see the below message +你应该会看到以下信息 Aug 21 00:00:06 vps postfix/smtp[4997]: setting up TLS connection to smtp.mailgun.org[50.56.21.176]:587 Aug 21 00:00:06 vps postfix/smtp[4997]: Trusted TLS connection established to smtp.mailgun.org[50.56.21.176]:587: TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits) -You can comment out the below parameter once everything is successful. +如果一切正常,你可以注释掉以下参数。 + “smtp_tls_loglevel = 1” -For Troubleshooting I recommend you read [Postfix tips and Troubleshooting Commands][2](注:此文在同一个原文更新中) +对于故障排除,我推荐你阅读[Postfix小建议和排障命令][2] -------------------------------------------------------------------------------- via: http://techarena51.com/index.php/configure-secure-postfix-email-server/ 作者:[Leo G][a] -译者:[译者ID](https://github.com/译者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7e35587965e853adec5b4c2cc9b4bd0b129ca3a1 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Fri, 21 Nov 2014 16:29:30 +0800 Subject: [PATCH 248/316] translated --- ...stfix tips and Troubleshooting Commands.md | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/sources/tech/20141120 Postfix tips and Troubleshooting Commands.md b/sources/tech/20141120 Postfix tips and Troubleshooting Commands.md index 8f13fe516f..8df9b08e81 100644 --- a/sources/tech/20141120 Postfix tips and Troubleshooting Commands.md +++ b/sources/tech/20141120 Postfix tips and Troubleshooting Commands.md @@ -1,45 +1,43 @@ - Vic020 - -Postfix tips and Troubleshooting Commands +Postfix提示和故障排除命令 ================================================================================ -Here’s a list of stuff I user everyday and other email admins will also be using, Let me know if I missed anything +这里是一些我每天用的命令,当然,其他的email管理员也会使用,因此我写下来,以防我忘记。 -List/Print current mail queue +列出/打印当前邮件队列 # postqueue –p # mailq -If it’s a huge que, you can pipe it with tail +如果队列太长,可以使用tail管道读取。 # mailq | tail -Flush the queue +清理队列 # postqueue -f -Schedule immediate delivery of all mail that is queued for the named as domain.come. +立即交付所有某domain.com域名的所有邮件 # postqueue -s domain.com -TO delete all queue +删除所有队列 # postsuper -d ALL -To delete a particular message +删除指定的消息 # postsuper -d messageid -Reque the mail or resend particular mail +重新排队邮件或者重新发送指定邮件 #postfix -r msgid -To find mail version +查找邮件版本 #postconf -d mail_version mail_version = 2.6.6 -You can also follow the steps in the link below which is the most simple and well explained documentation available with regards to Configuring postfix. +你也可以查看下面的连接,这个连接有很多例子和不错的可用的解释文档,可以用来配置postfix. [Postfix Configuration - ][1] @@ -48,7 +46,7 @@ You can also follow the steps in the link below which is the most simple and wel via: http://techarena51.com/index.php/postfix-configuration-and-explanation-of-parameters/ 作者:[Leo G][a] -译者:[译者ID](https://github.com/译者ID) +译者:[Vic020](http://www.vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7221ad522cf4250388da66b0cdbe9d133d8a6c25 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Fri, 21 Nov 2014 16:31:34 +0800 Subject: [PATCH 249/316] moved --- .../tech/20141120 Postfix tips and Troubleshooting Commands.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20141120 Postfix tips and Troubleshooting Commands.md (100%) diff --git a/sources/tech/20141120 Postfix tips and Troubleshooting Commands.md b/translated/tech/20141120 Postfix tips and Troubleshooting Commands.md similarity index 100% rename from sources/tech/20141120 Postfix tips and Troubleshooting Commands.md rename to translated/tech/20141120 Postfix tips and Troubleshooting Commands.md From f87f093b5f5dc1a0e35ece2a7bd05d9d4f176122 Mon Sep 17 00:00:00 2001 From: runningwater Date: Fri, 21 Nov 2014 20:58:05 +0800 Subject: [PATCH 250/316] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD=20by=20runn?= =?UTF-8?q?ingwater?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...19 10 SCP Commands to Transfer Files or Folders in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md index 1042c67783..60309aca84 100644 --- a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md +++ b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md @@ -1,3 +1,4 @@ +(translating by runningwater) 10 SCP Commands to Transfer Files/Folders in Linux ================================================================================ Linux administrator should be familiar with **CLI** environment. Since **GUI** mode in Linux servers is not a common to be installed. **SSH** may the most popular protocol to enable Linux administrator to manage the servers via remote in secure way. Built-in with **SSH** command there is **SCP** command. **SCP** is used to copy file(s) between servers in secure way. @@ -230,7 +231,7 @@ That’s all about **SCP**. You can see **man pages** of **SCP** for more detail via: http://www.tecmint.com/scp-commands-examples/ 作者:[Pungki Arianto][a] -译者:[译者ID](https://github.com/译者ID) +译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 0dc9479b8532c8713caa7e10d6927b4c1009c1ba Mon Sep 17 00:00:00 2001 From: DoubleC <450760206@qq.com> Date: Fri, 21 Nov 2014 22:00:33 +0800 Subject: [PATCH 251/316] Update 20141111 Meet systemd the controversial project taking over a Linux distro near you.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申领文章 --- ...ontroversial project taking over a Linux distro near you.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20141111 Meet systemd the controversial project taking over a Linux distro near you.md b/sources/talk/20141111 Meet systemd the controversial project taking over a Linux distro near you.md index 9e87b1c111..5e2b41d40c 100644 --- a/sources/talk/20141111 Meet systemd the controversial project taking over a Linux distro near you.md +++ b/sources/talk/20141111 Meet systemd the controversial project taking over a Linux distro near you.md @@ -1,3 +1,4 @@ +spccman translating Meet systemd, the controversial project taking over a Linux distro near you ================================================================================ ![](http://core4.staticworld.net/images/article/2014/10/linux-attack-100528169-gallery.jpg) @@ -87,4 +88,4 @@ via: http://www.pcworld.com/article/2841873/meet-systemd-the-controversial-proje [14]:http://www.pcworld.com/article/2836984/why-ubuntu-1410-utopic-unicorns-humble-changes-are-the-calm-before-the-storm.html [15]:http://www.maximumpc.com/article/news/linus_torvalds_tosses_f-bombs_middle_fingers_and_general_disdain_nvidia [16]:http://www.zdnet.com/linus-torvalds-and-others-on-linuxs-systemd-7000033847/ -[17]:https://wiki.debian.org/Debate/initsystem/systemd \ No newline at end of file +[17]:https://wiki.debian.org/Debate/initsystem/systemd From 4bbc01058ce83f30ac78147092c63401c6e2aec8 Mon Sep 17 00:00:00 2001 From: coloka Date: Fri, 21 Nov 2014 22:32:26 +0800 Subject: [PATCH 252/316] new --- .../20141112 How to Debug CPU Regressions Using Flame Graphs.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md b/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md index dae63bf0d2..908cba9d2f 100644 --- a/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md +++ b/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md @@ -1,5 +1,6 @@ 翻译中 by coloka How to Debug CPU Regressions Using Flame Graphs +使用火焰图分析CPU性能下降问题 ================================================================================ How quickly can you debug a CPU performance regression? If your environment is complex and changing quickly, this becomes challenging with existing tools. If it takes a week to root cause a regression, the code may have changed multiple times, and now you have new regressions to debug. From 988a3f81572a1dbfa0db12b8943784200ae236b7 Mon Sep 17 00:00:00 2001 From: coloka Date: Fri, 21 Nov 2014 22:34:37 +0800 Subject: [PATCH 253/316] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90=20?= =?UTF-8?q?by=20coloka?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ebug CPU Regressions Using Flame Graphs.md | 109 ++++++++---------- 1 file changed, 51 insertions(+), 58 deletions(-) diff --git a/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md b/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md index 908cba9d2f..6be6bb8e8b 100644 --- a/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md +++ b/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md @@ -1,61 +1,59 @@ -翻译中 by coloka -How to Debug CPU Regressions Using Flame Graphs -使用火焰图分析CPU性能下降问题 +使用火焰图分析CPU性能回退问题 ================================================================================ -How quickly can you debug a CPU performance regression? If your environment is complex and changing quickly, this becomes challenging with existing tools. If it takes a week to root cause a regression, the code may have changed multiple times, and now you have new regressions to debug. +你能快速定位CPU性能回退的问题么? 如果你的工作环境非常复杂且变化快速,那么使用现有的工具是来定位这类问题是很具有挑战性的。当你花掉数周时间把根因找到时,代码已经又变更了好几轮,新的性能问题又冒了出来。 -Debugging CPU usage is easy in most cases, thanks to [CPU flame graphs][1]. To debug regressions, I would load before and after flame graphs in separate browser tabs, and then blink between them like searching for [Pluto][2]. It got the job done, but I wondered about a better way. +辛亏有了[CPU火焰图][1](flame graphs),CPU使用率的问题一般都比较好定位。但要处理性能回退问题,就要在修改前后的火焰图间,不断切换对比,来找出问题所在,这感觉就是像在太阳系中搜寻冥王星。虽然,这种方法可以解决问题,但我觉得应该会有更好的办法。 -Introducing **red/blue differential flame graphs**: +所以,下面就隆重介绍**红/蓝差分火焰图(red/blue differential flame graphs)**:

-This is an interactive SVG (direct [link][3]). The color shows **red for growth**, and **blue for reductions**. +上面是一副交互式SVG格式图片([链接][3])。图中使用了两种颜色来表示状态,**红色表示增长**,**蓝色表示衰减**。 -The size and shape of the flame graph is the same as a CPU flame graph for the second profile (y-axis is stack depth, x-axis is population, and the width of each frame is proportional to its presence in the profile; the top edge is what's actually running on CPU, and everything beneath it is ancestry.) +这张火焰图中各火焰的形状和大小都是和第二次抓取的profile文件对应的CPU火焰图是相同的。(其中,y轴表示栈的深度,x轴表示样本的总数,栈帧的宽度表示了profile文件中该函数出现的比例,最顶层表示正在运行的函数,再往下就是调用它的栈) -In this example, a workload saw a CPU increase after a system update. Here's the CPU flame graph ([SVG][4]): +在下面这个案例展示了,在系统升级后,一个工作负载的CPU使用率上升了。 下面是对应的CPU火焰图([SVG格式][4])

-Normally, the colors are picked at random to differentiate frames and towers. Red/blue differential flame graphs use color to show the difference between two profiles. +通常,在标准的火焰图中栈帧和栈塔的颜色是随机选择的。 而在红/蓝差分火焰图中,使用不同的颜色来表示两个profile文件中的差异部分。 -The deflate_slow() code and children were running more in the second profile, highlighted earlier as red frames. The cause was that ZFS compression was enabled in the system update, which it wasn't previously. +在第二个profile中deflate_slow()函数以及它后续调用的函数运行的次数要比前一次更多,所以在上图中这个栈帧被标为了红色。可以看出问题的原因是ZFS的压缩功能被使能了,而在系统升级前这项功能是关闭的。 -While this makes for a clear example, I didn't really need a differential flame graph for this one. Imagine tracking down subtle regressions, of less than 5%, and where the code is also more complex. +这个例子过于简单,我甚至可以不用差分火焰图也能分析出来。但想象一下,如果是在分析一个微小的性能下降,比如说小于5%,而且代码也更加复杂的时候,问题就为那么好处理了。 -### Red/Blue Differential Flame Graphs ### +### 红/蓝差分火焰图 ### -I've had many discussions about this for years, and finally wrote an implementation that I hope makes sense. It works like this: +这个事情我已经讨论了好几年了,最终我自己编写了一个我个人认为有价值的实现。它的工作原理是这样的: -1. Take stack profile 1. -1. Take stack profile 2. -1. Generate a flame graph using 2. (This sets the width of all frames using profile 2.) -1. Colorize the flame graph using the "2 - 1" delta. If a frame appeared more times in 2, it is red, less times, it is blue. The saturation is relative to the delta. +1. 抓取修改前的堆栈profile1文件 +1. 抓取修改后的堆栈profile2文件 +1. 使用profile2来生成火焰图。(这样栈帧的宽度就是以profile2文件为基准的) +1. 使用“2 - 1”的差异来对火焰图重新上色。上色的原则是,如果栈帧在profile2中出现出现的次数更多,则标为红色,否则标为蓝色。色彩是根据修改前后的差异来填充的。 -The intent is for use with before & after profiles, such as for **non-regression testing** or benchmarking code changes. The flame graph is drawn using the "after" profile (such that the frame widths show the current CPU consumption), and then colorized by the delta to show how we got there. +这样做的目的是,同时使用了修改前后的profile文件进行对比,在进行功能验证测试或者评估代码修改对性能的影响时,会非常有用。新的火焰图是基于修改后的profile文件生成(所以栈帧的宽度仍然显示了当前的CPU消耗),通过颜色的对比,就可以了解到系统性能差异的原因。 -The colors show the difference that function directly contributed (eg, being on-CPU), not its children. +只有对性能产生直接影响的函数才会标注颜色(比如说,正在运行的函数),它所调用的子函数不会重复标注。 -### Generation ### +### 生成红/蓝差分火焰图 ### -I've pushed a simple implementation to github (see [FlameGraph][5]), which includes a new program, difffolded.pl. To show how it works, here are the steps using Linux [perf_events][6] (you can use other profilers). +我已经把一个简单的代码实现推送到github上(见[火焰图][5]),其中新增了一个程序脚本,difffolded.pl。为了展示工具是如何工作的,用Linux [perf_events][6] 来演示一下操作步骤。(你也可以使用其他profiler) -#### Collect profile 1: #### +#### 抓取修改前的profile 1文件: #### # perf record -F 99 -a -g -- sleep 30 # perf script > out.stacks1 -#### Some time later (or after a code change), collect profile 2: #### +#### 一段时间后 (或者程序代码修改后), 抓取profile 2文件: #### # perf record -F 99 -a -g -- sleep 30 # perf script > out.stacks2 -#### Now fold these profile files, and generate a differential flame graph: #### +#### 现在将 profile 文件进行折叠(fold), 再生成差分火焰图: #### $ git clone --depth 1 http://github.com/brendangregg/FlameGraph $ cd FlameGraph @@ -63,78 +61,73 @@ I've pushed a simple implementation to github (see [FlameGraph][5]), which inclu $ ./stackcollapse-perf.pl ../out.stacks2 > out.folded2 $ ./difffolded.pl out.folded1 out.folded2 | ./flamegraph.pl > diff2.svg -difffolded.pl operates on the "folded" style of stack profiles, which are generated by the stackcollapse collection of tools (see the files in [FlameGraph][7]). It emits a three column output, with the folded stack trace and two value columns, one for each profile. Eg: +difffolded.p只能对“折叠”过的堆栈profile文件进行操作,折叠操作是由前面的stackcollapse系列脚本完成的。(见链接[火焰图][7])。 脚本共输出3列数据,其中一列代表折叠的调用栈,另两列为修改前后profile文件的统计数据。 func_a;func_b;func_c 31 33 [...] -This would mean the stack composed of "func_a()->func_b()->func_c()" was seen 31 times in profile 1, and in 33 times in profile 2. If flamegraph.pl is handed this three column input, it will automatically generate a red/blue differential flame graph. +在上面的例子中"func_a()->func_b()->func_c()" 代表调用栈,这个调用栈在profile1文件中共出现了31次,在profile2文件中共出现了33次。然后,使用flamegraph.pl脚本处理这3列数据,会自动生成一张红/蓝差分火焰图。 -### Options ### +### 其他选项 ### +再介绍一些有用的选项: +**difffolded.pl -n**:这个选项会把两个profile文件中的数据规范化,使其能相互匹配上。如果你不这样做,抓取到所有栈的统计值肯定会不相同,因为抓取的时间和CPU负载都不同。这样的话,看上去要么就是一片红(负载增加),要么就是一片蓝(负载下降)。-n选项对第一个profile文件进行了平衡,这样你就可以得到完整红/蓝图谱。 -Some options you'll want to know about: +**difffolded.pl -x**: 这个选项会把16进制的地址删掉。 profiler时常会无法将地址转换为符号,这样的话栈里就会有16进制地址。如果这个地址在两个profile文件中不同,这两个栈就会认为是不同的栈,而实际上它们是相同的。遇到这样的问题就用-x选项搞定。 -**difffolded.pl -n**: This normalizes the first profile count to match the second. If you don't do this, and take profiles at different times of day, then all the stack counts will naturally differ due to varied load. Everything will look red if the load increased, or blue if load decreased. The -n option balances the first profile, so you get the full red/blue spectrum. +**flamegraph.pl --negate**: 用于颠倒红/蓝配色。 在下面的章节中,会用到这个功能。 -**difffolded.pl -x**: This strips hex addresses. Sometimes profilers can't translate addresses into symbols, and include raw hex addresses. If these addresses differ between profiles, then they'll be shown as differences, when in fact the executed function was the same. Fix with -x. +### 不足之处 ### +虽然我的红/蓝差分火焰图很有用,但实际上还是有一个问题:如果一个代码执行路径完全消失了,那么在火焰图中就找不到地方来标注蓝色。你只能看到当前的CPU使用情况,而不知道为什么会变成这样。 -**flamegraph.pl --negate**: Inverts the red/blue scale. See the next section. - -### Negation ### - -While my red/blue differential flame graphs are useful, there is a problem: if code paths vanish completely in the second profile, then there's nothing to color blue. You'll be looking at the current CPU usage, but missing information on how we got there. - -One solution is to reverse the order of the profiles and draw a negated flame graph differential. Eg: +一个办法是,将对比顺序颠倒,画一个相反的差分火焰图。例如:

-Now the widths show the first profile, and the colors show what will happen. The blue highlighting on the right shows we're about to spend a lot less time in the CPU idle path. (Note that I usually filter out cpu_idle from the folded files, by including a grep -v cpu_idle.) +上面的火焰图是以修改前的profile文件为基准,颜色表达了将要发生的情况。右边使用蓝色高亮显示的部分,从中可以看出修改后CPU Idle消耗的CPU时间会变少。(其实,我通常会把cpu_idle给过滤掉,使用命令行grep -v cpu_idle) -This also highlights the vanishing code problem (or rather, doesn't highlight), as since compression wasn't enabled in the "before" profile, there is nothing to color red. +图中把消失的代码也突显了出来(或者应该是说,没有突显),因为修改前并没有使能压缩功能,所以它没有出现在修改前的profile文件了,也就没有了被表为红色的部分。 -This was generated using: +下面是对应的命令行: $ ./difffolded.pl out.folded2 out.folded1 | ./flamegraph.pl --negate > diff1.svg -Which, along with the earlier diff2.svg, gives us: +这样,把前面生成diff2.svg一并使用,我们就能得到: -- **diff1.svg**: widths show the before profile, colored by what WILL happen -- **diff2.svg**: widths show the after profile, colored by what DID happen +- **diff1.svg**: 宽度是以修改前profile文件为基准, 颜色表明将要发生的情况 +- **diff2.svg**: 宽度以修改后的profile文件为基准,颜色表明已经发生的情况 -If I were to automate this for non-regression testing, I'd generate and show both side by side. +如果是在做功能验证测试,我会同时生成这两张图。 -### CPI Flame Graphs ### +### CPI 火焰图 ### +这些脚本开始是被使用在[CPI火焰图][8]的分析上。与比较修改前后的profile文件不同,在分析CPI火焰图时,可以分析CPU工作周期与停顿周期的差异变化,这样可以凸显出CPU的工作状态来。 -I first used this code for my [CPI flame graphs][8], where instead of doing a difference between two profiles, I showed the difference between CPU cycles and stall cycles, which highlights what the CPUs were doing. - -### Other Differential Flame Graphs ### +### 其他的差分火焰图 ### [![](http://www.brendangregg.com/blog/images/2014/rm-flamegraph-diff.jpg)][9] -There's other ways flame graph differentials can be done. [Robert Mustacchi][10] experimented with [differentials][11] a while ago, and used an approach similar to a colored code review: only the difference is shown, colored red for added (increased) code paths, and blue for removed (decreased) code paths. The key difference is that the frame widths are now relative to the size of the difference only. An example is on the right. It's a good idea, but in practice I found it a bit weird, and hard to follow without the bigger picture context: a standard flame graph showing the full profile. +也有其他人做过类似的工作。[Robert Mustacchi][10]在不久前也做了一些尝试,他使用的方法类似于代码检视时的标色风格:只显示了差异的部分,红色表示新增(上升)的代码路径,蓝色表示删除(下降)的代码路径。一个关键的差别是栈帧的宽度只体现了差异的样本数。右边是一个例子。这个是个很好的主意,但在实际使用中会感觉有点奇怪,因为缺失了完整profile文件的上下文作为背景,这张图显得有些难以理解。 [![](http://www.brendangregg.com/blog/images/2014/corpaul-flamegraph-diff.png)][12] +Cor-Paul Bezemer也制作了一种差分显示方法[flamegraphdiff][13],他同时将3张火焰图放在同一张图中,修改前后的标准火焰图各一张,下面再补充了一张差分火焰图,但栈帧宽度也是差异的样本数。 上图是一个[例子][14]。在差分图中将鼠标移到栈帧上,3张图中同一栈帧都会被高亮显示。这种方法中补充了两张标准的火焰图,因此解决了上下文的问题。 -Cor-Paul Bezemer has created [flamegraphdiff][13], which shows the profile difference using three flame graphs at the same time: the standard before and after flame graphs, and then a differential flame graph where the widths show the difference. See the [example][14]. You can mouse-over frames in the differential, which highlights frames in all profiles. This solves the context problem, since you can see the standard flame graph profiles. +我们3人的差分火焰图,都各有所长。三者可以结合起来使用:Cor-Paul方法中上方的两张图,可以用我的diff1.svg 和 diff2.svg。下方的火焰图可以用Robert的方式。为保持一致性,下方的火焰图可以用我的着色方式:蓝->白->红。 -My red/blue flame graphs, Robert's hue differential, and Cor-Paul's triple-view, all have their strengths. These could be combined: the top two flame graphs in Cor-Paul's view could be my diff1.svg and diff2.svg. Then the bottom flame graph colored using Robert's approach. For consistency, the bottom flame graph could use the same palette range as mine: blue->white->red. +火焰图正在广泛传播中,现在很多公司都在使用它。如果大家知道有其他的实现差分火焰图的方式,我也不会感到惊讶。(请在评论中告诉我) -Flame graphs are spreading, and are now used by many companies. I wouldn't be surprised if there were already other implementations of flame graph differentials I didn't know about. (Leave a comment!) +### 结论 ### -### Conclusion ### +如果你遇到了性能回退问题,红/蓝差分火焰图是找到根因的最快方式。这种方式抓取了两张普通的火焰图,然后进行对比,并对差异部分进行标色:红色表示上升,蓝色表示下降。 差分火焰图是以当前(“修改后”)的profile文件作为基准,形状和大小都保持不变。因此你通过色彩的差异就能够很直观的找到差异部分,且可以看出为什么会有这样的差异。 -If you have problems with performance regressions, red/blue differential flame graphs may be the quickest way to find the root cause. These take a normal flame graph and then use colors to show the difference between two profiles: red for greater samples, and blue for fewer. The size and shape of the flame graph shows the current ("after") profile, so that you can easily see where the samples are based on the widths, and then the colors show how we got there: the profile difference. - -These differential flame graphs could also be generated by a nightly non-regression test suite, so that performance regressions can be quickly debugged after the fact. +差分火焰图可以应用到项目的每日构建中,这样性能回退的问题就可以及时地被发现和修正。 -------------------------------------------------------------------------------- via: http://www.brendangregg.com/blog/2014-11-09/differential-flame-graphs.html 作者:[Brendan Gregg][a] -译者:[译者ID](https://github.com/译者ID) +译者:[coloka](https://github.com/coloka) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 8fa646f2f4d7cd52183ea4a7bdd82c58f5557cab Mon Sep 17 00:00:00 2001 From: coloka Date: Fri, 21 Nov 2014 22:39:52 +0800 Subject: [PATCH 254/316] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E4=B8=AD?= =?UTF-8?q?=E3=80=9120141120=20How=20to=20visualize=20memory=20usage=20on?= =?UTF-8?q?=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20141120 How to visualize memory usage on Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20141120 How to visualize memory usage on Linux.md b/sources/tech/20141120 How to visualize memory usage on Linux.md index 8ed16436f1..a7b22cf4ca 100644 --- a/sources/tech/20141120 How to visualize memory usage on Linux.md +++ b/sources/tech/20141120 How to visualize memory usage on Linux.md @@ -1,3 +1,4 @@ +翻译中 by coloka How to visualize memory usage on Linux ================================================================================ Lack of sufficient physical memory can significantly hamper the performance of Linux desktop and server environments. When your desktop is sluggish, one of the first things to do is to free up RAMs. Memory usage is even more critical in multi-user shared hosting or mission-critical server environments, where different users or application threads constantly compete for more memory. From 52bff59cacfd5110fff61f7eb8f97d0bbb2964fc Mon Sep 17 00:00:00 2001 From: coloka Date: Fri, 21 Nov 2014 23:23:22 +0800 Subject: [PATCH 255/316] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=20source=20->=20translated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20141112 How to Debug CPU Regressions Using Flame Graphs.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md (100%) diff --git a/sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md b/translated/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md similarity index 100% rename from sources/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md rename to translated/tech/20141112 How to Debug CPU Regressions Using Flame Graphs.md From a813b7d0c4fe2e68bd66e49ca7152ca0ce7d8c11 Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Sat, 22 Nov 2014 10:17:19 +0800 Subject: [PATCH 256/316] [Translating] How To Make Raspberry Pi Boot In To GUI By Default --- ...141119 How To Make Raspberry Pi Boot In To GUI By Default.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md b/sources/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md index 3340ef1b08..2733df49b7 100644 --- a/sources/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md +++ b/sources/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md @@ -1,3 +1,5 @@ +Translating----------geekpi + How To Make Raspberry Pi Boot In To GUI By Default ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/raspberry_pi_gui.jpg) From 2db322fa4bf48dfa63610cffc8edc1b974779afd Mon Sep 17 00:00:00 2001 From: zhengsihua Date: Sat, 22 Nov 2014 10:56:06 +0800 Subject: [PATCH 257/316] translated --- ... Raspberry Pi Boot In To GUI By Default.md | 63 ------------------- ... Raspberry Pi Boot In To GUI By Default.md | 61 ++++++++++++++++++ 2 files changed, 61 insertions(+), 63 deletions(-) delete mode 100644 sources/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md create mode 100644 translated/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md diff --git a/sources/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md b/sources/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md deleted file mode 100644 index 2733df49b7..0000000000 --- a/sources/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md +++ /dev/null @@ -1,63 +0,0 @@ -Translating----------geekpi - -How To Make Raspberry Pi Boot In To GUI By Default -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/raspberry_pi_gui.jpg) - -It’s been some times since I bought Raspberry Pi but honestly, I hardly did anything with it. Since my Dell Ultrabook is in Dell service center (for weeks now), I started using Raspberry Pi once again as an alternative. - -I have previously written about [how to install Raspbian OS on a SD card in Ubuntu][1]. I did the same once again and installed Raspberry Pi once again. Only thing which I missed at the first run was to set up the GUI. And thus when I booted in Raspberry Pi again, I landed in command line directly. So how to you run Raspbian GUI then? - -### Set up Raspbian GUI boot ### - -When you install Raspbian for the first time, it indeed present several option to configure for the first use. But since I did not pay attention in a hurry, I just tabbed finish on that screen. If you faced the same situation and end up with just command line in Raspbian OS, no need to despair, it is very easy to set up Raspberry Pi to boot in GUI by default. Let’s see how to do it. - -### Step 1: ### - -When you are in the command line, log in with default user password (if you did not change it). Default user for Raspbian OS is pi and the default password should be raspberry. - -#### Step 2: #### - -When you are logged in, run the following command: - - sudo raspi-config - -This command will open up the Raspberry Pi configuration, the same which we saw in the first boot. - -#### Step 3: #### - -In this configuration screen, look for the option of **Enable Boot to Desktop/Scratch**. Select it using a combination of arrow, tab and/or enter keys (I forgot which ones are used). - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/Raspbian_Gui_setup.jpg) - -#### Step 4: #### - -In the next screen, choose **Desktop Login as user ‘Pi’ at the graphical desktop. -** - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/Raspbian_Gui_setup_1.jpg) - -#### Step 5: #### - -You’ll be asked to reboot afterwards. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/Raspbian_Gui_setup_2.jpg) - -On the next boot, you will be logged in to LXDE desktop environment. And you can enjoy the GUI experience with Raspberry Pi. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/raspbian-welcome-screen-gui.jpeg) - -I hope this tutorial helped you to set up your Raspberry Pi to boot in GUI by default. Feel free to drop your questions and suggestions in the comment box. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/raspberry-pi-gui-boot/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/Abhishek/ -[1]:http://itsfoss.com/tutorial-how-to-install-raspberry-pi-os-raspbian-wheezy/ \ No newline at end of file diff --git a/translated/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md b/translated/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md new file mode 100644 index 0000000000..098e626e87 --- /dev/null +++ b/translated/tech/20141119 How To Make Raspberry Pi Boot In To GUI By Default.md @@ -0,0 +1,61 @@ +如何让树莓派默认以图形界面启动 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/raspberry_pi_gui.jpg) + +我买树莓派已经有一段时间了,但是实话说我几乎还没有用它做过什么事情。自从我的Dell超级本送到Dell服务中心后(已经有数星期了),我再次开始使用树莓派作为替代。 + +我之前已经写过一篇[如何在Ubuntu中在SD卡上安装Raspbian系统][1]。我也重装了一次树莓派。第一次启动的时候我漏掉了一件事情就是设置图形界面。这样当我再次启动树莓派的时候,我直接进入了命令行。我该接下来如何运行Respbian图形界面呢? + +### 设置Raspbian图形启动 ### + +入Raspbian系统的命令行界面,不用失望,因为很容易设置树莓派以图形界面启动。让我们看看该如何做。 + +### 第一步: ### + +当你在命令行时,以默认的用户名和密码登录(如果你没有修改过)。Raspbian的默认用户是pi,默认密码应该是raspberry。 + +#### 第二步: #### + +当你登录后,运行下面的命令: + + sudo raspi-config + +这条命令会打开树莓派的配置,就像我们第一次启动看到的那样。 + +#### 第三步: #### + +在这个配置界面下, 寻找**Enable Boot to Desktop/Scratch**这个选项。用箭头、tab和/或者回车键的组合来选中它(我忘记该使用哪一个了)。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/Raspbian_Gui_setup.jpg) + +#### 第四步: #### + +下一屏中,选择**Desktop Login as user ‘Pi’ at the graphical desktop. +** + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/Raspbian_Gui_setup_1.jpg) + +#### 第五步: #### + +接下来你会被要求重启。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/Raspbian_Gui_setup_2.jpg) + +下次启动后,你会登录到LXDE桌面环境。接下来你就可以享受树莓派的图形界面了。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/raspbian-welcome-screen-gui.jpeg) + +我希望这边教程能够帮助你设置你的树莓派默认以图形界面启动。欢迎在评论区留下你的问题和建议。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/raspberry-pi-gui-boot/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/Abhishek/ +[1]:http://itsfoss.com/tutorial-how-to-install-raspberry-pi-os-raspbian-wheezy/ \ No newline at end of file From 2bd2708f9b16bc0e96a389f6bd28aabfc8145779 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 19 Nov 2014 22:20:23 +0800 Subject: [PATCH 258/316] PUB:20141017 pidstat - Monitor and Find Statistics for Linux Procesess @johnhoow --- ...and Find Statistics for Linux Procesess.md | 46 +++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-) rename {translated/tech => published}/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md (54%) diff --git a/translated/tech/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md b/published/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md similarity index 54% rename from translated/tech/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md rename to published/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md index 7709f77f11..94bc0c7444 100644 --- a/translated/tech/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md +++ b/published/20141017 pidstat - Monitor and Find Statistics for Linux Procesess.md @@ -1,10 +1,10 @@ pidstat - 监控并统计Linux进程的数据 ================================================================================ -**pidstat**命令用来监控被Linux内核管理的独立任务(进程)。它输出每个受内核管理的任务的相关信息。pidstat命令也可以用来监控特定进程的子进程。区间参数具体说明各个报告间的时间间隔。它的值为0(或者没有参数)说明进程的统计数据的时间是从系统启动开始计算的。 +**pidstat**命令用来监控被Linux内核管理的独立任务(进程)。它输出每个受内核管理的任务的相关信息。pidstat命令也可以用来监控特定进程的子进程。间隔参数用于指定每次报告间的时间间隔。它的值为0(或者没有参数)说明进程的统计数据的时间是从系统启动开始计算的。 ### 如何安装pidstat ### -pidstat 是sysstat软件套件的一部分,sysstat包含很多监控linux系统行为的工具,它能够从大多数linux发行版的软件源中获得。 +pidstat 是sysstat软件套件的一部分,sysstat包含很多监控linux系统状态的工具,它能够从大多数linux发行版的软件源中获得。 在Debian/Ubuntu系统中可以使用下面的命令来安装 @@ -16,7 +16,7 @@ CentOS/Fedora/RHEL版本的linux中则使用下面的命令: ### 使用pidstat ### -使用pidstat不加任何参数等价于加上-p但是只有正在活动的任务会被显示出来。 +使用pidstat不加任何参数等价于加上-p参数,但是只有正在活动的任务会被显示出来。 # pidstat @@ -24,13 +24,13 @@ CentOS/Fedora/RHEL版本的linux中则使用下面的命令: 在结果中你能看到如下内容: -- **PID** - 被监控的进程的进程号 -- **%usr** - 当在用户层执行(应用程序)时这个进程的cpu使用率。注意这个字段计算的cpu时间不包括在虚拟处理器中使用花去的时间。 -- **%system** - 这个进程在系统级别使用时的cpu使用率。 -- **%guest** - 在虚拟机中的cpu使用率 -- **%CPU** - 进程总的cpu使用率。在SMP环境(多处理器)中,cpu使用率会根据cpu的数量进行划分当你在命令行中输入-I参数。 -- **CPU** - 这个进程能够使用的处理器数目 -- **Command** - 这个进程的命令名称。 +- **PID** - 被监控的任务的进程号 +- **%usr** - 当在用户层执行(应用程序)时这个任务的cpu使用率,和 nice 优先级无关。注意这个字段计算的cpu时间不包括在虚拟处理器中花去的时间。 +- **%system** - 这个任务在系统层使用时的cpu使用率。 +- **%guest** - 任务花费在虚拟机上的cpu使用率(运行在虚拟处理器)。 +- **%CPU** - 任务总的cpu使用率。在SMP环境(多处理器)中,如果在命令行中输入-I参数的话,cpu使用率会除以你的cpu数量。 +- **CPU** - 正在运行这个任务的处理器编号。 +- **Command** - 这个任务的命令名称。 ### I/O 统计数据 ### @@ -42,12 +42,11 @@ CentOS/Fedora/RHEL版本的linux中则使用下面的命令: IO 输出会显示一些内的条目: -- **kB_rd/s** - 进程从硬盘上的读取速度 -- **kB_wr/s** - 进程向硬盘中的写入速度 -- **kB_ccwr/s** - 进程写入磁盘被取消的速率 +- **kB_rd/s** - 任务从硬盘上的读取速度(kb) +- **kB_wr/s** - 任务向硬盘中的写入速度(kb) +- **kB_ccwr/s** - 任务写入磁盘被取消的速率(kb) -### Page faults and memory usage ### -### Page faults和内存使用 ### +### 页面失败和内存使用 ### 使用-r标记你能够得到内存使用情况的数据。 @@ -55,10 +54,10 @@ IO 输出会显示一些内的条目: 重要的条目: -- **minflt/s** - 从内存中加载数据时每秒钟出现的小的错误的数目 -- **majflt/s** - 从内存中加载数据时每秒出现的较大错误的数目 -- **VSZ** - 虚拟容量:整个进程的虚拟内存使用 -- **RSS** - 长期的内存使用:进程非交换物理内存的使用 +- **minflt/s** - 从内存中加载数据时每秒出现的小的错误的数目,这些不要求从磁盘载入内存页面。 +- **majflt/s** - 从内存中加载数据时每秒出现的较大错误的数目,这些要求从磁盘载入内存页面。 +- **VSZ** - 虚拟容量:整个进程的虚拟内存使用(kb) +- **RSS** - 长期内存使用:任务的不可交换物理内存的使用量(kb) ### 举例 ### @@ -66,14 +65,13 @@ IO 输出会显示一些内的条目: # pidstat -r 2 5 -这会给你5份关于page faults的统计数据结果,间隔2s。这将会更容易的定位出现问题的进程。 +这会给你5份关于page faults的统计数据结果,间隔2秒。这将会更容易的定位出现问题的进程。 -**2.** 显示所有mysql server的子进程 +**2.** 显示所有mysql服务器的子进程 # pidstat -T CHILD -C mysql -**3.** To combine all statistics in a single report you can use: -**3.** 将所有的统计数据结合到一个简单的结果记录中: +**3.** 将所有的统计数据结合到一个便于阅读的单一报告中: # pidstat -urd -h @@ -83,7 +81,7 @@ via: http://linoxide.com/linux-command/linux-pidstat-monitor-statistics-proceses 作者:[Adrian Dinu][a] 译者:[John](https://github.com/johnhoow) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 6dd41fdc522dc5b213c2621358b4cec6bd8a96b5 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 20 Nov 2014 12:44:04 +0800 Subject: [PATCH 259/316] PUB:20141106 Quick Tip Allow Services Through Firewall In openSUSE @Vic020 --- ...6 Quick Tip Allow Services Through Firewall In openSUSE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md (94%) diff --git a/translated/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md b/published/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md similarity index 94% rename from translated/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md rename to published/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md index f184bc7566..f540639934 100644 --- a/translated/tech/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md +++ b/published/20141106 Quick Tip Allow Services Through Firewall In openSUSE.md @@ -1,4 +1,4 @@ -[小贴士] openSUSE设置服务服务通过防火墙 +小白技巧:openSUSE设置服务服务通过防火墙 ================================================================================ ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/openSUSE.png) @@ -24,7 +24,7 @@ via: http://www.unixmen.com/quick-tip-allow-services-firewall-opensuse/ 作者:[SK][a] 译者:[VicYu/Vic020](http://www.vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From c75a469c338c91aab8d0ffc95f2ab1739a8a01de Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 20 Nov 2014 13:08:02 +0800 Subject: [PATCH 260/316] PUB:20141106 timedatectl--Control Linux System Time and Date in Systemd @su-kaiyao --- ...ontrol Linux System Time and Date in Systemd.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/tech => published}/20141106 timedatectl--Control Linux System Time and Date in Systemd.md (68%) diff --git a/translated/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md b/published/20141106 timedatectl--Control Linux System Time and Date in Systemd.md similarity index 68% rename from translated/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md rename to published/20141106 timedatectl--Control Linux System Time and Date in Systemd.md index 4bed25a2b5..e3e4b1b6a3 100644 --- a/translated/tech/20141106 timedatectl--Control Linux System Time and Date in Systemd.md +++ b/published/20141106 timedatectl--Control Linux System Time and Date in Systemd.md @@ -1,7 +1,7 @@ -timedatectl - 管理Linux系统的时间和日期 +如何在 systemd 下管理Linux系统的时间和日期 === -**timedatectl**是用来查询和修改系统时间和配置的Linux应用程序。它是[系统服务管理][1]的一部分,并且允许你检查和修改系统时钟的配置。 +**timedatectl**是用来查询和修改系统时间和配置的Linux应用程序。它是[systemd 系统服务管理][1]的一部分,并且允许你检查和修改系统时钟的配置。 在这篇文章中,我们将涉及该小巧但十分重要应用程序的所有方面 @@ -41,19 +41,19 @@ timedatectl - 管理Linux系统的时间和日期 ### 设置本地时钟 ### -**实时时钟(RTC)**,通常被称为硬件时钟,完全独立于操作系统当前状态,甚至可以在计算机关闭的时候工作。你可以配置系统使用国际时间或当地时间维持RTC。注意,使用当地时区维持RTC并不完美支持,而且还有可能因为时区变化和夏令时调整引起许多问题。如果有可能,在UTC模式下保持RTC。这一做法的唯一问题是,其他操作系统可能不完全支持它(如果你在同一台机器上允许2个操作系统)。 +**实时时钟(RTC)**,通常被称为硬件时钟,完全独立于操作系统当前状态,甚至可以在计算机关闭的时候工作。你可以配置系统使用国际时间(UTC)或当地时间来校正RTC。注意,使用当地时区校正RTC并没有完美支持,而且还有可能因为时区变化和夏令时调整引起许多问题。如果有可能,在UTC模式下校正RTC。这一做法的唯一问题是,其他操作系统可能不完全支持它(如果你在同一台机器上运行2个操作系统的话)。 -使用UTC模式维持RTC,使用下面的命令: +使用UTC模式校正RTC,使用下面的命令: # timedatectl set-local-rtc 0 -使用当地时间维护,使用: +使用当地时间校正,使用: # timedatectl set-local-rtc 1 ### 设置NTP同步 ### -**网络时间协议(NTP)**是在分组交换计算机系统间进行时钟同步的,可变数据延迟的网络协议。NTP被设计使用[几毫秒的协调通用时间][2]来同步所有参与的计算机。如果你希望设置NTP同步,你可以使用set-ntp选项设置。使用“no”关闭NTP同步,使用“yes”开启。 +**网络时间协议(NTP)**是在分组交换、可变数据延迟的计算机系统间进行时钟同步的网络协议。NTP被设计使用[几毫秒的协调通用时间(UTC)][2]来同步所有参与的计算机。如果你希望设置NTP同步,你可以使用set-ntp选项设置。使用“no”关闭NTP同步,使用“yes”开启。 # timedatectl set-ntp yes @@ -63,7 +63,7 @@ via: http://linoxide.com/linux-command/timedatectl-change-time-date-systemd/ 作者:[Adrian Dinu][a] 译者:[su-kaiyao](https://github.com/su-kaiyao) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a5562536e3e4c08474f2911fc03f5d91077e0c62 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 20 Nov 2014 14:40:51 +0800 Subject: [PATCH 261/316] PUB:20141027 How to download an ISO image with BitTorrent fast and safely from the command line @wangjiezhe --- ...t fast and safely from the command line.md | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) rename {translated/tech => published}/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md (74%) diff --git a/translated/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md b/published/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md similarity index 74% rename from translated/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md rename to published/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md index 0c7f1126f5..2bfad6b78e 100644 --- a/translated/tech/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md +++ b/published/20141027 How to download an ISO image with BitTorrent fast and safely from the command line.md @@ -1,14 +1,14 @@ -如何使用命令行通过 BitTorrent 快速安全地下载 ISO 镜像 +如何在命令行下使用 BitTorrent 下载 ISO 镜像 ================================================================================ -如果你喜欢尝试最新版甚至是 beta 版的 Linux 发行版来满足你的好奇心,并始终保持是最新版,那么你就会时常受到下载较大的 ISO 镜像的烦恼。提供 ISO 的人通常会使用 ISO 镜像的 .torrent 文件来减少服务器的带宽消耗。P2P 下载对于使用者来说好处也是很明显的(就下载速度而言),特别是当流行的 Linux 发行版有新版本发布并上传供下载,每个人同时在下载做种的时候。 +如果你喜欢尝试最新版甚至是 beta 版的 Linux 发行版来满足你的好奇心,并始终保持是最新版,那么你就会时常遇到下载较大的 ISO 镜像的烦恼。提供 ISO 的人通常会使用 ISO 镜像的 .torrent 文件来减少服务器的带宽消耗。P2P 下载对于使用者来说好处也是很明显的(就下载速度而言),特别是当流行的 Linux 发行版有新版本发布并上传供下载,每个人同时在下载做种的时候。 -Ubuntu 14.10 (utopic Unicorn) 这周刚刚发布。因此现在在 BitTorrent 网络上应该有很多种子可以下载该版本。虽然有很多基于图形界面的 BitTorrent 客户端,我将展示**如何通过基于简单的命令行界面的 BitTorrent 客户端下载 ISO 镜像**,如果是在远程无图形界面的服务器上的话这会很方便。在这片教程靠后的部分,我还会演示**如何验证已下载的 ISO 镜像的完整性**。 +Ubuntu 14.10 (utopic Unicorn) 这刚刚发布不久,因此现在在 BitTorrent 网络上应该有很多种子可以下载该版本。虽然有很多基于图形界面的 BitTorrent 客户端,不过我将展示**如何通过基于简单的命令行界面的 BitTorrent 客户端下载 ISO 镜像**,如果是在远程无图形界面的服务器上的话这会很方便。在[另外一篇教程][4]里面,我还会演示**如何验证已下载的 ISO 镜像的完整性**。 我今天要使用的基于命令行的 BitTorrent 客户端是 transmission-cli。正如你可能知道的那样,[Transmission][1] 是最流行的基于图形界面的 BitTorrent 客户端之一。transmission-cli 是它的简装的命令行版本。 ### 在 Linux 上安装 Transmission-cli ### -要安装 **transmission-cli**,你不必安装完整的基于图形界面的 Transmission,这是一个很好的消息。 +要安装 **transmission-cli**,你不必安装完整的基于图形界面的 Transmission,这是听起来不错。 在 Debian、Ubuntu 或者是基于它们的发行版上: @@ -35,21 +35,21 @@ Ubuntu 14.10 (utopic Unicorn) 这周刚刚发布。因此现在在 BitTorrent ![](https://farm6.staticflickr.com/5605/15433651319_745df6633a_z.jpg) -程序下载 ISO 镜像完成后,你会在终端中看到“状态由未完成变为完成”的提示。要注意的是 transmission-cli 会继续运行并做种以便于其他下载者下载。按 Ctrl+C 来退出。 +程序下载 ISO 镜像完成后,你会在终端中看到“状态由未完成变为完成”的提示。要注意的是 transmission-cli 会继续运行并做种以便于其他下载者下载。可以按 Ctrl+C 来退出。 ### 为重复使用定制下载选项 ### -如果你是 **transmission-cli** 的重复使用者,那么值得花时间来熟悉一下它的命令行选项。 +如果你经常使用 **transmission-cli** ,那么值得花时间来熟悉一下它的命令行选项。 -"-w /path/to/download-directory" 选项指定下载文件保存的文件夹。 +- "-w /path/to/download-directory" 选项指定下载文件保存的文件夹。 -"-f /path/to/finish-script" 选项设置当前下载完成后要运行的脚本。注意 transmission-cli 默认在文件下载完成后继续运行。如果你想在成功下载完成后自动关闭 transmission-cli,你可以使用这个选项。下面这个简单的脚本可以完成这个功能。 +- "-f /path/to/finish-script" 选项设置当前下载完成后要运行的脚本。注意 transmission-cli 默认在文件下载完成后继续运行。如果你想在成功下载完成后自动关闭 transmission-cli,你可以使用这个选项。下面这个简单的脚本可以完成这个功能。 + + #!/bin/sh + sleep 10 + killall transmission-cli - #!/bin/sh - sleep 10 - killall transmission-cli - -如果你想为 transmission-cli 分配上传/下载带宽限制,你可以使用 “-d ” 和 “-u ” 选项。如果你不想限制带宽使用,仅仅指定 “D” 或 “-U” 选项即可。 +- 如果你想为 transmission-cli 分配上传/下载带宽限制,你可以使用 “-d ” 和 “-u ” 选项。如果你不想限制带宽使用,仅仅指定 “D” 或 “-U” 选项即可。 这有一个更高级的 transmission-cli 使用范例。在这个例子中,命令行客户端在成功下载后自动退出。下载速度不限而上传速度限制为 50KB/s。 @@ -95,7 +95,7 @@ Ubuntu 14.10 (utopic Unicorn) 这周刚刚发布。因此现在在 BitTorrent ![](https://farm6.staticflickr.com/5600/15433651369_d22905e65b_z.jpg) -这次你没有看到 “public key not found” 的错误信息。如果 SHA256SUMS 文件时有效的,你会看到 “Good signature from ” 的信息。注意到你还看到一个 “This key is not certified with a trusted signature” 的警告信息。基本上这个警告信息时告诉你对导入的公共密钥[指定任何明确的信任][3]。要避免这个警告,你可以选择指定完全信任导入的公共密钥,但你应该只有在通过其他方式审查了这个密钥之后才这样做。否则的话,你可以暂时忽略这个警告。 +这次你没有看到 “public key not found” 的错误信息。如果 SHA256SUMS 文件时有效的,你会看到 “Good signature from ” 的信息。注意到你还看到一个 “This key is not certified with a trusted signature” 的警告信息。基本上这个警告信息是告诉你对导入的公共密钥没有明确信任。要避免这个警告,你可以选择指定[完全信任][3]导入的公共密钥,但你应该只有在通过其他方式审查了这个密钥之后才这样做。否则的话,你可以暂时忽略这个警告。 在验证了 SHA256SUMS 文件的完整性后,最后一个步骤是比较已下载 ISO 文件的 SHA256 验校和和 SHA256SUMS 文件中对应的验校值。你可以使用 sha256sum 命令行工具来完成这个步骤。 @@ -115,7 +115,7 @@ via: http://xmodulo.com/download-iso-image-bittorrent-command-line.html 作者:[Dan Nanni][a] 译者:[wangjiezhe](https://github.com/wangjiezhe) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -123,3 +123,4 @@ via: http://xmodulo.com/download-iso-image-bittorrent-command-line.html [1]:https://www.transmissionbt.com/ [2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html [3]:http://xmodulo.com/verify-authenticity-integrity-downloaded-file.html +[4]:http://xmodulo.com/download-iso-image-bittorrent-command-line.html From 4436961b4842bae7d02e404568ac56c74efde07a Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 21 Nov 2014 14:53:58 +0800 Subject: [PATCH 262/316] PUB:03 - The history of Android @alim0x --- .../03 - The history of Android.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) rename {translated/talk => published}/The history of Android/03 - The history of Android.md (64%) diff --git a/translated/talk/The history of Android/03 - The history of Android.md b/published/The history of Android/03 - The history of Android.md similarity index 64% rename from translated/talk/The history of Android/03 - The history of Android.md rename to published/The history of Android/03 - The history of Android.md index 59bff6a71c..228637c89c 100644 --- a/translated/talk/The history of Android/03 - The history of Android.md +++ b/published/The history of Android/03 - The history of Android.md @@ -1,44 +1,44 @@ 安卓编年史 ================================================================================ ![从左到右:安卓0.9的主屏幕,添加的应用抽屉,以及快捷方式删除界面。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/09hom2e.png) -从左到右:安卓0.9的主屏幕,添加的应用抽屉,以及快捷方式删除界面。 -Ron Amadeo供图 + +*从左到右:安卓0.9的主屏幕,添加的应用抽屉,以及快捷方式删除界面* [Ron Amadeo供图] ### Android 0.9, Beta——嘿,这看起来很眼熟! ### -Milestone 5发布后六个月,2008年8月, [安卓0.9发布][1]。尽管安卓0.5 milestone版看起来“很早期”,到现在距离1.0发布也只有两个月时间了。因此,安卓0.9被打上了“beta”的标签。在移动操作系统之路的另一边,苹果在一个月前已经发布了iPhone的第二代产品——iPhone 3G。第二代的iPhone搭载了第二代iPhone OS。苹果同样发布了App Store应用商店并且已经开始接受应用提交。谷歌在追赶的道路上还有很多事情要做。 +Milestone 5发布后六个月,2008年8月, [安卓0.9发布][1]。尽管安卓0.5 milestone版看起来“很早期”,而此时距离1.0发布也只有两个月时间了。因此,安卓0.9被打上了“beta”的标签。在移动操作系统之路的另一边,苹果在一个月前已经发布了iPhone的第二代产品——iPhone 3G。第二代的iPhone搭载了第二代iPhone OS。苹果同样发布了App Store应用商店并且已经开始接受应用提交。谷歌在追赶的道路上还有很多事情要做。 -谷歌抛弃了很多在Milestone 5中引入的UI设计。所有设计都回炉重造进入全彩,白色方形图标背景被抛弃。尽管0.9还是一个模拟器版本,相比与安卓发布版来说看起来还是有点熟悉。安卓0.9有一个可用的桌面式主屏幕,一个特有的应用抽屉,多主屏,更多的应用程序,以及全功能(暂仅限第一方)小部件。 +谷歌抛弃了很多在Milestone 5中引入的UI设计。所有设计都回炉重造,采用全彩设计,白色方形图标背景被抛弃。尽管0.9还是一个模拟器版本,相比与安卓发布版来说看起来还是有点熟悉。安卓0.9有一个可用的桌面式主屏幕,一个特有的应用抽屉,多主屏,更多的应用程序,以及全功能(仅是它自身的)小部件。 Milestone 5中似乎没有计划支持安装21个以上的应用,但在安卓0.9中有一个垂直滚动的应用抽屉,可以通过屏幕底部的灰色标签打开。那时候,应用抽屉真的只是个抽屉。除了作为一个按钮使用,灰色标签还可以跟随你的手指被向上拉起,就像通知面板被拉下来那样。还额外添加了一些应用,像闹钟,计算器,图片,信息,以及照相机。 -这是第一个可以完全自定义主屏幕的版本。长按应用或小部件可以拖动它们。你可以把应用从抽屉中拖出到主屏幕快捷方式或长按一个已经存在的主屏幕快捷方式来移动它。 +这是第一个可以完全自定义主屏幕的版本。长按应用或小部件可以拖动它们。你可以把应用从抽屉中拖出到主屏幕快捷方式,或长按一个已经存在的主屏幕快捷方式来移动它。 -安卓0.9提醒我们谷歌那时候并不像今天这样优于设计。实际上,当时安卓的部分设计工作外包给了其它公司。你可以从时钟小插件看出一点端倪,它包含了“MALMO”字样,它是设计公司[The Astonishing Tribe][2]的所在地。 +安卓0.9提醒我们谷歌那时候并不像今天这样擅长设计。实际上,当时安卓的部分设计工作外包给了其它公司。你可以从时钟小插件看出一点端倪,它包含了“MALMO”字样,它是设计公司[The Astonishing Tribe][2]的所在地。 ![安卓0.9的“添加到主屏幕”对话框。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/widgets.png) -安卓0.9的“添加到主屏幕”对话框。 -Ron Amadeo供图 -安卓0.9中只有三个小部件:时钟,相框和搜索。搜索小部件在列表中甚至没有一个自己的图标——它用的是图片的图标。也许这里面最有趣的选项是壁纸选项中的“购买的图片”——一个“在非智能机时购买铃声是个普遍的现象”的遗留产物。谷歌要么准备出售壁纸,要么在某时已经加入了一个运营商。这家公司最终从未实现这个计划。 +*安卓0.9的“添加到主屏幕”对话框* [Ron Amadeo供图] + +安卓0.9中只有三个小部件:时钟,相框和搜索。搜索小部件在列表中甚至没有一个自己的图标——它用的是图片的图标。也许这里面最有趣的选项是壁纸选项中的“购买的图片”——一个“在非智能机时购买铃声是个普遍的现象”的遗留产物。谷歌要么准备出售壁纸,要么在某时已经加入了一个运营商。不过这家公司最终从未实现这个计划。 ![小部件集合,打开的文件夹,重命名文件夹,以及一个复制/粘贴菜单。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/fcp.png) -小部件集合,打开的文件夹,重命名文件夹,以及一个复制/粘贴菜单。 -Ron Amadeo供图 -在上面左侧的截图展示了谷歌搜索和图片小部件。除了给你一个框进行输入之外搜索小部件做不了其它事情——它没有自动补全或是附加的UI界面。在框里输入并点击“Go”会启动浏览器。底部的一排图标显示了一些菜单中长按得到的“快捷方式”,它创建了图标并将应用启动到特定屏幕。独立的联系人,浏览器书签,以及音乐播放列表都是0.9中可以被添加到主屏幕上的快捷方式。 +*小部件集合,打开的文件夹,重命名文件夹,以及一个复制/粘贴菜单* [Ron Amadeo供图] + +在上面左侧的截图展示了谷歌搜索和图片小部件。除了给你一个框进行输入之外,搜索小部件做不了其它事情——它没有自动补全或是附加的UI界面。在框里输入并点击“Go”会启动浏览器。底部的一排图标显示了一些菜单中通过长按得到的“快捷方式”,它会创建图标并将应用启动到特定屏幕。独立的联系人,浏览器书签,以及音乐播放列表都是0.9中可以被添加到主屏幕上的快捷方式。 “文件夹”是快捷方式标题下的一个选项,尽管它并不是任何东西的快捷方式。一旦创建了一个空文件夹,图标就可以被移动进去并重新排列。不像今天,那时候的文件夹里有什么并不反映在文件夹图标上,它一直是一个简单的,白色的,看起来空空的文件夹图标。 0.9同样是第一个拥有系统级别复制/粘贴支持的安卓版本。长按任意文本框会唤出一个对话框,从而让你保存或撤销剪贴板中的文本。iOS直到近两年后才支持复制/粘贴,所以在一段时间内,这是安卓的特色之一——以及许多网络争议的源头。 ![从左到右:安卓0.9的新菜单,最近使用应用,电源选项,以及锁屏。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/stuff.jpg) -从左到右:安卓0.9的新菜单,最近使用应用,电源选项,以及锁屏。 -Ron Amadeo供图 -安卓0.9真正地开始显示出了它的成熟。主屏幕有完整的菜单选项,包括设置(尽管它还不能正常运作)以及搜索按钮(因为当你搜索的时候谷歌喜欢)。从那时起菜单的设计便已经最终成型,直到安卓2.3它转变成了黑色。 +*从左到右:安卓0.9的新菜单,最近使用应用,电源选项,以及锁屏* [Ron Amadeo供图] -长按实体Home键会唤出一个3x2方格的最近使用应用菜单,这是一个一直持续到安卓3.0的设计。最近使用应用菜单会将背景显示模糊化,但这个设计用在这里显得有些奇怪,在其它弹窗比如“添加到主屏幕”对话框或是主屏幕文件夹视图之中并没有用到该设计。电源菜单至少包含在了背景模糊设计组之中,它的图标经过了重新设计,并且功能的对应名称更改得更容易让人接受。不过电源菜单图标缺乏填充,显得有些拥挤和不雅观。 +安卓0.9真正地开始显示出了它的成熟。主屏幕有完整的菜单选项,包括设置(尽管它还不能正常运作)以及搜索按钮(谷歌肯定很喜欢你去搜索)。从那时起菜单的设计便已经最终成型,直到安卓2.3它转变成了黑色。 + +长按实体Home键会唤出一个3x2方格的“最近使用应用”的菜单,这是一个一直持续到安卓3.0的设计。“最近使用应用”菜单会将背景显示模糊化,但这个设计用在这里显得有些奇怪,在其它弹窗比如“添加到主屏幕”对话框或是主屏幕文件夹视图之中并没有用到该设计。电源菜单至少包含在了背景模糊设计组之中,它的图标经过了重新设计,并且功能的对应名称更改得更容易让人接受。不过电源菜单图标缺乏填充,显得有些拥挤和不雅观。 安卓0.9以其锁屏为特色,虽然是非常基础的样子。黑色和灰色的锁屏没有任何屏幕解锁的选项——你需要点击实体菜单键。 @@ -54,7 +54,7 @@ Ron Amadeo供图 via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/3/ -译者:[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 a92cdfc2e86628214e4b3eeeaa0b89f8f4f2cf8b Mon Sep 17 00:00:00 2001 From: johnhoow Date: Sat, 22 Nov 2014 17:02:40 +0800 Subject: [PATCH 263/316] johnhoow translating --- .../tech/20141120 How to visualize memory usage on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141120 How to visualize memory usage on Linux.md b/sources/tech/20141120 How to visualize memory usage on Linux.md index 8ed16436f1..446af6629c 100644 --- a/sources/tech/20141120 How to visualize memory usage on Linux.md +++ b/sources/tech/20141120 How to visualize memory usage on Linux.md @@ -1,3 +1,4 @@ +johnhoow translating... How to visualize memory usage on Linux ================================================================================ Lack of sufficient physical memory can significantly hamper the performance of Linux desktop and server environments. When your desktop is sluggish, one of the first things to do is to free up RAMs. Memory usage is even more critical in multi-user shared hosting or mission-critical server environments, where different users or application threads constantly compete for more memory. @@ -84,4 +85,4 @@ via: http://xmodulo.com/visualize-memory-usage-linux.html [a]:http://xmodulo.com/author/nanni [1]:http://www.selenic.com/smem/ -[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html From d0cd7a648fde3e6cc7b4b320064c2db3868ca7ca Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Sat, 22 Nov 2014 20:57:33 +0800 Subject: [PATCH 264/316] Translating by ZTinoZ --- ...x FAQs with Answers--How to install phpMyAdmin on CentOS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141118 Linux FAQs with Answers--How to install phpMyAdmin on CentOS.md b/sources/tech/20141118 Linux FAQs with Answers--How to install phpMyAdmin on CentOS.md index 97b21584c4..e655c257e8 100644 --- a/sources/tech/20141118 Linux FAQs with Answers--How to install phpMyAdmin on CentOS.md +++ b/sources/tech/20141118 Linux FAQs with Answers--How to install phpMyAdmin on CentOS.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ Linux FAQs with Answers--How to install phpMyAdmin on CentOS ================================================================================ > **Question**: I am running a MySQL/MariaDB server on CentOS, and I would like to manage its databases via web-based interface using phpMyAdmin. What is a proper way to install phpMyAdmin on CentOS? @@ -176,4 +177,4 @@ via: http://ask.xmodulo.com/install-phpmyadmin-centos.html [17]: [18]: [19]: -[20]: \ No newline at end of file +[20]: From df66dcc31549c0db544e9fa96d4ffe342b0cd333 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 22 Nov 2014 22:01:18 +0800 Subject: [PATCH 265/316] PUB:20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely @ZTinoZ --- ...ith 60 Bug Fixes v4.4 Shaping Up Nicely.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) rename {translated/news => published}/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md (70%) diff --git a/translated/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md b/published/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md similarity index 70% rename from translated/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md rename to published/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md index f0d72fc07b..34319b75e3 100644 --- a/translated/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md +++ b/published/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md @@ -1,14 +1,15 @@ -修复了60个bug的LibreOffice 4.3.4正式发布,4.4版本开发工作有序进行中 +修复了60个bug的LibreOffice 4.3.4正式发布 ================================================================================ + ![](http://www.omgubuntu.co.uk/wp-content/uploads/2010/12/libreoffice.png) -**[上两周][1], 文档基金会带着它的开源LibreOffice生产力套件的又一个次版本回来了。** +**[前一段时间][1], 文档基金会带着它的开源LibreOffice生产力套件的又一个小版本更新回来了。** -LibreOffice 4.3.4,新系列中的第四个次版本,是单独由修复好的bug构成的一个版本,不出乎意料地以点版本形式发行。 +LibreOffice 4.3.4,新系列中的第四个次版本,该版本只包含 BUG 修复,按计划发布了。 -除了增加了即视感,基金会所说的在developers’ butterfly net上被揪出来并且修复的bug数量大概有:60个左右。 +可以看到的变化是,如基金会所说的在developers’ butterfly net上被揪出来并且修复的bug数量大概有:60个左右。 -- 排序操作现在还是默认为旧的样式(Calc) +- 排序操作现在还是默认为旧式风格(Calc) - 在预览后恢复焦点窗口(Impress) - 图表向导对话框不再是‘切除’式 - 修复了记录改变时的字数统计问题 (Writer) @@ -28,13 +29,13 @@ LibreOffice 4.3.4,新系列中的第四个次版本,是单独由修复好的 ![Info bar coming in LibreOffice 4.4](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/libreoffice-infobar.jpg) -来自LibreOffice 4.4的信息栏 +*来自LibreOffice 4.4的信息栏* -LibreOffice 4.4应该给予大家多一点希望。 +LibreOffice 4.4应该会让大家更多期望。 [维基上讲述了][4]正在进行中的不间断大范围GUI调整,包括一个新的颜色选择器,重新设计的段落行距选择器和一个在凸显部位表示该文件是否为只读模式的信息栏。 -虽然以上大规模的界面变动我知道一些桌面社区的抗议声不断,但是他们还是朝着正确的方向稳步前进。 +虽然我知道一些桌面社区对这些大规模的界面变动的抗议声不断,但是他们还是朝着正确的方向稳步前进。 要记住,在一些必要情况下,LibreOffice对于企业和机构来说是一款非常重要的软件。在外观和布局上有任何引人注目的修改都会引发一串连锁效应。 @@ -46,7 +47,7 @@ via: http://www.omgubuntu.co.uk/2014/11/libreoffice-4-3-4-arrives-bundle-bug-fix 作者:[Joey-Elijah Sneddon][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From e95ffded0019d13d8478d520f801ad2c6a29f0a9 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 23 Nov 2014 11:09:06 +0800 Subject: [PATCH 266/316] PUB:20141027 Handy Disk Image Tools @barney-ro --- .../20141027 Handy Disk Image Tools.md | 108 +++++++++--------- 1 file changed, 56 insertions(+), 52 deletions(-) rename {translated/share => published}/20141027 Handy Disk Image Tools.md (54%) diff --git a/translated/share/20141027 Handy Disk Image Tools.md b/published/20141027 Handy Disk Image Tools.md similarity index 54% rename from translated/share/20141027 Handy Disk Image Tools.md rename to published/20141027 Handy Disk Image Tools.md index 4f96bccede..418af42ed2 100644 --- a/translated/share/20141027 Handy Disk Image Tools.md +++ b/published/20141027 Handy Disk Image Tools.md @@ -1,31 +1,30 @@ -不得不说的磁盘镜像工具 +Linux 下易用的光盘镜像管理工具 ================================================================================ -磁盘镜像包括整个磁盘卷的文件或者是全部的存储设备的数据,比如说硬盘,光盘(DVD,CD,蓝光光碟),磁带机,USB闪存,软盘。一个完整的磁盘镜像应该像在原来的存储设备上一样完整、准确,包括数据和结构信息。 +磁盘镜像包括了整个磁盘卷的文件或者是全部的存储设备的数据,比如说硬盘,光盘(DVD,CD,蓝光光碟),磁带机,USB闪存,软盘。一个完整的磁盘镜像应该包含与原来的存储设备上一样完整、准确,包括数据和结构信息。 -磁盘镜像文件格式可以是开放的标准,像ISO格式的光盘镜像,或者是专有的特别的软件应用程序。"ISO"这个名字来源于用CD存储的ISO 9660文件系统。但是,当用户转向Linux的时候,经常遇到这样的问题,需要把专有的的镜像格式转换为开放的格式。 +磁盘镜像文件格式可以是采用开放的标准,像ISO格式的光盘镜像,或者是专有的软件应用程序的特定格式。"ISO"这个名字来源于用CD存储的ISO 9660文件系统。但是,当用户转向Linux的时候,经常遇到这样的问题,需要把专有的的镜像格式转换为开放的格式。 磁盘镜像有很多不同的用处,像烧录光盘,系统备份,数据恢复,硬盘克隆,电子取证和提供操作系统(即LiveCD/DVDs)。 -有很多不同非方法可以把ISO镜像挂载到Linux系统下。强大的mount 命令给我们提供了一个简单的解决方案。但是如果你需要很多工具来操作磁盘镜像,你可以试一试下面的这些完美的开源工具。 +有很多不同的方法可以把ISO镜像挂载到Linux系统下。强大的mount 命令给我们提供了一个简单的解决方案。但是如果你需要很多工具来操作磁盘镜像,你可以试一试下面的这些强大的开源工具。 很多工具还没有看到最新的版本,所以如果你正在寻找一个很好用的开源工具,你也可以加入,一起来为开源做出一点贡献。 ----------- +### Furius ISO Mount -![](http://www.linuxlinks.com/portal/content2/png/FuriusISOMount.png) ![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-FuriusISOMountTool.png) -Furius ISO Mount是一个简单易用的开源应用程序用来挂载镜像文件,它支持直接打开ISO,IMG,BIN,MDF和NRG格式的镜像而不用把他们烧录到磁盘。 +Furius ISO Mount是一个简单易用的开源应用程序,可以用来挂载镜像文件,它支持直接打开ISO,IMG,BIN,MDF和NRG格式的镜像而不用把他们烧录到磁盘。 特性: - 支持自动挂载ISO, IMG, BIN, MDF and NRG镜像文件 -- 支持通过loop 挂载 UDF 镜像 +- 支持通过 loop 方式挂载 UDF 镜像 - 自动在根目录创建挂载点 - 自动解挂镜像文件 - 自动删除挂载目录,并返回到主目录之前的状态 -- 自动存档最近10次挂载历史 +- 自动记录最近10次挂载历史 - 支持挂载多个镜像文件 - 支持烧录ISO文件及IMG文件到光盘 - 支持MD5校验和SHA1校验 @@ -33,14 +32,14 @@ Furius ISO Mount是一个简单易用的开源应用程序用来挂载镜像文 - 自动创建手动挂载和解挂的日志文件 - 语言支持(目前支持保加利亚语,中文(简体),捷克语,荷兰语,法语,德语,匈牙利语,意大利语,希腊语,日语,波兰语,葡萄牙语,俄语,斯洛文尼亚语,西班牙语,瑞典语和土耳其语) +--- - 项目网址: [launchpad.net/furiusisomount/][1] - 开发者: Dean Harris (Marcus Furius) - 许可: GNU GPL v3 - 版本号: 0.11.3.1 ----------- -![](http://www.linuxlinks.com/portal/content2/png/fuseiso.png) +###fuseiso ![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-fuseiso.png) @@ -50,44 +49,46 @@ fuseiso 是用来挂载ISO文件系统的一个开源的安全模块。 特性: -- 支持读ISO,BIN和NRG镜像,包括ISO9660文件系统 -- 支持普通的ISO9660级别1和级别2 +- 支持读ISO,BIN和NRG镜像,包括ISO 9660文件系统 +- 支持普通的ISO 9660级别1和级别2 - 支持一些常用的扩展,想Joliet,RockRidge和zisofs - 支持非标准的镜像,包括CloneCD's IMGs 、Alcohol 120%'s MDFs 因为他们的格式看起来恰好像BIN镜像一样 +--- + - 项目网址: [sourceforge.net/projects/fuseiso][2] - 开发者: Dmitry Morozhnikov - 许可: GNU GPL v2 - 版本号: 20070708 ----------- -![](http://www.linuxlinks.com/portal/content2/png/iat.png) +###iat ![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-iat.png) -iat(Iso9660分析工具)是一个通用的开源工具,能够检测很多不同镜像格式文件的结构,包括BIN,MDF,PDI,CDI,NRG和B5I,并转化成ISO-9660格式. +iat(Iso 9660分析工具)是一个通用的开源工具,能够检测很多不同镜像格式文件的结构,包括BIN,MDF,PDI,CDI,NRG和B5I,并转化成ISO 9660格式. 特性: -- 支持读(输入)NRG,MDF,PDI,CDI,BIN,CUE 和B5I镜像 -- 支持用cd 刻录机直接烧录光盘镜像 +- 支持读取(输入)NRG,MDF,PDI,CDI,BIN,CUE 和B5I镜像 +- 支持用 cd 刻录机直接烧录光盘镜像 - 输出信息包括:进度条,块大小,ECC扇形分区(大小),头分区(大小),镜像偏移地址等等 +--- + - 项目网址: [sourceforge.net/projects/iat.berlios][3] - 开发者: Salvatore Santagati - 许可: GNU GPL v2 - 版本号: 0.1.3 ----------- -![](http://www.linuxlinks.com/portal/content2/png/AcetoneISO.png) +###AcetoneISO ![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-AcetoneISO.png) AcetoneISO 是一个功能丰富的开源图形化应用程序,用来挂载和管理CD/DVD镜像。 -当你打开这个程序,你就会看到一个图形化的文件管理器用来挂载镜像文件,包括专有的镜像格式,也包括像ISO, BIN, NRG, MDF, IMG 等等,并且允许您执行一系列的动作。 +当你打开这个程序,你就会看到一个图形化的文件管理器用来挂载镜像文件,包括专有的镜像格式,也包括像ISO, BIN, NRG, MDF, IMG 等等,并且允许您执行一系列的操作。 AcetoneISO是用QT 4写的,也就是说,对于基于QT的桌面环境能很好的兼容,像KDE,LXQT或是Razor-qt。 @@ -95,57 +96,60 @@ AcetoneISO是用QT 4写的,也就是说,对于基于QT的桌面环境能很 特性: -- 支持挂载大多数windowns 镜像,在一个简洁易用的界面 -- 支持所有镜像格式转换到ISO,或者是从中提取内容。 -- 支持加密,压缩,解压任何类型的镜像 -- 支持转换DVD成xvid avi,支持任何格式的转换成xvid avi -- 支持从录像里提取声音 -- 支持从不同格式中提取镜像文件,包括bin mdf nrg img daa dmg cdi b5i bwi pdi -- 支持用Kaffeine / VLC / SMplayer播放DVD镜像,可以从Amazon 自动下载。 -- 支持从文件夹或者是CD/DVD生成ISO镜像 -- 支持文件MD5校验,或者是生成一个MD5校验码 -- 支持计算镜像的ShaSums,以128,256和384位的速度 +- 支持挂载大多数windows 镜像,界面简洁易用 +- 可以将其所有支持镜像格式转换到ISO,或者是从中提取内容 +- 加密,压缩,解压任何类型的镜像 +- 转换DVD成xvid avi,支持将各种常规视频格式转换成xvid avi +- 从视频里提取声音 +- 从不同格式中提取镜像中的文件,包括bin mdf nrg img daa dmg cdi b5i bwi pdi +- 用Kaffeine / VLC / SMplayer播放DVD镜像,可以从Amazon 自动下载封面。 +- 从文件夹或者是CD/DVD生成ISO镜像 +- 可以做镜像的MD5校验,或者是生成镜像的MD5校验码 +- 计算镜像的ShaSums(128,256和384位) - 支持加密,解密一个镜像文件 -- 支持以M字节的速度,分开、合并镜像 -- 支持高比例压缩镜像成7z 格式 -- 支持翻录PSX CD成BIN格式,以便在ePSXe/pSX模拟器里运行 -- 支持修复CUE文件为BIN和IMG格式 -- 支持把MAC OS的DMG镜像转换成可挂载的镜像 -- 支持从指定的文件夹中挂载镜像 -- 支持创建数据库来管理一个大的镜像集合 -- 支持从CD/DVD 或者是ISO镜像中提取启动文件 -- 支持备份CD成BIN镜像 -- 支持简单快速的把DVD翻录成Xvid AVI -- 支持简单快速的把常见的视频(avi, mpeg, mov, wmv, asf)转换成Xvid AVI -- 支持简单快速的把FLV 换换成AVI 格式 -- 支持从YouTube和一些视频网站下载视频 -- 支持提取一个有密码的RAR存档 -- 支持转换任何的视频到索尼便携式PSP上 +- 按兆数分拆和合并镜像 +- 以高压缩比将镜像压缩成7z 格式 +- 翻录PSX CD成BIN格式,以便在ePSXe/pSX模拟器里运行 +- 为BIN和IMG格式恢复丢失的 CUE 文件 +- 把MAC OS的DMG镜像转换成可挂载的镜像 +- 从指定的文件夹中挂载镜像 +- 创建数据库来管理一个大的镜像集合 +- 从CD/DVD 或者是ISO镜像中提取启动文件 +- 备份CD成BIN镜像 +- 简单快速的把DVD翻录成Xvid AVI +- 简单快速的把常见的视频(avi, mpeg, mov, wmv, asf)转换成Xvid AVI +- 简单快速的把FLV 换换成AVI 格式 +- 从YouTube和一些视频网站下载视频 +- 提取一个有密码的RAR存档 +- 支持转换任何的视频到PSP上 - 国际化的语言支持支持(英语,意大利语,波兰语,西班牙语,罗马尼亚语,匈牙利语,德语,捷克语和俄语) +--- + - 项目网址: [sourceforge.net/projects/acetoneiso][4] - 开发者: Marco Di Antonio - 许可: GNU GPL v3 - 版本号: 2.3 ----------- -![](http://www.linuxlinks.com/portal/content2/png/ISOMaster.png) +###ISO Master ![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-ISOMaster.png) -ISO Master是一个开源、易用的、图形化CD 镜像编辑器,适用于Linux 和BSD 。可以从ISO 里提取文件,给ISO 添加文件,创建一个可引导的ISO,这些都是在一个可视化的用户界面完成的。可以打开ISO,NRG 和一些MDF文件,但是只能保存成ISO 格式。 +ISO Master是一个开源、易用的、图形化CD 镜像编辑器,适用于Linux 和BSD 。可以从ISO 里提取文件,给ISO 里面添加文件,创建一个可引导的ISO,这些都是在一个可视化的用户界面完成的。可以打开ISO,NRG 和一些MDF文件,但是只能保存成ISO 格式。 -ISO Master 是基于bkisofs 创建的,一个简单、稳定的阅读库,修改和编写ISO 镜像,支持Joliet, RockRidge 和EL Torito扩展, +ISO Master 是基于bkisofs 创建的,这是一个简单、稳定的阅读,修改和编写ISO 镜像的软件库,支持Joliet, RockRidge 和EL Torito扩展, 特性: -- 支持读ISO 格式文件(ISO9660, Joliet, RockRidge 和 El Torito),大多数的NRG 格式文件和一些单向的MDF文件,但是,只能保存成ISO 格式 +- 支持读ISO 格式文件(ISO9660, Joliet, RockRidge 和 El Torito),大多数的NRG 格式文件和一些单轨道的MDF文件,但是,只能保存成ISO 格式 - 创建和修改一个CD/DVD 格式文件 - 支持CD 格式文件的添加或删除文件和目录 - 支持创建可引导的CD/DVD - 国际化的支持 +--- + - 项目网址: [www.littlesvr.ca/isomaster/][5] - 开发者: Andrew Smith - 许可: GNU GPL v2 @@ -157,7 +161,7 @@ via: http://www.linuxlinks.com/article/20141025082352476/DiskImageTools.html 作者:Frazer Kline 译者:[barney-ro](https://github.com/barney-ro) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 01f749ff651d08c33e77563a987098f7b510f573 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 23 Nov 2014 11:51:55 +0800 Subject: [PATCH 267/316] PUB:20140828 Setup Thin Provisioning Volumes in Logical Volume Management (LVM)--Part IV @GOLinux --- ...ogical Volume Management (LVM)--Part IV.md | 89 +++++++++++-------- 1 file changed, 52 insertions(+), 37 deletions(-) rename {translated/tech => published}/20140828 Setup Thin Provisioning Volumes in Logical Volume Management (LVM)--Part IV.md (80%) diff --git a/translated/tech/20140828 Setup Thin Provisioning Volumes in Logical Volume Management (LVM)--Part IV.md b/published/20140828 Setup Thin Provisioning Volumes in Logical Volume Management (LVM)--Part IV.md similarity index 80% rename from translated/tech/20140828 Setup Thin Provisioning Volumes in Logical Volume Management (LVM)--Part IV.md rename to published/20140828 Setup Thin Provisioning Volumes in Logical Volume Management (LVM)--Part IV.md index 63a86c598d..61f4c9e389 100644 --- a/translated/tech/20140828 Setup Thin Provisioning Volumes in Logical Volume Management (LVM)--Part IV.md +++ b/published/20140828 Setup Thin Provisioning Volumes in Logical Volume Management (LVM)--Part IV.md @@ -1,12 +1,14 @@ -在逻辑卷管理中设置精简资源调配卷——第四部分 +在LVM中设置精简资源调配卷(第四部分) ================================================================================ -逻辑卷管理有许多特性,比如像快照和精简资源调配。在先前(第三部分中),我们已经介绍了如何为逻辑卷创建快照。在本文中,我们将了解如何在LVM中设置精简资源调配。 +逻辑卷管理有许多特性,比如像快照和精简资源调配。在先前([第三部分][3]中),我们已经介绍了如何为逻辑卷创建快照。在本文中,我们将了解如何在LVM中设置精简资源调配。 ![Setup Thin Provisioning in LVM](http://www.tecmint.com/wp-content/uploads/2014/08/Setup-Thin-Provisioning-in-LVM.jpg) -在LVM中设置精简资源调配 + +*在LVM中设置精简资源调配* ### 精简资源调配是什么? ### -精简资源调配用于lvm以在精简池中创建虚拟磁盘。我们假定我服务器上有**15GB**的存储容量,而我已经有2个客户各自占去了5GB存储空间。你是第三个客户,你也请求5GB的存储空间。在以前,我们会提供整个5GB的空间(富卷)。然而,你可能只使用5GB中的2GB,其它3GB以后再去填满它。 + +精简资源调配用于LVM以在精简池中创建虚拟磁盘。我们假定我服务器上有**15GB**的存储容量,而我已经有2个客户各自占去了5GB存储空间。你是第三个客户,你也请求5GB的存储空间。在以前,我们会提供整个5GB的空间(富卷)。然而,你可能只使用5GB中的2GB,其它3GB以后再去填满它。 而在精简资源调配中我们所做的是,在其中一个大卷组中定义一个精简池,再在精简池中定义一个精简卷。这样,不管你写入什么文件,它都会保存进去,而你的存储空间看上去就是5GB。然而,这所有5GB空间不会全部铺满整个硬盘。对其它客户也进行同样的操作,就像我说的,那儿已经有两个客户,你是第三个客户。 @@ -20,15 +22,13 @@ 在精简资源调配中,如果我为你定义了5GB空间,它就不会在定义卷时就将整个磁盘空间全部分配,它会根据你的数据写入而增长,希望你看懂了!跟你一样,其它客户也不会使用全部卷,所以还是有机会为一个新客户分配5GB空间的,这称之为过度资源调配。 -但是,必须对各个卷的增长情况进行监控,否则结局会是个灾难。在过度资源调配完成后,如果所有4个客户都极度地写入数据到磁盘,你将碰到问题了。因为这个动作会填满15GB的存储空间,甚至溢出,从而导致这些卷下线。 +但是,必须对各个卷的增长情况进行监控,否则结局会是个灾难。在过度资源调配完成后,如果所有4个客户都尽量写入数据到磁盘,你将碰到问题了。因为这个动作会填满15GB的存储空间,甚至溢出,从而导致这些卷下线。 -### 需求 ### +### 前置阅读 ### -注:此三篇文章如果发布后可换成发布后链接,原文在前几天更新中 - -- [使用LVM在Linux中创建逻辑卷——第一部分][1] -- [在Linux中扩展/缩减LVM——第二部分][2] -- [在LVM中创建/恢复逻辑卷快照——第三部分][3] +- [在Linux中使用LVM构建灵活的磁盘存储(第一部分)][1] +- [在Linux中扩展/缩减LVM(第二部分)][2] +- [在 LVM中 录制逻辑卷快照并恢复(第三部分)][3] #### 我的服务器设置 #### @@ -42,7 +42,8 @@ # vgcreate -s 32M vg_thin /dev/sdb1 ![Listing Volume Group](http://www.tecmint.com/wp-content/uploads/2014/08/Listing-Volume-Group.jpg) -列出卷组 + +*列出卷组* 接下来,在创建精简池和精简卷之前,检查逻辑卷有多少空间可用。 @@ -50,7 +51,8 @@ # lvs ![Check Logical Volume](http://www.tecmint.com/wp-content/uploads/2014/08/check-Logical-Volume.jpg) -检查逻辑卷 + +*检查逻辑卷* 我们可以在上面的lvs命令输出中看到,只显示了一些默认逻辑用于文件系统和交换分区。 @@ -62,18 +64,20 @@ - **-L** – 卷组大小 - **–thinpool** – 创建精简池 -- **tp_tecmint_poolThin** - 精简池名称 -- **vg_thin** – 我们需要创建精简池的卷组名称 +- **tp\_tecmint\_poolThin** - 精简池名称 +- **vg\_thin** – 我们需要创建精简池的卷组名称 ![Create Thin Pool](http://www.tecmint.com/wp-content/uploads/2014/08/Create-Thin-Pool.jpg) -创建精简池 + +*创建精简池* 使用‘lvdisplay’命令来查看详细信息。 # lvdisplay vg_thin/tp_tecmint_pool ![Logical Volume Information](http://www.tecmint.com/wp-content/uploads/2014/08/Logical-Volume-Information.jpg) -逻辑卷信息 + +*逻辑卷信息* 这里,我们还没有在该精简池中创建虚拟精简卷。在图片中,我们可以看到分配的精简池数据为**0.00%**。 @@ -83,16 +87,17 @@ # lvcreate -V 5G --thin -n thin_vol_client1 vg_thin/tp_tecmint_pool -我已经在我的**vg_thin**卷组中的**tp_tecmint_pool**内创建了一个精简虚拟卷,取名为**thin_vol_client1**。现在,使用下面的命令来列出逻辑卷。 +我已经在我的**vg_thin**卷组中的**tp\_tecmint\_pool**内创建了一个精简虚拟卷,取名为**thin\_vol\_client1**。现在,使用下面的命令来列出逻辑卷。 # lvs ![List Logical Volumes](http://www.tecmint.com/wp-content/uploads/2014/08/List-Logical-Volumes.jpg) -列出逻辑卷 + +*列出逻辑卷* 刚才,我们已经在上面创建了精简卷,这就是为什么没有数据,显示为**0.00%M**。 -好吧,让我为其它2个客户再创建2个精简卷。这里,你可以看到在精简池(**tp_tecmint_pool**)下有3个精简卷了。所以,从这一点上看,我们开始明白,我已经使用所有15GB的精简池。 +好吧,让我为其它2个客户再创建2个精简卷。这里,你可以看到在精简池(**tp\_tecmint\_pool**)下有3个精简卷了。所以,从这一点上看,我们开始明白,我已经使用所有15GB的精简池。 ![Create Thin Volumes](http://www.tecmint.com/wp-content/uploads/2014/08/Create-Thin-Volumes.jpg) @@ -107,14 +112,16 @@ # ls -l /mnt/ ![Creating Mount Points](http://www.tecmint.com/wp-content/uploads/2014/08/Creating-Mount-Points.jpg) -创建挂载点 + +*创建挂载点* 使用‘mkfs’命令为这些创建的精简卷创建文件系统。 # mkfs.ext4 /dev/vg_thin/thin_vol_client1 && mkfs.ext4 /dev/vg_thin/thin_vol_client2 && mkfs.ext4 /dev/vg_thin/thin_vol_client3 ![Create File System](http://www.tecmint.com/wp-content/uploads/2014/08/Create-File-System.jpg) -创建文件系统 + +*创建文件系统* 使用‘mount’命令来挂载所有3个客户卷到创建的挂载点。 @@ -125,12 +132,14 @@ # df -h ![Print Mount Points](http://www.tecmint.com/wp-content/uploads/2014/08/Print-Mount-Points.jpg) -打印挂载点 + +*显示挂载点* 这里,我们可以看到所有3个客户卷已经挂载了,而每个客户卷只使用了3%的数据空间。那么,让我们从桌面添加一些文件到这3个挂载点,以填充一些空间。 ![Add Files To Volumes](http://www.tecmint.com/wp-content/uploads/2014/08/Add-Files-To-Volumes.jpg) -添加文件到卷 + +*添加文件到卷* 现在列出挂载点,并查看每个精简卷使用的空间,然后列出精简池来查看池中已使用的大小。 @@ -138,10 +147,12 @@ # lvdisplay vg_thin/tp_tecmint_pool ![Check Mount Point Size](http://www.tecmint.com/wp-content/uploads/2014/08/Check-Mount-Point-Size.jpg) -检查挂载点大小 + +*检查挂载点大小* ![Check Thin Pool Size](http://www.tecmint.com/wp-content/uploads/2014/08/Check-Thin-Pool-Size.jpg) -检查精简池大小 + +*检查精简池大小* 上面的命令显示了3个挂载点及其使用大小百分比。 @@ -161,18 +172,20 @@ # lvs ![Create thin Storage](http://www.tecmint.com/wp-content/uploads/2014/08/Create-thin-Storage.jpg) -创建精简存储 + +*创建精简存储* 在精简池中,我只有15GB大小的空间,但是我已经在精简池中创建了4个卷,其总量达到了20GB。如果4个客户都开始写入数据到他们的卷,并将空间填满,到那时我们将面对严峻的形势。如果不填满空间,那不会有问题。 -现在,我已经创建在**thin_vol_client4**中创建了文件系统,然后挂载到了**/mnt/client4**下,并且拷贝了一些文件到里头。 +现在,我已经创建在**thin\_vol\_client4**中创建了文件系统,然后挂载到了**/mnt/client4**下,并且拷贝了一些文件到里头。 # lvs ![Verify Thin Storage](http://www.tecmint.com/wp-content/uploads/2014/08/Verify-Thing-Storage.jpg) -验证精简存储 -我们可以在上面的图片中看到,新创建的client 4总计使用空间达到了**89.34%**,而精简池的已用空间达到了**59.19**。如果所有这些用户不在过度对卷写入,那么它就不会溢出,下线。要避免溢出,我们需要扩展精简池大小。 +*验证精简存储* + +我们可以在上面的图片中看到,新创建的client 4总计使用空间达到了**89.34%**,而精简池的已用空间达到了**59.19**。如果所有这些用户不再过度对卷写入,那么它就不会溢出,下线。要避免溢出的话,我们需要扩展精简池大小。 **重要**:精简池只是一个逻辑卷,因此,如果我们需要对其进行扩展,我们可以使用和扩展逻辑卷一样的命令,但我们不能缩减精简池大小。 @@ -183,16 +196,18 @@ # lvextend -L +15G /dev/vg_thin/tp_tecmint_pool ![Extend Thin Storage](http://www.tecmint.com/wp-content/uploads/2014/08/Extend-Thin-Storage.jpg) -扩展精简存储 + +*扩展精简存储* 接下来,列出精简池大小。 # lvs ![Verify Thin Storage](http://www.tecmint.com/wp-content/uploads/2014/08/Verify-Thin-Storage.jpg) -验证精简存储 -前面,我们的**tp_tecmint_pool**大小为15GB,而在对第四个精简卷进行过度资源配置后达到了20GB。现在,它扩展到了30GB,所以我们的过度资源配置又回归常态,而精简卷也不会溢出,下线了。通过这种方式,我们可以添加更多的精简卷到精简池中。 +*验证精简存储* + +前面,我们的**tp_tecmint_pool**大小为15GB,而在对第四个精简卷进行过度资源配置后达到了20GB。现在,它扩展到了30GB,所以我们的过度资源配置又回归常态,而精简卷也不会溢出下线了。通过这种方式,我们可以添加更多的精简卷到精简池中。 在本文中,我们已经了解了怎样来使用一个大尺寸的卷组创建一个精简池,以及怎样通过过度资源配置在精简池中创建精简卷和扩着精简池。在下一篇文章中,我们将介绍怎样来移除逻辑卷。 @@ -202,11 +217,11 @@ via: http://www.tecmint.com/setup-thin-provisioning-volumes-in-lvm/ 作者:[Babin Lonston][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/babinlonston/ -[1]:http://www.tecmint.com/create-lvm-storage-in-linux/ -[2]:http://www.tecmint.com/extend-and-reduce-lvms-in-linux/ -[3]:http://www.tecmint.com/take-snapshot-of-logical-volume-and-restore-in-lvm/ +[1]:http://linux.cn/article-3965-1.html +[2]:http://linux.cn/article-3974-1.html +[3]:http://linux.cn/article-4145-1.html From 68a784d630ca20ae2523029edb45c9cf37f2c8d7 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 23 Nov 2014 12:13:54 +0800 Subject: [PATCH 268/316] PUB:20140901 How to install and configure ownCloud on Debian @geekpi --- ...o install and configure ownCloud on Debian.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20140901 How to install and configure ownCloud on Debian.md (87%) diff --git a/translated/tech/20140901 How to install and configure ownCloud on Debian.md b/published/20140901 How to install and configure ownCloud on Debian.md similarity index 87% rename from translated/tech/20140901 How to install and configure ownCloud on Debian.md rename to published/20140901 How to install and configure ownCloud on Debian.md index 84755fe8e1..e360dad0dd 100644 --- a/translated/tech/20140901 How to install and configure ownCloud on Debian.md +++ b/published/20140901 How to install and configure ownCloud on Debian.md @@ -1,6 +1,6 @@ 如何在Debian上安装配置ownCloud ================================================================================ -据其官方网站,ownCloud可以让你通过一个网络接口或者WebDAV访问你的文件。它还提供了一个平台,可以轻松地查看、编辑和同步您所有设备的通讯录、日历和书签。尽管ownCloud与广泛使用Dropbox非常相似,但主要区别在于ownCloud是免费的,开源的,从而可以自己的服务器上建立与Dropbox类似的云存储服务。使用ownCloud你可以完整地访问和控制您的私人数据而对存储空间没有限制(除了硬盘容量)或者连客户端的连接数量。 +据其官方网站,ownCloud可以让你通过一个Web界面或者WebDAV访问你的文件。它还提供了一个平台,可以轻松地查看、编辑和同步您所有设备的通讯录、日历和书签。尽管ownCloud与广泛使用Dropbox非常相似,但主要区别在于ownCloud是免费的,开源的,从而可以自己的服务器上建立与Dropbox类似的云存储服务。使用ownCloud你可以完整地访问和控制您的私人数据,而对存储空间(除了硬盘容量)或客户端的连接数量没有限制。 ownCloud提供了社区版(免费)和企业版(面向企业的有偿支持)。预编译的ownCloud社区版可以提供了CentOS、Debian、Fedora、openSUSE、,SLE和Ubuntu版本。本教程将演示如何在Debian Wheezy上安装和在配置ownCloud社区版。 @@ -14,7 +14,7 @@ ownCloud提供了社区版(免费)和企业版(面向企业的有偿支持 ![](https://farm6.staticflickr.com/5589/15071372505_298a796ff6_z.jpg) -在下一屏职工点击继续: +在下一屏中点击继续: ![](https://farm6.staticflickr.com/5589/14884818527_554d1483f9_z.jpg) @@ -36,11 +36,11 @@ ownCloud提供了社区版(免费)和企业版(面向企业的有偿支持 # aptitude update # aptitude install owncloud -打开你的浏览器并定位到你的ownCloud实例中,地址是http:///owncloud: +打开你的浏览器并定位到你的ownCloud实例中,地址是 http://服务器 IP/owncloud: ![](https://farm4.staticflickr.com/3869/15071011092_f8f32ffe11_z.jpg) -注意ownCloud可能会包一个Apache配置错误的警告。使用下面的步骤来解决这个错误来摆脱这些错误信息。 +注意ownCloud可能会包一个Apache配置错误的警告。使用下面的步骤来解决这个错误来解决这些错误信息。 a) 编辑 the /etc/apache2/apache2.conf (设置 AllowOverride 为 All): @@ -70,7 +70,7 @@ d) 刷新浏览器,确认安全警告已经消失 ### 设置数据库 ### -是时候为ownCloud设置数据库了。 +这时可以为ownCloud设置数据库了。 首先登录本地的MySQL/MariaDB数据库: @@ -83,7 +83,7 @@ d) 刷新浏览器,确认安全警告已经消失 mysql> GRANT ALL PRIVILEGES ON owncloud_DB.* TO ‘owncloud-web’@'localhost'; mysql> FLUSH PRIVILEGES; -通过http:///owncloud 进入ownCloud页面,并选择‘Storage & database’ 选项。输入所需的信息(MySQL/MariaDB用户名,密码,数据库和主机名),并点击完成按钮。 +通过http://服务器 IP/owncloud 进入ownCloud页面,并选择‘Storage & database’ 选项。输入所需的信息(MySQL/MariaDB用户名,密码,数据库和主机名),并点击完成按钮。 ![](https://farm6.staticflickr.com/5584/15071010982_b76c23c384_z.jpg) @@ -101,7 +101,7 @@ d) 刷新浏览器,确认安全警告已经消失 ![](https://farm6.staticflickr.com/5587/15068784081_f281b54b72_z.jpg) -编辑/etc/apache2/conf.d/owncloud.conf 启用HTTPS。对于余下的NC、R和L重写规则的意义,你可以参考[Apache 文档][2]: +编辑/etc/apache2/conf.d/owncloud.conf 启用HTTPS。对于重写规则中的NC、R和L的意义,你可以参考[Apache 文档][2]: Alias /owncloud /var/www/owncloud @@ -197,7 +197,7 @@ via: http://xmodulo.com/2014/08/install-configure-owncloud-debian.html 作者:[Gabriel Cánepa][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 8ee9eb4893ad35de2e1f87c22de6ccaf3f38bb77 Mon Sep 17 00:00:00 2001 From: coloka Date: Sun, 23 Nov 2014 21:13:25 +0800 Subject: [PATCH 269/316] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=9A20141120=20How=20to=20visualize=20memory=20usage=20on?= =?UTF-8?q?=20Linux.md=20=E7=BF=BB=E8=AF=91=E4=B8=AD=EF=BC=9A20141117=20Re?= =?UTF-8?q?stricting=20process=20CPU=20usage=20using=20nice=20cpulimit=20a?= =?UTF-8?q?nd=20cgroups.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...U usage using nice cpulimit and cgroups.md | 1 + ... How to visualize memory usage on Linux.md | 88 ------------------- ... How to visualize memory usage on Linux.md | 87 ++++++++++++++++++ 3 files changed, 88 insertions(+), 88 deletions(-) delete mode 100644 sources/tech/20141120 How to visualize memory usage on Linux.md create mode 100644 translated/tech/20141120 How to visualize memory usage on Linux.md diff --git a/sources/tech/20141117 Restricting process CPU usage using nice cpulimit and cgroups.md b/sources/tech/20141117 Restricting process CPU usage using nice cpulimit and cgroups.md index 2e45a45ad5..d81daccb4c 100644 --- a/sources/tech/20141117 Restricting process CPU usage using nice cpulimit and cgroups.md +++ b/sources/tech/20141117 Restricting process CPU usage using nice cpulimit and cgroups.md @@ -1,3 +1,4 @@ +翻译中 by coloka Restricting process CPU usage using nice, cpulimit, and cgroups ================================================================================ 注:本文中的图片似乎都需要翻墙后才能看到,发布的时候注意 diff --git a/sources/tech/20141120 How to visualize memory usage on Linux.md b/sources/tech/20141120 How to visualize memory usage on Linux.md deleted file mode 100644 index a7b22cf4ca..0000000000 --- a/sources/tech/20141120 How to visualize memory usage on Linux.md +++ /dev/null @@ -1,88 +0,0 @@ -翻译中 by coloka -How to visualize memory usage on Linux -================================================================================ -Lack of sufficient physical memory can significantly hamper the performance of Linux desktop and server environments. When your desktop is sluggish, one of the first things to do is to free up RAMs. Memory usage is even more critical in multi-user shared hosting or mission-critical server environments, where different users or application threads constantly compete for more memory. - -When it comes to monitoring any type of system resources such as memory or CPUs, visualization is an effective means to help understand quickly how they are consumed by different processes and users. In this tutorial, I describe **how to visualize memory usage in Linux environment** using a command-line tool called [smem][1]. - -### Physical Memory Usage: RSS vs. PSS vs. USS ### - -In the presence of virtual memory abstraction, accurately quantifying physical memory usage of a process is actually not straightforward. The virtual memory size of a process is not meaningful because it does not tell how much of it is actually allocated physical memory. - -**Resident set size (RSS)**, reported by top command, is one popular metric which captures what portion of a process' reported memory is residing in RAM. However, aggregating RSS of existing processes can easily overestimate the overall physical memory usage of the Linux system because the same physical memory page can be shared by different processes. **Proportional set size (PSS)** is a more accurate measurement of effective memory usage of Linux processes since PSS properly discounts the memory page shared by more than one process. **Unique set size (USS)** of a process is a subset of the process' PSS, which is not shared by any other processes. - -### Install Smem on Linux ### - -The command-line tool smem can generate a variety of reports related to memory PSS/USS usage by pulling information from /proc. It comes with built-in graphical chart generation capabilities, so one can easily visualize overall memory consumption status. - -#### Install Smem on Debian, Ubuntu or Linux Mint #### - - $ sudo apt-get install smem - -#### Install Smem on Fedora or CentOS/RHEL #### - -On CentOS/RHEL, you need to [enable][2] EPEL repository first. - - $ sudo yum install smem python-matplotlib - -### Check Memory Usage with Smem ### - -When you run smem as a unprivileged user, it will report physical memory usage of every process launched by the current user, in an increasing order of PSS. - - $ smem - -![](https://farm8.staticflickr.com/7498/15801819892_d017280595_z.jpg) - -If you want to check the overall system memory usage for all users, run smem as the root. - - $ sudo smem - -![](https://farm9.staticflickr.com/8635/15776587626_1de74c4bcd_z.jpg) - -To view per-user memory usage: - - $ sudo smem -u - -![](https://farm9.staticflickr.com/8543/15798375491_510698d98f_z.jpg) - -smem allows you to filter memory usage results based on mapping, processes or users in the following format: - -- -M -- -P -- -U - -For a complete usage of smem, refer to its man page. - -### Visualize Memory Usage with Smem ### - -Visualized reports are often easier to read to identify the memory hogs of your system quickly. smem supports two kinds of graphical reports for memory usage visualization: bar and pie graphs. - -Here are examples of memory usage visualization. - -The following command will generate a bar graph that visualizes the PSS/USS memory usage of a user alice. - - $ sudo smem --bar name -c "pss uss" -U alice - -![](https://farm6.staticflickr.com/5616/15614838448_640e850cd8_z.jpg) - -The next command will plot a pie graph of the overall PSS memory usage of different processes. - - $ sudo smem --pie name -c "pss" - -![](https://farm8.staticflickr.com/7466/15614838428_eed7426cfe_z.jpg) - -As a summary, smem is a simple and effective memory analysis tool that comes in handy in various circumstances. Using its formatted output, you can run smem to identify any memory issues and take an action in an automatic fashion. If you know of any good memory monitoring tool, share it in the comment. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/visualize-memory-usage-linux.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://www.selenic.com/smem/ -[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file diff --git a/translated/tech/20141120 How to visualize memory usage on Linux.md b/translated/tech/20141120 How to visualize memory usage on Linux.md new file mode 100644 index 0000000000..ed71f6e338 --- /dev/null +++ b/translated/tech/20141120 How to visualize memory usage on Linux.md @@ -0,0 +1,87 @@ +图形化显示Linux内存使用情况 +================================================================================ +物理内存不足对Linux桌面系统和服务器系统的性能影响都很大。当你的电脑变慢时,要做的第一件事就是释放内存。尤其是在多用户环境以及执行关键任务的服务器环境下,内存消耗会变得更加关键,因为多个用户和应用线程会同时争用更多的内存空间。 + +如果要监测系统内各种资源的使用情况(比如说CPU或内存),图形化显示是一种高效的方法,通过图形界面可以快速分析各用户和进程的资源消耗情况。本教程将给大家介绍**在linux下图形化分析内存使用情况**的方法,使用到命令行工具是[smem][1]. + +### 物理内存使用情况: RSS vs. PSS vs. USS ### + +由于Linux使用到了虚拟内存(virtual memory),因此要准确的计算一个进程实际使用的物理内存就不是那么简单。 只知道进程的虚拟内存大小也并没有太大的用处,因为还是无法获取到实际分配的物理内存大小。 + +**RSS(Resident set size)**,使用top命令可以查询到,是最常用的内存指标,表示进程占用的物理内存大小。但是,将各进程的RSS值相加,通常会超出整个系统的内存消耗,这是因为RSS中包含了各进程间共享的内存。**PSS(Proportional set size)**会更准确一些,它将共享内存的大小进行平均后,再分摊到各进程上去。**USS(Unique set size )**是PSS的自己,它只计算了进程独自占用的内存大小,不包含任何共享的部分。 + +### 安装Smem ### + +smem是一个能够生成多种内存耗用报告的命令行工具,它从/proc文件系统中提取各进程的PSS/USS信息,并进行汇总输出。它还内建了图表的生成能力,所以能够方便地分析整个系统的内存使用情况。 + +#### 在Debian, Ubuntu 或 Linux Mint 上安装smem #### + + $ sudo apt-get install smem + +#### 在Fedora 或 CentOS/RHEL上安装Smem #### + +在CentOS/RHEL上,你首先得[使能][2]EPEL仓。 + + $ sudo yum install smem python-matplotlib + +### 使用smem检查内存使用情况 ### + +你可以在非特权模式下使用smem,它能够显示当前用户运行的所有进程的内存使用情况,并按照PSS的大小进行排序。 + + $ smem + +![](https://farm8.staticflickr.com/7498/15801819892_d017280595_z.jpg) + +如有你想得到整个系统中所有用户的内存使用情况,就需要使用root权限来运行smem。 + + $ sudo smem + +![](https://farm9.staticflickr.com/8635/15776587626_1de74c4bcd_z.jpg) + +也可以按用户维度来输出报告: + + $ sudo smem -u + +![](https://farm9.staticflickr.com/8543/15798375491_510698d98f_z.jpg) + +smem提供了以下选项来对输出结果进行筛选,支持按映射方式(mapping),进程和用户三个维度的筛选: + +- -M +- -P +- -U + +想了解smem更多的使用方式,可以查询用户手册(man page)。 + +### 使用smem图形化显示内存使用情况 ### + +图形化的报告使用起来会更加方便快捷。smem支持支持两种格式的图形显示方式:直方图和饼图。 + +下面是一些图形化显示的实例。 + +下面的命令行会基于PSS/RSS值,生成直方图,以用户alice为例。 + + $ sudo smem --bar name -c "pss uss" -U alice + +![](https://farm6.staticflickr.com/5616/15614838448_640e850cd8_z.jpg) + +这个例子会生成一张饼图,图中显示了系统中各进程的PSS内存使用量: + + $ sudo smem --pie name -c "pss" + +![](https://farm8.staticflickr.com/7466/15614838428_eed7426cfe_z.jpg) + +概括来说,smem是一个方便易用的内存分析工具。利用smem的格式化输出,你可以对内存使用报告进行自动化分析,并执行一些自动化的处理措施。如果你还知道其他的一些优秀的内存检测工具,请在留言区告诉我。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/visualize-memory-usage-linux.html + +作者:[Dan Nanni][a] +译者:[coloka](https://github.com/coloka) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://www.selenic.com/smem/ +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file From 09c2778e955ea03754bf8c864f3e558edda770bc Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 24 Nov 2014 08:38:09 +0800 Subject: [PATCH 270/316] Update 20141119 Qshutdown--An avanced shutdown tool.md --- sources/share/20141119 Qshutdown--An avanced shutdown tool.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20141119 Qshutdown--An avanced shutdown tool.md b/sources/share/20141119 Qshutdown--An avanced shutdown tool.md index 96d1aa319b..2caf962b08 100644 --- a/sources/share/20141119 Qshutdown--An avanced shutdown tool.md +++ b/sources/share/20141119 Qshutdown--An avanced shutdown tool.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Qshutdown – An avanced shutdown tool ================================================================================ qshutdown is a Qt program to shutdown/reboot/suspend/hibernate the computer at a given time or after a certain number of minutes. It shows the time until the corresponding request is send to either the Gnome- or KDE-session-manager, to HAL or to DeviceKit and if none of these works the command ‘sudo shutdown -P now' is used. This program may be useful for people who want to work with the computer only for a certain time. @@ -44,4 +45,4 @@ via: http://www.ubuntugeek.com/qshutdown-an-avanced-shutdown-tool.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file +[a]:http://www.ubuntugeek.com/author/ubuntufix From 76971a672c148636524c9f08584428a101e0e46c Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 24 Nov 2014 08:39:51 +0800 Subject: [PATCH 271/316] Update 20141023 6 Minesweeper Clones for Linux.md --- sources/share/20141023 6 Minesweeper Clones for Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20141023 6 Minesweeper Clones for Linux.md b/sources/share/20141023 6 Minesweeper Clones for Linux.md index 7cd30dc51c..1299a4f3e2 100644 --- a/sources/share/20141023 6 Minesweeper Clones for Linux.md +++ b/sources/share/20141023 6 Minesweeper Clones for Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! 6 Minesweeper Clones for Linux ================================================================================ ### GNOME Mines ### @@ -49,4 +50,4 @@ via: http://www.tuxarena.com/2014/10/6-minesweeper-clones-for-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[1]:http://www.gedanken.org.uk/software/xbomb/ \ No newline at end of file +[1]:http://www.gedanken.org.uk/software/xbomb/ From f3fe68f680eaa44fe2313450c46e756fa77ea60d Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Mon, 24 Nov 2014 09:20:07 +0800 Subject: [PATCH 272/316] stop translating --- sources/talk/20141108 When hackers grow old.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/talk/20141108 When hackers grow old.md b/sources/talk/20141108 When hackers grow old.md index 1a9405241f..cf31c168ae 100644 --- a/sources/talk/20141108 When hackers grow old.md +++ b/sources/talk/20141108 When hackers grow old.md @@ -1,4 +1,3 @@ -[translating by KayGuoWhu] When hackers grow old ================================================================================ Lately I’ve been wrestling with various members of an ancient and venerable open-source development group which I am not going to name, though people who regularly follow my adventures will probably guess which one it is by the time I’m done venting. From efde8a206259eb8b4ee2fbe575e8205c588eb328 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Mon, 24 Nov 2014 09:21:36 +0800 Subject: [PATCH 273/316] [Translated] 20141023 6 Minesweeper Clones for Linux.md --- ...20141023 6 Minesweeper Clones for Linux.md | 53 ------------------- ...119 Qshutdown--An avanced shutdown tool.md | 48 ----------------- ...20141023 6 Minesweeper Clones for Linux.md | 52 ++++++++++++++++++ ...119 Qshutdown--An avanced shutdown tool.md | 47 ++++++++++++++++ 4 files changed, 99 insertions(+), 101 deletions(-) delete mode 100644 sources/share/20141023 6 Minesweeper Clones for Linux.md delete mode 100644 sources/share/20141119 Qshutdown--An avanced shutdown tool.md create mode 100644 translated/share/20141023 6 Minesweeper Clones for Linux.md create mode 100644 translated/share/20141119 Qshutdown--An avanced shutdown tool.md diff --git a/sources/share/20141023 6 Minesweeper Clones for Linux.md b/sources/share/20141023 6 Minesweeper Clones for Linux.md deleted file mode 100644 index 1299a4f3e2..0000000000 --- a/sources/share/20141023 6 Minesweeper Clones for Linux.md +++ /dev/null @@ -1,53 +0,0 @@ -Translating by GOLinux! -6 Minesweeper Clones for Linux -================================================================================ -### GNOME Mines ### - -This is the GNOME Minesweeper clone, allowing you to choose from three different pre-defined table sizes (8×8, 16×16, 30×16) or a custom number of rows and columns. It can be ran in fullscreen mode, comes with highscores, elapsed time and hints. The game can be paused and resumed. - -![](http://www.tuxarena.com/wp-content/uploads/2014/10/gnome-mines1.jpg) - -### ace-minesweeper ### - -This is part of a package that contains some other games too, like ace-freecel, ace-solitaire or ace-spider. It has a graphical interface featuring Tux, but doesn’t seem to come with different table sizes. The package is called ace-of-penguins in Ubuntu. - -![](http://www.tuxarena.com/wp-content/uploads/2014/10/ace-minesweeper.jpg) - -### XBomb ### - -XBomb is a mines game for the X Window System with three different table sizes and tiles which can take different shapes: hexagonal, rectangular (traditional) or triangular. Unfortunately the current version in Ubuntu 14.04 crashes with a segmentation fault, so you may need to install another version to make it work. -[Homepage][1] - -![](http://www.tuxarena.com/wp-content/uploads/2014/10/xbomb.png) - -([Image credit][1]) - -### KMines ### - -KMines is the a KDE game, and just like GNOME Mines, there are three built-in table sizes (easy, medium, hard) and custom, support for themes and highscores. - -![](http://www.tuxarena.com/wp-content/uploads/2014/10/kmines.jpg) - -### freesweep ### - -Freesweep is a Minesweeper clone for the terminal which allows you to configure settings such as table rows and columns, percentage of bombs, colors and also has a highscores table. - -![](http://www.tuxarena.com/wp-content/uploads/2014/10/freesweep.jpg) - -### xdemineur ### - -Another graphical Minesweeper clone for X, Xdemineur is very much alike Ace-Minesweeper, with one predefined table size. - -![](http://www.tuxarena.com/wp-content/uploads/2014/10/xdemineur.jpg) - --------------------------------------------------------------------------------- - -via: http://www.tuxarena.com/2014/10/6-minesweeper-clones-for-linux/ - -作者:Craciun Dan -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.gedanken.org.uk/software/xbomb/ diff --git a/sources/share/20141119 Qshutdown--An avanced shutdown tool.md b/sources/share/20141119 Qshutdown--An avanced shutdown tool.md deleted file mode 100644 index 2caf962b08..0000000000 --- a/sources/share/20141119 Qshutdown--An avanced shutdown tool.md +++ /dev/null @@ -1,48 +0,0 @@ -Translating by GOLinux! -Qshutdown – An avanced shutdown tool -================================================================================ -qshutdown is a Qt program to shutdown/reboot/suspend/hibernate the computer at a given time or after a certain number of minutes. It shows the time until the corresponding request is send to either the Gnome- or KDE-session-manager, to HAL or to DeviceKit and if none of these works the command ‘sudo shutdown -P now' is used. This program may be useful for people who want to work with the computer only for a certain time. - -qshutdown will show it self 3 times as a warning if there are less than 70 seconds left. (if 1 Minute or local time +1 Minute was set it’ll appear only once.) - -This program uses qdbus to send a shutdown/reboot/suspend/hibernate request to either the gnome- or kde-session-manager, to HAL or to DeviceKit and if none of these works, the command ’sudo shutdown’ will be used (note that when sending the request to HAL or DeviceKit, or the shutdown command is used, the Session will never be saved. If the shutdown command is used, the program will only be able to shutdown and reboot). So if nothing happens when the shutdown- or reboot-time is reached, it means that one lacks the rights for the shutdown command. - -In this case one can do the following: - -Post the following in a terminal: "EDITOR:nano sudo -E visudo" and add this line: "* ALL = NOPASSWD:/sbin/shutdown" whereas * replaces the username or %groupname. - -Configurationfile qshutdown.conf - -The maximum Number of countdown_minutes is 1440 (24 hours).The configurationfile (and logfile) is located at ~/.qshutdown - -For admins: - -With the option Lock_all in qshutdown.conf set to true the user won’t be able to change any settings. If you change the permissions of qshutdown.conf with "sudo chown root -R ~/.qshutdown" and "sudo chmod 744 ~/.qshutdown/qshutdown.conf", the user won’t be able to change anything in the configurationfile. - -### Install Qshutdown in Ubuntu ### - -Open the terminal and run the following command - - sudo apt-get install qshutdown - -### Screenshots ### - -![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/12.png) - -![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/23.png) - -![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/31.png) - -![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/41.png) - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/qshutdown-an-avanced-shutdown-tool.html - -作者:[ruchi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.ubuntugeek.com/author/ubuntufix diff --git a/translated/share/20141023 6 Minesweeper Clones for Linux.md b/translated/share/20141023 6 Minesweeper Clones for Linux.md new file mode 100644 index 0000000000..cd703ef089 --- /dev/null +++ b/translated/share/20141023 6 Minesweeper Clones for Linux.md @@ -0,0 +1,52 @@ +Linux下的6个扫雷翻版 +================================================================================ +### GNOME Mines ### + +这是GNOME扫雷复制品,允许你从3个不同的预定义表大小(8×8, 16×16, 30×16)中选择其一,或者自定义行列的数量。它能以全屏模式运行,带有高分值、耗时和提示。游戏可以暂停和继续。 + +![](http://www.tuxarena.com/wp-content/uploads/2014/10/gnome-mines1.jpg) + +### ace-minesweeper ### + +这是一个包中的游戏,此包中也包含有其它一些游戏,如ace-freecel,ace-solitaire或ace-spider。它有一个以小企鹅为特色的图形化界面,但好像不能调整表的大小。该包在Ubuntu中名为ace-of-penguins。 + +![](http://www.tuxarena.com/wp-content/uploads/2014/10/ace-minesweeper.jpg) + +### XBomb ### + +XBomb是针对X Windows系统扫雷游戏,它有三种不同的表尺寸和卡牌风格,包含有不同的外形:六角形、矩形(传统)或三角形。不幸的是,在Ubuntu 14.04中的版本会出现程序分段冲突,所以你可能需要安装另外一个版本。 +[首页][1] + +![](http://www.tuxarena.com/wp-content/uploads/2014/10/xbomb.png) + +([图像来源][1]) + +### KMines ### + +KMines是一个KDE游戏,和GNOME Mines类似,有三个内建表尺寸(简易、中等、困单),也可以自定义,支持主题和高分。 + +![](http://www.tuxarena.com/wp-content/uploads/2014/10/kmines.jpg) + +### freesweep ### + +Freesweep是一个针对终端的扫雷复制品,它可以配置表行列、炸弹比例、颜色,也有一个高分表。 + +![](http://www.tuxarena.com/wp-content/uploads/2014/10/freesweep.jpg) + +### xdemineur ### + +另外一个针对X的图形化扫雷Xdemineur,和Ace-Minesweeper十分相像,带有一个预定义的表尺寸。 + +![](http://www.tuxarena.com/wp-content/uploads/2014/10/xdemineur.jpg) + +-------------------------------------------------------------------------------- + +via: http://www.tuxarena.com/2014/10/6-minesweeper-clones-for-linux/ + +作者:Craciun Dan +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.gedanken.org.uk/software/xbomb/ diff --git a/translated/share/20141119 Qshutdown--An avanced shutdown tool.md b/translated/share/20141119 Qshutdown--An avanced shutdown tool.md new file mode 100644 index 0000000000..5da90899e7 --- /dev/null +++ b/translated/share/20141119 Qshutdown--An avanced shutdown tool.md @@ -0,0 +1,47 @@ +Qshutdown – 一个高级关机神器 +================================================================================ +qshutdown是一个QT程序,用于让计算机在指定时间或者在几分钟后关机/重启/挂起/睡眠。它会一直显示时间,直到相应的请求被发送到Gnome或KDE会话管理器,或者发送到HAL或DeviceKit。而如果这一切都没有发生,将会使用‘sudo shutdown -P now’进行关机。对于那些只在特定时间使用计算机工作的人而言,可能很有用。 + +qshutdown将在最后70秒时显示3次警告提醒。(如果设置了1分钟或者本地时间+1,它只会显示一次。) + +该程序使用qdbus来发送关机/重启/挂起/睡眠请求到gnome或kde会话管理器,或者到HAL或DeviceKit,而如果这些都没有工作,那么就会使用‘sudo shutdown’命令进行关机(注意,但发送请求到HAL或DeviceKit,或者使用shutdown命令时,会话不会被保存。如果使用shutdown命令,该程序只会被关机或重启)。所以,如果在shutdown或reboot时间到时什么都没发生,这就意味着用户缺少使用shutdown命令的权限。 + +在这种情况下,你可以进行以下操作: + +粘贴以下信息到终端:“EDITOR:nano sudo -E visudo”并添加此行:“* ALL = NOPASSWD:/sbin/shutdown”这里*替换username或%groupname。 + +配置文件qshutdown.conf + +倒计时最大计数为1440分钟(24小时)。配置文件(和日志文件)位于~/.qshutdown。 + +对于管理员: + +在将qshutdonw.conf中的Lock_all选项设置为true后,用户将不能修改设置。如果你使用“sudo chown root -R ~/.qshutdown”和“sudo chmod 744 ~/.qshutdown/qshutdown.conf”命令修改qshutdown.conf的权限后,用户将不能修改配置文件。 + +### Ubuntu中安装Qshutdown ### + +打开终端,然后运行以下命令 + + sudo apt-get install qshutdown + +### 屏幕截图 ### + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/12.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/23.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/31.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/41.png) + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/qshutdown-an-avanced-shutdown-tool.html + +作者:[ruchi][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix From 25e95b86cc5261b66455beab757dd694f6dc06c1 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Mon, 24 Nov 2014 09:26:35 +0800 Subject: [PATCH 274/316] [Translated] 20141119 Qshutdown--An avanced shutdown tool.md --- .../share/20141119 Qshutdown--An avanced shutdown tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/share/20141119 Qshutdown--An avanced shutdown tool.md b/translated/share/20141119 Qshutdown--An avanced shutdown tool.md index 5da90899e7..af56e0aa38 100644 --- a/translated/share/20141119 Qshutdown--An avanced shutdown tool.md +++ b/translated/share/20141119 Qshutdown--An avanced shutdown tool.md @@ -1,4 +1,4 @@ -Qshutdown – 一个高级关机神器 +Qshutdown – 一个先进的关机神器 ================================================================================ qshutdown是一个QT程序,用于让计算机在指定时间或者在几分钟后关机/重启/挂起/睡眠。它会一直显示时间,直到相应的请求被发送到Gnome或KDE会话管理器,或者发送到HAL或DeviceKit。而如果这一切都没有发生,将会使用‘sudo shutdown -P now’进行关机。对于那些只在特定时间使用计算机工作的人而言,可能很有用。 From ea6654f3e1029f4da193d4a2c305539a2edea5a3 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 24 Nov 2014 15:41:26 +0800 Subject: [PATCH 275/316] =?UTF-8?q?20141124-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ng Directory) Command Examples in Linux.md | 265 ++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 sources/tech/20141124 15 pwd (Print Working Directory) Command Examples in Linux.md diff --git a/sources/tech/20141124 15 pwd (Print Working Directory) Command Examples in Linux.md b/sources/tech/20141124 15 pwd (Print Working Directory) Command Examples in Linux.md new file mode 100644 index 0000000000..32c74cddaa --- /dev/null +++ b/sources/tech/20141124 15 pwd (Print Working Directory) Command Examples in Linux.md @@ -0,0 +1,265 @@ +15 ‘pwd’ (Print Working Directory) Command Examples in Linux +================================================================================ +For those working with Linux command Line, command ‘**pwd**‘ is very helpful, which tells where you are – in which directory, starting from the root (**/**). Specially for Linux newbies, who may get lost amidst of directories in command Line Interface while navigation, command ‘**pwd**‘ comes to rescue. + +![15 pwd Command Examples](http://www.tecmint.com/wp-content/uploads/2014/11/pwd-command.png) + +15 pwd Command Examples + +### What is pwd? ### + +‘**pwd**‘ stands for ‘**Print Working Directory**‘. As the name states, command ‘**pwd**‘ prints the current working directory or simply the directory user is, at present. It prints the current directory name with the complete path starting from root (**/**). This command is built in shell command and is available on most of the shell – bash, Bourne shell, ksh,zsh, etc. + +#### Basic syntax of pwd: #### + + # pwd [OPTION] + +#### Options used with pwd #### + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Options Description
 -L (logical) Use PWD from environment, even if it contains symbolic links
 -P (physical) Avoid all symbolic links
 –help  Display this help and exit
 –version Output version information and exit
+ +If both ‘**-L**‘ and ‘**-P**‘ options are used, option ‘**L**‘ is taken into priority. If no option is specified at the prompt, pwd will avoid all symlinks, i.e., take option ‘**-P**‘ into account. + +Exit status of command pwd: + + + + + + + + + + + + + + +
0Success
Non-zeroFailure
+ +This article aims at providing you a deep insight of Linux command ‘**pwd**‘ with practical examples. + +**1.** Print your current working directory. + + avi@tecmint:~$ /bin/pwd + + /home/avi + +![Print Working Directory](http://www.tecmint.com/wp-content/uploads/2014/11/pwd.gif) + +Print Working Directory + +**2.** Create a symbolic link of a folder (say **/var/www/html** into your home directory as **htm**). Move to the newly created directory and print working directory with symbolic links and without symbolic links. + +Create a symbolic link of folder /var/www/html as htm in your home directory and move to it. + + avi@tecmint:~$ ln -s /var/www/html/ htm + avi@tecmint:~$ cd htm + +![Create Symbolic Link](http://www.tecmint.com/wp-content/uploads/2014/11/Create-Symbolic-Link.gif) + +Create Symbolic Link + +**3.** Print working directory from environment even if it contains symlinks. + + avi@tecmint:~$ /bin/pwd -L + + /home/avi/htm + +![Print Current Working Directory](http://www.tecmint.com/wp-content/uploads/2014/11/Print-Working-Directory.gif) + +Print Current Working Directory + +**4.** Print actual physical current working directory by resolving all symbolic links. + + avi@tecmint:~$ /bin/pwd -P + + /var/www/html + +![Print Physical Working Directory](http://www.tecmint.com/wp-content/uploads/2014/11/Print-Physical-Working-Directory.gif) + +Print Physical Working Directory + +**5.** Check if the output of command “**pwd**” and “**pwd -P**” are same or not i.e., if no options are given at run-time does “**pwd**” takes option **-P** into account or not, automatically. + + avi@tecmint:~$ /bin/pwd + + /var/www/html + +![Check pwd Output](http://www.tecmint.com/wp-content/uploads/2014/11/Check-pwd-Output.gif) + +Check pwd Output + +**Result:** It’s clear from the above output of example 4 and 5 (both result are same) thus, when no options are specified with command “**pwd**”, it automatically takes option “**-P**” into account. + +**6.** Print version of your ‘pwd’ command. + + avi@tecmint:~$ /bin/pwd --version + + pwd (GNU coreutils) 8.23 + Copyright (C) 2014 Free Software Foundation, Inc. + License GPLv3+: GNU GPL version 3 or later . + This is free software: you are free to change and redistribute it. + There is NO WARRANTY, to the extent permitted by law. + + Written by Jim Meyering. + +![Check pwd Version](http://www.tecmint.com/wp-content/uploads/2014/11/Check-pwd-Version.gif) + +Check pwd Version + +**Note:** A ‘pwd’ command is often used without options and never used with arguments. + +**Important:** You might have noticed that we are executing the above command as “**/bin/pwd**” and not “**pwd**”. + +So what’s the difference? Well “**pwd**” alone means shell built-in pwd. Your shell may have different version of pwd. Please refer manual. When we are using **/bin/pwd**, we are calling the binary version of that command. Both the shell and the binary version of command Prints Current Working Directory, though the binary version have more options. + +**7.** Print all the locations containing executable named pwd. + + avi@tecmint:~$ type -a pwd + + pwd is a shell builtin + pwd is /bin/pwd + +![Print Executable Locations](http://www.tecmint.com/wp-content/uploads/2014/11/Print-Executable-Locations.gif) + +Print Executable Locations + +**8.** Store the value of “**pwd**” command in variable (say **a**), and print its value from the variable (important for shell scripting perspective). + + avi@tecmint:~$ a=$(pwd) + avi@tecmint:~$ echo "Current working directory is : $a" + + Current working directory is : /home/avi + +![Store Pwd Value in Variable](http://www.tecmint.com/wp-content/uploads/2014/11/Store-Pwd-Value-in-Variable.gif) + +Store Pwd Value in Variable + +Alternatively, we can use **printf**, in the above example. + +**9.** Change current working directory to anything (say **/home**) and display it in command line prompt. Execute a command (say ‘**ls**‘) to verify is everything is **OK**. + + avi@tecmint:~$ cd /home + avi@tecmint:~$ PS1='$pwd> ' [Notice single quotes in the example] + > ls + +![Change Current Working Directory](http://www.tecmint.com/wp-content/uploads/2014/11/Change-Current-Working-Directory.gif) + +Change Current Working Directory + +**10.** Set multi-line command line prompt (say something like below). + + /home + 123#Hello#! + +And then execute a command (say **ls**) to check is everything is **OK**. + + avi@tecmint:~$ PS1=' + > $PWD + $ 123#Hello#! + $ ' + + /home + 123#Hello#! + +![Set Multi Commandline Prompt](http://www.tecmint.com/wp-content/uploads/2014/11/Set-Multi-Commandline-Prompt.gif) + +Set Multi Commandline Prompt + +**11.** Check the current working directory and previous working directory in one GO! + + avi@tecmint:~$ echo “$PWD $OLDPWD” + + /home /home/avi + +![Check Present Previous Working Directory](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Present-Previous-Working-Directory.gif) + +Check Present Previous Working Directory + +**12.** What is the absolute path (starting from **/**) of the pwd binary file. + + /bin/pwd + +**13.** What is the absolute path (starting from **/**) of the pwd source file. + + /usr/include/pwd.h + +**14.** Print the absolute path (starting from **/**) of the pwd manual pages file. + + /usr/share/man/man1/pwd.1.gz + +**15.** Write a shell script analyses current directory (say **tecmint**) in your home directory. If you are under directory **tecmint** it output “**Well! You are in tecmint directory**” and then print “**Good Bye**” else create a directory **tecmint** under your home directory and ask you to cd to it. + +Let’s first create a ‘tecmint’ directory, under it create a following shell script file with name ‘pwd.sh’. + + avi@tecmint:~$ mkdir tecmint + avi@tecmint:~$ cd tecmint + avi@tecmint:~$ nano pwd.sh + +Next, add the following script to the pwd.sh file. + + #!/bin/bash + + x="$(pwd)" + if [ "$x" == "/home/$USER/tecmint" ] + then + { + echo "Well you are in tecmint directory" + echo "Good Bye" + } + else + { + mkdir /home/$USER/tecmint + echo "Created Directory tecmint you may now cd to it" + } + fi + +Give execute permission and run it. + + avi@tecmint:~$ chmod 755 pwd.sh + avi@tecmint:~$ ./pwd.sh + + Well you are in tecmint directory + Good Bye + +#### Conclusion #### + +**pwd** is one of the simplest yet most popular and most widely used command. A good command over pwd is basic to use Linux terminal. That’s all for now. I’ll be here again with another interesting article soon, till then stay tuned and connected to Tecmint. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/pwd-command-examples/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ \ No newline at end of file From 59ecbb93ed9489e789e3ae3555b5b3c9cd455c2b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 24 Nov 2014 16:06:52 +0800 Subject: [PATCH 276/316] =?UTF-8?q?20141124-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... 10 Linux ps command Practical Examples.md | 188 ++++++++++++++++++ ...d Command to Find Block Devices Details.md | 110 ++++++++++ 2 files changed, 298 insertions(+) create mode 100644 sources/tech/20141124 Important 10 Linux ps command Practical Examples.md create mode 100644 sources/tech/20141124 Linux blkid Command to Find Block Devices Details.md diff --git a/sources/tech/20141124 Important 10 Linux ps command Practical Examples.md b/sources/tech/20141124 Important 10 Linux ps command Practical Examples.md new file mode 100644 index 0000000000..a86244287e --- /dev/null +++ b/sources/tech/20141124 Important 10 Linux ps command Practical Examples.md @@ -0,0 +1,188 @@ +Important 10 Linux ps command Practical Examples +================================================================================ +As an Operating System which inspired from Unix, Linux has a built-in tool to capture current processes on the system. This tool is available in command line interface. + +### What is PS Command ### + +From its manual page, PS gives a snapshots of the current process. It will “capture” the system condition at a single time. If you want to have a repetitive updates in a real time, we can use top command. + +PS support three (3) type of usage syntax style. + +1. UNIX style, which may be grouped and **must** be preceded by a dash +2. BSD style, which may be grouped and **must not be** used with a dash +3. GNU long options, which are preceded by two dash + +We can mix those style, but conflicts can appear. In this article, will use UNIX style. Here’s are some examples of PS command in a daily use. + +### 1. Run ps without any options ### + +This is a very basic **ps** usage. Just type ps on your console to see its result. + +![ps with no options](http://blog.linoxide.com/wp-content/uploads/2014/10/ps_no_options.png) + +By default, it will show us 4 columns of information. + +- PID is a Process ID of the running command (CMD) +- TTY is a place where the running command runs +- TIME tell about how much time is used by CPU while running the command +- CMD is a command that run as current process + +This information is displayed in unsorted result. + +### 2. Show all current processes ### + +To do this, we can use **-a** options. As we can guess, **-a is stand for “all”**. While x will show all process even the current process is not associated with any TTY (terminal) + + $ ps -ax + +This result might be long result. To make it more easier to read, combine it with less command. + + $ ps -ax | less + +![ps all information](http://blog.linoxide.com/wp-content/uploads/2014/10/ps_ax.png) + +### 3. Filter processes by its user ### + +For some situation we may want to filter processes by user. To do this, we can use **-u** option. Let say we want to see what processes which run by user pungki. So the command will be like below + + $ ps -u pungki + +![filter by user](http://blog.linoxide.com/wp-content/uploads/2014/10/ps__u.png) + +### 4. Filter processes by CPU or memory usage ### + +Another thing that you might want to see is filter the result by CPU or memory usage. With this, you can grab information about which processes that consume your resource. To do this, we can use **aux options**. Here’s an example of it : + + $ ps -aux | less + +![show all information](http://blog.linoxide.com/wp-content/uploads/2014/10/ps_aux.png) + +Since the result can be in a long list, we can **pipe** less command into ps command. +By default, the result will be in unsorted form. If we want to sort by particular column, we can add **--sort** option into ps command. + +Sort by the highest **CPU utilization** in ascending order + + $ ps -aux --sort -pcpu | less + +![sort by cpu usage](http://blog.linoxide.com/wp-content/uploads/2014/10/ps_aux_sort_cpu.png) + +Sort by the highest **Memory utilization** in ascending order + + $ ps -aux --sort -pmem | less + +![sort by memory usage](http://blog.linoxide.com/wp-content/uploads/2014/10/ps_aux_sort_mem.png) + +Or we can combine itu a single command and display only the top ten of the result : + + $ ps -aux --sort -pcpu,+pmem | head -n 10 + +### 5. Filter processes by its name or process ID ### + +To to this, we can use **-C option** followed by the keyword. Let say, we want to show processes named getty. We can type : + + $ ps -C getty + +![filter by its name or process ID](http://blog.linoxide.com/wp-content/uploads/2014/10/ps_C.png) + +If we want to show more detail about the result, we can add -f option to show it on full format listing. The above command will looks like below : + + $ ps -f -C getty + +![filter by its name or process ID](http://blog.linoxide.com/wp-content/uploads/2014/10/ps_C_f.png) + +### 6. Filter processes by thread of process ### + +If we need to know the thread of a particular process, we can use **-L option** followed by its Process ID (PID). Here’s an example of **-L option** in action : + + $ ps -L 1213 + +![show processes in threaded view](http://blog.linoxide.com/wp-content/uploads/2014/10/ps_L.png) + +As we can see, the PID remain the same value, but the LWP which shows numbers of thread show different values. + +### 7. Show processes in hierarchy ### + +Sometime we want to see the processes in hierarchical form. To do this, we can use **-axjf** options. + + $ps -axjf + +![show in hierarchy](http://blog.linoxide.com/wp-content/uploads/2014/10/ps_axjf.png) + +Or, another command which we can use is pstree. + + $ pstree + +![show information in hierarchy](http://blog.linoxide.com/wp-content/uploads/2014/10/pstree.png) + +### 8. Show security information ### + +If we want to see who is currently logged on into your server, we can see it using the ps command. There are some options that we can use to fulfill our needs. Here’s some examples : + + $ ps -eo pid,user,args + +**Option -e** will show you all processes while **-o option** will control the output. **Pid**, **User and Args** will show you the **Process ID**, **the User who run the application** and **the running application**. + +![show security information](http://blog.linoxide.com/wp-content/uploads/2014/10/ps_security_1.png) + +The keyword / user-defined format that can be used with **-e option** are **args, cmd, comm, command, fname, ucmd, ucomm, lstart, bsdstart and start**. + +### 9. Show every process running as root (real & effecitve ID) in user format ### + +System admin may want to see what processes are being run by root and other information related to it. Using ps command, we can do by this simple command : + + $ ps -U root -u root u + +The **-U parameter** will select by **real user ID (RUID)**. It selects the processes whose real user name or ID is in the userlist list. The real User ID identifies the user who created the process. + +While the **-u paramater** will select by effective user ID (EUID) + +The last **u** paramater, will display the output in user-oriented format which contains **User, PID, %CPU, %MEM, VSZ, RSS, TTY, STAT, START, TIME and COMMAND** columns. + +Here’s the output of the above command. + +![show real and effective User ID](http://blog.linoxide.com/wp-content/uploads/2014/10/ps_root_real_effective_ID.png) + +### 10. Use PS in a realtime process viewer ### + +ps will display a report of what happens in your system. The result will be a static report. +Let say, we want to filter processes by CPU and Memory usage as on the point 4 above. And we want the report is updated every 1 second. We can do it by **combining ps command with watch command** on Linux. + +Here’s the command : + + $ watch -n 1 ‘ps -aux --sort -pmem, -pcpu’ + +![combine ps with watch](http://blog.linoxide.com/wp-content/uploads/2014/10/ps_watch_1.png) + +If you feel the report is too long, **we can limit it** by - let say - the top 20 processes. We can add **head** command to do it. + + $ watch -n 1 ‘ps -aux --sort -pmem, -pcpu | head 20’ + +![combine ps with watch](http://blog.linoxide.com/wp-content/uploads/2014/10/ps_watch_2.png) + +This live reporter **is not** like top or htop of course. **But the advantage of using ps** to make live report is that you can custom the field. You can choose which field you want to see. + +For example, **if you need only the pungki user shown**, then you can change the command to become like this : + + $ watch -n 1 ‘ps -aux -U pungki u --sort -pmem, -pcpu | head 20’ + +![combine ps with watch](http://blog.linoxide.com/wp-content/uploads/2014/10/ps_watch_3.png) + +### Conclusion ### + +You may use **ps** on your daily usage to monitor about what happens your Linux system. But actually, you can generate various types of report using **ps** command with the use of appropriate paramaters. + +**Another ps advantage** is that **ps** are installed by default in any kind of Linux. So you can just start to use it. + +Don't forget to see **ps documentation** by typing **man ps** on you Linux console to explore more options. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/linux-ps-command-examples/ + +作者:[Pungki Arianto][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/pungki/ \ No newline at end of file diff --git a/sources/tech/20141124 Linux blkid Command to Find Block Devices Details.md b/sources/tech/20141124 Linux blkid Command to Find Block Devices Details.md new file mode 100644 index 0000000000..3441dd4b5c --- /dev/null +++ b/sources/tech/20141124 Linux blkid Command to Find Block Devices Details.md @@ -0,0 +1,110 @@ +Linux blkid Command to Find Block Devices Details +================================================================================ +Today we will show you how to use **lsblk** and **blkid** utilities to find out information about block devices and we are using a CentOS 7.0 installed machine. + +**lsblk** is a Linux utility that will display information about all the available block devices on your system. It reads and gathers from them from [the sysfs filesystem][1]. The utility will display information about all block devices (with the exception of RAM disks) in a tree-like format by default. + +### Lsblk default output ### + +By default lsblk will display a tree-like format of the block devices: + +**NAME** + + – the device name + +**MAJ:MIN** + + - Every device on a Linux operating system is represented by a file, for block (disk) devices, they describe the device using major and minor device numbers. + +**RM** + + – removable device – shows 1 if this is a removable device and 0 if it’s not + +**TYPE** + + – the device type + +**MOUNTPOINT** + + - the location where the device is mounted + +**RO** + + – it will display 1 for read-only filesystems and 0 for those that are not read-only + +**SIZE** + + – the size of the device + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/lsblk.jpg) + +### Display the owner of the devices ### + +To display information about the owenership of the device, the user and group that own the file and the mode that the filesystem has been mounted with you can use the –m option like this: + + lsblk –m + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/lsblk-m.jpg) + +### List the device blocks ### + +If you wish to just list the devices and not show them as a tree you can use the –l option: + + lsblk –l + +### Use in scripts ### + +Advanced tip: if you wish to use this in a script and don’t want to have the heading displayed you can use the –n flag like so: + + lsblk –ln + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/lsblk-ln.jpg) + +The **blkid** program is a command-line utility that displays information about available block devices. It can determine the type of content (e.g. filesystem, swap) a block device holds and also attributes (tokens, NAME=value pairs) from the content metadata (e.g. LABEL or UUID fields). It has two main forms of operation: either searching for a device with a specific NAME=value pair or displaying NAME=value pairs for one or more devices. + +### blkid usage ### + +Simply running blkid without any argument will list all the available devices with their Universally Unique Identifier (UUID), the TYPE of the file-system and the LABEL if it's set. + + # blkid + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/blkid.jpg) + +### Listing devices based on name or UUID ### + +If you wish to have information displayed only for a specific device you can use the device name as an option after blkid to do so: + + # blkid /dev/sda1 + +Also if you know the UUID of a device but don't know the device name and wish to find it out you can use the 0-U option like this: + + # blkid -U d3b1dcc2-e3b0-45b0-b703-d6d0d360e524 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/blkid-uuid.jpg) + +### Detailed information ### + +If you wish to obtain mode detailed information you can use the -p and -o udev option to have it display in a nice format like this: + + # blkid -po udev /dev/sda1 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/blkid-po.jpg) + +### Reset cache ### + +Sometimes the device list might not be updated, if you think this is the case you can use the -g option that will perform a garbage collection pass on the blkid cache to remove devices which no longer exist. + + # blkid -g + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/linux-command-lsblk-blkid/ + +作者:[Adrian Dinu][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/adriand/ +[1]:https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt \ No newline at end of file From af83c76e78af061b4bf26356d8565751d8fdfd33 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 24 Nov 2014 15:31:28 +0800 Subject: [PATCH 277/316] PUB:20141008 The Why and How of Ansible and Docker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @bazz2 很流畅! --- ...1008 The Why and How of Ansible and Docker.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20141008 The Why and How of Ansible and Docker.md (84%) diff --git a/translated/tech/20141008 The Why and How of Ansible and Docker.md b/published/20141008 The Why and How of Ansible and Docker.md similarity index 84% rename from translated/tech/20141008 The Why and How of Ansible and Docker.md rename to published/20141008 The Why and How of Ansible and Docker.md index 748d7eb15b..b8aa820c8f 100644 --- a/translated/tech/20141008 The Why and How of Ansible and Docker.md +++ b/published/20141008 The Why and How of Ansible and Docker.md @@ -1,24 +1,24 @@ Ansible和Docker的作用和用法 ================================================================================ -在 [Docker][1] 和 [Ansible][2] 的技术社区内存在着很多好玩的东西,我希望在你阅读完这篇文章后也能获取到我们对它们的那种热爱。当然,你也会收获一些实践知识,那就是如何通过部署 Ansible 和 Docker 来为 Rails 应用搭建一个完整的服务器环境。 +在 [Docker][1] 和 [Ansible][2] 的技术社区内存在着很多好玩的东西,我希望在你阅读完这篇文章后也能像我们一样热爱它们。当然,你也会收获一些实践知识,那就是如何通过部署 Ansible 和 Docker 来为 Rails 应用搭建一个完整的服务器环境。 -也许有人会问:你怎么不去用 Heroku?首先,我可以在任何供应商提供的主机上运行 Docker 和 Ansible;其次,相比于方便性,我更偏向于喜欢灵活性。我可以在这种组合中运行任何程序,而不仅仅是 web 应用。最后,我骨子里是一个工匠,我非常理解如何把零件拼凑在一起工作。Heroku 的基础模块是 Linux Container,而 Docker 表现出来的多功能性也是基于这种技术。事实上,Docker 的其中一个座右铭是:容器化是新虚拟化技术。 +也许有人会问:你怎么不去用 Heroku?首先,我可以在任何供应商提供的主机上运行 Docker 和 Ansible;其次,相比于方便性,我更偏向于喜欢灵活性。我可以在这种组合中运行任何程序,而不仅仅是 web 应用。最后,我骨子里是一个工匠,我非常了解如何把零件拼凑在一起工作。Heroku 的基础模块是 Linux Container,而 Docker 表现出来的多功能性也是基于这种技术。事实上,Docker 的其中一个座右铭是:容器化是新虚拟化技术。 ### 为什么使用 Ansible? ### 我重度使用 Chef 已经有4年了(LCTT:Chef 是与 puppet 类似的配置管理工具),**基础设施即代码**的观念让我觉得非常无聊。我花费大量时间来管理代码,而不是管理基础设施本身。不论多小的改变,都需要相当大的努力来实现它。使用 [Ansible][3],你可以一手掌握拥有可描述性数据的基础架构,另一只手掌握不同组件之间的交互作用。这种更简单的操作模式让我把精力集中在如何将我的技术设施私有化,提高了我的工作效率。与 Unix 的模式一样,Ansible 提供大量功能简单的模块,我们可以组合这些模块,达到不同的工作要求。 -除了 Python 和 SSH,Ansible 不再依赖其他软件,在它的远端主机上不需要部署代理,也不会留下任何运行痕迹。更厉害的是,它提供一套内建的、可扩展的模块库文件,通过它你可以控制所有:包管理器、云服务供应商、数据库等等等等。 +除了 Python 和 SSH,Ansible 不再依赖其他软件,在它的远端主机上不需要部署代理,也不会留下任何运行痕迹。更厉害的是,它提供一套内建的、可扩展的模块库文件,通过它你可以控制所有的一切:包管理器、云服务供应商、数据库等等等等。 ### 为什么要使用 Docker? ### -[Docker][4] 的定位是:提供最可靠、最方便的方式来部署服务。这些服务可以是 mysqld,可以是 redis,可以是 Rails 应用。先聊聊 git,它的快照功能让它可以以最有效的方式发布代码,Docker 的处理方法与它类似。它保证应用可以无视主机环境,随心所欲地跑起来。 +[Docker][4] 的定位是:提供最可靠、最方便的方式来部署服务。这些服务可以是 mysqld,可以是 redis,可以是 Rails 应用。先聊聊 git 吧,它的快照功能让它可以以最有效的方式发布代码,Docker 的处理方法与它类似。它保证应用可以无视主机环境,随心所欲地跑起来。 一种最普遍的误解是人们总是把 Docker 容器看成是一个虚拟机,当然,我表示理解你们的误解。Docker 满足[单一功能原则][5],在一个容器里面只跑一个进程,所以一次修改只会影响一个进程,而这些进程可以被重用。这种模型参考了 Unix 的哲学思想,当前还处于试验阶段,并且正变得越来越稳定。 ### 设置选项 ### -不需要离开终端,我就可以使用 Ansible 来生成以下实例:Amazon Web Services,Linode,Rackspace 以及 DigitalOcean。如果想要更详细的信息,我于1分25秒内在位于阿姆斯特丹的2号数据中心上创建了一个 2GB 的 DigitalOcean 虚拟机。另外的1分50秒用于系统配置,包括设置 Docker 和其他个人选项。当我完成这些基本设定后,就可以部署我的应用了。值得一提的是这个过程中我没有配置任何数据库或程序开发语言,Docker 已经帮我把应用所需要的事情都安排好了。 +不需要离开终端,我就可以使用 Ansible 来在这些云平台中生成实例:Amazon Web Services,Linode,Rackspace 以及 DigitalOcean。如果想要更详细的信息,我于1分25秒内在位于阿姆斯特丹的2号数据中心上创建了一个 2GB 的 DigitalOcean 虚拟机。另外的1分50秒用于系统配置,包括设置 Docker 和其他个人选项。当我完成这些基本设定后,就可以部署我的应用了。值得一提的是这个过程中我没有配置任何数据库或程序开发语言,Docker 已经帮我把应用所需要的事情都安排好了。 Ansible 通过 SSH 为远端主机发送命令。我保存在本地 ssh 代理上面的 SSH 密钥会通过 Ansible 提供的 SSH 会话分享到远端主机。当我把应用代码从远端 clone 下来,或者上传到远端时,我就不再需要提供 git 所需的证书了,我的 ssh 代理会帮我通过 git 主机的身份验证程序的。 @@ -65,13 +65,13 @@ CMD 这个步骤是在新的 web 应用容器启动后执行的。在测试环 没有本地 Docker 镜像,从零开始部署一个中级规模的 Rails 应用大概需要100个 gems,进行100次整体测试,在使用2个核心实例和2GB内存的情况下,这些操作需要花费8分16秒。装上 Ruby、MySQL 和 Redis Docker 镜像后,部署应用花费了4分45秒。另外,如果从一个已存在的主应用镜像编译出一个新的 Docker 应用镜像出来,只需花费2分23秒。综上所述,部署一套新的 Rails 应用,解决其所有依赖关系(包括 MySQL 和 Redis),只需花我2分钟多一点的时间就够了。 -需要指出的一点是,我的应用上运行着一套完全测试套件,跑完测试需要花费额外1分钟时间。尽管是无意的,Docker 可以变成一套简单的持续集成环境,当测试失败后,Docker 会把“test-only”这个容器保留下来,用于分析出错原因。我可以在1分钟之内和我的客户一起验证新代码,保证不同版本的应用之间是完全隔离的,同操作系统也是隔离的。传统虚拟机启动系统时需要花费好几分钟,Docker 容器只花几秒。另外,一旦一个 Dockedr 镜像编译出来,并且针对我的某个版本的应用的测试都被通过,我就可以把这个镜像提交到 Docker 私服 Registry 上,可以被其他 Docker 主机下载下来并启动一个新的 Docker 容器,而这不过需要几秒钟时间。 +需要指出的一点是,我的应用上运行着一套完全测试套件,跑完测试需要花费额外1分钟时间。尽管是无意的,Docker 可以变成一套简单的持续集成环境,当测试失败后,Docker 会把“test-only”这个容器保留下来,用于分析出错原因。我可以在1分钟之内和我的客户一起验证新代码,保证不同版本的应用之间是完全隔离的,同操作系统也是隔离的。传统虚拟机启动系统时需要花费好几分钟,Docker 容器只花几秒。另外,一旦一个 Dockedr 镜像编译出来,并且针对我的某个版本的应用的测试都被通过,我就可以把这个镜像提交到一个私有的 Docker Registry 上,可以被其他 Docker 主机下载下来并启动一个新的 Docker 容器,而这不过需要几秒钟时间。 ### 总结 ### Ansible 让我重新看到管理基础设施的乐趣。Docker 让我有充分的信心能稳定处理应用部署过程中最重要的步骤——交付环节。双剑合璧,威力无穷。 -从无到有搭建一个完整的 Rails 应用可以在12分钟内完成,这种速度放在任何场合都是令人印象深刻的。能获得一个免费的持续集成环境,可以查看不同版本的应用之间的区别,不会影响到同主机上已经在运行的应用,这些功能强大到难以置信,让我感到很兴奋。在文章的最后,我只希望你能感受到我的兴奋。 +从无到有搭建一个完整的 Rails 应用可以在12分钟内完成,这种速度放在任何场合都是令人印象深刻的。能获得一个免费的持续集成环境,可以查看不同版本的应用之间的区别,不会影响到同主机上已经在运行的应用,这些功能强大到难以置信,让我感到很兴奋。在文章的最后,我只希望你能感受到我的兴奋! 我在2014年1月伦敦 Docker 会议上讲过这个主题,[已经分享到 Speakerdeck][7]了。 @@ -87,7 +87,7 @@ via: http://thechangelog.com/ansible-docker/ 作者:[Gerhard Lazu][a] 译者:[bazz2](https://github.com/bazz2) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 5d4b860a47bc7e7fe6a621d923bcbd0023ca2f31 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 24 Nov 2014 15:44:56 +0800 Subject: [PATCH 278/316] PUB:20141023 6 Minesweeper Clones for Linux @GOLinux --- .../20141023 6 Minesweeper Clones for Linux.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) rename {translated/share => published}/20141023 6 Minesweeper Clones for Linux.md (80%) diff --git a/translated/share/20141023 6 Minesweeper Clones for Linux.md b/published/20141023 6 Minesweeper Clones for Linux.md similarity index 80% rename from translated/share/20141023 6 Minesweeper Clones for Linux.md rename to published/20141023 6 Minesweeper Clones for Linux.md index cd703ef089..a4e958dfb2 100644 --- a/translated/share/20141023 6 Minesweeper Clones for Linux.md +++ b/published/20141023 6 Minesweeper Clones for Linux.md @@ -1,5 +1,7 @@ -Linux下的6个扫雷翻版 +Linux下的6个扫雷游戏的翻版 ================================================================================ +Windows 下的扫雷游戏还没玩够么?那么来 Linux 下继续扫雷吧——这是一个雷的时代~~ + ### GNOME Mines ### 这是GNOME扫雷复制品,允许你从3个不同的预定义表大小(8×8, 16×16, 30×16)中选择其一,或者自定义行列的数量。它能以全屏模式运行,带有高分值、耗时和提示。游戏可以暂停和继续。 @@ -8,14 +10,14 @@ Linux下的6个扫雷翻版 ### ace-minesweeper ### -这是一个包中的游戏,此包中也包含有其它一些游戏,如ace-freecel,ace-solitaire或ace-spider。它有一个以小企鹅为特色的图形化界面,但好像不能调整表的大小。该包在Ubuntu中名为ace-of-penguins。 +这是一个大的软件包中的游戏,此包中也包含有其它一些游戏,如ace-freecel,ace-solitaire或ace-spider。它有一个以小企鹅为特色的图形化界面,但好像不能调整表的大小。该包在Ubuntu中名为ace-of-penguins。 ![](http://www.tuxarena.com/wp-content/uploads/2014/10/ace-minesweeper.jpg) ### XBomb ### XBomb是针对X Windows系统扫雷游戏,它有三种不同的表尺寸和卡牌风格,包含有不同的外形:六角形、矩形(传统)或三角形。不幸的是,在Ubuntu 14.04中的版本会出现程序分段冲突,所以你可能需要安装另外一个版本。 -[首页][1] +[首页][1]。 ![](http://www.tuxarena.com/wp-content/uploads/2014/10/xbomb.png) @@ -45,7 +47,7 @@ via: http://www.tuxarena.com/2014/10/6-minesweeper-clones-for-linux/ 作者:Craciun Dan 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From f5a26d4b4a1bec283c88670d828bfa9cfda7cbee Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 24 Nov 2014 16:26:00 +0800 Subject: [PATCH 279/316] PUB:20141012 Simple guide to forks in github and git @su-kaiyao @FingerLiu --- ...20141012 Simple guide to forks in github and git.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) rename {translated/tech => published}/20141012 Simple guide to forks in github and git.md (89%) diff --git a/translated/tech/20141012 Simple guide to forks in github and git.md b/published/20141012 Simple guide to forks in github and git.md similarity index 89% rename from translated/tech/20141012 Simple guide to forks in github and git.md rename to published/20141012 Simple guide to forks in github and git.md index cbdc98608e..bb087dc250 100644 --- a/translated/tech/20141012 Simple guide to forks in github and git.md +++ b/published/20141012 Simple guide to forks in github and git.md @@ -5,7 +5,7 @@ Git教程往往不会解决这个问题,因为它集中篇幅来教你Git命令和概念,并且不认为你会使用GitHub。[GitHub帮助教程](https://help.github.com/)一定程度上弥补了这一缺陷,但是它每篇文章的关注点都较为狭隘,而且没有提供关于"Git vs GitHub"问题的概念性概述。 -**如果你是习惯于先理解概念,再着手代码的学习者**,而且你也是Git和GitHub的初学者,我建议你先理解清楚什么是fork,为什么? +**如果你是习惯于先理解概念,再着手代码的学习者**,而且你也是Git和GitHub的初学者,我建议你先理解清楚什么是fork。为什么呢 ? 1. Fork是在GitHub起步最普遍的方式。 2. Fork只需要很少的Git命令,但是起得作用却非常大。 @@ -53,15 +53,19 @@ Joe和其余贡献者已经对这个项目做了一些修改,而你将在他 ### 结论 -我希望这是一篇关于GitHub和Git [fork](https://help.github.com/articles/fork-a-repo)有用概述。现在,你已经理解了那些概念,你将会更容易地在实际中执行你的代码。GitHub关于fork和[同步](https://help.github.com/articles/syncing-a-fork)的文章将会给你大部分你需要的代码。 +我希望这是一篇关于GitHub和Git 的 [fork](https://help.github.com/articles/fork-a-repo)有用概述。现在,你已经理解了那些概念,你将会更容易地在实际中执行你的代码。GitHub关于fork和[同步](https://help.github.com/articles/syncing-a-fork)的文章将会给你大部分你需要的代码。 如果你是Git的初学者,而且你很喜欢这种学习方式,那么我极力推荐书籍[Pro Git](http://git-scm.com/book)的前两个章节,网上是可以免费查阅的。 如果你喜欢视频学习,我创建了一个[11部分的视频系列](http://www.dataschool.io/git-and-github-videos-for-beginners/)(总共36分钟),来向初学者介绍Git和GitHub。 --- +via: http://www.dataschool.io/simple-guide-to-forks-in-github-and-git/ +作者:[Kevin Markham][a] 译者:[su-kaiyao](https://github.com/su-kaiyao) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://disqus.com/home/user/justmarkham/ \ No newline at end of file From 3e3d66eecfc53b8c3668215efadb7a02a99e7737 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 25 Nov 2014 09:46:48 +0800 Subject: [PATCH 280/316] =?UTF-8?q?20141125-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Monitoring tool) on ubuntu 14.10 server.md | 129 ++++++++++++++++++ ...s a NAT guest from host with VirtualBox.md | 67 +++++++++ ...rs--How to check glibc version on Linux.md | 54 ++++++++ ... ImportError--No module named scapy.all.md | 40 ++++++ 4 files changed, 290 insertions(+) create mode 100644 sources/tech/20141125 How to install Cacti (Monitoring tool) on ubuntu 14.10 server.md create mode 100644 sources/tech/20141125 Linux FAQs with Answers--How to access a NAT guest from host with VirtualBox.md create mode 100644 sources/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md create mode 100644 sources/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md diff --git a/sources/tech/20141125 How to install Cacti (Monitoring tool) on ubuntu 14.10 server.md b/sources/tech/20141125 How to install Cacti (Monitoring tool) on ubuntu 14.10 server.md new file mode 100644 index 0000000000..9422f7e79e --- /dev/null +++ b/sources/tech/20141125 How to install Cacti (Monitoring tool) on ubuntu 14.10 server.md @@ -0,0 +1,129 @@ +How to install Cacti (Monitoring tool) on ubuntu 14.10 server +================================================================================ +Cacti is a complete network graphing solution designed to harness the power of RRDTool's data storage and graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box. All of this is wrapped in an intuitive, easy to use interface that makes sense for LAN-sized installations up to complex networks with hundreds of devices. + +### Features ### + +#### Graphs #### + +Unlimited number of graph items can be defined for each graph optionally utilizing CDEFs or data sources from within cacti. + +Automatic grouping of GPRINT graph items to AREA, STACK, and LINE[1-3] to allow for quick re-sequencing of graph items. + +Auto-Padding support to make sure graph legend text lines up. + +Graph data can be manipulated using the CDEF math functions built into RRDTool. These CDEF functions can be defined in cacti and can be used globally on each graph. + +Support for all of RRDTool's graph item types including AREA, STACK, LINE[1-3], GPRINT, COMMENT, VRULE, and HRULE. + +#### Data Sources #### + +Data sources can be created that utilize RRDTool's "create" and "update" functions. Each data source can be used to gather local or remote data and placed on a graph. + +Supports RRD files with more than one data source and can use an RRD file stored anywhere on the local file system. +Round robin archive (RRA) settings can be customized giving the user the ability to gather data on non-standard timespans while store varying amounts of data. + +#### Data Gathering #### + +Contains a "data input" mechanism which allows users to define custom scripts that can be used to gather data. Each script can contain arguments that must be entered for each data source created using the script (such as an IP address). + +Built in SNMP support that can use php-snmp, ucd-snmp, or net-snmp. + +Ability to retrieve data using SNMP or a script with an index. An example of this would be populating a list with IP interfaces or mounted partitions on a server. Integration with graph templates can be defined to enable one click graph creation for hosts. + +A PHP-based poller is provided to execute scripts, retrieve SNMP data, and update your RRD files. + +#### Templates #### + +Graph templates enable common graphs to be grouped together by templating. Every field for a normal graph can be templated or specified on a per-graph basis. + +Data source templates enable common data source types to be grouped together by templating. Every field for a normal data source can be templated or specified on a per-data source basis. + +Host templates are a group of graph and data source templates that allow you to define common host types. Upon the creation of a host, it will automatically take on the properties of its template. + +#### Graph Display #### + +The tree view allows users to create "graph hierarchies" and place graphs on the tree. This is an easy way to manage/organize a large number of graphs. + +The list view lists the title of each graph in one large list which links the user to the actual graph. +The preview view displays all of the graphs in one large list format. This is similar to the default view for the 14all cgi script for RRDTool/MRTG. + +#### User Management #### + +User based management allows administrators to create users and assign different levels of permissions to the cacti interface. + +Permissions can be specified per-graph for each user, making cacti suitable for co location situations. +Each user can keep their own graph settings for varying viewing preferences. + +#### Preparing your system #### + +Before installing cacti you need to make sure you have installed [Ubuntu 14.10 LAMP server][1]. + +#### Install Cacti on ubuntu 14.10 server #### + +Open the terminal and run the following command + + sudo apt-get install cacti-spine + +The above command starts the cacti installation and you should see the first as php path change select ok and press enter + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/01/18.png) + +Now select the webserver you want to use (in my case it is apache2) + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/01/27.png) + +Cacti database configurations select yes + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/01/35.png) + +Enter database admin user password + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/01/42.png) + +Mysql application password for cacti + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/01/5.png) + +confirm the password + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/01/6.png) + +Now that Cacti is installed, we can start the configuration process on it. + +#### Configuring cacti #### + +Point your web browser towards http://YOURSERVERIP/cacti/install/ to start the initial setup and click next + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/01/7.png) + +Select new install option and click next + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/01/8.png) + +In the following screen you need to make sure you have all the required paths are correct and click on finish + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/01/9.png) + +Now login to Cacti with the default admin/admin, and change the password to something more sensible + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/01/10.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/01/111.png) + +After login in to Cacti you should see similar to the following screen + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/14.png) + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/how-to-install-cacti-monitoring-tool-on-ubuntu-14-10-server.html + +作者:[ruchi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix +[1]:http://www.ubuntugeek.com/www.ubuntugeek.com/step-by-step-ubuntu-14-10-utopic-unicorn-lamp-server-setup.html \ No newline at end of file diff --git a/sources/tech/20141125 Linux FAQs with Answers--How to access a NAT guest from host with VirtualBox.md b/sources/tech/20141125 Linux FAQs with Answers--How to access a NAT guest from host with VirtualBox.md new file mode 100644 index 0000000000..32d27068b7 --- /dev/null +++ b/sources/tech/20141125 Linux FAQs with Answers--How to access a NAT guest from host with VirtualBox.md @@ -0,0 +1,67 @@ +Linux FAQs with Answers--How to access a NAT guest from host with VirtualBox +================================================================================ +> **Question**: I have a guest VM running on VirtualBox, which uses NAT networking. So the guest VM is getting a private IP address (10.x.x.x) assigned by VirtualBox. If I want to SSH to the guest VM from the host machine, how can I do that? + +VirtualBox supports several networking options for guest VMs, one of them being NAT networking. When NAT networking is enabled for a guest VM, VirtualBox automatically performs network address translation between the guest VM and host's network stack, so that you do not have to configure anything on the host machine and local network for the guest VM's networking to work. The implication of such NAT, however, is that the guest VM is not reachable or visible from external networks as well as from the local host itself. This is a problem if you want to access the guest VM from the host machine for some reason (e.g., SSH). + +If you want to access a NAT guest from the host on VirtualBox, you can enable port forwarding for VirtualBox NAT, either from the GUI or from the command line. This tutorial demonstrates **how to SSH a NAT guest from the host** by enabling port forwarding for port 22. If you want to access HTTP of a NAT guest instead, replace port 22 with port 80. + +### Configure VirtualBox Port Forwarding from the GUI ### + +On VirtualBox, choose the guest VM you want to access, and open "Settings" window of the VM. Click on "Network" menu on the left, click on "Advanced" to show additional network adapter options. + +![](https://farm8.staticflickr.com/7583/15797904856_2753dc785e_z.jpg) + +Click on a button labeled "Port Forwarding." + +![](https://farm8.staticflickr.com/7527/15636152708_cf2be7c7e8_z.jpg) + +You will see a window where you can configure port forwarding rules. Click on "Add" icon in the upper right corner. + +![](https://farm8.staticflickr.com/7489/15636391217_48a9954480_z.jpg) + +Add a new port forwarding rule with the following detail. + +- **Name**: SSH (any arbitrary unique name) +- **Protocol**: TCP +- **Host IP**: 127.0.0.1 +- **Host Port**: 2222 (any unused port higher than 1024) +- **Guest IP**: IP address of the guest VM +- **Guest Port**: 22 (SSH port) + +![](https://farm6.staticflickr.com/5603/15202135853_02a07c3212_o.png) + +Port forwarding configured for the guest VM will be enabled automatically when you power on the guest VM. For verification, check that port 2222 is opened by VirtualBox after you launch the guest VM: + + $ sudo netstat -nap | grep 2222 + +![](https://farm8.staticflickr.com/7461/15819682411_6bb9707f8a_z.jpg) + +Now that port forwarding is in place, you can SSH to the guest VM bs follows. + + $ ssh -p 2222 @127.0.0.1 + +An SSH login request sent to 127.0.0.1:2222 will automatically be translated into 10.0.2.15:22 by VirtualBox, allowing you to SSH to the guest VM. + +### Configure VirtualBox Port Forwarding from the Command Line ### + +VirtualBox comes with a command-line management interface called VBoxManage. Using this command-line tool, you can also set up port forwarding for your guest VM. + +The following command creates a port forwarding rule for guest VM named "centos7" with IP address 10.0.2.15 and SSH port 22, mapped to local host at port 2222. The name of the rule ("SSH" in this example) must be unique. + + $ VBoxManage modifyvm "centos7" --natpf1 "SSH,tcp,127.0.0.1,2222,10.0.2.15,22" + +Once the rule is created, you can verify that by using the command below. + + $ VBoxManage showvminfo "centos7" | grep NIC + +![](https://farm8.staticflickr.com/7559/15636458427_7a0959900c_z.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/access-nat-guest-from-host-virtualbox.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md b/sources/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md new file mode 100644 index 0000000000..dcfa0161b7 --- /dev/null +++ b/sources/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md @@ -0,0 +1,54 @@ +Linux FAQs with Answers--How to check glibc version on Linux +================================================================================ +> **Question**: I need to find out the version of the GNU C library (glibc) that I have on my Linux system. How can I check glibc version on Linux? + +The GNU C library (glibc) is the GNU implementation of the standard C library. glibc is a critical component of the GNU toolchain, which is used along with binutils and compiler to generate userspace application binaries for a target architecture. + +When built from source, some Linux programs may be required to link against a particular version of glibc. In that case, you may want to check out the information about installed glibc to see if dependencies are met. + +Here are simple ways to check glibc version on Linux. + +### Method One ### + +A simple command-line to check the version of the GNU C library is as follows. + + $ ldd --version + +![](https://farm6.staticflickr.com/5613/15631104658_940163834a_z.jpg) + +In this example, the version of **glibc is 2.19**. + +### Method Two ### + +Another method is to "type" the **glibc library** (i.e., libc.so.6) from the command line as if it were a command. + +The output will show more detailed information about **glibc library**, including the version of glibc and the GNU compiler used, as well as available glibc extensions. The location of glibc varies depending on distros and processor architectures. + +On 64-bit Debian based system: + + $ /lib/x86_64-linux-gnu/libc.so.6 + +on 32-bit Debian based system: + + $ /lib/i386-linux-gnu/libc.so.6 + +On 64-bit Red Hat based system: + + $ /lib64/libc.so.6 + +On 32-bit Red Hat based systems: + + $ /lib/libc.so.6 + +Here is the sample output of typing glibc library. + +![](https://farm8.staticflickr.com/7516/15631334667_ef50b247a4_z.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/check-glibc-version-linux.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md b/sources/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md new file mode 100644 index 0000000000..d74df0129f --- /dev/null +++ b/sources/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md @@ -0,0 +1,40 @@ +Linux FAQs with Answers--How to fix “ImportError: No module named scapy.all” +================================================================================ +> **Question**: When I run a Python application, I am getting "ImportError: No module named scapy.all" message. How can I fix this import error? + +[Scapy][1] is a flexible packet generation and sniffer program written in Python. Using Scapy, you can create arbitrary packets, send them to the wire, reading packets from the wire or a dump file, transform packets, etc. Using Scapy's generic packet manipulation capabilities, you can easily do things like SYN scan, TCP traceroute, and OS fingerprinting. You can also integrate Scapy into another tool by importing it. + +The import error indicates that you do not have Scapy installed on your Linux system. Here is how to install Scapy on Linux. + +### Install Scapy on Debian, Ubuntu or Linux Mint ### + + $ sudo apt-get install python-scapy + +### Install Scapy on Fedora or CentOS/RHEL ### + +On CentOS/RHEL, you need to [enable EPEL repository][2] first. + + $ sudo yum install scapy + +### Install Scapy from the Source ### + +If your Linux distribution does not offer Scapy package or you want to try the latest Scapy, you can install Scapy manually from the source. + +Download the [latest version of Scapy][3], and install it as follows. + + $ unzip scapy-latest.zip + $ cd scapy-2.* + $ sudo python setup.py install + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/importerror-no-module-named-scapy-all.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.secdev.org/projects/scapy/ +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[3]:http://scapy.net/ \ No newline at end of file From e794d67ce65ab4665518a0cdf28991a794391145 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 25 Nov 2014 15:43:47 +0800 Subject: [PATCH 281/316] =?UTF-8?q?20141125-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... headed for no-downtime kernel patching.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sources/talk/20141125 Four ways Linux is headed for no-downtime kernel patching.md diff --git a/sources/talk/20141125 Four ways Linux is headed for no-downtime kernel patching.md b/sources/talk/20141125 Four ways Linux is headed for no-downtime kernel patching.md new file mode 100644 index 0000000000..6484b8124b --- /dev/null +++ b/sources/talk/20141125 Four ways Linux is headed for no-downtime kernel patching.md @@ -0,0 +1,55 @@ +Four ways Linux is headed for no-downtime kernel patching +================================================================================ +![Credit: Shutterstock](http://images.techhive.com/images/article/2014/10/patch_f-100526950-primary.idge.jpeg) +Credit: Shutterstock + +These technologies are competing to provide the best way to patch the Linux kernel without reboots or downtime + +Nobody loves a reboot, especially not if it involves a late-breaking patch for a kernel-level issue that has to be applied stat. + +To that end, three projects are in the works to provide a mechanism for upgrading the kernel in a running Linux instance without having to reboot anything. + +### Ksplice ### + +The first and original contender is Ksplice, courtesy of a company of the same name founded in 2008. The kernel being replaced does not have to be pre-modified; all it needs is a diff file listing the changes to be made to the kernel source. Ksplice, Inc. offered support for the (free) software as a paid service and supported most common Linux distributions used in production. + +All that changed in 2011, when [Oracle purchased the company][1], rolled the feature into its own Linux distribution, and kept updates for the technology to itself. As a result, other intrepid kernel hackers have been looking for ways to pick up where Ksplice left off, without having to pay the associated Oracle tax. + +### Kgraft ### + +In February 2014, Suse provided the exact solution needed: [Kgraft][2], its kernel-update technology released under a mixed GPLv2/GPLv3 license and not kept close as a proprietary creation. It's since been [submitted][3] as a possible inclusion to the mainline Linux kernel, although Suse has rolled a version of the technology into [Suse Linux Enterprise Server 12][4]. + +Kgraft works roughly like Ksplice by using a set of diffs to figure out what parts of the kernel to replace. But unlike Ksplice, Kgraft doesn't need to stop the kernel entirely to replace it. Any running functions can be directed to their old or new kernel-level counterparts until the patching process is finished. + +### Kpatch ### + +Red Hat came up with its own no-reboot kernel-patch mechanism, too. Also introduced earlier this year -- right after Suse's work in that vein, no less -- [Kpatch][5] works in roughly the same manner as Kgraft. + +The main difference, [as outlined][6] by Josh Poimboeuf of Red Hat, is that Kpatch doesn't redirect calls to old kernel functions. Rather, it waits until all function calls have stopped, then swaps in the new kernel. Red Hat's engineers consider this approach safer, with less code to maintain, albeit at the cost of more latency during the patch process. + +Like Kgraft, Kpatch has been submitted for consideration as a possible kernel inclusion and can be used with Linux kernels other than Red Hat's. The bad news is that Kpatch isn't yet considered production-ready by Red Hat. It's included as part of Red Hat Enterprise Linux 7, but only in the form of a technology preview. + +### ...or Kgraft + Kpatch? ### + +A fourth solution [proposed by Red Hat developer Seth Jennings][7] early in November 2014 is a mix of both the Kgraft and Kpatch approaches, using patches built for either one of those solutions. This new approach, Jennings explained, "consists of a live patching 'core' that provides an interface for other 'patch' kernel modules to register patches with the core." This way, the patching process -- specifically, how to deal with any running kernel functions -- can be handled in a more orderly fashion. + +The sheer newness of these proposals means it'll be a while before any of them are officially part of the Linux kernel, although Suse's chosen to move fast and made it a part of its latest enterprise offering. Let's see if Red Hat and Canonical choose to follow suit in the short run as well. + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2851028/linux/four-ways-linux-is-headed-for-no-downtime-kernel-patching.html + +作者:[Serdar Yegulalp][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Serdar-Yegulalp/ +[1]:http://www.infoworld.com/article/2622437/open-source-software/oracle-buys-ksplice-for-linux--zero-downtime--tech.html +[2]:http://www.infoworld.com/article/2610749/linux/suse-open-sources-live-updater-for-linux-kernel.html +[3]:https://lwn.net/Articles/596854/ +[4]:http://www.infoworld.com/article/2838421/linux/suse-linux-enterprise-12-goes-light-on-docker-heavy-on-reliability.html +[5]:https://github.com/dynup/kpatch +[6]:https://lwn.net/Articles/597123/ +[7]:http://lkml.iu.edu/hypermail/linux/kernel/1411.0/04020.html \ No newline at end of file From db81f42bb9b0e92d8e7db3fa5a9ada7a6f192899 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 25 Nov 2014 16:40:55 +0800 Subject: [PATCH 282/316] PUB:20140926 How to manage configurations in Linux with Puppet and Augeas @geekpi --- ...rations in Linux with Puppet and Augeas.md | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) rename {translated/tech => published}/20140926 How to manage configurations in Linux with Puppet and Augeas.md (66%) diff --git a/translated/tech/20140926 How to manage configurations in Linux with Puppet and Augeas.md b/published/20140926 How to manage configurations in Linux with Puppet and Augeas.md similarity index 66% rename from translated/tech/20140926 How to manage configurations in Linux with Puppet and Augeas.md rename to published/20140926 How to manage configurations in Linux with Puppet and Augeas.md index 17e7e21f5d..fb47119207 100644 --- a/translated/tech/20140926 How to manage configurations in Linux with Puppet and Augeas.md +++ b/published/20140926 How to manage configurations in Linux with Puppet and Augeas.md @@ -1,9 +1,8 @@ 如何用Puppet和Augeas管理Linux配置 ================================================================================ -虽然[Puppet][1](注:此文原文原文中曾今做过,文件名:“20140808 How to install Puppet server and client on CentOS and RHEL.md”,如果翻译发布过,可修改此链接为发布地址)是一个非常独特的和有用的工具,在有些情况下你可以使用一点不同的方法。要修改的配置文件已经在几个不同的服务器上且它们在这时是互补相同的。Puppet实验室的人也意识到了这一点并集成了一个伟大的工具,称之为[Augeas][2],它是专为这种使用情况而设计的。 +虽然[Puppet][1]是一个真正独特的有用工具,但在有些情况下你可以使用一点不同的方法来用它。比如,你要修改几个服务器上已有的配置文件,而且它们彼此稍有不同。Puppet实验室的人也意识到了这一点,他们在 Puppet 中集成了一个叫做[Augeas][2]的伟大的工具,它是专为这种使用情况而设计的。 - -Augeas可被认为填补了Puppet能力的缺陷,其中一个特定对象的资源类型(如主机资源来处理/etc/hosts中的条目)还不可用。在这个文档中,您将学习如何使用Augeas来减轻你管理配置文件的负担。 +Augeas可被认为填补了Puppet能力的空白,比如在其中一个指定对象的资源类型(例如用于维护/etc/hosts中的条目的主机资源)还不可用时。在这个文档中,您将学习如何使用Augeas来减轻你管理配置文件的负担。 ### Augeas是什么? ### @@ -11,13 +10,13 @@ Augeas基本上就是一个配置编辑工具。它以他们原生的格式解 ### 这篇教程要达成什么目的? ### -我们会安装并配置Augeas用于我们之前构建的Puppet服务器。我们会使用这个工具创建并测试几个不同的配置文件,并学习如何适当地使用它来管理我们的系统配置。 +我们会针对[我们之前构建的Puppet服务器][1]安装并配置Augeas。我们会使用这个工具创建并测试几个不同的配置文件,并学习如何适当地使用它来管理我们的系统配置。 -### 先决条件 ### +### 前置阅读 ### -我们需要一台工作的Puppet服务器和客户端。如果你还没有,请先按照我先前的教程来。 +我们需要一台工作的Puppet服务器和客户端。如果你还没有,请先按照我先前的[教程][1]来。 -Augeas安装包可以在标准CentOS/RHEL仓库中找到。不幸的是,Puppet用到的ruby封装的Augeas只在puppetlabs仓库中(或者[EPEL][4])中才有。如果你系统中还没有这个仓库,请使用下面的命令: +Augeas安装包可以在标准CentOS/RHEL仓库中找到。不幸的是,Puppet用到的Augeas的ruby封装只在puppetlabs仓库中(或者[EPEL][4])中才有。如果你系统中还没有这个仓库,请使用下面的命令: 在CentOS/RHEL 6.5上: @@ -31,7 +30,7 @@ Augeas安装包可以在标准CentOS/RHEL仓库中找到。不幸的是,Puppet # yum install ruby­augeas -或者如果你是从我的上一篇教程中继续的,使用puppet的方法安装这个包。在/etc/puppet/manifests/site.pp中修改你的custom_utils类,在packages这行中加入“ruby­augeas”。 +或者如果你是从我的[上一篇教程中继续][1]的,使用puppet的方法安装这个包。在/etc/puppet/manifests/site.pp中修改你的custom_utils类,在packages这行中加入“ruby­augeas”。 class custom_utils { package { ["nmap","telnet","vim­enhanced","traceroute","ruby­augeas"]: @@ -54,7 +53,7 @@ Augeas安装包可以在标准CentOS/RHEL仓库中找到。不幸的是,Puppet 1. 给wheel组加上sudo权限。 -这个例子会向你战士如何在你的GNU/Linux系统中为%wheel组加上sudo权限。 +这个例子会向你展示如何在你的GNU/Linux系统中为%wheel组加上sudo权限。 # 安装sudo包 package { 'sudo': @@ -73,7 +72,7 @@ Augeas安装包可以在标准CentOS/RHEL仓库中找到。不幸的是,Puppet ] } -现在来解释这些代码做了什么:**spec**定义了/etc/sudoers中的用户段,**[user]**定义了数组中给定的用户,所有的定义的斜杠( / ) 后用户的子部分。因此在典型的配置中这个可以这么表达: +现在来解释这些代码做了什么:**spec**定义了/etc/sudoers中的用户段,**[user]**定义了数组中给定的用户,所有的定义放在该用户的斜杠( / ) 后那部分。因此在典型的配置中这个可以这么表达: user host_group/host host_group/command host_group/command/runas_user @@ -83,7 +82,7 @@ Augeas安装包可以在标准CentOS/RHEL仓库中找到。不幸的是,Puppet 2. 添加命令别称 -下面这部分会向你展示如何定义命令别名,他可以在你的sudoer文件中使用。 +下面这部分会向你展示如何定义命令别名,它可以在你的sudoer文件中使用。 # 创建新的SERVICE别名,包含了一些基本的特权命令。 augeas { 'sudo_cmdalias': @@ -97,7 +96,7 @@ Augeas安装包可以在标准CentOS/RHEL仓库中找到。不幸的是,Puppet ] } -sudo命令别名的语法很简单:**Cmnd_Alias**定义了命令别名字段,**[alias/name]**绑定所有给定的别名,/alias/name **SERVICES** 定义真实的别名以及alias/command 是所有命令的数组,每条命令是这个别名的一部分。 +sudo命令别名的语法很简单:**Cmnd_Alias**定义了命令别名字段,**[alias/name]**绑定所有给定的别名,/alias/name **SERVICES** 定义真实的别名,alias/command 是属于该别名的所有命令的数组。以上将被转换如下: Cmnd_Alias SERVICES = /sbin/service , /sbin/chkconfig , /bin/hostname , /sbin/shutdown @@ -105,12 +104,12 @@ sudo命令别名的语法很简单:**Cmnd_Alias**定义了命令别名字段 #### 向一个组中加入用户 #### -要使用Augeas向组中添加用户,你有也许要添加一个新用户,无论是在gid字段后或者在最后一个用户后。我们在这个例子中使用组SVN。这可以通过下面的命令达成: +要使用Augeas向组中添加用户,你也许要添加一个新用户,不管是排在 gid 字段还是最后的用户 uid 之后。我们在这个例子中使用SVN组。这可以通过下面的命令达成: 在Puppet中: augeas { 'augeas_mod_group: - context => '/files/etc/group', # The target file is /etc/group + context => '/files/etc/group', #目标文件是 /etc/group changes => [ "ins user after svn/*[self::gid or self::user][last()]", "set svn/user[last()] john", @@ -123,14 +122,14 @@ sudo命令别名的语法很简单:**Cmnd_Alias**定义了命令别名字段 ### 总结 ### -目前为止,你应该对如何在Puppet项目中使用Augeas有一个好想法了。随意地试一下,你肯定会经历官方的Augeas文档。这会帮助你了解如何在你的个人项目中正确地使用Augeas,并且它会想你展示你可以用它节省多少时间。 +目前为止,你应该对如何在Puppet项目中使用Augeas有点明白了。随意地试一下,你肯定需要浏览官方的Augeas文档。这会帮助你了解如何在你的个人项目中正确地使用Augeas,并且它会让你知道可以用它节省多少时间。 如有任何问题,欢迎在下面的评论中发布,我会尽力解答和向你建议。 ### 有用的链接 ### -- [http://www.watzmann.net/categories/augeas.html][6]: contains a lot of tutorials focused on Augeas usage. -- [http://projects.puppetlabs.com/projects/1/wiki/puppet_augeas][7]: Puppet wiki with a lot of practical examples. +- [http://www.watzmann.net/categories/augeas.html][6]: 包含许多关于 Augeas 使用的教程。 +- [http://projects.puppetlabs.com/projects/1/wiki/puppet_augeas][7]: Puppet wiki 带有许多实例。 -------------------------------------------------------------------------------- @@ -138,12 +137,12 @@ via: http://xmodulo.com/2014/09/manage-configurations-linux-puppet-augeas.html 作者:[Jaroslav Štěpánek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/jaroslav -[1]:http://xmodulo.com/2014/08/install-puppet-server-client-centos-rhel.html +[1]:http://linux.cn/article-3959-1.html [2]:http://augeas.net/ [3]:http://xmodulo.com/manage-configurations-linux-puppet-augeas.html [4]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html From 21286943d4b86c74f195bba55833ab697c9ba35e Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 25 Nov 2014 16:44:05 +0800 Subject: [PATCH 283/316] =?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 --- ...untu Could Give a Fatal Blow to Windows in China.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/translated/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md b/translated/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md index dbb885260d..1a56c4bc1b 100644 --- a/translated/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md +++ b/translated/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md @@ -4,7 +4,7 @@ Ubuntu也许能在中国给Windows以致命打击 **Windows操作系统将退出中国的前门,而它的位置将由一个Linux发行版替代,用于官方和政府部门。问题是目前还没有一个真正的可替代系统,尽管还是有一款操作系统也许已经准备接下这个任务,它就是Ubuntu Kylin。** -至少可以这么说,中国政府和微软目前的关系很紧张。[就像今天新闻里说的][1],一个用Linux类似系统在全国逐步替换Windows的计划已经在准备了。还不清楚具体会采用哪个系统,因为情况很复杂而且这是一个非常大的国家。 +至少可以这么说,中国政府和微软目前的关系很紧张。[就像新闻里说的][1],一个用Linux类似系统在全国逐步替换Windows的计划已经在准备了。还不清楚具体会采用哪个系统,因为情况很复杂而且这是一个非常大的国家。 通常,这种问题没有一个普适的解决方案,而且中国的行动确实看起来有点呆板。不管怎样,这为Ubuntu Keylin打开了一扇巨大的机会之窗,它是一个基于Ubuntu由中国开发者和Canonical共同开发的发行版。它已经稳定一段时间了,而且已经发布了几个连续版本。 @@ -12,13 +12,13 @@ Ubuntu也许能在中国给Windows以致命打击 有趣的是,在这个关于中国意图的新闻冒出来的同一天里,发布了一篇对国防科技大学(NUDT)副教授Dr. Jonas Zhang的采访,关于[最新的14.10分支开发计划][2]。 -“在这次的14.10版本中,有许多很好的功能。比如,新手也可以轻松地通过Ubuntu Kylin软件中心找到Windows软件的替代;用户可以使用Ubuntu Kylin的SSO(Ubuntu Kylin的单一登录系统,我们叫它UKID)来登陆到Ubuntu Kylin的软件和社区;Sogou输入法(一款世界知名的中文输入法,上个月已经在苹果的应用市场上线了)减少了40%的CPU和内存占用。” +“在这次的14.10版本中,有许多很好的功能。比如,新手也可以轻松地通过Ubuntu Kylin软件中心找到Windows软件的替代;用户可以使用Ubuntu Kylin的SSO(Ubuntu Kylin的单一登录系统,我们叫它UKID)来登录到Ubuntu Kylin的软件和社区;Sogou输入法(一款世界知名的中文输入法,上个月已经在苹果的应用市场上线了)减少了40%的CPU和内存占用。” -“来自CSIP(中国政府的一个部门),Canonical和NUDT(国防科技大学)的超过50个项目经理,工程师和社区管理员在为Ubuntu Kylin工作。大部分全职工程师来自NUDT。许多来自Ubuntu,Debian和其他社区的开发者也参与到Ubuntu Kylin的开发中了。”Dr. Jonas Zhang[说][2]。 +“来自CSIP(中国政府的一个部门),超过50个 Canonical 和 NUDT(国防科技大学)的项目经理、工程师和社区管理员在为 Ubuntu Kylin 工作。大部分全职工程师来自NUDT。许多来自Ubuntu,Debian和其他社区的开发者也参与到Ubuntu Kylin的开发中了。”Dr. Jonas Zhang[说][2]。 中国政府也许自己也正想办法搭建另一个Linux发行版(不是第一次尝试了),但是目前看来已经有一个很好的用来替代Windows的候选者了。这对于Canonical也是很好的商机,至少从被承认这个角度看。 -如果Ubuntu,通过它和Kylin的联系,想在像中国这样一个大国里取代Windows,对这家公司是巨大的促进。让我们拭目以待,开发者们让Ubuntu Kylin变成一个有竞争力的操作系统的努力是不是白费力气。 +如果Ubuntu,通过它和Kylin的联系,想在像中国这样的大国里取代Windows,对这家公司将会是个巨大的促进。让我们拭目以待,看看开发者们让Ubuntu Kylin变成一个有竞争力的操作系统所花费的努力是不是白费力气。 -------------------------------------------------------------------------------- @@ -26,7 +26,7 @@ via: http://news.softpedia.com/news/Ubuntu-Could-Give-a-Fatal-Blow-to-Windows-in 作者:[Silviu Stahie][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 88408ef3e43b827164affecbe2099e91b6404b8a Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 25 Nov 2014 21:51:15 +0800 Subject: [PATCH 284/316] PUB:How-to-debug-a-C or C++ program with GDB command-line debugger @SPccman --- ... program with GDB command-line debugger.md | 49 ++++++++++--------- 1 file changed, 25 insertions(+), 24 deletions(-) rename {translated/tech => published}/How-to-debug-a-C or C++ program with GDB command-line debugger.md (64%) diff --git a/translated/tech/How-to-debug-a-C or C++ program with GDB command-line debugger.md b/published/How-to-debug-a-C or C++ program with GDB command-line debugger.md similarity index 64% rename from translated/tech/How-to-debug-a-C or C++ program with GDB command-line debugger.md rename to published/How-to-debug-a-C or C++ program with GDB command-line debugger.md index b96bcab09b..f65bcb96d8 100644 --- a/translated/tech/How-to-debug-a-C or C++ program with GDB command-line debugger.md +++ b/published/How-to-debug-a-C or C++ program with GDB command-line debugger.md @@ -1,6 +1,6 @@ 使用GDB命令行调试器调试C/C++程序 ============================================================ -没有调试器的情况下编写程序时最糟糕的状况是什么?编译时,跪着祈祷不要出错?用生命在运行可执行程序(blood offering不知道怎么翻译好...)?或者在每一行代码间添加printf("test")语句来定位错误点?如你所知,编写程序时不使用调试器的话是不利的。幸好,linux下调试还是很方便的。大多数人使用的IDE都集成了调试器,但linxu著名的调试器是命令行形式的C/C++调试器GDB。然而,与其他命令行工具一致,DGB需要一定的练习才能完全掌握。这里,我会告诉你GDB的基本情况及使用方法。 +没有调试器的情况下编写程序时最糟糕的状况是什么?编译时跪着祈祷不要出错?用血祭召唤恶魔帮你运行可执行程序?或者在每一行代码间添加printf("test")语句来定位错误点?如你所知,编写程序时不使用调试器的话是不方便的。幸好,linux下调试还是很方便的。大多数人使用的IDE都集成了调试器,但 linux 最著名的调试器是命令行形式的C/C++调试器GDB。然而,与其他命令行工具一致,DGB需要一定的练习才能完全掌握。这里,我会告诉你GDB的基本情况及使用方法。 ###安装GDB### @@ -18,11 +18,11 @@ Fedora,CentOS 或 RHEL: $sudo yum install gdb -如果在仓库中找不到的话,可以从官网中下载[official page][1] +如果在仓库中找不到的话,可以从[官网中下载][1]。 ###示例代码### -当学习GDB时,最好有一份代码,动手试验。下列代码是我编写的简单例子,它可以很好的体现GDB的特性。将它拷贝下来并且进行实验。这是最好的方法。 +当学习GDB时,最好有一份代码,动手试验。下列代码是我编写的简单例子,它可以很好的体现GDB的特性。将它拷贝下来并且进行实验——这是最好的方法。 #include #include @@ -48,21 +48,21 @@ Fedora,CentOS 或 RHEL: $ gdb -tui [executable's name] -使用”-tui“选项可以将代码显示在一个窗口内(被称为”文本接口”),在这个窗口内可以使用光标来操控,同时在下面输入GDB shell命令。 +使用”-tui“选项可以将代码显示在一个漂亮的交互式窗口内(所以被称为“文本用户界面 TUI”),在这个窗口内可以使用光标来操控,同时在下面的GDB shell中输入命令。 ![](https://farm3.staticflickr.com/2947/15397534362_ac0b5692c8_z.jpg) 现在我们可以在程序的任何地方设置断点。你可以通过下列命令来为当前源文件的某一行设置断点。 - break [line number] + break [行号] 或者为一个特定的函数设置断点: - break [function name] + break [函数名] 甚至可以设置条件断点 - break [line number] if [condition] + break [行号] if [条件] 例如,在我们的示例代码中,可以设置如下: @@ -74,23 +74,25 @@ Fedora,CentOS 或 RHEL: 最后但也是很重要的是,我们可以设置一个“观察断点”,当这个被观察的变量发生变化时,程序会被停止。 - watch [variable] + watch [变量] -可以设置如下: +这里我们可以设置如下: watch d 当d的值发生变化时程序会停止运行(例如,当i>97为真时)。 -当设置后断点后,使用"run"命令开始运行程序,或按如下所示: + +当设置断点后,使用"run"命令开始运行程序,或按如下所示: r [程序的输入参数(如果有的话)] -gdb中,大多数的单词都可以简写为一个字母。 +gdb中,大多数的命令单词都可以简写为一个字母。 + 不出意外,程序会停留在11行。这里,我们可以做些有趣的事情。下列命令: bt -回溯功能可以让我们知道程序如何到达这条语句的。 +回溯功能(backtrace)可以让我们知道程序如何到达这条语句的。 ![](https://farm3.staticflickr.com/2943/15211202760_1e77a3bb2e_z.jpg) @@ -98,16 +100,15 @@ gdb中,大多数的单词都可以简写为一个字母。 这条语句会显示所有的局部变量以及它们的值(你可以看到,我没有为d设置初始值,所以它现在的值是任意值)。 -当然 +当然: ![](https://farm4.staticflickr.com/3843/15374838916_8b65e4e3c7_z.jpg) - p [variable] + p [变量] -这可以显示特定变量的值,但是还有更好的: - - ptype [variable] +这个命令可以显示特定变量的值,而更进一步: + ptype [变量] 可以显示变量的类型。所以这里可以确定d是double型。 @@ -115,11 +116,11 @@ gdb中,大多数的单词都可以简写为一个字母。 既然已经到这一步了,我么不妨这么做: -    set var [variable] = [new value] + set var [变量] = [新的值] 这样会覆盖变量的值。不过需要注意,你不能创建一个新的变量或改变变量的类型。我们可以这样做: -    set var a = 0 + set var a = 0 ![](https://farm3.staticflickr.com/2949/15211357497_d28963a9eb_o.png) @@ -127,17 +128,17 @@ gdb中,大多数的单词都可以简写为一个字母。 step -使用如上命令,运行到下一条语句,也可以进入到一个函数里面。或者使用: +使用如上命令,运行到下一条语句,有可能进入到一个函数里面。或者使用: next -这可以直接下一条语句,并且不进入子函数内部。 +这可以直接运行下一条语句,而不进入子函数内部。 ![](https://farm4.staticflickr.com/3927/15397863215_fb2f5912ac_o.jpg) 结束测试后,删除断点: - delete [line number] + delete [行号] 从当前断点继续运行程序: @@ -147,7 +148,7 @@ gdb中,大多数的单词都可以简写为一个字母。 quit -总结,有了GDB,编译时不用祈祷上帝了,运行时不用血祭(?)了,再也不用printf(“test“)了。当然,这里所讲的并不完整,而且GDB的功能远不止这些。所以我强烈建议你自己更加深入的学习它。我现在感兴趣的是将GDB整合到Vim中。同时,这里有一个[备忘录][2]记录了GDB所有的命令行,以供查阅。 +总之,有了GDB,编译时不用祈祷上帝了,运行时不用血祭了,再也不用printf(“test“)了。当然,这里所讲的并不完整,而且GDB的功能远远不止于此。所以我强烈建议你自己更加深入的学习它。我现在感兴趣的是将GDB整合到Vim中。同时,这里有一个[备忘录][2]记录了GDB所有的命令行,以供查阅。 你对GDB有什么看法?你会将它与图形调试器对比吗,它有什么优势呢?对于将GDB集成到Vim有什么看法呢?将你的想法写到评论里。 @@ -157,7 +158,7 @@ via: http://xmodulo.com/gdb-command-line-debugger.html 作者:[Adrien Brochard][a] 译者:[SPccman](https://github.com/SPccman) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2edcc8b31f4139f3cdacdfe958ea3b0f3548b28c Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 25 Nov 2014 22:21:13 +0800 Subject: [PATCH 285/316] PUB:20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @johnhoow 只发布了服务器小节。 --- ...rade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) rename {translated/tech => published/The history of Android}/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md (92%) diff --git a/translated/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md b/published/The history of Android/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md similarity index 92% rename from translated/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md rename to published/The history of Android/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md index 489342c4f9..8a5102ef8f 100644 --- a/translated/tech/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md +++ b/published/The history of Android/20141024 How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic.md @@ -1,8 +1,7 @@ -如何将Ubuntu14.04安全的升级到14.10 +如何将 Ubuntu14.04 安全的升级到14.10 ================================================================================ -本文将讨论如何将Ubuntu14.04升级到14.10的beta版。Ubuntu14.10的最终beta版已经发布了 -如果想从Ubuntu14.04/13.10/13.04/12.10/12.04或者更老的版本升级到14.10,只要遵循下面给出的步骤。注意,你不能直接从13.10升级到14.10。你应该想将13.10升级到14.04在从14.04升级到14.10。下面是详细步骤。 +如果想从Ubuntu14.04/13.10/13.04/12.10/12.04或者更老的版本升级到14.10,只要遵循下面给出的步骤。注意,你不能直接从13.10升级到14.10。你应该先将13.10升级到14.04在从14.04升级到14.10。下面是详细步骤。 下面的步骤不仅能用于14.10,也兼容于一些像Lubuntu14.10,Kubuntu14.10和Xubuntu14.10等的Ubuntu衍生版本 @@ -90,15 +89,15 @@ sudo do-release-upgrade -d -直到屏幕提示你已完成 +直到屏幕提示你已完成。 -------------------------------------------------------------------------------- via: http://www.unixmen.com/upgrade-ubuntu-14-04-trusty-ubuntu-14-10-utopic/ 作者:SK -译者:[译者ID](https://github.com/johnhoow) -校对:[校对者ID](https://github.com/校对者ID) +译者:[johnhoow](https://github.com/johnhoow) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From cd350b09ee20c1c2a7ef465125ec1a8c27c5352d Mon Sep 17 00:00:00 2001 From: alim0x Date: Tue, 25 Nov 2014 23:01:29 +0800 Subject: [PATCH 286/316] 09-the history of Android complete --- .../09 - The history of Android.md | 78 ------------------- .../09 - The history of Android.md | 75 ++++++++++++++++++ 2 files changed, 75 insertions(+), 78 deletions(-) delete mode 100644 sources/talk/The history of Android/09 - The history of Android.md create mode 100644 translated/talk/The history of Android/09 - The history of Android.md diff --git a/sources/talk/The history of Android/09 - The history of Android.md b/sources/talk/The history of Android/09 - The history of Android.md deleted file mode 100644 index 8a30a320b9..0000000000 --- a/sources/talk/The history of Android/09 - The history of Android.md +++ /dev/null @@ -1,78 +0,0 @@ -alim0x translating - -The history of Android -================================================================================ -![The new Android Market—less black, more white and green.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/marketab2.png) -The new Android Market—less black, more white and green. -Photo by Ron Amadeo - -### Android 1.6, Donut—CDMA support brings Android to any carrier ### - -The fourth version of Android—1.6, Donut—launched in September 2009, five months after Cupcake hit the market. Despite the myriad of updates, Google was still adding basic functionality to Android. Donut brought support for different screen sizes, CDMA support, and a text-to-speech engine. - -Android 1.6 is a great example of an update that, today, would have little reason to exist as a separate point update. The major improvements basically boiled down to new versions of the Android Market, camera, and YouTube. In the years since, apps like this have been broken out of the OS and can be updated by Google at any time. Before all this modularization work, though, even seemingly minor app updates like this required a full OS update. - -The other big improvement—CDMA support—demonstrated that, despite the version number, Google was still busy getting basic functionality into Android. - -The Android Market was christened as version "1.6" and got a complete overhaul. The original all-black design was tossed in favor of a white app with green highlights—the Android designers were clearly using the Android mascot for inspiration. - -The new market was definitely a new style of app design for Google. The top fifth of the screen was dedicated to a banner logo announcing that this app is indeed the “Android Market." Below the banner were buttons for Apps, Games, and Downloads, and a search button was placed to the right of the banner. Below the navigation was a thumbnail display of featured apps, which could be swiped through. Below that were even more featured apps in a vertically scrolling list. - -![The new Market design, showing an app page with screenshots, the apps categories page, an app top list, and the downloads section.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/marketpages.png) -The new Market design, showing an app page with screenshots, the apps categories page, an app top list, and the downloads section. -Photo by Ron Amadeo - -The biggest addition to the market was the inclusion of app screenshots. Android users could finally see what an app looked like before installing it—previously they only had a brief description and user reviews to go on. Your personal star review and comment was given top billing, followed by the description, and then finally the screenshots. Viewing the screenshots would often require a bit of scrolling—if you were looking for a well-designed app, it was a lot of work. - -Tapping on App or Games would bring up a category list, which you can see in the second picture, above. After picking a category, more navigation was shown at the top of the screen, where users could see "Top paid," "Top free," or "Just in" apps within a category. While these sorta looked like buttons that would load a new screen, they were really just a clunky tabbed interface. To denote which "tab" was currently active, there were little green lights next to each button. The nicest part of this interface was that the list of apps would scroll infinitely—once you hit the bottom, more apps would load in. This made it easy to look through the list of apps, but opening any app and coming back would lose your spot in the list—you’d be kicked to the top. The downloads section would do something the new Google Play Store still can't do: simply display a list of your purchased apps. - -While the new Market definitely looked better than the old market, cohesion across apps was getting worse and worse. It seemed like each app was made by a different group with no communication about how all Android apps should look. - -![The Camera viewfinder, photo review screen, and menu.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/device-2013-12-27-145949.png) -The Camera viewfinder, photo review screen, and menu. -Photo by Ron Amadeo - -For instance, the camera app was changed from a full-screen, minimal design to a boxed viewfinder with controls on the side. With the new camera app, Google tried its hand at skeuomorphism, wrapping the whole app in a leather texture roughly replicating the exterior of a classic camera. Switching between the camera and camcorder was done with a literal switch, and below that was the on-screen shutter button. - -Tapping on the previous picture thumbnail no longer launched the gallery, but a custom image viewer that was built in to the camera app. When viewing a picture the leather control area changed the camera controls to picture controls, where you could delete, share a picture, or set the picture as a wallpaper or contact image. There was still no swiping between pictures—that was still done with arrows on either side of the image. - -This second picture shows one of the first examples of designers reducing dependence on the menu button, which the Android team slowly started to realize functioned terribly for discoverability. Many app designers (including those within Google) used the menu as a dumping ground for all sorts of controls and navigational elements. Most users didn't think to hit the menu button, though, and never saw the commands. - -A common theme for future versions of Android would be moving things out of the menu and on to the main screen, making the whole OS more user-friendly. The menu button was completely killed in Android 4.0, and it's only supported in Android for legacy apps. - -![The battery and TTS settings.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/settings1.png) -The battery and TTS settings. -Photo by Ron Amadeo - -Donut was the first Android version to keep track of battery usage. Buried in the "About phone" menu was an option called "Battery use," which would display battery usage by app and hardware function as a percentage. Tapping on an item would bring up a separate page with relevant stats. Hardware items had buttons to jump directly to their settings, so for instance, you could change the display timeout if you felt the display battery usage was too high. - -Android 1.6 was also the first version to support text-to-speech (TTS) engines, meaning the OS and apps would be able to talk back to you in a robot voice. The “Speech synthesizer controls" would allow you to set the language, choose the speech rate, and (critically) install the voice data from the Android market. Today, Google has its own TTS engine that ships with Android, but it seems Donut was hard coded to accept one specific TTS engine made by SVOX. But SVOX’s engine didn’t ship with Donut, so tapping on “install voice data" linked to an app in the Android Market. (In the years since Donut’s heyday, the app has been taken down. It seems Android 1.6 will never speak again.) - -![From left to right: new widgets, the search bar UI, the new notification clear button, and the new gallery controls.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/grabbag16.png) -From left to right: new widgets, the search bar UI, the new notification clear button, and the new gallery controls. -Photo by Ron Amadeo - -There was more work on the widget front. Donut brought an entirely new widget called "Power control." This comprised on/off switches for common power-hungry features: Wi-FI, Bluetooth, GPS, Sync (to Google's servers), and brightness. - -The search widget was redesigned to be much slimmer looking, and it had an embedded microphone button for voice search. It now had some actual UI to it and did find-as-you-type live searching, which searched not only the Internet, but your applications and history too. - -The "Clear notifications" button has shrunk down considerably and lost the "notifications" text. In later Android versions it would be reduced to just a square button. The Gallery continues the trend of taking functionality out of the menu and putting it in front of the user—the individual picture view gained buttons for "Set as," "Share," and "Delete." - ----------- - -![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/9/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo diff --git a/translated/talk/The history of Android/09 - The history of Android.md b/translated/talk/The history of Android/09 - The history of Android.md new file mode 100644 index 0000000000..5ffee45dbe --- /dev/null +++ b/translated/talk/The history of Android/09 - The history of Android.md @@ -0,0 +1,75 @@ +安卓编年史 +================================================================================ +![新版安卓市场——黑色比重减少,白色和绿色增多。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/marketab2.png) +新版安卓市场——黑色比重减少,白色和绿色增多。 +Ron Amadeo供图 + +###安卓1.6,Donut——CDMA支持将安卓带给了各个运营商### + +安卓的第四个版本——1.6,甜甜圈——在2009年9月发布,这时是在纸杯蛋糕面世的5个月后。尽管有无数更新,谷歌仍然在给安卓添加基本的功能。甜甜圈带来了对不同屏幕尺寸和CDMA的支持,还有一个文本语音转换引擎。 + +安卓1.6是个很好的更新例子,要在今天的话,它将没什么理由作为一个独立更新存在。主要的改进基本上可以总结为新版安卓市场,相机以及YouTube。从这一年起,像这样的应用已经从系统分离开来,并且谷歌任何时候都能升级它们。然而在完成所有的这些模块化功能工作之前,看起来甚至是一个微小的应用更新似乎都需要完整的系统更新。 + +另一个重大改进——CDMA支持——也表明了除了版本号之外,谷歌仍然在忙于将基本功能带到安卓上来。 + +安卓市场被标注为版本“1.6”,并且得到了一个彻底的改进。原本的全黑设计被抛弃,转向带有绿色高亮的白色应用设计——安卓的设计师很明显使用了安卓吉祥物来获得灵感。 + +新的市场对谷歌来说一定是个新的应用设计风格。屏幕顶部的五分之一用于显示横幅logo,表明了这个应用确实是“安卓市场”。在横幅之下是应用,游戏以及下载按钮,一个搜索按钮被安置在横幅的右侧。在导航键下面显示这特色应用的快照,可以在它们之间滑动。再下面是个垂直滚动列表,显示了更多的特色应用。 + +![新的市场设计,展示了:带有截图的应用页面,应用分类页面,应用榜,下载。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/marketpages.png) +新的市场设计,展示了:带有截图的应用页面,应用分类页面,应用榜,下载。 +Ron Amadeo供图 + +市场最大的新增内容是包含应用截图。安卓用户终于可以在安装之前看到应用长什么样子——之前他们只能看到简短的描述和用户评论。你的个人星级评价和评论被放在显著位置,随后是描述,最后是截图。查看截图常常需要一点点滚动来查看——如果你想要找个设计尚佳的应用,那可要费一番功夫了。 + +点击应用或游戏按钮会打开一个分类列表,就像你在上面第二张图看到的那样。选择一个类别之后,更多的导航显示在了屏幕顶部,用户可以看到“热门付费”,“热门免费”,或“热门新品”分类里看到各自的应用。尽管这些看起来像是会加载出新页面的按钮,实际上它们仅仅是个笨拙的标签页。每个按钮边有个绿色小灯指示现在哪个标签处于活跃状态。这个界面最赞的地方是应用列表是无穷滚动的(滚动加载)——一旦你到达列表底部的时候,它将加载更多应用。这个特性使得查看应用列表变得轻松,但是你点开任意一个应用再返回的话将会丢失你在列表里的位置——你得从头开始查看。下载部分可以做一些连新的Google Play商店都做不到的事:不过是显示一个已购买应用列表而已。 + +尽管新的市场看起来无疑比旧的好多了,但应用间的一致性更糟糕了。看起来就像是每个应用都是由不同团队制作的,但他们之间从没沟通过所有的安卓应用应该有的样子。 + +![相机取景窗,照片回看界面,菜单。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/device-2013-12-27-145949.png) +相机取景窗,照片回看界面,菜单。 +Ron Amadeo供图 + +举个例子,相机应用从全屏,最小化设计变成一个盒状的边缘带控制的取景窗。在相机应用中,谷歌着手引入拟物化,将应用包装成一个大致复刻皮革纹经典相机的样子。在相机和摄像机之间切换通过一个缺乏想象力的开关完成,下面是个触摸快门按钮。 + +点击最近照片快照不再会打开相册,但一个定制的照片查看器内建在了相机应用内。当你查看照片的时候,皮革质感的控制区从相机操作键变成图片操作键,你可以在这里删除,共享照片,或者把照片设置成壁纸或联系人图像。这里图片之间依然没有滑动操作——切换照片还是要通过照片两侧的箭头按钮完成。 + +第二张截图展示的是设计师减少对菜单按钮依赖的例子之一,因为安卓团队慢慢开始意识到其在可发现性上的糟糕表现。许多的应用设计者(包括那些在谷歌的)使用菜单作为所有种类的控制和导航元素的集中处。但大多数用户没想过点击菜单按钮,也从没看到这些指令。 + +未来版本的安卓的共有主题会将选项从菜单移到主要屏幕上,使得整个系统对用户更加友好。菜单按钮在安卓4.0中被完全移除,并且它只在传统应用中被支持。 + +![电池以及文本语音转换引擎设置。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/settings1.png) +电池以及文本语音转换引擎设置。 +Ron Amadeo供图 + +甜甜圈是第一个持续追踪电池使用量的安卓版本。在“关于手机”菜单里有个选项“电池使用”,它会以百分比的方式显示应用以及硬件功能的电池用量。点击一项会打开一个单独的相关状态页面。硬件项目有个按钮可以直接跳转到它们的设置界面,所以,举个例子,如果你觉得显示的电池用量太高你可以更改显示的屏幕超时。 + +安卓1.6同样是第一个支持文本语音转换引擎(TTS)的版本,这意味着系统以及应用能够用机器合成声音来回应你。“语音合成器”选项允许你设置语言,选择语速,以及从安卓市场安装语音数据(慎重)。今天,谷歌在安卓上部署它自己的TTS引擎,但是似乎甜甜圈是通过硬编码的方式使用了来自SVOX的TTS引擎。但SVOX的引擎并未部署在甜甜圈上,所以点击“安装语音数据”会链接到安卓市场的一个应用。(甜甜圈的全盛期几年后,这个应用已被撤下。看起来似乎安卓1.6再也不能说话了。) + +![从左到右:新的小部件,搜索栏界面,新清除通知按钮,新相册控件。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/grabbag16.png) +从左到右:新的小部件,搜索栏界面,新清除通知按钮,新相册控件。 +Ron Amadeo供图 + +前端小部件部分花了更多的功夫。甜甜圈带来了全新的叫做“电量控制”小部件。它包含了常见耗电功能的开关:Wi-Fi,蓝牙,GPS,同步(同谷歌服务器之间),以及亮度。 + +搜索小部件同样经过了重新设计,变得更加纤细,并且内置了一个麦克风按钮用于语音搜索。它现在有了些实质界面并且够实时搜索,不仅仅是搜索互联网,还能搜索你的应用和历史。 + +“清除通知”按钮大幅缩水并且去掉了“通知”字样。在稍晚些的安卓后续版本总它还会缩减成仅仅是个方形按钮。相册继续遵循了把功能从菜单里拿出来的趋势,并且将它们放在用户面前——单张图片查看界面得到了“设置为”,“分享”,以及“删除”按钮。 + +---------- + +![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/9/ + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo From 834ba47dae70f87ce1fbebe7982aac0cde738965 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 25 Nov 2014 23:38:36 +0800 Subject: [PATCH 287/316] PUB:20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary @geekpi --- ...to fix hda-duplex not supported in this QEMU binary.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md (70%) diff --git a/translated/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md b/published/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md similarity index 70% rename from translated/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md rename to published/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md index e3a6f3b4af..916a48061a 100644 --- a/translated/tech/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md +++ b/published/20141029 Linux FAQs with Answers--How to fix hda-duplex not supported in this QEMU binary.md @@ -1,6 +1,6 @@ -Linux 有问必答 -- 如何修复“hda-duplex not supported in this QEMU binary”(hda-duplex在此QEMU文件中不支持) +Linux 有问必答:如何修复“hda-duplex not supported in this QEMU binary” ================================================================================ -> **提问**: 当我尝试在虚拟机中安装一个新的Linux时,虚拟机不能启动且报了下面这个错误:“不支持的配置:hda-duplex在此QEMU文件中不支持。” 我该如何修复? +> **提问**: 当我尝试在虚拟机中安装一个新的Linux时,虚拟机不能启动且报了下面这个错误:"unsupported configuration: hda-duplex not supported in this QEMU binary."(“不支持的配置:hda-duplex在此QEMU文件中不支持。”) 我该如何修复? 这个错误可能来自一个当默认声卡型号不能被识别时的一个qemu bug。 @@ -20,7 +20,7 @@ Linux 有问必答 -- 如何修复“hda-duplex not supported in this QEMU binar ### 方案二: Virsh ### -如果你使用的是**virt-manager** 而不是**virt-manager**, 你可以编辑VM相应的配置文件。在节点中查找**sound**节点,并按照下面的默认声卡型号改成**ac97**。 +如果你使用的是**virsh** 而不是**virt-manager**, 你可以编辑VM相应的配置文件。在节点中查找**sound**节点,并按照下面的默认声卡型号改成**ac97**。 . . . @@ -35,6 +35,6 @@ Linux 有问必答 -- 如何修复“hda-duplex not supported in this QEMU binar via: http://ask.xmodulo.com/hda-duplex-not-supported-in-this-qemu-binary.html 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file From 64d08b7b04c01ad104ed718dfc1f82c77e8922dd Mon Sep 17 00:00:00 2001 From: Stevearzh Date: Wed, 26 Nov 2014 00:12:01 +0800 Subject: [PATCH 288/316] Translating by Stevearzh --- sources/talk/20141108 When hackers grow old.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20141108 When hackers grow old.md b/sources/talk/20141108 When hackers grow old.md index cf31c168ae..e83ee80cc0 100644 --- a/sources/talk/20141108 When hackers grow old.md +++ b/sources/talk/20141108 When hackers grow old.md @@ -1,3 +1,4 @@ +[Translating by Stevearzh] When hackers grow old ================================================================================ Lately I’ve been wrestling with various members of an ancient and venerable open-source development group which I am not going to name, though people who regularly follow my adventures will probably guess which one it is by the time I’m done venting. From 10165c83041e87a7f1bd00d02a48c5beb2835151 Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 26 Nov 2014 08:52:46 +0800 Subject: [PATCH 289/316] Update 20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md --- ...swers--How to fix ImportError--No module named scapy.all.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md b/sources/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md index d74df0129f..7525d148ad 100644 --- a/sources/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md +++ b/sources/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Linux FAQs with Answers--How to fix “ImportError: No module named scapy.all” ================================================================================ > **Question**: When I run a Python application, I am getting "ImportError: No module named scapy.all" message. How can I fix this import error? @@ -37,4 +38,4 @@ via: http://ask.xmodulo.com/importerror-no-module-named-scapy-all.html [1]:http://www.secdev.org/projects/scapy/ [2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[3]:http://scapy.net/ \ No newline at end of file +[3]:http://scapy.net/ From e928d55e38e7724008754548f922031266890836 Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 26 Nov 2014 08:53:57 +0800 Subject: [PATCH 290/316] Update 20141125 Linux FAQs with Answers--How to check glibc version on Linux.md --- ...x FAQs with Answers--How to check glibc version on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md b/sources/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md index dcfa0161b7..9cabf729e5 100644 --- a/sources/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md +++ b/sources/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Linux FAQs with Answers--How to check glibc version on Linux ================================================================================ > **Question**: I need to find out the version of the GNU C library (glibc) that I have on my Linux system. How can I check glibc version on Linux? @@ -51,4 +52,4 @@ via: http://ask.xmodulo.com/check-glibc-version-linux.html 译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 78d7bd287e5a3c56d26b0e2023b74234c2283799 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Wed, 26 Nov 2014 09:26:27 +0800 Subject: [PATCH 291/316] [Translated] Two Questions with Answers --- ...rs--How to check glibc version on Linux.md | 55 ------------------- ... ImportError--No module named scapy.all.md | 41 -------------- ...rs--How to check glibc version on Linux.md | 54 ++++++++++++++++++ ... ImportError--No module named scapy.all.md | 39 +++++++++++++ 4 files changed, 93 insertions(+), 96 deletions(-) delete mode 100644 sources/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md delete mode 100644 sources/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md create mode 100644 translated/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md create mode 100644 translated/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md diff --git a/sources/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md b/sources/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md deleted file mode 100644 index 9cabf729e5..0000000000 --- a/sources/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md +++ /dev/null @@ -1,55 +0,0 @@ -Translating by GOLinux! -Linux FAQs with Answers--How to check glibc version on Linux -================================================================================ -> **Question**: I need to find out the version of the GNU C library (glibc) that I have on my Linux system. How can I check glibc version on Linux? - -The GNU C library (glibc) is the GNU implementation of the standard C library. glibc is a critical component of the GNU toolchain, which is used along with binutils and compiler to generate userspace application binaries for a target architecture. - -When built from source, some Linux programs may be required to link against a particular version of glibc. In that case, you may want to check out the information about installed glibc to see if dependencies are met. - -Here are simple ways to check glibc version on Linux. - -### Method One ### - -A simple command-line to check the version of the GNU C library is as follows. - - $ ldd --version - -![](https://farm6.staticflickr.com/5613/15631104658_940163834a_z.jpg) - -In this example, the version of **glibc is 2.19**. - -### Method Two ### - -Another method is to "type" the **glibc library** (i.e., libc.so.6) from the command line as if it were a command. - -The output will show more detailed information about **glibc library**, including the version of glibc and the GNU compiler used, as well as available glibc extensions. The location of glibc varies depending on distros and processor architectures. - -On 64-bit Debian based system: - - $ /lib/x86_64-linux-gnu/libc.so.6 - -on 32-bit Debian based system: - - $ /lib/i386-linux-gnu/libc.so.6 - -On 64-bit Red Hat based system: - - $ /lib64/libc.so.6 - -On 32-bit Red Hat based systems: - - $ /lib/libc.so.6 - -Here is the sample output of typing glibc library. - -![](https://farm8.staticflickr.com/7516/15631334667_ef50b247a4_z.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/check-glibc-version-linux.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/sources/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md b/sources/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md deleted file mode 100644 index 7525d148ad..0000000000 --- a/sources/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md +++ /dev/null @@ -1,41 +0,0 @@ -Translating by GOLinux! -Linux FAQs with Answers--How to fix “ImportError: No module named scapy.all” -================================================================================ -> **Question**: When I run a Python application, I am getting "ImportError: No module named scapy.all" message. How can I fix this import error? - -[Scapy][1] is a flexible packet generation and sniffer program written in Python. Using Scapy, you can create arbitrary packets, send them to the wire, reading packets from the wire or a dump file, transform packets, etc. Using Scapy's generic packet manipulation capabilities, you can easily do things like SYN scan, TCP traceroute, and OS fingerprinting. You can also integrate Scapy into another tool by importing it. - -The import error indicates that you do not have Scapy installed on your Linux system. Here is how to install Scapy on Linux. - -### Install Scapy on Debian, Ubuntu or Linux Mint ### - - $ sudo apt-get install python-scapy - -### Install Scapy on Fedora or CentOS/RHEL ### - -On CentOS/RHEL, you need to [enable EPEL repository][2] first. - - $ sudo yum install scapy - -### Install Scapy from the Source ### - -If your Linux distribution does not offer Scapy package or you want to try the latest Scapy, you can install Scapy manually from the source. - -Download the [latest version of Scapy][3], and install it as follows. - - $ unzip scapy-latest.zip - $ cd scapy-2.* - $ sudo python setup.py install - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/importerror-no-module-named-scapy-all.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.secdev.org/projects/scapy/ -[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[3]:http://scapy.net/ diff --git a/translated/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md b/translated/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md new file mode 100644 index 0000000000..46fffcbbd8 --- /dev/null +++ b/translated/tech/20141125 Linux FAQs with Answers--How to check glibc version on Linux.md @@ -0,0 +1,54 @@ +Linux有问必答——如何检查Linux上的glibc版本 +================================================================================ +> **问题**:我需要找出我的Linux系统上的GNU C库(glibc)的版本,我怎样才能检查Linux上的glibc版本呢? + +GNU C库(glibc)是标准C库的GNU实现。glibc是GNU工具链的关键组件,用于和二进制工具和编译器一起使用,为目标架构生成用户空间应用程序。 + +当从源码进行构建时,一些Linux程序可能需要链接到某个特定版本的glibc。在这种情况下,你可能想要检查已安装的glibc信息以查看是否满足依赖关系。 + +这里介绍几种简单的方法,方便你检查Linux上的glibc版本。 + +### 方法一 ### + +下面给出了命令行下检查GNU C库的简单命令。 + + $ ldd --version + +![](https://farm6.staticflickr.com/5613/15631104658_940163834a_z.jpg) + +在本例中,**glibc**版本是**2.19**。 + +### 方法二 ### + +另一个方法是在命令行“输入”**glibc library**(如,libc.so.6),就像命令一样。 + +输出结果会显示更多关于**glibc库**的详细信息,包括glibc的版本以及使用的GNU编译器,也提供了glibc扩展的信息。glibc变量的位置取决于Linux版本和处理器架构。 + +在基于Debian的64位系统上: + + $ /lib/x86_64-linux-gnu/libc.so.6 + +在基于Debian的32位系统上: + + $ /lib/i386-linux-gnu/libc.so.6 + +在基于Red Hat的64位系统上: + + $ /lib64/libc.so.6 + +在基于Red Hat的32位系统上: + + $ /lib/libc.so.6 + +下图中是输入glibc库后的输出结果样例。 + +![](https://farm8.staticflickr.com/7516/15631334667_ef50b247a4_z.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/check-glibc-version-linux.html + +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md b/translated/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md new file mode 100644 index 0000000000..121a9deada --- /dev/null +++ b/translated/tech/20141125 Linux FAQs with Answers--How to fix ImportError--No module named scapy.all.md @@ -0,0 +1,39 @@ +Linux有问必答——如何修复“ImportError: No module named scapy.all” +================================================================================ +> **问题**:当我运行一个Python应用程序时,出现了这个提示消息“ImportError: No module named scapy.all”。我怎样才能修复这个导入错误呢? + +[Scapy][1]是一个用Python写的灵活包生成和嗅探程序。使用Scapy,你可以完成创建专有包,发送上线,从线上或转储文件中读取包,转换包等工作。使用Scapy的通用包处理能力,你可以很容易地完成像SYN扫描、TCP路由跟踪以及OS指纹打印之类的工作。你也可以通过导入,将Scapy整合到其它工具中。 + +该导入错误表明:你还没有在你的Linux系统上安装Scapy。下面介绍安装方法。 +### 安装Scapy到Debian, Ubuntu或Linux Mint ### + + $ sudo apt-get install python-scapy + +### 安装Scapy到Fedora或CentOS/RHEL ### + +在CentOS/RHEL上,你首先需要[启用EPEL仓库][2]。 + + $ sudo yum install scapy + +### 源码安装Scapy ### + +如果你的Linux版本没有提供Scapy包,或者你想要试试最新的Scapy,你可以手工使用源码包安装。 + +下载[最新版的Scapy][3],然后按照以下步骤安装。 + + $ unzip scapy-latest.zip + $ cd scapy-2.* + $ sudo python setup.py install + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/importerror-no-module-named-scapy-all.html + +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.secdev.org/projects/scapy/ +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[3]:http://scapy.net/ From 7c1375cccd21403169ef71c3a9df97243b4676b5 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 26 Nov 2014 21:17:47 +0800 Subject: [PATCH 292/316] Translating: Linux blkid Command to Find Block Devices Details --- ...41124 Linux blkid Command to Find Block Devices Details.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141124 Linux blkid Command to Find Block Devices Details.md b/sources/tech/20141124 Linux blkid Command to Find Block Devices Details.md index 3441dd4b5c..bdec078a7f 100644 --- a/sources/tech/20141124 Linux blkid Command to Find Block Devices Details.md +++ b/sources/tech/20141124 Linux blkid Command to Find Block Devices Details.md @@ -1,3 +1,5 @@ +[felixonmars translating...] + Linux blkid Command to Find Block Devices Details ================================================================================ Today we will show you how to use **lsblk** and **blkid** utilities to find out information about block devices and we are using a CentOS 7.0 installed machine. @@ -107,4 +109,4 @@ via: http://linoxide.com/linux-command/linux-command-lsblk-blkid/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/adriand/ -[1]:https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt \ No newline at end of file +[1]:https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt From 0ba87ce9233df4b8f3499e52f9bac12c793e45d1 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 26 Nov 2014 22:47:43 +0800 Subject: [PATCH 293/316] PUB:20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget @geekpi --- ...FAQs with Answers--How to disable HTTP redirect in wget.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md (94%) diff --git a/translated/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md b/published/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md similarity index 94% rename from translated/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md rename to published/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md index c6beb3b802..fd7d239d6b 100644 --- a/translated/tech/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md +++ b/published/20141105 Linux FAQs with Answers--How to disable HTTP redirect in wget.md @@ -1,4 +1,4 @@ -Linux 有问必答 -- 如何在wget中禁用HTTP转发 +Linux 有问必答:如何在wget中禁用HTTP转发 ================================================================================ > **提问**: 当我用wget获取一个重定向到URL Y的URL X的时候,wget默认会自动获取URL Y。然而我想要强制获取不带重定向的URL X。我该如何禁用wget重定向URL的功能。 @@ -28,6 +28,6 @@ Linux 有问必答 -- 如何在wget中禁用HTTP转发 via: http://ask.xmodulo.com/disable-http-redirect-wget.html 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file From c9b07707f9d9787dc3b0d505dad88d533f082be2 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 26 Nov 2014 23:01:56 +0800 Subject: [PATCH 294/316] PUB:20141029 How to create and manage LXC containers on Ubuntu @bazz2 --- ...ow to create and manage LXC containers on Ubuntu.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20141029 How to create and manage LXC containers on Ubuntu.md (95%) diff --git a/translated/tech/20141029 How to create and manage LXC containers on Ubuntu.md b/published/20141029 How to create and manage LXC containers on Ubuntu.md similarity index 95% rename from translated/tech/20141029 How to create and manage LXC containers on Ubuntu.md rename to published/20141029 How to create and manage LXC containers on Ubuntu.md index a0b8a76e25..62407e8021 100644 --- a/translated/tech/20141029 How to create and manage LXC containers on Ubuntu.md +++ b/published/20141029 How to create and manage LXC containers on Ubuntu.md @@ -1,6 +1,6 @@ 教你在 Ubuntu 上使用 LXC 容器 ================================================================================ -使用“容器”来保证主机环境的安全性,这个概念早在十年前就已经存在(例如 FreeBSD 的 jail 虚拟化技术),但是直到最近,随着部署云架构需求越来越多,像 LXC 和 [Docker][1] 这种 Linux 下的容器才成为被关注的焦点。当然,由于主流厂商(云供应商如亚马逊主推 AWS,微软主推 Azure;发行版如红帽、Ubuntu等)组成的强大靠山,[Docker][2] 已经被放在媒体的聚光灯下面,其实,Docker 里面所谓的“容器”技术是由 LXC 提供的。 +使用“容器”来保证主机环境的安全性,这个概念早在十年前就已经存在(例如 FreeBSD 的 jail 虚拟化技术),但是直到最近,随着部署云架构需求越来越多,像 LXC 和 [Docker][1] 这种 Linux 下的容器才成为被关注的焦点。当然,由于主流厂商(云服务商如亚马逊主推 AWS,微软主推 Azure;发行版如红帽、Ubuntu等)组成的强大靠山,[Docker][2] 已经被放在媒体的聚光灯下面,其实,Docker 里面所谓的“容器”技术是由 LXC 提供的。 你只是一个普通的 Linux 用户,那 Docker/LXC 能为你带来什么好处呢?容器可以将你的应用在不同的 Linux 发行版之间迁移。想像一下这个场景:你正在用的发行版是 Debian,你喜欢它的稳定性,同时你又想玩一款最新的 Ubuntu 游戏,你不需要在电脑上装双系统然后重启进入 Ubuntu,也不需要在 Debian 上跑一个耗资源的 Ubuntu 虚拟机,你只需要简单地生成一个 Ubuntu 容器就够了。 @@ -20,7 +20,7 @@ ![](https://farm4.staticflickr.com/3955/15655792445_d462957ee9_z.jpg) -安装完 LXC 工具后,就能看到 LXC 自动创建了一块桥接网卡(lxcbr0,在 /etc/lxc/default.conf 中设置)。 +安装完 LXC 工具后,就能看到 LXC 自动创建了一块桥接网卡(lxcbr0,可以在 /etc/lxc/default.conf 中设置)。 ![](https://farm6.staticflickr.com/5598/15035046834_a53c092230_z.jpg) @@ -66,11 +66,11 @@ ------------------------------------ test-lxc STOPPED - - NO -使用下面的命令启动容器。参数“-d”将容器作为后台进程打开。如果没有指定这个参数,你可以在控制台界面上直接把容器的运行程序关闭(LCTT:Ctrl+C组合键)。 +使用下面的命令启动容器。参数“-d”将容器作为后台进程打开。如果没有指定这个参数,你可以在控制台界面上直接把容器的运行程序关闭(LCTT译注:Ctrl+C组合键)。 $ sudo lxc-start -n -d -开容器后,看看状态: +打开容器后,看看状态: $ sudo lxc-ls --fancy @@ -132,7 +132,7 @@ via: http://xmodulo.com/lxc-containers-ubuntu.html 作者:[Dan Nanni][a] 译者:[bazz2](https://github.com/bazz2) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d679d351abd57688a6746a47bfda1a0f3d3e3a3b Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 26 Nov 2014 23:09:04 +0800 Subject: [PATCH 295/316] [Translated] Linux blkid Command to Find Block Devices Details --- ...d Command to Find Block Devices Details.md | 112 ------------------ ...d Command to Find Block Devices Details.md | 110 +++++++++++++++++ 2 files changed, 110 insertions(+), 112 deletions(-) delete mode 100644 sources/tech/20141124 Linux blkid Command to Find Block Devices Details.md create mode 100644 translated/tech/20141124 Linux blkid Command to Find Block Devices Details.md diff --git a/sources/tech/20141124 Linux blkid Command to Find Block Devices Details.md b/sources/tech/20141124 Linux blkid Command to Find Block Devices Details.md deleted file mode 100644 index bdec078a7f..0000000000 --- a/sources/tech/20141124 Linux blkid Command to Find Block Devices Details.md +++ /dev/null @@ -1,112 +0,0 @@ -[felixonmars translating...] - -Linux blkid Command to Find Block Devices Details -================================================================================ -Today we will show you how to use **lsblk** and **blkid** utilities to find out information about block devices and we are using a CentOS 7.0 installed machine. - -**lsblk** is a Linux utility that will display information about all the available block devices on your system. It reads and gathers from them from [the sysfs filesystem][1]. The utility will display information about all block devices (with the exception of RAM disks) in a tree-like format by default. - -### Lsblk default output ### - -By default lsblk will display a tree-like format of the block devices: - -**NAME** - - – the device name - -**MAJ:MIN** - - - Every device on a Linux operating system is represented by a file, for block (disk) devices, they describe the device using major and minor device numbers. - -**RM** - - – removable device – shows 1 if this is a removable device and 0 if it’s not - -**TYPE** - - – the device type - -**MOUNTPOINT** - - - the location where the device is mounted - -**RO** - - – it will display 1 for read-only filesystems and 0 for those that are not read-only - -**SIZE** - - – the size of the device - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/lsblk.jpg) - -### Display the owner of the devices ### - -To display information about the owenership of the device, the user and group that own the file and the mode that the filesystem has been mounted with you can use the –m option like this: - - lsblk –m - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/lsblk-m.jpg) - -### List the device blocks ### - -If you wish to just list the devices and not show them as a tree you can use the –l option: - - lsblk –l - -### Use in scripts ### - -Advanced tip: if you wish to use this in a script and don’t want to have the heading displayed you can use the –n flag like so: - - lsblk –ln - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/lsblk-ln.jpg) - -The **blkid** program is a command-line utility that displays information about available block devices. It can determine the type of content (e.g. filesystem, swap) a block device holds and also attributes (tokens, NAME=value pairs) from the content metadata (e.g. LABEL or UUID fields). It has two main forms of operation: either searching for a device with a specific NAME=value pair or displaying NAME=value pairs for one or more devices. - -### blkid usage ### - -Simply running blkid without any argument will list all the available devices with their Universally Unique Identifier (UUID), the TYPE of the file-system and the LABEL if it's set. - - # blkid - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/blkid.jpg) - -### Listing devices based on name or UUID ### - -If you wish to have information displayed only for a specific device you can use the device name as an option after blkid to do so: - - # blkid /dev/sda1 - -Also if you know the UUID of a device but don't know the device name and wish to find it out you can use the 0-U option like this: - - # blkid -U d3b1dcc2-e3b0-45b0-b703-d6d0d360e524 - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/blkid-uuid.jpg) - -### Detailed information ### - -If you wish to obtain mode detailed information you can use the -p and -o udev option to have it display in a nice format like this: - - # blkid -po udev /dev/sda1 - -![](http://blog.linoxide.com/wp-content/uploads/2014/10/blkid-po.jpg) - -### Reset cache ### - -Sometimes the device list might not be updated, if you think this is the case you can use the -g option that will perform a garbage collection pass on the blkid cache to remove devices which no longer exist. - - # blkid -g - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-command/linux-command-lsblk-blkid/ - -作者:[Adrian Dinu][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/adriand/ -[1]:https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt diff --git a/translated/tech/20141124 Linux blkid Command to Find Block Devices Details.md b/translated/tech/20141124 Linux blkid Command to Find Block Devices Details.md new file mode 100644 index 0000000000..720baf2b33 --- /dev/null +++ b/translated/tech/20141124 Linux blkid Command to Find Block Devices Details.md @@ -0,0 +1,110 @@ +用 Linux blkid 命令查找块设备详情 +================================================================================ +今天我们将会向你展示如何使用 **lsblk** 和 **blkid** 工具来查找关于块设备的信息,我们使用的是一台安装了 CentOS 7.0 的机器。 + +**lsblk** 是一个 Linux 工具,它会显示有关你系统里所有可用块设备的信息。它从 [sysfs 文件系统][1] 中获取信息。默认情况下,这个工具将会以树状格式显示(除了内存虚拟磁盘外的)所有块设备。 + +### lsblk 默认输出 ### + +默认情况下 lsblk 会将块设备输出为树状格式: + +**NAME** + + —— 设备的名称 + +**MAJ:MIN** + + —— Linux 操作系统中的每个设备都以一个文件表示,对块(磁盘)设备来说,这里用主次设备编号来描述设备。 + +**RM** + + —— 可移动设备。如果这是一个可移动设备将显示 1,否则显示 0。 + +**TYPE** + + —— 设备的类型 + +**MOUNTPOINT** + + —— 设备挂载的位置 + +**RO** + + —— 对于只读文件系统,这里会显示 1,否则显示 0。 + +**SIZE** + + —— 设备的容量 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/lsblk.jpg) + +### 显示设备的所有者 ### + +若想显示设备所有者相关的信息,包括文件的所属用户、所属组以及文件系统挂载的模式,你可以使用 -m 选项,像这样: + + lsblk -m + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/lsblk-m.jpg) + +### 列出设备块 ### + +如果你只想要列出设备,而不想让他们以树状输出,你可以使用 -l 选项: + + lsblk -l + +### 在脚本中使用 ### + +高级技巧:如果你想要在脚本中使用而不希望表头被显示出来,你可以这样使用 -n 选项: + + lsblk -ln + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/lsblk-ln.jpg) + +**blkid** 命令是一个命令行工具,它可以显示关于可用块设备的信息。它可以识别一个块设备内容的类型(如文件系统、交换区)以及从内容的元数据(如卷标或 UUID 字段)中获取属性(如 tokens 和键值对)。它主要有两类作用:用指定的键值对搜索一个设备,或是显示一个或多个设备的键值对。 + +### blkid 使用方法 ### + +不添加任何参数直接运行 blkid 将会输出所有可用的设备、它们的通用唯一识别码(UUID)、文件系统类型以及卷标(如果有设置过)。 + + # blkid + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/blkid.jpg) + +### 根据名字或 UUID 列出设备 ### + +如果你只想显示一个特定设备的信息,你可以将该设备的名字作为选项添加在 blkid 后面: + + # blkid /dev/sda1 + +如果你知道一个设备的 UUID 而想要知道它的设备名,你可以用 -U 选项,像这样: + + # blkid -U d3b1dcc2-e3b0-45b0-b703-d6d0d360e524 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/blkid-uuid.jpg) + +### 详细信息 ### + +如果你想要获取更多详细信息,你可以使用 -p 和 -o udev 选项来将它们用漂亮的格式显示出来,像这样: + + # blkid -po udev /dev/sda1 + +![](http://blog.linoxide.com/wp-content/uploads/2014/10/blkid-po.jpg) + +### 重置缓存 ### + +有时候设备列表可能不会更新,如果遇到这种情况你可以使用 -g 选项来清理 blkid 的缓存,从而清除已经不存在的设备。 + + # blkid -g + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/linux-command-lsblk-blkid/ + +作者:[Adrian Dinu][a] +译者:[felixonmars](https://github.com/felixonmars) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/adriand/ +[1]:https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt From 3ed12bf71e7c73b844ec847c15913db1e0cd70cd Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 26 Nov 2014 23:35:03 +0800 Subject: [PATCH 296/316] PUB:20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS @runningwater --- ...ginx MariaDB or MySQL and php on CentOS.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) rename {translated/tech => published}/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md (82%) diff --git a/translated/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md b/published/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md similarity index 82% rename from translated/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md rename to published/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md index e86bfcbc81..e31d360a7c 100644 --- a/translated/tech/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md +++ b/published/20141029 How to install LEMP stack nginx MariaDB or MySQL and php on CentOS.md @@ -1,12 +1,12 @@ -CentOS 下安装 LEMP 包(nginx、MariaDB/MySQL 和 php) +CentOS 下安装 LEMP 服务(nginx、MariaDB/MySQL 和 php) ================================================================================ -LEMP 组合包是一款日益流行的网站服务组合软件包,在许多生产环境中的核心网站服务上起着强有力的作用。正如其名称所暗示的, LEMP 包是由 Linux、ngix、MariaDB/MySQL 和 PHP 组成的。在传统的 LAMP 包中使用的 Apache HTTP 协议服务器性能低下而且难于大规模集群,相比来说 ngix 的高性能及轻量级等特性,正是其的替代方案。 MariaDB 是一款社区支持驱动的 MySQL 数据库的分支,其功能更多性能更佳。PHP,服务端编程语言,具体是由 PHP FastCGI 的增强版 PHP-FPM 组件来处理,生成网页动态内容。 +LEMP 组合包是一款日益流行的网站服务组合软件包,在许多生产环境中的核心网站服务上起着强有力的作用。正如其名称所暗示的, LEMP 包是由 Linux、nginx、MariaDB/MySQL 和 PHP 组成的。在传统的 LAMP 包中使用的 Apache HTTP 协议服务器性能低下而且难于大规模集群,相比来说 nginx 的高性能及轻量级等特性,正是其的替代方案。 MariaDB 是一款社区支持驱动的 MySQL 数据库的分支,其功能更多性能更佳。PHP,服务端编程语言,具体是由 PHP FastCGI 的增强版 PHP-FPM 组件来处理,生成网页动态内容。 这篇文章里,我们示范**如何在 CentOS 操作平台上安装 LEMP 包**。我们安装的目标是 CentOS 6 和 CentOS 7 两个操作平台,如有必要会指出它们的不同。 ### 第一步: Nginx ### -让我们在 CentOS 上安装 nginx 作为第一步,然后对它作些基本的配置,比如使其能自启动和[对防火墙做个性化设置][1]。 +让我们在 CentOS 上安装 nginx 作为第一步,然后对它作些基本的配置,比如使其能引导时启动和[对防火墙做个性化设置][1]。 #### 安装 Nginx #### @@ -48,7 +48,7 @@ LEMP 组合包是一款日益流行的网站服务组合软件包,在许多生 #### 测试 Nginx #### -nginx 的默认文档要目录是 /usr/share/nginx/html。默认的 index.html 文件一定已经在这目录下了。让我们检测下是否可以访问到这个测试 web 页,输入 http:/// 访问。 +nginx 的默认文档要目录是 /usr/share/nginx/html。默认的 index.html 文件一定已经在这目录下了。让我们检测下是否可以访问到这个测试 web 页,输入 http://nginx的ip地址/ 访问。 ![](https://farm4.staticflickr.com/3940/15461279287_8573948074_b.jpg) @@ -56,7 +56,7 @@ nginx 的默认文档要目录是 /usr/share/nginx/html。默认的 index.html ### 第二步: MariaDB/MySQL ### -下一步就是安装 LEMP 包的数据库组件。CentOS/RHEL 6 或早期的版本中提供的是 MySQL 的服务/客户端安装包,但 CentOS/RHEL 7 已使用了 MySQL 默认实现的版本 MariaDB。作为 MySQL 的简单替代品,MariaDB 保证了与 MySQL 的 API 和命令行用法方面最大的兼容性。下面是关于怎么在 CentOS 上安装和配置 MaraDB/MySQL 的操作示例。 +下一步就是安装 LEMP 包的数据库组件。CentOS/RHEL 6 或早期的版本中提供的是 MySQL 的服务器/客户端安装包,但 CentOS/RHEL 7 已使用了 MariaDB 替代了默认的 MySQL。作为 MySQL 的简单替代品,MariaDB 保证了与 MySQL 的 API 和命令行用法方面最大的兼容性。下面是关于怎么在 CentOS 上安装和配置 MaraDB/MySQL 的操作示例。 在 CentOS 7 系统上: @@ -76,7 +76,7 @@ nginx 的默认文档要目录是 /usr/share/nginx/html。默认的 index.html 在成功启动 MariaDB/MySQL 服务后,执行在 MariaDB/MySQL 服务包中的脚本。这一次的运行会为为数据库服务器进行一些安全强化措施,如设置(非空)的 root 密码、删除匿名用户、锁定远程访问。 - $ sudo mysql_secure_installation + $ sudo mysql_secure_installation ![](https://farm8.staticflickr.com/7545/15644566071_8c39875512_z.jpg) @@ -84,7 +84,7 @@ nginx 的默认文档要目录是 /usr/share/nginx/html。默认的 index.html ### 第三步: PHP ### -PHP 是 LEMP 包中一个重要的组件,它负责把存储在 MariaDB/MySQL 服务器的数据取出生成动态内容。为了 LEMP 可用,您至少需要安装上 PHP-FPM 和 PHP-MySQL 两个模块。PHP-FPM(FastCGI 进程管理器)实现的是 nginx 服务器和生成动态内容的 PHP 应用程序的访问接口。PHP-MySQL 模块使 PHP 程序能访问 MariaDB/MySQL 数据库。 +PHP 是 LEMP 包中一个重要的组件,它负责把存储在 MariaDB/MySQL 服务器的数据取出生成动态内容。为了 LEMP 需要,您至少需要安装上 PHP-FPM 和 PHP-MySQL 两个模块。PHP-FPM(FastCGI 进程管理器)实现的是 nginx 服务器和生成动态内容的 PHP 应用程序的访问接口。PHP-MySQL 模块使 PHP 程序能访问 MariaDB/MySQL 数据库。 #### 安装 PHP 模块 #### @@ -116,14 +116,14 @@ PHP 是 LEMP 包中一个重要的组件,它负责把存储在 MariaDB/MySQL - **php-dba**: PHP 的数据抽象层支持。 - **php-pecl-apc**: PHP 加速器/缓存支持。 -安装时,要查看可用的 PHP 模块的完整列表的话,可以运行: +安装时,要查看可用的 PHP 模块的完整列表的话,可以运行: $ sudo yum search php- (CentOS 7) $ sudo yum --enablerepo=remi search php- (CentOS 6) #### 启动 PHP-FPM #### -您需要启动 PHP-FPM ,然后把它加放自动启动服务列表。 +您需要启动 PHP-FPM ,然后把它放到自动启动服务列表。 在 CentOS 7 系统上: @@ -185,7 +185,7 @@ PHP 是 LEMP 包中一个重要的组件,它负责把存储在 MariaDB/MySQL } } -nginx 的默认工作线程(在 /etc/nginx/nginx.conf 文件中指定的)数是一个,让我们也来调整一下这个数字。通常来说我们创建的工作线程数应该和 CPU 核数相同。要确信您的 CPU 的核数,请运行下面这命令: +nginx 的默认工作线程数(在 /etc/nginx/nginx.conf 文件中指定的)是 1,让我们也来调整一下这个数字。通常来说我们创建的工作线程数应该和 CPU 核数相同。要确信您的 CPU 的核数,请运行下面这命令: $ grep processor /proc/cpuinfo | wc -l @@ -202,11 +202,11 @@ nginx 的默认工作线程(在 /etc/nginx/nginx.conf 文件中指定的)数 接下来,让我们对 PHP 的配置文件 /etc/php.ini 做自定义设置。更具体的就是在 /etc/php.ini 文件中增加以下两行。 cgi.fix_pathinfo=0 - date.timezone = "America/New York" + date.timezone = "PRC" -为了安全起见,我们希望的是 PHP 解释器只是处理指定文件路径的文件任务,而不是预测搜索一些并不存在的文件任务。上面的第一行起的就是这个作用。 +为了安全起见,我们希望的是 PHP 解释器只是处理指定文件路径的文件任务,而不是预测搜索一些并不存在的文件任务。上面的第一行起的就是这个作用。(LCTT 译注:原文用的时区是“America/New York”,根据国内情况,应该用 PRC或 Asia 下的中国城市。) -第二行定义的是 PHP 中 日期/时间相关函数使用相关的默认时区。使用[本指南] [3],找出您所在的时区,并设置相应 **date.timezone 的值**。 +第二行定义的是 PHP 中日期/时间相关函数使用相关的默认时区。使用[本指南][3],找出您所在的时区,并设置相应 **date.timezone 的值**。 #### 测试 PHP #### @@ -226,7 +226,7 @@ nginx 的默认工作线程(在 /etc/nginx/nginx.conf 文件中指定的)数 -打开浏览器,输入 http:///test.php 。 +打开浏览器,输入 http://nginx的IP地址/test.php 。 ![](https://farm6.staticflickr.com/5608/15647258715_9d7bcd8c73_z.jpg) @@ -238,11 +238,11 @@ via: http://xmodulo.com/install-lemp-stack-centos.html 作者:[Dan Nanni][a] 译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/open-port-firewall-centos-rhel.html -[2]:http://ask.xmodulo.com/install-remi-repository-centos-rhel.html +[1]:http://linux.cn/article-4243-1.html +[2]:http://linux.cn/article-4192-1.html [3]:http://ask.xmodulo.com/set-default-timezone-php.html \ No newline at end of file From 3cdfb5927ff234cecda1c2ada70af1f3170e2f75 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 27 Nov 2014 13:04:12 +0800 Subject: [PATCH 297/316] PUB:20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu @Vic020 --- ... Tip] How To Fix Docky Compositing Error In Lubuntu.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md (81%) diff --git a/translated/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md b/published/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md similarity index 81% rename from translated/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md rename to published/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md index d355c95b8f..e2f037df85 100644 --- a/translated/tech/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md +++ b/published/20141112 [Quick Tip] How To Fix Docky Compositing Error In Lubuntu.md @@ -1,6 +1,6 @@ -[Quick Tip]如何修复Lubuntu中的Docky混合错误 +小技巧:如何修复Lubuntu中的Docky混合错误 ================================================================================ -总所周知,**Docky**是Unix/Linux类系统中的轻量级应用启动器。我是 Lubuntu 和 Docky的忠实粉丝,因为他们不需要占用我的所有系统资源,这样就可以同时运行更多应用。我在笔记本上使用Docky应用启动器,系统为Lubuntu 14.04. +总所周知,**Docky**是Unix/Linux类系统中的轻量级应用启动器。我是 Lubuntu 和 Docky 的忠实粉丝,因为它们不需要占用我的所有系统资源,这样就可以同时运行更多应用。我在笔记本上使用Docky应用启动器,系统为Lubuntu 14.04. 但是,如果你使用LXDE发行版,你也许肯定遇到过使用Docky时报混合的错误。看下面的截图。 @@ -20,7 +20,7 @@ ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/unknown_006.png) -这时,你结可以使用3D背景和隐藏功能,如自动隐藏(Auto-hide),Intellihide和窗口闪烁(Window dodge)等。 +这时,你就可以使用3D背景和隐藏功能,如自动隐藏(Auto-hide),Intellihide和窗口闪烁(Window dodge)等。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Docky-Settings_003.png) @@ -32,7 +32,7 @@ via: http://www.unixmen.com/quick-tip-fix-docky-compositing-error-lubuntu/ 作者:[SK][a] 译者:[Vic020/VicYu](http://www.vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9e84442dcedb5b4e5b2dc532bf0aab00a38b8c4d Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 27 Nov 2014 13:31:42 +0800 Subject: [PATCH 298/316] =?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 --- ...20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/talk => published}/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md (100%) diff --git a/translated/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md b/published/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md similarity index 100% rename from translated/talk/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md rename to published/20141030 Ubuntu Could Give a Fatal Blow to Windows in China.md From 62d43d894b178b7b4869209233d2b69c14ffa204 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 27 Nov 2014 13:39:14 +0800 Subject: [PATCH 299/316] PUB:20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu @ggaaooppeenngg --- ...and Audio Using 'Avconv' Tool in Ubuntu.md | 129 ++++++++++++++++++ ...and Audio Using 'Avconv' Tool in Ubuntu.md | 129 ------------------ 2 files changed, 129 insertions(+), 129 deletions(-) create mode 100644 published/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md delete mode 100644 translated/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md diff --git a/published/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md b/published/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md new file mode 100644 index 0000000000..0337b197ba --- /dev/null +++ b/published/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md @@ -0,0 +1,129 @@ +在 Linux 中使用"avconv"工具录制计算机桌面视频和音频 +================================================================================ +**Libav**是一款跨平台的工具库,能够用来处理多媒体文件、流和协议。它最初是源自ffmpeg。Libav带有一些工具,比如: + +- **Avplay**: 一款视频音频播放器。 +- **Avconv**: 能够记录多个设备输入源的一个多媒体转换器和视频音频录制器。 +- **Avprobe**: 一个连接多媒体文件流并且返回关于这个文件流的统计信息的工具。 +- **Libavfilter**: 一个Libav工具的过滤器(filtering)API。 + +在这篇文章里面,我们就要展示如何通过'Avconv'程序在**Debian/Ubuntu/Linux Mint**发行版上录制Linux桌面视频音频。 + +### 第一步:下载 Avconv 工具 ### + +**1.** **avconv**是 “**libav-tools**” 的一部分, 可以通过官方的基于debian的仓库下载,比如Mint、Ubuntu。输入下面命令即可: + + $ sudo apt-get update + $ sudo apt-get install libav-tools + +![Install Avconv Tool](http://www.tecmint.com/wp-content/uploads/2014/11/Install-avconv-tool.jpeg) + +*下载Avconv工具* + +**注意**: 如果从默认仓库下载的话, ‘**avconv**’ 的版本可能比较老。 因此我们推荐你拉取最新的git官方版本。 + + $ sudo apt-get install yasm + $ git clone git://git.libav.org/libav.git + $ cd libav + $ ./configure + $ make + $ sudo make install + +**注意**: 你应该运行 ‘**./configure –help**’ 来列出所有的可选配置选项并且安装相应的解码器和库,你还需要做很多工作来解决依赖问题。 + +也要注意,如果你是从源代码编译的,就需要使用**sudo avconv**而不是**avconv**来运行这个工具。 + +### 第二步:开始录制桌面视频 ### + +**2.**一切就绪,现在可以通过运行下面的命令录制你的视频了: + + $ avconv -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 $HOME/output.avi + +简单解释一下这个命令: + +- **avconv -f x11grab** 默认从X服务捕捉画面。 +- **-r 25** 这是你需要的视频帧率,可以自行设置。 +- **-s 1920×1080** 是你的系统的桌面分辨率,要设置成你当前桌面的分辨率,这一点非常重要。 +- **-i :0.0** 我们要记录的位置(X 服务输出端口),设置成这样就可以了。 +- **-vcodec libx264** 我们用来录制视频的编码器。 +- **-threads 4** 线程数,可以根据情况更改。 +- **$HOME/output** 输出的目标文件路径。 +- **.avi** 使用的视频格式,可以换成 “flv”、“mp4″、 “wmv”、 “mov”、 “mkv”等。 + +**3.**在运行命令之后,就会在terminal上自动运行一个进程进行记录,按"Ctrl+C"键来终止记录。 + +![Record Desktop Screen](http://www.tecmint.com/wp-content/uploads/2014/11/Record-Desktop-Screen.jpeg) + +*录制桌面视频* + +**4.** 现在,你可以使用VLC或者其他的播放器,或者使用来自Libav包里的播放器"avplay"来播放你录制的视频。 + + $ avplay $HOME/output.avi + +**注意:** 别忘了替换输出文件的路径为你自己的,录制效果还是很好的。 + +![Play Recorded Video](http://www.tecmint.com/wp-content/uploads/2014/11/Play-Recorded-Video.jpeg) + +*播放录制的文件* + +这有一段我用 “**avconv**” 录制的[视频](http://www.youtube.com/embed/g1FEh4wByGE) (墙外)。 + + +### 第三步: 开始录制桌面的音频和视频 ### + +**5.** 如果也想同时录制音频,先运行这个命令,列出所有的音频输入源: + + $ arecord -l + +结果类似这样: + +![Check Audio Input](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Audio-Input.png) + +*检查音频输入源* + +在我这里,我只有一个音频输入源,所以数量是**1**,这就是我使用如下命令来捕捉我的视频以及麦克风的音频的原因。 + + $ avconv -f alsa -i hw:1 -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 output-file2.avi + +我修改了部分地方,下面做个简短的解释: + +- **-f** alsa 一个从alsa设备捕捉声音的选项。 +- **-i** hw:1 是一个从 “hw:1” 设备捕捉音频的选项,这个设备是我电脑上仅有的一个音频输入设备。 + +**注意**: 如果你想用**arecord -l**显示的**1**之外的设备的话,别忘了替换 “**1**”。 + +结束录制,再来一次“**Ctrl + C**” 就可以。 + +### 第四步: 开始录制桌面音频 ### + +**6.** 如果只想录制音频的话,使用下面的命令。 + + $ avconv -f alsa -i hw:1 out.wav + +**7.** 替换成 **.mp3** 等Libav支持的格式都可以,播放 **out.wav**就能听到你自己的声音了。 + +![Record Desktop Audio](http://www.tecmint.com/wp-content/uploads/2014/11/Record-Desktop-Audio.png) + +*录制桌面音频* + +###最后 ### + +“**avconv**” 工具可以用来做很多其他事情,不仅仅是录制桌面视频,更多的教程和文档请移步到官网。 + +- [https://libav.org/avconv.html][1] + +你对"avconv"的体验如何,你使用过其他工具录制桌面视频么?在评论里面和我们分享吧。 + + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/record-ubuntu-desktop-screen-using-avconv/ + +作者:[Hanny Helal][a] +译者:[ggaaooppeenngg](https://github.com/ggaaooppeenngg) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/hannyhelal/ +[1]:https://libav.org/avconv.html diff --git a/translated/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md b/translated/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md deleted file mode 100644 index ee3d3cedc0..0000000000 --- a/translated/tech/20141108 How to Record Your Desktop Video and Audio Using 'Avconv' Tool in Ubuntu.md +++ /dev/null @@ -1,129 +0,0 @@ -用"Avconv"工具录制你的桌面视频和音频 -================================================================================ -**Libav**是一款跨平台的工具库,能够用来处理多媒体文件,流和协议,最初是fork自ffmpeg.Libav包含了子工具,比如: - -- **Avplay**: 一款视频音频播放器. -- **Avconv**: 能够记录多个设备输入源的一个多媒体转换器和视频音频录制器. -- **Avprobe**: 一个连接多媒体文件流并且返回关于这个文件流的统计信息的工具. -- **Libavfilter**:一个Libav工具的过滤器(filtering)API. - -接下来,我们就要展示如何通过'Avconv'程序在**Debian/Ubuntu/Linux Mint**发行版上录制Linux桌面视频音频. -### 步奏 1:下载 Avconv 工具 ### - -**1.** **avconv**是 “**libav-tools**” 的一部分, 可以通过官方的基于debian的仓库下载,比如Mint,Ubuntu.输入下面命令即可: - - $ sudo apt-get update - $ sudo apt-get install libav-tools - -![Install Avconv Tool](http://www.tecmint.com/wp-content/uploads/2014/11/Install-avconv-tool.jpeg) - -下载Avconv工具 - -**注意**: 如果从默认仓库下载的话 ‘**avconv**‘ 的版本可能比较老. 因此我们推荐你拉取最新的git官方版本. - - $ sudo apt-get install yasm - $ git clone git://git.libav.org/libav.git - $ cd libav - $ ./configure - $ make - $ sudo make install - -**注意**: 你必须运行 “**./configure –help**” 去列出所有的可选配置选项并且安装相应的解码器和库,你还需要做很多去下载依赖. -同样注意,如果你是从源代码编译的,就需要使用**sudo avconv**而不是**avconv**来运行这个工具. - -### 步奏 2:开启桌面录制 ### - -**2.**你已经准备好了,现在可以通过运行下面的命令录制你的视频了: - - $ avconv -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 $HOME/output.avi - -简单解释一下这个命令: - -- **avconv -f x11grab** 默认从x服务捕捉画面. -- **-r 25** 这是视频的帧率,可以自行设置. -- **-s 1920×1080** 是你的画面分辨率,要设置成你当前画面的分辨率,这一点非常重要. -- **-i :0.0** 记录的起点,设置成这样就可以了. -- **-vcodec libx264** 我们用来录制视频的解码器. -- **-threads 4**线程数, 可以根据情况更改. -- **$HOME/output** 目标文件路径. -- **.avi**视频格式,可以转换成 “flv”, “mp4″, “wmv”, “mov”, “mkv”. - -**3.**在运行命令之后,录像机就会打开,并且在terminal上自动运行,按"Ctrl+C"建来终止. - -![Record Desktop Screen](http://www.tecmint.com/wp-content/uploads/2014/11/Record-Desktop-Screen.jpeg) - -录制桌面视频 - -**4.** 你可能需要使用VLC或者其他的播放器,或者你需要使用"avplay",这是一个Libav包里的播放器. - - $ avplay $HOME/output.avi - -**注意:** 别忘了替换输出文件的路径,录制效果还是很好的. - -![Play Recorded Video](http://www.tecmint.com/wp-content/uploads/2014/11/Play-Recorded-Video.jpeg) - -播放录制的文件 - -这有一段我用 “**avconv**” 录制的视频. - -[视频地址](http://www.youtube.com/embed/g1FEh4wByGE) - - - -### 步奏 3: 开始桌面音频和视频录制 ### - -**5.** 如果想录制音频,先运行这个命令,列出所有的音频输入源: - - $ arecord -l - -如果结果是这样的 - -![Check Audio Input](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Audio-Input.png) - -检查音频输入源 - -在我的例子中,我只有一个音频输入源,所以数量是**1**,这就是为什么我使用下面的命令来捕捉我的视频以及麦克风的音频了. - - $ avconv -f alsa -i hw:1 -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 output-file2.avi - -看黄色的部分:那是我修改了的地方,下面做个简短的解释: -- **-f** alsa 一个从alsa设备捕捉声音的选项. -- **-i** hw:1 是一个从 “hw:1” 设备捕捉画面的选项,这个设备是我电脑上仅有的一个设备. - -**注意**: 别忘了替换 “**1**”,如果你想用**arecord -l**显示的**1**之外的设备的话. - -结束录制, 再来一次“**Ctrl + C**” 就可以. - -### 步奏 4:开始桌面音频的录制 ### - -**6.** 如果只想录制音频的话,使用下面的命令. - - $ avconv -f alsa -i hw:1 out.wav - -**7.** 替换成 **.mp3** Libav支持的格式都可以,播放 **out.wav**就能听到你自己的声音了 - -![Record Desktop Audio](http://www.tecmint.com/wp-content/uploads/2014/11/Record-Desktop-Audio.png) - -录制桌面音频 - -###最后 ### - -“**avconv**” 工具可以用来做很多其他事情,不仅仅是录制桌面视频,更多的教程和文档请移步到官网. - -- [https://libav.org/avconv.html][1] - -你对"avconv"的体验如何,你使用过其他工具录制桌面视频么?在评论里面和我们分享吧. - - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/record-ubuntu-desktop-screen-using-avconv/ - -作者:[Hanny Helal][a] -译者:[ggaaooppeenngg](https://github.com/ggaaooppeenngg) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/hannyhelal/ -[1]:https://libav.org/avconv.html From 6ccb1dbc8d77ec78c635b4739cca055dda5b1af7 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Thu, 27 Nov 2014 14:00:06 +0800 Subject: [PATCH 300/316] =?UTF-8?q?=E9=80=89=E9=A2=98:=20Quick=20systemd-n?= =?UTF-8?q?spawn=20guide?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20141127 Quick systemd-nspawn guide.md | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 sources/tech/20141127 Quick systemd-nspawn guide.md diff --git a/sources/tech/20141127 Quick systemd-nspawn guide.md b/sources/tech/20141127 Quick systemd-nspawn guide.md new file mode 100644 index 0000000000..879a0b47fa --- /dev/null +++ b/sources/tech/20141127 Quick systemd-nspawn guide.md @@ -0,0 +1,76 @@ +Quick systemd-nspawn guide +================================================================================ +I switched to using systemd-nspawn in place of chroot and wanted to give a quick guide to using it. The short version is that I’d strongly recommend that anybody running systemd that uses chroot switch over - there really are no downsides as long as your kernel is properly configured. + +Chroot should be no stranger to anybody who works on distros, and I suspect that the majority of Gentoo users have need for it from time to time. + +### The Challenges of chroot ### + +For most interactive uses it isn’t sufficient to just run chroot. Usually you need to mount /proc, /sys, and bind mount /dev so that you don’t have issues like missing ptys, etc. If you use tmpfs you might also want to mount the new tmp, var/tmp as tmpfs. Then you might want to make other bind mounts into the chroot. None of this is particularly difficult, but you usually end up writing a small script to manage it. + +Now, I routinely do full backups, and usually that involves excluding stuff like tmp dirs, and anything resembling a bind mount. When I set up a new chroot that means updating my backup config, which I usually forget to do since most of the time the chroot mounts aren’t running anyway. Then when I do leave it mounted overnight I end up with backups consuming lots of extra space (bind mounts of large trees). + +Finally, systemd now by default handles bind mounts a little differently when they contain other mount points (such as when using -rbind). Apparently unmounting something in the bind mount will cause systemd to unmount the corresponding directory on the other side of the bind. Imagine my surprise when I unmounted my chroot bind to /dev and discovered /dev/pts and /dev/shm no longer mounted on the host. It looks like there are ways to change that, but this isn’t the point of my post (it just spurred me to find another way). + +### Systemd-nspawn’s Advantages ### + +Systemd-nspawn is a tool that launches a container, and it can operate just like chroot in its simplest form. By default it automatically sets up most of the overhead like /dev, /tmp, etc. With a few options it can also set up other bind mounts as well. When the container exits all the mounts are cleaned up. + +From the outside of the container nothing appears different when the container is running. In fact, you could spawn 5 different systemd-nspawn container instances from the same chroot and they wouldn’t have any interaction except via the filesystem (and that excludes /dev, /tmp, and so on - only changes in /usr, /etc will propagate across). Your backup won’t see the bind mounts, or tmpfs, or anything else mounted within the container. + +The container also has all those other nifty container benefits like containment - a killall inside the container won’t touch anything outside, and so on. The security isn’t airtight - the intent is to prevent accidental mistakes. + +Then, if you use a compatible sysvinit (which includes systemd, and I think recent versions of openrc), you can actually boot the container, which drops you to a getty inside. That means you can use fstab to do additional mounts inside the container, run daemons, and so on. You get almost all the benefits of virtualization for the cost of a chroot (no need to build a kernel, and so on). It is a bit odd to be running systemctl poweroff inside what looks just like a chroot, but it works. + +Note that unless you do a bit more setup you will share the same network interface with the host, so no running sshd on the container if you have it on the host, etc. I won’t get into this but it shouldn’t be hard to run a separate network namespace and bind the interfaces so that the new instance can run dhcp. + +### How to do it ### + +So, getting it actually working will likely be the shortest bit in this post. + +You need support for namespaces and multiple devpts instances in your kernel: + + CONFIG_UTS_NS=y + CONFIG_IPC_NS=y + CONFIG_USER_NS=y + CONFIG_PID_NS=y + CONFIG_NET_NS=y + CONFIG_DEVPTS_MULTIPLE_INSTANCES=y + +From there launching a namespace just like a chroot is really simple: + + systemd-nspawn -D . + +That’s it - you can exit from it just like a chroot. From inside you can run mount and see that it has taken care of /dev and /tmp for you. The “.” is the path to the chroot, which I assume is the current directory. With nothing further it runs bash inside. + +If you want to add some bind mounts it is easy: + + systemd-nspawn -D . --bind /usr/portage + +Now your /usr/portage is bound to your host, so no need to sync/etc. If you want to bind to a different destination add a “:dest” after the source, relative to the root of the chroot (so –bind foo is the same as –bind foo:foo). + +If the container has a functional init that can handle being run inside, you can add a -b to boot it: + + systemd-nspawn -D . --bind /usr/portage -b + +Watch the init do its job. Shut down the container to exit. + +Now, if that container is running systemd you can direct its journal to the host journal with -h: + + systemd-nspawn -D . --bind /usr/portage -j -b + +Now, nspawn registers the container so that it shows up in machinectl. That makes it easy to launch a new getty on it, or ssh to it (if it is running ssh - see my note above about network namespaces), or power it off from the host. + +That’s it. If you’re running systemd I’d suggest ditching chroot almost entirely in favor of nspawn. + +-------------------------------------------------------------------------------- + +via: http://rich0gentoo.wordpress.com/2014/07/14/quick-systemd-nspawn-guide/ + +作者:[rich0][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://rich0gentoo.wordpress.com/ \ No newline at end of file From 5eae2f830b77108ded370822de86eb957bdc6867 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Thu, 27 Nov 2014 14:06:03 +0800 Subject: [PATCH 301/316] fix a typo --- sources/tech/20141127 Quick systemd-nspawn guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20141127 Quick systemd-nspawn guide.md b/sources/tech/20141127 Quick systemd-nspawn guide.md index 879a0b47fa..6ba0f8586f 100644 --- a/sources/tech/20141127 Quick systemd-nspawn guide.md +++ b/sources/tech/20141127 Quick systemd-nspawn guide.md @@ -47,7 +47,7 @@ If you want to add some bind mounts it is easy: systemd-nspawn -D . --bind /usr/portage -Now your /usr/portage is bound to your host, so no need to sync/etc. If you want to bind to a different destination add a “:dest” after the source, relative to the root of the chroot (so –bind foo is the same as –bind foo:foo). +Now your /usr/portage is bound to your host, so no need to sync/etc. If you want to bind to a different destination add a “:dest” after the source, relative to the root of the chroot (so --bind foo is the same as --bind foo:foo). If the container has a functional init that can handle being run inside, you can add a -b to boot it: From 94fb2afe8488a2c415e3141afbf2cc06fe988938 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 27 Nov 2014 14:15:44 +0800 Subject: [PATCH 302/316] =?UTF-8?q?20141127-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...41127 How to install Docker on CentOS 7.md | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 sources/tech/20141127 How to install Docker on CentOS 7.md diff --git a/sources/tech/20141127 How to install Docker on CentOS 7.md b/sources/tech/20141127 How to install Docker on CentOS 7.md new file mode 100644 index 0000000000..d39a3ca5d8 --- /dev/null +++ b/sources/tech/20141127 How to install Docker on CentOS 7.md @@ -0,0 +1,75 @@ +How to install Docker on CentOS 7 +================================================================================ +Docker is an open-source tool that makes creating & managing **Linux containers(LXC)** easy. Containers are like lightweight VMs which can be started & stopped in milliseconds. Dockers help the system admin & coders to develop their application in a container and can further scale up to 1000 of nodes. + +The main difference between container and VM(Virtual machine) is that dockers provide **process based isolation** , whereas VM provides full isolation of resources. Virtual machine takes a minute to start where as container can be started in a second or less than a second. Container uses the Kernel of host OS , whereas VM uses the separate Kernel. + +One of the limitation of Docker is that it can be used only on **64bit hosts** OS. + +In this post we will discuss how to install docker in CentOS 7.x + +### Installation of Docker on CentOS 7 ### + +Docker package is included in the default CentOS-Extras repository. So to install docker , simply run below yum command : + + [root@localhost ~]# yum install docker + +### Start the Docker Service ### + +Once the Installation is finished , start docker service and enable it at boot using below commands + + [root@localhost ~]# service docker start + [root@localhost ~]# chkconfig docker on + +**Download the official Centos images Locally** + + [root@localhost ~]# docker pull centos + Pulling repository centos + 192178b11d36: Download complete + 70441cac1ed5: Download complete + ae0c2d0bdc10: Download complete + 511136ea3c5a: Download complete + 5b12ef8fd570: Download complete + +**Verify CentOS images that have been fetched :** + + [root@localhost ~]# docker images centos + REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE + centos centos5 192178b11d36 2 weeks ago 466.9 MB + centos centos6 70441cac1ed5 2 weeks ago 215.8 MB + centos centos7 ae0c2d0bdc10 2 weeks ago 224 MB + centos latest ae0c2d0bdc10 2 weeks ago 224 MB + +**Run a Docker Container :** + + [root@localhost ~]# docker run -i -t centos /bin/bash + [root@dbf66395436d /]# + +As we can see centos container has been started and we got the bash shell. In docker command we have used options like ‘-i attaches stdin and stdout’ and ‘-t allocates a terminal or console’ . To disconnect from container type exit . + + [root@cd05639b3f5c /]# cat /etc/redhat-release + CentOS Linux release 7.0.1406 (Core) + [root@cd05639b3f5c /]# exit + exit + [root@localhost ~]# + +We can also search Containers based on fedora & ubuntu OS. + + [root@localhost ~]# docker search ubuntu + [root@localhost ~]# docker search fedora + +**Display the list of running containers ** + +![](http://www.linuxtechi.com/wp-content/uploads/2014/11/docker-ps.png) + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/install-docker-on-centos-7/ + +作者:[Pradeep Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file From 4dc9efa9139a9f0b55aea28deec0cbe3456f2355 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Thu, 27 Nov 2014 14:20:59 +0800 Subject: [PATCH 303/316] [Translating] How to install Docker on CentOS 7 --- sources/tech/20141127 How to install Docker on CentOS 7.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/tech/20141127 How to install Docker on CentOS 7.md b/sources/tech/20141127 How to install Docker on CentOS 7.md index d39a3ca5d8..31bcce6697 100644 --- a/sources/tech/20141127 How to install Docker on CentOS 7.md +++ b/sources/tech/20141127 How to install Docker on CentOS 7.md @@ -1,3 +1,5 @@ +[felixonmars translating...] + How to install Docker on CentOS 7 ================================================================================ Docker is an open-source tool that makes creating & managing **Linux containers(LXC)** easy. Containers are like lightweight VMs which can be started & stopped in milliseconds. Dockers help the system admin & coders to develop their application in a container and can further scale up to 1000 of nodes. @@ -67,9 +69,9 @@ We can also search Containers based on fedora & ubuntu OS. via: http://www.linuxtechi.com/install-docker-on-centos-7/ 作者:[Pradeep Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[felixonmars](https://github.com/felixonmars) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file +[a]:http://www.linuxtechi.com/author/pradeep/ From 161875b7ca164238201458f26b85ff8d832296cc Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 27 Nov 2014 15:06:22 +0800 Subject: [PATCH 304/316] =?UTF-8?q?20141127-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 Supercharge Your Ubuntu Experience.md | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md diff --git a/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md b/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md new file mode 100644 index 0000000000..13608d6dd5 --- /dev/null +++ b/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md @@ -0,0 +1,154 @@ +11 Useful Utilities To Supercharge Your Ubuntu Experience +================================================================================ +**Whether you’re a relative novice or a seasoned pro, we all want to get the most from our operating system. Ubuntu, like most modern OSes, has more to offer than what is presented at first blush.** + +From tweaking and refining the look, behaviour and performance of the Unity desktop to performing system maintenance, there are a huge array of useful utilities and apps that can help **tune Ubuntu to meet your needs in no time**. + +Caveat time: Ubuntu has always shipped with ‘sane defaults’ — options that just work — out of the box. These defaults are well suited for the majority of people. They’re tested, accepted and recommended. + +But one size doesn’t fit all. For the tinkerers and experimenters among us the default experience is a starting point from which to tailor. + +So, without any more waffle, here is a set of 11 nifty utilities to help you supercharge your Ubuntu experience. + +### Unity Tweak Tool ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/unity-tweak-tool.jpg) + +I’ll kick off this list with the big one: **Unity Tweak** Tool. The kitchen sink of customisation, Unity Tweak Tool offers a comprehensive set of system tweaks tuned for Ubuntu and the Unity desktop. + +It’s stuffed full of switches, toggles and control, letting you configure everything from the way Unity looks to the way it behaves. Use it to **quickly and easily change the GTK theme and icon set**, set up hot corners, adjust launcher size, add or remove workspaces, and — notably — enable Unity’s elusive ‘minimise on click’ feature. + +Free and readily available from the Software Center, Unity Tweak Tool is one well worth keeping in your back pocket. + +### Unity Privacy Indicator ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/indicator-privacy-in-ubuntu.jpg) + +Privacy. A big, big issue and rightly so. But the topic is often shaded rather than binary; you may be happy to let some data or habits, say apps you frequently open, be logged locally, but not be ok with the searches you make in the Dash being ferried to a third-party server (however anonymous that data may be). + +[Privacy Indicator][1] is a useful tool to help you stay abreast of what files, folders and services are being accessed, logged and recce’d on the Ubuntu desktop. + +With a quick click on the ‘eye’ icon added to the desktop panel you can: + +- Toggle Online Search Results, Zeitgeist, HUD Logging & GeoIP +- Quick access to clean Zeitgeist, F2, Recent Files, etc. +- Options to show/hide desktop icons and name in the panel + +The latter two options may seem a little misplaced in this app but have less obvious privacy implications for those who take screenshots or screen share. + +- [Download Indicator Privacy (.deb)][2] + +### Unity Folders ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/unity-folders.jpg) + +**Android, iOS, OS X, Chrome OS, and GNOME Shell have app folders, and so can Unity with a nifty third-party app. ** + +“Unity Folders” allows you to organise apps on the Unity Launcher into handy folders — think ‘games’, ‘office’, ‘social‘, etc. You get quick access to your favourite apps without needing to open the Dash, which may suit your workflow. + +Each ‘folder’ is, actually, an application that opens up and positions itself near the origin point. But the overall effect is one that looks like an OS X style stack or an Android folder popover. + +Folder icons can be customised or auto-generated based on the applications tucked up inside. Existing folders can be edited, rearranged, rename and re-other stuff, too. + +- Create as many folders as you like +- Choose custom or auto-generated folder icon +- 3 folder layouts to choose from +- Set custom icons for apps added to folders +- Edit existing folders + +- Unity Folders Website + +### Caffeine ### + +A staple for many of us, and not just in our drinks, Caffeine offers a fast, silent way to stop your screensaver or lock-screen kicking in. The degree of usefulness will depend on your circumstances (read: quirks of your system), and though it’s not quite as user friendly as it once was, it’s still worth [checking out][3]. + +### System Monitor Indicator ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/multiload-indicator-in-ubuntu.jpg) + +If you’re a stat hound who likes to keep tabs on apps, processes and hardware status, Linux makes it easy. From Conky Configs to Terminal Commands — there’s no shortage of ways to monitor your CPU usage, network traffic or GPU temperature. + +But by far my favourite is System **Monitor Indicator** – also known as indicator-multiload — available from the Ubuntu Software Center. It has a host of configuration options, too. + +- [Click to Install ‘System Load Indicator’ on Ubuntu][4] + +### Power Saving Tools for Linux Laptops ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2012/08/front.jpg) + +**TLP** + +Linux distributions don’t have the best reputation when it comes to power efficiency on portable devices. + +If your own Linux laptop can barely get you from the sofa to the kitchen before needing a recharge, there are some tools you can try. + +TLP is one of the most popular automated background tool promising to prolong battery life of laptops running Linux. It does this by adjusting the settings and behaviour of system processes and hardware, such as enabling Wi-Fi power saving mode, runtime power management of PCI bus devices, and processor frequency scaling. + +It’s available to [install on Ubuntu 14.04 LTS and later using the dedicated TLP PPA][5] and comes with a ‘catch-all’ config to get you started. The more advanced users among you can dive in and manually adjust the settings to suit your own hardware, something that a [thorough guide on the TLP wiki][6] makes easy. + +**Laptop Mode Tools** + +If TLP sounds a little too complex — and there’s no shame if it does — there’s a simpler alternative: **Laptop Mode Tools**. This package is available to install from the Ubuntu Software Center and keeps the tweaks made to a set of sane defaults (Wi-Fi, Bluetooth, etc.). + +Laptop Mode Tools cannot be installed at the same time as TLP. + +- [Laptop Mode Tools in Ubuntu Software Center][7] + +### Intel Graphics Installer ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/intelgraphicsdriverinstaller.png) + +The Intel Graphics Installer tool is a must-have for those running Intel graphics hardware who want the best performance they can get. It makes finding and installing the latest Intel GPU drivers a painless, fuss-free affair — no PPAs or Terminal kung foo needed. + +- [Download Intel Graphics Installer for Linux 0.7][8] + +### Hardware Stats ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/02/Screen-Shot-2014-02-10-at-21.05.37.png) + +If you plan on upgrading your PC or replacing a worn-out part you’ll need to get some specific hardware details, such as RAM type, CPU socket set or what PCI slots are available. + +**I-Nex** makes unearthing this, and host of other detailed system stats, easy. Use it to find your motherboard model number, RAM stepping, S.M.A.R.T. status and…well, pretty much anything else you can think of! + +- [Learn More About I-Nex on Launchpad][9] + +### Disk Space Visualizer ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/disk-usage-visualizer-for-ubuntu.jpg) + +In this age of 1TB hard drives we might not need to be as prudent with disk space as we once were. But for those of using a smallish SSD, running multiple partitions or working in a virtual machine with a fixed-size virtual disk, there’ll be times when freeing up a bit of extra space is required. + +GNOME Disks, installed in Ubuntu by default, makes finding the biggest space-gobbling culprits easy. Ideal for locating hidden logs, caches, and media files. + +### BleachBit (Cruft Cleaner) ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/bleachbit.jpg) + +Windows users will be familiar with applications like CCleaner, which scan for and clean out junk files, empty folders, bloated caches, and obsolete packages. For a a similarly quick and effortless click n’ clean solution on Ubuntu try **BleachBit**. + +It is a powerful tool, so do pay attention to what you’re cleaning. Don’t aimlessly check every box; not everything that it can clean needs to be. Play it smart; when in doubt, leave it out. + +- [Install BleachBit from Ubuntu Software Center][10] + +Got a favourite system utility of your own? Let others know about it in the comments. +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/useful-tools-for-ubuntu-do-you-use-them + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.florian-diesch.de/software/indicator-privacy/index.html +[2]:http://www.florian-diesch.de/software/indicator-privacy/dist/indicator-privacy_0.04-1_all.deb +[3]:http://www.omgubuntu.co.uk/2014/05/stop-ubuntu-sleeping-caffeine +[4]:apt://indicator-mulitload +[5]:https://launchpad.net/~linrunner/+archive/ubuntu/tlp/+packages +[6]:http://linrunner.de/en/tlp/docs/tlp-configuration.html +[7]:https://apps.ubuntu.com/cat/applications/laptop-mode-tools/ +[8]:https://01.org/linuxgraphics/downloads/2014/intelr-graphics-installer-linux-1.0.7 +[9]:https://launchpad.net/i-nex +[10]:https://apps.ubuntu.com/cat/applications/bleachbit/ \ No newline at end of file From bf803aed01b9759a6941fa5dcead90effa458889 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 27 Nov 2014 15:22:35 +0800 Subject: [PATCH 305/316] =?UTF-8?q?20141127-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...gnificent Linux Music Streaming Clients.md | 196 ++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 sources/share/20141127 Five Magnificent Linux Music Streaming Clients.md diff --git a/sources/share/20141127 Five Magnificent Linux Music Streaming Clients.md b/sources/share/20141127 Five Magnificent Linux Music Streaming Clients.md new file mode 100644 index 0000000000..35668c76ff --- /dev/null +++ b/sources/share/20141127 Five Magnificent Linux Music Streaming Clients.md @@ -0,0 +1,196 @@ +Five Magnificent Linux Music Streaming Clients +================================================================================ +Digital streams almost totally command my music listening these days. Over the years I have amassed a large collection of CDs at considerable expense; most of them now sit neglected gathering dust. Almost all music streaming services fall short of the audio quality of CDs, but their popularity has more to do with sheer convenience than high-fidelity sound reproduction. Music streaming has not only been to the detriment of CD sales; digital downloads have also experienced a slowing down of sales. This is only set to continue. Audiophiles may be tempted to embrace music streaming given that there are now services such as Tidal which offers high fidelity music streaming, 25 million tracks encoded with the FLAC format streamed at 1,411kbps. + +CDs are not going away though. Music streaming services do experience issues with record labels and artists who are unhappy with the amount of return they receive from letting their music be hosted on the service. This is still in flux; we have seen this year Led Zeppelin, Pink Floyd, Metallica sign up to streaming services, but there are still some notable omissions such as the Beatles, Radiohead and AC/DC who refuse to allow fans to stream their music. Even where a record label or singer has given permission to allow streaming services to access their work, an artist's back catalog can be pulled at a moment's notice. This month, Taylor Swift’s entire catalog of music was pulled from Spotify's streaming service at the pop singer’s request. Some people will still prefer to "possess" their collection, but it's looking like an increasingly old fashioned way to enjoy music. + +The Linux platform has matured into a good way of listening to streaming music services. There are clients available for most of the music streaming services; I hope TIDAL will support Linux on the desktop in due course, and not rely on a web player. All of the applications featured in this article are excellent. An honorable mention should be given to Amarok, pianobar, and Tomahawk. + +![Spotify](http://www.linuxlinks.com/portal/content2/png/Spotify.png) + +![Spotify in action](http://www.linuxlinks.com/portal/content/reviews/Audio/Screenshot-Spotify-Streaming.png) + +Spotify is a proprietary peer-to-peer music streaming service that allows users to listen to tracks or albums on demand. The service describes itself as "A world of music. Instant, simple and free". Spotify uses 96kbps streaming on mobile, 160kbps on desktop and 320kbps for "Premium subscribers" - all encoded in the Ogg Vorbis format. Spotify is free for those who choose to live with adverts, or at a reasonable monthly charge without them. + +Spotify is a fantastic service, offering access to a huge library of music covering all different types of music such as pop, alternative, classical, techno, and rock. It is a great way of dipping into new music. The service has the support of major labels including Sony BMG, EMI, Universal, and Warner Music, as well as independent labels and distribution networks like Labrador Records, The Orchard, Alligator Records, Merlin, CD Baby, INgrooves as well as classical music labels such as Chandos, Naxos, EMI Classic, Warner Classics, Denon Essentials and many more. The breadth of music is continuing to expand at a phenomenal pace. + +Spotify does not officially support Linux at the moment. However, they have developed a preview build of Spotify for Linux, which works well. As its a preview release, this version is still unsupported. + +Spotify is available in Andorra, Argentina, Australia, Austria, Belgium, Bulgaria, Colombia, Cyprus, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Iceland, Ireland, Italy, Latvia, Liechtenstein, Lithuania, Luxembourg, Malaysia, Malta, Mexico, Monaco, Netherlands, New Zealand, Norway, the Philippines, Poland, Portugal, Spain, Singapore, Sweden, Switzerland, Taiwan, Turkey, the United Kingdom, the United States, Uruguay, and a few others. + +**Features include:** + +- A well designed interface makes navigation effortless +- Create and edit playlists +- Discover new music +- Share music and playlists +- Radio feature +- Top Lists +- Additional functionality with large variety of apps + +- Website: [www.spotify.com/uk/download/previews][1] +- Developer: Spotify +- License: Proprietary +- Version Number: Preview + +---------- + +![Pithos](http://www.linuxlinks.com/portal/content2/png/Pithos.png) + +![Pithos in action](http://www.linuxlinks.com/portal/content/reviews/Audio/Screenshot-Pithos-streaming.png) + +Pithos is an open source native Pandora Radio client for Linux. It offers a lightweight alternative to the official Pandora.com web client. The graphical user interface integrates with desktop features such as media keys, notifications, and the sound menu. + +The Pandora music service is only intended to be used by US IP addresses. However, users located outside the US can use Pandora with a VPN. + +**Features include: ** + +- Play / Pause / Next Song +- Switching stations +- Remembers your user name and password +- Bookmarking of songs and artists +- Cover Art +- Thumbs Up / Thumbs Down / Tired of this song +- Notification popup with song info +- Launching pandora.com song info page and station page +- Reconnecting when pandora session times out +- Editing QuickMix +- Creating stations +- Media Key support +- Proxy support +- Last.fm scrobbling support +- Volume control +- Plugins including Screensaver pause +- Two DBUS APIs: MPRIS and Pithos + +- Website: [pithos.github.io][2] +- Developer: Kevin Mehall +- License: GNU GPL v3 +- Version Number: 1.0.0 + +---------- + +![Clementine](http://www.linuxlinks.com/portal/content2/png/Clementine.png) + +![Clementine in action](http://www.linuxlinks.com/portal/content/reviews/Audio/Screenshot-Clementine-Streaming.png) + +Clementine is a cross-platform, lightweight, modern music player and library organiser based on Amarok. Clementine focuses on a fast and easy-to-use interface for searching and playing your music. + +It is inspired by Amarok 1.4, focusing on a fast and easy-to-use interface for searching and playing your music. + +Features include: + +- Search and play your local music library +- Listen to internet radio from Last.fm and SomaFM +- Tabbed playlists, import and export M3U, XSPF, PLS and ASX +- Create smart playlists and dynamic playlists +- Load M3U and XSPF playlists +- Undo and redo in the playlist +- Edit tags on MP3 and OGG files, organise your music +- Download missing album cover art from Last.fm +- Podcast support with integration with gpodder.net +- Graphical equalizer +- Cross-platform works on Windows, Mac OS X and Linux +- Native desktop notifications on Linux (libnotify) and Mac OS X (Growl) +- Fetch missing tags from MusicBrainz +- Attractive on screen display +- Queue manager +- Supports MPRIS on Linux, or remote control using the command-line +- Supports indexing and playing music from Google Drive +- Support for Soundcloud +- Support for jazzradio.com +- Support for Moodbar +- Visualizations from projectM +- Copy music to your iPod, iPhone, MTP or mass-storage USB player +- Remote control +- Transcode music into MP3, Ogg Vorbis, Ogg Speex, FLAC or AAC + +- Website: [www.clementine-player.org][3] +- Developer: David Sansome, John Maguire +- License: GNU GPL v3 +- Version Number: 1.2 + +---------- + +![Nuvola Player](http://www.linuxlinks.com/portal/content2/png/NuvolaPlayer.png) + +![Nuvola Player in action](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-NuvolaPlayer-Streaming.png) + +Nuvola Player is a free and open source project that offers cloud music integration for your desktop (system tray, Ubuntu sound menu, dock menu and notifications). + +To use all of the streaming services, you need Flash and HTML5 audio support. Some web-based streaming services can utilize HTML5 Audio technology for music playback instead of the Flash plugin. Nuvola Player requires GStreamer with MP3 decoder plugin to provide HTML5 Audio support. + +**Supported Services:** + +- Amazon Cloud Player integrated with the MP3 store and allows users to store their music on Amazon Cloud Drive, and play that music from any supported web browsers +- Bandcamp an online music store, as well as a platform for artist promotion, that caters mainly to independent artists +- Deezer a French web-based music streaming service. It allows users to listen to music on various devices online or offline. It currently has 18 million licensed tracks, over 30,000 radio channels and 22 million users (1.5 million subscribers) +- 8tracks a website that fuses elements of internet radio and social networking revolving around the concept of streaming user-curated playlists consisting of at least 8 tracks +- Google Play Music a digital content service from Google which includes an online store for music, movies, books, and Android apps and games, as well as a cloud media player that supports uploading a user's own music and buying music at Google Play Store +- Grooveshark an international online music search engine, music streaming service and music recommendation web software application, allowing users to search for, stream, and upload music that can be played immediately or added to a playlist +- Grooveshark Mobile the HTML5-based mobile version of Grooveshark which does not require Flash +- Hype Machine an amalgamation of Pandora Radio and Pitchfork Media. It aggregates the most recently posted songs from a selection of music blogs (about 1,500) and lists them on the website's main page +- Jango a free online music streaming service that allows users to create and share custom radio stations +- Logitech Media Server the open source media server for Logitech Squeezebox devices. It supports plug-ins and multiple only services like Deezer or Spotify +- Pandora an automated music recommendation service and "custodian" of the Music Genome Project available only in the United States +- Rdio an ad-free music subscription service +- Spotify a commercial music streaming service providing digital rights management-restricted content from record labels +- This is My Jam a place to put your favorite song of the moment & hear great music, handpicked every day by friends + +**Features include:** + +- Multimedia keys +- Shows desktop notifications +- Integrates with various sound menus, applets and launchers and more +- Last FM and Libre FM scrobbling +- Lyrics fetching +- Support for Amazon Music Prime streaming + +- Website: [tiliado.eu/nuvolaplayer][4] +- Developer: Jiří Janoušek and service maintainers +- License: 2-Clause BSD license +- Version Number: 2.4.3 + +---------- + +![Atraci](http://www.linuxlinks.com/portal/content2/png/Atraci-2.png) + +![Atraci in action](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Atraci.png) + +Atraci is a multi-platform open source streaming application that lets users listen to more than 60 million songs. It is still in an early stage of development, so the application is not the most feature laden. + +Atraci use iTunes, Last.fm and SoundCloud to display song information - cover, title, artist. Atraci searches the best match for this song on YouTube and streams the highest quality video stream. + +**Features include: ** + +- No advertisements, no sign up required +- Intuitive user interface +- Smart matching search for any song, artist name or album. Atraci checks it against online listings to show correct title, album artwork, track lists and so on, with listed options being the highest quality video streams +- Album and artist autosuggestions +- Sort results by 'default', 'artist' or ‘track’ +- View results in 'grid' or 'list' layouts +- Accompanying video can be made full screen +- Create playlists with shuffle and repeat options +- In-app volume slider, track scrubber and album artwork +- History of recently played tracks + +- Website: [atraci.github.io/Atraci-website][5] +- Developer: The Atraci Team +- License: The MIT License +- Version Number: 0.7.0 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20141116052055674/MusicStreaming.html + +作者:Frazer Kline +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://www.spotify.com/uk/download/previews/ +[2]:http://pithos.github.io/ +[3]:https://www.clementine-player.org/ +[4]:https://tiliado.eu/nuvolaplayer/ +[5]:http://atraci.github.io/Atraci-website/ \ No newline at end of file From 5ee99b55b407b09bd9a929eeb00ba9155d63fc13 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 27 Nov 2014 17:00:52 +0800 Subject: [PATCH 306/316] =?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 --- ...Try These 4 Beautiful Linux Icon Themes.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/translated/talk/20140910 Drab Desktop Try These 4 Beautiful Linux Icon Themes.md b/translated/talk/20140910 Drab Desktop Try These 4 Beautiful Linux Icon Themes.md index 39b62717bc..8bf674367a 100644 --- a/translated/talk/20140910 Drab Desktop Try These 4 Beautiful Linux Icon Themes.md +++ b/translated/talk/20140910 Drab Desktop Try These 4 Beautiful Linux Icon Themes.md @@ -1,8 +1,8 @@ 桌面看腻了?试试这 4 款漂亮的 Linux 图标主题吧 ================================================================================ -**Ubuntu 的默认图标主题在 5 年内[并未发生太大的变化][1],那些说“[图标早就彻底更新过了][2]”的你过来,我保证不打你。如果你确实想尝试一些新鲜的东西,我们将向你展示一些惊艳的替代品,它们会让你感到眼前一亮。** +**Ubuntu 的默认图标主题在 5 年内[并未发生太大的变化][1],除了[一些古怪的新图标][2]。如果你确实想尝试一些新鲜的东西,我们将向你展示一些惊艳的替代品,它们会让你感到眼前一亮。** -如果还是感到不太满意,你可以在文末的评论里留下你比较中意的图标主题的链接地址。 +希望您可以在文末的评论里留下您比较中意的图标主题的链接地址。 ### Captiva ### @@ -10,9 +10,9 @@ Captiva 图标 + elementary 文件夹图标 + Moka GTK -Captiva 是一款相对较新的图标主题,即使那些有华丽图标倾向的用户也会接受它。 +Captiva 是一款相对较新的图标主题,即使是那些喜欢华丽图标的用户也会接受它。 -Captiva 由 DeviantArt 的用户 ~[bokehlicia][3] 制作,它并未使用现在非常流行的平面扁平风格,而是采用了一种圆润、柔和的外观。图标本身呈现出一种很有质感的材质外观,同时通过微调的阴影和亮丽的颜色提高了自身的格调。 +Captiva 由 DeviantArt 的用户 ~[bokehlicia][3] 制作,它并未使用现在非常流行的2D扁平化风格,而是采用了一种柔和圆滑的外观。图标本身呈现出一种很有质感的材质外观,同时通过微调的阴影和亮丽的颜色提高了自身的格调。 不过 Captiva 图标主题并未包含文件夹图标在内,因此它将使用 elementary(如果可以的话)或者普通的 Ubuntu 文件夹图标。 @@ -24,29 +24,29 @@ Captiva 由 DeviantArt 的用户 ~[bokehlicia][3] 制作,它并未使用现在 或者,如果你不擅长通过软件源安装的话,你也可以直接从 DeviantArt 的主页上下载图标压缩包。把解压过的文件夹挪到家目录的‘.icons’目录下,即可完成安装。 -不过在你完成安装后,你必须得通过像 [Unity Tweak Tool][4] 这样的工具来把你安装的图标主题(本文列出的其他图标主题也要这样)应用到系统上。 +无论你选择哪种方式来安装,你必须得通过像 [Unity Tweak Tool][4] 这样的工具来把你安装的图标主题(本文列出的其他图标主题也要这样)应用到系统上。 - [DeviantArt 上的 Captiva 图标主题][5] ### Square Beam ### -![Square Beam 图标在 Orchis GTK 主题下](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/squarebeam.jpg) +![Orchis GTK 主题下的 Square Beam 图标](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/squarebeam.jpg) -Square Beam 图标在 Orchis GTK 主题下 +Orchis GTK 主题下的 Square Beam 图标 -厌倦有棱角的图标了?尝试下 Square Beam 吧。Square Beam 因为其艳丽的色泽、尖锐的坡度变化和鲜明的图标形象,比本文列出的其他图标具有更加宏大的视觉效果。Square Beam 声称自己有超过 30,000 个(抱歉,我没有仔细数过...)的不同图标(!),因此你很难找到它没有考虑到的地方。 +厌倦有棱角的图标了?尝试下 Square Beam 吧。Square Beam 因为其艳丽的色泽、尖锐的坡度变化和鲜明的图标形象,比本文列出的其他图标具有更加宏大的视觉效果。Square Beam 声称自己有超过 30,000 个(抱歉,我没有仔细数过...)不同的图标(!),因此你很难找到它没有涉及到的地方。 - [GNOME-Look.org 上的 Square Beam 图标主题][6] ### Moka & Faba ### -![Moka/Faba Mono 图标在 Orchis GTK 主题下](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/moka-faba.jpg) +![在 Orchis GTK 主题下的 Moka/Faba Mono 图标](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/moka-faba.jpg) -Moka/Faba Mono 图标在 Orchis GTK 主题下 +在 Orchis GTK 主题下的 Moka/Faba Mono 图标 -这里得稍微介绍下 Moka 图标集。事实上,我敢打赌阅读此文的绝大部分用户正在使用这款图标。 +这里得稍微介绍下 Moka 图标集。事实上,我敢打赌阅读此文的大部分用户正在使用这款图标。 -柔和的颜色、平滑的边缘以及简洁的图标艺术设计,Moka 是一款真正出色的覆盖全面的应用图标。它的兄弟 Faba 将这些特点展现得淋漓尽致,而 Moka 也将延续这些 —— 涵盖所有的系统图标、文件夹图标、面板图标,等等。 +淡柔的颜色、平滑的边缘以及简洁的图标艺术设计,Moka 是一款真正出色又覆盖全面的应用图标。它的兄弟 Faba 将这些特点展现得淋漓尽致,而 Moka 也将延续这些 —— 涵盖所有的系统图标、文件夹图标、面板图标,等等。这个组合的结果是...吸引你的眼球! 欲知 Ubuntu 上的安装详情、访问项目官方网站?请点击下面的链接。 @@ -74,7 +74,7 @@ via: http://www.omgubuntu.co.uk/2014/09/4-gorgeous-linux-icon-themes-download 作者:[Joey-Elijah Sneddon][a] 译者:[SteveArcher](https://github.com/SteveArcher) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -86,4 +86,4 @@ via: http://www.omgubuntu.co.uk/2014/09/4-gorgeous-linux-icon-themes-download [5]:http://bokehlicia.deviantart.com/art/Captiva-Icon-Theme-479302805 [6]:http://gnome-look.org/content/show.php/Square-Beam?content=165094 [7]:http://mokaproject.com/moka-icon-theme/download/ubuntu/ -[8]:http://gnome-look.org/content/show.php/Compass?content=160629 \ No newline at end of file +[8]:http://gnome-look.org/content/show.php/Compass?content=160629 From 454f2c7c54dbd751cb012a23f6b820428bdb965b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 27 Nov 2014 17:02:20 +0800 Subject: [PATCH 307/316] =?UTF-8?q?20141127-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...iboot USB From Ubuntu Using MultiSystem.md | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 sources/tech/20141127 How To Create A Multiboot USB From Ubuntu Using MultiSystem.md diff --git a/sources/tech/20141127 How To Create A Multiboot USB From Ubuntu Using MultiSystem.md b/sources/tech/20141127 How To Create A Multiboot USB From Ubuntu Using MultiSystem.md new file mode 100644 index 0000000000..f89014cd07 --- /dev/null +++ b/sources/tech/20141127 How To Create A Multiboot USB From Ubuntu Using MultiSystem.md @@ -0,0 +1,103 @@ +How To Create A Multiboot USB From Ubuntu Using MultiSystem +================================================================================ +### Introduction ### + +For those who don’t know, **MultiSystem** is a small, Open Source freeware to create a multiboot usb drives from Linux systems. Using this utility, we can create any number of bootable Linux distributions in a USB drive. All you need is an Internet connection(at the time of MultiSystem installation only), and a sufficient size of a USB drive depending upon the number of distributions you want to include in that USB drive. + +### Install MultiSystem On Ubuntu 14.10/14.04 ### + +#### Manual Installation: #### + +[Download MultiSystem][1] script, and extract it anywhere of your choice. Go to the extracted location, and run the script as shown below. + + sudo ./install-depot-multisystem.sh + +#### Installation Using PPA: #### + +Alternatively, you can install MultiSystem more easily using PPA as shown below. + + sudo apt-add-repository 'deb http://liveusb.info/multisystem/depot all main' + wget -q -O - http://liveusb.info/multisystem/depot/multisystem.asc | sudo apt-key add - + sudo apt-get update + sudo apt-get install multisystem + +After installation, It will automatically open. Just click Close button to exit. + +### Post Installation ### + +Once installed, plug-in your USB key, and launch MultiSystem either from Unity Dash or Menu. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Menu_0012.png) + +At first time, the MultiSystem interface will look like below. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/MultiSystem_002.png) + +Select the USB drive, and click **Confirm** button. You may get the following error dialog box. Don’t worry, It says our USB drive has no label. Click Ok to set label by MultiSystem itself. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Error_003.png) + +Then, unplug/replug the USB key, and launch MultiSystem again. Select the USB key, and click Confirm again. Now, you’ll be asked to confirm Grub2 installation in your USB key. Click Ok to continue. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/gtkdialog_004.png) + +Finally, you’ll be pleased with MultiSystem interface. Now’ it’s time to create multiboot usb key. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/MultiSystem_005.png) + +### Usage ### + +MultiSystem is very simple to use. Drag the ISO of your choice into the MultiSystem window. If it doesn’t work, click on the **cd icon** on the bottom and select the ISO’s. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/MultiSystem_006.png) + +Now, MultiSystem will copy the files from the ISO, and make the USB key as bootable. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/MultiSystem_007.png) + +Likewise, you can add as many distributions as you want in your USB key. In my case, I have added two Linux distributions: CentOS 6.5 and Android. + +After adding all ISO’s, you will now see the list of bootable distributions in the MultiSystem main window. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/MultiSystem_008.png) + +That’s it. Our multiboot USB key is ready to use. Reboot your system, and set the first boot device as USB in your Bios. Select the distribution you want to install, and start installing the OS from the multiboot USB key. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/QEMU_009.png) + +Additionally, MultiSystem includes some extra options such as: + +- Grub Settings; +- Grub & Burg bootloaders Update; +- Download Live Cds; +- VirtualBox installation; +- Format USB key; +- and many. + +To view the list of additional options, navigate to the **Menus** tab of the MultiSystem. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/MultiSystem_010.png) + +Also, you can test the multiboot USB key within your Ubuntu desktop itself using QEMU or Oracle VirtualBox. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/MultiSystem_011.png) + +MultiSystem tool is one of the best and useful tool ever I have tested. This tool will definitely useful for those who wants to install multiple different operating systems on their systems. You don’t have to carry your CD/DVD pouch wherever you go. Just buy a 16GB 0r 32GB USB, and dumb all Operating systems you want to install in it. and install OS like a boss. + +And, the good news for Windows OS users is it supports some Windows os too. I tested Windows 7, and it’s working! + +Enjoy! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/create-multiboot-usb-ubuntu-using-multisystem/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:http://liveusb.info/multisystem/install-depot-multisystem.sh.tar.bz2 +[2]:http://liveusb.info/dotclear/ \ No newline at end of file From 85f53161391d52f1bd49b81a1f183536398f3979 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 27 Nov 2014 19:06:39 +0800 Subject: [PATCH 308/316] =?UTF-8?q?20141127-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...plicate Files Instantly From Hard Drive.md | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 sources/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md diff --git a/sources/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md b/sources/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md new file mode 100644 index 0000000000..d81a33de40 --- /dev/null +++ b/sources/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md @@ -0,0 +1,98 @@ +dupeGuru – Find And Remove Duplicate Files Instantly From Hard Drive +================================================================================ +### Introduction ### + +Disk full is one of the big trouble for us. No matter how we’re careful, sometimes we might copy the same file to multiple locations, or download the same file twice unknowingly. Therefore, sooner or later we will end up with disk full error message, which is worst when we really need some space to store important data. If you believe your system has multiple duplicate files, then **dupeGuru** might help you. + +dupeGuru team have also developed applications called **dupeGuru Music Edition** to remove duplicate music files, and **dupeGuru Picture Edition** to remove duplicate pictures. + +### 1. dupeGuru (Standard Edition) ### + +For those who don’t know about [dupeGuru][1], It is a free, open source, cross-platform application that can used to find and remove the duplicate files in your system. It will run under Linux, Windows, and Mac OS X platforms. It uses a quick fuzzy matching algorithm to find the duplicate files in minutes. Also, you can tweak dupeGuru to find exactly what kind of duplicate files you want to, and eliminate what kind of files from deletion. It supports English, French, German, Chinese (Simplified), Czech, Italian, Armenian, Russian, Ukrainian, Brazilian, and Vietnamese. + +#### Install dupeGuru On Ubuntu 14.10/14.04/13.10/13.04/12.04 #### + +dupeGuru developers have created a Ubuntu PPA to ease the installation. To install dupeGuru, enter the following commands one by one in your Terminal. + + sudo apt-add-repository ppa:hsoft/ppa + sudo apt-get update + sudo apt-get install dupeguru-se + +#### Usage #### + +Usage is very simple. Launch dupeGuru either from Unity Dash or Menu. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru_007.png) + +Click + button on the bottom, and add the folder you want to scan. Click Scan button to start finding the duplicate files. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru_008.png) + +If the selected folder contains any duplicate files, it will display them. As you in the below screen shot, I have a duplicate file in the Downloads directory. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Results_009.png) + +Now, you can decide what to do. You can either delete the duplicate file, or rename it, or copy/move it to another location. To do that select the duplicate files, or check the box that says “**Dupes only**” on the Menu bar. If you selected the Dupes only option, the duplicates files will only visible. So you can select and delete them easily. Click on the **Actions** drop-down box. Finally, select the action you want to perform. Here, I just want to delete the duplicate file, so I selected the option: **Send marked to Recycle bin**. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Menu_010.png) + +Then, click **Proceed** to delete the duplicate files. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Deletion-Options_011.png) + +### 2. dupeGuru Music Edition ### + +[dupeGuru Music Edition][2] or dupeGuru ME in short, is just like dupeGuru. It does everything dupeGuru does, but it has more information columns (such as bitrate, duration, tags, etc..) and more scan types (filename with fields, tags and audio content). Like dupeGuru, dupeGuru ME also runs on Linux, Windows, and Mac OS X. + +It supports variety of formats such as MP3, WMA, AAC (iTunes format), OGG, FLAC, loss-less AAC and loss-less WMA etc, + +#### Install dupeGuru ME On Ubuntu 14.10/14.04/13.10/13.04/12.04 #### + +Now, we don’t have to add any PPA, because already the added in the previous steps. So, enter the following command to install from your Terminal. + + sudo apt-get install dupeguru-me + +#### Usage #### + +Launch it either from Unity dash or Menu. The usage, interface, and look of dupeGuru ME is similar to normal dupeGuru. Add the folder you to scan and select the action you want to perform. The duplicate music files will be deleted. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Music-Edition-Results_012.png) + +### 3. dupeGuru Picture Edition ### + +[dupeGuru Picture Edition][3], or duepGuru PE in short, is a tool to find duplicate pictures on your computer. It is as like as dupeGuru, but is specialized for duplicate pictures matching. dupeGuru PE runs on Linux, Windows, and Mac OS X. + +dupeGuru PE supports JPG, PNG, TIFF, GIF and BMP formats. All these formats can be compared together. The Mac OS X version of dupeGuru PE also supports PSD and RAW (CR2 and NEF) formats. + +#### Install dupeGuru PE On Ubuntu 14.10/14.04/13.10/13.04/12.04 #### + +As we have already added the PPA, We don’t need to add PPA for dupeGuru either. Just, run the following command to install it. + + sudo apt-get install dupeguru-pe + +#### Usage #### + +It’s also look like dupeGuru, and dupeGuru ME in terms of usage, interface, and look.I wonder why the developer have created there separate versions for each category. It would be better, a single application has all of the above three features combined. + +Launch it, add the folder you want to scan, and select the action you want to perform. That’s it. you duplicated files will be gone. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Picture-Edition-Results_014.png) + +If you can’t remove them in case of any security problems, note down the location of the files, and manually delete them either from Terminal or File manager. + +Cheers! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/dupeguru-find-remove-duplicate-files-instantly-hard-drive/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:http://www.hardcoded.net/dupeguru/ +[2]:http://www.hardcoded.net/dupeguru_me/ +[3]:http://www.hardcoded.net/dupeguru_pe/ \ No newline at end of file From 4e82237a0bfbc8a3e97cc533d1afb8c666d0e700 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Thu, 27 Nov 2014 19:17:27 +0800 Subject: [PATCH 309/316] translating --- sources/tech/20141127 How to install Docker on CentOS 7.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20141127 How to install Docker on CentOS 7.md b/sources/tech/20141127 How to install Docker on CentOS 7.md index d39a3ca5d8..134ad89a46 100644 --- a/sources/tech/20141127 How to install Docker on CentOS 7.md +++ b/sources/tech/20141127 How to install Docker on CentOS 7.md @@ -1,3 +1,4 @@ +[translating by KayGuoWhu] How to install Docker on CentOS 7 ================================================================================ Docker is an open-source tool that makes creating & managing **Linux containers(LXC)** easy. Containers are like lightweight VMs which can be started & stopped in milliseconds. Dockers help the system admin & coders to develop their application in a container and can further scale up to 1000 of nodes. From 3b056857e3945ec823d58e45b27421f5f4e1116c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 27 Nov 2014 19:20:59 +0800 Subject: [PATCH 310/316] =?UTF-8?q?20141127-6=20=E9=80=89=E9=A2=98=20?= =?UTF-8?q?=E5=B8=A6=E4=B8=80=E6=9C=B5=E4=BA=91=E5=8E=BB=E8=BF=9C=E8=A1=8C?= =?UTF-8?q?a598799539=20=E6=8E=A8=E8=8D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20141127 What Makes a Good Programmer.md | 62 +++++++ .../20141127 Some Sentences about Java.md | 163 ++++++++++++++++++ 2 files changed, 225 insertions(+) create mode 100644 sources/talk/20141127 What Makes a Good Programmer.md create mode 100644 sources/tech/20141127 Some Sentences about Java.md diff --git a/sources/talk/20141127 What Makes a Good Programmer.md b/sources/talk/20141127 What Makes a Good Programmer.md new file mode 100644 index 0000000000..02ed16dfab --- /dev/null +++ b/sources/talk/20141127 What Makes a Good Programmer.md @@ -0,0 +1,62 @@ +What Makes a Good Programmer? +================================================================================ +What makes a good programmer? It’s an interesting question to ask yourself. It makes you reflect on the craft of software development. It is also a good question to ask your colleagues. It can trigger some interesting discussions on how you work together. Here are five skills I think are crucial to have in order to be a good programmer. + +### 1. Problem Decomposition ### + +Programming is about solving problems. But before you write any code, you need to be clear on how to solve the problem. One skill good programmers have is the ability to break the problem down in smaller and smaller parts, until each part can be easily solved. But it is not enough simply to find a way to solve the problem. A good programmer finds a way to model the problem in such a way that the resulting program is easy to reason about, easy to implement and easy to test. + +Some of the most complicated programs I have worked on were complicated in part because the implementation did not fit the problem very well. This led to code that was hard to understand. When the problem is well modeled, I agree with Bernie Cosell (interviewed in the excellent [Coders at Work][1]): + +> “…there are very few inherently hard programs. If you are looking at a piece of code and it looks very hard – if you can’t understand what this thing is supposed to be doing – that’s almost always an indication that it was poorly thought through. At that point you don’t roll up your sleeves and try to fix the code; you take a step back and think it through again. When you’ve thought it through enough, you’ll find out that it’s easy“. + +### 2. Scenario Analysis ### + +Good developers have the ability to consider many different scenarios for the program. This applies both to the logic in the program, and to the internal and external events that can occur. To consider the different paths in the logic, they ask questions like: What happens if this argument is null? What if none of these conditions are true? Is this method thread-safe? To discover what types of events the software needs to handle, they will ask questions like: What if this queue becomes full? What if there is no response to this request? What if the other server restarts while this server is restarting? + +The good programmers ask themselves: How can this break? In other words, they have the ability to think like testers. In contrast, inexperienced programmers mostly only consider the “happy path” – the normal flow of control when everything goes as expected (which it does most of the time). But of course, the unexpected inevitably happens, and the program needs to be able to cope with that. + +### 3. Naming ### + +Programming consists to a large degree of naming things: classes, methods and variables. When done well, the program becomes largely self-documenting, meaning that the function of the program is quite clear just from reading the source code. One effect of self-documenting code is that it naturally leads to many smaller methods, rather than a few large ones, simply because then you have more places to put meaningful names (there are [other reasons][2] why many small methods are good too). + +Coming up with good names is much harder than it sounds. I like this quote (from Phil Karlton): “There are only two hard things in Computer Science: cache invalidation and naming things.” Partly naming is hard because it needs to be clear in your mind what each name represents. Sometimes that is not immediately clear, but only becomes apparent as the development proceeds. Therefore, renaming is just as important as naming. + +Naming things well also includes coming up with concepts to be used, and what these concepts should be called. By having well-thought out, distinctly named concepts that are used consistently (in the program, and when discussing the domain with programmers and non-programmers), writing the program becomes much easier. + +### 4. Consistency ### + +Perhaps the biggest challenge in programming is managing complexity. Consistency is one way to combat complexity. It reduces some of the complexity by allowing us to see patterns and infer how things are named, used and handled. With consistency, we don’t need to use brain power to remember exceptions and random variations. Instead we can concentrate on [essential complexity, not accidental complexity][3]. + +Consistency is important across the board. It applies to variable names and grouping, method naming, the division into modules, the directory structure, the GUI, error handling, logging, documentation etc. For example, if some variables are related and appear together (in declarations, method calls or as columns in the database) then always use them in the same order. Then it becomes easier to see if one is missing, or if they have been mixed up. For an operation, if it is called delete in one place, don’t call it remove in another place – stick with the same name. Steve McConnell also has some good advice on using opposites precisely in [Code Complete][4]. For example, begin/end are opposites, as are start/stop. Don’t mix names from different pairs (for example using begin/stop) when dealing with opposites. + +Inconsistencies can get introduced when modifying a program. Sloppy programmers don’t pay attention to if what they add is consistent with the existing code or not. Good programmers are relentless in ensuring that seemingly small details are just right. They know how important consistency is in the overall fight against complexity. + +### 5. Learning ### + +As a software developer, you are constantly learning. Before adding a new feature, you have to understand what it is supposed to do. Before adding code to an existing program, you usually have to learn what the existing code does, in order fit the new functionality in properly. You also have to learn about the surrounding systems, in order to interface with them correctly. The ability to learn fast therefore makes you a much more effective developer. + +Furthermore, because the pace of development in the software engineering field is so high, there is a steady stream of new languages, tools, techniques and frameworks to learn about. You can view this as good or bad. Fred Brooks lists learning as [one of the joys of the craft][5], and I agree. Learning new things is satisfying in itself. It also means that life as a developer never is boring. + +### Conclusion ### + +All of the above skills are generic – none of them are specific to any one language, framework or technology. If you have them, you can quickly learn a new language or tool, and write good software in that environment. Furthermore, because they are general in nature, they will not become obsolete in a couple of years. + +These are my answers for what makes a good programmer. What do you think makes a good programmer? Let me know in the comments. + +-------------------------------------------------------------------------------- + +via: http://henrikwarne.com/2014/06/30/what-makes-a-good-programmer/ + +作者:[Henrik Warne][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://henrikwarne.com/about/ +[1]:http://www.amazon.com/review/R2OV0TG7MJGXGL +[2]:http://henrikwarne.com/2013/08/31/7-ways-more-methods-can-improve-your-program/ +[3]:http://faculty.salisbury.edu/~xswang/Research/Papers/SERelated/no-silver-bullet.pdf +[4]:http://www.amazon.com/review/R269BBARXH1V6R/ +[5]:http://henrikwarne.com/2012/06/02/why-i-love-coding/ \ No newline at end of file diff --git a/sources/tech/20141127 Some Sentences about Java.md b/sources/tech/20141127 Some Sentences about Java.md new file mode 100644 index 0000000000..e5874371b9 --- /dev/null +++ b/sources/tech/20141127 Some Sentences about Java.md @@ -0,0 +1,163 @@ +Some Sentences about Java +================================================================================ +There is nothing new in this article. I just collected some trivial statements which may not be trivial for some of the junior programmers programmers. Boring old stuff. + +If you happen all of these things you know more about Java than the average house wife. I do not know if there is point to know all of these. You can be a fairly good Java programmer if you do not know some of these features. However a lot of new information in this article probably indicates you have room to develop. + +### There are 4 different protection types ### + +in Java (not three). These are `private`, package private, `protected` and `public`. If you do not specify any protection modifier when you define an element in a class it will be package private (and not public and not protected). + +![There are four levels of protection in Java.](http://a3ab771892fd198a96736e50.javacodegeeks.netdna-cdn.com/wp-content/uploads/2014/11/four-levels-of-protection.png) + +There are four levels of protection in Java. + +On the other hand if you do not specify protection modifier in front of a method declaration in an interface: it will be public. You may specify it to be explicitly public but it does not have effect on Java and SONAR will not like you doing so. + +![Protection is Transitive](http://a3ab771892fd198a96736e50.javacodegeeks.netdna-cdn.com/wp-content/uploads/2014/11/protection-is-transitive.png) + +Protection is Transitive + +> My opinion about Java allowing you to optionally write `public` in front of a method in an interface is that this is a technology mistake. + +Similarly you can write `final` in front of a field in an interface, or even `static`. It may imply that they could be non-static or non-final: not true. Fields of an interface are final and static. Always. + +### Protected and package private are not the same ### + +Package private (or default) protection will let other classes of the same package access to the method or field. Protected methods and fields can be used from classes in the same package (so far the same as package private) and in addition to that it can be used from other classes that extend the class containing the protected field or method. + +### Protected is transitive ### + +If there are three packages `a`, `b` and `c`, each containing a class named `A`, `B` and `C` so that `B` extends `A` and `C` extends `B` then the class `C` can access the protected fields and methods of `A`. + + package a; + + public class A { + protected void a() { + + } + } + package b; + + import a.A; + + public class B extends A { + protected void b() { + a(); + } + } + package c; + + import b.B; + + public class C extends B { + protected void c() { + a(); + } + } + +### Interface can not define protected methods ### + +Many thinks that you can also define `protected` methods in an interface. When programming the compiler makes it obvious fast and brutally: you can not. Btw: this is why I think that allowing the `public` keyword in an interface is a technology mistake: it makes people think that it could also be something else as well. + +![Private is the new public](http://a3ab771892fd198a96736e50.javacodegeeks.netdna-cdn.com/wp-content/uploads/2014/11/private-is-the-new-public.png) + +Private is the new public + +If you want to declare a `protected` method in an interface, you probably did not understand encapsulation. + +### Private is not that private ### + +Private variables and methods are visible inside the compilation unit. If that sounds too cryptic: in the same Java file (almost). This is a bit more than “in the class where they are defined”. They can also be seen from classes and interfaces that are in the same compilation unit. Inner and nested classes can see private fields and methods of the class enclosing them. However enclosing classes can also see the private methods and fields of the classes they enclose down to any depth. + + package a; + + class Private { + private class PrivateInPrivate { + private Object object; + } + + Object m() { + return new PrivateInPrivate().object; + } + } + +This latter is not widely known. As a matter of fact it is rarely useful. + +### Private is class level not object ### + +If you can access a variable or method you can access it no matter which object it belongs to. If `this.a` is accessible then `another.a` is also accessible assumed that `another` is an instance of the same class. Objects that are instances of the same class can fool around with each others variables or methods. Rarely makes sense to have such a code though. A real life exception is `equals()` (as generated by Eclipse, lines 15 and 18): + + package a; + + public class PrivateIsClass { + private Object object; + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + PrivateIsClass other = (PrivateIsClass) obj; + if (object == null) { + if (other.object != null) + return false; + } else if (!object.equals(other.object)) + return false; + return true; + } + } + +### Static classes may have many instances ### + +![Protection is not object level. It is class level.](http://a3ab771892fd198a96736e50.javacodegeeks.netdna-cdn.com/wp-content/uploads/2014/11/protection-is-class-feature.png) + +Protection is not object level. It is class level. + +Classes that are not supposed to have any instances are usually called utility classes. They contain only static fields and static methods and the only constructor is private, not invoked from any of the static methods of the class. In Java 8 you can have such a beasts implemented in interfaces, since Java 8 interfaces can have static methods in it. I am not convinced that we should use that feature instead of utility classes. I am not absolutely convinced that we should use utility classes at all. + +Static classes are always inside in another class (or interface). They are nested classes. They are static and just as static methods can not access instance methods and fields of the class similarly a static nested class can not access the instance methods and fields of the embedding class. That is because nested classes do not have a reference (pointer if you like) to an instance of the embedding class. Inner classes, as opposed to nested classes are non static and can not be created without an instance of the embedding class. Each instance of an inner class has a reference to exactly one instance of the embedding class and thus an inner class can access instance methods and fields of the embedding class. + +Because of this you can not create an inner class without an instance of the surrounding class. You need not specify it though if this is the current object, a.k.a `this`. In that case you can write `new`, which is, in this case, just a short form for `this.new`. In a static environment, for example from a static method you have to specify which instance of the enclosing class should the inner class created with. See the line 10: + + package a; + + class Nesting { + static class Nested {} + class Inner {} + void method(){ + Inner inner = new Inner(); + } + static void staticMethod(){ + Inner inner = new Nesting().new Inner(); + } + } + +### Anonymous classes can access only final variables ### + +![Variable has to be effective final](http://a3ab771892fd198a96736e50.javacodegeeks.netdna-cdn.com/wp-content/uploads/2014/11/effective-final.png) + +Variable has to be effective final + +When an anonymous class is defined inside a method, it can access local variables if they are final. But saying that is vague. They have to be declared final and they also have to be effective final. This is what is released a bit in Java 8. You need not declare such variables as final but they still have to be effective final. + +![Java 8 does not require final, only effective final](http://a3ab771892fd198a96736e50.javacodegeeks.netdna-cdn.com/wp-content/uploads/2014/11/java_ee_-_javabeantester_src_main_java_com_javax0_jbt_blog_java_-_eclipse_-__users_verhasp_github_javax_blog.png) + +Java 8 does not require final, only effective final + +Why do you need to declare something final, when it has to checked to be like that anyway. Like method arguments. They also have to be final. You say that this is not a requirement of Java? Well, you are right. It is a requirement of programming in good style. + +-------------------------------------------------------------------------------- + +via: http://www.javacodegeeks.com/2014/11/some-sentences-about-java.html + +作者:[Peter Verhas][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.javacodegeeks.com/author/peter-verhas/ \ No newline at end of file From db7184f092ac3442614b4d40246e55571404b098 Mon Sep 17 00:00:00 2001 From: a598799539 Date: Thu, 27 Nov 2014 20:29:45 +0800 Subject: [PATCH 311/316] [Translating] Some Sentences about Java --- sources/tech/20141127 Some Sentences about Java.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141127 Some Sentences about Java.md b/sources/tech/20141127 Some Sentences about Java.md index e5874371b9..7b239b2216 100644 --- a/sources/tech/20141127 Some Sentences about Java.md +++ b/sources/tech/20141127 Some Sentences about Java.md @@ -1,3 +1,4 @@ +[a598799539 translating...] Some Sentences about Java ================================================================================ There is nothing new in this article. I just collected some trivial statements which may not be trivial for some of the junior programmers programmers. Boring old stuff. @@ -160,4 +161,4 @@ via: http://www.javacodegeeks.com/2014/11/some-sentences-about-java.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.javacodegeeks.com/author/peter-verhas/ \ No newline at end of file +[a]:http://www.javacodegeeks.com/author/peter-verhas/ From 5819b928297f5cec8ed715a70b57f511565417d1 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 27 Nov 2014 21:22:31 +0800 Subject: [PATCH 312/316] PUB:20140905 Linux TCP or IP networking--net-tools vs. iproute2 @KayGuoWhu --- ...r IP networking--net-tools vs. iproute2.md | 35 ++++++++++++++++--- 1 file changed, 30 insertions(+), 5 deletions(-) rename {translated/tech => published}/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md (92%) diff --git a/translated/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md b/published/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md similarity index 92% rename from translated/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md rename to published/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md index ae85d60919..8070ec36f8 100644 --- a/translated/tech/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md +++ b/published/20140905 Linux TCP or IP networking--net-tools vs. iproute2.md @@ -1,8 +1,9 @@ -Linux 中的TCP/IP网络配置:net-tools vs. iproute2 +iproute2 对决 net-tools ================================================================================ -如今很多系统管理员依然通过组合使用诸如ifconfig、route、arp和netstat等命令行工具(统称为net-tools)来配置网络功能,解决网络故障。net-tools起源于BSD的TCP/IP工具箱,后来成为老版本Linux内核中配置网络功能的工具。但自2001年起,Linux社区已经对其停止维护。同时,一些比如Arch Linux和CentOS/RHEL 7的Linux发行版则已经完全抛弃了net-tools,以支持iproute2。 -作为网络配置工具的一份子,iproute2的出现旨在在功能上取代net-tools。net-tools通过procfs(/proc)和ioctl系统调用去访问和改变内核网络配置,而iproute2则通过netlink套接字接口与内核通讯。抛开性能而言,iproute2的用户接口比net-tools显得更加直观。比如,各种网络资源(如link、IP地址、路由和隧道等)均使用合适的对象抽象去定义,使得用户可使用一致的语法去管理不同的对象。更重要的是,到目前为止,iproute2仍处在[持续开发][1]中。 +如今很多系统管理员依然通过组合使用诸如ifconfig、route、arp和netstat等命令行工具(统称为net-tools)来配置网络功能,解决网络故障。net-tools起源于BSD的TCP/IP工具箱,后来成为老版本Linux内核中配置网络功能的工具。**但自2001年起,Linux社区已经对其停止维护。**同时,一些Linux发行版比如Arch Linux和CentOS/RHEL 7则已经完全抛弃了net-tools,只支持iproute2。 + +作为网络配置工具的一份子,iproute2的出现旨在从功能上取代net-tools。net-tools通过procfs(/proc)和ioctl系统调用去访问和改变内核网络配置,而iproute2则通过netlink套接字接口与内核通讯。抛开性能而言,iproute2的用户接口比net-tools显得更加直观。比如,各种网络资源(如link、IP地址、路由和隧道等)均使用合适的对象抽象去定义,使得用户可使用一致的语法去管理不同的对象。更重要的是,到目前为止,iproute2仍处在[持续开发][1]中。 如果你仍在使用net-tools,而且尤其需要跟上新版Linux内核中的最新最重要的网络特性的话,那么是时候转到iproute2的阵营了。原因就在于使用iproute2可以做很多net-tools无法做到的事情。 @@ -27,10 +28,12 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2 使用这些命令来激活或停用某个指定的网络接口。 使用**net-tools**: + $ sudo ifconfig eth1 up $ sudo ifconfig eth1 down 使用**iproute2**: + $ sudo ip link set down eth1 $ sudo ip link set up eth1 @@ -39,9 +42,11 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2 使用这些命令配置网络接口的IPv4地址。 使用**net-tools**: + $ sudo ifconfig eth1 10.0.0.1/24 使用**iproute2**: + $ sudo ip addr add 10.0.0.1/24 dev eth1 值得注意的是,可以使用iproute2给同一个接口分配多个IP地址,ifconfig则无法这么做。使用ifconfig的变通方案是使用[IP别名][2]。 @@ -55,9 +60,11 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2 就IP地址的移除而言,除了给接口分配全0地址外,net-tools没有提供任何合适的方法来移除网络接口的IPv4地址。相反,iproute2则能很好地完全。 使用**net-tools**: + $ sudo ifconfig eth1 0 使用**iproute2**: + $ sudo ip addr del 10.0.0.1/24 dev eth1 ### 显示网络接口的IPv4地址 ### @@ -65,9 +72,11 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2 按照如下操作可查看某个指定网络接口的IPv4地址。 使用**net-tools**: + $ ifconfig eth1 使用**iproute2**: + $ ip addr show dev eth1 同样,如果接口分配了多个IP地址,iproute2会显示出所有地址,而net-tools只能显示一个IP地址。 @@ -79,21 +88,25 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2 使用这些命令为网络接口添加IPv6地址。net-tools和iproute2都允许用户为一个接口添加多个IPv6地址。 使用**net-tools**: + $ sudo ifconfig eth1 inet6 add 2002:0db5:0:f102::1/64 $ sudo ifconfig eth1 inet6 add 2003:0db5:0:f102::1/64 使用**iproute2**: + $ sudo ip -6 addr add 2002:0db5:0:f102::1/64 dev eth1 $ sudo ip -6 addr add 2003:0db5:0:f102::1/64 dev eth1 ### 显示网络接口的IPv6地址 ### -按照如下操作可显示某个指定网络接口的IPv6地。net-tools和iproute2都可以显示出所有已分配的IPv6地址。 +按照如下操作可显示某个指定网络接口的IPv6地址。net-tools和iproute2都可以显示出所有已分配的IPv6地址。 使用**net-tools**: + $ ifconfig eth1 使用**iproute2**: + $ ip -6 addr show dev eth1 ![](https://farm4.staticflickr.com/3906/15111848536_f6cb7ddb4f_z.jpg) @@ -103,9 +116,11 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2 使用这些命令可移除接口中不必要的IPv6地址。 使用**net-tools**: + $ sudo ifconfig eth1 inet6 del 2002:0db5:0:f102::1/64 使用**iproute2**: + $ sudo ip -6 addr del 2002:0db5:0:f102::1/64 dev eth1 ### 改变网络接口的MAC地址 ### @@ -113,9 +128,11 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2 使用下面的命令可[篡改网络接口的MAC地址][3],请注意在更改MAC地址前,需要停用接口。 使用**net-tools**: + $ sudo ifconfig eth1 hw ether 08:00:27:75:2a:66 使用**iproute2**: + $ sudo ip link set dev eth1 address 08:00:27:75:2a:67 ### 查看IP路由表 ### @@ -123,6 +140,7 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2 net-tools中有两个选择来显示内核的IP路由表:route和netstat。在iproute2中,使用命令ip route。 使用**net-tools**: + $ route -n ---------- @@ -140,10 +158,12 @@ net-tools中有两个选择来显示内核的IP路由表:route和netstat。在 这里的命令用来添加或修改内核IP路由表中的默认路由规则。请注意在net-tools中可通过添加新的默认路由、删除旧的默认路由来实现修改默认路由。在iproute2使用ip route命令来代替。 使用**net-tools**: + $ sudo route add default gw 192.168.1.2 eth0 $ sudo route del default gw 192.168.1.1 eth0 使用**iproute2**: + $ sudo ip route add default via 192.168.1.2 dev eth0 $ sudo ip route replace default via 192.168.1.2 dev eth0 @@ -152,10 +172,12 @@ net-tools中有两个选择来显示内核的IP路由表:route和netstat。在 使用下面命令添加或移除一个静态路由。 使用**net-tools**: + $ sudo route add -net 172.16.32.0/24 gw 192.168.1.1 dev eth0 $ sudo route del -net 172.16.32.0/24 使用**iproute2**: + $ sudo ip route add 172.16.32.0/24 via 192.168.1.1 dev eth0 $ sudo ip route del 172.16.32.0/24 @@ -169,6 +191,7 @@ net-tools中有两个选择来显示内核的IP路由表:route和netstat。在 $ netstat -l 使用**iproute2**: + $ ss $ ss -l @@ -179,6 +202,7 @@ net-tools中有两个选择来显示内核的IP路由表:route和netstat。在 使用这些命令显示内核的ARP表。 使用**net-tools**: + $ arp -an 使用**iproute2**: @@ -192,6 +216,7 @@ net-tools中有两个选择来显示内核的IP路由表:route和netstat。在 按照如下操作在本地ARP表中添加或删除一个[静态ARP项][4]。 使用**net-tools**: + $ sudo arp -s 192.168.1.100 00:0c:29:c0:5a:ef $ sudo arp -d 192.168.1.100 @@ -223,7 +248,7 @@ via: http://xmodulo.com/2014/09/linux-tcpip-networking-net-tools-iproute2.html 作者:[Dan Nanni][a] 译者:[KayGuoWhu](https://github.com/KayGuoWhu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 6a9b8071939047158a54c7e8015aa93eaaab63be Mon Sep 17 00:00:00 2001 From: forsil Date: Thu, 27 Nov 2014 21:29:11 +0800 Subject: [PATCH 313/316] forsil translating ... --- .../20140901 How to use on-screen virtual keyboard on Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20140901 How to use on-screen virtual keyboard on Linux.md b/sources/tech/20140901 How to use on-screen virtual keyboard on Linux.md index 11bdaaf42c..bab9fca09a 100644 --- a/sources/tech/20140901 How to use on-screen virtual keyboard on Linux.md +++ b/sources/tech/20140901 How to use on-screen virtual keyboard on Linux.md @@ -1,3 +1,4 @@ +forsil translating ... How to use on-screen virtual keyboard on Linux ================================================================================ On-screen virtual keyboard is an alternative input method that can replace a real hardware keyboard. Virtual keyboard may be a necessity in various cases. For example, your hardware keyboard is just broken; you do not have enough keyboards for extra machines; your hardware does not have an available port left to connect a keyboard; you are a disabled person with difficulty in typing on a real keyboard; or you are building a touchscreen-based web kiosk. From 09517d99ad04bb1c503984a461ddee9401faec56 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 28 Nov 2014 09:36:39 +0800 Subject: [PATCH 314/316] Revert "[Translating]20141127 How to install Docker on CentOS 7" --- sources/tech/20141127 How to install Docker on CentOS 7.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/tech/20141127 How to install Docker on CentOS 7.md b/sources/tech/20141127 How to install Docker on CentOS 7.md index 134ad89a46..d39a3ca5d8 100644 --- a/sources/tech/20141127 How to install Docker on CentOS 7.md +++ b/sources/tech/20141127 How to install Docker on CentOS 7.md @@ -1,4 +1,3 @@ -[translating by KayGuoWhu] How to install Docker on CentOS 7 ================================================================================ Docker is an open-source tool that makes creating & managing **Linux containers(LXC)** easy. Containers are like lightweight VMs which can be started & stopped in milliseconds. Dockers help the system admin & coders to develop their application in a container and can further scale up to 1000 of nodes. From aae52f4fbfdae91d7442d3470f167b36635c5f4b Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Fri, 28 Nov 2014 09:49:55 +0800 Subject: [PATCH 315/316] =?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 --- ...140910 Drab Desktop Try These 4 Beautiful Linux Icon Themes.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/talk => published}/20140910 Drab Desktop Try These 4 Beautiful Linux Icon Themes.md (100%) diff --git a/translated/talk/20140910 Drab Desktop Try These 4 Beautiful Linux Icon Themes.md b/published/20140910 Drab Desktop Try These 4 Beautiful Linux Icon Themes.md similarity index 100% rename from translated/talk/20140910 Drab Desktop Try These 4 Beautiful Linux Icon Themes.md rename to published/20140910 Drab Desktop Try These 4 Beautiful Linux Icon Themes.md From c8fc59b10c73bbef12fddaa52caac0ffb7491388 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Fri, 28 Nov 2014 11:31:15 +0800 Subject: [PATCH 316/316] translating --- sources/talk/20141127 What Makes a Good Programmer.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20141127 What Makes a Good Programmer.md b/sources/talk/20141127 What Makes a Good Programmer.md index 02ed16dfab..e57aa9e58d 100644 --- a/sources/talk/20141127 What Makes a Good Programmer.md +++ b/sources/talk/20141127 What Makes a Good Programmer.md @@ -1,3 +1,4 @@ +[KayGuoWhu translating] What Makes a Good Programmer? ================================================================================ What makes a good programmer? It’s an interesting question to ask yourself. It makes you reflect on the craft of software development. It is also a good question to ask your colleagues. It can trigger some interesting discussions on how you work together. Here are five skills I think are crucial to have in order to be a good programmer.