Merge pull request #40 from LCTT/master

Update Repository
This commit is contained in:
joeren 2014-10-27 10:01:54 +08:00
commit 1cc390c6da
40 changed files with 2518 additions and 822 deletions

View File

@ -2,11 +2,11 @@ Camicri Cube: 可离线的便携包管理系统
================================================================================
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/camicri-cube-206x205.jpg)
众所周知,在系统中使用新立德包管理工具或软件中包管理工具来下载和安装应用程序的时候,我们必须得有互联网连接。但,如果您刚好没有网络或者是网络速度死慢死慢的呢?在您的 Linux 桌面系统中使用软件中心包管理工具来安装软件这绝对是一个头痛的问题。这种情况,您只能从相应的官网上手工下载应用程序包,并手工安装。但是,大多数的 Linux 用户并不知道他们希望安装的应用程序所需要的依赖关系包。如果您恰巧出现这种情况,应用怎么办呢?现在一切都不用担心了。今天,我们给您介绍一款非常棒的名叫 **Camicri Cube** 的离线包管理工具。
众所周知,在系统中使用新立得包管理工具或软件中心下载和安装应用程序的时候,我们必须得有互联网连接。但,如果您刚好没有网络或者是网络速度死慢死慢的呢?在您的 Linux 桌面系统中使用软件中心包管理工具来安装软件绝对是一个头痛的问题。反而,您可以从相应的官网上手工下载应用程序包并手工安装。但是,大多数的 Linux 用户并不知道他们希望安装的应用程序所需要的依赖关系包。如果您恰巧出现这种情况,应用怎么办呢?现在一切都不用担心了。今天,我们给您介绍一款非常棒的名叫 **Camicri Cube** 的离线包管理工具。
您可以把此包管理工具装在联网的系统上,下载您所需要安装的软件,然后把他们安装到没联网的机器上就可以安装了。听起来很不错吧是的它就是这样操作的。Cube 是一款像新立和 Ubuntu 软件中心这样的包管理工具但是一款便携式的。它在任何平台Windows 系统、基于 Apt 的 Linux 发布系统)、在线状态、离线状态、在闪存或任何可移动设备上都是可以使用和运行的。我们这个实验项目的主要目的是使处在离线状态的 Linux 用户能很容易的下载和安装 Linux 应用程序。
您可以把此包管理工具装在任何联网的系统上,下载您所需要安装的软件列表,然后把它们安装到没联网的机器上就可以安装了。听起来很不错吧是的它就是这样操作的。Cube 是一款像新立和 Ubuntu 软件中心这样的包管理工具但是一款便携式的。它在任何平台Windows 系统、基于 Apt 的 Linux 发布系统)、在线状态、离线状态、在闪存或任何可移动设备上都是可以使用和运行的。我们这个实验项目的主要目的是使处在离线状态的 Linux 用户能很容易的下载和安装 Linux 应用程序。
Cube 会收集您的离线电脑的完整的详细信息,如操作系统的详细信息、安装的应用程序等等。然后使用 USB 迷你盘对 cube 应用程序进行拷贝得到一副本,把其放在其它有网络连接的系统上使用,接着就可以下载您需要的应用程序。下载完所有需要的软件包之后回到您原来的计算机并开始安装。Cube 是由 **Jake Capangpangan** 开发和维护的,是用 C++ 语言编写,而且已经集成了所有必须的包。因此,要使用它并不需要再安装其它额外的软件。
Cube 会收集您的离线电脑的详细信息,如操作系统的详细信息、安装的应用程序等等。然后使用 USB 迷你盘对 cube 应用程序进行拷贝得到一副本,把其放在其它有网络连接的系统上使用,接着就可以下载您需要的应用程序列表。下载完所有需要的软件包之后回到您原来的计算机并开始安装。Cube 是由 **Jake Capangpangan** 开发和维护的,是用 C++ 语言编写,而且已经集成了所有必须的包。因此,使用它并不需要再安装任何额外的软件。
### 安装 ###
@ -22,7 +22,7 @@ Cube 会收集您的离线电脑的完整的详细信息,如操作系统的详
### 使用 ###
这儿,我使用的是两台装有 Ubuntu 系统的机器。原机器(离线-没有网络连接)上面跑着的是 **Ubuntu 14.04** 系统,有网络连接的机器跑着的是 **Lubuntu 14.04** 桌面系统。
这儿,我使用的是两台装有 Ubuntu 系统的机器。原机器(离线-没有网络连接)上面跑着的是 **Ubuntu 14.04** 系统,有网络连接的机器跑着的是 **Lubuntu 14.04** 桌面系统。
#### 离线系统上的操作步骤: ####
@ -50,7 +50,7 @@ Cube 会收集您的离线电脑的完整的详细信息,如操作系统的详
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/Camicri-Systems-%C2%A9-Cube-Portable-Package-Manager-1.0.9.2-sk_0033.png)
就是这样。现在新的项目已经创建好了,它会保存在我们的主 cube 目录里面。进入 Cube 目录,您就会发现一个名叫 Projects 的目录。这个目录会保存有您的离线系统的必要完整详细信息。
就是这样。现在新的项目已经创建好了,它会保存在我们的主 cube 目录里面。进入 Cube 目录,您就会发现一个名叫 Projects 的目录。这个目录会保存有您的离线系统的必要完整详细信息。
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/Selection_004.png)
@ -75,7 +75,7 @@ Cube 会收集您的离线电脑的完整的详细信息,如操作系统的详
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/Cube-Startup-Create-or-choose-a-project-to-be-managed_0014.png)
随后cube 会询问这是否是您的项目所在的源机器。它并不是我的源(离线)机器,所以我点击 **No**
随后cube 会询问这是否是您的项目所在的源机器。它并不是我的源(离线)机器,所以我点击 **No**
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/Camicri-Systems-%C2%A9-Cube-Portable-Package-Manager-1.0.9.2-sk_0024.png)
@ -95,7 +95,7 @@ Cube 会收集您的离线电脑的完整的详细信息,如操作系统的详
#### 下载新的应用程序 ####
例如,这儿我想下载 **apache2** 包。在**搜索**框里输入包的名字点击搜索按纽。Cube 程序会获取您想查找的应用程序的详细信息。点击 “**Download this package now**”按纽,接着点击 **OK** 就开始下载了。
例如,现在我想下载 **apache2** 包。在**搜索**框里输入包的名字点击搜索按纽。Cube 程序会获取您想查找的应用程序的详细信息。点击 “**Download this package now**”按纽,接着点击 **OK** 就开始下载了。
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/Camicri-Systems-%C2%A9-Cube-Portable-Package-Manager-1.0.9.2-sk_008.png)
@ -136,7 +136,7 @@ Cube 将会下载 apache2 的安装包及所有的依赖包。
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/Camicri-Systems-%C2%A9-Cube-Portable-Package-Manager-1.0.9.2-sk_0035.png)
然后选中某个特定的包,点击 “Install this”按纽来安装或者如果想过后再安装它的话可以先点击 “Mark this” 按纽。
然后双击某个特定的包,点击 “Install this”按纽来安装或者如果想过后再安装它的话可以先点击 “Mark this” 按纽。
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/Camicri-Systems-%C2%A9-Cube-Portable-Package-Manager-1.0.9.2-sk_0043.png)
@ -144,24 +144,25 @@ Cube 将会下载 apache2 的安装包及所有的依赖包。
### 结论 ###
这是我曾经使用过的一款最好、最有用的软件工具。但我在用 Ubuntu 14.04 测试盒子测试的时候,遇到了很多依赖问题,还经常会出现闪退的情况。也仅仅是在最新 Ubuntu 14.04 离线系统上使用没有遇到任何问题。希望这些问题在老版本的 Ubuntu 上不会发生。除了这些小问题,这个小工具对作向外推荐以及本职工作这些方面显得魅力十足
这是我曾经使用过的最好、最有用的软件工具之一。但我在用 Ubuntu 14.04 测试盒子测试的时候,遇到了很多依赖问题,还经常会出现闪退的情况。也仅仅是在最新 Ubuntu 14.04 离线系统上使用没有遇到任何问题。希望这些问题在老版本的 Ubuntu 上不会发生。除了这些小问题,这个小工具就如同宣传的一样,像魔法一样神奇
欢呼吧!
--------------------------------------------------------------------------------
via: http://www.unixmen.com/camicri-cube-offline-portable-package-management-system/
原文作者:
![](http://1.gravatar.com/avatar/1ba62ac2b395f541750b6b4f873eb37b?s=70&d=monsterid&r=G)
[SK][a](Senthilkumar又名SK来自于印度的泰米尔纳德邦Linux 爱好者FOSS 论坛支持者和 Linux 板块顾问。一个充满激情和活力的人,致力于提供高质量的 IT 专业文章,非常喜欢写作和对 Linux、开源、电脑和互联网等新事物的探索。)
[SK][a](Senthilkumar又名SK来自于印度的泰米尔纳德邦Linux 爱好者FOSS 论坛支持者和 Linux 板块顾问。一个充满激情和活力的人,致力于提供高质量的 IT 专业文章,非常喜欢写作以及探索 Linux、开源、电脑和互联网等新事物。)
译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID)
--------------------------------------------------------------------------------
via: http://www.unixmen.com/camicri-cube-offline-portable-package-management-system/
译者:[runningwater](https://github.com/runningwater) 校对:[Caroline](https://github.com/carolinewuyan)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.unixmen.com/author/sk/
[1]:https://launchpad.net/camicricube
[2]:http://sourceforge.net/projects/camicricube/
[2]:http://sourceforge.net/projects/camicricube/

View File

@ -2,11 +2,11 @@ Linux输入统计神器——WhatPulse
================================================================================
![](http://cdn.linuxaria.com/wp-content/uploads/2014/08/whatpulse.png)
如果,你我这样,是个对统计数据有着狂热癖好的人,那么你必须在你的计算机上安装这个小应用:[WhatPulse][1]
如果,你我这样,是个对统计数据有着狂热癖好的人,那么你必须在你的计算机上安装这个小应用:[WhatPulse][1]
此软件会追踪用户的击键、鼠标点击以及使用的[带宽][2]和系统开机时间。用户可以周期性地,或者手动上传击键的数量到服务器上,这称之为“脉动”。
用户可以看到他们在所有加入该程序的人的领先选手排板的所处位置并且与他们自己国家的人作比较。用户也可以加入团队在团队中他们可以和有着相同爱好的人作对比去吧Linux用户们
用户可以看到他们在所有加入该程序的人的领先选手排板的所处位置并且与他们自己国家的人作比较。用户也可以加入团队在团队中他们可以和有着相同爱好的人作对比去吧Linux用户们
软件分为免费的基础版和高级版,在基础版中你可以查看并检查所有的基本统计数据,而在高级版中你可以看到更多。
@ -16,11 +16,11 @@ Linux输入统计神器——WhatPulse
第一步,你必须在[WhatPulse网站][1]注册帐号或者也可以在你第一次启动WhatPulse客户端时出现的实用向导中创建帐号以用于上传自己的统计数据你也可以使用Facebook的帐号登录
你会被提示需要登录,登录之后,你必须搜索你的计算机名这是因为你可以通过该帐号登录到多台计算机而它们的数据都会上传到同一统计帐号。一旦你登入后一个小小的W将出现在你的系统托盘中那就对了你已搞定
你会被提示需要登录,登录之后,你必须找到你的计算机名这是因为你可以通过该帐号登录到多台计算机而它们的数据都会上传到同一统计帐号。一旦你登入后一个小小的W将出现在你的系统托盘中那就对了你已搞定
### 在Linux上安装WhatPulse ###
官方网站在[下载页][3]提供了一个通用版本.tar.gz归档压缩包用于32位和64位和一个debian包。
官方网站在[下载页][3]提供了一个通用版本.tar.gz归档压缩包用于32位和64位和一个debian包。
就我个人而言我已经在我的Mint Qiana上安装了debian包在我的Arch Linux[Aur包][4]一点问题都没有。
@ -57,7 +57,7 @@ Linux输入统计神器——WhatPulse
在网站上,你会看到与客户端上相同的所有统计数据。
免责声明上面的WhatPulse网站链接包含了我的参考链接注册时使用该链接,这会让我的帐号在某天升级到高级帐号。
免责声明上面的WhatPulse网站链接包含了我的参考链接注册时可以使用该链接,这会让我的帐号在某天升级到高级帐号。
--------------------------------------------------------------------------------
@ -65,7 +65,7 @@ via: http://linuxaria.com/recensioni/check-how-much-do-you-type-with-whatpulse-o
作者:[linuxari][a]
译者:[GOLinux](https://github.com/GOLinux)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,6 +1,6 @@
Linux终端的乐趣之把玩Word Counts
Linux终端的乐趣之把玩字词计数
================================================================================
Linux 命令行有很多的乐趣,我们可以很容易并且完善地执行很多繁琐的任务。比如,我们计算一个文本文件中字和字符的出现频率,是我们打算在这篇文章中讲到的。
Linux 命令行有很多的乐趣,我们可以很容易并且完善地执行很多繁琐的任务。比如,我们计算一个文本文件中字和字符的出现频率,这就是我们打算在这篇文章中讲到的。
立刻来到我们脑海的命令,计算字和字符在一个文本文件中出现频率的 Linux 命令是 [wc 命令] [1]。
@ -49,7 +49,7 @@ Linux 命令行有很多的乐趣,我们可以很容易并且完善地执行
a
m
**Note**: `-w1`只是设定了长度
****: `-w1`只是设定了长度
现在我们将从那个文本文件中掰下来的每一个字母,对结果进行排序,得到所需的输出频率的十个最常见的字符。
@ -68,7 +68,7 @@ Linux 命令行有很多的乐趣,我们可以很容易并且完善地执行
1224 r
1021 l
如何区分大小写呢?之前我们都是略大小写的。所以,用如下命令。
如何区分大小写呢?之前我们都是略大小写的。所以,用如下命令。
$ fold -w1 < man.txt | sort | tr '[:lower:]' '[:upper:]' | uniq -c | sort -rn | head -20
@ -154,18 +154,19 @@ Linux 命令行有很多的乐趣,我们可以很容易并且完善地执行
1 activate local mode format and display local manual files
1 acute accent
**Note**: 上面的.越来越多,其实,我们可以使用.{10} 得到同样的效果。
****: 上面的.越来越多,其实,我们可以使用.{10} 得到同样的效果。
这些简单的脚本,让我们知道最频繁出现的单词和英语中的字符。
这就是现在。我会在这里再一次提到另一个有趣的话题,你应该会喜欢读。还有别忘了向我们提供您的宝贵意见的评论部分。
现在结束了。下次我会在这里讲到另一个有趣的话题,你应该会喜欢读。还有别忘了向我们提供您的宝贵意见。
--------------------------------------------------------------------------------
via: http://www.tecmint.com/play-with-word-and-character-counts-in-linux/
作者:[Avishek Kumar][a]
译者:[MikeCoder](https://github.com/MikeCoder)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,12 +1,12 @@
如何在Linux命令行中下载GOG游戏
================================================================================
如果你是一个玩家同时也是一个Linux用户你可能很高兴在[GOG][1]在几个月前宣布它会在你最喜欢的操作系统上推出游戏。如果你之前从来没有听说过GOG我鼓励你看看他们的产品目录中的“很棒的老游戏”价格合理无DRM限制而且充满了很棒的东西。然而现在的Windows上的GOG存在了很长的时间按正式的Linux版本却是无处可见。因此你不想等待官方的正式版本一个名为LGOGDownloader非官方的开放源码计划能让你在命令行中访问你的库。
如果你是一个游戏玩家同时也是一个Linux用户你可能很高兴在[GOG][1]在几个月前宣布它会在你最喜欢的操作系统上推出游戏。如果你之前从来没有听说过GOG我鼓励你看看他们的产品目录中的“很棒的老游戏”价格合理无DRM限制而且充满了很棒的东西。虽然Windows上的GOG客户端已经存在了很长的时间但是官方的Linux版本客户端却是无处可见。因此如果你不想等待官方的正式版本一个名为LGOGDownloader非官方的开放源码计划能让你在命令行中访问你的库。
![](https://farm4.staticflickr.com/3843/15121593356_b13309c70f_z.jpg)
### 在Linux中安装 LGOGDownloader ###
对于Ubuntu用户来说[官方页面][2]建议您下载源代码并执行:
对于Ubuntu用户来说[官方页面][2]建议您下载源代码并执行:
$ sudo apt-get install build-essential libcurl4-openssl-dev liboauth-dev libjsoncpp-dev libhtmlcxx-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-program-options-dev libboost-date-time-dev libtinyxml-dev librhash-dev help2man
$ tar -xvzf lgogdownloader-2.17.tar.gz
@ -14,7 +14,7 @@
$ make release
$ sudo make install
如果你是ArchLinux用户。有一个[AUR 包][2]等着你
如果你是ArchLinux用户。有一个[AUR 包][2]等着你
### LGOGDownloader 的使用###
@ -65,7 +65,7 @@ via: http://xmodulo.com/2014/09/download-gog-games-command-line-linux.html
作者:[Adrien Brochard][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -2,9 +2,8 @@
================================================================================
![Android, Chrome, Ubuntu](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/android-ubuntu.jpg)
Android, Chrome, Ubuntu
**Google最近发布了首批[能在Chrome OS本地运行的安卓应用集][1],通过‘安卓运行时’扩展完成了该壮举。**
**Google最近发布了首批[能在Chrome OS本地运行的安卓应用集][1]通过‘安卓运行时’扩展完成了该壮举。**
现在,一位开发者已经[指明了将安卓应用带入桌面版Chrome的路][2]。
@ -12,51 +11,51 @@ Android, Chrome, Ubuntu
![IMDB, Flipboard and Twitter Android Apps running on Ubuntu 14.04 LTS](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/android-apps-on-linux.jpg)
运行在Ubuntu 14.04 LTS上的安卓应用IMDBFlipboard和Twitter
*运行在Ubuntu 14.04 LTS上的安卓应用IMDBFlipboard和Twitter*
通过运行时运行的应用的性能不是很令人惊异任何想要运行Dead Trigger 2或者其它图形密集型游戏的雄心壮志可以放到一边了。
通过‘安卓运行时运行的应用的性能不是很令人惊异任何想要运行Dead Trigger 2或者其它图形密集型游戏的雄心壮志可以放到一边了。
同样地,作为官方运行时的非官方重构包并在Chrome OS之外运行系统整合(如网络摄像头,扬声器等)可能不完整或者根本不可能。
同样地,要运行官方的安卓运行时的非官方重构包或者在Chrome OS之外运行的话其系统完整性(如网络摄像头,扬声器等)可能不完整或者根本不可能。
下面的指南只是提供原样,并不保证一定成功。它只能作为高度实验性进行,里面遍布漏洞,很不稳定——甚至平出恶魔。只能出于好奇而尝试,不去高度寄予厚望,那么你就不会深受其困扰。
按照下面的指南一步步来,并不保证一定成功。它只能作为高度实验性进行,里面遍布漏洞,很不稳定——甚至白日见鬼。只能出于好奇而尝试,不要高度寄予厚望,这样你就不会深受其困扰。
### 安卓应用转战Linux大法 ###
要通过Chrome在Linux上运行安卓应用很明显你需要安装Chrome要求的版本是37或者更高。坦率地讲如果你打算玩玩潜在不稳定的版本,那么你也可以下载并[为Linux安装不稳定的Google Chrome版本][6]。
要通过Chrome在Linux上运行安卓应用很明显你需要安装Chrome要求的版本是37或者更高。坦率地讲如果你打算玩玩不稳定的Chrome版本,那么你也可以下载并[为Linux安装][6]。
已经安装了Chrome的某个版本你可以通过命令行来安装开发版,命令如下:
如果已经安装了Chrome的某个版本你可以通过命令行来安装不稳定版,命令如下:
sudo apt-get install google-chrome-unstable
接下来你需要下载官方定制版而不是Google或Chronium捐赠的版本——由弗拉德·菲利波夫创建的安卓运行时。这个版本和官方的有着诸多的不同,最突出的就是它可以运行在桌面版的浏览器上。
有了 Chrome 之后你需要下载定制版的安卓运行时扩展而不是Google或Chronium提供的版本——由弗拉德·菲利波夫创建的安卓运行时。这个版本和官方的有着诸多的不同,最突出的不同就是它可以运行在桌面版的浏览器上。
- [从BitBucket下载ARChon v1.0][7]
下载好运行时后,你需要从.zip解压内容并移动解压后的文件夹到你的Home文件夹。
下载好‘安卓运行时’扩展后,你需要从.zip解压内容并移动解压后的文件夹到你的Home文件夹。
要安装打开Google Chrome点击汉堡式菜单按钮然后导航到扩展页。检查启用开发者模式并点击加载解包的扩展按钮。
要安装打开Google Chrome点击汉堡式菜单按钮然后导航到扩展页。检查启用开发者模式并点击加载解包的扩展按钮。
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/chromeos-apk-extensions.jpg)
运行时本身不会做太多事情,所以你需要从安卓应用创建兼容包。要完成这项工作,你需要‘[chromeos-apk][8][命令行Javascript工具][9],它可以从节点封装模块管理器安装。
‘安卓运行时’扩展本身不会做太多事情,所以你需要从安卓应用创建兼容包。要完成这项工作,你需要‘[chromeos-apk][8][命令行Javascript工具][9],它可以从“Node 封装模块管理器npm )”安装。
首先运行:
sudo apt-get install npm nodejs nodejs-legacy
Ubuntu 64位用户也需要攫取以下库:
Ubuntu 64位用户还需要获取以下库:
sudo apt-get install lib32stdc++6
现在,运行命令来暗转脚本吧:
现在,运行npm命令来安装该脚本吧:
npm install -g chromeos-apk
根据你的配置你可能需要过会儿使用sudo来运行。如果你不喜欢[通过sudo安装npm模块你可以][10]玩玩鬼把戏
根据你的配置你可能需要过会儿使用sudo来运行。如果你不喜欢[通过sudo安装npm模块你可以][10]试着骗过它
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/chromeos-apk-npm.jpg)
现在,你直接回家了。去Google找找你想要试试的应用的APK吧请牢记**不是所有的安卓应用都会工作**,而**那些可以工作的也未必工作得很好**,或者缺少功能。
现在,搞定了。去Google找找你想要试试的应用的APK吧请牢记**不是所有的安卓应用都会工作**,而**那些可以工作的也未必工作得很好**,或者缺少功能。
把你想要的安卓APK放到~/Home然后回到终端中使用以下命令来转换你可以将APK命名成任何你想要的名字
@ -68,9 +67,9 @@ Ubuntu 64位用户你也需要攫取以下库
现在在你的Home文件夹内有个ARChon生成的Chrome APK extension-y folder-y这样的东西。所有剩下来要做的事就是安装并查看它是否正常工作
回到chrome://extensions页面再次轻敲加载解封装扩展按钮但这次选择上面脚本创建的文件夹。
回到chrome://extensions页面再次轻敲加载解封装扩展按钮但这次选择上面脚本创建出来的文件夹。
应用应该会继续安装,不会有任何问题但是它确实会没有问题吗打开Chrome应用启动器或应用页面并启动它来看看是否有问题。
应用应该会正确安装但是它确实会没有问题吗打开Chrome应用启动器或应用页面并启动它来看看是否有问题。
#### 深度探索 ####
@ -82,7 +81,7 @@ via: http://www.omgubuntu.co.uk/2014/09/install-android-apps-ubuntu-archon
作者:[Joey-Elijah Sneddon][a]
译者:[GOLinux](https://github.com/GOLinux)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,8 +1,8 @@
直接从硬盘启动Linux ISO镜像
================================================================================
![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAooAAAEsAgMAAAA5t3pxAAAABGdBTUEAALGPC/xhBQAAAAxQTFRFAAAALAAeqKio/v7+NGqafgAABflJREFUeNrt3L1u4zgQB/DU7q+/8qCnuJegBQcQVLlY98RWhoKrDu4V4LZaHCAgp/chUuYpWAY6DofUh6PdtXcVcZL8ZUSmaSf5mSKHY0rJzQ22RbbflPTtTxhhhBFGGGGEEUYYYYQRRhhhhBFGGGH8zrY9e/xpVycxHup6X+/pvnWltp4zHlztrdvfe+Mu1BzqtYz1vvFGkrJ27jVK7em9NNHI35HSWO8P9Zf6UFPbfamjiPZU29bU9qsa1T9sVGMjy7f+HbgKFrk91e5COYVx6I+hTdU2tN7WtyXvyah8+dCsZbxv7r3D3avYjvu6dT3vU2/kHsj7ttk53Y5GzIr98T72x3owuiPvWi8a9/51vK/VLpTXNLrROmtU+2isg24w1usam2BshjFz6xX1yHjr3f2YabjbrhbD9xRp4j2PGYo5tfs6NBxl2ubW1bUNx55tfdhT+YD5GkYYYYQRRhhhhBFGGGGEEUYYYfyhsewEbm/RKPAYlzDCCCOMML4zoxFvNJqNBYy/aHwy9NW5vVyj1fRVKMlGvsEIo5gxY73RSjVW5slUrh1zt8d8DSOM78Y4Hs99Oe+r8j7BNImM5ayxGBlj1rZOFjdndL941qhEGSmC+0hON81RvTMlR3dDJiqtlWl+Y762RnMWSWWeHelYc51SZLJ6rUzz2zmFor0vcw0b+egWo/rXzz7mjJ1rRXe8qS19eWo8RqNKaaTfqg23mVHnxtzIN9I4F2G0peJxcz5muB8OxjUyzXljpV2c8fFniD0um7SVoTqOPWa1TPPS+Trl6sp7MiI3+2DG2U6pkxin8bjo9/lZTWVKs8YK4K8Y3WykUhmti9XPluIz52EUyTvfYs/+mVhDc00+ys7XNRr9WMRcsQizNZWo9rGINSmNT5qN47n5hdH3x86kM3bWGxUbO3vsjfRMrKH30D3nicaMUWOjO6Kmb0fl29HX+GxSpTZqy0alz41KJzdyf1TlZMzkL8eMM6aKj5V5LHyGqGlNgiINfUIgIz0Ta6rwOTbxXKilzoXDVqVMG5GbwfgT+eOwXRIp9WKx55r8cWosZ346xfnOZUyle1ysbOT88XttmYefWfr1DkpSljJelz9yjKJX0/pk3j/ycd5Hr8/uZsIaR76Y8Zr8UYXZ02paa8n7Ryyin0DHmuasJY3X5Y88mMLvZ2NYpxwb3SvNssZr8kf6riOtUzpJZQfj0Rs7y8YhT0qRP/qxYWgVsD/WYZ3St6OKRv1KxkvyRw57L41KT41maeMV+WO/gk5Gm49WTidjht7xgrHnuvwxRhvjemOlKxse8dqlpVe4vbvv7JIx/Lr88bqjpxc3XpI/Js/DkZt9AKMRbvRnjUbjIfcPS7+nKLL2J7FLjKU/769DjORMI7VRm+l56c/KTYHOVggzjs9L5zTZ+jzaG5UEY3l2rtK5vNF44/ENGHMj5VhPjZSpunzW56tKyzQq345K0Jihc9bj89JkLDmNFWSs9Pi8tMsJ/ed3STEcOQWMMP6EUcs20nwyGFNEmwvi46QdU0TtS4x05VG81lGqka+A5PXHFBnjBf2xzyn8WkqCjPGSduz4ejiaqZNkjBcd634lNk3GeL1R8pgxIXuUHHvcvZYaw5FTLGDcttK2/2B8XWPWPog23kyMd5u77C6TZswyMsbtoc1O2UmWkUx32e/Z15b2Mo1//EumzYlsm5M3ttKMf58yf3P90bffQ/uXOOPXLDvdbMh4t2HjQyayHdvsFPthbE9x/XFiFDmuszBmNlKNFMMp6rjY7W0yYzhyigWMyMM/mHF8HUcu0mhGLr5qqEi6DvnN9cfeqFS8+jHVWsC8sVRPhkXWUrkz8oy5sjoaqRzaUcky8t/l0nWGVGbjUaCRr4UcjKnWIX9kNCOj0jKP9dho5BnDX9nLNHaW/hdAFf4rAZXpyh5ZMRw5BYwwwggjjDDCCCOMMMIII4wwwggjjDDCCCOMMMIII4wwwggjjDDCCCOMMMIII4wwwggjjDDCCCOMMMIII4wwwggjjDDCCCOMMMIIo3TjG9j+B4tUkGfI5p/jAAAAAElFTkSuQmCC)
![](http://cdn8.howtogeek.com/wp-content/uploads/2014/09/boot-iso-files-directly-from-hard-drive-in-grub2.png)
Linux的GRUB2启动加载器可以直接从硬盘启动Linux ISO文件可以启动Live CD甚至可以不用烧录到磁盘来安装Linux到另外一个硬盘分区或从USB驱动启动。
Linux的GRUB2启动加载器可以直接从硬盘启动Linux ISO文件可以启动Live CD的 ISO而不用烧录到光盘来安装Linux到一个硬盘分区或从USB驱动启动。
我们在Ubuntu 14.04上实施了该过程——Ubuntu及基于Ubuntu的Linux版本对此支持良好。[其它Linux发行版][1]上的工作原理也类似。
@ -14,15 +14,15 @@ Linux的GRUB2启动加载器可以直接从硬盘启动Linux ISO文件可以
### 检查ISO文件内容 ###
你可能需要检查ISO文件来明确确定指定的文件在哪里。例如你可以通过使用Ubuntu及其它基于GNOME的桌面环境中的归档管理器/File Roller文件管理器这些图形化应用程序来打开ISO文件来完成此项工作。在Nautilus文件管理器中右击ISO文件并选择使用归档管理器打开。
你可能需要查看ISO文件的内部来知道那些特定的的文件在哪里。例如你可以通过使用Ubuntu及其它基于GNOME的桌面环境中的归档管理器/文件管理器这些图形化应用程序来打开ISO文件。在Nautilus文件管理器中右击ISO文件并选择使用归档管理器打开。
定位内核文件和initrd映像。如果你正在使用Ubuntu ISO文件你会在卡斯帕文件夹中找到这些文件——vmlinuz文件时Linux内核而initrd文件是initrd映像。后面你需要知道它们在ISO文件中所处的位置。
找到内核文件和initrd映像。如果你正在使用Ubuntu ISO文件你会在casper文件夹中找到这些文件——vmlinuz文件是Linux内核而initrd文件是initrd映像。后面你需要知道它们在ISO文件中所处的位置。
![](http://cdn8.howtogeek.com/wp-content/uploads/2014/09/650x350xvmlinuz-and-initrd-file-locations.png.pagespeed.ic.hB1yMlHMr2.png)
### 检查硬盘分区路径 ###
GRUB使用与Linux不同的“设备命名”结构。在Linux系统中/dev/sda0是硬盘上的第一个分区——**a**是指第一个硬盘,而**0**是指第一个分区。在GRUB中与/dev/sda0相对应的是(hd0,1)。**0**指第一个硬盘,而**1**则指它上面的第一个分区。换句话说在GRUB设备名中磁盘编号从0开始计数而分区编号则从1开始计数——是啊这真是突然令人困惑。例如(hd3,6)是指第四磁盘上的第六分区。
GRUB使用与Linux不同的“设备命名”方式。在Linux系统中/dev/sda0是硬盘上的第一个分区——**a**是指第一个硬盘,而**0**是指第一个分区。在GRUB中与/dev/sda0相对应的是(hd0,1)。**0**指第一个硬盘,而**1**则指它上面的第一个分区。换句话说在GRUB设备名中磁盘编号从0开始计数而分区编号则从1开始计数——是啊这真是突然令人困惑。例如(hd3,6)是指第四磁盘上的第六分区。
你可以使用**fdisk -l**命令来查看该信息。在Ubuntu上打开终端并运行以下命令
@ -34,7 +34,7 @@ GRUB使用与Linux不同的“设备命名”结构。在Linux系统中/dev/s
### 创建GRUB2启动条目 ###
添加自定义启动条目的最简单的方式是编辑/etc/grub.d/40_custom脚本该文件设计用于用户自行添加启动条目。在编辑该文件后/etc/defaults/grub文件和/etc/grub.d/脚本的内容将合成创建/boot/grub/grub.cfg文件——你不应该手工编辑该文件。它设计用于通过你在其它文件指定的设置自动生成。
添加自定义启动条目的最简单的方式是编辑/etc/grub.d/40_custom脚本该文件设计用于用户自行添加启动条目。在编辑该文件后/etc/defaults/grub文件和/etc/grub.d/脚本的内容将合成创建/boot/grub/grub.cfg文件——你不应该手工编辑这个文件。它被设计为通过你在另外的文件中指定的设置自动生成。
你需要以root特权打开/etc/grub.d/40_custom文件来编辑。在Ubuntu上你可以通过打开终端窗口并运行以下命令来完成
@ -48,22 +48,22 @@ GRUB使用与Linux不同的“设备命名”结构。在Linux系统中/dev/s
这里为你展示了怎样来从ISO文件启动Ubuntu或基于Ubuntu的发行版我们在Ubuntu 14.04下作了测试:
menuentry “Ubuntu 14.04 ISO” {
set isofile=”/home/name/Downloads/ubuntu-14.04.1-desktop-amd64.iso”
menuentry "Ubuntu 14.04 ISO" {
set isofile="/home/name/Downloads/ubuntu-14.04.1-desktop-amd64.iso"
loopback loop (hd0,1)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash
initrd (loop)/casper/initrd.lz
}
自定义启动条目以包含你期望的菜单的条目名称,计算机上到ISO文件的正确路径以及包含ISO文件的硬盘和分区设备名。如果vmlinuz和initrd文件的名称或路径不同请为这些文件指定正确的路径。
自定义启动条目以包含你期望的菜单的条目名称,并指定计算机上该ISO文件的正确路径以及包含ISO文件的硬盘和分区设备名。如果vmlinuz和initrd文件的名称或路径不同请为这些文件指定正确的路径。
(如果你有一个独立的/home/分区,忽略/home位像这样**set isofile=”/name/Downloads/${isoname}”**)。
(如果你的/home/ 目录是一个分区,请忽略/home部分像这样**set isofile="/name/Downloads/${isoname}"**)。
**重要说明**不同的Linux版本要求带有不同启动选项的不同的启动条目GRUB Live ISO多启动项目提供了[用于不同Linux发行版的菜单条目][6]的各种不同类型。你应当可以为你想要启动的ISO文件调整这些示例菜单条目。你也可以仅仅从网页搜索你想要启动的Linux发行版的名称和发行编号并附带关键词“在GRUB中从ISO启动”以获取更多信息。
**重要说明**不同的Linux版本要求带有不同启动选项的不同的启动条目GRUB Live ISO多启动项目提供了[用于不同Linux发行版的菜单条目][6]的各种不同类型。你应当为你想要启动的ISO文件调整这些示例菜单条目。你也可以仅仅从网页搜索你想要启动的Linux发行版的名称和发行编号并附带关键词“在GRUB中从ISO启动”以获取更多信息。
![](http://cdn8.howtogeek.com/wp-content/uploads/2014/09/650x392xadd-a-linux-iso-file-to-grub-boot-loader.png.pagespeed.ic.2FR0nOtugC.png)
如果你想要添加更多ISO启动选项请为该文件添加额外章节
如果你想要添加更多ISO启动选项请为该文件添加额外部分
完成后保存文件,返回终端窗口并运行以下命令:
@ -73,7 +73,7 @@ GRUB使用与Linux不同的“设备命名”结构。在Linux系统中/dev/s
再次启动计算机时你将看到ISO启动条目你可以选择它来启动ISO文件。在启动时你可能需要按Shift键来显示GRUB菜单。
如果在尝试启动ISO文件时你看见错误信息或黑屏那么你的启动条目配置不管怎么说配置错误了。即使ISO文件路径和设备名是正确的ISO文件上的vmlinuz和initrd文件的路径可能是不正确的或者你启动Linux系统可能需要不同的选项。
如果在尝试启动ISO文件时你看见错误信息或黑屏那么你的启动条目配置肯定配置错误了。即使ISO文件路径和设备名是正确的ISO文件上的vmlinuz和initrd文件的路径可能是不正确的或者你启动Linux系统可能需要不同的选项。
--------------------------------------------------------------------------------
@ -81,7 +81,7 @@ via: http://www.howtogeek.com/196933/how-to-boot-linux-iso-images-directly-from-
作者:[Chris Hoffman][a]
译者:[GOLinux](https://github.com/GOLinux)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,11 +1,29 @@
Linux有问必答——如何在Linux命令行中刻录ISO或NRG镜像到DVD
Linux有问必答如何在Linux命令行中刻录ISO或NRG镜像到DVD
================================================================================
> **问题**我需要在Linux盒子上使用DVD刻录机刻录一个镜像文件.iso或.nrg到DVD有没有一个既快捷又简易的方法最好是使用命令行工具
> **问题**我需要在Linux机器上使用DVD刻录机刻录一个镜像文件.iso或.nrg到DVD有没有一个既快捷又简易的方法最好是使用命令行工具
最常见的两种镜像文件格式是ISO.iso为文件扩展名和NRG.nrg为文件扩展名。ISO格式是一个由ISO国际标准组织创立的全球标准因此被大多数操作系统所支持它提供了很高的便携性。另一方面NRG格式是由Nero AG开发的私有格式Nero AG是一个很大众的磁盘镜像和刻录软件公司。
最常见的两种镜像文件格式是ISO.iso为文件扩展名和NRG.nrg为文件扩展名。ISO格式是一个由ISO国际标准组织创立的全球标准因此被大多数操作系统所支持它提供了很高的便携性。另一方面NRG格式是由Nero AG开发的私有格式Nero AG是一个很流行的磁盘镜像和刻录软件公司。
下面来解答怎样从Linux命令行刻录.iso或.nrg镜像到DVD。
### 刻录.ISO镜像文件到DVD
要刻录.iso镜像文件到DVD我们将使用**growisofs**这个工具:
# growisofs -dvd-compat -speed=4 -Z /dev/dvd1=WindowsXPProfessionalSP3Original.iso
在上面的命令行中,“-dvd-compat”选项提供了与DVD-ROM/-Video的最大介质兼容性。在一次写入式 DVD+R 或 DVD-R 上下文中,导致不可添加记录(关闭磁盘)。
“-Z /dev/dvd1=filename.iso”选项表示我们刻录.iso文件到设备选单/dev/dvd1中选择的介质中。
“-speed=N”参数指定了DVD刻录机的刻录速度这与驱动自身的能力直接相关。“-speed=8”将以8x刻录“-speed=16”将以16x刻录以此类推。没有该参数growisofs将默认以最低速刻录在这里是4x。你可以根据你刻录机的可用速度和磁盘类型选择合适的刻录速度。
你可以根据[此教程][2]找出你的DVD刻录机的设备名称和它所支持的写入速度。
![](https://farm3.staticflickr.com/2947/15510172352_5c09c2f495_z.jpg)
刻录进程完成后,磁盘会自动弹出。
### 把NRG镜像转换为ISO格式 ###
由于ISO被广为采用刻录.iso镜像到CD/DVD就非常简单。但是要刻录一个.nrg镜像则首先需要将它转换为.iso格式。
@ -32,27 +50,8 @@ Linux有问必答——如何在Linux命令行中刻录ISO或NRG镜像到DVD
![](https://farm4.staticflickr.com/3945/15323823510_c933d7710f_z.jpg)
### 刻录.ISO镜像文件到DVD ###
为了刻录.iso镜像文件到DVD我们将使用**growisofs**这个工具:
# growisofs -dvd-compat -speed=4 -Z /dev/dvd1=WindowsXPProfessionalSP3Original.iso
在上面的命令行中,“-dvd-compat”选项提供了与DVD-ROM/-Video的最大介质兼容性。在一次写入式 DVD+R 或 DVD-R 上下文中,导致不可添加记录(关闭磁盘)。
“-Z /dev/dvd1=filename.iso”选项表示我们刻录.iso文件到设备选单/dev/dvd1中选择的介质中。
“-speed=N”参数指定了DVD刻录机的刻录速度这与驱动自身的能力直接相关。“-speed=8”将以8x刻录“-speed=16”将以16x刻录以此类推。没有该参数growisofs将默认以最低速刻录在这里是4x。你可以根据你刻录机的可用速度和磁盘类型选择合适的刻录速度。
你可以根据[此教程][2]找出你的DVD刻录机的设备名称和它所支持的写入速度。
此文在另一篇原文中20141014 Linux FAQs with Answers--How to detect DVD writer' s device name and its writing speed from the command line on Linux.md如果也翻译发布了可修改此链接.
校对注:这篇的原文还没翻译,翻译完一起发布
![](https://farm3.staticflickr.com/2947/15510172352_5c09c2f495_z.jpg)
刻录进程完成后,磁盘会自动弹出。
### 检查已刻录介质的完整性 ###
###检查已刻录介质的完整性###
关于这一点你可以通过将刻录的DVD的校验和与原始.iso文件的md5校验和进行对比以检查所刻录介质的完整性。如果两者相同你就可以放心了因为刻录成功了。
@ -78,4 +77,4 @@ via: http://ask.xmodulo.com/burn-iso-nrg-image-dvd-command-line.html
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://xmodulo.com/how-to-set-up-rpmforge-repoforge-repository-on-centos.html
[2]:http://ask.xmodulo.com/detect-dvd-writer-device-name-writing-speed-command-line-linux.html
[2]:http://linux.cn/article-4081-1.html

View File

@ -1,14 +1,14 @@
Linux 有问必答-- 如何使用Linux命令行检测DVD刻录机的名字和它的读写速度
Linux有问必答:如何使用Linux命令行检测DVD刻录机的名字和读写速度
================================================================================
> **提问**我想要知道我的DVD刻录机的名字和在烧录时的速度。该使用什么Linux命令行工具来连测DVD刻录机的设备名和速度
如今大多数消费PC和笔记本电脑都配备了DVD刻录机。在Linux中光盘驱动器如CD/ DVD驱动器的名字是在引导时内核基于udev规则来命名的。有几种方法来检测刻录机的设备名称和它的写入速度。
如今大多数消费PC和笔记本电脑都配备了DVD刻录机。在Linux中光盘驱动器如CD/DVD驱动器的名字是在引导时内核基于udev规则来命名的。有几种方法来检测刻录机的设备名称和它的写入速度。
### 方法一 ###
找出与DVD刻录机相关的设备名称最简单的方法是使用dmesg命令行工具它打印出内核的消息缓冲区。在dmesg的输出中寻找一个潜在的DVD刻录机
$ dmesg | egrep -i --color 'dvd|cd/rw|writer'
找出与DVD刻录机相关的设备名称最简单的方法是使用dmesg命令行工具它打印出内核的消息缓冲区。在dmesg的输出中寻找一个安装好的DVD刻录机
$ dmesg | egrep -i --color 'dvd|cd/rw|writer'
![](https://farm6.staticflickr.com/5603/15505432622_0bfec51a8f_z.jpg)
@ -98,13 +98,13 @@ $ dmesg | egrep -i --color 'dvd|cd/rw|writer'
![](https://farm6.staticflickr.com/5597/15324137650_91dbf458ef_z.jpg)
** dvd+rw-mediainfo**工具探测插入的媒体本例中是“DVD-R”以找出对媒体的实际写入速度。
**dvd+rw-mediainfo**工具探测插入的媒体本例中是“DVD-R”以找出对媒体的实际写入速度。
--------------------------------------------------------------------------------
via: http://ask.xmodulo.com/detect-dvd-writer-device-name-writing-speed-command-line-linux.html
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,84 @@
Linux有问必答怎么用CheckInstall从源码创建一个RPM或DEB包
================================================================================
> **问题**:我想要从源码创建安装的软件包。有没有一种方式从源码来创建和安装软件包而不是运行“make install”这样的话以后如果我想我可以容易的卸载程序。
如果你已经从它的源码运行“make install”安装了linux程序。想完整移除它将变得真的很麻烦除非程序的开发者在Makefile里提供了uninstall的目标设置。否则你必须在安装前后比较你系统里文件的完整列表然后手工移除所有在安装过程中加入的文件。
这时候Checkinstall就可以派上使用。Checkinstall会跟踪install命令行所创建或修改的所有文件的路径(例如“make install”、“make install_modules”等)并建立一个标准的二进制包让你能用你发行版的标准包管理系统安装或卸载它例如Red Hat的yum或者Debian的apt-get命令。已知它在 Slackware、SuSe、Mandrake 和 Gentoo 上也工作很好,请参考其[官方文档][1]。
在这篇文章中我们只集中在红帽子和Debian为基础的发行版并展示怎样从源码使用Checkinstall创建一个RPM和DEB软件包
### 在linux上安装Checkinstall ###
在Debian及其衍生发行版上安装Checkinstall
# aptitude install checkinstall
在红帽子的发行版上安装Checkinstall你需要下载一个已经打包好的Checkinstall rpm包(例如:从 [http://rpm.pbone.net][2]找到)不过它已经从Repoforge库里删除了。这个包是针对Cent OS6的不过也可在Cent OS7里工作。
# wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/ikoinoba/CentOS_CentOS-6/x86_64/checkinstall-1.6.2-3.el6.1.x86_64.rpm
# yum install checkinstall-1.6.2-3.el6.1.x86_64.rpm
一旦checkinstall安装好你就可以用下列格式创建一个特定的软件包
# checkinstall <install-command>
如果没有参数默认安装命令“make install”将被使用
### 用Checkinstall创建一个RPM或DEB包 ###
在这个例子里我们将创建一个htop包这是一个linux交互式文本模式进程查看器类似 top
首先,让我们从项目的官方网站下载源代码,作为一个好的习惯,我们存储源码包到/usr/local/src下并解压它。
# cd /usr/local/src
# wget http://hisham.hm/htop/releases/1.0.3/htop-1.0.3.tar.gz
# tar xzf htop-1.0.3.tar.gz
# cd htop-1.0.3
让我们看看htop的安装命令是什么以便我们能用Checkinstall命令调用它如下面所示htop用“make install”命令安装。
# ./configure
# make install
因此要创建一个htop安装包我们可以不带任何参数的调用checkinstall这将使用“make install”命令创建一个包。在这个过程中 checkinstall命令会问你几个问题。
简而言之如下命令会创建一个htop包
# ./configure
# checkinstall
“Should I create a default set of package docs?我会创建一个默认设置的包文件回答“Y”
![](https://farm6.staticflickr.com/5577/15118597217_1fdd0e0346_z.jpg)
你可以输入一个包的简短描述,然后按两次回车:
![](https://farm4.staticflickr.com/3898/15118442190_604b71d9af.jpg)
输入一个数字以修改下面的任何值或ENTER继续
![](https://farm4.staticflickr.com/3898/15118442180_428de59d68_z.jpg)
然后checkinstall将自动地创建一个.rpm或者.deb包根据你的linux系统是什么
在CentOS7
![](https://farm4.staticflickr.com/3921/15282103066_5d688b2217_z.jpg)
在Debian 7:
![](https://farm4.staticflickr.com/3905/15118383009_4909a7c17b_z.jpg)
--------------------------------------------------------------------------------
via: http://ask.xmodulo.com/build-rpm-deb-package-source-checkinstall.html
译者:[luoyutiantang](https://github.com/luoyutiantang)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://checkinstall.izto.org/docs/README
[2]:http://rpm.pbone.net/
[3]:http://ask.xmodulo.com/install-htop-centos-rhel.html

View File

@ -1,3 +1,4 @@
Translating by ZTinoZ
Linus Torvalds Regrets Alienating Developers with Strong Language
================================================================================
> He didn't name anyone, but this sounds like an apology
@ -32,4 +33,4 @@ via: http://news.softpedia.com/news/Linus-Torvalds-Regrets-Alienating-Developers
[a]:http://news.softpedia.com/editors/browse/silviu-stahie
[1]:http://news.softpedia.com/news/Linus-Torvalds-Block-All-Code-from-Systemd-Developer-for-the-Linux-Kernel-435714.shtml
[2]:http://www.linux.com/news/featured-blogs/200-libby-clark/791788-linus-torvalds-best-quotes-from-linuxcon-europe-2014
[2]:http://www.linux.com/news/featured-blogs/200-libby-clark/791788-linus-torvalds-best-quotes-from-linuxcon-europe-2014

View File

@ -1,56 +0,0 @@
(translating by runningwater)
UbuTricks 14.10.08
================================================================================
> An Ubuntu utility that allows you to install the latest versions of popular apps and games
UbuTricks is a freely distributed script written in Bash and designed from the ground up to help you install the latest version of the most acclaimed games and graphical applications on your Ubuntu Linux operating system, as well as on various other Ubuntu derivatives.
![](http://i1-linux.softpedia-static.com/screenshots/UbuTricks_1.png)
### What apps can I install with UbuTricks? ###
Currently, the latest versions of the Calibre, Fotoxx, Geary, GIMP, Google Earth, HexChat, jAlbum, Kdenlive, LibreOffice, PCManFM, Qmmp, QuiteRSS, QupZilla, Shutter, SMPlayer, Ubuntu Tweak, Wine and XBMC (Kodi), PlayOnLinux, Red Notebook, NeonView, Sunflower, Pale Moon, QupZilla Next, FrostWire and RSSOwl applications can be installed with UbuTricks.
### What games can I install with UbuTricks? ###
In addition, the latest versions of the 0 A.D., Battle for Wesnoth, Transmageddon, Unvanquished and VCMI (Heroes III Engine) games can be installed with the UbuTricks program. Users can also install the latest version of the Cinnamon and LXQt desktop environments.
### Getting started with UbuTricks ###
The program is distributed as a .sh file (shell script) that can be run from the command-line using the “sh ubutricks.sh” command (without quotes) or make it executable and double-click it from your Home folder or desktop. All you have to do is to select and app or game and click the OK button to install it.
### How does it work? ###
When accessed for the first time, the program will display a welcome screen from the get-to, notifying users about how it actually works. There are three methods to install an app or game, via PPA, DEB file or source tarball. Please note that apps and games will be automatically downloaded and installed.
### What distributions are supported? ###
Several versions of the Ubuntu Linux operating systems are supported, but if not specified, it will default to the current stable version, Ubuntu 14.04 LTS (Trusty Tahr). At the moment, the program will not work if you dont have the gksu package installed on your Ubuntu box. It is based on Zenity, which should be installed too.
![](http://i1-linux.softpedia-static.com/screenshots/UbuTricks_2.jpg)
- last updated on:October 9th, 2014, 11:29 GMT
- price:FREE!
- developed by:Dan Craciun
- homepage:[www.tuxarena.com][1]
- license type:[GPL (GNU General Public License)][3]
- category:ROOT \ Desktop Environment \ Tools
### Download for UbuTricks: ###
- [ubutricks.sh][2]
--------------------------------------------------------------------------------
via: http://linux.softpedia.com/get/Desktop-Environment/Tools/UbuTricks-103626.shtml
作者:[Marius Nestor][a]
译者:[runningwater](https://github.com/runningwater)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.softpedia.com/editors/browse/marius-nestor
[1]:http://www.tuxarena.com/apps/ubutricks/
[2]:http://www.tuxarena.com/intro/files/ubutricks.sh
[3]:http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -0,0 +1,52 @@
6 Minesweeper Clones for Linux
================================================================================
### GNOME Mines ###
This is the GNOME Minesweeper clone, allowing you to choose from three different pre-defined table sizes (8×8, 16×16, 30×16) or a custom number of rows and columns. It can be ran in fullscreen mode, comes with highscores, elapsed time and hints. The game can be paused and resumed.
![](http://www.tuxarena.com/wp-content/uploads/2014/10/gnome-mines1.jpg)
### ace-minesweeper ###
This is part of a package that contains some other games too, like ace-freecel, ace-solitaire or ace-spider. It has a graphical interface featuring Tux, but doesnt seem to come with different table sizes. The package is called ace-of-penguins in Ubuntu.
![](http://www.tuxarena.com/wp-content/uploads/2014/10/ace-minesweeper.jpg)
### XBomb ###
XBomb is a mines game for the X Window System with three different table sizes and tiles which can take different shapes: hexagonal, rectangular (traditional) or triangular. Unfortunately the current version in Ubuntu 14.04 crashes with a segmentation fault, so you may need to install another version to make it work.
[Homepage][1]
![](http://www.tuxarena.com/wp-content/uploads/2014/10/xbomb.png)
([Image credit][1])
### KMines ###
KMines is the a KDE game, and just like GNOME Mines, there are three built-in table sizes (easy, medium, hard) and custom, support for themes and highscores.
![](http://www.tuxarena.com/wp-content/uploads/2014/10/kmines.jpg)
### freesweep ###
Freesweep is a Minesweeper clone for the terminal which allows you to configure settings such as table rows and columns, percentage of bombs, colors and also has a highscores table.
![](http://www.tuxarena.com/wp-content/uploads/2014/10/freesweep.jpg)
### xdemineur ###
Another graphical Minesweeper clone for X, Xdemineur is very much alike Ace-Minesweeper, with one predefined table size.
![](http://www.tuxarena.com/wp-content/uploads/2014/10/xdemineur.jpg)
--------------------------------------------------------------------------------
via: http://www.tuxarena.com/2014/10/6-minesweeper-clones-for-linux/
作者Craciun Dan
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.gedanken.org.uk/software/xbomb/

View File

@ -1,54 +0,0 @@
**Translating by jabirus...**
The People Who Support Linux: Hacking on Linux Since Age 16
================================================================================
一个 Linux 支持者:从 16 岁开始在 Linux 上 hack
================================================================================
![](http://www.linux.com/images/stories/41373/Yitao-Li.png)
>Pretty much all of the projects in software developer [Yitao Li's GitHub repository][1] were developed on his Linux machine. None of them are necessarily Linux-specific, he says, but he uses Linux for “everything.”
在软件开发者[李逸韬的 GitHub 仓库][1]中,相当多的项目是在他的 Linux 机器上完成的。它们没有一个是必须特定需要 Linux 的,但李逸韬说他使用 Linux 来做”任何事情“。
For example: “coding / scripting, web browsing, web hosting, anything cloud-related, sending / receiving PGP signed emails, tweaking IP table rules, flashing OpenWrt image into routers, running one version of Linux kernel while compiling another version, doing research, doing homework (e.g., typing math equations in Tex), and many others...” Li said via email.
Of all the projects in his repository his favorite is a school project developed in C++ with libpthread and libfuse to understand and correctly implement PAXOS-based distributed locking, key-value service, and eventually a distributed filesystem. He tested it using a number of test scripts on both single-core and multi-core machines.
“One can learn something about distributed consensus protocol by implementing the PAXOS protocol correctly (or at least mostly correctly) such that the implementation will pass all the tests,” he said. “And of course once that is accomplished, one can also earn some bragging rights. Besides, a distributed filesystem can be useful in many other programming projects.”
Li first started using Linux at age 16, or about 7.47 years ago, he says, using the website [linuxfromscratch.org][2], with numerous hints from the free, downloadable Linux From Scratch book. Why?
“1. Linux is very hacker-friendly and I do not see any reason for not using it,” he writes. “2. The prefrontal cortex of the brain becoming well-developed at age 16 (?).”
[![](http://www.linux.com/images/stories/41373/ldc_peop_linux.png)][3]
He now works for eBay, mostly coding in Java but working sometimes with Hadoop, Pig, Zookeeper, Cassandra, MongoDB, and other software that requires a POSIX-compliant platform. He supports the Linux community by contributing to Wikipedia pages and forums on Linux-related subjects. And by becoming an individual member of The Linux Foundation.
He keeps up with the latest Linux developments and has recently been impressed by the new "-fstack-protector-strong" option for GCC 4.9 and later.
“It's not directly related to any of my projects, but it was important for both security and performance reasons,” he said. “It's much more efficient than "-fstack-protector-all" with little impact on security, while providing better stack-overflow protection coverage compared to that of the "-fstack-protector" option.”
Welcome to the Linux Foundation Yitao!
Learn more about becoming an [individual member of The Linux Foundation][3]. The foundation will donate $25 to Code.org for every new individual member who joins during June.
----------
![](http://www.linux.com/community/forums/avatar/41373/catid/200-libby-clark/thumbnail/large/cache/1331753338)
[Libby Clark][4]
--------------------------------------------------------------------------------
via: http://www.linux.com/news/featured-blogs/200-libby-clark/778559-the-people-who-support-linux-hacking-on-linux-since-age-16
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://github.com/yl790
[2]:http://linuxfromscratch.org/
[3]:https://www.linuxfoundation.org/about/join/individual
[4]:http://www.linux.com/community/forums/person/41373/catid/200-libby-clark

View File

@ -1,3 +1,4 @@
zpl1025
Don't Fear The Command Line
================================================================================
![](http://a4.files.readwrite.com/image/upload/c_fill,h_900,q_70,w_1600/MTE5NTU2MzIyNTM0NTg5OTYz.jpg)
@ -134,4 +135,4 @@ via: http://readwrite.com/2014/07/18/command-line-tutorial-intro
[9]:http://lifehacker.com/5633909/who-needs-a-mouse-learn-to-use-the-command-line-for-almost-anything
[10]:http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line
[11]:http://readwrite.com/2013/09/30/understanding-github-a-journey-for-beginners-part-1
[12]:http://en.wikipedia.org/wiki/Computer_terminal#mediaviewer/File:DEC_VT100_terminal.jpg
[12]:http://en.wikipedia.org/wiki/Computer_terminal#mediaviewer/File:DEC_VT100_terminal.jpg

View File

@ -1,52 +0,0 @@
zpl1025
Will Linux ever be able to give consumers what they want?
================================================================================
> Jack Wallen offers up the novel idea that giving the consumers what they want might well be the key to boundless success.
![](http://tr2.cbsistatic.com/hub/i/r/2014/08/14/ce90a81e-d17b-4b8f-bd5b-053120e305e6/resize/620x485/f5f9e0798798172d4e41edbedeb6b7e5/whattheyneedhero.png)
In the world of consumer electronics, if you don't give the buyer what they want, they'll go elsewhere. We've recently witnessed this with the Firefox browser. The consumer wanted a faster, less-bloated piece of software, and the developers went in the other direction. In the end, the users migrated to Chrome or Chromium.
Linux needs to gaze deep into their crystal ball, watch carefully the final fallout of that browser war, and heed this bit of advice:
If you don't give them what they want, they'll leave.
Another great illustration of this backfiring is Windows 8. The consumer didn't want that interface. Microsoft, however, wanted it because it was necessary to begin the drive to all things Surface. This same scenario could have been applied to Canonical and Ubuntu Unity -- however, their goal wasn't geared singularly and specifically towards tablets (so, the interface was still highly functional and intuitive on the desktop).
For the longest time, it seemed like Linux developers and designers were gearing everything they did toward themselves. They took the "eat your own dog food" too far. In that, they forgot one very important thing:
Without new users, their "base" would only ever belong to them.
In other words, the choir had not only been preached to, it was the one doing the preaching. Let me give you three examples to hit this point home.
- For years, Linux has needed an equivalent of Active Directory. I would love to hand that title over to LDAP, but have you honestly tried to work with LDAP? It's a nightmare. Developers have tried to make LDAP easy, but none have succeeded. It amazes me that a platform that has thrived in multi-user situations still has nothing that can go toe-to-toe with AD. A team of developers needs to step up, start from scratch, and create the open-source equivalent to AD. This would be such a boon to mid-size companies looking to migrate away from Microsoft products. But until this product is created, the migration won't happen.
- Another Microsoft-driven need -Exchange/Outlook. Yes, I realize that many are going to the cloud. But the truth is that mediumto large-scale businesses will continue relying on the Exchange/Outlook combo until something better comes along. This could very well happen within the open-source community. One piece of this puzzle is already there (though it needs some work) -the groupware client, Evolution. If someone could take, say, a fork of Zimbra and re-tool it such a way that it would work with Evolution (and even Thunderbird) to serve as a drop-in replacement for Exchange, the game would change, and the trickle-down to consumers would be massive.
- Cheap, cheap, cheap. This one is a hard pill for most to swallow -but consumers (and businesses) want cheap. Look at the Chromebook sales over the last year. Now, do a search for a Linux laptop and see if you can find one for under $700.00 (USD). For a third of that cost, you can get a Chromebook (a platform running the Linux kernel) that will serve you well. But because Linux is still such a niche market, it's hard to get the cost down. A company like Red Hat Linux could change that. They already have the server hardware in place. Why not crank out a bunch of low-cost, mid-range laptops that work in similar fashion to the Chromebook but only run a full-blown Linux environment? (see "[Is the Cloudbook the future of Linux?][1]") The key is that these devices must be low-cost and meet the needs of the average consumer. Stop thinking with your gamer/developer hat on and remember what the average user really needs -a web browser and not much more. That's why the Chromebook is succeeding so handily. Google knew exactly what the consumer wanted, and they delivered. On the Linux front, companies still think the only way to attract buyers is to crank out high-end, expensive Linux hardware. There's a touch of irony there, considering one of the most-often shouted battle cries is that Linux runs on slower, older hardware.
Finally, Linux needs to take a page from the good ol' Book Of Jobs and figure out how to convince the consumer that what they truly need is Linux. In their businesses and in their homes -- everyone can benefit from using Linux. Honestly, how can the open-source community not pull that off? Linux already has the perfect built-in buzzwords: Stability, reliability, security, cloud, free -- plus Linux is already in the hands of an overwhelming amount of users (they just don't know it). It's now time to let them know. If you use Android or Chromebooks, you use (in one form or another) Linux.
Knowing just what the consumer wants has always been a bit of a stumbling block for the Linux community. And I get that -- so much of the development of Linux happens because a developer has a particular need. This means development is targeted to a "micro-niche." It's time, however, for the Linux development community to think globally. "What does the average user need, and how do we give it to them?" Let me offer up the most basic of primers.
The average user needs:
- Low cost
- Seamless integration with devices and services
- Intuitive and modern designs
- A 100% solid browser experience
That's pretty much it. With those four points in mind, it should be easy to take a foundation of Linux and create exactly what the user wants. Google did it... certainly the Linux community can build on what Google has done and create something even better. Mix that in with AD integration, give it an Exchange/Outlook or cloud-based groupware set of tools, and something very special will happen -- people will buy it.
Do you think the Linux community will ever be able to give the consumer what they want? Share your opinion in the discussion thread below.
--------------------------------------------------------------------------------
via: http://www.techrepublic.com/article/will-linux-ever-be-able-to-give-consumers-what-they-want/
作者:[Jack Wallen][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.techrepublic.com/search/?a=jack+wallen
[1]:http://www.techrepublic.com/article/is-the-cloudbook-the-future-of-linux/

View File

@ -0,0 +1,115 @@
Calculate Linux Provides Consistency by Design
================================================================================
![](http://www.linuxinsider.com/ai/120560/linux-desktop-kde-xfce.jpg)
> Calculate Linux has a rather interesting strategy for desktop environments. It is characterized by two flavors with the same look and feel. That does not mean that the inherent functionality of the KDE and Xfce desktops are compromised. Rather, the Calculate Linux developers did what you seldom see within a Linux distribution with more than one desktop option: They unified the design.
Calculate Linux 14 is a distribution designed with home and SMB users in mind. It is optimized for rapid deployment in corporate environments as well.
Calculate gives users something no other Linux distro makes possible. The Xfce desktop session is customized to imitate the look of the [KDE][1] desktop environment.
This design approach goes a long way toward making Calculate Linux a one-distro-fits-all solution. Individual users or entire departments within an organization can fine-tune user preferences and features without changing the common appearance or performance.
Calculate Linux 14, developed by Alexander Tratsevskiy in Russia, is not your typical cookie-cutter type of Linux OS. This latest version, released Sept. 5, is a rolling-release distribution that provides a number of preconfigured features.
It uses a source-based approach to package management to optimize the software. This in part comes from its roots as a Gentoo Linux-based distribution.
Calculate Linux comes in three more versions to expand its reach. Calculate Directory Server is for servers, and Calculate Linux Scratch for building customized systems. The Calculate Media Center is a distro to run a home multimedia center.
### What's New ###
This latest version of Calculate ships with a few new features, including notification of software updates and an improved administration panel.
This release adds an improved graphical user interface for Calculate Utilities. It also provides various kernel and other software package updates.
It comes in 32-bit or 64-bit builds that include two desktop options for personal/business use: KDE and Xfce. A boot menu lets users choose to run the Calculate live desktop environment from RAM for added performance or with a command line interface only.
Why two choices? Users get better performance on low-end computers using the lightweight desktop environment that comes with Xfce. This is the second release containing this option. It solves the problem of not being able to run the KDE edition of Calculate Linux on underpowered hardware.
### Designing Details ###
Calculate Linux has a rather interesting strategy for desktop environments. It is characterized by two flavors with one common design.
That does not mean that the inherent functionality of the KDE and Xfce desktops are compromised. Rather, the Calculate Linux developers did what you seldom see within a Linux distribution with more than one desktop option.
Typically, KDE by design is much more animation based. By design, Xfce has fewer visual frills in keeping with its lightweight philosophy. Most KDE distributions place the panel bar at the bottom and do not have a Docky-style launcher anywhere in the desktop decor.
In Calculate Linux, a classic style application menu, task switcher and system tray are configured at the top of the screen in both desktop versions. At the bottom of the display, there is a hidden quick-launch bar that pops up when the mouse pointer strays toward the lower edge of the screen.
> ![](http://www.linuxinsider.com/article_images/2014/81242_990x557.jpg)
> Calculate Linux has a unified design that makes KDE and Xfce desktops look nearly the same. The panel and menu display are very nontraditional as seen in this KDE desktop view.
This duality ties the two desktops together. Both the KDE and the Xfce versions have right-click access to some of the most commonly used system commands and features.
### Look and Feel ###
Whether you run the KDE or the Xfce desktops, the panel design is the same. The menu falls from the top left corner as a single box with the same categories in both versions.
> ![](http://www.linuxinsider.com/article_images/2014/81242_990x540.jpg)
> The Xfce desktop in Calculate Linux is almost totally indistinguishable from its KDE counterpart.
Hover the mouse over the right edge of the menu box to see the category contents slide out to the right of the box. Only then do you see a varying range of applications to launch with a click.
The same operation governs the popup launcher bar hidden at the bottom of the screen. Some of the offerings are desktop-specific, however.
> ![](http://www.linuxinsider.com/article_images/2014/81242_990x556.jpg)
> Calculate Linux embeds a popup launch dock in both the KDE and Xfce desktop editions.
For example, the bottom dock in both desktop versions launches the Chromium Web browser, [LibreOffice][3], GIMP, SMPlayer and Leafpad (simple text editor). The KDE dock launches kcalc, digikam, Amarok and k3b disk burner. Xfce launches Galculator, Clementine and xfburn.
### Designed to Differ ###
One difference is the KDE version has an added button where expected along the upper right edge of the screen. It also has a Widgets button near the far right end of the top panel.
These provide access to the activities layout where you choose the style of desktop typical of KDE. These are: Grid, Newspaper, Folder, Grouping and Search & Launch.
A second style difference between the two desktop versions is the inclusion of widgets with the KDE version. These desktop widgets personalize the desktop items.
### Feature Folly ###
The Calculate Desktop edition, both KDE and Xfce, creates a user profile when it loads. This profile is fully integrated with Calculate Directory Server. Roaming profiles also are supported. Auto-tuning applications at logon are based on the server settings.
The approach greatly simplifies the setup and maintenance roles for users with no IT department to support the computer system. The desktop version functions simply as a standalone operating system. No server is needed. However, enterprise and SMB environments can pair the desktop version with the server version for seamless integration.
Either way, the common set of toolbars, desktop applications and basic settings are easier to configure for desktop and server use, regardless of the desktop environment choice.
You can install Calculate Linux on a USB thumb drive or a USB hard drive with a choice of these volume formats: ext4, ext3, ext2, reiserfs, btrfs, xfs, jfs, nilfs2 or fat32.
### Gentler Gentoo ###
The Gentoo distro in its own right installs applications compiled from source. It uses a software packaging system called "Portage" to semi-automate this process. It also uses the command-line compiling system run by Emerge.
Calculate's developers soften this Gentoo-based software compiling process somewhat, but it is still more complex than using a community-managed automated software binary repository.
Calculate Linux is fully compatible with Gentoo repositories and support for binary repository updates. System files are updated via Portage throughout the distribution life cycle.
### Bottom Line ###
Calculate Linux is a well-tooled Linux distro that makes consistency in design job number one. It is highly configurable and is optimized for nearly every computing circumstance.
It runs a full-blown KDE desktop on upper-end hardware, and provides the same look and feel with Xfce on low-end gear. Calculate Linux runs from a hard drive installation or by loading directly into RAM.
It could offer home and SMB users an effective distro alternative. However, typical for Gentoo-based distros, Calculate Linux's weak point is the lack of a full-fledged binary software repository system.
### Want to Suggest a Review? ###
Is there a Linux software application or distro you'd like to suggest for review? Something you love or would like to get to know?
Please [email your ideas to me][4], and I'll consider them for a future Linux Picks and Pans column.
And use the Talkback feature below to add your comments!
--------------------------------------------------------------------------------
via: http://www.linuxinsider.com/story/Calculate-Linux-Provides-Consistency-by-Design-81242.html
作者Jack M. Germain
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.calculate-linux.org/
[2]:http://www.kde.org/
[3]:http://www.libreoffice.org/
[4]:jack.germain@newsroom.ectnews.com

View File

@ -1,130 +0,0 @@
alim0x translating
The history of Android
================================================================================
![Android 1.5s on-screen keyboard showing the suggestion bar while typing, the capital letters keyboard, the number and symbols screen, and an additional key popup.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/kb5.png)
Android 1.5s on-screen keyboard showing the suggestion bar while typing, the capital letters keyboard, the number and symbols screen, and an additional key popup.
Photo by Ron Amadeo
### Android 1.5, Cupcake—a virtual keyboard opens up device design ###
In April 2009, almost three months after the release of 1.1, Android 1.5 was released. It was the first Android version to have a public, marketed code name: Cupcake. From here on out, Android releases would have alphabetical, snack-themed names.
The most important Cupcake addition was easily the on-screen keyboard. For the first time, it was possible for OEMs to build a slate-style Android device without a thousand hardware keyboard keys and a complicated slide mechanism.
Android's key labels could switch between uppercase and lowercase, depending on if caps lock was on or not. While it was off by default, there was an option to turn on the suggestion bar, which appeared along the top edge of the keyboard. Keys with ellipses in the popup, like the "u," above, could be held down to input [diacritical marks][1], which would display in a popup. The keyboard could switch to numbers and alternate characters, and long pressing on the period key would bring up even more punctuation.
![Composite images of the app lineup in 1.5 and 1.1 and the notification panels from each version.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/abweave.png)
Composite images of the app lineup in 1.5 and 1.1 and the notification panels from each version.
Photo by Ron Amadeo
New icons were added for the new "Camcorder" functionality, and Google Talk was broken out from IM into its own separate app. The Amazon MP3 and Browser icons were redesigned, too. The Amazon MP3 icon was changed primarily because Amazon was planning on launching other Android apps soon, and the "A" icon was far too generic. The browser icon was easily the worst in Android 1.1, so it was changed and no longer resembled a desktop OS dialog box. The last app drawer change was to "Pictures," which was renamed to "Gallery."
The notification panel was redesigned again as well. The panel background got a weave texture, and the gradients on notifications were smoothed out. Android 1.5 had a lot of little design changes to core OS pieces that affected all apps. On the "Clear notifications" button, you could see the new system-wide button style, which had a gradient, a thinner outline, and less shadowing than the old version.
![The “Add to Home" dialog boxes in 1.5 and 1.1.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/widget.png)
The “Add to Home" dialog boxes in 1.5 and 1.1.
Photo by Ron Amadeo
Third-party widgets were another headline feature of Cupcake, and they still remain one of Android's defining features. Developers could bundle a home screen widget along with their apps that would either control or display information from that app. Google showed off a few new widgets of its own, too, with the Calendar and Music apps.
![Left: a screenshot of the calendar widget, music widget, and a row of live folders. Center: the folder list. Right: an open view of the “contacts with phone numbers" live folder.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/folders-and-widgets-and-stuff.png)
Left: a screenshot of the calendar widget, music widget, and a row of live folders. Center: the folder list. Right: an open view of the “contacts with phone numbers" live folder.
Photo by Ron Amadeo
On the left screenshot, above, you can see the new Calendar and Music icons. The Calendar widget could only show a single event for the day, and tapping it would open the calendar. It wouldn't let you choose what calendars to display, and widgets weren't resizable—it only ever looked like this. The music widget was blue—despite the music app not having a drop of blue in it—and showed the song and artist name, along with play and next buttons.
Also in the left shot, the first three folders on the bottom row were a new feature called "Live Folders." These were accessible under the new top-level "Folders" section in the "Add to Home" menu, which you can see in the center picture. Live Folders showed the content of an application without having to open that application. The ones that came with Cupcake were all contacts-related, showing all of the user's contacts, contacts with phone numbers, or starred contacts.
Rather than icons, Live Folders used a simple list view that popped up over the home screen. Contacts were just for starters, Live Folders was a whole API that developers could use. Google demoed a folder of books from the Google Books app, and it was possible to have an RSS feed or top stories from a website as a live folder. Live folders were one of the few Android ideas that didn't work out, and the feature was shut down in Honeycomb.
![The camcorder and camera UI, with on-screen shutter buttons.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/device-2013-12-26-11016071.png)
The camcorder and camera UI, with on-screen shutter buttons.
Photo by Ron Amadeo
If you couldn't tell from the new "Camcorder" icon, video recording was added to Android in 1.5. The two icons, camera and camcorder, were actually the same app, and you could jump between the two of them with an option in the menu labeled "Switch to camera" and "Switch to camcorder." Video quality on the T-Mobile G1 was not that great. A test video on "High" quality output; a .3GP video file with a resolution of 352 x 288 and a lagtastic frame rate of 4 FPS.
Along with the new video feature, the Camera app saw a few much-needed UI tweaks. A thumbnail in the top left showed the last picture that was taken, and tapping on it would jump to the camera roll in the Gallery. The circle icon on the top right of both screens was an on-screen shutter button, meaning that, post 1.5, Android devices no longer required a hardware camera button.
This interface was actually much closer to the Android 4.2 design than many of the subsequent camera apps. While later designs would add silly leather textures and more controls to the camera, Android went back to basics with later designs, and that 4.2 redesign shares a lot in common with this. What was a primitive layout in Android 1.5 became a minimal, full-screen viewfinder in Android 4.2.
![Google Talk running in the Google Talk app versus Google Talk running in the IM app.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/gtalk-im.png)
Google Talk running in the Google Talk app versus Google Talk running in the IM app.
Photo by Ron Amadeo
Android 1.0's IM app was used for Google Talk functionality, but in Android 1.5, Google Talk was broken off into its own app. Support for it in the IM app was removed. Google Talk (above, left) was clearly based on the IM app (above, right), but as soon as the stand alone app was released in 1.5, work on the IM app was abandoned.
The new Google Talk app had a redesigned status bar, presence lights on the right side, and a redesigned mobile icon, which was a gray monogram of the bugdroid. The blue compose bar switched to a more sensible gray in the chat view, and the message backgrounds changed from light green and white to light green and green. With a stand alone app, Google could add Gtalk-only features like chatting "off the record," which would stop Gmail from saving a copy of every chat.
![The calendar in Android 1.5 got a lot lighter.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/cal15.png)
The calendar in Android 1.5 got a lot lighter.
Photo by Ron Amadeo
The calendar dumped the ugly white squares on a black background and changed to an all-light app. The background of everything became white, and day-of-the-week headers were changed to blue. The individual appointment blocks switched from a small color strip to entirely colored, and the text changed to white. This will be the last time the calendar is touched for a long time.
![From left to right: the browsers new controls, the zoomed-out magnifying view, and highlighting text for copy/pasting.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/browser-craziness.png)
From left to right: the browsers new controls, the zoomed-out magnifying view, and highlighting text for copy/pasting.
Photo by Ron Amadeo
Android 1.5 changed the zoom controls system-wide. Instead of two big circles, the zoom controls became two halves of a rectangle with rounded corners. These new controls applied to the browser, Google Maps, and the gallery.
The browser had lots of work done on the zoom functionality. After zooming in or out, the "1x" button would return you to the standard zoom level. The button in the bottom right corner would zoom all the way out of the page and display a magnifying rectangle over the page, which you can see in the center image. Grabbing the rectangle and releasing it would zoom that part of the page to a "1x" view. Android didn't have acceleratable scrolling, which made the max scrolling speed pretty slow—this was Google's solution for navigating a long webpage.
Another addition to the browser was the ability to copy text on a webpage—previously you could only copy text from an input box. Selecting "copy text" from the menu would activate highlight mode, and dragging your finger over text in a Web page would highlight it. The G1s trackball was very handy for super-precise movement like this and could control the mouse cursor. There were no draggable handles, and as soon as you lifted your finger off the screen, Android would copy the text and remove the highlight, so you had to be ridiculously precise to get any use out of the copy feature.
The browser in Android 1.5 would crash a lot—much more than in previous versions. Just viewing Ars Technica in desktop mode would crash the browser, as did many other sites.
![](http://cdn.arstechnica.net/wp-content/uploads/2013/12/lockscreen.png)
Photo by Ron Amadeo
The default lock screen and pattern lock screen both changed their empty, black backgrounds to the same wallpaper as the home screen.
The lighter background on the pattern unlock screen revealed the sloppy job Google did on the alignment of the circles. The white circles were nowhere near centered inside the black circles—basic alignment issues like this continued to be a frequent problem for Android in these early days.
![The YouTube uploader, contacts thumbnails, the auto rotate setting, and the new music design.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/TWEAKS2.png)
The YouTube uploader, contacts thumbnails, the auto rotate setting, and the new music design.
Photo by Ron Amadeo
![The HTC Magic, the second Android device, and the first without a hardware keyboard.](http://cdn.arstechnica.net/wp-content/uploads/2014/04/htc-magic-white.jpg)
The HTC Magic, the second Android device, and the first without a hardware keyboard.
Photo by HTC
> #### Google Maps is the first built-in app to hit the Android Market ####
>
> While this article is (mostly) organizing app updates by Android version for simplicity's sake, there are a few outliers that deserve special recognition. On June 14, 2009, Google Maps was the first packed-in Android app to be updated via the Android Market. While every other app required a full system release to be updated, Maps was broken out of the OS, free to receive out-of-cycle updates whenever a new feature was ready.
>
> Moving apps out of the core OS and onto the Android Market would be a big focus for Google going forward. In general, OTA updates were a big initiative—they required the cooperation of the OEM and the carrier, both of which could drag their feet. Updates also didnt make it to every device. Today, the Android Market gives Google a direct line to every Android phone with no such interference from outside parties.
>
> These were problems for a later date, though. In 2009, Google had only two unskinned phones to support, and the early Android carriers were seemingly responsive to Googles update needs. This early move would prove to be a very proactive decision on Googles part. At first, the company went this route only with its most important properties—Maps and Gmail—but later it would port the majority of the packed-in apps to the Android Market. Later initiatives like Google Play Services even brought app APIs out of the OS and into Googles store.
>
> As for the new Maps at the time, it gained a new directions interface, along with the ability to give mass transit and walking directions. For now, directions were given on a plain black list—turn-by-turn-style navigation would come later.
>
> June 2009 was also the time Apple launched the third iPhone—the 3GS—and the third version of iPhone OS. iPhone OS 3's headline features were mostly catch-up items like copy/paste and MMS support. Apple's hardware was still nicer, and the software was smoother, more cohesive, and better designed. Google's insane pace of development was putting it on a path to parity though. iPhone OS 2 launched just before the Milestone 5 build of Android 0.5, which makes five Android releases in the span of the yearly iOS release cycle.
Android 1.5 gave the YouTube app the ability to upload videos to the site. Uploading was accomplished by sharing a video from the Gallery to the YouTube app, or by opening a video directly from the YouTube app. This would bring up an upload screen, where the user would set things like the video title, tags, and access rights. Photos could be uploaded to Picasa, Google's original photo site, in a similar fashion.
There were little tweaks all over the OS. Favorite contacts now showed a picture in the contacts list (although regular contacts were still pictureless). The third picture shows the new auto-rotate option in the settings—this was also the first version to support automatically switching orientations based on readings from the devices internal sensors.
Cupcake did a great job of improving Android, particularly in terms of hardware options. The on-screen keyboard meant a hardware keyboard was no longer necessary. Auto rotate brought the OS a little closer to the iPhone, and an on-screen camera shutter button meant that hardware camera buttons were now optional, too. Shortly after the release of 1.5, a second Android device came out that would show the future direction of the platform: the HTC Magic. The Magic (right) didnt have a hardware keyboard or a camera button. It was a solid, slider-less slate device that relied on Androids on-screen buttons to get the job done.
Android flagships started with the most buttons possible—a hardware qwerty phone—and slowly began whittling the button count down over time. While the Magic was a big step, eliminating an entire keyboard and a camera button, it still used start and end call buttons, four system buttons, and a trackball.
----------
![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg)
[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work.
[@RonAmadeo][t]
--------------------------------------------------------------------------------
via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/8/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://en.wikipedia.org/wiki/Diacritic
[a]:http://arstechnica.com/author/ronamadeo
[t]:https://twitter.com/RonAmadeo

View File

@ -1,3 +1,5 @@
alim0x translating
The history of Android
================================================================================
![The new Android Market—less black, more white and green.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/marketab2.png)
@ -73,4 +75,4 @@ via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-histor
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://arstechnica.com/author/ronamadeo
[t]:https://twitter.com/RonAmadeo
[t]:https://twitter.com/RonAmadeo

View File

@ -1,89 +0,0 @@
johnhoow translating...
pidstat - Monitor and Find Statistics for Linux Procesess
================================================================================
The **pidstat** command is used for monitoring individual tasks currently being managed by the Linux kernel. It writes to standard output activities for every task managed by the Linux kernel. The pidstat command can also be used for monitoring the child processes of selected tasks. The interval parameter specifies the amount of time in seconds between each report. A value of 0 (or no parameters at all) indicates that tasks statistics are to be reported for the time since system startup (boot).
### How to Install pidstat ###
pidstat is part of the sysstat suite that contains various system performance tools for Linux, it's available on the repository of most Linux distributions.
To install it on Debian / Ubuntu Linux systems you can use the following command:
# apt-get install sysstat
If you are using CentOS / Fedora / RHEL Linux you can install the packages like this:
# yum install sysstat
### Using pidstat ###
Running pidstat without any argument is equivalent to specifying -p ALL but only active tasks (tasks with non-zero statistics values) will appear in the report.
# pidstat
![pidstat](http://blog.linoxide.com/wp-content/uploads/2014/09/pidstat.jpg)
In the output you can see:
- **PID** - The identification number of the task being monitored.
- **%usr** - Percentage of CPU used by the task while executing at the user level (application), with or without nice priority. Note that this field does NOT include time spent running a virtual processor.
- **%system** - Percentage of CPU used by the task while executing at the system level.
- **%guest** - Percentage of CPU spent by the task in virtual machine (running a virtual processor).
- **%CPU** - Total percentage of CPU time used by the task. In an SMP environment, the task's CPU usage will be divided by the total number of CPU's if option -I has been entered on the command line.
- **CPU** - Processor number to which the task is attached.
- **Command** - The command name of the task.
### I/O Statistics ###
We can use pidstat to get I/O statistics about a process using the -d flag. For example:
# pidstat -d -p 8472
![pidstat io](http://blog.linoxide.com/wp-content/uploads/2014/09/pidstat-io.jpg)
The IO output will display a few new columns:
- **kB_rd/s** - Number of kilobytes the task has caused to be read from disk per second.
- **kB_wr/s** - Number of kilobytes the task has caused, or shall cause to be written to disk per second.
- **kB_ccwr/s** - Number of kilobytes whose writing to disk has been cancelled by the task.
### Page faults and memory usage ###
Using the -r flag you can get information about memory usage and page faults.
![pidstat pf mem](http://blog.linoxide.com/wp-content/uploads/2014/09/pidstat-pfmem.jpg)
Important columns:
- **minflt/s** - Total number of minor faults the task has made per second, those which have not required loading a memory page from disk.
- **majflt/s** - Total number of major faults the task has made per second, those which have required loading a memory page from disk.
- **VSZ** - Virtual Size: The virtual memory usage of entire task in kilobytes.
- **RSS** - Resident Set Size: The non-swapped physical memory used by the task in kilobytes.
### Examples ###
**1.** You can use pidstat to find a memory leek using the following command:
# pidstat -r 2 5
This will give you 5 reports, one every 2 seconds, about the current page faults statistics, it should be easy to spot the problem process.
**2.** To show all children of the mysql server you can use the following command
# pidstat -T CHILD -C mysql
**3.** To combine all statistics in a single report you can use:
# pidstat -urd -h
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-command/linux-pidstat-monitor-statistics-procesess/
作者:[Adrian Dinu][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://linoxide.com/author/adriand/

View File

@ -1,159 +0,0 @@
su-kaiyao translating
How to create and use Python CGI scripts
================================================================================
Have you ever wanted to create a webpage or process user input from a web-based form using Python? These tasks can be accomplished through the use of Python CGI (Common Gateway Interface) scripts with an Apache web server. CGI scripts are called by a web server when a user requests a particular URL or interacts with the webpage (such as clicking a "Submit" button). After the CGI script is called and finishes executing, the output is used by the web server to create a webpage displayed to the user.
### Configuring the Apache web server to run CGI scripts ###
In this tutorial we assume that an Apache web server is already set up and running. This tutorial uses an Apache web server (version 2.2.15 on CentOS release 6.5) that is hosted at the localhost (127.0.0.1) and is listening on port 80, as specified by the following Apache directives:
ServerName 127.0.0.1:80
Listen 80
HTML files used in the upcoming examples are located in /var/www/html on the web server. This is specified via the DocumentRoot directive (specifies the directory that webpages are located in):
DocumentRoot "/var/www/html"
Consider a request for the URL: http://localhost/page1.html
This will return the contents of the following file on the web server:
/var/www/html/page1.html
To enable use of CGI scripts, we must specify where CGI scripts are located on the web server. To do this, we use the ScriptAlias directive:
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
The above directive indicates that CGI scripts are contained in the /var/www/cgi-bin directory on the web server and that inclusion of /cgi-bin/ in the requested URL will search this directory for the CGI script of interest.
We must also explicitly permit the execution of CGI scripts in the /var/www/cgi-bin directory and specify the file extensions of CGI scripts. To do this, we use the following directives:
<Directory "/var/www/cgi-bin">
Options +ExecCGI
AddHandler cgi-script .py
</Directory>
Consider a request for the URL: http://localhost/cgi-bin/myscript-1.py
This will call the following script on the web server:
/var/www/cgi-bin/myscript-1.py
### Creating a CGI script ###
Before creating a Python CGI script, you will need to confirm that you have Python installed (this is generally installed by default, however the installed version may vary). Scripts in this tutorial are created using Python version 2.6.6. You can check your version of Python from the command line by entering either of the following commands (the -V and --version options display the version of Python that is installed):
$ python -V
$ python --version
If your Python CGI script will be used to process user-entered data (from a web-based input form), then you will need to import the Python cgi module. This module provides functionality for accessing data that users have entered into web-based input forms. You can import this module via the following statement in your script:
import cgi
You must also change the execute permissions for the Python CGI script so that it can be called by the web server. Add execute permissions for others via the following command:
# chmod o+x myscript-1.py
### Python CGI Examples ###
Two scenarios involving Python CGI scripts will be considered in this tutorial:
- Create a webpage using a Python script
- Read and display user-entered data and display results in a webpage
Note that the Python cgi module is required for Scenario 2 because this involves accessing user-entered data from web-based input forms.
### Example 1: Create a webpage using a Python script ###
For this scenario, we will start by creating a webpage /var/www/html/page1.html with a single submit button:
<html>
<h1>Test Page 1</h1>
<form name="input" action="/cgi-bin/myscript-1.py" method="get">
<input type="submit" value="Submit">
</form>
</html>
When the "Submit" button is clicked, the /var/www/cgi-bin/myscript-1.py script is called (specified by the action parameter). A "GET" request is specified by setting the method parameter equal to "get". This requests that the web server return the specified webpage. An image of /var/www/html/page1.html as viewed from within a web browser is shown below:
![](https://farm4.staticflickr.com/3933/14932853623_eff2df3260_z.jpg)
The contents of /var/www/cgi-bin/myscript-1.py are:
#!/usr/bin/python
print "Content-Type: text/html"
print ""
print "<html>"
print "<h2>CGI Script Output</h2>"
print "<p>This page was generated by a Python CGI script.</p>"
print "</html>"
The first statement indicates that this is a Python script to be run with the /usr/bin/python command. The print "Content-Type: text/html" statement is required so that the web server knows what type of output it is receiving from the CGI script. The remaining statements are used to print the text of the webpage in HTML format.
When the "Submit" button is clicked in the above webpage, the following webpage is returned:
![](https://farm4.staticflickr.com/3933/15553035025_d70be04470_z.jpg)
The take-home point with this example is that you have the freedom to decide what information is returned by the CGI script. This could include the contents of log files, a list of users currently logged on, or today's date. The possibilities are endless given that you have the entire Python library at your disposal.
### Example 2: Read and display user-entered data and display results in a webpage ###
For this scenario, we will start by creating a webpage /var/www/html/page2.html with three input fields and a submit button:
<html>
<h1>Test Page 2</h1>
<form name="input" action="/cgi-bin/myscript-2.py" method="get">
First Name: <input type="text" name="firstName"><br>
Last Name: <input type="text" name="lastName"><br>
Position: <input type="text" name="position"><br>
<input type="submit" value="Submit">
</form>
</html>
When the "Submit" button is clicked, the /var/www/cgi-bin/myscript-2.py script is called (specified by the action parameter). An image of /var/www/html/page2.html as viewed from within a web browser is shown below (note that the three input fields have already been filled in):
![](https://farm4.staticflickr.com/3935/14932853603_ffc3bd330e_z.jpg)
The contents of /var/www/cgi-bin/myscript-2.py are:
#!/usr/bin/python
import cgi
form = cgi.FieldStorage()
print "Content-Type: text/html"
print ""
print "<html>"
print "<h2>CGI Script Output</h2>"
print "<p>"
print "The user entered data are:<br>"
print "<b>First Name:</b> " + form["firstName"].value + "<br>"
print "<b>Last Name:</b> " + form["lastName"].value + "<br>"
print "<b>Position:</b> " + form["position"].value + "<br>"
print "</p>"
print "</html>"
As mentioned previously, the import cgi statement is needed to enable functionality for accessing user-entered data from web-based input forms. The web-based input form is encapsulated in the form object, which is a cgi.FieldStorage object. Once again, the "Content-Type: text/html" line is required so that the web server knows what type of output it is receiving from the CGI script. The data entered by the user are accessed in the statements that contain form["firstName"].value, form["lastName"].value, and form["position"].value. The names in the square brackets correspond to the values of the name parameters defined in the text input fields in **/var/www/html/page2.html**.
When the "Submit" button is clicked in the above webpage, the following webpage is returned:
![](https://farm4.staticflickr.com/3949/15367402150_946474dbb0_z.jpg)
The take-home point with this example is that you can easily read and display user-entered data from web-based input forms. In addition to processing data as strings, you can also use Python to convert user-entered data to numbers that can be used in numerical calculations.
### Summary ###
This tutorial demonstrates how Python CGI scripts are useful for creating webpages and for processing user-entered data from web-based input forms. More information about Apache CGI scripts can be found [here][1] and more information about the Python cgi module can be found [here][2].
--------------------------------------------------------------------------------
via: http://xmodulo.com/create-use-python-cgi-scripts.html
作者:[Joshua Reed][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/joshua
[1]:http://httpd.apache.org/docs/2.2/howto/cgi.html
[2]:https://docs.python.org/2/library/cgi.html#module-cgi

View File

@ -1,3 +1,4 @@
(translating by runningwater)
How to monitor a log file on Linux with logwatch
================================================================================
Linux operating system and many applications create special files commonly referred to as "logs" to record their operational events. These system logs or application-specific log files are an essential tool when it comes to understanding and troubleshooting the behavior of the operating system and third-party applications. However, log files are not precisely what you would call "light" or "easy" reading, and analyzing raw log files by hand is often time-consuming and tedious. For that reason, any utility that can convert raw log files into a more user-friendly log digest is a great boon for sysadmins.
@ -122,7 +123,7 @@ Hope this helps. Feel free to comment to share your own tips and ideas with the
via: http://xmodulo.com/monitor-log-file-linux-logwatch.html
作者:[Gabriel Cánepa][a]
译者:[译者ID](https://github.com/译者ID)
译者:[runningwater](https://github.com/runningwater)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,96 +0,0 @@
Wine 1.7.29 (Development Version) Released Install in RedHat and Debian Based Systems
================================================================================
**Wine**, a most popular and powerful open source application for Linux, that used to run Windows based applications and games on Linux Platform without any trouble.
![Install Wine (Development Version) in Linux](http://www.tecmint.com/wp-content/uploads/2014/05/Install-Wine-Development-Version.png)
Install Wine (Development Version) in Linux
WineHQ team, recently announced a new development version of **Wine 1.7.29**. This new development build arrives with a number of new important features and **44** bug fixes.
Wine team, keep releasing their development builds almost on weekly basis and adding numerous new features and fixes. Each new version brings support for new applications and games, making Wine a most popular and must have tool for every user, who want to run Windows based software in a Linux platform.
According to the changelog, following key features are added in this release:
- Added much improved shaping and BiDi mirroring in DirectWrite.
- Few page fault handling problems have been udpated.
- Included few more C runtime functions.
- Various bug fixes.
For more in-depth details about this build can be found at the official [changelog][1] page.
This article guides you how to install most recent development version of **Wine 1.7.29** on **Red Hat** and **Debian** based systems such as CentOS, Fedora, Ubuntu, Linux Mint and other supported distributions.
### Installing Wine 1.7.29 Development Version in Linux ###
Unfortunately, there are no official Wine repository available for the **Red Hat** based systems and the only way to install Wine, is to compile it from source. To do this, you need to install some dependency packages such as gcc, flex, bison, libX11-devel freetype-devel and Development Tools, etc. These packages are must required to compile Wine from source. Lets install them using following **YUM** command.
### On RedHat, Fedora and CentOS ###
# yum -y groupinstall 'Development Tools'
# yum -y install flex bison libX11-devel freetype-devel
Next, download the latest development version of Wine (i.e. **1.7.29**) and extract the source tallball package using the following commands.
$ cd /tmp
$ wget http://citylan.dl.sourceforge.net/project/wine/Source/wine-1.7.29.tar.bz2
$ tar -xvf wine-1.7.29.tar.bz2 -C /tmp/
Now, its time to compile and build Wine installer using the following commands as normal user.
Note: The installation process might take up-to **15-20** minutes depending upon your internet and hardware speed, during installation it will ask you to enter **root** password.
#### On 32-Bit Systems ####
$ cd wine-1.7.29/
$ ./tools/wineinstall
#### On 64-Bit Systems ####
$ cd wine-1.7.29/
$ ./configure --enable-win64
$ make
# make install
### On Ubuntu, Debian and Linux Mint ###
Under **Ubuntu** based systems, you can easily install the latest development build of Wine using the official **PPA**. Open a terminal and run the following commands with sudo privileges.
$ sudo add-apt-repository ppa:ubuntu-wine/ppa
$ sudo apt-get update
$ sudo apt-get install wine 1.7 winetricks
**Note**: At the time of writing this article, available version was **1.7.26** and the new build not yet updated in official Wine Repository, but the above instructions will install **1.7.29** when they made available.
Once the installation completes successfully, you can install or run any windows based applications or games using wine as shown below.
$ wine notepad
$ wine notepad.exe
$ wine c:\\windows\\notepad.exe
**Note**: Please remember, this is a development build and cannot be installed or used on production systems. It is advised to use this version only for testing purpose.
If youre looking for a most recent stable version of Wine, you can go through our following articles, that describes how to install most latest version on almost all Linux environments.
- [Install Wine 1.6.2 (Stable) in RHEL, CentOS and Fedora][2]
- [Install Wine 1.6.2 (Stable) in Debian, Ubuntu and Mint][3]
### Reference Links ###
- [WineHQ Homepage][4]
--------------------------------------------------------------------------------
via: http://www.tecmint.com/install-wine-in-linux/
作者:[Ravi Saive][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/admin/
[1]:http://www.winehq.org/announce/1.7.29
[2]:http://www.tecmint.com/install-wine-in-rhel-centos-and-fedora/
[3]:http://www.tecmint.com/install-wine-on-ubuntu-and-linux-mint/
[4]:http://www.winehq.org/

View File

@ -0,0 +1,312 @@
How to turn your CentOS box into a BGP router using Quagga
================================================================================
In a [previous tutorial][1]此文原文做过文件名“20140928 How to turn your CentOS box into an OSPF router using Quagga.md”如果前面翻译发布了可以修改此链接, I described how we can easily turn a Linux box into a fully-fledged OPSF router using Quagga, an open source routing software suite. In this tutorial, I will focus on **converting a Linux box into a BGP router, again using Quagga**, and demonstrate how to set up BGP peering with other BGP routers.
Before we get into details, a little background on BGP may be useful. Border Gateway Protocol (or BGP) is the de-facto standard inter-domain routing protocol of the Internet. In BGP terminology, the global Internet is a collection of tens of thousands of interconnected Autonomous Systems (ASes), where each AS represents an administrative domain of networks managed by a particular provider.
To make its networks globally routable, each AS needs to know how to reach all other ASes in the Internet. That is when BGP comes into play. BGP is the language used by an AS to exchange route information with other neighboring ASes. The route information, often called BGP routes or BGP prefixes, contains AS number (ASN; a globally unique number) and its associated IP address block(s). Once all BGP routes are learned and populated in local BGP routing tables, each AS will know how to reach any public IP addresses on the Internet.
The ability to route across different domains (ASes) is the primary reason why BGP is called an Exterior Gateway Protocol (EGP) or inter-domain protocol. Whereas routing protocols such as OSPF, IS-IS, RIP and EIGRP are all Interior Gateway Protocols (IGPs) or intra-domain routing protocols.
### Test Scenarios ###
For this tutorial, let us consider the following topology.
![](https://farm6.staticflickr.com/5598/15603223841_4c76343313_z.jpg)
We assume that service provider A wants to establish a BGP peering with service provider B to exchange routes. The details of their AS and IP address spaces are like the following.
- **Service provider A**: ASN (100), IP address space (100.100.0.0/22), IP address assigned to eth1 of a BGP router (100.100.1.1)
- **Service provider B**: ASN (200), IP address space (200.200.0.0/22), IP address assigned to eth1 of a BGP router (200.200.1.1)
Router A and router B will be using the 100.100.0.0/30 subnet for connecting to each other. In theory, any subnet reachable from both service providers can be used for interconnection. In real life, it is advisable to use a /30 subnet from service provider A or service provider B's public IP address space.
### Installing Quagga on CentOS ###
If Quagga is not already installed, we install Quagga using yum.
# yum install quagga
If you are using CentOS 7, you need to apply the following policy change for SELinux. Otherwise, SELinux will prevent Zebra daemon from writing to its configuration directory. You can skip this step if you are using CentOS 6.
# setsebool -P zebra_write_config 1
The Quagga software suite contains several daemons that work together. For BGP routing, we will focus on setting up the following two daemons.
- **Zebra**: a core daemon responsible for kernel interfaces and static routes.
- **BGPd**: a BGP daemon.
### Configuring Logging ###
After Quagga is installed, the next step is to configure Zebra to manage network interfaces of BGP routers. We start by creating a Zebra configuration file and enabling logging.
# cp /usr/share/doc/quagga-XXXXX/zebra.conf.sample /etc/quagga/zebra.conf
On CentOS 6:
# service zebra start
# chkconfig zebra on
For CentOS 7:
# systemctl start zebra
# systemctl enable zebra
Quagga offers a dedicated command-line shell called vtysh, where you can type commands which are compatible with those supported by router vendors such as Cisco and Juniper. We will be using vtysh shell to configure BGP routers in the rest of the tutorial.
To launch vtysh command shell, type:
# vtysh
The prompt will be changed to hostname, which indicates that you are inside vtysh shell.
Router-A#
Now we specify the log file for Zebra by using the following commands:
Router-A# configure terminal
Router-A(config)# log file /var/log/quagga/quagga.log
Router-A(config)# exit
Save Zebra configuration permanently:
Router-A# write
Repeat this process on Router-B as well.
### Configuring Peering IP Addresses ###
Next, we configure peering IP addresses on available interfaces.
Router-A# show interface
----------
Interface eth0 is up, line protocol detection is disabled
. . . . .
Interface eth1 is up, line protocol detection is disabled
. . . . .
Configure eth0 interface's parameters:
site-A-RTR# configure terminal
site-A-RTR(config)# interface eth0
site-A-RTR(config-if)# ip address 100.100.0.1/30
site-A-RTR(config-if)# description "to Router-B"
site-A-RTR(config-if)# no shutdown
site-A-RTR(config-if)# exit
Go ahead and configure eth1 interface's parameters:
site-A-RTR(config)# interface eth1
site-A-RTR(config-if)# ip address 100.100.1.1/24
site-A-RTR(config-if)# description "test ip from provider A network"
site-A-RTR(config-if)# no shutdown
site-A-RTR(config-if)# exit
Now verify configuration:
Router-A# show interface
----------
Interface eth0 is up, line protocol detection is disabled
Description: "to Router-B"
inet 100.100.0.1/30 broadcast 100.100.0.3
Interface eth1 is up, line protocol detection is disabled
Description: "test ip from provider A network"
inet 100.100.1.1/24 broadcast 100.100.1.255
----------
Router-A# show interface description
----------
Interface Status Protocol Description
eth0 up unknown "to Router-B"
eth1 up unknown "test ip from provider A network"
If everything looks alright, don't forget to save.
Router-A# write
Repeat to configure interfaces on Router-B as well.
Before moving forward, verify that you can ping each other's IP address.
Router-A# ping 100.100.0.2
----------
PING 100.100.0.2 (100.100.0.2) 56(84) bytes of data.
64 bytes from 100.100.0.2: icmp_seq=1 ttl=64 time=0.616 ms
Next, we will move on to configure BGP peering and prefix advertisement settings.
### Configuring BGP Peering ###
The Quagga daemon responsible for BGP is called bgpd. First, we will prepare its configuration file.
# cp /usr/share/doc/quagga-XXXXXXX/bgpd.conf.sample /etc/quagga/bgpd.conf
On CentOS 6:
# service bgpd start
# chkconfig bgpd on
For CentOS 7
# systemctl start bgpd
# systemctl enable bgpd
Now, let's enter Quagga shell.
# vtysh
First verify that there are no configured BGP sessions. In some versions, you may find a BGP session with AS 7675. We will remove it as we don't need it.
Router-A# show running-config
----------
... ... ...
router bgp 7675
bgp router-id 200.200.1.1
... ... ...
We will remove any pre-configured BPG session, and replace it with our own.
Router-A# configure terminal
Router-A(config)# no router bgp 7675
Router-A(config)# router bgp 100
Router-A(config)# no auto-summary
Router-A(config)# no synchronizaiton
Router-A(config-router)# neighbor 100.100.0.2 remote-as 200
Router-A(config-router)# neighbor 100.100.0.2 description "provider B"
Router-A(config-router)# exit
Router-A(config)# exit
Router-A# write
Router-B should be configured in a similar way. The following configuration is provided as reference.
Router-B# configure terminal
Router-B(config)# no router bgp 7675
Router-B(config)# router bgp 200
Router-B(config)# no auto-summary
Router-B(config)# no synchronizaiton
Router-B(config-router)# neighbor 100.100.0.1 remote-as 100
Router-B(config-router)# neighbor 100.100.0.1 description "provider A"
Router-B(config-router)# exit
Router-B(config)# exit
Router-B# write
When both routers are configured, a BGP peering between the two should be established. Let's verify that by running:
Router-A# show ip bgp summary
![](https://farm6.staticflickr.com/5614/15420135700_e3568d2e5f_z.jpg)
In the output, we should look at the section "State/PfxRcd." If the peering is down, the output will show 'Idle' or 'Active'. Remember, the word 'Active' inside a router is always bad. It means that the router is actively seeking for a neighbor, prefix or route. When the peering is up, the output under "State/PfxRcd" should show the number of prefixes received from this particular neighbor.
In this example output, the BGP peering is just up between AS 100 and AS 200. Thus no prefixes are being exchanged, and the number in the rightmost column is 0.
### Configuring Prefix Advertisements ###
As specified at the beginning, AS 100 will advertise a prefix 100.100.0.0/22, and AS 200 will advertise a prefix 200.200.0.0/22 in our example. Those prefixes need to be added to BGP configuration as follows.
On Router-A:
Router-A# configure terminal
Router-A(config)# router bgp 100
Router-A(config)# network 100.100.0.0/22
Router-A(config)# exit
Router-A# write
On Router-B:
Router-B# configure terminal
Router-B(config)# router bgp 200
Router-B(config)# network 200.200.0.0/22
Router-B(config)# exit
Router-B# write
At this point, both routers should start advertising prefixes as required.
### Testing Prefix Advertisements ###
First of all, let's verify whether the number of prefixes has changed now.
Router-A# show ip bgp summary
![](https://farm6.staticflickr.com/5608/15419095659_0ebb384eee_z.jpg)
To view more details on the prefixes being received, we can use the following command, which shows the total number of prefixes received from neighbor 100.100.0.2.
Router-A# show ip bgp neighbors 100.100.0.2 advertised-routes
![](https://farm6.staticflickr.com/5597/15419618208_4604e5639a_z.jpg)
To check which prefixes we are receiving from that neighbor:
Router-A# show ip bgp neighbors 100.100.0.2 routes
![](https://farm4.staticflickr.com/3935/15606556462_e17eae7f49_z.jpg)
We can also check all the BGP routes:
Router-A# show ip bgp
![](https://farm6.staticflickr.com/5609/15419618228_5c776423a5_z.jpg)
These commands below can be used to check which routes in the routing table are learned via BGP.
Router-A# show ip route
----------
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
C>* 100.100.0.0/30 is directly connected, eth0
C>* 100.100.1.0/24 is directly connected, eth1
B>* 200.200.0.0/22 [20/0] via 100.100.0.2, eth0, 00:06:45
----------
Router-A# show ip route bgp
----------
B>* 200.200.0.0/22 [20/0] via 100.100.0.2, eth0, 00:08:13
The BGP-learned routes should also be present in the Linux routing table.
[root@Router-A~]# ip route
----------
100.100.0.0/30 dev eth0 proto kernel scope link src 100.100.0.1
100.100.1.0/24 dev eth1 proto kernel scope link src 100.100.1.1
200.200.0.0/22 via 100.100.0.2 dev eth0 proto zebra
Finally, we are going to test with ping command. ping should be successful.
[root@Router-A~]# ping 200.200.1.1 -c 2
To sum up, this tutorial focused on how we can run basic BGP on a CentOS box. While this should get you started with BGP, there are other advanced settings such as prefix filters, BGP attribute tuning such as local preference and path prepend. I will be covering these topics in future tutorials.
Hope this helps.
--------------------------------------------------------------------------------
via: http://xmodulo.com/centos-bgp-router-quagga.html
作者:[Sarmed Rahman][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/sarmed
[1]:http://xmodulo.com/turn-centos-box-into-ospf-router-quagga.html

View File

@ -0,0 +1,256 @@
luoyutiantang
What are useful Bash aliases and functions
================================================================================
As a command line adventurer, you probably found yourself repeating the same lengthy commands over and over. If you always ssh into the same machine, if you always chain the same commands together, or if you constantly run a program with the same flags, you might want to save the precious seconds of your life that you spend repeating the same actions over and over.
The solution to achieve that is to use an alias. As you may know, an alias is a way to tell your shell to remember a particular command and give it a new name: an alias. However, an alias is quickly limited as it is just a shortcut for a shell command, without the ability to pass or control the arguments. So to complement, bash also allows you create your own functions, which can be more lengthy and complex, and also accepts any number of arguments.
Naturally, like with soup, when you have a good recipe you share it. So here is a list with some of the most useful bash aliases and functions. Note that "most useful" is loosely defined, and of course the usefulness of an alias is dependent on your everyday usage of the shell.
Before you start experimenting with aliases, here is a handy tip: if you give an alias the same name as a regular command, you can choose to launch the original command and ignore the alias with the trick:
\command
For example, the first alias below replaces the ls command. If you wish to use the regular ls command and not the alias, call it via:
\ls
### Productivity ###
So these aliases are really simple and really short, but they are mostly based on the idea that if you save yourself a fraction of a second every time, it might end up accumulating years at the end. Or maybe not.
alias ls="ls --color=auto"
Simple but vital. Make the ls command output in color.
alias ll = "ls --color -al"
Shortcut to display in color all the files from a directory in a list format.
alias grep='grep --color=auto'
Similarly, put some color in the grep output.
mcd() { mkdir -p "$1"; cd "$1";}
One of my favorite. Make a directory and cd into it in one command: mcd [name].
cls() { cd "$1"; ls;}
Similar to the previous function, cd into a directory and list its content: cls [name].
backup() { cp "$1"{,.bak};}
Simple way to make a backup of a file: backup [file] will create [file].bak in the same directory.
md5check() { md5sum "$1" | grep "$2";}
Because I hate comparing the md5sum of a file by hand, this function computes it and compares it using grep: md5check [file] [key].
![](https://farm6.staticflickr.com/5616/15412389280_8be57841ae_o.jpg)
alias makescript="fc -rnl | head -1 >"
Easily make a script out of the last command you ran: makescript [script.sh]
alias genpasswd="strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo"
Just to generate a strong password instantly.
![](https://farm4.staticflickr.com/3955/15574321206_dd365f0f0e.jpg)
alias c="clear"
Cannot do simpler to clean your terminal screen.
alias histg="history | grep"
To quickly search through your command history: histg [keyword]
alias ..='cd ..'
No need to write cd to go up a directory.
alias ...='cd ../..'
Similarly, go up two directories.
extract() {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar e $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
Longest but also the most useful. Extract any kind of archive: extract [archive file]
### System Info ###
Want to know everything about your system as quickly as possible?
alias cmount="mount | column -t"
Format the output of mount into columns.
![](https://farm6.staticflickr.com/5603/15598830622_587b77a363_z.jpg)
alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'"
Display the directory structure recursively in a tree format.
sbs() { du -b --max-depth 1 | sort -nr | perl -pe 's{([0-9]+)}{sprintf "%.1f%s", $1>=2**30? ($1/2**30, "G"): $1>=2**20? ($1/2**20, "M"): $1>=2**10? ($1/2**10, "K"): ($1, "")}e';}
"Sort by size" to display in list the files in the current directory, sorted by their size on disk.
alias intercept="sudo strace -ff -e trace=write -e write=1,2 -p"
Intercept the stdout and stderr of a process: intercept [some PID]. Note that you will need strace installed.
alias meminfo='free -m -l -t'
See how much memory you have left.
![](https://farm4.staticflickr.com/3955/15411891448_0b9d6450bd_z.jpg)
alias ps? = "ps aux | grep"
Easily find the PID of any process: ps? [name]
alias volume="amixer get Master | sed '1,4 d' | cut -d [ -f 2 | cut -d ] -f 1"
Displays the current sound volume.
![](https://farm4.staticflickr.com/3939/15597995445_99ea7ffcd5_o.jpg)
### Networking ###
For all the commands that involve the Internet or your local network, there are fancy aliases for them.
alias websiteget="wget --random-wait -r -p -e robots=off -U mozilla"
Download entirely a website: websiteget [URL]
alias listen="lsof -P -i -n"
Show which applications are connecting to the network.
![](https://farm4.staticflickr.com/3943/15598830552_c7e5eaaa0d_z.jpg)
alias port='netstat -tulanp'
Show the active ports
gmail() { curl -u "$1" --silent "https://mail.google.com/mail/feed/atom" | sed -e 's/<\/fullcount.*/\n/' | sed -e 's/.*fullcount>//'}
Rough function to display the number of unread emails in your gmail: gmail [user name]
alias ipinfo="curl ifconfig.me && curl ifconfig.me/host"
Get your public IP address and host.
getlocation() { lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|grep address|egrep 'city|state|country'|awk '{print $3,$4,$5,$6,$7,$8}'|sed 's\ip address flag \\'|sed 's\My\\';}
Returns your current location based on your IP address.
### Useless ###
So what if some aliases are not all that productive? They can still be fun.
kernelgraph() { lsmod | perl -e 'print "digraph \"lsmod\" {";<>;while(<>){@_=split/\s+/; print "\"$_[0]\" -> \"$_\"\n" for split/,/,$_[3]}print "}"' | dot -Tpng | display -;}
To draw the kernel module dependency graph. Requires image viewer.
alias busy="cat /dev/urandom | hexdump -C | grep "ca fe""
Make you look all busy and fancy in the eyes of non-technical people.
![](https://farm6.staticflickr.com/5599/15574321326_ab3fbc1ef9_z.jpg)
To conclude, a good chunk of these aliases and functions come from my personal .bashrc, and the awesome websites [alias.sh][1] and [commandlinefu.com][2] which I already presented in my post on the [best online tools for Linux][3]. So definitely go check them out, make your own recipes, and if you are so inclined, share your wisdom in the comments.
As a bonus, here is the plain text version of all the aliases and functions I mentioned, ready to be copy pasted in your bashrc.
#Productivity
alias ls="ls --color=auto"
alias ll="ls --color -al"
alias grep='grep --color=auto'
mcd() { mkdir -p "$1"; cd "$1";}
cls() { cd "$1"; ls;}
backup() { cp "$1"{,.bak};}
md5check() { md5sum "$1" | grep "$2";}
alias makescript="fc -rnl | head -1 >"
alias genpasswd="strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo"
alias c="clear"
alias histg="history | grep"
alias ..='cd ..'
alias ...='cd ../..'
extract() {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar e $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
#System info
alias cmount="mount | column -t"
alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'"
sbs(){ du -b --max-depth 1 | sort -nr | perl -pe 's{([0-9]+)}{sprintf "%.1f%s", $1>=2**30? ($1/2**30, "G"): $1>=2**20? ($1/2**20, "M"): $1>=2**10? ($1/2**10, "K"): ($1, "")}e';}
alias intercept="sudo strace -ff -e trace=write -e write=1,2 -p"
alias meminfo='free -m -l -t'
alias ps?="ps aux | grep"
alias volume="amixer get Master | sed '1,4 d' | cut -d [ -f 2 | cut -d ] -f 1"
#Network
alias websiteget="wget --random-wait -r -p -e robots=off -U mozilla"
alias listen="lsof -P -i -n"
alias port='netstat -tulanp'
gmail() { curl -u "$1" --silent "https://mail.google.com/mail/feed/atom" | sed -e 's/<\/fullcount.*/\n/' | sed -e 's/.*fullcount>//'}
alias ipinfo="curl ifconfig.me && curl ifconfig.me/host"
getlocation() { lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|grep address|egrep 'city|state|country'|awk '{print $3,$4,$5,$6,$7,$8}'|sed 's\ip address flag \\'|sed 's\My\\';}
#Funny
kernelgraph() { lsmod | perl -e 'print "digraph \"lsmod\" {";<>;while(<>){@_=split/\s+/; print "\"$_[0]\" -> \"$_\"\n" for split/,/,$_[3]}print "}"' | dot -Tpng | display -;}
alias busy="cat /dev/urandom | hexdump -C | grep \"ca fe\""
--------------------------------------------------------------------------------
via: http://xmodulo.com/useful-bash-aliases-functions.html
作者:[Adrien Brochard][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/adrien
[1]:http://alias.sh/
[2]:http://www.commandlinefu.com/commands/browse
[3]:http://xmodulo.com/useful-online-tools-linux.html

View File

@ -0,0 +1,143 @@
7 Things to Do After Installing Ubuntu 14.10 Utopic Unicorn
================================================================================
After youve installed or [upgraded to Ubuntu 14.10][1], known by its codename Utopic Unicorn, there are a few things you should do to get it up and running in tip-top shape.
Whether youve performed a fresh install or upgraded an existing version, heres our biannual checklist of post-install tasks to get started with.
### 1. Get Acquainted ###
![The Ubuntu Browser](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/Screen-Shot-2014-10-23-at-20.02.54.png)
The Ubuntu Browser
The majority of changes rocking up in Ubuntu 14.10 arent immediately visible (save for some new wallpapers). That said, there are a bunch of freshly updated apps to get familiar with.
Preinstalled are the latest versions of workhouse staples **Mozilla Firefox**, **Thunderbird**, and **LibreOffice**. Dig a little deeper and youll also find Evince 3.14, and a brand new version of the “Ubuntu Web Browser” app, used for handling web-apps.
While youre getting familiar, be sure to fire up the Software Updater tool to **check for any impromptu issues Ubuntu has found and fixed** post-release. Yes, I know: you only just upgraded. But, even so — bugs dont adhere to deadlines like developers do!
### 2. Personalise The Desktop ###
![New wallpapers in 14.10](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/wallpapers-new-in-14.10.jpg)
New wallpapers in 14.10
Its your desktop PC, so dont put off making it look, feel and behave how you like.
Your first port of call might be changing the desktop wallpaper to one of the [twelve stunning new backgrounds][2] included in 14.10, ranging from retro record player to illustrated unicorn.
Wallpapers and a host of other theme and layout options are accessible from the **Appearance Settings** pane of the System Settings app. From here you can:
- Switch to a different theme
- Adjust launcher size & behaviour
- Enable workspaces & desktop icons
- Put app menus back into app windows
For some nifty new themes be sure to check out our **themes & icons category** here on the site.
### 3. Install Graphics Card Drivers ###
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/additional-drivers.jpg)
If you plan on playing the [latest Steam games][3], watching high-definition video or working with graphically intensive software youll want to enable the latest Linux graphics drivers available for your hardware.
Ubuntu makes this easy:
- Open up the Software & Updates tool from the Unity Dash
- Click the Additional Drivers tab
- Follow any on-screen prompts to check, install and apply changes
### 4. Enable Music & Video Codecs ###
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/msuci.jpg)
Games sorted, now to make **music and video files work just as well**.
Most popular formats, .mp3, .m4a, .mov, etc., will work fine in Ubuntu — after a little cajoling. Patent-encumbered codecs cannot ship in Ubuntu for legal reasons, leaving you unable to play popular audio and video formats out of the (invisible) box.
Dont panic. To play music or watch video you can install all of the codecs you need quickly, and through the Ubuntu Software Center.
- [Install Third-Party Codecs][4]
### 5. Pimp Your Privacy ###
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/privacy-in-ubuntu-settingd.jpg)
The Unity Dash is a great one-stop hub for finding stuff, be it a PDF file lurking on your computer or the current weather forecast in Stockholm, Sweden.
But the diversity of data surfaced through the Dash in just a few keystrokes doesnt suit everyones needs. So you may want to dial down the noise and restrict what shows up.
To stop certain files and folders from searched in the Dash and/or to disable all online results returned for a query, head to the **Privacy & Security** section in System Settings.
Here youll find all the tools, options and configuration switches you need, including options to:
- Choose what apps & files can be searched from the Dash
- Whether to require a password on waking from suspend
- Disable sending error reports to Canonical
- Turn off all online features of the Dash
### 6. Swap The Default Apps For Your Faves ###
![Make it yours](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/more-apps.jpg)
Make it yours
Ubuntu comes preloaded with a tonne of apps, including a web browser (Mozilla Firefox), e-mail client (Thunderbird), music player (Rhythmbox), office suite (LibreOffice) and instant messenger (Empathy Instant Messenger).
All well and good, theyre not everyones cup of tea. The Ubuntu Software Center is home to a slew of app alternatives, including:
- VLC Versatile media player
- Steam Games distribution platform
- [Geary — Easy-to-use desktop e-mail app][5]
- GIMP Advanced image editor similar to Photoshop
- Clementine — Stylish, fully-featured music player
- Chromium open-source version of Google Chrome (without Flash)
The Ubuntu Software Center plays host to a huge range of other apps, many of which you might not have heard of before. Since most apps are free, dont be scared to try things out!
### 7. Grab The Essentials ###
![Netflix in Chrome on Ubuntu](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/netflix-linux-working-in-chrome.jpg)
Netflix in Chrome on Ubuntu
Software Center apps aside, you may also wish to grab big-name apps like Skype, Spotify and Dropbox.
Google Chrome is also a must if you wish to watch Netflix natively on Ubuntu or benefit from the latest, safest version of Flash.
Most of these apps are available to download directly from their respective websites and can be installed on Ubuntu with a couple of clicks.
- [Download Skype for Linux][6]
- [Download Google Chrome for Linux][7]
- [Download Dropbox for Linux][8]
- [How to Install Spotify in Ubuntu][9]
Talking of Google Chrome — did you know you can (unofficially) [install and run Android apps through it?][9] Oh yes ;)
#### Finally… ####
The items above are not the only ones applicable post-upgrade. Read through and follow the ones that chime with you, and feel free to ignore those that dont.
Secondly, this is a list for those whove upgraded to or installed Ubuntu 14.10. Were not going walk you through carving it up into something that isnt Ubuntu. If Unity isnt your thing thats fine, but be logical about it; save yourself some time and install one of the official flavours or offshoots instead.
--------------------------------------------------------------------------------
via: http://www.omgubuntu.co.uk/2014/10/7-things-to-do-after-installing-ubuntu-14-10-utopic-unicorn
作者:[Joey-Elijah Sneddon][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:https://plus.google.com/117485690627814051450/?rel=author
[1]:http://www.omgubuntu.co.uk/2014/10/ubuntu-14-10-release-download-now
[2]:http://www.omgubuntu.co.uk/2014/09/ubuntu-14-10-wallpaper-contest-winners
[3]:http://www.omgubuntu.co.uk/category/gaming
[4]:https://apps.ubuntu.com/cat/applications/ubuntu-restricted-extras/
[5]:http://www.omgubuntu.co.uk/2014/09/new-shotwell-geary-stable-release-available-to-downed
[6]:http://www.skype.com/en/download-skype/skype-for-linux/
[7]:http://www.google.com/chrome
[8]:https://www.dropbox.com/install?os=lnx
[9]:http://www.omgubuntu.co.uk/2013/01/how-to-install-spotify-in-ubuntu-12-04-12-10
[10]:http://www.omgubuntu.co.uk/2014/09/install-android-apps-ubuntu-archon

View File

@ -0,0 +1,292 @@
andyxue translating
Amazing ! 25 Linux Performance Monitoring Tools
================================================================================
Over the time our website has shown you how to configure various performance tools for Linux and Unix-like operating systems. In this article we have made a list of the most used and most useful tools to monitor the performance for your box. We provided a link for each of them and split them into 2 categories: command lines one and the ones that offer a graphical interface.
### Command line performance monitoring tools ###
#### 1. dstat - Versatile resource statistics tool ####
A versatile combination of **vmstat**, **iostat** and **ifstat**. It adds new features and functionality allowing you to view all the different resources instantly, allowing you to compare and combine the different resource usage. It uses colors and blocks to help you see the information clearly and easily. It also allows you to export the data in **CVS** format to review it in a spreadsheet application or import in a **database**. You can use this application to [monitor cpu, memory, eth0 activity related to time][1].
![](http://blog.linoxide.com/wp-content/uploads/2014/10/dstat.png)
#### 2. atop - Improved top with ASCII ####
A command line tool using **ASCII** to display a **performance monitor** that is capable of reporting the activity of all processes. It shows daily logging of system and process activity for long-term analysis and it highlights overloaded system resources by using colors. It includes metrics related to **CPU**, **memory**, **swap**, **disks** and **network layers**. All the functions of atop can be accessed by simply running:
# atop
And you will be able to [use the interactive interface to display][2] and order data.
![](http://blog.linoxide.com/wp-content/uploads/2014/10/atop1.jpg)
#### 3. Nmon - performance monitor for Unix-like systems ####
Nmon stands for **Nigel's Monitor** and it's a system monitor tool originally developed for **AIX**. If features an **Online Mode** that uses curses for efficient screen handling, which updates the terminal frequently for real-time monitoring and a **Capture Mode** where the data is saved in a file in **CSV** format for later processing and graphing.
![](http://blog.linoxide.com/wp-content/uploads/2014/10/nmon_interface.png)
**More info** in our [nmon performance track article][3].
#### 4. slabtop - information on kernel slab cache ####
This application will show you how the **caching memory allocator** manages in the Linux kernel caches various type of objects. The command is a top like command but is focused on showing real-time kernel slab cache information. It displays a listing of the top caches sorted by one of the listed sort criteria. It also displays a statistics header filled with slab layer information. Here are a few examples:
# slabtop --sort=a
# slabtop -s b
# slabtop -s c
# slabtop -s l
# slabtop -s v
# slabtop -s n
# slabtop -s o
**More info** is available [kernel slab cache article][4]
#### 5. sar - performance monitoring and bottlenecks check ####
The **sar** command writes to standard output the contents of selected cumulative activity counters in the operating system. The **accounting system**, based on the values in the count and interval parameters, writes information the specified number of times spaced at the specified intervals in seconds. If the interval parameter is set to zero, [the sar command displays the average statistics][5] for the time since the system was started. Useful commands:
# sar -u 2 3
# sar u f /var/log/sa/sa05
# sar -P ALL 1 1
# sar -r 1 3
# sar -W 1 3
#### 6. Saidar - simple stats monitor ####
Saidar is a **simple** and **lightweight** tool for system information. It doesn't have major performance reports but it does show the most useful system metrics in a short and nice way. You can easily see the [**up-time, average load, CPU, memory, processes, disk and network interfaces**][6] stats.
Usage: saidar [-d delay] [-c] [-v] [-h]
-d Sets the update time in seconds
-c Enables coloured output
-v Prints version number
-h Displays this help information.
![](http://blog.linoxide.com/wp-content/uploads/2014/10/saidar-e1413370985588.png)
#### 7. top - The classical Linux task manager ####
top is one of the best known **Linux** utilities, it's a **task manager** found on most **Unix-like** operating systems. It shows the current list of running processes that the user can order using different criteria. It mainly shows how much **CPU** and **memory** is used by the **system processes**. top is a quick place to go a check what process or **processes** hangs your system. You can also find here a [list of examples of top usage][7] . You can access it by running the top command and entering the interactive mode:
Quick cheat sheet for interactive mode:
GLOBAL_Commands: <Ret/Sp> ?, =, A, B, d, G, h, I, k, q, r, s, W, Z
SUMMARY_Area_Commands: l, m, t, 1
TASK_Area_Commands Appearance: b, x, y, z Content: c, f, H, o, S, u Size: #, i, n Sorting: <, >, F, O, R
COLOR_Mapping: <Ret>, a, B, b, H, M, q, S, T, w, z, 0 - 7
COMMANDS_for_Windows: -, _, =, +, A, a, G, g, w
![](http://blog.linoxide.com/wp-content/uploads/2014/10/top.png)
#### 8. Sysdig - Advanced view of system processes ####
**Sysdig** is a tool that gives admins and developers unprecedented visibility into the behavior of their systems. The team that develops it wants to improve the way system-level **monitoring** and **troubleshooting** is done by offering a unified, coherent, and granular visibility into the **storage**, **processing**, **network**, and **memory** subsystems making it possible to create trace files for system activity so you can easily analyze it at any time.
Quick examples:
# sysdig proc.name=vim
# sysdig -p"%proc.name %fd.name" "evt.type=accept and proc.name!=httpd"
# sysdig evt.type=chdir and user.name=root
# sysdig -l
# sysdig -L
# sysdig -c topprocs_net
# sysdig -c fdcount_by fd.sport "evt.type=accept"
# sysdig -p"%proc.name %fd.name" "evt.type=accept and proc.name!=httpd"
# sysdig -c topprocs_file
# sysdig -c fdcount_by proc.name "fd.type=file"
# sysdig -p "%12user.name %6proc.pid %12proc.name %3fd.num %fd.typechar %fd.name" evt.type=open
# sysdig -c topprocs_cpu
# sysdig -c topprocs_cpu evt.cpu=0
# sysdig -p"%evt.arg.path" "evt.type=chdir and user.name=root"
# sysdig evt.type=open and fd.name contains /etc
![](http://blog.linoxide.com/wp-content/uploads/2014/10/sysdig.jpg)
**More info** is available in our article on [how to use sysdig for improved system-level monitoring and troubleshooting][8]
#### 9. netstat - Shows open ports and connections ####
Is the tool **Linux administrators** use to show various **network** information, like what ports are open and what network connections are established and what process runs that connection. It also shows various information about the **Unix sockets** that are open between various programs. It is part of most Linux distributions A lot of the commands are explained in the [article on netstat and its various outputs][9]. Most used commands are:
$ netstat | head -20
$ netstat -r
$ netstat -rC
$ netstat -i
$ netstat -ie
$ netstat -s
$ netstat -g
$ netstat -tapn
### 10. tcpdump - insight on network packets ###
**tcpdump** can be used to see the content of the **packets** on a **network connection**. It shows various information about the packet content that pass. To make the output useful, it allows you to use various filters to only get the information you wish. A few examples on how you can use it:
# tcpdump -i eth0 not port 22
# tcpdump -c 10 -i eth0
# tcpdump -ni eth0 -c 10 not port 22
# tcpdump -w aloft.cap -s 0
# tcpdump -r aloft.cap
# tcpdump -i eth0 dst port 80
**You can find them described in** [detail in our article on tcpdump and capturing packets][10]
#### 11. vmstat - virtual memory statistics ####
**vmstat** stands for **virtual memory** statistics and it's a **memory monitoring** tool that collects and displays summary information about **memory**, **processes**, **interrupts**, **paging** and **block I/O**. It is an open source program available on most Linux distributions, Solaris and FreeBSD. It is used to diagnose most memory performance problems and much more.
![](http://blog.linoxide.com/wp-content/uploads/2014/10/vmstat_delay_5.png)
**More info** in [our article on vmstat commands][11].
#### 12. free - memory statistics ####
Another **command line** tool that will show to standard output a few stats about **memory** usage and swap usage. Because it's a simple tool it can be used to either find **quick information** about memory usage or it can be used in different scripts and applications. You can see that [this small application has a lot of uses][12] and almost all system admin use this tool daily :-)
![](http://blog.linoxide.com/wp-content/uploads/2014/10/free_hs3.png)
#### 13. Htop - friendlier top ####
**Htop** is basically an improved version of top showing more stats and in a more colorful way allowing you to sort them in different ways as you can see in our article. It provides a more a more **user-friendly** interface.
![](http://blog.linoxide.com/wp-content/uploads/2014/10/htop.png)
You can find **more info** in [our comparison of htop and top][13]
#### 14. ss - the modern net-tools replacement ####
**ss** is part of the **iproute2** package. iproute2 is intended to replace an entire suite of standard **Unix networking tools** that were previously used for the tasks of [configuring network interfaces, routing tables, and managing the ARP table][14]. The ss utility is used to dump socket statistics, it allows showing information similar to **netstat** and its able display more TCP and state information. A few examples:
# ss -tnap
# ss -tnap6
# ss -tnap
# ss -s
# ss -tn -o state established -p
#### 15. lsof - list open files ####
**lsof** is a command meaning "**list open files**", which is used in many Unix-like systems to report a list of all open files and the processes that opened them. It is used by most Linux distributions and other Unix-like operating systems by **system administrators** to check what files are open by various processes.
# lsof +p process_id
# lsof | less
# lsof u username
# lsof /etc/passwd
# lsof i TCP:ftp
# lsof i TCP:80
You can find **more examples** in the [lsof article][15]
#### 16. iftop - top for your network connections ####
**iftop** is yet another top like application that will is based on networking information. It shows various current **network connection** sorted by **bandwidth usage** or the amount of data uploaded or downloaded. It also provides various estimations of the time it will take to download them.
![](http://blog.linoxide.com/wp-content/uploads/2014/10/iftop.png)
For **more info** see [article on network traffic with iftop][16]
#### 17. iperf - network performance tool ####
**iperf** is a **network testing** tool that can create **TCP** and **UDP** data connections and measure the **performance** of a network that is carrying them. It supports tuning of various parameters related to timing, protocols, and buffers. For each test it reports the bandwidth, loss, and other parameters.
![](http://blog.linoxide.com/wp-content/uploads/2014/10/iperf-e1413378331696.png)
If you wish to use the tool check out our article on [how to install and use iperf][17]
#### 18. Smem - advanced memory reporting ####
**Smem** is one of the most advanced tools for **Linux** command line, it offers information about the actual **memory** that is used and shared in the system, attempting to provide a more realistic image of the actual **memory** being used.
$ smem -m
$ smem -m -p | grep firefox
$ smem -u -p
$ smem -w -p
Check out our [article on Smem for more examples][18]
### GUI or Web based performance tools ###
#### 19. Icinga - community fork of Nagios ####
**Icinga** is **free** and **open source** system and network monitoring application. Its a fork of Nagios retaining most of the existing features of its predecessor and building on them to add many long awaited patches and features requested by the user community.
![](http://blog.linoxide.com/wp-content/uploads/2014/10/Icinga-e1413377995731.png)
**More info** about installing and configuring [can be found in our Icinga article][19].
#### 20. Nagios - the most popular monitoring tool. ####
The most used and popular **monitoring solution** found on Linux. It has a daemon that collects information about various process and has the ability to collect information from remote hosts. All the information is then provided via a nice and powerful **web interface**.
![](http://blog.linoxide.com/wp-content/uploads/2014/10/nagios-e1413305858732.png)
You can find **information** on [how to install Nagios in our article][20]
#### 21. Linux process explorer - procexp for Linux ####
**Linux process explorer** is a graphical process explorer for **Linux**. It shows various **process information** like the process tree, TCP/IP connections and performance figures for each process. It's a replica of procexp found in Windows and developed by **Sysinternals** and aims to be more user friendly then top and ps.
Check our [linux process explorer article][21] for more info.
#### 22. Collectl - performance monitoring tool ####
This is a **performance monitoring** tool that you can use either in an **interactive mode** or you can have it **write reports** to disk and access them with a web server. It reports statistics on **CPU**, **disk**, **memory**, **network**, **nfs**, **process**, **slabs** and more in easy to read and manage format.
![](http://blog.linoxide.com/wp-content/uploads/2014/10/collectl.png)
**More info** in our [Collectl article][22]
#### 23. MRTG - the classic graph tool ####
This is a **network traffic** monitor that will provide you **graphs** using the **rrdtool**. It is one of the oldest tools that provides graphics and is one of the most used on Unix-like operating systems. Check our article on [how to use MRTG][23] for information on the installation and configuration process
![](http://blog.linoxide.com/wp-content/uploads/2014/10/mrtg.png)
#### 24. Monit - simple and easy to use monitor tool ####
**Monit** is an **open source** small **Linux** utility designed to monitor **processes**, **system load**, **filesystems**, **directories** and **files**. You can have it run automatic maintenance and repair and can execute actions in error situations or send email reports to alert the system administrator. If you wish to use this tool you can check out our [how to use Monit article][24].
![](http://blog.linoxide.com/wp-content/uploads/2014/10/monit.png)
#### 25. Munin - monitoring and alerting services for servers ####
**Munin** is a **networked resource monitoring** tool that can help analyze **resource trends** and see what is the weak point and what caused **performance issues**. The team that develops it wishes it for it to be very easy to use and user-friendly. The application is written in Perl and uses the rrdtool to generate graphs, which are with the web interface. The developers advertise the application "plug and play" capabilities with about 500 monitoring plugins currently available.
**More info** can be found in our [article on Munin][25]
--------------------------------------------------------------------------------
via: http://linoxide.com/monitoring-2/linux-performance-monitoring-tools/
作者:[Adrian Dinu][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://linoxide.com/author/adriand/
[1]:http://linoxide.com/monitoring-2/dstat-monitor-linux-performance/
[2]:http://linoxide.com/monitoring-2/guide-using-linux-atop/
[3]:http://linoxide.com/monitoring-2/install-nmon-monitor-linux-performance/
[4]:http://linoxide.com/linux-command/kernel-slab-cache-information/
[5]:http://linoxide.com/linux-command/linux-system-performance-monitoring-using-sar-command/
[6]:http://linoxide.com/monitoring-2/monitor-linux-saidar-tool/
[7]:http://linoxide.com/linux-command/linux-top-command-examples-screenshots/
[8]:http://linoxide.com/tools/sysdig-performance-linux-tool/
[9]:http://linoxide.com/linux-command/netstat-commad-with-all-variant-outputs/
[10]:http://linoxide.com/linux-how-to/network-traffic-capture-tcp-dump-command/
[11]:http://linoxide.com/linux-command/linux-vmstat-command-tool-report-virtual-memory-statistics/
[12]:http://linoxide.com/linux-command/linux-free-command/
[13]:http://linoxide.com/linux-command/linux-htop-command/
[14]:http://linoxide.com/linux-command/ss-sockets-network-connection/
[15]:http://linoxide.com/how-tos/lsof-command-list-process-id-information/
[16]:http://linoxide.com/monitoring-2/iftop-network-traffic/
[17]:http://linoxide.com/monitoring-2/install-iperf-test-network-speed-bandwidth/
[18]:http://linoxide.com/tools/memory-usage-reporting-smem/
[19]:http://linoxide.com/monitoring-2/install-configure-icinga-linux/
[20]:http://linoxide.com/how-tos/install-configure-nagios-centos-7/
[21]:http://sourceforge.net/projects/procexp/
[22]:http://linoxide.com/monitoring-2/collectl-tool-install-examples/
[23]:http://linoxide.com/tools/multi-router-traffic-grapher/
[24]:http://linoxide.com/monitoring-2/monit-linux/
[25]:http://linoxide.com/ubuntu-how-to/install-munin/

View File

@ -0,0 +1,51 @@
How To Upgrade Ubuntu 14.04 To Ubuntu 14.10
================================================================================
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/04/Ubuntu_Unicorn_Utopia.jpeg)
Ubuntu 14.10 has been released yesterday. Wondering **how to upgrade to Ubuntu 14.10 from Ubuntu 14.04**? Dont worry, its extremely easy to upgrade to Ubuntu 14.10. In fact, it is just a matter of few clicks and a good internet connection.
### Do you need to switch to Ubuntu 14.10 from Ubuntu 14.04? ###
Before you go on upgrading to Ubuntu 14.10, make sure that you really want to ditch Ubuntu 14.04 for 14.10. It is important for the reason that you wont be able to downgrade Ubuntu 14.10 back to Ubuntu 14.04. Youll have to go for a fresh install instead.
Ubuntu 14.04 is long-term support (LTS) release. Which means more stability and support for greater period. If you upgrade to 14.10, youll be forced to further upgrade to Ubuntu 15.04 as the support for 14.10 will last for 9 months only while 14.04 will go on for more than 3 years.
Moreover, there are not many new features in Ubuntu 14.10 that could compel many users to switch to it. But yes, youll get the cutting edge OS for sure. So, at the end of the day it is your call whether to upgrade to Ubuntu 14.10 or not.
### Upgrade to Ubuntu 14.10 from Ubuntu 14.04 ###
To upgrade Ubuntu 14.04 to Ubuntu 14.10, follow the steps below:
#### Step 1: ####
Open **Software & Updates**.
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Software_Update_Ubuntu.jpeg)
Go to **Updates** tab. In here make sure that **Notify me of a new Ubuntu version** is set to **For any new version**. By default Ubuntu will notify you only when there is another LTS release available. You must change it to upgrade to any new interim release.
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Upgrade_Ubuntu.png)
#### Step 2: ####
Now run **Software Updater**.
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/04/Ubuntu_Updater.jpg)
After the updates, it should prompt for the availability of a newer version. Click on upgrade and follow the next few obvious steps.
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Upgrade_to_Ubuntu_1410.jpeg)
I hope this quick tutorial helped you to **upgrade Ubuntu 14.04 to Ubuntu 14.10**. Though this tutorial was written for Ubuntu, you can use the exact same steps to upgrade to Xubuntu 14.10, Kubuntu 14.10 or Lubuntu 14.10. Stay tuned for more Ubuntu 14.10 related articles.
--------------------------------------------------------------------------------
via: http://itsfoss.com/upgrade-ubuntu-14-04-to-14-10/
作者:[Abhishek][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://itsfoss.com/author/Abhishek/

View File

@ -0,0 +1,109 @@
How To Upgrade Ubuntu 14.04 Trusty To Ubuntu 14.10 Utopic
================================================================================
Hello all! Greetings! Today, we will discuss about how to upgrade from Ubuntu 14.04 to 14.10 final beta. As you may know, Ubuntu 14.10 final beta has already been released. According to the [Ubuntu release schedule][1], the final stable version will be available today in a couple of hours.
Do you want to upgrade to Ubuntu 14.10 from Ubuntu 14.04/13.10/13,04/12,10/12.04, or older version on your system? Just follow the simple steps given below. Please note that you cant directly upgrade from 13.10 to 14.04. First, you should upgrade from 13.10 to 14.04, and then upgrade from 14.04 to 14.10. Clear? Good. Now, Let us start the upgrade process.
Though, the steps provided below are compatible for Ubuntu 14.10, It might work for other Ubuntu derivatives such as Lubuntu 14.10, Kubuntu 14.10, and Xubuntu 14.10 as well.
**Important**: Before upgrading, dont forget to backup your important data to any external device like USB hdd or CD/DVD.
### Desktop Upgrade ###
Before going to upgrade, we need to update the system. Open up the Terminal and enter the following commands.
sudo apt-get update && sudo apt-get dist-upgrade
The above command will download and install the available latest packages.
Reboot your system to finish installing updates.
Now, enter the following command to upgrade to new available version.
sudo update-manager -d
Software Updater will show up and search for the new release.
After a few seconds, you will see a screen like below that saying: “**However, Ubuntu 14.10 is available now (you have 14.04)**”. Click on the button Upgrade to start upgrading to Ubuntu 14.10.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Software-Updater_001.png)
The Software Updater will ask you to confirm still you want to upgrade. Click Start Upgrade to begin installing Ubuntu 14.10.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Release-Notes_002.png)
**Please Note**: This is a beta release. Do not install it on production systems. The final stable version will be released in a couple of hours.
Now, the Software Updater will prepare to start setting up new software channels.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Distribution-Upgrade_003.png)
After a few minutes, the software updater will notify you the details the number of packages are going to be removed, and number of packages are going to be installed. Click **Start upgrade** to continue. Make sure you have good and stable Internet connection.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Untitled-window_004.png)
Now, the updater will start to getting new packages. It will take a while depending upon your Internet connection speed.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Distribution-Upgrade_005.png)
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Distribution-Upgrade_001.png)
After a while, youll be asked to remove unnecessary applications. Finally, click **Restart** to complete the upgrade.
Congratulations! Now, you have successfully upgraded to Ubuntu 14.10.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/10/Details_002.png)
Thats it.. Start using the new Ubuntu version.
### Server Upgrade ###
To upgrade from Ubuntu 14.04 server to Ubuntu 14.10 server, do the following steps.
Install the update-manager-core package if it is not already installed:
sudo apt-get install update-manager-core
Edit the file /etc/update-manager/release-upgrades,
sudo nano /etc/update-manager/release-upgrades
and set Prompt=normal or Prompt=lts as shown below.
# Default behavior for the release upgrader.
[DEFAULT]
# Default prompting behavior, valid options:
#
# never - Never check for a new release.
# normal - Check to see if a new release is available. If more than one new
# release is found, the release upgrader will attempt to upgrade to
# the release that immediately succeeds the currently-running
# release.
# lts - Check to see if a new LTS release is available. The upgrader
# will attempt to upgrade to the first LTS release available after
# the currently-running one. Note that this option should not be
# used if the currently-running release is not itself an LTS
# release, since in that case the upgrader won't be able to
# determine if a newer release is available.
Prompt=normal
Now, it is time to upgrade your server system to latest version using the following command:
sudo do-release-upgrade -d
Follow the on-screen instructions. Youre done!!.
Cheers!!
--------------------------------------------------------------------------------
via: http://www.unixmen.com/upgrade-ubuntu-14-04-trusty-ubuntu-14-10-utopic/
作者SK
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://wiki.ubuntu.com/UtopicUnicorn/ReleaseSchedule

View File

@ -0,0 +1,56 @@
UbuTricks 14.10.08
================================================================================
> 是一款 Ubuntu 系统上的实用工具软件,使用它可以让您安装上最新版本的流行应用程序和游戏。
UbuTricks 是一款免费发布的用 Bash 语言编写的脚本型应用程序。它被设计为从最初版本一直向上搜索的方式来帮助您在 Ubuntu Linux 操作系统以及其它 Ubuntu 衍生版本系统上安装最受好评的游戏和图形应用程序的最高版本软件。
![](http://i1-linux.softpedia-static.com/screenshots/UbuTricks_1.png)
### 我能利用 UbuTricks 来安装哪些应用程序呢? ###
目前,最新版本的 Calibre译者注calibre 是一款开源的电子书软体套装,可以用来组织、存放、以及管理电子书,支持大多数的电子书格式。 同时也支持与许多流行的电子书阅读器进行同步并可能在DRM的限制下转换电子书的格式 、Fotoxx译者注一款图像管理和图像编辑程序、Geary译者注适配于GNOME3 桌面环境的 IMAP 邮件客户端、GIMP、Google Earth、HexChat(译者注:一款基于 XChat 的 IRC 客户端)、jAlbum译者注网页在线相册、Kdenlive、LibreOffice、PCManFM、Qmmp译者注基于 Qt 库的音频播放器、QuiteRSS, QupZilla、Shutter译者注多功能屏发屏幕截屏工具、SMPlayer、Ubuntu Tweak、Wine 和 [XBMC (Kodi)][4](译者注开源免费的媒体播放器13.2 “Gotham” 版本后改名为 Kodi)、PlayOnLinux、Red Notebook、NeonView、Sunflower、Pale Moon、 QupZilla Next、FrostWire 以及 RSSOwl 等这些应用程序都可以用 UbuTricks 来安装。
### 我能利用 UbuTricks 来安装哪些游戏呢? ###
此外,最新版本 0 A.D.、 韦诺之战、 Transmageddon、Unvanquished 和 VCMI (英雄 III 引擎) 这些游戏都可以用 UbuTricks 程序来安装。用户也可以安装最新版本的 Cinnamon 和 LXQt 桌面环境。
### UbuTricks 使用起步 ###
此程序是以 .sh 文件shell 脚本)形式发布的,可以在命令行下面运行 “sh ubutricks.sh” 命令(不加引号)来运行,或者使它具有可执行权限,然后双击存入在 Home 目录或桌面的此文件来运行。您所需要做的就是选择应用程序或游戏,再点击 OK 按纽来安装。
### 它的工作原理? ###
首次启动时,一开始会显示一个欢迎画面,来告知用户是怎么样使用的。有三种方法来安装应用程序或游戏:通过 PPADEB 格式文件或源代码 tar 包。请注意,应用程序或游戏会自动的下载和安装。
### 它支持哪些系统发布版本? ###
它对 Ubuntu Linux 操作系统的多个版本都支持,但如果没有特别说明的话,默认指的当前稳定版本,即 Ubuntu 14.04 LTSTrusty Tahr版本。您的 Ubuntu 盒子上如果还没有安装 gksu 包的话,此程序是没法运行的,而 gksu 又基于 Zenity 包,所以您也应该安装它。
![](http://i1-linux.softpedia-static.com/screenshots/UbuTricks_2.jpg)
- 最新版本:格林威治标准时间 2014 年 10 月 9 号 1129
- 价格:免费!
- 开发者:Dan Craciun
- 主页:[www.tuxarena.com][1]
- 许可证类型:[GPL (GNU General Public License)][3]
- 类别:ROOT \ 桌面操作环境 \ 工具
### UbuTricks 下载: ###
- [ubutricks.sh][2]
--------------------------------------------------------------------------------
via: http://linux.softpedia.com/get/Desktop-Environment/Tools/UbuTricks-103626.shtml
作者:[Marius Nestor][a]
译者:[runningwater](https://github.com/runningwater)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.softpedia.com/editors/browse/marius-nestor
[1]:http://www.tuxarena.com/apps/ubutricks/
[2]:http://www.tuxarena.com/intro/files/ubutricks.sh
[3]:http://www.gnu.org/licenses/gpl-2.0.html
[4]:http://xbmc.org/about/

View File

@ -0,0 +1,43 @@
针对POODLE 漏洞Claws Mail 3.11.0 给我们带来了很多的变化和更新。
================================================================================
> 随着每一个新版本的推出Claws Mail 将会越来越好。
![](http://i1-news.softpedia-static.com/images/news2/Claws-Mail-3-11-0-Brings-a-Ton-of-Changes-and-Fix-for-POODLE-Exploit-462808-2.jpg)
**Claws Mail 发起于Linux 社区,是一款快速、简单易用,并且充满了很多有趣的特性的开源邮件客户端。开发者们推送了一次大的更新和升级,这是一个非常好的主意。**
有些人可能不知道这个邮件客户端但Claws Mail 实际上是一个非常老的软件。它以前名称是Sylpheed-Claws 已经走过了13个年头。Claws Mail 不久以前分支(forked)了出来,从此新分支变成了很好的可能替代Sylpheed-Claws 产品。
现在还有很多针对Linux 的邮件客户端正在进行着霸权地位的争夺战尽管这是在很礼貌的方式下完成的。很多的Linux发行版都默认集成了Claws Mail对于Claws Mail 的粉丝,这将是一个好消息。
### Claws Mail 3.11.0 给我们带来了哪些新的特性呢 ###
就像其他的应用程序一样在处理网络连接和网络协议时Claws Mail 也一直受到漏洞识别社区的关注比如说POODLE 漏洞。开发者很紧张的时间表和大量的更新日志就很好的反应了这个。
“新版本的RSSyl 插件已经完全被重新设计和重写。从先前版本的迁移是自动完成的,它拥有一个新的存储格式在~/.claws-mail/RSSyl/ (用分级目录代替了平面文件的格式)。并且用expat 库代替了libxml2 库来解析提要数据。”
“应广大朋友的要求,当消息的编辑窗口停留着消息体的上部,在消息体中使用上键(UP key)时不再会回到头文字段了。这是在3.10.0版本中引入的。详见开发者的[宣告][1]”
当然大家也可以放心了因为POODLE 漏洞在新的邮件客户端中已经被关闭是通过禁用了所有的SSLv3 连接实现的。
标签地址也收到了一些改进,并变得更好,特别是对于新邮件,导航箭头的帮助已经做了调整,有很多较小的改进。
开发者为大多数发行版创建了很多仓库,但是你也依然可以使用源来安装。想要进一步的了解,你可以关注官方关于每个版本的公告。
去下载Claws Mail 3.11.0 的源码包吧,如果你想要自己编译软件。
- [Claws Mail 3.11.0 tar.xz File size: 5.6 MB][2]
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/Claws-Mail-3-11-0-Brings-a-Ton-of-Changes-and-Fix-for-POODLE-Exploit-462808.shtml
作者:[Silviu Stahie][a]
译者:[barney-ro](https://github.com/barney-ro)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://news.softpedia.com/editors/browse/silviu-stahie
[1]:http://www.claws-mail.org/news.php
[2]:http://sourceforge.net/projects/claws-mail/files/Claws%20Mail/3.11.0/claws-mail-3.11.0.tar.xz

View File

@ -0,0 +1,62 @@
一个 Linux 支持者:从 16 岁开始在 Linux 上 hacking
================================================================================
![](http://www.linux.com/images/stories/41373/Yitao-Li.png)
>翻译文章中是称主人公为 Yitao Li还是李逸韬他似乎是美国人“李逸韬”是看的他的个人主页上的。
在软件开发者 [Yitao Li (李逸韬) 的 GitHub 仓库][1]中,几乎所有的项目都是在他的 Linux 机器上开发完成的。它们没有一个是必须特定需要 Linux 的,但李逸韬说他使用 Linux 来做“任何事情”。
举些例子:“编码/脚本设计,网页浏览,网站托管,任何云相关的,发送/接受 PGP 签名的邮件,调整防火墙规则,将 OpenWrt 镜像刷入路由器,运行某版本的 Linux kernel 的同时编译另一个版本,从事研究,完成功课(例如,用 Tex 输入数学公式),以及其他许多......” Li 在邮件里如是说。
在李逸韬的 GitHub 仓库里所有项目中他的最爱是一个学校项目,调用 libpthread 和 libfuse 库使用 C++ 开发,用来理解和正确执行基于 PAXOS 的分布式加锁,键值对服务,最终实现一个分布式文件系统。他使用若干测试脚本分别在单核和多核的机器上对这个项目进行测试。
“One can learn something about distributed consensus protocol by implementing the PAXOS protocol correctly (or at least mostly correctly) such that the implementation will pass all the tests,” he said. “And of course once that is accomplished, one can also earn some bragging rights. Besides, a distributed filesystem can be useful in many other programming projects.”
>"One can learn something about distributed consensus protocol by implementing the PAXOS protocol correctly (or at least mostly correctly) such that the implementation will pass all the tests" 不知道翻译的是不是有点混乱
"一个人可以通过正确实现或者至少大部分正确PAXOS 协议,让它通过所有测试,来学习关于分布式共识协议的知识,"他说,“当然一旦这完成了,他就可以获得一些炫耀的权利。除此之外,一个分布式文件系统在其他许多编程项目中也可以很有用。”
Li first started using Linux at age 16, or about 7.47 years ago, he says, using the website [linuxfromscratch.org][2], with numerous hints from the free, downloadable Linux From Scratch book. Why?
>with numerous hints from the free, downloadable Linux From Scratch book. 讲的应该是从 Linuxfromscratch 学习 LFS 编译安装 Linux不知道该怎么翻译。
Li 是在 16 岁的时候第一次开始使用 Linux或是者说大约 7.47 年之前,他说,通过使用网站 [linuxfromscratch.org][2] ,从 Scratch book 中获得免费可下载的 Linux以及大量 Hints。那么他为什么会使用 Linux
“1. Linux is very hacker-friendly and I do not see any reason for not using it,” he writes. “2. The prefrontal cortex of the brain becoming well-developed at age 16 (?).”
>2. The prefrontal cortex of the brain becoming well-developed at age 16 (?). 原文里的 16 (?) 是啥意思?
"1. Linux 非常黑客友好所以我没看到任何不用它的理由,"他写道“2. 大脑的前额叶皮质在16岁时正变得发达。”
[![](http://www.linux.com/images/stories/41373/ldc_peop_linux.png)][3]
他现在为 eBay工作主要进行 Java 编程但有时也使用 Hadoop, Pig, Zookeeper, Cassandra, MongoDB以及其他一些需要 POSIX 兼容平台的软件来工作。他主要通过给 Wikipedia 页面和 Linux 相关的论坛做贡献来支持 Linux 社区,另外当然还通过成为 Linux 基金会的个人会员。
他紧跟最新的 Linux 发展动态,最近还对 GCC 4.9 及之后版本新增的 “-fstack-protector-strong” 选项印象深刻。
"虽然这并不与我的任何项目直接相关,但它对于安全和性能问题十分重要。"他说,“这个选项比 -fstack-protector-all 更高效的多,却在安全上几乎没有影响,同时比 -fstack-protector 选项提供了更好的栈溢出防护覆盖。”
欢迎来到 Linux 基金会Yitao !
了解更多关于成为 [Linux 基金会个人会员][3]的内容。基金会将为每位 6 月份期间的新个人会员捐赠 $25 给 Code.org。
----------
![](http://www.linux.com/community/forums/avatar/41373/catid/200-libby-clark/thumbnail/large/cache/1331753338)
[Libby Clark][4]
--------------------------------------------------------------------------------
via: http://www.linux.com/news/featured-blogs/200-libby-clark/778559-the-people-who-support-linux-hacking-on-linux-since-age-16
译者:[jabirus](https://github.com/jabirus) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://github.com/yl790
[2]:http://linuxfromscratch.org/
[3]:https://www.linuxfoundation.org/about/join/individual
[4]:http://www.linux.com/community/forums/person/41373/catid/200-libby-clark

View File

@ -0,0 +1,51 @@
Linux能够提供消费者想要的东西吗
================================================================================
> 由Jack Wallen提出的新观点提供消费者想要的东西也许是收获无限成就的关键。
![](http://tr2.cbsistatic.com/hub/i/r/2014/08/14/ce90a81e-d17b-4b8f-bd5b-053120e305e6/resize/620x485/f5f9e0798798172d4e41edbedeb6b7e5/whattheyneedhero.png)
在消费电子的世界里如果你不能提供购买者想要的东西那他们就会跑去别家。我们最近在Firefox浏览器上就看过类似的事情。消费者想要的是一个快速而不那么臃肿的软件而开发者们却走到了另外的方向上。最后用户都转移到Chrome或Chromium上去了。
Linux需要深深凝视自己的水晶球仔细体会那场浏览器大战留下的尘埃然后留意一下这点建议
如果你不能提供他们想要的,他们就会离开。
而这种事与愿违的另一个例子是Windows 8。消费者不喜欢那套界面。而微软却坚持使用因为这是把所有东西搬到Surface平板上所必须的。相同的情况也可能发生在Canonical和Ubuntu Unity身上 -- 尽管它们的目标并不是单一独特地针对平板电脑来设计(所以,整套界面在桌面系统上仍然很实用而且直观)。
一直以来Linux开发者和设计者们看上去都按照他们自己的想法来做事情。他们过分在意“吃你自家的狗粮”这句话了。以至于他们忘记了一件非常重要的事情
没有新用户,他们的“根基”也仅仅只属于他们自己。
换句话说,唱诗班不仅仅是被传道,他们也同时在宣传。让我给你看三个案例来完全掌握这一点。
- 多年以来有在Linux系统中替代活动目录Active Directory的需求。我很想把这个名称换成LDAP但是你真的用过LDAP吗那就是个噩梦。开发者们也努力了想让LDAP能易用一点但是没一个做到了。而让我很震惊的是这样一个从多用户环境下发展起来的平台居然没有一个能和AD正面较量的功能。这需要一组开发人员从头开始建立一个AD的开源替代。这对那些寻求从微软产品迁移的中型企业来说是非常大的福利。但是在这个产品做好之前他们还不能开始迁移。
- 另一个从微软激发的需求是Exchange/Outlook。是我也知道许多人都开始用云。但是事实上中等和大型规模生意仍然依赖于Exchange/Outlook组合直到能有更好的产品出现。而这将非常有希望发生在开源社区。整个拼图的一小块已经摆好了虽然还需要一些工作- 群件客户端Evolution。如果有人能够从Zimbra拉出一个分支然后重新设计成可以配合Evolution甚至Thunderbird来提供服务实现Exchange的简单替代那这个游戏就不是这么玩了而消费者获得的利益将是巨大的。
- 便宜,便宜,还是便宜。这是大多数人都得咽下去的苦药片 - 但是消费者和生意就是希望便宜。看看去年一年Chromebook的销量吧。现在搜索一下Linux笔记本看能不能找到700美元以下的。而只用三分之一的价格就可以买到一个让你够用的Chromebook一个使用了Linux内核的平台。但是因为Linux仍然是一个细分市场很难降低成本。像红帽那种公司也许可以改变现状。他们也已经推出了服务器硬件。为什么不推出一些和Chromebook有类似定位但是却运行完整Linux环境的低价中档笔记本呢请看“[Cloudbook是Linux的未来吗][1]”)其中的关键是这种设备要低成本并且符合普通消费者的要求。不要站在游戏玩家/开发者的角度去思考了,记住普通消费者真正的需求 - 一个网页浏览器不会有更多了。这是Chromebook为什么可以这么轻松地成功。Google精确地知道消费者想要什么然后推出相应的产品。而面对Linux一些公司仍然认为他们吸引买家的唯一途径是高端昂贵的硬件。而有一点讽刺的是口水战中最经常听到的却是Linux只能在更慢更旧的硬件上运行。
最后Linux需要看一看乔布斯传Book Of Jobs搞清楚如何说服消费者们他们真正要的就是Linux。在生意上和在家里 -- 每个人都可以享受到Linux带来的好处。说真的开源社区怎么可能做不到这点呢Linux本身就已经带有很多漂亮的时髦术语标签稳定性可靠性安全性免费 -- 再加上Linux实际已经进入到绝大多数人手中了只是他们自己还不清楚罢了。现在是时候让他们知道这一点了。如果你是用Android或者Chromebooks那么你就在用某种形式上的Linux。
搞清楚消费者需求一直以来都是Linux社区的绊脚石。而且我知道 -- 太多的Linux开发都基于某个开发者有个特殊的想法。这意味着这些开发都针对的“微型市场”。是时候无论如何让Linux开发社区能够进行全球性思考了。“一般用户有什么需求我们怎么满足他们”让我提几个最基本的点。
一般用户想要:
- 低价
- 设备和服务能无缝衔接
- 直观而现代的设计
- 百分百可靠的浏览器体验
把这四点放在心中应该可以轻松地以Linux为基础开发出用户实际需要的产品。Google做到了...当然Linux社区也可以参照Google的工作并开发出更好的产品。把这些应用到集成AD这件事上能开发出Exchange/Outlook的替代或者基于云的群件工具就会发生一件非常特殊的事 -- 人们会为它买单。
你觉得Linux社区能够提供消费者想要的东西吗在下边的讨论区里分享一下你的看法。
--------------------------------------------------------------------------------
via: http://www.techrepublic.com/article/will-linux-ever-be-able-to-give-consumers-what-they-want/
作者:[Jack Wallen][a]
译者:[zpl1025](https://github.com/zpl1025)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.techrepublic.com/search/?a=jack+wallen
[1]:http://www.techrepublic.com/article/is-the-cloudbook-the-future-of-linux/

View File

@ -0,0 +1,128 @@
安卓编年史
================================================================================
![安卓1.5的屏幕软键盘输入时的输入建议栏,大写状态键盘,数字与符号界面,更多符号弹窗。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/kb5.png)
安卓1.5的虚拟键盘输入时的输入建议栏,大写状态键盘,数字与符号界面,更多符号弹窗。
Ron Amadeo供图
### Android 1.5 Cupcake——虚拟键盘打开设备设计的大门 ###
在2009年4月安卓1.1发布后将近三个月后安卓1.5发布了。这是第一个拥有公开的,市场化代号的安卓版本:纸杯蛋糕(Cupcake)。从这个版本开始,每个版本的安卓将会拥有一个按字母表排序,以小吃为主题的代号。
纸杯蛋糕新增功能中最重要的明显当属虚拟键盘。这是OEM厂商第一次有可能抛开数不清按键的实体键盘以及复杂的滑动结构创造出平板风格的安卓设备。
安卓的按键标识可以在大小写之间切换这取决于大写锁定是否开启。尽管默认情况下它是关闭的显示在键盘顶部的建议栏有个选项可以打开它。在按键的弹框中带有省略号的就像“u”上面图那样的可以在按住的情况下可以输入弹框中的[发音符号][1]。键盘可以切换到数字和符号,长按句号键可以打开更多符号。
![1.5和1.1中的应用程序界面和通知面板的对比。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/abweave.png)
1.5和1.1中的应用程序界面和通知面板的对比。
Ron Amadeo供图
“摄像机”功能加入了新图标Google Talk从IM中分离出来成为了一个独立的应用。亚马逊MP3和浏览器的图标同样经过了重新设计。亚马逊MP3图标更改的主要原因是亚马逊即将计划推出其它的安卓应用而“A”图标所指范围太泛了。浏览器图标无疑是安卓1.1中最糟糕的设计,所以它被重新设计了,并且不再像是一个桌面操作系统的对话框。应用抽屉的最后一个改变是“图片”,它被重新命名为了“相册”。
通知面板同样经过了重新设计。面板背景加上了布纹纹理通知的渐变效果也被平滑化了。安卓1.5在系统核心部分有许多设计上的微小改变,这些改变影响到所有的应用。在“清除通知”按钮上,你可以看到全新的系统按钮风格,相比与旧版本的按钮有了渐变,更细的边框线以及更少的阴影。
![安卓1.5和1.1中的“添加到主屏幕”对话框。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/widget.png)
安卓1.5和1.1中的“添加到主屏幕”对话框。
Ron Amadeo供图
第三方小部件是纸杯蛋糕的另一个头等特性,它们现在仍然是安卓的本质特征之一。无论是用来控制应用还是显示应用的信息,开发者们都可以为他们的应用捆绑一个主屏幕小部件。谷歌同样展示了一些它们自己的新的小部件,分别来自日历和音乐这两个应用。
![左:日历小部件,音乐小部件以及一排实时文件夹的截图。中:文件夹列表。右:“带电话号码的联系人”实时文件夹的打开视图。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/folders-and-widgets-and-stuff.png)
左:日历小部件,音乐小部件以及一排实时文件夹的截图。中:文件夹列表。右:“带电话号码的联系人”实时文件夹的打开视图。
Ron Amadeo供图
在上方左边的截图里你可以看到新的日历和音乐图标。日历小部件只能显示当天的一个事件,点击它会打开日历。你不能够选择日历所显示的内容,小部件也不能够重新设置大小——它就是上面看起来的那个样子。音乐小部件是蓝色的——尽管音乐应用里没有一丁点的蓝色——它展示了歌曲名和歌手名,此外还有播放和下一曲按钮。
同样在左侧截图里,底部一排的头三个文件夹是一个叫做“实时文件夹”的新特性。它们可以在“添加到主屏幕”菜单中的新顶层选项“文件夹”中被找到,就像你在中间那张图看到的那样。实时文件夹可以展示一个应用的内容而不用打开这个应用。纸杯蛋糕带来的都是和联系人相关的实时文件夹,能够显示所有联系人,带有电话号码的联系人和加星标的联系人。
实时文件夹在主屏的弹窗使用了一个简单的列表视图而不是图标。联系人只是实时文件夹的一个初级应用它是给开发者使用的一个完整API。谷歌用Google Books应用做了个图书文件夹的演示它可以显示RSS订阅或是一个网站的热门故事。实时文件夹是安卓没有成功实现的想法之一这个特性最终在蜂巢(3.x)中被取消。
![摄像机和相机界面,屏幕上有触摸快门。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/device-2013-12-26-11016071.png)
摄像机和相机界面,屏幕上有触摸快门。
Ron Amadeo供图
如果你不能认出新的“摄像机”图标这不奇怪视频录制是在安卓1.5中才被添加进来的。相机和摄像机两个图标其实是同一个应用你可用过菜单中的“切换至相机”和“切换至摄像机”选项在它们之间切换。T-Mobile G1上录制的视频质量并不高。一个“高”质量的测试视频输出一个.3GP格式的视频文件其分辨率仅为352 x 288帧率只有4FPS。
除了新的视频特性相机应用中还可以看到一些急需的UI调整。上方左侧的快照展示了最近拍摄的那张照片点击它会跳转到相册中的相机胶卷。各个界面上方右侧的圆形图标是触摸快门这意味着从1.5开始,安卓设备不再需要一个实体相机按钮。
这个界面相比于之后版本的相机应用实际上更加接近于安卓4.2的设计。尽管后续的设计会向相机加入愚蠢的皮革纹理毅力更多的控制设置安卓最终还是回到了基本的设计安卓4.2的重新设计和这里有很多共同之处。安卓1.5中的原始布局演变成了安卓4.2中的最小化的,全屏的取景器。
![Google Talk运行在Google Talk中vs运行在IM应用中。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/gtalk-im.png)
Google Talk运行在Google Talk中vs运行在IM应用中。
Ron Amadeo供图
安卓1.0的IM即时通讯应用功能上支持Google Talk但在安卓1.5中Google Talk从中分离出来成为独立应用。IM应用中对其的支持已经被移除。Google Talk上图左侧明显是基于IM应用上图右侧但随着独立应用在1.5中的发布在IM应用的工作被放弃了。
新的Google Talk应用拥有重新设计过的状态栏右侧状态指示灯重新设计过的移动设备标识是个灰色的安卓小绿人图案。聊天界面的蓝色的输入框变成了更加合理的灰色消息的背景从淡绿和白色变成了淡绿和绿色。有了独立的应用谷歌可以向其中添加Gtalk独有的特性比如“不保存聊天记录”聊天该特性可以阻止Gmail保存每个聊天记录。
![安卓1.5的日历更加明亮。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/cal15.png)
安卓1.5的日历更加明亮。
Ron Amadeo供图
日历抛弃了丑陋的黑色背景上白色方块的设计,转变为全浅色主题。所有东西的背景都变成了白色,顶部的星期日变成了蓝色。单独的约会方块从带有颜色的细条变成了拥有整个颜色背景,文字也变为白色。这将是很长一段时间内日历的最后一次改动。
![从左到右:新的浏览器控件,缩放视图,复制/粘贴文本高亮。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/browser-craziness.png)
从左到右:新的浏览器控件,缩放视图,复制/粘贴文本高亮。
Ron Amadeo供图
安卓1.5从系统全局修改了缩放控件。缩放控件不再是两个大圆形,取而代之的是一个圆角的椭圆形从中间分开为左右两个按钮。这些新的控件被用在了浏览器,谷歌地图和相册之中。
浏览器在缩放功能上做了很多工作。在放大或缩小之后点击“1x”按钮可以回到正常缩放状态。底部右侧的按钮会将页面缩放整个页面并在页面上显示一个放大矩形框就像你能在上面中间截图看到的那样。抓住矩形框并且释放会将页面的那一部分显示回“1x”视图。安卓并没有加速滚动这使得最大滚动速度着实很慢——这就是谷歌对长网页页面导航的解决方案。
浏览器的另一个新增功能就是从网页上复制文本——之前你只能从输入框中复制文本。在菜单中选择“复制文本”会激活高亮模式在网页文本上拖动你的手指会使它们高亮。G1的轨迹球对于这种精准的移动十分的方便并且能够控制鼠标指针。这里并没有可以拖动的光标当你的手指离开屏幕的时候安卓就会复制文本并且移除高亮。所以你必须做到荒谬般的精确来使用复制功能。
安卓1.5中的浏览器很容易崩溃——比之前的版本经常多了。仅仅是以桌面模式浏览Ars Technica就会导致崩溃许多其它的站点也是一样。
![](http://cdn.arstechnica.net/wp-content/uploads/2013/12/lockscreen.png)
Ron Amadeo供图
默认的锁屏界面和图形锁屏都不再是空荡荡的黑色背景,而是和主屏幕一致的壁纸。
图形解锁界面的浅色背景显示出了谷歌在圆圈对齐工作上的草率和马虎。白色圆圈在黑圆圈里从来都不是在正中心的位置——像这样基本的对齐问题对于这一时期的安卓是个频繁出现的问题。
![Youtube上传工具内容快照自动旋转设置全新的音乐应用设计。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/TWEAKS2.png)
Youtube上传工具内容快照自动旋转设置全新的音乐应用设计。
Ron Amadeo供图
安卓1.5给予了YouTube应用向其网站上传视频的能力。上传通过从相册中分享视频到YouTube应用来完成或从YouTube应用中直接打开一个视频。这将会打开一个上传界面用户在这里可以设置像视频标题标签和权限这样的选项。照片可以以类似的方式上传到Picasa一个谷歌建立的图片网站。
整个系统的调整没有多少。现在喜爱的联系人在联系人列表中可以显示图片(尽管常规联系人还是没有图片)。第三张截图展示了设置中全新的自动旋转选项——这个版本同样也是第一个支持基于从设备内部传感器读取的数据自动切换方向的版本。
> #### 谷歌地图是第一个登陆谷歌市场的内置应用 ####
>
> 尽管这篇文章为了简单起见主要以安卓版本顺序来组织应用更新但还是有一些在这时间线之外的东西值得我们特别注意一下。2009年6月14日谷歌地图成为第一个通过谷歌市场更新的预置应用。尽管其它的所有应用更新还是要求一个完整的系统更新地图从系统中脱离了出来只要新特性已经就绪就可以随时接收升级周期之外的更新。
>
> 将应用从核心系统分离发布到安卓市场上将成为谷歌前进的主要关注点。总的来说OTA更新是个重大的主动改进——这需要OEM厂商和运营商的合作二者都是拖着后退的角色。更新同样没有做到到达每个设备。今天谷歌市场给了谷歌一个与每个安卓手机之间的联系而没有了这样的外界干扰。
>
> 然而这是后来才需要考虑的问题。在2009年谷歌只有两部裸机需要支持而且早期的安卓运营商似乎对谷歌的升级需要反应积极。这些早期的行动对谷歌部分来说将被证明是非常积极的决定。一开始公司只在最重要的应用——地图和Gmail上——走这条路线但后来它将大部分预置应用导入安卓市场。后来的举措比如Google Play服务甚至将应用API从系统移除加入了谷歌商店。
>
> 至于这时的新地图应用,得到了一个新的路线界面,此外还有提供公共交通和步行方向的能力。现在,路线只有个朴素的黑色列表界面——逐向风格的导航很快就会登场。
>
> 2009年6月同时还是苹果发布第三代iPhone——3GS——以及第三版iPhone OS的时候。iPhone OS 3的主要特性大多是追赶上来的项目比如复制/粘贴和对彩信的支持。苹果的硬件依然是更好的软件更流畅更整合还有更好的设计。尽管谷歌疯狂的开发步伐使得它不得不走上追赶的道路。iPhone OS 2是在安卓0.5的Milestone 5版本之前发布的在iOS一年的发布周期里安卓发布了五个版本。
![HTC Magic第二部安卓设备第一个不带实体键盘的设备。](http://cdn.arstechnica.net/wp-content/uploads/2014/04/htc-magic-white.jpg)
HTC Magic第二部安卓设备第一个不带实体键盘的设备。
HTC供图
纸杯蛋糕在改进安卓上做了巨大的工作特别是从硬件方面。虚拟键盘意味着不再需要实体键盘。自动旋转使得系统更加接近iPhone屏幕上的虚拟快门按键同样也意味着实体相机按键变成了可选选项。1.5发布后不久,第二部安卓设备的出现将会展示出这个平台未来的方向:HTC Magic。Magic上图没有实体键盘或相机按钮。它是没有间隙没有滑动结构的平板状设备依赖于安卓的虚拟按键来完成任务。
安卓旗舰机开始可能有着最多按键——一个实体qwerty键盘——后来随着时间流逝开始慢慢减少按键数量。而Magic是重大的一步去除了整个键盘和相机按钮它仍然使用通话和挂断键四个系统键以及轨迹球。
----------
![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg)
[Ron Amadeo][a] / Ron是Ars Technica的评论编缉专注于安卓系统和谷歌产品。他总是在追寻新鲜事物还喜欢拆解事物看看它们到底是怎么运作的。
[@RonAmadeo][t]
--------------------------------------------------------------------------------
via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/8/
译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://en.wikipedia.org/wiki/Diacritic
[a]:http://arstechnica.com/author/ronamadeo
[t]:https://twitter.com/RonAmadeo

View File

@ -0,0 +1,90 @@
pidstat - 监控并统计Linux进程的数据
================================================================================
**pidstat**命令用来监控被Linux内核管理的独立任务(进程)。它输出每个受内核管理的任务的相关信息。pidstat命令也可以用来监控特定进程的子进程。区间参数具体说明各个报告间的时间间隔。它的值为0(或者没有参数)说明进程的统计数据的时间是从系统启动开始计算的。
### 如何安装pidstat ###
pidstat 是sysstat软件套件的一部分sysstat包含很多监控linux系统行为的工具它能够从大多数linux发行版的软件源中获得。
在Debian/Ubuntu系统中可以使用下面的命令来安装
# apt-get install sysstat
CentOS/Fedora/RHEL版本的linux中则使用下面的命令
# yum install sysstat
### 使用pidstat ###
使用pidstat不加任何参数等价于加上-p但是只有正在活动的任务会被显示出来。
# pidstat
![pidstat](http://blog.linoxide.com/wp-content/uploads/2014/09/pidstat.jpg)
在结果中你能看到如下内容:
- **PID** - 被监控的进程的进程号
- **%usr** - 当在用户层执行(应用程序)时这个进程的cpu使用率。注意这个字段计算的cpu时间不包括在虚拟处理器中使用花去的时间。
- **%system** - 这个进程在系统级别使用时的cpu使用率。
- **%guest** - 在虚拟机中的cpu使用率
- **%CPU** - 进程总的cpu使用率。在SMP环境(多处理器)中cpu使用率会根据cpu的数量进行划分当你在命令行中输入-I参数。
- **CPU** - 这个进程能够使用的处理器数目
- **Command** - 这个进程的命令名称。
### I/O 统计数据 ###
通过使用-d参数来得到I/O的统计数据。比如
# pidstat -d -p 8472
![pidstat io](http://blog.linoxide.com/wp-content/uploads/2014/09/pidstat-io.jpg)
IO 输出会显示一些内的条目:
- **kB_rd/s** - 进程从硬盘上的读取速度
- **kB_wr/s** - 进程向硬盘中的写入速度
- **kB_ccwr/s** - 进程写入磁盘被取消的速率
### Page faults and memory usage ###
### Page faults和内存使用 ###
使用-r标记你能够得到内存使用情况的数据。
![pidstat pf mem](http://blog.linoxide.com/wp-content/uploads/2014/09/pidstat-pfmem.jpg)
重要的条目:
- **minflt/s** - 从内存中加载数据时每秒钟出现的小的错误的数目
- **majflt/s** - 从内存中加载数据时每秒出现的较大错误的数目
- **VSZ** - 虚拟容量:整个进程的虚拟内存使用
- **RSS** - 长期的内存使用:进程非交换物理内存的使用
### 举例 ###
**1.** 你可以通过使用下面的命令来监测内存使用
# pidstat -r 2 5
这会给你5份关于page faults的统计数据结果间隔2s。这将会更容易的定位出现问题的进程。
**2.** 显示所有mysql server的子进程
# pidstat -T CHILD -C mysql
**3.** To combine all statistics in a single report you can use:
**3.** 将所有的统计数据结合到一个简单的结果记录中:
# pidstat -urd -h
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-command/linux-pidstat-monitor-statistics-procesess/
作者:[Adrian Dinu][a]
译者:[John](https://github.com/johnhoow)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://linoxide.com/author/adriand/

View File

@ -0,0 +1,158 @@
如何创建和使用Python CGI脚本
===
你是否想使用Python语言创建一个网页或者处理用户从web表单输入的数据这些任务可以通过Python CGI(公用网关接口)脚本以及一个Apache web服务器实现。当用户请求一个指定URL或者和网页交互(比如点击""提交"按钮)的时候CGI脚本就会被web服务器启用。CGI脚本调用执行完毕后它的输出结果就会被web服务器用来创建显示给用户的网页。
### 配置Apache web服务器让其能运行CGI脚本 ###
在这个教程里我们假设Apache web服务器已经安装好并已运行。这篇教程使用的Apache web服务器(版本2.2.15用于CentOS发行版6.5)运行在本地主机(127.0.0.1)并且监听80端口如下面的Apache指令指定一样
ServerName 127.0.0.1:80
Listen 80
下面举例中的HTML文件存放在web服务器上的/var/www/html目录下并通过DocumentRoot指令指定(指定网页文件所在目录)
DocumentRoot "/var/www/html"
现在尝试请求URLhttp://localhost/page1.html
这将返回web服务器中下面文件的内容
/var/www/html/page1.html
为了启用CGI脚本我们必须指定CGI脚本在web服务器上的位置需要用到ScriptAlias指令
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
以上指令表明CGI脚本保存在web服务器的/var/www/cgi-bin目录请求URL里包含/cgi-bin/的将会搜索这个目录下的CGI脚本。
我们必须还要明确CGI脚本在/var/www/cgi-bin目录下有执行权限还要指定CGI脚本的文件扩展名。使用下面的指令
<Directory "/var/www/cgi-bin">
Options +ExecCGI
AddHandler cgi-script .py
</Directory>
下面访问URLhttp://localhost/cgi-bin/myscript-1.py
这将会调用web服务器中下面所示脚本
/var/www/cgi-bin/myscript-1.py
### 创建一个CGI脚本 ###
在创建一个Python CGI脚本之前你需要确认你已经安装了Python(这通常是默认安装的,但是安装版本可能会有所不同)。本篇教程使用的脚本是使用Python版本2.6.6编写的。你可以通过下面任意一命令(-V和--version参数将显示所安装Python的版本号)检查Python的版本。
$ python -V
$ python --version
如果你的Python CGI脚本要用来处理用户输入的数据(从一个web输入表单)然后你将需要导入Python cgi模块。这个模块可以处理用户通过web输入表单输入的数据。你可以在你的脚本中通过下面的语句导入该脚本
import cgi
你也必须修改Python CGI脚本的执行权限以防止web服务器不能调用。可以通过下面的命令增加执行权限
# chmod o+x myscript-1.py
### Python CGI例子 ###
涉及到Python CGI脚本的两个方案将会在下面讲述
- 使用Python脚本创建一个网页
- 读取并显示用户输入的数据,并且在网页上显示结果
注意Python cgi模块在方案2中是必需的因为这涉及到用户从web表单输入数据。
### 例子1 使用Python脚本创建一个网页 ###
对于这个方案,我们将通过创建包含一个单一提交按钮的网页/var/www/html/page1.html开始。
<html>
<h1>Test Page 1</h1>
<form name="input" action="/cgi-bin/myscript-1.py" method="get">
<input type="submit" value="Submit">
</form>
</html>
当"提交"按钮被点击,/var/www/cgi-bin/myscript-1.py脚本将被调用(通过action参数指定)。通过设置方法参数为"get"来指定一个"GET"请求,服务器将会返回指定的网页。/var/www/html/page1.html在浏览器中的显示情况如下
![](https://farm4.staticflickr.com/3933/14932853623_eff2df3260_z.jpg)
/var/www/cgi-bin/myscript-1.py的内容如下
#!/usr/bin/python
print "Content-Type: text/html"
print ""
print "<html>"
print "<h2>CGI Script Output</h2>"
print "<p>This page was generated by a Python CGI script.</p>"
print "</html>"
第一行声明表示这是使用 /usr/bin/python命令运行的Python脚本。"Content-Type: text/html"打印语句是必需的这是为了让web服务器知道接受自CGI脚本的输出类型。其余的语句用来输出HTML格式的其余网页内容。
当"Submit"按钮点击,下面的网页将返回:
![](https://farm4.staticflickr.com/3933/15553035025_d70be04470_z.jpg)
这个例子的要点是你可以决定哪些信息可以被CGI脚本返回。这可能包括日志文件的内容当前登陆用户的列表或者今天的日期。在你处理时拥有所有python库的可能性是无穷无尽的。
### 例子2读取并显示用户输入的数据并将结果显示在网页上 ###
对于这个方案,我们将通过创建一个含有三个输入域和一个提交按钮的网页/var/www/html/page2.html开始。
<html>
<h1>Test Page 2</h1>
<form name="input" action="/cgi-bin/myscript-2.py" method="get">
First Name: <input type="text" name="firstName"><br>
Last Name: <input type="text" name="lastName"><br>
Position: <input type="text" name="position"><br>
<input type="submit" value="Submit">
</form>
</html>
当"Submit"按钮点击,/var/www/cgi-bin/myscript-2.py脚本将被执行(通过action参数指定)。/var/www//html/page2.html显示在web浏览器中的图片如下所示(注意,三个输入域已经被填写了)
![](https://farm4.staticflickr.com/3935/14932853603_ffc3bd330e_z.jpg)
/var/www/cgi-bin/myscript-2.py的内容如下
#!/usr/bin/python
import cgi
form = cgi.FieldStorage()
print "Content-Type: text/html"
print ""
print "<html>"
print "<h2>CGI Script Output</h2>"
print "<p>"
print "The user entered data are:<br>"
print "<b>First Name:</b> " + form["firstName"].value + "<br>"
print "<b>Last Name:</b> " + form["lastName"].value + "<br>"
print "<b>Position:</b> " + form["position"].value + "<br>"
print "</p>"
print "</html>"
正如前面提到import cgi语句需要用来确保能够处理用户通过web输入表单输入的数据。web输入表单被封装在一个表单对象中叫做cgi.FieldStorage对象。一旦开始"Content-Type: text/html"是必需的因为web服务器需要知道接受自CGI脚本的输出格式。用户输入的数据在包含form["firstName"].valueform["lastName"].value, and form["position"].value的语句中被接受。那些中括号中的名称和**/var/www/html/page2.html**文本输入域中定义的名称参数一致。
当网页上的"Submit"按钮被点击,下面的网页将被返回。
![](https://farm4.staticflickr.com/3949/15367402150_946474dbb0_z.jpg)
这个例子的要点就是你可以很容易地读取并显示用户在web表单上输入的数据。除了以字符串的方式处理数据你也可以用Python将用户输入的数据转化为可用于数值计算的数字。
### 结论 ###
本教程演示了如何使用Python CGI脚本创建网页并处理用户在网页表单输入的数据。查阅更多关于Apache CGI脚本的信息点击[这里][1]。查阅更多关于Python cgi模块的信息点击[这里][2]。
---
via: http://xmodulo.com/create-use-python-cgi-scripts.html
作者:[Joshua Reed][a]
译者:[su-kaiyao](https://github.com/su-kaiyao)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/joshua
[1]:http://httpd.apache.org/docs/2.2/howto/cgi.html
[2]:https://docs.python.org/2/library/cgi.html#module-cgi

View File

@ -0,0 +1,115 @@
怎么样称得上是Linux下优秀的命令行计算器
================================================================================
每个现代的Linux桌面发行版都预装着一个带有图形界面的计算器程序。不过如果你的工作区中全是命令行窗口那么你一定会在其中的一个命令行窗口中处理一些数字相关的问题。或许你在寻找一款基于命令行的计算器程序。如果是这样的话[GNU bc][1]“basic calculator”的缩写会是你不二的选择。当然Linux下又很多基于命令行的计算器应用我认为GNU bc是功能最强大和最有用的。
在GNU时代之前bc实际上是一个著名的精密计算语言。它的诞生要追溯到70年代的Unix时期了。最初bc作为一个语法和C语言相似的编程语言而著名。随着时间的改变最开始的bc演化成POSIX bc最后变成了今天的GNU bc。
### GNU bc的特性 ###
现在的GNU bc是早期bc经过若干次改进和功能增强的结果。目前它被所有的主流GNU/Linux发行版所收纳。GNU bc支持高精度数字和多种数值类型例如二进制、十进制、十六进制的输入输出。
如果你对C语言很熟悉的话你会发现bc使用了和C语言一样或相似的算术操作符。受支持的操作符包括算术运算符+,-,*,/,%,++,--)、比较运算符(<,>,==,!=,<=,>=)、逻辑运算符(!,&&,||)、位运算符(&,|,^,~,<<,>>)和复合赋值运算符(+=,-=,*=,/=,%=,&=,|=,^=,&&=,||=,<<=,>>=。bc内置了很多有用的函数像是平方根、正弦、余弦、反正弦、自然对数、指数等。
### 如何使用GNU bc ###
作为一个基于命令行的计算器GNU bc的使用是没有限制的。在本文中我会向大家介绍bc命令的几个常用的特性。如果你想要更加详细的指导你可以查阅[官方指南][2]。
如果你没有一个预先写好的bc脚本那么你需要在交互模式下运行bc。在这种模式下你输入的以回车结束的任何声明或者表达式会被立刻计算出结果。你需要输入以下命令来进入bc的交互界面。如果向退出bc你可以输入'quit'并且按回车。
$ bc
![](https://farm4.staticflickr.com/3939/15403325480_d0db97d427_z.jpg)
本文下面展示的例子应该在bc交互界面中输入。
### 输入表达式 ###
如果想要计算一个算术表达式,我们可以在闪烁的光标处输入该表达式,然后按回车确认。你也可以将该结果存储到一个变量中,然后在其他表达式中使用该变量。
![](https://farm6.staticflickr.com/5604/15403325460_b004b3f8da_o.png)
在一个bc的交互界面中存在没有个数限制的命令历史记录。使用上方向键来查看之前输入的命令。如果你想限制历史记录保存的命令数量你可以将一个名为history的特殊变量设置成你希望的数值。该变量默认为-1也就是“历史记录数量没有限制”。
### 输入输出进制切换 ###
经常会发生的是你输入一个表达式并且想使用二进制或者十六进制来显示结果。bc允许你在输入输出数字的进制间转换。输入和输出的数系基分别存储在ibase和obase变量中默认值为10有效的数值是2到16或者环境变量BC_BASE_MAX的值.你只需要更改ibase和obase的值就可以在不同进制之间转换了。下面是一个求两个十六进制/二进制数和的例子:
![](https://farm6.staticflickr.com/5604/15402320019_f01325f199_z.jpg)
需要注意的是我有意地将obase=16放到了ibase=16前面反过来则是不可以的。这个是因为如果我先输入ibase=16那么随后输入的obase=16中的16会被认为是16进制的数字也就是十进制的22。当然这个不是我们所期望的。
### 调整精度 ###
在bc中数字的精度存储在一个名为scale的特殊变量中。该变量表示小数点后数字的个数。scale默认为0意味着所有的数字和结果以整数形式储存。你可以通过改变scale这个特殊变量的值来调整数值的精度。
scale=4
![](https://farm6.staticflickr.com/5597/15586279541_211312597b.jpg)
### 使用内置函数 ###
除了简单的算术操作符GNU bc还通过外部的数学函数库来提供许多高级的数学函数。你可以在命令行界面使用“-l”选项来打开bc。
这里描述了一些内置的函数。
N的二次方根
sqrt(N)
X的正弦X是弧度
s(X)
X的余弦X是弧度
c(X)
X的反正弦返回值是弧度
a(X)
X的自然对数
l(X)
X的指数对数
e(X)
### Other goodies as a language ###
作为一个计算语言GNU bc支持简单的声明变量赋值、中断、返回等、复合语句if、while、for loop等和自定义函数。在这里我不会涉及到这些特性的细节不过你可以通过[官方指南][2]来学习如何使用这些特性。下面是一个简单的函数示例:
define dummy(x){
return(x * x);
}
dummy(9)
81
dummy(4)
16
### 在非交互界面下使用GNU bc ###
到目前为止我们一直在交互界面下使用bc。不过更加流行的使用bc的方法是在没有交互界面的脚本中运行bc。这种情况下你可以使用echo命令并且借助管道来向bc发送输入内容。例如
$ echo "40*5" | bc
$ echo "scale=4; 10/3" | bc
$ echo "obase=16; ibase=2; 11101101101100010" | bc
![](https://farm4.staticflickr.com/3943/15565252976_f50f453c7f_z.jpg)
总结以下GNU bc是一款强大并且通用的基于命令行的计算器应用因此它绝对不会让你失望。它预装在所有的现代Linux发行版中bc可以让你不用离开命令行就可以进行高效的数学计算。所以GNU bc一定会是你的最爱。
--------------------------------------------------------------------------------
via: http://xmodulo.com/command-line-calculator-linux.html
作者:[Dan Nanni][a]
译者:[JonathanKang](https://github.com/JonathanKang)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/nanni
[1]:http://www.gnu.org/software/bc/
[2]:https://www.gnu.org/software/bc/manual/bc.html

View File

@ -0,0 +1,32 @@
如何从Ubuntu 14.04 LTS 升级到Ubuntu 14.10
================================================================================
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/10/software-and-updates.jpg)
**想知道怎样从Ubuntu 14.04 LTS 升级到Ubuntu 14.10么? 这就是我们要讲的**
Canonical不会强迫14.04的用户升级到14.10这个中间版本
但这并不意味着 **你**不能将你的坚如磐石的Trusty Tahr升级到有点让人印象深刻的Utopic Unicorn。
要得到非LTS版本的Ubuntu发布通知你需要在软件和更新工具中选择。这个很直接。
- 打开 **软件和更新**
- 选择 **更新** 选项
- 进入‘**有新版本Ubuntu时通知我**’的选项
- 在下拉菜单选项中将‘**对于长期支持版本**’改成‘**对于任何版本**
切换后你会想快点更新。
现在准备就绪Canonical此刻会弹出“升级”提示给用户想比较普通的ISO镜像而言经常延迟可以通过软件更新工具更新到14.10了。
--------------------------------------------------------------------------------
via: http://www.omgubuntu.co.uk/2014/10/upgrade-ubuntu-14-04-to-14-10
作者:[Joey-Elijah Sneddon][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:https://plus.google.com/117485690627814051450/?rel=author

View File

@ -0,0 +1,168 @@
SUSE Linux Zypper 命令示例
================================================================================
Zypper是SUSE Linux中的命令行接口可以用于安装升级卸载管理仓库、执行不同的请求等等。本篇将会讨论zypper的几个不同命令的例子。
语法:
# zypper [--global-opts] <command> [--command-opts] [command-arguments]
中括号中的部分可以不需要。执行zypper最简单的方法是 <command>后输入他的名字。
### 例子1 列出可用的全局选项和命令 ###
打开终端输入zypper并按回车它会显示所有可用的全局选项和命令。
linux-xa3t:~ # zypper
### 例子2 获得zypper的某个帮助 ###
语法: zypper help [command]
linux-xa3t:~ # zypper help remove
remove (rm) [options] <capability> ...
Remove packages with specified capabilities.
A capability is NAME[.ARCH][OP<VERSION>], where OP is one of <, <=, =, >=, >.
Command options:
-r, --repo <alias|#|URI> Load only the specified repository.
-t, --type <type> Type of package (package, patch, pattern, product).
Default: package.
-n, --name Select packages by plain name, not by capability.
-C, --capability Select packages by capability.
--debug-solver Create solver test case for debugging.
-R, --no-force-resolution Do not force the solver to find solution,let it ask.
--force-resolution Force the solver to find a solution (even an aggressive one).
-u, --clean-deps Automatically remove unneeded dependencies.
-U, --no-clean-deps No automatic removal of unneeded dependencies.
-D, --dry-run Test the removal, do not actually remove.
### 例子3 打开zypper shell或者会话 ###
linux-xa3t:~ # zypper sh
zypper>
or
linux-xa3t:~ # zypper shell
zypper>
### 例子4 列出已定义的仓库 ###
linux-xa3t:~ # zypper repos
![](http://www.linuxtechi.com/wp-content/uploads/2014/10/zypper-repos.png)
or
linux-xa3t:~ # zypper lr
#### 4.1) 以表格的形式列出仓库的URI ####
![](http://www.linuxtechi.com/wp-content/uploads/2014/10/zypper-repos-uri.png)
#### 4.2) 以优先级列出仓库 ####
linux-xa3t:~ # zypper lr -p
![](http://www.linuxtechi.com/wp-content/uploads/2014/10/zypper-repos-priority.png)
### 例子5 刷新仓库 ###
linux-xa3t:~ # zypper ref
Repository 'openSUSE-13.1-Non-Oss' is up to date.
Repository 'openSUSE-13.1-Oss' is up to date.
Repository 'openSUSE-13.1-Update' is up to date.
Repository 'openSUSE-13.1-Update-Non-Oss' is up to date.
All repositories have been refreshed.
### 例子6 修改zypper仓库 ###
zypper仓库可以通过别名、数字或者URI或者通过all、 remote、 local、 medium-type这些选项修改。
linux-xa3t:~ # zypper mr -d 6 #禁用6号仓库
linux-xa3t:~ # zypper mr -rk -p 70 upd #启用自动书信并为upd仓库设置rpm文件缓存且设置它的优先级为70
linux-xa3t:~ # zypper mr -Ka #为所有的仓库禁用rpm文件缓存
linux-xa3t:~ # zypper mr -kt #为远程仓库设置rpm文件缓存
### 例子7 添加仓库 ###
语法: zypper addrepo 或者 zypper ar <repo 的URL或者别名 >
linux-xa3t:~ # zypper ar http://download.opensuse.org/update/13.1/ update
Adding repository 'update' .............................................[done]
Repository 'update' successfully added
Enabled: Yes
Autorefresh: No
GPG check: Yes
URI: http://download.opensuse.org/update/13.1/
### 例子8 移除仓库 ###
语法: zypper removerepo <仓库名> <别名>
或者
zypper rr <仓库名> <别名>
linux-xa3t:~ # zypper rr openSUSE-13.1-1.10 openSUSE-13.1-1.10
Removing repository 'openSUSE-13.1-1.10' ............................[done]
Repository 'openSUSE-13.1-1.10' has been removed.
### 例子9 安装包 ###
语法: zypper install <包名> 或者 zypper in <包名>
linux-xa3t:~ # zypper install vlc
### 例子10 卸载包 ###
语法: zypper remove <包名> OR zypper rm <包名>
linux-xa3t:~ # zypper remove sqlite
### 例子11 导出和导入仓库 ###
导出仓库语法 : zypper repos export 或者 zypper lr -e
linux-xa3t:~ # zypper lr --export repo-backup/back.repo
Repositories have been successfully exported to repo-backup/back.repo.
导入仓库语法 :
linux-xa3t:~ # zypper ar repo-backup/back.repo
### 例子12 Updating a package ###
语法: zypper update <包名> 或者 zypper up <包名>
linux-xa3t:~ # zypper update bash
### 例子13 安装源码包 ###
语法: zypper source-install <源码包> OR zypper si <源码包>
linux-xa3t:~ # zypper source-install zypper
### 例子:只安装以来 ###
例子13中的命令会安装和构建特定包的依赖。如果你想要安装源码包就用-D选项
# zypper source-install -D package_name
只安装依赖就使用-d
# zypper source-install -d package_name
--------------------------------------------------------------------------------
via: http://www.linuxtechi.com/suse-linux-zypper-command-examples/
作者:[Pradeep Kumar][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.linuxtechi.com/author/pradeep/

View File

@ -1,86 +0,0 @@
Linux 常见问题解答 --怎么用checkinstall从源码创建一个RPM或DEB包
================================================================================
> **问题**:我想要从源码创建安装的软件程序。有没有一种方式来创建并且从源码安装包,而不是运行“make install”那样以后如果我想我可以容易的卸载程序。
如果你已经从从它的源码运行“make install”安装了linux程序。想完整移除它将变得真的很麻烦除非程序的创造者在Makefile里提供卸载的目标。你会有在你系统里文件的完整列表来和从源码安装之后比较然后手工移除所有在制作安装过程中加入的文件
这时候Checkinstall就可以派上使用。Checkinstall保留命令行创建或修改的所有文件的路径(例如“make install”“make install_modules”等)并建立一个标准的二进制包让你能用你发行版的标准包管理系统安装或卸载它例子Red Hat的yum或者Debian的apt-get命令 It has been also known to work with Slackware, SuSe, Mandrake and Gentoo as well, as per the official documentation. [official documentation][1].
在这篇文章中我们只集中在红帽子和Debian为基础的发行版并展示怎样从源码使用Checkinstall创建一个RPM和DEB软件包
### 在linux上安装Checkinstall ###
在Debian衍生上安装Checkinstall
# aptitude install checkinstall
在红帽子的发行版上安装Checkinstall你需要下载一个预先建立的Checkinstall rpm(例如:从 [http://rpm.pbone.net][2]),他已经从Repoforge库里删除。对于Cent OS6这个rpm包也可在Cent OS7里工作。
# wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/ikoinoba/CentOS_CentOS-6/x86_64/checkinstall-1.6.2-3.el6.1.x86_64.rpm
# yum install checkinstall-1.6.2-3.el6.1.x86_64.rpm
一旦checkinstall安装你可以用下列格式创建一个特定的软件包
# checkinstall <install-command>
如果没有参数默认安装命令“make install”将被使用
### 用Checkinstall创建一个RPM或DEB包 ###
在这个例子里我们将创建一个htop包对于linux交互式文本模式进程查看器就像上面的 steroids
首先,让我们从项目的官方网站下载源代码,一个最佳的练习,我们存储源码到/usr/local/src,并解压它
# cd /usr/local/src
# wget http://hisham.hm/htop/releases/1.0.3/htop-1.0.3.tar.gz
# tar xzf htop-1.0.3.tar.gz
# cd htop-1.0.3
让我们找出htop安装命令那样我们就能调用Checkinstall命令下面展示了htop用“make install”命令安装
# ./configure
# make install
因此创建一个htop包我们可以调用checkinstall不带任何参数安装这将使用“make install”命令创建一个包。随着这个过程 checkinstall命令会问你一个连串的问题。
总之这个命令会创建一个htop包 **htop**:
# ./configure
# checkinstall
回答“Y”“我会创建一个默认设置的包文件
![](https://farm6.staticflickr.com/5577/15118597217_1fdd0e0346_z.jpg)
你可以输入一个包的简短描述然后按两次ENTER
![](https://farm4.staticflickr.com/3898/15118442190_604b71d9af.jpg)
输入一个数值修改下面的任何值或ENTER前进
![](https://farm4.staticflickr.com/3898/15118442180_428de59d68_z.jpg)
然后checkinstall将自动地创建一个.rpm或者.deb包根据你的linux系统是什么
在CentOS7
![](https://farm4.staticflickr.com/3921/15282103066_5d688b2217_z.jpg)
在Debian 7:
![](https://farm4.staticflickr.com/3905/15118383009_4909a7c17b_z.jpg)
--------------------------------------------------------------------------------
via: http://ask.xmodulo.com/build-rpm-deb-package-source-checkinstall.html
译者:[luoyutiantang](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://checkinstall.izto.org/docs/README
[2]:http://rpm.pbone.net/
[3]:http://ask.xmodulo.com/install-htop-centos-rhel.html

View File

@ -0,0 +1,96 @@
Wine 1.7.29(开发版本)已发布-在基于RedHat与Debian的系统上安装
=========================
**Wine**,一个在Linux平台上非常受欢迎并且强大的开源应用有了它我们可以在Linux平台上完美运行Windows应用与游戏。
![Install Wine (Development Version) in Linux](http://www.tecmint.com/wp-content/uploads/2014/05/Install-Wine-Development-Version.png)
在Linux上安装Wine开发版本
WineHQ团队近期宣布了一个新的开发版本**Wine1.7.29**。这个版本带来了诸多重要的特性,并且修复了**44**个bug。
Wine团队几乎每周都会发布新的开发版本并且加入许多新特性以及修复漏洞。每个新版本都会支持新的应用与游戏Windows这使得Wine在那些想要在Linux下运行Windows应用的用户群体中很流行并且是不可缺少的。
根据变更日志,这个版本中添加了以下的关键特性:
- 在DirectWrite中加入增强的外形塑造与BiDi译者bi-directional language镜像。
- 升级了一些页面错误处理方式。
- 增加了更多的C运行时函数。
- 修复了大量的bug。
在官方的 [变更日志][1] 中可以找到关于这个版本更多更深入的细节。
这篇文章指导你在基于**RedHat**与**Debian**的系统如CentOSFedoraUbuntuLinux Mint以及其他的发型版中安装最新的开发版本**Wine 1.7.29**。
##在Linux中安装 Wine 1.7.29 开发版本##
遗憾的是目前还没有官方的Wine仓库可以获取基于**RedHat**系统的版本只能通过编译源码来安装。如果要这么做的话我们先要安装一些开发包如gccflexbisonlibX11-devel freetype-devel 以及开发工具等等。这些工具都是编译Wine源码所必须的。我们可以通过**YUM**命令来安装这些包。
##RedHatFedoraCentOS##
# yum -y groupinstall 'Development Tools'
# yum -y install flex bison libX11-devel freetype-devel
然后使用如下命令下载Wine最新的开发版本**1.7.29**)以及解压源码包。
$cd /tmp
$wget http://citylan.dl.sourceforge.net/project/wine/Source/wine-1.7.29.tar.bz2
$ tar -xvf wine-1.7.29.tar.bz2 -C /tmp/
接下来使用下列命令编译及安装Wine。
注:安装过程大概需要**15-20**分钟,这个时间由你的网络速度以及电脑硬件配置决定,在安装过程中需要**root**密码。
####32位系统####
$cd wine-1.7.29/
$./tools/wineinstall
####64位系统####
$ cd wine-1.7.29/
$ ./configure --enable-win64
$ make
# make install
###UbuntuDebian 与 Linux Mint###
在**Ubuntu**系统下,你可以使用官方的**PPA**方便的安装最新的Wine开发版本。打开一个终端并使用sudo权限执行下列命令。
$ sudo add-apt-repository ppa:ubuntu-wine/ppa
$ sudo apt-get update
$ sudo apt-get install wine 1.7 winetricks
**注**:在写这篇文章时,只能获取**1.7.26**,在官方的仓库中还没有更新到最新版本,但是当仓库更新到**1.7.29**后使用上面的指令可以安装最新的版本。译者为毛我看了版本号是1.6.2......
安装成功后你可以安装或运行任何windows应用或游戏了示例如下
$ wine notepad
$ wine notepad.exe
$ wine c:\\windows\\notepad.exe
**注**:切记,这是一个开发版本,请勿在生产系统上安装它。建议这个版本仅作测试用。
如果你需要最新的稳定版本,可以参考下列文章,它介绍了如何安装最新的稳定版本。
- [Install Wine 1.6.2 (Stable) in RHEL, CentOS and Fedora][2]
- [Install Wine 1.6.2 (Stable) in Debian, Ubuntu and Mint][3]
###参考链接###
- [WineHQ Homepage][4]
-------------------------------------------------
via: http://www.tecmint.com/install-wine-in-linux/
作者:[Ravi Saive][a]
译者:[SPccman](https://github.com/SPccman)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/admin/
[1]:http://www.winehq.org/announce/1.7.29
[2]:http://www.tecmint.com/install-wine-in-rhel-centos-and-fedora/
[3]:http://www.tecmint.com/install-wine-on-ubuntu-and-linux-mint/
[4]:http://www.winehq.org/