Merge pull request #43 from LCTT/master

Update Repository
This commit is contained in:
joeren
2014-11-05 10:42:28 +08:00
29 changed files with 1097 additions and 1157 deletions

View File

@@ -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来服务。
不幸的是这些用户显然不会优先考虑LibreOfficeCalligra 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/

View File

@@ -1,48 +1,46 @@
Linux趣事
关于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在云计算平台方面仍然保持着它的优势。
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)
![](https://farm4.staticflickr.com/3837/14841786838_7a50625f9d_b.jpg)
4.Linux的代码行SLOC超过1700万行。估计整个代码库的花费大概是5,526人年或者是超过300M1M=10*1000万亿美元[基于模型的基本估算法][11]basic COCOMO model
4.Linux的代码行SLOC超过1700万行。估计整个代码库的花费大概是5,526人年或者是超过300M1M=10*1000万亿美元[基于模型的基本估算法][11]basic COCOMO model
5.企业并不是单纯的Linux消费者。他们的员工也在[积极参与][12]Linux的开发。下图显示了前十的Linux内核开发参与的企业员工2013年提交次数总和。他们包括linux商业版发行者(Red Hat,SUSE),芯片/嵌入式系统制造商IntelTexas Instrumentwolfson非盈利性组织Linaro和其的IT公司IBMSamsungGoogle
5.企业并不是单纯的Linux消费者。他们的员工也在[积极参与][12]Linux的开发。下图显示了参与Linux内核开发的企业员工2013年提交次数总和的前十位。他们包括Linux商业版发行者(Red Hat,SUSE),芯片/嵌入式系统制造商IntelTexas Instrumentwolfson非盈利性组织Linaro和其的IT公司IBMSamsungGoogle
![](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/) 荣誉推出

View File

@@ -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/) 荣誉推出

View File

@@ -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/) 荣誉推出

View File

@@ -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 么? ###

View File

@@ -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

View File

@@ -1,28 +0,0 @@
This is the name of Ubuntu 15.04 — And Its 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 thats 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. Its 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

View File

@@ -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 youve 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

View File

@@ -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 locks 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/

View File

@@ -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)

View File

@@ -0,0 +1,71 @@
>> Translating by ThomazL
Pitivi 0.94 Uses GTK HeaderBar, Squashes Umpteen Bugs
================================================================================
**Im 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.**”
### Whats new? ###
Interesting improvements indeed! The most noticeable change in Pitivi 0.94 is the switch to GNOMEs 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 cant go back,*” says Fortin Tam. A quick glance at the screenshot below and youll 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 ####
Theres 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 clips 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. Thats 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 youd 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

View File

@@ -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 arent 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 wouldnt 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 wont 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/

View File

@@ -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, youll 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, youll 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 youll 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)
Youre in, but all you see is a blank box with a space to type prompts. This is the command line! Lets 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 dont want to muddy up our main directory with all our command-line experimenting, so lets 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]. Lifehackers 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

View File

@@ -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/
[3]:https://insights.ubuntu.com/2014/10/29/interview-nudt-talks-ubuntu-kylin-and-its-14-10-release/

View File

@@ -1,141 +0,0 @@
Install Google Docs on Linux with Grive Tools
================================================================================
Google Drive is two years old now and Googles cloud storage solution seems to be still going strong thanks to its integration with Google Docs and Gmail. Theres 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 its not seen the light of day on any Linux system.
Thankfully, there is an alternative solution using Grive Tools. Weve covered Grive once before when it was in its infancy, but its 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, well 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, its a great alternative to Canonicals 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 youll 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 ####
Youll 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 wont 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 well cover both at once while mentioning any extras that need to be done for a specific distro. The first thing youll need to do is look for Grive Setup in your list of programs.
#### Step 07 Log into your account ####
If you havent already created a Google account, youll 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 youre logged in to the correct email address before continuing.
#### Step 08 Connect your account ####
Youll be asked if the specific info it can look at is okay youll need to confirm to continue, otherwise it cant 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. Theres 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 youd 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 theyre purely stored in the cloud on Drive. The upside is theyre 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 youre using standard GNOME its 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. Well 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 its 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 youre 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/

View File

@@ -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

View File

@@ -1,127 +0,0 @@
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.
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 <download-speed-in-KB/s> and "-u <upload-speed-in-KB/s> 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 <official source>" 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

View File

@@ -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
[2]:http://xmodulo.com/manage-linux-containers-docker-ubuntu.html

View File

@@ -1,3 +1,4 @@
Translating by ZTinoZ
8 Tips to Solve Linux & Unix Systems Hard Disk Problmes Like Disk Full Or Cant 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/
[29]:http://www.cyberciti.biz/faq/linux-tape-backup-with-mt-and-tar-command-howto/

View File

@@ -1,138 +0,0 @@
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 </path/to/apache-access-logs>
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

View File

@@ -0,0 +1,72 @@
Cinnamon 2.4 Debuts With New Features, Heres 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 distros 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? Id 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? Thats 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/

View File

@@ -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 CPUs in your system). To see the no. of CPUs, use the command “lscpu”. In my case its “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 youve 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, youll 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 youll 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.
<?php
phpinfo();
?>
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 databases 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.
Thats 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

View File

@@ -0,0 +1,42 @@
Mozilla 下周发布全新的开发者浏览器
================================================================================
**当你早晨醒来的时候你可能没有期望在网上看到Mozilla新的浏览器这样的词。**
但是我手上的正是你要找的。
youtube 视频地址,发布的时候不行做个链接吧
<iframe width="750" height="422" frameborder="0" allowfullscreen="" src="https://www.youtube.com/embed/Ehv5u-5rE8c?feature=oembed"></iframe>
### 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/

View File

@@ -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来服务。
不幸的是这些用户显然不会优先考虑LibreOfficeCalligra 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/

View File

@@ -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用户应该已经很熟悉命令行了不过新手也许还是会觉得这些小窍门有点用。如果你用的是ChromebookGoogle已经给出了有用的指导用来打开它自带的[命令行工具][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

View File

@@ -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

View File

@@ -0,0 +1,125 @@
如何使用命令行通过 BitTorrent 快速安全地下载 ISO 镜像
================================================================================
如果你喜欢尝试最新版甚至是 beta 版的 Linux 发行版来满足你的好奇心,并始终保持是最新版,那么你就会时常受到下载较大的 ISO 镜像的烦恼。提供 ISO 的人通常会使用 ISO 镜像的 .torrent 文件来减少服务器的带宽消耗。P2P 下载对于使用者来说好处也是很明显的(就下载速度而言),特别是当流行的 Linux 发行版有新版本发布并上传供下载,每个人同时在下载做种的时候。
Ubuntu 14.10 (utopic Unicorn) 这周刚刚发布。因此现在在 BitTorrent 网络上应该有很多种子可以下载该版本。虽然有很多基于图形界面的 BitTorrent 客户端,我将展示**如何通过基于简单的命令行界面的 BitTorrent 客户端下载 ISO 镜像**,如果是在远程无图形界面的服务器上的话这会很方便。在这片教程靠后的部分,我还会演示**如何验证已下载的 ISO 镜像的完整性**。
我今天要使用的基于命令行的 BitTorrent 客户端是 transmission-cli。正如你可能知道的那样[Transmission][1] 是最流行的基于图形界面的 BitTorrent 客户端之一。transmission-cli 是它的简装的命令行版本。
### 在 Linux 上安装 Transmission-cli ###
要安装 **transmission-cli**,你不必安装完整的基于图形界面的 Transmission这是一个很好的消息。
在 Debian、Ubuntu 或者是基于它们的发行版上:
$ sudo apt-get install transmission-cli
在 Fedora 上:
$ sudo yum install transmission-cli
在 CentOS 或者 RHEL 上(在安装了 [EPEL 仓库][2]之后):
$ sudo yum install transmission-cli
### 通过 transmission-cli 快速地下载 ISO 镜像 ###
**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)
一旦 ISO 镜像下载完成,它默认存储在 ~/Downloads 文件夹中。下载 1GB 的 Ubuntu ISO 镜像只用了我 5 分钟的时间。
![](https://farm6.staticflickr.com/5605/15433651319_745df6633a_z.jpg)
程序下载 ISO 镜像完成后,你会在终端中看到“状态由未完成变为完成”的提示。要注意的是 transmission-cli 会继续运行并做种以便于其他下载者下载。按 Ctrl+C 来退出。
### 为重复使用定制下载选项 ###
如果你是 **transmission-cli** 的重复使用者,那么值得花时间来熟悉一下它的命令行选项。
"-w /path/to/download-directory" 选项指定下载文件保存的文件夹。
"-f /path/to/finish-script" 选项设置当前下载完成后要运行的脚本。注意 transmission-cli 默认在文件下载完成后继续运行。如果你想在成功下载完成后自动关闭 transmission-cli你可以使用这个选项。下面这个简单的脚本可以完成这个功能。
#!/bin/sh
sleep 10
killall transmission-cli
如果你想为 transmission-cli 分配上传/下载带宽限制,你可以使用 “-d <download-speed-in-KB/s>” 和 “-u <upload-speed-in-KB/s>” 选项。如果你不想限制带宽使用,仅仅指定 “D” 或 “-U” 选项即可。
这有一个更高级的 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)
### 验证已下载的 ISO 镜像的完整性 ###
当你下载了一个 ISO 镜像,特别是从 BitTorrent 网络上很多未知的种子处下载的,通常建议要验证下载镜像的完整性。
对于 Ubuntu 发行版的情况, Canonical 提供了几个供验证使用的验校文件(如 MD5SUM SHA1SUMS 和 SHA256SUMS。在这个例子中我们使用 SHA256SUMS。
![](https://farm4.staticflickr.com/3943/15434697700_3b3e6077ee_z.jpg)
首先,下载下面两个文件。
$ wget http://releases.ubuntu.com/14.10/SHA256SUMS
$ wget http://releases.ubuntu.com/14.10/SHA256SUMS.gpg
第一个文件是 ISO 镜像的 SHA256 验校文件,而第二个文件(*.gpg是验校文件的签名。第二个文件的目的是验证验校文件本身的有效性。
我们通过运行下面的命令来验证 SHA256SUMS 文件的有效性。
$ 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
如果你得到上面的错误信息,是因为你还没有导入生成这个签名的公共密钥。因此我们现在导入需要的公共密钥。
这样做之前,你需要知道公共密钥的 “key ID”而这在上面的 gpg 命令的输出中有显示。在这个例子中,密钥 ID 时 “FBB75451”。运行下面的命令来从官方 Ubuntu 密钥服务器导入公共密钥。
$ gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys FBB75451
![](https://farm4.staticflickr.com/3953/15620291035_bcdb3cffb9_z.jpg)
既然公共密钥已经被导入,我们可以继续并重新运行之前的命令来验证签名。
gpg --verify SHA256SUMS.gpg SHA256SUMS
![](https://farm6.staticflickr.com/5600/15433651369_d22905e65b_z.jpg)
这次你没有看到 “public key not found” 的错误信息。如果 SHA256SUMS 文件时有效的,你会看到 “Good signature from <official source>” 的信息。注意到你还看到一个 “This key is not certified with a trusted signature” 的警告信息。基本上这个警告信息时告诉你对导入的公共密钥[指定任何明确的信任][3]。要避免这个警告,你可以选择指定完全信任导入的公共密钥,但你应该只有在通过其他方式审查了这个密钥之后才这样做。否则的话,你可以暂时忽略这个警告。
在验证了 SHA256SUMS 文件的完整性后,最后一个步骤是比较已下载 ISO 文件的 SHA256 验校和和 SHA256SUMS 文件中对应的验校值。你可以使用 sha256sum 命令行工具来完成这个步骤。
为方便起见,下面一行命令比较 SHA256 验校和并报告结果。
$ sha256sum -c <(grep ubuntu-14.10-desktop-amd64.iso SHA256SUMS)
----------
ubuntu-14.10-desktop-amd64.iso: OK
如果你看到了上面的输出信息,这表明两个验校值相匹配。这样已下载 ISO 镜像的完整性就被成功的验证了。
--------------------------------------------------------------------------------
via: http://xmodulo.com/download-iso-image-bittorrent-command-line.html
作者:[Dan Nanni][a]
译者:[wangjiezhe](https://github.com/wangjiezhe)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/nanni
[1]: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

View File

@@ -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/) 荣誉推出

View File

@@ -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 情况包括不限于403Forbidden通常在有效请求丢失访问许可时被报告404Not 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 moduleSQLite 的 DBI 驱动以及 GNU readline.
### 在 Debian, Ubuntu 以及其衍生发行版上安装 asql ###
使用基于 Debian 发行版上的 aptitudeasql 以及其依赖会被自动安装。
# aptitude install asql
### 在 FedoraCentOSRHEL 上安装 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 <path/to/apache-access-logs>
比如在 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 状态码为 403access 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 与 grepuniqsortwc 等等之间的管道)来实现类似功能,与此比较起来 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