diff --git a/published/201407/Encrypting Your Cat Photos.md b/published/201407/Encrypting Your Cat Photos.md old mode 100755 new mode 100644 diff --git a/published/201505/20150326 How to set up server monitoring system with Monit.md b/published/201505/20150326 How to set up server monitoring system with Monit.md old mode 100755 new mode 100644 diff --git a/published/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md b/published/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md new file mode 100644 index 0000000000..21e8fcb748 --- /dev/null +++ b/published/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md @@ -0,0 +1,345 @@ +一个八年的 Linux 老用户使用 Windows 10 的体验 +========================================================== + +Windows 10 是2015年7月29日上市的最新一代 Windows NT 系列系统,它是 Windows 8.1 的继任者。Windows 10 支持 Intel 32位平台,AMD64 以及 ARM v7 处理器。 + +![Windows 10 and Linux Comparison](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-vs-Linux.jpg) + +*对比:Windows 10与Linux* + +作为一个连续使用 linux 超过8年的用户,我想要去体验一下 Windows 10 ,因为有很多关于它的消息。这篇文章是我观察力的一个重大突破。我将从一个 linux 用户的角度去看待一切,所以这篇文章可能会有些偏向于 linux。尽管如此,本文也绝对不会有任何虚假信息。 + +1、用谷歌搜索“download Windows 10”并且点击第一个链接。 + +![Search Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Search-Windows-10.jpg) + +*搜索 Windows 10* + +你也可以直接打开: [https://www.microsoft.com/en_us/software-download/Windows10[1] + +2、微软要求我从 Windows 10, Windows 10 KN, Windows 10 N 和 Windows 10 单语言版中选择一个版本。 + +![Select Windows 10 Edition](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Windows-10-Edition.jpg) + +*选择版本* + +以下是各个版本的简略信息: + +- Windows 10 - 包含微软提供给我们的所有软件 +- Windows 10N - 此版本不包含媒体播放器 +- Windows 10KN - 此版本没有媒体播放能力 +- Windows 10 单语言版 - 仅预装一种语言 + +3、我选择了第一个选项“Windows 10”并且单击“确认”。之后我要选择语言,我选择了“英语”。 + +微软给我提供了两个下载链接。一个是32位版,另一个是64位版。我单击了64位版--这与我的电脑架构相同。 + +![Download Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Download-Windows-10.jpg) + +*下载 Windows 10* + +我的带宽是15M的,下载了整整3个小时。不幸的是微软没有提供系统的种子文件,否则整个过程会更加舒畅。镜像大小为 3.8 GB(LCTT译者注:就我的10M小水管,我使用迅雷下载用时50分钟)。 + +我找不到更小的镜像,微软并没有为 Windows 提供网络安装镜像。我也没有办法在下载完成后去校验哈希值。(LCTT 译注:你知道的,这对于 Linux 来说都是常识了) + +我十分惊讶,Windows 在这样的问题上居然如此漫不经心。为了验证这个镜像是否正确下载,我需要把它刻到光盘上或者复制到我的U盘上然后启动它,一直静静的看着它安装直到安装完成。 + +首先,我用 dd 命令将 win10 的 iso 镜像刻录到U盘上。 + + # dd if=/home/avi/Downloads/Win10_English_x64.iso of=/dev/sdb1 bs=512M; sync + +这需要一点时间。在此之后我重启系统并在 UEFI(BIOS)设置中选择从我的U盘启动。 + +#### 系统要求 #### + +升级 + +- 仅支持从 Windows 7 SP1 或者 Windows 8.1 升级 + +全新安装 + +- 处理器: 1GHz 以上 +- 内存: 1GB以上(32位),2GB以上(64位) +- 硬盘: 16GB以上(32位),20GB以上(64位) +- 显卡: 支持DirectX 9或更新 + WDDM 1.0 驱动 + +###Windows 10 安装过程### + +1、Windows 10启动成功了。他们又换了logo,但是仍然没有信息提示我它正在做什么。 + +![Windows 10 Logo](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Logo.jpg) + +*Windows 10 Logo* + +2、选择安装语言,时区,键盘,输入法,点击下一步。 + +![Select Language and Time](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Language-and-Time.jpg) + +*选择语言和时区* + +3、点击“现在安装”。 + +![Install Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Windows-10.jpg) + +*安装Windows 10* + +4、下一步是输入密钥,我点击了“跳过”。 + +![Windows 10 Product Key](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Product-Key.jpg) + +*Windows 10 产品密钥* + +5、从列表中选择一个系统版本。我选择了 Windows 10专业版。 + +![Select Install Operating System](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Install-Operating-System.jpg) + +*选择系统版本* + +6、到了协议部分,选中"我接受"然后点击下一步。 + +![Accept License](http://www.tecmint.com/wp-content/uploads/2015/08/Accept-License.jpg) + +*同意协议* + +7、下一步是选择(从 Windows 的老版本)升级到 Windows 10 或者安装 Windows。我搞不懂为什么微软要让我自己选择:“安装Windows”被微软建议为“高级”选项。但是我还是选择了“安装Windows”。 + +![Select Installation Type](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Installation-Type.jpg) + +*选择安装类型* + +8、选择驱动器,点击“下一步”。 + +![Select Install Drive](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Install-Drive.jpg) + +*选择安装盘* + +9、安装程序开始复制文件,准备文件,安装更新,之后进行收尾。如果安装程序能在安装时输出一堆字符来表示它在做什么就更好了。 + +![Installing Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Installing-Windows.jpg) + +*安装 Windows* + +10、在此之后 Windows 重启了。它们说要继续的话,我们需要重启。 + +![Windows Installation Process](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Installation-Process.jpg) + +*安装进程* + +11、我看到了一个写着“正在准备 Windows”的界面。它停了整整五分多钟!仍然没有说明它正在做什么。没有输出。 + +![Windows Getting Ready](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Getting-Ready.jpg) + +*正在准备 Windows* + +12、又到了输入产品密钥的时间。我点击了“以后再说”,并使用快速设置。 + +![Enter Product Key](http://www.tecmint.com/wp-content/uploads/2015/08/Enter-Product-Key.jpg) + +*输入产品密钥* + +![Select Express Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Express-Settings.jpg) + +*使用快速设置* + +13、又出现了三个界面,作为 Linux 用户我认为此处应有信息来告诉我安装程序在做什么,但是我想多了。 + +![Loading Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Loading-Windows.jpg) + +*载入 Windows* + +![Getting Updates](http://www.tecmint.com/wp-content/uploads/2015/08/Getting-Updates.jpg) + +*获取更新* + +![Still Loading Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Still-Loading-Windows.jpg) + +*还是载入 Windows* + +14、安装程序想要知道谁拥有这台机器,“我的组织”或者我自己。选择我自己并继续。 + +![Select Organization](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Organization.jpg) + +*选择组织* + +15、在单击继续之前,安装程序提示我加入“Aruze Ad”或者“加入域”。我选择了后者。 + +![Connect Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Connect-Windows.jpg) + +*连接网络* + +16、安装程序让我新建一个账户。所以我输入了“user_name”就点击了下一步,我觉得我会收到一个要求我必须输入密码的信息。 + +![Create Account](http://www.tecmint.com/wp-content/uploads/2015/08/Create-Account.jpg) + +*新建账户* + +17、让我惊讶的是 Windows 甚至都没有显示一个警告或提示信息,告诉我必须创建密码。真粗心。不管怎样,现在我可以体验系统了。 + +![Windows 10 Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Desktop.jpg) + +*Windows 10的桌面环境* + +#### Linux 用户(我)直到现在的体验 #### + +- 没有网络安装镜像 +- 镜像文件太臃肿了 +- 没有验证 iso 是否为正确的方法(官方没有提供哈希值) +- 启动与安装方式仍然与 XP,Win 7,Win 8 相同(可能吧...) +- 和以前一样,安装程序没有输出它正在干什么 - 正在复制什么和正在安装什么软件包 +- 安装程序比 Linux 发行版的更加傻瓜和简单 + +####测试 Windows 10#### + +18、默认桌面很干净,上面只有一个回收站图标。我们可以直接从桌面搜索网络。底部的快捷方式分别是任务预览、网络、微软应用商店。和以前的版本一样,消息栏在右下角。 + +![ ](http://www.tecmint.com/wp-content/uploads/2015/08/Deskop-Shortcut-icons.jpg) + +*桌面图标* + +19、IE 浏览器被换成了 Edge 浏览器。微软把他们的老IE换成了 Edge (斯巴达计划) + +![Microsoft Edge Browser](http://www.tecmint.com/wp-content/uploads/2015/08/Edge-browser.jpg) + +*Edge 浏览器* + +测试起来,这个浏览器至少比 IE 要快。他们有相同的用户界面。它的主页包含新闻更新。它还有一个搜索标题栏是“下一步怎么走”。由于浏览器的全面性能提升,它的加载速度非常快。Edge 的内存占用看起来正常。 + +![Windows Performance](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Performance.jpg) + +*性能* + +Edge 也有小娜加成(智能个人助理)、支持 Chrome 扩展、支持笔记(在浏览网页时记笔记)、分享(在选项卡上右击而不必打开其他选项卡) + +#### Linux 用户(我)此时体验 #### + +20、微软确实提升了网页浏览体验。我绝对稳定性和质量还好。现在它并不落后。 + +21、对我来说,Edge 的内存占用不算太大。但是有很多用户抱怨它的内存占用太多。 + +22、很难说目前 Edge 已经准备好了与火狐或 Chrome竞争。让我们静观其变。 + +#### 更多的视觉体验 #### + +23、重新设计的开始菜单 -- 看起来很简洁高效。Merto 磁贴大部分都会动。预先放置了最通用的应用。 + +![Windows Look and Feel](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Look.jpg) + +*Windows* + +而在 Linux 的 Gnome 桌面环境下。我仅仅需要按下 Win 键并输入应用名就可以搜索应用。 + +![Search Within Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Search-Within-Desktop.jpg) + +*桌面内进行搜索* + +24、文件浏览器 -- 设计的很简洁。左边是进入文件夹的快捷方式。 + +![Windows File Explorer](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-File-Explorer.jpg) + +*Windows 文件管理器* + +我们的 Gnome 下的文件管理也同样的简洁高效。从图标上移走了不需要的图形图像是个加分点。 + +![File Browser on Gnome](http://www.tecmint.com/wp-content/uploads/2015/08/File-Browser.jpg) + +*Gnome 的文件管理* + +25、设置 -- 尽管 Windows 10的设置有点精炼,但是我们还是可以把它与 linux 的设置进行对比。 + +**Windows 的设置** + +![Windows 10 Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Settings.jpg) + +*Windows 10 设置* + +**Linux Gnome 上的设置** + +![Gnome Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Gnome-Settings.jpg) + +*Gnome 的设置* + +26、应用列表 -- 目前,Linux上的应用列表要好于之前的版本(据我所记,那时我还是一个普通的 Windows 用户),但是 Windows 10 的还比 Gnome 3 的差一点。 + +**Windows 的应用列表** + +![Application List on Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Application-List-on-Windows-10.jpg) + +*Windows 10 的应用列表* + +**Gnome3 的应用列表** + +![Gnome Application List on Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Gnome-Application-List-on-Linux.jpg) + +*Gnome3 的应用列表* + +27、虚拟桌面 -- Windows 10 上的虚拟桌面是近来被提及最多的特性之一。 + +这是 Windows 10 上的虚拟桌面。 + +![Windows Virtual Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Virtual-Desktop.jpg) + +*Windows 的虚拟桌面* + +这是我们 Linux 用户使用了超过20年的虚拟桌面。 + +![Virtual Desktop on Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Virtual-Desktop-on-Linux.jpg) + +*Linux 的虚拟桌面* + +#### Windows 10 的其他新特性 #### + +28、Windows 10 自带 wifi 感知。它会把你的 wifi 密码分享给他人。任何在你 wifi 范围内并且曾经通过 Skype, Outlook, Hotmail 或 Facebook与你联系的人都能够获得你的网络接入权。这个特性的本意是让用户可以省时省力的连接网络。 + +在微软对于 Tecmint 的问题的回答中,他们说道 -- 用户需要在每次到一个新的网络环境时自己去同意打开 wifi 感知。如果我们考虑到网络安全这将是很不安全的一件事。微软的说法并没有说服我。 + +29、从 Windows 7 和 Windows 8.1 升级可以省下买新版的花费。(家庭版 $119 专业版$199) + +30、微软发布了第一个累积更新,这个更新在一小部分设备上会让系统一直重启。Windows可能不知道这个问题或者不知道它发生的原因。 + +31、微软内建的“禁用/隐藏我不想要的更新”的功能在我这不起作用。这意味着一旦更新开始推送,你没有方法去禁用/隐藏他们。对不住啦,Windows 用户。 + +#### Windows 10 包含的来源于 Linux 的功能 #### + +Windows 10 有很多直接取自 Linux 的功能。如果 Linux 不以 GPL 发布的话,也许以下这些功能永远不会出现在 Windows上。 + +32、命令行的包管理器 -- 是的,你没有听错!Windows 10内建了一个包管理器。它只在 Power Shell 下工作。OneGet 是Windows 的官方包管理器。 + +![Windows 10 Package Manager](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Package-Manager.jpg) + +*Windows 10的包管理器* + +- 无边窗口 +- 扁平化图标 +- 虚拟桌面 +- 离线/在线搜索一体化 +- 手机/桌面系统融合 + +### 总体印象### + +- 响应速度提升 +- 动画很好看 +- 资源占用少 +- 电池续航提升 +- Edge 浏览器很稳定 +- 支持树莓派 2 +- Windows 10 好的原因是 Windows 8/8.1 没有达到公众预期并且坏的可以 +- 旧瓶装新酒:Windows 10基本上就是以前的那一套换上新的图标 + +测试后我对 Windows 10 的评价是:Windows 10 在视觉和感觉上做了一些更新(就如同 Windows 经常做的那样)。我要为斯巴达计划、虚拟桌面、命令行包管理器、整合在线/离线搜索的搜索栏点赞。这确实是一个更新后的产品 ,但是认为 Windows 10 将是 Linux 的最后一个棺材钉的人错了。 + +Linux 走在 Windows 前面。它们的做事方法并不相同。在以后的一段时间里 Windows 不会站到 Linux这一旁。也没有什么让 Linux 用户值得去使用 Windows 10。 + +这就是我要说的。希望你喜欢本文。如果你们喜欢本篇文章我会再写一些你们喜欢读的有趣的文章。在下方留下你的有价值的评论。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/a-linux-user-using-Windows-10-after-more-than-8-years-see-comparison/ + +作者:[Avishek Kumar][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:https://www.microsoft.com/en-us/software-download/Windows10ISO diff --git a/translated/share/20150824 Great Open Source Collaborative Editing Tools.md b/published/20150824 Great Open Source Collaborative Editing Tools.md similarity index 77% rename from translated/share/20150824 Great Open Source Collaborative Editing Tools.md rename to published/20150824 Great Open Source Collaborative Editing Tools.md index bc0a841477..aab783c627 100644 --- a/translated/share/20150824 Great Open Source Collaborative Editing Tools.md +++ b/published/20150824 Great Open Source Collaborative Editing Tools.md @@ -1,12 +1,13 @@ -优秀的开源合作编辑工具 +六款优秀的开源协作编辑工具 ================================================================================ -一句话,合作编著就是多个人进行编著。合作有好处也有风险。好处包括更加全面/协调的方式,更好的利用现有资源和一个更加有力的、团结的声音。对于我来说,最大的好处是极大的透明度。那是当我需要采纳同事的观点。同事之间来来回回地传文件效率非常低,导致不必要的延误还让人(比如,我)对整个合作这件事都感到不满意。有个好的合作软件,我就能实时地或异步地分享笔记,数据和文件,并用评论来分享自己的想法。这样在文档、图片、视频、演示文稿上合作就不会那么的琐碎而无聊。 -有很多种方式能在线进行合作,简直不能更简便了。这篇文章表明了我最喜欢的开源实时文档合作编辑工具。 +简而言之,协作编辑(Collaborative Edit)就是多个人进行编辑。协作有好处也有风险。好处之一是更加全面/协调的方式,更好的利用现有资源和一个更加有力一致的声音。对于我来说,最大的好处是极大的透明度。那是当我需要采纳同事的观点。同事之间来来回回地传文件效率非常低,导致不必要的延误还让人(比如,我)对整个协作这件事都感到不满意。有个好的协作软件,我就能实时地或异步地分享笔记,数据和文件,并用评论来分享自己的想法。这样在文档、图片、视频、演示文稿上协作就不会那么的琐碎而无聊。 -Google Docs 是个非常好的高效应用,有着大部分我所需要的功能。它可以作为一个实时地合作编辑文档的工具提供服务。文档可以被分享、打开并被多位用户同时编辑,用户还能看见其他合作者一个字母一个字母的编辑过程。虽然 Google Docs 对个人是免费的,但并不开源。 +有很多种方式能在线进行协作,简直不能更简便了。这篇文章展示了我最喜欢的开源的实时文档协作编辑工具。 -下面是我带来的最棒的开源合作编辑器,它们能帮你不被打扰的集中精力进行写作,而且是和其他人协同完成。 +Google Docs 是个非常好的高效应用,有着大部分我所需要的功能。它可以作为一个实时地协作编辑文档的工具提供服务。文档可以被分享、打开并被多位用户同时编辑,用户还能看见其他协作者一个字母一个字母的编辑过程。虽然 Google Docs 对个人是免费的,但并不开源。 + +下面是我带来的最棒的开源协作编辑器,它们能帮你不被打扰的集中精力进行写作,而且是和其他人协同完成。 ---------- @@ -14,17 +15,17 @@ Google Docs 是个非常好的高效应用,有着大部分我所需要的功 ![Hackpad in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Hackpad.png) -Hackpad 是个开源的基于网页的实时 wiki,基于开源 EtherPad 合作文档编辑器。 +Hackpad 是个开源的基于网页的实时 wiki,基于开源 EtherPad 协作文档编辑器。 Hackpad 允许用户实时分享你的文档,它还用彩色编码显示各个作者分别贡献了哪部分。它还允许插入图片、清单,由于提供了语法高亮功能,它还能用来写代码。 -当2014年4月 Dropbox 获得了 Hackpad 后,这款软件就以开源的形式在本月发行。让我们经历的等待非常值得。 +当2014年4月 Dropbox 收购了 Hackpad 后,就在这个月这款软件以开源的形式发布。让我们经历的等待非常值得。 特性: - 有类似 wiki 所提供的,一套非常完善的功能 -- 实时或者异步地记合作笔记,共享数据和文件,或用评论分享你们的想法 -- 细致的隐私许可让你可以邀请单个朋友,一个十几人的团队或者上千的 Twitter 粉丝 +- 实时或者异步地记录协作笔记,共享数据和文件,或用评论分享你们的想法 +- 细致的隐私许可让你可以邀请单个朋友、一个十几人的团队或者上千的 Twitter 粉丝 - 智能执行 - 直接从流行的视频分享网站上插入视频 - 表格 @@ -42,9 +43,9 @@ Hackpad 允许用户实时分享你的文档,它还用彩色编码显示各个 ![Etherpad in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Etherpad.png) -Etherpad 是个基于网页的开源实时合作编辑器,允许多个作者同时编辑一个文本文档,写评论,并与其他作者用群聊方式进行交流。 +Etherpad 是个基于网页的开源实时协作编辑器,允许多个作者同时编辑一个文本文档,写评论,并与其他作者用群聊方式进行交流。 -Etherpad 是用 JavaScript 运行的,在 AppJet 平台的顶端,通过 Comet 流实现实时的功能。 +Etherpad 是用 JavaScript 编写的,运行在 AppJet 平台之上,通过 Comet 流实现实时的功能。 特性: @@ -55,9 +56,9 @@ Etherpad 是用 JavaScript 运行的,在 AppJet 平台的顶端,通过 Comet - 每隔一段很短的时间就会自动保存 - 可个性化程度高 - 有客户端插件可以扩展编辑的功能 -- 几百个支持 Etherpad 的扩展包括支持 email 提醒,pad 管理,授权 +- 几百个支持 Etherpad 的扩展,包括支持 email 提醒,pad 管理,授权 - 可访问性开启 -- 可从 Node 里或通过 CLI(命令行界面)和 Pad 目录实时交互 +- 可从 Node 里或通过 CLI(命令行界面)和 EtherPad 的内容交互 - 网站: [etherpad.org][4] - 源代码:[github.com/ether/etherpad-lite][5] @@ -71,7 +72,7 @@ Etherpad 是用 JavaScript 运行的,在 AppJet 平台的顶端,通过 Comet ![Firepad in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Firepad.png) -Firepad 是个开源的合作文本编辑器。它的设计目的是被嵌入到更大的网页应用中对几天内新加入的代码进行批注。 +Firepad 是个开源的协作文本编辑器。它的设计目的是被嵌入到更大的网页应用中对几天内新加入的代码进行批注。 Firepad 是个全功能的文本编辑器,有解决冲突,光标同步,用户属性,用户在线状态检测功能。它使用 Firebase 作为后台,而且不需要任何服务器端的代码。他可以被加入到任何网页应用中。Firepad 可以使用 CodeMirror 编辑器或者 Ace 编辑器提交文本,它的操作转换代码是从 ot.js 上借鉴的。 @@ -81,7 +82,7 @@ Firepad 已被多个编辑器使用,包括Atlassian Stash Realtime Editor、Ni 特性: -- 纯正的合作编辑 +- 纯正的协作编辑 - 基于 OT 的智能合并及解决冲突 - 支持多种格式的文本和代码的编辑 - 光标位置同步 @@ -106,13 +107,13 @@ Firepad 已被多个编辑器使用,包括Atlassian Stash Realtime Editor、Ni ![ownCloud Documents in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-ownCloud.png) -ownCloud Documents 是个可以单独并/或合作进行办公室文档编辑 ownCloud 应用。它允许最多5个人同时在网页浏览器上合作进行编辑 .odt 和 .doc 文件。 +ownCloud Documents 是个可以单独并/或协作进行办公室文档编辑 ownCloud 应用。它允许最多5个人同时在网页浏览器上协作进行编辑 .odt 和 .doc 文件。 ownCloud 是个自托管文件同步和分享服务器。他通过网页界面,同步客户端或 WebDAV 提供你数据的使用权,同时提供一个容易在设备间进行浏览、同步和分享的平台。 特性: -- 合作编辑,多个用户同时进行文件编辑 +- 协作编辑,多个用户同时进行文件编辑 - 在 ownCloud 里创建文档 - 上传文档 - 在浏览器里分享和编辑文件,然后在 ownCloud 内部或通过公共链接进行分享这些文件 @@ -131,16 +132,16 @@ ownCloud 是个自托管文件同步和分享服务器。他通过网页界面 ![Gobby in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Gobby.png) -Gobby 是个支持在一个会话内进行多个用户聊天并打开多个文档的合作编辑器。所有的用户都能同时在文件上进行工作,无需锁定。不同用户编写的部分用不同颜色高亮显示,它还支持多个编程和标记语言的语法高亮。 +Gobby 是个支持在一个会话内进行多个用户聊天并打开多个文档的协作编辑器。所有的用户都能同时在文件上进行工作,无需锁定。不同用户编写的部分用不同颜色高亮显示,它还支持多个编程和标记语言的语法高亮。 -Gobby 允许多个用户在互联网上实时共同编辑同一个文档。他很好的整合了 GNOME 环境。它拥有一个客户端-服务端结构,这让它能支持一个会话开多个文档,文档同步请求,密码保护和 IRC 式的聊天方式可以在多个频道进行交流。用户可以选择一个颜色对他们在文档中编写的文本进行高亮。 +Gobby 允许多个用户在互联网上实时共同编辑同一个文档。它很好的整合了 GNOME 环境。它拥有一个客户端-服务端结构,这让它能支持一个会话开多个文档,文档同步请求,密码保护和 IRC 式的聊天方式可以在多个频道进行交流。用户可以选择一个颜色对他们在文档中编写的文本进行高亮。 还供有一个叫做 infinoted 的专用服务器。 特性: - 成熟的文本编辑能力包括使用 GtkSourceView 的语法高亮功能 -- 实时、无需锁定、通过加密(包括PFS)连接的合作文本编辑 +- 实时、无需锁定、通过加密(包括PFS)连接的协作文本编辑 - 整合了群聊 - 本地组撤销:撤销不会影响远程用户的修改 - 显示远程用户的光标和选择区域 @@ -170,9 +171,9 @@ Gobby 允许多个用户在互联网上实时共同编辑同一个文档。他 ONLYOFFICE(从前叫 Teamlab Office)是个多功能云端在线办公套件,整合了 CRM(客户关系管理)系统、文档和项目管理工具箱、甘特图以及邮件整合器 -它能让你整理商业任务和时间表,保存并分享你的合作或个人文档,使用网络社交工具如博客和论坛,还可以和你的队员通过团队的即时聊天工具进行交流。 +它能让你整理商业任务和时间表,保存并分享你的协作或个人文档,使用网络社交工具如博客和论坛,还可以和你的队员通过团队的即时聊天工具进行交流。 -能在同一个地方管理文档、项目、团队和顾客关系。OnlyOffice 结合了文本,电子表格和电子幻灯片编辑器,他们的功能跟微软桌面应用(Word、Excel 和 PowerPoint)的功能相同。但是他允许实时进行合作编辑、评论和聊天。 +能在同一个地方管理文档、项目、团队和顾客关系。OnlyOffice 结合了文本,电子表格和电子幻灯片编辑器,他们的功能跟微软桌面应用(Word、Excel 和 PowerPoint)的功能相同。但是他允许实时进行协作编辑、评论和聊天。 OnlyOffice 是用 ASP.NET 编写的,基于 HTML5 Canvas 元素,并且被翻译成21种语言。 @@ -182,7 +183,7 @@ OnlyOffice 是用 ASP.NET 编写的,基于 HTML5 Canvas 元素,并且被翻 - 文档可以在浏览/编辑模式下分享 - 文档嵌入 - 电子表格和电子幻灯片编辑器 -- 合作编辑 +- 协作编辑 - 评论 - 群聊 - 移动应用 @@ -209,7 +210,7 @@ via: http://www.linuxlinks.com/article/20150823085112605/CollaborativeEditing.ht 作者:Frazer Kline 译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/20150906 How to install Suricata intrusion detection system on Linux.md b/published/20150906 How to install Suricata intrusion detection system on Linux.md new file mode 100644 index 0000000000..89eccf5650 --- /dev/null +++ b/published/20150906 How to install Suricata intrusion detection system on Linux.md @@ -0,0 +1,198 @@ +如何在 Linux 系统上安装 Suricata 入侵检测系统 +================================================================================ + +随着安全威胁的不断发生,入侵检测系统(IDS)在如今的数据中心环境中显得尤为必要。然而,随着越来越多的服务器将他们的网卡升级到10GB/40GB以太网,对如此线路上的硬件进行计算密集型的入侵检测越来越困难。其中一种提升入侵检测系统性能的途径是**多线程入侵检测系统**,它将 CPU 密集型的深度包检测工作并行的分配给多个并发任务来完成。这样的并行检测可以充分利用多核硬件的优势来轻松提升入侵检测系统的吞吐量。在这方面有两个知名的开源项目,分别是 [Suricata][1] 和 [Bro][2]。 + +这个教程里,我会向大家演示**如何在 Linux 服务器上安装和配置 Suricata 入侵检测系统** + +### 在 Linux 上安装 Suricata IDS ### + +让我们从源文件来构建 Suricata,但在此之前,需要按如下所示先安装几个依赖包。 + +#### 在 Debian, Ubuntu 或者 Linux Mint 操作系统上安装依赖包 #### + + $ sudo apt-get install wget build-essential libpcre3-dev libpcre3-dbg automake autoconf libtool libpcap-dev libnet1-dev libyaml-dev zlib1g-dev libcap-ng-dev libjansson-dev + +#### 在 CentOS, Fedora 或者 RHEL 操作系统上安装依赖包 #### + + $ sudo yum install wget libpcap-devel libnet-devel pcre-devel gcc-c++ automake autoconf libtool make libyaml-devel zlib-devel file-devel jansson-devel nss-devel + +一旦将所有依赖包安装完毕,我们就可以继续安装 Suricata 了。 + +首先从 [http://suricata-ids.org/download/][3] 下载 Suricata 源代码,然后构建它。撰写这篇文章的时候,其最新版本号为 2.0.8 。 + + $ wget http://www.openinfosecfoundation.org/download/suricata-2.0.8.tar.gz + $ tar -xvf suricata-2.0.8.tar.gz + $ cd suricata-2.0.8 + $ ./configure --sysconfdir=/etc --localstatedir=/var + +以下是配置信息的样例。 + + Suricata Configuration: + AF_PACKET support: yes + PF_RING support: no + NFQueue support: no + NFLOG support: no + IPFW support: no + DAG enabled: no + Napatech enabled: no + Unix socket enabled: yes + Detection enabled: yes + + libnss support: yes + libnspr support: yes + libjansson support: yes + Prelude support: no + PCRE jit: yes + LUA support: no + libluajit: no + libgeoip: no + Non-bundled htp: no + Old barnyard2 support: no + CUDA enabled: no + +现在可以编译、安装了。 + + $ make + $ sudo make install + +Suricata 源代码带有默认的配置文件。按照如下方法安装这些默认配置文件即可。 + + $ sudo make install-conf + +正如你所料,如果没有IDS规则集的话,Suricata 什么用也没有。幸好 Makefile 为我们提供了 IDS 规则集的安装选项。安装方法如下。 + + $ sudo make install-rules + +以上的规则安装命令会从 [EmergingThreats.net][4] 上下载可用的社区规则集快照,并且将其存储在 /etc/suricata/rules 目录下。 + +![](https://farm1.staticflickr.com/691/20482669553_8b67632277_c.jpg) + +### 首次配置 Suricata IDS ### + +现在到了配置 Suricata 的时候了。配置文件的位置是 **/etc/suricata/suricata.yaml**。参照以下命令,用文本编辑器打开这个文件。 + + $ sudo vi /etc/suricata/suricata.yaml + +文件中有一些运行所需的基本配置。 + +为`default-log-dir`关键字指定 Suricata 日志文件所在的位置。 + + default-log-dir: /var/log/suricata/ + +在`vars`部分下方,你会发现几项对 Suricata 来说很重要变量。`HOME_NET`变量需要指定 Suricata 检查的网络。被分配给 `EXTERNAL_NET` 变量的 `!$HOME_NET` 代表除本地网络之外的其他网络。`XXX_PORTS`变量用来辨别不同服务所用到的端口号。需要注意的是无论使用什么端口,Suricata 都可以自动检测 HTTP 流量。所以是不是正确指定端口就显得没那么重要了。 + + vars: + HOME_NET: "[192.168.122.0/24]" + EXTERNAL_NET: "!$HOME_NET" + HTTP_PORTS: "80" + SHELLCODE_PORTS: "!80" + SSH_PORTS: 22 + +`host-os-policy` 部分用于防御利用操作系统网络栈的自身行为来逃避检测的一些知名攻击手段(例如:TCP reassembly)。作为对策,通过针对目标操作系统而对检测引擎算法进行微调,现代 IDC 提供了“基于目标”的检测手段。因此,如果你知道某台主机运行了什么操作系统的话,将这个信息提供给 Suricata 就可以大幅提高检测的成功率。这就是 `host-os-policy` 存在的意义。本例中,默认的 IDC 策略是 Linux 系统。如果针对某个 IP 地址没有指定操作系统信息,Suricata 会默认应用基于 Linux 系统的检测策略。如下,当捕获到对 192.168.122.0/28 和 192.168.122.155通讯时,Suricata 就会应用基于 Windows 系统的检测策略。 + + host-os-policy: + # These are Windows machines. + windows: [192.168.122.0/28, 192.168.122.155] + bsd: [] + bsd-right: [] + old-linux: [] + # Make the default policy Linux. + linux: [0.0.0.0/0] + old-solaris: [] + solaris: ["::1"] + hpux10: [] + hpux11: [] + irix: [] + macos: [] + vista: [] + windows2k3: [] + +在 `threading` 部分下,你可以为不同的 Suricata 线程指定 CPU 关联。默认状态下,[CPU 关联][5] 是被禁止使用的 (`set-cpu-affinity: no`),这意味着 Suricata 会分配其线程到所有可用的 CPU 核心上。Suricata 会默认为每一个 CPU 核心创建一个检测线程。你可以通过指定 `detect-thread-ratio: N` 来调整此行为。此处会创建 N*M 个检测线程,M 代表 CPU 核心总数。 + + threading: + set-cpu-affinity: no + detect-thread-ratio: 1.5 + +通过以上对线程的设置,Suricata 会创建 1.5*M 个检测线程,M 是系统的 CPU 核心总数。 + +如果你想对 Suricata 配置有更多的了解,可以去翻阅默认配置文件。里边配有有大量的注释以供你清晰理解。 + +### 使用 Suricata 进行入侵监控 ### + +现在是时候让 Suricata 跑起来了,但在这之前还有一个步骤需要去完成。 + +当你使用 pcap 捕获模式的时候,强烈建议关闭 Suricata 监听网卡上的任何的包卸载(例如 LRO/GRO)功能。这些功能会干扰包的实时捕获行为。 + +按照以下方法关闭 eth0 接口的 LRO/GRO 功能。 + + $ sudo ethtool -K eth0 gro off lro off + +这里要注意,在使用某些网卡的情况下,你会看到如下警告信息。忽略它们就行了,这些信息只不过告诉你你的网卡不支持 LRO 功能而已。 + + Cannot change large-receive-offload + +Suricata 支持许多运行模式。运行模式决定着 IDC 会使用何种线程。以下命令可以查看所有 [可用的运行模式][6]。 + + $ sudo /usr/local/bin/suricata --list-runmodes + +![](https://farm6.staticflickr.com/5730/20481140934_25080d04d7_c.jpg) + +Suricata 使用的默认运行模式是 autofp("auto flow pinned load balancing"==“自动流绑定负载均衡” 的缩写)。这个模式下,来自某一个流的包会被分配到一个单独的检测线程中。这些流会根据未被处理的包的最低数量来分配相应的线程。 + +最后,让我们将 Suricata 运行起来,看看它表现如何。 + + $ sudo /usr/local/bin/suricata -c /etc/suricata/suricata.yaml -i eth0 --init-errors-fatal + +![](https://farm1.staticflickr.com/701/21077552366_c577746e36_c.jpg) + +本例中,我们在一个8核心系统中监控 eth0 网络接口。如上所示,Suricata 创建了13个包处理线程和3个管理线程。包处理线程中包括一个 PCAP 包捕获线程,12个检测线程(由8*1.5得出)。这表示 IDS 内的1个包捕获线程均衡负载到12个检测线程中。管理线程包括1个流管理和2个计数/统计相关线程。 + +以下是一个关于Suricata处理的线程截图(由 [htop][7] 绘制)。 + +![](https://farm6.staticflickr.com/5775/20482669593_174f8f41cb_c.jpg) + +Suricata 检测日志存储在 /var/log/suricata 目录下。 + + $ tail -f /var/log/suricata/fast.log + +---------- + + 04/01/2015-15:47:12.559075 [**] [1:2200074:1] SURICATA TCPv4 invalid checksum [**] [Classification: (null)] [Priority: 3] {TCP} 172.16.253.158:22 -> 172.16.253.1:46997 + 04/01/2015-15:49:06.565901 [**] [1:2200074:1] SURICATA TCPv4 invalid checksum [**] [Classification: (null)] [Priority: 3] {TCP} 172.16.253.158:22 -> 172.16.253.1:46317 + 04/01/2015-15:49:06.566759 [**] [1:2200074:1] SURICATA TCPv4 invalid checksum [**] [Classification: (null)] [Priority: 3] {TCP} 172.16.253.158:22 -> 172.16.253.1:46317 + +日志也可以提供 Json 格式以便导入: + + $ tail -f /var/log/suricata/eve.json + +---------- + {"timestamp":"2015-04-01T15:49:06.565901","event_type":"alert","src_ip":"172.16.253.158","src_port":22,"dest_ip":"172.16.253.1","dest_port":46317,"proto":"TCP","alert":{"action":"allowed","gid":1,"signature_id":2200074,"rev":1,"signature":"SURICATA TCPv4 invalid checksum","category":"","severity":3}} + {"timestamp":"2015-04-01T15:49:06.566759","event_type":"alert","src_ip":"172.16.253.158","src_port":22,"dest_ip":"172.16.253.1","dest_port":46317,"proto":"TCP","alert":{"action":"allowed","gid":1,"signature_id":2200074,"rev":1,"signature":"SURICATA TCPv4 invalid checksum","category":"","severity":3}} + +### 总结 ### + +这篇教程中,我为大家演示了如何在一台多核 Linux 服务器上安装 Suricata 入侵检测系统。不同于单线程的 [Snort IDS][8] ,Suricata 可以很容易的从多核硬件的多进程特性所带来的好处中获益。定制 Suricata 来最大化其效能和检测范围是一个很好的主意。Suricata 的粉丝们维护着一个 [在线 Wiki][9],如果你打算将 Suricata 部署到你的环境中,我强烈建议你去那儿取取经。 + +如果你现在已经开始使用 Suricata 了的话,把你的经验也分享出来吧。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/install-suricata-intrusion-detection-system-linux.html + +作者:[Dan Nanni][a] +译者:[mr-ping](https://github.com/mr-ping) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://suricata-ids.org/ +[2]:https://www.bro.org/ +[3]:http://suricata-ids.org/download/ +[4]:http://rules.emergingthreats.net/ +[5]:http://xmodulo.com/run-program-process-specific-cpu-cores-linux.html +[6]:https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Runmodes +[7]:http://ask.xmodulo.com/view-threads-process-linux.html +[8]:http://xmodulo.com/how-to-compile-and-install-snort-from-source-code-on-ubuntu.html +[9]:https://redmine.openinfosecfoundation.org/projects/suricata/wiki diff --git a/published/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md b/published/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md new file mode 100644 index 0000000000..40a0607bef --- /dev/null +++ b/published/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md @@ -0,0 +1,241 @@ +理查德·斯托曼经典语录集锦 +================================================================================ +注:youtube 视频 + + +**理查德·马修·斯托曼(Richard Matthew Stallman)** (RMS) – 神级程序员之一。他是一名程序员,是 GCC、GDB、Emacs 的构建者,软件自由的传教士,[GNU Project][1] 和 [FSF][2] 的创办人。 + +**GNU** 是 “GNU’s Not Unix!”的递归缩写。GNU 是一系列用于基于 Unix 的操作系统的自由软件集合。它能用于 GNU/Hurd 和 Linux 内核。于1983年9月27日公诸于众。常用组件有: + +- GNU Compiler Collection (GCC) +- GNU C library (glibc) +- GNU Core Utilities (coreutils) +- GNU Debugger (GDB) +- GNU Binary Utilities (binutils) +- GNU Bash shell +- GNOME desktop environment + +注:视频 + + +**自由软件基金会(Free Software Foundation)** (FSF) – 一个自由软件的非营利组织,致力于推进计算机用户的自由和捍卫他们的权力。于 1985年10月4日成立。阅读[更多][3]。 + +许多人不理解开源代码(open source code)和自由软件(free software)的区别。每个程序都应该是自由软件: + +- 与目的无关,随心运行程序的自由(自由0)。 +- 学习程序如何运作,并改变它为你所用的自由(自由1)。可以访问源码是这一条的前提。 +- 重新发布副本的自由,如此你便可以帮助你周围的人(自由 2)。 +- 发布自己修改版本给他人的自由(自由 3)。这样能让整个社区有机会从你的改变中受益。可以访问源码是这条的前提。 + +以上为自由软件的四项自由原则。 + +以下为理查德·斯托曼关于自由、软件、社交、哲学等方面的名言摘引。 + +**关于 Facebook:** + +> Facebook is not your friend, it is a surveillance engine. + +Facebook 不是你的朋友,是监控引擎。 + +**关于 Android:** + +> Android is very different from the GNU/Linux operating system because it contains very little of GNU. Indeed, just about the only component in common between Android and GNU/Linux is Linux, the kernel. + +Android 和 GNU/Linux 有很大的区别,因为其中几乎没有 GNU。的确,Android 和 GNU/Linux 之间仅有一个共同组件,那就是内核 - Linux。 + +**关于计算机行业:** + +> The computer industry is the only industry that is more fashion-driven than women's fashion. + +计算机行业是唯一一个比女性时尚业更容易受潮流影响的行业了。 + +**关于云计算:** + +> The interesting thing about cloud computing is that we've redefined cloud computing to include everything that we already do. + +关于云计算,有趣的是我们已经重新定义了云计算来包含我们曾干过的所有事。 + +**关于伦理:** + +> Whether gods exist or not, there is no way to get absolute certainty about ethics. Without absolute certainty, what do we do? We do the best we can. + +无论神存在与否,都没有绝对的伦理道德。没有这份理所当然,我们该如何?也唯有尽善吧。 + +**关于自由:** + +> Free software is software that respects your freedom and the social solidarity of your community. So it's free as in freedom. + +自由软件是尊重个人自由和社会团结的软件。所以才能如自由般自由自在。 + +**关于目标和理想:** + +> If you want to accomplish something in the world, idealism is not enough - you need to choose a method that works to achieve the goal. + +如果你想为这世界做些什么,仅有理想是不够的,你需要找条通往目标的道路并走完。 + +**关于分享:** + +> Sharing is good, and with digital technology, sharing is easy. + +分享很棒,而且数字化技术也使分享变得容易。 + +**关于 facebook(进阶版):** + +> Facebook mistreats its users. Facebook is not your friend; it is a surveillance engine. For instance, if you browse the Web and you see a 'like' button in some page or some other site that has been displayed from Facebook. Therefore, Facebook knows that your machine visited that page. + +Facebook 蹂躏它们的用户。它不是你们的朋友;它就是个监控引擎。举个例子,你是否曾在一些网页或网站上看到 Facebook 的 “like” 按键。对,Facebook 知道你的电脑曾访问过那些网页。 + +**关于 web 应用:** + +> One reason you should not use web applications to do your computing is that you lose control. + +给你个为什么不应该使用 web 应用的理由,因为你失去了计算机的控制权。 + +> If you use a proprietary program or somebody else's web server, you're defenceless. You're putty in the hands of whoever developed that software. + +如果你使用私有程序或他人的 web 服务器,那么你只能任人鱼肉。被软件的开发者轻易操纵。 + +**关于书:** + +> With paper printed books, you have certain freedoms. You can acquire the book anonymously by paying cash, which is the way I always buy books. I never use a credit card. I don't identify to any database when I buy books. Amazon takes away that freedom. + +印刷出来的书,当然是自由的。你可以付现金匿名买书,这也是我一直买书的方式。我绝不会使用信用卡,我买书时不会被任何数据库记下。是亚马逊把自由夺走了。 + +**关于 MPAA:** + +> Officially, MPAA stands for Motion Picture Association of America, but I suggest that MPAA stands for Malicious Power Attacking All. + +MPAA 其实是美国电影协会(Motion Picture Association of America),但我认为叫做攻击万物的邪恶力量(Malicious Power Attacking All)更为合适。 + +**关于金钱与职业:** + +> I could have made money this way, and perhaps amused myself writing code. But I knew that at the end of my career, I would look back on years of building walls to divide people, and feel I had spent my life making the world a worse place. + +我可以找份工作赚钱,并沉浸在编码的快乐中。但在职业生涯结束后,回首目睹自己筑就的高墙将人与人分隔开,我会觉得我耗尽毕生精力只换来了一个更糟糕的世界。 + +**关于私有软件:** + +> Proprietary software keeps users divided and helpless. Divided because each user is forbidden to redistribute it to others, and helpless because the users can't change it since they don't have the source code. They can't study what it really does. So the proprietary program is a system of unjust power. + +私有软件使用户孤立、无助。因为禁止将软件给他人使用所以孤立,因为无法改变源码所以无助。他们不能学习其中真正的工作方式,所以整个私有软件体系就是一种不公的力量。 + +**关于智能手机:** + +> A smartphone is a computer - it's not built using a computer - the job it does is the job of being a computer. So, everything we say about computers, that the software you run should be free - you should insist on that - applies to smart phones just the same. And likewise to those tablets. + +智能手机就是电脑 —— 虽然做的和常用的电脑不同 —— 但是却能干电脑能干的活。所以我们所说的一切有关于电脑上的软件应该能自由运行 —— 必须坚持这一点 —— 在智能手机上也是这样,当然也包括平板。 + +**关于 CD 和数字内容:** + +> CD stores have the disadvantage of an expensive inventory, but digital bookshops would need no such thing: they could write copies at the time of sale on to memory sticks, and sell you one if you forgot your own. + +CD 商店有一个弱势就是需要昂贵的库存,但是电子商店就没有这方面的需求:他们只需要将售卖的副本写入记忆棒,并在你忘带自己的记忆棒时卖你一个就是了。 + +**关于竞争范式(paradigm of competition):** + +> The paradigm of competition is a race: by rewarding the winner, we encourage everyone to run faster. When capitalism really works this way, it does a good job; but its defenders are wrong in assuming it always works this way. + +竞争范式就像是赛跑:奖励胜者,鼓励每一个跑得更快的人。当资本主义真的这样运作时,当然是件好事;但是维护它的人若是假设它一直这样运作的话那就大错特错了。 + +**关于 vi 和 emacs:** + +> People sometimes ask me if it is a sin in the Church of Emacs to use vi. Using a free version of vi is not a sin; it is a penance. So happy hacking. + +有时会有人问我在 Emacs 的阵营使用 vi 是不是一种罪过。使用自由版的 vi 并不是一种罪过;是一种自我惩罚。所以好好享受其中乐趣吧。 + +**关于自由和历史:** + +> Value your freedom or you will lose it, teaches history. 'Don't bother us with politics', respond those who don't want to learn. + +历史告诉我们不珍惜自由便失去自由,然而有的人不懂吸取教训,只知道说“别拿政治烦我们”。 + +**关于专利:** + +> Fighting patents one by one will never eliminate the danger of software patents, any more than swatting mosquitoes will eliminate malaria. + +和专利一个一个的战斗并不能解决软件专利带来的危害,就像打再多的蚊子也消灭不了疟疾一样。 + +> Software patents are dangerous to software developers because they impose monopolies on software ideas. + +软件专利对于软件的开发者来说十分危险,因为它们加剧了对于软件理念的垄断。 + +**关于版权:** + +> In practice, the copyright system does a bad job of supporting authors, aside from the most popular ones. Other authors' principal interest is to be better known, so sharing their work benefits them as well as readers. + +其实,版权制度对作者也没有什么好处,撇开最受欢迎的那个,其他作者的主旨可能更好理解,所以分享无论对他们还是你的读者都是一件好事。 + +**关于工作与报酬:** + +> There is nothing wrong with wanting pay for work, or seeking to maximize one's income, as long as one does not use means that are destructive. + +劳有所得,或寻求收入的最大化并没有什么错,只要不是不择手段。 + +**关于 Chrome OS:** + +> In essence, Chrome OS is the GNU/Linux operating system. However, it is delivered without the usual applications, and rigged up to impede and discourage installing applications. + +Chrome OS 确实是 GNU/Linux 的操作系统。但是,它在发布时没有安装常用应用,并为安装他们设置了阻碍。 + +**关于 Linux 用户:** + +> Many users of the GNU/Linux system will not have heard the ideas of free software. They will not be aware that we have ideas, that a system exists because of ethical ideals, which were omitted from ideas associated with the term 'open source.' + +许多的 GNU/Linux 用户并没有听过自由软件。他们并没有意识到,这个系统是因为道德理想才存在的,与此一起被忽视的还有所谓的“开源”。 + +**关于 facebook 的隐私:** + +> If there is a Like button in a page, Facebook knows who visited that page. And it can get IP address of the computer visiting the page even if the person is not a Facebook user. + +如果页面上有 “like” 按键,Facebook 就能知道谁访问了页面。即使不是 Facebook 的用户,也可以得到访问该页面电脑的 IP 地址。 + +**关于编程:** + +> Programming is not a science. Programming is a craft. + +编程不是科学,编程是手艺。 + +> My favorite programming languages are Lisp and C. However, since around 1992 I have worked mainly on free software activism, which means I am too busy to do much programming. Around 2008 I stopped doing programming projects. + +Lisp 和 C 语言是我的最爱。然自 1992 年以来我主要工作在自由软件活动上,导致我太忙了,没法做更多的编程。大概在 2008 年我便停止了做编程项目。 + +> C++ is a badly designed and ugly language. It would be a shame to use it in Emacs. + +C++ 设计的真糟糕、真丑陋。在 Emacs 上用它应该觉得羞愧。 + +**关于钻研(hacking)和学习编程:** + +> People could no longer learn hacking the way I did, by starting to work on a real operating system, making real improvements. In fact, in the 1980s I often came across newly graduated computer science majors who had never seen a real program in their lives. They had only seen toy exercises, school exercises, because every real program was a trade secret. They never had the experience of writing features for users to really use, and fixing the bugs that real users came across. The things you need to know to do real work. + +(时过境迁,)人们没法再像我当初那样通过改进实实在在的操作系统来学习编程了。上世纪 80 年代,我常遇见计算机专业的毕业生,有生以来没见过真正的程序。他们接触的到的只有小玩意和学校的作业,因为每一个程序都是商业机密。他们没有机会为用户去写真正实用的特性,修复用户真正遭遇的问题。而这些正是真正的工作中你需要掌握的(东西)。 + +> It is hard to write a simple definition of something as varied as hacking, but I think what these activities have in common is playfulness, cleverness, and exploration. Thus, hacking means exploring the limits of what is possible, in a spirit of playful cleverness. Activities that display playful cleverness have "hack value". + +对于如“hacking”这般多样化的东西真的很难简单的下定义,不过在我看来诸如此类的行为都会有以下的这些共同点:嬉乐、智慧和探索。因此,hacking 意味着对可能的极限的探索,一颗向往快乐与智慧的心。能带来快乐与智慧的行为就有 “hack 的价值” 。 + +**关于浏览网页:** + +> For personal reasons, I do not browse the web from my computer. (I also have no net connection much of the time.) To look at page I send mail to a daemon which runs wget and mails the page back to me. It is very efficient use of my time, but it is slow in real time. + +出于个人原因,我不会在我的电脑上浏览网页。(大部分时间处于没有网络连接的状态。)要浏览网页,我需要给一个守护进程发 mail,然后它会运行 wget 并把页面通过 mail 发还给我。这对我而言已经是最效率了,但那真的比实时慢太多了。 + +**关于音乐共享:** + +> Friends share music with each other, they don't allow themselves to be divided by a system that says that nobody is supposed to have copies. + +朋友之间彼此分享音乐,绝不会希望因为系统的一句:“禁止私下拷贝!”而生分。 + +-------------------------------------------------------------------------------- + +via: https://tlhp.cf/fsf-richard-stallman/ + +作者:[Pavlo Rudyi][a] +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://tlhp.cf/fsf-richard-stallman/ +[1]:http://www.gnu.org/ +[2]:http://www.fsf.org/ +[3]:https://www.fsf.org/about/ \ No newline at end of file diff --git a/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md b/published/20151030 80 Linux Monitoring Tools for SysAdmins.md similarity index 66% rename from translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md rename to published/20151030 80 Linux Monitoring Tools for SysAdmins.md index 7c16ca9fc8..b78c23fa41 100644 --- a/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md +++ b/published/20151030 80 Linux Monitoring Tools for SysAdmins.md @@ -1,61 +1,61 @@ - -为 Linux 系统管理员准备的80个监控工具 +最全列表: 80 多个 Linux 系统管理员必备的监控工具 ================================================================================ + ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/linux-monitoring.jpg) -随着行业的不断发展,有许多比你想象中更棒的工具。这里列着网上最全的(工具)。拥有超过80种方式来管理你的机器。在本文中,我们主要讲述以下方面: +随着互联网行业的不断发展,各种监控工具多得不可胜数。这里列出网上最全的监控工具。让你可以拥有超过80种方式来管理你的机器。在本文中,我们主要包括以下方面: - 命令行工具 -- 与网络相关的 +- 网络相关内容 - 系统相关的监控工具 - 日志监控工具 - 基础设施监控工具 -监控和调试性能问题非常困难,但用对了正确的工具有时也是很容易的。下面是一些你可能听说过的工具,当你使用它们时可能存在一些问题: +监控和调试性能问题是一个艰巨的任务,但用对了正确的工具有时也是很容易的。下面是一些你可能听说过的工具,也有可能没有听说过——何不赶快开始试试? -### 十大系统监控工具 ### +### 八大系统监控工具 ### -#### 1. Top #### +#### 1. top #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/top.jpg) -这是一个被预安装在许多 UNIX 系统中的小工具。当你想要查看在系统中运行的进程或线程时:top 是一个很好的工具。你可以对这些进程以不同的标准进行排序,默认是以 CPU 进行排序的。 +这是一个被预装在许多 UNIX 系统中的小工具。当你想要查看在系统中运行的进程或线程时:top 是一个很好的工具。你可以对这些进程以不同的方式进行排序,默认是以 CPU 进行排序的。 #### 2. [htop][1] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/htop.jpg) -HTOP 实质上是 top 的增强版本。它更容易对进程排序。它在视觉上更容易理解并且已经内建了许多通用的命令。它也是完全交互的。 +htop 实质上是 top 的一个增强版本。它更容易对进程排序。它看起来上更容易理解,并且已经内建了许多通用操作。它也是完全交互式的。 #### 3. [atop][2] #### -Atop 和 top,htop 非常相似,它也能监控所有进程,但不同于 top 和 htop 的是,它会记录进程的日志供以后分析。它也能显示所有进程的资源消耗。它还会高亮显示已经达到临界负载的资源。 +atop 和 top,htop 非常相似,它也能监控所有进程,但不同于 top 和 htop 的是,它可以按日记录进程的日志供以后分析。它也能显示所有进程的资源消耗。它还会高亮显示已经达到临界负载的资源。 #### 4. [apachetop][3] #### -Apachetop 会监视 apache 网络服务器的整体性能。它主要是基于 mytop。它会显示当前 reads, writes 的数量以及 requests 进程的总数。 +apachetop 会监控 apache 网络服务器的整体性能。它主要是基于 mytop。它会显示当前的读取进程、写入进程的数量以及请求进程的总数。 #### 5. [ftptop][4] #### -ftptop 给你提供了当前所有连接到 ftp 服务器的基本信息,如会话总数,正在上传和下载的客户端数量以及客户端信息。 +ftptop 给你提供了当前所有连接到 ftp 服务器的基本信息,如会话总数,正在上传和下载的客户端数量以及客户端是谁。 #### 6. [mytop][5] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mytop.jpg) -mytop 是一个很方便的工具,用于监控线程和 mysql 的性能。它给了你一个实时的数据库查询处理结果。 +mytop 是一个很简洁的工具,用于监控 mysql 的线程和性能。它能让你实时查看数据库以及正在处理哪些查询。 #### 7. [powertop][6] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/powertop.jpg) -powertop 可以帮助你诊断与电量消耗和电源管理相关的问题。它也可以帮你进行电源管理设置,以实现对你服务器最有效的配置。你可以使用 tab 键进行选项切换。 +powertop 可以帮助你诊断与电量消耗和电源管理相关的问题。它也可以帮你进行电源管理设置,以实现对你服务器最有效的配置。你可以使用 tab 键切换选项卡。 #### 8. [iotop][7] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/iotop.jpg) -iotop 用于检查 I/O 的使用情况,并为你提供了一个类似 top 的界面来显示。它每列显示读和写的速率,每行代表一个进程。当出现等待 I/O 交换时,它也显示进程消耗时间的百分比。 +iotop 用于检查 I/O 的使用情况,并为你提供了一个类似 top 的界面来显示。它按列显示读和写的速率,每行代表一个进程。当发生交换或 I/O 等待时,它会显示进程消耗时间的百分比。 ### 与网络相关的监控 ### @@ -63,29 +63,29 @@ iotop 用于检查 I/O 的使用情况,并为你提供了一个类似 top 的 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ntopng.jpg) -ntopng 是 ntop 的升级版,它提供了一个能使用浏览器进行网络监控的图形用户界面。它还有其他用途,如:定位主机,显示网络流量和 ip 流量分布并能进行分析。 +ntopng 是 ntop 的升级版,它提供了一个能通过浏览器进行网络监控的图形用户界面。它还有其他用途,如:地理定位主机,显示网络流量和 ip 流量分布并能进行分析。 #### 10. [iftop][9] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/iftop.jpg) -iftop 类似于 top,但它主要不是检查 cpu 的使用率而是监听网卡的流量,并以表格的形式显示当前的使用量。像“为什么我的网速这么慢呢?!”这样的问题它可以直接回答。 +iftop 类似于 top,但它主要不是检查 cpu 的使用率而是监听所选择网络接口的流量,并以表格的形式显示当前的使用量。像“为什么我的网速这么慢呢?!”这样的问题它可以直接回答。 #### 11. [jnettop][10] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/jnettop.jpg) -jnettop 以相同的方式来监测网络流量但比 iftop 更形象。它还支持自定义的文本输出并能以友好的交互方式来快速分析日志。 +jnettop 以相同的方式来监测网络流量但比 iftop 更形象。它还支持自定义的文本输出,并能以友好的交互方式来深度分析日志。 #### 12. [bandwidthd][11] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/bandwidthd.jpg) -bandwidthd 可以跟踪 TCP/IP 网络子网的使用情况并能在浏览器中通过 png 图片形象化的构建一个 HTML 页面。它有一个数据库驱动系统,支持搜索,过滤,多传感器和自定义报表。 +BandwidthD 可以跟踪 TCP/IP 网络子网的使用情况,并能在浏览器中通过 png 图片形象化地构建一个 HTML 页面。它有一个数据库系统,支持搜索、过滤,多传感器和自定义报表。 #### 13. [EtherApe][12] #### -EtherApe 以图形化显示网络流量,可以支持更多的节点。它可以捕获实时流量信息,也可以从 tcpdump 进行读取。也可以使用具有 pcap 语法的网络过滤显示特定信息。 +EtherApe 以图形化显示网络流量,可以支持更多的节点。它可以捕获实时流量信息,也可以从 tcpdump 进行读取。也可以使用 pcap 格式的网络过滤器来显示特定信息。 #### 14. [ethtool][13] #### @@ -97,19 +97,19 @@ ethtool 用于显示和修改网络接口控制器的一些参数。它也可以 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/nethogs.jpg) -NetHogs 打破了网络流量按协议或子网进行统计的原理。它以进程组来计算。所以,当网络流量猛增时,你可以使用 NetHogs 查看是由哪个进程造成的。 +NetHogs 打破了网络流量按协议或子网进行统计的惯例,它以进程来分组。所以,当网络流量猛增时,你可以使用 NetHogs 查看是由哪个进程造成的。 #### 16. [iptraf][15] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/iptraf.jpg) -iptraf 收集的各种指标,如 TCP 连接数据包和字节数,接口界面和活动指标,TCP/UDP 通信故障,站内数据包和字节数。 +iptraf 收集的各种指标,如 TCP 连接数据包和字节数,端口统计和活动指标,TCP/UDP 通信故障,站内数据包和字节数。 #### 17. [ngrep][16] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ngrep.jpg) -ngrep 就是 grep 但是相对于网络层的。pcap 意识到后允许其指定扩展规则或十六进制表达式来匹配数据包。 +ngrep 就是网络层的 grep。它使用 pcap ,允许通过指定扩展正则表达式或十六进制表达式来匹配数据包。 #### 18. [MRTG][17] #### @@ -121,29 +121,29 @@ MRTG 最初被开发来监控路由器的流量,但现在它也能够监控网 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/bmon.jpg) -Bmon 能监控并帮助你调试网络。它能捕获网络相关的统计数据,并以友好的方式进行展示。你还可以与 bmon 通过脚本进行交互。 +bmon 能监控并帮助你调试网络。它能捕获网络相关的统计数据,并以友好的方式进行展示。你还可以与 bmon 通过脚本进行交互。 #### 20. traceroute #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/traceroute.jpg) -Traceroute 一个内置工具,能测试路由和数据包在网络中的延迟。 +traceroute 是一个内置工具,能显示路由和测量数据包在网络中的延迟。 #### 21. [IPTState][19] #### -IPTState 可以让你跨越 iptables 来监控流量,并通过你指定的条件来进行排序。该工具还允许你从表中删除状态信息。 +IPTState 可以让你观察流量是如何通过 iptables,并通过你指定的条件来进行排序。该工具还允许你从 iptables 的表中删除状态信息。 #### 22. [darkstat][20] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/darkstat.jpg) -Darkstat 能捕获网络流量并计算统计的数据。该报告需要在浏览器中进行查看,它为你提供了一个非常棒的图形用户界面。 +darkstat 能捕获网络流量并计算使用情况的统计数据。该报告保存在一个简单的 HTTP 服务器中,它为你提供了一个非常棒的图形用户界面。 #### 23. [vnStat][21] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/vnstat.jpg) -vnStat 是一个网络流量监控工具,它的数据统计是由内核进行提供的,其消耗的系统资源非常少。系统重新启动后,它收集的数据仍然存在。它具有颜色选项供系统管理员使用。 +vnStat 是一个网络流量监控工具,它的数据统计是由内核进行提供的,其消耗的系统资源非常少。系统重新启动后,它收集的数据仍然存在。有艺术感的系统管理员可以使用它的颜色选项。 #### 24. netstat #### @@ -153,25 +153,25 @@ netstat 是一个内置的工具,它能显示 TCP 网络连接,路由表和 #### 25. ss #### -并非 netstat,最好使用 ss。ss 命令能够显示的信息比 netstat 更多,也更快。如果你想查看统计结果的总信息,你可以使用命令 `ss -s`。 +比起 netstat,使用 ss 更好。ss 命令能够显示的信息比 netstat 更多,也更快。如果你想查看统计结果的总信息,你可以使用命令 `ss -s`。 #### 26. [nmap][22] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/nmap.jpg) -Nmap 可以扫描你服务器开放的端口并且可以检测正在使用哪个操作系统。但你也可以使用 SQL 注入漏洞,网络发现和渗透测试相关的其他手段。 +Nmap 可以扫描你服务器开放的端口并且可以检测正在使用哪个操作系统。但你也可以将其用于 SQL 注入漏洞、网络发现和渗透测试相关的其他用途。 #### 27. [MTR][23] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mtr.jpg) -MTR 结合了 traceroute 和 ping 的功能到一个网络诊断工具上。当使用该工具时,它会限制单个数据包的跳数,同时也监视它们的到期时间。然后每秒进行重复。 +MTR 将 traceroute 和 ping 的功能结合到了一个网络诊断工具上。当使用该工具时,它会限制单个数据包的跳数,然后监视它们的到期时到达的位置。然后每秒进行重复。 #### 28. [Tcpdump][24] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/tcpdump.jpg) -Tcpdump 将输出一个你在命令中匹配并捕获到的数据包的信息。你还可以将此数据保存并进一步分析。 +Tcpdump 将按照你在命令行中指定的表达式输出匹配捕获到的数据包的信息。你还可以将此数据保存并进一步分析。 #### 29. [Justniffer][25] #### @@ -185,13 +185,13 @@ Justniffer 是 tcp 数据包嗅探器。使用此嗅探器你可以选择收集 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/nmon.jpg) -nmon 将数据输出到屏幕上的,或将其保存在一个以逗号分隔的文件中。你可以查看 CPU,内存,网络,文件系统,top 进程。数据也可以被添加到 RRD 数据库中用于进一步分析。 +nmon 将数据输出到屏幕上的,或将其保存在一个以逗号分隔的文件中。你可以查看 CPU,内存,网络,文件系统,前列 进程。数据也可以被添加到 RRD 数据库中用于进一步分析。 #### 31. [conky][27] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/cpulimit.jpg) -Conky 能监视不同操作系统并统计数据。它支持 IMAP 和 POP3, 甚至许多流行的音乐播放器!出于方便不同的人,你可以使用自己的 Lua 脚本或程序来进行扩展。 +Conky 能监视很多的操作系统数据。它支持 IMAP 和 POP3, 甚至许多流行的音乐播放器!出于方便不同的人,你可以使用自己的 Lua 脚本或程序来进行扩展。 #### 32. [Glances][28] #### @@ -215,13 +215,13 @@ RRDtool 是用来处理 RRD 数据库的工具。RRDtool 旨在处理时间序 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/monit.jpg) -如果出现故障时,monit 有发送警报以及重新启动服务的功能。它可以对任何类型进行检查,你可以为 monit 写一个脚本,它有一个 Web 用户界面来分担你眼睛的压力。 +如果出现故障时,monit 有发送警报以及重新启动服务的功能。它可以对各种数据进行检查,你可以为 monit 写一个脚本,它有一个 Web 用户界面来分担你眼睛的压力。 #### 36. [Linux process explorer][32] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/linux-process-monitor.jpg) -Linux process explorer 是类似 OSX 或 Windows 的在线监视器。它比 top 或 ps 的使用范围更广。你可以查看每个进程的内存消耗以及 CPU 的使用情况。 +Linux process explorer 是类似 OSX 或 Windows 的活动监视器。它比 top 或 ps 的使用范围更广。你可以查看每个进程的内存消耗以及 CPU 的使用情况。 #### 37. df #### @@ -233,37 +233,37 @@ df 是 disk free 的缩写,它是所有 UNIX 系统预装的程序,用来显 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/discus.jpg) -Discus 类似于 df,它的目的是通过使用更吸引人的特性,如颜色,图形和数字来对 df 进行改进。 +discus 类似于 df,它的目的是通过使用更吸引人的特性,如颜色,图形和数字来对 df 进行改进。 #### 39. [xosview][34] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/xosview.jpg) -xosview 是一款经典的系统监控工具,它给你提供包括 IRQ 的各个不同部分的总览。 +xosview 是一款经典的系统监控工具,它给你提供包括 IRQ 在内的各个不同部分的简单总览。 #### 40. [Dstat][35] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/dstat.jpg) -Dstat 旨在替代 vmstat,iostat,netstat 和 ifstat。它可以让你查实时查看所有的系统资源。这些数据可以导出为 CSV。最重要的是 dstat 允许使用插件,因此其可以扩展到更多领域。 +dstat 旨在替代 vmstat,iostat,netstat 和 ifstat。它可以让你查实时查看所有的系统资源。这些数据可以导出为 CSV。最重要的是 dstat 允许使用插件,因此其可以扩展到更多领域。 #### 41. [Net-SNMP][36] #### -SNMP 是“简单网络管理协议”,Net-SNMP 工具套件使用该协议可帮助你收集服务器的准确信息。 +SNMP 即“简单网络管理协议”,Net-SNMP 工具套件使用该协议可帮助你收集服务器的准确信息。 #### 42. [incron][37] #### -Incron 允许你监控一个目录树,然后对这些变化采取措施。如果你想将目录‘a’中的新文件复制到目录‘b’,这正是 incron 能做的。 +incron 允许你监控一个目录树,然后对这些变化采取措施。如果你想在目录‘a’中出现新文件时,将其复制到目录‘b’,这正是 incron 能做的。 #### 43. [monitorix][38] #### -Monitorix 是轻量级的系统监控工具。它可以帮助你监控一台机器,并为你提供丰富的指标。它也有一个内置的 HTTP 服务器,来查看图表和所有指标的报告。 +Monitorix 是轻量级的系统监控工具。它可以帮助你监控单独一台机器,并为你提供丰富的指标。它也有一个内置的 HTTP 服务器,来查看图表和所有指标的报告。 #### 44. vmstat #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/vmstat.jpg) -vmstat(virtual memory statistics)是一个小的内置工具,能监控和显示机器的内存。 +vmstat(virtual memory statistics)是一个小型内置工具,能监控和显示机器的内存。 #### 45. uptime #### @@ -273,13 +273,13 @@ vmstat(virtual memory statistics)是一个小的内置工具,能监控和 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mpstat.jpg) -mpstat 是一个内置的工具,能监视 cpu 的使用情况。最常见的使用方法是 `mpstat -P ALL`,它给你提供 cpu 的使用情况。你也可以间隔更新 cpu 的使用情况。 +mpstat 是一个内置的工具,能监视 cpu 的使用情况。最常见的使用方法是 `mpstat -P ALL`,它给你提供 cpu 的使用情况。你也可以间歇性地更新 cpu 的使用情况。 #### 47. pmap #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/pmap.jpg) -pmap 是一个内置的工具,报告一个进程的内存映射。你可以使用这个命令来找出内存瓶颈的原因。 +pmap 是一个内置的工具,报告一个进程的内存映射。你可以使用这个命令来找出导致内存瓶颈的原因。 #### 48. ps #### @@ -291,13 +291,13 @@ pmap 是一个内置的工具,报告一个进程的内存映射。你可以使 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/sar.jpg) -sar 是 sysstat 包的一部分,可以帮助你收集,报告和保存不同系统的指标。使用不同的参数,它会给你提供 CPU, 内存 和 I/O 使用情况及其他东西。 +sar 是 sysstat 包的一部分,可以帮助你收集、报告和保存不同系统的指标。使用不同的参数,它会给你提供 CPU、 内存和 I/O 使用情况及其他东西。 #### 50. [collectl][40] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/collectl.jpg) -类似于 sar,collectl 收集你机器的性能指标。默认情况下,显示 cpu,网络和磁盘统计数据,但它实际收集了很多信息。与 sar 不同的是,collectl 能够处理比秒更小的单位,它可以被直接送入绘图工具并且 collectl 的监控过程更广泛。 +类似于 sar,collectl 收集你机器的性能指标。默认情况下,显示 cpu、网络和磁盘统计数据,但它实际收集了很多信息。与 sar 不同的是,collectl 能够处理比秒更小的单位,它可以被直接送入绘图工具并且 collectl 的监控过程更广泛。 #### 51. [iostat][41] #### @@ -309,23 +309,23 @@ iostat 也是 sysstat 包的一部分。此命令用于监控系统的输入/输 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/free.jpg) -这是一个内置的命令用于显示你机器上可用的内存大小以及已使用的内存大小。它还可以显示某时刻内核所使用的缓冲区大小。 +这是一个内置的命令,用于显示你机器上可用的内存大小以及已使用的内存大小。它还可以显示某时刻内核所使用的缓冲区大小。 -#### 53. /Proc 文件系统 #### +#### 53. /proc 文件系统 #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/procfile.jpg) -proc 文件系统可以让你查看内核的统计信息。从这些统计数据可以得到你机器上不同硬件设备的详细信息。看看这个 [ proc文件统计的完整列表 ][42]。 +proc 文件系统可以让你查看内核的统计信息。从这些统计数据可以得到你机器上不同硬件设备的详细信息。看看这个 [proc 文件统计的完整列表][42]。 #### 54. [GKrellM][43] #### -GKrellm 是一个图形应用程序来监控你硬件的状态信息,像CPU,内存,硬盘,网络接口以及其他的。它也可以监视并启动你所选择的邮件阅读器。 +GKrellm 是一个图形应用程序,用来监控你硬件的状态信息,像CPU,内存,硬盘,网络接口以及其他的。它也可以监视并启动你所选择的邮件阅读器。 #### 55. [Gnome 系统监控器][44] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/gnome-system-monitor.jpg) -Gnome 系统监控器是一个基本的系统监控工具,其能通过一个树状结构来查看进程的依赖关系,能杀死及调整进程优先级,还能以图表形式显示所有服务器的指标。 +Gnome 系统监控器是一个基本的系统监控工具,其能通过一个树状结构来查看进程的依赖关系,能杀死进程及调整进程优先级,还能以图表形式显示所有服务器的指标。 ### 日志监控工具 ### @@ -333,11 +333,11 @@ Gnome 系统监控器是一个基本的系统监控工具,其能通过一个 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/goaccess.jpg) -GoAccess 是一个实时的网络日志分析器,它能分析 apache, nginx 和 amazon cloudfront 的访问日志。它也可以将数据输出成 HTML,JSON 或 CSV 格式。它会给你一个基本的统计信息,访问量,404页面,访客位置和其他东西。 +GoAccess 是一个实时的网络日志分析器,它能分析 apache, nginx 和 amazon cloudfront 的访问日志。它也可以将数据输出成 HTML,JSON 或 CSV 格式。它会给你一个基本的统计信息、访问量、404 页面,访客位置和其他东西。 #### 57. [Logwatch][46] #### -Logwatch 是一个日志分析系统。它通过分析系统的日志,并为你所指定的区域创建一个分析报告。它每天给你一个报告可以让你花费更少的时间来分析日志。 +Logwatch 是一个日志分析系统。它通过分析系统的日志,并为你所指定的部分创建一个分析报告。它每天给你一个报告,以便让你花费更少的时间来分析日志。 #### 58. [Swatch][47] #### @@ -349,13 +349,13 @@ Logwatch 是一个日志分析系统。它通过分析系统的日志,并为 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/multitail.jpg) -MultiTail 可帮助你在多窗口下监控日志文件。你可以将这些日志文件合并成一个。它也像正则表达式一样使用不同的颜色来显示日志文件以方便你阅读。 +MultiTail 可帮助你在多个窗口之下监控日志文件。你可以将这些日志文件合并到一个窗口。它可以通过正则表达式的帮助,使用不同的颜色来显示日志文件以方便你阅读。 -#### 系统工具 #### +### 系统工具 ### #### 60. [acct or psacct][49] #### -acct 也称 psacct(取决于如果你使用 apt-get 还是 yum)可以监控所有用户执行的命令,包括 CPU 和内存在系统内所使用的时间。一旦安装完成后你可以使用命令 ‘sa’ 来查看。 +acct 也称 psacct(取决于如果你使用 apt-get 还是 yum)可以监控所有用户执行的命令,包括 CPU 时间和内存占用。一旦安装完成后你可以使用命令 `sa` 来查看统计。 #### 61. [whowatch][50] #### @@ -365,31 +365,31 @@ acct 也称 psacct(取决于如果你使用 apt-get 还是 yum)可以监控 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/strace.jpg) -strace 被用于诊断,调试和监控程序之间的相互调用过程。最常见的做法是用 strace 打印系统调用的程序列表,其可以看出程序是否像预期那样被执行了。 +strace 被用于诊断、调试和监控程序之间的相互调用过程。最常见的做法是用 strace 打印系统调用的程序列表,其可以看出程序是否像预期那样被执行了。 #### 63. [DTrace][52] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/dtrace.jpg) -DTrace 可以说是 strace 的大哥。它动态地跟踪与检测代码实时运行的指令。它允许你深入分析其性能和诊断故障。但是,它并不简单,大约有1200本书中提到过它。 +DTrace 可以说是 strace 的大哥。它动态地跟踪与检测代码实时运行的指令。它允许你深入分析其性能和诊断故障。但是,它并不简单,关于这个话题有1200本书之多。 #### 64. [webmin][53] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/webmin.jpg) -Webmin 是一个基于 Web 的系统管理工具。它不需要手动编辑 UNIX 配置文件,并允许你远程管理系统。它有一对监控模块用于连接它。 +Webmin 是一个基于 Web 的系统管理工具。它不需要手动编辑 UNIX 配置文件,可以让你远程管理系统。它有一对监控模块用于连接它。 #### 65. stat #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/stat.jpg) -Stat 是一个内置的工具,用于显示文件和文件系统的状态信息。它会显示文件被修改,访问或更改的信息。 +Stat 是一个内置的工具,用于显示文件和文件系统的状态信息。它会显示文件何时被修改、访问或更改。 #### 66. ifconfig #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ifconfig.jpg) -ifconfig 是一个内置的工具用于配置网络接口。大多数网络监控工具背后都使用 ifconfig 将其设置成混乱模式来捕获所有的数据包。你可以手动执行 `ifconfig eth0 promisc` 并使用 `ifconfig eth0 -promisc` 返回正常模式。 +ifconfig 是一个内置的工具,用于配置网络接口。大多数网络监控工具背后都使用 ifconfig 将网卡设置成混乱模式来捕获所有的数据包。你可以手动执行 `ifconfig eth0 promisc` 进入混乱模式,使用 `ifconfig eth0 -promisc` 返回正常模式。 #### 67. [ulimit][54] #### @@ -399,23 +399,23 @@ ulimit 是一个内置的工具,可监控系统资源,并可以限制任何 #### 68. [cpulimit][55] #### -CPULimit 是一个小工具用于监控并限制进程对 CPU 的使用率。其特别有用,能限制批处理作业对 CPU 的使用率保持在一定范围。 +CPULimit 是一个小工具,用于监控并限制进程对 CPU 的使用率。其特别可以用于将批处理作业对 CPU 的使用率保持在一定范围。 #### 69. lshw #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/lshw.jpg) -lshw 是一个小的内置工具能提取关于本机硬件配置的详细信息。它可以输出 CPU 版本和主板配置。 +lshw 是一个小的内置工具,能提取关于本机硬件配置的详细信息。它可以输出 CPU 版本和主板配置。 #### 70. w #### -w 是一个内置命令用于显示当前登录用户的信息及他们所运行的进程。 +w 是一个内置命令,用于显示当前登录用户的信息及他们所运行的进程。 #### 71. lsof #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/lsof.jpg) -lsof 是一个内置的工具可让你列出所有打开的文件和网络连接。从那里你可以看到文件是由哪个进程打开的,基于进程名,可通过一个特定的用户来杀死属于某个用户的所有进程。 +lsof 是一个内置的工具,可让你列出所有打开的文件和网络连接。从那里你可以看到文件是由哪个进程打开的,基于进程名可找到其特定的用户,或杀死属于某个用户的所有进程。 ### 基础架构监控工具 ### @@ -423,13 +423,13 @@ lsof 是一个内置的工具可让你列出所有打开的文件和网络连接 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/server-density-monitoring.png) -我们的 [服务器监控工具][56]!它有一个 web 界面,使你可以进行报警设置并可以通过图表来查看所有系统的网络指标。你还可以设置监控的网站,无论是否在线。Server Density 允许你设置用户的权限,你可以根据我们的插件或 api 来扩展你的监控。该服务已经支持 Nagios 的插件了。 +我们的 [服务器监控工具][56] 它有一个 web 界面,使你可以进行报警设置并可以通过图表来查看所有系统的网络指标。你还可以设置监控的网站,无论是否在线。Server Density 允许你设置用户的权限,你可以根据我们的插件或 api 来扩展你的监控。该服务已经支持 Nagios 的插件了。 #### 73. [OpenNMS][57] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/opennms.jpg) -OpenNMS 主要有四个功能区:事件管理和通知;发现和配置;服务监控和数据收集。其设计可被在多种网络环境中定制。 +OpenNMS 主要有四个功能区:事件管理和通知;发现和配置;服务监控和数据收集。其设计为可被在多种网络环境中定制。 #### 74. [SysUsage][58] #### @@ -441,19 +441,19 @@ SysUsage 通过 Sar 和其他系统命令持续监控你的系统。一旦达到 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/brainypdm.jpg) -brainypdm 是一个数据管理和监控工具,它能收集来自 nagios 或其它公共资源的数据并以图表显示。它是跨平台的,其基于 Web 并可自定义图形。 +brainypdm 是一个数据管理和监控工具,它能收集来自 nagios 或其它常规来源的数据并以图表显示。它是跨平台的,其基于 Web 并可自定义图形。 #### 76. [PCP][60] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/pcp.jpg) -PCP 可以收集来自多个主机的指标,并且效率很高。它也有一个插件框架,所以你可以把它收集的对你很重要的指标使用插件来管理。你可以通过任何一个 Web 界面或 GUI 访问图形数据。它比较适合大型监控系统。 +PCP 可以收集来自多个主机的指标,并且效率很高。它也有一个插件框架,所以你可以让它收集对你很重要的指标。你可以通过任何一个 Web 界面或 GUI 访问图形数据。它比较适合大型监控系统。 -#### 77. [KDE 系统保护][61] #### +#### 77. [KDE 系统守护][61] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/kdesystemguard.jpg) -这个工具既是一个系统监控器也是一个任务管理器。你可以通过工作表来查看多台机器的服务指标,如果一个进程需要被杀死或者你需要启动一个进程,它可以在 KDE 系统保护中来完成。 +这个工具既是一个系统监控器也是一个任务管理器。你可以通过工作表来查看多台机器的服务指标,如果需要杀死一个进程或者你需要启动一个进程,它可以在 KDE 系统守护中来完成。 #### 78. [Munin][62] #### @@ -471,7 +471,7 @@ Nagios 是系统和网络监控工具,可帮助你监控多台服务器。当 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/zenoss.jpg) -Zenoss 提供了一个 Web 界面,使你可以监控所有的系统和网络指标。此外,它能自动发现网络资源和修改网络配置。并且会提醒你采取行动,它也支持 Nagios 的插件。 +Zenoss 提供了一个 Web 界面,使你可以监控所有的系统及网络指标。此外,它能自动发现网络资源和修改网络配置。并且会提醒你采取行动,它也支持 Nagios 的插件。 #### 81. [Cacti][65] #### @@ -483,7 +483,7 @@ Zenoss 提供了一个 Web 界面,使你可以监控所有的系统和网络 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/zabbix-monitoring.png) -Zabbix 是一个开源的基础设施监控解决方案。它使用了许多数据库来存放监控统计信息。其核心是用 C 语言编写,并在前端中使用 PHP。如果你不喜欢安装代理,Zabbix 可能是一个最好选择。 +Zabbix 是一个开源的基础设施监控解决方案。它使用了许多数据库来存放监控统计信息。其核心是用 C 语言编写,并在前端中使用 PHP。如果你不喜欢安装代理端,Zabbix 可能是一个最好选择。 ### 附加部分: ### @@ -491,15 +491,15 @@ Zabbix 是一个开源的基础设施监控解决方案。它使用了许多数 #### 83. [collectd][67] #### -Collectd 是一个 Unix 守护进程来收集所有的监控数据。它采用了模块化设计并使用插件来填补一些缺陷。这样能使 collectd 保持轻量级并可进行定制。 +Collectd 是一个 Unix 守护进程,用来收集所有的监控数据。它采用了模块化设计并使用插件来填补一些缺陷。这样能使 collectd 保持轻量级并可进行定制。 #### 84. [Observium][68] #### -Observium 是一个自动发现网络的监控平台,支持普通的硬件平台和操作系统。Observium 专注于提供一个优美,功能强大,简单直观的界面来显示网络的健康和状态。 +Observium 是一个自动发现网络的监控平台,支持大量硬件平台和操作系统。Observium 专注于提供一个优美、功能强大、简单直观的界面来显示网络的健康和状态。 #### 85. Nload #### -这是一个命令行工具来监控网络的吞吐量。它很整洁,因为它使用两个图表和其他一些有用的数据类似传输的数据总量来对进出站流量进行可视化。你可以使用如下方法安装它: +这是一个命令行工具来监控网络的吞吐量。它很整洁,因为它使用两个图表和其他一些类似传输的数据总量这样的有用数据来对进出站流量进行可视化。你可以使用如下方法安装它: yum install nload @@ -509,15 +509,15 @@ Observium 是一个自动发现网络的监控平台,支持普通的硬件平 #### 86. [SmokePing][69] #### -SmokePing 可以跟踪你网络延迟,并对他们进行可视化。SmokePing 有一个流行的延迟测量插件。如果图形用户界面对你来说非常重要,现在有一个正在开发中的插件来实现此功能。 +SmokePing 可以跟踪你网络延迟,并对他们进行可视化。有各种为 SmokePing 开发的延迟测量插件。如果图形用户界面对你来说非常重要,现在有一个正在开发中的插件来实现此功能。 #### 87. [MobaXterm][70] #### -如果你整天在 windows 环境下工作。你可能会觉得 Windows 下受终端窗口的限制。MobaXterm 正是由此而来的,它允许你使用多个在 Linux 中相似的终端。这将会极大地帮助你在监控方面的需求! +如果你整天在 windows 环境下工作。你可能会觉得 Windows 下终端窗口的限制。MobaXterm 正是由此而来的,它允许你使用多个通常出现在 Linux 中的命令。这将会极大地帮助你在监控方面的需求! #### 88. [Shinken monitoring][71] #### -Shinken 是一个监控框架,其是由 python 对 Nagios 进行完全重写的。它的目的是增强灵活性和管理更大环境。但仍保持所有的 nagios 配置和插件。 +Shinken 是一个监控框架,其是采用 python 对 Nagios 进行了完全重写。它的目的是增强灵活性和管理更大环境。但仍保持所有的 nagios 配置和插件。 -------------------------------------------------------------------------------- @@ -525,7 +525,7 @@ via: https://blog.serverdensity.com/80-linux-monitoring-tools-know/ 作者:[Jonathan Sundqvist][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md b/published/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md similarity index 55% rename from translated/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md rename to published/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md index b79dc3657e..fcb65c6344 100644 --- a/translated/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md +++ b/published/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md @@ -1,57 +1,58 @@ -如何在Ubuntu 15.04 上安装带JSON 支持的SQLite 3.9.1 +如何在 Ubuntu 15.04 上安装带 JSON 支持的 SQLite 3.9.1 ================================================================================ -欢迎阅读我们关于SQLite 的文章,SQLite 是当今时间上使用最广泛的SQL 数据库引擎,它他基本不需要配置,不需要安装或者管理就可以运行。SQLite 是一个是开放领域的软件,是关系数据库的管理系统,或者说RDBMS,用来在大表存储用户定义的记录。对于数据存储和管理来说,数据库引擎要处理复杂的查询命令,这些命令可能会从多个表获取数据然后生成报告的数据总结。 +欢迎阅读我们关于SQLite 的文章,SQLite 是当今世界上使用最广泛的 SQL 数据库引擎,它基本不需要配置,不需要设置或管理就可以运行。SQLite 是一个是开放领域(public-domain)的软件,是一个关系型数据库管理系统(RDBMS),用来在一个大数据表中存储用户定义的记录。对于数据存储和管理来说,数据库引擎要处理复杂的查询命令,这些命令可能会从多个表获取数据然后生成报告和数据总结。 -SQLite 是一个非常小、轻量级,不需要分离的服务进程或系统。他可以运行在UNIX,Linux,Mac OS-X,Android,iOS 和Windows 上,已经被大量的软件程序使用,如Opera, Ruby On Rails, Adobe System, Mozilla Firefox, Google Chrome 和 Skype。 +SQLite 是一个非常小、轻量级,不需要独立的服务进程或系统。它可以运行在 UNIX,Linux,Mac OS-X,Android,iOS 和 Windows 上,已经被大量的软件程序使用,如 Opera, Ruby On Rails, Adobe System, Mozilla Firefox, Google Chrome 和 Skype。 ### 1) 基本需求: ### -在几乎全部支持SQLite 的平台上安装SQLite 基本上没有复杂的要求。 +在绝大部分支持 SQLite 的平台上安装 SQLite 基本上并没有复杂的要求。 -所以让我们在CLI 或者Secure Shell 上使用sudo 或者root 权限登录Ubuntu 服务器。然后更新系统,这样子就可以让操作系统的软件更新到新版本。 +让我们在 CLI 或者 Secure Shell 上使用 sudo 或者 root 权限登录 Ubuntu 服务器。然后更新系统,这样子就可以让操作系统的软件更新到新版本。 -在Ubuntu 上,下面的命令是用来更新系统的软件源的。 +在 Ubuntu 上,使用如下的命令来更新系统的软件源。 # apt-get update -如果你要在新安装的Ubuntu 上部署SQLite,那么你需要安装一些基础的系统管理工具,如wget, make, unzip, gcc。 +如果你要在新安装的 Ubuntu 上部署 SQLite,那么你需要安装一些基础的系统管理工具,如 wget, make, unzip, gcc。 -要安装wget,可以使用下面的命令,然后输入Y 如果系统提示的话: +要安装 wget,可以使用下面的命令,如果系统提示的话,输入 Y : # apt-get install wget make gcc ### 2) 下载 SQLite ### -要下载SQLite 最好是在[SQLite 官网][1]下载,如下所示 +要下载 SQLite ,最好是在 [SQLite 官网][1]下载,如下所示 ![SQLite download](http://blog.linoxide.com/wp-content/uploads/2015/10/Selection_014.png) -你也可以直接复制资源的连接然后再命令行使用wget 下载,如下所示: +你也可以直接复制资源的连接然后在命令行使用 wget 下载,如下所示: # wget https://www.sqlite.org/2015/sqlite-autoconf-3090100.tar.gz ![wget SQLite](http://blog.linoxide.com/wp-content/uploads/2015/10/23.png) -下载完成之后,解压缩安装包,切换工作目录到解压缩后的SQLite 目录,使用下面的命令。 +下载完成之后,解压缩安装包,切换工作目录到解压缩后的 SQLite 目录,使用下面的命令。 # tar -zxvf sqlite-autoconf-3090100.tar.gz ### 3) 安装 SQLite ### -现在我们要开始安装、配置刚才下载的SQLite。所以在Ubuntu 上编译、安装SQLite,运行配置脚本。 +现在我们要开始安装、配置刚才下载的 SQLite。在 Ubuntu 上编译、安装 SQLite,运行配置脚本: root@ubuntu-15:~/sqlite-autoconf-3090100# ./configure –prefix=/usr/local ![SQLite Installation](http://blog.linoxide.com/wp-content/uploads/2015/10/35.png) -配置要上面的prefix 之后,运行下面的命令编译安装包。 - - root@ubuntu-15:~/sqlite-autoconf-3090100# make +配置要上面的安装位置前缀(prefix)之后,运行下面的命令编译安装包。 +``` +root@ubuntu-15:~/sqlite-autoconf-3090100# make source='sqlite3.c' object='sqlite3.lo' libtool=yes \ DEPDIR=.deps depmode=none /bin/bash ./depcomp \ /bin/bash ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.9.1\" -DPACKAGE_STRING=\"sqlite\ 3.9.1\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.9.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_POSIX_FALLOCATE=1 -I. -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -c -o sqlite3.lo sqlite3.c +``` -运行完上面的命令之后,要在Ubuntu 上完成SQLite 的安装得运行下面的命令。 +运行完上面的命令之后,要在 Ubuntu 上完成 SQLite 的安装得运行下面的命令。 # make install @@ -59,7 +60,7 @@ DEPDIR=.deps depmode=none /bin/bash ./depcomp \ ### 4) 测试 SQLite 安装 ### -要保证SQLite 3.9 安装成功了,运行下面的命令。 +要保证 SQLite 3.9 安装成功了,运行下面的命令。 # sqlite3 @@ -77,7 +78,7 @@ SQLite 很容易上手。要获得详细的使用方法,在SQLite 控制台里 ![SQLite Help](http://blog.linoxide.com/wp-content/uploads/2015/10/62.png) -现在开始最后一部分,使用一点SQLite 命令创建数据库。 +现在开始最后一部分,使用一点 SQLite 命令创建数据库。 要创建一个新的数据库需要运行下面的命令。 @@ -103,17 +104,18 @@ SQLite 很容易上手。要获得详细的使用方法,在SQLite 控制台里 sqlite> .exit ![Using SQLite3](http://blog.linoxide.com/wp-content/uploads/2015/10/73.png) + ### 结论 ### -通过本文你可以了解如果安装支持JSON1 的最新版的SQLite,SQLite 从3.9.0 开始支持JSON1。这是一个非常棒的库,可以用来获取内嵌到应用程序,利用它可以很有效而且很轻量的管理资源。我们希望你能觉得本文有所帮助,请自由的像我们反馈你遇到的问题和困难。 +通过本文你可以了解如果安装支持 JSON1 的最新版的 SQLite,SQLite 从 3.9.0 开始支持 JSON1。这是一个非常棒的库,可以内嵌到应用程序,利用它可以很有效而轻量的管理资源。我们希望你能觉得本文有所帮助,请随意地向我们反馈你遇到的问题和困难。 -------------------------------------------------------------------------------- via: http://linoxide.com/ubuntu-how-to/install-sqlite-json-ubuntu-15-04/ 作者:[Kashif Siddique][a] -译者:[译者ID](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) +译者:[oska874](https://github.com/oska874) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md b/published/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md new file mode 100644 index 0000000000..c7f5a5d71f --- /dev/null +++ b/published/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md @@ -0,0 +1,237 @@ +在 Ubuntu 15.04 / CentOS 7 上安装广告服务器 Revive Adserver +================================================================================ +Revive Adserver是一个自由开源的广告管理系统,能使出版商,广告平台和广告商在网页、应用、视频上投放并管理广告的系统。Revive Adserver以前叫做OpenX Source,遵循GNU通用公共授权协议。它集广告管理、网站定位、地理定位和一个用于数据收集的跟踪系统于一体。能使网站站长管理内部的、付费的以及第三方来源的广告,如谷歌的AdSense。本教程中,将会教会你在Ubuntu 15.04或CentOS 7安装并运行Revive Adserver。 + +### 1. 安装LAMP### + +首先,Revive Adserver需要完整的LAMP环境才能运行,所以我们先安装LAMP。LAMP是Apache网页服务器,MySQL/MariaDB数据库和PHP模块的集合。要使Revive正常运行,需要安装PHP的众多模块,如apc, zlib, xml, pcre, mysql和mbstring。在不同的Linux发行版中,我们可以用下列命令进行LAMP的配置: + +#### 在Ubuntu 15.04下#### + + # apt-get install apache2 mariadb-server php5 php5-gd php5-mysql php5-curl php-apc zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev libapache2-mod-php5 zip + +#### 在CentOS 7下 #### + + # yum install httpd mariadb php php-gd php-mysql php-curl php-mbstring php-xml php-apc zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev zip + +### 2. 启动Apache Web和MariaDB服务 + +可以用下列命令启动刚刚安装好的Apache Web服务和MariaDB数据库服务。 + +#### 在Ubuntu 15.04下#### + +Ubuntu15.04使用Systemd作为默认初始系统,所以用下列命令启动Apache和MariaDB进程: + + # systemctl start apache2 mysql + +可以用下列命令使其开机自动运行: + + # systemctl enable apache2 mysql + + Synchronizing state for apache2.service with sysvinit using update-rc.d... + Executing /usr/sbin/update-rc.d apache2 defaults + Executing /usr/sbin/update-rc.d apache2 enable + Synchronizing state for mysql.service with sysvinit using update-rc.d... + Executing /usr/sbin/update-rc.d mysql defaults + Executing /usr/sbin/update-rc.d mysql enable + +#### 在CentOS 7下 + +CentOS 7同样是以Systemd作为默认初始系统,可以用下列命令启动: + + # systemctl start httpd mariadb + + ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service' + ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service' + +### 3. 配置MariaDB + +#### 在CentOS 7/Ubuntu 15.04下 #### + +当我们第一次启动MariaDB时,MariaDB是没有分配密码的,所以要先设置一个root密码。之后再创建一个新的数据库用来储存Revive Adserver的数据。 + +使用以下命令配置MariaDB并设置其root密码: + + # mysql_secure_installation + +这时会要我们输入root密码,但我们之前什么密码都没设置,所以按回车下一步。之后,要求设置root密码,这时我们输入Y,然后输入自己想要的密码。回车继续下一步。 + + …. + so you should just press enter here. + + Enter current password for root (enter for none): + OK, successfully used password, moving on… + + Setting the root password ensures that nobody can log into the MariaDB + root user without the proper authorisation. + + Set root password? [Y/n] y + New password: + Re-enter new password: + Password updated successfully! + Reloading privilege tables.. + … Success! + … + installation should now be secure. + Thanks for using MariaDB! + +![Configuring MariaDB](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-mariadb.png) + +### 4. 创建新的数据库 ### + +为MariaDB的root用户设置了密码之后,就可以创建用来储存Revive Adserver应用数据的数据库。首先通过以下命令登录MariaDB控制台: + + # mysql -u root -p + +这时要求输入root用户的密码,我们只要输入上一步设置好的密码。然后进入MariaDB控制台创建新的数据库,数据库用户及其密码,并且授予其创建、删除、编辑和存储表与数据的全部权限。 + + > CREATE DATABASE revivedb; + > CREATE USER 'reviveuser'@'localhost' IDENTIFIED BY 'Pa$$worD123'; + > GRANT ALL PRIVILEGES ON revivedb.* TO 'reviveuser'@'localhost'; + > FLUSH PRIVILEGES; + > EXIT; + +![Creating Mariadb Revive Database](http://blog.linoxide.com/wp-content/uploads/2015/11/creating-mariadb-revive-database.png) + +### 5. 下载Revive Adserver + +接下来下载Revive Adserver的最新版本Revive Adserver.3.2.2(写本文时)。可以使用wget命令从Revive Adserverde 官方网站下载压缩包,网址是:[http://www.revive-adserver.com/download/][1] 。命令如下: + + # cd /tmp/ + # wget http://download.revive-adserver.com/revive-adserver-3.2.2.zip + + --2015-11-09 17:03:48-- http://download.revive-adserver.com/revive-adserver-3.2.2.zip + Resolving download.revive-adserver.com (download.revive-adserver.com)... 54.230.119.219, 54.239.132.177, 54.230.116.214, ... + Connecting to download.revive-adserver.com (download.revive-adserver.com)|54.230.119.219|:80... connected. + HTTP request sent, awaiting response... 200 OK + Length: 11663620 (11M) [application/zip] + Saving to: 'revive-adserver-3.2.2.zip' + revive-adserver-3.2 100%[=====================>] 11.12M 1.80MB/s in 13s + 2015-11-09 17:04:02 (906 KB/s) - 'revive-adserver-3.2.2.zip' saved [11663620/11663620] + +解压到临时目录下: + + # unzip revive-adserver-3.2.2.zip + +把解压后的整个文件夹移动到Apache Web服务器的默认根目录/var/www/html/下: + + # mv revive-adserver-3.2.2 /var/www/html/reviveads + +### 6. 配置Apache Web服务 + +现在配置Apache服务使Revive正常运行。通过创建配置文件reviveads.conf来创建一个新的虚拟主机。这个目录在不同的Linux发行版上有所不同。 + +#### 在Ubuntu 15.04下 + + # touch /etc/apache2/sites-available/reviveads.conf + # ln -s /etc/apache2/sites-available/reviveads.conf /etc/apache2/sites-enabled/reviveads.conf + # nano /etc/apache2/sites-available/reviveads.conf + +在这个文件中添加下列几行文本: + + + ServerAdmin info@reviveads.linoxide.com + DocumentRoot /var/www/html/reviveads/ + ServerName reviveads.linoxide.com + ServerAlias www.reviveads.linoxide.com + + Options FollowSymLinks + AllowOverride All + + ErrorLog /var/log/apache2/reviveads.linoxide.com-error_log + CustomLog /var/log/apache2/reviveads.linoxide.com-access_log common + + +![Configuring Apache2 Ubuntu](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-apache2-ubuntu.png) + +保存并退出,重启Apache Web服务: + + # systemctl restart apache2 + +#### 在CentOS 7下 #### + +在CentOS下,我们直接在/etc/httpd/conf.d/ 目录下创建reviveads.conf : + + # nano /etc/httpd/conf.d/reviveads.conf + +在这个文件中添加下列几行文本: + + + ServerAdmin info@reviveads.linoxide.com + DocumentRoot /var/www/html/reviveads/ + ServerName reviveads.linoxide.com + ServerAlias www.reviveads.linoxide.com + + Options FollowSymLinks + AllowOverride All + + ErrorLog /var/log/httpd/reviveads.linoxide.com-error_log + CustomLog /var/log/httpd/reviveads.linoxide.com-access_log common + + +![Configuring httpd Centos](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-httpd-centos.png) + +保存并退出,重启Apache Web服务: + + # systemctl restart httpd + +### 7. 修复权限和所有权 + +现在我们修改安装路径下文件的权限和所有权。把安装目录的所有权改成Apache进程所有,以便Apache Web服务有文件和目录的编辑、创建和删除的完全权限。 + +#### 在Ubuntu 15.04下#### + + # chown www-data: -R /var/www/html/reviveads + +#### 在CentOS 7下 + + # chown apache: -R /var/www/html/reviveads + +### 8. 设置防火墙 + + 现在要配置防火墙,打开80端口使Apache Web服务运行的Revive Adserver能够被网络上的其他机器所访问。 + +#### 在Ubuntu 15.04/CentOS 7下 + +Ubuntu15.04/CentOS 7都使用Systemd作为默认初始系统,使用firewalld作为其防火墙。要打开80端口(http服务端口),执行以下命令: + + # firewall-cmd --permanent --add-service=http + + success + + # firewall-cmd --reload + + success + +### 9. 网站的安装 + +顺利的话我们能够使用浏览器进行交互,并可以将浏览器指向正在运行的网络服务器。只要在浏览器输入http://ip-address/ 或者 http://domain.com 。这里我们要访问 http://reviveads.linoxide.com/ + +打开后可以看到Revive Adserver的欢迎页面,上面还有作为它发行许可证的GNU通用公共许可证V2。点击 I agree 继续下一步安装。 + +在下一页中,我们要输入数据库信息以便把Revive Adserver和MariaDB数据库服务连接起来。要输入之前设置的数据库名称,用户名以及密码。在本教程中,我们分别输入数据库名称为revivedb,用户名为reviveuser,密码为Pa$$worD123,并且令主机名为localhost,点击continue继续。 + +![Configuring Revive Adserver](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-revive-adserver.png) + +输入要填的信息,如:管理员用户名,密码和邮箱。可以以这些信息登录Adserver的控制界面。然后跳到最后一页,可以看到Revive Adserver已经安装成功了。 + +接着,转到Adverstiser页面,添加新的广告管理。在控制界面添加新用户到adserver,为广告库户添加标题,网页,视频 +广告。 + +### 总结 ### + +本文中,我们学习了如何在Ubuntu 15.04和CentOS 7上安装并配置Revive Adserver。尽管Revive Adserver的原始代码是从OpenX那买的,但现在OpenX Enterprise和Revive Adserver已经完全分开了。可以从[http://www.adserverplugins.com/][2] 获得更多插件来扩展新特性。讲真,这个软件确实让网页,应用,视频上的广告管理变得容易了许多。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-revive-adserver-ubuntu-15-04-centos-7/ + +作者:[Arun Pyasi][a] +译者:[chisper](https://github.com/chisper) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://www.revive-adserver.com/download/ +[2]:http://www.adserverplugins.com/ diff --git a/published/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md b/published/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md new file mode 100644 index 0000000000..e86ee8b7f0 --- /dev/null +++ b/published/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md @@ -0,0 +1,51 @@ +没有 Linux 和开源软件的世界会变得怎么样 +================================================================================ +> Linux 基金会针最近对人们关于 “没有 Linux 的世界” 系列短片所提出的问题做了回应,解答了包括没有 Linux 和其他的开源软件的因特网会变得怎么样等问题。 + +![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/11/hey_22.png) + +假如 Linux —— 这个开源的操作系统内核 —— 不曾出现过,我们现在的世界是否会是另一番景象。会不会没有了因特网,或者没有了电影?这些都是观看 [Linux 基金会][1] 正在连续播出的 “[没有 Linux 的世界][2]” 系列短片的观众提出来的问题。 + +假如你错过了观看这些短片也不要紧,“[没有 Linux 的世界][2]” 系列短片是一个搞笑短片的集合,里边描述了没有了 Linux (或者说没有开源软件)的世界发生的事情。这些短片强调了 Linux 在 [电影制作][3] 以及 [因特网服务][4] 中充当的角色。 + +为了揭示该系列短片的一些主张、倾向和隐藏元素,Linux 基金会副主席 Jennifer Cloer 最近在 The VAR Guy 上回应了关于该短片的一些问题。以下是她的原话解答。 + +### 最新一集短片 —— Sam 和 Annie 一起看电影。假如没有 Linux,我们现在的荧屏是不是也和短片中的一样? ### + +在第 4 集剧情中,我们恶搞了一下电影 “阿凡达(Avatar)”。不管你喜欢还是讨厌,现实中的 “阿凡达(Avatar)” 在荧屏上的效果还是让人记忆深刻的。在没有 Linux 的世界中,电影的效果就变得非常丑陋,但是我们并不知道它有多难看,因为那已经是最好的了。但实际上,“阿凡达(Avatar)” 是使用 Linux 来进行效果制作的。Weta 数码使用了当时世界上最大的 Linux 集群来给电影做效果渲染和 3D 建模。据报道,指环王(Lord of the Rings)、神奇四侠(Fantastic Four)和金刚(King Kong)等电影都用到了 Linux。我希望该短片能引起人们关注,因为它所做的这方面的工作还并不广为人知。 + +### 很多人对短片的原始剧情进行了批判,其中就包括“没有 Linux 将没有因特网”的剧情的指责。你对此持什么样的看法? ### + +我们很喜欢人们在短片刚上映就进行激烈的辩论。该短片上映当天就超过了 100,000 的观众,这引起了人们对 Linux 在社会中扮演的角色以及对全世界的社区贡献者和维护者的关注。当然了,没有 Linux 的话,因特网也是会出现的,只是不会像当前我们所熟知的互联网那么成熟而已。每一个短片都对 Linux 在我们每天生活中扮演的角色进行了大胆且有趣的描述。我们希望,这些短片能够把关于 Linux 的故事推广到全世界的人的心里去。 + +### 为什么 Sam 和 Annie 的那只猫叫做 String? ### + +该短片系列中没有一处剧情是随意的。仔细的观看的话,你就会发现其中关于 Linux 和极客们的各种玩笑。小猫 String 是我们的 Linux.com 主编 Libby Clark 以弦理论(string theory)亲自来命名的。在物理学里,弦理论(string theory)是一个理论框架,它用一个叫做弦(String)的一维对象替换了粒子物理学中粒子状的粒子。弦理论(string theory)描述了这些弦(String)如何在空间传播以及相互影响。就像 Sam、Annie 和 String 在那个没有 Linux 的世界里的关系那样。 + +### 我们期待已久的下两集是什么样的,特别是,最后那集什么时候上映? ### + +在第 5 集短片中,我们将到太空并体验一下没有 Linux 的世界对太空探索的影响。这就像是一场疯狂的骑行。在短片的最后,我们最终还是会见到没有 Linux 的世界里的 Linus。贯穿整个短片系列,里边已经给出关于结局的线索,我在这就不能给太多提示了,因为还有好多人在找线索比赛中继续寻找着。并且我也不能给你们说出关于结局短片的上映日期。你们要自己跟进 #WorldWithoutLinux 主题帖来获取更多信息。 + +### 你可给一些关于第 4 集短片相关线索的提示吗? ### + +在该短片中有另外一个关于免费汉堡餐厅(Free Burger Restaurant)的线索。在那个没有 Linux 的世界里,Linux 最后还是以一种很隐秘的方式出现了,可以说,就像是以另一种语言来解读 Linux。当然,这只是为了好玩,String 也以另外一个模样出现。 + +### 那么,该系列短片达到你所想要的效果了吗? ### + +是的,达到了。我们很高兴看到人们分享并参与到这些故事中去。我们希望向那些可能不知道 Linux 的人传达更多关于 Linux 的故事并了解到 Linux 在当今世界中是无处不在的。全部的短片就是为了把这些关于 Linux 的真相推广给大家,并感谢那些全球性社区的开发者和公司对 Linux 的支持,Linux 使得一切成为可能。 + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/linux-foundation-explains-world-without-linux-and-open-so + +作者:[Christopher Tozzi][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://thevarguy.com/author/christopher-tozzi +[1]:http://linuxfoundation.org/ +[2]:http://www.linuxfoundation.org/world-without-linux +[3]:http://thevarguy.com/open-source-application-software-companies/new-linux-foundation-video-highlights-role-open-source-3d +[4]:http://thevarguy.com/open-source-application-software-companies/100715/would-internet-exist-without-linux-yes-without-open-sourc diff --git a/published/201512/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md b/published/201512/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md new file mode 100644 index 0000000000..32ce669b8c --- /dev/null +++ b/published/201512/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md @@ -0,0 +1,162 @@ +在 Debian Linux 上安装配置 ISC DHCP 服务器 +================================================================================ + +动态主机控制协议(Dynamic Host Control Protocol,DHCP)给网络管理员提供了一种便捷的方式,为不断变化的网络主机或是动态网络提供网络层地址。其中最常用的 DHCP 服务工具是 ISC DHCP Server。DHCP 服务的目的是给主机提供必要的网络信息以便能够和其他连接在网络中的主机互相通信。DHCP 服务提供的信息包括:DNS 服务器信息,网络地址(IP),子网掩码,默认网关信息,主机名等等。 + +本教程介绍运行在 Debian 7.7 上 4.2.4 版的 ISC-DHCP-Server 如何管理多个虚拟局域网(VLAN),也可以非常容易应用到单一网络上。 + +测试用的网络是通过思科路由器使用传统的方式来管理 DHCP 租约地址的。目前有 12 个 VLAN 需要通过集中式服务器来管理。把 DHCP 的任务转移到一个专用的服务器上,路由器可以收回相应的资源,把资源用到更重要的任务上,比如路由寻址,访问控制列表,流量监测以及网络地址转换等。 + +另一个将 DHCP 服务转移到专用服务器的好处,以后会讲到,它可以建立动态域名服务器(DDNS),这样当主机从服务器请求 DHCP 地址的时候,这样新主机的主机名就会被添加到 DNS 系统里面。 + +### 安装和配置 ISC DHCP 服务器### + +1、使用 apt 工具用来安装 Debian 软件仓库中的 ISC 软件,来创建这个多宿主服务器。与其他教程一样需要使用 root 或者 sudo 访问权限。请适当的修改,以便使用下面的命令。(LCTT 译注:下面中括号里面是注释,使用的时候请删除,#表示使用的 root 权限) + + # apt-get install isc-dhcp-server [安装 the ISC DHCP Server 软件] + # dpkg --get-selections isc-dhcp-server [确认软件已经成功安装] + # dpkg -s isc-dhcp-server [用另一种方式确认成功安装] + +![Install ISC DHCP Server in Debian](http://www.tecmint.com/wp-content/uploads/2015/04/Install-ISC-DHCP-Server.jpg) + +2、 确认服务软件已经安装完成,现在需要提供网络信息来配置服务器,这样服务器才能够根据我们的需要来分发网络信息。作为管理员最起码需要了解的 DHCP 信息如下: + +- 网络地址 +- 子网掩码 +- 动态分配的地址范围 + +其他一些服务器动态分配的有用信息包括: + +- 默认网关 +- DNS 服务器 IP 地址 +- 域名 +- 主机名 +- 网络广播地址 + +这只是能让 ISC DHCP 服务器处理的选项中非常少的一部分。如果你想查看所有选项及其描述需要在安装好软件后输入以下命令: + + # man dhcpd.conf + +3、 一旦管理员已经确定了这台服务器分发的所有必要信息,那么是时候配置服务器并且分配必要的地址池了。在配置任何地址池或服务器配置之前,必须配置 DHCP 服务器侦听这台服务器上面的一个接口。 + +在这台特定的服务器上,设置好网卡后,DHCP 会侦听名称名为`'bond0'`的接口。请适根据你的实际情况来更改服务器以及网络环境。下面的配置都是针对本教程的。 + +![Configure ISC DHCP Network](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ISC-DHCP-Network.jpg) + +这行指定的是 DHCP 服务侦听接口(一个或多个)上的 DHCP 流量。修改主配置文件,分配适合的 DHCP 地址池到所需要的网络上。主配置文件在 /etc/dhcp/dhcpd.conf。用文本编辑器打开这个文件 + + # nano /etc/dhcp/dhcpd.conf + +这个配置文件可以配置我们所需要的地址池/主机。文件顶部有 ‘ddns-update-style‘ 这样一句,在本教程中它设置为 ‘none‘。在以后的教程中会讲到动态 DNS,ISC-DHCP-Server 将会与 BIND9 集成,它能够使主机名更新指向到 IP 地址。 + +4、 接下来的部分是管理员配置全局网络设置,如 DNS 域名,默认的租约时间,IP地址,子网的掩码,以及其它。如果你想了解所有的选项,请阅读 man 手册中的 dhcpd.conf 文件,命令如下: + + # man dhcpd.conf + +对于这台服务器,我们需要在配置文件顶部配置一些全局网络设置,这样就不用到每个地址池中去单独设置了。 + +![Configure ISC DDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ISC-DDNS.png) + +我们花一点时间来解释一下这些选项,在本教程中虽然它们是一些全局设置,但是也可以单独的为某一个地址池进行配置。 + +- option domain-name “comptech.local”; – 所有使用这台 DHCP 服务器的主机,都将成为 DNS 域 “comptech.local” 的一员 + +- option domain-name-servers 172.27.10.6; DHCP 向所有配置这台 DHCP 服务器的的网络主机分发 DNS 服务器地址为 172.27.10.6 + +- option subnet-mask 255.255.255.0; – 每个网络设备都分配子网掩码 255.255.255.0 或 /24 + +- default-lease-time 3600; – 默认有效的地址租约时间(单位是秒)。如果租约时间耗尽,那么主机可以重新申请租约。如果租约完成,那么相应的地址也将被尽快回收。 + +- max-lease-time 86400; – 这是一台主机所能租用的最大的租约时间(单位为秒)。 + +- ping-check true; – 这是一个额外的测试,以确保服务器分发出的网络地址不是当前网络中另一台主机已使用的网络地址。 + +- ping-timeout; – 在判断地址以前没有使用过前,服务器将等待 ping 响应多少秒。 + +- ignore client-updates; 现在这个选项是可以忽略的,因为 DDNS 在前面已在配置文件中已经被禁用,但是当 DDNS 运行时,这个选项会忽略主机更新其 DNS 主机名的请求。 + +5、 文件中下面一行是权威 DHCP 所在行。这行的意义是如果服务器是为文件中所配置的网络分发地址的服务器,那么取消对该权威关键字(authoritative stanza) 的注释。 + +通过去掉关键字 authoritative 前面的 ‘#’,取消注释全局权威关键字。这台服务器将是它所管理网络里面的唯一权威。 + +![Enable ISC Authoritative](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-authoritative.png) + +默认情况下服务器被假定为**不是**网络上的权威服务器。之所以这样做是出于安全考虑。如果有人因为不了解 DHCP 服务的配置,导致配置不当或配置到一个不该出现的网络里面,这都将带来非常严重的连接问题。这行还可用在每个网络中单独配置使用。也就是说如果这台服务器不是整个网络的 DHCP 服务器,authoritative 行可以用在每个单独的网络中,而不是像上面截图中那样的全局配置。 + +6、 这一步是配置服务器将要管理的所有 DHCP 地址池/网络。简短起见,本教程只讲到配置的地址池之一。作为管理员需要收集一些必要的网络信息(比如域名,网络地址,有多少地址能够被分发等等) + +以下这个地址池所用到的信息都是管理员收集整理的:网络 ID 172.27.60.0, 子网掩码 255.255.255.0 或 /24, 默认子网网关 172.27.60.1,广播地址 172.27.60.255.0 。 + +以上这些信息对于构建 dhcpd.conf 文件中新网络非常重要。使用文本编辑器修改配置文件添加新网络进去,这里我们需要使用 root 或 sudo 访问权限。 + + # nano /etc/dhcp/dhcpd.conf + +![Configure DHCP Pools and Networks](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-network.png) + +当前这个例子是给用 VMWare 创建的虚拟服务器分配 IP 地址。第一行显示是该网络的子网掩码。括号里面的内容是 DHCP 服务器应该提供给网络上面主机的所有选项。 + +第一行, range 172.27.60.50 172.27.60.254; 这一行显示的是,DHCP 服务在这个网络上能够给主机动态分发的地址范围。 + +第二行,option routers 172.27.60.1; 这里显示的是给网络里面所有的主机分发的默认网关地址。 + +最后一行, option broadcast-address 172.27.60.255; 显示当前网络的广播地址。这个地址不能被包含在要分发放的地址范围内,因为广播地址不能分配到一个主机上面。 + +必须要强调的是每行的结尾必须要用(;)来结束,所有创建的网络必须要在 {} 里面。 + +7、 如果要创建多个网络,继续创建完它们的相应选项后保存文本文件即可。配置完成以后如果有更改,ISC-DHCP-Server 进程需要重启来使新的更改生效。重启进程可以通过下面的命令来完成: + + # service isc-dhcp-server restart + +这条命令将重启 DHCP 服务,管理员能够使用几种不同的方式来检查服务器是否已经可以处理 dhcp 请求。最简单的方法是通过 [lsof 命令][1]来查看服务器是否在侦听67端口,命令如下: + + # lsof -i :67 + +![Check DHCP Listening Port](http://www.tecmint.com/wp-content/uploads/2015/04/lsof.png) + +这里输出的结果表明 dhcpd(DHCP 服务守护进程)正在运行并且侦听67端口。由于在 /etc/services 文件中67端口的映射,所以输出中的67端口实际上被转换成了 “bootps”。 + +在大多数的系统中这是非常常见的,现在服务器应该已经为网络连接做好准备,我们可以将一台主机接入网络请求DHCP地址来验证服务是否正常。 + +### 测试客户端连接 ### + +8、 现在许多系统使用网络管理器来维护网络连接状态,因此这个设备应该预先配置好的,只要对应的接口处于活跃状态就能够获取 DHCP。 + +然而当一台设备无法使用网络管理器时,它可能需要手动获取 DHCP 地址。下面的几步将演示怎样手动获取以及如何查看服务器是否已经按需要分发地址。 + +‘[ifconfig][2]‘工具能够用来检查接口的配置。这台被用来测试的 DHCP 服务器的设备,它只有一个网络适配器(网卡),这块网卡被命名为 ‘eth0‘。 + + # ifconfig eth0 + +![Check Network Interface IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/No-ip.png) + +从输出结果上看,这台设备目前没有 IPv4 地址,这样很便于测试。我们把这台设备连接到 DHCP 服务器并发出一个请求。这台设备上已经安装了一个名为 ‘dhclient‘ 的DHCP客户端工具。因为操作系统各不相同,所以这个客户端软件也是互不一样的。 + + # dhclient eth0 + +![Request IP Address from DHCP](http://www.tecmint.com/wp-content/uploads/2015/04/IP.png) + +当前 `'inet addr:'` 字段中显示了属于 172.27.60.0 网络地址范围内的 IPv4 地址。值得欣慰的是当前网络还配置了正确的子网掩码并且分发了广播地址。 + +到这里看起来还都不错,让我们来测试一下,看看这台设备收到新 IP 地址是不是由服务器发出的。这里我们参照服务器的日志文件来完成这个任务。虽然这个日志的内容有几十万条,但是里面只有几条是用来确定服务器是否正常工作的。这里我们使用一个工具 ‘tail’,它只显示日志文件的最后几行,这样我们就可以不用拿一个文本编辑器去查看所有的日志文件了。命令如下: + + # tail /var/log/syslog + +![Check DHCP Logs](http://www.tecmint.com/wp-content/uploads/2015/04/DHCP-Log.png) + +OK!服务器记录表明它分发了一个地址给这台主机 (HRTDEBXENSRV)。服务器按预期运行,给它充当权威服务器的网络分发了适合的网络地址。至此 DHCP 服务器搭建成功并且运行。如果有需要你可以继续配置其他的网络,排查故障,确保安全。 + +在以后的Debian教程中我会讲一些新的 ISC-DHCP-Server 功能。有时间的话我将写一篇关于 Bind9 和 DDNS 的教程,融入到这篇文章里面。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-and-configure-multihomed-isc-dhcp-server-on-debian-linux/ + +作者:[Rob Turner][a] +译者:[ivo-wang](https://github.com/ivo-wang) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/robturner/ +[1]:http://www.tecmint.com/10-lsof-command-examples-in-linux/ +[2]:http://www.tecmint.com/ifconfig-command-examples/ diff --git a/published/20150806 Installation Guide for Puppet on Ubuntu 15.04.md b/published/201512/20150806 Installation Guide for Puppet on Ubuntu 15.04.md similarity index 100% rename from published/20150806 Installation Guide for Puppet on Ubuntu 15.04.md rename to published/201512/20150806 Installation Guide for Puppet on Ubuntu 15.04.md diff --git a/published/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md b/published/201512/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md similarity index 100% rename from published/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md rename to published/201512/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md diff --git a/published/20150831 Linux workstation security checklist.md b/published/201512/20150831 Linux workstation security checklist.md similarity index 100% rename from published/20150831 Linux workstation security checklist.md rename to published/201512/20150831 Linux workstation security checklist.md diff --git a/published/20150917 A Repository with 44 Years of Unix Evolution.md b/published/201512/20150917 A Repository with 44 Years of Unix Evolution.md similarity index 100% rename from published/20150917 A Repository with 44 Years of Unix Evolution.md rename to published/201512/20150917 A Repository with 44 Years of Unix Evolution.md diff --git a/published/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md b/published/201512/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md similarity index 100% rename from published/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md rename to published/201512/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md diff --git a/published/20151020 how to h2 in apache.md b/published/201512/20151020 how to h2 in apache.md similarity index 100% rename from published/20151020 how to h2 in apache.md rename to published/201512/20151020 how to h2 in apache.md diff --git a/published/20151022 9 Tips for Improving WordPress Performance.md b/published/201512/20151022 9 Tips for Improving WordPress Performance.md similarity index 100% rename from published/20151022 9 Tips for Improving WordPress Performance.md rename to published/201512/20151022 9 Tips for Improving WordPress Performance.md diff --git a/published/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md b/published/201512/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md similarity index 100% rename from published/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md rename to published/201512/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md diff --git a/published/20151104 How to Install Redis Server on CentOS 7.md b/published/201512/20151104 How to Install Redis Server on CentOS 7.md similarity index 100% rename from published/20151104 How to Install Redis Server on CentOS 7.md rename to published/201512/20151104 How to Install Redis Server on CentOS 7.md diff --git a/published/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md b/published/201512/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md similarity index 100% rename from published/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md rename to published/201512/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md diff --git a/published/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md b/published/201512/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md similarity index 100% rename from published/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md rename to published/201512/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md diff --git a/published/20151109 How to Set Up AWStats On Ubuntu Server.md b/published/201512/20151109 How to Set Up AWStats On Ubuntu Server.md similarity index 100% rename from published/20151109 How to Set Up AWStats On Ubuntu Server.md rename to published/201512/20151109 How to Set Up AWStats On Ubuntu Server.md diff --git a/published/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md b/published/201512/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md similarity index 100% rename from published/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md rename to published/201512/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md diff --git a/published/201512/20151123 7 ways hackers can use Wi-Fi against you.md b/published/201512/20151123 7 ways hackers can use Wi-Fi against you.md new file mode 100644 index 0000000000..d8794383c7 --- /dev/null +++ b/published/201512/20151123 7 ways hackers can use Wi-Fi against you.md @@ -0,0 +1,71 @@ +黑客利用 Wi-Fi 攻击你的七种方法 +================================================================================ +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/intro_title-100626673-orig.jpg) + +### 黑客利用 Wi-Fi 侵犯你隐私的七种方法 ### + +Wi-Fi — 啊,你是如此的方便,却又如此的危险! + +这里给大家介绍一下通过Wi-Fi连接“慷慨捐赠”你的身份信息的七种方法和反制措施。 + +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/1_free-hotspots-100626674-orig.jpg) + +### 利用免费热点 ### + +它们似乎无处不在,而且它们的数量会在[接下来四年里增加三倍][1]。但是它们当中很多都是不值得信任的,从你的登录凭证、email 甚至更加敏感的账户,都能被黑客用“嗅探器(sniffers)”软件截获 — 这种软件能截获到任何你通过该连接提交的信息。防止被黑客盯上的最好办法就是使用VPN(虚拟私有网virtual private network),它加密了你所输入的信息,因此能够保护你的数据隐私。 + +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/2_online-banking-100626675-orig.jpg) + +### 网上银行 ### + +你可能认为没有人需要被提醒不要使用免费 Wi-Fi 来操作网上银行, 但网络安全厂商卡巴斯基实验室表示**[全球超过100家银行因为网络黑客而损失9亿美元][2]**,由此可见还是有很多人因此受害。如果你确信一家咖啡店的免费 Wi-Fi 是正规的,想要连接它,那么你应该向服务员确认网络名称。[其他人在店里用路由器设置一个开放的无线连接][3],并将它的网络名称设置成店名是一件相当简单的事。 + +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/3_keeping-wifi-on-100626676-orig.jpg) + +### 始终开着 Wi-Fi 开关 ### + +如果你手机的 Wi-Fi 开关一直开着的,你会自动被连接到一个不安全的网络中去,你甚至都没有意识到。你可以利用你手机中[基于位置的 Wi-Fi 功能][4],如果有这种功能的话,那它会在你离开你所保存的网络范围后自动关闭你的 Wi-Fi 开关并在你回去之后再次开启。 + +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/4_not-using-firewall-100626677-orig.jpg) + +### 不使用防火墙 ### + +防火墙是你的第一道抵御恶意入侵的防线,它能有效地让你的电脑网络保持通畅并阻挡黑客和恶意软件。你应该时刻开启它除非你的杀毒软件有它自己的防火墙。 + +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/5_browsing-unencrypted-sites-100626678-orig.jpg) + +### 浏览非加密网页 ### + +说起来很难过,**[世界上排名前100万个网站中55%是不加密的][5]**,一个未加密的网站会让一切传输数据暴露在黑客的眼中。如果一个网页是安全的,你的浏览器则会有标明(比如说火狐浏览器是一把灰色的挂锁,Chrome 浏览器则是个绿锁图标)。但是即使是安全的网站不能让你免于被劫持的风险,他们能通过公共网络从你访问过的网站上窃取 cookies,无论是不是正规网站。 + +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/6_updating-security-software-100626679-orig.jpg) + +### 不更新你的安全防护软件 ### + +如果你想要确保你自己的网络是受保护的,就更新路由器固件。你要做的就是进入你的路由器管理页面去检查,通常你能在厂商的官方网页上下载到最新的固件版本。 + +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/7_securing-home-wifi-100626680-orig.jpg) + +### 不保护你的家用 Wi-Fi ### + +不用说,设置一个复杂的密码和更改无线连接的默认名都是非常重要的。你还可以过滤你的 MAC 地址来让你的路由器只识别那些确认过的设备。 + +本文作者 **Josh Althuser** 是一个开源支持者、网络架构师和科技企业家。在过去12年里,他花了很多时间去倡导使用开源软件来管理团队和项目,同时为网络应用程序提供企业级咨询并帮助它们把产品推向市场。你可以通过[他的推特][6]联系他。 + +-------------------------------------------------------------------------------- + +via: http://www.networkworld.com/article/3003170/mobile-security/7-ways-hackers-can-use-wi-fi-against-you.html + +作者:[Josh Althuser][a] +译者:[ZTinoZ](https://github.com/ZTinoZ) +校对:[Caroline](https://github.com/carolinewuyan) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://twitter.com/JoshAlthuser +[1]:http://www.pcworld.com/article/243464/number_of_wifi_hotspots_to_quadruple_by_2015_says_study.html +[2]:http://www.nytimes.com/2015/02/15/world/bank-hackers-steal-millions-via-malware.html?hp&action=click&pgtype=Homepage&module=first-column-region%C2%AEion=top-news&WT.nav=top-news&_r=3 +[3]:http://news.yahoo.com/blogs/upgrade-your-life/banking-online-not-hacked-182159934.html +[4]:http://pocketnow.com/2014/10/15/should-you-leave-your-smartphones-wifi-on-or-turn-it-off +[5]:http://www.cnet.com/news/chrome-becoming-tool-in-googles-push-for-encrypted-web/ +[6]:https://twitter.com/JoshAlthuser diff --git a/translated/tech/20151123 How to access Dropbox from the command line in Linux.md b/published/201512/20151123 How to access Dropbox from the command line in Linux.md similarity index 81% rename from translated/tech/20151123 How to access Dropbox from the command line in Linux.md rename to published/201512/20151123 How to access Dropbox from the command line in Linux.md index 6c5f73e596..3c452ac4f6 100644 --- a/translated/tech/20151123 How to access Dropbox from the command line in Linux.md +++ b/published/201512/20151123 How to access Dropbox from the command line in Linux.md @@ -1,8 +1,8 @@ -Linux 中如何从命令行访问 Dropbox +Linux 中如何通过命令行访问 Dropbox ================================================================================ -在当今这个多设备的环境下,云存储无处不在。无论身处何方,人们都想通过多种设备来从云存储中获取所需的内容。由于优雅的 UI 和完美的跨平台兼容性,Dropbox 已成为最为广泛使用的云存储服务。 Dropbox 的流行已引发了一系列官方或非官方 Dropbox 客户端的出现,它们支持不同的操作系统平台。 +在当今这个多设备的环境下,云存储无处不在。无论身处何方,人们都想通过多种设备来从云存储中获取所需的内容。由于拥有漂亮的 UI 和完美的跨平台兼容性,Dropbox 已成为最为广泛使用的云存储服务。 Dropbox 的流行已引发了一系列官方或非官方 Dropbox 客户端的出现,它们支持不同的操作系统平台。 -当然 Linux 平台下也有着自己的 Dropbox 客户端: 既有命令行的,也有图形界面。[Dropbox Uploader][1] 是一个简单易用的 Dropbox 命令行客户端,它是用 BASH 脚本语言所编写的。在这篇教程中,我将描述 **在 Linux 中如何使用 Dropbox Uploader 通过命令行来访问 Dropbox**。 +当然 Linux 平台下也有着自己的 Dropbox 客户端: 既有命令行的,也有图形界面客户端。[Dropbox Uploader][1] 是一个简单易用的 Dropbox 命令行客户端,它是用 Bash 脚本语言所编写的(LCTT 译注:对,你没看错, 就是 Bash)。在这篇教程中,我将描述 **在 Linux 中如何使用 Dropbox Uploader 通过命令行来访问 Dropbox**。 ### Linux 中安装和配置 Dropbox Uploader ### @@ -13,7 +13,7 @@ Linux 中如何从命令行访问 Dropbox 请确保你已经在系统中安装了 `curl`,因为 Dropbox Uploader 通过 curl 来运行 Dropbox 的 API。 -要配置 Dropbox Uploader,只需运行 dropbox_uploader.sh 即可。当你第一次运行这个脚本时,它将询问你,以使得它可以访问你的 Dropbox 账户。 +要配置 Dropbox Uploader,只需运行 dropbox_uploader.sh 即可。当你第一次运行这个脚本时,它将请求得到授权以使得脚本可以访问你的 Dropbox 账户。 $ ./dropbox_uploader.sh @@ -88,7 +88,7 @@ via: http://xmodulo.com/access-dropbox-command-line-linux.html 作者:[Dan Nanni][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md b/published/201512/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md similarity index 79% rename from translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md rename to published/201512/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md index 11d2e9b5b4..c851ce0da2 100644 --- a/translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md +++ b/published/201512/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md @@ -1,19 +1,17 @@ 如何在 Ubuntu 15.04 / CentOS 7 上安装 Android Studio ================================================================================ -随着最近几年智能手机的进步,安卓成为了最大的手机平台之一,也有很多免费的用于开发安卓应用的工具。Android Studio 是基于 [IntelliJ IDEA][1] 用于开发安卓应用的集成开发环境。它是 Google 2014 年发布的免费开源软件,继 Eclipse 之后成为主要的 IDE。 +随着最近几年智能手机的进步,安卓成为了最大的手机平台之一,在开发安卓应用中所用到的所有工具也都可以免费得到。Android Studio 是基于 [IntelliJ IDEA][1] 用于开发安卓应用的集成开发环境(IDE)。它是 Google 2014 年发布的免费开源软件,继 Eclipse 之后成为主要的 IDE。 在这篇文章,我们一起来学习如何在 Ubuntu 15.04 和 CentOS 7 上安装 Android Studio。 ### 在 Ubuntu 15.04 上安装 ### -我们可以用两种方式安装 Android Studio。第一种是配置必须的库然后再安装它;另一种是从 Android 官方网站下载然后再本地编译安装。在下面的例子中,我们会使用命令行设置库并安装它。在继续下一步之前,我们需要确保我们已经安装了 JDK 1.6 或者更新版本。 +我们可以用两种方式安装 Android Studio。第一种是配置所需的库然后再安装它;另一种是从 Android 官方网站下载然后在本地编译安装。在下面的例子中,我们会使用命令行设置库并安装它。在继续下一步之前,我们需要确保我们已经安装了 JDK 1.6 或者更新版本。 这里,我打算安装 JDK 1.8。 $ sudo add-apt-repository ppa:webupd8team/java - $ sudo apt-get update - $ sudo apt-get install oracle-java8-installer oracle-java8-set-default 验证 java 是否安装成功: @@ -27,12 +25,11 @@ ![Android-Studio-repo](http://blog.linoxide.com/wp-content/uploads/2015/11/Android-studio-repo.png) $ sudo apt-get update - $ sudo apt-get install android-studio 上面的安装命令会在 /opt 目录下面安装 Android Studio。 -现在,运行下面的命令启动安装窗口: +现在,运行下面的命令启动安装向导: $ /opt/android-studio/bin/studio.sh @@ -48,7 +45,7 @@ ![下载组件](http://blog.linoxide.com/wp-content/uploads/2015/11/Download.png) -这一步之后就完成了 Android Studio 的安装。当你重启 Android Studio 时,你会看到下面的欢迎界面,从这里你可以开始用 Android Studio 工作了。 +这一步完成之后就结束了 Android Studio 的安装。当你重启 Android Studio 时,你会看到下面的欢迎界面,从这里你可以开始用 Android Studio 工作了。 ![欢迎界面](http://blog.linoxide.com/wp-content/uploads/2015/11/Welcome-screen.png) @@ -85,21 +82,14 @@ 如果你安装 Android Studio 的时候看到任何类似 “unable-to-run-mksdcard-sdk-tool:” 的错误信息,你可能要在 CentOS 7 64 位系统中安装以下软件包: - glibc.i686 - - glibc-devel.i686 - - libstdc++.i686 - - zlib-devel.i686 - - ncurses-devel.i686 - - libX11-devel.i686 - - libXrender.i686 - - libXrandr.i686 + - glibc.i686 + - glibc-devel.i686 + - libstdc++.i686 + - zlib-devel.i686 + - ncurses-devel.i686 + - libX11-devel.i686 + - libXrender.i686 + - libXrandr.i686 通过从 [Android 网站][3] 下载 IDE 文件然后解压安装 studio 也是一样的。 @@ -121,7 +111,7 @@ ### 总结 ### -虽然发布不到一年,但是 Android Studio 已经替代 Eclipse 成为了安装开发最主要的 IDE。它是唯一一个能支持之后 Google 提供的 Android SDKs 和其它 Android 特性的官方 IDE 工具。那么,你还在等什么呢?赶快安装 Android Studio 然后体验开发安装应用的乐趣吧。 +虽然发布不到一年,但是 Android Studio 已经替代 Eclipse 成为了 Android 的开发最主要的 IDE。它是唯一能支持 Google 之后将要提供的 Android SDK 和其它 Android 特性的官方 IDE 工具。那么,你还在等什么呢?赶快安装 Android Studio 来体验开发 Android 应用的乐趣吧。 -------------------------------------------------------------------------------- @@ -129,11 +119,11 @@ via: http://linoxide.com/tools/install-android-studio-ubuntu-15-04-centos-7/ 作者:[B N Poornima][a] 译者:[ictlyh](http://mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/bnpoornima/ [1]:https://www.jetbrains.com/idea/ [2]:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html -[3]:http://developer.android.com/sdk/index.html \ No newline at end of file +[3]:http://developer.android.com/sdk/index.html diff --git a/published/20151123 LNAV--Ncurses based log file viewer.md b/published/201512/20151123 LNAV--Ncurses based log file viewer.md similarity index 100% rename from published/20151123 LNAV--Ncurses based log file viewer.md rename to published/201512/20151123 LNAV--Ncurses based log file viewer.md diff --git a/published/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md b/published/201512/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md similarity index 100% rename from published/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md rename to published/201512/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md diff --git a/published/20151125 The tar command explained.md b/published/201512/20151125 The tar command explained.md similarity index 100% rename from published/20151125 The tar command explained.md rename to published/201512/20151125 The tar command explained.md diff --git a/published/201512/20151130 eSpeak--Text To Speech Tool For Linux.md b/published/201512/20151130 eSpeak--Text To Speech Tool For Linux.md new file mode 100644 index 0000000000..e968be847b --- /dev/null +++ b/published/201512/20151130 eSpeak--Text To Speech Tool For Linux.md @@ -0,0 +1,64 @@ +eSpeak: Linux 文本转语音工具 +================================================================================ +![Text to speech tool in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Text-to-speech-Linux.jpg) + +[eSpeak][1]是一款 Linux 命令行工具,能把文本转换成语音。它是一款简洁的语音合成器,用C语言编写而成,它支持英语和其它多种语言。 + +eSpeak 从标准输入或者输入文件中读取文本。虽然语音输出与真人声音相去甚远,但是,在你项目需要的时候,eSpeak 仍不失为一个简便快捷的工具。 + +eSpeak 部分主要特性如下: + +- 提供给 Linux 和 Windows 的命令行工具 +- 从文件或者标准输入中把文本读出来 +- 提供给其它程序使用的共享库版本 +- 为 Windows 提供 SAPI5 版本,所以它能用于 screen-readers 或者其它支持 Windows SAPI5 接口的程序 +- 可移植到其它平台,包括安卓,OSX等 +- 提供多种声音特性选择 +- 语音输出可保存为 [.WAV][2] 格式的文件 +- 配合 HTML 部分可支持 SSML(语音合成标记语言,[Speech Synthesis Markup Language][3]) +- 体积小巧,整个程序连同语言支持等占用小于2MB +- 可以实现文本到音素编码(phoneme code)的转化,因此可以作为其它语音合成引擎的前端工具 +- 开发工具可用于生产和调整音素数据 + +### 安装 eSpeak ### + +基于 Ubuntu 的系统中,在终端运行以下命令安装 eSpeak: + + sudo apt-get install espeak + +eSpeak 是一个古老的工具,我推测它应该能在其它众多 Linux 发行版中运行,比如 Arch,Fedora。使用 dnf,pacman 等命令就能轻松安装。 + +eSpeak 用法如下:输入 espeak 运行程序。输入字符按 enter 转换为语音输出(LCTT 译注:补充)。使用 Ctrl+C 来关闭运行中的程序。 + +![eSpeak command line](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-example.png) + +还有一些其他的选项可用,可以通过程序帮助进行查看。 + +### GUI 版本:Gespeaker ### + +如果你更倾向于使用 GUI 版本,可以安装 Gespeaker,它为 eSpeak 提供了 GTK 界面。 + +使用以下命令来安装 Gespeaker: + + sudo apt-get install gespeaker + +操作界面简明易用,你完全可以自行探索。 + +![eSpeak GUI tool for text to speech in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-GUI.png) + +虽然这些工具在大多数计算任务下用不到,但是当你的项目需要把文本转换成语音时,使用 espeak 还是挺方便的。是否使用 espeak 这款语音合成器,选择权就交给你们啦。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/espeak-text-speech-linux/ + +作者:[Abhishek][a] +译者:[soooogreen](https://github.com/soooogreen) +校对:[Caroline](https://github.com/carolinewuyan) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://espeak.sourceforge.net/ +[2]:http://en.wikipedia.org/wiki/WAV +[3]:http://en.wikipedia.org/wiki/Speech_Synthesis_Markup_Language diff --git a/published/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md b/published/201512/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md similarity index 100% rename from published/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md rename to published/201512/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md diff --git a/published/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md b/published/201512/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md similarity index 100% rename from published/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md rename to published/201512/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md diff --git a/published/20151202 How to use the Linux ftp command to up- and download files on the shell.md b/published/201512/20151202 How to use the Linux ftp command to up- and download files on the shell.md similarity index 100% rename from published/20151202 How to use the Linux ftp command to up- and download files on the shell.md rename to published/201512/20151202 How to use the Linux ftp command to up- and download files on the shell.md diff --git a/published/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md b/published/201512/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md similarity index 100% rename from published/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md rename to published/201512/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md diff --git a/published/20151208 Apple Swift Programming Language Comes To Linux.md b/published/201512/20151208 Apple Swift Programming Language Comes To Linux.md similarity index 100% rename from published/20151208 Apple Swift Programming Language Comes To Linux.md rename to published/201512/20151208 Apple Swift Programming Language Comes To Linux.md diff --git a/published/20151208 How to Customize Time and Date Format in Ubuntu Panel.md b/published/201512/20151208 How to Customize Time and Date Format in Ubuntu Panel.md similarity index 100% rename from published/20151208 How to Customize Time and Date Format in Ubuntu Panel.md rename to published/201512/20151208 How to Customize Time and Date Format in Ubuntu Panel.md diff --git a/published/20151208 Install Wetty on Centos or RHEL 6.X.md b/published/201512/20151208 Install Wetty on Centos or RHEL 6.X.md similarity index 100% rename from published/20151208 Install Wetty on Centos or RHEL 6.X.md rename to published/201512/20151208 Install Wetty on Centos or RHEL 6.X.md diff --git a/published/20151215 How to enable Software Collections (SCL) on CentOS.md b/published/201512/20151215 How to enable Software Collections (SCL) on CentOS.md similarity index 100% rename from published/20151215 How to enable Software Collections (SCL) on CentOS.md rename to published/201512/20151215 How to enable Software Collections (SCL) on CentOS.md diff --git a/translated/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md b/published/201512/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md similarity index 54% rename from translated/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md rename to published/201512/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md index c47ff21da0..29b9b1a77f 100644 --- a/translated/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md +++ b/published/201512/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md @@ -1,16 +1,17 @@ -Linux/Unix桌面趣事:让桌面下雪 +Linux/Unix 桌面趣事:让桌面下雪 ================================================================================ -在这个节日里感到孤独么?试一下Xsnow吧。它是一个可以在Unix/Linux桌面下下雪的app。圣诞老人和他的驯鹿会在屏幕中奔跑,伴随着雪片让你感受到节日的感觉。 -我第一次是再13、4年前安装的它。它最初是在1984年Macintosh系统中创造的。你可以用下面的方法来安装: +在这个节日里感到孤独么?试一下 Xsnow 吧。它是一个可以在 Unix/Linux 桌面下下雪的应用。圣诞老人和他的驯鹿会在屏幕中奔跑,伴随着雪片让你感受到节日的感觉。 + +我第一次安装它还是在 13、4 年前。它最初是在 1984 年 Macintosh 系统中创造的。你可以用下面的方法来安装: ### 安装 xsnow ### -Debian/Ubuntu/Mint用户用下面的命令: +Debian/Ubuntu/Mint 用户用下面的命令: $ sudo apt-get install xsnow -Freebsd用户输入下面的命令: +Freebsd 用户输入下面的命令: # cd /usr/ports/x11/xsnow/ # make install clean @@ -21,13 +22,13 @@ Freebsd用户输入下面的命令: #### 其他发行版的方法 #### -1. Fedora/RHEL/CentOS在[rpmfusion][1]仓库中找找。 -2. Gentoo用户试下Gentoo portage也就是[emerge -p xsnow][2] -3. Opensuse用户使用yast搜索xsnow +1. Fedora/RHEL/CentOS 在 [rpmfusion][1] 仓库中找找。 +2. Gentoo 用户试下 Gentoo portage,也就是[emerge -p xsnow][2] +3. Opensuse 用户使用 yast 搜索 xsnow -### 我该如何使用xsnow? ### +### 我该如何使用 xsnow? ### -打开终端(程序 > 附件 > 终端),输入下面的额命令启动xsnow: +打开终端(程序 > 附件 > 终端),输入下面的额命令启动 xsnow: $ xsnow @@ -35,13 +36,13 @@ Freebsd用户输入下面的命令: ![Fig.01: Snow for your Linux and Unix desktop systems](http://files.cyberciti.biz/uploads/tips/2011/12/application-to-bring-snow-to-desktop_small.png) -图01: 在Linux和Unix桌面中显示雪花 +*图01: 在 Linux 和 Unix 桌面中显示雪花* -你可以设置背景位蓝色,并让它下白雪,输入: +你可以设置背景为蓝色,并让它下白雪,输入: $ xsnow -bg blue -sc snow -设置最大的雪片数量,并让它尽可能快地运行,输入: +设置最大的雪片数量,并让它尽可能快地掉下,输入: $ xsnow -snowflakes 10000 -delay 0 @@ -49,14 +50,14 @@ Freebsd用户输入下面的命令: $ xsnow -notrees -nosanta -关于xsnow更多的信息和选项,在命令行下输入man xsnow查看手册: +关于 xsnow 更多的信息和选项,在命令行下输入 man xsnow 查看手册: $ man xsnow 建议阅读 - 官网[下载 Xsnow][1] -- 注意[MS-Windows][2]和[Mac OS X version][3]有一次性的共享软件费用。 +- 注意 [MS-Windows][2] 和 [Mac OS X][3] 版本有一次性的共享软件费用。 -------------------------------------------------------------------------------- @@ -64,7 +65,7 @@ via: http://www.cyberciti.biz/tips/linux-unix-xsnow.html 作者:Vivek Gite 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md b/published/201512/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md similarity index 53% rename from translated/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md rename to published/201512/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md index d97f0f3c68..45a56d6ddc 100644 --- a/translated/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md +++ b/published/201512/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md @@ -1,30 +1,31 @@ Linux/Unix 桌面趣事:蒸汽火车 ================================================================================ -一个[最常见的错误][1]是把ls输入成了sl。我已经设置了[一个alias][2],也就是alias sl=ls。但是你也许就错过了带汽笛的蒸汽小火车了。 +一个你[经常犯的错误][1]是把 ls 输入成了 sl。我已经设置了[一个别名][2],也就是 `alias sl=ls`。但是这样你也许就错过了这辆带汽笛的蒸汽小火车了。 -sl是一个玩笑软件或是一个Unix游戏。它会在你错误地把“ls”输入成“sl”(Steam Locomotive)后出现一辆蒸汽火车穿过你的屏幕。 +sl 是一个搞笑软件或,也是一个 Unix 游戏。它会在你错误地把“ls”输入成“sl”(Steam Locomotive)后出现一辆蒸汽火车穿过你的屏幕。 ### 安装 sl ### -在Debian/Ubuntu下输入下面的命令: +在 Debian/Ubuntu 下输入下面的命令: # apt-get install sl -它同样也在Freebsd和其他类Unix的操作系统上存在。下面把ls输错成sl: +它同样也在 Freebsd 和其他类Unix的操作系统上存在。 + +下面,让我们把 ls 输错成 sl: $ sl ![Fig.01: Run steam locomotive across the screen if you type "sl" instead of "ls"](http://files.cyberciti.biz/uploads/tips/2011/05/sl_command_steam_locomotive.png) -图01: 如果你把“ls”输入成“sl”蒸汽火车会穿过你的屏幕。 +*图01: 如果你把 “ls” 输入成 “sl” ,蒸汽火车会穿过你的屏幕。* -It also supports the following options: 它同样支持下面的选项: -- **-a** : 似乎发生了意外。你会哭喊求助的人们感到难过。 +- **-a** : 似乎发生了意外。你会为那些哭喊求助的人们感到难过。 - **-l** : 显示小一点的火车 -- **-F** : 它飞走 -- **-e** : 允许被Ctrl+C终端 +- **-F** : 它居然飞走了 +- **-e** : 允许被 Ctrl+C 中断 -------------------------------------------------------------------------------- @@ -32,7 +33,7 @@ via: http://www.cyberciti.biz/tips/displays-animations-when-accidentally-you-typ 作者:Vivek Gite 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md b/published/201512/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md similarity index 68% rename from translated/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md rename to published/201512/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md index ed26f49783..e24c2f381e 100644 --- a/translated/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md +++ b/published/201512/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md @@ -1,11 +1,11 @@ -Linux/Unix桌面趣事:终端ASCII水族箱 +Linux/Unix 桌面趣事:终端 ASCII 水族箱 ================================================================================ -你可以在你的终端中使用ASCIIQuarium安全地欣赏海洋的神秘了。它是一个用perl写的ASCII艺术水族箱/海洋动画。 + +你可以在你的终端中使用 ASCIIQuarium 安全地欣赏海洋的神秘了。它是一个用 perl 写的 ASCII 艺术水族箱/海洋动画。 ### 安装 Term::Animation ### - -首先你需要安装名为Term-Animation的perl模块。打开终端(选择程序 > 附件 > 终端),并输入: +首先你需要安装名为 Term-Animation 的perl模块。打开终端(选择程序 > 附件 > 终端),并输入: $ sudo apt-get install libcurses-perl $ cd /tmp @@ -15,9 +15,9 @@ Linux/Unix桌面趣事:终端ASCII水族箱 $ perl Makefile.PL && make && make test $ sudo make install -### 下载安装ASCIIQuarium ### +### 下载安装 ASCIIQuarium ### -接着再终端中输入: +接着在终端中输入: $ cd /tmp $ wget http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz @@ -26,7 +26,7 @@ Linux/Unix桌面趣事:终端ASCII水族箱 $ sudo cp asciiquarium /usr/local/bin $ sudo chmod 0755 /usr/local/bin/asciiquarium -### 我怎么浏览ASCII水族箱? ### +### 我怎么观赏 ASCII 水族箱? ### 输入下面的命令: @@ -38,6 +38,8 @@ Linux/Unix桌面趣事:终端ASCII水族箱 ![Fig.01: ASCII Aquarium](http://s0.cyberciti.org/uploads/tips/2011/01/screenshot-ASCIIQuarium.png) +*ASCII 水族箱* + ### 相关媒体 ### 注:youtube 视频 @@ -45,9 +47,9 @@ Linux/Unix桌面趣事:终端ASCII水族箱 [视频01: ASCIIQuarium - Linux/Unix桌面上的海洋动画][1] -### 下载:ASCII Aquarium的KDE和Mac OS X版本 ### +### 下载:ASCII Aquarium 的 KDE 和 Mac OS X 版本 ### -[下载asciiquarium][2]。如果你运行的是Mac OS X,试下一个可以直接使用已经打包好的[版本][3]。对于KDE用户,试试基于Asciiquarium的[KDE屏幕保护程序][4] +[点此下载 asciiquarium][2]。如果你运行的是 Mac OS X,试下这个可以直接使用的已经打包好的[版本][3]。对于 KDE 用户,试试基于 Asciiquarium 的[KDE 屏幕保护程序][4] -------------------------------------------------------------------------------- @@ -55,7 +57,7 @@ via: http://www.cyberciti.biz/tips/linux-unix-apple-osx-terminal-ascii-aquarium. 作者:Vivek Gite 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md b/published/201512/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md similarity index 100% rename from published/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md rename to published/201512/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md diff --git a/published/201512/20151229 Watch Star Wars In Linux Terminal.md b/published/201512/20151229 Watch Star Wars In Linux Terminal.md new file mode 100644 index 0000000000..b92a5b8b61 --- /dev/null +++ b/published/201512/20151229 Watch Star Wars In Linux Terminal.md @@ -0,0 +1,55 @@ +在 Linux 终端下看《星球大战》 +================================================================================ +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png) + +《星球大战(Star Wars)》已经席卷世界。最新一期的 [《星球大战》系列, 《星球大战7:原力觉醒》,打破了有史以来的记录][1]。 + +虽然我不能帮你得到一张最新的《星球大战》的电影票,但我可以提供给你一种方式,看[星球大战第四集][2],它是非常早期的《星球大战》电影(1977 年)。 + + +不,它不会是高清,也不是蓝光版。相反,它将是 ASCII 版的《星球大战》第四集,你可以在 Linux 终端看它,这才是真正的极客的方式 :) + +### 在 Linux 终端看星球大战 ### + +打开一个终端,使用以下命令: + + telnet towel.blinkenlights.nl + +等待几秒钟,你可以在终端看到类似于以下这样的动画ASCII艺术: + +(LCTT 译注:有时候会解析到效果更好 IPv6 版本上,如果你没有 IPv6 地址,可以重新连接试试;另外似乎线路不稳定,出现卡顿时稍等。) + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal.png) + +它将继续播映…… + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-1.png) + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png) + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-3.png) + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-5.png) + +要停止动画,按 ctrl +],在这之后输入 quit 来退出 telnet 程序。 + +### 更多有趣的终端 ### + +事实上,看《星球大战》并不是你在 Linux 终端下唯一能做有趣的事情。您可以运行[终端里的列车][3]或[通过ASCII艺术得到Linux标志][4]。 + +希望你能享受在 Linux 下看《星球大战》。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/star-wars-linux/ + +作者:[Abhishek][a] +译者:[zky001](https://github.com/zky001) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.gamespot.com/articles/star-wars-7-breaks-thursday-night-movie-opening-re/1100-6433246/ +[2]:http://www.imdb.com/title/tt0076759/ +[3]:http://itsfoss.com/ubuntu-terminal-train/ +[4]:http://itsfoss.com/display-linux-logo-in-ascii/ diff --git a/published/20151201 Cinnamon 2.8 Review.md b/published/20151201 Cinnamon 2.8 Review.md new file mode 100644 index 0000000000..ac84601cab --- /dev/null +++ b/published/20151201 Cinnamon 2.8 Review.md @@ -0,0 +1,87 @@ +Cinnamon 2.8 新变化一览 +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2-8-featured.jpg) + +除了Gnome和KDE外,Cinnamon是另一个很多人使用的桌面环境。它是由创作Linux Mint的团队制作的,并且可以被安装在许多其他发行版上。该桌面环境的最新版本 - Cinnamon 2.8 - 于去年底发布,此版本修复了许多的Bug、做了许多改进并添加了一些新功能。 + +我将仔细介绍该发行版本的主要改进,以及如何更新到Cinnamon 2.8或者第一次安装它。 + +### 对Applets的改进 ### + +在此版本中,对面板中已有的Applets做了若干的改进。 + +#### 声音 Applet #### + +![cinnamon-28-sound-applet](https://www.maketecheasier.com/assets/uploads/2015/11/rsz_cinnamon-28-sound-applet.jpg) + +声音Applet经过修正,目前可以显示音轨信息并且可以在音频文件的艺术家封面上面进行媒体控制。对于支持拖动的音乐播放器来说(例如Banshee),会有一个进度条显示同样的播放进度,您可以用它来改变音轨位置。在applet的面板上右击将显示对输入和输出设备静音的选项。 + +#### 电源 Applet #### + +电源applet则会使用电池制造商的数据而不是通用名称来显示每一个连接的电池和设备。 + +#### 窗口缩略图 #### + +![cinnamon-2.8-window-thumbnails](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2.8-window-thumbnails.png) + +在Cinnamon 2.8中,可以在鼠标悬停于面板里窗口列表时展示窗口缩略图。如果您不喜欢该功能,您还可以关闭该选项。 + +#### 工作区切换 Applet #### + +![cinnamon-2.8-workspace-switcher](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2.8-workspace-switcher.png) + +添加工作区切换applet到您的面板将为您显示一个代表该工作区的可视化图像,一些矩形嵌套显示在其中,代表您的窗口的位置。 + +#### 系统托盘 #### + +Cinnamon 2.8支持在系统托盘中显示应用程序指示器。您可以很容易地在设置中禁用它,这将强制应用程序到以前使用状态图标的方式。 + +### 视觉改进 ### + +Cinnamon 2.8还做了很多视觉上的改进。经典的切换器和Alt + Tab预览切换器都被精细打磨,有了显著的改进,同时修复了Alt + F2对话框的bug,并赋予了它更好的命令自动补全功能。 + +而且,传统的最小化窗口时动画效果的问题现已被解决,并可用于多个面板。 + +### Nemo 的改进 ### + +![cinnamon-2.8-nemo](https://www.maketecheasier.com/assets/uploads/2015/11/rsz_cinnamon-28-nemo.jpg) + +Cinnamon默认的文件管理器也修复了一些bug,并有了新的“快速重命名”的功能,用于重命名文件和文件夹。可以通过两次点击文件或文件夹并在两次点击之间进行简短的停顿以重命名文件。 + +Nemo也会自动地检测缩略图存在的问题,并提示您快速地修复它们。 + +### 其他值得注意的改进 ### + +- Applets如今会在它们被更新的时候自动地重新加载一次。 +- 对于多个监视器的支持有了显著的提高。 +- 对话框窗口有了改进,并且会附加到它的父窗口上。 +- HiDPI检测有了改进。 +- QT5应用程序现在看起来更加原生并使用了默认的GTK主题。 +- 窗口管理和渲染性能有了提升。 +- 修复了许多bug。 + +### 如何获得 Cinnamon 2.8 ### + +如果您在运行Linux Mint,您会在更新Linux Mint 17.3 “Rosa”Cinnamon版本的时候获得Cinnamon 2.8的更新。BETA版本现在已经放出,因此,如果您想立刻尝试新的软件,您可以试试。 + +对于Arch的用户来说,Cinnamon 2.8已经在Arch的官方仓库了,您可以通过更新软件包和系统级的更新获得Cinnamon的最新版本。 + +最后,对于Ubuntu用户来说,您可以通过下面的命令安装或更新Cinnamon 2.8: + + sudo add-apt-repository -y ppa:moorkai/cinnamon + sudo apt-get update + sudo apt-get install cinnamon + +您已经尝试了Cinnamon 2.8了么?感觉如何呢? + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/cinnamon-2-8-review/ + +作者:[Ayo Isaiah][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/ayoisaiah/ diff --git a/published/20151201 How to use Mutt email client with encrypted passwords.md b/published/20151201 How to use Mutt email client with encrypted passwords.md new file mode 100644 index 0000000000..2c57a73d91 --- /dev/null +++ b/published/20151201 How to use Mutt email client with encrypted passwords.md @@ -0,0 +1,135 @@ +如何 Mutt 邮件客户端中使用密文密码 +================================================================================ +Mutt 是一个 Linux/UNIX 终端环境下的开源的邮件客户端。Mutt 以及 [Alpine][1] 在 Linux 命令行爱好者中有着最忠诚的追随者,这不是没有原因的。想一下你所期待邮件客户端应有的功能,Mutt 拥有:多协议支持(例如,POP3、IMAP 和 SMTP),S/MIME 和 PGP/GPG 集成,会话线索,颜色标记,可定制宏/快捷键,等等。另外,基于命令行的 Mutt 相比粗重的基于浏览器的邮件客户端(如:Gmail,Ymail)或图形用户界面的邮件客户端(如:Thunderbird,MS Outlook)而言,是一个使用电子邮件的轻量级替代品。 + +当你想使用 Mutt 通过公司的 SMTP/IMAP 服务器访问或发送邮件,或取代网页邮件服务,可能所关心的一个问题是如何保护您的邮件凭据(如:SMTP/IMAP 密码),它们存储在一个纯文本 Mutt 配置文件(~/.muttrc)中。 + +对于这些人对安全的担忧,确实有一个容易的方法来**加密 Mutt 配置文件***,以防止这种风险。在这个教程中,我描述了如何加密 Mutt 敏感配置,比如使用 GnuPG(GPG)加密 SMTP/IMAP 密码,GPG 是一个开源的 OpenPGP 实现。 + +### 第一步 (可选):创建 GPG 密钥 ### + +因为我们将要使用 GPG 加密 Mutt 配置文件,如果你没有 GPG 密钥,第一步就是创建一个(公钥/私钥对)。如果有,请忽略这步。 + +创建一个新 GPG 密钥,输入下面命令: + + $ gpg --gen-key + +选择密钥类型(RSA),密钥长度(2048 bits),和过期时间(0 代表不过期)。当出现用户 ID 提示时,输入关联到该公钥/私钥对的名字(Dan Nanni) 和邮箱地址(myemail@email.com)。最后,输入一个密码来保护你的私钥。 + +![](https://c2.staticflickr.com/6/5726/22808727824_7735f11157_c.jpg) + +生成一个 GPG 密钥需要大量的随机字节来构成熵,所以在生成密钥期间确保在你的系统上执行一些随机行为(如:敲打键盘,移动鼠标或者读写磁盘)。根据密钥长度,生成 GPG 密钥要花几分钟或更多时间。 + +![](https://c1.staticflickr.com/1/644/23328597612_6ac5a29944_c.jpg) + +### 第二步:加密 Mutt 敏感配置 ### + +下一步,在 ~/.mutt 目录创建一个新的文本文件,然后把一些你想隐藏的 Mutt 敏感配置放进去。这个例子里,我指定了 SMTP/IMAP 密码。 + + $ mkdir ~/.mutt + $ vi ~/.mutt/password + +---------- + + set smtp_pass="XXXXXXX" + set imap_pass="XXXXXXX" + +现在通过 GPG 使用你的公钥加密这个文件如下: + + $ gpg -r myemail@email.com -e ~/.mutt/password + +这将创建 ~/.mutt/password.gpg,这是一个原始文件的 GPG 加密版本。 + +然后删除 ~/.mutt/password,只保留 GPG 加密版本。 + +### 第三步:创建完整 Mutt 配置文件 ### + +现在你已经在一个单独的文件放置了加密的 Mutt 敏感配置,你可以在 ~/.muttrc 指定其余的 Mutt 配置。然后增加下面这行在 ~/.muttrc 末尾。 + + source "gpg -d ~/.mutt/password.gpg |" + +当你启动 Mutt 时,这行将解密 ~/.mutt/password.gpg ,然后将解密内容应用到你的 Mutt 配置中。 + +下面展示一个完整 Mutt 配置例子,这可以让你通过 Mutt 访问 Gmail,而没有暴露你的 SMTP/IMAP 密码。用你的 Gmail ID 替代下面的 `yourgmailaccount`,此外你也需要在[你的 Goolgle 账户设置][3]中启用“支持不太安全的应用访问”。 + + set from = "yourgmailaccount@gmail.com" + set realname = "Your Name" + set smtp_url = "smtp://yourgmailaccount@smtp.gmail.com:587/" + set imap_user = "yourgmailaccount@gmail.com" + set folder = "imaps://imap.gmail.com:993" + set spoolfile = "+INBOX" + set postponed = "+[Google Mail]/Drafts" + set trash = "+[Google Mail]/Trash" + set header_cache =~/.mutt/cache/headers + set message_cachedir =~/.mutt/cache/bodies + set certificate_file =~/.mutt/certificates + set move = no + set imap_keepalive = 900 + + # encrypted IMAP/SMTP passwords + source "gpg -d ~/.mutt/password.gpg |" + +### 第四步(可选):配置 GPG 代理 ### + +这时候,你将可以使用加密了IMAP/SMTP 密码的 Mutt。然而,每次你运行 Mutt,你都要先被提示输入一个 GPG 密码来使用你的私钥解密 IMAP/SMTP 密码。 + +![](https://c2.staticflickr.com/6/5667/23437064775_20c874940f_c.jpg) + +如果你想避免这样的 GPG 密码提示,你可以部署一个 gpg-agent。它以后台守护进程方式运行,gpg-agent 可以安全地缓存你的 GPG 密码,无需手工干预,gpg 可以自动从 gpg-agent 获得你的 GPG 密码。如果你正在使用 Linux 桌面,你可以配置使用一些等同于 gpg-agent 的特定的桌面软件,例如,GNOME 桌面的 gnome-keyring-daemon。 + +你可以在基于 Debian 系统安装 gpg-agent: + + $ sudo apt-get install gpg-agent + +gpg-agent 在基于 Red Hat 的系统上是预装好的。 + +现在增加下面这些到你的 .bashrc 文件中。 + + envfile="$HOME/.gnupg/gpg-agent.env" + if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then + eval "$(cat "$envfile")" + else + eval "$(gpg-agent --daemon --allow-preset-passphrase --write-env-file "$envfile")" + fi + export GPG_AGENT_INFO + +重载 .bashrc,或简单的登出然后重新登录。 + + $ source ~/.bashrc + +现在确认 GPG_AGENT_INFO 环境变量已经设置妥当。 + + $ echo $GPG_AGENT_INFO + + /tmp/gpg-0SKJw8/S.gpg-agent:942:1 + +并且,当你输入 gpg-agent 命令时,你应该看到下面的信息。 + + $ gpg-agent + + gpg-agent: gpg-agent running and available + +一旦 gpg-agent 启动运行,它将会在第一次提示你输入密码时缓存你的 GPG 密码。随后你多次运行 Mutt ,都不会被提示要 GPG 密码(gpg-agent 一直开着,缓存就不会过期)。 + +![](https://c1.staticflickr.com/1/664/22809928093_3be57698ce_c.jpg) + +### 结论 ### + +在这个指导里,我提供一个使用 GnuPG 加密如 SMTP/IMAP 密码这样的 Mutt 敏感配置的方法。注意,如果你想在 Mutt 上使用 GnuPG 来加密或签名你的邮件,你可以参考[官方指南][2]关于 GPG 与 Mutt 结合的部分。 + +如果你知道任何使用 Mutt 的安全技巧,欢迎分享它。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/mutt-email-client-encrypted-passwords.html + +作者:[Dan Nanni][a] +译者:[wyangsun](https://github.com/wyangsun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/gmail-command-line-linux-alpine.html +[2]:http://dev.mutt.org/trac/wiki/MuttGuide/UseGPG +[3]:https://www.google.com/settings/u/1/security \ No newline at end of file diff --git a/published/20151206 Supporting secure DNS in glibc.md b/published/20151206 Supporting secure DNS in glibc.md new file mode 100644 index 0000000000..25e1004b09 --- /dev/null +++ b/published/20151206 Supporting secure DNS in glibc.md @@ -0,0 +1,51 @@ +通过修改 glibc 支持 DNS 加密 +======================== + +域名解析系统(DNS)是互联网安全的许多薄弱环节之一;可以将应用程序所访问的主机对应的 IP 地址误导到其它地方。也就是说,会连接到错误的位置,从而引发中间人(man-in-the-middle )攻击等等。而 [DNSSEC][1] 扩展协议则通过为 DNS 信息建立一条加密的可信通道来解决这个漏洞。在正确地配置好 DNSSEC 后,应用程序将可以得到可靠的主机查询信息。通过关于[尝试将 DNSSEC 更好地集成到 GNU C 库里][2]的讨论,我们知道,确保 DNS 查询信息安全这件事并不是那么简单。 + +从某种意义上来说,这个问题多年以前就解决了,我们可以配置一个本地域名服务实现完整的 DNSSEC 校验(verification)并允许应用程序通过 glibc 函数来使用该服务。DNSSEC 甚至还可以用于提高其他领域的安全性,比如,它可以携带 SSH 或 TLS 密钥指纹,让应用程序可以确认其在与正确的服务器对话。不过,当我们希望确认这条自称带有 DNSSEC 校验的 DNS 结果是不是真的已通过认证的时候 - 也就是说,当我们想依赖 DNSSEC 所承诺的安全的时候,事情变得有点复杂。 + +### /etc/resolv.conf 问题 + +从 glibc 的角度来看,这个问题一部分是因为 glibc 本身并没有做 DNSSEC 校验,而是引用 /etc/resolv.conf 文件,从该文件里读出的服务器来做解析以及校验,再将结果返回给应用程序。如果应用程序使用底层 res_query() 接口,那结果中将会包含“已认证数据(authenticated data)”(AD)标识(如果域名服务器设定了的话)以表示 DNSSEC 校验已经成功。但是 glibc 却完全不知道提供这些结果的域名服务器的信用,所以它其实并不能告诉应用程序结果是否真的可靠。 + +由 glibc 的维护者 Carlos O'Donell 提出的建议是在 resolv.conf 文件里增加一个选项(dns-strip-dnssec-ad-bit)告诉 glibc 无条件移除 AD 标识。这个选项可以由各发行版设定,表示 DNSSEC 级别的 DNS 查询结果并不可靠。而一旦建立好合适的环境可以获得可靠的查询结果后,再移除这个选项。这样一来,虽然问题还没有完全解决,至少应用程序有依据来评价从 glibc 获取的 DNS 查询结果的可靠性。 + +一个可靠的环境配置应该是什么样?标准情况应该和这个差不太多:有一个本地域名服务器,通过环路(loopback)接口访问,作为访问 /etc/resolv.conf 文件的唯一条目。这个域名服务器应该配置来做校验,而在校验失败后就只是简单地不返回任何结果。绝大多数情况下,应用程序就不再需要关心 AD 标识,如果结果不可靠,应用程序就根本看不到。一些发行版已经倾向于这种模型,不过情况仍然不像一些人所设想的那么简单。 + +其中一个问题是,这种方式将 /etc/resolv.conf 文件放到整个系统可信任度的中心。但是,在一个典型的 Linux 系统里,有无数的 DHCP 客户端、网络脚本以及其他更多的程序可以修改这个文件。就像 Paul Wouters 所[指出][3]的,在短时间内锁定这个文件是不可能的。有时候这种修改是必须的:在一个无盘系统启动的时候,在自身的域名服务器启动之前也是需要域名服务的;一个系统的整个 DNS 环境也会根据所连接的网络不同而有所改变;运行在容器里的系统也最好是配置成使用宿主机的域名服务器;等等。 + +所以,现在一般认为,现有系统里的 /etc/resolv.conf 文件并不可信。于是有人提出增加另一个配置文件(/etc/secure-resolv.conf 或其他什么),但这并没有从根本上解决问题。除此之外,有些参与者觉得就算有一个运行在环路接口上的域名服务器也不是真正可靠,比如 Zack Weinberg 甚至[建议][4]系统管理员可以有意禁用 DNSSEC 确认(validation)。 + +既然当前系统里的配置不足以信任,那可以这样推断,在情况有改善能够取得可信的结果后,glibc 需要有一种方式来通知应用程序。可以是上面讨论的屏蔽 AD 标识的方式(或者与之相反,增加一个显示的“此域名服务器可以信任”选项);当然,这都需要一定程度上锁定系统以免 /etc/resolv.conf 受到任何不可预计的修改。按 Petr Spacek 的[建议][5],还有一种引申方式,就是提供一种途径允许应用程序查询 glibc 当前通讯的是不是本地域名服务器。 + +### 在 glibc 里来处理? + +另一种方式是不管域名服务器,而是让 glibc 本身来做 DNSSEC 确认。不过,把这么大一坨加密相关代码放进 glibc 也是有很大阻力。这样将增加库本身的大小,从而感觉会增加使用它的应用程序的受攻击可能性。这个方向再引申一下,由 Zack 提出的[建议][6],可以把确认相关代码放到域名服务缓冲守护进程(nscd)里。因为 nscd 也是 glibc 的一部分,由 glibc 开发人员维护,因此在一定程度上可以相信能正确执行 DNSSEC 确认。而且 nscd 的通讯 socket 所在位置也是公开的,所以可以不考虑 /etc/resolv.conf 问题。不过,Carlos [担心][7]这种方式不能让那些不想使用 nscd 缓存功能的用户所接受;在他看来,基本可以排除 nscd 的方式。 + +所以,至少近期内,glibc 不太可能全部执行 DNSSEC 确认了的整个查询过程。这意味着,如果一个有安全考虑的应用要使用 glibc 库来查询域名,该库将需要提供一个标识来评价从独立域名服务器返回的结果有多大程度的可靠性。这几乎肯定需要发行版或系统管理员做出一些明确的改动。就像 Simo Sorce [说的][8]那样: + +> 如果 glibc 不使用明确的配置选项来通知应用程序它所用的域名解析是可信的,不会有什么用……不改一下还有很大弊端,因为应用程序开发者将马上认识到他们不能信任从 glibc 获取的任何信息,从而在处理 DNSSEC 相关信息时就简单地不用它。 + +要配置一个系统能正常使用 DNSSEC 需要改动该系统的很多组件 - 这是一个发行版范围的问题,需要时间来完全解决。在这个转变过程中 glibc 所扮演的角色很可能会比较小,但是很重要的一部分:如果应用程序不实现一套自己的域名解析代码,glibc 很可能是保证 DNS 结果可信的唯一方式。在一个系统中运行多个 DNSSEC 实现方式看起来不像是一种安全的方式,所以最好还是把事情做对了。 + +glibc 项目目前并没有确定用哪种方式来做这个事情,虽然从 /etc/resolv.conf 文件里的某些标记看上去快好了。这种改动应该需要发布新版本;考虑到 glibc 开发的保守天性,很可能来不及加入预计二月份发布的 2.23 版本了。所以 glibc 中暂时还不会有更高安全性的 DNSSEC ,不过在这个方向上也有一些进展了。 + +--------------------------- + +via: https://lwn.net/Articles/664776/ + +作者:Jonathan Corbet +译者:[zpl1025](https://github.com/zpl1025) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]: https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions +[2]: http://lwn.net/Articles/664790/ +[3]: http://lwn.net/Articles/664794/ +[4]: http://lwn.net/Articles/664782/ +[5]: http://lwn.net/Articles/664784/ +[6]: http://lwn.net/Articles/664796/ +[7]: http://lwn.net/Articles/664786/ +[8]: http://lwn.net/Articles/664787/ \ No newline at end of file diff --git a/published/20151208 6 useful LibreOffice extensions.md b/published/20151208 6 useful LibreOffice extensions.md new file mode 100644 index 0000000000..5fed70cb74 --- /dev/null +++ b/published/20151208 6 useful LibreOffice extensions.md @@ -0,0 +1,79 @@ +LibreOffice 中的六大实用扩展组件 +================================================================================ +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-2.png) + +图片来源:Opensource.com + +LibreOffice 是最好的自由办公套件,并在所有的主要 Linux 发行版中得到应用。尽管 LibreOffice 已经拥有了大多数特性,它仍然可以通过添加一种叫做扩展(extension)的特定的附加组件来增加功能。 + +LibreOffice 的扩展组件的网站是 [extensions.libreoffice.org][1]。扩展组件只是一些工具,可以在安装主体上进行独立添加或者移除,以便增加新功能或者让已有功能更容易使用。 + +### 1. 多格式保存组件 ### + +多格式保存组件可以根据用户的设置,同时将文档保存为开源文档(OpenDocument)、微软 Office 文档或者 PDF 文档。在你需要将微软 Office 文档格式转为标准的[开源文档格式][2]的时候,这个组件就很实用了,因为该组件同时提供了两种选择:互操作性较强的 ODF 文档格式,以及微软 Office 文档格式,以便同所有需要使用老旧的文档格式的用户保持兼容性。这样使管理员的文档迁移过程变得更具弹性、更易于管理。 + +**[下载 多格式保存组件][3]** + +![Multiformatsave extension](https://opensource.com/sites/default/files/images/business-uploads/multiformatsave.png) + +### 2. Writer 中可备选使用的查找与替换组件(备选搜索 (AltSearch)) ### + +该组件向 Writer 中的查找与替换功能添加了许多新特性:可以查找和替换一段或多段文本;一次执行多个查找和替换;搜索:书签、笔记、文本字段、交叉引用和参考标志内容、名称或标志及其插入;搜索和插入脚注和尾注;通过名称来搜索表格对象、图像和文本框;搜索帮助手册页和分栏符以及创建和失活时间;根据光标位置搜索相同格式的文本。还可以保存/加载查找和替换参数,并在多个同时打开的文件中执行批处理。 + +**[下载 Writer 中可交替使用的查找与替换组件(交替搜索 (AltSearch))][4]** + +![Alternative Find&amp;Replace add-on](https://opensource.com/sites/default/files/images/business-uploads/alternativefindreplace.png) + +### 3. Pepito 清除组件 ### + +Pepito 清除组件是一个 LibreOffice 扩展,主要用来快速清除并修复旧式扫描件、导入的 PDF 以及每个电子文本文档的格式错误。通过点击 LibreOffice 工具栏中的 Pepito 图标,用户可以打开一个用于分析文档并按类型呈现文档错误。当你将 PDF 文档转换为 ODF 文档时,这个工具就非常有用了,它会自动清除转换过程中出现的错误。 + +**[下载 Pepito 清除组件][5]** + +![Pepito cleaner screenshot](https://opensource.com/sites/default/files/images/business-uploads/pepitocleaner.png) + +### 4. ImpressRunner 组件### + +Impress Runner 是将 [Impress][6] 文档转换成自动播放文件的扩展组件。该组件会添加两个图标,用以设置或移除自动开始播放的功能,我们还可以通过编辑 文件 | 属性 | 自定义属性 菜单来手动添加这两个图标,并将自动运行按钮添加到前四个文本域之一前面。在会议与组织活动时,如果幻灯片无人主持,这个扩展组件就变得非常有用。 + +**[下载 ImpressRunner 组件][7]** + +### 5. 导出为图像组件 ### + +导出为图像组件为 Impress 和 [Draw][8] 中文件菜单里增加了一个入口——“导出为图像...”,主要用于将所有的幻灯片和页面导出成 JPG、PNG、GIF、BMP 和 TIFF 等图像格式,并且允许用户自定义导出图像的名称、大小以及其他参数。 + +**[下载 导出为图像组件][9]** + +![Export as images extension](https://opensource.com/sites/default/files/images/business-uploads/exportasimages.png) + +### 6. Anaphraseus 组件### + +Anaphraseus 是一个 CAT(Computer-Aided Translation,计算机辅助翻译)工具组件,用来创建、管理双语翻译。Anaphraseus 是一个 LibreOffice 宏集合,可以作为扩展组件或者用在单独的文档中。最开始,Anaphraseus 支持快速翻译(Wordfast)格式,但现在它可以导入或者导出成 TMX 格式。其主要特性:分本分割、在翻译记录(Translation Memory)中模糊搜索、术语识别以及导入导出 TMX(OmegaT translation memory format,OmegaT 翻译存储格式)。 + +**[下载 Anaphraseus 组件][10]** + +![Anaphraseus screenshot](https://opensource.com/sites/default/files/images/business-uploads/anaphraseus.png) + +你是否也有自己喜欢和推荐的 LibreOffice 组件呢?在评论中告诉大家吧。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/business/15/12/6-useful-libreoffice-extensions + +作者:[Italo Vignoli][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/italovignoli +[1]:http://extensions.libreoffice.org/ +[2]:http://www.opendocumentformat.org/ +[3]:http://extensions.libreoffice.org/extension-center/multisave-1 +[4]:http://extensions.libreoffice.org/extension-center/alternative-dialog-find-replace-for-writer +[5]:http://pepitoweb.altervista.org/pepito_cleaner/index.php +[6]:https://www.libreoffice.org/discover/impress/ +[7]:http://extensions.libreoffice.org/extension-center/impressrunner +[8]:https://www.libreoffice.org/discover/draw/ +[9]:http://extensions.libreoffice.org/extension-center/export-as-images +[10]:http://anaphraseus.sourceforge.net/ diff --git a/published/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/published/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md new file mode 100644 index 0000000000..a60b5d7589 --- /dev/null +++ b/published/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md @@ -0,0 +1,268 @@ +在 FreeBSD 10.2 上如何通过配置 Apache 和 SSL 安装 Bugzilla +================================================================================ + +Bugzilla 是一款开源的 Web 应用,用于 bug 跟踪系统和测试工具,由 mozilla 开发,并采用 Mozilla 公共许可证授权(MPL)。它经常被一些高科技公司如 mozilla、红帽公司和 gnome 使用。Bugzilla 起初由 Terry Weissman开发于1998年,它用 perl 语言编写,用 MySQL 作为后端数据库。它是一款旨在帮助管理软件开发的服务器软件,它有丰富的功能、高度优化的数据库、卓越的安全性、高级的搜索工具、集成了邮件功能等等。 + +在本教程中,我们将安装 bugzilla 5.0 ,采用 apache 作为 Web 服务器,并为它启用 SSL,然后在 freebsd 10.2 上安装 mysql 5.1 来作为数据库系统。 + +#### 准备 #### + +- FreeBSD 10.2 - 64位 +- Root 权限 + +### 第一步 - 更新系统 ### + +用 ssh 登录 freebsd 服务器,并更新软件库: + + sudo su + freebsd-update fetch + freebsd-update install + +### 第二步 - 安装并配置 Apache ### + +在这一步我们将使用 pkg 命令从 freebsd 软件库中安装 apache,然后在 apache24 目录下编辑 "httpd.conf" 文件,来配置 apache 以启用 SSL 和 CGI 支持。 + +用 pkg 命令安装 apache: + + pkg install apache24 + +进入 apache 目录并用 nano 编辑器编辑"httpd.conf"文件: + + cd /usr/local/etc/apache24 + nano -c httpd.conf + +取消下面列出行的注释: + + #第70行 + LoadModule authn_socache_module libexec/apache24/mod_authn_socache.so + + #第89行 + LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so + + #第117行 + LoadModule expires_module libexec/apache24/mod_expires.so + + #第141行,启用SSL + LoadModule ssl_module libexec/apache24/mod_ssl.so + + #第162行,支持cgi + LoadModule cgi_module libexec/apache24/mod_cgi.so + + #第174行,启用mod_rewrite + LoadModule rewrite_module libexec/apache24/mod_rewrite.so + + #第219行,服务器名配置 + ServerName 127.0.0.1:80 + +保存并退出。 + +接着,我们需要从 freebsd 库中安装 mod perl,并启用它: + + pkg install ap24-mod_perl2 + +启用 mod_perl,编辑"httpd.conf"文件并添加"Loadmodule"行: + + nano -c httpd.conf + +添加该行: + + #第175行 + LoadModule perl_module libexec/apache24/mod_perl.so + +保存并退出。 + +在启用 apache 之前,用 sysrc 命令添加以下行作为开机启动项: + + sysrc apache24_enable=yes + service apache24 start + +### 第三步 - 安装并配置 MySQL 数据库 ### + +我们要用 mysql 5.1 来作为后端数据库并且支持 perl 模块。用 pkg 命令安装 mysql 5.1: + + pkg install p5-DBD-mysql51 mysql51-server mysql51-client + +现在我们要将 mysql 服务设置为开机启动,然后为 mysql 配置 root 密码。 + +运行以下命令来完成上述所有操作: + + sysrc mysql_enable=yes + service mysql-server start + mysqladmin -u root password aqwe123 + +注意: + +这里 mysql 密码为:aqwe123 + +![Configure MySQL Password](http://blog.linoxide.com/wp-content/uploads/2015/12/Configure-MySQL-Password.png) + +以上步骤都完成之后,我们用 root 登录 mysql shell,然后为 bugzilla 安装创建一个新的数据库和用户。 + +用以下命令登录 mysql shell: + + mysql -u root -p + password: aqwe123 + +添加数据库: + + create database bugzilladb; + create user bugzillauser@localhost identified by 'bugzillauser@'; + grant all privileges on bugzilladb.* to bugzillauser@localhost identified by 'bugzillauser@'; + flush privileges; + \q + +![Creating Database for Bugzilla](http://blog.linoxide.com/wp-content/uploads/2015/12/Creating-Database-for-Bugzilla.png) + +bugzilla 的数据库创建好了,名字为"bugzilladb",用户名和密码分别为"bugzillauser"和"bugzillauser@"。 + +### 第四步 - 生成新的 SSL 证书 ### + +在 bugzilla 站点的 "ssl" 目录里生成新的自签名 SSL 证书。 + +前往 apache24 目录并在此创建新目录 "ssl": + + cd /usr/local/etc/apache24/ + mkdir ssl; cd ssl + +接着,用 openssl 命令生成证书文件,然后更改其权限: + + sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /usr/local/etc/apache24/ssl/bugzilla.key -out /usr/local/etc/apache24/ssl/bugzilla.crt + chmod 600 * + +### 第五步 - 配置虚拟主机 ### + +我们将在 "/usr/local/www/bugzilla" 目录里安装 bugzilla,所以我们必须为它创建新的虚拟主机配置。 + +前往 apache 目录并为虚拟主机文件创建名为 "vhost" 的新目录: + + cd /usr/local/etc/apache24/ + mkdir vhost; cd vhost + +现在为虚拟主机文件创建新文件 "bugzilla.conf": + + nano -c bugzilla.conf + +将以下配置粘贴进去: + + + ServerName mybugzilla.me + ServerAlias www.mybuzilla.me + DocumentRoot /usr/local/www/bugzilla + Redirect permanent / https://mybugzilla.me/ + + + Listen 443 + + ServerName mybugzilla.me + DocumentRoot /usr/local/www/bugzilla + + ErrorLog "/var/log/mybugzilla.me-error_log" + CustomLog "/var/log/mybugzilla.me-access_log" common + + SSLEngine On + SSLCertificateFile /usr/local/etc/apache24/ssl/bugzilla.crt + SSLCertificateKeyFile /usr/local/etc/apache24/ssl/bugzilla.key + + + AddHandler cgi-script .cgi + Options +ExecCGI + DirectoryIndex index.cgi index.html + AllowOverride Limit FileInfo Indexes Options + Require all granted + + + +保存并退出。 + +上述都完成之后,为 bugzilla 安装创建新目录,并在 httpd.conf 文件添加虚拟主机配置来启用 bugzilla虚拟主机。 + +在 "apache24" 目录下运行以下命令: + + mkdir -p /usr/local/www/bugzilla + cd /usr/local/etc/apache24/ + nano -c httpd.conf + +文末,添加以下配置: + + Include etc/apache24/vhost/*.conf + +保存并退出。 + +现在用 "apachectl" 命令测试一下 apache 的配置并重启它: + + apachectl configtest + service apache24 restart + +### 第六步 - 安装 Bugzilla ### + +我们可以通过下载源来手动安装 bugzilla 了,或从 freebsd 库中安装也可以。在这一步中我们将用 pkg 命令从 freebsd 库中安装 bugzilla: + + pkg install bugzilla50 + +以上步骤都完成之后,前往 bugzilla 安装目录并安装所有 bugzilla 需要的 perl 模块。 + + cd /usr/local/www/bugzilla + ./install-module --all + +要等到所有都完成,这需要点时间。 + +下一步,在 bugzilla 的安装目录中执行 "checksetup.pl" 文件来生成配置文件 "localconfig"。 + + ./checksetup.pl + +你会看到一条关于数据库配置错误的消息,你得用 nano 编辑器编辑一下 "localconfig" 文件: + + nano -c localconfig + +现在添加第三步创建的数据库。 + + #第57行 + $db_name = 'bugzilladb'; + + #第60行 + $db_user = 'bugzillauser'; + + #第67行 + $db_pass = 'bugzillauser@'; + +保存并退出。 + +然后再次运行 "checksetup.pl": + + ./checksetup.pl + +你会收到输入邮箱名和管理员账号的提示,你只要输入你的邮箱、用户名和密码就行了。 + +![Admin Setup](http://blog.linoxide.com/wp-content/uploads/2015/12/Admin-Setup.png) + +最后,我们需要把安装目录的属主改成 "www",然后用服务命令重启 apache: + + cd /usr/local/www/ + chown -R www:www bugzilla + service apache24 restart + +现在 Bugzilla 已经安装好了,你可以通过访问 mybugzilla.me 来查看,并且将会重定向到 https 连接。 + +Bugzilla 首页: + +![Bugzilla Home](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Home.png) + +Bugzilla admin 面板: + +![Bugzilla Admin Page](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Admin-Page.png) + +### 结论 ### + +Bugzilla 是一个基于 web 的应用,并能帮助你管理软件开发,它用 perl 开发并以 MySQL 作为数据库系统。Bugzilla 帮助 mozilla、redhat、gnome 等公司完成软件开发工作。Bugzilla 有很多功能并易于配置和安装。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/install-bugzilla-apache-ssl-freebsd-10-2/ + +作者:[Arul][a] +译者:[ZTinoZ](https://github.com/ZTinoZ) +校对:[Caroline](https://github.com/carolinewuyan) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arulm/ diff --git a/translated/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md b/published/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md similarity index 88% rename from translated/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md rename to published/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md index dbbab5ef8c..48b6d23f18 100644 --- a/translated/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md +++ b/published/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md @@ -1,16 +1,16 @@ -Linux / Unix桌面之趣:终端上的圣诞树 +Linux/Unix 桌面趣事:终端上的圣诞树 ================================================================================ -给你的Linux或Unix控制台创造一棵圣诞树玩玩吧。在此之前,需要先安装一个Perl模块,命名为Acme::POE::Tree。这是一棵很喜庆的圣诞树,我已经在Linux、OSX和类Unix系统上验证过了。 +给你的Linux或Unix控制台创造一棵圣诞树玩玩吧。在此之前,需要先安装一个Perl模块,命名为Acme::POE::Tree。这是一棵很喜庆的圣诞树,我已经在Linux、OSX和类Unix系统上验证过了。 ### 安装 Acme::POE::Tree ### -安装perl模块最简单的办法就是使用cpan(Perl综合典藏网)。打开终端,把下面的指令敲进去便可安装Acme::POE::Tree。 +安装perl模块最简单的办法就是使用CPAN(Perl综合典藏网(Comprehensive Perl Archive Network))。打开终端,把下面的指令敲进去便可安装Acme::POE::Tree。 ## 以root身份运行 ## perl -MCPAN -e 'install Acme::POE::Tree' -**案例输出:** +**示例输出:** Installing /home/vivek/perl5/man/man3/POE::NFA.3pm Installing /home/vivek/perl5/man/man3/POE::Kernel.3pm @@ -49,7 +49,7 @@ Linux / Unix桌面之趣:终端上的圣诞树 perl -MAcme::POE::Tree -e 'Acme::POE::Tree->new()->run()' -**案例输出** +**示例输出** ![Gif 01: An animated christmas tree in Perl](http://s0.cyberciti.org/uploads/cms/2015/12/perl-tree.gif) @@ -71,7 +71,7 @@ Gif 01: 一棵用Perl写的喜庆圣诞树 ); $tree->run(); -这样就可以通过修改star_delay、run_for和light_delay参数的值来自定义你的树了。一棵提供消遣的终端圣诞树就此诞生。 +这样就可以通过修改star_delay、run_for和light_delay参数的值来自定义你的树了。一棵好玩的终端圣诞树就此诞生。 -------------------------------------------------------------------------------- @@ -79,6 +79,6 @@ via: http://www.cyberciti.biz/open-source/command-line-hacks/linux-unix-desktop- 作者:Vivek Gite 译者:[soooogreen](https://github.com/soooogreen) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/201601/20101020 19 Years of KDE History--Step by Step.md b/published/201601/20101020 19 Years of KDE History--Step by Step.md new file mode 100644 index 0000000000..50cfff73fb --- /dev/null +++ b/published/201601/20101020 19 Years of KDE History--Step by Step.md @@ -0,0 +1,232 @@ +KDE 的19年进化历程 +================ + +注:youtube 视频 + + +## 概述 + +KDE – 史上功能最强大的桌面环境之一;开源且可自由使用。19年前,1996年10月14日,德国程序员 Matthias Ettrich 开始了这个美观的桌面环境的开发。KDE 提供了用户界面以及其他很多日常使用的程序。今日,KDE 被成千上万人在 Unix 和 Windows 上使用。19年,一个对软件项目而言极为漫长的年岁。现在是时候让我们回到最初,看看这一切肇始于何处。 + +K Desktop Environment(KDE)有很多创新之处:新设计,美观,一致的体验,易于使用,对普通用户和专业用户都足够强大的应用库。“KDE”这个名字是对单词“通用桌面环境”(Common Desktop Environment)玩的一个简单谐音游戏,“K”即“Cool”。 第一代 KDE 在双许可证授权下使用了 Trolltech 公司专利的 Qt framework(现 Qt 的前身),这两个许可证分别是开源的 QPL(Q public license)和商业专利许可证(proprietary commercial license)。在2000年 Trolltech 公司让一部分 Qt 软件库开始发布在 GPL 证书下; Qt 4.5 发布在了 LGPL 2.1 许可证下。自2009起 KDE 桌面环境由三部分构成:Plasma Workspaces(用做交互界面),KDE Applications,作为 KDE Software 编译的 KDE Platform。 + +## 各发布版本 + +### 预发布版本 – 1996年10月14日 + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/0b3.png) + +当时名称为 Kool Desktop Environment;“Kool”这个单词在很快就被弃用了。最初,所有 KDE 的组件都是被单独发布在开发社区里的,它们并没有被一个大的项目所贯穿起来。开发组邮件列表中的首选通信是发往kde@fiwi02.wiwi.uni-Tubingen.de 邮件列表。 + +### KDE 1.0 – 1998年7月12日 + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/10.png) + +这个版本受到了颇有争议的反馈。很多人反对使用 Qt 框架,因为当时的 FreeQt 许可证和自由软件许可证并不兼容,他们建议开发组使用 Motif 或者 LessTif 替代。尽管有着这些反对声,KDE 仍然被很多用户所青睐,并且成功作为第一个 Linux 发行版的环境被集成了进去。 + +![28 January 1999](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/11.png) + +*1999年1月28日* + +有一次升级,**K Desktop Environment 1.1**,更快,更稳定的同时加入了很多小的改进。这个版本同时也加入了很多新的图标,背景和材质纹理。和这些全面翻新同时出现的还有 Torsten Rahn 绘制的全新 KDE 图标----一个放在齿轮前的字母 K ;这个图标的修改版也一直沿用至今。 + +### KDE 2.0 – 2000年10月23日 + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/20.png) + +重大更新: + +- DCOP (Desktop COmmunication Protocol),一个端到端的通信协议 +- KIO,一个应用程序 I/O 库 +- KParts,组件对象模型 +- KHTML,一个符合 HTML 4.0 标准的渲染绘制引擎。 + +![26 February 2001](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/21.png) + +*2001年2月26日* + +**K Desktop Environment 2.1** 首次发布了媒体播放器 noatun,它使用了模组化、插件设计。为了便利开发者,K Desktop Environment 2.1 打包了 KDevelop。 + +![15 August 2001](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/22.png) + +*2001年8月15日* + +**KDE 2.2**版本在 GNU/Linux 上加快了50%的应用启动速度,同时提高了 HTML 渲染、JavaScript 稳定性和性能,同时还增加了一些 KMail 的功能。 + +### KDE 3.0 – 2002年4月3日 + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/30.png) + +K Desktop Environment 3.0 加入了更好的限制使用功能,这个功能在电话亭、网咖,企业公用电脑上被广泛需求,它可以禁止用户完全使用软件的某些能力。 + +![28 January 2003](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/31.png) + +*2003年1月28日* + +**K Desktop Environment 3.1** 加入了新的默认窗口(Keramik)和图标样式(Crystal)和其他一些改进。 + +![3 February 2004](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/32.png) + +*2004年2月3日* + +**K Desktop Environment 3.2** 加入了诸如在网页表格、书写邮件中拼写检查的新功能;增强了邮件和日历功能。完善了 Konqueror 中的标签机制和对 Microsoft Windows 桌面共享协议(RDP)的支持。 + +![19 August 2004](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/33.png) + +*2004年8月19日* + +**K Desktop Environment 3.3** 侧重于组合不同的桌面组件。Kontact 被放进了群件应用 Kolab 并与 Kpilot 结合。Konqueror 的加入让 KDE 有了更好的 IM 交流功能,比如支持发送文件,以及其他 IM 协议(如IRC)的支持。 + +![16 March 2005](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/34.png) + +*2005年3月16日* + +**K Desktop Environment 3.4** 侧重于提高易用性。这次更新为 Konqueror、Kate、KPDF 加入了文字-语音转换功能;也在桌面系统中加入了独立的 KSayIt 文字-语音转换软件。 + +![29 November 2005](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/35.png) + +*2005年11月29日* + +**The K Desktop Environment 3.5** 发布加入了 SuperKaramba,为桌面环境提供了易于安装的插件(widgets)机制。 Konqueror 加入了广告屏蔽功能并成为了有史以来第二个通过 Acid2 CSS 测试的浏览器。 + +### KDE SC 4.0 – 2008年1月11日 + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/400.png) + +大部分的开发投身于把最新的技术和开发框架整合进 KDE 4 当中。Plasma 和 Oxygen 是两次最大的用户界面风格变更。同时,Dolphin 替代 Konqueror 成为默认文件管理器,Okular 成为了默认文档浏览器。 + +![29 July 2008](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/401.png) + +*2008年7月29日* + +**KDE 4.1** 引入了一个在 PIM 和 Kopete 中共享使用的表情主题系统;引入了可以让用户便利地从互联网上一键下载数据的 DXS。同时引入了 GStreamer、QuickTime 和 DirectShow 9 Phonon 后端。加入了新应用如: + +- Dragon Player +- Kontact +- Skanlite — 扫描仪软件 +- Step —— 物理模拟软件 +- 新游戏: Kdiamond、Kollision、KBreakout 和更多...... + +![27 January 2009](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/402.png) + +*2009年1月27日* + +**KDE 4.2** 被认为是在已经极佳的 KDE 4.1 基础上的又一次全面超越,同时也成为了大多数用户替换旧 3.5 版本的完美选择。 + +![4 August 2009](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/403.png) + +*2009年8月4日* + +**KDE 4.3** 修复了超过10000个 bug,同时加入了让近2000个用户要求的功能。整合一些新的技术例如:PolicyKit、NetworkManage & Geolocation services 等也是这个版本的一大重点。 + +![9 February 2010](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/404.png) + +*2010年2月9日* + +**KDE SC 4.4** 基于 Qt 4 toolkit 的 4.6 版本,加入新的应用 KAddressBook。 + +![10 August 2010](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/405.png) + +*2010年8月10日* + +**KDE SC 4.5** 增加了一些新特性:整合了开源的浏览器引擎 WebKit 库,其现在也在 Apple Safari 和 Google Chrome 中广泛使用。KPackageKit 替换了 Kpackage。 + +![26 January 2011](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/406.png) + +*2011年1月26日* + +**KDE SC 4.6** 加强了 OpenGl 的性能,同时照常更新了无数bug和小改进。 + +![27 July 2011](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/407.png) + +*2011年7月27日* + +**KDE SC 4.7** 升级 KWin 以兼容 OpenGL ES 2.0 ,更新了 Qt Quick,Plasma Desktop 带来许多增强和在应用里的大量新特性, 修复了1.2万个 bug。 + +![25 January 2012](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/408.png) + +*2012年1月25日* + +**KDE SC 4.8**: 更好的 KWin 性能与 Wayland 支持,更崭新的 Doplhin 的外观设计。 + +![1 August 2012](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/409.png) + +*2012年8月1日* + +**KDE SC 4.9**: 向 Dolphin 文件管理器增加了一些更新,比如重新加入了实时文件重命名,鼠标辅助按钮支持,更好的位置面板和更多文件分类管理功能。 + +![6 February 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/410.png) + +*2013年2月6日* + +**KDE SC 4.10**: 很多 Plasma 插件使用 QML 重写; Nepomuk、Kontact 和 Okular 得到了很大程度的性能和功能提升。 + +![14 August 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/411.png) + +*2013年8月14日* + +**KDE SC 4.11**: Kontact 和 Nepomuk 有了很多优化。 第一代 Plasma Workspaces 进入了单纯维护阶段。 + +![18 December 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/412.png) + +*2013年12月18日* + +**KDE SC 4.12**: Kontact 得到了极大的提升,包括许多小的改进。 + +![16 April 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/413.png) + +*2014年4月16日* + +**KDE SC 4.13**: Nepomuk 语义搜索功能替代了桌面上的原有的 Baloo 搜索。 KDE SC 4.13 以53个语言版本发布。 + +![20 August 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/414.png) + +*2014年8月20日* + +**KDE SC 4.14**: 这个发布版本侧重于稳定性提升:大量的 bug 修复和增加了一些小的功能。这是最后一个 KDE SC 4 发布版本。 + +### KDE Plasma 5.0 – 2014年7月15日 + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/500.png) + +KDE Plasma 5 – 第五代 KDE。大幅改进了设计和系统,新的默认主题 Breeze 完全迁移到了 QML,更好的 OpenGL 性能,更完美的 HiDPI (高分辨率)显示支持。 + +![11 November 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/501.png) + +*2014年11月11日* + +**KDE Plasma 5.1**:迁移了从 Plasma 4 里丢失的功能。 + +![27 January 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/502.png) + +*2015年1月27日* + +**KDE Plasma 5.2**:新组件:BlueDevil、KSSHAskPass、Muon、SDDM 主题设置、KScreen、GTK+ 样式设置和 KDecoration。 + +![28 April 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/503.png) + +*2015年4月28日* + +**KDE Plasma 5.3**:Plasma Media Center 技术预览。新的蓝牙和触摸板小程序;改良了电源管理。 + +![25 August 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/504.png) + +*2015年8月25日* + +**KDE Plasma 5.4**:Wayland 登场,新的基于 QML 的音频管理程序,一个全屏的程序启动器替代品。 + +万分感谢 [KDE][1] 开发者及社区,并感谢 Wikipedia 为书写 [概述][2] 带来的帮助,同时,感谢所有读者。让我们保持自由精神(be free)并继续支持如同 KDE 一样的开源的自由软件发展。 + +-------------------------------------------------------------------------------- + +via: [https://tlhp.cf/kde-history/](https://tlhp.cf/kde-history/) + +作者:[Pavlo Rudyi][a] +译者:[jerryling315](https://github.com/jerryling315) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]: https://www.kde.org/ +[2]: https://en.wikipedia.org/wiki/KDE_Plasma_5 +[a]: https://tlhp.cf/author/paul/ diff --git a/published/201601/20150921 14 tips for teaching open source development.md b/published/201601/20150921 14 tips for teaching open source development.md new file mode 100644 index 0000000000..2d5cfaf302 --- /dev/null +++ b/published/201601/20150921 14 tips for teaching open source development.md @@ -0,0 +1,88 @@ +在大学培养学生们参与开源代码开发的十四个技巧 +================================================================================ + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/education/EDU_TeachingOS.png) + +学术界是培养和塑造未来的开源开发者的最佳平台。研究中发现,我们偶尔会开源自己编写的软件。这样做有两个理由,一是为了推广自己编写的工具的使用,二是为了了解人们使用这些工具时会遇到哪些问题。在这样一个编写研究软件的背景下,我的任务就是为 Bradford 大学重新设计二年级的本科软件工程课程。 + +这是一个挑战,因为我所面对的 80 个学生是来自不同专业的,包括 IT、商务计算和软件工程,这些学生将要在一起上课。最有难度的是,需要和这些编程经验差距很大的学生一起编写代码。按照传统,该课程允许学生选择自己的小组,然后给他们布置构建一个加油站数据库系统的任务,最后提交报告作为评估的一部分。 + +而我决定重新设计课程,让学生了解现实中的软件团队是如何协作的过程。根据学生的专业和编程技能,我将他们分为五、六个人一组。这是为了确保每个小组的整体水平相当,避免小组之间的不等。 + +### 核心课程 ### + +课程的形式改为讲座和实践课两项结合在一起。然而实践课作为指导过程,主要是老师监督各个小组的实践进度以及他们如何处理客户和产品之间的关系。而传统的教学方式由项目管理、软件测试、工程需求分析以及类似主题的讲座组成,再辅以实践和导师会议。这些会议可以很好的考核学生的水平以及检测出他们是否可以跟得上我们在讲座部分中的软件工程方法。本年的教学主题包括以下内容: + +- 工程需求分析 +- 如何与客户及其他团队成员互动 +- 程序设计方法,如敏捷和极限编程方法 +- 如何通过学习不同的软件工程方法进行短期的水平提高 +- 小组会议及文档编写 +- 项目管理及项目进展图表(甘特图) +- UML 图表及系统描述 +- 使用 Git 来进行代码的版本控制 +- 软件测试及 BUG 跟踪 +- 使用开源库 +- 开源代码许可及其选择 +- 软件交付 + +在这些讲座之后,会有一些来自世界各地的嘉宾为我们说说他们在软件交付过程中的经验。我们也设法请来大学里知识产权律师谈关于软件在英国的知识产权问题,以及如何处理软件的知识产权问题。 + +### 协作工具 ### + +为了让上述教学内容的顺利进行,我们将会引入一些工具,并训练学生在他们的项目中使用这些工具。如下: + +- Google Drive:团队与导师之间进行共享的工具,暂时存储用于描述项目的文档和图表、需求收集、会议纪要以及项目时间跟踪等信息。采取这样一个方式来监控并提供直接反馈到每个团队,是非常有效的。 +- [Basecamp][1]:同样是用于分享文档,在随后的课程中,我们可能会考虑用它取代 Google Drive。 +- BUG 报告工具,如 [Mantis][2]:只能让有限的用户免费提交 BUG。稍后我们提到的 Git 可以让小组内的所有人员用做 BUG 提交。 +- 远程视频会议工具:在人员不在校内,甚至去了其他城市的情况下使用。学生们可以定期通过 Skype 来交流并记录会议内容或则进行录音作为今后其他用处。 +- 同时,学生们的项目中还会用到大量的开源工具包。他们可以根据自己小组的项目需求来选择自己使用的工具包和编程语言。唯一的条件是,这些项目必须开源,最后成果可以安装到大学里的实验室,并且大多的研究人员都非常支持这个条件。 +- 最后,所有团队必须向客户交付他们的项目,包括完整的可以工作的软件版本、文档和他们自己选择的开放源码许可。大多数的团队选择了 GPLv3 许可证。 + +### 技巧和经验教训 ### + +在最后,这一年过的很愉快,并且所有学生的项目都做的非常棒。这里有一些我学到的经验教训,可能有助于提高明年的课程质量: + +1. 提供各种各样有趣的选择项目给学生选择。比如说,游戏开发或者移动应用开发以及完成各种目标的项目等。建立普通的数据库系统已经不能提起学生的兴趣了,而参与到有趣的项目中去,学生本身就是自学者,同时可以帮助解决小组成员和小组之间的常见问题。再通过一个消息列表,学生们发表他们在测试中遇到的任何问题,以寻求其他人的帮助建议。然而,这种方法有一个缺点。外部考官建议我们使用统一种类型的项目和统一的编程语言以帮助缩小对学生的评估标准。 + +2. 定期给学生在每一个阶段的表现进行反馈。比方说,可以在和各个小组开指导会议的时候,或者每个阶段进行反馈,以帮助他们在接下来的工作中自我改进。 + +3. 学生更加愿意与校外的客户一起协作。他们期待着与外部公司代表或校外人员协作,不过是为了获得新体验而已。与导师进行交流时,他们都能够表现得很专业,这样使得老师非常放心。 + +4. 很多团队版将开发单元测试的部分放到项目结束之后,从极限编程方法的角度来说,这是一个严重的禁忌。也许测试应包括在不同阶段的评估中,来提醒他们需要并行开展软件开发和单元测试。 + +5. 在这个班的 80 个人里边,仅有 4 个女生,每个女生都分在不同的小组里边。我观察到,男生们总是充分准备好来承担起领队角色,并将最有趣的代码部分留给他们自己来编写,女生则多大遵循安排或者是编写文档。出于某种原因,女生选择不出头,即使在女性辅导员鼓励下,她们也不愿编写代码。这仍然是一个需要解决的主要问题。 + +6. 允许不同风格项目文档,比方说,UML 图表、状态图或其他形式的。让学生学习这些并与其他课程融汇贯通来提高他们的学习经验。 + +7. 学生里边,有些是很好的开发人员,有些做商务计算的则没有多少编程经验。我们要鼓励团队共同努力,避免开发人员做得比那些只做会议记录或文档的其他成员更好的错误认知。我们常在辅导课程中鼓励角色转换,让每个人都有机会学习如何编程。 + +8. 小组与导师每周见面沟通是非常重要的,可以有效监督各个小组进展情况,还可以了解是谁做了大部分工作。通常,没来参加会议的小组成员基本就是没有参与到他们的团队工作中去的,并且通过其他成员所提交的工作报告也可以确定哪些人不活跃。 + +9. 我们鼓励学生们把许可证附加到项目中去,使用外部库以及和客户协作的时候要表明确切知识产权问题。 这样可让打破陈规,开拓思维,并了解真实的软件交付问题。 + +10. 给学生们自己选择所用技术的空间。 + +11. 助教是关键。同时管理 80 个学生显然很有难度,特别是需要对他们进行评估的那几周。明年我一定会找个助教来帮我一起管理各个小组。 + +12. 实验室的技术支持是非常重要的。大学里的技术支持人员对于本课程是非常赞同的。他们正在考虑明年将虚拟机分配给每个团队,这样没个团队可以根据需要自行在虚拟机中安装任何软件。 + +13. 团队合作,相互帮助。大多数团队自然而然的支持其他团队成员,同时指导员在中间也帮助了不少。 + +14. 来自其他同事的帮助会锦上添花。作为一名新的大学导师,我需要从经验中学习,如果我想了解如何管理某些学生和团队,或者对如何让学生适应课程感到困惑时,我会通过多个方面来寻求建议。来自资深同事的支持对我来说是一种极大的鼓励。 + +最后,对于作为导师的我以及所有的学生来说,这都是个有趣的课程。在学习目标和传统评分方案上还有有一些问题需解决,以减少教师的工作量。明年,我计划会保留这种教学模式,并希望能够提出更好的评分方案以及引入更多的软件来帮助监督项目和控制代码版本。 + +-------------------------------------------------------------------------------- + +via: http://opensource.com/education/15/9/teaching-open-source-development-undergraduates + +作者:[Mariam Kiran][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[Caroline](https://github.com/carolinewuyan) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://opensource.com/users/mariamkiran +[1]:https://basecamp.com/ +[2]:https://www.mantisbt.org/ diff --git a/published/201601/20151012 Remember sed and awk All Linux admins should.md b/published/201601/20151012 Remember sed and awk All Linux admins should.md new file mode 100644 index 0000000000..346557684b --- /dev/null +++ b/published/201601/20151012 Remember sed and awk All Linux admins should.md @@ -0,0 +1,66 @@ +sed 和 awk,所有的 Linux 管理员都应该会的技能! +========================== + +![](http://images.techhive.com/images/article/2015/03/linux-100573790-primary.idge.jpg) + +*图片来源: Shutterstock* + +**我们不要让下一代 Linux 和 Unix 的管理员忘记初始化脚本和基本工具的好处** + +我曾经有一次在 Reddit 看到一个帖子,“[请问如何操作文本文件][1]”。这是一个很简单的需求,就像我们常用 Unix 的人每天遇到的一样。他的问题是,如何删除文件中的重复行,只保留不重复的。 这听起来似乎很简单,但是当文件足够大时,就会有些复杂。 + +这个问题有很多种不同的答案。你可以使用几乎任何一种语言来写这样的一个脚本,只是时间的投入和代码的复杂性不同罢了。根据你的个人水平,它大概会花费20-60分钟。但是如果你使用了 Perl、Python、Ruby 中的一种,你可能很快实现它。 + +或者你可以使用下面的一个方法,让你无比暖心的: 只用 awk。 + +这个答案是迄今为止最简明、最简单的解决问题的方法。它只要一行! + +``` +awk '!seen[$0]++' +``` + +让我们来看看发生了什么: + +在这个命令中,其实隐藏了很多代码。awk 是一种文本处理语言,并且它内部有很多预设。首先,你看到的实际上是一个 for 循环的结果。awk 假定你想通过循环处理输入文件的每一行,所以你不需要明确的去指定它。awk 还假定了你需要打印输出处理后的数据,所以你也不需要去指定它。最后,awk 假定循环在最后一句指令执行完结束,这一块也不再需要你去指定它。 + +这个例子中的字符串 seen 是一个关联数组的名字。$0 是一个变量,表示整个当前行。所以,这个命令翻译成人类语言就是“对这个文件的每一行进行检查,如果你之前没有见过它,就打印出来。” 如果该关联数组的键名还不存在就添加到数组,并增加其取值,这样 awk 下次遇到同样的行时就会不匹配(条件判断为“假”),从而不打印出来。 + +一些人认为这样是优雅的,另外的人认为这可能会造成混淆。任何在日常工作上使用 awk 的都是第一类人。awk 就是设计用来做这个的。在 awk 中,你可以写多行代码。你甚至可以[用 awk 写一些让人不安的复杂功能][2]。但终究来说,awk 还是一个进行文本处理的程序,一般是通过管道。去掉(没必要的)循环定义是很常见的快捷用法,不过如果你乐意,你也可以用下面的代码做同样的事情: + + +``` +awk '{ if (!seen[$0]) print $0; seen[$0]++ }’ +``` + +这会产生相同的结果。 + +awk 是完成这项工作的完美工具。不过,我相信很多管理员--特别是新管理员会转而使用 [Bash][3] 或 Python 来完成这一任务,因为对 awk 的知识和对它的能力的了解看起来随着时间而慢慢被人淡忘。我认为这是标志着一个问题,由于对之前的解决方案缺乏了解,那些已经解决了几十年的问题又突然出现了。 + +shell、grep、sed 和 awk 是 Unix 的基础。如果你不能非常轻松的使用它们,你将会被自己束缚住,因为它们构成了通过命令行和脚本与 Unix 系统交互的基础。学习这些工具如何工作最好的方法之一就是观察真实的例子和实验,你可以在各种 Unix 衍生系统的初始化系统中找到很多,但在 Linux 发行版中它们已经被 [systemd][4] 取代了。 + +数以百万计的 Unix 管理员了解 Shell 脚本和 Unix 工具如何读、写、修改和用在初始化脚本上。不同系统的初始化脚本有很大不同,甚至是不同的 Linux 发行版也不同。但是它们都源自 sh,而且它们都用像 sed、awk 还有 grep 这样的核心的命令行工具。 + +我每天都会听到很多人抱怨初始化脚本太“古老”而且很“难”。但是实际上,初始化脚本和 Unix 管理员每天使用的工具一样,还提供了一个非常好的方式来更加熟悉和习惯这些工具。说初始化脚本难于阅读和难于使用实际上是承认你缺乏对 Unix 基础工具的熟悉。 + +说起在 Reddit 上看到的内容,我也碰到过这个问题,来自一个新入行的 Linux 系统管理员, “[问他是否应该还要去学老式的初始化系统 sysvinit][5]”。 这个帖子的大多数的答案都是正面的——是的,应该学习 sysvinit 和 systemd 两个。一位评论者甚至指出,初始化脚本是学习 Bash 的好方法。而另一个消息是,Fortune 50 强的公司还没有计划迁移到以 systemd 为基础的发行版上。 + +但是,这提醒了我这确实是一个问题。如果我们继续沿着消除脚本和脱离操作系统核心组件的方式发展下去,由于疏于接触,我们将会不经意间使新管理员难于学习基本的 Unix 工具。 + +我不知道为什么有些人想在一层又一层的抽象化来掩盖 Unix 内部,但是这样发展下去可能会让新一代的系统管理员们变成只会按下按钮的工人。我觉得这不是一件好事情。 + +------ + +via: http://www.infoworld.com/article/2985804/linux/remember-sed-awk-linux-admins-should.html + +作者:[Paul Venezia][a] +译者:[Bestony](https://github.com/Bestony) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.infoworld.com/author/Paul-Venezia/ +[1]: https://www.reddit.com/r/linuxadmin/comments/3lwyko/how_do_i_remove_every_occurence_of_duplicate_line/ +[2]: http://intro-to-awk.blogspot.com/2008/08/awk-more-complex-examples.html +[3]: http://www.infoworld.com/article/2613338/linux/linux-how-to-script-a-bash-crash-course.html +[4]: http://www.infoworld.com/article/2608798/data-center/systemd--harbinger-of-the-linux-apocalypse.html +[5]: https://www.reddit.com/r/linuxadmin/comments/3ltq2y/when_i_start_learning_about_linux_administration/ diff --git a/published/201601/20151013 DFileManager--Cover Flow File Manager.md b/published/201601/20151013 DFileManager--Cover Flow File Manager.md new file mode 100644 index 0000000000..31e953c8da --- /dev/null +++ b/published/201601/20151013 DFileManager--Cover Flow File Manager.md @@ -0,0 +1,64 @@ +DFileManager:封面流(CoverFlow)文件管理器 +================================================================================ + +这个一个 Ubuntu 标准软件仓库中缺失的像宝石般的、有着其独特的功能的文件管理器。这是 DFileManager 在推特中的宣称。 + +有一个不好回答的问题,如何知道到底有多少个 Linux 的开源软件?好奇的话,你可以在 Shell 里输入如下命令: + + ~$ for f in /var/lib/apt/lists/*Packages; do printf '%5d %s\n' $(grep '^Package: ' "$f" | wc -l) ${f##*/} done | sort -rn + +在我的 Ubuntu 15.04 系统上,产生结果如下: + +![Ubuntu 15.04 Packages](http://www.linuxlinks.com/portal/content/reviews/FileManagers/UbuntuPackages.png) + +正如上面的截图所示,在 Universe 仓库中,大约有39000个包,在 main 仓库中大约有8500个包。这听起来很多。但是这些包括了开源应用、工具、库,有很多不是由 Ubuntu 开发者打包的。更重要的是,有很多重要的软件不在库中,只能通过源代码编译。DFileManager 就是这样一个软件。它是仍处在开发早期的一个基于 QT 的跨平台文件管理器。QT提供单一源码下的跨平台可移植性。 + +现在还没有二进制文件包,用户需要编译源代码才行。对于一些工具来说,这个可能会产生很大的问题,特别是如果这个应用依赖于某个复杂的依赖库,或者需要与已经安装在系统中的软件不兼容的某个版本。 + +### 安装 ### + +幸运的是,DFileManager 非常容易编译。对于我的老 Ubutnu 机器来说,在开发者网站上的安装介绍提供了大部分的重要步骤,不过少量的基础包没有列出(为什么总是这样?虽然许多库会让文件系统变得一团糟!)。在我的系统上,从github 下载源代码并且编译这个软件,我在 Shell 里输入了以下命令: + + ~$ sudo apt-get install qt5-default qt5-qmake libqt5x11extras5-dev + ~$ git clone git://git.code.sf.net/p/dfilemanager/code dfilemanager-code + ~$ cd dfilemananger-code + ~$ mkdir build + ~$ cd build + ~$ cmake ../ -DCMAKE_INSTALL_PREFIX=/usr + ~$ make + ~$ sudo make install + +你可以通过在shell中输入如下命令来启动它: + + ~$ dfm + +下面是运行中的 DFileManager,完全展示了其最吸引人的地方:封面流(Cover Flow)视图。可以在当前文件夹的项目间滑动,提供了一个相当有吸引力的体验。这是看图片的理想选择。这个文件管理器酷似 Finder(苹果操作系统下的默认文件管理器),可能会吸引你。 + +![DFileManager in action](http://www.linuxlinks.com/portal/content/reviews/FileManagers/Screenshot-dfm.png) + +### 特点: ### + +- 4种视图:图标、详情、列视图和封面流 +- 按位置和设备归类书签 +- 标签页 +- 简单的搜索和过滤 +- 自定义文件类型的缩略图,包括多媒体文件 +- 信息栏可以移走 +- 单击打开文件和目录 +- 可以排队 IO 操作 +- 记住每个文件夹的视图属性 +- 显示隐藏文件 + +DFileManager 不是 KDE 的 Dolphin 的替代品,但是能做相同的事情。这个是一个真正能够帮助人们的浏览文件的文件管理器。还有,别忘了反馈信息给开发者,任何人都可以做出这样的贡献。 + +-------------------------------------------------------------------------------- + +via: http://gofk.tumblr.com/post/131014089537/dfilemanager-cover-flow-file-manager-a-real-gem + +作者:[gofk][a] +译者:[bestony](https://github.com/bestony) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://gofk.tumblr.com/ diff --git a/published/201601/20151107 Hackers Successfully Install Linux on a Potato.md b/published/201601/20151107 Hackers Successfully Install Linux on a Potato.md new file mode 100644 index 0000000000..b35220730b --- /dev/null +++ b/published/201601/20151107 Hackers Successfully Install Linux on a Potato.md @@ -0,0 +1,32 @@ +黑客们成功地在土豆上安装了 Linux ! +================================================================================ + +来自荷兰阿姆斯特丹的消息称,LinuxOnAnything.nl 网站的黑客们成功地在土豆上安装了 Linux!这是该操作系统第一次在根用蔬菜(root vegetable)上安装成功(LCTT 译注:root vetetable,一语双关,root 在 Linux 是指超级用户)。 + +![Linux Potato](http://www.bbspot.com/Images/News_Features/2008/12/linux-potato.jpg) + +“土豆没有 CPU,内存和存储器,这真的是个挑战,” Linux On Anything (LOA) 小组的 Johan Piest 说。“显然我们不能使用一个像 Fedora 或 Ubuntu 这些体量较大的发行版,所以我们用的是 Damn Small Linux。” + +在尝试了几周之后,LOA 小组的的同学们弄出了一个适合土豆的 Linux 内核,这玩艺儿上面可以用 vi 来编辑小的文本文件。这个 Linux 通过一个小型的 U 盘加载到土豆上,并通过一组红黑线以二进制的方式向这个土豆发送命令。 + +LOA 小组是一个不断壮大的黑客组织的分支;这个组织致力于将 Linux 安装到所有物体上;他们先是将 Linux 装到Gameboy 和 iPod 等电子产品上,不过最近他们在挑战一些高难度的东西,譬如将Linux安装到灯泡和小狗身上! + +LOA 小组在与另一个黑客小组 Stuttering Monarchs 竞赛,看谁先拿到土豆这一分。“土豆是一种每个人都会接触到的蔬菜,它的用途就像 Linux 一样极其广泛。无论你是想煮捣烹炸还是别的都可以” Piest 说道,“你也许认为我们完成这个挑战是为了获得某些好处,而我们只是追求逼格而已。” + +LOA 是第一个将 Linux 安装到一匹设德兰矮种马上的小组,但这五年来竞争愈演愈烈,其它黑客小组的进度已经反超了他们。 + +“我们本来可以成为在饼干上面安装 Linux 的第一个小组,但是那群来自挪威的混蛋把我们击败了。” Piest 说。 + +第一个成功安装了 Linux 的蔬菜是一头卷心菜,它是由一个土耳其的一个黑客小组完成的。 + +(好啦——是不是已经目瞪口呆,事实上,这是一篇好几年前的恶搞文,你看出来了吗?哈哈哈哈) + +-------------------------------------------------------------------------------- + +via: http://www.bbspot.com/news/2008/12/linux-on-a-potato.html + +作者:[Brian Briggs](briggsb@bbspot.com) +译者:[StdioA](https://github.com/StdioA), [hittlle](https://github.com/hittlle) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md b/published/201601/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md similarity index 62% rename from translated/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md rename to published/201601/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md index 524fc1e2c1..7dbeb72f95 100644 --- a/translated/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md +++ b/published/201601/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md @@ -1,12 +1,13 @@ -如何在 Ubuntu / Fedora / Debian 中安装 GitLab +如何在 Ubuntu/Fedora/Debian 中安装 GitLab ================================================================================ -在 Git 问世之前,分布式版本控制从来都不是一件简单的事。Git 是一个免费、开源的软件,旨在轻松且快速地对从小规模到非常巨大的项目进行管理。Git 最开始由 Linus Torvalds 开发,他同时也是著名的 Linux 内核的创建者。在 git 和分布式版本控制系统领域中,[GitLab][1] 是一个极棒的新产品。它是一个基于 web 的 Git 仓库管理应用,包含代码审查、wiki、问题跟踪等诸多功能。使用 GitLab 可以很方便、快速地创建、审查、部署及托管代码。与 Github 类似,尽管它也提供在其官方的服务器托管免费的代码仓库,但它也可以运行在我们自己的服务器上。GitLab 有两个不同的版本:社区版(Community Edition)和企业版(Enterprise Edition)。社区本完全免费且开源,遵循 MIT 协议;而企业版则遵循一个专有的协议,包含一些社区版中没有的功能。下面介绍的是有关如何在我们自己的运行着 Ubuntu、Fedora 或 Debian 操作系统的机子上安装 GitLab 社区版的简单步骤。 + +在 Git 问世之前,分布式版本控制从来都不是一件简单的事。Git 是一个自由开源的软件,旨在轻松且快速地对从小规模到非常巨大的项目进行管理。Git 最开始由 Linus Torvalds 开发,他同时也是著名的 Linux 内核的创建者。在 git 和分布式版本控制系统领域中,[GitLab][1] 是一个极棒的新产品。它是一个基于 web 的 Git 仓库管理应用,包含代码审查、wiki、问题跟踪等诸多功能。使用 GitLab 可以很方便、快速地创建、审查、部署及托管代码。尽管它在其官方的服务器提供了与 Github 类似的免费托管的代码仓库,但它也可以运行在我们自己的服务器上。GitLab 有两个不同的版本:社区版(Community Edition)和企业版(Enterprise Edition)。社区版本完全免费且开源,遵循 MIT 协议;而企业版则遵循一个专有的协议,包含一些社区版中没有的功能。下面介绍的是有关如何在我们自己的运行着 Ubuntu、Fedora 或 Debian 操作系统的机器上安装 GitLab 社区版的简单步骤。 ### 1. 安装先决条件 ### -首先,我们需要安装 GitLab 所依赖的软件包。我们将安装 `curl`,用以下载我们所需的文件;安装`openssh-server` ,以此来通过 ssh 协议登陆到我们的机子上;安装`ca-certificates`,用它来添加 CA 认证;以及 `postfix`,把它作为一个 MTA(Mail Transfer Agent,邮件传输代理)。 +首先,我们需要安装 GitLab 所依赖的软件包。我们将安装 `curl`,用以下载我们所需的文件;安装`openssh-server` ,以此来通过 ssh 协议登录到我们的机器上;安装`ca-certificates`,用它来添加 CA 认证;以及 `postfix`,把它作为一个 MTA(Mail Transfer Agent,邮件传输代理)。 -注: 若要安装 GitLab 社区版,我们需要一个至少包含 2 GB 内存和 2 核 CPU 的 linux 机子。 +注: 若要安装 GitLab 社区版,我们需要一个至少包含 2 GB 内存和 2 核 CPU 的 linux 机器。 #### 在 Ubuntu 14 .04/Debian 8.x 中 #### @@ -18,7 +19,7 @@ #### 在 Fedora 22 中 #### -在 Fedora 22 中,由于 `yum` 已经被弃用了,所以默认的包管理器是 `dnf`。为了安装上面那些需要的软件包,我们只需运行下面的 dnf 命令: +在 Fedora 22 中,由于 `yum` 已经被弃用了,默认的包管理器是 `dnf`。为了安装上面那些需要的软件包,我们只需运行下面的 dnf 命令: # dnf install curl openssh-server postfix @@ -26,11 +27,11 @@ ### 2. 打开并开启服务 ### -现在,我们将使用我们默认的 init 系统来打开 sshd 和 postfix 服务。并且我们将使得它们在每次系统启动时被自动开启。 +现在,我们将使用我们默认的初始化系统来打开 sshd 和 postfix 服务。并且我们将使得它们在每次系统启动时被自动开启。 #### 在 Ubuntu 14.04 中 #### -由于 SysVinit 在 Ubuntu 14.04 中作为 init 系统被安装,我们将使用 service 命令来开启 sshd 和 postfix 守护进程: +由于在 Ubuntu 14.04 中安装的是 SysVinit 初始化系统,我们将使用 service 命令来开启 sshd 和 postfix 守护进程: # service sshd start # service postfix start @@ -42,24 +43,24 @@ #### 在 Fedora 22/Debian 8.x 中 #### -鉴于 Fedora 22 和 Debi 8.x 已经用 Systemd 代替了 SysVinit 来作为默认的 init 系统,我们只需运行下面的命令来开启 sshd 和 postfix 服务: +鉴于 Fedora 22 和 Debian 8.x 已经用 Systemd 代替了 SysVinit 来作为默认的初始化系统,我们只需运行下面的命令来开启 sshd 和 postfix 服务: # systemctl start sshd postfix -现在,为了使得它们在每次开机启动时被自动地开启,我们需要运行下面的 systemctl 命令: +现在,为了使得它们在每次开机启动时可以自动运行,我们需要运行下面的 systemctl 命令: # systemctl enable sshd postfix - 从 /etc/systemd/system/multi-user.target.wants/sshd.service 建立软链接到 /usr/lib/systemd/system/sshd.service. - 从 /etc/systemd/system/multi-user.target.wants/postfix.service 建立软链接到 /usr/lib/systemd/system/postfix.service. + Created symlink from /etc/systemd/system/multi-user.target.wants/sshd.service to /usr/lib/systemd/system/sshd.service. + Created symlink from /etc/systemd/system/multi-user.target.wants/postfix.service to /usr/lib/systemd/system/postfix.service. ### 3. 下载 GitLab ### -现在,我们将使用 curl 从官方的 GitLab 社区版仓库下载二进制安装文件。首先,为了得到所需文件的下载链接,我们需要浏览到该软件仓库的页面。为此,我们需要在运行着相应操作系统的 linux 机子上运行下面的命令。 +现在,我们将使用 curl 从官方的 GitLab 社区版仓库下载二进制安装文件。首先,为了得到所需文件的下载链接,我们需要浏览到该软件仓库的页面。为此,我们需要在运行着相应操作系统的 linux 机器上运行下面的命令。 #### 在 Ubuntu 14.04 中 #### -由于 Ubuntu 和 Debian 使用相同格式的 debian 文件,我们需要在 [https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs][2] 下搜索所需版本的 GitLab,然后点击有着 ubuntu/trusty 标签的链接,这是因为我们运作着 Ubuntu 14.04。接着一个新的页面将会出现,我们将看到一个下载按钮,然后我们在它的上面右击,得到文件的链接,然后像下面这样使用 curl 来下载它。 +由于 Ubuntu 和 Debian 使用相同的 debian 格式的安装包,我们需要在 [https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs][2] 下搜索所需版本的 GitLab,然后点击有着 ubuntu/trusty 标签的链接,即我们运行着的 Ubuntu 14.04。接着一个新的页面将会出现,我们将看到一个下载按钮,然后我们在它的上面右击,得到文件的链接,然后像下面这样使用 curl 来下载它。 # curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/trusty/gitlab-ce_8.1.2-ce.0_amd64.deb @@ -67,7 +68,7 @@ #### 在 Debian 8.x 中 #### -与 Ubuntu 类似,我们需要在 [https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs][3] 页面中搜索所需版本的 GitLab,然后点击带有 debian/jessie 标签的链接,这是因为我们运行的是 Debian 8.x。接着,一个新的页面将会出现,然后我们在下载按钮上右击,得到文件的下载链接。最后我们像下面这样使用 curl 来下载该文件。 +与 Ubuntu 类似,我们需要在 [https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs][3] 页面中搜索所需版本的 GitLab,然后点击带有 debian/jessie 标签的链接,即我们运行着的 Debian 8.x。接着,一个新的页面将会出现,然后我们在下载按钮上右击,得到文件的下载链接。最后我们像下面这样使用 curl 来下载该文件。 # curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/jessie/gitlab-ce_8.1.2-ce.0_amd64.deb/download @@ -83,11 +84,11 @@ ### 4. 安装 GitLab ### -在相应的软件源被添加到我们的 linux 机子上之后,现在我们将使用相应 linux 发行版本中的默认包管理器来安装 GitLab 社区版。 +在相应的软件源被添加到我们的 linux 机器上之后,现在我们将使用相应 linux 发行版本中的默认包管理器来安装 GitLab 社区版。 #### 在 Ubuntu 14.04/Debian 8.x 中 #### -要在运行着 Ubuntu 14.04 或 Debian 8.x linux 发行版本的机子上安装 GitLab 社区版,我们只需运行如下的命令: +要在运行着 Ubuntu 14.04 或 Debian 8.x linux 发行版本的机器上安装 GitLab 社区版,我们只需运行如下的命令: # dpkg -i gitlab-ce_8.1.2-ce.0_amd64.deb @@ -95,7 +96,7 @@ #### 在 Fedora 22 中 #### -我们只需执行下面的 dnf 命令来在我们的 Fedora 22 机子上安装 GitLab。 +我们只需执行下面的 dnf 命令来在我们的 Fedora 22 机器上安装 GitLab。 # dnf install gitlab-ce-8.1.2-ce.0.el7.x86_64.rpm @@ -103,7 +104,7 @@ ### 5. 配置和开启 GitLab ### -由于 GitLab 社区版已经成功地安装在我们的 linux 系统中了,接下来我们将要配置和开启它了。为此,我们需要运行下面的命令,这在 Ubuntu、Debian 和 Fedora 发行版本上都一样: +GitLab 社区版已经成功地安装在我们的 linux 系统中了,接下来我们将要配置和开启它了。为此,我们需要运行下面的命令,这在 Ubuntu、Debian 和 Fedora 发行版本上都一样: # gitlab-ctl reconfigure @@ -111,19 +112,19 @@ ### 6. 允许通过防火墙 ### -假如在我们的 linux 机子中已经启用了防火墙程序,为了使得 GitLab 社区版的 web 界面可以通过网络进行访问,我们需要允许 80 端口通过防火墙,这个端口是 GitLab 社区版的默认端口。为此,我们需要运行下面的命令。 +假如在我们的 linux 机器中已经启用了防火墙程序,为了使得 GitLab 社区版的 web 界面可以通过网络进行访问,我们需要允许 80 端口通过防火墙,这个端口是 GitLab 社区版的默认端口。为此,我们需要运行下面的命令。 -#### 在 Iptables 中 #### +#### 在 iptables 中 #### -Ubuntu 14.04 默认安装和使用 Iptables。所以,我们将运行下面的 iptables 命令来打开 80 端口: +Ubuntu 14.04 默认安装和使用的是 iptables。所以,我们将运行下面的 iptables 命令来打开 80 端口: # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT # /etc/init.d/iptables save -#### 在 Firewalld 中 #### +#### 在 firewalld 中 #### -由于 Fedora 22 和 Debian 8.x 默认安装了 systemd,它包含了作为防火墙程序的 firewalld。为了使得 80 端口(http 服务) 能够通过 firewalld,我们需要执行下面的命令。 +由于 Fedora 22 和 Debian 8.x 默认安装了 systemd,它包含了作为防火墙程序的 firewalld。为了使得 80 端口(http 服务) 能够通过 firewalld,我们需要执行下面的命令。 # firewall-cmd --permanent --add-service=http @@ -139,13 +140,13 @@ Ubuntu 14.04 默认安装和使用 Iptables。所以,我们将运行下面的 ![Gitlab Login Screen](http://blog.linoxide.com/wp-content/uploads/2015/10/gitlab-login-screen.png) -现在,为了登陆进面板,我们需要点击登陆按钮,它将询问我们的用户名和密码。然后我们将输入默认的用户名和密码,即 **root** 和 **5iveL!fe** 。在登陆进控制面板后,我们将被强制要求为我们的 GitLab root 用户输入新的密码。 +现在,为了登录进面板,我们需要点击登录按钮,它将询问我们的用户名和密码。然后我们将输入默认的用户名和密码,即 **root** 和 **5iveL!fe** 。在登录进控制面板后,我们将被强制要求为我们的 GitLab root 用户输入新的密码。 ![Setting New Password Gitlab](http://blog.linoxide.com/wp-content/uploads/2015/10/setting-new-password-gitlab.png) ### 8. 创建仓库 ### -在我们成功地更改密码并登陆到我们的控制面板之后,现在,我们将为我们的新项目创建一个新的仓库。为此,我们需要来到项目栏,然后点击 **新项目** 绿色按钮。 +在我们成功地更改密码并登录到我们的控制面板之后,现在,我们将为我们的新项目创建一个新的仓库。为此,我们需要来到项目栏,然后点击 **新项目** 绿色按钮。 ![Creating New Projects](http://blog.linoxide.com/wp-content/uploads/2015/10/creating-new-projects.png) @@ -153,13 +154,15 @@ Ubuntu 14.04 默认安装和使用 Iptables。所以,我们将运行下面的 ![Creating New Project](http://blog.linoxide.com/wp-content/uploads/2015/10/configuring-git-project.png) -做完这些后,我们将能够使用任何包含基本 git 命令行的 Git 客户端来访问我们的 Git 仓库。我们可以看到在仓库中进行的任何活动,例如创建一个里程碑,管理 issue,合并请求,管理成员,便签,Wiki 等。 +做完这些后,我们将能够使用任何包含基本 git 命令行的 Git 客户端来访问我们的 Git 仓库。我们可以看到在仓库中进行的任何活动,例如创建一个里程碑,管理问题,合并请求,管理成员,便签,Wiki 等。 ![Gitlab Menu](http://blog.linoxide.com/wp-content/uploads/2015/10/gitlab-menu.png) ### 总结 ### -GitLab 是一个用来管理 git 仓库的很棒的开源 web 应用。它有着漂亮,响应式的带有诸多酷炫功能的界面。它还打包有许多酷炫功能,例如管理群组,分发密钥,连续集成,查看日志,广播消息,钩子,系统 OAuth 应用,模板等。(注:OAuth 是一个开放标准,允许用户让第三方应用访问该用户在某一网站上存储的私密的资源(如照片,视频,联系人列表),而无需将用户名和密码提供给第三方应用。--- 摘取自 [维基百科上的 OAuth 词条](https://zh.wikipedia.org/wiki/OAuth)) 它还可以和大量的工具进行交互如 Slack,Hipchat,LDAP,JIRA,Jenkins,很多类型的钩子和一个完整的 API。它至少需要 2 GB 的内存和 2 核 CPU 来流畅运行,支持多达 500 个用户,但它也可以被扩展到多个活动的服务器上。假如你有任何的问题,建议,回馈,请将它们写在下面的评论框中,以便我们可以提升或更新我们的内容。谢谢! +GitLab 是一个用来管理 git 仓库的很棒的开源 web 应用。它有着漂亮的带有诸多酷炫功能的响应式界面。它还打包有许多酷炫功能,例如管理群组,分发密钥,持续集成,查看日志,广播消息,钩子,系统 OAuth 应用,模板等。(注:OAuth 是一个开放标准,允许用户让第三方应用访问该用户在某一网站上存储的私密的资源(如照片,视频,联系人列表),而无需将用户名和密码提供给第三方应用。--- 摘取自 [维基百科上的 OAuth 词条](https://zh.wikipedia.org/wiki/OAuth)) 它还可以和大量的工具进行交互如 Slack,Hipchat,LDAP,JIRA,Jenkins,有很多类型的钩子和完整的 API。它至少需要 2 GB 的内存和 2 核 CPU 来流畅运行,支持多达 500 个用户,但它也可以被扩展到多个工作服务器上。 + +假如你有任何的问题,建议,回馈,请将它们写在下面的评论框中,以便我们可以提升或更新我们的内容。谢谢! -------------------------------------------------------------------------------- @@ -167,7 +170,7 @@ via: http://linoxide.com/linux-how-to/install-gitlab-on-ubuntu-fedora-debian/ 作者:[Arun Pyasi][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/201601/20151117 Linux 101--Get the most out of Systemd.md b/published/201601/20151117 Linux 101--Get the most out of Systemd.md new file mode 100644 index 0000000000..b0df8fdfb9 --- /dev/null +++ b/published/201601/20151117 Linux 101--Get the most out of Systemd.md @@ -0,0 +1,171 @@ +Linux 101:最有效地使用 Systemd +================================================================================ +干嘛要这么做? + +- 理解现代 Linux 发行版中的显著变化; +- 看看 Systemd 是如何取代 SysVinit 的; +- 搞定单元(unit)和新的 journal 日志。 + +吐槽邮件、人身攻击、死亡威胁——Lennart Poettering,Systemd 的作者,对收到这些东西早就习以为常了。这位 Red Hat 公司的员工之前在 Google+ 上怒斥 FOSS 社区([http://tinyurl.com/poorlennart][1])的本质,悲痛且失望地表示:“那真是个令人恶心的地方”。他着重指出 Linus Torvalds 在邮件列表上言辞极其刻薄的帖子,并谴责这位内核的领导者为在线讨论定下基调,并使得人身攻击及贬抑之辞成为常态。 + +但为何 Poettering 会遭受如此多的憎恨?为何就这么个搞搞开源软件的人要忍受这等愤怒?答案就在于他的软件的重要性。如今大多数发行版中,Systemd 是 Linux 内核发起的第一个程序,并且它还扮演多种角色。它会启动系统服务、处理用户登录,每隔特定的时间执行一些任务,还有很多很多。它在不断地成长,并逐渐成为 Linux 的某种“基础系统”——提供系统启动和发行版维护所需的所有工具。 + +如今,在以下几点上 Systemd 颇具争议:它逃避了一些已经确立的 Unix 传统,例如纯文本的日志文件;它被看成是个“大一统”的项目,试图接管一切;它还是我们这个操作系统的支柱的重要革新。然而大多数主流发行版已经接受了(或即将接受)它,因此它就活了下来。而且它确实是有好处的:更快地启动,更简单地管理那些有依赖的服务程序,提供强大且安全的日志系统等。 + +因此在这篇教程中,我们将探索 Systemd 的特性,并向您展示如何最有效地利用这些特性。即便您此刻并不是这款软件的粉丝,读完本文后您至少可以更加了解和适应它。 + +![](http://narf-archive.com/pix/bd0fb252416206158627fb0b1bff9b4779dca13f.gif) + +*这部没正经的动画片来自[http://tinyurl.com/m2e7mv8][2],它把 Systemd 塑造成一只狂暴的动物,吞噬它路过的一切。大多数批评者的言辞可不像这只公仔一样柔软。* + +### 启动及服务 ### + +大多数主流发行版要么已经采用 Systemd,要么即将在下个发布中采用(如 Debian 和 Ubuntu)。在本教程中,我们使用 Fedora 21(该发行版已经是 Systemd 的优秀实验场地)的一个预览版进行演示,但不论您用哪个发行版,要用到的命令和注意事项都应该是一样的。这是 Systemd 的一个加分点:它消除了不同发行版之间许多细微且琐碎的区别。 + +在终端中输入 `ps ax | grep systemd`,看到第一行,其中的数字 **1** 表示它的进程号是1,也就是说它是 Linux 内核发起的第一个程序。因此,内核一旦检测完硬件并组织好了内存,就会运行 `/usr/lib/systemd/systemd` 可执行程序,这个程序会按顺序依次发起其他程序。(在还没有 Systemd 的日子里,内核会去运行 `/sbin/init`,随后这个程序会在名为 SysVinit 的系统中运行其余的各种启动脚本。) + +Systemd 的核心是一个叫*单元* (unit)的概念,它是一些存有关于服务(service)(在运行在后台的程序)、设备、挂载点、和操作系统其他方面信息的配置文件。Systemd 的其中一个目标就是简化这些事物之间的相互作用,因此如果你有程序需要在某个挂载点被创建或某个设备被接入后开始运行,Systemd 可以让这一切正常运作起来变得相当容易。(在没有 Systemd 的日子里,要使用脚本来把这些事情调配好,那可是相当丑陋的。)要列出您 Linux 系统上的所有单元,输入以下命令: + + systemctl list-unit-files + +现在,`systemctl` 是与 Systemd 交互的主要工具,它有不少选项。在单元列表中,您会注意到这儿有一些格式化:被使能(enabled)的单元显示为绿色,被禁用(disabled)的显示为红色。标记为“static”的单元不能直接启用,它们是其他单元所依赖的对象。若要限制输出列表只包含服务,使用以下命令: + + systemctl list-unit-files --type=service + +注意,一个单元显示为“enabled”,并不等于对应的服务正在运行,而只能说明它可以被开启。要获得某个特定服务的信息,以 GDM (Gnome Display Manager) 为例,输入以下命令: + + systemctl status gdm.service + +这条命令提供了许多有用的信息:一段给人看的服务描述、单元配置文件的位置、启动的时间、进程号,以及它所从属的 CGroups(用以限制各组进程的资源开销)。 + +如果您去查看位于 `/usr/lib/systemd/system/gdm.service` 的单元配置文件,您可以看到各种选项,包括要被运行的二进制文件(“ExecStart”那一行),相冲突的其他单元(即不能同时进入运行的单元),以及需要在本单元执行前进入运行的单元(“After”那一行)。一些单元有附加的依赖选项,例如“Requires”(必要的依赖)和“Wants”(可选的依赖)。 + +此处另一个有趣的选项是: + + Alias=display-manager.service + +当您启动 **gdm.service** 后,您将可以通过 `systemctl status display-manager.service` 来查看它的状态。当您知道有*显示管理程序* (display manager)在运行并想对它做点什么,但您不关心那究竟是 GDM,KDM,XDM 还是什么别的显示管理程序时,这个选项会非常有用。 + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/status-large.jpg) + +*使用 systemctl status 命令后面跟一个单元名,来查看对应的服务有什么情况。* + +### “目标(target)”锁定 ### + +如果您在 `/usr/lib/systemd/system` 目录中输入 `ls` 命令,您将看到各种以 `.target` 结尾的文件。*启动目标* (target)是一种将多个单元聚合在一起以致于将它们同时启动的方式。例如,对大多数类 Unix 操作系统而言有一种“多用户(multi-user)”状态,意思是系统已被成功启动,后台服务正在运行,并且已准备好让一个或多个用户登录并工作——至少在文本模式下。(其他状态包括用于进行管理工作的单用户(single-user)状态,以及用于机器关机的重启(reboot)状态。) + +如果您打开 **multi-user.target** 文件一探究竟,您可能期待看到的是一个要被启动的单元列表。但您会发现这个文件内部几乎空空如也——其实,一个服务会通过 **WantedBy** 选项让自己成为启动目标的依赖。因此如果您去打开 **avahi-daemon.service**, **NetworkManager.service** 及其他 **.service** 文件看看,您将在 Install 段看到这一行: + + WantedBy=multi-user.target + +因此,切换到多用户启动目标会使能(enable)那些包含上述语句的单元。还有其他一些启动目标可用(例如 **emergency.target** 提供一个紧急情况使用的 shell,以及 **halt.target** 用于机器关机),您可以用以下方式轻松地在它们之间切换: + + systemctl isolate emergency.target + +在许多方面,这些都很像 SysVinit 中的*运行级* (runlevel),如文本模式的 **multi-user.target** 类似于第3运行级,**graphical.target** 类似于第5运行级,**reboot.target** 类似于第6运行级,诸如此类。 + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/unit-large.jpg) + +**与传统的脚本相比,单元配置文件也许看起来很陌生,但并不难以理解。** + +### 开启与停止 ### + +现在您也许陷入了沉思:我们已经看了这么多,但仍没看到如何停止和开启服务!这其实是有原因的。从外部看,Systemd 也许很复杂,像野兽一般难以驾驭。因此在您开始摆弄它之前,有必要从宏观的角度看看它是如何工作的。实际用来管理服务的命令非常简单: + + systemctl stop cups.service + systemctl start cups.service + +(若某个单元被禁用了,您可以先通过 `systemctl enable` 加上该单元名的方式将其使能。这种做法会为该单元创建一个符号链接,并将其放置在当前启动目标的 `.wants` 目录下,这些 `.wants` 目录在`/etc/systemd/system` 文件夹中。) + +还有两个有用的命令是 `systemctl restart` 和 `systemctl reload`,后面接单元名。后者用于让单元重新加载它的配置文件。Systemd 的绝大部分都有良好的文档,因此您可以查看手册 (`man systemctl`) 了解每条命令的细节。 + +### 定时器单元:取代 Cron ### + +除了系统初始化和服务管理,Systemd 还染指了其他方面。在很大程度上,它能够完成 **cron** 的工作,而且可以说是以更灵活的方式(并带有更易读的语法)。**cron** 是一个以规定时间间隔执行任务的程序——例如清除临时文件,刷新缓存等。 + +如果您再次进入 `/usr/lib/systemd/system` 目录,您会看到那儿有多个 `.timer` 文件。用 `less` 来查看这些文件,您会发现它们与 `.service` 和 `.target` 文件有着相似的结构,而区别在于 `[Timer]` 段。举个例子: + + [Timer] + OnBootSec=1h + OnUnitActiveSec=1w + +**OnBootSec** 选项告诉 Systemd 在系统启动一小时后启动这个单元。第二个选项的意思是:自那以后每周启动这个单元一次。关于定时器有大量选项您可以设置,输入 `man systemd.time` 查看完整列表。 + +Systemd 的时间精度默认为一分钟。也就是说,它会在设定时刻的一分钟内运行单元,但不一定精确到那一秒。这么做是基于电源管理方面的原因,但如果您需要一个没有任何延时且精确到毫秒的定时器,您可以添加以下一行: + + AccuracySec=1us + +另外, **WakeSystem** 选项(可以被设置为 true 或 false)决定了定时器是否可以唤醒处于休眠状态的机器。 + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/systemd_gui-large.jpg) + +*有一个 Systemd 的图形界面程序,即便它已有多年未被积极维护。* + +### 日志文件:向 journald 问声好 ### + +Systemd 的第二个主要部分是 journal 。这是个日志系统,类似于 syslog 但也有些显著区别。如果您是个 Unix 日志管理模式的粉丝,准备好出离愤怒吧:这是个二进制日志,因此您不能使用常规的命令行文本处理工具来解析它。这个设计决定不出意料地在网上引起了激烈的争论,但它的确有些优点。例如,日志可以被更系统地组织,带有更多的元数据,因此可以更容易地根据可执行文件名和进程号等过滤出信息。 + +要查看整个 journal,输入以下命令: + + journalctl + +像许多其他的 Systemd 命令一样,该命令将输出通过管道的方式引向 `less` 程序,因此您可以使用空格键向下滚动,键入`/`(斜杠)查找,以及其他熟悉的快捷键。您也能在此看到少许颜色,像红色的警告及错误信息。 + +以上命令会输出很多信息。为了限制其只输出本次启动的消息,使用如下命令: + + journalctl -b + +这就是 Systemd 大放异彩的地方!您想查看自上次启动以来的全部消息吗?试试 **journalctl -b -1** 吧。再上一次的?用 **-2** 替换 **-1** 吧。那自某个具体时间,例如2014年10月24日16:38以来的呢? + + journalctl -b --since=”2014-10-24 16:38” + +即便您对二进制日志感到遗憾,那依然是个有用的特性,并且对许多系统管理员来说,构建类似的过滤器比起写正则表达式而言容易多了。 + +我们已经可以根据特定的时间来准确查找日志了,那可以根据特定程序吗?对单元而言,试试这个: + + journalctl -u gdm.service + +(注意:这是个查看 X server 产生的日志的好办法。)那根据特定的进程号? + + journalctl _PID=890 + +您甚至可以请求只看某个可执行文件产生的消息: + + journalctl /usr/bin/pulseaudio + +若您想将输出的消息限制在某个优先级,可以使用 **-p** 选项。该选项参数为 0 的话只会显示紧急消息(也就是说,是时候向 **$DEITY** 祈求保佑了)(LCTT 译注: $DEITY 是一个计算机方面的幽默,DEITY 是指广义上的“神”,$前缀表示这是一个变量),为 7 的话会显示所有消息,包括调试消息。请查看手册 (`man journalctl`) 获取更多关于优先级的信息。 + +值得指出的是,您也可以将多个选项结合在一起,若想查看在当前启动中由 GDM 服务输出的优先级数小于等于 3 的消息,请使用下述命令: + + journalctl -u gdm.service -p 3 -b + +最后,如果您仅仅想打开一个随 journal 持续更新的终端窗口,就像在没有 Systemd 时使用 `tail` 命令实现的那样,输入 `journalctl -f` 就好了。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/10/journal-large.jpg) + +*二进制日志并不流行,但 journal 的确有它的优点,如非常方便的信息查找及过滤。* + +### 没有 Systemd 的生活?### + +如果您就是完全不能接受 Systemd,您仍然有一些主流发行版中的选择。尤其是 Slackware,作为历史最为悠久的发行版,目前还没有做出改变,但它的主要开发者并没有将其从未来规划中移除。一些不出名的发行版也在坚持使用 SysVinit 。 + +但这又将持续多久呢?Gnome 正越来越依赖于 Systemd,其他的主流桌面环境也会步其后尘。这也是引起 BSD 社区一阵恐慌的原因:Systemd 与 Linux 内核紧密相连,导致在某种程度上,桌面环境正变得越来越不可移植。一种折衷的解决方案也许会以 Uselessd ([http://uselessd.darknedgy.net][3]) 的形式到来:一种裁剪版的 Systemd,纯粹专注于启动和监控进程,而不消耗整个基础系统。 + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/gentoo-large.jpg) + +若您不喜欢 Systemd,可以尝试一下 Gentoo 发行版,它将 Systemd 作为初始化工具的一种选择,但并不强制用户使用 Systemd。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/linux-101-get-the-most-out-of-systemd/ + +作者:[Mike Saunders][a] +译者:[Ricky-Gong](https://github.com/Ricky-Gong) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/mike/ +[1]:http://tinyurl.com/poorlennart +[2]:http://tinyurl.com/m2e7mv8 +[3]:http://uselessd.darknedgy.net/ diff --git a/translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md b/published/201601/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md similarity index 87% rename from translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md rename to published/201601/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md index fd61e5a939..9c1465d255 100644 --- a/translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md +++ b/published/201601/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md @@ -1,6 +1,7 @@ 在 Ubuntu 15.10 上为单个网卡设置多个 IP 地址 ================================================================================ -有时候你可能想在你的网卡上使用多个 IP 地址。遇到这种情况你会怎么办呢?买一个新的网卡并分配一个新的 IP?不,这没有必要(至少在小网络中)。现在我们可以在 Ubuntu 系统中为一个网卡分配多个 IP 地址。想知道怎么做到的?跟着我往下看,其实并不难。 + +有时候你可能想在你的网卡上使用多个 IP 地址。遇到这种情况你会怎么办呢?买一个新的网卡并分配一个新的 IP?不,没有这个必要(至少在小型网络中)。现在我们可以在 Ubuntu 系统中为一个网卡分配多个 IP 地址。想知道怎么做到的?跟着我往下看,其实并不难。 这个方法也适用于 Debian 以及它的衍生版本。 @@ -12,7 +13,7 @@ sudo ip addr -**事例输出:** +**样例输出:** 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 @@ -31,7 +32,7 @@ sudo ifconfig -**事例输出:** +**样例输出:** enp0s3 Link encap:Ethernet HWaddr 08:00:27:2a:03:4b inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0 @@ -50,7 +51,7 @@ collisions:0 txqueuelen:0 RX bytes:38793 (38.7 KB) TX bytes:38793 (38.7 KB) -正如你在上面看到的,我的网卡名称是 **enp0s3**,它的 IP 地址是 **192.168.1.103**。 +正如你在上面输出中看到的,我的网卡名称是 **enp0s3**,它的 IP 地址是 **192.168.1.103**。 现在让我们来为网卡添加一个新的 IP 地址,例如说 **192.168.1.104**。 @@ -73,7 +74,7 @@ inet6 fe80::a00:27ff:fe2a:34e/64 scope link valid_lft forever preferred_lft forever -类似地,你可以添加想要的任意多的 IP 地址。 +类似地,你可以添加任意数量的 IP 地址,只要你想要。 让我们 ping 一下这个 IP 地址验证一下。 @@ -108,7 +109,7 @@ 可以看到已经没有了!! -也许你已经知道,你重启系统后会丢失这些设置。那么怎么设置才能永久有效呢?这也很简单。 +正如你所知,重启系统后这些设置会失效。那么怎么设置才能永久有效呢?这也很简单。 ### 添加永久 IP 地址 ### @@ -138,7 +139,7 @@ Ubuntu 系统的网卡配置文件是 **/etc/network/interfaces**。 sudo nano /etc/network/interfaces -按照黑色字体标注的添加额外的 IP 地址。 +如下添加额外的 IP 地址。 # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). @@ -154,7 +155,7 @@ Ubuntu 系统的网卡配置文件是 **/etc/network/interfaces**。 保存并关闭文件。 -无需重启运行下面的命令使更改生效。 +运行下面的命令使更改无需重启即生效。 sudo ifdown enp0s3 && sudo ifup enp0s3 @@ -182,7 +183,7 @@ Ubuntu 系统的网卡配置文件是 **/etc/network/interfaces**。 DHCPACK of 192.168.1.103 from 192.168.1.1 bound to 192.168.1.103 -- renewal in 35146 seconds. -**注意**:如果你从远程连接到服务器,把上面的两个命令放到**一行**中**非常重要**,因为第一个命令会断掉你的连接。而采用这种方式可以存活你的 ssh 会话。 +**注意**:如果你从远程连接到服务器,把上面的两个命令放到**一行**中**非常重要**,因为第一个命令会断掉你的连接。而采用这种方式可以保留你的 ssh 会话。 现在,让我们用下面的命令来检查一下是否添加了新的 IP: @@ -217,10 +218,9 @@ Ubuntu 系统的网卡配置文件是 **/etc/network/interfaces**。 想知道怎么给 CentOS/RHEL/Scientific Linux/Fedora 系统添加额外的 IP 地址,可以点击下面的链接。 -注:此篇文章以前做过选题:20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md -- [Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7][1] +- [在CentOS 7上给一个网卡分配多个IP地址][1] -周末愉快! +工作愉快! -------------------------------------------------------------------------------- @@ -228,9 +228,9 @@ via: http://www.unixmen.com/assign-multiple-ip-addresses-to-one-interface-on-ubu 作者:[SK][a] 译者:[ictlyh](http://mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.unixmen.com/author/sk/ -[1]:http://www.unixmen.com/linux-basics-assign-multiple-ip-addresses-single-network-interface-card-centos-7/ \ No newline at end of file +[1]:https://linux.cn/article-5127-1.html diff --git a/published/201601/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md b/published/201601/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md new file mode 100644 index 0000000000..2f934be732 --- /dev/null +++ b/published/201601/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md @@ -0,0 +1,131 @@ +如何在 Ubuntu 14/15 上配置 Apache Solr +================================================================================ + +大家好,欢迎来阅读我们今天这篇 Apache Solr 的文章。简单的来说,Apache Solr 是一个最负盛名的开源搜索平台,配合运行在网站后端的 Apache Lucene,能够让你轻松创建搜索引擎来搜索网站、数据库和文件。它能够索引和搜索多个网站并根据搜索文本的相关内容返回搜索建议。 + +Solr 使用 HTTP 可扩展标记语言(XML),可以为 JSON、Python 和 Ruby 等提供应用程序接口(API)。根据Apache Lucene 项目所述,Solr 提供了非常多的功能,很受管理员们的欢迎: + +- 全文检索 +- 分面导航(Faceted Navigation) +- 拼写建议/自动完成 +- 自定义文档排序/排列 + +#### 前提条件: #### + +在一个使用最小化安装包的全新 Ubuntu 14/15 系统上,你仅仅需要少量的准备,就开始安装 Apache Solor. + +### 1)System Update 系统更新### + +使用一个具有 sudo 权限的非 root 用户登录你的 Ubuntu 服务器,在接下来的所有安装和使用 Solr 的步骤中都会使用它。 + +登录成功后,使用下面的命令,升级你的系统到最新的更新及补丁: + + $ sudo apt-get update + +### 2) 安装 JRE### + +要安装 Solr,首先需要安装 JRE(Java Runtime Environment)作为基础环境,因为 solr 和 tomcat 都是基于Java.所以,我们需要安装最新版的 Java 并配置 Java 本地环境. + +要想安装最新版的 Java 8,我们需要通过以下命令安装 Python Software Properties 工具包 + + $ sudo apt-get install python-software-properties + +完成后,配置最新版 Java 8的仓库 + + $ sudo add-apt-repository ppa:webupd8team/java + +现在你可以通过以下命令更新包源列表,使用‘apt-get’来安装最新版本的 Oracle Java 8。 + + $ sudo apt-get update + + $ sudo apt-get install oracle-java8-installer + +在安装和配置过程中,点击'OK'按钮接受 Java SE Platform 和 JavaFX 的 Oracle 二进制代码许可协议(Oracle Binary Code License Agreement)。 + +在安装完成后,运行下面的命令,检查是否安装成功以及查看安装的版本。 + + kash@solr:~$ java -version + java version "1.8.0_66" + Java(TM) SE Runtime Environment (build 1.8.0_66-b17) + Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) + +执行结果表明我们已经成功安装了 Java,并达到安装 Solr 最基本的要求了,接着我们进行下一步。 + +### 安装 Solr### + +有两种不同的方式可以在 Ubuntu 上安装 Solr,在本文中我们只用最新的源码包来演示源码安装。 + +要使用源码安装 Solr,先要从[官网][1]下载最新的可用安装包。复制以下链接,然后使用 'wget' 命令来下载。 + + $ wget http://www.us.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz + +运行下面的命令,将这个已归档的服务解压到 /bin 目录。 + + $ tar -xzf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2 + +运行脚本来启动 Solr 服务,这将会先创建一个 solr 的用户,然后将 Solr 安装成服务。 + + $ sudo bash ./install_solr_service.sh solr-5.3.1.tgz + +![Solr 安装](http://blog.linoxide.com/wp-content/uploads/2015/11/12.png) + +使用下面的命令来检查 Solr 服务的状态。 + + $ service solr status + +![Solr 状态](http://blog.linoxide.com/wp-content/uploads/2015/11/22.png) + +### 创建 Solr 集合: ### + +我们现在可以使用 Solr 用户添加多个集合。就像下图所示的那样,我们只需要在命令行中指定集合名称和指定其配置集就可以创建多个集合了。 + + $ sudo su - solr -c "/opt/solr/bin/solr create -c myfirstcollection -n data_driven_schema_configs" + +![创建集合](http://blog.linoxide.com/wp-content/uploads/2015/11/32.png) + +我们已经成功的为我们的第一个集合创建了新核心实例目录,并可以将数据添加到里面。要查看库中的默认模式文件,可以在这里找到: '/opt/solr/server/solr/configsets/data_driven_schema_configs/conf' 。 + +### 使用 Solr Web### + +可以使用默认的端口8983连接 Apache Solr。打开浏览器,输入 http://your\_server\_ip:8983/solr 或者 http://your-domain.com:8983/solr. 确保你的防火墙允许8983端口. + + http://172.25.10.171:8983/solr/ + +![Web访问Solr](http://blog.linoxide.com/wp-content/uploads/2015/11/42.png) + +在 Solr 的 Web 控制台左侧菜单点击 'Core Admin' 按钮,你将会看见我们之前使用命令行方式创建的集合。你可以点击 'Add Core' 按钮来创建新的核心。 + +![添加核心](http://blog.linoxide.com/wp-content/uploads/2015/11/52.png) + +就像下图中所示,你可以选择某个集合并指向文档来向里面添加内容或从文档中查询数据。如下显示的那样添加指定格式的数据。 + + { + "number": 1, + "Name": "George Washington", + "birth_year": 1989, + "Starting_Job": 2002, + "End_Job": "2009-04-30", + "Qualification": "Graduation", + "skills": "Linux and Virtualization" + } + +添加文件后点击 'Submit Document'按钮. + +![添加文档](http://blog.linoxide.com/wp-content/uploads/2015/11/62.png) + +### 总结### + +在 Ubuntu 上安装成功后,你就可以使用 Solr Web 接口插入或查询数据。如果你想通过 Solr 来管理更多的数据和文件,可以创建更多的集合。希望你能喜欢这篇文章并且希望它能够帮到你。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/configure-apache-solr-ubuntu-14-15/ + +作者:[Kashif][a] +译者:[taichirain](https://github.com/taichirain) +校对:[Caroline](https://github.com/carolinewuyan) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/kashifs/ +[1]:http://lucene.apache.org/solr/ diff --git a/published/201601/20151125 Running a mainline kernel on a cellphone.md b/published/201601/20151125 Running a mainline kernel on a cellphone.md new file mode 100644 index 0000000000..0de1daf0c4 --- /dev/null +++ b/published/201601/20151125 Running a mainline kernel on a cellphone.md @@ -0,0 +1,45 @@ +为什么主线内核不能运行在我的手机上? +================== + +对于自由软件来说,其最大的自由之一就是能够用一个更新或修改的版本来替换原始版本的程序。尽管如此,数千万使用那些手机里面装着所谓 Linux 的用户却很少能够在他们的手机上运行主线内核(mainline kernel),即使他们拥有替换内核代码的专业技能。可悲的是,我们必须承认目前仍然没有可以运行主线内核的主流手机。在由 Rob Herring 主持的2015届内核峰会(Kernel Summit)上,与会人员共同探讨了这个问题,并进一步谈论了他们应该怎么做才能解决这个问题。 + +当主持人提问的时候,在座的大多数开发人员都表示他们更乐意在他们的手机上面运行主线内核,然而也有少数人持相反的看法。在 Project Ara 的支持下,Rob 在这个问题上已经研究了近一年半的时间(参见:https://lwn.net/Articles/648400/ )。但是最新的研究成果并不理想。 + +Rob 表示,通常手机上运行了太多的过期(out-of-tree)代码;主线内核只是缺少能使手机正常运行所必须的驱动。每台常规的手机都在运行着100万行到300万行的过期(out-of-tree)代码。几乎所有的这些手机的内核版本都不超过3.10,有一些甚至更加古老。造成这种情况的原因有很多,但是有一点是很清楚的,在手机的世界里,一切都变化的太快以至于无法跟上内核社区的步伐。如果真是那样,他问到,我们还担心什么呢? + +Tim Bird 指出,第一台 Android 手机 Nexus 1 从来没有运行过任何一个主线内核,并且以后也不会。它打破了开源的承诺,也使得用户不可能做到将一个新的内核放到手机中。从这一点上来说,没有任何一款手机支持这种能力。Peter Zijlstra 想知道从一台手机到另一台手机到底复制了多少能够工作的过期代码;Rob表示,迄今为止,他已经见到了三个独立开发的热插拔 [Governors][1]。 + +Dirk Hohndel 提出了很少有人注意到的建议。他说,对于世界上的数以亿计的手机,大约只有他们27个人关心他们的手机是否运行着主线内核。剩下的用户仅仅只是想让他们的手机正常工作。或许那些关注手机是否在运行主线内核的开发者正在努力去解决这个令人不解的问题。 + +Chris Mason 说,那些手机厂商当前正面临着相同类型的问题,而这些问题也是那些 Linux 发行版过去所面临过的问题。他们疲于应付大量的无效且重复和能被复用的工作。一旦这些发行版决定将他们的工作配合主线内核而不是使用自己维护的内核,那么问题将会变得好解决的多。解决问题的关键就是去帮助手机制造商们认识到他们可以通过同样的方式获得便利,形成这种认识的关键并不是通过来自用户的压力。这样一来,问题就可以解决了。 + +Grant Likely 提出了对于安全问题的担忧,这种担忧来自于那些不能升级他们的手机系统的 android 设备。他说,我们需要的是一个真正专为手机设立的发行版。但是,只要手机厂商仍然掌控着手机中的应用软件,那么手机的同步更新将无法实现。我们接下来将面临一个很大的安全难题。Peter 补充说,随着 [Stagefright 漏洞][2]的出现,难题已经出现在我们面前了。 + +Ted Ts'o 说,运行主线内核并不是他的主要关注点。他很乐于见到这个假期中所售卖的手机能够运行3.18或者4.1的内核,而不是继续停留在3.10。他认为这是一个更可能被解决的问题。Steve Rostedt 认为,按照 Ted Ts'o 所说的那样去做并不能解决手机的安全问题,但是,Ted 认为使用一个更新一些的内核至少可以让漏洞修复变得更加容易。Grant 对此回应说,接下来的一年里,这一切都将再次发生。过渡到更新的内核也是一个渐进式的对系统的完善。Kees Cook 补充说,我们无法从修复旧版本的内核漏洞的过程中得到太多的益处,真正的问题是我们没有对 bug 的应对措施(他会在今天的另外一个对话中讲到这个话题)。 + +Rob 说,任何一种解决方案都需要得到当前市场上的手机供应商的支持。否则,由于厂商对安装到他们生产的手机上的操作系统的封锁,运行主线内核的策略将会陷入麻烦。Paolo Bonzini 提问说是否可以因为那些没有修复的安全漏洞而控告手机厂商,尤其当手机仍然处于保修期内。Grant 认为对于手机的可更新能力(upgradeability)的保证必须来源于市场需求,否则是无法实现的。而促使它实现的原因可能会是一个严重的安全问题,然后用户开始对手机的可更新能力提出要求。同时,内核开发人员必须不断朝着这个方向努力。Rob 表示,除了到目前为止指出的所有优点之外,运行主线内核也能帮助开发者对安卓设备上的新特性进行测试和验证。 + +Josh Triplett 提问说,如果手机厂商提出对主线内核提供支持的想法,那么内核社区又将采取什么措施呢?那样将会针对手机各方面的特性要求对内核进行大量的测试和验证;[Android 的兼容性测试套件][3]中出现的失败将不得不被再次回归到内核。Rob 提议这个问题可以在明年讨论,即先将最基本的功能做好。但是,Josh 强调说,如果这个需求出现了,我们就应该能够给出一个好的答案。 + +Tim 认为,当前,我们和厂商之间存在很大的脱节。厂商根本不会主动报告或者贡献任何反馈给社区。他们之间完全脱节了,这样的话永远不会有进步。Josh 表示,当厂商们开始报告他们正在使用的旧内核的相关 bug 时,双方之间的接受度将变得更加友好。Arnd Bergmann 认为,我们需要的是得到一个大芯片厂商对使用主线内核的认可,并且将该厂商的硬件提升到能够支持主线内核的运行的这样一个水平,而这样将会在其他方面增加负担。但是,他补充说,实现这个目标要求存在一个跟随硬件一起分发的自由 GPU 驱动程序——然而这种程序当前并不存在。 + +Rob 给存在问题的领域列了一个清单,但是现在已经没有太多的时间去讨论其中的细节了。WiFi 驱动仍然是一个问题,尤其是当这个新特性被添加到 Android 设备上的时候。Johannes Berg 对新特性仍然存在问题表示赞同;Android 的开发人员甚至在这些新特性被应用到 Android 设备上之前都不会去谈论它们是否存在问题。然而,对这些特性中的大多数的技术支持最终都会落实在主线内核中。 + +随着会议逐渐接近尾声,Ben Herrenschmidt 再次重申:实现在 Android 手机上运行主线内核的关键还是在于让厂商认识到使用主线内核是它们获得最大利润的最好选择。从长远看,使用主线内核能节省大量的工作。Mark Brown 认为,以前,当搭载在 Android 设备上的内核版本以更稳定的方式向前推进的时候,上游工作的好处对运营商来说更加明显。以现在的情况来看,手机上的内核版本似乎停留在了3.10,那种压力是不一样的。 + +这次谈话以开发者决定进一步改善当前的状况而结束,但是却并没有对如何改善提出一个明确的计划。 + +--------------------------------------------------------------------------------- + +via: https://lwn.net/Articles/662147/ + +作者:[Jonathan Corbet][a] +译者:[kylepeng93](https://github.com/kylepeng93) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://lwn.net/Articles/KernelSummit2015/ +[1]:http://androidmodguide.blogspot.com/p/blog-page.html +[2]:https://lwn.net/Articles/652728/ +[3]:https://source.android.com/compatibility/cts/index.html diff --git a/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md b/published/201601/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md similarity index 52% rename from translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md rename to published/201601/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md index 83877c8488..bf97fc16d7 100644 --- a/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md +++ b/published/201601/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md @@ -1,61 +1,61 @@ - -如何在FreeBSD 10.2上安装Nginx作为Apache的反向代理 +如何在 FreeBSD 10.2 上安装 Nginx 作为 Apache 的反向代理 ================================================================================ -Nginx是一款免费的,开源的HTTP和反向代理服务器, 以及一个代理POP3/IMAP的邮件服务器. Nginx是一款高性能的web服务器,其特点是丰富的功能,简单的结构以及低内存的占用. 第一个版本由 Igor Sysoev在2002年发布,然而到现在为止很多大的科技公司都在使用,包括 Netflix, Github, Cloudflare, WordPress.com等等 -在这篇教程里我们会 "**在freebsd 10.2系统上,安装和配置Nginx网络服务器作为Apache的反向代理**". Apache 会用PHP在8080端口上运行,并且我们需要在80端口配置Nginx的运行,用来接收用户/访问者的请求.如果网页的用户请求来自于浏览器的80端口, 那么Nginx会用Apache网络服务器和PHP来通过这个请求,并运行在8080端口. +Nginx 是一款自由开源的 HTTP 和反向代理服务器,也可以用作 POP3/IMAP 的邮件代理服务器。Nginx 是一款高性能的 web 服务器,其特点是功能丰富,结构简单以及内存占用低。 第一个版本由 Igor Sysoev 发布于2002年,到现在有很多大型科技公司在使用,包括 Netflix、 Github、 Cloudflare、 WordPress.com 等等。 -#### 前提条件 #### +在这篇教程里我们会“**在 freebsd 10.2 系统上,安装和配置 Nginx 网络服务器作为 Apache 的反向代理**”。 Apache 将在8080端口上运行 PHP ,而我们会配置 Nginx 运行在80端口以接收用户/访问者的请求。如果80端口接收到用户浏览器的网页请求,那么 Nginx 会将该请求传递给运行在8080端口上的 Apache 网络服务器和 PHP。 -- FreeBSD 10.2. -- Root 权限. +#### 前提条件 #### + +- FreeBSD 10.2 +- Root 权限 ### 步骤 1 - 更新系统 ### -使用SSH证书登录到你的FreeBSD服务器以及使用下面命令来更新你的系统 : +使用 SSH 认证方式登录到你的 FreeBSD 服务器,使用下面命令来更新你的系统: freebsd-update fetch freebsd-update install ### 步骤 2 - 安装 Apache ### -Apache是现在使用范围最广的网络服务器以及开源的HTTP服务器.在FreeBSD里Apache是未被默认安装的, 但是我们可以直接从端口下载,或者解压包在"/usr/ports/www/apache24" 目录下,再或者直接从PKG命令的FreeBSD系统信息库安装。在本教程中,我们将使用PKG命令从FreeBSD的库中安装: +Apache 是开源的、使用范围最广的 web 服务器。在 FreeBSD 里默认没有安装 Apache, 但是我们可以直接通过 /usr/ports/www/apache24 下的 ports 或软件包来安装,也可以直接使用 pkg 命令从 FreeBSD 软件库中安装。在本教程中,我们将使用 pkg 命令从 FreeBSD 软件库中安装: pkg install apache24 ### 步骤 3 - 安装 PHP ### -一旦成功安装Apache, 接着将会安装PHP并由一个用户处理一个PHP的文件请求. 我们将会用到如下的PKG命令来安装PHP : +一旦成功安装 Apache,接着将会安装 PHP ,它来负责处理用户对 PHP 文件的请求。我们将会用到如下的 pkg 命令来安装 PHP: pkg install php56 mod_php56 php56-mysql php56-mysqli ### 步骤 4 - 配置 Apache 和 PHP ### -一旦所有都安装好了, 我们将会配置Apache在8080端口上运行, 并让PHP与Apache一同工作. 为了配置Apache,我们可以编辑 "httpd.conf"这个配置文件, 然而PHP我们只需要复制PHP的配置文件 php.ini 在 "/usr/local/etc/"目录下. +一旦所有都安装好了,我们将会配置 Apache 运行在8080端口上, 并让 PHP 与 Apache 一同工作。 要想配置Apache,我们可以编辑“httpd.conf”这个配置文件, 对于 PHP 我们只需要复制 “/usr/local/etc/”目录下的 PHP 配置文件 php.ini。 -进入到 "/usr/local/etc/" 目录 并且复制 php.ini-production 文件到 php.ini : +进入到“/usr/local/etc/”目录,并且复制 php.ini-production 文件到 php.ini : cd /usr/local/etc/ cp php.ini-production php.ini -下一步, 在Apache目录下通过编辑 "httpd.conf"文件来配置Apache : +下一步,在 Apache 目录下通过编辑“httpd.conf”文件来配置 Apache: cd /usr/local/etc/apache24 nano -c httpd.conf -端口配置在第 **52**行 : +端口配置在第**52**行 : Listen 8080 -服务器名称配置在第 **219** 行: +服务器名称配置在第**219**行: ServerName 127.0.0.1:8080 -在第 **277**行,如果目录需要,添加的DirectoryIndex文件,Apache将直接作用于它 : +在第**277**行,添加 DirectoryIndex 文件,Apache 将用它来服务对目录的请求: DirectoryIndex index.php index.html -在第 **287**行下,配置Apache通过添加脚本来支持PHP : +在第**287**行下,配置 Apache ,添加脚本支持: SetHandler application/x-httpd-php @@ -64,49 +64,49 @@ Apache是现在使用范围最广的网络服务器以及开源的HTTP服务器. SetHandler application/x-httpd-php-source -保存然后退出. +保存并退出。 -现在用sysrc命令,来添加Apache作为开机启动项目 : +现在用 sysrc 命令,来添加 Apache 为开机启动项目: sysrc apache24_enable=yes -然后用下面的命令测试Apache的配置 : +然后用下面的命令测试 Apache 的配置: apachectl configtest -如果到这里都没有问题的话,那么就启动Apache吧 : +如果到这里都没有问题的话,那么就启动 Apache 吧: service apache24 start -如果全部完毕, 在"/usr/local/www/apache24/data" 目录下,创建一个phpinfo文件是验证PHP在Apache下完美运行的好方法 : +如果全部完毕,在“/usr/local/www/apache24/data”目录下创建一个 phpinfo 文件来验证 PHP 在 Apache 下顺利运行: cd /usr/local/www/apache24/data echo "" > info.php -现在就可以访问 freebsd 的服务器 IP : 192.168.1.123:8080/info.php. +现在就可以访问 freebsd 的服务器 IP : 192.168.1.123:8080/info.php 。 ![Apache and PHP on Port 8080](http://blog.linoxide.com/wp-content/uploads/2015/11/Apache-and-PHP-on-Port-8080.png) -Apache 是使用 PHP 在 8080端口下运行的. +Apache 及 PHP 运行在 8080 端口。 ### 步骤 5 - 安装 Nginx ### -Nginx 以低内存的占用作为一款高性能的web服务器以及反向代理服务器.在这个步骤里,我们将会使用Nginx作为Apache的反向代理, 因此让我们用pkg命令来安装它吧 : +Nginx 可以以较低内存占用提供高性能的 Web 服务器和反向代理服务器。在这个步骤里,我们将会使用 Nginx 作为Apache 的反向代理,因此让我们用 pkg 命令来安装它吧: pkg install nginx ### 步骤 6 - 配置 Nginx ### -一旦 Nginx 安装完毕, 在 "**nginx.conf**" 文件里,我们需要做一个新的配置文件来替换掉原来的nginx文件. 更改到 "/usr/local/etc/nginx/"目录下 并且默认备份到 nginx.conf 文件: +一旦 Nginx 安装完毕,在“**nginx.conf**”文件里,我们需要做一个新的配置文件来替换掉原来的 nginx 配置文件。切换到“/usr/local/etc/nginx/”目录下,并且备份默认 nginx.conf 文件: cd /usr/local/etc/nginx/ mv nginx.conf nginx.conf.oroginal -现在就可以创建一个新的 nginx 配置文件了 : +现在就可以创建一个新的 nginx 配置文件了: nano -c nginx.conf -然后粘贴下面的配置: +然后粘贴下面的配置: user www; worker_processes 1; @@ -164,14 +164,14 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代 } -保存退出. +保存并退出。 -下一步, 在nginx目录下面,创建一个 **proxy.conf** 文件,使其作为反向代理 : +下一步,在 nginx 目录下面,创建一个 **proxy.conf** 文件,使其作为反向代理 : cd /usr/local/etc/nginx/ nano -c proxy.conf -粘贴如下配置 : +粘贴如下配置: proxy_buffering on; proxy_redirect off; @@ -186,27 +186,27 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代 proxy_buffers 100 8k; add_header X-Cache $upstream_cache_status; -保存退出. +保存并退出。 -最后一步, 为 nginx 的高速缓存创建一个 "/var/nginx/cache"的新目录 : +最后一步,为 nginx 的高速缓存创建一个“/var/nginx/cache”的新目录: mkdir -p /var/nginx/cache ### 步骤 7 - 配置 Nginx 的虚拟主机 ### -在这个步骤里面,我们需要创建一个新的虚拟主机域 "saitama.me", 以跟文件 "/usr/local/www/saitama.me" 和日志文件一同放在 "/var/log/nginx" 目录下. +在这个步骤里面,我们需要创建一个新的虚拟主机域“saitama.me”,其文档根目录为“/usr/local/www/saitama.me”,日志文件放在“/var/log/nginx”目录下。 -我们必须做的第一件事情就是创建新的目录来存放虚拟主机文件, 在这里我们将用到一个"**vhost**"的新文件. 并创建它 : +我们必须做的第一件事情就是创建新的目录来存放虚拟主机配置文件,我们创建的新目录名为“**vhost**”。创建它: cd /usr/local/etc/nginx/ mkdir vhost -创建好vhost 目录, 那么我们就进入这个目录并创建一个新的虚拟主机文件. 这里我取名为 "**saitama.conf**" : +创建好 vhost 目录,然后我们就进入这个目录并创建一个新的虚拟主机文件。这里我取名为“**saitama.conf**”: cd vhost/ nano -c saitama.conf -粘贴如下虚拟主机的配置 : +粘贴如下虚拟主机的配置: server { # Replace with your freebsd IP @@ -252,67 +252,67 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代 } -保存退出. +保存并退出。 -下一步, 为nginx和虚拟主机创建一个新的日志目录 "/var/log/" : +下一步,为 nginx 和虚拟主机创建一个新的日志目录“/var/log/”: mkdir -p /var/log/nginx/ -如果一切顺利, 在文件的根目录下创建文件 saitama.me : +如果一切顺利,在文件的根目录下创建目录 saitama.me 用作文档根: cd /usr/local/www/ mkdir saitama.me ### 步骤 8 - 测试 ### -在这个步骤里面,我们只是测试我们的nginx和虚拟主机的配置. +在这个步骤里面,我们只是测试我们的 nginx 和虚拟主机的配置。 -用如下命令测试nginx的配置 : +用如下命令测试 nginx 的配置: nginx -t -如果一切都没有问题, 用 sysrc 命令添加nginx为启动项,并且启动nginx和重启apache: +如果一切都没有问题,用 sysrc 命令添加 nginx 为开机启动项,并且启动 nginx 和重启 apache: sysrc nginx_enable=yes service nginx start service apache24 restart -一切完毕后, 在 saitama.me 目录下,添加一个新的phpinfo文件来验证php的正常运行 : +一切完毕后,在 saitama.me 目录下,添加一个新的 phpinfo 文件来验证 php 的正常运行: cd /usr/local/www/saitama.me echo "" > info.php -然后便访问这个文档 : **www.saitama.me/info.php**. +然后访问这个域名: **www.saitama.me/info.php**。 ![Virtualhost Configured saitamame](http://blog.linoxide.com/wp-content/uploads/2015/11/Virtualhost-Configured-saitamame.png) -Nginx 作为Apache的反向代理正在运行了,PHP也同样在进行工作了. +Nginx 作为 Apache 的反向代理运行了,PHP 也同样工作了。 -这是另一种结果 : +这是另一个结果: -Test .html 文件无缓存. +测试无缓存的 .html 文件。 curl -I www.saitama.me ![html with no-cache](http://blog.linoxide.com/wp-content/uploads/2015/11/html-with-no-cache.png) -Test .css 文件只有三十天的缓存. +测试有三十天缓存的 .css 文件。 curl -I www.saitama.me/test.css ![css file 30day cache](http://blog.linoxide.com/wp-content/uploads/2015/11/css-file-30day-cache.png) -Test .php 文件正常缓存 : +测试缓存的 .php 文件: curl -I www.saitama.me/info.php ![PHP file cached](http://blog.linoxide.com/wp-content/uploads/2015/11/PHP-file-cached.png) -全部完成. +全部搞定。 ### 总结 ### -Nginx 是最广泛的 HTTP 和反向代理的服务器. 拥有丰富的高性能和低内存/RAM的使用功能. Nginx使用了太多的缓存, 我们可以在网络上缓存静态文件使得网页加速, 并且在用户需要的时候再缓存php文件. 这样Nginx 的轻松配置和使用,可以让它用作HTTP服务器 或者 apache的反向代理. +Nginx 是最受欢迎的 HTTP 和反向代理服务器,拥有丰富的功能、高性能、低内存/RAM 占用。Nginx 也用于缓存, 我们可以在网络上缓存静态文件使得网页加速,并且缓存用户请求的 php 文件。 Nginx 容易配置和使用,可以将它用作 HTTP 服务器或者 apache 的反向代理。 -------------------------------------------------------------------------------- @@ -320,8 +320,8 @@ via: http://linoxide.com/linux-how-to/install-nginx-reverse-proxy-apache-freebsd 作者:[Arul][a] 译者:[KnightJoker](https://github.com/KnightJoker) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan),[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/arulm/ \ No newline at end of file +[a]:http://linoxide.com/author/arulm/ diff --git a/published/201601/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md new file mode 100644 index 0000000000..b48b9675a3 --- /dev/null +++ b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md @@ -0,0 +1,153 @@ +grep 命令系列:如何在 Linux/UNIX 中使用 grep 命令 +========================================== + +我该怎样在 Linux、Apple OS X 及其他类 UNIX 系统中使用 grep 命令,你能给我展示一些简单的例子吗? + +grep 命令用来搜索文本,或从给定的文件中搜索行内包含了给定字符串或单词的文件。通常来说,grep 显示匹配到的行。使用 grep 来搜索包括一个或多个正则表达式匹配到的文本行,然后只显示匹配到的行。grep 被视作在 Linux/ Unix 系统中最有用的命令之一。 + +### 你知道吗 ### + +grep 这个名字,来源于一个 Unix/Linux 中的古老的文本编辑器 ed 中执行相似操作的命令: + + g/re/p + +### grep 命令的语法 ### + +语法如下所示: + + grep 'word' 文件名 + grep 'word' 文件1 文件2 文件3 + grep '字符串1 字符串2' 文件名 + cat 某个文件 | grep '某个东西' + command | grep '某个东西' + command 选项1 | grep '数据' + grep --color '数据' 文件名 + +###怎么样使用 grep 来搜索一个文件### + +搜索 /etc/passwd 文件下的 boo 用户,输入: + + $ grep boo /etc/passwd + +输出内容: + + foo:x:1000:1000:foo,,,:/home/foo:/bin/ksh + +可以使用 grep 去强制忽略大小写。例如,使用 -i 选项可以匹配 boo, Boo, BOO 和其他组合: + + $ grep -i "boo" /etc/passwd + +### 递归使用 grep ### + +你可以递归地使用 grep 进行搜索。例如,在文件目录下面搜索所有包含字符串“192.168.1.5”的文件 + + $ grep -r "192.168.1.5" /etc/ + +或者是: + + $ grep -R "192.168.1.5" /etc/ + +示例输出: + + /etc/ppp/options:# ms-wins 192.168.1.50 + /etc/ppp/options:# ms-wins 192.168.1.51 + /etc/NetworkManager/system-connections/Wired connection 1:addresses1=192.168.1.5;24;192.168.1.2; + +你会看到搜索到 192.168.1.5 的结果每一行都前缀以找到匹配的文件名(例如:/etc/ppp/options)。输出之中包含的文件名可以加 -h 选项来禁止输出: + + $ grep -h -R "192.168.1.5" /etc/ + +或者 + + $ grep -hR "192.168.1.5" /etc/ + +示例输出: + + # ms-wins 192.168.1.50 + # ms-wins 192.168.1.51 + addresses1=192.168.1.5;24;192.168.1.2; + +### 使用 grep 去搜索文本 ### + +当你搜索 boo 时,grep 命令将会匹配 fooboo,boo123, barfoo35 和其他所有包含 boo 的字符串,你可以使用 -w 选项去强制只输出那些仅仅包含那个整个单词的行(LCTT译注:即该字符串两侧是英文单词分隔符,如空格,标点符号,和末端等,因此对中文这种没有断字符号的语言并不适用。)。 + + $ grep -w "boo" file + +### 使用 grep 命令去搜索两个不同的单词 ### + +使用 egrep 命令如下: + + $ egrep -w 'word1|word2' /path/to/file + +(LCTT 译注:这里使用到了正则表达式,因此使用的是 egrep 命令,即扩展的 grep 命令。) + +### 统计文本匹配到的行数 ### + +grep 命令可以通过加 -c 参数显示每个文件中匹配到的次数: + + $ grep -c 'word' /path/to/file + +传递 -n 选项可以输出的行前加入匹配到的行的行号: + + $ grep -n 'root' /etc/passwd + +示例输出: + + 1:root:x:0:0:root:/root:/bin/bash + 1042:rootdoor:x:0:0:rootdoor:/home/rootdoor:/bin/csh + 3319:initrootapp:x:0:0:initrootapp:/home/initroot:/bin/ksh + +### 反转匹配(不匹配) ### + +可以使用 -v 选项来输出不包含匹配项的内容,输出内容仅仅包含那些不含给定单词的行,例如输出所有不包含 bar 单词的行: + + $ grep -v bar /path/to/file + +### UNIX/Linux 管道与 grep 命令 ### + +grep 常常与管道一起使用,在这个例子中,显示硬盘设备的名字: + + # dmesg | egrep '(s|h)d[a-z]' + +显示 CPU 型号: + + # cat /proc/cpuinfo | grep -i 'Model' + +然而,以上命令也可以按照以下方法使用,不使用管道: + + # grep -i 'Model' /proc/cpuinfo + +示例输出: + + model : 30 + model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz + model : 30 + model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz + +### 如何仅仅显示匹配到内容的文件名字? ### + +使用 -l 选项去显示那些文件内容中包含 main() 的文件名: + + $ grep -l 'main' *.c + +最后,你可以强制 grep 以彩色输出: + + $ grep --color vivek /etc/passwd + +示例输出: + +![Grep command in action](http://files.cyberciti.biz/uploads/faq/2007/08/grep_command_examples.png) + + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/ + +作者:Vivek Gite +译者:[zky001](https://github.com/zky001) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +校对者ID: +[1]:http://bash.cyberciti.biz/guide/Pipes \ No newline at end of file diff --git a/published/201601/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md new file mode 100644 index 0000000000..11e656c666 --- /dev/null +++ b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md @@ -0,0 +1,240 @@ +grep 命令系列:grep 中的正则表达式 +================================================================================ + +在 Linux 、类 Unix 系统中我该如何使用 Grep 命令的正则表达式呢? + +Linux 附带有 GNU grep 命令工具,它支持扩展正则表达式(extended regular expressions),而且 GNU grep 在所有的 Linux 系统中都是默认有的。Grep 命令被用于搜索定位存储在您服务器或工作站上的任何信息。 + +### 正则表达式 ### + +正则表达式就是用于匹配每行输入的一种模式,模式是指一串字符序列。下面是范例: + + ^w1 + w1|w2 + [^ ] + +#### grep 正则表达式示例 #### + +在 /etc/passswd 目录中搜索 'vivek' + + grep vivek /etc/passwd + +输出例子: + + vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash + vivekgite:x:1001:1001::/home/vivekgite:/bin/sh + gitevivek:x:1002:1002::/home/gitevivek:/bin/sh + +搜索大小写任意的 vivek(即不区分大小写的搜索) + + grep -i -w vivek /etc/passwd + +搜索大小写任意的 vivek 或 raj + + grep -E -i -w 'vivek|raj' /etc/passwd + +上面最后的例子显示的,就是一个扩展的正则表达式的模式。 + +### 锚点 ### + +你可以分别使用 ^ 和 $ 符号来正则匹配输入行的开始或结尾。下面的例子搜索显示仅仅以 vivek 开始的输入行: + + grep ^vivek /etc/passwd + +输出例子: + + vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash + vivekgite:x:1001:1001::/home/vivekgite:/bin/sh + +你可以仅仅只搜索出以单词 vivek 开始的行,即不显示 vivekgit、vivekg 等(LCTT 译注:即该单词后面是空格、符号等英文的单词分隔符。) + + grep -w ^vivek /etc/passwd + +找出以单词 word 结尾的行: + + grep 'foo$' 文件名 + +匹配仅仅只包含 foo 的行: + + grep '^foo$' 文件名 + +如下所示的例子可以搜索空行: + + grep '^$' 文件名 + +### 字符类 ### + +匹配 Vivek 或 vivek: + + grep '[vV]ivek' 文件名 + +或者 + + grep '[vV][iI][Vv][Ee][kK]' 文件名 + +也可以匹配数字 (即匹配 vivek1 或 Vivek2 等等): + + grep -w '[vV]ivek[0-9]' 文件名 + +可以匹配两个数字字符(即 foo11、foo12 等): + + grep 'foo[0-9][0-9]' 文件名 + +不仅仅局限于数字,也能匹配至少一个字母的: + + grep '[A-Za-z]' 文件名 + +显示含有 "w" 或 "n" 字符的所有行: + + grep [wn] 文件名 + +放在括号内的表达式,即包在 "[:" 和 ":]" 之间的字符类的名字,它表示的是属于此类的所有字符列表。标准的字符类名称如下: + +- [:alnum:] - 字母数字字符 +- [:alpha:] - 字母字符 +- [:blank:] - 空字符: 空格键符 和 制表符 +- [:digit:] - 数字: '0 1 2 3 4 5 6 7 8 9' +- [:lower:] - 小写字母: 'a b c d e f g h i j k l m n o p q r s t u v w x y z' +- [:space:] - 空格字符: 制表符、换行符、垂直制表符、换页符、回车符和空格键符 +- [:upper:] - 大写字母: 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z' + +在这个例子所示的是匹配所有大写字母: + + grep '[:upper:]' 文件名 + +### 通配符 ### + +你可以使用 "." 来匹配单个字符。例子中匹配以 "b" 开头以 "t" 结尾的3个字符的单词: + + grep '\' 文件名 + +在这儿, + +- `\<` 匹配单词前面的空字符串 +- `\>` 匹配单词后面的空字符串 + +打印出只有两个字符的所有行: + + grep '^..$' 文件名 + +显示以一个点和一个数字开头的行: + + grep '^\.[0-9]' 文件名 + +#### 点字符转义 #### + +下面要匹配到 IP 地址为 192.168.1.254 的正则式是不正确的:(LCTT 译注:可以匹配到该 IP 地址,但是也有可能匹配到间隔符号不是点的类似格式) + + grep '192.168.1.254' /etc/hosts + +三个点字符都需要转义: + + grep '192\.168\.1\.254' /etc/hosts + +下面的例子只能匹配出 IP 地址:(LCTT 译注:实际上由于 IP 地址中数字的取值范围,该正则表达式并不精确) + + egrep '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' 文件名 + +### 怎么样搜索以 - 符号开头的匹配模式? ### + +要使用 -e 选项来搜索匹配 '--test--' 字符串,如果不使用 -e 选项,grep 命令会试图把 '--test--' 当作自己的选项参数来解析: + + grep -e '--test--' 文件名 + +### 怎么使用 grep 的“或”匹配? ### + +使用如下的语法: + + grep -E 'word1|word2' 文件名 + 或 + egrep 'word1|word2' 文件名 + +或者是 + + grep 'word1\|word2' 文件名 + +### 怎么使用 grep 的“和”匹配? ### + +使用下面的语法来显示既包含 'word1' 又包含 'word2' 的所有行 + + grep 'word1' 文件名 | grep 'word2' + +### 怎么样使用序列检测? ### + +使用如下的语法,您可以检测一个字符在序列中重复出现次数: + + {N} + {N,} + {min,max} + +要匹配字符 “v" 出现两次: + + egrep "v{2}" 文件名 + +下面的命令能匹配到 "col" 和 "cool" : + + egrep 'co{1,2}l' 文件名 + +下面的命令将会匹配出至少有三个 'c' 字符的所有行。 + + egrep 'c{3,}' 文件名 + +下面的例子会匹配 91-1234567890(即二个数字-十个数字) 这种格式的手机号。 + + grep "[[:digit:]]\{2\}[ -]\?[[:digit:]]\{10\}" 文件名 + +### 怎么样使 grep 命令高亮显示?### + +使用如下的语法: + + grep --color 正则表达式 文件名 + +### 怎么样仅仅只显示匹配出的字符,而不是匹配出的行? ### + +使用如下语法: + + grep -o 正则表达式 文件名 + +### 正则表达式限定符### + +| 限定符 | 描述| +|------|----| +|`.`|匹配任意的一个字符。| +|`?`|匹配前面的子表达式,最多一次。| +|`*`|匹配前面的子表达式零次或多次。| +|`+`|匹配前面的子表达式一次或多次。| +|`{N}`|匹配前面的子表达式 N 次。| +|`{N,}`|匹配前面的子表达式 N 次到多次。| +|`{N,M}`|匹配前面的子表达式 N 到 M 次,至少 N 次至多 M 次。| +|`-`|只要不是在序列开始、结尾或者序列的结束点上,表示序列范围。| +|`^`|匹配一行开始的空字符串;也表示字符不在要匹配的列表中。| +|`$`|匹配一行末尾的空字符串。| +|`\b`|匹配一个单词前后的空字符串。| +|`\B`|匹配一个单词中间的空字符串。| +|`\<`|匹配单词前面的空字符串。| +|`\>`|匹配单词后面的空字符串。| + +#### grep 和 egrep #### + +egrep 等同于 **grep -E** 。它会以扩展的正则表达式的模式来解释模式。下面来自 grep 的帮助页: + + 基本的正则表达式元字符 ?、+、 {、 |、 ( 和 ) 已经失去了它们原来的意义,要使用的话用反斜线的版本 \?、\+、\{、\|、\( 和 \) 来代替。 + 传统的 egrep 并不支持 { 元字符,一些 egrep 的实现是以 \{ 替代的,所以一个可移植的脚本应该避免在 grep -E 使用 { 符号,要匹配字面的 { 应该使用 [}]。 + GNU grep -E 试图支持传统的用法,如果 { 出在在无效的间隔规范字符串这前,它就会假定 { 不是特殊字符。 + 例如,grep -E '{1' 命令搜索包含 {1 两个字符的串,而不会报出正则表达式语法错误。 + POSIX.2 标准允许这种操作的扩展,但在可移植脚本文件里应该避免这样使用。 + +参考: + +- grep 和 regex 帮助手册页(7) +- grep 的 info 页 + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/grep-regular-expressions/ + +作者:Vivek Gite +译者:[runningwater](https://github.com/runningwater) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md similarity index 81% rename from translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md rename to published/201601/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md index 9af1afa163..ed44522d70 100644 --- a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md +++ b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md @@ -1,5 +1,6 @@ -使用 grep 命令来搜索多个单词/字符串模式 +grep 命令系列:使用 grep 命令来搜索多个单词 ================================================================================ + 要使用 grep 命令来搜索多个字符串或单词,我们该怎么做?例如我想要查找 /path/to/file 文件中的 word1、word2、word3 等单词,我怎么样命令 grep 查找这些单词呢? [grep 命令支持正则表达式][1]匹配模式。要使用多单词搜索,请使用如下语法: @@ -10,7 +11,7 @@ $ grep 'warning\|error\|critical' /var/log/messages -仅仅只是要匹配单词的话,可以加上 -w 选项参数: +仅仅只是要匹配单词(即该词两侧是单词分界符,针对西方以空格分隔的语言而言)的话,可以加上 -w 选项参数: $ grep -w 'warning\|error\|critical' /var/log/messages @@ -26,7 +27,7 @@ egrep 命令可以跳过上面的语法格式,其使用的语法格式如下 ![Fig.01: Linux / Unix egrep Command Search Multiple Words Demo Output](http://s0.cyberciti.org/uploads/faq/2008/04/egrep-words-output.png) -Fig.01: Linux / Unix egrep 命令查找多个单词输出例子 +图一: Linux / Unix egrep 命令查找多个单词输出例子 -------------------------------------------------------------------------------- @@ -34,8 +35,8 @@ via: http://www.cyberciti.biz/faq/searching-multiple-words-string-using-grep/ 作者:Vivek Gite 译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[1]:http://www.cyberciti.biz/faq/grep-regular-expressions/ \ No newline at end of file +[1]:https://linux.cn/article-6941-1.html \ No newline at end of file diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md similarity index 50% rename from sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md rename to published/201601/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md index c145320e5a..081ecdb9b6 100644 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md +++ b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md @@ -1,25 +1,25 @@ -(translating by runningwater) -Grep Count Lines If a String / Word Matches +grep 命令系列:用 grep 命令统计匹配字符串的行数 ================================================================================ -How do I count lines if given word or string matches for each input file under Linux or UNIX operating systems? -You need to pass the -c or --count option to suppress normal output. It will display a count of matching lines for each input file: +在 Linux 或 UNIX 操作系统下,对于给定的单词或字符串,我们应该怎么统计它们在每个输入文件中存在的行数呢? + +您需要通过添加 -c 或者 --count 选项参数来抑制正常的输出。它将会显示对输入文件单词匹配的行数,如下所示: $ grep -c vivek /etc/passwd -OR +或者 $ grep -w -c vivek /etc/passwd -Sample outputs: +输出的示例: 1 -However, with the -v or --invert-match option it will count non-matching lines, enter: +相反的,使用 -v 或者 --invert 选项参数可以统计出不匹配的输入文件行数,键入: $ grep -c vivek /etc/passwd -Sample outputs: +输出的示例: 45 @@ -29,6 +29,6 @@ via: http://www.cyberciti.biz/faq/grep-count-lines-if-a-string-word-matches/ 作者:Vivek Gite 译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md similarity index 71% rename from sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md rename to published/201601/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md index 3b683746eb..4953cae431 100644 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md +++ b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md @@ -1,14 +1,14 @@ -(translating by runningwater) -Grep From Files and Display the File Name +grep 命令系列:从文件中搜索并显示文件名 ================================================================================ -How do I grep from a number of files and display the file name only? -When there is more than one file to search it will display file name by default: +我怎样从几个文件中搜索(grep),并只显示匹配到的文件的文件名? - grep "word" filename +当你从不止一个的文件中搜索时,默认它将显示文件名: + + grep "word" 文件名 grep root /etc/* -Sample outputs: +示例输出: /etc/bash.bashrc: See "man sudo_root" for details. /etc/crontab:17 * * * * root cd / && run-parts --report /etc/cron.hourly @@ -20,12 +20,12 @@ Sample outputs: /etc/logrotate.conf: create 0664 root utmp /etc/logrotate.conf: create 0660 root utmp -The first name is file name (e.g., /etc/crontab, /etc/group). The -l option will only print filename if th +每行开始的第一个部分是文件名(如:/etc/crontab、/etc/group)。使用 -l 选项可以只显示文件名: grep -l "string" filename grep -l root /etc/* -Sample outputs: +示例输出: /etc/aliases /etc/arpwatch.conf @@ -36,12 +36,12 @@ Sample outputs: /etc/crontab /etc/group -You can suppress normal output; instead print the name of each input file from **which no output would normally have been** printed: +你也可以逆转输出;使用 -L 选项来输出**那些不匹配的文件的文件名**: grep -L "word" filename grep -L root /etc/* -Sample outputs: +示例输出: /etc/apm /etc/apparmor @@ -62,7 +62,7 @@ Sample outputs: via: http://www.cyberciti.biz/faq/grep-from-files-and-display-the-file-name/ 作者:Vivek Gite -译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/published/201601/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md new file mode 100644 index 0000000000..5616548d54 --- /dev/null +++ b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md @@ -0,0 +1,68 @@ +grep 命令系列:如何在 UNIX 中根据文件内容查找文件 +================================================================================ + +为了完成课程作业,我写了很多 C 语言代码并把它们保存为 /home/user/c/*.c 和 *.h。那么在 UNIX shell 窗口中我如何能通过字符串或者单词(例如函数名 main())文件内容来查找文件呢? + +你需要用到以下工具: + +[a] **grep 命令** : 输出匹配模式的行。 + +[b] **find 命令**: 在目录层次中查找文件。 + +### [使用 grep 命令根据内容查找文件][1] + +输入以下命令: + + grep 'string' *.txt + grep 'main(' *.c + grep '#include' *.c + grep 'getChar*' *.c + grep -i 'ultra' *.conf + grep -iR 'ultra' *.conf + +其中 + +- **-i** : 忽略模式(匹配字符串 valid、 VALID、 ValID )和输入文件(匹配 file.c FILE.c FILE.C)的大小写。 +- **-R** : 递归读取每个目录下的所有文件。 + + +### 高亮匹配到的模式 ### + +在搜索大量文件的时候你可以轻松地高亮模式: + + $ grep --color=auto -iR 'getChar();' *.c + +### 为查找到的模式显示文件名和行号 ### + +你也许需要显示文件名和行号: + + $ grep --color=auto -iRnH 'getChar();' *.c + +其中, + +- **-n** : 在输出的每行前面添加以 1 开始的行号。 +- **-H** : 为每个匹配打印文件名。要搜索多个文件时这是默认选项。 + + $grep --color=auto -nH 'DIR' * + +输出样例: + +![Fig.01: grep 命令显示搜索到的模式](http://www.cyberciti.biz/faq/wp-content/uploads/2008/09/grep-command.png) + +*Fig.01: grep 命令显示搜索到的模式* + +你也可以使用 find 命令: + + $ find . -name "*.c" -print | xargs grep "main(" + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/unix-linux-finding-files-by-content/ + +作者:Vivek Gite +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.cyberciti.biz/faq/howto-search-find-file-for-text-string/ \ No newline at end of file diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md similarity index 83% rename from translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md rename to published/201601/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md index 9de5e1d64d..28ae0b5122 100644 --- a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md +++ b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md @@ -1,10 +1,9 @@ -Linux / UNIX 下只查看配置文件的有效配置行(配置文件中未被注释的命令行) +grep 命令系列:如何只查看配置文件中未被注释的有效配置行 ========================================================= 大多数的Linux和类Unix系统的配置文件中都有许多的注释行,但是有时候我只想看其中的有效配置行。那我怎么才能只看到quid.conf或httpd.conf这样的配置文件中的非注释命令行呢?怎么去掉这些注释或者空行呢? -我们可以使用UNIX / BSD / OS X / Linux 这些操作系统自身提供的grep,sed,awk,perl或者其他文本处理工具来查看配置文件中的有效配置命令行。 - +我们可以使用 UNIX/BSD/OS X/Linux 这些操作系统自身提供的 grep,sed,awk,perl或者其他文本处理工具来查看配置文件中的有效配置命令行。 ### grep 命令示例——去掉注释 ### @@ -100,7 +99,7 @@ Linux / UNIX 下只查看配置文件的有效配置行(配置文件中未被 Include /etc/apache2/sites-enabled/ -想要跳过空行,可以使用 [egrep 命令][1], 示例: +想要跳过其中的空行,可以使用 [egrep 命令][1], 示例: egrep -v "^#|^$" /etc/apache2/apache2.conf ## or pass it to the page such as more or less ## @@ -119,23 +118,24 @@ Linux / UNIX 下只查看配置文件的有效配置行(配置文件中未被 ![Fig.01: Unix/Linux Egrep Strip Out Comments Blank Lines](http://s0.cyberciti.org/uploads/faq/2008/05/grep-strip-out-comments-blank-lines.jpg) -Fig.01: Unix/Linux Egrep 除去注释行和空行 +*图 01: Unix/Linux Egrep 除去注释行和空行* ### 理解 grep/egrep 命令行选项 ### --v 选项,选择出不匹配的命令行。该选项适用于所有基于posix的系统。正则表达式 ^$ 匹配出所有的非空行, ^#匹配出所有的不以“#”开头的非注释行。 +-v 选项,选择出不匹配的命令行。该选项适用于所有基于posix的系统。正则表达式 `^$` 匹配出所有的非空行, `^#` 匹配出所有的不以“#”开头的非注释行。 ### sed 命令示例 ### -可以按照如下示例使用 GNU / sed 命令: +可以按照如下示例使用 GNU 上的 sed 命令: $ sed '/ *#/d; /^ *$/d' /path/to/file $ sed '/ *#/d; /^ *$/d' /etc/apache2/apache2.conf -GNU or BSD sed 也可以修改配置文件。下面的语法是编辑文件,修改扩展名(比如 .bak)进行文件备份: + +GNU 或 BSD 上的 sed 也可以修改配置文件。下面的命令的作用是原地编辑文件,并以特定(比如 .bak)备份文件: sed -i'.bak.2015.12.27' '/ *#/d; /^ *$/d' /etc/apache2/apache2.conf -更多信息见参考手册 - [grep(1)][2], [sed(1)][3] +更多信息见参考手册 - [grep(1)][2], [sed(1)][3]。 -------------------------------------------------------------------------------- @@ -143,7 +143,7 @@ via: http://www.cyberciti.biz/faq/shell-display-uncommented-lines-only/ 作者:Vivek Gite 译者:[sonofelice](https://github.com/sonofelice) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/201601/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md b/published/201601/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md new file mode 100644 index 0000000000..5b60ec5f1a --- /dev/null +++ b/published/201601/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md @@ -0,0 +1,164 @@ +如何在 CentOS 7 / Ubuntu 15.04 上安装 PHP 框架 Laravel +================================================================================ + +大家好,这篇文章将要讲述如何在 CentOS 7 / Ubuntu 15.04 上安装 Laravel。如果你是一个 PHP Web 的开发者,你并不需要考虑如何在琳琅满目的现代 PHP 框架中选择,Laravel 是最轻松启动和运行的,它省时省力,能让你享受到 web 开发的乐趣。Laravel 信奉着一个普世的开发哲学,通过简单的指导创建出可维护代码具有最高优先级,你将保持着高速的开发效率,能够随时毫不畏惧更改你的代码来改进现有功能。 + +Laravel 安装并不繁琐,你只要跟着本文章一步步操作就能在 CentOS 7 或者 Ubuntu 15 服务器上安装。 + +### 1) 服务器要求 ### + +在安装 Laravel 前需要安装一些它的依赖前提条件,主要是一些基本的参数调整,比如升级系统到最新版本,sudo 权限和安装依赖包。 + +当你连接到你的服务器时,请确保你能通以下命令能成功的使用 EPEL 仓库并且升级你的服务器。 + +#### CentOS-7 #### + + # yum install epel-release + + # rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + # rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm + + # yum update + +#### Ubuntu #### + + # apt-get install python-software-properties + # add-apt-repository ppa:ondrej/php5 + + # apt-get update + + # apt-get install -y php5 mcrypt php5-mcrypt php5-gd + +### 2) 防火墙安装 ### + +系统防火墙和 SELinux 设置对于用于产品应用安全来说非常重要,当你使用测试服务器的时候可以关闭防火墙,用以下命令行设置 SELinux 成宽容模式(permissive)来保证安装程序不受它们的影响。 + + # setenforce 0 + +### 3) Apache, MariaDB, PHP 安装 ### + +Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 OpenSSL、PDO,Mbstring 和 Tokenizer 等 PHP 扩展。如果 LAMP 已经运行在你的服务器上你可以跳过这一步,直接确认一些必要的 PHP 插件是否安装好。 + +要安装完整 AMP 你需要在自己的服务器上运行以下命令。 + +#### CentOS #### + + # yum install httpd mariadb-server php56w php56w-mysql php56w-mcrypt php56w-dom php56w-mbstring + +要在 CentOS 7 上实现 MySQL / Mariadb 服务开机自动启动,你需要运行以下命令。 + + # systemctl start httpd + # systemctl enable httpd + + #systemctl start mysqld + #systemctl enable mysqld + +在启动 MariaDB 服务之后,你需要运行以下命令配置一个足够安全的密码。 + + #mysql_secure_installation + +#### Ubuntu #### + + # apt-get install mysql-server apache2 libapache2-mod-php5 php5-mysql + +### 4) 安装 Composer ### + +在我们安装 Laravel 前,先让我们开始安装 composer。安装 composer 是安装 Laravel 的最重要步骤之一,因为 composer 能帮我们安装 Laravel 的各种依赖。 + +#### CentOS/Ubuntu #### + +在 CentOS / Ubuntu 下运行以下命令来配置 composer 。 + + # curl -sS https://getcomposer.org/installer | php + # mv composer.phar /usr/local/bin/composer + # chmod +x /usr/local/bin/composer + +![composer installation](http://blog.linoxide.com/wp-content/uploads/2015/11/14.png) + +### 5) 安装 Laravel ### + +我们可以运行以下命令从 github 上下载 Laravel 的安装包。 + + # wget https://github.com/laravel/laravel/archive/develop.zip + +运行以下命令解压安装包并且移动 document 的根目录。 + + # unzip develop.zip + + # mv laravel-develop /var/www/ + +现在使用 compose 命令来安装目录下所有 Laravel 所需要的依赖。 + + # cd /var/www/laravel-develop/ + # composer install + +![compose laravel](http://blog.linoxide.com/wp-content/uploads/2015/11/25.png) + +### 6) 密钥 ### + +为了加密服务器,我们使用以下命令来生成一个加密后的 32 位的密钥。 + + # php artisan key:generate + + Application key [Lf54qK56s3qDh0ywgf9JdRxO2N0oV9qI] set successfully + +现在把这个密钥放到 'app.php' 文件,如以下所示。 + + # vim /var/www/laravel-develop/config/app.php + +![Key encryption](http://blog.linoxide.com/wp-content/uploads/2015/11/45.png) + +### 7) 虚拟主机和所属用户 ### + +在 composer 安装好后,分配 document 根目录的权限和所属用户,如下所示。 + + # chmod 775 /var/www/laravel-develop/app/storage + + # chown -R apache:apache /var/www/laravel-develop + +用任意一款编辑器打开 apache 服务器的默认配置文件,在文件最后加上虚拟主机配置。 + + # vim /etc/httpd/conf/httpd.conf + +---------- + + ServerName laravel-develop + DocumentRoot /var/www/laravel/public + + start Directory /var/www/laravel + AllowOverride All + Directory close + +现在我们用以下命令重启 apache 服务器,打开浏览器查看 localhost 页面。 + +#### CentOS #### + + # systemctl restart httpd + +#### Ubuntu #### + + # service apache2 restart + +### 8) Laravel 5 网络访问 ### + +打开浏览器然后输入你配置的 IP 地址或者完整域名(Fully qualified domain name)你将会看到 Laravel 5 的默认页面。 + +![Laravel Default](http://blog.linoxide.com/wp-content/uploads/2015/11/35.png) + +### 总结 ### + +Laravel 框架对于开发网页应用来说是一个绝好的的工具。所以,看了这篇文章你将学会在 Ubuntu 15 和 CentOS 7 上安装 Laravel, 之后你就可以使用这个超棒的 PHP 框架提供的各种功能和舒适便捷性来进行你的开发工作。 + +如果您有什么意见或者建议请在以下评论区中回复,我们将根据您宝贵的反馈来使我们的文章更加浅显易懂。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-laravel-php-centos-7-ubuntu-15-04/ + +作者:[Kashif][a] +译者:[NearTan](https://github.com/NearTan) +校对:[Caroline](https://github.com/carolinewuyan) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/kashifs/ diff --git a/published/201601/20151204 Install and Configure Munin monitoring server in Linux.md b/published/201601/20151204 Install and Configure Munin monitoring server in Linux.md new file mode 100644 index 0000000000..9845ad8503 --- /dev/null +++ b/published/201601/20151204 Install and Configure Munin monitoring server in Linux.md @@ -0,0 +1,162 @@ +在 Linux 上安装和配置 Munin 监控服务器 +================================================================================ +![](http://www.linuxnix.com/wp-content/uploads/2015/12/munin_page.jpg) + +Munin 是一款类似 [RRD tool][1] 的非常棒的系统监控工具,它能提供给你多方面的系统性能信息,例如 **磁盘、网络、进程、系统和用户**。这些是 Munin 默认监控的内容。 + +### Munin 如何工作? ### + +Munin 以客户端-服务器模式运行。主服务器上运行的 Munin 服务器进程会从本地运行的客户端守护进程(Munin 可以监控它自己的资源)或者远程客户端(Munin 可以监控上百台机器)收集数据,然后在它的 web 界面上以图形的方式显示出来。 + +### 在 nutshell 中配置 Munin ### + +要配置服务器端和客户端,我们需要完成以下两步。 + +1. 安装 Munin 服务器软件包并配置,使得它能从客户端收集数据。 +2. 安装 Munin 客户端,使得服务器能连接到客户端守护进程进行数据收集。 + +### 在 Linux 上安装 munin 服务器端 ### + +在基于 Ubuntu/Debian 的机器上安装 Munin 服务器: + + apt-get install munin apache2 + +在基于 Redhat/CentOS 的机器上安装 Munin 服务器: + +在基于 Redhat 的机器上安装 Munin 之前,你需要确保 [启用 EPEL 软件仓库][2],因为基于 Redhat 的机器的软件仓库默认没有 Munin。 + + yum install munin httpd + +### 在 Linux 上配置 Munin 服务器端 ### + +下面是我们要在服务器上启动 Munini 所进行的步骤: + +1. 在 /etc/munin/munin.conf 中添加需要监控的主机详情。 +2. 配置 apache web 服务器使其包括 munin 配置。 +3. 为 web 界面创建用户名和密码 +4. 重启 apache 服务器 + +####步骤 1#### + +在 **/etc/munin/munin.conf** 文件中添加主机条目。调到文件末尾添加要监控的客户端。在这个例子中,我添加了要监控的数据库服务器和它的 IP 地址。 + +示例: + + [db.linuxnix.com] + address 192.168.1.25 + use_node_name yes + +保存文件并退出。 + +####步骤 2#### + +在 /etc/apache2/conf.d 目录中编辑或创建文件 munin.conf 用于包括 Munin 和 Apache 相关的配置。另外注意一点,默认其它和 web 相关的 Munin 配置保存在 /var/www/munin 目录。 + + vi /etc/apache2/conf.d/munin.conf + +内容: + + Alias /munin /var/www/munin + + Order allow,deny + Allow from localhost 127.0.0.0/8 ::1 + AllowOverride None + Options ExecCGI FollowSymlinks + AddHandler cgi-script .cgi + DirectoryIndex index.cgi + AuthUserFile /etc/munin/munin.passwd + AuthType basic + AuthName "Munin stats" + require valid-user + + ExpiresActive On + ExpiresDefault M310 + + + +保存文件并退出。 + +####步骤 3#### + +现在为查看 munin 的图示而创建用户名和密码: + + htpasswd -c /etc/munin/munin-htpasswd munin + +**注意**:对于 Redhat/Centos 机器,要访问你的配置文件,需要在每个路径中用 “**httpd**” 替换 “**apache2**”。 + +####步骤 4#### + +重启 Apache 服务器,使得 Munin 配置生效。 + +基于 Ubuntu/Debian : + + service apache2 restart + +基于 Centos/Redhat : + + service httpd restart + +### 在 Linux 上安装和配置 Munin 客户端 ### + +####步骤 1#### + +在 Linux 上安装 Munin 客户端 + + apt-get install munin-node + +**注意**:如果你想监控你的 Munin 服务器端,你也需要在服务器端安装 munin-node。 + +####步骤 2#### + +编辑 munin-node.conf 文件配置客户端。 + + vi /etc/munin/munin-node.conf + +示例: + + allow ^127\.0\.0\.1$ + allow ^10\.10\.20\.20$ + +---------- + + # 监听到哪个地址上 + host * + +---------- + + # 以及哪个端口 + port 4949 + +**注意**: 10.10.20.20 是我的 Munin 服务器,它连接到客户端的 4949 端口获取数据。 + +####步骤 3#### + +在客户端机器中重启 munin-node: + + service munin-node restart + +### 测试连接 ### + +检查你是否能从服务器的连接到客户端的 4949 端口,如果不行,你需要在客户端机器中的防火墙打开该端口。 + + telnet db.linuxnix.com 4949 + +访问 Munin web 页面 + + http://munin.linuxnix.com/munin/index.html + +希望这些能对你配置基本的 Munin 服务器有所帮助。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxnix.com/install-and-configure-munin-monitoring-server-in-linux/ + +作者:[Surendra Anne][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxnix.com/author/surendra/ +[1]:http://www.linuxnix.com/network-monitoringinfo-gathering-tools-in-linux/ +[2]:https://linux.cn/article-2324-1.html diff --git a/translated/tech/20151204 Linux or Unix--jobs Command Examples.md b/published/201601/20151204 Linux or Unix--jobs Command Examples.md similarity index 57% rename from translated/tech/20151204 Linux or Unix--jobs Command Examples.md rename to published/201601/20151204 Linux or Unix--jobs Command Examples.md index fbb52a2544..70e5138862 100644 --- a/translated/tech/20151204 Linux or Unix--jobs Command Examples.md +++ b/published/201601/20151204 Linux or Unix--jobs Command Examples.md @@ -1,14 +1,13 @@ - -Linux / Unix: jobs 命令示例 +jobs 命令示例 ================================================================================ -我是个新的 Linux 或 Unix 用户。如何在 Linux 或类 Unix 系统中使用 BASH/KSH/TCSH 或者基于 POSIX 的 shell 来查看当前正在进行的作业?在 Unix/Linux 上怎样显示当前作业的状态? +我是个新的 Linux/Unix 用户。我该如何在 Linux 或类 Unix 系统中使用 BASH/KSH/TCSH 或者基于 POSIX 的 shell 来查看当前正在进行的作业(job)?在 Unix/Linux 上怎样显示当前作业的状态?(LCTT 译注:job,也常称为“任务”) -作业控制的是什么,停止/暂停进程(命令)的执行并按你的要求继续/恢复它们的执行。这是根据你的操作系统和 shell 如,bash/ksh 或 POSIX shell 来执行的。 +作业控制是一种能力,可以停止/暂停进程(命令)的执行并按你的要求继续/恢复它们的执行。这是通过你的操作系统和诸如 bash/ksh 或 POSIX shell 等 shell 来执行的。 shell 会将当前所执行的作业保存在一个表中,可以用 jobs 命令来显示。 -### 目的 ### +### 用途 ### > 在当前 shell 会话中显示作业的状态。 @@ -30,7 +29,7 @@ shell 会将当前所执行的作业保存在一个表中,可以用 jobs 命 在开始使用 jobs 命令前,你需要在系统上先启动多个作业。执行以下命令来启动作业: - ## 启动 xeyes, calculator, 和 gedit 文本编辑器 ### + ### 启动 xeyes, calculator, 和 gedit 文本编辑器 ### xeyes & gnome-calculator & gedit fetch-stock-prices.py & @@ -39,7 +38,7 @@ shell 会将当前所执行的作业保存在一个表中,可以用 jobs 命 ping www.cyberciti.biz -按 **Ctrl-Z** 键来暂停 ping 命令的作业。 +按 **Ctrl-Z** 键来挂起(suspend) ping 命令的作业。 ### jobs 命令示例 ### @@ -54,7 +53,7 @@ shell 会将当前所执行的作业保存在一个表中,可以用 jobs 命 [3]- 7910 Running gedit fetch-stock-prices.py & [4]+ 7946 Stopped ping cyberciti.biz -要显示进程 ID 或作业名称请使用 “P” 选项,输入: +要显示名字以“p”开头的进程 ID 或作业名称,输入: $ jobs -p %p @@ -66,7 +65,7 @@ shell 会将当前所执行的作业保存在一个表中,可以用 jobs 命 [4]- Stopped ping cyberciti.biz -字符 % 后加一个作业。在这个例子中,你需要使用作业的名称来暂停它,如 %ping。 +字符 % 是一个指定任务的方法。在这个例子中,你可以使用作业名称开头字符串来来暂停它,如 %ping。 ### 如何显示进程 ID 不包含其他正常的信息? ### @@ -77,7 +76,8 @@ shell 会将当前所执行的作业保存在一个表中,可以用 jobs 命 示例输出: ![Fig.01: Displaying the status of jobs in the shell](http://s0.cyberciti.org/uploads/faq/2013/02/jobs-command-output.jpg) -Fig.01: 在 shell 中显示 jobs 的状态 + +*Fig.01: 在 shell 中显示 jobs 的状态* ### 如何只列出最近一次状态改变的进程? ### @@ -85,7 +85,7 @@ Fig.01: 在 shell 中显示 jobs 的状态 $ sleep 100 & -现在,只显示作业最近一次的状态(停止或退出),输入: +现在,只显示自从上次提示过停止或退出之后的作业,输入: $ jobs -n @@ -137,43 +137,18 @@ Fig.01: 在 shell 中显示 jobs 的状态 摘自 [bash(1)][1] 命令 man 手册页: -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescription
-lShow process id's in addition to the normal information.
-pShow process id's only.
-nShow only processes that have changed status since the last notification are printed.
-rRestrict output to running jobs only.
-sRestrict output to stopped jobs only.
-xCOMMAND is run after all job specifications that appear in ARGS have been replaced with the process ID of that job's process group leader./td>
+|选项|描述| +|---|------------------| +|`-l`| 列出进程 ID 及其它信息。| +|`-p`| 仅列出进程 ID。| +|`-n`| 仅列出自从上次输出了状态变化提示(比如显示有进程退出)后的发生了状态变化的进程。| +|`-r`| 仅显示运行中的作业。| +|`-s`| 仅显示停止的作业。| +|`-x`| 运行命令及其参数,并用新的命令的进程 ID 替代所匹配的原有作业的进程组 ID。| ### 关于 /usr/bin/jobs 和 shell 内建的说明 ### -输入以下 type 命令找出是否 jobs 命令是 shell 的内建命令或是外部命令: +输入以下 type 命令找出是否 jobs 命令是 shell 的内建命令或是外部命令还是都是: $ type -a jobs @@ -182,15 +157,15 @@ Fig.01: 在 shell 中显示 jobs 的状态 jobs is a shell builtin jobs is /usr/bin/jobs -在几乎所有情况下,jobs 命令都是作为 BASH/KSH/POSIX shell 内建命令被实现的。/usr/bin/jobs 命令不能被用在当前 shell 中。/usr/bin/jobs 命令工作在不同的环境中不共享父 bash/ksh 的 shells 来执行作业。 +在几乎所有情况下,你都需要使用 BASH/KSH/POSIX shell 内建的jobs 命令。/usr/bin/jobs 命令不能被用在当前 shell 中。/usr/bin/jobs 命令工作在不同的环境中,并不共享其父 bash/ksh 的 shell 作业。 -------------------------------------------------------------------------------- -via: +via: http://www.cyberciti.biz/faq/unix-linux-jobs-command-examples-usage-syntax/ 作者:Vivek Gite 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/201601/20151206 NetworkManager and privacy in the IPv6 internet.md b/published/201601/20151206 NetworkManager and privacy in the IPv6 internet.md new file mode 100644 index 0000000000..b20c8d93bf --- /dev/null +++ b/published/201601/20151206 NetworkManager and privacy in the IPv6 internet.md @@ -0,0 +1,56 @@ +IPv6 互联网中的隐私保护和网络管理器 +============================== + +IPv6 的使用量正在不断增加,让我们始料未及的是,伴随这个协议不断增加的使用量,大量的隐私问题涌现出来。互联网社区在积极发布相关解决方案。当前状况是怎样的呢?网络管理器(NetworkManager)又是如何跟上的呢?让我们来瞧瞧吧! + +![](https://blogs.gnome.org/lkundrak/files/2015/12/cameras1.jpg) + +## 通过 IPv6 方式连接的主机的特性 + +启用了 IPv6 的节点(LCTT 译注:节点在网络中指一个联网的设备)并不需要类似 IPv4 网络中 [DHCP](https://tools.ietf.org/html/rfc2132) 服务器的中央机构来配置他们的地址。它们发现(discover)自己所在的网络,然后通过生成主机部分来[自主生成地址](https://tools.ietf.org/html/rfc4862)。这种方式使得网络配置更加简单,并且能够更好的扩展到更大规模的网络。然而,这种方式也有一些缺点。首先,这个节点需要确保它的地址不会和网络上其他节点冲突。其次,如果这个节点在进入的每一个网络中使用相同的主机部分,它的运动就可以被追踪,如此一来,隐私便处于危险之中。 + +负责制定因特网标准的组织 Internet 工程任务组(Internet Engineering Task Force,IETF)[意识到了这个问题](https://tools.ietf.org/html/draft-iesg-serno-privacy-00),这个组织建议取消使用硬件序列号来识别网络上的节点。 + +但实际的实施情况是怎样的呢? + +地址唯一性问题可以通过[重复地址检测(Duplicate Address Detection, DAD)](https://tools.ietf.org/html/rfc4862#section-5.4)机制来解决。当节点为自身创建地址的时候,它首先通过[邻居发现协议(Neighbor Discovery Protocol)](https://tools.ietf.org/html/rfc4861)(一种不同于 IPv4 [ARP](https://tools.ietf.org/html/rfc826)协议的机制)来检查另一个节点是否使用了相同的地址。当它发现地址已经被使用,它必须抛弃掉这个地址。 + +解决另一个问题——隐私问题,有一点困难。一个 IP 地址(无论 IPv4 或 IPv6)由网络部分和主机部分组成(LCTT 译注:网络部分用来划分子网,主机部分用来从相应子网中找到具体的主机)。主机查找出相关的地址的网络部分,并且生成地址的主机部分。传统上它只使用了源自网络硬件(MAC)地址的接口识别器(Interface Identifier)。MAC 地址在硬件制造的时候就被设置好了,它可以唯一的识别机器。这样就确保了地址的稳定性和唯一性。这对避免地址冲突来说是件好事,但是对隐私来说一点也不好。主机部分在不同网络下保持恒定意味着机器在进入不同网络时可以被唯一的识别。这在协议制定的时候看起来无可非议,但是随着 IPv6 的流行,人们对于隐私问题的担忧也愈演愈烈。幸运的是,解决办法还是有的。 + +## 使用隐私扩展(privacy extensions) + +IPv4 的最大问题——地址枯竭,已经不是什么秘密。对 IPv6 来说,这一点不再成立,事实上,使用 IPv6 的主机能够相当大方的利用地址。多个 IPv6 地址对应一块网卡绝对没有任何不合适,正好相反,这是一种标准情形。最起码每个节点都有一个“本地连接(link-local)地址”,它被用来与同一物理链路的节点联络。当网络包含了一个连接其他网络的路由器,这个网络中的每个节点都有一个与每个直接连接的网络相联络的地址。如果主机在同一个网络有更多的地址,该节点(LCTT 译注:指路由器)将接受它们全部的传入流量。对于外发连接,它会把地址显示给远程主机,内核会挑选最适合的地址。但到底是哪一个呢? + +启用了隐私扩展,就像 [RFC4941](https://tools.ietf.org/html/rfc4941) 定义的那样,时常会生成带有随机主机部分的新地址。最新的那个被用于最新的外发连接,与此同时,那些不被使用了的旧地址将被丢弃。这是一个极好的策略——主机不会对外暴露其固定地址,因为它不用于外发连接,但它仍然会接受知道其固定地址的主机连接。 + +但这也存在美中不足之处——某些应用会把地址与用户识别绑定在一起。让我们来考虑一下这种情形,一个 web 应用在用户认证的时候生成一个 HTTP Cookie,但它只接受实施认证的地址的连接。当内核生成了一个新的临时地址,服务器会拒绝使用这个地址的请求,实际上相当于用户登出了。地址是不是建立用户认证的合适机制值得商榷,但这确实是现实中应用程序正在做的。 + +## 解救之道——隐私固定寻址(Privacy stable addressing) + +解决这个问题可能需要另辟蹊径。唯一的(当然咯)地址确实有必要,对于特定网络来说是稳定的,但当用户进入了另一个网络后仍然会变,这样的话追踪就变得几乎不可能。RFC7217 介绍了一种如上所述的机制。 + +创建隐私固定地址依赖于伪随机值,这个随机值只被主机本身知晓,它不会暴露给网络上的其他主机。这个随机值随后被一个密码安全算法加密,一起被加密的还有一些与网络连接的特定值。这些值包含:用以标识网卡的名称;网络地址;对于这个网络来说有可能的其他特殊值,例如无线网络的 SSID。使用这个安全密钥使其他主机很难预测结果地址,与此同时,当进入不同的网络时,网络的特殊数据会让地址变得不同。 + +这也巧妙的解决了地址重复问题。因为有随机值的存在,冲突也不太可能发生。万一发生了冲突,结果地址会得到重复地址检测失败的记录,这时会生成一个不同的地址而不会断开网络连接。看,这种方式很聪明吧。 + +使用隐私固定地址一点儿也不会妨碍隐私扩展。你可以在使用 RFC4941 所描述的临时地址的同时使用 [RFC7217](https://tools.ietf.org/html/rfc7217)中的固定地址。 + +## 网络管理器(NetworkManager)处于什么样的状况? + +我们已经在网络管理器1.0.4版本中实现了隐私扩展(privacy extensions)。在这个版本中,隐私扩展默认开启。你可以用 ipv6.ip6-privacy 参数来控制它。 + +在网络管理器1.2版本中,我们将会加入固定隐私寻址(stable privacy addressing)。应该指出的是,目前的隐私扩展还不符合这种需求。我们可以使用 ipv6.addr-gen-mode 参数来控制这个特性。如果它被设置成固定隐私,那么将会使用固定隐私寻址。设置成“eui64”或者干脆不设置它将会保持传统的默认寻址方式。 + +敬请期待2016年年初网络管理器1.2版本的发布吧!如果你想尝试一下最新的版本,不妨试试 Fedora Rawhide,它最终会变成 Fedora 24。 + +*我想感谢 Hannes Frederic Sowa,他给了我很有价值的反馈。如果没有他的帮助,这篇文章的作用将会逊色很多。另外,Hannes 也是 RFC7217 所描述机制的内核实现者,当网络管理器不起作用的时候,它将发挥作用。* + +-------------------------------------------------------------------------------- + +via: https://blogs.gnome.org/lkundrak/2015/12/03/networkmanager-and-privacy-in-the-ipv6-internet/ + +作者:Lubomir Rintel +译者:[itsang](https://github.com/itsang) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md b/published/201601/20151208 How to renew the ISPConfig 3 SSL Certificate.md similarity index 55% rename from translated/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md rename to published/201601/20151208 How to renew the ISPConfig 3 SSL Certificate.md index a2ce4f1d1c..ea132d4185 100644 --- a/translated/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md +++ b/published/201601/20151208 How to renew the ISPConfig 3 SSL Certificate.md @@ -1,20 +1,20 @@ -如何更新ISPConfig 3 SSL证书 +如何更新 ISPConfig 3 SSL 证书 ================================================================================ -本教程描述了如何再ISPConfig 3控制面板中更新SSL证书。有两个可选的方法: +本教程描述了如何在 ISPConfig 3控制面板中更新 SSL 证书。有两个可选的方法: -- 用OpenSSL创建一个新的OpenSSL证书和CSR。 -- 用ISPConfig updater更新SSL证书 +- 用 OpenSSL 创建一个新的 OpenSSL 证书和 CSR。 +- 用 ISPConfig updater 更新 SSL 证书 -我将会用手工的方法更新ssl证书。 +我将从用手工的方法更新 SSL 证书开始。 -### 1)用OpenSSL创建一个新的ISPConfig 3 SSL 证书 ### +### 1)用 OpenSSL 创建一个新的 ISPConfig 3 SSL 证书 ### -用root用户登录你的服务器。在创建一个新的SSL证书之前,备份现有的。SSL证书是安全敏感的,因此我将它存储在/root/目录下。 +用 root 用户登录你的服务器。在创建一个新的 SSL 证书之前,先备份现有的。SSL 证书是安全敏感的,因此我将它存储在 /root/ 目录下。 tar pcfz /root/ispconfig_ssl_backup.tar.gz /usr/local/ispconfig/interface/ssl chmod 600 /root/ispconfig_ssl_backup.tar.gz -> 现在创建一个新的SSL证书密钥,证书请求(csr)和自签发证书。 +> 现在创建一个新的 SSL 证书密钥,证书请求(CSR)和自签发证书。 cd /usr/local/ispconfig/interface/ssl openssl genrsa -des3 -out ispserver.key 4096 @@ -25,13 +25,13 @@ mv ispserver.key ispserver.key.secure mv ispserver.key.insecure ispserver.key -重启apache来加载新的SSL证书 +重启 apache 来加载新的 SSL 证书 service apache2 restart -### 2)用ISPConfig安装器来更新SSL证书 ### +### 2)用 ISPConfig 安装器来更新 SSL 证书 ### -另一个获取新的SSL证书的替代方案是使用ISPConfig更新脚本。下载ISPConfig到/tmp目录下,解压包并运行脚本。 +另一个获取新的 SSL 证书的替代方案是使用 ISPConfig 更新脚本。下载 ISPConfig 到 /tmp 目录下,解压包并运行脚本。 cd /tmp wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz @@ -39,11 +39,11 @@ cd ispconfig3_install/install php -q update.php -更新脚本会在更新时询问下面的额问题: +更新脚本会在更新时询问下面的问题: Create new ISPConfig SSL certificate (yes,no) [no]: -这里回答“yes”,SSL证书创建对话框就会启动。 +这里回答“yes”,SSL 证书创建对话框就会启动。 -------------------------------------------------------------------------------- @@ -51,7 +51,7 @@ via: http://www.faqforge.com/linux/how-to-renew-the-ispconfig-3-ssl-certificate/ 作者:[Till][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/201601/20151208 Top 5 open source community metrics to track.md b/published/201601/20151208 Top 5 open source community metrics to track.md new file mode 100644 index 0000000000..5b616f8116 --- /dev/null +++ b/published/201601/20151208 Top 5 open source community metrics to track.md @@ -0,0 +1,80 @@ +衡量开源社区的五大指标 +================================================================================ +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-1.png) + +如果你想要使用指标来追踪你的自由开源软件(FOSS)的社区。现在就面临着一个问题:我应该去追踪哪些指标呢? + +要回答这个问题,你必须知道你需要什么信息。比如,你可能想要知道一个项目社区的可持续性。一个社区对问题的应对速度有多快。一个社区怎么吸引、维护或者流失贡献者。一旦你知道需要哪类信息,你就可以找出哪些社区活动可以提供你想要知道的内容。幸运的是,自由开源软件(FOSS)遵从开放式开发模型,在其软件开发仓库里留下了大量的公共数据,我们可以对这些数据进行分析,并从中收集到一些有用的数据。 + +在这篇文章中,我会介绍一些指标,从而为你的项目社区提供一个多方位的视角分析。 + +### 1. 社区活动(Activity) ### + +一个社区的总体活动和这个社区怎样随着时间演变,是度量所有社区好坏的非常有用的指标。社区活动是评价一个社区工作量的第一印象,也可以用来追踪不同种类的活动。比如,提交次数,给人的第一印象就是跟开发工作量挂钩。通过提出的问题(tickets opened)我们可以大概知道提交了多少 bug 或者又提出了多少新特性。邮件列表中的邮件数量或者论坛帖子的数量可以让我们了解到有过多少次公开讨论。 + +![Activity metrics chart](https://opensource.com/sites/default/files/images/business-uploads/activity-metrics.png) + +[OpenStack 活动看板][1]上面显示的项目代码提交次数和代码评审之后代码合并次数随时间变化的趋势图(周数据)。 + + +### 2. 社区规模(Size) ### + +社区的规模指的是参与到这个社区的人数,但是,基于不同形式的参与人数也有很大的差别。好消息是,通常你只对积极活跃的贡献者比较感兴趣。活跃的贡献者会在项目的仓库留下一些线索。这意味着你可以通过查看git仓库存放的代码中**author**字段来统计积极贡献代码的人数,或者通过看积极参与问题解决的人数来统计活跃人数。 + +所谓活动(某些人做了某些事)可以扩展到很多方面。一种常见的跟踪活动的方式是看有多少人做了工作量相当可观的任务。比如,通常一个项目代码的贡献者是来自这个项目社区的一小部分人。了解了这一小部分人,就对核心的工作组(比如,领导这个社区的人)有一个基本的认识了。 + +![Size metrics chart](https://opensource.com/sites/default/files/images/business-uploads/size-metrics.png) + +[Xen 项目开发看板][2]上展示的该项目邮件列表上作者人数和提交人数随时间的变化趋势(每月数据) + +### 3. 社区表现(Performance) ### + +到目前为止,关注点主要集中在活动数量和贡献者数量的统计上了。你也可以分析流程还有用户的表现如何。比如,你可以测量某流程需要多久才能执行完成。解决或者关闭问题的时间可以表明一个需要及时响应的项目对新信息的应对如何,比如修复一个报告过来的 bug 或者实现一个新需求。代码评审花费的时间,即从代码修改提交到被通过的时间,可以看出更新一个提出的改变要达到社区期望的标准需要多久。 + +其他的一些指标主要与项目处理挂起的工作表现如何有关,比如新的和被关闭问题的比例,或者仍然没有完成的代码评审的队列。这些参数能告诉我们像投入到解决这些问题的资源是否充足这样的一些信息。 + +![Efficiency metrics chart](https://opensource.com/sites/default/files/images/business-uploads/efficiency-metrics.png) + +在[2015第三季度 OpenStack 开发报告][3]上显示的,每季度关闭与打开状态的问题数之比,接受与放弃的改变提案与最新的改变提案之比。 + +### 4. 社区人口特征(Demographics) ### + +随着贡献者的参与或者退出,社区也在不断改变。随着人们加入和退出社区,社区成员的会龄(从社区成员加入时算起)也各异。[社区会龄统计图表][4]很直观的展现了这些改变随时间的变化。图表是由一系列的水平条组成,每两条水平条代表加入到社区的一代人。对于每一代,吸引力(Attracted)水平条表示在相应的时间里有多少人加入到了社区。活跃度(Retained)水平条表示有多少人目前仍然活跃在社区。 + +代表一代人的两个水平条的关系就是滞留比例:依然在这个项目中的那一代人的一部分。吸引力(Attracted)水平条的完整集合表示这个项目在过去有多么受欢迎。活跃度(Retained)水平条的完整集合则表示社区目前的会龄结构。 + +![Demographics metrics chart](https://opensource.com/sites/default/files/images/business-uploads/demography-metrics.png) + +[Eclipse 开发看板][5]上显示的 Eclipse 社区的社区年龄表。每六个月定义一次。 + +### 5. 社区多样性(Diversity) ### + +多样性是一个社区保持弹性的很关键的因素。通常来说,一个社区越具有多样性(人或者组织参与的多元化),那么这个社区的弹性也就越大。比如,如果一个公司要决定离开一个自由开源社区,那么这个公司的员工贡献5%要远比贡献85%所可能引起的潜在问题要小很多。 + +[小马因素(Pony Factor)][6],是 [Daniel Gruno][7] 为“最少的开发者贡献了50%的代码提交量”这一现象定义的术语。基于小马因素,大象因素(Elephant Factor)则是指最少量的公司其员工贡献了50%的代码提交量。这两个数据提供了一种指示,即这个社区依赖多少人或者公司。 + +![Diversity metrics chart](https://opensource.com/sites/default/files/images/business-uploads/diversity-metrics.png) + +[2015开发云数量状态统计][8]显示的在云计算领域的几个自由开源社区项目的小马和大象因素。 + +还有许多其他的指标来衡量一个社区。在决定收集哪些指标时,可以考虑一下社区的目标,还有哪些指标能帮到你。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/business/15/12/top-5-open-source-community-metrics-track + +作者:[Jesus M. Gonzalez-Barahona][a] +译者:[sonofelice](https://github.com/sonofelice) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jgbarah +[1]:http://activity.openstack.org/ +[2]:http://projects.bitergia.com/xen-project-dashboard/ +[3]:http://activity.openstack.org/dash/reports/2015-q3/pdf/2015-q3_OpenStack_report.pdf +[4]:http://radar.oreilly.com/2014/10/measure-your-open-source-communitys-age-to-keep-it-healthy.html +[5]:http://dashboard.eclipse.org/demographics.html +[6]:https://ke4qqq.wordpress.com/2015/02/08/pony-factor-math/ +[7]:https://twitter.com/humbedooh +[8]:https://speakerdeck.com/jgbarah/the-quantitative-state-of-the-open-cloud-2015-edition \ No newline at end of file diff --git a/translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md b/published/201601/20151215 Fix--Cannot establish FTP connection to an SFTP server.md similarity index 52% rename from translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md rename to published/201601/20151215 Fix--Cannot establish FTP connection to an SFTP server.md index 79e26abd64..02ce43fcf4 100644 --- a/translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md +++ b/published/201601/20151215 Fix--Cannot establish FTP connection to an SFTP server.md @@ -1,8 +1,9 @@ -修复:无法与SFTP服务器建立FTP连接 +错误:无法与 SFTP 服务器建立 FTP 连接 ================================================================================ + ### 问题 ### -有一天我要连接到我的web服务器。我使用[FileZilla][1]连接到FTP服务器。当我输入主机名和密码后来连接服务器后,我得到了下面的错误。 +有一天我要连接到我的 web 服务器。我使用 [FileZilla][1] 连接到 FTP 服务器。当我输入主机名和密码连接服务器后,我得到了下面的错误。 > Error: Cannot establish FTP connection to an SFTP server. Please select proper protocol. > @@ -12,25 +13,25 @@ ### 原因 ### -看见错误信息后我意识到了我的错误。我尝试与一台SFTP服务器建立一个[FTP][2]连接。很明显我没有使用一个正确的协议(应该是SFTP而不是FTP)。 +看见错误信息后我意识到了我的错误是什么。我尝试与一台 **SFTP** 服务器建立一个 **[FTP][2]** 连接。很明显我没有使用一个正确的协议(应该是SFTP而不是FTP)。 -如你在上图所见,FileZilla默认使用的是FTP协议。 +如你在上图所见,FileZilla 默认使用的是FTP协议。 -### 解决“Cannot establish FTP connection to an SFTP server”的方案 ### +### 解决 “Cannot establish FTP connection to an SFTP server” 的方案 ### -解决方案很简单。使用SFTP协议而不是FTP。一个你或许要面对的问题是把协议修改成SFTP。这就是我要帮助你的。 +解决方案很简单。使用 SFTP 协议而不是 FTP。你要做的就是把协议修改成 SFTP。这就是我要告诉你的。 -再FileZilla菜单中,进入 **文件->站点管理**. +在 FileZilla 菜单中,进入 **文件->站点管理**。 ![FileZilla Site Manager](http://itsfoss.com/wp-content/uploads/2015/12/FileZilla_FTP_SFTP_Problem_2.jpeg) -在站点管理中,进入通用选项并选择SFTP协议。同样填上主机、端口号、用户密码等。 +在站点管理中,进入通用选项并选择 SFTP 协议。同样填上主机、端口号、用户密码等。 ![Cannot establish FTP connection to an SFTP server](http://itsfoss.com/wp-content/uploads/2015/12/FileZilla_FTP_SFTP_Problem_3.png) -我希望你从这里可以开始处理。 +我希望你从这里可以开始工作了。 -我希望本篇教程可以帮助你修复“Cannot establish FTP connection to an SFTP server. Please select proper protocol.”这个问题。在相关的文章中,你可以读[了解在Linux中如何设置FTP][4]。 +我希望本篇教程可以帮助你修复 “Cannot establish FTP connection to an SFTP server. Please select proper protocol.”这个问题。在相关的文章中,你可以读[了解在 Linux 中如何设置 FTP][4]。 -------------------------------------------------------------------------------- @@ -38,7 +39,7 @@ via: http://itsfoss.com/fix-establish-ftp-connection-sftp-server/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/201601/20151215 How to block network traffic by country on Linux.md b/published/201601/20151215 How to block network traffic by country on Linux.md new file mode 100644 index 0000000000..0a70e7d49b --- /dev/null +++ b/published/201601/20151215 How to block network traffic by country on Linux.md @@ -0,0 +1,111 @@ +如何在 Linux 中根据国家位置来阻断网络流量 +================================================================================ + +作为一名维护 Linux 生产服务器的系统管理员,你可能会遇到这样一些情形:你需要**根据地理位置,选择性地阻断或允许网络流量通过。** 例如你正经历一次由注册在某个特定国家的 IP 发起的 DoS 攻击;或者基于安全考虑,你想阻止来自未知国家的 SSH 登录请求;又或者你的公司对某些在线视频有分销权,它要求只能在特定的国家内合法发行;抑或是由于公司的政策,你需要阻止某个本地主机将文件上传至任意一个非美国的远程云端存储。 + +所有的上述情形都需要设置防火墙,使之具有**基于国家位置过滤流量**的功能。有几个方法可以做到这一点,其中之一是你可以使用 TCP wrappers 来为某个应用(例如 SSH,NFS, httpd)设置条件阻塞。但其缺点是你想要保护的那个应用必须以支持 TCP wrappers 的方式构建。另外,TCP wrappers 并不总是能够在各个平台中获取到(例如,Arch Linux [放弃了][2]对它的支持)。另一种方式是结合基于国家的 GeoIP 信息,设置 [ipset][3],并将它应用到 iptables 的规则中。后一种方式看起来更有希望一些,因为基于 iptables 的过滤器是与应用无关的,且容易设置。 + +在本教程中,我将展示 **另一个基于 iptables 的 GeoIP 过滤器,它由 xtables-addons 来实现**。对于那些不熟悉它的人来说, xtables-addons 是用于 netfilter/iptables 的一系列扩展。一个包含在 xtables-addons 中的名为 xt\_geoip 的模块扩展了 netfilter/iptables 的功能,使得它可以根据流量来自或流向的国家来进行过滤,IP 掩蔽(NAT)或丢包。若你想使用 xt\_geoip,你不必重新编译内核或 iptables,你只需要使用当前的内核构建环境(/lib/modules/\`uname -r`/build)以模块的形式构建 xtables-addons。同时也不需要进行重启。只要你构建并安装了 xtables-addons , xt\_geoip 便能够配合 iptables 使用。 + +至于 xt\_geoip 和 ipset 之间的比较,[xtables-addons 的官方网站][3] 上是这么说的: 相比于 ipset,xt\_geoip 在内存占用上更胜一筹,但对于匹配速度,基于哈希的 ipset 可能更有优势。 + +在教程的余下部分,我将展示**如何使用 iptables/xt\_geoip 来根据流量的来源地或流入的国家阻断网络流量**。 + +### 在 Linux 中安装 xtables-addons ### + +下面介绍如何在各种 Linux 平台中编译和安装 xtables-addons。 + +为了编译 xtables-addons,首先你需要安装一些依赖软件包。 + +#### 在 Debian,Ubuntu 或 Linux Mint 中安装依赖 #### + + $ sudo apt-get install iptables-dev xtables-addons-common libtext-csv-xs-perl pkg-config + +#### 在 CentOS,RHEL 或 Fedora 中安装依赖 #### + +CentOS/RHEL 6 需要事先设置好 EPEL 仓库(为 perl-Text-CSV\_XS 所需要)。 + + $ sudo yum install gcc-c++ make automake kernel-devel-`uname -r` wget unzip iptables-devel perl-Text-CSV_XS + +#### 编译并安装 xtables-addons #### + +从 `xtables-addons` 的[官方网站][4] 下载源码包,然后按照下面的指令编译安装它。 + + $ wget http://downloads.sourceforge.net/project/xtables-addons/Xtables-addons/xtables-addons-2.10.tar.xz + $ tar xf xtables-addons-2.10.tar.xz + $ cd xtables-addons-2.10 + $ ./configure + $ make + $ sudo make install + +需要注意的是,对于基于红帽的系统(CentOS、RHEL、Fedora),它们默认开启了 SELinux,所以有必要像下面这样调整 SELinux 的策略。否则,SELinux 将阻止 iptables 加载 xt\_geoip 模块。 + + $ sudo chcon -vR --user=system_u /lib/modules/$(uname -r)/extra/*.ko + $ sudo chcon -vR --type=lib_t /lib64/xtables/*.so + +### 为 xtables-addons 安装 GeoIP 数据库 ### + +下一步是安装 GeoIP 数据库,它将被 xt\_geoip 用来查询 IP 地址与国家地区之间的对应关系。方便的是,`xtables-addons` 的源码包中带有两个帮助脚本,它们被用来从 MaxMind 下载 GeoIP 数据库并将它转化为 xt\_geoip 可识别的二进制形式文件;它们可以在源码包中的 geoip 目录下找到。请遵循下面的指导来在你的系统中构建和安装 GeoIP 数据库。 + + $ cd geoip + $ ./xt_geoip_dl + $ ./xt_geoip_build GeoIPCountryWhois.csv + $ sudo mkdir -p /usr/share/xt_geoip + $ sudo cp -r {BE,LE} /usr/share/xt_geoip + +根据 [MaxMind][5] 的说明,他们的 GeoIP 数据库能够以 99.8% 的准确率识别出 ip 所对应的国家,并且每月这个数据库将进行更新。为了使得本地安装的 GeoIP 数据是最新的,或许你需要设置一个按月执行的 [cron job][6] 来时常更新你本地的 GeoIP 数据库。 + +### 阻断来自或流向某个国家的网络流量 ### + +一旦 xt\_geoip 模块和 GeoIP 数据库安装好后,你就可以在 iptabels 命令中使用 geoip 的匹配选项。 + + $ sudo iptables -m geoip --src-cc country[,country...] --dst-cc country[,country...] + +你想要阻断流量的那些国家是使用[2个字母的 ISO3166 代码][7] 来特别指定的(例如 US(美国)、CN(中国)、IN(印度)、FR(法国))。 + +例如,假如你想阻断来自也门(YE) 和 赞比亚(ZM)的流量,下面的 iptabels 命令便可以达到此目的。 + + $ sudo iptables -I INPUT -m geoip --src-cc YE,ZM -j DROP + +假如你想阻断流向中国(CN) 的流量,可以运行下面的命令: + + $ sudo iptables -A OUTPUT -m geoip --dst-cc CN -j DROP + +匹配条件也可以通过在 `--src-cc` 或 `--dst-cc` 选项前加 `!` 来达到相反的目的: + +假如你想在你的服务器上阻断来自所有非美国的流量,可以运行: + + $ sudo iptables -I INPUT -m geoip ! --src-cc US -j DROP + +![](https://c2.staticflickr.com/6/5654/23665427845_050241b03f_c.jpg) + +#### 对于使用 Firewall-cmd 的用户 #### + +某些发行版本例如 CentOS/RHEL7 或 Fedora 已经用 firewalld 替代了 iptables 来作为默认的防火墙服务。在这些系统中,你可以类似使用 xt\_geoip 那样,使用 firewall-cmd 来阻断流量。利用 firewall-cmd 命令,上面的三个例子可被重新写为: + + $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -m geoip --src-cc YE,ZM -j DROP + $ sudo firewall-cmd --direct --add-rule ipv4 filter OUTPUT 0 -m geoip --dst-cc CN -j DROP + $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -m geoip ! --src-cc US -j DROP + +### 总结 ### + +在本教程中,我展示了使用 iptables/xt\_geoip 来根据流量的来源地或流入的国家轻松地阻断网络流量。假如你有这方面的需求,把它部署到你的防火墙系统中可以使之成为一个实用的办法。作为最后的警告,我应该提醒你的是:在你的服务器上通过基于 GeoIP 的流量过滤来禁止特定国家的流量并不总是万无一失的。GeoIP 数据库本身就不是很准确或齐全,且流量的来源或目的地可以轻易地通过使用 VPN、Tor 或其他任意易受攻击的中继主机来达到欺骗的目的。基于地理位置的过滤器甚至可能会阻止本不该阻止的合法网络流量。在你决定把它部署到你的生产环境之前请仔细考虑这个限制。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/block-network-traffic-by-country-linux.html + +作者:[Dan Nanni][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:https://www.archlinux.org/news/dropping-tcp_wrappers-support/ +[2]:http://xmodulo.com/block-unwanted-ip-addresses-linux.html +[3]:http://xtables-addons.sourceforge.net/geoip.php +[4]:http://xtables-addons.sourceforge.net/ +[5]:https://support.maxmind.com/geoip-faq/geoip2-and-geoip-legacy-databases/how-accurate-are-your-geoip2-and-geoip-legacy-databases/ +[6]:http://ask.xmodulo.com/add-cron-job-linux.html +[7]:https://en.wikipedia.org/wiki/ISO_3166-1 diff --git a/published/201601/20151222 Turn Tor socks to http.md b/published/201601/20151222 Turn Tor socks to http.md new file mode 100644 index 0000000000..77415b8e82 --- /dev/null +++ b/published/201601/20151222 Turn Tor socks to http.md @@ -0,0 +1,92 @@ +将 Tor socks 转换成 http 代理 +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/12/tor-593x445.jpg) + +你可以通过不同的 Tor 工具来使用 Tor 服务,如 Tor 浏览器、Foxyproxy 和其它东西,像 wget 和 aria2 这样的下载管理器不能直接使用 Tor socks 开始匿名下载,因此我们需要一些工具来将 Tor socks 转换成 http 代理,这样就能用它来下载了。 + +**注意**:本教程基于 Debian ,其他发行版会有些不同,因此如果你的发行版是基于 Debian 的,就可以直接使用下面的配置了。 + +### Polipo + +这个服务会使用 8123 端口和 127.0.0.1 的 IP 地址,使用下面的命令来在计算机上安装 Polipo: + + sudo apt install polipo + +现在使用如下命令打开 Polipo 的配置文件: + + sudo nano /etc/polipo/config + +在文件最后加入下面的行: + + proxyAddress = "::0" + allowedClients = 192.168.1.0/24 + socksParentProxy = "localhost:9050" + socksProxyType = socks5 + +用如下的命令来重启 Polipo: + + sudo service polipo restart + +现在 Polipo 已经安装好了!在匿名的世界里做你想做的吧!下面是使用的例子: + + pdmt -l "link" -i 127.0.01 -p 8123 + +通过上面的命令 PDMT(Persian 下载器终端)会匿名地下载你的文件。 + +### Proxychains + +在此服务中你可以设置使用 Tor 或者 Lantern 代理,但是在使用上它和 Polipo 和 Privoxy 有点不同,它不需要使用任何端口!使用下面的命令来安装: + + sudo apt install proxychains + +用这条命令来打开配置文件: + + sudo nano /etc/proxychains.conf + +现在添加下面的代码到文件底部,这里是 Tor 的端口和 IP: + + socks5 127.0.0.1 9050 + +如果你在命令的前面加上“proxychains”并运行,它就能通过 Tor 代理来运行: + + proxychains firefoxt + proxychains aria2c + proxychains wget + +### Privoxy + +Privoxy 使用 8118 端口,可以很轻松地通过 privoxy 包来安装: + + sudo apt install privoxy + +我们现在要修改配置文件: + + sudo nano /etc/pivoxy/config + +在文件底部加入下面的行: + + forward-socks5 / 127.0.0.1:9050 . + forward-socks4a / 127.0.0.1:9050 . + forward-socks5t / 127.0.0.1:9050 . + forward 192.168.*.*/ . + forward 10.*.*.*/ . + forward 127.*.*.*/ . + forward localhost/ . + +重启服务: + + sudo service privoxy restart + +服务已经好了!端口是 8118,IP 是 127.0.0.1,就尽情使用吧! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/turn-tor-socks-http/ + +作者:[Hossein heydari][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/hossein/ diff --git a/published/201601/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md b/published/201601/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md new file mode 100644 index 0000000000..6f9cb3e793 --- /dev/null +++ b/published/201601/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md @@ -0,0 +1,105 @@ +如何在 CentOS / RHEL 上设置 SSH 免密码登录 +================================================================================ +![](http://www.ehowstuff.com/wp-content/uploads/2015/12/notebook-1071774_1280.jpg) + +作为系统管理员,你计划在 Linux 上使用 OpenSSH,完成日常工作的自动化,比如文件传输、备份数据库转储文件到另一台服务器等。为实现该目标,你需要从主机 A 能自动登录到主机 B。自动登录也就是说,要在 shell 脚本中使用ssh,而无需要输入任何密码。 + +本文会告诉你怎样在 CentOS/RHEL 上设置 SSH 免密码登录。自动登录配置好以后,你可以通过它使用 SSH (Secure Shell)和安全复制 (SCP)来移动文件。 + +SSH 是开源的,是用于远程登录的最为可靠的网络协议。系统管理员用它来执行命令,以及通过 SCP 协议在网络上向另一台电脑传输文件。 + +通过配置 SSH 免密码登录,你可以享受到如下的便利: + +- 用脚本实现日常工作的自动化。 +- 增强 Linux 服务器的安全性。这是防范虚拟专用服务器(VPS)遭受暴力破解攻击的一个推荐的方法,SSH 密钥单凭暴力破解是几乎不可攻破的。 + +### 什么是 ssh-keygen ### + +ssh-keygen 是一个用来生成、创建和管理 SSH 认证用的公私钥的工具。通过 ssh-keygen 命令,用户可以创建支持SSH1 和 SSH2 两个协议的密钥。ssh-keygen 为 SSH1 协议创建 RSA 密钥,SSH2 则可以是 RSA 或 DSA。 + +### 什么是 ssh-copy-id ### + +ssh-copy-id 是用来将本地公钥拷贝到远程的 authorized_keys 文件的脚本命令,它还会将身份标识文件追加到远程机器的 ~/.ssh/authorized_keys 文件中,并给远程主机的用户主目录适当的的权限。 + +### SSH 密钥 ### + +SSH 密钥为登录 Linux 服务器提供了更好且安全的机制。运行 ssh-keygen 后,将会生成公私密钥对。你可以将公钥放置到任意服务器,从持有私钥的客户端连接到服务器的时,会用它来解锁。两者匹配时,系统无需密码就能解除锁定。 + +### 在 CentOS 和 RHEL 上设置免密码登录 SSH ### + +以下步骤在 CentOS 5/6/7、RHEL 5/6/7 和 Oracle Linux 6/7 上测试通过。 + +节点1 : 192.168.0.9 +节点2 : 192.168.l.10 + +#### 步骤1 : #### + +测试节点1到节点2的连接和访问: + + [root@node1 ~]# ssh root@192.168.0.10 + The authenticity of host '192.168.0.10 (192.168.0.10)' can't be established. + RSA key fingerprint is 6d:8f:63:9b:3b:63:e1:72:b3:06:a4:e4:f4:37:21:42. + Are you sure you want to continue connecting (yes/no)? yes + Warning: Permanently added '192.168.0.10' (RSA) to the list of known hosts. + root@192.168.0.10's password: + Last login: Thu Dec 10 22:04:55 2015 from 192.168.0.1 + [root@node2 ~]# + +#### 步骤二: #### + +使用 ssh-key-gen 命令生成公钥和私钥,这里要注意的是可以对私钥进行加密保护以增强安全性。 + + [root@node1 ~]# ssh-keygen + Generating public/private rsa key pair. + Enter file in which to save the key (/root/.ssh/id_rsa): + Enter passphrase (empty for no passphrase): + Enter same passphrase again: + Your identification has been saved in /root/.ssh/id_rsa. + Your public key has been saved in /root/.ssh/id_rsa.pub. + The key fingerprint is: + b4:51:7e:1e:52:61:cd:fb:b2:98:4b:ad:a1:8b:31:6d root@node1.ehowstuff.local + The key's randomart image is: + +--[ RSA 2048]----+ + | . ++ | + | o o o | + | o o o . | + | . o + .. | + | S . . | + | . .. .| + | o E oo.o | + | = ooo. | + | . o.o. | + +-----------------+ + +#### 步骤三: #### + +用 ssh-copy-id 命令将公钥复制或上传到远程主机,并将身份标识文件追加到节点2的 ~/.ssh/authorized_keys 中: + + [root@node1 ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.0.10 + root@192.168.0.10's password: + Now try logging into the machine, with "ssh '192.168.0.10'", and check in: + + .ssh/authorized_keys + + to make sure we haven't added extra keys that you weren't expecting. + +#### 步骤四: #### + +验证免密码 SSH 登录节点2: + + [root@node1 ~]# ssh root@192.168.0.10 + Last login: Sun Dec 13 14:03:20 2015 from www.ehowstuff.local + +我希望这篇文章能帮助到你,为你提供 SSH 免密码登录 CentOS / RHEL 的基本认知和快速指南。 + +-------------------------------------------------------------------------------- + +via: http://www.ehowstuff.com/ssh-login-without-password-centos/ + +作者:[skytech][a] +译者:[fw8899](https://github.com/fw8899) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.ehowstuff.com/author/skytech/ diff --git a/published/201601/20151223 How to Use Glances to Monitor System on Ubuntu.md b/published/201601/20151223 How to Use Glances to Monitor System on Ubuntu.md new file mode 100644 index 0000000000..08c03efb93 --- /dev/null +++ b/published/201601/20151223 How to Use Glances to Monitor System on Ubuntu.md @@ -0,0 +1,109 @@ +如何在 Ubuntu 上使用 Glances 监控系统 +================================================================================ + +![](https://www.maketecheasier.com/assets/uploads/2015/12/glances_featured.jpg) + +Glances 是一个用于监控系统的跨平台、基于文本模式的命令行工具。它是用 Python 编写的,使用 `psutil` 库从系统获取信息。你可以用它来监控 CPU、平均负载、内存、网络接口、磁盘 I/O,文件系统空间利用率、挂载的设备、所有活动进程以及消耗资源最多的进程。Glances 有很多有趣的选项。它的主要特性之一是可以在配置文件中设置阀值(careful[小心]、warning[警告]、critical[致命]),然后它会用不同颜色显示信息以表明系统的瓶颈。 + +### Glances 的功能 + +- CPU 平均负载 +- 不同状态(如活动、休眠)进程的数量 +- 所有内存信息,如物理内存、交换空间、空闲内存 +- CPU 信息 +- 网络连接的上行/下行速度 +- 磁盘 I/O 读/写速度详细信息 +- 当前挂载设备的磁盘使用情况 +- 消耗资源最多的进程和他们的 CPU/内存使用情况 + +### 安装 Glances + +Glances 在 Ubuntu 的软件仓库中,所以安装很简单。执行下面的命令安装 Glances: + + sudo apt-get install glances + +(LCTT 译注:若安装后无法正常使用,可考虑使用 pip 安装/升级 glances:`sudo pip install --upgrade glances`) + +### Glances 使用方法 + +安装完成后,可以执行下面的命令启动 Glances: + + glances + +你将看到类似下图的输出: + +![glances monitor system output](https://www.maketecheasier.com/assets/uploads/2015/12/glances_output1.png) + +要退出 Glances 终端,按 ESC 键或 `Ctrl + C`。 + +默认情况下,时间间隔(LCTT 译注:显示数据刷新的时间间隔)是 1s,不过你可以在从终端启动 Glances 时自定义时间间隔。 + +要把时间间隔设为 5s,执行下面的命令: + + glances -t 5 + +### Glances 中不同颜色含义 + +Glances 中不同颜色的含义: + +- `绿色`:正常(OK) +- `蓝色`:小心(careful) +- `紫色`:警告(warning) +- `红色`:致命(critical) + +默认设置下,Glances 的阀值设置是:careful=50,warning=70,critical=90。你可以通过 “/etc/glances/” 目录下的默认配置文件 glances.conf 来自定义这些阀值。 + +### Glances 的选项 + +Glances 提供了很多快捷键,可以在它运行时用来查找输出信息。 + +下面是一些常用的热键列表: + +- `m` : 按内存占用排序进程 +- `p` : 按进程名称排序进程 +- `c` : 按 CPU 占用率排序进程 +- `i` : 按 I/O 频率排序进程 +- `a` : 自动排序进程 +- `d` : 显示/隐藏磁盘 I/O 统计信息 +- `f` : 显示/隐藏文件系统统计信息 +- `s` : 显示/隐藏传感器统计信息 +- `y` : 显示/隐藏硬盘温度统计信息 +- `l` : 显示/隐藏日志 +- `n` : 显示/隐藏网络统计信息 +- `x` : 删除警告和严重日志 +- `h` : 显示/隐藏帮助界面 +- `q` : 退出 +- `w` : 删除警告记录 + +### 使用 Glances 监控远程系统 + +你也可以使用 Glances 监控远程系统。要在远程系统上使用它,使用下面的命令: + + glances -s + +你会看到类似下面的输出: + +![glances monitor remote system server](https://www.maketecheasier.com/assets/uploads/2015/12/glances_server.png) + +如你所见,Glances 运行在 61209 端口。 + +现在,到远程机器上执行下面的命令以连接到指定 IP 地址的 Glances 服务器上。假设 192.168.1.10 是你的 Glances 服务器 IP 地址。 + + glances -c -P 192.168.1.10 + +### 结论 + +对于每个 Linux 系统管理员来说,Glances 都是一个非常有用的工具。使用它,你可以轻松、高效地监控 Linux 系统。如果你有什么问题,自由地评论吧。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/glances-monitor-system-ubuntu/ + +作者:[Hitesh Jethva][a] +译者:[bianjp](https://github.com/bianjp) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/hiteshjethva/ + diff --git a/published/201601/20151223 Monitor Linux System Performance Using Nmon.md b/published/201601/20151223 Monitor Linux System Performance Using Nmon.md new file mode 100644 index 0000000000..26f3f3f1e2 --- /dev/null +++ b/published/201601/20151223 Monitor Linux System Performance Using Nmon.md @@ -0,0 +1,87 @@ +使用 Nmon 监控 Linux 的系统性能 +================================================================================ +Nmon(得名于 Nigel 的监控器)是IBM的员工 Nigel Griffiths 为 AIX 和 Linux 系统开发的一款计算机性能系统监控工具。Nmon 可以把操作系统的统计数据展示在屏幕上或者存储到一份数据文件里,来帮助了解计算机资源的使用情况、调整方向和系统瓶颈。这个系统基准测试工具只需要使用一条命令就能得到大量重要的性能数据。使用 Nmon 可以很轻松的监控系统的 CPU、内存、网络、硬盘、文件系统、NFS、高耗进程、资源和 IBM Power 系统的微分区的信息。 + +### Nmon 安装 ### + +Nmon 默认是存在于 Ubuntu 的仓库中的。你可以通过下面的命令安装 Nmon: + + sudo apt-get install nmon + +### 怎么使用Nmon来监控Linux的性能 ### + +安装完成后,通过在终端输入`nmon` 命令来启动 Nmon + + nmon + +你会看到下面的输出: + +![nmon-output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon-output.png) + +从上面的截图可以看到 nmon 命令行工具完全是交互式运行的,你可以使用快捷键来轻松查看对应的统计数据。你可以使用下面的 nmon 快捷键来显示不同的系统统计数据: + +- `q` : 停止并退出 Nmon +- `h` : 查看帮助 +- `c` : 查看 CPU 统计数据 +- `m` : 查看内存统计数据 +- `d` : 查看硬盘统计数据 +- `k` : 查看内核统计数据 +- `n` : 查看网络统计数据 +- `N` : 查看 NFS 统计数据 +- `j` : 查看文件系统统计数据 +- `t` : 查看高耗进程 +- `V` : 查看虚拟内存统计数据 +- `v` : 详细模式 + +### 核查 CPU 处理器 ### + +如果你想收集关于 CPU 性能相关的统计数据,你应该按下键盘上的`c`键,之后你将会看到下面的输出: + +![nmon_cpu_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_cpu_output.png) + +### 核查高耗进程统计数据 ### + +如果想收集系统正在运行的高耗进程的统计数据,按键盘上的`t`键,之后你将会看到下面的输出: + +![nmon_process_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_process_output.jpg) + +### 核查网络统计数据 ### + +如果想收集 Linux 系统的网络统计数据,按下`n`键,你将会看到下面输出: + +![n_network_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_network_output.png) + +### 硬盘 I/O 图表 ### + +使用`d` 键获取硬盘相关的信息,你会看到下面输出: + +![nmon_disk_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_disk_output.png) + +### 核查内核信息 ### + +Nmon 一个非常重要的快捷键是`k`键,用来显示系统内核相关的概要信息。按下`k`键之后,会看到下面输出: + +![nmon_kernel_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_kernel_output.png) + +### 获取系统信息 ### + +对每个系统管理员来说一个非常有用的快捷键是`r`键,可以用来显示计算机的系统结构、操作系统版本号和 CPU 等不同资源的信息。按下`r`键之后会看到下面输出: + +![nmon_system_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_system_output.png) + +### 总结 ### + +还有许多其他的工具做的和 Nmon 同样的工作,不过 Nmon 对一个 Linux 新手来说还是很友好的。如果你有什么问题,尽管评论。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/monitor-linux-system-performance/ + +作者:[Hitesh Jethva][a] +译者:[sonofelice](https://github.com/sonofelice) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/hiteshjethva/ + diff --git a/published/201601/20151223 Ten Biggest Linux Stories Of The Year 2015.md b/published/201601/20151223 Ten Biggest Linux Stories Of The Year 2015.md new file mode 100644 index 0000000000..0a844a4cd7 --- /dev/null +++ b/published/201601/20151223 Ten Biggest Linux Stories Of The Year 2015.md @@ -0,0 +1,127 @@ +2015年 Linux 世界的十个大事件 +====================== + +![2015年的大事件](http://itsfoss.com/wp-content/uploads/2015/12/Biggest-Linux-Stories-2015.jpg) + +2015年已经过去,我在这里(It's FOSS)发表《2015年的大事件》系列。这个系列的第一篇文章为《2015年 Linux 世界的十个大事件》。这些事件在 Linux 世界中产生了极大的影响,无论它们是积极的还是消极的。 + +我总结了2015发生的十件产生了最大影响的事件。让我们来看看: + +### 2015年度十大 Linux /开源相关事件 + +补充一句,以下这些事件没有按照时间顺序排列。 + +#### 微软与 Linux 的结盟 + +在9月下旬,所有人听到[微软构建了自己的 Linux 发行版][1]这个消息时都大吃一惊。其在后来被揭露,这其实是一个微软开发的用于它的 Azure cloud switches 的[软件][2]。 + +但故事还没结束。微软真的与 Canonical(Ubuntu Linux 的母公司)达成合作来开发 [HDInsight][3],这是微软在 Azure 上构建的 Hadoop 大数据服务。 Ubuntu 是[微软在其上部署应用][4]的第一个 Linux 系统。 + +微软会继续保持它与 Linux 的关系吗? 还是在使用 Linux 达到其目的(Azure)就会收手?只有时间能告诉我们一切。 + +#### 微软发布适用于 Linux 的 Visual Studio Code + +在微软发布 Linux 发行版引起喧嚣之前,微软扔下了另一枚炸弹——发布 [Linux 版 Visual Studio Code][27], 与其一并发布的还有 Windows 版以及 OS X 版。尽管 Visual Studio Code 并不是开源的,从某种意义上讲,发布 Linux 版本仍然是 Linux 用户的胜利。(LCTT 译注:此处原文消息有误,[Visual Studio Code 已开源][28]。)无论如何,Linus Torvalds 曾说过一句很著名的话:“如果微软给 Linux 开发过一款应用的话,这就意味着我已经赢了”。 + +你可以看这个教程来学习[如何在 Ubuntu 中安装 Visual Studio Code][5]。 + +#### 苹果公司开源编程语言 Swift + +在向 Linux 及开源“示爱”方面,苹果公司也不甘示弱。苹果用来制作 iOS 应用的首选编程语言 Swift,[现已开源][6]并移植到 Linux 中。虽然其还在测试中,但你已经可以轻易地[在 Ubuntu 中安装 Swift][7]。 + +但是,苹果就是苹果,它[开始吹嘘][8]其为“第一个视开源开发为公司关键的软件开发策略的计算机公司巨头(原文如此)”。 + +#### Ubuntu 手机终于发布 + +Ubuntu 手机终于在今年年初发布。因其早期使用者及开发者,Ubuntu 深受 Ubuntu 社区喜爱。主流智能机用户仍然回避它,主要是[因为该系统还在重度开发中][9]。对于 Ubuntu 手机的问世,2016年将成为决定性的一年。 + +#### Jolla 遭受经济危机 + +Jolla 是 Sailfish OS 这个基于 Linux 的智能手机系统的幕后公司,它遭受了严重的财政困难。这导致了[一半的Jolla 员工被裁][10]。 + +Jolla 在2014年针对它的平板电脑完成了一次非常[成功的众筹][11],显然,他们将大部分预算都花在了 Sailfish OS 的开发上,而在主要投资者退出后,公司正在挣扎以求生存。 + +不过有一个好消息,Jolla 成功拿到了一些雄厚的资金,而且他们[已经继续运营了][12]。 + +#### Firefox OS 已死 + +作为安卓的开源替代品,Mozila 的移动操作系统 Firefox OS 在去年底慢性死亡。本打算在发展中国家售卖低至25美金的智能手机,可基于 Firefox OS 的手机却一直没有流行起来。我认为主要原因是它的硬件配置不高,以及它缺少流行应用。 + +在十二月,[Mozilla 宣布][13]其将停止开发 Firefox OS,并停止出售 Firefox 智能手机。 + +虽然没有正式宣布过,我认为 [Tizen][14],这个 Linux 基金会旗下的基于 Linux 的移动操作系统,也已经消失了。我没有看到任何关于 Tizen 开发的消息,而且 Linux 基金会从未推动过它的开发。Tizen 何时死亡只是一个时间问题。(LCTT 译注:此处原文消息有误,[Tizen 在2015年发布了 3.0 版本][29]。) + +#### “Ubuntu 家族”内讧 + +五月份时,Kubuntu 项目的领导者 Jonathan Riddell [被 Ubuntu 社区委员会强制要求下台][15],这引起了很多激烈的讨论。Jonathan 曾质问 Ubuntu 所收捐款的使用情况,他抱怨 Kubuntu 从未见到过这些钱。 + +这导致了两方的互相谴责。最终。Ubuntu 的大老板,[Mark Shuttleworth 要求 Jonathan 下台][16]。 + +#### 女性 Linux 内核开发者因“野蛮的沟通方式”而退出 + +Linux 之父 Linus Torvalds 以其粗俗的语言而著称。Linux 内核开发者 [Sarah Sharp][17] 也因为嘴快心直而闻名。 + +Sarah Sharp 曾在2013年与 Linus Torvalds 公开争执,[建议 Linus 将“语言暴力”赶出邮件列表][18]。但 Linus 也没有[委婉地][19]回复她。 + +那是在2013年。2015年,Sarah 宣布她正在[逐步停止她在内核社区的工作][20],因为他们的交流方式缺乏基本礼仪,并且野蛮而充满亵渎。 + +这一举动让人们开始讨论 Linux 内核社区是否真的应该改变他们的行为方式,还是 Sarah 做的太过分了。 + +#### Unity 游戏编辑器移植到 Linux平台 + +尽管[在 Linux 上玩游戏][21]仍是 Linux 用户们的阿克琉斯之踵,而在游戏引擎 Unity 宣布其正在测试[Linux 下的游戏编辑器][22]时整个社区都沸腾了。因为在渲染图像时,Linux 是一个最流行的选择,所以我们推测这将使游戏开发者向 Linux 靠拢。不过,Unity 是否真的会推出一个最终版本的游戏编辑器,这个问题还未被证实。 + +#### 政府机构采用开源软件 + +欧洲数个城市的管理机构决定[抛弃先前的软件][23],并使用其开源的替代品。大多数城市管理机构将 Microsoft Office 替换为 LibreOffice 或 OpenOffice. 一些城市管理机构和[公立学校][24]也在跟进,将 Microsoft Windows 换成 Linux。 + +对于这一行为,削减成本是一个重要的因素,因为城市管理机构通过采用开源软件省下了无数欧元。 + +大学也并没有在采用开源软件的道路上落后。这一年,我们听到了[大学如何抛弃 Photoshop 改用 Krita][25] 以及[大学使用开源 Office 软件][26]的消息。 + +### 总结 + +与其他年一样,2015年同样有许多令 Linux 爱好者感到积极或消极的时刻。我们看到 Linux 的竞争者,如微软和苹果,向 Linux 靠拢,政府机构采用开源软件。同时,我们还见证了 Firefox 智能手机系统的失败。我想说,这真是喜忧参半的一年。 + +你认为呢?我希望你们分享你所认为对于 Linuxer 们来说最重要的新闻,和你们对这一年的整体感受。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/biggest-linux-stories-2015/ + +作者:[Abhishek][a] +译者:[StdioA](https://github.com/StdioA) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://itsfoss.com/author/abhishek/ +[1]: https://linux.cn/article-6269-1.html +[2]: http://arstechnica.com/information-technology/2015/09/microsoft-has-built-software-but-not-a-linux-distribution-for-its-software-switches/ +[3]: https://azure.microsoft.com/en-us/services/hdinsight/ +[4]: http://www.zdnet.com/article/microsoft-deploys-first-major-server-application-on-ubuntu-linux/ +[5]: https://linux.cn/article-5423-1.html +[6]: https://linux.cn/article-6689-1.html +[7]: https://linux.cn/article-6781-1.html +[8]: https://business.facebook.com/itsfoss/photos/pb.115098615297581.-2207520000.1450817108./634288916711879/?type=3&theater +[9]: http://www.engadget.com/2015/07/24/ubuntu-phone-review/ +[10]: https://linux.cn/article-6621-1.html +[11]: https://www.indiegogo.com/projects/jolla-tablet-world-s-first-crowdsourced-tablet#/ +[12]: https://linux.cn/article-6757-1.html +[13]: https://linux.cn/article-6800-1.html +[14]: https://www.tizen.org/ +[15]: https://linux.cn/article-5529-1.html +[16]: http://www.cio.com/article/2926838/linux/mark-shuttleworth-ubuntu-community-council-ask-kubuntu-developer-to-step-down-as-leader.html +[17]: http://sarah.thesharps.us/ +[18]: http://www.techeye.net/chips/linus-torvalds-and-intel-woman-in-sweary-spat +[19]: http://marc.info/?l=linux-kernel&m=137392506516022&w=2 +[20]: https://linux.cn/article-6361-1.html +[21]: https://linux.cn/article-6258-1.html +[22]: http://itsfoss.com/unity-gaming-engine-linux/ +[23]: https://linux.cn/article-6459-1.html +[24]: http://itsfoss.com/spanish-school-ditches-windows-ubuntu/ +[25]: http://itsfoss.com/french-university-dumps-adobe-photoshop-open-source-app-krita/ +[26]: http://itsfoss.com/hungarian-universities-switch-eurooffice/ +[27]: https://linux.cn/article-5376-1.html +[28]: https://linux.cn/article-6604-1.html +[29]: https://linux.cn/article-6261-1.html diff --git a/published/201601/20151223 What' s the Best File System for My Linux Install.md b/published/201601/20151223 What' s the Best File System for My Linux Install.md new file mode 100644 index 0000000000..6bb9dcd898 --- /dev/null +++ b/published/201601/20151223 What' s the Best File System for My Linux Install.md @@ -0,0 +1,97 @@ +哪个文件系统最适合你的 Linux 系统? +================================================================================ + +![](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-feature-image.jpg) + +文件系统: 它们不是世界上最激动人心的技术,但是仍然很重要。本文我们将细数那些流行的 Linux 文件系统 - 它们是什么,它们能够做什么,以及它们的目标用户。 + +### Ext4 ### + +![file-systems-ext4](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-ext4.png) + +如果你曾经安装过 Linux,你可能在安装过程中看到过“Ext4”字样。用它有一个不错的理由: 它是当前每个可用的 Linux 发行版所选择的文件系统。当然,还有其他的一些选择,但是不可否认的是,Ext4(Extended 4)几乎是所有 Linux 用户都会选择的文件系统。 + +#### 它能做什么? #### + +Ext4 拥有之前的文件系统(Ext2/Ext3)中你所期待的所有优点, 同时还带来了一些改进。还有很多内容可以发掘,这里列举出了 Ext4 为你带来的最好的部分: + +- 日志型文件系统 +- 日志校验 +- 多重块文件分配 +- 向后兼容 Ext2 && Ext3 +- 持续的空闲空间预分配 +- 改进的文件系统校验(相比于之前的版本) +- 当然,同时支持更大的文件 + +#### 目标用户 #### + +Ext4 针对那些寻找超级可靠的基础环境或者那些只需要能工作就行的用户。这个文件系统不会对你的系统做快照;它甚至没有最好的 SSD 支持,但是如果你不是太挑剔的话,你会觉得它也还不错。 + +### BtrFS ### + +![file-systems-btrFS](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-btrFS-e1450065697580.png) + +B 树(B-tree)文件系统 (也被当做是 butterFS,黄油文件系统) 是 Oracle 为 Linux 研发的一款文件系统。它是一个全新的文件系统,而且正处于主要开发阶段。Linux 社区认为其有时候使用上还有些不稳定。BtrFS 的核心原则是围绕着写时复制(copy-on-write)原则展开的。**写时复制**基本上意味着在写入数据完成前,这份数据的每一比特都有单独的一份副本。当数据写入完毕后,相当于它做了一份副本。 + +#### 它能做什么 #### + +除了支持写时复制之外,BtrFS 也能够胜任许多其他的事务 - 事实上,它可以一直列出各种特性。这里列举最值得一提的特性:支持只读快照、文件克隆、子卷、透明压缩、离线文件系统校验、从 ext3 & 4 原地转换到 BtrFS、在线碎片整理,还支持 RAID 0, RAID 1, RAID 5, RAID 6 和 RAID 10。 + +#### 目标用户 #### + +BtrFS 的开发者们许诺过,该文件系统是当前其他文件系统的新一代替代者。非常正确,虽然目前其处于开发中。它有很多面向高级用户的杀手级特性,对于基本用户也是这样(包括 SSD 上面的更佳性能)。这个文件系统针对那些想要从文件系统中获取更多(特性),以及那些想尝试用写时复制机制做一些事情的用户。 + +### XFS ### + +![file-systems-xfs](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-xfs.jpg) + +由 Silicon Graphics 公司创造开发,XFS 是一个高端文件系统,定位于速度和性能方面。处于对性能方面的专注,使得在并行 IO 方面,XFS 表现的尤其出色。XFS 文件系统能够处理数量庞大的数据,事实上某些 XFS 用户的数据接近300TB 以上。 + +#### 它能做什么 #### + +XFS 是一个经历良好测试的数据存储文件系统,它是为了高性能操作而诞生的。其特性包括: + +- RAID 阵列的条带化分配 +- 日志型文件系统 +- 块大小可变 +- 直接 I/O +- 指定速率(guaranteed-rate) I/O +- 快照 +- 在线碎片整理 +- 在线调整文件系统大小 + +#### 目标用户 #### + +XFS 针对那些想要一个坚如磐石的文件系统方案的用户。它始于1993年,并且随着时间的变迁它变得越来越好。如果你有一台家庭服务器,而且你苦恼于如何部署存储环境,那么可以考虑下 XFS。它拥有的众多特性(比如快照)能够有助于你的文件存储系统。尽管如此,它不局限于服务器端。如果你是一个相对高级一点的用户或者你对 BtrFS 所承诺的很多特性感兴趣的话,尝试一下 XFS。它实现了很多与 BtrFS 相似的特性,并且没有稳定性方面的问题。 + +### Reiser4 ### + +![file-system-riser4](https://www.maketecheasier.com/assets/uploads/2015/05/file-system-riser4.gif) + +Reiser4 是 ReiserFS 的继任者,由 Namesys 公司创造研发。它的诞生可以追溯到 Linspire 项目和 DARPA。它与众不同的地方在于众多的事务模式。并不止于单一的一种写入数据的方式;取而代之的是,有很多方式(来写入)。 + +#### 它能做什么 #### + +Reiser4 拥有着使用多种不同事务模式的独特能力。它能够使用写时复制模式 (像 BtrFS),任意位置写入(write-anywhere),日志,以及混合事务模式。它在 ReiserFS 的基础上做了许多的改进,包括更好的基于漫游日志的文件系统日志,对较小文件的支持更好,以及更快速的目录处理。Reiser4 提供了许多功能特性。还有更多的特性可以探讨,不过简单来讲,相比于 ReiserFS 它不但做了非常大的改进,而且增加了众多特性。 + +#### 目标用户 #### + +Resier4 适合那些想要将一个文件系统应用到多种场景下的用户。可能你想在一台机器上使用写时复制机制,在另一台机器上使用任意位置写入机制,还会在另一台机器上使用混合事务,而你又不希望使用多种不同类型的文件系统来完成这项任务。Reiser4 是适合这种情况的完美方案。 + +### 结论 ### + +Linux 上有许多可用的文件系统。每个文件系统都有其特定的用途,以便于特定用户解决不同的问题。本文的焦点集中在 Linux 平台上文件系统的主流选择。毫无疑问,其它的场景下还有一些别的选择。 + +你在 Linux 上最喜欢的文件系统是什么?在下面的评论区告诉我们吧! + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/best-file-system-linux/ + +作者:[Derrik Diener][a] +译者:[icecoobe](https://github.com/icecoobe) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/derrikdiener/ diff --git a/published/201601/20151225 What are the best plugins to increase productivity on Emacs.md b/published/201601/20151225 What are the best plugins to increase productivity on Emacs.md new file mode 100644 index 0000000000..8e063d3693 --- /dev/null +++ b/published/201601/20151225 What are the best plugins to increase productivity on Emacs.md @@ -0,0 +1,79 @@ +提升 emacs 生产力的十大最佳插件 +================================================================================ + +一年前的这个时候,我想要寻找[将 Vim 打造成一个成熟的全功能的 IDE][1] 的最好插件。有趣的是,那篇文章的很多评论提到了 Emacs 已经大部分有了这些内置插件,已经是一个很棒的 IDE 了。尽管我对 Emacs 的难以置信的多样化表示赞同,它依旧不是一个可以开箱即用的高级编辑器。还好,其庞大的插件库可以解决这个问题。但在过多的选择中,有时很难弄清该如何入手。因此,现在让我试着收集一个不可或缺的插件的简短列表,来提升你使用 Emacs 时的工作效率。 虽然我主要侧重于与编程相关的生产力提升,但是这些插件对所有人或不同用途都是有用的。 + +### 1. Ido-mode ### + +![](https://c2.staticflickr.com/6/5718/23311895573_c1fb34337c_c.jpg) + +Ido 或许是对新手最有用的一个插件,Ido 的意思是交互式工作(interactively do)。它取代了大部分的用花哨字符匹配菜单的枯燥提示。好比说,它用列出了当前目录所有文件的列表来取代了常规的打开文件提示符。输入一些字符,Ido 将尝试匹配最合适的文件。它通过可视化让你的操作变得更容易,这也是一个快速遍历所有文件都有相同前缀的文件夹的方法。 + +### 2. Smex ### + +![](https://c2.staticflickr.com/2/1517/23310442314_2a22a60c34_c.jpg) + +它不算最著名的一个、但却是一个替代 Ido-mode 的好选择:Smex 可以优雅的替代普通的`M-x`提示符,灵感大部分来自于 Ido-mode。它也给调用`M-x`后输入的命令带来了同样的交互搜索能力。它简单而有效,是一个为常用操作提升效率的最好方法。 + +### 3. Auto Complete ### + +![](https://c2.staticflickr.com/6/5794/23643004900_3042f77952_c.jpg) + +知道这个插件的存在之前,我在 Emacs 里面有一半的时间花在敲击 `M-/` 来补完单词上。现在,我有一个漂亮的弹出菜单可以为我做自动补全。无须多说,我们都需要它。 + +### 4. YASnippet ### + +![](https://c2.staticflickr.com/2/1688/23830403072_0d8df6ef4c_b.jpg) + +这是真正的程序员必备利器。总有一些代码片段会让我们觉得我们一辈子都在写它。对我来说,就是调试 PHP 时不断输入的 `var_dump(...);exit;`。经过一段时间一遍又一遍的输入`var_dump(...);exit;`,我觉得我可以预先把其做成录制好的、方便用到的代码片段。使用 YASnippets,可以很容易导入代码片段文件或者自己做个。之后,只要按下一个 tab 键,就可以将一个小的关键词扩展成一大段预先写好的代码,然后可以很方便地在里面修改。 + +### 5. Org-mode ### + +![](https://c2.staticflickr.com/6/5687/23570808789_d683c949e4.jpg) + +免责声明,我最近才开始使用 Org-mode,但它已经深深的吸引了我。从我看过数以百计的文章来说,Org-mode 可以改变你的生活。它背后的想法很简单:它是一种用普通文本做简单备注的模式,可以很容易地在任务列表和各种数据中转来转去,并进行一些比如按优先级或到期日期的过滤,或设置一个重复日期。然而,虽然思路简单,但你可以做到很多,用各种方法用于各种用途。与其去看一个长长的介绍,我觉得你可以去读读[现有教程][2],有很多视频可以看,自己去体验一下 Org-mode 是多么强大。 + +### 6. Helm ### + +![](https://c2.staticflickr.com/2/1489/23310442334_5e6db22b79_c.jpg) + +一些使用者喜欢它,但是其他人没有这么大的使用热情。我是后者的一部分。但在拥有这样一个庞大的追随者的情况下,是不能不提到它的。Helm 旨在完全变换你的 Emacs 使用体验。简单来说,Helm 是一个在 Emacs 中帮助你快速找到一个文件或命令的框架。根据你的输入,它将尝试使用词语自动完成来引导你将大脑的念头变为行动。起初感觉有点奇怪,但对一些人来说,Helm 本身就是一个信仰。虽然我不是 Helm 的粉丝,我欣赏 helm-occur 这一个伟大的工具可以在一个大文档搜索字符串并且在一个单独的缓冲区显示所有匹配结果,以便很容易在它们之间跳转。如果你正在寻找一个快速演示来了解 Helm 能做什么,我推荐[这篇文章][3]。 + +### 7. ace-jump-mode ### + +![](https://c2.staticflickr.com/2/1710/23856168871_6df1faa565_c.jpg) + +这是另一个有一大群追随者的插件,我正在试图成为 ace-jump-mode 的粉丝。掌握这个插件,你会体验到超越鼠标感受。简单描述一下,通过你选择的快捷方式触发 ace-jump-mode 后,你会被提示输入字符。输入一个字符,所有以该字符开头的单词中的那个字符就会替换成一个唯一字符并被高亮。输入一个屏幕上的高亮字符,你的光标会直接跳转到高亮显示的那个词。我不得不承认,这让我使用它时有点反应不过来,但是,一旦你掌握它,它将显著提升你在一个文档里的移动速度。(LCTT 译注:用文字描述比较困难,如截图中,你输入的是一个“i”,然后屏幕中所有以“i”开头的单词中的那个“i”都被替换成了从 a 到 z 的字符,并高亮;你可以输入这些高亮的字符直接跳转到那个位置。) + +### 8. find-file-in-project ### + +![](https://c2.staticflickr.com/2/1492/23570808809_96ec8454a9_c.jpg) + +如果你喜欢 Sublime text 以及它可以用非常方便的`Ctrl-p`模糊搜索来打开一个项目中的任何文件的功能,你将会喜欢上 find-file-in-project (简称 ffip)的。使用设置指定了您的版本控制的根文件夹后,您可以轻松地调出一个很酷的文本条,通过快速扫描和搜索你的代码,来根据你输入的名称找到匹配的文件。我喜欢把它绑定到键盘上的 F6 键。如果你不知道整个目录从上到下的复杂结构,这很简单,而且非常易用。 + +### 9. Flymake ### + +![](https://c2.staticflickr.com/6/5708/23310442354_cbba657ed3.jpg) + +对 IDE 的爱好者来说,我认为语法检查器是 IDE 最强大的特性之一,它非常适合初学者和方便了那些疲惫的程序员。感谢 Flymake,Emacs 用户也可以享受到了语法检查器。因为我工作中用 PHP 很多,Flymake 就不需要任何额外的配置。当我写代码的时候,它会自动检查我的代码和高亮任何一个包含问题的行。对于编译语言,Flymake 将寻找一个用于检查你的代码的 Makefile。真神奇。 + +### 10. electric-pair ### + +最后,但并非最不重要,在我看来,electric-pair 是最简单但最强大的插件之一。它会自动关闭你输入的括号。它起初看起来并不是很有用,但相信我,在被寻找配对括号折磨几百次之后,你会很高兴有这么一个插件,可以确保你所有的表达式的括号都是一一对应的。 + +总结一下,Emacs 是一个奇妙的工具。这可不是一个令人惊讶的说法。试试这些插件,看着你的效率直线飙升吧。这个列表当然不是详尽的列表。如果你想贡献你的建议,请在评论中这样做。我自己一直在寻找新的插件来试着发现 Emacs 的新体验。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/best-plugins-to-increase-productivity-on-emacs.html + +作者:[Adrien Brochard][a] +译者:[zky001](https://github.com/zky001) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/adrien +[1]:http://xmodulo.com/turn-vim-full-fledged-ide.html +[2]:http://orgmode.org/worg/org-tutorials/ +[3]:http://tuhdo.github.io/helm-intro.html diff --git a/published/201601/20151229 Grub 2--Heal your bootloader.md b/published/201601/20151229 Grub 2--Heal your bootloader.md new file mode 100644 index 0000000000..ef246a203a --- /dev/null +++ b/published/201601/20151229 Grub 2--Heal your bootloader.md @@ -0,0 +1,236 @@ +Grub 2:拯救你的 bootloader +================================================================================ + +**没有什么事情比 bootloader 坏掉更让气人的了。充分发挥 Grub 2 的作用,让 bootloader 安分工作吧。** + +为什么这么说? + +- Grub 2 是最受欢迎的 bootloader ,几乎用在所有 Linux 发行版上。 +- bootloader 是一个至关重要的软件,但是非常容易损坏。 +- Grub 2 是兼具扩展性和灵活性的一款引导加载程序,提供了大量可定制选项。 + +Grub 2 是一款精彩的功能强大的软件。它不是 bootloader 界的一枝独秀,但却最受欢迎,几乎所有主要的桌面发行版都在使用它。 Grub 的工作有两个。首先,它用一个菜单展示计算机上所有已经安装的操作系统供你选择。其次,当你从启动菜单中选择了一个 Linux 操作系统, Grub 便加载这个 Linux 的内核。 + +你知道,如果使用 Linux ,你就离不开 bootloader 。然而它却是 Linux 发行版内部最鲜为人知的部分。在这篇文章里,我们将带你熟悉 Grub 2 一些著名的特性,强化你相关技能,使你在 bootloader 跑飞的时候能够自行处理。 + +Grub 2 最重要的部分是一堆文本文件和两个脚本文件。首先需要了解的是 `/etc/default/grub` 。这是一个文本文件,你可以在里面设置通用配置变量和 Grub 2 菜单(见下方 “常见用户设置” )的其它特性。 + +Grub 2 另一个重要的部分是 `/etc/grub.d` 文件夹。定义每个菜单项的所有脚本都放置在这里。这些脚本的名称必须有两位的数字前缀。其目的是,在构建 Grub 2 菜单时定义脚本的执行顺序以及相应菜单项的顺序。文件 `00_header` 首先被读取,负责解析 `/etc/default/grub` 配置文件。然后是 Linux 内核的菜单项,位于 `10_linux` 文件中。这个脚本在默认的 `/boot` 分区为每个内核创建一个正规菜单项和一个恢复菜单项。 + +紧接着的是为第三方应用所用的脚本,如 `30_os-prober` 和 `40_custom` 。 **os-prober** 脚本为内核和其它分区里的操作系统创建菜单项。它能识别安装的 Linux、 Windows、 BSD 以及 Mac OS X 。 如果你的硬盘布局比较独特,使得 **os-prober** 无法找到已经安装的发行版,你可以在 `40_custom` 文件(见下方 “添加自定义菜单项”)中添加菜单项。 + +**Grub** 2 不需要你手动维护你的启动选项的配置文件:取而代之的是使用 `grub2-mkconfig` 命令产生 `/boot/grub/grub.cfg` 文件。这个功能会解析 `/etc/grub.d` 目录中的脚本以及 `/etc/default/grub` 设置文件来定义你的设置情况。 + +###图形化的引导修复### + +多亏了 Boot Repair 应用,只需要点击按钮,Grub 2 许许多多的问题都能轻易解决。这个漂亮小巧的应用有一个直观的用户界面,可以扫描并识别多种硬盘布局和分区方案,还能发现并正确识别安装在其中的操作系统。这个应用可以处理传统计算机里的主引导记录(Master Boot Record) (MBR),也可以处理新型 UEFI 计算机中的 GUID 分区表(GUID Partition Table)(GPT)。 + +Boot Repair 最简单的使用方式是安装到 Live Ubuntu 会话中。在一个 bootloader 损坏的机器上启动 Ubuntu Live 发行版,先通过添加它的 PPA 版本库来安装 Boot Repair ,命令如下: + + sudo add-apt-repository ppa:yannubuntu/Boot Repair + +然后刷新版本库列表: + + sudo apt-get update + +安装应用,如下: + + sudo apt-get install -y Boot Repair + +安装完毕后就启动应用。在显示它的界面(由一对按键组成)之前将会扫描你的硬盘。根据工具的指示,只需按下 Recommended Repair(推荐的修复)按钮,即可修复大部分坏掉的 bootloader 。修复 bootloader 之后,这个工具会输出一个短小的 URL ,你应该把它记录下来。这个 URL 包含了硬盘详尽的信息:分区信息以及重要的 Grub 2 文件(如 `/etc/default/grub` 和 `/boot/grub/grub.cfg` )的内容。如果工具不能解决 bootloader 的问题,可以把你这个 URL 共享在你的发行版的论坛上,让其他人可以分析你的硬盘布局以便给你建议。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/10/boot-repair-large.jpg) + +*Boot Repair 也可以让你定制 Grub 2 的选项。* + +### Bootloader 急救 ### + +Grub 2 引导问题会让系统处于几种不同状态。屏幕(如你所想,本该显示 bootloader 菜单的地方)所展示的文本会指示出系统的当前状态。如果系统中止于 **grub>** 提示符,表明 Grub 2 模块已经被加载,但是找不到 **grub.cfg** 文件。当前是完全版的 Grub 2 命令行 shell,你可以通过多种方式解决此问题。如果你看到的是 **grub rescue>** 提示符,表明 bootloader 不能找到 Grub 2 模块或者找不到任何引导文件( boot files )。然而,如果你的屏幕只显示 ‘GRUB’ 一词,表明 bootloader 找不到通常位于主引导记录( Master Boot Record )里的最基本的信息。 + +你可以通过使用 live CD 或者在 Grub 2 shell 中修正此类错误。如果你够幸运, bootloader 出现了 **grub>** 提示符,你就能获得 Grub 2 shell 的支配权,来帮助你排错。 + +接下来几个命令工作在 **grub>** 和 **grub rescue>** 提示符下。 **set pager=1** 命令设置显示分页( pager ),防止文本在屏幕上一滚而过。你还可以使用 **ls** 命令列出 Grub 识别出的所有分区,如下: + + grub> ls + (hd0) (hd0,msdos5) (hd0,msdos6) (hd1,msdos1) + +如你所见,这个命令列出分区的同时一并列出了分区表方案(即 msdos)。 + +你还可以在每个分区上面使用 **ls** 来查找你的根文件系统: + + grub> ls (hd0,5)/ + lost+found/ var/ etc/ media/ bin/ initrd.gz + boot/ dev/ home/ selinux/ srv/ tmp/ vmlinuz + +你可以不写上分区名的 **msdos** 部分。同样,如果你忘记了尾部的斜杠( trailing slash )只输入 `ls (hd0,5)` ,那你将获得分区的信息,比如文件系统类型、总体大小和最后修改时间。如果你有多个分区,可以使用 `cat` 读取 `/etc/issue` 文件中的内容,来确定发行版,格式如 `cat (hd0,5)/etc/issue` 。 + +假设你在 **(hd0,5)** 中找到根文件系统,请确保它包含 `/boot/grub` 目录,以及你想引导进入的内核镜像,如 **vmlinuz-3.13.0-24-generic** 。此时输入以下命令: + + grub> set root=(hd0,5) + grub> linux /boot/vmlinuz-3.13.0-24-generic root=/dev/sda5 + grub> initrd /boot/initrd.img-3.13.0-24-generic + +第一个命令把 Grub 指向我们想引导进入的发行版所在的分区。接着第二个命令告知 Grub 内核镜像在分区中的位置,以及根文件系统的位置。最后一行设置虚拟文件系统( initial ramdisk )文件的位置。你可以使用 tab 补全功能补全内核名字和虚拟文件系统( initrd: initial ramdisk )的名字,节省时间和精力。 + +输入完毕,在下一个 **grub>** 提示符后输入 `boot` , Grub 将会引导进入指定的操作系统。 + +如果你在 **grub rescue>** 提示符下,情况会有些许不同。因为 bootloader 未能够找到并加载任何必需的模块,你需要手动添加这些模块: + + grub rescue> set root=(hd0,5) + grub rescue> insmod (hd0,5)/boot/grub/normal.mod + grub rescue> normal + grub> insmod linux + +如上所示,跟之前一样,使用 `ls` 命令列出所有分区之后,使用 `set` 命令标记起来。然后添加 **normal** 模块,此模块激活时将会恢复到标准 **grub>** 模式。如果 linux 模块没加载,接下来的命令会进行添加。如果这个模块已经加载,你可以跟之前一样,把引导加载程序指向内核镜像和虚拟文件系统( initrd )文件,然后使用 `boot` 启动发行版,完美收官。 + +一旦成功启动发行版,别忘了为 Grub 重新产生新的配置文件,使用 + + grub-mkconfig -o /boot/grub/grub.cfg + +命令。你还需要往 MBR 里安装一份 bootloader 的拷贝,使用 + + sudo grub2-install /dev/sda + +命令。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/10/grub2-cfg-large.jpg) + +*想要禁用 `/etc/grub.d` 目录下的脚本,你只需移除其可执行位,比如使用 `chmod -x /etc/grub.d/20_memtest86+` 就能将 ‘Memory Test’ 选项从菜单中移除。* + +### Grub 2 和 UEFI ### + +在支持 UEFI 的机器(最近几年上市的机器大部分都是)调试坏掉的 Grub 2 增加了另一复杂的层次。恢复安装在 UEFI 机器上的 **Grub 2** 的和安装在非 UEFI 机器上的并没多大区别,只是新的固件处理方式不一样,从而导致了很多种恢复结果。 + +对于基于 UEFI 的系统,不要在 MBR 上安装任何东西。相反,你要在 EFI 系统分区(EFI System Partition)( ESP )里安装 Linux EFI bootloader,并且借助工具把它设置为 EFI 的默认启动程序,这个工具对于 Linux 用户是 `efibootmgr` ,对于 window 用户则是 `bcdedit` 。 + +照目前情况看,在安装任何与 Windows 8 兼容的主流桌面 Linux 发行版前,应该正确安装好 Grub 2。然而,如果 bootloader 损坏,你可以使用 live 发行版修复机器。在启动 live 介质之时,请确保是以 UEFI 模式启动。计算机每个可移动驱动器的启动菜单将会有两个: 一个普通的和一个以 EFI 标记的。使用后者会用到 **/sys/firmware/efi/** 文件中的 EFI 变量。 + +在 live 环境中,挂载教程前面所提的安装挂掉系统的根文件系统。除此之外,还需要挂载 ESP 分区。假设分区是 **/dev/sda1** ,你可以如下所示挂载: + + sudo mount /dev/sda1 /mnt/boot/efi + +接着在 chroot 到安装完毕的发行版前之前,使用 `modprobe efivars` 加载 **efivars** 模块。 + +在这里, Fedora 用户可以使用如下命令重新安装 bootloader + + yum reinstall grub2-efi shim + +但在此之前,需要使用 + + grub2-mkconfig -o /boot/grub2/grub.cfg + +来产生新的配置文件。 Ubuntu 用户则改用以下命令 + + apt-get install --reinstall grub-efi-amd64 + +一旦 bootloader 正确就位,退出 chroot ,卸载所有分区,重启到 Grub 2 菜单。 + +### 伙计,我的 Grub 哪去了? ### + +Grub 2 最好的特性是可以随时重新安装。因此,当其它像 Windows 之类的系统用它们自己的 bootloader 替换后,导致 Grub 2 丢失,你可以使用 live 发行版,寥寥数步即可重装 Grub 。假设你在 `/dev/sda5` 安装了一个发行版,若要重装 Grub ,你只需首先使用以下命令为发行版创建一个挂载目录: + + sudo mkdir -p /mnt/distro + +然后挂载分区,如下: + + mount /dev/sda5 /mnt/distro + +接着就能重装 Grub 了,如下: + + grub2-install --root-directory=/mnt/distro /dev/sda + +这个命令会改写 `/dev/sda` 设备上的 MBR 信息,指向当前 Linux 系统,并重写一些 Grub 2 文件,如 **grubenv** 和 **device.map** 。 + +另一个问题常见于装有多个发行版的计算机上。当你安装了新的 Linux 发行版,它的 bootloader 应当要能找到所有已经安装的发行版。一旦不行,只要引导进入新安装的发行版,并运行 + + grub2-mkconfig + +在运行这个命令之前,请确保启动菜单中缺失的发行版的 root 分区已经挂载。如果你想添加的发行版有单独的 `/root` 和 `/home` 分区,在运行 `grub2-mkconfig` 之前,只需挂载包含 `/root` 的分区。 + +虽然 Grub 2 能够找到大部分发行版,但是在 Ubuntu 中尝试添加安装的 Fedora 系统需要额外的一个步骤。如果你以默认设置安装了 Fedora ,则发行版的安装器已经创建了 LVM 分区。此时你需要使用发行版的包管理系统安装 **lvm2** 驱动,如下 + + sudo apt-get install lvm2 + +才能使得 Grub 2 的 `os-prober` 脚本能够找到并将 Fedora 添加进启动菜单。 + +### 常见用户设置 ### + +Grub 2 有很多可配置变量。 这里有一些 `/etc/default/grub` 文件中你最可能会修改到的常见变量。 **GRUB_DEFAULT** 变量指定默认的启动项,可以设置为数字值,比如 0 ,表示第一个菜单项,或者设置为 “saved” ,将指向上一次启动时选中的菜单项。 **GRUB\_TIMEOUT** 变量指定启动默认菜单项之前的停留时间。 **GRUB\_CMDLINE\_LINUX** 列出了要传递给所有 Linux 菜单项的内核命令行参数。 + +如果 **GRUB\_DISABLE\_RECOVERY** 变量设置为 **true** ,那么将不生成恢复模式菜单项。这些菜单项会以单用户模式启动发行版,这种模式下允许你利用命令行工具修复系统。 **GRUB_GFXMODE** 变量同样有用,它指定了菜单上文本显示的分辨率,它可以设置为你的显卡所支持的任何数值。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/10/grub2-cli-large.jpg) + +*Grub 2 有个命令行模式,通过在 bootloader 菜单上按 C 进入。* + +### 彻底的修复 ### + +如果 `grub2-install` 命令不能正常运作,使得你无法引导进入 Linux ,你需要完整地重装以及重新配置 bootloader 。为此目的,需要用到强大的 **chroot** 功能将运行环境从 live CD 环境切换至我们想修复的 Linux 的安装位置。任何拥有 **chroot** 工具的 Linux live CD 都可以实现这个目的。不过需要确保 live 介质的系统架构和硬盘上系统的架构一致。因此当你希望 **chroot** 到 64 位系统,你必须使用 amd64 live 发行版。 + +启动进入 live 发行版之后,首先需要检查机器上的分区。使用 `fdisk -l` 列出磁盘上所有分区,记录你想修复的 Grub 2 系统所在的分区。 + +假设我们希望从安装在 `/dev/sda5` 中的发行版中恢复 bootloader 。启动终端使用如下命令挂载分区: + + sudo mount /dev/sda5 /mnt + +此时需要绑定(bind)Grub 2 bootloader 需要进入的目录,以便检测其它操作系统: + + $ sudo mount --bind /dev /mnt/dev + $ sudo mount --bind /dev/pts /mnt/dev/pts + $ sudo mount --bind /proc /mnt/proc + $ sudo mount --bind /sys /mnt/sys + +此时可以离开 live 环境进入安装在 **/dev/sda5** 分区中的发行版了,通过 **chroot** : + + $ sudo chroot /mnt /bin/bash + +现在可以安装、检测、以及升级 Grub 了,跟之前一样,使用 + + sudo grub2-install /dev/sda + +命令来重装 bootloader 。因为 **grub2-install** 命令不能创建**grub.cfg** 文件,需要手动创建,如下 + + sudo grub-mkconfig -o /boot/grub/grub.cfg + +这样应该就可以了。现在你就有了 Grub 2 的一份全新拷贝,罗列了机器上所有的操作系统和发行版。在重启电脑之前,你需要依次退出 chroot 系统,卸载所有分区,如下所示: + + $ exit + $ sudo umount /mnt/sys + $ sudo umount /mnt/proc + $ sudo umount /mnt/dev/pts + $ sudo umount /mnt/dev + $ sudo umount /mnt + +现在你可以安全地重启电脑了,而它应该会回退到 Grub 2 的控制之中,你已经修好了这个 bootloader。 + +### 添加自定义菜单项 ### + +如果希望往 bootloader 菜单里添加菜单项,你需要在 **40_custom** 文件里添加一个启动段( boot stanza )。例如,你可以使用它展示一个菜单项来启动安装在可移动 USB 驱动里的 Linux 发行版。假设你的 USB 驱动器是 **sdb1** ,并且 vmlinuz 内核镜像和虚拟文件系统( initrd )都位于根 (/)目录下,在 **40_custom** 文件中添加以下内容: + + menuentry “Linux on USB” { + set root=(hd1,1) + linux /vmlinuz root=/dev/sdb1 ro quiet splash + initrd /initrd.img + } + +相比使用设备和分区名,使用它们的 UUID 可以获得更精确结果,比如 + + set root=UUID=54f22dd7-eabe + +使用 + + sudo blkid + +来获得所有已连接的驱动器和分区的 UUID 。你还可以为你磁盘上没被 os-prober 脚本找到的发行版添加菜单项,只要你知道该发行版的安装位置以及其内核和虚拟文件系统( initrd )的位置即可。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxvoice.com/grub-2-heal-your-bootloader/ + +作者:[Mayank Sharma][a] +译者:[soooogreen](https://github.com/soooogreen) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linuxvoice.com/author/mayank/ diff --git a/published/201601/20160104 How to Check Hardware Information on Linux Using Command Line.md b/published/201601/20160104 How to Check Hardware Information on Linux Using Command Line.md new file mode 100644 index 0000000000..cce96867e8 --- /dev/null +++ b/published/201601/20160104 How to Check Hardware Information on Linux Using Command Line.md @@ -0,0 +1,152 @@ +Linux 系统下查看硬件信息命令大全 +================================================================================ + +![](https://maketecheasier-holisticmedia.netdna-ssl.com/assets/uploads/2015/12/hdd_info_featured-1.png) + +有许多命令可以用来查看 Linux 系统上的硬件信息。有些命令只能够打印出像 CPU 和内存这一特定的硬件组件信息,另外一些命令可以查看多种硬件组件的信息。 + +这个教程可以带大家快速了解一下查看各种硬件设备的信息和配置详情的最常用的命令。 + +### lscpu ### + +`lscpu`命令能够查看 CPU 和处理单元的信息。该命令没有任何其他选项或者别的功能。 + + lscpu + +运行该命令会看到下面输出: + +![hdd_info_lscpu](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lscpu.png) + +### lspci ### + +`lspci`是另一个命令行工具,可以用来列出所有的 PCI 总线,还有与 PCI 总线相连的设备的详细信息,比如 VGA 适配器、显卡、网络适配器、usb 端口、SATA 控制器等。 + + lspci + +你可以看到类似下图的输出信息。 + +![hdd_info_lspci](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lspci-1.png) + +可以通过运行下面的命令来过滤出特定设备的信息: + + lspci -v | grep "VGA" -A 12 + +运行上面的命令可以看到类似下图的关于显卡的信息。 + +![hdd_info_lspci_vga](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lspci_vga.png) + +### lshw ### + +`lshw`是一个通用的工具,可以列出多种硬件单元的详细或者概要的信息,比如 CPU、内存、usb 控制器、硬盘等。`lshw`能够从各个“/proc”文件中提取出相关的信息。 + + lshw -short + +通过运行上面的命令可以看到下面的信息。 + +![hdd_info_lshw](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lshw.png) + +### lsscsi ### + +通过运行下面的命令可以列出像硬盘和光驱等 scsi/sata 设备的信息: + + lsscsi + +会得到类似下面的输出。 + +![hdd_info_lsscsi](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lsscsi-1.png) + +### lsusb ### + +`lsusb`命令能够列出 USB 控制器和与 USB 控制器相连的设备的详细信息。默认情况下,`lsusb`命令只打印出概要信息。可以通过使用-v参数打印每一个usb端口的详细信息。 + + lsusb + +可以看到下面输出。 + +![hdd_info_lsusb](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lsusb.png) + +### Inxi ### + +`Inxi`是一个 bash 脚本,能够从系统的多个来源和命令获取硬件信息,并打印出一个非技术人员也能看懂的友好的报告。 + +默认情况下,Ubuntu 上没有安装`inxi`。可以通过运行下面命令来安装`Inxi`: + + sudo apt-get install inxi + +安装完`Inxi`之后,通过运行下面命令能够得到硬件相关的信息: + + inxi -Fx + +能够得到类似下图的输出。 + +![hdd_info_inxi](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_inxi.jpg) + +### df ### + +`df`命令能够列出不同分区的概要信息、挂载点、已用的和可用的空间。 + +可以在使用`df`命令的时候加上`-H`参数。 + + df -H + +会得到下面的输出。 + +![hdd_info_df](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_df-1.png) + +### Free ### + +通过使用`free`命令可以查看系统中使用的、闲置的和 RAM 的总体数量。 + + free -m + +会看到下面输出。 + +![hdd_info_free](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_free.png) + +### Dmidecode ### + +`dmidecode`命令与其他命令不同。该命令是从硬件中的 DMI 表中读取信息的。 + +要查看处理器的信息,运行下面命令: + + sudo dmidecode -t processor + +![hdd_info_dmi_processor](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_dmi_processor.jpg) + +要查看内存的信息,运行下面命令: + + sudo dmidecode -t memory + +![hdd_info_dmi_memory](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_dmi_memory.png) + +要查看 bios 的信息,运行下面命令: + + sudo dmidecode -t bios + +![hdd_info_dmi_bios](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_dmi_bios.png) + +### Hdparm ### + +`hdparm`命令可以用来显示像硬盘这样的 sata 设备的信息。 + + sudo hdparm + +可以看到下面的输出。 + +![hdd_info_hdparm](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_hdparm.png) + +### 总结 ### + +每个命令都有不同的方式来获取硬件的信息。在查看特定的硬件信息的时候,可以尝试使用不同的方式。上面所有的命令行工具在大部分的 Linux 发行版本中都是可以使用的,可以很容易的从仓库中获取安装。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/check-hardware-information-linux/ + +作者:[Hitesh Jethva][a] +译者:[sonofelice](https://github.com/sonofelice) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/hiteshjethva/ diff --git a/published/201601/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md b/published/201601/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md new file mode 100644 index 0000000000..972d52e035 --- /dev/null +++ b/published/201601/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md @@ -0,0 +1,75 @@ +开源 DJ 软件 Mixxx 2.0 版发布 +================================================================================ +![](http://itsfoss.com/wp-content/uploads/2016/01/DJ-Software-Mixxx-2-Released.jpg) + +时隔三年,开源 DJ 混音软件 [Mixxx][1] 再度发布一个大的版本更新----Mixxx 2.0。 + +Mixxx 是一个跨平台的自由、开源的 DJ 混音软件,它几乎提供了当你想自己混音时需要的一切功能。Mixxx 近几年在专业人士以及业余爱好者中都很火。 + +甚至在 Mixxx 中你能使用你的 iTunes 音乐库。它的强有力的引擎使它支持多种文件格式。Mixxx 默认即支持超过85种MIDI DJ 调节器以及少部分 HID 调节器。它也包含一个自动选项,可以让你在混音时休息一下。 + +Mixxx 的完整功能列表可以在[这里][2]找到。在查看完整列表之前,让我们看看最新版有何更新。 + +### Mixxx 2.0更新 ### + +- 可动态调整大小的外观 +- 4 轨道混音并且和主轨道同步 +- 内置特效 +- 谐波混频(Harmonic Mixing)与音乐按键检测 +- RGB 音频波形 +- 4 个麦克风输入和 4 个音频输入,麦克风音量可调 +- 黑胶音源输入、输出 +- 支持自定义封面 +- 核心混音引擎改进 +- 更新的音乐库 +- 改进增强了 DJ 调节器 + +你可以在[这里][3]中看到所有的新功能。 + +### 在基于 Ubuntu 的发行版中安装 Mixxx 2.0 ### + +Mixxx 提供了他们自己的ppa源,这使得在基于 Ubuntu 的发行版,如 Linux Mint、elementary OS、 Zorin OS 上安装Mixxx 2.0 变得十分简单. + +打开终端,并输入如下命令: + + sudo add-apt-repository ppa:mixxx/mixxx + sudo apt-get update + sudo apt-get install mixxx + +使用如下命令卸载 Mixxx: + + sudo apt-get remove mixxx + sudo add-apt-repository --remove ppa:mixxx/mixxx + +如果你已经在使用旧版本的 Mixxx。它将很快升级到2.0版。 + +### 在其他发行版中安装 Mixxx 2.0 ### + +Archliunx + + sudo pacman -S mixxx + +对于其他发行版,你还可以从源码编译安装 Mixxx。从下列地址下载源代码: + +- [源码地址][4] + +由于 Mixxx 是个跨平台的应用,你也可以下载它的 Windows 版或者 Mac OS 版,请访问 Mixxx 下载页面找到对应的下载链接: + +- [下载地址][5] + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/dj-mixxx-2/ + +作者:[Abhishek][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://mixxx.org/ +[2]:http://mixxx.org/features/ +[3]:http://mixxx.org/whats-new-in-mixxx-2-0/ +[4]:http://downloads.mixxx.org/mixxx-2.0.0/mixxx-2.0.0-src.tar.gz +[5]:http://mixxx.org/download/ diff --git a/published/201601/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md b/published/201601/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md new file mode 100644 index 0000000000..e1824fe0e6 --- /dev/null +++ b/published/201601/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md @@ -0,0 +1,80 @@ +Ubuntu 里的“间谍软件”将在 Ubuntu 16.04 LTS 中被禁用 +================================================================================ + +出于用户隐私的考虑,Ubuntu 阉割了一个有争议的功能。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/09/as2.jpg) + +**Unity 中有争议的在线搜索功能将在今年四月份发布的 Ubuntu 16.04 LTS 中被默认禁用** + +用户在 Unity 7 的 Dash 搜索栏里将**只能搜索到本地文件、文件夹以及应用**。这样,用户输入的关键词将不会被发送到 Canonical 或任何第三方内容提供商的服务器里。 + +> “现在,Unity 的在线搜索在默认状况下是关闭的” + +在目前 ubuntu 的支持版本中,Dash 栏会将用户搜索的关键词发送到 Canonical 运营的远程服务器中。它发送这些数据以用于从50多家在线服务获取搜索结果,这些服务包括维基百科、YouTube 和 The Weather Channel 等。 + +我们可以选择去**系统设置 > 隐私控制**关闭这项功能。但是,一些开源社区针对的是默认打开这个事情。 + +### Ubuntu 在线搜索引发的争议 ### + +> “Richard Stallman 将这个功能描述为 ‘间谍软件’” + +早在2012年,在 Ubuntu 搜索中整合了来自亚马逊的内容之后,开源社区就表示为其用户的隐私感到担忧。在2013年,“Smart Scopes 服务”全面推出后,开源社区再度表示担忧. + +风波如此之大,以至于开源界大神 [Richard Stallman 都称 Ubuntu 为"间谍软件"][1]。 + +[电子前哨基金会 (EFF)][2]也在一系列博文中表达出对此的关注,并且建议 Canonical 将这个功能做成用户自由选择是否开启的功能。Privacy International 比其他的组织走的更远,对于 Ubuntu 的工作,他们给 Ubuntu 的缔造者发了一个“[老大哥奖][3]”。 + +[Canonical][4] 坚称 Unity 的在线搜索功能所收集的数据是匿名的以及“不可识别是来自哪个用户的”。 + +在[2013年 Canoical 发布的博文中][5]他们解释道:“**(我们)会使用户了解我们收集哪些信息以及哪些第三方服务商将会在他们搜索时从 Dash 栏中给出结果。我们只会收集能够提升用户体验的信息。**” + +### Ubuntu 开始严肃对待的用户数据隐私### + +Canonical 在给新安装的 Ubuntu 14.04 LTS 以及以上版本中禁用了来自亚马逊的产品搜索结果(尽管来自其他服务商的搜索结果仍然在出现,直到你关闭这个选项) + +在下一个LTS(长期支持)版,也就是 Ubuntu 16.04 中,Canonical 完全关闭了这个有争议的在线搜索功能,这个功能在用户安装完后就是关闭的。就如同 EFF 在2012年建议他们做的那样。 + +“你搜索的关键词将不会逃出你的计算机。” [Ubuntu 桌面主管 Will Cooke][6]解释道,“对于搜索结果的更精细的控制”和 Unity 8 所提供的“更有针对性的结果添加不到 Unity 7 里”。 + +这也就是“[Unity 7]的在线搜索功能将会退役”的原因。 + +这个变化也会降低对 Unity 7 的支持以及对 Canonical 基础设施的压力。Unity 提供的搜索结果越少,Canonical 就能把时间和工程师放到更加振奋人心的地方,比如更早的发布 Unity 8 桌面环境。 + +### 在 Ubuntu 16.04 中你需要自己开启在线搜索功能 ### + +![Privacy settings in Ubuntu let you opt in to seeing online results](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/privacy.jpg) + +*在 Ubuntu 隐私设置中你可以打开在线搜索功能* + +禁用 Ubuntu 桌面的在线搜索功能的决定将获得众多开源/免费软件社区的欢呼。但是并不是每一个人都对 Dash 提供的语义搜索功能反感,如果你认为你失去了在搜索时预览天气、查看新闻或其他来自 Dash 在线搜索提供的内容所带来的效率的话,你只需要简单的点几下鼠标就可以**再次打开这个功能**,定位到 Ubuntu 的**系统设置 > 隐私控制 > 搜索**然后将选项调至“**开启**”。 + +这个选项不会自动把亚马逊的产品信息加入到搜索结果中。如果你想看产品信息的话,需要打开第二个可选项“shipping lens”才能看到来自 Amazon (和 Skimlinks)的内容。 + +### 总结 ### + + +- 默认情况下,Ubuntu 16.04 LTS 的 Dash 栏将不会搜索到在线结果 +- 可以手动打开在线搜索 +- **系统设置 > 隐私控制 > 搜索**中的第二个可选项允许你看到亚马逊的产品信息 +- 这个变动只会影响新安装的系统。从老版本升级的将会保留用户的喜好 + +你同意这个决定吗?抑或是 Cononical 可能降低了新用户的体验?在评论中告诉我们。 + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2016/01/ubuntu-online-search-feature-disabled-16-04 + +作者:[Joey-Elijah Sneddon][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://arstechnica.com/information-technology/2012/12/richard-stallman-calls-ubuntu-spyware-because-it-tracks-searches/?utm_source=omgubuntu +[2]:https://www.eff.org/deeplinks/2012/10/privacy-ubuntu-1210-amazon-ads-and-data-leaks?utm_source=omgubuntu +[3]:http://www.omgubuntu.co.uk/2013/10/ubuntu-wins-big-brother-austria-privacy-award +[4]:http://blog.canonical.com/2012/12/07/searching-in-the-dash-in-ubuntu-13-04/ +[5]:http://blog.canonical.com/2012/12/07/searching-in-the-dash-in-ubuntu-13-04/?utm_source=omgubuntu +[6]:http://www.whizzy.org/2015/12/online-searches-in-the-dash-to-be-off-by-default?utm_source=omgubuntu diff --git a/translated/tech/Learn with Linux/Learn with Linux--Learning Music.md b/published/201601/Learn with Linux--Learning Music.md similarity index 82% rename from translated/tech/Learn with Linux/Learn with Linux--Learning Music.md rename to published/201601/Learn with Linux--Learning Music.md index c732344a19..83f522bfba 100644 --- a/translated/tech/Learn with Linux/Learn with Linux--Learning Music.md +++ b/published/201601/Learn with Linux--Learning Music.md @@ -1,22 +1,22 @@ -Linux 教学之教你玩音乐 +与 Linux 一起学习:玩音乐 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-featured.png) -[Linux 学习系列][1]的所有文章: +[与 Linux 一起学习:][1]的所有文章: -- [Linux 教学之教你练打字][2] -- [Linux 教学之物理模拟][3] -- [Linux 教学之教你玩音乐][4] -- [Linux 教学之两款地理软件][5] -- [Linux 教学之掌握数学][6] +- [与 Linux 一起学习:学习打字][2] +- [与 Linux 一起学习:物理模拟][3] +- [与 Linux 一起学习:玩音乐][4] +- [与 Linux 一起学习:两款地理软件][5] +- [与 Linux 一起学习:掌握数学][6] -引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 +引言:Linux 提供大量的教学软件和工具,面向各个年级段以及不同年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“与 Linux 一起学习:”系列就来介绍一些教学软件。 -学习音乐是一个很好的消遣方式。训练你的耳朵能识别音阶与和弦、掌握一门乐器、控制自己的嗓音,这些都需要大量的练习,以及会遇到很多困难。音乐理论非常博大精深,有太多东西需要记忆,你需要非常勤奋才能讲这些东西变成你的“技术”。在你的音乐之路上,Linux 提供了杰出的软件来帮助你前行。它们不能让你立刻成为一个音乐家,但可以作为一个降低学习难度的好助手。 +学习音乐是一个很好的消遣方式。训练你的耳朵能识别音阶与和弦、掌握一门乐器、控制自己的嗓音,这些都需要大量的练习,以及会遇到很多困难。音乐理论非常博大精深,有太多东西需要记忆,你需要非常勤奋才能将这些东西变成你的“技术”。在你的音乐之路上,Linux 提供了杰出的软件来帮助你前行。它们不能让你立刻成为一个音乐家,但可以作为一个降低学习难度的好助手。 ### Gnu Solfège ### -[Solfège][7] 是一个世界流行的音乐教学工具,适用于各个级别的音乐教育。很多流行的教学方法(比如著名的柯达伊教学法)就使用 Solfège 作为它们的基础。相比于学到音乐知识,Solfège 更关注于让用户不断练习音乐。它假想的用户是那些已经有一些音乐基础,并且想不断练习音乐技巧的学生。 +[Solfège][7] 是一个世界流行的音乐教学工具,适用于各个级别的音乐教育。很多流行的教学方法(比如著名的柯达伊教学法)就使用 Solfège 作为它们的基础。相比于学到音乐知识,Solfège 更关注于让用户不断练习音乐。它预期的用户是那些已经有一些音乐基础,并且想不断练习音乐技巧的学生。 以下是 GNU 网站的开发者声明: @@ -24,7 +24,7 @@ Linux 教学之教你玩音乐 这款软件兑现了它的承诺,你可以在试听帮手的帮助下练习几乎所有音乐技巧。 -Debian 和 Ubuntu 的远端库上有这款软件,在终端运行下面命令安装软件: +Debian 和 Ubuntu 的仓库上有这款软件,在终端运行下面命令安装软件: sudo apt-get install solfege @@ -78,9 +78,9 @@ Tete 只有一个简单的界面,所有内容都在这里了。 ### JalMus ### -Jalmus 是用 JAVA 写的键盘音符阅读训练器。可以外接 MIDI 键盘,也可以使用虚拟键盘。它提供很多简单的课程练习来训练你的音符阅读能力。这个软件在2013年之后就不再更新了,但还是比较实用的。 +Jalmus 是用 JAVA 写的键盘音符阅读训练器。可以外接 MIDI 键盘,也可以使用虚拟键盘。它提供很多简单的课程练习来训练你的音符阅读能力。虽然这个软件在2013年之后就不再更新了,但还是比较实用的。 -进入[sourceforge 页面][11]下载最后版本(v2.3)的 JAVA 安装器,或者在终端输入下面的命令下载: +进入 [sourceforge 页面][11]下载最后版本(v2.3)的 JAVA 安装器,或者在终端输入下面的命令下载: wget http://garr.dl.sourceforge.net/project/jalmus/Jalmus-2.3/installjalmus23.jar @@ -102,11 +102,11 @@ Jalmus 的主界面非常朴素。 ![learnmusic-jalmus-multinote](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-multinote.png) -Jalmus 也包含一些训练,内容和课程相似,只是没有那些视觉上的提示了。当完成训练后,屏幕上会显示你的乐谱。它还提供不同难度的节拍训练,你能听到看到这些训练里面播放的旋律。在多行乐谱同时播放时,一个节拍器(能听见能看见)可以帮你理解 +Jalmus 也包含一些阅读单个音符的训练,内容和课程相似,只是没有那些视觉上的提示了。当完成训练后,屏幕上会显示你的乐谱。它还提供不同难度的节拍训练,你能听到并看到这些训练里面播放的节拍。在多行乐谱同时播放时,一个节拍器(能听见能看见)可以帮你理解 ![learnmusic-jalmus-rhythm](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-rhythm.png) -和阅读乐谱。(LCTT 写给王老板的话:我特么实在编不下去了,这段你得帮我改改。) +和阅读乐谱。 ![learnmusic-jalmus-score](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-score.png) @@ -121,11 +121,12 @@ Jalmus 也包含一些训练,内容和课程相似,只是没有那些视觉 对于吉他练习者,[TuxGuitar][12] 看起来很像 Windows 下面的 Guitar Pro 软件(它也可以读 Guitar Pro 格式的文件)。 #### PianoBooster #### + [Piano Booster][13] 可以练习钢琴技巧,它能播放 MIDI 文件,你可以使用外接键盘来弹钢琴,同时还能查看屏幕上滑过的乐谱。 ### 总结 ### -Linux 提供很多优秀的工具供你学习,如果你对音乐感兴趣,你完全不用担心没有软件能帮你练习音乐技术。实际上,可供学习音乐的学生选择的优秀软件数量远比上面介绍的要多。如果你还知道其他的音乐训练软件,请在写下你的评论,让我们能够知道。 +Linux 提供很多优秀的工具供你学习,如果你对音乐感兴趣,你完全不用担心没有帮你练习音乐技术的软件。实际上,可供学习音乐的学生选择的优秀软件数量远比上面介绍的要多。如果你还知道其他的音乐训练软件,请在写下你的评论,让我们能够知道。 -------------------------------------------------------------------------------- @@ -133,7 +134,7 @@ via: https://www.maketecheasier.com/linux-learning-music/ 作者:[Attila Orosz][a] 译者:[bazz2](https://github.com/bazz2) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md b/published/201601/Learn with Linux--Learning to Type.md similarity index 74% rename from translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md rename to published/201601/Learn with Linux--Learning to Type.md index 75694225aa..01c2dbc70d 100644 --- a/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md +++ b/published/201601/Learn with Linux--Learning to Type.md @@ -1,36 +1,36 @@ -Linux 教学之教你练打字 +与 Linux 一起学习:学习打字 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-featured.png) -[Linux 学习系列][1]的所有文章: +[与 Linux 一起学习][1]的所有文章: -- [Linux 教学之教你练打字][2] -- [Linux 教学之物理模拟][3] -- [Linux 教学之教你玩音乐][4] -- [Linux 教学之两款地理软件][5] -- [Linux 教学之掌握数学][6] +- [与 Linux 一起学习:学习打字][2] +- [与 Linux 一起学习:物理模拟][3] +- [与 Linux 一起学习:玩音乐][4] +- [与 Linux 一起学习:两款地理软件][5] +- [与 Linux 一起学习: 使用这些 Linux 应用来征服你的数学学习][6] -引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 +Linux 提供大量的教学软件和工具,面向各个年级以及不同年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“与 Linux 一起学习”系列就来介绍一些教学软件。 -很多人都要打字,操作键盘已经成为他们的第二天性。 但是这些人中有多少是依然使用两个手指头来快速地按键盘的?即使学校有教我们使用键盘的方法(LCTT 译注:呃。。。),我们也会慢慢地抛弃正确的打字姿势,养成只用两个大拇指玩键盘的习惯。 +很多人都要打字,操作键盘已经成为他们的第二天性。但是这些人中有多少是依然使用两个手指头来快速地按键盘的?即使学校有教我们使用键盘的方法,我们也会慢慢地抛弃正确的打字姿势,养成只用两个大拇指玩键盘的习惯。(LCTT 译注:呃,你确认是拇指而不是食指?) -下面要介绍的两款软件可以帮你掌控你的键盘,然后你就可以让你的手指跟上你的思维,然后你的思维就不会被打断了。当然,还有很多更炫更酷的软件可供选择,但本文所选的这两款是最简单、最容易上手的。 +下面要介绍的两款软件可以帮你掌控你的键盘,然后你就可以让你的手指跟上你的思维,这样你的思维就不会被打断了。当然,还有很多更炫更酷的软件可供选择,但本文所选的这两款是最简单、最容易上手的。 ### TuxType (或者叫 TuxTyping) ### -TuxType 是给小孩子玩的。在一些有趣的游戏中,小学生们可以通过完成一些简单的练习来 get “10个手指打字”的新技能。 +TuxType 是给小孩子玩的。在一些有趣的游戏中,小学生们可以通过完成一些简单的练习来 Get “双手打字以示清白”的新技能。 Debian 及其衍生版本(包含所有 Ubuntu 衍生版本)的标准软件仓库都有 TuxType,使用下面的命令安装: sudo apt-get install tuxtype -软件开始时有一个简单的 Tux 界面和一段难听的 midi 音乐,幸运的是你可以通过右下角的喇叭按钮把声音调低了。(LCTT译注:Tux 就是那只 Linux 吉祥物,Linus 说它的表情被设计成刚喝完啤酒后的满足感,见《Just For Fun》。) +软件开始时有一个简单的 Tux 界面和一段难听的 midi 音乐,幸运的是你可以通过右下角的喇叭按钮把声音调低了。(LCTT 译注:Tux 就是那只 Linux 吉祥物,Linus 说它的表情被设计成刚喝完啤酒后的满足感,见《Just For Fun》。) ![learntotype-tuxtyping-main](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-tuxtyping-main.jpg) -最开始处的两个选项“Fish Cascade”和“Comet Zap”是打字游戏,当你开始游戏时,你需要很投入到这个课程。 +最开始处的两个选项“Fish Cascade”和“Comet Zap”是打字游戏,当你开始游戏时,你就投入到了这个课程。 -第3个选项为“Lession”,提供40多个简单的课程,每个课程会增加一个字母让你来练习,练习过程中会给出一些提示,比如应该用哪个手指按键盘上的字母。 +第3个选项为“Lessions”,提供40多个简单的课程,每个课程会增加一个字母让你来练习,练习过程中会给出一些提示,比如应该用哪个手指按键盘上的字母。 ![learntotype-tuxtyping-exd1](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-tuxtyping-exd1.jpg) @@ -68,7 +68,7 @@ GNU Typist 也在大多数 Debian 衍生版本的软件库中,运行下面的 ![learntotype-gtype-lesson](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-gtype-lesson.png) -在交互练习的过程中,如果你输入错误,会将错误点高亮显示。不会像其他漂亮界面分散你的注意力,你可以专注于练习。每个课程的右下角都有一组统计数据来展示你的表现,如果你犯了很多错误,就可能无法通过关卡了。 +在交互练习的过程中,如果你输入错误,会将错误位置高亮显示。不会像其他漂亮界面分散你的注意力,你可以专注于练习。每个课程的右下角都有一组统计数据来展示你的表现,如果你犯了很多错误,就可能无法通过关卡了。 ![learntotype-gtype-mistake](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-gtype-mistake.png) @@ -106,7 +106,7 @@ via: https://www.maketecheasier.com/learn-to-type-in-linux/ 作者:[Attila Orosz][a] 译者:[bazz2](https://github.com/bazz2) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -116,4 +116,4 @@ via: https://www.maketecheasier.com/learn-to-type-in-linux/ [3]:https://www.maketecheasier.com/linux-physics-simulation/ [4]:https://www.maketecheasier.com/linux-learning-music/ [5]:https://www.maketecheasier.com/linux-geography-apps/ -[6]:https://www.maketecheasier.com/learn-linux-maths/ \ No newline at end of file +[6]:https://linux.cn/article-6546-1.html \ No newline at end of file diff --git a/translated/tech/Learn with Linux/Learn with Linux--Physics Simulation.md b/published/201601/Learn with Linux--Physics Simulation.md similarity index 66% rename from translated/tech/Learn with Linux/Learn with Linux--Physics Simulation.md rename to published/201601/Learn with Linux--Physics Simulation.md index 273ff72d5a..452ec3a9eb 100644 --- a/translated/tech/Learn with Linux/Learn with Linux--Physics Simulation.md +++ b/published/201601/Learn with Linux--Physics Simulation.md @@ -1,22 +1,22 @@ -Linux 教学之物理模拟 +与 Linux 一起学习:物理模拟 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/physics-fetured.jpg) -[Linux 学习系列][1]的所有文章: +[与 Linux 一起学习][1]的所有文章: -- [Linux 教学之教你练打字][2] -- [Linux 教学之物理模拟][3] -- [Linux 教学之教你玩音乐][4] -- [Linux 教学之两款地理软件][5] -- [Linux 教学之掌握数学][6] +- [与 Linux 一起学习:学习打字][2] +- [与 Linux 一起学习:物理模拟][3] +- [与 Linux 一起学习:玩音乐][4] +- [与 Linux 一起学习:两款地理软件][5] +- [与 Linux 一起学习:掌握数学][6] -引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 +Linux 提供大量的教学软件和工具,面向各个年级段以及不同年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“与 Linux 一起学习”系列就来介绍一些教学软件。 物理是一个有趣的课题,证据就是任何物理课程都可以用具体的图片演示给你看。能看到物理变化过程是一个很妙的体验,特别是你不需要到教室就能体验到。Linux 上有很多很好的科学软件来为你提供这种美妙感觉,本篇文章只着重介绍其中几种。 ### 1. Step ### -[Step][7] 是一个交互型物理模拟器,KDEEdu[8](KDE 教育)项目的一部分。没人会比它的作者更了解它的作用。在项目官网主页上写着“[Step] 是这样玩的:你放点东西进来,添加一些力(地心引力或者弹簧),然后点击‘模拟’按钮,这款软件就会为你模拟这个物体在真实世界的物理定律影响下的运动状态。你可以改变物体或力的属性(允许在模拟过程中进行修改),然后观察不同属性下产生的现象。Step 可以让你从体验中学习物理!” +[Step][7] 是一个交互型物理模拟器,属于 [KDEEdu][8](KDE 教育)项目的一部分。没人会比它的作者更了解它的作用。在项目官网主页上写着“[Step] 是这样玩的:你放点东西进来,添加一些力(地心引力或者弹簧),然后点击‘模拟(Simulate)’按钮,这款软件就会为你模拟这个物体在真实世界的物理定律影响下的运动状态。你可以改变物体或力的属性(允许在模拟过程中进行修改),然后观察不同属性下产生的现象。Step 可以让你从体验中学习物理!” Step 依赖 Qt 以及其他一些 KDE 所依赖的软件,正是由于像 KDEEdu 之类的项目存在,才使得 KDE 变得如此强大,当然,你可能需要忍受由此带来的庞大的桌面系统。 @@ -30,7 +30,7 @@ Step 有个简单的交互界面,你进去后直接可以进行模拟操作。 ![physics-step-main](https://www.maketecheasier.com/assets/uploads/2015/07/physics-step-main.png) -你会发现所有物品在屏幕左边,包括不同的质点,空气,不同形状的物体,弹簧,以及不同的力(见1区域) 。如果你选中一个物体,屏幕右边会出现简短的描述信息(见2区域),以及你创造的世界的介绍(主要介绍这个世界中包含的物体)(见3区域),以及你当前选中的物体的属性(见4区域),以及你的操作历史(见5区域)。 +你会发现所有物品在屏幕左边,包括不同的质点,空气,不同形状的物体,弹簧,以及不同的力(见区域1) 。如果你选中一个物体,屏幕右边会出现简短的描述信息(见区域2),以及你创造的世界的介绍(主要介绍这个世界中包含的物体)(见区域3),以及你当前选中的物体的属性(见区域4),以及你的操作历史(见区域5)。 ![physics-step-parts](https://www.maketecheasier.com/assets/uploads/2015/07/physics-step-parts.png) @@ -42,7 +42,7 @@ Step 有个简单的交互界面,你进去后直接可以进行模拟操作。 ![physics-step-simulate3](https://www.maketecheasier.com/assets/uploads/2015/07/physics-step-simulate3.png) -想要更多了解 Step,按 F1 键,KDE 帮助中心会打印详细的软件操作手册。 +想要更多了解 Step,按 F1 键,KDE 帮助中心会显示出详细的软件操作手册。 ### 2. Lightspeed ### @@ -50,10 +50,10 @@ Lightspeed 是一个简单的基于 GTK+ 和 OpenGL 的模拟器,可以模拟 受到相对速度影响的现象如下(LCTT 译注:都可以从“光速不变”理论推导出来): -- **洛伦兹收缩** —— 物体看起来变短了 -- **多普乐红移/蓝移** —— 物体的颜色变了 -- **前灯效应** —— 物体的明暗变化(LCTT 译注:当物体接近光速移动时,会在它前进的方向强烈地辐射光子,从这个角度看,物体会变得很亮,相反,从物体背后观察,会发现它很暗) -- **光行差效应** —— 物体扭曲变形了 +- **洛伦兹收缩(The Lorentz contraction)** —— 物体看起来变短了 +- **多普勒红移/蓝移(The Doppler red/blue shift)** —— 物体的颜色变了 +- **前灯效应(The headlight effect)** —— 物体的明暗变化(LCTT 译注:当物体接近光速移动时,会在它前进的方向强烈地辐射光子,从这个角度看,物体会变得很亮,相反,从物体背后观察,会发现它很暗) +- **光行差效应(Optical aberration)** —— 物体扭曲变形了 Lightspeed 有 Debian 的源,执行下面的命令来安装: @@ -75,9 +75,13 @@ Lightspeed 有 Debian 的源,执行下面的命令来安装: ### 特别推荐: Physion ### -Physion 是个非常有趣并且美观的物理模拟软件,比上面介绍的两款软件都好玩好看。可惜在写本文章的时候它的[官网][10]出现问题了,下载页面无法使用。 +Physion 是个非常有趣并且美观的物理模拟软件,比上面介绍的两款软件都好玩好看。 -从他们放在 Youtube 上的视频来看,Physion 还是值得我们下载下来玩玩的。在官网恢复之前,我们只能看看演示视频了。 +可以从它的[官网][10]下载: + +- [Linux][11] + +从他们放在 Youtube 上的视频来看,Physion 还是值得我们下载下来玩玩的。\ 注:youtube 视频 @@ -90,18 +94,19 @@ via: https://www.maketecheasier.com/linux-physics-simulation/ 作者:[Attila Orosz][a] 译者:[bazz2](https://github.com/bazz2) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:https://www.maketecheasier.com/author/attilaorosz/ [1]:https://www.maketecheasier.com/series/learn-with-linux/ -[2]:https://www.maketecheasier.com/learn-to-type-in-linux/ +[2]:https://linux.cn/article-6902-1.html [3]:https://www.maketecheasier.com/linux-physics-simulation/ [4]:https://www.maketecheasier.com/linux-learning-music/ [5]:https://www.maketecheasier.com/linux-geography-apps/ -[6]:https://www.maketecheasier.com/learn-linux-maths/ +[6]:https://linux.cn/article-6546-1.html [7]:https://edu.kde.org/applications/all/step [8]:https://edu.kde.org/ [9]:http://lightspeed.sourceforge.net/ [10]:http://www.physion.net/ +[11]:http://physion.net/en/downloads/linux/13-physion-linux-x8664/download \ No newline at end of file diff --git a/translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md b/published/201601/Learn with Linux--Two Geography Apps.md similarity index 89% rename from translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md rename to published/201601/Learn with Linux--Two Geography Apps.md index 8ce6b052af..bdbcb36a42 100644 --- a/translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md +++ b/published/201601/Learn with Linux--Two Geography Apps.md @@ -1,16 +1,16 @@ -Linux 教学之两款地理软件 +与 Linux 一起学习:学习地理 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-featured.png) -[Linux 学习系列][1]的所有文章: +[与 Linux 一起学习][1]的所有文章: -- [Linux 教学之教你练打字][2] -- [Linux 教学之物理模拟][3] -- [Linux 教学之教你玩音乐][4] -- [Linux 教学之两款地理软件][5] -- [Linux 教学之掌握数学][6] +- [与 Linux 一起学习:学习打字][2] +- [与 Linux 一起学习:物理模拟][3] +- [与 Linux 一起学习:玩音乐][4] +- [与 Linux 一起学习:学习地理][5] +- [与 Linux 一起学习:掌握数学][6] -引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 +引言:Linux 提供大量的教学软件和工具,面向各个年级段以及各个年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“与 Linux 一起学习”系列就来介绍一些教学软件。 地理是一门有趣的学科,我们每天都能接触到,虽然可能没有意识到,但当你打开 GPS、SatNav 或谷歌地图时,你就已经在使用这些软件提供的地理数据了;当你在新闻中看到一个国家的消息或听到一些金融数据时,这些信息都可以归于地理学范畴。Linux 提供了很多学习地理学的软件,可用于教学,也可用于自学。 @@ -62,11 +62,11 @@ Marble 专注于地图绘制,它的主界面就是一张地图。 ![learn-geography-marble-history](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-history.jpg) -除了有包含不同界面和大量数据的离线地图,Marble 还提供其他信息。你可以在菜单中打开或关闭不同的离线 info-boxes +除了有包含不同界面和大量数据的离线地图,Marble 还提供其他信息。你可以在菜单中打开或关闭不同的离线信息框 ![learn-geography-marble-offline](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-offline.png) -和在线的 online services。 +和在线服务。 ![learn-geography-marble-online](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-online.png) @@ -86,7 +86,7 @@ via: https://www.maketecheasier.com/linux-geography-apps/ 作者:[Attila Orosz][a] 译者:[bazz2](https://github.com/bazz2) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/20160126 How to change from default to alternative Python version on Debian Linux.md b/published/20160126 How to change from default to alternative Python version on Debian Linux.md new file mode 100644 index 0000000000..a33c0fcaaf --- /dev/null +++ b/published/20160126 How to change from default to alternative Python version on Debian Linux.md @@ -0,0 +1,103 @@ +如何将 Debian Linux 中的默认的 Python 版本切换为替代版本 +==================================================== + +当你安装 Debian Linux 时,安装过程有可能同时为你提供多个可用的 Python 版本,因此系统中会存在多个 Python 的可执行二进制文件。你可以按照以下方法使用 `ls` 命令来查看你的系统中都有那些 Python 的二进制文件可供使用。 + +``` +$ ls /usr/bin/python* +/usr/bin/python /usr/bin/python2 /usr/bin/python2.7 /usr/bin/python3 /usr/bin/python3.4 /usr/bin/python3.4m /usr/bin/python3m +``` + +执行如下命令查看默认的 Python 版本信息: + +``` +$ python --version +Python 2.7.8 +``` + +###1、基于用户修改 Python 版本: + +想要为某个特定用户修改 Python 版本,只需要在其 home 目录下创建一个 `alias`(别名) 即可。打开该用户的 `~/.bashrc` 文件,添加新的别名信息来修改默认使用的 Python 版本。 + +``` +alias python='/usr/bin/python3.4' +``` + +一旦完成以上操作,重新登录或者重新加载 `.bashrc` 文件,使操作生效。 + +``` +$ . ~/.bashrc +``` + +检查当前的 Python 版本。 + +``` +$ python --version +Python 3.4.2 +``` + +###2、 在系统级修改 Python 版本 + +我们可以使用 `update-alternatives` 来为整个系统更改 Python 版本。以 root 身份登录,首先罗列出所有可用的 python 替代版本信息: + +``` +# update-alternatives --list python +update-alternatives: error: no alternatives for python +``` + +如果出现以上所示的错误信息,则表示 Python 的替代版本尚未被 `update-alternatives` 命令识别。想解决这个问题,我们需要更新一下替代列表,将 `python2.7` 和 `python3.4` 放入其中。 + +``` +# update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 +update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode +# update-alternatives --install /usr/bin/python python /usr/bin/python3.4 2 +update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode +``` + +`--install` 选项使用了多个参数用于创建符号链接。最后一个参数指定了此选项的优先级,如果我们没有手动来设置替代选项,那么具有最高优先级的选项就会被选中。这个例子中,我们为 `/usr/bin/python3.4` 设置的优先级为2,所以 `update-alternatives` 命令会自动将它设置为默认 Python 版本。 + +``` +# python --version +Python 3.4.2 +``` + +接下来,我们再次列出可用的 Python 替代版本。 + +``` +# update-alternatives --list python +/usr/bin/python2.7 +/usr/bin/python3.4 +``` + +现在开始,我们就可以使用下方的命令随时在列出的 Python 替代版本中任意切换了。 + +``` +# update-alternatives --config python +``` + +![](http://linuxconfig.org/images/change-python-alternative-version-debian-linux.png) + +``` +# python --version +Python 2.7.8 +``` + +###3、移除替代版本 + +一旦我们的系统中不再存在某个 Python 的替代版本时,我们可以将其从 `update-alternatives` 列表中删除掉。例如,我们可以将列表中的 python2.7 版本移除掉。 + +``` +# update-alternatives --remove python /usr/bin/python2.7 +update-alternatives: removing manually selected alternative - switching python to auto mode +update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode +``` + +-------------------------------------------------------------------------------- + +via: http://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux + +译者:[mr-ping](https://github.com/mr-ping) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + diff --git a/published/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/published/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md new file mode 100644 index 0000000000..9eb9e779b9 --- /dev/null +++ b/published/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md @@ -0,0 +1,37 @@ +魅族 Pro 5 Ubuntu 版即将发布 +======================================================== + +**Canonical 和魅族刚刚透露魅族 Pro 5 Ubuntu 版将在 2016 世界移动大会召开期间开始预售** + +自从上次听到魅族的消息到现在已经很久了,但是看起来 Canonical 和这个中国的硬件厂商之间的合作关系仍然存在。从表面来看,之前魅族的 MX4 Ubuntu 版只是进行了小范围的发布,所以只有很少的设备卖出去了。 + +我们仅仅希望魅族 Pro 5 Ubuntu 版可以提高供货量,尤其是因为它是魅族的一款相当新且还提供支持的手机。 + +最新的魅族 Pro 5 是第 5 个支持 Ubuntu Touch 的官方设备,2016 年我们可能会看到更多的手机甚至是平板都会预装这个操作系统。 + +## 魅族 Pro 5 Ubuntu 版将会非常震撼 + +Canonical 宣称 Pro 5 是目前已发布了的 Ubuntu 智能手机中最强大的一个,他们说的是对的,但还有一点没有被提及,即如果不考虑平板,它也是最大的 Ubuntu Touch 设备。魅族 Pro 5 采用了一颗 Exynos 7420 8 核处理器和 5.7 英寸分辨率为 1920x1080 的 AMOLED 屏,配备第三代康宁大猩猩玻璃以及 LPDDR4 内存技术。 + +很多人也许会问这个新手机的系统是否可以和桌面版系统一样,现在看起来真是如此。 + +该公司解释说,“Canonical 一直致力于通过向各种个人设备提供一个统一的自适应平台来重塑个人计算的视觉表现。因此尽管魅族 Pro 5 缺少 MHL 输出,但它运行的是最新的代码,这些代码与新近发布的平板和其它设备一样,可提供一种接近传统桌面的体验。” + +魅族 Pro 5 最初于 2015 年 9 月发布,拥有一个 2100 万像素的后置摄像头,可以拍摄 30fps 的 2160p 视频。同时它还带有一个指纹传感器和支持快速充电的 3050 mAh 的锂电池。 + +目前这款手机只在中国和欧洲有售,预定将从 2016 年 2 月 22 日至 25 日的世界移动大会期间开始。 + +![](http://i1-news.softpedia-static.com/images/fitted/620x/meizu-pro-5-ubuntu-edition-announced-and-it-s-a-beast-photos-500526-11.jpg) + + +------------------------------------------------------------------------------ + +via: http://news.softpedia.com/news/meizu-pro-5-ubuntu-edition-announced-and-it-s-a-beast-photos-500526.shtml + +作者:[Silviu Stahie][a] +译者:[osk874](https://github.com/osk874) +校对:[Yuking](https://github.com/Yuking-net) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie diff --git a/published/20160218 Russia Announces Switch to Linux.md b/published/20160218 Russia Announces Switch to Linux.md new file mode 100644 index 0000000000..9aa0ee327a --- /dev/null +++ b/published/20160218 Russia Announces Switch to Linux.md @@ -0,0 +1,35 @@ +本周 Linux 新闻: 俄罗斯宣布政府电脑系统迁移到 Linux +========================================================================= + +本周 Linux 新闻包括:俄罗斯宣布可能会将系统迁移到 Linux 上、Jack Wallen 思考 2016 年对 Linux 桌面系统的重要性,等等。下面就让我们看看本周 Linux 界都有那些重要新闻。 + +1. 俄罗斯宣布有可能切换到 Linux , 以此来反击西方因克里米亚问题而实施的商业禁运。 + + [俄罗斯可能将成千上万台政府的电脑系统从 Windows 切换成 Linux](http://www.techradar.com/news/world-of-tech/russia-might-switch-thousands-of-government-computers-to-linux-to-spite-microsoft-1314762) - TechRadar + +2. Jack Wallen 写到:“对于 Linux 来说,占有桌面系统市场 1% 或者 99% 并不重要” + + [为了 Linux 桌面系统奋斗是否真的很重要?](http://www.techrepublic.com/article/should-the-fight-for-the-linux-desktop-really-matter/) - TechRepublic + +3. 自从去年 12 月以来,参与 Linux 基金会的 HYPERLEDGER 计划的合作伙伴有了显著的增加 + + [Linux 基金会的 HYPERLEDGER 计划已经有了 30 个合作伙伴](http://www.coindesk.com/linux-foundation-led-hyperledger-project-swells-to-30-members/) - CoinDesk + +4. Docker 的创始人和 CTO , Solomon Hykes 建议将 Alpine Linux 作为公司新的默认操作系统 + + [Docker 将会抛弃 Ubuntu 吗?](http://www.infoworld.com/article/3031847/open-source-tools/is-docker-ditching-ubuntu-linux-confusion-reigns.html) - InfoWorld + +5. Linux 基金会的合作项目 Node.js 基金会计划引入流行的第三方软件包“Express” + + [Node.js 基金会计划引入社区里最流行的框架软件 Express 进行孵化](http://thenextweb.com/dd/2016/02/10/the-node-js-foundation-plans-to-incubate-one-of-the-communitys-most-popular-packages/)- The Next Web + + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/software/applications/885174-this-week-in-linux-news-russia-announces-switch-to-linux-outdated-fight-for-the-linux-desktop-a-more + +作者:[linux.com][linux.com] +译者:[oska874](https://github.com/oska874) +校对:[Yuking_net](https://github.com/Yuking-net) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/20160218 The Best Linux Distros of 2016.md b/published/20160218 The Best Linux Distros of 2016.md new file mode 100644 index 0000000000..bfd8ddd640 --- /dev/null +++ b/published/20160218 The Best Linux Distros of 2016.md @@ -0,0 +1,118 @@ +2016:如何选择 Linux 发行版 +================================ + +![](http://www.linux.com/images/stories/66866/distro-opensuse.JPG) + +[不管是在企业级应用还是在消费者领域](http://www.cio.com/article/3017983/linux/2015s-most-exciting-linux-devices.html),2015 对于 Linux 来说都是极其重要的一年。作为一个从 2005 年就开始使用 Linux 的老用户,我有幸见证了 Linux 过去这 10 年里的重大发展,[并且,我相信它在 2016 年里会更加令人激动](http://www.cio.com/article/3017177/linux/11-predictions-for-linux-in-2016.html)。在这篇文章里,我会挑选几个将在 2016 年里大放光彩的最佳发行版给大家介绍一下。 + +## 强势归来的发行版:openSUSE + +SUSE 是 openSUSE 发行版背后的公司,同时也是起步最早的 Linux 公司;[它在 Linus Torvalds 发布 Linux 的第二年就成立了](http://www.linux.com/news/software/applications/866964-exclusive-interview-with-suse-president-nils-brauckmann)。该公司的成立实际上早于现在的 Linux 公司之王 —— Red Hat。同时 SUSE 也是 [openSUSE](https://www.opensuse.org/) 社区发行版的发起者和赞助商。 + +2015 年,openSUSE 的开发团队决定向 SUSE Linux 企业版 (SLE) 靠拢,以便让用户可以获得企业服务器特性的发行版——类似于 CentOS 和 Ubuntu 那样。因此,openSUSE 变成了 [openSUSE Leap](https://en.opensuse.org/Portal:Leap),一个直接基于 SLE SP1 的发行版。 + +两个发行版共用相同的基础代码,相互受益 —— SUSE 会选用 openSUSE 中好的代码,反之亦然。如此,openSUSE 也放弃了原本常规的发布周期,新版本与 SLE 同步发行。这意味着每个版本将会有更长的生命周期。 + +这样做的结果是,openSUSE 就成了一个非常重要的发行版,因为潜在的 SLE 用户现在可以使用 openSUSE Leap 了。不过,这还不是全部,openSUSE 同样也有发行版 [Tumbleweed](http://www.cio.com/article/3008856/open-source-tools/is-opensuse-tumbleweed-good-enough-for-a-seasoned-arch-user.html) —— 一个纯净的滚动式版本。所以,用户们可以选择使用很稳定的 openSUSE Leap 或者经常更新的 openSUSE Tumbleweed。 + +在我的记忆中,还没有其他的发行版做了这样一个令人印象深刻的强势归来。 + +## 最高可定制性的发行版:Arch Linux + +Arch Linux 是目前最好的滚动式更新的发行版。好吧,我可能有些偏见,因为我是一名 Arch Linux 用户 ( LCTT 译注:译者也是 Arch Linux 用户,它的定制性真的很好)。然而,我认为它好的真正原因是 Arch 在很多其他领域也都表现的非常优越,并且这才是我为什么用它作为主系统的原因。 + +- 对于那些想要学习 Linux 方方面面的用户来说,[Arch Linux](https://www.archlinux.org/) 无疑是一个绝佳的选择。因为你需要手动安装所有自己需要的东西,这样你会慢慢学到 Linux 系统的所有细节。 + +- Arch 是一个可高度定制发行版。任何桌面环境 (DE) 都没有了 “Arch” 的原味。你能够得到的只是一个基础系统,然后你可以在上边构建你所想要的发行版。无论好坏,也不像 openSUSE 或者 Ubuntu 那样,Arch 没有额外的补丁或者集成环境。你得到的基本就是上游开发者所创建的原始软件。 + +- Arch Linux 同时也是最好的滚动式更新的发行版之一。它需要经常保持着更新。用户所运行的基本上是最新的软件,当然,也可以通过非稳定仓库运行预发行版的软件。 + +- Arch 闻名于拥有为数众多的优秀文档。Arch Wiki 是我用以了解所有 Linux 相关事情的完整资源。 + +- Arch 中,我最喜欢的是,它提供了“任何”其他发行版中可用的的包和软件,同时还要感谢 AUR (Arch User Repository,Arch 用户仓库)。 + +## 最美观的发行版:elementary OS + +不同的发行版会有不同的关注点——多数情况下表现为技术的不同。在大多数的 Linux 发行版中,外观和用户感觉并非他们优先考虑的事情 —— 这通常是桌面环境需要考虑的事情。 + +[elementary OS](https://elementary.io/) 正在尝试改变这一事实。在这个发行版中,设计是占据重要位置,并且原因明显——这个发行版是由那些以在 Linux 世界创建漂亮图标而闻名的设计人员所开发的。 + +elementary OS 相当注重整体外观和用户感觉。开发者创建了他们自己的组件,包括桌面环境。此外,他们只会选择那些符合设计规范的应用来加入到软件仓库。你可以发现 elementary OS 有很浓重的 Mac OS X 气息。 + +## 最好的新晋发行版:Solus + +![](http://www.linux.com/images/stories/66866/distro-solus.JPG) + +[Solus](https://solus-project.com/) 最近获得非常大的关注程度。它是一个看起来中规中矩、从零开始构建的操作系统,它并非 Debian 或者 Ubuntu 的衍生版本。它使用的 Budgie 桌面环境同样是从零开始构建的,但它的目标是兼容 Gnome。Solus 和 Google 的 Chrome OS 一样——一切从简。 + +我个人没怎么玩过 Solus,但它看起来很有前途。Solus 实际上并不是一个 “新” 系统。它曾以不同的形式和名称存在了很长时间,但直到 2015 年整个项目才以现在这个新名称重归大众视野。 + +## 最好的云操作系统:Chrome OS + +[Chrome OS](https://www.chromium.org/chromium-os) 可能不会成为你的典型 Linux 发行版,毕竟它是基于浏览器的操作系统,主要用以在线使用。但由于它基于 Linux ,任何人都可以获取其源码进行编译,它同样是一个吸引人的系统。我每天都使用 Chrome OS,它是一个优秀、不用自己维护并且总是保持最新状态的系统,每个人都可以单纯地用它来进行 web 相关的用途。Chrome OS 和 Android 对于推动 Linux 在 PC 市场和移动市场的占有率有着不可或缺的功劳。 + +## 最好的笔记本计算机操作系统:Ubuntu MATE + +大多数的笔记本计算机都没有高端的硬件,假如你运行了一个很耗费资源的桌面环境,那么你可能没有足够的系统资源或电量来维持你的使用 —— 因为基本上被操作系统自身消耗了。于是我找到了 [Ubuntu MATE](http://www.cio.com/article/2848475/ubuntu-mate-enterprise-customers.html) 这个优秀的系统。它是轻量级的环境,但提供了能让你拥有不错体验的所有软件。也幸好它的轻量级设计,大部分的系统资源都留来给你的软件使用,让你依旧可以完成一些繁重的任务。我认为它对于低端硬件来说是最好的发行版。 + +## 为老旧硬件支持而生的发行版:Lubuntu + +假如你身边拥有一些过时的笔记本或 PC,给它安装 [Lubuntu](http://lubuntu.net/) 来获得重生吧。Lubuntu 使用的是 LXDE 桌面环境,但该项目与 Razor Qt 合并之后,变成了 LXQt。尽管最新的版本 15.04 依旧使用 LXDE,但之后的版本将会使用 LXQt。Lubuntu 对于老旧硬件来说是最合适不过的系统了。 + +## 为物联网 (IoT) 而生的发行版:Snappy Ubuntu Core + +![](http://www.linux.com/images/stories/66866/distro-ubuntu-studio.JPG) + +Snappy Ubuntu Core 是为物联网 (IoT) 及此类设备而生的 Linux 操作系统。该系统拥有巨大潜力,它可以将我们身边绝大多数的东西 —— 如路由器、咖啡机和无人机等——变成智能设备。让它更有趣的是,软件管理更新的方式以及为增加安全而提供的容器化支持。 + +## 为桌面系统而生的发行版:Linux Mint Cinnamon + +[Linux Mint Cinnamon](http://www.linux.com/news/software/applications/838569-review-linux-mint-172-release/) 对于台式机和一些有强大硬件的笔记本来说是最好的操作系统。我一般把它叫做 Linux 世界里的 Mac OS X。老实说,由于 Cinnamon 的不稳定,我在很长一段时间内并不是 Linux Mint 的忠实粉丝。但是,在开发者使用Ubuntu LTS (Long Term Support,长期支持)作为基础版本之后,该发行版就变得难以想象的稳定。因为开发者不必花费精力来跟上 Ubuntu 的开发进度,他们现在可以将所有精力放到提升 Cinnamon 上。 + +## 为游戏而生的发行版:Steam OS + +对于桌面版 Linux 来说,玩游戏同样是短板。很多用户为了能够玩游戏,安装了 Linux 和 Windows 双系统。而 Valve 则尝试改变这个局面。Valve 是一个游戏发行商,它提供一个可以在不同平台上运行游戏的客户端。并且,Valve 也同样创建了它自己的开源操作系统——[Steam OS](http://store.steampowered.com/steamos/)——为了创建一个基于 Linux 的游戏平台。截至 2015 年底,它的合作伙伴开始把搭载了 Steam OS 的机器推向市场。 + +## 为隐私而生的发行版:Tails + +在充斥着大量监控和营销者的跟踪 (对目标内容进行的匿名跟踪通常是可接受的)的岁月,隐私保护就变成了一个重要问题。如果你想脱离政府或者市场机构的监控和跟踪,那么你需要一款始终考虑到隐私问题的操作系统。 + +在出于保护隐私的考虑上,没有任何一款系统可以超越 [Tails](https://tails.boum.org/)。它是一款基于 Debian 的发行版,并且在设计之初就考虑了隐私和匿名的支持。Tails 非常优秀,而且据报道说,NSA 认为这是对他们的监控的主要威胁之一。 + +## 为多媒体制作而生的发行版:Ubuntu Studio + +基于 Linux 的操作系统有一个明显的弱点,那就是对多媒体制作的支持并不友好。所有专业级应用基本只能运行在 Windows 或者 Mac OS X 上。Linux 系统从来都不缺乏像样的音频/视频制作软件,但这样还是远远不够的。应该要有一款轻量级的桌面环境,使得那些宝贵的系统资源——如 CPU 和 RAM——尽量少占用,以便用于多媒体制作。目前,[Ubuntu Studio](https://ubuntustudio.org/tour/) 对多媒体制作的支持最好。它使用了 Xfce 桌面环境,并且有各种各样的音频、视频以及图像编辑应用。 + +## 最好的企业发行版:SLE/RHEL + +企业级用户并不会通过浏览像这样的文章来了解他们的服务器该运行什么发行版。他们通常非常明确地知道该到哪里获取信息:即 [Red Hat Enterprise Linux](https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux) 或 [SUSE Linux Enterprise](https://www.suse.com/)。这两个名字已经成了企业服务器的代名词了。同时,这些公司也都通过创新来推动将一切都容器化和变成软件定义的。 + +## 最好的服务器操作系统:Debian/CentOS + +假如你在考虑自己运行一台服务器,但有不希望支付 RHEL 或者 SLE 授权的费用,那么 [Debian](https://www.debian.org/) 或者 [CentOS](https://www.centos.org/) 将是你最好的选择。这两个发行版是社区主导的服务器操作系统,具有不可动摇的地位。并且它们有着长期支持,你不必担忧需要经常去升级系统。 + +## 最好的移动操作系统:Plasma Mobile + +尽管,基于 Linux 的 Android 系统称雄于移动操作系统市场,但是大多数的开源社区——也包括我在内——也仍然强烈希望能有一个发行版可以为移动设备提供传统 Linux 的桌面应用。同时,这样的一个发行版由开源社区来维护会比由商业公司来维护好的多,只有这样,用户才能成为这个发行版的关注点,而不是由公司的商业目标来决定这个发行版的发展趋势。KDE 的 [Plasma Mobile](https://community.kde.org/Plasma/Mobile) 刚好实现了我们的愿望。 + +这个基于 Kubuntu 的发行版始于 2015 年。因为 KDE 社区以坚守标准和为公众开发应用而闻名,我非常期待 Plasma Mobile 能够一直坚持下去。 + +## 为 ARM 设备而生的发行版:Arch Linux ARM + +随着 Android 系统的成功,我们的生活也围绕者越来越多的 ARM 设备——从树莓派 (Raspberry Pi) 到 Chromebook 以及 Nvidia Shield。为 Intel/AMD 架构的 CPU 而编写的传统发行版并不能够在这些 ARM 架构的设备上运行。而一些为 ARM 而编写的发行版却仅仅只能在特定的硬件上运行,比如只能运行在树莓派 (Raspberry Pi) 上的 Raspbian 系统。这就是为什么 [Arch Linux ARM](http://archlinuxarm.org/) (ALARM) 让人眼前一亮的原因。它是一个基于 Arch Linux 的纯粹由社区主导的发行版,可以在树梅派 (Raspberry Pi)、Chromebook、Android 设备以及 Nvidia Shield 等设备上运行。同时,更好的是,也由于 AUR,你可以安装很多在其他发行版可能无法获取的软件。 + +## 结论 + +在我写完本文的时候,连我自己都震惊了。能够在 Linux 的世界里为大家写点东西真的是很令人激动。不必去管 Linux 统治桌面电脑的时代是否会到来,我们都要一样享受自己使用 Linux 的每一刻快乐时光。 + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/software/applications/878620-the-best-linux-distros-of-2016 + +作者:[Swapnil Bhartiya][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[mudongliang](https://github.com/mudongliang),[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/61003 diff --git a/published/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md b/published/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md new file mode 100644 index 0000000000..4872f4352a --- /dev/null +++ b/published/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md @@ -0,0 +1,60 @@ +Linux Mint 18 将拥有自己的应用集 +============================================= + +![](http://itsfoss.com/wp-content/uploads/2016/01/Linux-Mint-apps.jpg) + +对于发行版开发者来说,创建和发布一系列专为他们发行版设计的应用是再平常不过的事情。一个最典型的例子就是 [elementary OS](https://elementary.io/) 。而在经过九年的努力后,Linux Mint 终于孤注一掷做了相同的事情。 + +[Linux Mint](http://www.linuxmint.com/) 是现今最著名的 Linux 发行版之一。其基于 Ubuntu 和 Debian,Linux Mint 努力去创建一个现代的、优雅的、舒适的操作系统,不但强大而且易用。(LCTT 译注:Linux Mint 基于 Ubuntu,而 Linux Mint Debian Edition 基于 Debian。)Linux Mint 背后的团队同时也积极参与 [MATE](http://itsfoss.com/install-mate-desktop-ubuntu-14-04/) 和 [Cinnamon](http://itsfoss.com/install-cinnamon-ubuntu-14-04/) 桌面环境开发。 + +## 前有 X 战警(X-men),后有 X 应用(X-Apps) + +周四, Linux Mint 项目领导者 Clement Lefebvre [宣布](http://blog.linuxmint.com/?p=2985) X-Apps 的创建。X-Apps 被设计为不依赖特定桌面环境,以便开发者可以直接更新它们而不必针对每一种桌面环境做调整。Lefebvre 声明这些 X-Apps 将会被作为 Cinnamon、MATE 和 Xfce 桌面环境的默认应用。 + +## Linux 是否需要更多的应用? + +据 Lefebvre 所述,X-Apps 的创建是因 GNOME 3.18 发布所需。对于 GNOME 3.18 的发布,他这样说: + +> “GTK 本身和一些 GNOME 应用都在 GNOME SHELL 上集成地很好,而且看起来风格很一致。坏消息就是它们在任何别的地方看起来很不相称。使事情变得更糟的是,Ubuntu 的旗舰产品 Unity 重度依赖 GTK、GNOME 应用及 GNOME 环境本身,所以我们这里不能在上游的 3.18 版本中处理,而这一系列的补丁会带来它们自己的问题(举一个例子,Ubuntu 在应用中重新引入菜单条和标题栏,但是不重写它们的头部栏..所以你有时会看到它们三者一起出现)。” + +在过去,Linux Mint 团队通过“应用降级(例如 Linux Mint 17 使用 gedit 2.30),给 GNOME 打补丁以及使用替代品(大部分在 MATE 和 Xfce)”来处理这个问题。 + +Lefebvre 也说为 Cinnamon 和 MATE 构建特定应用没有意义。这就是为什么他们选择开发那些通用的,可以完美地适应运行在 Cinnamon,MATE 和 Xfce(以及其他可能的桌面环境)的应用。 + +他进一步补充道: + +>“X-Apps 将会是一个通用的,使用传统的接口 GTK3 应用的集合。它能被用作 Cinnamon,MATE 和 Xfce 默认的桌面组件。在 Mint 18 中,“X apps” 将允许我们去维护一个本地风格及更高层面的集成。因为它们将会被用于替代看起来很不一致的 GNOME 桌面应用。长期来讲,X-App 项目将会允许我们去开发新的功能和改进应用本身(这是一些我们无法通过打补丁,临时分支或者特定桌面的分支做到的事情,比如说 MATE 桌面应用,因为它代价太高)。” + +## 将会有什么类型的应用? + +![](http://itsfoss.com/wp-content/uploads/2016/01/xedit.png) + +Lefebvre 只透露其中一个即将来临的 X-Apps:一个名为 xedit 的文本编辑器。下面是这个软件提供的一些特性: + +- 基于 Pluma,很容易学会使用 +- 使用 GTK3 +- 不依赖 GNOME 或 MATE + +## 何时呢? + +X-Apps 将会和 [Linux Mint 18](http://itsfoss.com/linux-mint-18-codenamed-sarah/) 一同到来。而 Linux Mint 18 将会在 Ubuntu 16.04 LTS 发布之后数月后发布。[Ubuntu 16.04 LTS 计划于四月发布。](http://itsfoss.com/ubuntu-1604-release-schedule/) + +## 总结 + +就我而言,无论何时当我听见某人发布一个新发行版特定的应用,我都会局促不安。Linux 世界本身已经难以想象的碎片化了。我们真的需要花费时间和精力去创建更多的重复的项目吗?但不要误解我,我喜欢桌面无关软件的想法。它将修复大量的一个桌面一个应用样子的问题。 + +使我发愁的问题是“它们是否会成功?”。正如我之前所说,Linux Mint 团队成员也在两种桌面环境工作。目前增加了应用开发就让这些混在一起了。我自己没有写过一个软件(除了 Hello World),但是我知道当你尝试且使一个项目复杂化,就会发生不好的事情。许多项目已经变成了不断膨胀的恶龙。我希望这样的事不要发生在这里。 + +你有不同的想法吗?在下方评论以便让我知道。 + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/linux-mint-own-apps/ + +作者:[JOHN PAUL][a] +译者:[mudongliang](https://github.com/mudongliang) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/john/ diff --git a/sources/news/20160129 Recognizing correct code.md b/sources/news/20160129 Recognizing correct code.md new file mode 100644 index 0000000000..60b94b895d --- /dev/null +++ b/sources/news/20160129 Recognizing correct code.md @@ -0,0 +1,53 @@ +# Recognizing correct code + +Automatic bug-repair system fixes 10 times as many errors as its predecessors. +------ +DongShuaike is translating. + +MIT researchers have developed a machine-learning system that can comb through repairs to open-source computer programs and learn their general properties, in order to produce new repairs for a different set of programs. + +The researchers tested their system on a set of programming errors, culled from real open-source applications, that had been compiled to evaluate automatic bug-repair systems. Where those earlier systems were able to repair one or two of the bugs, the MIT system repaired between 15 and 18, depending on whether it settled on the first solution it found or was allowed to run longer. + +While an automatic bug-repair tool would be useful in its own right, professor of electrical engineering and computer science Martin Rinard, whose group developed the new system, believes that the work could have broader ramifications. + +“One of the most intriguing aspects of this research is that we’ve found that there are indeed universal properties of correct code that you can learn from one set of applications and apply to another set of applications,” Rinard says. “If you can recognize correct code, that has enormous implications across all software engineering. This is just the first application of what we hope will be a brand-new, fabulous technique.” + +Fan Long, a graduate student in electrical engineering and computer science at MIT, presented a paper describing the new system at the Symposium on Principles of Programming Languages last week. He and Rinard, his advisor, are co-authors. + +Users of open-source programs catalogue bugs they encounter on project websites, and contributors to the projects post code corrections, or “patches,” to the same sites. So Long was able to write a computer script that automatically extracted both the uncorrected code and patches for 777 errors in eight common open-source applications stored in the online repository GitHub. + +**Feature performance** + +As with [all][1] machine-learning systems, the crucial aspect of Long and Rinard’s design was the selection of a “[feature set][2]” that the system would analyze. The researchers concentrated on values stored in memory — either variables, which can be modified during a program’s execution, or constants, which can’t. They identified 30 prime characteristics of a given value: It might be involved in an operation, such as addition or multiplication, or a comparison, such as greater than or equal to; it might be local, meaning it occurs only within a single block of code, or global, meaning that it’s accessible to the program as a whole; it might be the variable that represents the final result of a calculation; and so on. + +Long and Rinard wrote a computer program that evaluated all the possible relationships between these characteristics in successive lines of code. More than 3,500 such relationships constitute their feature set. Their machine-learning algorithm then tried to determine what combination of features most consistently predicted the success of a patch. + +“All the features we’re trying to look at are relationships between the patch you insert and the code you are trying to patch,” Long says. “Typically, there will be good connections in the correct patches, corresponding to useful or productive program logic. And there will be bad patterns that mean disconnections in program logic or redundant program logic that are less likely to be successful.” + +**Ranking candidates** + +In earlier work, Long had developed an algorithm that attempts to repair program bugs by systematically modifying program code. The modified code is then subjected to a suite of tests designed to elicit the buggy behavior. This approach may find a modification that passes the tests, but it could take a prohibitively long time. Moreover, the modified code may still contain errors that the tests don’t trigger. + +Long and Rinard’s machine-learning system works in conjunction with this earlier algorithm, ranking proposed modifications according to the probability that they are correct before subjecting them to time-consuming tests. + +The researchers tested their system, which they call Prophet, on a set of 69 program errors that had cropped up in eight popular open-source programs. Of those, 19 are amenable to the type of modifications that Long’s algorithm uses; the other 50 have more complicated problems that involve logical inconsistencies across larger swaths of code. + +When Long and Rinard configured their system to settle for the first solution that passed the bug-eliciting tests, it was able to correctly repair 15 of the 19 errors; when they allowed it to run for 12 hours per problem, it repaired 18. + +Of course, that still leaves the other 50 errors in the test set untouched. In ongoing work, Long is working on a machine-learning system that will look at more coarse-grained manipulation of program values across larger stretches of code, in the hope of producing a bug-repair system that can handle more complex errors. + +“A revolutionary aspect of Prophet is how it leverages past successful patches to learn new ones,” says Eran Yahav, an associate professor of computer science at the Technion in Israel. “It relies on the insight that despite differences between software projects, fixes — patches — applied to projects often have commonalities that can be learned from. Using machine learning to learn from ‘big code’ holds the promise to revolutionize many programming tasks — code completion, reverse-engineering, et cetera.” + +-------------------------------------------------------------------------------- + +via: http://news.mit.edu/2016/faster-automatic-bug-repair-code-errors-0129 + +作者:Larry Hardesty +译者:[译者ID](https://github.com/翻译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://news.mit.edu/2013/teaching-computers-to-see-by-learning-to-see-like-computers-0919 +[2]:http://news.mit.edu/2015/automating-big-data-analysis-1016 + diff --git a/sources/share/20150901 5 best open source board games to play online.md b/sources/share/20150901 5 best open source board games to play online.md index eee49289e0..c14fecc697 100644 --- a/sources/share/20150901 5 best open source board games to play online.md +++ b/sources/share/20150901 5 best open source board games to play online.md @@ -1,4 +1,3 @@ -translating by tastynoodle 5 best open source board games to play online ================================================================================ I have always had a fascination with board games, in part because they are a device of social interaction, they challenge the mind and, most importantly, they are great fun to play. In my misspent youth, myself and a group of friends gathered together to escape the horrors of the classroom, and indulge in a little escapism. The time provided an outlet for tension and rivalry. Board games help teach diplomacy, how to make and break alliances, bring families and friends together, and learn valuable lessons. diff --git a/sources/share/20151028 Bossie Awards 2015--The best open source application development tools.md b/sources/share/20151028 Bossie Awards 2015--The best open source application development tools.md index 10da3e7cdc..b99752ea7b 100644 --- a/sources/share/20151028 Bossie Awards 2015--The best open source application development tools.md +++ b/sources/share/20151028 Bossie Awards 2015--The best open source application development tools.md @@ -333,4 +333,4 @@ via: http://www.infoworld.com/article/2982920/open-source-tools/bossie-awards-20 [43]:http://www.infoworld.com/article/2982429/bossie-awards-2015-the-best-open-source-big-data-tools.html [44]:http://www.infoworld.com/article/2982923/bossie-awards-2015-the-best-open-source-data-center-and-cloud-software.html [45]:http://www.infoworld.com/article/2982630/bossie-awards-2015-the-best-open-source-desktop-and-mobile-software.html -[46]:http://www.infoworld.com/article/2982962/bossie-awards-2015-the-best-open-source-networking-and-security-software.html \ No newline at end of file +[46]:http://www.infoworld.com/article/2982962/bossie-awards-2015-the-best-open-source-networking-and-security-software.html diff --git a/sources/share/20151028 Bossie Awards 2015--The best open source networking and security software.md b/sources/share/20151028 Bossie Awards 2015--The best open source networking and security software.md index 129ce3eff4..78c558b1e6 100644 --- a/sources/share/20151028 Bossie Awards 2015--The best open source networking and security software.md +++ b/sources/share/20151028 Bossie Awards 2015--The best open source networking and security software.md @@ -1,3 +1,6 @@ +robot527 translating + + Bossie Awards 2015: The best open source networking and security software ================================================================================ InfoWorld's top picks of the year among open source tools for building, operating, and securing networks diff --git a/sources/share/20151104 Optimize Web Delivery with these Open Source Tools.md b/sources/share/20151104 Optimize Web Delivery with these Open Source Tools.md deleted file mode 100644 index 3d1137f5bf..0000000000 --- a/sources/share/20151104 Optimize Web Delivery with these Open Source Tools.md +++ /dev/null @@ -1,196 +0,0 @@ -translating by fw8899 -Optimize Web Delivery with these Open Source Tools -================================================================================ -Web proxy software forwards HTTP requests without modifying traffic in any way. They can be configured as a transparent proxy with no client-side configuration required. They can also be used as a reverse proxy front-end to websites; here the cache serves an unlimited number of clients for one or some web servers. - -Web proxies are versatile tools. They have a wide variety of uses, from caching web, DNS and other lookups, to speeding up the delivery of a web server / reducing bandwidth consumption. Web proxy software can also harden security by filtering traffic and anonymizing connections, and offer media-range limitations. This software is used by high-profile, high-traffic websites such as The New York Times, The Guardian, and social media and content sites such as Twitter, Facebook, and Wikipedia. - -Web caches have become a vital mechanism for optimising the amount of data that is delivered in a given period of time. Good web caches also help to minimise latency, serving pages as quickly as possible. This helps to prevent the end user from becoming impatient having to wait for content to be delivered. Web caches optimise the data flow between client and server. They also help to converse bandwidth by caching frequently-delivered content. If you need to reduce server load and improve delivery speed of your content, it is definitely worth exploring the benefits offered by web cache software. - -To provide an insight into the quality of software available for Linux, I feature below 5 excellent open source web proxy tools. Some of the them are full-featured; a couple of them have very modest resource needs. - -### Squid ### - -Squid is a high-performance open source proxy caching server and web cache daemon. It supports FTP, Internet Gopher, HTTPS, TLS, and SSL. It handles all requests in a single, non-blocking, I/O-driven process over IPv4 or IPv6. - -Squid consists of a main server program squid, a Domain Name System lookup program dnsserver, some optional programs for rewriting requests and performing authentication, together with some management and client tools. - -Squid offers a rich access control, authorization and logging environment to develop web proxy and content serving applications. - -Features include: - -- Web proxy: - - Caching to reduce access time and bandwidth use - - Keeps meta data and especially hot objects cached in RAM - - Caches DNS lookups - - Supports non-blocking DNS lookups - - Implements negative chacking of failed requests -- Squid caches can be arranged in a hierarchy or mesh for additional bandwidth savings -- Enforce site-usage policies with extensive access controls -- Anonymize connections, such as disabling or changing specific header fields in a client's HTTP request -- Reverse proxy -- Media-range limitations -- Supports SSL -- Support for IPv6 -- Error Page Localization - error pages presented by Squid may now be localized per-request to match the visitors local preferred language -- Connection Pinning (for NTLM Auth Passthrough) - a workaround which permits Web servers to use Microsoft NTLM Authentication instead of HTTP standard authentication through a web proxy -- Quality of Service (QoS) Flow support - - Select a TOS/Diffserv value to mark local hits - - Select a TOS/Diffserv value to mark peer hits - - Selectively mark only sibling or parent requests - - Allows any HTTP response towards clients to have the TOS value of the response coming from the remote server preserved - - Mask certain bits in the TOS received from the remote server, before copying the value to the TOS send towards clients -- SSL Bump (for HTTPS Filtering and Adaptation) - Squid-in-the-middle decryption and encryption of CONNECT tunneled SSL traffic, using configurable client- and server-side certificates -- eCAP Adaptation Module support -- ICAP Bypass and Retry enhancements - ICAP is now extended with full bypass and dynamic chain routing to handle multiple adaptation services. -- ICY streaming protocol support - commonly known as SHOUTcast multimedia streams -- Dynamic SSL Certificate Generation -- Support for the Internet Content Adaptation Protocol (ICAP) -- Full request logging -- Anonymize connections - -- Website: [www.squid-cache.org][1] -- Developer: National Laboratory for Applied Networking Research (NLANR) and Internet volunteers -- License: GNU GPL v2 -- Version Number: 4.0.1 - -### Privoxy ### - -Privoxy (Privacy Enhancing Proxy) is a non-caching Web proxy with advanced filtering capabilities for enhancing privacy, modifying web page data and HTTP headers, controlling access, and removing ads and other obnoxious Internet junk. Privoxy has a flexible configuration and can be customized to suit individual needs and tastes. It supports both stand-alone systems and multi-user networks. - -Privoxy uses the concept of actions in order to manipulate the data stream between the browser and remote sites. - -Features include: - -- Highly configurable - completely personalize your installation -- Ad blocking -- Cookie management -- Supports "Connection: keep-alive". Outgoing connections can be kept alive independently from the client -- Supports IPv6 -- Tagging which allows to change the behaviour based on client and server headers -- Run as an "intercepting" proxy -- Sophisticated actions and filters for manipulating both server and client headers -- Can be chained with other proxies -- Integrated browser-based configuration and control utility. Browser-based tracing of rule and filter effects. Remote toggling -- Web page filtering (text replacements, removes banners based on size, invisible "web-bugs" and HTML annoyances, etc) -- Modularized configuration that allows for standard settings and user settings to reside in separate files, so that installing updated actions files won't overwrite individual user settings -- Support for Perl Compatible Regular Expressions in the configuration files, and a more sophisticated and flexible configuration syntax -- GIF de-animation -- Bypass many click-tracking scripts (avoids script redirection) -- User-customizable HTML templates for most proxy-generated pages (e.g. "blocked" page) -- Auto-detection and re-reading of config file changes -- Most features are controllable on a per-site or per-location basis - -- Website: [www.privoxy.org][2] -- Developer: Fabian Keil (lead developer), David Schmidt, and many other contributors -- License: GNU GPL v2 -- Version Number: 3.4.2 - -### Varnish Cache ### - -Varnish Cache is a web accelerator written with performance and flexibility in mind. It's modern architecture offers significantly better performance. It typically speeds up delivery with a factor of 300 - 1000x, depending on your architecture. Varnish stores web pages in memory so the web servers do not have to create the same web page repeatedly. The web server only recreates a page when it is changed. When content is served from memory this happens a lot faster then anything. - -Additionally Varnish can serve web pages much faster then any application server is capable of - giving the website a significant speed enhancement. - -For a cost-effective configuration, Varnish Cache uses between 1-16GB and a SSD disk. - -Features include: - -- Modern design -- VCL - a very flexible configuration language. The VCL configuration is translated to C, compiled, loaded and executed giving flexibility and speed -- Load balancing using both a round-robin and a random director, both with a per-backend weighting -- DNS, Random, Hashing and Client IP based Directors -- Load balance between multiple backends -- Support for Edge Side Includes including stitching together compressed ESI fragments -- Heavily threaded -- URL rewriting -- Cache multiple vhosts with a single Varnish -- Log data is stored in shared memory -- Basic health-checking of backends -- Graceful handling of "dead" backends -- Administered by a command line interface -- Use In-line C to extend Varnish -- Can be used on the same system as Apache -- Run multiple Varnish on the same system -- Support for HAProxy's PROXY protocol. This is a protocol adds a small header on each incoming TCP connection that describes who the real client is, added by (for example) an SSL terminating process -- Warm and cold VCL states -- Plugin support with Varnish Modules, called VMODs -- Backends defined through VMODs -- Gzip Compression and Decompression -- HTTP Streaming Pass & Fetch -- Saint and Grace mode. Saint Mode allows for unhealthy backends to be blacklisted for a period of time, preventing them from serving traffic when using Varnish as a load balancer. Grace mode allows Varnish to serve an expired version of a page or other asset in cases where Varnish is unable to retrieve a healthy response from the backend -- Experimental support for Persistent Storage, without LRU eviction - -- Website: [www.varnish-cache.org][3] -- Developer: Varnish Software -- License: FreeBSD -- Version Number: 4.1.0 - -### Polipo ### - -Polipo is an open source caching HTTP proxy which has modest resource needs. - -It listens to requests for web pages from your browser and forwards them to web servers, and forwards the servers’ replies to your browser. In the process, it optimises and cleans up the network traffic. It is similar in spirit to WWWOFFLE, but the implementation techniques are more like the ones ones used by Squid. - -Polipo aims at being a compliant HTTP/1.1 proxy. It should work with any web site that complies with either HTTP/1.1 or the older HTTP/1.0. - -Features include: - -- HTTP 1.1, IPv4 & IPv6, traffic filtering and privacy-enhancement -- Uses HTTP/1.1 pipelining if it believes that the remote server supports it, whether the incoming requests are pipelined or come in simultaneously on multiple connections -- Cache the initial segment of an instance if the download has been interrupted, and, if necessary, complete it later using Range requests -- Upgrade client requests to HTTP/1.1 even if they come in as HTTP/1.0, and up- or downgrade server replies to the client's capabilities -- Complete support for IPv6 (except for scoped (link-local) addresses) -- Use as a bridge between the IPv4 and IPv6 Internets -- Content-filtering -- Can use a technique known as Poor Man's Multiplexing to reduce latency -- SOCKS 4 and SOCKS 5 protocol support -- HTTPS proxying -- Behaves as a transparent proxy -- Run Polipo together with Privoxy or tor - -- Website: [www.pps.univ-paris-diderot.fr/~jch/software/polipo/][4] -- Developer: Juliusz Chroboczek, Christopher Davis -- License: MIT License -- Version Number: 1.1.1 - -### Tinyproxy ### - -Tinyproxy is a lightweight open source web proxy daemon. It is designed to be fast and yet small. It is useful for cases such as embedded deployments where a full featured HTTP proxy is required, but the system resources for a larger proxy are unavailable. - -Tinyproxy is very useful in a small network setting, where a larger proxy would either be too resource intensive, or a security risk. One of the key features of Tinyproxy is the buffering connection concept. In effect, Tinyproxy will buffer a high speed response from a server, and then relay it to a client at the highest speed the client will accept. This feature greatly reduces the problems with sluggishness on the net. - -Features: - -- Easy to modify -- Anonymous mode - allows specification of individual HTTP headers that should be allowed through, and which should be blocked -- HTTPS support - Tinyproxy allows forwarding of HTTPS connections without modifying traffic in any way through the CONNECT method -- Remote monitoring - access proxy statistics from afar, letting you know exactly how busy the proxy is -- Load average monitoring - configure software to refuse connections after the server load reaches a certain point -- Access control - configure to only allow connections from certain subnets or IP addresses -- Secure - run without any special privileges, thus minimizing the chance of system compromise -- URL based filtering - allows domain and URL-based black- and whitelisting -- Transparent proxying - configure as a transparent proxy, so that a proxy can be used without any client-side configuration -- Proxy chaining - use an upstream proxy server for outbound connections, instead of direct connections to the target server, creating a so-called proxy chain -- Privacy features - restrict both what data comes to your web browser from the HTTP server (e.g., cookies), and to restrict what data is allowed through from your web browser to the HTTP server (e.g., version information) -- Small footprint - the memory footprint is about 2MB with glibc, and the CPU load increases linearly with the number of simultaneous connections (depending on the speed of the connection). Tinyproxy can be run on an old machine without affecting performance - -- Website: [banu.com/tinyproxy][5] -- Developer: Robert James Kaes and contributors -- License: GNU GPL v2 -- Version Number: 1.8.3 - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20151101020309690/WebDelivery.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:http://www.squid-cache.org/ -[2]:http://www.privoxy.org/ -[3]:https://www.varnish-cache.org/ -[4]:http://www.pps.univ-paris-diderot.fr/%7Ejch/software/polipo/ -[5]:https://banu.com/tinyproxy/ diff --git a/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md b/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md index f6e40d4286..f6a568a55f 100644 --- a/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md +++ b/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md @@ -1,4 +1,4 @@ -bazz2222222222222222222222222222222222222222222 +ictlyh Translating Review EXT4 vs. Btrfs vs. XFS ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/09/1385698302_funny_linux_wallpapers-593x445.jpg) diff --git a/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md b/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md index bb04ddf0c8..c27e90fd7d 100644 --- a/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md +++ b/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md @@ -1,3 +1,5 @@ +[translating by ray] + Interviews: Linus Torvalds Answers Your Question ================================================================================ Last Thursday you had a chance to [ask Linus Torvalds][1] about programming, hardware, and all things Linux. You can read his answers to those questions below. If you'd like to see what he had to say the last time we sat down with him, [you can do so here][2]. diff --git a/sources/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md b/sources/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md deleted file mode 100644 index 22a0acdbf1..0000000000 --- a/sources/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md +++ /dev/null @@ -1,345 +0,0 @@ -sevenot translating -A Linux User Using ‘Windows 10′ After More than 8 Years – See Comparison -================================================================================ -Windows 10 is the newest member of windows NT family of which general availability was made on July 29, 2015. It is the successor of Windows 8.1. Windows 10 is supported on Intel Architecture 32 bit, AMD64 and ARMv7 processors. - -![Windows 10 and Linux Comparison](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-vs-Linux.jpg) - -Windows 10 and Linux Comparison - -As a Linux-user for more than 8 continuous years, I thought to test Windows 10, as it is making a lots of news these days. This article is a breakthrough of my observation. I will be seeing everything from the perspective of a Linux user so you may find it a bit biased towards Linux but with absolutely no false information. - -1. I searched Google with the text “download windows 10” and clicked the first link. - -![Search Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Search-Windows-10.jpg) - -Search Windows 10 - -You may directly go to link : [https://www.microsoft.com/en-us/software-download/windows10ISO][1] - -2. I was supposed to select a edition from ‘windows 10‘, ‘windows 10 KN‘, ‘windows 10 N‘ and ‘windows 10 single language‘. - -![Select Windows 10 Edition](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Windows-10-Edition.jpg) - -Select Windows 10 Edition - -For those who want to know details of different editions of Windows 10, here is the brief details of editions. - -- Windows 10 – Contains everything offered by Microsoft for this OS. -- Windows 10N – This edition comes without Media-player. -- Windows 10KN – This edition comes without media playing capabilities. -- Windows 10 Single Language – Only one Language Pre-installed. - -3. I selected the first option ‘Windows 10‘ and clicked ‘Confirm‘. Then I was supposed to select a product language. I choose ‘English‘. - -I was provided with Two Download Links. One for 32-bit and other for 64-bit. I clicked 64-bit, as per my architecture. - -![Download Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Download-Windows-10.jpg) - -Download Windows 10 - -With my download speed (15Mbps), it took me 3 long hours to download it. Unfortunately there were no torrent file to download the OS, which could otherwise have made the overall process smooth. The OS iso image size is 3.8 GB. - -I could not find an image of smaller size but again the truth is there don’t exist net-installer image like things for Windows. Also there is no way to calculate hash value after the iso image has been downloaded. - -Wonder why so ignorance from windows on such issues. To verify if the iso is downloaded correctly I need to write the image to a disk or to a USB flash drive and then boot my system and keep my finger crossed till the setup is finished. - -Lets start. I made my USB flash drive bootable with the windows 10 iso using dd command, as: - - # dd if=/home/avi/Downloads/Win10_English_x64.iso of=/dev/sdb1 bs=512M; sync - -It took a few minutes to complete the process. I then rebooted the system and choose to boot from USB flash Drive in my UEFI (BIOS) settings. - -#### System Requirements #### - -If you are upgrading - -- Upgrade supported only from Windows 7 SP1 or Windows 8.1 - -If you are fresh Installing - -- Processor: 1GHz or faster -- RAM : 1GB and Above(32-bit), 2GB and Above(64-bit) -- HDD: 16GB and Above(32-bit), 20GB and Above(64-bit) -- Graphic card: DirectX 9 or later + WDDM 1.0 Driver - -### Installation of Windows 10 ### - -1. Windows 10 boots. Yet again they changed the logo. Also no information on whats going on. - -![Windows 10 Logo](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Logo.jpg) - -Windows 10 Logo - -2. Selected Language to install, Time & currency format and keyboard & Input methods before clicking Next. - -![Select Language and Time](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Language-and-Time.jpg) - -Select Language and Time - -3. And then ‘Install Now‘ Menu. - -![Install Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Windows-10.jpg) - -Install Windows 10 - -4. The next screen is asking for Product key. I clicked ‘skip’. - -![Windows 10 Product Key](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Product-Key.jpg) - -Windows 10 Product Key - -5. Choose from a listed OS. I chose ‘windows 10 pro‘. - -![Select Install Operating System](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Install-Operating-System.jpg) - -Select Install Operating System - -6. oh yes the license agreement. Put a check mark against ‘I accept the license terms‘ and click next. - -![Accept License](http://www.tecmint.com/wp-content/uploads/2015/08/Accept-License.jpg) - -Accept License - -7. Next was to upgrade (to windows 10 from previous versions of windows) and Install Windows. Don’t know why custom: Windows Install only is suggested as advanced by windows. Anyway I chose to Install windows only. - -![Select Installation Type](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Installation-Type.jpg) - -Select Installation Type - -8. Selected the file-system and clicked ‘next’. - -![Select Install Drive](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Install-Drive.jpg) - -Select Install Drive - -9. The installer started to copy files, getting files ready for installation, installing features, installing updates and finishing up. It would be better if the installer would have shown verbose output on the action is it taking. - -![Installing Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Installing-Windows.jpg) - -Installing Windows - -10. And then windows restarted. They said reboot was needed to continue. - -![Windows Installation Process](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Installation-Process.jpg) - -Windows Installation Process - -11. And then all I got was the below screen which reads “Getting Ready”. It took 5+ minutes at this point. No idea what was going on. No output. - -![Windows Getting Ready](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Getting-Ready.jpg) - -Windows Getting Ready - -12. yet again, it was time to “Enter Product Key”. I clicked “Do this later” and then used expressed settings. - -![Enter Product Key](http://www.tecmint.com/wp-content/uploads/2015/08/Enter-Product-Key.jpg) - -Enter Product Key - -![Select Express Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Express-Settings.jpg) - -Select Express Settings - -14. And then three more output screens, where I as a Linuxer expected that the Installer will tell me what it is doing but all in vain. - -![Loading Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Loading-Windows.jpg) - -Loading Windows - -![Getting Updates](http://www.tecmint.com/wp-content/uploads/2015/08/Getting-Updates.jpg) - -Getting Updates - -![Still Loading Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Still-Loading-Windows.jpg) - -Still Loading Windows - -15. And then the installer wanted to know who owns this machine “My organization” or I myself. Chose “I own it” and then next. - -![Select Organization](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Organization.jpg) - -Select Organization - -16. Installer prompted me to join “Azure Ad” or “Join a domain”, before I can click ‘continue’. I chooses the later option. - -![Connect Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Connect-Windows.jpg) - -Connect Windows - -17. The Installer wants me to create an account. So I entered user_name and clicked ‘Next‘, I was expecting an error message that I must enter a password. - -![Create Account](http://www.tecmint.com/wp-content/uploads/2015/08/Create-Account.jpg) - -Create Account - -18. To my surprise Windows didn’t even showed warning/notification that I must create password. Such a negligence. Anyway I got my desktop. - -![Windows 10 Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Desktop.jpg) - -Windows 10 Desktop - -#### Experience of a Linux-user (Myself) till now #### - -- No Net-installer Image -- Image size too heavy -- No way to check the integrity of iso downloaded (no hash check) -- The booting and installation remains same as it was in XP, Windows 7 and 8 perhaps. -- As usual no output on what windows Installer is doing – What file copying or what package installing. -- Installation was straight forward and easy as compared to the installation of a Linux distribution. - -### Windows 10 Testing ### - -19. The default Desktop is clean. It has a recycle bin Icon on the default desktop. Search web directly from the desktop itself. Additionally icons for Task viewing, Internet browsing, folder browsing and Microsoft store is there. As usual notification bar is present on the bottom right to sum up desktop. - -![Deskop Shortcut Icons](http://www.tecmint.com/wp-content/uploads/2015/08/Deskop-Shortcut-icons.jpg) - -Deskop Shortcut Icons - -20. Internet Explorer replaced with Microsoft Edge. Windows 10 has replace the legacy web browser Internet Explorer also known as IE with Edge aka project spartan. - -![Microsoft Edge Browser](http://www.tecmint.com/wp-content/uploads/2015/08/Edge-browser.jpg) - -Microsoft Edge Browser - -It is fast at least as compared to IE (as it seems it testing). Familiar user Interface. The home screen contains news feed updates. There is also a search bar title that reads ‘Where to next?‘. The browser loads time is considerably low which result in improving overall speed and performance. The memory usages of Edge seems normal. - -![Windows Performance](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Performance.jpg) - -Windows Performance - -Edge has got cortana – Intelligent Personal Assistant, Support for chrome-extension, web Note – Take notes while Browsing, Share – Right from the tab without opening any other TAB. - -#### Experience of a Linux-user (Myself) on this point #### - -21. Microsoft has really improved web browsing. Lets see how stable and fine it remains. It don’t lag as of now. - -22. Though RAM usages by Edge was fine for me, a lots of users are complaining that Edge is notorious for Excessive RAM Usages. - -23. Difficult to say at this point if Edge is ready to compete with Chrome and/or Firefox at this point of time. Lets see what future unfolds. - -#### A few more Virtual Tour #### - -24. Start Menu redesigned – Seems clear and effective. Metro icons make it live. Populated with most commonly applications viz., Calendar, Mail, Edge, Photos, Contact, Temperature, Companion suite, OneNote, Store, Xbox, Music, Movies & TV, Money, News, Store, etc. - -![Windows Look and Feel](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Look.jpg) - -Windows Look and Feel - -In Linux on Gnome Desktop Environment, I use to search required applications simply by pressing windows key and then type the name of the application. - -![Search Within Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Search-Within-Desktop.jpg) - -Search Within Desktop - -25. File Explorer – seems clear Designing. Edges are sharp. In the left pane there is link to quick access folders. - -![Windows File Explorer](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-File-Explorer.jpg) - -Windows File Explorer - -Equally clear and effective file explorer on Gnome Desktop Environment on Linux. Removed UN-necessary graphics and images from icons is a plus point. - -![File Browser on Gnome](http://www.tecmint.com/wp-content/uploads/2015/08/File-Browser.jpg) - -File Browser on Gnome - -26. Settings – Though the settings are a bit refined on Windows 10, you may compare it with the settings on a Linux Box. - -**Settings on Windows** - -![Windows 10 Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Settings.jpg) - -Windows 10 Settings - -**Setting on Linux Gnome** - -![Gnome Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Gnome-Settings.jpg) - -Gnome Settings - -27. List of Applications – List of Application on Linux is better than what they use to provide (based upon my memory, when I was a regular windows user) but still it stands low as compared to how Gnome3 list application. - -**Application Listed by Windows** - -![Application List on Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Application-List-on-Windows-10.jpg) - -Application List on Windows 10 - -**Application Listed by Gnome3 on Linux** - -![Gnome Application List on Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Gnome-Application-List-on-Linux.jpg) - -Gnome Application List on Linux - -28. Virtual Desktop – Virtual Desktop feature of Windows 10 is one of those topic which are very much talked about these days. - -Here is the virtual Desktop in Windows 10. - -![Windows Virtual Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Virtual-Desktop.jpg) - -Windows Virtual Desktop - -and the virtual Desktop on Linux we are using for more than 2 decades. - -![Virtual Desktop on Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Virtual-Desktop-on-Linux.jpg) - -Virtual Desktop on Linux - -#### A few other features of Windows 10 #### - -29. Windows 10 comes with wi-fi sense. It shares your password with others. Anyone who is in the range of your wi-fi and connected to you over Skype, Outlook, Hotmail or Facebook can be granted access to your wifi network. And mind it this feature has been added as a feature by microsoft to save time and hassle-free connection. - -In a reply to question raised by Tecmint, Microsoft said – The user has to agree to enable wifi sense, everytime on a new network. oh! What a pathetic taste as far as security is concerned. I am not convinced. - -30. Up-gradation from Windows 7 and Windows 8.1 is free though the retail cost of Home and pro editions are approximately $119 and $199 respectively. - -31. Microsoft released first cumulative update for windows 10, which is said to put system into endless crash loop for a few people. Windows perhaps don’t understand such problem or don’t want to work on that part don’t know why. - -32. Microsoft’s inbuilt utility to block/hide unwanted updates don’t work in my case. This means If a update is there, there is no way to block/hide it. Sorry windows users! - -#### A few features native to Linux that windows 10 have #### - -Windows 10 has a lots of features that were taken directly from Linux. If Linux were not released under GNU License perhaps Microsoft would never had the below features. - -33. Command-line package management – Yup! You heard it right. Windows 10 has a built-in package management. It works only in Windows Power Shell. OneGet is the official package manager for windows. Windows package manager in action. - -![Windows 10 Package Manager](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Package-Manager.jpg) - -Windows 10 Package Manager - -- Border-less windows -- Flat Icons -- Virtual Desktop -- One search for Online+offline search -- Convergence of mobile and desktop OS - -### Overall Conclusion ### - -- Improved responsiveness -- Well implemented Animation -- low on resource -- Improved battery life -- Microsoft Edge web-browser is rock solid -- Supported on Raspberry pi 2. -- It is good because windows 8/8.1 was not upto mark and really bad. -- It is a the same old wine in new bottle. Almost the same things with brushed up icons. - -What my testing suggest is Windows 10 has improved on a few things like look and feel (as windows always did), +1 for Project spartan, Virtual Desktop, Command-line package management, one search for online and offline search. It is overall an improved product but those who thinks that Windows 10 will prove to be the last nail in the coffin of Linux are mistaken. - -Linux is years ahead of Windows. Their approach is different. In near future windows won’t stand anywhere around Linux and there is nothing for which a Linux user need to go to Windows 10. - -That’s all for now. Hope you liked the post. I will be here again with another interesting post you people will love to read. Provide us with your valuable feedback in the comments below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/a-linux-user-using-windows-10-after-more-than-8-years-see-comparison/ - -作者:[vishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:https://www.microsoft.com/en-us/software-download/windows10ISO diff --git a/sources/talk/20150921 14 tips for teaching open source development.md b/sources/talk/20150921 14 tips for teaching open source development.md deleted file mode 100644 index a580f3b776..0000000000 --- a/sources/talk/20150921 14 tips for teaching open source development.md +++ /dev/null @@ -1,72 +0,0 @@ -14 tips for teaching open source development -================================================================================ -Academia is an excellent platform for training and preparing the open source developers of tomorrow. In research, we occasionally open source software we write. We do this for two reasons. One, to promote the use of the tools we produce. And two, to learn more about the impact and issues other people face when using them. With this background of writing research software, I was tasked with redesigning the undergraduate software engineering course for second-year students at the University of Bradford. - -It was a challenge, as I was faced with 80 students coming for different degrees, including IT, business computing, and software engineering, all in the same course. The hardest part was working with students with a wide range of programming experience levels. Traditionally, the course had involved allowing students to choose their own teams, tasking them with building a garage database system and then submitting a report in the end as part of the assessment. - -I decided to redesign the course to give students insight into the process of working on real-world software teams. I divided the students into teams of five or six, based on their degrees and programming skills. The aim was to have an equal distribution of skills across the teams to prevent any unfair advantage of one team over another. - -### The core lessons ### - -The course format was updated to have both lectures and lab sessions. However, the lab session functioned as mentoring sessions, where instructors visited each team to ask for updates and see how the teams were progressing with the clients and the products. There were traditional lectures on project management, software testing, requirements engineering, and similar topics, supplemented by lab sessions and mentor meetings. These meetings allowed us to check up on students' progress and monitor whether they were following the software engineering methodologies taught in the lecture portion. Topics we taught this year included: - -- Requirements engineering -- How to interact with clients and other team members -- Software methodologies, such as agile and extreme programming approaches -- How to use different software engineering approaches and work through sprints -- Team meetings and documentations -- Project management and Gantt charts -- UML diagrams and system descriptions -- Code revisioning using Git -- Software testing and bug tracking -- Using open source libraries for their tools -- Open source licenses and which one to use -- Software delivery - -Along with these lectures, we had a few guest speakers from the corporate world talk about their practices in software product deliveries. We also managed to get the university’s intellectual property lawyer to come and talk about IP issues surrounding software in the UK, and how to handle any intellectual properties issues in software. - -### Collaboration tools ### - -To make all of the above possible, a number of tools were introduced. Students were trained on how to use them for their projects. These included: - -- Google Drive folders shared within the team and the tutor, to maintain documents and spreadsheets for project descriptions, requirements gathering, meeting minutes, and time tracking of the project. This was an extremely efficient way to monitor and also provide feedback straight into the folders for each team. -- [Basecamp][1] for document sharing as well, and later in the course we considered this as a possible replacement for Google Drive. -- Bug reporting tools such as [Mantis][2] again have a limited users for free reporting. Later Git itself was being used for bug reports n any tools by the testers in the teams -- Remote videoconferencing tools were used as a number of clients were off-campus, and sometimes not even in the same city. The students were regularly using Skype to communicate with them, documenting their meetings and sometimes even recording them for later use. -- A number of open source tool kits were also used for students' projects. The students were allowed to choose their own tool kits and languages based on the requirements of the projects. The only condition was that these have to be open source and could be installed in the university labs, which the technical staff was extremely supportive of. -- In the end all teams had to deliver their projects to the client, including complete working version of the software, documentation, and open source licenses of their own choosing. Most of the teams chose the GPL version 3 license. - -### Tips and lessons learned ### - -In the end, it was a fun year and nearly all students did very well. Here are some of the lessons I learned which may help improve the course next year: - -1. Give the students a wide variety of choice in projects that are interesting, such as game development or mobile application development, and projects with goals. Working with mundane database systems is not going to keep most students interested. Working with interesting projects, most students became self-learners, and were also helping others in their teams and outside to solve some common issues. The course also had a message list, where students were posting any issues they were encountering, in hopes of receiving advice from others. However, there was a drawback to this approach. The external examiners have advised us to go back to a style of one type of project, and one type of language to help narrow the assessment criteria for the students. -1. Give students regular feedback on their performance at every stage. This could be done during the mentoring meetings with the teams, or at other stages, to help them improve the work for next time. -1. Students are more than willing to work with clients from outside university! They look forward to working with external company representatives or people outside the university, just because of the new experience. They were all able to display professional behavior when interacting with their mentors, which put the instructors at ease. -1. A lot of teams left developing unit testing until the end of the project, which from an extreme programming methodology standpoint was a serious no-no. Maybe testing should be included at the assessments of the various stages to help remind students that they need to be developing unit tests in parallel with the software. -1. In the class of 80, there were only four girls, each working in different teams. I observed that boys were very ready to take on roles as team leads, assigning the most interesting code pieces to themselves and the girls were mostly following instructions or doing documentation. For some reason, the girls choose not to show authority or preferred not to code even when they were encouraged by a female instructor. This is still a major issue that needs to be addressed. -1. There are different styles of documentation such as using UML, state diagrams, and others. Allow students to learn them all and merge with other courses during the year to improve their learning experience. -1. Some students were very good developers, but some doing business computing had very little coding experience. The teams were encouraged to work together to prevent the idea that developer would get better marks than other team members if they were only doing meeting minutes or documentations. Roles were also encouraged to be rotated during mentoring sessions to see that everyone was getting a chance to learn how to program. -1. Allowing the team to meet with the mentor every week was helpful in monitoring team activities. It also showed who was doing the most work. Usually students who were not participating in their groups would not come to meetings, and could be identified by the work being presented by other members every week. -1. We encouraged students to attach licenses to their work and identify intellectual property issues when working with external libraries and clients. This allowed students to think out of the box and learn about real-world software delivery problems. -1. Give students room to choose their own technologies. -1. Having teaching assistants is key. Managing 80 students was very difficult, especially on the weeks when they were being assessed. Next year I would definitely have teaching assistants helping me with the teams. -1. A supportive tech support for the lab is very important. The university tech support was extremely supportive of the course. Next year, they are talking about having virtual machines assigned to teams, so the teams can install any software on their own virtual machine as needed. -1. Teamwork helps. Most teams exhibited a supportive nature to other team members, and mentoring also helped. -1. Additional support from other staff members is a plus. As a new academic, I needed to learn from experience and also seek advice at multiple points on how to handle certain students and teams if I was confused on how to engage them with the course. Support from senior staff members was very encouraging to me. - -In the end, it was a fun course—not only for the me as an instructor, but for the students as well. There were some issues with learning objectives and traditional grading schemes that still need to be ironed out to reduce the workload it produced on the instructors. For next year, I plan to keep this same format, but hope to come up with a better grading scheme and introduce more software tools that can help monitor project activities and code revisions. - --------------------------------------------------------------------------------- - -via: http://opensource.com/education/15/9/teaching-open-source-development-undergraduates - -作者:[Mariam Kiran][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://opensource.com/users/mariamkiran -[1]:https://basecamp.com/ -[2]:https://www.mantisbt.org/ diff --git a/sources/talk/20151019 Gaming On Linux--All You Need To Know.md b/sources/talk/20151019 Gaming On Linux--All You Need To Know.md index 525d08838b..332136112a 100644 --- a/sources/talk/20151019 Gaming On Linux--All You Need To Know.md +++ b/sources/talk/20151019 Gaming On Linux--All You Need To Know.md @@ -1,5 +1,3 @@ -213edu Translating - Gaming On Linux: All You Need To Know ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Gaming-on-Linux.jpeg) diff --git a/sources/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md b/sources/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md deleted file mode 100644 index 174fc55262..0000000000 --- a/sources/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md +++ /dev/null @@ -1,199 +0,0 @@ -18 Years of GNOME Design and Software Evolution: Step by Step -================================================================================ -注:youtube 视频 - - -[GNOME][1] (GNU Object Model Environment) was started on August 15th 1997 by two Mexican programmers – Miguel de Icaza and Federico Mena. GNOME – Free Software project to develop a desktop environment and applications by volunteers and paid full-time developers. All of GNOME Desktop Environment is the open source software and support Linux, FreeBSD, OpenBSD and others. - -Now we move to 1997 and see the first version of GNOME: - -### GNOME 1 ### - -![GNOME 1.0 - First major GNOME release](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/1.0/gnome.png) - -**GNOME 1.0** (1997) – First major GNOME release - -![GNOME 1.2 Bongo](https://raw.githubusercontent.com/paulcarroty/Articles/master/GNOME_History/1.2/1361441938.or.86429.png) - -**GNOME 1.2** “Bongo”, 2000 - -![GNOME 1.4 Tranquility](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/1.4/1.png) - -**GNOME 1.4** “Tranquility”, 2001 - -### GNOME 2 ### - -![GNOME 2.0](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.0/1.png) - -**GNOME 2.0**, 2002 - -Major upgrade based on GTK+2. Introduction of the Human Interface Guidelines. - -![GNOME 2.2](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.2/GNOME_2.2_catala.png) - -**GNOME 2.2**, 2003 - -Multimedia and file manager improvements. - -![GNOME 2.4 Temujin](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.4/gnome-desktop.png) - -**GNOME 2.4** “Temujin”, 2003 - -First release of Epiphany Browser, accessibility support. - -![GNOME 2.6](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.6/Adam_Hooper.png) - -**GNOME 2.6**, 2004 - -Nautilus changes to a spatial file manager, and a new GTK+ file dialog is introduced. A short-lived fork of GNOME, GoneME, is created as a response to the changes in this version. - -![GNOME 2.8](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.8/3.png) - -**GNOME 2.8**, 2004 - -Improved removable device support, adds Evolution - -![GNOME 2.10](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.10/GNOME-Screenshot-2.10-FC4.png) - -**GNOME 2.10**, 2005 - -Lower memory requirements and performance improvements. Adds: new panel applets (modem control, drive mounter and trashcan); and the Totem and Sound Juicer applications. - -![GNOME 2.12](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.12/gnome-livecd.jpg) - -**GNOME 2.12**, 2005 - -Nautilus improvements; improvements in cut/paste between applications and freedesktop.org integration. Adds: Evince PDF viewer; New default theme: Clearlooks; menu editor; keyring manager and admin tools. Based on GTK+ 2.8 with cairo support - -![GNOME 2.14](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.14/debian4-stable.jpg) - -**GNOME 2.14**, 2006 - -Performance improvements (over 100% in some cases); usability improvements in user preferences; GStreamer 0.10 multimedia framework. Adds: Ekiga video conferencing application; Deskbar search tool; Pessulus lockdown editor; Fast user switching; Sabayon system administration tool. - -![GNOME 2.16](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.16/Gnome-2.16-screenshot.png) - -**GNOME 2.16**, 2006 - -Performance improvements. Adds: Tomboy notetaking application; Baobab disk usage analyser; Orca screen reader; GNOME Power Manager (improving laptop battery life); improvements to Totem, Nautilus; compositing support for Metacity; new icon theme. Based on GTK+ 2.10 with new print dialog - -![GNOME 2.18](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.18/Gnome-2.18.1.png) - -**GNOME 2.18**, 2007 - -Performance improvements. Adds: Seahorse GPG security application, allowing encryption of emails and local files; Baobab disk usage analyser improved to support ring chart view; Orca screen reader; improvements to Evince, Epiphany and GNOME Power Manager, Volume control; two new games, GNOME Sudoku and glChess. MP3 and AAC audio encoding. - -![GNOME 2.20](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.20/rnintroduction-screenshot.png) - -**GNOME 2.20**, 2007 - -Tenth anniversary release. Evolution backup functionality; improvements in Epiphany, EOG, GNOME Power Manager; password keyring management in Seahorse. Adds: PDF forms editing in Evince; integrated search in the file manager dialogs; automatic multimedia codec installer. - -![GNOME 2.22, 2008](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.22/GNOME-2-22-2-Released-2.png) - -**GNOME 2.22**, 2008 - -Addition of Cheese, a tool for taking photos from webcams and Remote Desktop Viewer; basic window compositing support in Metacity; introduction of GVFS; improved playback support for DVDs and YouTube, MythTV support in Totem; internationalised clock applet; Google Calendar support and message tagging in Evolution; improvements in Evince, Tomboy, Sound Juicer and Calculator. - -![GNOME 2.24](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.24/gnome-224.jpg) - -**GNOME 2.24**, 2008 - -Addition of the Empathy instant messenger client, Ekiga 3.0, tabbed browsing in Nautilus, better multiple screens support and improved digital TV support. - -![GNOME 2.26](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.26/gnome226-large_001.jpg) - -**GNOME 2.26**, 2009 - -New optical disc recording application Brasero, simpler file sharing, media player improvements, support for multiple monitors and fingerprint reader support. - -![GNOME 2.28](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.28/1.png) - -**GNOME 2.28**, 2009 - -Addition of GNOME Bluetooth module. Improvements to Epiphany web browser, Empathy instant messenger client, Time Tracker, and accessibility. Upgrade to GTK+ version 2.18. - -![GNOME 2.30](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.30/GNOME2.30.png) - -**GNOME 2.30**, 2010 - -Improvements to Nautilus file manager, Empathy instant messenger client, Tomboy, Evince, Time Tracker, Epiphany, and Vinagre. iPod and iPod Touch devices are now partially supported via GVFS through libimobiledevice. Uses GTK+ 2.20. - -![GNOME 2.32](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.32/gnome-2-32.png.en_GB.png) - -**GNOME 2.32**, 2010 - -Addition of Rygel and GNOME Color Manager. Improvements to Empathy instant messenger client, Evince, Nautilus file manager and others. 3.0 was intended to be released in September 2010, so a large part of the development effort since 2.30 went towards 3.0. - -### GNOME 3 ### - -![GNOME 3.0](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.0/chat-3-0.png) - -**GNOME 3.0**, 2011 - -Introduction of GNOME Shell. A redesigned settings framework with fewer, more focused options. Topic-oriented help based on the Mallard markup language. Side-by-side window tiling. A new visual theme and default font. Adoption of GTK+ 3.0 with its improved language bindings, themes, touch, and multiplatform support. Removal of long-deprecated development APIs.[73] - -![GNOME 3.2](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.2/gdm.png) - -**GNOME 3.2**, 2011 - -Online accounts support; Web applications support; contacts manager; documents and files manager; quick preview of files in the File Manager; greater integration; better documentation; enhanced looks and various performance improvements. - -![GNOME 3.4](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.4/application-view.png) - -**GNOME 3.4**, 2012 - -New Look for GNOME 3 Applications: Documents, Epiphany (now called Web), and GNOME Contacts. Search for documents from the Activities overview. Application menus support. Refreshed interface components: New color picker, redesigned scrollbars, easier to use spin buttons, and hideable title bars. Smooth scrolling support. New animated backgrounds. Improved system settings with new Wacom panel. Easier extensions management. Better hardware support. Topic-oriented documentation. Video calling and Live Messenger support in Empathy. Better accessibility: Improved Orca integration, better high contrast mode, and new zoom settings. Plus many other application enhancements and smaller details. - -![GNOME 3.6](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.6/gnome-3-6.png) - -**GNOME 3.6**, 2012 - -Refreshed Core components: New applications button and improved layout in the Activities Overview. A new login and lock screen. Redesigned Message Tray. Notifications are now smarter, more noticeable, easier to dismiss. Improved interface and settings for System Settings. The user menu now shows Power Off by default. Integrated Input Methods. Accessibility is always on. New applications: Boxes, that was introduced as a preview version in GNOME 3.4, and Clocks, an application to handle world times. Updated looks for Disk Usage Analyzer, Empathy and Font Viewer. Improved braille support in Orca. In Web, the previously blank start page was replaced by a grid that holds your most visited pages, plus better full screen mode and a beta of WebKit2. Evolution renders email using WebKit. Major improvements to Disks. Revamped Files application (also known as Nautilus), with new features like Recent files and search. - -![GNOME 3.8](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.8/applications-view.png) - -**GNOME 3.8**, 2013 - -Refreshed Core components: A new applications view with frequently used and all apps. An overhauled window layout. New input methods OSD switcher. The Notifications & Messaging tray now react to the force with which the pointer is pressed against the screen edge. Added Classic mode for those who prefer a more traditional desktop experience. The GNOME Settings application features an updated toolbar design. New Initial Setup assistant. GNOME Online Accounts integrates with more services. Web has been upgraded to use the WebKit2 engine. Web has a new private browsing mode. Documents has gained a new dual page mode & Google Documents integration. Improved user interface of Contacts. GNOME Files, GNOME Boxes and GNOME Disks have received a number of improvements. Integration of ownCloud. New GNOME Core Applications: GNOME Clocks and GNOME Weather. - -![GNOME 3.10](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.10/GNOME-3-10-Release-Schedule-2.png) - -**GNOME 3.10**, 2013 - -A reworked system status area, which gives a more focused overview of the system. A collection of new applications, including GNOME Maps, GNOME Notes, GNOME Music and GNOME Photos. New geolocation features, such as automatic time zones and world clocks. HiDPI support[75] and smart card support. D-Bus activation made possible with GLib 2.38 - -![GNOME 3.12](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.12/app-folders.png) - -**GNOME 3.12**, 2014 - -Improved keyboard navigation and window selection in the Overview. Revamped first set-up utility based on usability tests. Wired networking re-added to the system status area. Customizable application folders in the Applications view. Introduction of new GTK+ widgets such as popovers in many applications. New tab style in GTK+. GNOME Videos GNOME Terminal and gedit were given a fresh look, more consistent with the HIG. A search provider for the terminal emulator is included in GNOME Shell. Improvements to GNOME Software and high-density display support. A new sound recorder application. New desktop notifications API. Progress in the Wayland port has reached a usable state that can be optionally previewed. - -![GNOME 3.14](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.14/Top-Features-of-GNOME-3-14-Gallery-459893-2.jpg) - -**GNOME 3.14**, 2014 - -Improved desktop environment animations. Improved touchscreen support. GNOME Software supports managing installed add-ons. GNOME Photos adds support for Google. Redesigned UI for Evince, Sudoku, Mines and Weather. Hitori is added as part of GNOME Games. - -![GNOME 3.16](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.16/preview-apps.png) - -**GNOME 3.16**, 2015 - -33,000 changes. Major changes include UI color scheme goes from black to charcoal. Overlay scroll bars added. Improvements to notifications including integration with Calendar applet. Tweaks to various apps including Files, Image Viewer, and Maps. Access to Preview Apps. Continued porting from X11 to Wayland. - -Thanks to [Wikipedia][2] for short changelogs review and another big thanks for GNOME Project! Stay tuned! - - --------------------------------------------------------------------------------- - -via: https://tlhp.cf/18-years-of-gnome-evolution/ - -作者:[Pavlo Rudyi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://tlhp.cf/author/paul/ -[1]:https://www.gnome.org/ -[2]:https://en.wikipedia.org/wiki/GNOME \ No newline at end of file diff --git a/sources/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md b/sources/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md deleted file mode 100644 index af8bb311db..0000000000 --- a/sources/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md +++ /dev/null @@ -1,170 +0,0 @@ -30 Years of Free Software Foundation: Best Quotes of Richard Stallman -================================================================================ -注:youtube 视频 - - -**Richard Matthew Stallman** (rms) – one of biggest figure in Information Technology. He is a computer programmer and architect (GNU Compiler Collection (GCC)), GNU Debugger, Emacs), software freedom evangelist, [GNU Project][1] and [FSF][2] founder. - -**GNU** is a recursive acronym “GNU’s Not Unix!”. GNU – collection of free computer software for Unix-based operation system. Can be used with GNU/Hurd and Linux kernels. Announced on September 27, 1983. General components: - -- GNU Compiler Collection (GCC) -- GNU C library (glibc) -- GNU Core Utilities (coreutils) -- GNU Debugger (GDB) -- GNU Binary Utilities (binutils) -- GNU Bash shell -- NOME desktop environment - -注:视频 - - -**Free Software Foundation** (FSF) – non-profit organization for free software and computer user freedom promotion and defend their rights. Read more information here. Founded on 4 October 1985. - -- The freedom to run the program as you wish, for any purpose (freedom 0). -- The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this. -- The freedom to redistribute copies so you can help your neighbor (freedom 2). -- The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this. - -This is the Four Freedoms of free software. - -Here is quotes of Richard Stallman about freedom, software, social, philosophy and others things. - -**About Facebook:** - -> Facebook is not your friend, it is a surveillance engine. - -**About Android:** - -> Android is very different from the GNU/Linux operating system because it contains very little of GNU. Indeed, just about the only component in common between Android and GNU/Linux is Linux, the kernel. - -**About computer industry:** - -> The computer industry is the only industry that is more fashion-driven than women's fashion. - -**About cloud computing:** - -> The interesting thing about cloud computing is that we've redefined cloud computing to include everything that we already do. - -**About ethics:** - -> Whether gods exist or not, there is no way to get absolute certainty about ethics. Without absolute certainty, what do we do? We do the best we can. - -**About freedom:** - -> Free software is software that respects your freedom and the social solidarity of your community. So it's free as in freedom. - -**About goal and idealism:** - -> If you want to accomplish something in the world, idealism is not enough - you need to choose a method that works to achieve the goal. - -**About sharing:** - -> Sharing is good, and with digital technology, sharing is easy. - -**About facebook (extended version):** - -> Facebook mistreats its users. Facebook is not your friend; it is a surveillance engine. For instance, if you browse the Web and you see a 'like' button in some page or some other site that has been displayed from Facebook. Therefore, Facebook knows that your machine visited that page. - -**About web application:** - -> One reason you should not use web applications to do your computing is that you lose control. -> -> If you use a proprietary program or somebody else's web server, you're defenceless. You're putty in the hands of whoever developed that software. - -**About books:** - -> With paper printed books, you have certain freedoms. You can acquire the book anonymously by paying cash, which is the way I always buy books. I never use a credit card. I don't identify to any database when I buy books. Amazon takes away that freedom. - -**About MPAA:** - -> Officially, MPAA stands for Motion Picture Association of America, but I suggest that MPAA stands for Malicious Power Attacking All. - -**About money and career:** - -> I could have made money this way, and perhaps amused myself writing code. But I knew that at the end of my career, I would look back on years of building walls to divide people, and feel I had spent my life making the world a worse place. - -**About proprietary software:** - -> Proprietary software keeps users divided and helpless. Divided because each user is forbidden to redistribute it to others, and helpless because the users can't change it since they don't have the source code. They can't study what it really does. So the proprietary program is a system of unjust power. - -**About smartphone:** - -> A smartphone is a computer - it's not built using a computer - the job it does is the job of being a computer. So, everything we say about computers, that the software you run should be free - you should insist on that - applies to smart phones just the same. And likewise to those tablets. - -**About CD and digital content:** - -> CD stores have the disadvantage of an expensive inventory, but digital bookshops would need no such thing: they could write copies at the time of sale on to memory sticks, and sell you one if you forgot your own. - -**About paradigm of competition:** - -> The paradigm of competition is a race: by rewarding the winner, we encourage everyone to run faster. When capitalism really works this way, it does a good job; but its defenders are wrong in assuming it always works this way. - -**About vi and emacs:** - -> People sometimes ask me if it is a sin in the Church of Emacs to use vi. Using a free version of vi is not a sin; it is a penance. So happy hacking. - -**About freedom and history:** - -> Value your freedom or you will lose it, teaches history. 'Don't bother us with politics', respond those who don't want to learn. - -**About patents:** - -> Fighting patents one by one will never eliminate the danger of software patents, any more than swatting mosquitoes will eliminate malaria. -> -> Software patents are dangerous to software developers because they impose monopolies on software ideas. - -**About copyrights:** - -> In practice, the copyright system does a bad job of supporting authors, aside from the most popular ones. Other authors' principal interest is to be better known, so sharing their work benefits them as well as readers. - -**About pay for work:** - -> There is nothing wrong with wanting pay for work, or seeking to maximize one's income, as long as one does not use means that are destructive. - -**About Chrome OS:** - -> In essence, Chrome OS is the GNU/Linux operating system. However, it is delivered without the usual applications, and rigged up to impede and discourage installing applications. - -**About Linux users:** - -> Many users of the GNU/Linux system will not have heard the ideas of free software. They will not be aware that we have ideas, that a system exists because of ethical ideals, which were omitted from ideas associated with the term 'open source.' - -**About privacy in facebook:** - -> If there is a Like button in a page, Facebook knows who visited that page. And it can get IP address of the computer visiting the page even if the person is not a Facebook user. - -**About programming:** - -> Programming is not a science. Programming is a craft. -> -> My favorite programming languages are Lisp and C. However, since around 1992 I have worked mainly on free software activism, which means I am too busy to do much programming. Around 2008 I stopped doing programming projects. -> -> C++ is a badly designed and ugly language. It would be a shame to use it in Emacs. - -**About hacking and learn programming:** - -> People could no longer learn hacking the way I did, by starting to work on a real operating system, making real improvements. In fact, in the 1980s I often came across newly graduated computer science majors who had never seen a real program in their lives. They had only seen toy exercises, school exercises, because every real program was a trade secret. They never had the experience of writing features for users to really use, and fixing the bugs that real users came across. The things you need to know to do real work. -> -> It is hard to write a simple definition of something as varied as hacking, but I think what these activities have in common is playfulness, cleverness, and exploration. Thus, hacking means exploring the limits of what is possible, in a spirit of playful cleverness. Activities that display playful cleverness have "hack value". - -**About web browsing:** - -> For personal reasons, I do not browse the web from my computer. (I also have no net connection much of the time.) To look at page I send mail to a daemon which runs wget and mails the page back to me. It is very efficient use of my time, but it is slow in real time. - -**About music sharing:** - -> Friends share music with each other, they don't allow themselves to be divided by a system that says that nobody is supposed to have copies. - --------------------------------------------------------------------------------- - -via: https://tlhp.cf/fsf-richard-stallman/ - -作者:[Pavlo Rudyi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://tlhp.cf/author/paul/ -[1]:http://www.gnu.org/ -[2]:http://www.fsf.org/ \ No newline at end of file diff --git a/sources/talk/20151117 How bad a boss is Linus Torvalds.md b/sources/talk/20151117 How bad a boss is Linus Torvalds.md index 8b10e44584..76e9f4c244 100644 --- a/sources/talk/20151117 How bad a boss is Linus Torvalds.md +++ b/sources/talk/20151117 How bad a boss is Linus Torvalds.md @@ -1,3 +1,4 @@ +sonofelice translating How bad a boss is Linus Torvalds? ================================================================================ ![linus torvalds](http://images.techhive.com/images/article/2015/08/linus_torvalds-100600260-primary.idge.jpg) diff --git a/sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md b/sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md deleted file mode 100644 index edcef22d7f..0000000000 --- a/sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md +++ /dev/null @@ -1,171 +0,0 @@ -20 Years of GIMP Evolution: Step by Step -================================================================================ -注:youtube 视频 - - -[GIMP][1] (GNU Image Manipulation Program) – superb open source and free graphics editor. Development began in 1995 as students project of the University of California, Berkeley by Peter Mattis and Spencer Kimball. In 1997 the project was renamed in “GIMP” and became an official part of [GNU Project][2]. During these years the GIMP is one of the best graphics editor and platinum holy wars “GIMP vs Photoshop” – one of the most popular. - -The first announce, 21.11.1995: - -> From: Peter Mattis -> -> Subject: ANNOUNCE: The GIMP -> -> Date: 1995-11-21 -> -> Message-ID: <48s543$r7b@agate.berkeley.edu> -> -> Newsgroups: comp.os.linux.development.apps,comp.os.linux.misc,comp.windows.x.apps -> -> The GIMP: the General Image Manipulation Program -> ------------------------------------------------ -> -> The GIMP is designed to provide an intuitive graphical interface to a -> variety of image editing operations. Here is a list of the GIMP's -> major features: -> -> Image viewing -> ------------- -> -> * Supports 8, 15, 16 and 24 bit color. -> * Ordered and Floyd-Steinberg dithering for 8 bit displays. -> * View images as rgb color, grayscale or indexed color. -> * Simultaneously edit multiple images. -> * Zoom and pan in real-time. -> * GIF, JPEG, PNG, TIFF and XPM support. -> -> Image editing -> ------------- -> -> * Selection tools including rectangle, ellipse, free, fuzzy, bezier -> and intelligent. -> * Transformation tools including rotate, scale, shear and flip. -> * Painting tools including bucket, brush, airbrush, clone, convolve, -> blend and text. -> * Effects filters (such as blur, edge detect). -> * Channel & color operations (such as add, composite, decompose). -> * Plug-ins which allow for the easy addition of new file formats and -> new effect filters. -> * Multiple undo/redo. - -GIMP 0.54, 1996 - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/054.png) - -GIMP 0.54 was required X11 displays, X-server and Motif 1.2 wigdets and supported 8, 15, 16 & 24 color depths with RGB & grayscale colors. Supported images format: GIF, JPEG, PNG, TIFF and XPM. - -Basic functionality: rectangle, ellipse, free, fuzzy, bezier, intelligent selection tools, and rotate, scale, shear, clone, blend and flip images. - -Extended tools: text operations, effects filters, tools for channel and colors manipulation, undo and redo operations. Since the first version GIMP support the plugin system. - -GIMP 0.54 can be ran in Linux, HP-UX, Solaris, SGI IRIX. - -### GIMP 0.60, 1997 ### - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/060.gif) - -This is development release, not for all users. GIMP has the new toolkits – GDK (GIMP Drawing Kit) and GTK (GIMP Toolkit), Motif support is deprecated. GIMP Toolkit is also begin of the GTK+ cross-platform widget toolkit. New features: - -- basic layers -- sub-pixel sampling -- brush spacing -- improver airbrush -- paint modes - -### GIMP 0.99, 1997 ### - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/099.png) - -Since 0.99 version GIMP has the scripts add macros (Script-Fus) support. GTK and GDK with some improvements has now the new name – GTK+. Other improvements: - -- support big images (rather than 100 MB) -- new native format – XCF -- new API – write plugins and extensions is easy - -### GIMP 1.0, 1998 ### - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/100.gif) - -GIMP and GTK+ was splitted into separate projects. The GIMP official website has -reconstructed and contained new tutorials, plugins and documentation. New features: - -- tile-based memory management -- massive changes in plugin API -- XFC format now support layers, guides and selections -- web interface -- online graphics generation - -### GIMP 1.2, 2000 ### - -New features: - -- translation for non-english languages -- fixed many bugs in GTK+ and GIMP -- many new plugins -- image map -- new toolbox: resize, measure, dodge, burn, smugle, samle colorize and curve bend -- image pipes -- images preview before saving -- scaled brush preview -- recursive selection by path -- new navigation window -- drag’n’drop -- watermarks support - -### GIMP 2.0, 2004 ### - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/200.png) - -The biggest change – new GTK+ 2.x toolkit. - -### GIMP 2.2, 2004 ### - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/220.png) - -Many bugfixes and drag’n’drop support. - -### GIMP 2.4, 2007 ### - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/240.png) - -New features: - -- better drag’n’drop support -- Ti-Fu was replaced to Script-Fu – the new script interpreter -- new plugins: photocopy, softglow, neon, cartoon, dog, glob and others - -### GIMP 2.6, 2008 ### - -New features: - -- renew graphics interface -- new select and tool -- GEGL (GEneric Graphics Library) integration -- “The Utility Window Hint” for MDI behavior - -### GIMP 2.8, 2012 ### - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/280.png) - -New features: - -- GUI has some visual changes -- new save and export menu -- renew text editor -- layers group support -- JPEG2000 and export to PDF support -- webpage screenshot tool - --------------------------------------------------------------------------------- - -via: https://tlhp.cf/20-years-of-gimp-evolution/ - -作者:[Pavlo Rudyi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://tlhp.cf/author/paul/ -[1]:https://gimp.org/ -[2]:http://www.gnu.org/ \ No newline at end of file diff --git a/sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md b/sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md deleted file mode 100644 index 90f8b22e32..0000000000 --- a/sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md +++ /dev/null @@ -1,51 +0,0 @@ -Linux Foundation Explains a "World without Linux" and Open Source -================================================================================ -> The Linux Foundation responds to questions about its "World without Linux" movies, including what the Internet would be like without Linux and other open source software. - -![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/11/hey_22.png) - -Would the world really be tremendously different if Linux, the open source operating system kernel, did not exist? Would there be no Internet or movies? Those are the questions some viewers of the [Linux Foundation's][1] ongoing "[World without Linux][2]" video series are asking. Here are some answers. - -In case you've missed it, the "World without Linux" series is a collection of quirky short films that depict, well, a world without Linux (and open source software more generally). They have emphasized themes like [Linux's role in movie-making][3] and in [serving the Internet][4]. - -To offer perspective on the series's claims, direction and hidden symbols, Jennifer Cloer, vice president of communications at The Linux Foundation, recently sent The VAR Guy responses to some common queries about the movies. Below are the answers, in her own words. - -### The latest episode takes Sam and Annie to the movies. Would today's graphics really be that much different without Linux? ### - -In episode #4, we do a bit of a parody on "Avatar." Love it or hate it, the graphics in the real "Avatar" are pretty impressive. In a world without Linux, the graphics would be horrible but we wouldn't even know it because we wouldn't know any better. But in fact, "Avatar" was created using Linux. Weta Digital used one of the world's largest Linux clusters to render the film and do 3D modeling. It's also been reported that "Lord of the Rings," "Fantastic Four" and "King Kong," among others, have used Linux. We hope this episode can bring attention to that work, which hasn't been widely reported. - -### Some people criticized the original episode for concluding there would be no Internet without Linux. What's your reaction? ### - -We enjoyed the debate that resulted from the debut episode. With more than 100,000 views to date of that episode alone, it brought awareness to the role that Linux plays in society and to the worldwide community of contributors and supporters. Of course the Internet would exist without Linux but it wouldn't be the Internet we know today and it wouldn't have matured at the pace it has. Each episode makes a bold and fun statement about Linux's role in our every day lives. We hope this can help extend the story of Linux to more people around the world. - -### Why is Sam and Annie's cat named String? ### - -Nothing in the series is a coincidence. Look closely and you'll find all kinds of inside Linux and geek jokes. String is named after String theory and was named by our Linux.com Editor Libby Clark. In physics, string theory is a theoretical framework in which the point-like particles of particle physics are replaced by one-dimensional objects called strings. String theory describes how these strings propagate through space and interact with each other. Kind of like Sam, Annie and String in a World Without Linux. - -### What can we expect from the next two episodes and, in particular, the finale? When will it air? ### - -In episode #5, we'll go to space and experience what a world without Linux would mean to exploration. It's a wild ride. In the finale, we finally get to see Linus in a world without Linux. There have been clues throughout the series as to what this finale will include but I can't give more than that away since there are ongoing contests to find the clues. And I can't give away the air date for the finale! You'll have to follow #WorldWithoutLinux to learn more. - -### Can you give us a hint on the clues in episode #4? ### - -There is another reference to the Free Burger Restaurant in this episode. Linux also actually does appear in this world without Linux but in a very covert way; you could say it's like reading Linux in another language. And, of course, just for fun, String makes another appearance. - -### Is the series achieving what you hoped? ### - -Yes. We're really happy to see people share and engage with these stories. We hope that it's reaching people who might not otherwise know the story of Linux or understand its pervasiveness in the world today. It's really about surfacing this to a broader audience and giving thanks to the worldwide community of developers and companies that support Linux and all the things it makes possible. - --------------------------------------------------------------------------------- - -via: http://thevarguy.com/open-source-application-software-companies/linux-foundation-explains-world-without-linux-and-open-so - -作者:[Christopher Tozzi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://thevarguy.com/author/christopher-tozzi -[1]:http://linuxfoundation.org/ -[2]:http://www.linuxfoundation.org/world-without-linux -[3]:http://thevarguy.com/open-source-application-software-companies/new-linux-foundation-video-highlights-role-open-source-3d -[4]:http://thevarguy.com/open-source-application-software-companies/100715/would-internet-exist-without-linux-yes-without-open-sourc \ No newline at end of file diff --git a/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md b/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md deleted file mode 100644 index 92705b4b5c..0000000000 --- a/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md +++ /dev/null @@ -1,77 +0,0 @@ -Microsoft and Linux: True Romance or Toxic Love? -================================================================================ -Every now and then, you come across a news story that makes you choke on your coffee or splutter hot latte all over your monitor. Microsoft's recent proclamations of love for Linux is an outstanding example of such a story. - -Common sense says that Microsoft and the FOSS movement should be perpetual enemies. In the eyes of many, Microsoft embodies most of the greedy excesses that the Free Software movement rejects. In addition, Microsoft previously has labeled Linux as a cancer and the FOSS community as a "pack of thieves". - -We can understand why Microsoft has been afraid of a free operating system. When combined with open-source applications that challenge Microsoft's core line, it threatens Microsoft's grip on the desktop/laptop market. - -In spite of Microsoft's fears over its desktop dominance, the Web server marketplace is one arena where Linux has had the greatest impact. Today, the majority of Web servers are Linux boxes. This includes most of the world's busiest sites. The sight of so much unclaimed licensing revenue must be painful indeed for Microsoft. - -Handheld devices are another realm where Microsoft has lost ground to free software. At one point, its Windows CE and Pocket PC operating systems were at the forefront of mobile computing. Windows-powered PDA devices were the shiniest and flashiest gadgets around. But, that all ended when Apple released its iPhone. Since then, Android has stepped into the limelight, with Windows Mobile largely ignored and forgotten. The Android platform is built on free and open-source components. - -The rapid expansion in Android's market share is due to the open nature of the platform. Unlike with iOS, any phone manufacturer can release an Android handset. And, unlike with Windows Mobile, there are no licensing fees. This has been really good news for consumers. It has led to lots of powerful and cheap handsets appearing from manufacturers all over the world. It's a very definite vindication of the value of FOSS software. - -Losing the battle for the Web and mobile computing is a brutal loss for Microsoft. When you consider the size of those two markets combined, the desktop market seems like a stagnant backwater. Nobody likes to lose, especially when money is on the line. And, Microsoft does have a lot to lose. You would expect Microsoft to be bitter about it. And in the past, it has been. - -Microsoft has fought back against Linux and FOSS using every weapon at its disposal, from propaganda to patent threats, and although these attacks have slowed the adoption of Linux, they haven't stopped it. - -So, you can forgive us for being shocked when Microsoft starts handing out t-shirts and badges that say "Microsoft Loves Linux" at open-source conferences and events. Could it be true? Does Microsoft really love Linux? - -Of course, PR slogans and free t-shirts do not equal truth. Actions speak louder than words. And when you consider Microsoft's actions, Microsoft's stance becomes a little more ambiguous. - -On the one hand, Microsoft is recruiting hundreds of Linux developers and sysadmins. It's releasing its .NET Core framework as an open-source project with cross-platform support (so that .NET apps can run on OS X and Linux). And, it is partnering with Linux companies to bring popular distros to its Azure platform. In fact, Microsoft even has gone so far as to create its own Linux distro for its Azure data center. - -On the other hand, Microsoft continues to launch legal attacks on open-source projects directly and through puppet corporations. It's clear that Microsoft hasn't had some big moral change of heart over proprietary vs. free software, so why the public declarations of adoration? - -To state the obvious, Microsoft is a profit-making entity. It's an investment vehicle for its shareholders and a source of income for its employees. Everything it does has a single ultimate goal: revenue. Microsoft doesn't act out of love or even hate (although that's a common accusation). - -So the question shouldn't be "does Microsoft really love Linux?" Instead, we should ask how Microsoft is going to profit from all this. - -Let's take the open-source release of .NET Core. This move makes it easy to port the .NET runtime to any platform. That extends the reach of Microsoft's .NET framework far beyond the Windows platform. - -Opening .NET Core ultimately will make it possible for .NET developers to produce cross-platform apps for OS X, Linux, iOS and even Android--all from a single codebase. - -From a developer's perspective, this makes the .NET framework much more attractive than before. Being able to reach many platforms from a single codebase dramatically increases the potential target market for any app developed using the .NET framework. - -What's more, a strong Open Source community would provide developers with lots of code to reuse in their own projects. So, the availability of open-source projects would make the .NET framework. - -On the plus side, opening .NET Core reduces fragmentation across different platforms and means a wider choice of apps for consumers. That means more choice, both in terms of open-source software and proprietary apps. - -From Microsoft's point of view, it would gain a huge army of developers. Microsoft profits by selling training, certification, technical support, development tools (including Visual Studio) and proprietary extensions. - -The question we should ask ourselves is does this benefit or hurt the Free Software community? - -Widespread adoption of the .NET framework could mean the eventual death of competing open-source projects, forcing us all to dance to Microsoft's tune. - -Moving beyond .NET, Microsoft is drawing a lot of attention to its Linux support on its Azure cloud computing platform. Remember, Azure originally was Windows Azure. That's because Windows Server was the only supported operating system. Today, Azure offers support for a number of Linux distros too. - -There's one reason for this: paying customers who need and want Linux services. If Microsoft didn't offer Linux virtual machines, those customers would do business with someone else. - -It looks like Microsoft is waking up to the fact that Linux is here to stay. Microsoft cannot feasibly wipe it out, so it has to embrace it. - -This brings us back to the question of why there is so much buzz about Microsoft and Linux. We're all talking about it, because Microsoft wants us to think about it. After all, all these stories trace back to Microsoft, whether it's through press releases, blog posts or public announcements at conferences. The company is working hard to draw attention to its Linux expertise. - -What other possible purpose could be behind Chief Architect Kamala Subramaniam's blog post announcing Azure Cloud Switch? ACS is a custom Linux distro that Microsoft uses to automate the configuration of its switch hardware in the Azure data centers. - -ACS is not publicly available. It's intended for internal use in the Azure data center, and it's unlikely that anyone else would be able to find a use for it. In fact, Subramaniam states the same thing herself in her post. - -So, Microsoft won't be making any money from selling ACS, and it won't attract a user base by giving it away. Instead, Microsoft gets to draw attention to Linux and Azure, strengthening its position as a Linux cloud computing platform. - -Is Microsoft's new-found love for Linux good news for the community? - -We shouldn't be slow to forget Microsoft's mantra of Embrace, Extend and Exterminate. Right now, Microsoft is very much in the early stages of embracing Linux. Will Microsoft seek to splinter the community through custom extensions and proprietary "standards"? - -Let us know what you think in the comments below. - --------------------------------------------------------------------------------- - -via: http://www.linuxjournal.com/content/microsoft-and-linux-true-romance-or-toxic-love-0 - -作者:[James Darvell][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxjournal.com/users/james-darvell \ No newline at end of file diff --git a/sources/talk/20151201 Cinnamon 2.8 Review.md b/sources/talk/20151201 Cinnamon 2.8 Review.md deleted file mode 100644 index 0c44eba14f..0000000000 --- a/sources/talk/20151201 Cinnamon 2.8 Review.md +++ /dev/null @@ -1,87 +0,0 @@ -Cinnamon 2.8 Review -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2-8-featured.jpg) - -Other than Gnome and KDE, Cinnamon is another desktop environment that is used by many people. It is made by the same team that produces Linux Mint (and ships with Linux Mint) and can also be installed on several other distributions. The latest version of this DE – Cinnamon 2.8 – was released earlier this month, and it brings a host of bug fixes and improvements as well as some new features. - -I’m going to go over the major improvements made in this release as well as how to update to Cinnamon 2.8 or install it for the first time. - -### Improvements to Applets ### - -There are several improvements to already existing applets for the panel. - -#### Sound Applet #### - -![cinnamon-28-sound-applet](https://www.maketecheasier.com/assets/uploads/2015/11/rsz_cinnamon-28-sound-applet.jpg) - -The Sound applet was revamped and now displays track information as well as the media controls on top of the cover art of the audio file. For music players with seeking support (such as Banshee), a progress bar will be displayed in the same region which you can use to change the position of the audio track. Right-clicking on the applet in the panel will display the options to mute input and output devices. - -#### Power Applet #### - -The Power applet now displays the status of each of the connected batteries and devices using the manufacturer’s data instead of generic names. - -#### Window Thumbnails #### - -![cinnamon-2.8-window-thumbnails](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2.8-window-thumbnails.png) - -Cinnamon 2.8 brings the option to show window thumbnails when hovering over the window list in the panel. You can turn it off if you don’t like it, though. - -#### Workspace Switcher Applet #### - -![cinnamon-2.8-workspace-switcher](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2.8-workspace-switcher.png) - -Adding the Workspace switcher applet to your panel will show you a visual representation of your workspaces with little rectangles embedded inside to show the position of your windows. - -#### System Tray #### - -Cinnamon 2.8 brings support for app indicators in the system tray. You can easily disable this in the settings which will force affected apps to fall back to using status icons instead. - -### Visual Improvements ### - -A host of visual improvements were made in Cinnamon 2.8. The classic and preview Alt + Tab switchers were polished with noticeable improvements, while the Alt + F2 dialog received bug fixes and better auto completion for commands. - -Also, the issue with the traditional animation effect for minimizing windows is now sorted and works with multiple panels. - -### Nemo Improvements ### - -![cinnamon-2.8-nemo](https://www.maketecheasier.com/assets/uploads/2015/11/rsz_cinnamon-28-nemo.jpg) - -The default file manager for Cinnamon also received several bug fixes and has a new “Quick-rename” feature for renaming files and directories. This works by clicking the file or directory twice with a short pause in between to rename the files. - -Nemo also detects issues with thumbnails automatically and prompts you to quickly fix them. - -### Other Notable improvements ### - -- Applets now reload themselves automatically once they are updated. -- Support for multiple monitors was improved significantly. -- Dialog windows have been improved and now attach themselves to their parent windows. -- HiDPI dectection has been improved. -- QT5 applications now look more native and use the default GTK theme. -- Window management and rendering performance has been improved. -- There are various bugfixes. - -### How to Get Cinnamon 2.8 ### - -If you’re running Linux Mint you will get Cinnamon 2.8 as part of the upgrade to Linux Mint 17.3 “Rosa” Cinnamon Edition. The BETA release is already out, so you can grab that if you’d like to get your hands on the new software immediately. - -For Arch users, Cinnamon 2.8 is already in the official Arch repositories, so you can just update your packages and do a system-wide upgrade to get the latest version. - -Finally, for Ubuntu users, you can install or upgrade to Cinnamon 2.8 by running in turn the following commands: - - sudo add-apt-repository -y ppa:moorkai/cinnamon - sudo apt-get update - sudo apt-get install cinnamon - -Have you tried Cinnamon 2.8? What do you think of it? - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/cinnamon-2-8-review/ - -作者:[Ayo Isaiah][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.maketecheasier.com/author/ayoisaiah/ \ No newline at end of file diff --git a/sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md b/sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md deleted file mode 100644 index 5cfbc31ace..0000000000 --- a/sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md +++ /dev/null @@ -1,53 +0,0 @@ -KDE vs GNOME vs XFCE Desktop -================================================================================ -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2013/07/300px-Xfce_logo.svg_.png) - -Over many years, many people spent a long time with Linux desktop using either KDE or GNOME. These two environments have grown through the previous years and each of these desktops continued to expand their current user-base. For example, sleeper desktop environment has been XFCE as XFCE offers more robustness than LXDE that lacks much of XFCE’s polish in the default configuration. The XFCE provides all benefits which users enjoyed in the GNOME 2, but with some lightweight experiences which made it a hit on the older computers. - -### The Desktop Theming ### - -After the user has fresh installation, the XFCE will be a bit boring, which lacks some certain visual attractiveness to it. So, don’t misunderstand my words here, the XFCE is still having nice looking desktop, but it may be like vanilla in users’ eyes as well as most people who are new to the XFCE desktop environment. The good news here is that while installing new theme to the XFCE, it is a reasonably easy process as you can easily find the right XFCE theme which appeals to you, after that, you can extract that theme to the proper directory. From this point, the XFCE comes with an important tool located under the Appearance for helping the user to select the chosen theme easily throughout the Graphical User Interface (GUID). There’re no other tools that might be required here, and if the user follows the above directions, it will be a bit simple for everyone who is caring to have a try. - -On the GNOME desktop, the user should follow the similar above approach. The main key difference for this point is that users have to download and then install GNOME Tweak Tool before proceeding with anything. It does not have any huge barriers under any means, but it is simple valid oversight when the user consider that the XFCE does not require any tweak tool in order for installing and activating the new desktop themes. By being under the GNOME, and especially after installing that Tweak tool which is mentioned above, you will need to go ahead and also to make sure that you have the extension of User Themes installed. - -The same as with the XFCE, the user will want to search for, and then download the theme which most appeals personally to him. Then, user can revisit to the GNOME Tweak tool, and click on the Appearance option on left side of that Tweak tool. Then, the user can simply look at the bottom of the page and click on file browse button to right of the Shell Theme. User then can browse to the zipped folder, and click open. In case if this process was successfully done, the user will see an alert that tell him that it was installed without any problems. From this point, user can simply use the pull down menu in order for selecting the theme he wants to use. The same as with the XFCE, process of theme activation is very easy, however, a need to download the non-included application for using a new theme will leave much to be desired. - -Finally, there is the process of the KDE desktop theming. The same as with XFCE, there is no need at all to install any extra tools for making it work. This is one area where there is a feeling that the XFCE has to make the KDE the winner. Not only the installing themes in the KDE is accomplished entirely within the Graphical User Interface, but it’s also even possible to click on (Get New Themes) button and user will be able to locate, view, and also install the new themes automatically. - -However, it should be noted that the KDE is a bit more robust desktop environment comparing to the XFCE. Therefore, it is a bit reasonable now to see why such extra functionalities could be missing from the desktops which are mainly designed to be minimalist. So, we all have to give the KDE props for such outstanding functionality. - -### MATE is not Lightweight Desktop ### - -Before continuing with the comparison between the XFCE, the GNOME 3 and the KDE, it should be clear for experts that we can’t touch the MATE desktop as an option in the comparison. MATE can be considered as the GNOME 2 desktop’s next incarnation, but it’s not mainly marketed to be a lightweight or fast desktop. But instead of that, its primary goal is to be more traditional and comfortable desktop environment where the users can feel right at their home to use it. - -On the other hand, the XFCE comes with a completely other goal set. The XFCE offers its users a more lightweight and yet still visually appealing desktop experience. Then, for everyone who points out that MATE is a lightweight desktop too, it isn’t really targeting that lightweight desktop crowd. Both options may be dressed up for looking quite attractive with the proper theme installed. - -### The Navigation of Desktop ### - -The XFCE honestly offers an obvious navigation which is out of the box. Anyone who is used to the traditional Windows or the GNOME 2/MATE desktop experience will be going to have the ability to navigate around the new XFCE installation without any kind of help. Straight away, adding the applets to panel is still very obvious. The same as with locating installed applications, just use the launcher and simply click on any desired application. With an exception of LXDE and MATE, there is no other desktop that can make the navigation that simple. What can be even better is that fact which the control panel is very easy to use, that is a really big benefit to everyone who is new to the desktop environment. If the user prefer older methods to use his desktop, then GNOME is not an option. With the hot corners as well as the no minimize button, plus the other application layout method, it’ll take the most newcomers getting easily used to it. - -If the user is coming from, as an example, Windows environment, then he is going to be put off by the inability to add applets to the top of his workspace simply with just a mere right-click. Just instead of this, it can be handled by using extensions. Installing extensions in the GNOME is granted and is a brain-dead easy, based on the easy to use (on/off) toggle switches located on the extensions page of the GNOME. Users have to know, sadly, to actually visit that page to enjoy this functionality. - -On the other side, the GNOME is sharing its desire for providing a straight forward and an easy to use control panel, which many of you may think that it is not be a big deal, but it is really something that I by myself find commendable and worth to be mentioned. The KDE offers its users a bit more traditional desktop experience, throughout familiar launchers as well as the ability for getting to the software in more familiar way if they are coming from Windows desktop. The process of adding widgets or applets to the KDE desktop is an easy matter of just right-clicking on the bottom of the desktop. Only the problem with the KDE’s approach is to be that, as many things KDE, the feature which users are actually looking for are hidden. The KDE users might berate my opinion for this, but I still stand by my statement. - -In order for adding a Widget, just right-click on “my panel”, just to see the panel options, but not as an immediate method to install Widgets. You will not actually see the Add Widgets until you select the Panel Options, then the Add Widgets. This not a big deal to me, but later for some users, it becomes unnecessary tidbit of confusion. To make things here more convoluted, after the users manage to locate Widgets area they discover later a brand new term called “Activities”. It is in the same area as the Widgets, yet it is somehow in its own area as to what it does. - -Now don’t misunderstand me, the Activities feature in the KDE is totally great and actually valued. But to look at it from the usability standpoint, I think that it would be better suited in another menu option in order to not confuse the newbies. User is welcome to differ, but to test this with newbies for some extended periods of time can prove the correct over and over again. The rant against the Activities placement aside, the KDE approach to add new widgets is really great. The same as with the KDE themes, user can’t browse through and install the Widgets automatically via using the provided Graphical User Interface. It is a bit fantastic of functionality, and also it could be celebrated such way. The control panel of the KDE is not as easy as the user might like it to be, yet it is a bit clear that this’s something that they are still working on. - -### So, the XFCE is the best desktop, right? ### - -I, by myself, actually run GNOME, KDE, and XFCE on my computers in my office and home. I also have some older machines with OpenBox and LXDE too. Each desktop experience can offer something that is a bit useful to me and may help me to use each machine as I see that it is fit. For me, I have a soft spot in my heart for the XFCE as it is one of the desktop environments which I stuck with for years. But in this article, I’m just writing it on my daily use computer which is in fact, GNOME. - -The main idea here is that I still feel that the XFCE provides a bit better user experience for users who are looking for stable, traditional, and easy to understand desktop environment. You are also welcome to share with us your opinion in the comments section. - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/kde-vs-gnome-vs-xfce-desktop/ - -作者:[M.el Khamlichi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/pirat9/ \ No newline at end of file diff --git a/sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md b/sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md deleted file mode 100644 index af41c6a5e1..0000000000 --- a/sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md +++ /dev/null @@ -1,123 +0,0 @@ -Ten Biggest Linux Stories Of The Year 2015 -================================================================================ -![Biggest Linux Stories of 2015](http://itsfoss.com/wp-content/uploads/2015/12/Biggest-Linux-Stories-2015.jpg) - -Year 2015 is coming to an end and I am here with Year 2015 special series on It’s FOSS. First in this series is the biggest Linux stories of the year 2015. These stories are the ones that had the most impact on the Linux world, both positive and negative. - -I have summarized ten of such stories which created the most buzz in 2015. Here we go! - -### Biggest Linux and Open Source stories of the year 2015 ### - -Just to add, the listed items are not ordered chronologically. - -#### Microsoft’s partnering with Linux #### - -In late September, everyone was shocked to hear that [Microsoft created its own Linux distribution][1]. It was later revealed that [it was a software][2] developed for its Azur cloud switches. - -But the story did not end up just there. Microsoft indeed partnered with Canonical (parent company of Ubuntu Linux) for [HDInsight][3], Microsoft’s big data Hadoop-on-Azure service. Ubuntu was the first Linux on which [Microsoft deployed this software][4]. - -Will Microsoft continue its affair with Linux? Or will it dump it after Linux has served its purpose (Azur). Only time will tell. - -#### Microsoft releases Visual Studio Code for Linux #### - -Before Microsoft-Linux distribution uproar, Microsoft has dropped another bomb by releasing Visual Studio Code for Linux, along with Windows and OS X versions. Though Visual Studio Code is not open source, releasing a Linux version was somehow a win for Linux users. After all, Linus Torvalds had famously said, “if Microsoft ever does an application for Linux, it means I’ve won”. - -You can follow this tutorial to see [how to install Visual Studio Code in Ubuntu][5]. - -#### Apple open sources Swift programming language #### - -Apple was not behind in showing off its ‘love’ for Linux and Open Source. Apple’s flagship programming language Swift which is used for making iOS apps, [is now open source][6] with Linux ports available. Though in beta, you can easily [install Swift in Ubuntu][7]. - -But Apple is Apple and it [started bragging itself][8] as the “first major computer company to make Open Source development a key part of its software strategy…(sic)”. - -#### Ubuntu Phone finally launched #### - -Ubuntu Phone was finally launched earlier this year. Intended for early adopters and developers, Ubuntu was welcomed with open heart by the Ubuntu community. Mainstream smartphone users are still shying away from it, mainly [because the OS is still under heavy development][9]. Year 2016 will be deciding for the existence of Ubuntu Phone. - -#### Financial crisis hits Jolla #### - -Jolla, the company behind Linux based smartphone operating system Sailfish OS, hit a major financial hurdle. It resulted in [half of Jolla employees being laid off][10]. - -Jolla had a very [successful crowdfunding campaign][11] in 2014 for its tablet. Apparently, they spent most of the budget on the development of Sailfish OS and when the lead investor backed off, company struggled for its survival. - -Good news is that Jolla has managed to get some solid funding and its ]back in business][12]. - -#### Firefox OS is dead #### - -One of the open source alternatives to Android, Mozilla’s mobile operating system Firefox OS died a slow death earlier this month. Intended at developing countries with smartphones as cheap as $25, Firefox OS based smartphones could never gained popularity. I think lack of popular apps and cheap hardware was the main reason. - -In December, [Mozilla announced][13] that it will stop developing Firefox OS and also stop the sale of Firefox smartphones. - -Though it is never announced, I think even [Tizen][14], Linux foundation’s own Linux based mobile OS, is dead as well. I don’t see any development news on Tizen and Linux Foundation never promotes it. It is just the matter of time when we will be invited to the funeral of Tizen. - -#### Infighting in “Ubuntu family” #### - -There were lots of heated discussion in May this year when Kubuntu project lead, [Jonathan Riddell was forced out by Ubuntu Community Council][15]. Jonathan had asked questions about how the donations received by Ubuntu is being spent. He had complained that Kubuntu never saw the money. - -This led to an exchange of accusation between both sides. Ultimately, big daddy of Ubuntu, [Mark Shuttleworth asked Jonathan to step down][16]. - -#### Female Linux Kernel developer quits citing ‘brutal communication style’ #### - -Linux creator Linux Torvalds is known for the use of abusive language. Linux Kernel dev [Sarah Sharp][17] is also known for being out spoken. - -Sarah Sharp had earlier locked horns with Linus Torvalds in 2013 when she publicly [advised Linus to keep “verbal violence” off the mailing list][18]. Linus did not take it [lightly][19] as well. - -That was in 2013. In 2015, Sarah announced that she is [stepping down from her work in Kernel community][20] because the communication style lacks basic decency and is brutal and profane. - -This move left people discussing if Linux Kernel community should really change the way they behave or if Sarah took things too far. - -#### Unity gaming editor ported to Linux #### - -While [gaming on Linux][21] is still the Achilles heel for Linux users, the community got excited when gaming engine Unity announced that it is testing its [game editor on Linux][22]. As Linux is used very well for rendering, it is speculated that this move will bring game developers to Linux. It is not confirmed yet if Unity will actually bring a final Linux version of its game editor though. - -#### Open Source adoption in government organization #### - -Administration in several [European cities decided to ditch proprity software][23] and opt for open source alternatives. Most city administration replaced Microsoft Office with LibreOffice or OpenOffice. Few cities and [government][24] schools also went ahead and replaced Microsoft Windows with Linux. - -Cost cutting was one of the major factor in this decision as the city administration saved hundreds of thousands of Euro by adopting Open Source. - -Universities were not far behind in adopting open source as well. All year round, we get to hear how a [university dropped Photoshop for Krita][25] or [university using open source office][26]. - -### Conclusion ### - -As with any other year, 2015 also had some positive and some negative moments for Linux lovers. We saw competitors like Microsoft and Apple coming close to Linux, government organizations adopting to open source. At the same time, we witnessed the failure of Firefox smartphone OS. A mixed year, I would say. - -What do you think? I let you share what you think was the most important news for Linux-ers in the year 2015 and your overall feel about it. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/biggest-linux-stories-2015/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://www.theregister.co.uk/2015/09/18/microsoft_has_developed_its_own_linux_repeat_microsoft_has_developed_its_own_linux/ -[2]:http://arstechnica.com/information-technology/2015/09/microsoft-has-built-software-but-not-a-linux-distribution-for-its-software-switches/ -[3]:https://azure.microsoft.com/en-us/services/hdinsight/ -[4]:http://www.zdnet.com/article/microsoft-deploys-first-major-server-application-on-ubuntu-linux/ -[5]:http://itsfoss.com/install-visual-studio-code-ubuntu/ -[6]:http://itsfoss.com/swift-open-source-linux/ -[7]:http://itsfoss.com/use-swift-linux/ -[8]:https://business.facebook.com/itsfoss/photos/pb.115098615297581.-2207520000.1450817108./634288916711879/?type=3&theater -[9]:http://www.engadget.com/2015/07/24/ubuntu-phone-review/ -[10]:http://techcrunch.com/2015/11/20/jolla-running-out-of-runway-for-its-android-alternative/ -[11]:https://www.indiegogo.com/projects/jolla-tablet-world-s-first-crowdsourced-tablet#/ -[12]:https://blog.jolla.com/jolla-back-business/ -[13]:http://arstechnica.com/gadgets/2015/12/firefox-os-smartphones-are-dead/ -[14]:https://www.tizen.org/ -[15]:http://www.omgubuntu.co.uk/2015/05/kubuntu-project-lead-asked-to-step-down-by-ubuntu-community-council -[16]:http://www.cio.com/article/2926838/linux/mark-shuttleworth-ubuntu-community-council-ask-kubuntu-developer-to-step-down-as-leader.html -[17]:http://sarah.thesharps.us/ -[18]:http://www.techeye.net/chips/linus-torvalds-and-intel-woman-in-sweary-spat -[19]:http://marc.info/?l=linux-kernel&m=137392506516022&w=2 -[20]:http://www.networkworld.com/article/2988850/opensource-subnet/linux-kernel-dev-sarah-sharp-quits-citing-brutal-communications-style.html -[21]:http://itsfoss.com/linux-gaming-guide/ -[22]:http://itsfoss.com/unity-gaming-engine-linux/ -[23]:http://itsfoss.com/tag/open-source-adoption/ -[24]:http://itsfoss.com/spanish-school-ditches-windows-ubuntu/ -[25]:http://itsfoss.com/french-university-dumps-adobe-photoshop-open-source-app-krita/ -[26]:http://itsfoss.com/hungarian-universities-switch-eurooffice/ diff --git a/sources/talk/20151223 What' s the Best File System for My Linux Install.md b/sources/talk/20151223 What' s the Best File System for My Linux Install.md deleted file mode 100644 index 1e8af12179..0000000000 --- a/sources/talk/20151223 What' s the Best File System for My Linux Install.md +++ /dev/null @@ -1,96 +0,0 @@ -What’s the Best File System for My Linux Install? -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-feature-image.jpg) - -File systems: they’re not the most exciting things in the world, but important nonetheless. In this article we’ll go over the popular choices for file systems on Linux – what they’re about, what they can do, and who they’re for. - -### Ext4 ### - -![file-systems-ext4](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-ext4.png) - -If you’ve ever installed Linux before, chances are you’ve seen the “Ext4” during installation. There’s a good reason for that: it’s the file system of choice for just about every Linux distribution available right now. Sure, there are some that choose other options, but there’s no denying that Extended 4 is the file system of choice for almost all Linux users. - -#### What can it do? #### - -Extended 4 has all of the goodness that you’ve come to expect from past file system iterations (Ext2/Ext3) but with enhancements. There’s a lot to dig into, but here are the best parts of what Ext4 can do for you: - -- file system journaling -- journal checksums -- multi-block file allocation -- backwards compatibility support for Extended 2 and 3 -- persistent pre-allocation of free space -- improved file system checking (over previous versions) -- and of course, support for larger files - -#### Who is it for? #### - -Extended 4 is for those looking for a super-stable foundation to build upon, or for those looking for something that just works. This file system won’t snapshot your system; it doesn’t even have the greatest SSD support, but If your needs aren’t too extravagant, you’ll get along with it just fine. - -### BtrFS ### - -![file-systems-btrFS](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-btrFS-e1450065697580.png) - -The B-tree file system (also known as butterFS) is a file system for Linux developed by Oracle. It’s a new file system and is in heavy development stages. The Linux community considers it unstable to use for some. The core principle of BtrFS is based around the principle of copy-on-write. **Copy on write** basically means that the system has one single copy of a bit of data before the data has been written. When the data has been written, a copy of it is made. - -#### What can it do? #### - -Besides supporting copy-on-write, BtrFS can do many other things – so many things, in fact, that it’d take forever to list everything. Here are the most notable features: The file system supports read-only snapshots, file cloning, subvolumes, transparent compression, offline file system check, in-place conversion from ext3 and 4 to Btrfs, online defragmentation, anew has support for RAID 0, RAID 1, RAID 5, RAID 6 and RAID 10. - -#### Who is it for? #### - -The developers of BtrFS have promised that this file system is the next-gen replacement for other file systems out there. That much is true, though it certainly is a work in progress. There are many killer features for advanced users and basic users alike (including great performance on SSDs). This file system is for those looking to get a little bit more out of their file system and who want to try the copy-on-write way of doing things. - -### XFS ### - -![file-systems-xfs](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-xfs.jpg) - -Developed and created by Silicon Graphics, XFS is a high-end file system that specializes in speed and performance. XFS does extremely well when it comes to parallel input and output because of its focus on performance. The XFS file system can handle massive amounts of data, so much in fact that some users of XFS have close to 300+ terabytes of data. - -#### What can it do? #### - -XFS is a well-tested data storage file system created for high performance operations. Its features include: - -- striped allocation of RAID arrays -- file system journaling -- variable block sizes -- direct I/O -- guaranteed-rate I/O -- snapshots -- online defragmentation -- online resizing - -#### Who is it for? #### - -XFS is for those looking for a rock-solid file solution. The file system has been around since 1993 and has only gotten better and better with time. If you have a home server and you’re perplexed on where you should go with storage, consider XFS. A lot of the features the file system comes with (like snapshots) could aid in your file storage system. It’s not just for servers, though. If you’re a more advanced user and you’re interested in a lot of what was promised in BtrFS, check out XFS. It does a lot of the same stuff and doesn’t have stability issues. - -### Reiser4 ### - -![file-system-riser4](https://www.maketecheasier.com/assets/uploads/2015/05/file-system-riser4.gif) - -Reiser4, the successor to ReiserFS, is a file system created and developed by Namesys. The creation of Reiser4 was backed by the Linspire project as well as DARPA. What makes Reiser4 special is its multitude of transaction models. There isn’t one single way data can be written; instead, there are many. - -#### What can it do? #### - -Reiser4 has the unique ability to use different transaction models. It can use the copy-on-write model (like BtrFS), write-anywhere, journaling, and the hybrid transaction model. It has a lot of improvements upon ReiserFS, including better file system journaling via wandering logs, better support for smaller files, and faster handling of directories. Reiser4 has a lot to offer. There are a lot more features to talk about, but suffice it to say it’s a huge improvement over ReiserFS with tons of added features. - -#### Who is it for? #### - -Resier4 is for those looking to stretch one file system across multiple use-cases. Maybe you want to set up one machine with copy-on-write, another with write-anywhere, and another with hybrid transaction, and you don’t want to use different types of file systems to accomplish this task. Reiser4 is perfect for this type of use-case. - -### Conclusion ### - -There are many file systems available on Linux. Each serves a unique purpose for unique users looking to solve different problems.This post focuses on the most popular choices for the platform. There is no doubt there are other choices out there for other use-cases. - -What’s your favorite file system to use on Linux? Tell us why below! - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/best-file-system-linux/ - -作者:[Derrik Diener][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.maketecheasier.com/author/derrikdiener/ diff --git a/sources/talk/20151227 Upheaval in the Debian Live project.md b/sources/talk/20151227 Upheaval in the Debian Live project.md new file mode 100644 index 0000000000..d663d09b17 --- /dev/null +++ b/sources/talk/20151227 Upheaval in the Debian Live project.md @@ -0,0 +1,66 @@ +While the event had a certain amount of drama surrounding it, the [announcement][1] of the end for the [Debian Live project][2] seems likely to have less of an impact than it first appeared. The loss of the lead developer will certainly be felt—and the treatment he and the project received seems rather baffling—but the project looks like it will continue in some form. So Debian will still have tools to create live CDs and other media going forward, but what appears to be a long-simmering dispute between project founder and leader Daniel Baumann and the Debian CD and installer teams has been "resolved", albeit in an unfortunate fashion. + +The November 9 announcement from Baumann was titled "An abrupt End to Debian Live". In that message, he pointed to a number of different events over the nearly ten years since the [project was founded][3] that indicated to him that his efforts on Debian Live were not being valued, at least by some. The final straw, it seems, was an "intent to package" (ITP) bug [filed][4] by Iain R. Learmonth that impinged on the namespace used by Debian Live. + +Given that one of the main Debian Live packages is called "live-build", the new package's name, "live-build-ng", was fairly confrontational in and of itself. Live-build-ng is meant to be a wrapper around the [vmdebootstrap][5] tool for creating live media (CDs and USB sticks), which is precisely the role Debian Live is filling. But when Baumann [asked][6] Learmonth to choose a different name for his package, he got an "interesting" [reply][7]: + +``` +It is worth noting that live-build is not a Debian project, it is an external project that claims to be an official Debian project. This is something that needs to be fixed. +There is no namespace issue, we are building on the existing live-config and live-boot packages that are maintained and bringing these into Debian as native projects. If necessary, these will be forks, but I'm hoping that won't have to happen and that we can integrate these packages into Debian and continue development in a collaborative manner. +live-build has been deprecated by debian-cd, and live-build-ng is replacing it. In a purely Debian context at least, live-build is deprecated. live-build-ng is being developed in collaboration with debian-cd and D-I [Debian Installer]. +``` + +Whether or not Debian Live is an "official" Debian project (or even what "official" means in this context) has been disputed in the thread. Beyond that, though, Neil Williams (who is the maintainer of vmdebootstrap) [provided some][8] explanation for the switch away from Debian Live: + +``` +vmdebootstrap is being extended explicitly to provide support for a replacement for live-build. This work is happening within the debian-cd team to be able to solve the existing problems with live-build. These problems include reliability issues, lack of multiple architecture support and lack of UEFI support. vmdebootstrap has all of these, we do use support from live-boot and live-config as these are out of the scope for vmdebootstrap. +``` + +Those seem like legitimate complaints, but ones that could have been fixed within the existing project. Instead, though, something of a stealth project was evidently undertaken to replace live-build. As Baumann [pointed out][9], nothing was posted to the debian-live mailing list about the plans. The ITP was the first notice that anyone from the Debian Live project got about the plans, so it all looks like a "secret plan"—something that doesn't sit well in a project like Debian. + +As might be guessed, there were multiple postings that supported Baumann's request to rename "live-build-ng", followed by many that expressed dismay at his decision to stop working on Debian Live. But Learmonth and Williams were adamant that replacing live-build is needed. Learmonth did [rename][10] live-build-ng to a perhaps less confrontational name: live-wrapper. He noted that his aim had been to add the new tool to the Debian Live project (and "bring the Debian Live project into Debian"), but things did not play out that way. + +``` +I apologise to everyone that has been upset by the ITP bug. The software is not yet ready for use as a full replacement for live-build, and it was filed to let people know that the work was ongoing and to collect feedback. This sort of worked, but the feedback wasn't the kind I was looking for. +``` + +The backlash could perhaps have been foreseen. Communication is a key aspect of free-software communities, so a plan to replace the guts of a project seems likely to be controversial—more so if it is kept under wraps. For his part, Baumann has certainly not been perfect—he delayed the "wheezy" release by [uploading an unsuitable syslinux package][11] and [dropped down][12] from a Debian Developer to a Debian Maintainer shortly thereafter—but that doesn't mean he deserves this kind of treatment. There are others involved in the project as well, of course, so it is not just Baumann who is affected. + +One of those other people is Ben Armstrong, who has been something of a diplomat during the event and has tried to smooth the waters. He started with a [post][13] that celebrated the project and what Baumann and the team had accomplished over the years. As he noted, the [list of downstream projects][14] for Debian Live is quite impressive. In another post, he also [pointed out][15] that the project is not dead: + +``` +If the Debian CD team succeeds in their efforts and produces a replacement that is viable, reliable, well-tested, and a suitable candidate to replace live-build, this can only be good for Debian. If they are doing their job, they will not "[replace live-build with] an officially improved, unreliable, little-tested alternative". I've seen no evidence so far that they operate that way. And in the meantime, live-build remains in the archive -- there is no hurry to remove it, so long as it remains in good shape, and there is not yet an improved successor to replace it. +``` + +On November 24, Armstrong also [posted][16] an update (and to [his blog][17]) on Debian Live. It shows some good progress made in the two weeks since Baumann's exit; there are even signs of collaboration between the project and the live-wrapper developers. There is also a [to-do list][18], as well as the inevitable call for more help. That gives reason to believe that all of the drama surrounding the project was just a glitch—avoidable, perhaps, but not quite as dire as it might have seemed. + + +--------------------------------- + +via: https://lwn.net/Articles/665839/ + +作者:Jake Edge +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + + +[1]: https://lwn.net/Articles/666127/ +[2]: http://live.debian.net/ +[3]: https://www.debian.org/News/weekly/2006/08/ +[4]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804315 +[5]: http://liw.fi/vmdebootstrap/ +[6]: https://lwn.net/Articles/666173/ +[7]: https://lwn.net/Articles/666176/ +[8]: https://lwn.net/Articles/666181/ +[9]: https://lwn.net/Articles/666208/ +[10]: https://lwn.net/Articles/666321/ +[11]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699808 +[12]: https://nm.debian.org/public/process/14450 +[13]: https://lwn.net/Articles/666336/ +[14]: http://live.debian.net/project/downstream/ +[15]: https://lwn.net/Articles/666338/ +[16]: https://lwn.net/Articles/666340/ +[17]: http://syn.theti.ca/2015/11/24/debian-live-after-debian-live/ +[18]: https://wiki.debian.org/DebianLive/TODO diff --git a/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md b/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md index c1aa541416..cefad8cc6b 100644 --- a/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md +++ b/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md @@ -93,4 +93,4 @@ via: https://opensource.com/education/15/12/5-great-raspberry-pi-projects-classr [11]:https://www.piborg.org/4borg [12]:https://www.piborg.org/diddyborg [13]:https://www.piborg.org/doodleborg -[14]:http://camjam.me/?page_id=1035#worksheets \ No newline at end of file +[14]:http://camjam.me/?page_id=1035#worksheets diff --git a/sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md b/sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md deleted file mode 100644 index 969e0637b5..0000000000 --- a/sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md +++ /dev/null @@ -1,94 +0,0 @@ -6 creative ways to use ownCloud -================================================================================ -![Yearbook cover 2015](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/osdc-open-source-yearbook-lead1-inc0335020sw-201511-01.png) - -Image by : Opensource.com - -[ownCloud][1] is a self-hosted open source file sync and share server. Like "big boys" Dropbox, Google Drive, Box, and others, ownCloud lets you access your files, calendar, contacts, and other data. You can synchronize everything (or part of it) between your devices and share files with others. But ownCloud can do much more than its proprietary, [hosted-on-somebody-else's-computer competitors][2]. - -Let's look at six creative things ownCloud can do. Some of these are possible because ownCloud is open source, whereas others are just unique features it offers. - -### 1. A scalable ownCloud Pi cluster ### - -Because ownCloud is open source, you can choose between self-hosting on your own server or renting space from a provider you trust—no need to put your files at a big company that stores it who knows where. [Find some ownCloud providers here][3] or grab packages or a virtual machine for [your own server here][4]. - -![](https://opensource.com/sites/default/files/images/life-uploads/banana-pi-owncloud-cluster.jpg) - -Photo by Jörn Friedrich Dreyer. [CC BY-SA 4.0.][5] - -The most creative things we've seen are a [Banana Pi cluster][6] and a [Raspberry Pi cluster][7]. Although ownCloud's scalability is often used to deploy to hundreds of thousands of users, some folks out there take it in a different direction, bringing multiple tiny systems together to make a super-fast ownCloud. Kudos! - -### 2. Keep your passwords synced ### - -To make ownCloud easier to extend, we have made it extremely modular and have an [ownCloud app store][8]. There you can find things like music and video players, calendars, contacts, productivity apps, games, a sketching app, and much more. - -Picking only one app from the almost 200 available is hard, but managing passwords is certainly a unique feature. There are no less than three apps providing this functionality: [Passwords][9], [Secure Container][10], and [Passman][11]. - -![](https://opensource.com/sites/default/files/images/life-uploads/password.png) - -### 3. Store your files where you want ### - -External storage allows you to hook your existing data storage into ownCloud, letting you to access files stored on FTP, WebDAV, Amazon S3, and even Dropbox and Google Drive through one interface. - -注:youtube 视频 - - -The "big boys" like to create their own little walled gardens—Box user can only collaborate with other Box users; and if you want to share your files from Google Drive, your mate needs a Google account or they can't do much. With ownCloud's external storage, you can break these barriers. - -A very creative solution is adding Google Drive and Dropbox as external storage. You can work with files on both seamlessly and share them with others through a simple link—no account needed to work with you! - -### 4. Get files uploaded ### - -Because ownCloud is open source, people contribute interesting features without being limited by corporate requirements. Our contributors have always cared about security and privacy, so ownCloud introduced features such as protecting a public link with a password and setting an expire date [years before anybody else did][12]. - -Today, ownCloud has the ability to configure a shared link as read-write, which means visitors can seamlessly edit the files you share with them (protected with a password or not) or upload new files to your server without being forced to sign up to another web service that wants their private data. - -注:youtube 视频 - - -This is great for when people want to share a large file with you. Rather than having to upload it to a third-party site, send you a link, and make you go there and download it (often requiring a login), they can just upload it to a shared folder you provide, and you can get to work right away. - -### 5. Get free secure storage ### - -We already talked about how many of our contributors care about security and privacy. That's why ownCloud has an app that can encrypt and decrypt stored data. - -Using ownCloud to store your files on Dropbox or Google Drive defeats the whole idea of retaking control of your data and keeping it private. The Encryption app changes that. By encrypting data before sending it to these providers and decrypting it upon retrieval, your data is safe as kittens. - -### 6. Share your files and stay in control ### - -As an open source project, ownCloud has no stake in building walled gardens. Enter Federated Cloud Sharing: a protocol [developed and published by ownCloud][13] that enables different file sync and share servers to talk to one another and exchange files securely. Federated Cloud Sharing has an interesting history. [Twenty-two German universities][14] decided to build a huge cloud for their 500,000 students. But as each university wanted to stay in control of the data of their own students, a creative solution was needed: Federated Cloud Sharing. The solution now connects all these universities so the students can seamlessly work together. At the same time, the system administrators at each university stay in control of the files their students have created and can apply policies, such as storage restrictions, or limitations on what, with whom, and how files can be shared. - -注:youtube 视频 - - -And this awesome technology isn't limited to German universities: Every ownCloud user can find their [Federated Cloud ID][15] in their user settings and share it with others. - -So there you have it. Six ways ownCloud enables people to do special and unique things, all made possible because it is open source and designed to help you liberate your data. - - --------------------------------------------------------------------------------- - -via: https://opensource.com/life/15/12/6-creative-ways-use-owncloud - -作者:[Jos Poortvliet][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/jospoortvliet -[1]:https://owncloud.com/ -[2]:https://blogs.fsfe.org/mk/new-stickers-and-leaflets-no-cloud-and-e-mail-self-defense/ -[3]:https://owncloud.org/providers -[4]:https://owncloud.org/install/#instructions-server -[5]:https://creativecommons.org/licenses/by-sa/4.0/ -[6]:http://www.owncluster.de/ -[7]:https://christopherjcoleman.wordpress.com/2013/01/05/host-your-owncloud-on-a-raspberry-pi-cluster/ -[8]:https://apps.owncloud.com/ -[9]:https://apps.owncloud.com/content/show.php/Passwords?content=170480 -[10]:https://apps.owncloud.com/content/show.php/Secure+Container?content=167268 -[11]:https://apps.owncloud.com/content/show.php/Passman?content=166285 -[12]:https://owncloud.com/owncloud45-community/ -[13]:http://karlitschek.de/2015/08/announcing-the-draft-federated-cloud-sharing-api/ -[14]:https://owncloud.com/customer/sciebo/ -[15]:https://owncloud.org/federation/ \ No newline at end of file diff --git a/sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md b/sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md deleted file mode 100644 index a2c1e393ff..0000000000 --- a/sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md +++ /dev/null @@ -1,79 +0,0 @@ -6 useful LibreOffice extensions -================================================================================ -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-2.png) - -Image by : Opensource.com - -LibreOffice is the best free office suite around, and as such has been adopted by all major Linux distributions. Although LibreOffice is already packed with features, it can be extended by using specific add-ons, called extensions. - -The main LibreOffice extensions website is [extensions.libreoffice.org][1]. Extensions are tools that can be added or removed independently from the main installation, and may add new functionality or make existing functionality easier to use. - -### 1. MultiFormatSave ### - -MultiFormatSave lets users save a document in the OpenDocument, Microsoft Office (old and new), and/or PDF formats simultaneously, according to user settings. This extension is extremely useful during the migration from Microsoft Office document formats to the [Open Document Format][2] standard, because it offers the option to save in both flavors: ODF for interoperability, and Microsoft Office for compatibility with all users sticking to legacy formats. This makes the migration process softer, and easier to administer. - -**[Download MultiFormatSave][3]** - -![Multiformatsave extension](https://opensource.com/sites/default/files/images/business-uploads/multiformatsave.png) - -### 2. Alternative dialog Find & Replace for Writer (AltSearch) ### - -This extension adds many new features to Writer's find & replace function: searched or replaced text can contain one or more paragraphs; multiple search and replacement in one step; searching: Bookmarks, Notes, Text fields, Cross-references and Reference marks to their content, name or mark and their inserting; searching and inserting Footnote and Endnote; searching object of Table, Pictures and Text frames according to their name; searching out manual page and column break and their set up or deactivation; and searching similarly formatted text, according to cursor point. It is also possible to save and load search and replacement parameters, and execute the batch on several opened documents at the same time. - -**[Download Alternative dialog Find & Replace for Writer (AltSearch)][4]** - -![Alternative Find&amp;Replace add-on](https://opensource.com/sites/default/files/images/business-uploads/alternativefindreplace.png) - -### 3. Pepito Cleaner ### - -Pepito Cleaner is an extension of LibreOffice created to quickly resolve the most common formatting mistakes of old scans, PDF imports, and every digital text file. By clicking the Pepito Cleaner icon on the LibreOffice toolbar, users will open a window that will analyze the document and show the results broken down by category. This is extremely useful when converting PDF documents to ODF, as it cleans all the cruft left in place by the automatic process. - -**[Download Pepito Cleaner][5]** - -![Pepito cleaner screenshot](https://opensource.com/sites/default/files/images/business-uploads/pepitocleaner.png) - -### 4. ImpressRunner ### - -Impress Runner is a simple extension that transforms an [Impress][6] presentation into an auto-running file. The extension adds two icons, to set and remove the autostart function, which can also be added manually by editing the File | Properties | Custom Properties menu, and adding the term autostart in one of the first four text fields. This extension is especially useful for booths at conferences and events, where the slides are supposed to run unattended. - -**[Download ImpressRunner][7]** - -### 5. Export as Images ### - -The Export as Images extension adds a File menu entry export as Images... in Impress and [Draw][8], to export all slides or pages as images in JPG, PNG, GIF, BMP, and TIFF format, and allows users to choose a file name for exported images, the image size, and other parameters. - -**[Download Export as Images][9]** - -![Export as images extension](https://opensource.com/sites/default/files/images/business-uploads/exportasimages.png) - -### 6. Anaphraseus ### - -Anaphraseus is a CAT (Computer-Aided Translation) tool for creating, managing, and using bilingual Translation Memories. Anaphraseus is a LibreOffice macro set available as an extension or a standalone document. Originally, Anaphraseus was developed to work with the Wordfast format, but it can also export and import files in TMX format. Anaphraseus main features are: text segmentation, fuzzy search in Translation Memory, terminology recognition, and TMX Export/Import (OmegaT translation memory format). - -**[Download Anaphraseus][10]** - -![Anaphraseus screenshot](https://opensource.com/sites/default/files/images/business-uploads/anaphraseus.png) - -Do you have a favorite LibreOffice extension to recommend? Let us know about it in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/business/15/12/6-useful-libreoffice-extensions - -作者:[Italo Vignoli][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/italovignoli -[1]:http://extensions.libreoffice.org/ -[2]:http://www.opendocumentformat.org/ -[3]:http://extensions.libreoffice.org/extension-center/multisave-1 -[4]:http://extensions.libreoffice.org/extension-center/alternative-dialog-find-replace-for-writer -[5]:http://pepitoweb.altervista.org/pepito_cleaner/index.php -[6]:https://www.libreoffice.org/discover/impress/ -[7]:http://extensions.libreoffice.org/extension-center/impressrunner -[8]:https://www.libreoffice.org/discover/draw/ -[9]:http://extensions.libreoffice.org/extension-center/export-as-images -[10]:http://anaphraseus.sourceforge.net/ \ No newline at end of file diff --git a/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md b/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md deleted file mode 100644 index 86c20aeb6f..0000000000 --- a/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md +++ /dev/null @@ -1,80 +0,0 @@ -Sonofelice Translating -Top 5 open source community metrics to track -================================================================================ -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-1.png) - -So you decided to use metrics to track your free, open source software (FOSS) community. Now comes the big question: Which metrics should I be tracking? - -To answer this question, you must have an idea of what information you need. For example, you may want to know about the sustainability of the project community. How quickly does the community react to problems? How is the community attracting, retaining, or losing contributors? Once you decide which information you need, you can figure out which traces of community activity are available to provide it. Fortunately, FOSS projects following an open development model tend to leave loads of public data in their software development repositories, which can be analyzed to gather useful data. - -In this article, I'll introduce metrics that help provide a multi-faceted view of your project community. - -### 1. Activity ### - -The overall activity of the community and how it evolves over time is a useful metric for all open source communities. Activity provides a first view of how much the community is doing, and can be used to track different kinds of activity. For example, the number of commits gives a first idea about the volume of the development effort. The number of tickets opened provides insight into how many bugs are reported or new features are proposed. The number of messages in mailing lists or posts in forums gives an idea of how much discussion is being held in public. - -![Activity metrics chart](https://opensource.com/sites/default/files/images/business-uploads/activity-metrics.png) - -Number of commits and number of merged changes after code review in the OpenStack project, as found in the [OpenStack Activity Dashboard][1]. Evolution over time (weekly data). - -### 2. Size ### - -The size of the community is the number of people participating in it, but, depending on the kind of participation, size numbers may vary. Usually you're interested in active contributors, which is good news. Active people may leave traces in the repositories of the project, which means you can count contributors who are active in producing code by looking at the **Author** field in git repositories, or count people participating in the resolution of tickets by looking at who is contributing to them. - -This basic idea of activity" (somebody did something) can be extended in many ways. One common way to track activity is to look at how many people did a sizable chunk of the activity. Generally most of a project's code contributions, for example, are from a small fraction of the people in the project's community. Knowing about that fraction helps provide an idea of the core group (i.e., the people who help lead the community). - -![Size metrics chart](https://opensource.com/sites/default/files/images/business-uploads/size-metrics.png) - -Number of authors and number of posters in mailing lists in the Xen project, as found in the [Xen Project Development Dashboard][2]. Evolution over time (monthly data). - -### 3. Performance ### - -So far, I have focused on measuring quantities of activities and contributors. You also can analyze how processes and people are performing. For example, you can measure how long processes take to finish. Time to resolve or close tickets shows how the project is reacting to new information that requires action, such as fixing a reported bug or implementing a requested new feature. Time spent in code review—from the moment when a change to the code is proposed to the moment it is accepted—shows how long upgrading a proposed change to the quality standards expected by the community takes. - -Other metrics deal with how well the project is coping with pending work, such as the ratio of new to closed tickets, or the backlog of still non-completed code reviews. Those parameters tell us, for example, whether or not the resources put into solving issues is enough. - -![Efficiency metrics chart](https://opensource.com/sites/default/files/images/business-uploads/efficiency-metrics.png) - -Ratio of tickets closed by tickets opened, and ratio of change proposals accepted or abandoned by new change proposals per quarter. OpenStack project, as shown in the [OpenStack Development Report, 2015-Q3][3] (PDF). - -### 4. Demographics ### - -Communities change as contributors move in and out. Depending on how people enter and leave a community over time, the age (time since members joined the community) of the community varies. The [community aging chart][4] nicely illustrates these exchanges over time. The chart is structured as a set of horizontal bars, two per "generation" of people joining the community. For each generation, the attracted bar shows how many new people joined the community during the corresponding period of time. The retained bar shows how many people are still active in the community. - -The relationship between the two bars for each generation is the retention rate: the fraction of people of that generation who are still in the project. The complete set of attracted bars show how attractive the project was in the past. And the complete set of the retention bars shows the current age structure of the community. - -![Demographics metrics chart](https://opensource.com/sites/default/files/images/business-uploads/demography-metrics.png) - -Community aging chart for the Eclipse community, as shown in the [Eclipse Development Dashboard][5]. Generations are defined every six months. - -### 5. Diversity ### - -Diversity is an important factor in the resiliency of communities. In general, the more diverse communities are—in terms of people or organizations participating—the more resilient they are. For example, when a company decides to leave a FOSS community, the potential problems the departure may cause are much smaller if its employees were contributing 5% of the work rather than 85%. - -The [Pony Factor][6], a term defined by [Daniel Gruno][7] for the minimum number of developers performing 50% of the commits. Based on the Pony Factor, the Elephant Factor is the minimum number of companies whose employees perform 50% of the commits. Both numbers provide an indication of how many people or companies the community depends on. - -![Diversity metrics chart](https://opensource.com/sites/default/files/images/business-uploads/diversity-metrics.png) - -Pony and Elephant Factor for several FOSS projects in the area of cloud computing, as presented in [The quantitative state of the open cloud 2015][8] (slides). - -There are many other metrics to help measure a community. When determing which metrics to collect, think about the goals of your community, and which metrics will help you reach them. - --------------------------------------------------------------------------------- - -via: https://opensource.com/business/15/12/top-5-open-source-community-metrics-track - -作者:[Jesus M. Gonzalez-Barahona][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/jgbarah -[1]:http://activity.openstack.org/ -[2]:http://projects.bitergia.com/xen-project-dashboard/ -[3]:http://activity.openstack.org/dash/reports/2015-q3/pdf/2015-q3_OpenStack_report.pdf -[4]:http://radar.oreilly.com/2014/10/measure-your-open-source-communitys-age-to-keep-it-healthy.html -[5]:http://dashboard.eclipse.org/demographics.html -[6]:https://ke4qqq.wordpress.com/2015/02/08/pony-factor-math/ -[7]:https://twitter.com/humbedooh -[8]:https://speakerdeck.com/jgbarah/the-quantitative-state-of-the-open-cloud-2015-edition \ No newline at end of file diff --git a/sources/tech/20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md b/sources/tech/20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md index 7a56750804..6624a3c590 100644 --- a/sources/tech/20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md +++ b/sources/tech/20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md @@ -1,4 +1,3 @@ -translated by iov-wang How to Install OsTicket Ticketing System in Fedora 22 / Centos 7 ================================================================================ In this article, we'll learn how to setup help desk ticketing system with osTicket in our machine or server running Fedora 22 or CentOS 7 as operating system. osTicket is a free and open source popular customer support ticketing system developed and maintained by [Enhancesoft][1] and its contributors. osTicket is the best solution for help and support ticketing system and management for better communication and support assistance with clients and customers. It has the ability to easily integrate with inquiries created via email, phone and web based forms into a beautiful multi-user web interface. osTicket makes us easy to manage, organize and log all our support requests and responses in one single place. It is a simple, lightweight, reliable, open source, web-based and easy to setup and use help desk ticketing system. diff --git a/sources/tech/20150906 How to Configure OpenNMS on CentOS 7.x.md b/sources/tech/20150906 How to Configure OpenNMS on CentOS 7.x.md index aca2b04bba..f209c8e45c 100644 --- a/sources/tech/20150906 How to Configure OpenNMS on CentOS 7.x.md +++ b/sources/tech/20150906 How to Configure OpenNMS on CentOS 7.x.md @@ -1,4 +1,3 @@ -translated by ivo-wang How to Configure OpenNMS on CentOS 7.x ================================================================================ Systems management and monitoring services are very important that provides information to view important systems management information that allow us to to make decisions based on this information. To make sure the network is running at its best and to minimize the network downtime we need to improve application performance. So, in this article we will make you understand the step by step procedure to setup OpenNMS in your IT infrastructure. OpenNMS is a free open source enterprise level network monitoring and management platform that provides information to allow us to make decisions in regards to future network and capacity planning. diff --git a/sources/tech/20150906 How to install Suricata intrusion detection system on Linux.md b/sources/tech/20150906 How to install Suricata intrusion detection system on Linux.md deleted file mode 100644 index 736a6577de..0000000000 --- a/sources/tech/20150906 How to install Suricata intrusion detection system on Linux.md +++ /dev/null @@ -1,198 +0,0 @@ -translated by ivo-wang -How to install Suricata intrusion detection system on Linux -================================================================================ -With incessant security threats, intrusion detection system (IDS) has become one of the most critical requirements in today's data center environments. However, as more and more servers upgrade their NICs to 10GB/40GB Ethernet, it is increasingly difficult to implement compute-intensive intrusion detection on commodity hardware at line rates. One approach to scaling IDS performance is **multi-threaded IDS**, where CPU-intensive deep packet inspection workload is parallelized into multiple concurrent tasks. Such parallelized inspection can exploit multi-core hardware to scale up IDS throughput easily. Two well-known open-source efforts in this area are [Suricata][1] and [Bro][2]. - -In this tutorial, I am going to demonstrate **how to install and configure Suricata IDS on Linux server**. - -### Install Suricata IDS on Linux ### - -Let's build Suricata from the source. You first need to install several required dependencies as follows. - -#### Install Dependencies on Debian, Ubuntu or Linux Mint #### - - $ sudo apt-get install wget build-essential libpcre3-dev libpcre3-dbg automake autoconf libtool libpcap-dev libnet1-dev libyaml-dev zlib1g-dev libcap-ng-dev libjansson-dev - -#### Install Dependencies on CentOS, Fedora or RHEL #### - - $ sudo yum install wget libpcap-devel libnet-devel pcre-devel gcc-c++ automake autoconf libtool make libyaml-devel zlib-devel file-devel jansson-devel nss-devel - -Once you install all required packages, go ahead and install Suricata as follows. - -First, download the latest Suricata source code from [http://suricata-ids.org/download/][3], and build it. As of this writing, the latest version is 2.0.8. - - $ wget http://www.openinfosecfoundation.org/download/suricata-2.0.8.tar.gz - $ tar -xvf suricata-2.0.8.tar.gz - $ cd suricata-2.0.8 - $ ./configure --sysconfdir=/etc --localstatedir=/var - -Here is the example output of configuration. - - Suricata Configuration: - AF_PACKET support: yes - PF_RING support: no - NFQueue support: no - NFLOG support: no - IPFW support: no - DAG enabled: no - Napatech enabled: no - Unix socket enabled: yes - Detection enabled: yes - - libnss support: yes - libnspr support: yes - libjansson support: yes - Prelude support: no - PCRE jit: yes - LUA support: no - libluajit: no - libgeoip: no - Non-bundled htp: no - Old barnyard2 support: no - CUDA enabled: no - -Now compile and install it. - - $ make - $ sudo make install - -Suricata source code comes with default configuration files. Let's install these default configuration files as follows. - - $ sudo make install-conf - -As you know, Suricata is useless without IDS rule sets. Conveniently, the Makefile comes with IDS rule installation option. To install IDS rules, run the following command. - - $ sudo make install-rules - -The above rule installation command will download the current snapshot of community rulesets available from [EmergingThreats.net][4], and store them under /etc/suricata/rules. - -![](https://farm1.staticflickr.com/691/20482669553_8b67632277_c.jpg) - -### Configure Suricata IDS the First Time ### - -Now it's time to configure Suricata. The configuration file is located at **/etc/suricata/suricata.yaml**. Open the file with a text editor for editing. - - $ sudo vi /etc/suricata/suricata.yaml - -Here are some basic setup for you to get started. - -The "default-log-dir" keyword should point to the location of Suricata log files. - - default-log-dir: /var/log/suricata/ - -Under "vars" section, you will find several important variables used by Suricata. "HOME_NET" should point to the local network to be inspected by Suricata. "!$HOME_NET" (assigned to EXTERNAL_NET) refers to any other networks than the local network. "XXX_PORTS" indicates the port number(s) use by different services. Note that Suricata can automatically detect HTTP traffic regardless of the port it uses. So it is not critical to specify the HTTP_PORTS variable correctly. - - vars: - HOME_NET: "[192.168.122.0/24]" - EXTERNAL_NET: "!$HOME_NET" - HTTP_PORTS: "80" - SHELLCODE_PORTS: "!80" - SSH_PORTS: 22 - -The "host-os-policy" section is used to defend against some well-known attacks which exploit the behavior of an operating system's network stack (e.g., TCP reassembly) to evade detection. As a counter measure, modern IDS came up with so-called "target-based" inspection, where inspection engine fine-tunes its detection algorithm based on a target operating system of the traffic. Thus, if you know what OS individual local hosts are running, you can feed that information to Suricata to potentially enhance its detection rate. This is when "host-os-policy" section is used. In this example, the default IDS policy is Linux; if no OS information is known for a particular IP address, Suricata will apply Linux-based inspection. When traffic for 192.168.122.0/28 and 192.168.122.155 is captured, Suricata will apply Windows-based inspection policy. - - host-os-policy: - # These are Windows machines. - windows: [192.168.122.0/28, 192.168.122.155] - bsd: [] - bsd-right: [] - old-linux: [] - # Make the default policy Linux. - linux: [0.0.0.0/0] - old-solaris: [] - solaris: ["::1"] - hpux10: [] - hpux11: [] - irix: [] - macos: [] - vista: [] - windows2k3: [] - -Under "threading" section, you can specify CPU affinity for different Suricata threads. By default, [CPU affinity][5] is disabled ("set-cpu-affinity: no"), meaning that Suricata threads will be scheduled on any available CPU cores. By default, Suricata will create one "detect" thread for each CPU core. You can adjust this behavior by specifying "detect-thread-ratio: N". This will create N*M detect threads, where M is the total number of CPU cores on the host. - - threading: - set-cpu-affinity: no - detect-thread-ratio: 1.5 - -With the above threading settings, Suricata will create 1.5*M detection threads, where M is the total number of CPU cores on the system. - -For more information about Suricata configuration, you can read the default configuration file itself, which is heavily commented for clarity. - -### Perform Intrusion Detection with Suricata ### - -Now it's time to test-run Suricata. Before launching it, there's one more step to do. - -When you are using pcap capture mode, it is highly recommended to turn off any packet offloead features (e.g., LRO/GRO) on the NIC which Suricata is listening on, as those features may interfere with live packet capture. - -Here is how to turn off LRO/GRO on the network interface eth0: - - $ sudo ethtool -K eth0 gro off lro off - -Note that depending on your NIC, you may see the following warning, which you can ignore. It simply means that your NIC does not support LRO. - - Cannot change large-receive-offload - -Suricata supports a number of running modes. A runmode determines how different threads are used for IDS. The following command lists all [available runmodes][6]. - - $ sudo /usr/local/bin/suricata --list-runmodes - -![](https://farm6.staticflickr.com/5730/20481140934_25080d04d7_c.jpg) - -The default runmode used by Suricata is autofp (which stands for "auto flow pinned load balancing"). In this mode, packets from each distinct flow are assigned to a single detect thread. Flows are assigned to threads with the lowest number of unprocessed packets. - -Finally, let's start Suricata, and see it in action. - - $ sudo /usr/local/bin/suricata -c /etc/suricata/suricata.yaml -i eth0 --init-errors-fatal - -![](https://farm1.staticflickr.com/701/21077552366_c577746e36_c.jpg) - -In this example, we are monitoring a network interface eth0 on a 8-core system. As shown above, Suricata creates 13 packet processing threads and 3 management threads. The packet processing threads consist of one PCAP packet capture thread, and 12 detect threads (equal to 8*1.5). This means that the packets captured by one capture thread are load-balanced to 12 detect threads for IDS. The management threads are one flow manager and two counter/stats related threads. - -Here is a thread-view of Suricata process (plotted by [htop][7]). - -![](https://farm6.staticflickr.com/5775/20482669593_174f8f41cb_c.jpg) - -Suricata detection logs are stored in /var/log/suricata directory. - - $ tail -f /var/log/suricata/fast.log - ----------- - - 04/01/2015-15:47:12.559075 [**] [1:2200074:1] SURICATA TCPv4 invalid checksum [**] [Classification: (null)] [Priority: 3] {TCP} 172.16.253.158:22 -> 172.16.253.1:46997 - 04/01/2015-15:49:06.565901 [**] [1:2200074:1] SURICATA TCPv4 invalid checksum [**] [Classification: (null)] [Priority: 3] {TCP} 172.16.253.158:22 -> 172.16.253.1:46317 - 04/01/2015-15:49:06.566759 [**] [1:2200074:1] SURICATA TCPv4 invalid checksum [**] [Classification: (null)] [Priority: 3] {TCP} 172.16.253.158:22 -> 172.16.253.1:46317 - -For ease of import, the log is also available in JSON format: - - $ tail -f /var/log/suricata/eve.json - ----------- - {"timestamp":"2015-04-01T15:49:06.565901","event_type":"alert","src_ip":"172.16.253.158","src_port":22,"dest_ip":"172.16.253.1","dest_port":46317,"proto":"TCP","alert":{"action":"allowed","gid":1,"signature_id":2200074,"rev":1,"signature":"SURICATA TCPv4 invalid checksum","category":"","severity":3}} - {"timestamp":"2015-04-01T15:49:06.566759","event_type":"alert","src_ip":"172.16.253.158","src_port":22,"dest_ip":"172.16.253.1","dest_port":46317,"proto":"TCP","alert":{"action":"allowed","gid":1,"signature_id":2200074,"rev":1,"signature":"SURICATA TCPv4 invalid checksum","category":"","severity":3}} - -### Conclusion ### - -In this tutorial, I demonstrated how you can set up Suricata IDS on a multi-core Linux server. Unlike single-threaded [Snort IDS][8], Suricata can easily benefit from multi-core/many-core hardware with multi-threading. There is great deal of customization in Suricata to maximize its performance and detection coverage. Suricata folks maintain [online Wiki][9] quite well, so I strongly recommend you check it out if you want to deploy Suricata in your environment. - -Are you currently using Suricata? If so, feel free to share your experience. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/install-suricata-intrusion-detection-system-linux.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://suricata-ids.org/ -[2]:https://www.bro.org/ -[3]:http://suricata-ids.org/download/ -[4]:http://rules.emergingthreats.net/ -[5]:http://xmodulo.com/run-program-process-specific-cpu-cores-linux.html -[6]:https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Runmodes -[7]:http://ask.xmodulo.com/view-threads-process-linux.html -[8]:http://xmodulo.com/how-to-compile-and-install-snort-from-source-code-on-ubuntu.html -[9]:https://redmine.openinfosecfoundation.org/projects/suricata/wiki diff --git a/sources/tech/20151012 Remember sed and awk All Linux admins should.md b/sources/tech/20151012 Remember sed and awk All Linux admins should.md deleted file mode 100644 index 67a6641393..0000000000 --- a/sources/tech/20151012 Remember sed and awk All Linux admins should.md +++ /dev/null @@ -1,60 +0,0 @@ -Remember sed and awk? All Linux admins should -================================================================================ -![](http://images.techhive.com/images/article/2015/03/linux-100573790-primary.idge.jpg) - -Credit: Shutterstock - -**We aren’t doing the next generation of Linux and Unix admins any favors by forgetting init scripts and fundamental tools** - -I happened across a post on Reddit by chance, [asking about textfile manipulation][1]. It was a fairly simple request, similar to those that folks in Unix see nearly every day. In this case, it was how to remove all duplicate lines in a file, keeping one instance of each. This sounds relatively easy, but can get a bit complicated if the source file is sufficiently large and random. - -There are countless answers to this problem. You could write a script in nearly any language to do this, with varying levels of complexity and time investment, which I suspect is what most would do. It might take 20 or 60 minutes depending on skill level, but armed with Perl, Python, or Ruby, you could make quick work of it. - -Or you could use the answer stated in that thread, which warmed my heart: Just use awk. - -That answer is the most concise and simplest solution to the problem by far. It’s one line: - - awk '!seen[$0]++' . - -Let’s take a look at this. - -In this command, there’s a lot of hidden code. Awk is a text processing language, and as such it makes a lot of assumptions. For starters, what you see here is actually the meat of a for loop. Awk assumes you want to loop through every line of the input file, so you don’t need to explicitly state it. Awk also assumes you want to print the postprocessed output, so you don’t need to state that either. Finally, Awk then assumes the loop ends when the last statement finishes, so no need to state it. - -The string seen in this example is the name given to an associative array. $0 is a variable that represents the entirety of the current line of the file. Thus, this command translates to “Evaluate every line in this file, and if you haven’t seen this line before, print it.” Awk does this by adding $0 to the seen array if it doesn’t already exist and incrementing the value so that it will not match the pattern the next time around and, thus, not print. - -Some will see this as elegant, while others may see this as obfuscation. Anyone who uses awk on a daily basis will be in the first group. Awk is designed to do this. You can write multiline programs in awk. You can even write [disturbingly complex functions in awk][2]. But at the end of the day, awk is designed to do text processing, generally within a pipe. Eliminating the extraneous cruft of loop definition is simply a shortcut for a very common use case. If you like, you could write the same thing as the following: - - awk '{ if (!seen[$0]) print $0; seen[$0]++ }’ - -It would lead to the same result. - -Awk is the perfect tool for this job. Nevertheless, I believe many admins -- especially newer admins -- would jump into [Bash][3] or Python to try to accomplish this task, because knowledge of awk and what it can do seems to be fading as time goes on. I think it may be an indicator of things to come, where problems that have been solved for decades suddenly emerge again, based on lack of exposure to the previous solutions. - -The shell, grep, sed, and awk are fundaments of Unix computing. If you’re not completely comfortable with their use, you’re artificially hamstrung because they form the basis of interaction with Unix systems via the CLI and shell scripting. One of the best ways to learn how these tools work is by observing and working with live examples, which every Unix flavor has in spades with their init systems -- or had, in the case of Linux distros that have adopted [systemd][4]. - -Millions of Unix admins learned how shell scripting and Unix tools worked by reading, writing, modifying, and working with init scripts. Init scripts differ greatly from OS to OS, even from distribution to distribution in the case of Linux, but they are all rooted in sh, and they all use core CLI tools like sed, awk, and grep. - -I’ve heard many complaints that init scripts are “ancient” and “difficult,” but in fact, init scripts use the same tools that Unix admins work with every day, and thus provide an excellent way to become more familiar and comfortable with those tools. Saying that init scripts are hard to read or difficult to work with is to admit that you lack fundamental familiarity with the Unix toolset. - -Speaking of things found on Reddit, I also came across this question from a budding Linux sys admin, [asking whether he should bother to learn sysvinit][5]. Most of the answers in the thread are good -- yes, definitely learn sysvinit and systemd. One commenter even notes that init scripts are a great way to learn Bash, and another states that the Fortune 50 company he works for has no plans to move to a systemd-based release. - -But it concerns me that this is a question at all. If we continue down the path of eliminating scripts and roping off core system elements within our operating systems, we will inadvertently make it harder for new admins to learn the fundamental Unix toolset due to the lack of exposure. - -I’m not sure why some want to cover up Unix internals with abstraction after abstraction, but such a path may reduce a generation of Unix admins to hapless button pushers dependent on support contracts. I’m pretty sure that would not be a good development. - --------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/2985804/linux/remember-sed-awk-linux-admins-should.html - -作者:[Paul Venezia][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.infoworld.com/author/Paul-Venezia/ -[1]:https://www.reddit.com/r/linuxadmin/comments/3lwyko/how_do_i_remove_every_occurence_of_duplicate_line/ -[2]:http://intro-to-awk.blogspot.com/2008/08/awk-more-complex-examples.html -[3]:http://www.infoworld.com/article/2613338/linux/linux-how-to-script-a-bash-crash-course.html -[4]:http://www.infoworld.com/article/2608798/data-center/systemd--harbinger-of-the-linux-apocalypse.html -[5]:https://www.reddit.com/r/linuxadmin/comments/3ltq2y/when_i_start_learning_about_linux_administration/ diff --git a/sources/tech/20151013 DFileManager--Cover Flow File Manager.md b/sources/tech/20151013 DFileManager--Cover Flow File Manager.md deleted file mode 100644 index c2f74987b4..0000000000 --- a/sources/tech/20151013 DFileManager--Cover Flow File Manager.md +++ /dev/null @@ -1,64 +0,0 @@ -translation by bestony -DFileManager: Cover Flow File Manager -================================================================================ -A real gem of a file manager absent from the standard Ubuntu repositories but sporting a unique feature. That’s DFileManager in a twitterish statement. - -A tricky question to answer is just how many open source Linux applications are available. Just out of curiosity, you can type at the shell: - - ~$ for f in /var/lib/apt/lists/*Packages; do printf ’%5d %s\n’ $(grep ’^Package: ’ “$f” | wc -l) ${f##*/} done | sort -rn - -On my Ubuntu 15.04 system, it produces the following results: - -![Ubuntu 15.04 Packages](http://www.linuxlinks.com/portal/content/reviews/FileManagers/UbuntuPackages.png) - -As the screenshot above illustrates, there are approximately 39,000 packages in the Universe repository, and around 8,500 packages in the main repository. These numbers sound a lot. But there is a smorgasbord of open source applications, utilities, and libraries that don’t have an Ubuntu team generating a package. And more importantly, there are some real treasures missing from the repositories which can only be discovered by compiling source code. DFileManager is one such utility. It is a Qt based cross-platform file manager which is in an early stage of development. Qt provides single-source portability across all major desktop operating systems. - -In the absence of a binary package, the user needs to compile the code. For some tools, this can be problematic, particularly if the application depends on any obscure libraries, or specific versions which may be incompatible with other software installed on a system. - -### Installation ### - -Fortunately, DFileManager is simple to compile. The installation instructions on the developer’s website provide most of the steps necessary for my creaking Ubuntu box, but a few essential packages were missing (why is it always that way however many libraries clutter up your filesystem?) To prepare my system, download the source code from GitHub and then compile the software, I entered the following commands at the shell: - - ~$ sudo apt-get install qt5-default qt5-qmake libqt5x11extras5-dev - ~$ git clone git://git.code.sf.net/p/dfilemanager/code dfilemanager-code - ~$ cd dfilemananger-code - ~$ mkdir build - ~$ cd build - ~$ cmake ../ -DCMAKE_INSTALL_PREFIX=/usr - ~$ make - ~$ sudo make install - -You can then start the application by typing at the shell: - - ~$ dfm - -Here is a screenshot of DFileManager in action, with the main attraction in full view; the Cover Flow view. This offers the ability to slide through items in the current folder with an attractive feel. It’s ideal for viewing photos. The file manager bears a resemblance to Finder (the default file manager and graphical user interface shell used on all Macintosh operating systems), which may appeal to you. - -![DFileManager in action](http://www.linuxlinks.com/portal/content/reviews/FileManagers/Screenshot-dfm.png) - -### Features: ### - -- 4 views: Icons, Details, Columns, and Cover Flow -- Categorised bookmarks with Places and Devices -- Tabs -- Simple searching and filtering -- Customizable thumbnails for filetypes including multimedia files -- Information bar which can be undocked -- Open folders and files with one click -- Option to queue IO operations -- Remembers some view properties for each folder -- Show hidden files - -DFileManager is not a replacement for KDE’s Dolphin, but do give it a go. It’s a file manager that really helps the user browse files. And don’t forget to give feedback to the developer; that’s a contribution anyone can offer. - --------------------------------------------------------------------------------- - -via: http://gofk.tumblr.com/post/131014089537/dfilemanager-cover-flow-file-manager-a-real-gem - -作者:[gofk][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://gofk.tumblr.com/ \ No newline at end of file diff --git a/sources/tech/20151104 How to Install Pure-FTPd with TLS on FreeBSD 10.2.md b/sources/tech/20151104 How to Install Pure-FTPd with TLS on FreeBSD 10.2.md index 3d898340d8..10a40233e8 100644 --- a/sources/tech/20151104 How to Install Pure-FTPd with TLS on FreeBSD 10.2.md +++ b/sources/tech/20151104 How to Install Pure-FTPd with TLS on FreeBSD 10.2.md @@ -1,3 +1,4 @@ +chisper 翻译中 How to Install Pure-FTPd with TLS on FreeBSD 10.2 ================================================================================ FTP or File Transfer Protocol is application layer standard network protocol used to transfer file from the client to the server, after user logged in to the FTP server over the TCP-Network, such as internet. FTP has been round long time ago, much longer then P2P Program, or World Wide Web, and until this day it was a primary method for sharing file with other over the internet and it it remain very popular even today. FTP provide an secure transmission, that protect username, password and encrypt the content with SSL/TLS. @@ -151,4 +152,4 @@ via: http://linoxide.com/linux-how-to/install-pure-ftpd-tls-freebsd-10-2/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/arulm/ \ No newline at end of file +[a]:http://linoxide.com/author/arulm/ diff --git a/sources/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/sources/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md deleted file mode 100644 index 7ceced012d..0000000000 --- a/sources/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md +++ /dev/null @@ -1,62 +0,0 @@ -translation by strugglingyouth -Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy -================================================================================ -> **Question**: My computer is connected to a corporate network sitting behind an HTTP proxy. When I try to install Ubuntu desktop on the computer from a CD-ROM drive, the installation hangs and never finishes while trying to retrieve files, which is presumably due to the proxy. However, the problem is that Ubuntu installer never asks me to configure proxy during installation procedure. Then how can I install Ubuntu desktop behind a proxy? - -Unlike Ubuntu server, installation of Ubuntu desktop is pretty much auto-pilot, not leaving much room for customization, such as custom disk partitioning, manual network settings, package selection, etc. While such simple, one-shot installation is considered user-friendly, it leaves much to be desired for those users looking for "advanced installation mode" to customize their Ubuntu desktop installation. - -In addition, one big problem of the default Ubuntu desktop installer is the absense of proxy settings. If your computer is connected behind a proxy, you will notice that Ubuntu installation gets stuck while preparing to download files. - -![](https://c2.staticflickr.com/6/5683/22195372232_cea81a5e45_c.jpg) - -This post describes how to get around the limitation of Ubuntu **installer and install Ubuntu desktop when you are behind a proxy**. - -The basic idea is as follows. Instead of starting with Ubuntu installer directly, boot into live Ubuntu desktop first, configure proxy settings, and finally launch Ubuntu installer manually from live desktop. The following is the step by step procedure. - -After booting from Ubuntu desktop CD/DVD or USB, click on "Try Ubuntu" on the first welcome screen. - -![](https://c1.staticflickr.com/1/586/22195371892_3816ba09c3_c.jpg) - -Once you boot into live Ubuntu desktop, click on Settings icon in the left. - -![](https://c1.staticflickr.com/1/723/22020327738_058610c19d_c.jpg) - -Go to Network menu. - -![](https://c2.staticflickr.com/6/5675/22021212239_ba3901c8bf_c.jpg) - -Configure proxy settings manually. - -![](https://c1.staticflickr.com/1/735/22020025040_59415e0b9a_c.jpg) - -Next, open a terminal. - -![](https://c2.staticflickr.com/6/5642/21587084823_357b5c48cb_c.jpg) - -Enter a root session by typing the following: - - $ sudo su - -Finally, type the following command as the root. - - # ubiquity gtk_ui - -This will launch GUI-based Ubuntu installer as follows. - -![](https://c1.staticflickr.com/1/723/22020025090_cc64848b6c_c.jpg) - -Proceed with the rest of installation. - -![](https://c1.staticflickr.com/1/628/21585344214_447020e9d6_c.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/install-ubuntu-desktop-behind-proxy.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://ask.xmodulo.com/author/nanni diff --git a/sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md b/sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md index 22e8606c6c..5ffcb5aea8 100644 --- a/sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md +++ b/sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md @@ -1,4 +1,3 @@ -Translating by KnightJoker How to send email notifications using Gmail SMTP server on Linux ================================================================================ Suppose you want to configure a Linux app to send out email messages from your server or desktop. The email messages can be part of email newsletters, status updates (e.g., [Cachet][1]), monitoring alerts (e.g., [Monit][2]), disk events (e.g., [RAID mdadm][3]), and so on. While you can set up your [own outgoing mail server][4] to deliver messages, you can alternatively rely on a freely available public SMTP server as a maintenance-free option. diff --git a/sources/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md b/sources/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md deleted file mode 100644 index 864068eb91..0000000000 --- a/sources/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md +++ /dev/null @@ -1,126 +0,0 @@ -zpl1025 -Install Android On BQ Aquaris Ubuntu Phone In Linux -================================================================================ -![How to install Android on Ubuntu Phone](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-on-Ubuntu-Phone.jpg) - -If you happen to own the first Ubuntu phone and want to **replace Ubuntu with Android on the bq Aquaris e4.5**, this post is going to help you. - -There can be plenty of reasons why you might want to remove Ubuntu and use the mainstream Android OS. One of the foremost reason is that the OS itself is at an early stage and intend to target developers and enthusiasts. Whatever may be your reason, installing Android on bq Aquaris is a piece of cake, thanks to the tools provided by bq. - -Let’s see what to do we need to install Android on bq Aquaris. - -### Prerequisite ### - -- Working Internet connection to download Android factory image and install tools for flashing Android -- USB data cable -- A system running Linux - -This tutorial is performed using Ubuntu 15.10. But the steps should be applicable to most other Linux distributions. - -### Replace Ubuntu with Android in bq Aquaris e4.5 ### - -#### Step 1: Download Android firmware #### - -First step is to download the Android image for bq Aquaris e4.5. Good thing is that it is available from the bq’s support website. You can download the firmware, around 650 MB in size, from the link below: - -- [Download Android for bq Aquaris e4.5][1] - -Yes, you would get OTA updates with it. At present the firmware version is 2.0.1 which is based on Android Lolipop. Over time, there could be a new firmware based on Marshmallow and then the above link could be outdated. - -I suggest to check the [bq support page and download][2] the latest firmware from there. - -Once downloaded, extract it. In the extracted directory, look for **MT6582_Android_scatter.txt** file. We shall be using it later. - -#### Step 2: Download flash tool #### - -bq has provided its own flash tool, Herramienta MTK Flash Tool, for easier installation of Android or Ubuntu on the device. You can download the tool from the link below: - -- [Download MTK Flash Tool][3] - -Since the flash tool might be upgraded in future, you can always get the latest version of flash tool from the [bq support page][4]. - -Once downloaded extract the downloaded file. You should see an executable file named **flash_tool** in it. We shall be using it later. - -#### Step 3: Remove conflicting packages (optional) #### - -If you are using recent version of Ubuntu or Ubuntu based Linux distributions, you may encounter “BROM ERROR : S_UNDEFINED_ERROR (1001)” later in this tutorial. - -To avoid this error, you’ll have to uninstall conflicting package. Use the commands below: - - sudo apt-get remove modemmanager - -Restart udev service with the command below: - - sudo service udev restart - -Just to check for any possible side effects on kernel module cdc_acm, run the command below: - - lsmod | grep cdc_acm - -If the output of the above command is an empty list, you’ll have to reinstall this kernel module: - - sudo modprobe cdc_acm - -#### Step 4: Prepare to flash Android #### - -Go to the downloaded and extracted flash tool directory (in step 2). Use command line for this purpose because you’ll have to use the root privileges here. - -Presuming that you saved it in the Downloads directory, use the command below to go to this directory (in case you do not know how to navigate between directories in command line). - - cd ~/Downloads/SP_Flash* - -After that use the command below to run the flash tool as root: - - sudo ./flash_tool - -You’ll see a window popped as the one below. Don’t bother about Download Agent field, it will be automatically filled. Just focus on Scatter-loading field. - -![Replace Ubuntu with Android](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-1.jpeg) - -Remember we talked about **MT6582_Android_scatter.txt** in step 1? This text file is in the extracted directory of the Andriod firmware you downloaded in step 1. Click on Scatter-loading (in the above picture) and point to MT6582_Android_scatter.txt file. - -When you do that, you’ll see several green lines like the one below: - -![Install-Android-bq-aquaris-Ubuntu-2](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-2.jpeg) - -#### Step 5: Flashing Android #### - -We are almost ready. Switch off your phone and connect it to your computer via a USB cable. - -Select Firmware Upgrade from the dropdown and after that click on the big download button. - -![flash Android with Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu.jpeg) - -If everything is correct, you should see a flash status in the bottom of the tool: - -![Replace Ubuntu with Android](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-3.jpeg) - -When the procedure is successfully completed, you’ll see a notification like this: - -![Successfully flashed Android on bq qauaris Ubuntu Phone](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-4.jpeg) - -Unplug your phone and power it on. You should see a white screen with AQUARIS written in the middle and at bottom, “powered by Android” would be displayed. It might take upto 10 minutes before you could configure and start using Android. - -Note: If something goes wrong in the process, Press power, volume up, volume down button together and boot in to fast boot mode. Turn off again and connect the cable again. Repeat the process of firmware upgrade. It should work. - -### Conclusion ### - -Thanks to the tools provided, it becomes easier to **flash Android on bq Ubuntu Phone**. Of course, you can use the same steps to replace Android with Ubuntu. All you need is to download Ubuntu firmware instead of Android. - -I hope this tutorial helped you to replace Ubuntu with Android on your bq phone. If you have questions or suggestions, feel free to ask in the comment section below. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/install-android-ubuntu-phone/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:https://storage.googleapis.com/otas/2014/Smartphones/Aquaris_E4.5_L/2.0.1_20150623-1900_bq-FW.zip -[2]:http://www.bq.com/gb/support/aquaris-e4-5 -[3]:https://storage.googleapis.com/otas/2014/Smartphones/Aquaris_E4.5/Ubuntu/Web%20version/Web%20version/SP_Flash_Tool_exe_linux_v5.1424.00.zip -[4]:http://www.bq.com/gb/support/aquaris-e4-5-ubuntu-edition diff --git a/sources/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md b/sources/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md deleted file mode 100644 index bfcf1e3ae3..0000000000 --- a/sources/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md +++ /dev/null @@ -1,317 +0,0 @@ -How to Setup Drone - a Continuous Integration Service in Linux -============================================================== - -Are you tired of cloning, building, testing, and deploying codes time and again? If yes, switch to continuous integration. Continuous Integration aka CI is practice in software engineering of making frequent commits to the code base, building, testing and deploying as we go. CI helps to quickly integrate new codes into the existing code base. If this process is made automated, then this will speed up the development process as it reduces the time taken for the developer to build and test things manually. [Drone][1] is a free and open source project which provides an awesome environment of continuous integration service and is released under Apache License Version 2.0. It integrates with many repository providers like Github, Bitbucket and Google Code and has the ability to pull codes from the repositories enabling us to build the source code written in number of languages including PHP, Node, Ruby, Go, Dart, Python, C/C++, JAVA and more. It is made such a powerful platform cause it uses containers and docker technology for every build making users a complete control over their build environment with guaranteed isolation. - -### 1. Installing Docker ### - -First of all, we'll gonna install Docker as its the most vital element for the complete workflow of Drone. Drone does a proper utilization of docker for the purpose of building and testing application. This container technology speeds up the development of the applications. To install docker, we'll need to run the following commands with respective the distribution of linux. In this tutorial, we'll cover the steps with Ubuntu 14.04 and CentOS 7 linux distributions. - -#### On Ubuntu #### - -To install Docker in Ubuntu, we can simply run the following commands in a terminal or console. - - # apt-get update - # apt-get install docker.io - -After the installation is done, we'll restart our docker engine using service command. - - # service docker restart - -Then, we'll make docker start automatically in every system boot. - - # update-rc.d docker defaults - - Adding system startup for /etc/init.d/docker ... - /etc/rc0.d/K20docker -> ../init.d/docker - /etc/rc1.d/K20docker -> ../init.d/docker - /etc/rc6.d/K20docker -> ../init.d/docker - /etc/rc2.d/S20docker -> ../init.d/docker - /etc/rc3.d/S20docker -> ../init.d/docker - /etc/rc4.d/S20docker -> ../init.d/docker - /etc/rc5.d/S20docker -> ../init.d/docker - -#### On CentOS #### - -First, we'll gonna update every packages installed in our centos machine. We can do that by running the following command. - - # sudo yum update - -To install docker in centos, we can simply run the following commands. - - # curl -sSL https://get.docker.com/ | sh - -After our docker engine is installed in our centos machine, we'll simply start it by running the following systemd command as systemd is the default init system in centos 7. - - # systemctl start docker - -Then, we'll enable docker to start automatically in every system startup. - - # systemctl enable docker - - ln -s '/usr/lib/systemd/system/docker.service' '/etc/systemd/system/multi-user.target.wants/docker.service' - -### 2. Installing SQlite Driver ### - -It uses SQlite3 database server for storing its data and information by default. It will automatically create a database file named drone.sqlite under /var/lib/drone/ which will handle database schema setup and migration. To setup SQlite3 drivers, we'll need to follow the below steps. - -#### On Ubuntu 14.04 #### - -As SQlite3 is available on the default respository of Ubuntu 14.04, we'll simply install it by running the following apt command. - - # apt-get install libsqlite3-dev - -#### On CentOS 7 #### - -To install it on CentOS 7 machine, we'll need to run the following yum command. - - # yum install sqlite-devel - -### 3. Installing Drone ### - -Finally, after we have installed those dependencies successfully, we'll now go further towards the installation of drone in our machine. In this step, we'll simply download the binary package of it from the official download link of the respective binary formats and then install them using the default package manager. - -#### On Ubuntu #### - -We'll use wget to download the debian package of drone for ubuntu from the [official Debian file download link][2]. Here is the command to download the required debian package of drone. - - # wget downloads.drone.io/master/drone.deb - - Resolving downloads.drone.io (downloads.drone.io)... 54.231.48.98 - Connecting to downloads.drone.io (downloads.drone.io)|54.231.48.98|:80... connected. - HTTP request sent, awaiting response... 200 OK - Length: 7722384 (7.4M) [application/x-debian-package] - Saving to: 'drone.deb' - 100%[======================================>] 7,722,384 1.38MB/s in 17s - 2015-11-06 14:09:28 (456 KB/s) - 'drone.deb' saved [7722384/7722384] - -After its downloaded, we'll gonna install it with dpkg package manager. - - # dpkg -i drone.deb - - Selecting previously unselected package drone. - (Reading database ... 28077 files and directories currently installed.) - Preparing to unpack drone.deb ... - Unpacking drone (0.3.0-alpha-1442513246) ... - Setting up drone (0.3.0-alpha-1442513246) ... - Your system ubuntu 14: using upstart to control Drone - drone start/running, process 9512 - -#### On CentOS #### - -In the machine running CentOS, we'll download the RPM package from the [official download link for RPM][3] using wget command as shown below. - - # wget downloads.drone.io/master/drone.rpm - - --2015-11-06 11:06:45-- http://downloads.drone.io/master/drone.rpm - Resolving downloads.drone.io (downloads.drone.io)... 54.231.114.18 - Connecting to downloads.drone.io (downloads.drone.io)|54.231.114.18|:80... connected. - HTTP request sent, awaiting response... 200 OK - Length: 7763311 (7.4M) [application/x-redhat-package-manager] - Saving to: ‘drone.rpm’ - 100%[======================================>] 7,763,311 1.18MB/s in 20s - 2015-11-06 11:07:06 (374 KB/s) - ‘drone.rpm’ saved [7763311/7763311] - -Then, we'll install the download rpm package using yum package manager. - - # yum localinstall drone.rpm - -### 4. Configuring Port ### - -After the installation is completed, we'll gonna configure drone to make it workable. The configuration of drone is inside **/etc/drone/drone.toml** file. By default, drone web interface is exposed under port 80 which is the default port of http, if we wanna change it, we can change it by replacing the value under server block as shown below. - - [server] - port=":80" - -### 5. Integrating Github ### - -In order to run Drone we must setup at least one integration points between GitHub, GitHub Enterprise, Gitlab, Gogs, Bitbucket. In this tutorial, we'll only integrate github but if we wanna integrate other we can do that from the configuration file. In order to integrate github, we'll need to create a new application in our [github settings][4]. - -![Registering App Github](http://blog.linoxide.com/wp-content/uploads/2015/11/registering-app-github.png) - -To create, we'll need to click on Register a New Application then fill out the form as shown in the following image. - -![Registering OAuth app github](http://blog.linoxide.com/wp-content/uploads/2015/11/registering-OAuth-app-github.png) - -We should make sure that **Authorization callback URL** looks like http://drone.linoxide.com/api/auth/github.com under the configuration of the application. Then, we'll click on Register application. After done, we'll note the Client ID and Client Secret key as we'll need to configure it in our drone configuration. - -![Client ID and Secret Token](http://blog.linoxide.com/wp-content/uploads/2015/11/client-id-secret-token.png) - -After thats done, we'll need to edit our drone configuration using a text editor by running the following command. - - # nano /etc/drone/drone.toml - -Then, we'll find the [github] section and append the section with the above noted configuration as shown below. - - [github] - client="3dd44b969709c518603c" - secret="4ee261abdb431bdc5e96b19cc3c498403853632a" - # orgs=[] - # open=false - -![Configuring Github Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-github-drone-e1446835124465.png) - -### 6. Configuring SMTP server ### - -If we wanna enable drone to send notifications via emails, then we'll need to specify the SMTP configuration of our SMTP server. If we already have an SMTP server, we can use its configuration but as we don't have an SMTP server, we'll need to install an MTA ie Postfix and then specify the SMTP configuration in the drone configuration. - -#### On Ubuntu #### - -We can install postfix in ubuntu by running the following apt command. - - # apt-get install postfix - -#### On CentOS #### - -We can install postfix in CentOS by running the following yum command. - - # yum install postfix - -After installing, we'll need to edit the configuration of our postfix configuration using a text editor. - - # nano /etc/postfix/main.cf - -Then, we'll need to replace the value of myhostname parameter to our FQDN ie drone.linoxide.com . - - myhostname = drone.linoxide.com - -Now, we'll gonna finally configure the SMTP section of our drone configuration file. - - # nano /etc/drone/drone.toml - -Then, we'll find the [stmp] section and then we'll need to append the setting as follows. - - [smtp] - host = "drone.linoxide.com" - port = "587" - from = "root@drone.linoxide.com" - user = "root" - pass = "password" - -![Configuring SMTP Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-smtp-drone.png) - -Note: Here, **user** and **pass** parameters are strongly recommended to be changed according to one's user configuration. - -### 7. Configuring Worker ### - -As we know that drone utilizes docker for its building and testing task, we'll need to configure docker as the worker for our drone. To do so, we'll need to edit the [worker] section in the drone configuration file. - - # nano /etc/drone/drone.toml - -Then, we'll uncomment the following lines and append as shown below. - - [worker] - nodes=[ - "unix:///var/run/docker.sock", - "unix:///var/run/docker.sock" - ] - -Here, we have set only 2 node which means the above configuration is capable of executing only 2 build at a time. In order to increase concurrency, we can increase the number of nodes. - - [worker] - nodes=[ - "unix:///var/run/docker.sock", - "unix:///var/run/docker.sock", - "unix:///var/run/docker.sock", - "unix:///var/run/docker.sock" - ] - -Here, in the above configuration, drone is configured to process four builds at a time, using the local docker daemon. - -### 8. Restarting Drone ### - -Finally, after everything is done regarding the installation and configuration, we'll now start our drone server in our linux machine. - -#### On Ubuntu #### - -To start drone in our Ubuntu 14.04 machine, we'll simply run service command as the default init system of Ubuntu 14.04 is SysVinit. - - # service drone restart - -To make drone start automatically in every boot of the system, we'll run the following command. - - # update-rc.d drone defaults - -#### On CentOS #### - -To start drone in CentOS machine, we'll simply run systemd command as CentOS 7 is shipped with systemd as init system. - - # systemctl restart drone - -Then, we'll enable drone to start automatically in every system boot. - - # systemctl enable drone - -### 9. Allowing Firewalls ### - -As we know drone utilizes port 80 by default and we haven't changed the port, we'll gonna configure our firewall programs to allow port 80 (http) and be accessible from other machines in the network. - -#### On Ubuntu 14.04 #### - -Iptables is a popular firewall program which is installed in the ubuntu distributions by default. We'll make iptables to expose port 80 so that we can make our Drone web interface accessible in the network. - - # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT - # /etc/init.d/iptables save - -#### On CentOS 7 #### - -As CentOS 7 has systemd installed by default, it contains firewalld running as firewall problem. In order to open the port 80 (http service) on firewalld, we'll need to execute the following commands. - - # firewall-cmd --permanent --add-service=http - - success - - # firewall-cmd --reload - - success - -### 10. Accessing Web Interface ### - -Now, we'll gonna open the web interface of drone using our favourite web browser. To do so, we'll need to point our web browser to our machine running drone in it. As the default port of drone is 80 and we have also set 80 in this tutorial, we'll simply point our browser to http://ip-address/ or http://drone.linoxide.com according to our configuration. After we have done that correctly, we'll see the first page of it having options to login into our dashboard. - -![Login Github Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/login-github-drone-e1446834688394.png) - -As we have configured Github in the above step, we'll simply select github and we'll go through the app authentication process and after its done, we'll be forwarded to our Dashboard. - -![Drone Dashboard](http://blog.linoxide.com/wp-content/uploads/2015/11/drone-dashboard.png) - -Here, it will synchronize all our github repository and will ask us to activate the repo which we want to build with drone. - -![Activate Repository](http://blog.linoxide.com/wp-content/uploads/2015/11/activate-repository-e1446835574595.png) - -After its activated, it will ask us to add a new file named .drone.yml in our repository and define the build process and configuration in that file like which image to fetch and which command/script to run while compiling, etc. - -We'll need to configure our .drone.yml as shown below. - - image: python - script: - - python helloworld.py - - echo "Build has been completed." - -After its done, we'll be able to build our application using the configuration YAML file .drone.yml in our drone appliation. All the commits made into the repository is synced in realtime. It automatically syncs the commit and changes made to the repository. Once the commit is made in the repository, build is automatically started in our drone application. - -![Building Application Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/building-application-drone.png) - -After the build is completed, we'll be able to see the output of the build with the output console. - -![Build Success Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/build-success-drone.png) - -### Conclusion ### - -In this article, we learned to completely setup a workable Continuous Intergration platform with Drone. If we want, we can even get started with the services provided by the official Drone.io project. We can start with free service or paid service according to our requirements. It has changed the world of Continuous integration with its beautiful web interface and powerful bunches of features. It has the ability to integrate with many third party applications and deployment platforms. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/setup-drone-continuous-integration-linux/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://drone.io/ -[2]:http://downloads.drone.io/master/drone.deb -[3]:http://downloads.drone.io/master/drone.rpm -[4]:https://github.com/settings/developers diff --git a/sources/tech/20151117 Install Android On BQ Aquaris Ubuntu Phone In Linux.md b/sources/tech/20151117 Install Android On BQ Aquaris Ubuntu Phone In Linux.md deleted file mode 100644 index 94e7ef69ce..0000000000 --- a/sources/tech/20151117 Install Android On BQ Aquaris Ubuntu Phone In Linux.md +++ /dev/null @@ -1,125 +0,0 @@ -Install Android On BQ Aquaris Ubuntu Phone In Linux -================================================================================ -![How to install Android on Ubuntu Phone](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-on-Ubuntu-Phone.jpg) - -If you happen to own the first Ubuntu phone and want to **replace Ubuntu with Android on the bq Aquaris e4.5**, this post is going to help you. - -There can be plenty of reasons why you might want to remove Ubuntu and use the mainstream Android OS. One of the foremost reason is that the OS itself is at an early stage and intend to target developers and enthusiasts. Whatever may be your reason, installing Android on bq Aquaris is a piece of cake, thanks to the tools provided by bq. - -Let’s see what to do we need to install Android on bq Aquaris. - -### Prerequisite ### - -- Working Internet connection to download Android factory image and install tools for flashing Android -- USB data cable -- A system running Linux - -This tutorial is performed using Ubuntu 15.10. But the steps should be applicable to most other Linux distributions. - -### Replace Ubuntu with Android in bq Aquaris e4.5 ### - -#### Step 1: Download Android firmware #### - -First step is to download the Android image for bq Aquaris e4.5. Good thing is that it is available from the bq’s support website. You can download the firmware, around 650 MB in size, from the link below: - -- [Download Android for bq Aquaris e4.5][1] - -Yes, you would get OTA updates with it. At present the firmware version is 2.0.1 which is based on Android Lolipop. Over time, there could be a new firmware based on Marshmallow and then the above link could be outdated. - -I suggest to check the [bq support page][2] and download the latest firmware from there. - -Once downloaded, extract it. In the extracted directory, look for **MT6582_Android_scatter.txt** file. We shall be using it later. - -#### Step 2: Download flash tool #### - -bq has provided its own flash tool, Herramienta MTK Flash Tool, for easier installation of Android or Ubuntu on the device. You can download the tool from the link below: - -- [Download MTK Flash Tool][3] - -Since the flash tool might be upgraded in future, you can always get the latest version of flash tool from the [bq support page][4]. - -Once downloaded extract the downloaded file. You should see an executable file named **flash_tool** in it. We shall be using it later. - -#### Step 3: Remove conflicting packages (optional) #### - -If you are using recent version of Ubuntu or Ubuntu based Linux distributions, you may encounter “BROM ERROR : S_UNDEFINED_ERROR (1001)” later in this tutorial. - -To avoid this error, you’ll have to uninstall conflicting package. Use the commands below: - - sudo apt-get remove modemmanager - -Restart udev service with the command below: - - sudo service udev restart - -Just to check for any possible side effects on kernel module cdc_acm, run the command below: - - lsmod | grep cdc_acm - -If the output of the above command is an empty list, you’ll have to reinstall this kernel module: - - sudo modprobe cdc_acm - -#### Step 4: Prepare to flash Android #### - -Go to the downloaded and extracted flash tool directory (in step 2). Use command line for this purpose because you’ll have to use the root privileges here. - -Presuming that you saved it in the Downloads directory, use the command below to go to this directory (in case you do not know how to navigate between directories in command line). - - cd ~/Downloads/SP_Flash* - -After that use the command below to run the flash tool as root: - - sudo ./flash_tool - -You’ll see a window popped as the one below. Don’t bother about Download Agent field, it will be automatically filled. Just focus on Scatter-loading field. - -![Replace Ubuntu with Android](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-1.jpeg) - -Remember we talked about **MT6582_Android_scatter.txt** in step 1? This text file is in the extracted directory of the Andriod firmware you downloaded in step 1. Click on Scatter-loading (in the above picture) and point to MT6582_Android_scatter.txt file. - -When you do that, you’ll see several green lines like the one below: - -![Install-Android-bq-aquaris-Ubuntu-2](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-2.jpeg) - -#### Step 5: Flashing Android #### - -We are almost ready. Switch off your phone and connect it to your computer via a USB cable. - -Select Firmware Upgrade from the dropdown and after that click on the big download button. - -![flash Android with Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu.jpeg) - -If everything is correct, you should see a flash status in the bottom of the tool: - -![Replace Ubuntu with Android](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-3.jpeg) - -When the procedure is successfully completed, you’ll see a notification like this: - -![Successfully flashed Android on bq qauaris Ubuntu Phone](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-4.jpeg) - -Unplug your phone and power it on. You should see a white screen with AQUARIS written in the middle and at bottom, “powered by Android” would be displayed. It might take upto 10 minutes before you could configure and start using Android. - -Note: If something goes wrong in the process, Press power, volume up, volume down button together and boot in to fast boot mode. Turn off again and connect the cable again. Repeat the process of firmware upgrade. It should work. - -### Conclusion ### - -Thanks to the tools provided, it becomes easier to **flash Android on bq Ubuntu Phone**. Of course, you can use the same steps to replace Android with Ubuntu. All you need is to download Ubuntu firmware instead of Android. - -I hope this tutorial helped you to replace Ubuntu with Android on your bq phone. If you have questions or suggestions, feel free to ask in the comment section below. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/install-android-ubuntu-phone/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:https://storage.googleapis.com/otas/2014/Smartphones/Aquaris_E4.5_L/2.0.1_20150623-1900_bq-FW.zip -[2]:http://www.bq.com/gb/support/aquaris-e4-5 -[3]:https://storage.googleapis.com/otas/2014/Smartphones/Aquaris_E4.5/Ubuntu/Web%20version/Web%20version/SP_Flash_Tool_exe_linux_v5.1424.00.zip -[4]:http://www.bq.com/gb/support/aquaris-e4-5-ubuntu-edition \ No newline at end of file diff --git a/sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md b/sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md deleted file mode 100644 index 3b6277da80..0000000000 --- a/sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md +++ /dev/null @@ -1,242 +0,0 @@ -How to Install Revive Adserver on Ubuntu 15.04 / CentOS 7 -================================================================================ -Revive AdserverHow to Install Revive Adserver on Ubuntu 15.04 / CentOS 7 is a free and open source advertisement management system that enables publishers, ad networks and advertisers to serve ads on websites, apps, videos and manage campaigns for multiple advertiser with many features. Revive Adserver is licensed under GNU Public License which is also known as OpenX Source. It features an integrated banner management interface, URL targeting, geo-targeting and tracking system for gathering statistics. This application enables website owners to manage banners from both in-house advertisement campaigns as well as from paid or third-party sources, such as Google's AdSense. Here, in this tutorial, we'll gonna install Revive Adserver in our machine running Ubuntu 15.04 or CentOS 7. - -### 1. Installing LAMP Stack ### - -First of all, as Revive Adserver requires a complete LAMP Stack to work, we'll gonna install it. LAMP Stack is the combination of Apache Web Server, MySQL/MariaDB Database Server and PHP modules. To run Revive properly, we'll need to install some PHP modules like apc, zlib, xml, pcre, mysql and mbstring. To setup LAMP Stack, we'll need to run the following command with respect to the distribution of linux we are currently running. - -#### On Ubuntu 15.04 #### - - # apt-get install apache2 mariadb-server php5 php5-gd php5-mysql php5-curl php-apc zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev libapache2-mod-php5 zip - -#### On CentOS 7 #### - - # yum install httpd mariadb php php-gd php-mysql php-curl php-mbstring php-xml php-apc zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev zip - -### 2. Starting Apache and MariaDB server ### - -We’ll now start our newly installed Apache web server and MariaDB database server in our linux machine. To do so, we'll need to execute the following commands. - -#### On Ubuntu 15.04 #### - -Ubuntu 15.04 is shipped with Systemd as its default init system, so we'll need to execute the following commands to start apache and mariadb daemons. - - # systemctl start apache2 mysql - -After its started, we'll now make it able to start automatically in every system boot by running the following command. - - # systemctl enable apache2 mysql - - Synchronizing state for apache2.service with sysvinit using update-rc.d... - Executing /usr/sbin/update-rc.d apache2 defaults - Executing /usr/sbin/update-rc.d apache2 enable - Synchronizing state for mysql.service with sysvinit using update-rc.d... - Executing /usr/sbin/update-rc.d mysql defaults - Executing /usr/sbin/update-rc.d mysql enable - -#### On CentOS 7 #### - -Also in CentOS 7, systemd is the default init system so, we'll run the following command to start them. - - # systemctl start httpd mariadb - -Next, we'll enable them to start automatically in every startup of init system using the following command. - - # systemctl enable httpd mariadb - - ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service' - ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service' - -### 3. Configuring MariaDB ### - -#### On CentOS 7/Ubuntu 15.04 #### - -Now, as we are starting MariaDB for the first time and no password has been assigned for MariaDB so, we’ll first need to configure a root password for it. Then, we’ll gonna create a new database so that it can store data for our Revive Adserver installation. - -To configure MariaDB and assign a root password, we’ll need to run the following command. - - # mysql_secure_installation - -This will ask us to enter the password for root but as we haven’t set any password before and its our first time we’ve installed mariadb, we’ll simply press enter and go further. Then, we’ll be asked to set root password, here we’ll hit Y and enter our password for root of MariaDB. Then, we’ll simply hit enter to set the default values for the further configurations. - - …. - so you should just press enter here. - - Enter current password for root (enter for none): - OK, successfully used password, moving on… - - Setting the root password ensures that nobody can log into the MariaDB - root user without the proper authorisation. - - Set root password? [Y/n] y - New password: - Re-enter new password: - Password updated successfully! - Reloading privilege tables.. - … Success! - … - installation should now be secure. - Thanks for using MariaDB! - -![Configuring MariaDB](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-mariadb.png) - -### 4. Creating new Database ### - -After we have assigned the password to our root user of mariadb server, we'll now create a new database for Revive Adserver application so that it can store its data into the database server. To do so, first we'll need to login to our MariaDB console by running the following command. - - # mysql -u root -p - -Then, it will ask us to enter the password of root user which we had just set in the above step. Then, we'll be welcomed into the MariaDB console in which we'll create our new database, database user and assign its password and grant all privileges to create, remove and edit the tables and data stored in it. - - > CREATE DATABASE revivedb; - > CREATE USER 'reviveuser'@'localhost' IDENTIFIED BY 'Pa$$worD123'; - > GRANT ALL PRIVILEGES ON revivedb.* TO 'reviveuser'@'localhost'; - > FLUSH PRIVILEGES; - > EXIT; - -![Creating Mariadb Revive Database](http://blog.linoxide.com/wp-content/uploads/2015/11/creating-mariadb-revive-database.png) - -### 5. Downloading Revive Adserver Package ### - -Next, we'll download the latest release of Revive Adserver ie version 3.2.2 in the time of writing this article. So, we'll first get the download link from the official Download Page of Revive Adserver ie [http://www.revive-adserver.com/download/][1] then we'll download the compressed zip file using wget command under /tmp/ directory as shown bellow. - - # cd /tmp/ - # wget http://download.revive-adserver.com/revive-adserver-3.2.2.zip - - --2015-11-09 17:03:48-- http://download.revive-adserver.com/revive-adserver-3.2.2.zip - Resolving download.revive-adserver.com (download.revive-adserver.com)... 54.230.119.219, 54.239.132.177, 54.230.116.214, ... - Connecting to download.revive-adserver.com (download.revive-adserver.com)|54.230.119.219|:80... connected. - HTTP request sent, awaiting response... 200 OK - Length: 11663620 (11M) [application/zip] - Saving to: 'revive-adserver-3.2.2.zip' - revive-adserver-3.2 100%[=====================>] 11.12M 1.80MB/s in 13s - 2015-11-09 17:04:02 (906 KB/s) - 'revive-adserver-3.2.2.zip' saved [11663620/11663620] - -After the file is downloaded, we'll simply extract its files and directories using unzip command. - - # unzip revive-adserver-3.2.2.zip - -Then, we'll gonna move the entire Revive directories including every files from /tmp to the default webroot of Apache Web Server ie /var/www/html/ directory. - - # mv revive-adserver-3.2.2 /var/www/html/reviveads - -### 6. Configuring Apache Web Server ### - -We'll now configure our Apache Server so that revive will run with proper configuration. To do so, we'll create a new virtualhost by creating a new configuration file named reviveads.conf . The directory here may differ from one distribution to another, here is how we create in the following distributions of linux. - -#### On Ubuntu 15.04 #### - - # touch /etc/apache2/sites-available/reviveads.conf - # ln -s /etc/apache2/sites-available/reviveads.conf /etc/apache2/sites-enabled/reviveads.conf - # nano /etc/apache2/sites-available/reviveads.conf - -Now, we'll gonna add the following lines of configuration into this file using our favorite text editor. - - - ServerAdmin info@reviveads.linoxide.com - DocumentRoot /var/www/html/reviveads/ - ServerName reviveads.linoxide.com - ServerAlias www.reviveads.linoxide.com - - Options FollowSymLinks - AllowOverride All - - ErrorLog /var/log/apache2/reviveads.linoxide.com-error_log - CustomLog /var/log/apache2/reviveads.linoxide.com-access_log common - - -![Configuring Apache2 Ubuntu](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-apache2-ubuntu.png) - -After done, we'll gonna save the file and exit our text editor. Then, we'll restart our Apache Web server. - - # systemctl restart apache2 - -#### On CentOS 7 #### - -In CentOS, we'll directly create the file reviveads.conf under /etc/httpd/conf.d/ directory using our favorite text editor. - - # nano /etc/httpd/conf.d/reviveads.conf - -Then, we'll gonna add the following lines of configuration into the file. - - - ServerAdmin info@reviveads.linoxide.com - DocumentRoot /var/www/html/reviveads/ - ServerName reviveads.linoxide.com - ServerAlias www.reviveads.linoxide.com - - Options FollowSymLinks - AllowOverride All - - ErrorLog /var/log/httpd/reviveads.linoxide.com-error_log - CustomLog /var/log/httpd/reviveads.linoxide.com-access_log common - - -![Configuring httpd Centos](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-httpd-centos.png) - -Once done, we'll simply save the file and exit the editor. And then, we'll gonna restart our apache web server. - - # systemctl restart httpd - -### 7. Fixing Permissions and Ownership ### - -Now, we'll gonna fix some file permissions and ownership of the installation path. First, we'll gonna set the ownership of the installation directory to Apache process owner so that apache web server will have full access of the files and directories to edit, create and delete. - -#### On Ubuntu 15.04 #### - - # chown www-data: -R /var/www/html/reviveads - -#### On CentOS 7 #### - - # chown apache: -R /var/www/html/reviveads - -### 8. Allowing Firewall ### - -Now, we'll gonna configure our firewall programs to allow port 80 (http) so that our apache web server running Revive Adserver will be accessible from other machines in the network across the default http port ie 80. - -#### On Ubuntu 15.04/CentOS 7 #### - -As CentOS 7 and Ubuntu 15.04 both has systemd installed by default, it contains firewalld running as firewall program. In order to open the port 80 (http service) on firewalld, we'll need to execute the following commands. - - # firewall-cmd --permanent --add-service=http - - success - - # firewall-cmd --reload - - success - -### 9. Web Installation ### - -Finally, after everything is done as expected, we'll now be able to access the web interface of the application using a web browser. We can go further towards the web installation, by pointing the web browser to the web server we are running in our linux machine. To do so, we'll need to point our web browser to http://ip-address/ or http://domain.com assigned to our linux machine. Here, in this tutorial, we'll point our browser to http://reviveads.linoxide.com/ . - -Here, we'll see the Welcome page of the installation of Revive Adserver with the GNU General Public License V2 as Revive Adserver is released under this license. Then, we'll simply click on I agree button in order to continue the installation. - -In the next page, we'll need to enter the required database information in order to connect Revive Adserver with the MariaDB database server. Here, we'll need to enter the database name, user and password that we had set in the above step. In this tutorial, we entered database name, user and password as revivedb, reviveuser and Pa$$worD123 respectively then, we set the hostname as localhost and continue further. - -![Configuring Revive Adserver](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-revive-adserver.png) - -We'll now enter the required information like administration username, password and email address so that we can use these information to login to the dashboard of our Adserver. After done, we'll head towards the Finish page in which we'll see that we have successfully installed Revive Adserver in our server. - -Next, we'll be redirected to the Adverstiser page where we'll add new Advertisers and manage them. Then, we'll be able to navigate to our Dashboard, add new users to the adserver, add new campaign for our advertisers, banners, websites, video ads and everything that its built with. - -For enabling more configurations and access towards the administrative settings, we can switch our Dashboard user to the Administrator account. This will add new administrative menus in the dashboard like Plugins, Configuration through which we can add and manage plugins and configure many features and elements of Revive Adserver. - -### Conclusion ### - -In this article, we learned some information on what is Revive Adserver and how we can setup on linux machine running Ubuntu 15.04 and CentOS 7 distributions. Though Revive Adserver's initial source code was bought from OpenX, currently the code base for OpenX Enterprise and Revive Adserver are completely separate. To extend more features, we can install more plugins which we can also find from [http://www.adserverplugins.com/][2] . Really, this piece of software has changed the way of managing the ads for websites, apps, videos and made it very easy and efficient. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/install-revive-adserver-ubuntu-15-04-centos-7/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:http://www.revive-adserver.com/download/ -[2]:http://www.adserverplugins.com/ \ No newline at end of file diff --git a/sources/tech/20151123 Data Structures in the Linux Kernel.md b/sources/tech/20151123 Data Structures in the Linux Kernel.md index d344eacd97..187b3ce9cd 100644 --- a/sources/tech/20151123 Data Structures in the Linux Kernel.md +++ b/sources/tech/20151123 Data Structures in the Linux Kernel.md @@ -1,5 +1,3 @@ -Translating by DongShuaike - Data Structures in the Linux Kernel ================================================================================ diff --git a/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md b/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md deleted file mode 100644 index 8033292f5f..0000000000 --- a/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md +++ /dev/null @@ -1,135 +0,0 @@ -taichirain 翻译中 - -How to Configure Apache Solr on Ubuntu 14 / 15 -================================================================================ -Hello and welcome to our today's article on Apache Solr. The brief description about Apache Solr is that it is an Open Source most famous search platform with Apache Lucene at the back end for Web sites that enables you to easily create search engines which searches websites, databases and files. It can index and search multiple sites and return recommendations for related contents based on the searched text. - -Solr works with HTTP Extensible Markup Language (XML) that offers application program interfaces (APIs) for Javascript Object Notation, Python, and Ruby. According to the Apache Lucene Project, Solr offers capabilities that have made it popular with administrators including it many featuring like: - -- Full Text Search -- Faceted Navigation -- Snippet generation/highting -- Spell Suggestion/Auto complete -- Custom document ranking/ordering - -#### Prerequisites: #### - -On a fresh Linux Ubuntu 14/15 with minimal packages installed, you only have to take care of few prerequisites in order to install Apache Solr. - -### 1)System Update ### - -Login to your Ubuntu server with a non-root sudo user that will be used to perform all the steps to install and use Solr. - -After successful login, issue the following command to update your system with latest updates and patches. - - $ sudo apt-get update - -### 2) JRE Setup ### - -The Solr setup needs Java Runtime Environment to be installed on the system as its basic requirement because solr and tomcat both are the Java based applications. So, we need to install and configure its home environment with latest Java. - -To install the latest version on Oracle Java 8, we need to install Python Software Properties using the below command. - - $ sudo apt-get install python-software-properties - -Upon completion, run the setup its the repository for the latest version of Java 8. - - $ sudo add-apt-repository ppa:webupd8team/java - -Now you are able to install the latest version of Oracle Java 8 with 'wget' by issuing the below commands to update the packages source list and then to install Java. - - $ sudo apt-get update - ----------- - - $ sudo apt-get install oracle-java8-installer - -Accept the Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX as you will be asked during the Java installation and configuration process by a click on the 'OK' button. - -When the installation process complete, run the below command to test the successful installation of Java and check its version. - - kash@solr:~$ java -version - java version "1.8.0_66" - Java(TM) SE Runtime Environment (build 1.8.0_66-b17) - Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) - -The output indicates that we have successfully fulfilled the basic requirement of Solr by installing the Java. Now move to the next step to install Solr. - -### Installing Solr ### - -Installing Solr on Ubuntu can be done by using two different ways but in this article we prefer to install its latest package from the source. - -To install Solr from its source, download its available package with latest version from there Official [Web Page][1], copy the link address and get it using 'wget' command. - - $ wget http://www.us.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz - -Run the command below to extract the archived service into '/bin' folder. - - $ tar -xzf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2 - -Then run the script to start Solr service that will creates a new 'solr' user and then installs solr as a service. - - $ sudo bash ./install_solr_service.sh solr-5.3.1.tgz - -![Solr Installation](http://blog.linoxide.com/wp-content/uploads/2015/11/12.png) - -To check the status of Solr service, you use the below command. - - $ service solr status - -![Solr Status](http://blog.linoxide.com/wp-content/uploads/2015/11/22.png) - -### Creating Solr Collection: ### - -Now we can create multiple collections using Solr user. To do so just run the below command by mentioning the name of the collection you want to create and by specifying its configuration set as shown. - - $ sudo su - solr -c "/opt/solr/bin/solr create -c myfirstcollection -n data_driven_schema_configs" - -![creating collection](http://blog.linoxide.com/wp-content/uploads/2015/11/32.png) - -We have successfully created the new core instance directory for our our first collection where we can add new data in it. To view its default schema file in directory '/opt/solr/server/solr/configsets/data_driven_schema_configs/conf' . - -### Using Solr Web ### - -Apache Solr can be accessible on the default port of Solr that 8983. Open your favorite browser and navigate to http://your_server_ip:8983/solr or http://your-domain.com:8983/solr. Make sure that the port is allowed in your firewall. - - http://172.25.10.171:8983/solr/ - -![Solr Web Access](http://blog.linoxide.com/wp-content/uploads/2015/11/42.png) - -From the Solr Web Console click on the 'Core Admin' button from the left bar, then you will see your first collection that we created earlier using CLI. While you can also create new cores by pointing on the 'Add Core' button. - -![Adding Core](http://blog.linoxide.com/wp-content/uploads/2015/11/52.png) - -You can also add the document and query from the document as shown in below image by selecting your particular collection and pointing the document. Add the data in the specified format as shown in the box. - - { - "number": 1, - "Name": "George Washington", - "birth_year": 1989, - "Starting_Job": 2002, - "End_Job": "2009-04-30", - "Qualification": "Graduation", - "skills": "Linux and Virtualization" - } - -After adding the document click on the 'Submit Document' button. - -![adding Document](http://blog.linoxide.com/wp-content/uploads/2015/11/62.png) - -### Conclusion ### - -You are now able to insert and query data using the Solr web interface after its successful installation on Ubuntu. Now add more collections and insert you own data and documents that you wish to put and manage through Solr. We hope you have got this article much helpful and enjoyed reading this. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/configure-apache-solr-ubuntu-14-15/ - -作者:[Kashif][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/kashifs/ -[1]:http://lucene.apache.org/solr/ diff --git a/sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md b/sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md deleted file mode 100644 index 3f2f392efb..0000000000 --- a/sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md +++ /dev/null @@ -1,148 +0,0 @@ -How to Install Cockpit in Fedora / CentOS / RHEL/ Arch Linux -================================================================================ -Cockpit is a free and open source server management software that makes us easy to administer our GNU/Linux servers via its beautiful web interface frontend. Cockpit helps make linux system administrator, system maintainers and DevOps easy to manage their server and to perform simple tasks, such as administering storage, inspecting journals, starting and stopping services and more. Its journal interface adds aroma in flower making people easy to switch between the terminal and web interface. And moreover, it makes easy to manage not only one server but several multiple networked servers from a single place at the same time with just a single click. It is very light weight and has easy to use web based interface. In this tutorial, we'll learn how we can setup Cockpit and use it to manage our server running Fedora, CentOS, Arch Linux and RHEL distributions as their operating system software. Some of the awesome benefits of Cockpit in our GNU/Linux servers are as follows: - -1. It consist of systemd service manager for ease. -1. It has a Journal log viewer to perform troubleshoots and log analysis. -1. Storage setup including LVM was never easier before. -1. Basic Network configuration can be applied with Cockpit -1. We can easily add and remove local users and manage multiple servers. - -### 1. Installing Cockpit ### - -First of all, we'll need to setup Cockpit in our linux based server. In most of the distributions, the cockpit package is already available in their official repositories. Here, in this tutorial, we'll setup Cockpit in Fedora 22, CentOS 7, Arch Linux and RHEL 7 from their official repositories. - -#### On CentOS / RHEL #### - -Cockpit is available in the official repository of CenOS and RHEL. So, we'll simply install it using yum manager. To do so, we'll simply run the following command under sudo/root access. - - # yum install cockpit - -![Install Cockpit Centos](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-centos.png) - -#### On Fedora 22/21 #### - -Alike, CentOS, it is also available by default in Fedora's official repository, we'll simply install cockpit using dnf package manager. - - # dnf install cockpit - -![Install Cockpit Fedora](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-fedora.png) - -#### On Arch Linux #### - -Cockpit is currently not available in the official repository of Arch Linux but it is available in the Arch User Repository also know as AUR. So, we'll simply run the following yaourt command to install it. - - # yaourt cockpit - -![Install Cockpit Archlinux](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-archlinux.png) - -### 2. Starting and Enabling Cockpit ### - -After we have successfully installed it, we'll gonna start the cockpit server with our service/daemon manager. As of 2015, most of the linux distributions have adopted Systemd whereas some of the linux distributions still run SysVinit to manage daemon, but Cockpit uses systemd for almost everything from running daemons to services. So, we can only setup Cockpit in the latest releases of linux distributions running Systemd. In order to start Cockpit and make it start in every boot of the system, we'll need to run the following command in a terminal or a console. - - # systemctl start cockpit - - # systemctl enable cockpit.socket - - Created symlink from /etc/systemd/system/sockets.target.wants/cockpit.socket to /usr/lib/systemd/system/cockpit.socket. - -### 3. Allowing Firewall ### - -After we have started our cockpit server and enable it to start in every boot, we'll now go for configuring firewall. As we have firewall programs running in our server, we'll need to allow ports in order to make cockpit accessible outside of the server. - -#### On Firewalld #### - - # firewall-cmd --add-service=cockpit --permanent - - success - - # firewall-cmd --reload - - success - -![Cockpit Allowing Firewalld](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-allowing-firewalld.png) - -#### On Iptables #### - - # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT - - # service iptables save - -### 4. Accessing Cockpit Web Interface ### - -Next, we'll gonna finally access the Cockpit web interface using a web browser. We'll simply need to point our web browser to https://ip-address:9090 or https://server.domain.com:9090 according to the configuration. Here, in our tutorial, we'll gonna point our browser to https://128.199.114.17:9090 as shown in the image below. - -![Cockpit Webserver SSL Proceed](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-webserver-ssl-proceed.png) - -We'll be displayed an SSL certification warning as we are using a self-signed SSL certificate. So, we'll simply ignore it and go forward towards the login page, in chrome/chromium, we'll need to click on Show Advanced and then we'll need to click on **Proceed to 128.199.114.17 (unsafe)** . - -![Cockpit Login Screen](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-login-screen.png) - -Now, we'll be asked to enter the login details in order to enter into the dashboard. Here, the username and password is the same as that of the login details we use to login to our linux server. After we enter the login details and click on Log In button, we will be welcomed into the Cockpit Dashboard. - -![Cockpit Dashboard](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-dashboard.png) - -Here, we'll see all the menu and visualization of CPU, Disk, Network, Storage usages of the server. We'll see the dashboard as shown above. - -#### Services #### - -To manage services, we'll need to click on Services button on the menu situated in the right side of the web page. Then, we'll see the services under 5 categories, Targets, System Services, Sockets, Timers and Paths. - -![Cockpit Services](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-services.png) - -#### Docker Containers #### - -We can even manage docker containers with Cockpit. It is pretty easy to monitor and administer Docker containers with Cockpit. As docker isn't installed and running in our server, we'll need to click on Start Docker. - -![Cockpit Container](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-container.png) - -Cockpit will automatically install and run docker in our server. After its running, we see the following screen. Then, we can manage the docker images, containers as per our requirement. - -![Cockpit Containers Mangement](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-containers-mangement.png) - -#### Journal Log Viewer #### - -Cockpit has a managed log viewer which separates the Errors, Warnings, Notices into different tabs. And we also have a tab All where we can see them all in a single place. - -![Cockpit Journal Logs](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-journal-logs.png) - -#### Networking #### - -Under the networking section, we see two graphs in which there is the visualization of Sending and Receiving speed. And we can see there the list of available interfaces with option to Add Bond, Bridge, VLAN. If we need to configure an interface, we can do so by simply clicking on the interface name. Below everything, we can see the Journal Log Viewer for Networking. - -![Cockpit Network](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-network.png) - -#### Storage #### - -Now, its easy with Cockpit to see the R/W speed of our hard disk. We can see the Journal log of the Storage in order to perform troubleshoot and fixes. A clear visualization bar of how much space is occupied is shown in the page. We can even Unmount, Format, Delete a partition of a Hard Disk and more. Features like creating RAID Device, Volume Group is also available in it. - -![Cockpit Storage](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-storage.png) - -#### Account Management #### - -We can easily create new accounts with Cockpit Web Interface. The accounts created in it is applied to the system's user account. We can change password, specify roles, delete, rename user accounts with it. - -![Cockpit Accounts](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-accounts.png) - -#### Live Terminal #### - -This is an awesome feature built-in with Cockpit. Yes, we can execute commands, do stuffs with the live terminal provided by Cockpit interface. This makes us really easy to switch between the web interface and terminal according to our need. - -![Cockpit Terminal](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-terminal.png) - -### Conclusion ### - -Cockpit is a good free and open source software developed by [Red Hat][1] for making the server management easy and simple. It is best for performing simple system administration tasks and is good for the new system administrators. It is still under pre-release as its stable release hasn't been released yet. So, it is not suitable for production. It is currently developed on the latest release of Fedora, CentOS, Arch Linux, RHEL where systemd is installed by default. If you are willing to install Cockpit in Ubuntu, you can get the PPA access but is currently outdated. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank You ! - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/install-cockpit-fedora-centos-rhel-arch-linux/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:http://www.redhat.com/ \ No newline at end of file diff --git a/sources/tech/20151125 Running a mainline kernel on a cellphone.md b/sources/tech/20151125 Running a mainline kernel on a cellphone.md deleted file mode 100644 index c247051def..0000000000 --- a/sources/tech/20151125 Running a mainline kernel on a cellphone.md +++ /dev/null @@ -1,40 +0,0 @@ -Running a mainline kernel on a cellphone -================================================================================ - -One of the biggest freedoms associated with free software is the ability to replace a program with an updated or modified version. Even so, of the many millions of people using Linux-powered phones, few are able to run a mainline kernel on those phones, even if they have the technical skills to do the replacement. The sad fact is that no mainstream phone available runs mainline kernels. A session at the 2015 Kernel Summit, led by Rob Herring, explored this problem and what might be done to address it. - -When asked, most of the developers in the room indicated that they would prefer to be able to run mainline kernels on their phones — though a handful did say that they would rather not do so. Rob has been working on this problem for the last year and a half in support of Project Ara (mentioned in this article). But the news is not good. - -There is, he said, too much out-of-tree code running on a typical handset; mainline kernels simply lack the drivers needed to make that handset work. A typical phone is running 1-3 million lines of out-of-tree code. Almost all of those phones are stuck on the 3.10 kernel — or something even older. There are all kinds of reasons for this, but the simple fact is that things seem to move too quickly in the handset world for the kernel community to keep up. Is that, he asked, something that we care about? - -Tim Bird noted that the Nexus 1, one of the original Android phones, never ran a mainline kernel and never will. It broke the promise of open source, making it impossible for users to put a new kernel onto their devices. At this point, no phone supports that ability. Peter Zijlstra wondered about how much of that out-of-tree code was duplicated functionality from one handset to the next; Rob noted that he has run into three independently developed hotplug governors so far. - -Dirk Hohndel suggested that few people care. Of the billion phones out there, he said, approximately 27 of them have owners who care about running mainline kernels. The rest just want to get the phone to work. Perhaps developers who are concerned about running mainline kernels are trying to solve the wrong problem. - -Chris Mason said that handset vendors are currently facing the same sorts of problems that distributors dealt with many years ago. They are coping with a lot of inefficient, repeated, duplicated work. Once the distributors [Rob Herring] decided to put their work into the mainline instead of carrying it themselves, things got a lot better. The key is to help the phone manufacturers to realize that they can benefit in the same way; that, rather than pressure from users, is how the problem will be solved. - -Grant Likely raised concerns about security in a world where phones cannot be upgraded. What we need is a real distribution market for phones. But, as long as the vendors are in charge of the operating software, phones will not be upgradeable. We have a big security mess coming, he said. Peter added that, with Stagefright, that mess is already upon us. - -Ted Ts'o said that running mainline kernels is not his biggest concern. He would be happy if the phones on sale this holiday season would be running a 3.18 or 4.1 kernel, rather than being stuck on 3.10. That, he suggested, is a more solvable problem. Steve Rostedt said that would not solve the security problem, but Ted remarked that a newer kernel would at least make it easier to backport fixes. Grant replied that, one year from now, it would all just happen again; shipping newer kernels is just an incremental fix. Kees Cook added that there is not much to be gained from backporting fixes; the real problem is that there are no defenses from bugs (he would expand on this theme in a separate session later in the day). - -Rob said that any kind of solution would require getting the vendors on board. That, though, will likely run into trouble with the sort of lockdown that vendors like to apply to their devices. Paolo Bonzini asked whether it would be possible to sue vendors over unfixed security vulnerabilities, especially when the devices are still under warranty. Grant said that upgradeability had to become a market requirement or it simply wasn't going to happen. It might be a nasty security issue that causes this to happen, or carriers might start requiring it. Meanwhile, kernel developers need to keep pushing in that direction. Rob noted that, beyond the advantages noted thus far, the ability to run mainline kernels would help developers to test and validate new features on Android devices. - -Josh Triplett asked whether the community would be prepared to do what it would take if the industry were to come around to the idea of mainline kernel support. There would be lots of testing and validation of kernels on handsets required; Android Compatibility Test Suite failures would have to be treated as regressions. Rob suggested that this could be discussed next year, after the basic functionality is in place, but Josh insisted that, if the demand were to show up, we would have to be able to give a good answer. - -Tim said that there is currently a big disconnect with the vendor world; vendors are not reporting or contributing anything back to the community at all. They are completely disconnected, so there is no forward progress ever. Josh noted that when vendors do report bugs with the old kernels they are using, the reception tends to be less than friendly. Arnd Bergmann said that what was needed was to get one of the big silicon vendors to commit to the idea and get its hardware to a point where running mainline kernels was possible; that would put pressure on the others. But, he added, that would require the existence of one free GPU driver that got shipped with the hardware — something that does not exist currently. - -Rob put up a list of problem areas, but there was not much time for discussion of the particulars. WiFi drivers continue to be an issue, especially with the new features being added in the Android world. Johannes Berg agreed that the new features are an issue; the Android developers do not even talk about them until they ship with the hardware. Support for most of those features does eventually land in the mainline kernel, though. - -As things wound down, Ben Herrenschmidt reiterated that the key was to get vendors to realize that working with the mainline kernel is in their own best interest; it saves work in the long run. Mark Brown said that, in past years when the kernel version shipped with Android moved forward more reliably, the benefits of working upstream were more apparent to vendors. Now that things seem to be stuck on 3.10, that pressure is not there in the same way. The session ended with developers determined to improve the situation, but without any clear plan for getting there. - --------------------------------------------------------------------------------- - -via: https://lwn.net/Articles/662147/ - -作者:[Jonathan Corbet][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://lwn.net/Articles/KernelSummit2015/ diff --git a/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md b/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md deleted file mode 100644 index ff0e0219fb..0000000000 --- a/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md +++ /dev/null @@ -1,425 +0,0 @@ -15 Useful Linux and Unix Tape Managements Commands For Sysadmins -================================================================================ -Tape devices should be used on a regular basis only for archiving files or for transferring data from one server to another. Usually, tape devices are all hooked up to Unix boxes, and controlled with mt or mtx. You must backup all data to both disks (may be in cloud) and tape device. In this tutorial you will learn about: - -- Tape device names -- Basic commands to manage tape drive -- Basic backup and restore commands - -### Why backup? ### - -A backup plant is important: - -- Ability to recover from disk failure -- Accidental file deletion -- File or file system corruption -- Complete server destruction, including destruction of on-site backups due to fire or other problems. - -You can use tape based archives to backup the whole server and move tapes off-site. - -### Understanding tape file marks and block size ### - -![Fig.01: Tape file marks](http://s0.cyberciti.org/uploads/cms/2015/10/tape-format.jpg) - -Fig.01: Tape file marks - -Each tape device can store multiple tape backup files. Tape backup files are created using cpio, tar, dd, and so on. However, tape device can be opened, written data to, and closed by various program. You can store several backups (tapes) on physical tape. Between each tape file is a "tape file mark". This is used to indicate where one tape file ends and another begins on physical tape. You need to use mt command to positions the tape (winds forward and rewinds and marks). - -#### How data is stored on a tape #### - -![Fig.02: How data is stored on a tape](http://s0.cyberciti.org/uploads/cms/2015/10/how-data-is-stored-on-a-tape.jpg) - -Fig.02: How data is stored on a tape - -All data is stored subsequently in sequential tape archive format using tar. The first tape archive will start on the physical beginning of the tape (tar #0). The next will be tar #1 and so on. - -### Tape device names on Unix ### - -1. /dev/rmt/0 or /dev/rmt/1 or /dev/rmt/[0-127] : Regular tape device name on Unix. The tape is rewound. -1. /dev/rmt/0n : This is know as no rewind i.e. after using tape, leaves the tape in current status for next command. -1. /dev/rmt/0b : Use magtape interface i.e. BSD behavior. More-readable by a variety of OS's such as AIX, Windows, Linux, FreeBSD, and more. -1. /dev/rmt/0l : Set density to low. -1. /dev/rmt/0m : Set density to medium. -1. /dev/rmt/0u : Set density to high. -1. /dev/rmt/0c : Set density to compressed. -1. /dev/st[0-9] : Linux specific SCSI tape device name. -1. /dev/sa[0-9] : FreeBSD specific SCSI tape device name. -1. /dev/esa0 : FreeBSD specific SCSI tape device name that eject on close (if capable). - -#### Tape device name examples #### - -- The /dev/rmt/1cn indicate that I'm using unity 1, compressed density and no rewind. -- The /dev/rmt/0hb indicate that I'm using unity 0, high density and BSD behavior. -- The auto rewind SCSI tape device name on Linux : /dev/st0 -- The non-rewind SCSI tape device name on Linux : /dev/nst0 -- The auto rewind SCSI tape device name on FreeBSD: /dev/sa0 -- The non-rewind SCSI tape device name on FreeBSD: /dev/nsa0 - -#### How do I list installed scsi tape devices? #### - -Type the following commands: - - ## Linux (read man pages for more info) ## - lsscsi - lsscsi -g - - ## IBM AIX ## - lsdev -Cc tape - lsdev -Cc adsm - lscfg -vl rmt* - - ## Solaris Unix ## - cfgadm –a - cfgadm -al - luxadm probe - iostat -En - - ## HP-UX Unix ## - ioscan Cf - ioscan -funC tape - ioscan -fnC tape - ioscan -kfC tape - - -Sample outputs from my Linux server: - -![Fig.03: Installed tape devices on Linux server](http://s0.cyberciti.org/uploads/cms/2015/10/linux-find-tape-devices-command.jpg) - -Fig.03: Installed tape devices on Linux server - -### mt command examples ### - -In Linux and Unix-like system, mt command is used to control operations of the tape drive, such as finding status or seeking through files on a tape or writing tape control marks to the tape. You must most of the following command as root user. The syntax is: - - mt -f /tape/device/name operation - -#### Setting up environment #### - -You can set TAPE shell variable. This is the pathname of the tape drive. The default (if the variable is unset, but not if it is null) is /dev/nsa0 on FreeBSD. It may be overridden with the -f option passed to the mt command as explained below. - - ## Add to your shell startup file ## - TAPE=/dev/st1 #Linux - TAPE=/dev/rmt/2 #Unix - TAPE=/dev/nsa3 #FreeBSD - export TAPE - -### 1: Display status of the tape/drive ### - - mt status #Use default - mt -f /dev/rmt/0 status #Unix - mt -f /dev/st0 status #Linux - mt -f /dev/nsa0 status #FreeBSD - mt -f /dev/rmt/1 status #Unix unity 1 i.e. tape device no. 1 - -You can use shell loop as follows to poll a system and locate all of its tape drives: - - for d in 0 1 2 3 4 5 - do - mt -f "/dev/rmt/${d}" status - done - -### 2: Rewinds the tape ### - - mt rew - mt rewind - mt -f /dev/mt/0 rewind - mt -f /dev/st0 rewind - -### 3: Eject the tape ### - - mt off - mt offline - mt eject - mt -f /dev/mt/0 off - mt -f /dev/st0 eject - -### 4: Erase the tape (rewind the tape and, if applicable, unload the tape) ### - - mt erase - mt -f /dev/st0 erase #Linux - mt -f /dev/rmt/0 erase #Unix - -### 5: Retensioning a magnetic tape cartridge ### - -If errors occur when a tape is being read, you can retension the tape, clean the tape drive, and then try again as follows: - - mt retension - mt -f /dev/rmt/1 retension #Unix - mt -f /dev/st0 retension #Linux - -### 6: Writes n EOF marks in the current position of tape ### - - mt eof - mt weof - mt -f /dev/st0 eof - -### 7: Forward space count files i.e. jumps n EOF marks ### - -The tape is positioned on the first block of the next file i.e. tape will position on first block of the field (see fig.01): - - mt fsf - mt -f /dev/rmt/0 fsf - mt -f /dev/rmt/1 fsf 1 #go 1 forward file/tape (see fig.01) - -### 8: Backward space count files i.e. rewinds n EOF marks ### - -The tape is positioned on the first block of the next file i.e. tape positions after EOF mark (see fig.01): - - mt bsf - mt -f /dev/rmt/1 bsf - mt -f /dev/rmt/1 bsf 1 #go 1 backward file/tape (see fig.01) - -Here is a list of the tape position commands: - - fsf Forward space count files. The tape is positioned on the first block of the next file. - - fsfm Forward space count files. The tape is positioned on the last block of the previous file. - - bsf Backward space count files. The tape is positioned on the last block of the previous file. - - bsfm Backward space count files. The tape is positioned on the first block of the next file. - - asf The tape is positioned at the beginning of the count file. Positioning is done by first rewinding the tape and then spacing forward over count filemarks. - - fsr Forward space count records. - - bsr Backward space count records. - - fss (SCSI tapes) Forward space count setmarks. - - bss (SCSI tapes) Backward space count setmarks. - -### Basic backup commands ### - -Let us see commands to backup and restore files - -### 9: To backup directory (tar format) ### - - tar cvf /dev/rmt/0n /etc - tar cvf /dev/st0 /etc - -### 10: To restore directory (tar format) ### - - tar xvf /dev/rmt/0n -C /path/to/restore - tar xvf /dev/st0 -C /tmp - -### 11: List or check tape contents (tar format) ### - - mt -f /dev/st0 rewind; dd if=/dev/st0 of=- - - ## tar format ## - tar tvf {DEVICE} {Directory-FileName} - tar tvf /dev/st0 - tar tvf /dev/st0 desktop - tar tvf /dev/rmt/0 foo > list.txt - -### 12: Backup partition with dump or ufsdump ### - - ## Unix backup c0t0d0s2 partition ## - ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t0d0s2 - - ## Linux backup /home partition ## - dump 0uf /dev/nst0 /dev/sda5 - dump 0uf /dev/nst0 /home - - ## FreeBSD backup /usr partition ## - dump -0aL -b64 -f /dev/nsa0 /usr - -### 12: Restore partition with ufsrestore or restore ### - - ## Unix ## - ufsrestore xf /dev/rmt/0 - ## Unix interactive restore ## - ufsrestore if /dev/rmt/0 - - ## Linux ## - restore rf /dev/nst0 - ## Restore interactive from the 6th backup on the tape media ## - restore isf 6 /dev/nst0 - - ## FreeBSD restore ufsdump format ## - restore -i -f /dev/nsa0 - -### 13: Start writing at the beginning of the tape (see fig.02) ### - - ## This will overwrite all data on tape ## - mt -f /dev/st1 rewind - - ### Backup home ## - tar cvf /dev/st1 /home - - ## Offline and unload tape ## - mt -f /dev/st0 offline - -To restore from the beginning of the tape: - - mt -f /dev/st0 rewind - tar xvf /dev/st0 - mt -f /dev/st0 offline - -### 14: Start writing after the last tar (see fig.02) ### - - ## This will kee all data written so far ## - mt -f /dev/st1 eom - - ### Backup home ## - tar cvf /dev/st1 /home - - ## Unload ## - mt -f /dev/st0 offline - -### 15: Start writing after tar number 2 (see fig.02) ### - - ## To wrtite after tar number 2 (should be 2+1) - mt -f /dev/st0 asf 3 - tar cvf /dev/st0 /usr - - ## asf equivalent command done using fsf ## - mt -f /dev/sf0 rewind - mt -f /dev/st0 fsf 2 - -To restore tar from tar number 2: - - mt -f /dev/st0 asf 3 - tar xvf /dev/st0 - mt -f /dev/st0 offline - -### How do I verify backup tapes created using tar? ### - -It is important that you do regular full system restorations and service testing, it's the only way to know for sure that the entire system is working correctly. See our [tutorial on verifying tar command tape backups][1] for more information. - -### Sample shell script ### - - #!/bin/bash - # A UNIX / Linux shell script to backup dirs to tape device like /dev/st0 (linux) - # This script make both full and incremental backups. - # You need at two sets of five tapes. Label each tape as Mon, Tue, Wed, Thu and Fri. - # You can run script at midnight or early morning each day using cronjons. - # The operator or sys admin can replace the tape every day after the script has done. - # Script must run as root or configure permission via sudo. - # ------------------------------------------------------------------------- - # Copyright (c) 1999 Vivek Gite - # This script is licensed under GNU GPL version 2.0 or above - # ------------------------------------------------------------------------- - # This script is part of nixCraft shell script collection (NSSC) - # Visit http://bash.cyberciti.biz/ for more information. - # ------------------------------------------------------------------------- - # Last updated on : March-2003 - Added log file support. - # Last updated on : Feb-2007 - Added support for excluding files / dirs. - # ------------------------------------------------------------------------- - LOGBASE=/root/backup/log - - # Backup dirs; do not prefix / - BACKUP_ROOT_DIR="home sales" - - # Get todays day like Mon, Tue and so on - NOW=$(date +"%a") - - # Tape devie name - TAPE="/dev/st0" - - # Exclude file - TAR_ARGS="" - EXCLUDE_CONF=/root/.backup.exclude.conf - - # Backup Log file - LOGFIILE=$LOGBASE/$NOW.backup.log - - # Path to binaries - TAR=/bin/tar - MT=/bin/mt - MKDIR=/bin/mkdir - - # ------------------------------------------------------------------------ - # Excluding files when using tar - # Create a file called $EXCLUDE_CONF using a text editor - # Add files matching patterns such as follows (regex allowed): - # home/vivek/iso - # home/vivek/*.cpp~ - # ------------------------------------------------------------------------ - [ -f $EXCLUDE_CONF ] && TAR_ARGS="-X $EXCLUDE_CONF" - - #### Custom functions ##### - # Make a full backup - full_backup(){ - local old=$(pwd) - cd / - $TAR $TAR_ARGS -cvpf $TAPE $BACKUP_ROOT_DIR - $MT -f $TAPE rewind - $MT -f $TAPE offline - cd $old - } - - # Make a partial backup - partial_backup(){ - local old=$(pwd) - cd / - $TAR $TAR_ARGS -cvpf $TAPE -N "$(date -d '1 day ago')" $BACKUP_ROOT_DIR - $MT -f $TAPE rewind - $MT -f $TAPE offline - cd $old - } - - # Make sure all dirs exits - verify_backup_dirs(){ - local s=0 - for d in $BACKUP_ROOT_DIR - do - if [ ! -d /$d ]; - then - echo "Error : /$d directory does not exits!" - s=1 - fi - done - # if not; just die - [ $s -eq 1 ] && exit 1 - } - - #### Main logic #### - - # Make sure log dir exits - [ ! -d $LOGBASE ] && $MKDIR -p $LOGBASE - - # Verify dirs - verify_backup_dirs - - # Okay let us start backup procedure - # If it is Monday make a full backup; - # For Tue to Fri make a partial backup - # Weekend no backups - case $NOW in - Mon) full_backup;; - Tue|Wed|Thu|Fri) partial_backup;; - *) ;; - esac > $LOGFIILE 2>&1 - -### A note about third party backup utilities ### - -Both Linux and Unix-like system provides many third-party utilities which you can use to schedule the creation of backups including tape backups such as: - -- Amanda -- Bacula -- rsync -- duplicity -- rsnapshot - -See also - -- Man pages - [mt(1)][2], [mtx(1)][3], [tar(1)][4], [dump(8)][5], [restore(8)][6] - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/hardware/unix-linux-basic-tape-management-commands/ - -作者:Vivek Gite -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:http://www.cyberciti.biz/faq/unix-verify-tape-backup/ -[2]:http://www.manpager.com/linux/man1/mt.1.html -[3]:http://www.manpager.com/linux/man1/mtx.1.html -[4]:http://www.manpager.com/linux/man1/tar.1.html -[5]:http://www.manpager.com/linux/man8/dump.8.html -[6]:http://www.manpager.com/linux/man8/restore.8.html \ No newline at end of file diff --git a/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md b/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md index bbd79c19a3..b941c3d611 100644 --- a/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md +++ b/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md @@ -105,4 +105,4 @@ via: http://www.itworld.com/article/3003865/open-source-tools/8-things-to-do-aft [3]:https://www.linux.com/learn/tutorials/857788-how-to-convert-videos-in-linux-using-the-command-line [4]:https://www.google.com/intl/en/chrome/browser/desktop/index.html#brand=CHMB&utm_campaign=en&utm_source=en-ha-na-us-sk&utm_medium=ha [5]:http://opensuse-community.org/ -[6]:http://www.itworld.com/article/2875981/the-5-best-open-source-email-clients-for-linux.html \ No newline at end of file +[6]:http://www.itworld.com/article/2875981/the-5-best-open-source-email-clients-for-linux.html diff --git a/sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md b/sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md deleted file mode 100644 index 1e14ff6a7b..0000000000 --- a/sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md +++ /dev/null @@ -1,176 +0,0 @@ -translating by NearTan -How to Install Laravel PHP Framework on CentOS 7 / Ubuntu 15.04 -================================================================================ -Hi All, In this article we are going to setup Laravel on CentOS 7 and Ubuntu 15.04. If you are a PHP web developer then you don't need to worry about of all modern PHP frameworks, Laravel is the easiest to get up and running that saves your time and effort and makes web development a joy. Laravel embraces a general development philosophy that sets a high priority on creating maintainable code by following some simple guidelines, you should be able to keep a rapid pace of development and be free to change your code with little fear of breaking existing functionality. - -Laravel's PHP framework installation is not a big deal. You can simply follow the step by step guide in this article for your CentOS 7 or Ubuntu 15 server. - -### 1) Server Requirements ### - -Laravel depends upon a number of prerequisites that must be setup before installing it. Those prerequisites includes some basic tuning parameter of server like your system update, sudo rights and installation of required packages. - -Once you are connected to your server make sure to configure the fully qualified domain name then run the commands below to enable EPEL Repo and update your server. - -#### CentOS-7 #### - - # yum install epel-release - ----------- - - # rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm - # rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm - ----------- - - # yum update - -#### Ubuntu #### - - # apt-get install python-software-properties - # add-apt-repository ppa:ondrej/php5 - ----------- - - # apt-get update - ----------- - - # apt-get install -y php5 mcrypt php5-mcrypt php5-gd - -### 2) Firewall Setup ### - -System Firewall and SELinux setup is an important part regarding the security of your applications in production. You can make firewall off if you are working on test server and keep SELinux to permissive mode using the below command, so that you installing setup won't be affected by it. - - # setenforce 0 - -### 3) Apache, MariaDB, PHP Setup ### - -Laravel installation requires a complete LAMP stack with OpenSSL, PDO, Mbstring and Tokenizer PHP Extensions. If you are already running LAMP server then you can skip this step to move on and just make sure that the required PHP extensions are installed. - -To install AMP stack you can use the below commands on your respective server. - -#### CentOS #### - - # yum install httpd mariadb-server php56w php56w-mysql php56w-mcrypt php56w-dom php56w-mbstring - -To start and enable Apache web and MySQL/Mariadb services at bootup on CentOS 7 , we will use below commands. - - # systemctl start httpd - # systemctl enable httpd - ----------- - - #systemctl start mysqld - #systemctl enable mysqld - -After starting MariaDB service, we will configure its secured password with below command. - - #mysql_secure_installation - -#### Ubuntu #### - - # apt-get install mysql-server apache2 libapache2-mod-php5 php5-mysql - -### 4) Install Composer ### - -Now we are going to install composer that is one of the most important requirement before starting the Laravel installation that helps in installing Laravel's dependencies. - -#### CentOS/Ubuntu #### - -Run the below commands to setup 'composer' in CentOS/Ubuntu. - - # curl -sS https://getcomposer.org/installer | php - # mv composer.phar /usr/local/bin/composer - # chmod +x /usr/local/bin/composer - -![composer installation](http://blog.linoxide.com/wp-content/uploads/2015/11/14.png) - -### 5) Installing Laravel ### - -Laravel's installation package can be downloaded from github using the command below. - -# wget https://github.com/laravel/laravel/archive/develop.zip - -To extract the archived package and move into the document root directory use below commands. - - # unzip develop.zip - ----------- - - # mv laravel-develop /var/www/ - -Now use the following compose command that will install all required dependencies for Laravel within its directory. - - # cd /var/www/laravel-develop/ - # composer install - -![compose laravel](http://blog.linoxide.com/wp-content/uploads/2015/11/25.png) - -### 6) Key Encryption ### - -For encrypter service, we will be generating a 32 digit encryption key using the command below. - - # php artisan key:generate - - Application key [Lf54qK56s3qDh0ywgf9JdRxO2N0oV9qI] set successfully - -Now put this key into the 'app.php' file as shown below. - - # vim /var/www/laravel-develop/config/app.php - -![Key encryption](http://blog.linoxide.com/wp-content/uploads/2015/11/45.png) - -### 7) Virtua Host and Ownership ### - -After composer installation assign the permissions and apache user ownership to the document root directory as shown. - - # chmod 775 /var/www/laravel-develop/app/storage - ----------- - - # chown -R apache:apache /var/www/laravel-develop - -Open the default configuration file of apache web server using any editor to add the following lines at the end file for new virtual host entry. - - # vim /etc/httpd/conf/httpd.conf - ----------- - - ServerName laravel-develop - DocumentRoot /var/www/laravel/public - - start Directory /var/www/laravel - AllowOverride All - Directory close - -Now the time is to restart apache web server services as shown below and then open your web browser to check your localhost page. - -#### CentOS #### - - # systemctl restart httpd - -#### Ubuntu #### - - # service apache2 restart - -### 8) Laravel 5 Web Access ### - -Open your web browser and give your server IP or Fully Qualified Domain name and you will see the default web page of Laravel 5 frame work. - -![Laravel Default](http://blog.linoxide.com/wp-content/uploads/2015/11/35.png) - -### Conclusion ### - -Laravel Framework is a great tool to develop your web applications. So, at the end of this article you have learned its installation setup on Ubuntu 15 and CentOS 7 , Now start using this awesome PHP framework that provides you a lot of more features and comfort in your development work. Feel free to comment us back for your valuable suggestions an feedback to guide you in more specific and easiest way. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/install-laravel-php-centos-7-ubuntu-15-04/ - -作者:[Kashif][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/kashifs/ diff --git a/sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md b/sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md deleted file mode 100644 index 314d721e38..0000000000 --- a/sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md +++ /dev/null @@ -1,145 +0,0 @@ -Install and Configure Munin monitoring server in Linux -================================================================================ -![](http://www.linuxnix.com/wp-content/uploads/2015/12/munin_page.jpg) - -Munin is an excellent system monitoring tool similar to [RRD tool][1] which will give you ample information about system performance in multiple fronts like **disk, network, process, system and users**. These are some of the default properties Munin monitors. - -### How Munin works? ### - -Munin works in a client-server model. Munin server process on main server try to collect data from client daemon which is running locally(Munin can monitor it’ss own resources) or from remote client(Munin can monitor hundreds of machines) and displays them in graphs on its web interface. - -### Configuring Munin in nutshell ### - -This is of two steps as we have to configure both server and client. -1)Install Munin server package and configure it so that it get data from clients. -2)Configure Munin client so that server will connect to client daemon for data collocation. - -### Install munin server in Linux ### - -Munin server installation on Ubuntu/Debian based machines - - apt-get install munin apache2 - -Munin server installation on Redhat/Centos based machines. Make sure that you [enable EPEL repo][2] before installing Munin on Redhat based machines as by default Redhat based machines do not have Munin in their repos. - - yum install munin httpd - -### Configuring Munin server in Linux ### - -Below are the steps we have to do in order to bring server up. - -1. Add host details which need monitoring in /etc/munin/munin.conf -1. Configure apache web server to include munin details. -1. Create User name and password for web interface -1. Restart apache server - -**Step 1**: Add hosts entry in this file in **/etc/munin/munin.conf**. Go to end of the file and a client to monitor. Here in this example, I added my DB server and its IP address to monitor - -Example: - - [db.linuxnix.com] - address 192.168.1.25 - use_node_name yes - -Save the file and exit. - -**Step 2**: Edit/create munin.conf file in /etc/apache2/conf.d folder to include Munin Apache related configs. In another note, by default other Munin web related configs are kept in /var/www/munin folder. - - vi /etc/apache2/conf.d/munin.conf - -Content: - - Alias /munin /var/www/munin - - Order allow,deny - Allow from localhost 127.0.0.0/8 ::1 - AllowOverride None - Options ExecCGI FollowSymlinks - AddHandler cgi-script .cgi - DirectoryIndex index.cgi - AuthUserFile /etc/munin/munin.passwd - AuthType basic - AuthName "Munin stats" - require valid-user - - ExpiresActive On - ExpiresDefault M310 - - - -Save the file and exit - -**Step 3**: Now create a username and password for viewing muning graphs: - - htpasswd -c /etc/munin/munin-htpasswd munin - -**Note**: For Redhat/Centos machines replace “**apache2**” with “**httpd**” in each path to access your config files. - -**Step 3**: Restart Apache server so that Munin configurations are picked-up by Apache. - -#### Ubuntu/Debian based: #### - - service apache2 restart - -#### Centos/Redhat based: #### - - service httpd restart - -### Install and configure Munin client in Linux ### - -**Step 1**: Install Munin client in Linux - - apt-get install munin-node - -**Note**: If you want to monitor your Munin server, then you have to install munin-node on that as well. - -**Step 2**: Configure client by editing munin-node.conf file. - - vi /etc/munin/munin-node.conf - -Example: - - allow ^127\.0\.0\.1$ - allow ^10\.10\.20\.20$ - ----------- - - # Which address to bind to; - host * - ----------- - - # And which port - port 4949 - -**Note**: 10.10.20.20 is my Munin server and it connections to 4949 port on client to get its data. - -**Step 3**: Restart munin-node on client server - - service munin-node restart - -### Testing connection ### - -check if you are able to connect client from server on 4949 port, other wise you have to open that port on client machine. - - telnet db.linuxnix.com 4949 - -Accessing Munin web interface - - http://munin.linuxnix.com/munin/index.html - -Hope this helps to configure basic Munin server. - --------------------------------------------------------------------------------- - -via: http://www.linuxnix.com/install-and-configure-munin-monitoring-server-in-linux/ - -作者:[Surendra Anne][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxnix.com/author/surendra/ -[1]:http://www.linuxnix.com/network-monitoringinfo-gathering-tools-in-linux/ -[2]:http://www.linuxnix.com/how-to-install-and-enable-epel-repo-in-rhel-centos-oracle-scentific-linux/ diff --git a/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md b/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md deleted file mode 100644 index d3abefacb2..0000000000 --- a/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md +++ /dev/null @@ -1,55 +0,0 @@ -Translating by itsang -NetworkManager and privacy in the IPv6 internet -====================== - -IPv6 is gaining momentum. With growing use of the protocol concerns about privacy that were not initially anticipated arise. The Internet community actively publishes solutions to them. What’s the current state and how does NetworkManager catch up? Let’s figure out! - -![](https://blogs.gnome.org/lkundrak/files/2015/12/cameras1.jpg) - -## The identity of a IPv6-connected host - -The IPv6 enabled nodes don’t need a central authority similar to IPv4 [DHCP](https://tools.ietf.org/html/rfc2132) servers to configure their addresses. They discover the networks they are in and [complete the addresses themselves](https://tools.ietf.org/html/rfc4862) by generating the host part. This makes the network configuration simpler and scales better to larger networks. However, there’s some drawbacks to this approach. Firstly, the node needs to ensure that its address doesn’t collide with an address of any other node on the network. Secondly, if the node uses the same host part of the address in every network it enters then its movement can be tracked and the privacy is at risk. - -Internet Engineering Task Force (IETF), the organization behind the Internet standards, [acknowledged this problem](https://tools.ietf.org/html/draft-iesg-serno-privacy-00) and recommends against use of hardware serial numbers to identify the node in the network. - -But what does the actual implementation look like? - -The problem of address uniqueness is addressed with [Duplicate Address Detection](https://tools.ietf.org/html/rfc4862#section-5.4) (DAD) mechanism. When a node creates an address for itself it first checks whether another node uses the same address using the [Neighbor Discovery Protocol](https://tools.ietf.org/html/rfc4861) (a mechanism not unlike IPv4 [ARP](https://tools.ietf.org/html/rfc826) protocol). When it discovers the address is already used, it must discard it. - -The other problem (privacy) is a bit harder to solve. An IP address (be it IPv4 or IPv6) address consists of a network part and the host part. The host discovers the relevant network parts and is supposed generate the host part. Traditionally it just uses an Interface Identifier derived from the network hardware’s (MAC) address. The MAC address is set at manufacturing time and can uniquely identify the machine. This guarantees the address is stable and unique. That’s a good thing for address collision avoidance but a bad thing for privacy. The host part remaining constant in different network means that the machine can be uniquely identified as it enters different networks. This seemed like non-issue at the time the protocol was designed, but the privacy concerns arose as the IPv6 gained popularity. Fortunately, there’s a solution to this problem. - -## Enter privacy extensions - -It’s no secret that the biggest problem with IPv4 is that the addresses are scarce. This is no longer true with IPv6 and in fact an IPv6-enabled host can use addresses quite liberally. There’s absolutely nothing wrong with having multiple IPv6 addresses attached to the same interface. On the contrary, it’s a pretty standard situation. At the very minimum each node has an address that is used for contacting nodes on the same hardware link called a link-local address.  When the network contains a router that connects it to other networks in the internet, a node has an address for every network it’s directly connected to. If a host has more addresses in the same network the node accepts incoming traffic for all of them. For the outgoing connections which, of course, reveal the address to the remote host, the kernel picks the fittest one. But which one is it? - -With privacy extensions enabled, as defined by [RFC4941](https://tools.ietf.org/html/rfc4941), a new address with a random host part is generated every now and then. The newest one is used for new outgoing connections while the older ones are deprecated when they’re unused. This is a nifty trick — the host does not reveal the stable address as it’s not used for outgoing connections, but still accepts connections to it from the hosts that are aware of it. - -There’s a downside to this. Certain applications tie the address to the user identity. Consider a web application that issues a HTTP Cookie for the user during the authentication but only accepts it for the connections that come from the address that conducted the authentications. As the kernel generates a new temporary address, the server would reject the requests that use it, effectively logging the user out. It could be argued that the address is not an appropriate mechanism for establishing user’s identity but that’s what some real-world applications do. - -## Privacy stable addressing to the rescue - -Another approach would be needed to cope with this. There’s a need for an address that is unique (of course), stable for a particular network but still changes when user enters another network so that tracking is not possible. The RFC7217 introduces a mechanism that provides exactly this. - -Creation of a privacy stable address relies on a pseudo-random key that’s only known the host itself and never revealed to other hosts in the network. This key is then hashed using a cryptographically secure algorithm along with values specific for a particular network connection. It includes an identifier of the network interface, the network prefix and possibly other values specific to the network such as the wireless SSID. The use of the secret key makes it impossible to predict the resulting address for the other hosts while the network-specific data causes it to be different when entering a different network. - -This also solves the duplicate address problem nicely. The random key makes collisions unlikely. If, in spite of this, a collision occurs then the hash can be salted with a DAD failure counter and a different address can be generated instead of failing the network connectivity. Now that’s clever. - -Using privacy stable address doesn’t interfere with the privacy extensions at all. You can use the [RFC7217](https://tools.ietf.org/html/rfc7217) stable address while still employing the RFC4941 temporary addresses at the same time. - -## Where does NetworkManager stand? - -We’ve already enabled the privacy extensions with the release NetworkManager 1.0.4. They’re turned on by default; you can control them with ipv6.ip6-privacy property. - -With the release of NetworkManager 1.2, we’re adding the stable privacy addressing. It’s supposed to address the situations where the privacy extensions don’t make the cut. The use of the feature is controlled with the ipv6.addr-gen-mode property. If it’s set to stable-privacy then stable privacy addressing is used. Setting it to “eui64” or not setting it at all preserves the traditional default behavior. - -Stay tuned for NetworkManager 1.2 release in early 2016! If you want to try the bleeding-edge snapshot, give Fedora Rawhide a try. It will eventually become Fedora 24. - -*I’d like to thank Hannes Frederic Sowa for a valuable feedback. The article would make less sense without his corrections. Hannes also created the in-kernel implementation of the RFC7217 mechanism which can be used when the networking is not managed by NetworkManager.* - --------------------------------------------------------------------------------- - -via: https://blogs.gnome.org/lkundrak/2015/12/03/networkmanager-and-privacy-in-the-ipv6-internet/ -作者:[Lubomir Rintel] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/sources/tech/20151206 Supporting secure DNS in glibc.md b/sources/tech/20151206 Supporting secure DNS in glibc.md deleted file mode 100644 index 8933c3c891..0000000000 --- a/sources/tech/20151206 Supporting secure DNS in glibc.md +++ /dev/null @@ -1,46 +0,0 @@ -Supporting secure DNS in glibc -======================== - -Credit: Jonathan Corbet - -One of the many weak links in Internet security is the domain name system (DNS); it is subject to attacks that, among other things, can mislead applications regarding the IP address of a system they wish to connect to. That, in turn, can cause connections to go to the wrong place, facilitating man-in-the-middle attacks and more. The DNSSEC protocol extensions are meant to address this threat by setting up a cryptographically secure chain of trust for DNS information. When DNSSEC is set up properly, applications should be able to trust the results of domain lookups. As the discussion over an attempt to better integrate DNSSEC into the GNU C Library shows, though, ensuring that DNS lookups are safe is still not a straightforward problem. - -In a sense, the problem was solved years ago; one can configure a local nameserver to perform full DNSSEC verification and use that server via glibc calls in applications. DNSSEC can even be used to increase security in other areas; it can, for example, carry SSH or TLS key fingerprints, allowing applications to verify that they are talking to the right server. Things get tricky, though, when one wants to be sure that DNS results claiming to have DNSSEC verification are actually what they claim to be — when one wants the security that DNSSEC is meant to provide, in other words. - -The /etc/resolv.conf problem - -Part of the problem, from the glibc perspective, is that glibc itself does not do DNSSEC verification. Instead, it consults /etc/resolv.conf and asks the servers found therein to do the lookup and verification; the results are then returned to the application. If the application is using the low-level res_query() interface, those results may include the "authenticated data" (AD) flag (if the nameserver has set it) indicating that DNSSEC verification has been successfully performed. But glibc knows nothing about the trustworthiness of the nameserver that has provided those results, so it cannot tell the application anything about whether they should really be trusted. - -One of the first steps suggested by glibc maintainer Carlos O'Donell is to add an option (dns-strip-dnssec-ad-bit) to the resolv.conf file telling glibc to unconditionally remove the AD bit. This option could be set by distributions to indicate that the DNS lookup results cannot be trusted at a DNSSEC level. Once things have been set up so that the results can be trusted, that option can be removed. In the meantime, though, applications would have a way to judge the DNS lookup results they get from glibc, something that does not exist now. - -What would a trustworthy setup look like? The standard picture looks something like this: there is a local nameserver, accessed via the loopback interface, as the only entry in /etc/resolv.conf. That nameserver would be configured to do verification and, in the case that verification fails, simply return no results at all. There would, in almost all cases, be no need to worry about whether applications see the AD bit or not; if the results are not trustworthy, applications will simply not see them at all. A number of distributions are moving toward this model, but the situation is still not as simple as some might think. - -One problem is that this scheme makes /etc/resolv.conf into a central point of trust for the system. But, in a typical Linux system, there are no end of DHCP clients, networking scripts, and more that will make changes to that file. As Paul Wouters pointed out, locking down this file in the short term is not really an option. Sometimes those changes are necessary: when a diskless system is booting, it may need name-resolution service before it is at a point where it can start up its own nameserver. A system's entire DNS environment may change depending on which network it is attached to. Systems in containers may be best configured to talk to a nameserver on the host. And so on. - -So there seems to be a general belief that /etc/resolv.conf cannot really be trusted on current systems. Ideas to add secondary configuration files (/etc/secure-resolv.conf or whatever) have been floated, but they don't much change the basic nature of the situation. Beyond that, some participants felt that even a local nameserver running on the loopback interface is not really trustworthy; Zack Weinberg suggested that administrators might intentionally short out DNSSEC validation, for example. - -Since the configuration cannot be trusted on current systems, the reasoning goes, glibc needs to have a way to indicate to applications when the situation has improved and things can be trusted. That could include the AD-stripping option described above (or, conversely, an explicit "this nameserver is trusted" option); that, of course, would require that the system be locked down to a level where surprising changes to /etc/resolv.conf no longer happen. A variant, as suggested by Petr Spacek, is to have a way for an application to ask glibc whether it is talking to a local nameserver or not. - -Do it in glibc? - -An alternative would be to dispense with the nameserver and have glibc do DNSSEC validation itself. There is, however, resistance to putting a big pile of cryptographic code into glibc itself. That would increase the size of the library and, it is felt, increase the attack surface of any application using it. A variant of this idea, suggested by Zack, would be to put the validation code into the name-service caching daemon (nscd) instead. Since nscd is part of glibc, it is under the control of the glibc developers and there could be a certain amount of confidence that DNSSEC validation is being performed properly. The location of the nscd socket is well known, so the /etc/resolv.confissues don't come into play. Carlos worried, though, that this approach might deter adoption by users who do not want the caching features of nscd; in his mind, that seems to rule out the nscd option. - -So, in the short term, at least, it seems unlikely that glibc will take on the full task of performing validated DNSSEC lookups. That means that, if security-conscious applications are going to use glibc for their name lookups, the library will have to provide an indication of how trustworthy the results received from a separate nameserver are. And that will almost certainly require explicit action on the part of the distributor and/or system administrator. As Simo Sorce put it: - -A situation in which glibc does not use an explicit configuration option to signal applications that it is using a trusted resolver is not useful ... no scratch that, it is actively harmful, because applications developers will quickly realize they cannot trust any information coming from glibc and will simply not use it for DNSSEC related information. - -Configuring a system to properly use DNSSEC involves change to many of the components of that system — it is a distribution-wide problem that will take time to solve fully. The role that glibc plays in this transition is likely to be relatively small, but it is an important one: glibc is probably the only place where applications can receive some assurance that their DNS results are trustworthy without implementing their own resolver code. Running multiple DNSSEC implementations on a system seems like an unlikely path to greater security, so it would be good to get this right. - -The glibc project has not yet chosen a path by which it intends to get things right, though some sort of annotation in /etc/resolv.conf looks like a likely outcome. Any such change would then have to get into a release; given the conservative nature of glibc development, it may already be late for the 2.23 release, which is likely to happen in February. So higher DNSSEC awareness in glibc may not happen right away, but there is at least some movement in that direction. - ---------------------------- - -via: https://lwn.net/Articles/663474/ - -作者:Jonathan Corbet - -译者:[译者ID](https://github.com/译者ID) - -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md deleted file mode 100644 index 2b543d3444..0000000000 --- a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md +++ /dev/null @@ -1,268 +0,0 @@ -Translating by ZTinoZ -How to Install Bugzilla with Apache and SSL on FreeBSD 10.2 -================================================================================ -Bugzilla is open source web base application for bug tracker and testing tool, develop by mozilla project, and licensed under Mozilla Public License. It is used by high tech company like mozilla, redhat and gnome. Bugzilla was originally created by Terry Weissman in 1998. It written in perl, use MySQL as the database back-end. It is a server software designed to help you manage software development. Bugzilla has a lot of features, optimized database, excellent security, advanced search tool, integrated with email capabilities etc. - -In this tutorial we will install bugzilla 5.0 with apache for the web server, and enable SSL for it. Then install mysql51 as the database system on freebsd 10.2. - -#### Prerequisite #### - - FreeBSD 10.2 - 64bit. - Root privileges. - -### Step 1 - Update System ### - -Log in to the freebsd server with ssl login, and update the repository database : - - sudo su - freebsd-update fetch - freebsd-update install - -### Step 2 - Install and Configure Apache ### - -In this step we will install apache from the freebsd repositories with pkg command. Then configure apache by editing file "httpd.conf" on apache24 directory, configure apache to use SSL, and CGI support. - -Install apache with pkg command : - - pkg install apache24 - -Go to the apache directory and edit the file "httpd.conf" with nanao editor : - - cd /usr/local/etc/apache24 - nano -c httpd.conf - -Uncomment the list line below : - - #Line 70 - LoadModule authn_socache_module libexec/apache24/mod_authn_socache.so - - #Line 89 - LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so - - # Line 117 - LoadModule expires_module libexec/apache24/mod_expires.so - - #Line 141 to enabling SSL - LoadModule ssl_module libexec/apache24/mod_ssl.so - - # Line 162 for cgi support - LoadModule cgi_module libexec/apache24/mod_cgi.so - - # Line 174 to enable mod_rewrite - LoadModule rewrite_module libexec/apache24/mod_rewrite.so - - # Line 219 for the servername configuration - ServerName 127.0.0.1:80 - -Save and exit. - -Next, we need to install mod perl from freebsd repository, and then enable it : - - pkg install ap24-mod_perl2 - -To enable mod_perl, edit httpd.conf and add to the "Loadmodule" line below : - - nano -c httpd.conf - -Add line below : - - # Line 175 - LoadModule perl_module libexec/apache24/mod_perl.so - -Save and exit. - -And before start apache, add it to start at boot time with sysrc command : - - sysrc apache24_enable=yes - service apache24 start - -### Step 3 - Install and Configure MySQL Database ### - -We will use mysql51 for the database back-end, and it is support for perl module for mysql. Install mysql51 with pkg command below : - - pkg install p5-DBD-mysql51 mysql51-server mysql51-client - -Now we must add mysql to the boot time, and then start and configure the root password for mysql. - -Run command below to do it all : - - sysrc mysql_enable=yes - service mysql-server start - mysqladmin -u root password aqwe123 - -Note : - -mysql password : aqwe123 - -![Configure MySQL Password](http://blog.linoxide.com/wp-content/uploads/2015/12/Configure-MySQL-Password.png) - -Next, we will log in to the mysql shell with user root and password that we've configured above, then we will create new database and user for bugzilla installation. - -Log in to the mysql shell with command below : - - mysql -u root -p - password: aqwe123 - -Add the database : - - create database bugzilladb; - create user bugzillauser@localhost identified by 'bugzillauser@'; - grant all privileges on bugzilladb.* to bugzillauser@localhost identified by 'bugzillauser@'; - flush privileges; - \q - -![Creating Database for Bugzilla](http://blog.linoxide.com/wp-content/uploads/2015/12/Creating-Database-for-Bugzilla.png) - -Database for bugzilla is created, database "bugzilladb" with user "bugzillauser" and password "bugzillauser@". - -### Step 4 - Generate New SSL Certificate ### - -Generate new self signed ssl certificate on directory "ssl" for bugzilla site. - -Go to the apache24 directory and create new directory "ssl" on it : - - cd /usr/local/etc/apache24/ - mkdir ssl; cd ssl - -Next, generate the certificate file with openssl command, then change the permission of the certificate file : - - sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /usr/local/etc/apache24/ssl/bugzilla.key -out /usr/local/etc/apache24/ssl/bugzilla.crt - chmod 600 * - -### Step 5 - Configure Virtualhost ### - -We will install bugzilla on directory "/usr/local/www/bugzilla", so we must create new virtualhost configuration for it. - -Go to the apache directory and create new directory called "vhost" for virtualhost file : - - cd /usr/local/etc/apache24/ - mkdir vhost; cd vhost - -Now create new file "bugzilla.conf" for the virtualhost file : - - nano -c bugzilla.conf - -Paste configuration below : - - - ServerName mybugzilla.me - ServerAlias www.mybuzilla.me - DocumentRoot /usr/local/www/bugzilla - Redirect permanent / https://mybugzilla.me/ - - - Listen 443 - - ServerName mybugzilla.me - DocumentRoot /usr/local/www/bugzilla - - ErrorLog "/var/log/mybugzilla.me-error_log" - CustomLog "/var/log/mybugzilla.me-access_log" common - - SSLEngine On - SSLCertificateFile /usr/local/etc/apache24/ssl/bugzilla.crt - SSLCertificateKeyFile /usr/local/etc/apache24/ssl/bugzilla.key - - - AddHandler cgi-script .cgi - Options +ExecCGI - DirectoryIndex index.cgi index.html - AllowOverride Limit FileInfo Indexes Options - Require all granted - - - -Save and exit. - -If all is done, create new directory for bugzilla installation and then enable the bugzilla virtualhost by adding the virtualhost configuration to httpd.conf file. - -Run command below on "apache24" directory : - - mkdir -p /usr/local/www/bugzilla - cd /usr/local/etc/apache24/ - nano -c httpd.conf - -In the end of the line, add configuration below : - - Include etc/apache24/vhost/*.conf - -Save and exit. - -Now test the apache configuration with "apachectl" command and restart it : - - apachectl configtest - service apache24 restart - -### Step 6 - Install Bugzilla ### - -We can install bugzilla manually by downloading the source, or install it from freebsd repository. In this step we will install bugzilla from freebsd repository with pkg command : - - pkg install bugzilla50 - -If it's done, go to the bugzilla installation directory and install all perl module that needed by bugzilla. - - cd /usr/local/www/bugzilla - ./install-module --all - -Wait it until all is finished, it is take the time. - -Next, generate the configuration file "localconfig" by executing "checksetup.pl" file on bugzilla installation directory. - - ./checksetup.pl - -You will see the error message about the database configuration, so edit the file "localconfig" with nano editor : - - nano -c localconfig - -Now add the database that was created on step 3. - - #Line 57 - $db_name = 'bugzilladb'; - - #Line 60 - $db_user = 'bugzillauser'; - - #Line 67 - $db_pass = 'bugzillauser@'; - -Save and exit. - -Then run "checksetup.pl" again : - - ./checksetup.pl - -You will be prompt about mail and administrator account, fill all of it with your email, user and password. - -![Admin Setup](http://blog.linoxide.com/wp-content/uploads/2015/12/Admin-Setup.png) - -In the last, we need to change the owner of the installation directory to user "www", then restart apache with service command : - - cd /usr/local/www/ - chown -R www:www bugzilla - service apache24 restart - -Now Bugzilla is installed, you can see it by visiting mybugzilla.me and you will be redirect to the https connection. - -Bugzilla home page. - -![Bugzilla Home](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Home.png) - -Bugzilla admin panel. - -![Bugzilla Admin Page](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Admin-Page.png) - -### Conclusion ### - -Bugzilla is web based application help you to manage the software development. It is written in perl and use MySQL as the database system. Bugzilla used by mozilla, redhat, gnome etc for help their software development. Bugzilla has a lot of features and easy to configure and install. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/tools/install-bugzilla-apache-ssl-freebsd-10-2/ - -作者:[Arul][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arulm/ diff --git a/sources/tech/20151215 How to block network traffic by country on Linux.md b/sources/tech/20151215 How to block network traffic by country on Linux.md deleted file mode 100644 index 1f2d39f04d..0000000000 --- a/sources/tech/20151215 How to block network traffic by country on Linux.md +++ /dev/null @@ -1,110 +0,0 @@ -How to block network traffic by country on Linux -================================================================================ -As a system admin who maintains production Linux servers, there are circumstances where you need to **selectively block or allow network traffic based on geographic locations**. For example, you are experiencing denial-of-service attacks mostly originating from IP addresses registered with a particular country. You want to block SSH logins from unknown foreign countries for security reasons. Your company has a distribution right to online videos, which requires it to legally stream to particular countries only. You need to prevent any local host from uploading documents to any non-US remote cloud storage due to geo-restriction company policies. - -All these scenarios require an ability to set up a firewall which does **country-based traffic filtering**. There are a couple of ways to do that. For one, you can use TCP wrappers to set up conditional blocking for individual applications (e.g., SSH, NFS, httpd). The downside is that the application you want to protect must be built with TCP wrappers support. Besides, TCP wrappers are not universally available across different platforms (e.g., Arch Linux [dropped][2] its support). An alternative approach is to set up [ipset][3] with country-based GeoIP information and apply it to iptables rules. The latter approach is more promising as the iptables-based filtering is application-agnostic and easy to set up. - -In this tutorial, I am going to present **another iptables-based GeoIP filtering which is implemented with xtables-addons**. For those unfamiliar with it, xtables-addons is a suite of extensions for netfilter/iptables. Included in xtables-addons is a module called xt_geoip which extends the netfilter/iptables to filter, NAT or mangle packets based on source/destination countries. For you to use xt_geoip, you don't need to recompile the kernel or iptables, but only need to build xtables-addons as modules, using the current kernel build environment (/lib/modules/`uname -r`/build). Reboot is not required either. As soon as you build and install xtables-addons, xt_geoip is immediately usable with iptables. - -As for the comparison between xt_geoip and ipset, the [official source][3] mentions that xt_geoip is superior to ipset in terms of memory foot print. But in terms of matching speed, hash-based ipset might have an edge. - -In the rest of the tutorial, I am going to show **how to use iptables/xt_geoip to block network traffic based on its source/destination countries**. - -### Install Xtables-addons on Linux ### - -Here is how you can compile and install xtables-addons on various Linux platforms. - -To build xtables-addons, you need to install a couple of dependent packages first. - -#### Install Dependencies on Debian, Ubuntu or Linux Mint #### - - $ sudo apt-get install iptables-dev xtables-addons-common libtext-csv-xs-perl pkg-config - -#### Install Dependencies on CentOS, RHEL or Fedora #### - -CentOS/RHEL 6 requires EPEL repository being set up first (for perl-Text-CSV_XS). - - $ sudo yum install gcc-c++ make automake kernel-devel-`uname -r` wget unzip iptables-devel perl-Text-CSV_XS - -#### Compile and Install Xtables-addons #### - -Download the latest `xtables-addons` source code from the [official site][4], and build/install it as follows. - - $ wget http://downloads.sourceforge.net/project/xtables-addons/Xtables-addons/xtables-addons-2.10.tar.xz - $ tar xf xtables-addons-2.10.tar.xz - $ cd xtables-addons-2.10 - $ ./configure - $ make - $ sudo make install - -Note that for Red Hat based systems (CentOS, RHEL, Fedora) which have SELinux enabled by default, it is necessary to adjust SELinux policy as follows. Otherwise, SELinux will prevent iptables from loading xt_geoip module. - - $ sudo chcon -vR --user=system_u /lib/modules/$(uname -r)/extra/*.ko - $ sudo chcon -vR --type=lib_t /lib64/xtables/*.so - -### Install GeoIP Database for Xtables-addons ### - -The next step is to install GeoIP database which will be used by xt_geoip for IP-to-country mapping. Conveniently, the xtables-addons source package comes with two helper scripts for downloading GeoIP database from MaxMind and converting it into a binary form recognized by xt_geoip. These scripts are found in geoip folder inside the source package. Follow the instructions below to build and install GeoIP database on your system. - - $ cd geoip - $ ./xt_geoip_dl - $ ./xt_geoip_build GeoIPCountryWhois.csv - $ sudo mkdir -p /usr/share/xt_geoip - $ sudo cp -r {BE,LE} /usr/share/xt_geoip - -According to [MaxMind][5], their GeoIP database is 99.8% accurate on a country-level, and the database is updated every month. To keep the locally installed GeoIP database up-to-date, you want to set up a monthly [cron job][6] to refresh the local GeoIP database as often. - -### Block Network Traffic Originating from or Destined to a Country ### - -Once xt_geoip module and GeoIP database are installed, you can immediately use the geoip match options in iptables command. - - $ sudo iptables -m geoip --src-cc country[,country...] --dst-cc country[,country...] - -Countries you want to block are specified using [two-letter ISO3166 code][7] (e.g., US (United States), CN (China), IN (India), FR (France)). - -For example, if you want to block incoming traffic from Yemen (YE) and Zambia (ZM), the following iptables command will do. - - $ sudo iptables -I INPUT -m geoip --src-cc YE,ZM -j DROP - -If you want to block outgoing traffic destined to China (CN), run the following command. - - $ sudo iptables -A OUTPUT -m geoip --dst-cc CN -j DROP - -The matching condition can also be "negated" by prepending "!" to "--src-cc" or "--dst-cc". For example: - -If you want to block all incoming non-US traffic on your server, run this: - - $ sudo iptables -I INPUT -m geoip ! --src-cc US -j DROP - -![](https://c2.staticflickr.com/6/5654/23665427845_050241b03f_c.jpg) - -#### For Firewall-cmd Users #### - -Some distros such as CentOS/RHEL 7 or Fedora have replaced iptables with firewalld as the default firewall service. On such systems, you can use firewall-cmd to block traffic using xt_geoip similarly. The above three examples can be rewritten with firewall-cmd as follows. - - $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -m geoip --src-cc YE,ZM -j DROP - $ sudo firewall-cmd --direct --add-rule ipv4 filter OUTPUT 0 -m geoip --dst-cc CN -j DROP - $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -m geoip ! --src-cc US -j DROP - -### Conclusion ### - -In this tutorial, I presented iptables/xt_geoip which is an easy way to filter network packets based on their source/destination countries. This can be a useful arsenal to deploy in your firewall system if needed. As a final word of caution, I should mention that GeoIP-based traffic filtering is not a foolproof way to ban certain countries on your server. GeoIP database is by nature inaccurate/incomplete, and source/destination geography can easily be spoofed using VPN, Tor or any compromised relay hosts. Geography-based filtering can even block legitimate traffic that should not be banned. Understand this limitation before you decide to deploy it in your production environment. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/block-network-traffic-by-country-linux.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:https://www.archlinux.org/news/dropping-tcp_wrappers-support/ -[2]:http://xmodulo.com/block-unwanted-ip-addresses-linux.html -[3]:http://xtables-addons.sourceforge.net/geoip.php -[4]:http://xtables-addons.sourceforge.net/ -[5]:https://support.maxmind.com/geoip-faq/geoip2-and-geoip-legacy-databases/how-accurate-are-your-geoip2-and-geoip-legacy-databases/ -[6]:http://ask.xmodulo.com/add-cron-job-linux.html -[7]:https://en.wikipedia.org/wiki/ISO_3166-1 \ No newline at end of file diff --git a/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md b/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md index b544517f5e..73d16fe1bd 100644 --- a/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md +++ b/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md @@ -1,4 +1,3 @@ -translation by strugglingyouth Linux Desktop Fun: Summon Swarms Of Penguins To Waddle About The Desktop ================================================================================ XPenguins is a program for animating cute cartoons animals in your root window. By default it will be penguins they drop in from the top of the screen, walk along the tops of your windows, up the side of your windows, levitate, skateboard, and do other similarly exciting things. Now you can send an army of cute little penguins to invade the screen of someone else on your network. diff --git a/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md b/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md index 7388b7693e..36c28d25d6 100644 --- a/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md +++ b/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md @@ -1,7 +1,3 @@ -translating by ezio - - - Securi-Pi: Using the Raspberry Pi as a Secure Landing Point ================================================================================ diff --git a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md index 45dbf42e96..99f1ceed04 100644 --- a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md +++ b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md @@ -1,4 +1,3 @@ -translate by zky001 * * * # GCC-Inline-Assembly-HOWTO @@ -626,6 +625,6 @@ If you have found any glaring typos, or outdated info in this document, please l * * * via: http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html - 作者:[Sandeep.S](mailto:busybox@sancharnet.in) 译者:[zky001](https://github.com/zky001) 校对:[]() + 作者:[Sandeep.S](mailto:busybox@sancharnet.in) 译者:[](https://github.com/) 校对:[]() 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/sources/tech/20151222 Turn Tor socks to http.md b/sources/tech/20151222 Turn Tor socks to http.md deleted file mode 100644 index da6eb0ed5a..0000000000 --- a/sources/tech/20151222 Turn Tor socks to http.md +++ /dev/null @@ -1,86 +0,0 @@ -Turn Tor socks to http -================================================================================ -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/12/tor-593x445.jpg) - -For using Tor service you can use diffrent tools like Tor browser, Foxyproxy and other things, some download managers such as Wget or Aria2 can’t get Tor socks directly and start downloading anonymously with that so we need some tools to change Tor socks to http and then download with that. - -**Note** : This tutorial is under Debian distrobutions and in other distrobutions may be diffrent so if your distro is Debian base and you have configured Tor correctly go a head ! - -**Polipo** : This service uses 8123 Port and 127.0.0.1 IP, use following command to install Polipo on your computer : - - sudo apt install polipo - -Now use this command to go in Polipo config file: - - sudo nano /etc/polipo/config - -Add the following lines to the end of the file : - - proxyAddress = "::0" - allowedClients = 192.168.1.0/24 - socksParentProxy = "localhost:9050" - socksProxyType = socks5 - -Restart the Polipo service with this command : - - sudo service polipo restart - -Now Polipo is ready ! do what ever you like in anonymous world ! as example of how using it : - - pdmt -l "link" -i 127.0.01 -p 8123 - -With command above, PDMT ( Persian Download Manager Terminal ) will download your file anonymously. - -**Proxychains** : In this service you can set Tor or Lantern proxy to turn socks too but in usage it’s a little diffrent with Polipo and Privoxy because you don’t need to use any port ! for installing that use following command : - - sudo apt install proxychains - -Open config file with this command : - - sudo nano /etc/proxychains.conf - -Now add the following code to the end of text, this code is Tor port and Ip : - - socks5 127.0.0.1 9050 - -If you put “proxychains” word before a command in terminal and run it, it would run by Tor proxy : - - proxychains firefoxt - proxychains aria2c - proxychains wget - -**Privoxy** : Privoxy uses 8118 port and it’s easy to run first install privoxy package : - - sudo apt install privoxy - -We should change the config file now : - - sudo nano /etc/pivoxy/config - -Add the following lines to end of the file : - - forward-socks5 / 127.0.0.1:9050 . - forward-socks4a / 127.0.0.1:9050 . - forward-socks5t / 127.0.0.1:9050 . - forward 192.168.*.*/ . - forward 10.*.*.*/ . - forward 127.*.*.*/ . - forward localhost/ . - -Restart the service : - - sudo service privoxy restart - -Service is ready ! port is 8118 and Ip is 127.0.0.1 use it and enjoy from it ! - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/turn-tor-socks-http/ - -作者:[Hossein heydari][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/hossein/ \ No newline at end of file diff --git a/sources/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md b/sources/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md deleted file mode 100644 index b4a2f886a1..0000000000 --- a/sources/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md +++ /dev/null @@ -1,105 +0,0 @@ -How to Setup SSH Login Without Password CentOS / RHEL -================================================================================ -![](http://www.ehowstuff.com/wp-content/uploads/2015/12/notebook-1071774_1280.jpg) - -As a system administrator, you plan on using OpenSSH for Linux and automate your daily tasks such as transferring files or database dump file for the backup to another server. To achieve this goal, you need to log in automatically from the host A to host B. Login automatically mean you do not want to enter any password because you want to use ssh from a shell script. - -In this article we’ll show you how to Setup SSH Login without Password on CentOS / RHEL. After automatic login has been configured, you can use it to move the file using SSH (Secure Shell) and secure copy (SCP). - -SSH is open source and the most trusted network protocol which is used to login to the remote server. It is used by system administrators to execute commands, also used to transfer files from one computer to another over a network using SCP protocol. - -After you setup SSH login without password, you can get the following advantages : - -a) Automate your daily task via scripts. -b) Enhance security of your linux server. This is one of the recommended method to prevent a brute force attack on virtual private server (VPS), SSH keys are nearly impossible to decipher by brute force alone. - -### What is ssh-keygen ### - -ssh-keygen is a Unix utility that is used to generate, create, manage the public and private keys for ssh authentication. With the help of the ssh-keygen tool, a user can create passphrase keys for both SSH protocol version 1 and version 2. ssh-keygen creates RSA keys for SSH protocol version 1 and RSA or DSA keys for use by SSH protocol version 2. - -### What is ssh-copy-id ### - -ssh-copy-id is a script that copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also append the indicated identity file to that machine’s ~/.ssh/authorized_keys file and assigns proper permission to the remote-host’s home. - -### SSH keys ### - -SSH keys provide better and secure way of logging into a linux server with SSH. After you run ssh-keygen, you will generate public key and private key. You can place the public key on any server, and then unlock it by connecting to it with a client that already has the private key. When the two match up, the system unlocks without the need for a password. - -### Setup SSH Login Without Password on CentOS and RHEL. ### - -This steps tested on CentOS 5/6/7, RHEL 5/6/7 and Oracle Linux 6/7. - -Node1 : 192.168.0.9 -Node2 : 192.168.l.10 - -#### Step One : #### - -Test the connection and access from node1 to node2 : - - [root@node1 ~]# ssh root@192.168.0.10 - The authenticity of host '192.168.0.10 (192.168.0.10)' can't be established. - RSA key fingerprint is 6d:8f:63:9b:3b:63:e1:72:b3:06:a4:e4:f4:37:21:42. - Are you sure you want to continue connecting (yes/no)? yes - Warning: Permanently added '192.168.0.10' (RSA) to the list of known hosts. - root@192.168.0.10's password: - Last login: Thu Dec 10 22:04:55 2015 from 192.168.0.1 - [root@node2 ~]# - -#### Step Two : #### - -Generate public and private keys using ssh-key-gen. Please take note that you can increase security by protecting the private key with a passphrase. - - [root@node1 ~]# ssh-keygen - Generating public/private rsa key pair. - Enter file in which to save the key (/root/.ssh/id_rsa): - Enter passphrase (empty for no passphrase): - Enter same passphrase again: - Your identification has been saved in /root/.ssh/id_rsa. - Your public key has been saved in /root/.ssh/id_rsa.pub. - The key fingerprint is: - b4:51:7e:1e:52:61:cd:fb:b2:98:4b:ad:a1:8b:31:6d root@node1.ehowstuff.local - The key's randomart image is: - +--[ RSA 2048]----+ - | . ++ | - | o o o | - | o o o . | - | . o + .. | - | S . . | - | . .. .| - | o E oo.o | - | = ooo. | - | . o.o. | - +-----------------+ - -#### Step Three : #### - -Copy or transfer the public key to remote-host using ssh-copy-id command. It will append the indicated identity file to ~/.ssh/authorized_keys on node2 : - - [root@node1 ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.0.10 - root@192.168.0.10's password: - Now try logging into the machine, with "ssh '192.168.0.10'", and check in: - - .ssh/authorized_keys - - to make sure we haven't added extra keys that you weren't expecting. - -#### Step Four : #### - -Try SSH login without Password to node2 : - - [root@node1 ~]# ssh root@192.168.0.10 - Last login: Sun Dec 13 14:03:20 2015 from www.ehowstuff.local - -I hope this article gives you some ideas and quick guide on how to setup SSH login without password on Linux CentOS / RHEL. - --------------------------------------------------------------------------------- - -via: http://www.ehowstuff.com/ssh-login-without-password-centos/ - -作者:[skytech][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.ehowstuff.com/author/skytech/ diff --git a/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md b/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md deleted file mode 100644 index b10e7ed47e..0000000000 --- a/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md +++ /dev/null @@ -1,106 +0,0 @@ -How to Use Glances to Monitor System on Ubuntu -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/12/glances_featured.jpg) - -Glances is a cross-platform command-line text-based tool to monitor your system. It is written in Python language and uses the `psutil` library to get information from the system. Using it you can monitor CPU, Load Average, Memory, Network Interfaces, Disk I/O, File System spaces utilization, mounted devices, total number of active processes and top processes. There are many interesting options available in Glances. One of the main features is that you can set thresholds (careful, warning and critical) in a configuration file, and information will be shown in colors which indicates the bottleneck in the system. - -### Glances Features ### - -- the average CPU load -- total number of processes like active, sleeping processes, etc. -- total memory information like RAM, swap, free memory, etc. -- CPU information -- Network download and upload speed of connections -- Disk I/O read/write speed details -- Currently mounted devices’ disk usages -- Top processes with their CPU/memory usages - -### Installing Glances ### - -Installing Glances on Ubuntu is easy, as it is available on Ubuntu’s repository. You can install Glances by running the following command. - - sudo apt-get install glances - -### Usage of Glances ### - -After installation has been finished, you can launch Glances by running the following command: - - glances - -You will see an output like the following: - -![glances monitor system output](https://www.maketecheasier.com/assets/uploads/2015/12/glances_output1.png) - -Press ESC or “Ctrl + C” to quit from the Glances terminal. - -By default, the interval time is set to 1 second, but you can define the custom interval time while running glances from the terminal. - -To set the interval time to 5 seconds, run the following command: - - glances -t 5 - -### Glances Color Codes ### - -Glances color code meanings: - -- `GREEN` : OK -- `BLUE` : CAREFUL -- `VIOLET` : ALERT -- `RED` : CRITICAL - -By default, Glances thresholds set is: careful=50, warning=70, critical=90. You can customize the threshold by using the default configuration file glances.conf located at the “/etc/glances/” directory. - -### Glances Options ### - -Glances provides sever so hot keys to find output information while it is running. - -Below are the list of several hot keys. - -- `m` : sort processes by MEM% -- `p` : sort processes by name -- `c` : sort processes by CPU% -- `d` : show/hide disk I/O stats -- `a` : sort processes automatically -- `f` : show/hide file system statshddtemp -- `i` : sort processes by I/O rate -- `s` : show/hide sensors’ stats -- `y` : show/hide hddtemp stats -- `l` : show/hide logs -- `n` : show/hide network stats -- `x` : delete warning and critical logs -- `h` : show/hide help screen -- `q` : quit -- `w` : delete warning logs - -### Use Glances to Monitor Remote Systems ### - -You can also monitor remote systems using Glances. To use it on a remote system, use the following command: - - glances -s - -You will see an output like the following: - -![glances monitor remote system server](https://www.maketecheasier.com/assets/uploads/2015/12/glances_server.png) - -You will see Glances running on port 61209. - -Now, go to the remote machine and execute the following command to connect to a Glances server by specifying the IP address as shown below. For example, 192.168.1.10 is your Glances server IP address. - - glances -c -P 192.168.1.10 - -### Conclusion ### - -Glances is a very useful tool for every Linux system administrator. Using it, you can easily monitor your Linux system in less time. Feel free to comment if you have any questions. - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/glances-monitor-system-ubuntu/ - -作者:[Hitesh Jethva][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.maketecheasier.com/author/hiteshjethva/ - diff --git a/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md b/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md deleted file mode 100644 index a0edd16870..0000000000 --- a/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md +++ /dev/null @@ -1,101 +0,0 @@ -Monitor Linux System Performance Using Nmon -================================================================================ -Nmon (also known as Nigel’s Monitor) is a computer performance system monitor tool for the AIX and Linux operating systems developed by IBM employee Nigel Griffiths. The tool displays onscreen or saves to a data file the operating system statistics to aid in the understanding of computer resource use, tuning options and bottlenecks. This system benchmark tool gives you a huge amount of important performance information in one go with a single command. You can easily monitor your system’s CPU, memory, network, disks, file systems, NFS, top processes, resources and power micro-partition information using Nmon. - -### Installing Nmon ### - -By default nmon is available in the Ubuntu repository. You can easily install nmon by running the following command: - - sudo apt-get install nmon - -How to Use Nmon to Monitor Linux Performance - -Once the installation has been finished, you can launch it by typing the `nmon` command in the terminal. - - nmon - -You wI’ll see the following output: - -![nmon-output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon-output.png) - -You can see from the above screenshot that the nmon command-line utility runs completely in interactive mode, and you can easily toggle statistics using shortcut keys. - -You can use the following nmon keyboard shortcuts to display different system stats: - -- `q` : to stop and exit Nmon -- `h` : to see help screen -- `c` : see CPU stats -- `m` : see memory stats -- `d` : see disk stats -- `k` : see kernel stats -- `n` : see network stats -- `N` : see NFS stats -- `j` : see file system stats -- `t` : see top process -- `V` : see virtual memory stats -- `v` : verbose mode - -### Check CPU by Processor ### - -If you would like to collect some statistics on CPU performance, you should hit the c key on the keyboard. - -After hitting the c key you wI’ll see the following output. - -![nmon_cpu_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_cpu_output.png) - -### Check Top Process Statistics ### - -To get stats on top processes that are running on your system, press the t key on your keyboard. - -You will see the following output. - -![nmon_process_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_process_output.jpg) - -### Check Network Statistics ### - -To get the network stats of your Linux system, just press the n key on your keyboard. - -You wI’ll see the following output: - -![n_network_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_network_output.png) - -### Disk I/O Graphs ### - -Use the `d` key to get information about disks. - -You wI’ll see the following output: - -![nmon_disk_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_disk_output.png) - -### Check Kernel Information ### - -A most important key to use with this tool is `k;` it is used to display some brief information on the kernel of your system. - -You will see the following output after hitting the `k` key on your keyboard. - -![nmon_kernel_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_kernel_output.png) - -### Get System Information ### - -A very useful key for every system admin is the `r` key which is used to give information on different resources such as machine architecture, operating system version, Linux version and CPU. - -You will see the following output by hitting the `r` key. - -![nmon_system_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_system_output.png) - -### Conclusion ### - -There are many other tools that can do the same job of the Nmon, but Nmon is so usee friendly for a Linux beginner. Please feel free to comment if you have any questions. - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/monitor-linux-system-performance/ - -作者:[Hitesh Jethva][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.maketecheasier.com/author/hiteshjethva/ - diff --git a/sources/tech/20151227 Ubuntu Touch, three years later.md b/sources/tech/20151227 Ubuntu Touch, three years later.md new file mode 100644 index 0000000000..3d467163cf --- /dev/null +++ b/sources/tech/20151227 Ubuntu Touch, three years later.md @@ -0,0 +1,68 @@ +Back in early 2013, your editor [dedicated a sacrificial handset][2] to the testing of the then-new Ubuntu Touch distribution. At that time, things were so unbaked that the distribution came with mocked-up data for unready apps; it even came with a set of fake tweets. Nearly three years later, it seemed time to give Ubuntu Touch another try on another sacrificial device. This distribution has certainly made some progress in those years, but, sadly, it still seems far from being a competitive offering in this space. +In particular, your editor tested version 16.04r3 from the testing channel on a Nexus 4 handset. The Nexus 4 is certainly past its prime at the end of 2015, but it still functions as a credible Android device. It is, in any case, the only phone handset on [the list of supported devices][1] other than the three that were sold (in locations far from your editor's home) with Ubuntu Touch pre-installed. It is a bit discouraging that Ubuntu Touch is not supported on a more recent device; the Nexus 4 was discontinued over two years ago. + +People who are accustomed to putting strange systems on Nexus devices know the drill fairly well: unlock the bootloader, install a new recovery image if necessary, then use the **fastboot** tool to flash a new image. Ubuntu Touch does not work that way; instead, one must use a set of tools available only on the Ubuntu desktop distribution. Your editor's current menagerie of systems does not include any of those, but, fortunately, running the Ubuntu 15.10 distribution off a USB drive works just fine. It must be said, though, that Ubuntu appears not to have gotten the memo regarding high-DPI laptop displays; 15.10 is an exercise in eyestrain on such a device. + +Once the requisite packages have been installed, the **ubuntu-device-flash** command can be used to install Ubuntu Touch on the phone. It finds the installation image wherever Canonical hides them (it's not obvious where that is) and puts it onto the phone; the process, on the Nexus 4, took about three hours — a surprisingly long time. Among other things, it installs a Ubuntu-specific recovery image, regardless of whether that should be necessary or not. The installation takes up about 4.5GB of space on the device. At the end, the phone reboots and comes up with the Ubuntu Touch lock screen, which has changed little in the last three years. The first boot takes a discouragingly long time, but subsequent reboots are faster, perhaps faster than Android on the same device. + +Alas, that's about the only thing that is faster than Android. The phone starts sluggish and gets worse as time goes on. At one point it took a solid minute to get the dialer screen up on the running device. Scrolling can be jerky and unpleasant to work with. At least once, the phone bogged down to the point that there was little alternative to shutting it down and starting over. + +Logging into the device over the USB connection offers some clues as to why that might be. There were no less than 258 processes running on the system. A number of them have "evolution" in their name, which is never a good sign even on a heftier system. Daemons like NetworkManager and pulseaudio are running. In general, Ubuntu Touch seems to have a large number of relatively large moving parts, leading, seemingly, to memory pressure and a certain amount of thrashing. + +Three years ago, Ubuntu Touch was built on an Android chassis. There are still bits of Android that show up here and there (it uses binder, for example), but a number of those components have been replaced. This release runs an Android-derived kernel that identifies itself as "3.4.0-7 #39-Ubuntu". 3.4.0 was released in May 2012, so it is getting a bit long in the tooth; the 3.4.0 number suggests this kernel hasn't even gotten the stable updates that followed that release. Finding the source for the kernel in this distribution is not easy; it must almost certainly be hidden somewhere in this Gerrit repository, but your editor ran out of time while trying to find it. The SurfaceFlinger display manager has been replaced by Ubuntu's own Mir, with Unity providing the interface. Upstart is the init system, despite the fact that Ubuntu has moved to systemd on desktop systems. + +When one moves beyond the command-line interface and starts playing with the touchscreen, one finds that the basics of the interface resemble what was demonstrated three years ago. Swiping from the left edge brings the [Overview screen] Unity icon bar (but no longer switches to a home screen; the "home screen" concept doesn't really seem to exist anymore). Swiping from the right will either switch to another application or produce an overview of running applications; it's not clear how it decides which. The overview provides a cute oblique view of the running applications; it's sufficient to choose one, but seems somewhat wasteful of screen space. Swiping up from the bottom produces an application-specific menu — usually. + +![][3] + + +The swipe gestures work well enough once one gets used to them, but there is scope for confusion. The camera app, for example, will instruct the user to "swipe left for photo roll," but, unless one is careful to avoid [Swipe left] the right edge of the screen, that gesture will yield the overview screen instead. One can learn subtleties like "swipes involving the edge" and "swipes avoiding the edge," but one could argue that such an interface is more difficult than it needs to be and less discoverable than it could be. + +![][4] + +Speaking of the camera app, it takes pictures as one might expect, and it has gained a high-dynamic-range mode in recent years. It still has no support for stitching together photos in a panorama or "photo sphere" mode, though. + +![][5] + +The base distribution comes with a fairly basic set of apps. Many of them appear to be interfaces to an associated web page; the Amazon, GMail, and Facebook apps, for example. Something called "Shorts" appears to be an RSS reader, though it seems impervious to the addition of arbitrary feeds. There is a terminal app, but it prompts for a password — a bit surprising [Terminal emulator] given that no password had ever been supplied for the device (it turns out that one should use the screen-lock PIN here). It's not clear that this extra level of "security" is helpful, given that the user involved is already able to install, launch, and run applications on the device, but so it goes. + +Despite the presence of all those evolution processes, there is no IMAP-capable email app; there are also no mapping apps. There is a rudimentary web browser with Ubuntu branding; it appears that this browser is based on Chromium. The weather app is limited to a few dozen hardwired locations worldwide; the closest supported location to LWN headquarters was Houston, which, one assumes, is unlikely to be dealing with the foot of snow your editor had to shovel while partway through this article. One suspects we would have heard about that. + +![][6] + +Inevitably, there is a store from which one can obtain other apps. There are, for example, a couple of seemingly capable, OpenStreetMap-based mapping apps there, including one that claims turn-by-turn navigation, but nothing requiring GPS access worked in your editor's tests. Games abound, of course, but [Maps] there is little in the way of apps that are well known in the Android or iOS worlds. The store will refuse to allow the installation of apps until one creates a "Ubuntu One" account; that is unfortunate, but most Android users never get anywhere near that far before having to create or supply a Google account. + +![][7] + +Canonical puts a fair amount of energy into promoting its "scopes," which are said to be better than apps for the aggregation of content. In truth, they seem to just be another type of app with a focus on gathering information from more than one source. Although, with "branded scopes," the "more than one source" part is often deliberately put by the wayside. Your editor played around with scopes for a while, but, in truth, could not find what was supposed to make them special. + +Permissions management in Ubuntu Touch resembles that found in recent Android releases: the user will be prompted the first time an application tries to exercise a specific privilege. As with Android, the number of [Permissions request] actions requiring privilege is relatively small, and "connect to any arbitrary site on the Internet" is not among them. Access to location information or the camera, though, will generate a prompt. There is also, again as with Android, a way to control which applications are allowed to place notifications on the screen. + +Ubuntu Touch still seems to drain the battery far more quickly than Android does on the same device. Indeed, it is barely able to get through the night while sitting idle. There is a cute battery app that offers a couple of "ways to reduce battery use," but it lacks Android's ability to say which apps are actually draining the battery (though, it must be said, that information from Android is often less helpful than one might hope). + +![][8] + +The keyboard now has proper multi-lingual support (though there is no visual indication of which language is currently in effect) and, as with Android, one can switch between languages on the fly. It offers word suggestions, does [Keyboard] spelling correction, and all the usual things. One missing feature, though, is "swipe" typing which, your editor has found, can speed the process of inputting text on a small keyboard considerably. There is also no voice input; no major loss from your editor's point of view, but others will probably see that differently. + +There is a lot to like in Ubuntu Touch. There is some appeal to running something that looks like a proper Linux system, even if it still has a number of Ubuntu-specific components. One does not get the sense that the device is watching quite as closely as Android devices do, though it's not entirely clear, for example, what happens with location data or where it might be stored. In any case, a Ubuntu device clearly has more free software on it than most alternatives do; there is no proprietary "play services" layer maintaining control over the system. + +Sadly, though, this distribution still is not up to the capabilities and the performance of the big alternatives. Switching to Ubuntu Touch means settling for a much slower system, running on a severely limited set of devices, with a relative scarcity of apps to choose from. Your editor would very much like to see a handset distribution that is more free and more open than the alternatives, but that distribution must also be competitive with those alternatives, and that does not seem to be the case here. Unless Canonical can find a way to close the performance and feature gaps with Android, it seems unlikely to have much hope of achieving uptake that is within a few orders of magnitude of Android's. + +-------------------------------------- + +via: https://lwn.net/Articles/667983/ + +作者:Jonathan Corbet +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]: https://developer.ubuntu.com/en/start/ubuntu-for-devices/devices/ +[2]: https://lwn.net/Articles/540138/ +[3]: https://static.lwn.net/images/2015/utouch/overview-sm.png +[4]: https://static.lwn.net/images/2015/utouch/camera-swipe-sm.png +[5]: https://static.lwn.net/images/2015/utouch/terminal.png +[6]: https://static.lwn.net/images/2015/utouch/gps-sm.png +[7]: https://static.lwn.net/images/2015/utouch/camera-perm.png +[8]: https://static.lwn.net/images/2015/utouch/schifo.png diff --git a/sources/tech/20160104 What is good stock portfolio management software on Linux.md b/sources/tech/20160104 What is good stock portfolio management software on Linux.md new file mode 100644 index 0000000000..258cf104fc --- /dev/null +++ b/sources/tech/20160104 What is good stock portfolio management software on Linux.md @@ -0,0 +1,109 @@ +What is good stock portfolio management software on Linux +================================================================================ +If you are investing in the stock market, you probably understand the importance of a sound portfolio management plan. The goal of portfolio management is to come up with the best investment plan tailored for you, considering your risk tolerance, time horizon and financial goals. Given its importance, no wonder there are no shortage of commercial portfolio management apps and stock market monitoring software, each touting various sophisticated portfolio performance tracking and reporting capabilities. + +For those of you Linux aficionados who are looking for a **good open-source portfolio management tool** to manage and track your stock portfolio on Linux, I would highly recommend a Java-based portfolio manager called [JStock][1]. If you are not a big Java fan, you might be turned off by the fact that JStock runs on a heavyweight JVM. At the same time I am sure many people will appreciate the fact that JStock is instantly accessible on every Linux platform with JRE installed. No hoops to jump through to make it work on your Linux environment. + +The day is gone when "open-source" means "cheap" or "subpar". Considering that JStock is just a one-man job, JStock is impressively packed with many useful features as a portfolio management tool, and all that credit goes to Yan Cheng Cheok! For example, JStock supports price monitoring via watchlists, multiple portfolios, custom/built-in stock indicators and scanners, support for 27 different stock markets and cross-platform cloud backup/restore. JStock is available on multiple platforms (Linux, OS X, Android and Windows), and you can save and restore your JStock portfolios seamlessly across different platforms via cloud backup/restore. + +Sounds pretty neat, huh? Now I am going to show you how to install and use JStock in more detail. + +### Install JStock on Linux ### + +Since JStock is written in Java, you must [install JRE][2] to run it. Note that JStock requires JRE 1.7 or higher. If your JRE version does not meet this requirement, JStock will fail with the following error. + + Exception in thread "main" java.lang.UnsupportedClassVersionError: org/yccheok/jstock/gui/JStock : Unsupported major.minor version 51.0 + +Once you install JRE on your Linux, download the latest JStock release from the official website, and launch it as follows. + + $ wget https://github.com/yccheok/jstock/releases/download/release_1-0-7-13/jstock-1.0.7.13-bin.zip + $ unzip jstock-1.0.7.13-bin.zip + $ cd jstock + $ chmod +x jstock.sh + $ ./jstock.sh + +In the rest of the tutorial, let me demonstrate several useful features of JStock. + +### Monitor Stock Price Movements via Watchlist ### + +On JStock you can monitor stock price movement and automatically get notified by creating one or more watchlists. In each watchlist, you can add multiple stocks you are interested in. Then add your alert thresholds under "Fall Below" and "Rise Above" columns, which correspond to minimum and maximum stock prices you want to set, respectively. + +![](https://c2.staticflickr.com/2/1588/23795349969_37f4b0f23c_c.jpg) + +For example, if you set minimum/maximum prices of AAPL stock to $102 and $115.50, you will be alerted via desktop notifications if the stock price goes below $102 or moves higher than $115.50 at any time. + +You can also enable email alert option, so that you will instead receive email notifications for such price events. To enable email alerts, go to "Options" menu. Under "Alert" tab, turn on "Send message to email(s)" box, and enter your Gmail account. Once you go through Gmail authorization steps, JStock will start sending email alerts to that Gmail account (and optionally CC to any third-party email address). + +![](https://c2.staticflickr.com/2/1644/24080560491_3aef056e8d_b.jpg) + +### Manage Multiple Portfolios ### + +JStock allows you to manage multiple portfolios. This feature is useful if you are using multiple stock brokers. You can create a separate portfolio for each broker and manage your buy/sell/dividend transactions on a per-broker basis. You can switch different portfolios by choosing a particular portfolio under "Portfolio" menu. The following screenshot shows a hypothetical portfolio. + +![](https://c2.staticflickr.com/2/1646/23536385433_df6c036c9a_c.jpg) + +Optionally you can enable broker fee option, so that you can enter any broker fees, stamp duty and clearing fees for each buy/sell transaction. If you are lazy, you can enable fee auto-calculation and enter fee schedules for each brokering firm from the option menu beforehand. Then JStock will automatically calculate and enter fees when you add transactions to your portfolio. + +![](https://c2.staticflickr.com/2/1653/24055085262_0e315c3691_b.jpg) + +### Screen Stocks with Built-in/Custom Indicators ### + +If you are doing any technical analysis on stocks, you may want to screen stocks based on various criteria (so-called "stock indicators"). For stock screening, JStock offers several [pre-built technical indicators][3] that capture upward/downward/reversal trends of individual stocks. The following is a list of available indicators. + +- Moving Average Convergence Divergence (MACD) +- Relative Strength Index (RSI) +- Money Flow Index (MFI) +- Commodity Channel Index (CCI) +- Doji +- Golden Cross, Death Cross +- Top Gainers/Losers + +To install any pre-built indicator, go to "Stock Indicator Editor" tab on JStock. Then click on "Install" button in the right-side panel. Choose "Install from JStock server" option, and then install any indicator(s) you want. + +![](https://c2.staticflickr.com/2/1476/23867534660_b6a9c95a06_c.jpg) + +Once one or more indicators are installed, you can scan stocks using them. Go to "Stock Indicator Scanner" tab, click on "Scan" button at the bottom, and choose any indicator. + +![](https://c2.staticflickr.com/2/1653/24137054996_e8fcd10393_c.jpg) + +Once you select the stocks to scan (e.g., NYSE, NASDAQ), JStock will perform scan, and show a list of stocks captured by the indicator. + +![](https://c2.staticflickr.com/2/1446/23795349889_0f1aeef608_c.jpg) + +Besides pre-built indicators, you can also define custom indicator(s) on your own with a GUI-based indicator editor. The following example screens for stocks whose current price is less than or equal to its 60-day average price. + +![](https://c2.staticflickr.com/2/1605/24080560431_3d26eac6b5_c.jpg) + +### Cloud Backup and Restore between Linux and Android JStock ### + +Another nice feature of JStock is cloud backup and restore. JStock allows you to save and restore your portfolios/watchlists via Google Drive, and this features works seamlessly across different platforms (e.g., Linux and Android). For example, if you saved your JStock portfolios to Google Drive on Android, you can restore them on Linux version of JStock. + +![](https://c2.staticflickr.com/2/1537/24163165565_bb47e04d6c_c.jpg) + +![](https://c2.staticflickr.com/2/1556/23536385333_9ed1a75d72_c.jpg) + +If you don't see your portfolios/watchlists after restoring from Google Drive, make sure that your country is correctly set under "Country" menu. + +JStock Android free version is available from [Google Play store][4]. You will need to upgrade to premium version for one-time payment if you want to use its full features (e.g., cloud backup, alerts, charts). I think the premium version is definitely worth it. + +![](https://c2.staticflickr.com/2/1687/23867534720_18b917028c_c.jpg) + +As a final note, I should mention that its creator, Yan Cheng Cheok, is pretty active in JStock development, and quite responsive in addressing any bugs. Kudos to him! + +What do you think of JStock as portfolio tracking software? + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/stock-portfolio-management-software-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://jstock.org/ +[2]:http://ask.xmodulo.com/install-java-runtime-linux.html +[3]:http://jstock.org/ma_indicator.html +[4]:https://play.google.com/store/apps/details?id=org.yccheok.jstock.gui diff --git a/sources/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md b/sources/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md new file mode 100644 index 0000000000..006d4f9905 --- /dev/null +++ b/sources/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md @@ -0,0 +1,174 @@ +(翻译中 by runningwater) +How to Add New Disk in Linux CentOS 7 Without Rebooting +================================================================================ + +Increasing disk spaces on the Linux servers is a daily routine work for very system administrator. So, in this article we are going to show you some simple simple steps that you can use to increase your disk spaces on Linux CentOS 7 without rebooting to your production server using Linux commands. We will cover multiple methods and possibilities to increase and add new disks to the Linux systems, so that you can follow the one that you feel comfortable while using according to your requirements. + +### 1. Increasing Disk of VM Guest: ### + +Before increasing the disk volume inside your Linux system, you need to add a new disk or increase the one its has already attached with the system by editing its settings from your VMware vShere, Workstation or any other infrastructure environment that you are using. + +![Increase disk](http://blog.linoxide.com/wp-content/uploads/2016/02/1.png) + +### 2. Check Disk Space: ### + +Run the following command to check the current size of your disk space. + + # df -h + # fdisk -l + +![Fdisk check](http://blog.linoxide.com/wp-content/uploads/2016/02/2.png) + +Here we can see that the total disk size is still the same that is 10 GB while we have already increased it to 50 GB from the back end. + +### 3. Expanding Space without Rebooting VM ### + +Now run the following commands to expand the disk space in the physical volume of the Operating System without rebooting the virtual machine by Re-scanning the SCSI Bus and then adding SCSI Device. + + # ls /sys/class/scsi_host/ + # echo "- - -" > /sys/class/scsi_host/host0/scan + # echo "- - -" > /sys/class/scsi_host/host1/scan + # echo "- - -" > /sys/class/scsi_host/host2/scan + +Check the names of your SCSI devices and then rescan the SCSI buses using below commands. + + # ls /sys/class/scsi_device/ + # echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan + # echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan + +That will rescan the current scsi bus and the disk size that we increased from the VM guest settings will be show up as you can see in the below image. + +![Rescan disk device](http://blog.linoxide.com/wp-content/uploads/2016/02/3.png) + +### 4. New Disk Partition: ### + +Once you are able to see the increased disk space inside your system then the run the following command to format your disk for creating a new partition by following the steps to increase your physical disk volume. + + # fdisk /dev/sda + Welcome to fdisk (util-linux 2.23.2) press the 'm' key for help + Command (m for help): m + Command action + a toggle a bootable flag + b edit bsd disklabel + c toggle the dos compatibility flag + d delete a partition + g create a new empty GPT partition table + G create an IRIX (SGI) partition table + l list known partition types + m print this menu + n add a new partition + o create a new empty DOS partition table + p print the partition table + q quit without saving changes + s create a new empty Sun disklabel + t change a partition's system id + u change display/entry units + v verify the partition table + w write table to disk and exit + x extra functionality (experts only) + + Command (m for help): + +Type the 'p' to print the current partition table then create a new primary partition by typing the 'n' key and selecting the available sectors. Change the disk type to 'Linux LVM' by using 't' command and selecting the code to '8e' or leave as it to its default type that is '83'. + +Now write the table to disk and exit by Entring 'w' key as shown. + + Command (m for help): w + The partition table has been altered! + + Calling ioctl() to re-read partition table. + + WARNING: Re-reading the partition table failed with error 16: Device or resource busy. + The kernel still uses the old table. The new table will be used at + the next reboot or after you run partprobe(8) or kpartx(8) + +![New disk Volume](http://blog.linoxide.com/wp-content/uploads/2016/02/3A.png) + +### 5. Creating Physical Volume: ### + +As indicated above run the 'partprobe' or kpartx command so that the tables are ready to use and then create the new Physical Volume using the below commands. + + # partprobe + # pvresize /dev/sda3 + +To check the newly created volume run the following command to see if the new physical volume has been created and visible. After that we will extend the Volume Group 'centos' with the newly create Physical Volume as shown. + + # pvdisplay + # vgextend centos /dev/sda3 + +![Extend volume Group](http://blog.linoxide.com/wp-content/uploads/2016/02/3B.png) + +### 6. Extending Logical Volume: ### + +Now we will extend the Logical Volume to increase the disk space on it using the the below command. + + # lvextend -L +40G /dev/mapper/centos-root + +Once you get the successfully increased message, run the command as shown below to extend the size of your logical volume . + + # xfs_growfs /dev/mapper/centos-root + +The size of the '/' partition has been increased successfully, you can check the size of your disk drives by using the 'df' command as shown. + +![Increase disk space](http://blog.linoxide.com/wp-content/uploads/2016/02/3C.png) + +### 7. Extending Root Partition by Adding New Disk Without Reboot: ### + +This is the second method with but with quite similar commands to increase the size of the Logical volume in CentOS 7. + +So, the first step is to Open the setting of your VM guest settings and click on the 'Add' new button and proceed to the next option. + +![Add new disk](http://blog.linoxide.com/wp-content/uploads/2016/02/3D.png) + +Choose the required configuration for the new disk by selecting the size of the new disk and its type as shown in the below image. + +![New disk setup](http://blog.linoxide.com/wp-content/uploads/2016/02/3E.png) + +Then come to the server side and repeat the following commands to scan your disk devices to the new disk is visible on the system. + + # echo "- - -" > /sys/class/scsi_host/host0/scan + # echo "- - -" > /sys/class/scsi_host/host1/scan + # echo "- - -" > /sys/class/scsi_host/host2/scan + +List the names of your SCSi devices + + # ls /sys/class/scsi_device/ + # echo 1 > /sys/class/scsi_device/1\:0\:0\:0/device/rescan + # echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan + # echo 1 > /sys/class/scsi_device/3\:0\:0\:0/device/rescan + # fdisk -l + +![Scanning new disk](http://blog.linoxide.com/wp-content/uploads/2016/02/3F.png) + +Once the new disk is visible run the below commands to create the new physical volume and add it to the volume group as shown. + + # pvcreate /dev/sdb + # vgextend centos /dev/sdb + # vgdisplay + +![Extending Volume Group](http://blog.linoxide.com/wp-content/uploads/2016/02/3G.png) + +Now extend the Logical Volume by adding the disk space on it and then add it to the root partition. + + # lvextend -L +20G /dev/mapper/centos-root + # xfs_growfs /dev/mapper/centos-root + # df -h + +![Increase / Partition](http://blog.linoxide.com/wp-content/uploads/2016/02/3H.png) + +### Conclusion: ### + +Managing disk partitions in Linux CentOS 7 is a simple process to increase the disk space of any of your logical volumes by using the steps as described in this article. You don't need to give your production server's reboot for this purpose but simply rescan your SCSi devices and expand your desired LVM. We hope you find this article much helpful. Feel free to leave your valuable comments or suggestions. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/add-new-disk-centos-7-without-rebooting/ + +作者:[Kashif S][a] +译者:[runningwater](https://github.com/runningwater +) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/kashifs/ \ No newline at end of file diff --git a/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md b/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md new file mode 100644 index 0000000000..ccd14d1410 --- /dev/null +++ b/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md @@ -0,0 +1,327 @@ +translation by strugglingyouth +How to Install MariaDB 10 on CentOS 7 CPanel Server +================================================================================ + +MariaDB is a enhanced open source and drop-in replacement for MySQL. It is developed by MariaDB community and available under the terms of the GPL v2 license. Software Security is the main focus for the MariaDB developers. They maintain its own set of security patches for each MariaDB releases. When any critical security issues are discovered, the developers introduces a new release of MariaDB to get the fix out as soon as possible. + +MariaDB is always up-to-date with the latest MySQL releases. It is highly compatible and works exactly like the MySQL. Almost all commands, data, table definition files, Client APIs, protocols, interfaces, structures, filenames, binaries, ports, database storage locations etc are same as the MySQL. It isn't even needed to convert databases to switch to MariaDB. + +### Advantages of MariaDB ### + +- Truly Open source +- More quicker and transparent security releases +- Highly Compatible with MySQL +- Improved Performance +- More storage engines compared to MySQL + +In this article, I provides guidelines on how to upgrade MySQL 5.5 to the latest MariaDB on a CentOS 7 CPanel server. Let's walk through the Pre-installation steps. + +### Pre-requisites: ### + +#### 1. Stop current MySQL Service #### + + root@server1 [/var/# mysql + Welcome to the MySQL monitor. Commands end with ; or \g. + Your MySQL connection id is 5859 + Server version: 5.5.47-cll MySQL Community Server (GPL) + + Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + + Oracle is a registered trademark of Oracle Corporation and/or its + affiliates. Other names may be trademarks of their respective + owners. + + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + + root@server1 [~]# systemctl stop mysql + root@server1 [~]# systemctl status mysql + ● mysql.service - LSB: start and stop MySQL + Loaded: loaded (/etc/rc.d/init.d/mysql) + Active: failed (Result: exit-code) since Sun 2016-01-31 10:00:02 UTC; 1min 31s ago + Docs: man:systemd-sysv-generator(8) + Main PID: 23430 (code=exited, status=203/EXEC) + + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: Started MySQL Server. + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: Starting MySQL Server... + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: mysql.service: main process exited, code=exited, status=203/EXEC + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: Unit mysql.service entered failed state. + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: mysql.service failed. + +#### 2. Move all configuration files and databases prior to the upgrade #### + +Move the DB storage path and MySQL configuration files + + root@server1 [~]# cp -Rf /var/lib/mysql /var/lib/mysql-old + + root@server1 [/var/lib/mysql]# cat /etc/my.cnf + [mysqld] + default-storage-engine=MyISAM + innodb_file_per_table=1 + max_allowed_packet=268435456 + open_files_limit=10000 + + root@server1 [~]#mv /etc/my.cnf /etc/my.cnf-old + +#### 3. Remove and uninstall all MySQL rpms from the server #### + +Run the following commands to disable the MySQL RPM targets. By running this commands, cPanel will no longer handle MySQL updates, and mark these rpm.versions as uninstalled on the system. + + /scripts/update_local_rpm_versions --edit target_settings.MySQL50 uninstalled + /scripts/update_local_rpm_versions --edit target_settings.MySQL51 uninstalled + /scripts/update_local_rpm_versions --edit target_settings.MySQL55 uninstalled + /scripts/update_local_rpm_versions --edit target_settings.MySQL56 uninstalled + +Now run the this command: + +/scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55,MySQL56 to remove all existing MySQL rpms on the server and leave a clean environment for MariaDB installation. Please see its output below: + + root@server1 [/var/lib/mysql]# /scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55,MySQL56 + [2016-01-31 09:53:59 +0000] + [2016-01-31 09:53:59 +0000] Problems were detected with cPanel-provided files which are RPM controlled. + [2016-01-31 09:53:59 +0000] If you did not make these changes intentionally, you can correct them by running: + [2016-01-31 09:53:59 +0000] + [2016-01-31 09:53:59 +0000] > /usr/local/cpanel/scripts/check_cpanel_rpms --fix + [2016-01-31 09:53:59 +0000] + [2016-01-31 09:53:59 +0000] The following RPMs are unneeded on your system and should be uninstalled: + [2016-01-31 09:53:59 +0000] MySQL55-client-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] MySQL55-devel-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] MySQL55-server-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] MySQL55-shared-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] MySQL55-test-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] compat-MySQL50-shared-5.0.96-4.cp1136 + [2016-01-31 09:53:59 +0000] compat-MySQL51-shared-5.1.73-1.cp1150 + [2016-01-31 09:53:59 +0000] Removing 0 broken rpms: + [2016-01-31 09:53:59 +0000] rpm: no packages given for erase + [2016-01-31 09:53:59 +0000] No new RPMS needed for install + [2016-01-31 09:53:59 +0000] Disabling service monitoring. + [2016-01-31 09:54:01 +0000] Uninstalling unneeded rpms: MySQL55-test MySQL55-server MySQL55-client compat-MySQL51-shared compat-MySQL50-shared MySQL55-shared MySQL55-devel + [2016-01-31 09:54:04 +0000] Removed symlink /etc/systemd/system/multi-user.target.wants/mysql.service. + [2016-01-31 09:54:04 +0000] Restoring service monitoring. + +With these steps, we've uninstalled existing MySQL RPMs, marked targets to prevent further MySQL updates and made the server ready and clean for the MariaDB installation. + +To startup with the installation, we need to create a yum repository for MariaDB depending on the MariaDB & CentOS versions. This is how I did it! + +### Installation procedures: ### + +#### Step 1: Creating a YUM repository. #### + + root@server1 [~]# vim /etc/yum.repos.d/MariaDB.repo + [mariadb] + name = MariaDB + baseurl = http://yum.mariadb.org/10.0/centos7-amd64/ + gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB + gpgcheck=1 + root@server1 [/etc/yum.repos.d]# cat /etc/yum.repos.d/MariaDB.repo + [mariadb] + name = MariaDB + baseurl = http://yum.mariadb.org/10.0/centos7-amd64/ + gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB + gpgcheck=1 + +#### Step 2: Open the /etc/yum.conf and modify the exclude line as below: #### + +**Remove this line** exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* php* proftpd* pure-ftpd* spamassassin* squirrelmail* + +**And replace with this line** exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* nsd* proftpd* pure-ftpd* spamassassin* squirrelmail* + +**\*\*\* IMPORTANT \*\*\*** + +We need to make sure, we've removed the MySQL and PHP from the exclude list. + +#### Step 3: Run the following command to install MariaDB and related packages. #### + +**yum install MariaDB-server MariaDB-client MariaDB-devel php-mysql** + + root@server1 [~]#yum install MariaDB-server MariaDB-client MariaDB-devel php-mysql + + Dependencies Resolved + + =============================================================================================================================================== + Package Arch Version Repository Size + =============================================================================================================================================== + Installing: + MariaDB-client x86_64 10.0.23-1.el7.centos mariadb 10 M + MariaDB-devel x86_64 10.0.23-1.el7.centos mariadb 6.3 M + MariaDB-server x86_64 10.0.23-1.el7.centos mariadb 55 M + php-mysql x86_64 5.4.16-36.el7_1 base 99 k + Installing for dependencies: + MariaDB-common x86_64 10.0.23-1.el7.centos mariadb 43 k + MariaDB-shared x86_64 10.0.23-1.el7.centos mariadb 1.2 M + libzip x86_64 0.10.1-8.el7 base 48 k + php-common x86_64 5.4.16-36.el7_1 base 563 k + php-pdo x86_64 5.4.16-36.el7_1 base 97 k + + Transaction Summary + =============================================================================================================================================== + Install 4 Packages (+5 Dependent package) + +#### Step 4: Restart and make sure the MySQL service is up. #### + + root@server1 [~]# systemctl start mysql + root@server1 [~]# + root@server1 [~]# + root@server1 [~]# systemctl status mysql + ● mysql.service - LSB: start and stop MySQL + Loaded: loaded (/etc/rc.d/init.d/mysql) + Active: active (exited) since Sun 2016-01-31 10:01:46 UTC; 3s ago + Docs: man:systemd-sysv-generator(8) + Process: 23717 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=0/SUCCESS) + Main PID: 23430 (code=exited, status=203/EXEC) + + Jan 31 10:01:46 server1.centos7-test.com systemd[1]: Starting LSB: start and stop MySQL... + Jan 31 10:01:46 server1.centos7-test.com mysql[23717]: Starting MySQL SUCCESS! + Jan 31 10:01:46 server1.centos7-test.com systemd[1]: Started LSB: start and stop MySQL. + +#### Step 5: Run mysql_upgrade command #### + +It will examine all tables in all databases for incompatibilities with the current installed version and upgrades the system tables if necessary to take advantage of new privileges or capabilities that might have added with the current version. + + root@server1 [~]# mysql_upgrade + MySQL upgrade detected + Phase 1/6: Checking and upgrading mysql database + Processing databases + mysql + mysql.columns_priv OK + mysql.db OK + mysql.event OK + mysql.func OK + mysql.help_category OK + mysql.help_keyword OK + mysql.help_relation OK + mysql.help_topic OK + mysql.host OK + mysql.ndb_binlog_index OK + mysql.plugin OK + mysql.proc OK + mysql.procs_priv OK + mysql.proxies_priv OK + mysql.servers OK + mysql.tables_priv OK + mysql.time_zone OK + mysql.time_zone_leap_second OK + mysql.time_zone_name OK + mysql.time_zone_transition OK + mysql.time_zone_transition_type OK + mysql.user OK + Phase 2/6: Fixing views from mysql + Phase 3/6: Running 'mysql_fix_privilege_tables' + Phase 4/6: Fixing table and database names + Phase 5/6: Checking and upgrading tables + Processing databases + cphulkd + cphulkd.auths OK + cphulkd.blacklist OK + cphulkd.brutes OK + cphulkd.good_logins OK + cphulkd.ip_lists OK + cphulkd.known_netblocks OK + cphulkd.login_track OK + cphulkd.logins OK + cphulkd.report OK + cphulkd.whitelist OK + eximstats + eximstats.defers OK + eximstats.failures OK + eximstats.sends OK + eximstats.smtp OK + information_schema + leechprotect + leechprotect.hits OK + modsec + modsec.hits OK + performance_schema + roundcube + roundcube.cache OK + roundcube.cache_index OK + roundcube.cache_messages OK + roundcube.cache_shared OK + roundcube.cache_thread OK + roundcube.contactgroupmembers OK + roundcube.contactgroups OK + roundcube.contacts OK + roundcube.cp_schema_version OK + roundcube.dictionary OK + roundcube.identities OK + roundcube.searches OK + roundcube.session OK + roundcube.system OK + roundcube.users OK + saheetha_test + saheetha_test.authors OK + whmxfer + whmxfer.sessions OK + Phase 6/6: Running 'FLUSH PRIVILEGES' + OK + +#### Step 6 : Restart the MySQL service once again to ensure everything works perfect. #### + + root@server1 [~]# systemctl restart mysql + root@server1 [~]# + root@server1 [~]# systemctl status mysql + ● mysql.service - LSB: start and stop MySQL + Loaded: loaded (/etc/rc.d/init.d/mysql) + Active: active (running) since Sun 2016-01-31 10:04:11 UTC; 9s ago + Docs: man:systemd-sysv-generator(8) + Process: 23831 ExecStop=/etc/rc.d/init.d/mysql stop (code=exited, status=0/SUCCESS) + Process: 23854 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=0/SUCCESS) + Main PID: 23430 (code=exited, status=203/EXEC) + CGroup: /system.slice/mysql.service + ├─23861 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/server1.centos7-test.com.pid + └─23933 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/v... + + Jan 31 10:04:10 server1.centos7-test.com systemd[1]: Starting LSB: start and stop MySQL... + Jan 31 10:04:11 server1.centos7-test.com mysql[23854]: Starting MySQL. SUCCESS! + Jan 31 10:04:11 server1.centos7-test.com systemd[1]: Started LSB: start and stop MySQL. + +#### Step 7: Run EasyApache to rebuild Apache/PHP with MariaDB and ensure all PHP modules remains intact. #### + + root@server1 [~]#/scripts/easyapache --build + + ****IMPORTANT ***** + If you forget to rebuild Apache/PHP after the MariaDB installation, it will report the library error as below: + + root@server1 [/etc/my.cnf.d]# php -v + php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory + +#### Step 8: Now verify the installation and databases. #### + + root@server1 [/var/lib/mysql]# mysql + Welcome to the MariaDB monitor. Commands end with ; or \g. + Your MariaDB connection id is 15 + Server version: 10.0.23-MariaDB MariaDB Server + + Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. + + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + + MariaDB [(none)]> show storage engines; + +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ + | Engine | Support | Comment | Transactions | XA | Savepoints | + +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ + | CSV | YES | CSV storage engine | NO | NO | NO | + | MRG_MyISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | + | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | + | BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO | + | MyISAM | YES | MyISAM storage engine | NO | NO | NO | + | InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES | YES | YES | + | ARCHIVE | YES | Archive storage engine | NO | NO | NO | + | FEDERATED | YES | FederatedX pluggable storage engine | YES | NO | YES | + | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | + | Aria | YES | Crash-safe tables with MyISAM heritage | NO | NO | NO | + +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ + 10 rows in set (0.00 sec) + +That's all :). Now we're all set to go with MariaDB with its improved and efficient features. Hope you enjoyed reading this documentation. I would recommend your valuable suggestions and feedback on this! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/install-mariadb-10-centos-7-cpanel/ + +作者:[Saheetha Shameer][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/saheethas/ diff --git a/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md b/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md new file mode 100644 index 0000000000..6df151f9f6 --- /dev/null +++ b/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md @@ -0,0 +1,69 @@ +bioIkke 翻译中 +7 Steps to Start Your Linux SysAdmin Career +=============================================== + +Linux is hot right now. Everybody is looking for Linux talent. Recruiters are knocking down the doors of anybody with Linux experience, and there are tens of thousands of jobs waiting to be filled. But what if you want to take advantage of this trend and you’re new to Linux? How do you get started? + +1. Install Linux + + It should almost go without saying, but the first key to learning Linux is to install Linux. Both the LFS101x and the LFS201 courses include detailed sections on installing and configuring Linux for the first time. + +2. Take LFS101x + + If you are completely new to Linux, the best place to start is our free [LFS101x Introduction](https://www.edx.org/course/introduction-linux-linuxfoundationx-lfs101x-2) to Linux course. This online course is hosted by edX.org, and explores the various tools and techniques commonly used by Linux system administrators and end users to achieve their day-to-day work in a Linux environment. It is designed for experienced computer users who have limited or no previous exposure to Linux, whether they are working in an individual or enterprise environment. This course will give you a good working knowledge of Linux from both a graphical and command line perspective, allowing you to easily navigate through any of the major Linux distributions. + +3. Look into LFS201 + + Once you’ve completed LFS101x, you’re ready to start diving into the more complicated tasks in Linux that will be required of you as a professional sysadmin. To gain those skills, you’ll want to take [LFS201 Essentials of Linux System Administration](http://training.linuxfoundation.org/linux-courses/system-administration-training/essentials-of-system-administration). The course gives you in-depth explanations and instructions for each topic, along with plenty of exercises and labs to help you get real, hands-on experience with the subject matter. + + If you would rather have a live instructor teach you or you have an employer who is interested in helping you become a Linux sysadmin, you might also be interested in LFS220 Linux System Administration. This course includes all the same topics as the LFS201 course, but is taught by an expert instructor who can guide you through the labs and answer any questions you have on the topics covered in the course. + +4. Practice! + + Practice makes perfect, and that’s as true for Linux as it is for any musical instrument or sport. Once you’ve installed Linux, use it regularly. Perform key tasks over and over again until you can do them easily without reference material. Learn the ins and outs of the command line as well as the GUI. This practice will ensure that you’ve got the skills and knowledge to be successful as a professional Linux sysadmin. + +5. Get Certified + + After you’ve taken LFS201 or LFS220 and you’ve gotten some practice, you are now ready to get certified as a system administrator. You’ll need this certification because this is how you will prove to employers that you have the necessary skills to be a professional Linux sysadmin. + + There are several Linux certifications on the market today, and all of them have their place. However, most of these certifications are either centered on a specific distro (like Red Hat) or are purely knowledge-based and don’t demonstrate actual skill with Linux. The Linux Foundation Certified System Administrator certification is an excellent alternative for someone looking for a flexible, meaningful entry-level certification. + +6. Get Involved + + At this point you may also want to consider joining up with a local Linux Users Group (or LUG), if there’s one in your area. These groups are usually composed of people of all ages and experience levels, so regardless of where you are at with your Linux experience, you can find people with similar skill levels to bond with, or more advanced Linux users who can help answer questions and point you towards helpful resources. To find out if there’s a LUG near you, try looking on meetup.com, check with a nearby university, or just do a simple Internet search. + + There are also many online communities available to you as you learn Linux. These sites and communities provide help and support to both individuals new to Linux or experienced administrators: + + - [Linux Admin subreddit](https://www.reddit.com/r/linuxadmin) + + - [Linux.com](http://www.linux.com/) + + - [training.linuxfoundation.org](http://training.linuxfoundation.org/) + + - [http://community.ubuntu.com/help-information/](http://community.ubuntu.com/help-information/) + + - [https://forums.opensuse.org/forum.php](https://forums.opensuse.org/forum.php) + + - [http://wiki.centos.org/Documentation](http://wiki.centos.org/Documentation) + +7. Learn To Love The Documentation + + Last but not least, if you ever get stuck on something within Linux, don’t forget about Linux’s included documentation. Using the commands man (for manual), info and help, you can find information on virtually every aspect of Linux, right from within the operating system. The usefulness of these built-in resources cannot be overstated, and you’ll find yourself using them throughout your career, so you might as well get familiar with them early on. + + Interested in learning more about starting your IT career with Linux? Check out our free ebook “[A Brief Guide To Starting Your IT Career In Linux](http://training.linuxfoundation.org/sysadmin-it-career-guide).” + +[Download Now](http://training.linuxfoundation.org/sysadmin-it-career-guide) + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/featured-blogs/191-linux-training/834644-7-steps-to-start-your-linux-sysadmin-career + +作者:[linux.com][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:linux.com + + diff --git a/sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md b/sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md new file mode 100644 index 0000000000..003405b4b7 --- /dev/null +++ b/sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md @@ -0,0 +1,74 @@ +9 Key Trends in Hybrid Cloud Computing +======================================== + +All three forms of cloud computing – public, private, and hybrid – have undergone considerable evolution since the concepts first gained the attention of IT years ago. Hybrid cloud is the overwhelming favorite form of the cloud, with [88% of firms surveyed](https://www.greenhousedata.com/blog/hybrid-continues-to-be-most-popular-cloud-option-adoption-accelerating) rating it as important or critical to their business. + +The lightning-fast evolution of hybrid cloud means the conventional wisdom of a year or two back is already obsolete. So we asked several industry analysts where they saw the hybrid cloud headed in 2016 and got some interesting answers. + +1. **2016 might be the year that we get hybrid cloud to actually work.** + + By its very nature, hybrid cloud relies on private cloud, which has proven elusive for most enterprises. The fact is that the public cloud – Amazon, Google, Microsoft – have had much more investment and a longer head start. The private cloud has hamstrung the hybrid cloud's growth and usability. + + There hasn't been as much investment in the private cloud because by its very nature, the private cloud means keeping and investing in your own data center. And many public cloud providers are pushing enterprises to reduce or eliminate their data center spending all together. + + However, this year will see the private cloud start to catch up thanks to advances in OpenStack and Microsoft's Azure Stack, which is basically a private cloud in a box. The tools, infrastructures, and architectures to support hybrid cloud are also becoming much more robust. + +2. **Containers, microservices, and unikernels will bolster the hybrid cloud.** + + These are all cloud native technologies and will all be more or less mainstream by the end of 2016, analysts predict. They are maturing rapidly and serving as a viable alternative to virtual machines, which require more resources. + + More importantly, they work in an on-premises scenario as well as an off-premises scenario. Containerization and orchestration allow rapid scale up, scale out, and service migration between public and private cloud, making it even easier to move your services around. + +3. **Data and relevance take center stage** + + The cloud, in all its forms, has been in growth mode. That makes it a technology story. But with the cloud shifting into maturity, data and relevance become more important, according to the consultancy [Avoa](http://avoa.com/2016/01/01/2016-is-the-year-of-data-and-relevance/). At first, the cloud and Big Data were all about sucking up as much data as possible. Then they worried about what to do with it. + + In 2016, organizations will hone their craft in how data is collected and used. There is still much progress to be made in the technological and cultural aspects that must be dealt with. But 2016 should bring a renewed focus on the importance of data from all aspects and finding the most relevant information, not just lots of it. + +4. **Cloud services move beyond just on-demand workloads** + + AWS got its start as a place where a programmer/developer could spin up a VM real quick, get some work done, and get off. That's the essence of on-demand use, and given how much it can cost to leave those services constantly running, there is almost a disincentive to keep them running 24/7. + + However, IT organizations are starting to act as service brokers to provide all manner of IT services to their in-house users. This can be anything from in-house IT services, public cloud infrastructure providers, platform-as-a-service, and software-as-a-service. + + They will increasingly recognize the value of tools like cloud management platforms to provide consistent policy-based management over many of these different services. And they will see the value of technology such as containers to enhance portability. However, cloud service brokering in the sense of rapidly moving workloads between clouds for price arbitrage and related reasons will continue to be a non-starter. + +5. **Service providers become cloud service providers** + + Up to now, buying cloud services has been a direct sale model. The user was frequently the buyer of AWS EC2 services, either through officially recognized channels at work or through Shadow IT. But as cloud services become more comprehensive, and the menu of services more confusing, more and more people are turning to resellers and services providers to act as the purchaser of IT services for them. + + A recent survey by 2nd Watch, a Seattle-based cloud services provider, found nearly 85 percent of IT executives in the United States would be willing to pay a small premium to buy public cloud from a channel partner if it were to make it less complex. And about four out of every five within that 85 percent would shell out an extra 15 percent or more, the survey found. One in three executives surveyed said they could use the help in buying, using, and managing public cloud services. + +6. **IoT and cloud is to 2016 what mobile and cloud was to 2012** + + IoT is gaining mindshare and, more importantly, it's moving from test beds to real use cases. The cloud is a vital part for IoT due to its distributed nature, and for industrial IoT, where machinery and heavy equipment talk to back-end systems, a hybrid cloud will be most natural driver because the connection, data collection, and processing will happen in a hybrid cloud environment, due to perceived benefits of the private cloud side, like security and privacy. + +7. **The NIST definition of the cloud begins to break down** + + In 2011, the National Institute of Standards and Technology published "[The NIST Definition of Cloud Computing](http://csrc.nist.gov/publications/nistpubs/800-145/SP800-145.pdf)" (PDF) that became the standard definitions of private, public, and hybrid cloud terms and as-a-service models. + + Over time, though, the definitions have changed. IaaS has become much more complex, supporting things like OpenStack, [Swift](https://wiki.openstack.org/wiki/Swift) for object storage and [Neutron networking](https://wiki.openstack.org/wiki/Neutron). PaaS seems to be fading out because there's little that separates it from traditional middleware application development. And SaaS, which was just apps accessed through a browser, is losing steam because with so many cloud APIs for apps and services, you can access them through anything, not just a browser. + +8. **Analytics becomes more important** + + Analytics will be a huge growth opportunity for hybrid cloud because the high volume of data used in analytics is well suited to cloud, with its advantages of large scale and elasticity. For some forms of analytics, like highly sensitive data, then the private cloud will still rule. But the private cloud is part of the hybrid cloud, so either way, hybrid cloud wins. + +9. **Security takes on a new urgency** + + As hybrid cloud grows in 2016 and adds all kinds of new technologies, like IoT and containers, this just adds more vulnerable surface areas for data breaches. Add to it the tendency to rush into a new technology and then secure it later, which happens all the time, along with inexperienced technologists who don't think to secure the system – and you have a recipe for disaster. + + When new technologies come out, management discipline almost always lags and we think about securing the technology later. Containers are a good example. You can download all kinds of sample containers from Docker, but do you know where it came from? Docker had to go back and add security verifications after it started letting people download and run containers without any idea what was really in it. + + Mobile technologies like Path and Snapchat had major security problems a few years back as the smartphone market was taking off. It's inevitable that a new technology will be exploited by the bad guys. So security researchers will have their hands full trying to secure these new technologies. Probably after they get deployed. + +------------------------------------------------------------------------------ + +via: http://www.datamation.com/cloud-computing/9-key-trends-in-hybrid-cloud-computing.html + +作者:[Andy Patrizio][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.datamation.com/author/Andy-Patrizio-90720.html diff --git a/sources/tech/20160218 A Linux-powered microwave oven.md b/sources/tech/20160218 A Linux-powered microwave oven.md new file mode 100644 index 0000000000..109212ad14 --- /dev/null +++ b/sources/tech/20160218 A Linux-powered microwave oven.md @@ -0,0 +1,50 @@ +A Linux-powered microwave oven +================================================================================ + +Scratching an itch is a recurring theme in presentations at [linux.conf.au](http://linux.conf.au/). As the open-hardware movement gains strength, more and more of these itches relate to the physical world, not just the digital. David Tulloh used his [presentation [WebM]](http://mirror.linux.org.au/linux.conf.au/2016/04_Thursday/D4.303_Costa_Theatre/Linux_driven_microwave.webm) on the “Linux Driven Microwave” to discuss how annoying microwave ovens can be and to describe his project to build something less irritating. + +Tulloh's story began when he obtained a microwave oven, admittedly an inexpensive one, with a user interface even worse than the norm. Setting the time required pressing buttons so hard that the microwave tended to get pushed away — a fact that was elegantly balanced by the door handle requiring a sufficiently hard tug to return the oven to its original position. While this is clearly an extreme case, Tulloh lamented that microwave ovens really hadn't improved noticeably in recent decades. They may have gotten a little cheaper and gained a few features that few people could use without poring over the instruction manual — the implied contrast to smartphones, which are widely used with little instruction, was clear. + +This microwave oven was not a lost cause — it gave its life to the greater good and became the prototype for an idea that Tulloh hopes to turn into a crowd-funded project if he can find the right match between features and demand: a Linux-driven microwave oven. + +![](https://static.lwn.net/images/2016/lca-oven-sm.jpg) + +## Adding novelty + +Adding a smartphone-like touchscreen and a network connection and encouraging a community to build innovative apps such as recipe sharing are fairly obvious ideas once you think to put “Linux” and “microwave oven” together, but Tulloh's vision and prototype lead well beyond there. Two novel features that have been fitted are a thermal camera and a scale for measuring weight. + +The thermal camera provides an eight-by-eight-pixel image of the contents of the oven with a precision of about two degrees. This is enough to detect if a glass of milk is about to boil over, or if the steak being thawed is in danger of getting cooked. In either case, the power can be reduced or removed. If appropriate, an alert can be sounded. This would not be the first microwave to be temperature sensitive — GE sold microwave ovens with temperature probes decades ago — but an always-present sensor is much more useful than a manually inserted probe, especially when there is an accessible API behind it. + +The second innovation is a built-in scale to weigh the food (and container) being cooked. Many recipes give cooking-time guidance based on weight and some microwave ovens allow you to enter the weight manually so it can do a calculation for you. With built-in scales, that can become automatic. Placing a scale reliably under the rotating plate typical of many microwave ovens would be a mechanical challenge that Tulloh did not think worth confronting. Instead his design is based on the “flat-plate” or “flat-bed” style of oven — placing a sensor at each of the four corners is mechanically straightforward and gives good results. + + [User interface] +Once you have these extra sensors — weight and temperature — connected to a suitable logic engine, more interesting possibilities can be explored. A cup of cold milk from the fridge will have a particular weight and temperature profile with a modest degree of error. Tulloh suggested that situation could be detected and some relevant options such as “Boil” or “Warm” could be offered for easy selection (a mock up of the interface is at right, a clickable version is [here](http://mwgui.tulloh.id.au/)). Simple machine learning could extend this to create a personalized experience. It would be easy to collect a history of starting profiles and cooking choices; when those patterns are detected, the most likely cooking choices could be made the easiest to select. + +![](https://static.lwn.net/images/2016/lca-ovengui-sm.png) + +## Overcoming staleness + +Beyond just new functionality, Tulloh wants to improve the functionality that already exists. Door handles as stiff as on Tulloh's cheap microwave may not be common, but few microwave oven doors seem designed to make life easy for people with physical handicaps. There are regulatory restrictions, particularly in the US, that require the oven to function only if there is positive confirmation that the door is actually shut. This confirmation must be resilient against simple fraud, so poking a stick in the hole must not trick the oven into working with the door open. In fact, there must be two independent confirmations and, if they disagree, a fuse must be blown so that a service call is required. Tulloh believes that a magnetic latch would provide much greater flexibility (including easy software control) and that magnetic keying similar to that used in a [magnetic keyed lock](https://en.wikipedia.org/wiki/Magnetic_keyed_lock) would allow the magnetic latch to pass certification. + +Another pain point with microwave ovens is the annoying sounds they make. Tulloh has discarded the beeper and hooked up a speaker to the Banana Pi that is controlling his prototype. This allows for more pleasant and configurable alerts as well as for advice and guidance through a text-to-speech system. Adding a microphone for voice control is an obvious next step. + +Many microwave ovens can do more than just set a time and a power level — they provide a range of power profiles for cooking, warming, defrosting, and so on. Adding precise temperature sensing will allow the community to extend this range substantially. A question from Andrew Tridgell in the audience wondered if tempering chocolate — a process that requires very precise temperature control — would be possible. Tulloh had no experience with the process, and couldn't make promises, but thought it was certainly worth looking in to. Even if that doesn't work out, it shows clear potential for value to be gained from community input. + +## Availability + +Tulloh would very much like to get these Linux-enabled microwave ovens out into the world to create a community and see where it goes. Buying existing ovens and replacing the electronics is not seen as a viable option. The result would be ugly and, given that a small-run smart microwave will inevitably cost more, potential buyers are going to want something that doesn't look completely out of place in their kitchen. + +Many components are available off-the-shelf (magnetron, processor board, thermal sensor) and others, such as a USB interface for the thermal sensor, are easily built. Prototype software is, of course, already available on [GitHub](https://github.com/lod?tab=repositories). The case and door are more of a challenge and would need to be made to order. Tulloh wants to turn this adversity into an opportunity by providing the option for left-handed microwave ovens and a variety of colors. + +A quick survey of the audience suggested that few people would hastily commit to his target price of $AU1000 for a new, improved, open oven. Whether a bit more time for reflection and a wider audience might tip the balance is hard to know. The idea is intriguing, so it seems worth watching Tulloh's [blog](http://david.tulloh.id.au/category/microwave/) for updates. + + +------------------------------------------------------------------------------ + +via: https://lwn.net/Articles/674877/ + +作者:Neil Brown +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/sources/tech/20160218 Best Linux Desktop Environments for 2016.md b/sources/tech/20160218 Best Linux Desktop Environments for 2016.md new file mode 100644 index 0000000000..7aef79366b --- /dev/null +++ b/sources/tech/20160218 Best Linux Desktop Environments for 2016.md @@ -0,0 +1,92 @@ +GHLandy Translating + +Best Linux Desktop Environments for 2016 +============================================= + +![](http://www.linux.com/images/stories/66866/DE-2.png) + +Linux creates a friendly environment for choices and options. For example, there are many Linux-based distributions out there that use different desktop environments for you to choose from. I have picked some of the best desktop environments that you will see in the Linux world. + +## Plasma + +I consider [KDE’s Plasma desktop](https://www.kde.org/workspaces/plasmadesktop/) to be the most advanced desktop environment (DE). It’s the most feature-rich and customizable desktop environment that I have ever seen; even Mac OS X and Windows don’t come near Plasma when it comes to complete control by the user. + +I also love Plasma because of its awesome file manager, Dolphin. One reason I prefer Plasma over Gnome-based systems is the file manager. One of my biggest gripes with Gnome is that its file manager, Files, can’t handle basic tasks, such as batch-files renaming. That’s important for me because I take a lot of pictures, and Gnome makes it impossible for me to rename image files. On Dolphin, it’s a walk in the park. + +Then, you can add more functionality to Plasma with plugins. Plasma comes with some incredible software including Krita, Kdenlive, Calligra Office Suite, digiKam, Kwrite, and many other applications being developed by the KDE community. + +The only weakness of the Plasma desktop is its default email client, Kmail. It’s way too complicated to set up, and I also wish that setting up Kmail also configured the Address Book and Calendar. + +Plasma is the default desktop environment of many major distributions including openSUSE. + +## GNOME + +[GNOME](https://www.gnome.org/) (GNU Network Object Model Environment) was founded by [Miguel de Icaza](https://en.wikipedia.org/wiki/Miguel_de_Icaza) and Federico Mena in 1997 because KDE used Qt toolkit, which was released under a proprietary license. Unlike KDE, where there were numerous customizations, GNOME focused on keeping things simple. GNOME became extremely popular due to its simplicity and ease of use. A factor that I think contributed heavily to Gnome’s popularity was the fact that Ubuntu, one of the most popular Linux distributions, picked it as their default desktop environment. + +With changing times, GNOME needed a change. Therefore, with GNOME 3 the developers introduced the GNOME 3 Shell, which brought with it an entirely new design paradigm. That in turn led to some conflict with Canonical’s plans with Ubuntu, and they created their own shell for GNOME called Unity. Initially, GNOME 3 Shell was plagued by many issues -- most notably, the fact that extensions would stop working after updates. This major shift in design and the various problems then led to many forks of GNOME, such as the Cinnamon and Mate desktops. + +That said, what makes GNOME desktop interesting is that they are targeting touch-based devices, so if you have new laptops that come with a touchscreen, Gnome is the best suited DE for them. + +With version 3.18, GNOME has made some impressive improvements. The most interesting thing that they have done is Google Drive integration where users can mount their Google Drive as a remote file storage and work with files without having to use a web browser. I also love GNOME’s awesome integration of email client with calendar and address book. Despite all this awesomeness, however, the one thing that keeps me from using GNOME is its file manager, which can’t handle batch file renames. I will stick to Plasma until GNOME developers fix this problem. + +![](http://www.linux.com/images/stories/66866/DE-fig1.png) + +## Unity + +[Unity](https://unity.ubuntu.com/) is technically not a desktop environment, it’s a graphical shell developed by Canonical for Ubuntu. Unity runs on top of GNOME desktop environment and uses most stock GNOME apps and tools. The Ubuntu team has forked a few GNOME components to better suit the needs of Unity users. + +Unity plays a very important role in Ubuntu’s convergence story and with Unity 8, the company is bringing the desktop and mobile world together. Canonical has developed many intriguing technologies for Unity including HUD (Head-up Display). They also took a unique approach with lenses and scopes making it easy for users to find appropriate content. + +The upcoming release of Ubuntu, 16.04, is expected to ship with Unity 8 so users will get to experience all the work that developers have put into this open source software. One of the biggest criticisms with Unity was opt-out integration of Amazon ads and other services. With the upcoming release, though, Canonical is removing Amazon ads from Dash, making it a privacy-respecting OS by default. + +## Cinnamon + +[Cinnamon](https://en.wikipedia.org/wiki/Cinnamon_(software)) was initially developed by [Linux Mint](http://www.linuxmint.com/) -- the most popular distro on DistroWatch. Cinnamon is a fork of GNOME Shell, just like Unity. Later, however, it evolved into a desktop environment as Linux Mint developers forked many components of the GNOME desktop, including Files, to address the needs of their users. + +Because Linux Mint was based on regular releases of Ubuntu, the developers continued to chase the moving target that was Ubuntu. As a result, despite great promises Cinnamon was full of bugs and problems. With the 17.x release, however, Linux Mint developers moved to LTS edition of Ubuntu that allowed them to focus on core components of Cinnamon without having to worry about the base. As a result of this move, Cinnamon has become incredibly stable and bug free. The developers have started adding more features to the desktop. + +For those who prefer the good old Windows-like UI on top of the simplicity of GNOME, Cinnamon is the best desktop environment. + +## MATE Desktop + +The [MATE desktop](http://mate-desktop.com/) environment is also a fork of GNOME. However, unlike Cinnamon, it’s not a fork of GNOME 3; instead it’s a fork of GNOME 2 codebase, which is not unmaintained. A few developers didn’t like Gnome 3 and wanted to “continue” GNOME 2, so they took the codebase and created MATE. The MATE project forked many components of the GNOME project and created a few from scratch. To avoid any conflict with GNOME 3, they renamed all their packages: Nautilus become Caja, Gedit became Pluma, Evince became Atril, and so on. + +Although MATE is a continuation of GNOME 2, that doesn’t mean they are using old and obsolete technologies; they are using newer technologies to offer a modern GNOME 2 experience. + +What makes MATE an impressive desktop environment is that it’s extremely resource efficient. You can run it on older hardware or newer less powerful hardware, such as Raspberry Pi or Chromebook Flip. What’s makes it even more interesting is that using it on powerful systems frees most system resources for applications instead of the resources being consumed by the desktop environment itself. + +## LXQt + +[LXQt](http://lxqt.org/) is the successor of LXDE, one of the most lightweight desktop environments. It’s a merger of two open source projects LXDE and Razor-Qt. The first usable version of LXQt (v 0.9) was released in 2015. Initially, the developers used Qt4 but then all compatibility with it was dropped, and they moved to Qt5 and KDE Frameworks 5 for speedy development. I have tried LXQt on my Arch systems, and its a great lightweight desktop environment, but it has a long way to go before it becomes the rightful successor of LXDE. + +## Xfce + +[Xfce](http://www.xfce.org/) predates the KDE desktop environment. It is one of the oldest and lightest desktop environments around. The latest release of Xfce is 4.15, which was released in 2015 and uses modern technologies like GTK+ 3. Xfce is used by many special purpose distributions, such as Ubuntu Studio, because -- much like MATE -- it frees most system resources for applications. It’s also the default desktop environment of many notable Linux distributions including Manjaro Linux, PC/OS, Salix, and Mythbuntu. + +## Budgie + +[Budgie](https://solus-project.com/budgie/) is a new desktop environment being developed by the Solus Linux team. Solus is new Linux distribution that’s being developed from scratch, and Budgie is a core component of it. Budgie uses many GNOME components and offers a minimalistic UI. Because there’s not much information about the new desktop, I talked to the core developer of Solus, Ikey Doherty, and he explained, “We ship our own desktop, the Budgie Desktop. Unlike some other desktops, this is not a fork, rather it aims for full integration into the GNOME stack. It's written from scratch, and is specifically designed to cater for the experience Solus is offering. We work with upstream GNOME here as much as we can, contributing fixes, and advocate and support their work.” + +## Pantheon + +[Pantheon](https://elementary.io/) needs no introduction, it’s the desktop environment powering the lovely Linux distribution elementary OS. Similar to Budgie, Pantheon is not a fork of GNOME as many may assume. elementary OS team comes from design background so they pay very close attention to minute details, as a result Pantheon is extremely polished desktop environment. At the moment, it may lack many feature found in DEs like Plasma, but the developers are taking their time in order to stick to the design principle. + +![](http://www.linux.com/images/stories/66866/DE-3.png) + +## Conclusion + +As I went through this story, I realized the awesomeness of open source and Linux. There is something for everyone. As Jon “maddog” Hall said during the latest SCaLE 14, “Yes, there are 300 Linux distributions. I can try them and stick to the one that I like!” + +So, enjoy this diversity and use the one that floats your boat! + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/software/applications/881107-best-linux-desktop-environments-for-2016 + +作者:[Swapnil Bhartiya][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/61003 diff --git a/sources/tech/20160218 Getting to Know Linux File Permissions.md b/sources/tech/20160218 Getting to Know Linux File Permissions.md new file mode 100644 index 0000000000..816f499e36 --- /dev/null +++ b/sources/tech/20160218 Getting to Know Linux File Permissions.md @@ -0,0 +1,148 @@ +ynmlml translating +Getting to Know Linux File Permissions +========================================== + +![](http://www.linux.com/images/stories/66866/files_a.png) + +One of the most basic tasks in Linux is setting file permissions. Understanding how this is done should be considered a must-know, first step in your travels through the Linux ecosystem. As you might expect, such a fundamental issue within the operating environment hasn’t changed much over the years. In fact, the Linux file permission system is taken directly from the UNIX file permission (and even uses many of the same tools). + +But, don’t think for a second that understanding file permissions is something you’ll wind up having to spend days and days studying...it’s actually quite simple. Let’s walk through what you need to know and how to put it all together. + +## The Bits and Pieces + +The first thing you need to understand is what file permissions apply to. Effectively what you do is apply a permission to a group. When you break it down, the concept really is that simple. But what are the permissions and what are the groups? + +There are three types of permissions you can apply: + +- read — gives the group permission to read the file (indicated with `r`) + +- write — gives the group permission to edit the file (indicated with `w`) + +- execute — gives the group permission to execute (run) the file (indicated with `x`) + +To better explain how this is applied to a group, you could, for example, give a group permission to read and write to a file, but not execute the file. Or, you could give a group permission to read and execute a file, but not write to a file. You can even give a group full permission to read, write, and execute a file or strip a group of any access to a file by removing all permissions. + +Now, what are the groups? There are four: + +- user — the actual owner of the file + +- group — users in the file’s group + +- others — other users not in the file’s group + +- all — all users + +For the most part, you will only really ever bother with the first three groups. The all group is really only used as a shortcut (I’ll explain later). + +So far so simple, right? Let’s layer on a bit of complexity. + +If you open up a terminal window and issue the command ls -l, you will see a line-by-line listing of all files and folders within the current working directory (Figure 1 above). + +If you look in the far left column, you’ll notice listings like `-rw-rw-r--`. + +That listing should actually be looked at like so: + +>rw- rw- r-- + +As you can see, the listing is broken into three sections: + +- rw- + +- rw- + +- r-- + +The order is quite important...for both permissions and for groups. The order is always: + +- User Group Others — for groups + +- Read Write Execute — for permissions + +In our permissions listing example above, the User has read/write permission, the Group has read/write permission, and Others has only read permission. Had any of those groups been given executable permissions, it would have been represented with an x. + +## Numerical Equivalent + +Let’s make this even more complex. Each permission can also be represented by a number. The numbers are: + +- Read — 4 + +- Write — 2 + +- Execute — 1 + +The numerical substitution isn’t an apples to apples change. You can’t drop in: + +>-42-42-4-- + +Instead, what you do is add up the numbers you want for each group. Let’s stick with our example above (`-rw-rw-r—`). To give the User group read and write permission, you would add up 4+2 to get 6. For the Group, you need the same permissions, so they get the same number. You only want Others to have read permissions, so they get 4. The numerical equivalent is now: + +>664 + +So, if you want to give a file 664 permissions, you’d issue the chmod command like this: + +>chmod 664 FILENAME + +where FILENAME is the name of the file. + +## Changing Permissions + +Now that you understand the actual permissions of files, it’s time to learn how to change those permissions. This is done with the chmod command. One of the first things you must understand is that, to be able to change the permissions of a file, either you must be the owner of the file or you must have permission to edit the file (or have admin access by way of su or sudo). Because of that, you cannot just jump around in the directory structure and change permissions of files at will. + +Let’s stick with our example (`-rw-rw-r--`). Suppose this file (we’ll name it script.sh) is actually a shell script and needs to be executed...but you only want to give yourself permission to execute that script. At this point, you should be thinking, “Ah, then I need the permission listing to read `-rwx-rw-r--`!”. To get that `x` bit in there, you’d run the chmod command like so: + +>chmod u+x script.sh + +At this point, the listing will be -rwx-rw-r--. + +If you wanted to give both User and Group executable permission, the command would look like: + +>chmod ug+x script.sh + +See how this works? Let’s make it interesting. Say, for whatever reason, you accidentally give all groups executable permissions for that file (so the listing looks like `-rwx-rwx-r-x`). If you want to strip Others of executable permissions, issue the command: + +>chmod o-x script.sh + +What if you want to completely remove executable permission from the file? You can do that two ways: + +>chmod ugo-x script.sh + +or + +>chmod a-x script.sh + +That’s where all comes into play. This is used to make the process a bit more efficient. I prefer to avoid using a as it could lead to issues (such as, when you accidentally issue the command chmod `a-rwx` script.sh). + +## Directory Permissions + +You can also execute the chmod command on a directory. When you create a new directory as a user, it is typically created with the following permissions: + +>drwxrwxr-x + +NOTE: The leading d indicates it is a directory. + +As you can see, both User and Group have executable permission for the folder. This does not mean that any files created in the folder will have the same permissions (files will be created with the default system permissions of `-rw-rw-r--`). But, suppose you do create files in this new directory, and you want to strip Group of write permissions. You don’t have to change into the directory and then issue the chmod command on all the files. You can add the R option (which means recursive) to the chmod command and change the permission on both the folder and all the containing files. + +Now, suppose our example is a folder named TEST and within it is a number of scripts — all of which (including the TEST folder) have permissions `-rwxrwxr-x`. If you want to strip Group of write permissions, you could issue the command: + +>chmod -R g-w TEST + +If you now issue the command ls `-l`, you will see the TEST folder now has a permission listing of `drwxr-xr-x`. Group has been stripped of its write permissions (as will all the files within). + +## Permission to Conclude + +At this point, you should now have a solid understand of the basic Linux file permissions. There are more advanced issues that you can now easily study, such as setuid and setgid and ACLs. Without a good foundation of the basics, however, you’d quickly get lost with those next-level topics. + +Linux file permissions haven’t changed much, since the early days. And, they most likely won’t change much going into the future. + + +------------------------------------------------------------------------------ + +via: http://www.linux.com/learn/tutorials/885268-getting-to-know-linux-file-permissions + +作者:[Jack Wallen][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/93 diff --git a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md new file mode 100644 index 0000000000..468414fdfa --- /dev/null +++ b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md @@ -0,0 +1,113 @@ +GHLandy Translating + +How to Best Manage Encryption Keys on Linux +============================================= + +![](http://www.linux.com/images/stories/41373/key-management-diagram.png) + +Storing SSH encryption **keys** and memorizing passwords can be a headache. But unfortunately in today's world of malicious hackers and exploits, basic security precautions are an essential practice. For a lot of general users, this amounts to simply memorizing passwords and perhaps finding a good program to store the passwords, as we remind such users not to use the same password for every site. But for those of us in various IT fields, we need to take this up a level. We have to deal with encryption keys such as SSH keys, not just passwords. + +Here's a scenario: I have a server running on a cloud that I use for my main git repository. I have multiple computers I work from. All of those computers need to log into that central server to push to and pull from. I have git set up to use SSH. When git uses SSH, git essentially logs into the server in the same way you would if you were to launch a command line into the server with the SSH command. In order to configure everything, I created a config file in my .ssh directory that contains a Host entry providing a name for the server, the host name, the user to log in as, and the path to a key file. I can then test this configuration out by simply typing the command + +>ssh gitserver + +And soon I'm presented with the server's bash shell. Now I can configure git to use this same entry to log in with the stored key. Easy enough, except for one problem: For each computer I use to log into that server, I need to have a key file. That means more than one key file floating around. I have several such keys on this computer, and several such keys on my other computers. In the same way everyday users have a gazillion passwords, it's easy for us IT folks to end up with a gazillion key files. What to do? + +## Cleaning Up + +Before starting out with a program to help you manage your keys, you have to lay some groundwork on how your keys should be handled, and whether the questions we're asking even make sense. And that requires first and foremost that you understand where your public keys go and where your private keys go. I'm going to assume you know: + +1. The difference between a public key and private key + +2. Why you can't generate a private key from a public key but you can do the reverse + +3. The purpose of the authorized_keys file and what goes in it + +4. How you use private keys to log into a server that has the corresponding public key in its authorized_keys file. + +Here's an example. When you create a cloud server on Amazon Web Services, you have to provide an SSH key that you'll use for connecting to your server. Each key has a public part and a private part. Because you want your server to stay secure, at first glance it might seem you put the private key onto that server, and that you take the public key with you. After all, you don't want that server to be publicly accessible, right? But that's actually backwards. + +You put the public key on the AWS server, and you hold onto your private key for logging into the server. You guard that private key and keep it by your side, not on some remote server, as shown in the figure above. + +Here's why: If the public key were to become known to others, they wouldn't be able to log into the server since they don't have the private key. Further, if somebody did manage to break into your server, all they would find is a public key. You can't generate a private key from a public key. And so if you're using that same key on other servers, they wouldn't be able to use it to log into those other computers. + +And that's why you put your public key on your servers for logging into them through SSH. The private keys stay with you. You don't let those private keys out of your hands. + +But there's still trouble. Consider the case of my git server. I had some decisions to make. Sometimes I'm logged into a development server that's hosted elsewhere. While on that dev box, I need to connect to my git server. How can the dev box connect to the git server? By using the private key. And therein lies trouble. This scenario requires I put a private key on a server that is hosted elsewhere, which is potentially dangerous. + +Now a further scenario: What if I were to use a single key to log into multiple servers? If an intruder got hold of this one private key, he or she would have that private key and gain access to the full virtual network of servers, ready to do some serious damage. Not good at all. + +And that, of course, brings up the other question: Should I really use the same key for those other servers? That's could be dangerous because of what I just described. + +In the end, this sounds messy, but there are some simple solutions. Let's get organized. + +(Note that there are many places you need to use keys besides just logging into servers, but I'm presenting this as one scenario to show you what you're faced with when dealing with keys.) + +## Regarding Passphrases + +When you create your keys, you have the option to include a passphrase that is required when using the private key. With this passphrase, the private key file itself is encrypted using the passphrase. For example, if you have a public key stored on a server and you use the private key to log into that server, you'll be prompted to enter a passphrase. Without the passphrase, the key cannot be used. Alternatively, you can configure your key without a passphrase to begin with. Then all you need is the key file to log into the server. + +Generally going without a passphrase is easier on the users, but one reason I strongly recommend using the passphrase in many situations is this: If the private key file gets stolen, the person who steals it still can't use it until he or she is able to find out the passphrase. In theory, this will save you time as you remove the public key from the server before the attacker can discover the passphrase, thus protecting your system. There are other reasons to use a passphrase, but this one alone makes it worth it to me in many situations. (As an example, I have VNC software on an Android tablet. The tablet holds my private key. If my tablet gets stolen, I'll immediately revoke the public key from the server it logs into, rendering its private key useless, with or without the passphrase.) But in some cases I don't use it, because the server I'm logging into might not have much valuable data on it. It depends on the situation. + +## Server Infrastructure + +How you design your infrastructure of servers will impact how you manage your keys. For example, if you have multiple users logging in, you'll need to decide whether each user gets a separate key. (Generally speaking, they should; you don't want users sharing private keys. That way if one user leaves the organization or loses trust, you can revoke that user's key without having to generate new keys for everyone else. And similarly, by sharing keys they could log in as each other, which is also bad.) But another issue is how you're allocating your servers. Do you allocate a lot of servers using tools such as Puppet, for example? And do you create multiple servers based on your own images? When you replicate your servers, do you need to have the same key for each? Different cloud server software allows you to configure this how you choose; you can have the servers get the same key, or have a new one generated for each. + +If you're dealing with replicated servers, it can get confusing if the users need to use different keys to log into two different servers that are otherwise similar. But on the other hand, there could be security risks by having the servers share the same keys. Or, on the third hand, if your keys are needed for something other than logging in (such as mounting an encrypted drive), then you would need the same key in multiple places. As you can see, whether you need to use the same keys across different servers is not a decision I can make for you; there are trade offs, and you need to decide for yourself what's best. + +In the end, you're likely to have: + +- Multiple servers that need to be logged into + +- Multiple users logging into different servers, each with their own key + +- Multiple keys for each user as they log into different servers. + +(If you're using keys in other situations, as you likely are, the same general concepts will apply regarding how keys are used, how many keys are needed, whether they're shared, and how you handle private and public parts of keys.) + +## Method of safety + +Knowing your infrastructure and unique situation, you need to put together a key management plan that will help guide you on how you distribute and store your keys. For example, earlier I mentioned that if my tablet gets stolen, I will revoke the public key from my server, hopefully before the tablet can be used to access the server. As such, I can allow for the following in my overall plan: + +1. Private keys are okay on mobile devices, but they must include a passphrase + +2. There must exist a way to quickly revoke public keys from a server. + +In your situation, you might decide you just don't want to use passphrases for a system you log into regularly; for example, the system might be a test machine that the developers log into many times a day. That's fine, but then you'll need to adjust your rules a bit. You might include a rule that that machine is not to be logged into from mobile devices. In other words, you need to build your protocols based on your own situation, and not assume one size fits all. + +## Software + +On to software. Surprisingly, there aren't a lot of good, solid software solutions for storing and managing your private keys. But should there be? Consider this: If you have a program storing all your keys for all your servers, and that program is locked down by a quick password, are your keys really secure? Or, similarly, if your private keys are sitting on your hard drive for quick access by the SSH program, is a key management software really providing any protection? + +But for overall infrastructure and creating and managing public keys, there are some solutions. I already mentioned Puppet. In the Puppet world, you create modules to manage your servers in different ways. The idea is that servers are dynamic and not necessarily exact duplicates of each other. [Here's one clever approach](http://manuel.kiessling.net/2014/03/26/building-manageable-server-infrastructures-with-puppet-part-4/) that uses the same keys on different servers, but uses a different Puppet module for each user. This solution may or may not apply to you. + +Or, another option is to shift gears altogether. In the world of Docker, you can take a different approach, as described in [this blog regarding SSH and Docker](http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/). + +But what about managing the private keys? If you search, you're not going to find many software options, for the reasons I mentioned earlier; the private keys are sitting on your hard drive, and a management program might not provide much additional security. But I do manage my keys using this method: + +First, I have multiple Host entries in my .ssh/config file. I have an entry for hosts that I log into, but sometimes I have more than one entry for a single host. That happens if I have multiple logins. I have two different logins for the server hosting my git repository; one is strictly for git, and the other is for general-purpose bash access. The one for git has greatly restricted rights on that machine. Remember what I said earlier about my git keys living on remote development machines? There we go. Although those keys can log into one of my servers, the accounts used are severely limited. + + Second, most of these private keys include a passphrase. (For dealing with having to type the passphrase multiple times, considering using [ssh-agent](http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/).) + +Third, I do have some servers that I want to guard a bit more carefully, and I don't have an entry into my Host file. This is more a social engineering aspect, because the key files are still present, but it might take an intruder a bit longer to locate the key file and figure out which machine they go with. In those cases, I just type out the long ssh command manually. (It's really not that bad.) + +And you can see that I'm not using any special software to manage these private keys. + +## One Size Doesn't Fit All + +We occasionally get questions at linux.com for advice on good software for managing keys. But let's take a step back. The question actually needs to be re-framed, because there isn't a one-size-fits-all solution. The questions you ask should be based on your own situation. Are you simply trying to find a place to store your key files? Are you looking for a way to manage multiple users each with their own public key that needs to be inserted into the authorized_keys file? + +Throughout this article, I've covered the basics of how all this fits together, and hopefully at this point you'll see that how you manage your keys, and whatever software you look for (if you even need additional software at all), should happen only after you ask the right questions. + + +------------------------------------------------------------------------------ + +via: http://www.linux.com/learn/tutorials/838235-how-to-best-manage-encryption-keys-on-linux + +作者:[Jeff Cogswell][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/62256 diff --git a/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md b/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md new file mode 100644 index 0000000000..dc21bc0b23 --- /dev/null +++ b/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md @@ -0,0 +1,203 @@ +zky001开始翻译 + +How to Set Nginx as Reverse Proxy on Centos7 CPanel +================================================================================ + +Nginx is one of the fastest and most powerful web-server. It is known for its high performance and low resource utilization. It can be installed as both a standalone and a Reverse Proxy Web-server. In this article, I'm discussing about the installation of Nginx as a reverse proxy along with Apache on a CPanel server with latest CentOS 7 installed. + +Nginx as a reverse proxy will work as a frontend webserver serving static contents along with Apache serving the dynamic files in backend. This setup will boost up the overall server performance. + +Let's walk through the installation steps for Nginx as reverse proxy in CentOS7 x86_64 bit server with cPanel 11.52 installed. + +First of all, we need to install the EPEL repo to start-up with the process. + +### Step 1: Install the EPEL repo. ### + + root@server1 [/usr]# yum -y install epel-release + Loaded plugins: fastestmirror, tsflags, universal-hooks + Loading mirror speeds from cached hostfile + * EA4: 66.23.237.210 + * base: mirrors.linode.com + * extras: mirrors.linode.com + * updates: mirrors.linode.com + Resolving Dependencies + --> Running transaction check + ---> Package epel-release.noarch 0:7-5 will be installed + --> Finished Dependency Resolution + + Dependencies Resolved + + =============================================================================================================================================== + Package Arch Version Repository Size + =============================================================================================================================================== + Installing: + epel-release noarch 7-5 extras 14 k + +### Step 2: After installing the repo, we can start with the installation of the nDeploy RPM repo for CentOS to install our required nDeploy Webstack and Nginx plugin. ### + + root@server1 [/usr]# yum -y install http://rpm.piserve.com/nDeploy-release-centos-1.0-1.noarch.rpm + Loaded plugins: fastestmirror, tsflags, universal-hooks + nDeploy-release-centos-1.0-1.noarch.rpm | 1.7 kB 00:00:00 + Examining /var/tmp/yum-root-ei5tWJ/nDeploy-release-centos-1.0-1.noarch.rpm: nDeploy-release-centos-1.0-1.noarch + Marking /var/tmp/yum-root-ei5tWJ/nDeploy-release-centos-1.0-1.noarch.rpm to be installed + Resolving Dependencies + --> Running transaction check + ---> Package nDeploy-release-centos.noarch 0:1.0-1 will be installed + --> Finished Dependency Resolution + + Dependencies Resolved + + =============================================================================================================================================== + Package Arch Version Repository Size + =============================================================================================================================================== + Installing: + nDeploy-release-centos noarch 1.0-1 /nDeploy-release-centos-1.0-1.noarch 110 + +### Step 3: Install the nDeploy and Nginx nDeploy plugins. ### + + root@server1 [/usr]# yum --enablerepo=ndeploy install nginx-nDeploy nDeploy + Loaded plugins: fastestmirror, tsflags, universal-hooks + epel/x86_64/metalink | 9.9 kB 00:00:00 + epel | 4.3 kB 00:00:00 + ndeploy | 2.9 kB 00:00:00 + (1/4): ndeploy/7/x86_64/primary_db | 14 kB 00:00:00 + (2/4): epel/x86_64/group_gz | 169 kB 00:00:00 + (3/4): epel/x86_64/primary_db | 3.7 MB 00:00:02 + + Dependencies Resolved + + =============================================================================================================================================== + Package Arch Version Repository Size + =============================================================================================================================================== + Installing: + nDeploy noarch 2.0-11.el7 ndeploy 80 k + nginx-nDeploy x86_64 1.8.0-34.el7 ndeploy 36 M + Installing for dependencies: + PyYAML x86_64 3.10-11.el7 base 153 k + libevent x86_64 2.0.21-4.el7 base 214 k + memcached x86_64 1.4.15-9.el7 base 84 k + python-inotify noarch 0.9.4-4.el7 base 49 k + python-lxml x86_64 3.2.1-4.el7 base 758 k + + Transaction Summary + =============================================================================================================================================== + Install 2 Packages (+5 Dependent packages) + +With these steps, we've completed with the installation of Nginx plugin in our server. Now we need to configure Nginx as reverse proxy and create the virtualhost for the existing cPanel user accounts. For that we can run the following script. + +### Step 4: To enable Nginx as a front end Web Server and create the default configuration files. ### + + root@server1 [/usr]# /opt/nDeploy/scripts/cpanel-nDeploy-setup.sh enable + Modifying apache http and https port in cpanel + + httpd restarted successfully. + Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service. + Created symlink from /etc/systemd/system/multi-user.target.wants/ndeploy_watcher.service to /usr/lib/systemd/system/ndeploy_watcher.service. + Created symlink from /etc/systemd/system/multi-user.target.wants/ndeploy_backends.service to /usr/lib/systemd/system/ndeploy_backends.service. + ConfGen:: saheetha + ConfGen:: satest + +As you can see these script will modify the Apache port from 80 to another port to make Nginx run as a front end web server and create the virtual host configuration files for the existing cPanel accounts. Once it is done, confirm the status of both Apache and Nginx. + +### Apache Status: ### + + root@server1 [/var/run/httpd]# systemctl status httpd + ● httpd.service - Apache Web Server + Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) + Active: active (running) since Mon 2016-01-18 06:34:23 UTC; 12s ago + Process: 25606 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS) + Main PID: 24760 (httpd) + CGroup: /system.slice/httpd.service + ‣ 24760 /usr/local/apache/bin/httpd -k start + + Jan 18 06:34:23 server1.centos7-test.com systemd[1]: Starting Apache Web Server... + Jan 18 06:34:23 server1.centos7-test.com apachectl[25606]: httpd (pid 24760) already running + Jan 18 06:34:23 server1.centos7-test.com systemd[1]: Started Apache Web Server. + +### Nginx Status: ### + + root@server1 [~]# systemctl status nginx + ● nginx.service - nginx-nDeploy - high performance web server + Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled) + Active: active (running) since Sun 2016-01-17 17:18:29 UTC; 13h ago + Docs: http://nginx.org/en/docs/ + Main PID: 3833 (nginx) + CGroup: /system.slice/nginx.service + ├─ 3833 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf + ├─25473 nginx: worker process + ├─25474 nginx: worker process + └─25475 nginx: cache manager process + + Jan 17 17:18:29 server1.centos7-test.com systemd[1]: Starting nginx-nDeploy - high performance web server... + Jan 17 17:18:29 server1.centos7-test.com nginx[3804]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok + Jan 17 17:18:29 server1.centos7-test.com nginx[3804]: nginx: configuration file /etc/nginx/nginx.conf test is successful + Jan 17 17:18:29 server1.centos7-test.com systemd[1]: Started nginx-nDeploy - high performance web server. + +Nginx act as a frontend webserver running on port 80 and Apache configuration is modified to listen on http port 9999 and https port 4430. Please see their status below: + + root@server1 [/usr/local/src]# netstat -plan | grep httpd + tcp 0 0 0.0.0.0:4430 0.0.0.0:* LISTEN 17270/httpd + tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 17270/httpd + tcp6 0 0 :::4430 :::* LISTEN 17270/httpd + tcp6 0 0 :::9999 :::* LISTEN 17270/httpd + +![apacheport](http://blog.linoxide.com/wp-content/uploads/2016/01/apacheport.png) + + root@server1 [/usr/local/src]# netstat -plan | grep nginx + tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 17802/nginx: master + tcp 0 0 45.79.183.73:80 0.0.0.0:* LISTEN 17802/nginx: master + +The virtualhost entries created for the existing users as located in the folder "**/etc/nginx/sites-enabled**". This file path is included in the Nginx main configuration file. + + root@server1 [/etc/nginx/sites-enabled]# ll | grep .conf + -rw-r--r-- 1 root root 311 Jan 17 09:02 saheetha.com.conf + -rw-r--r-- 1 root root 336 Jan 17 09:02 saheethastest.com.conf + +### Sample Vhost for a domain: ### + + server { + + listen 45.79.183.73:80; + #CPIPVSIX:80; + + # ServerNames + server_name saheetha.com www.saheetha.com; + access_log /usr/local/apache/domlogs/saheetha.com main; + access_log /usr/local/apache/domlogs/saheetha.com-bytes_log bytes_log; + + include /etc/nginx/sites-enabled/saheetha.com.include; + + } + +We can confirm the working of the web server status by calling a website in the browser. Please see the web server information on my server after the installation. + + root@server1 [/home]# ip a | grep -i eth0 + 3: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000 + inet 45.79.183.73/24 brd 45.79.183.255 scope global dynamic eth0 + root@server1 [/home]# nginx -v + nginx version: nginx/1.8.0 + +![webserver-status](http://blog.linoxide.com/wp-content/uploads/2016/01/webserver.png) + +Nginx will create the virtual host automatically for any newly created accounts in cPanel. With these simple steps we can configure Nginx as reverse proxy on a CentOS 7/CPanel server. + +### Advantages of Nginx as Reverse Proxy: ### + + 1. Easy to install and configure + 2. Performance and efficiency + 3. Prevent DDOS attacks + 4. Allows .htaccess PHP rewrite rules + +I hope this article is useful for you guys. Thank you for referring to this. I would appreciate your valuable comments and suggestions on this for further improvements. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/set-nginx-reverse-proxy-centos-7-cpanel/ + +作者:[Saheetha Shameer][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/saheethas/ diff --git a/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md b/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md new file mode 100644 index 0000000000..14e950a611 --- /dev/null +++ b/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md @@ -0,0 +1,52 @@ +Ricky Gong 翻译中 + +Linux Systems Patched for Critical glibc Flaw +================================================= + +**Google exposed a critical flaw affecting major Linux distributions. The glibc flaw could have potentially led to remote code execution.** + +Linux users today are scrambling to patch a critical flaw in the core glibc open-source library that could be exposing systems to a remote code execution risk. The glibc vulnerability is identified as CVE-2015-7547 and is titled, "getaddrinfo stack-based buffer overflow." + +The glibc, or GNU C Library, is an open-source implementation of the C and C++ programming language libraries and is part of every major Linux distribution. Google engineers came across the CVE-2015-7547 issue when they were attempting to connect into a certain host system and a segmentation fault (segfault) occurred, causing the connection to crash. Further investigation revealed that glibc was at fault and the crash could potentially achieve an arbitrary remote code execution condition. + +"The glibc DNS client side resolver is vulnerable to a stack-based buffer overflow when the getaddrinfo() library function is used," Google wrote in a blog post. "Software using this function may be exploited with attacker-controlled domain names, attacker-controlled DNS [Domain Name System] servers, or through a man-in-the-middle attack." + +Actually exploiting the CVE-2015-7547 issue is not trivial, but it is possible. To prove that the issue can be exploited, Google has published proof-of-concept (PoC) code on GitHub that demonstrates if an end user or system is vulnerable. + +"The server code triggers the vulnerability and therefore will crash the client code," the GitHub PoC page states. + +Mark Loveless, senior security researcher at Duo Security, explained that the main risk of CVE-2015-7547 is to Linux client-based applications that rely on DNS responses. + +"There are some specific conditions, so not every single application will be impacted, but it appears that several command-line utilities, including the popular SSH [Secure Shell] client could trigger the flaw," Loveless told eWEEK. "We deem this serious mainly because of the existing risks to Linux systems, but also because of the potential for other issues." + +Other issues could potentially include a risk of an email-based attack that triggers the vulnerable glibc getaddrinfo() library call. Also of note is the fact that the vulnerability was in the code for years before it was discovered. + +Google's engineers were not the first or only group to discover the security risk in glibc. The issue was first reported to a glibc bug [tracker](https://sourceware.org/bugzilla/show_bug.cgi?id=1866) on July 13, 2015. The roots of the flaw go back even further with the actual code commit that introduced the flaw first in glibc 2.9, which was released in May 2008. + +Linux vendor Red Hat also independently was looking at the bug in glibc and on Jan. 6, 2016, Google and Red Hat developers confirmed that they had been independently working on the same vulnerability as part of the initial private discussion with upstream glibc maintainers. + +"Once it was confirmed that both teams were working on the same vulnerability, we collaborated on potential fixes, mitigations and regression testing," Florian Weimer, principal software engineer for product security at Red Hat, told eWEEK. "We also worked together to make the test coverage as wide as possible to catch any related problems in the code to help prevent future issues." + +It took years to discover that there was a security issue with the glibc code because that flaw isn't obvious or immediately apparent. + +"To diagnose bugs in a networking component, like a DNS resolver, it is common to look at packet traces which were captured while the issue was encountered," Weimer said. "Such packet captures were not available in this case, so some experimentation was needed to reproduce the exact scenario that triggered the bug." + +Weimer added that once the packet captures were available, considerable effort went into validating the fix, leading to a series of refinements culminating in the regression test suite that was contributed upstream to the glibc project. + +In many cases in Linux, the Security Enhanced Linux (SELinux) mandatory access security controls can mitigate the risk of potential vulnerabilities, but that's not the case with the new glibc issue. + +"The risk is a compromise of important system functionality due to the execution of arbitrary code supplied by an attacker," Weimer said. "A suitable SELinux policy can contain some of the damage an attacker might do and constrain their access to the system, but DNS is used by many applications and system components, so SELinux policies offer only limited containment for this issue." + +Alongside the vulnerability disclosure today, there is now a patch available to mitigate the potential risk of CVE-2015-7547. + +------------------------------------------------------------------------------ + +via: http://www.eweek.com/security/linux-systems-patched-for-critical-glibc-flaw.html + +作者:[Michael Kerner][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://twitter.com/TechJournalist diff --git a/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md b/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md new file mode 100644 index 0000000000..313bf3b9e5 --- /dev/null +++ b/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md @@ -0,0 +1,55 @@ +martin +ST Releases Free Linux IDE for 32-Bit MCUs +================================================= + +![](http://www.linux.com/images/stories/66866/STM32_Nucleo_expansion_board.jpg) + +The 32-bit microcontroller world is starting to open up to Linux. This week, leading ARM Cortex-M vendor STMicroelectronics (ST) [released](http://www.st.com/web/en/press/p3781) a free Linux desktop version of its development software for its line of STM32 microcontroller units (MCUs). The tools include ST’s STM32CubeMX configurator and initialization tool, as well as its [System Workbench for STM32 (SW4STM32)](http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF261797) , an Eclipse-based IDE created by Ac6 Tools. SW4STM32 is supported with toolchain, forums, blogs, and technical support by the [openSTM32.org](http://www.openstm32.org/tiki-index.php?page=HomePage) development community. + +"The Linux community is known to attract creative free-thinkers who are adept at sharing ideas and solving challenges efficiently," stated Laurent Desseignes, Microcontroller Ecosystem Marketing Manager, Microcontroller Division, STMicroelectronics. "We are now making it ultra-easy for them to apply their skills to create imaginative new products, leveraging the features and performance of our STM32 family." + +Linux is the leading platform for Internet of Things gateways and hubs, as well as higher-end IoT endpoints. Yet, much of the IoT revolution, as well as the wearables market, is based on tiny, low-power microcontrollers, increasingly Cortex-M chips. A small subset of these can run the stripped-down uCLinux (see below), but none support more comprehensive Linux distributions. Instead, they are controlled with real-time operating systems (RTOSes) or go bare-bones with no OS at all. The firmware development work is typically done on a Windows-based Integrated Development Environment (IDE). + +With ST’s free tools, Linux developers can more easily tap this new realm. ST’s tools, some of which should also be available for Mac OS/X in the second quarter, work with [STM32 Nucleo](http://www.st.com/web/en/catalog/tools/FM146/CL2167/SC2003?icmp=sc2003_pron_pr-stm32f446_dec2014&sc=stm32nucleo-pr5) boards, Discovery kits, and Evaluation boards. The Nucleo boards are available in 32-, 64-, and 144-pin versions, and offer hardware add-ons such as Arduino connectors. + +The STM32CubeMX configurator and SW4STM32 IDE enable Linux developers to configure microcontrollers and develop and debug code. SW4STM32 supports the ST-LINK/V2 debugging tool under Linux via an adapted version of the [OpenOCD](http://openocd.org/) community project. + +The software is compatible with microcontroller firmware within the STM32Cube embedded-software packages or Standard Peripheral Library, says ST. Targets include ST’s full range of MCUs, from entry-level Cortex-M0 cores to high-performing M7 chips, including M0+, M3, and DSP-extended M4 cores. + +ST is not the first 32-bit MCU vendor to offer Linux-ready IDEs for Cortex-M chips, but it appears to be one of the first major free Linux platforms. For example, NXP, whose share of the MCU market increased with its recent acquisition of Freescale (Kinetis MCUs, among others), offers an [LPCXpresso IDE](http://www.nxp.com/pages/lpcxpresso-ide:LPCXPRESSO) with Linux, Windows, and Mac support. However, LPCXpresso costs $450 per individual seat. + +Microsemi, which integrates Cortex-M3 chips in its [SmartFusion FPGA SoCs](http://www.microsemi.com/products/fpga-soc/soc-processors/arm-cortex-m3) has a [Libero IDE](http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus#device-support) available for Red Hat Enterprise Linux (RHEL) in addition to Windows. However, Libero requires a license, and the RHEL version lacks support for add-on packages such as FlashPro and SoftConsole. + +## Why Learn MCU-Speak? + +Even if a Linux developer has no plans to load uClinux on a Cortex-M chip, knowledge of MCUs should come in handy. This is especially true with complex, heterogeneous IoT projects that extend from MCU-based endpoints to cloud platforms. + +For prototyping and hobbyist projects, an interface to an Arduino board offers fairly easy access to MCU benefits. Yet beyond prototyping, developers often replace the Arduino board and its 8-bit ATmega32u4 MCU with a faster 32-bit Cortex-M chip with additional functionality. This includes improved memory addressing, independent clock settings for the core and various buses, and in the case of some [Cortex-M7](http://www.electronicsnews.com.au/products/stm32-mcus-with-arm-cortex-m7-processors-and-graph) chips, rudimentary graphics. + +Other categories where MCU development skills might come in handy include wearables, where low power, low cost, and small size give MCUs an edge, and robotics and drones where real-time processing and motor control are the main benefits. In robotics, you’re likely to see Cortex-A and Cortex-M both integrated in the same product. + +There’s also a modest trend toward system-on-chips adding MCUs to Linux-driven Cortex-A cores, as with the [NXP i.MX6 SoloX](http://linuxgizmos.com/freescales-popular-i-mx6-soc-sprouts-a-cortex-m4-mcu/). While most embedded projects don’t use such hybrid SoCs or combine applications processor and MCUs on the same product, developers may increasingly find themselves working on product lines that extend from low-end MCU models to Linux- or Android-driven Cortex-A based designs. + +## uClinux Stakes Linux Claim in MCUs + +With the rise of IoT, we’re starting to see more SBCs and computer-on-modules that run uClinux on 32-bit MCUs. Unlike other Linux distributions, uClinux does not require a memory management unit (MMU). uClinux does, however, have higher memory requirements than most MCUs can meet. The distro requires higher end Cortex-M4 and Cortex-M4 MCUs with built-in memory controllers supporting external DRAM chips. + +[Amptek’s iCon](http://www.semiconductorstore.com/Amptek/) SBCs run uClinux on NXP LPC Cortex-M3 and -M4 chips, offering familiar trappings like WiFi, Bluetooth, USB, and other interfaces. Arrow’s [SF2+](http://linuxgizmos.com/iot-dev-kit-runs-uclinux-on-a-microsemi-cortex-m3-fpga-soc/) IoT development kit runs uClinux on an Emcraft Systems SmartFusion2 COM based on Microsemi’s 166MHz, Cortex-M3/FPGA SmartFusion2 hybrid SoC. + +[Emcraft](http://www.emcraft.com/), which sells uClinux-based COMs based on ST and NXP, as well as Microsemi MCUs, has been actively promoting the role of uClinux on 32-bit MCUs. Increasingly, uClinux is up against ARM’s own [Mbed OS](http://linuxgizmos.com/arm-announces-mbed-os-for-iot-devices/), at least on high-end MCU projects that require wireless communications and more sophisticated rules-based operation. Proponents of Mbed and modern, open source RTOSes like FreeRTOS say that uClinux requires too much RAM overhead to make it affordable for IoT endpoints. However, Emcraft and other uCLinux proponents claim the costs are overstated, and are worth the more extensive Linux wireless and interface support available even in a stripped down distro like uClinux. + +When asked for comment on the ST release, Emcraft director of engineering Vladimir Khusainov had this to say: “ST’s decision to port its development tools to Linux is good news for Emcraft since it allows Linux users an easy way to start working with embedded STM MCUs. We expect that, having had a chance to get familiar with STM devices using the ST configurator and embedded libraries, some of those users may become interested in running embedded Linux (in its uClinux form) on the target.” + +For a recent overview of uClinux on Cortex-M4, check out this [slide show](http://events.linuxfoundation.org/sites/events/files/slides/optimize-uclinux.pdf) from last year’s Embedded Linux Conference by Jim Huang and Jeff Liaw. More on Cortex-M processors in general may be found in this tidy [AnandTech overview](http://www.anandtech.com/show/8400/arms-cortex-m-even-smaller-and-lower-power-cpu-cores). + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/42808 diff --git a/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md b/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md new file mode 100644 index 0000000000..062fcae483 --- /dev/null +++ b/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md @@ -0,0 +1,68 @@ +Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions +============================================================== + +Last week’s news that Tizen 3.0 has been ported to the Raspberry Pi 2 Model B is the latest example of how the year-old ARMv7 version of the Pi is attracting ports from more powerful Linux distributions, most notably Fedora, Ubuntu MATE, and Snappy. The [Samsung Open Source Group’s Tizen for Pi][1] project has been underway for several years, achieving several beta releases, and now the effort has shifted to the new Tizen 3.0. It’s still in beta, but now you can create builds for the Pi 2 using tools from the [Yocto][2] Project and [OpenEmbedded project][3]. + +Tizen 3.0 offers performance and security improvements, multiple-user and 64-bit support, and an Internet of Things (IoT) framework. Samsung, the principal backer of the [Linux Foundation hosted Tizen project][4], is using the Pi port to expand the base of developers using Tizen for IoT projects, according to an [IDG News Service post][5] that reported on the port. + +Although Samsung finally [shipped a Tizen-based][6] phone in India last summer, and Gear smartwatches continue to use Tizen, the main focus now appears to be on IoT. At CES last month, Samsung [announced][7] that all of its Tizen-based, 2016 Smart TVs will be able to act as SmartThings home automation hubs, letting users monitor the household while watching TV. + +### The Growing List of Pi Distros + +[Elinux.org][8] lists some 46 ARMv6-ready distributions that run on all the Raspberry Pi boards. A separate listing notes two ARMv7-only distros that require the ARMv7 Raspberry Pi 2: Ubuntu MATE, which replaces the resource-intensive Unity desktop with the Gnome 2.0 flavored MATE, and Windows 10 IoT Core. The prominent placement of a Microsoft distribution is not as controversial as one might have thought. To many younger Linux developers and casual Pi hackers, Microsoft is just another tech company, not so much the evil empire loathed by old-time Linux hackers. + +Windows 10 IoT Core isn’t the only non-Linux distro running on the Pi. There’s also the Unix-like FreeBSD and NetBSD, as well as the revived RISC OS Pi version of the old Acorn Computers OS. Some of the 48 operating systems on the Elinux.org list are incomplete, out-of-date, or dedicated to limited niches. [DistroWatch][9] offers a more manageable list of 20. + +The [Raspberry Pi Foundation][10] still prominently posts a download page for its homegrown, Debian-based Raspbian, in both standard and NOOBS packages. This lightweight distro is still the most popular and typically the highest rated Linux build for the Pi. The Scratch-ready distro is especially equally suited for desktop use and embedded hacking with home automation gear, robots, and other IoT gizmos. Raspbian recently [received an update][11] with an experimental OpenGL driver for doing hardware acceleration on the VideoCore IV GPU used with the Pi 2’s Broadcom BCM2836 SoC. + +The Pi Foundation also lists several [third-party downloads][12]. In addition to Windows 10 IoT Core and and Ubuntu MATE, the list includes the lightweight, transactionally focused [Snappy Ubuntu Core][13] for the Pi 2. Canonical is aiming Snappy at those who want an app platform and cloud integration in embedded devices like drones and IoT devices. Snappy also came out last week in a version designed for [Intel NUC mini-PCs][14]. The Pi Foundation also posts images for RISC OS and the education-focused PINET. There are also two media center distros related to KODI/XBMC: OSMC and OpenElec. + +In addition to its list of 48 released distros, Elinux.org lists several “announced” distros including Firefox OS, [openSUSE][15], Meego MER & XBMC, Puppy, RPi-Buildroot, and Aros. Missing, however, is Tizen, as well as newly announced ports such as [Manjaro-ARM][16] and the CentOS 7-based [CentOS AltArch 7][17] for the Pi 2, Banana Pi, and CubieTruck SBCs. + +### Android Still Pi in the Sky + +Elinux.org’s “announced” list also includes Android and a Miracast-like program called Android Transporter. People have been trying to port Android to the Pi for years; yet, even with the more suitable [Pi 2][18] shipping for a year now, Android is still pretty much a no-show. Android can run on lower-powered SoCs than the Pi 2’s quad-core, Cortex-A7, but the limited 1GB of RAM and the lack of GPU acceleration are big challenges. Perhaps Raspbian’s OpenGL driver could be ported to Android as well, although the Pi Foundation does not seem very interested in Android. + +There are several Android-for-Pi projects in the works, but without the foundation’s backing, there is still nothing close to a complete port. Projects include an [AOSP Marshmallow][19] patch-set from Peter Yoon, as well as a [RaspAnd][20] release based on the Ubuntu-based RaspEx, which makes use of the Aptoide package manager to load some Android 5.1 apps on a Pi 2. The [Razdroid project][21], which aims to tap into the secrets of Broadcom hardware acceleration, seems to have stalled. + +Most Rasp Pi users, however, appear more interested in [Ubuntu MATE][22], which was never optimized for ARMv6, and Fedora. For years, Pi users have run the lightweight spin-down of Fedora called Pidora, but with the Pi 2, they can now try the real thing. The Raspberry Pi Foundation has yet to post Fedora, but the recent [betas of the Pi 2 port][23] have received high marks. + +Other Linux distributions that regularly make Top Pi distro lists include Arch Linux, which unlike most ports from mature Linux distros, works just fine on ARMv6. A recent [TechRadar Top 5 list][24] includes several more niche distros in addition to Raspbian. These include the OSMC media player environment, RetroPie for playing classic games, OpenMediaVault for turning your Pi into a NAS, and Pi MusicBox, based on the Mopidy music streaming server. + +Beyond Ubuntu, Fedora, and Tizen, other distros, both arcane and general, are heading for the Pi 2, as well. The platform is rapidly expanding the boundaries of, as well as redefining the meaning of, desktop Linux. + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/embedded-mobile/mobile-linux/886126-tizen-30-joins-growing-list-of-raspberry-pi-2-distros + +作者:[Eric Brown][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/42808 +[1]:http://blogs.s-osg.org/bringing-tizen-to-a-raspberry-pi-2-near-you/ +[2]:https://www.yoctoproject.org/ +[3]:http://www.openembedded.org/wiki/Main_Page +[4]:https://www.tizen.org/ +[5]:http://www.cio.com/article/3031812/samsung-hopes-raspberry-pi-can-spread-tizen-os-adoption.html +[6]:http://www.linux.com/news/embedded-mobile/mobile-linux/837843-samsung-sells-a-million-tizen-phones-as-mozilla-rethinks-firefox-os +[7]:http://www.linux.com/news/embedded-mobile/mobile-linux/877879-linux-based-drones-upstage-other-mobile-gadgets-at-ces +[8]:http://elinux.org/RPi_Distributions +[9]:https://distrowatch.com/search.php?category=Raspberry+Pi +[10]:https://www.raspberrypi.org/ +[11]:http://news.softpedia.com/news/raspbian-gets-experimental-opengl-driver-gpu-now-used-for-acceleration-500152.shtml +[12]:https://www.raspberrypi.org/downloads/ +[13]:http://www.linux.com/news/embedded-mobile/mobile-linux/804659-ubuntu-snappy-leads-mobile-linux-migration-to-iot +[14]:https://insights.ubuntu.com/2016/02/10/ubuntu-core-is-available-for-the-intel-nuc/ +[15]:https://www.reddit.com/r/openSUSE/comments/3hxrz4/opensuse_on_a_raspberry_pi_2_armv7/ +[16]:http://www.linux-arm.info/index.php/1103-hands-on-more-adventures-with-manjaro-arm-for-the-raspberry-pi-2 +[17]:http://www.linux-arm.info/index.php/1054-centos-altarch-7-now-available-for-aarch64-powerpc64-powerpc8-le-and-armhfp +[18]:http://www.linux.com/news/embedded-mobile/mobile-linux/807087-faster-raspberry-pi-2-says-yes-to-ubuntu-and-windows-but-wheres-android +[19]:http://www.linux.com/news/embedded-mobile/mobile-linux/886126-tizen-30-joins-growing-list-of-raspberry-pi-2-distros#!topic/android-rpi/YW_gGr8wZkk +[20]:https://extonlinux.wordpress.com/2015/04/05/run-android-5-1-lollipop-exton-build-on-your-raspberry-pi-2/ +[21]:https://www.raspberrypi.org/forums/viewtopic.php?f=73&t=19106 +[22]:https://ubuntu-mate.org/raspberry-pi/ +[23]:https://chisight.wordpress.com/2015/10/19/fedora-22-or-23-on-raspberry-pi-2/ +[24]:http://www.techradar.com/us/news/software/5-of-the-most-popular-raspberry-pi-distros-1292537 diff --git a/sources/tech/20160218 Top 4 open source issue tracking tools.md b/sources/tech/20160218 Top 4 open source issue tracking tools.md new file mode 100644 index 0000000000..060a50db11 --- /dev/null +++ b/sources/tech/20160218 Top 4 open source issue tracking tools.md @@ -0,0 +1,64 @@ +wyangsun translating +Top 4 open source issue tracking tools +======================================== + +Life is full of bugs. + +No matter how carefully planned, no matter how much time went into design, any project is going to have unforseen issues when the rubber hits the road in the implementation stage. And that's okay. Perhaps the best measure of resiliency for any organization is not how well they handle things when everything is functioning as planned, but rather, how they handle the speed bumps when they come along. + +A critical tool for any project management workflow, especially in the software development world, is an issue tracker. The basics are simple; allowing bugs to be opened, tracked, and resolved in a collaborative manner, while making it easy to follow the progress. Beyond the basic functionality, there are a lot of options focused on meeting specific needs, features, and use cases, including software development and beyond. You may be familiar with hosted versions of these tools, like [GitHub Issues](https://guides.github.com/features/issues/) or [Launchpad](https://launchpad.net/), some of which are themselves open source. + +So let's take a look at four excellent choices for managing bugs and issues, all open source and all easy to download and host yourself. To be clear, there's no way we could possibly list every issue tracking tool here; instead, these are four of our favorites, based on feature richness and the size of the community behind the project. There are others, to be sure, and if you've got a good case for your favorite not listed here, be sure to let us know which is your favorite tool and what makes it stand out to you, in the comments below. + +## Redmine + +[Redmine](http://www.redmine.org/) is a popular issue tracking tool built on Ruby on Rails and dating back to 2006. Similar in many regards to Trac, another one of our favorites, Redmine is capable of managing multiple projects and integrates with a number of version control systems. In addition to basic issue tracking, Redmine also offers forums, wikis, time tracking tools, and the ability to generate Gantt charts and calendars to track progress. + +Redmine is fairly flexible in its setup, supporting numerous database backends and dozens of languages, and is customizable as well, featuring the ability to add custom fields to issues, users, projects and more. It can be further customized with a number of community-created plugins and themes. + +An [online demo](http://demo.redmine.org/) is available if you’d like to try it out. Redmine is licensed as open source under the [GPL version 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html); the source code can be found in the project’s [subversion repository](https://svn.redmine.org/redmine) or mirrored on [GitHub](https://github.com/redmine/redmine). + +![](https://opensource.com/sites/default/files/images/business-uploads/issues-redmine.png) + +## Bugzilla + +[Bugzilla](https://www.bugzilla.org/) is another popular development tool with issue tracking capabilities. As you might have guessed from the name, Bugzilla was originally created by the [Mozilla Foundation](https://www.mozilla.org/en-US/) to track bugs in the development of the then-called Netscape Communicator suite. Ported to Perl from its original Tcl routes for greater accessibility, Bugzilla is one of the older and more widely adopted issue tracking systems, as it is used by a number of well-known open source projects like GNOME, KDE, and the Linux kernel itself. + +Sporting a number of advanced tools, from notifications to duplicate bug detection to shared searches, Bugzilla is certainly a more feature-rich option. Bugzilla has an advanced search system along with a comprehensive reporting tool, capable of generating charts and automated scheduled reports. Like Redmine, Bugzilla is extensible and customizable, both in the fields themselves as well as featuring the ability to create custom workflows for bugs. It also works with many database backends, and many different languages are supported out of the box. + +Bugzilla is licensed under the [Mozilla Public License](https://en.wikipedia.org/wiki/Mozilla_Public_License), and you can read their [future roadmap](https://www.bugzilla.org/status/roadmap.html) and try out a [demo server](https://landfill.bugzilla.org/) on the official website. + +![](https://opensource.com/sites/default/files/images/business-uploads/issues-bugzilla.png) + +## Trac + +[Trac](http://trac.edgewall.org/browser) describes itself as taking a minimalistic approach to web-based software project management, but don’t confusing minimalism with a lack of features. + +Written in Python, Trac tightly integrates its bug tracking capabilities with its wiki system and a revision control system of your choosing. It features project management capabilities like generating milestones and roadmaps, a customizable reporting system, timelines, support for multiple repositories, built-in spam filtering, and is available in many common languages. Like the other bug trackers we have looked at, has a number of plugins available for it extending its base feature set even further. + +Trac is made available as open source under a modified [BSD license](http://trac.edgewall.org/wiki/TracLicense), though older versions were released under the GPL. You can view Trac’s source in a [self-hosted repository](http://trac.edgewall.org/browser) or check out their [roadmap](http://trac.edgewall.org/wiki/TracRoadmap) for future plans. + +![](https://opensource.com/sites/default/files/images/business-uploads/issues-trac.png) + +## Mantis + +[Mantis](https://www.mantisbt.org/) is the final tool we’ll look at in this collection, a PHP-based bug tracker with a sixteen year history. Another bug tracker with support for many different revision control systems and an event-driven notification system, Mantis has a similar feature set to other tools here. While it does not itself contain a wiki, it integrates with many popular wiki platforms and is localized into many languages. + +Mantis is licensed as open source under the [GPL version 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html); you can browse its source code on [GitHub](https://github.com/mantisbt/mantisbt) or check out the self-hosted [roadmap](https://www.mantisbt.org/bugs/roadmap_page.php?project=mantisbt&version=1.3.x) for future plans. For a demo, you can check out their own internal [bug tracker](https://www.mantisbt.org/bugs/my_view_page.php). + +![](https://opensource.com/sites/default/files/images/business-uploads/issues-mantis.png) + +As we notes, these four are not the only options. Looking to explore some others? [Apache Bloodhound](https://issues.apache.org/bloodhound/), [Fossil](http://fossil-scm.org/index.html/doc/trunk/www/index.wiki), [The Bug Genie](http://www.thebuggenie.com/), and many alternatives all have dedicated followings, each with different strengths and weaknesses. In addtion, some of the tools in our [project management](https://opensource.com/business/15/1/top-project-management-tools-2015) roundup have issue tracking capabilities. So, which is your preferred tool for tracking and squashing bugs? + + +------------------------------------------------------------------------------ + +via: https://opensource.com/business/16/2/top-issue-support-and-bug-tracking-tools + +作者:[Jason Baker][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jason-baker diff --git a/sources/tech/20160218 What do Linux developers think of Git and GitHub.md b/sources/tech/20160218 What do Linux developers think of Git and GitHub.md new file mode 100644 index 0000000000..9002025820 --- /dev/null +++ b/sources/tech/20160218 What do Linux developers think of Git and GitHub.md @@ -0,0 +1,93 @@ +What do Linux developers think of Git and GitHub? +===================================================== + +**Also in today’s open source roundup: DistroWatch reviews XStream Desktop 153, and Street Fighter V is coming to Linux and SteamOS in the spring** + +## What do Linux developers think of Git and GitHub? + +The popularity of Git and GitHub among Linux developers is well established. But what do developers think of them? And should GitHub really be synonymous with Git itself? A Linux redditor recently asked about this and got some very interesting answers. + +Dontwakemeup46 asked his question: + +>I am learning Git and Github. What I am interested in is how these two are viewed by the community. That git and github are used extensively, is something I know. But are there serious issues with either Git or Github? Something that the community would love to change? + +[More at Reddit](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580413015211&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=https%3A%2F%2Fwww.reddit.com%2Fr%2Flinux%2Fcomments%2F45jy59%2Fthe_popularity_of_git_and_github%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=More%20at%20Reddit) + +His fellow Linux redditors responded with their thoughts about Git and GitHub: + +>Derenir: ”Github is not affliated with Git. + +>Git is made by Linus Torvalds. + +>Github hardly supports Linux. + +>Github is a corporate bordelo that tries to make money from Git. + +>[https://desktop.github.com/](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580415025712&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&type=U&out=https%3A%2F%2Fdesktop.github.com%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=https%3A%2F%2Fdesktop.github.com%2F) see here no Linux Support.” + +>**Bilog78**: ”A minor update: git hasn't been “made by Linus Torvalds” for a while. The maintainer is Junio C Hamano and the main contributors after him are Jeff King and Shawn O. Pearce.” + +>**Fearthefuture**: ”I like git but can't understand why people even use github anymore. From my point of view the only thing it does better than bitbucket are user statistics and the larger userbase. Bitbucket has unlimited free private repos, much better UI and very good integration with other services such as Jenkins.” + +>**Thunger**: ”Gitlab.com is also nice, especially since you can host your own instance on your own servers.” + +>**Takluyver**: ”Lots of people are familiar with the UI of Github and associated services like Travis, and lots of people already have Github accounts, so it's a good place for projects to be. People also use their Github profile as a kind of portfolio, so they're motivated to put more projects on there. Github is a de facto standard for hosting open source projects.” + +>**Tdammers**: ”Serious issue with git would be the UI, which is kind of counterintuitive, to the point that many users just stick with a handful of memorized incantations. + +Github: most serious issue here is that it's a proprietary hosted solution; you buy convenience, and the price is that your code is on someone else's server and not under your control anymore. Another common criticism of github is that its workflow isn't in line with the spirit of git itself, particularly the way pull requests work. And finally, github is monopolizing the code hosting landscape, and that's bad for diversity, which in turn is crucial for a thriving free software community.” + +>**Dies**: ”How is that the case? More importantly, if that is the case, then what's done is done and I guess we're stuck with Github since they control so many projects.” + +>**Tdammers**: ”The code is hosted on someone else's server, "someone else" in this case being github. Which, for an open-source project, is not typically a huge problem, but still, you don't control it. If you have a private project on github, then the only assurance you have that it will remain private is github's word for it. If you decide to delete things, then you can never be sure whether it's been deleted, or just hidden. + +Github doesn't control the projects themselves (you can always take your code and host it elsewhere, declaring the new location the "official" one), it just has deeper access to the code than the developers themselves.” + +>**Drelos**: ”I have read a lot of praises and bad stuff about Github ([here's an example](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580428524613&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fwww.wired.com%2F2015%2F06%2Fproblem-putting-worlds-code-github%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=here%27s%20an%20example)) but my simple noob question is why aren't efforts towards a free and open "version" ?” + +>**Twizmwazin**: ”GitLab is sorta pushing there.” + +[More at Reddit](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580429720714&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=https%3A%2F%2Fwww.reddit.com%2Fr%2Flinux%2Fcomments%2F45jy59%2Fthe_popularity_of_git_and_github%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=More%20at%20Reddit) + +## DistroWatch reviews XStream Desktop 153 + +XStreamOS is a version of Solaris created by Sonicle. XStream Desktop brings the power of Solaris to desktop users, and distrohoppers might be interested in checking it out. DistroWatch did a full review of XStream Desktop 153 and found that it performed fairly well. + +Jesse Smith reports for DistroWatch: + +>I think XStream Desktop does a lot of things well. Admittedly, my trial got off to a rocky start when the operating system would not boot on my hardware and I could not get the desktop to use my display's full screen resolution when running in VirtualBox. However, after that, XStream performed fairly well. The installer works well, the operating system automatically sets up and uses boot environments, insuring we can recover the system if something goes wrong. The package management tools work well and XStream ships with a useful collection of software. + +>I did run into a few problems playing media, specifically getting audio to work. I am not sure if that is another hardware compatibility issue or a problem with the media software that ships with the operating system. On the other hand, tools such as the web browser, e-mail, productivity suite and configuration tools all worked well. + +>What I appreciate about XStream the most is that the operating system is a branch of the OpenSolaris family that is being kept up to date. Other derivatives of OpenSolaris tend to lag behind, at least with desktop software, but XStream is still shipping recent versions of Firefox and LibreOffice. + +>For me personally, XStream is missing a few components, like a printer manager, multimedia support and drivers for my specific hardware. Other aspects of the operating system are quite attractive. I like the way the developers have set up LXDE, I like the default collection of software and I especially like the way file system snapshots and boot environments are enabled out of the box. Most Linux distributions, openSUSE aside, have not caught on to the usefulness of boot environments yet and I hope it is a technology that is picked up by more projects. + +[More at DistroWatch](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580434172315&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fdistrowatch.com%2Fweekly.php%3Fissue%3D20160215%23xstreamos&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=More%20at%20DistroWatch) + +## Street Fighter V and SteamOS + +Street Fighter is one of the most well known game franchises of all time, and now [Capcom has announced](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580435418216&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fsteamcommunity.com%2Fgames%2F310950%2Fannouncements%2Fdetail%2F857177755595160250&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=Capcom%20has%20announced) that Street Fighter V will be coming to Linux and SteamOS in the spring. This is great news for Linux gamers. + +Joe Parlock reports for Destructoid: + +>Are you one of the less than one percent of Steam users who play on a Linux-based system? Are you part of the even smaller percentage of people who play on Linux and are excited for Street Fighter V? Well, I’ve got some good news for you. + +>Capcom has announced via Steam that Street Fighter V will be coming to SteamOS and other Linux operating systems sometime this spring. It’ll come at no extra cost, so those who already own the PC build of the game will just be able to install it on Linux and be good to go. + +[More at Destructoid](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580435418216&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fsteamcommunity.com%2Fgames%2F310950%2Fannouncements%2Fdetail%2F857177755595160250&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=Capcom%20has%20announced) + +Did you miss a roundup? Check the [Eye On Open home page](http://www.infoworld.com/blog/eye-on-open/) to get caught up with the latest news about open source and Linux. + +------------------------------------------------------------------------------ + +via: http://www.infoworld.com/article/3033059/linux/what-do-linux-developers-think-of-git-and-github.html + +作者:[Jim Lynch][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Jim-Lynch/ + diff --git a/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md b/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md new file mode 100644 index 0000000000..f84e9e1e46 --- /dev/null +++ b/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md @@ -0,0 +1,213 @@ +How to Setup Lighttpd Web server on Ubuntu 15.04 / CentOS 7 +================================================================================= + +Lighttpd is an open source web server which is secure, fast, compliant, and very flexible and is optimized for high-performance environments. It uses very low memory compared to other web servers , small CPU load and speed optimization making it popular among the server for its efficiency and speed. Its advanced feature-set (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) makes lighttpd the perfect webserver-software for every server that suffers load problems. + +Here are some simple easy setups on how we can setup Lighttpd web server on our machine running Ubuntu 15.04 or CentOS 7 linux distributions. + +### Installing Lighttpd + +#### Installing using Package Manager + +Here, we'll install Lighttpd using package manager as its the easiest method to install it. So, we can simply run the following command under `sudo` mode in a terminal or console to install Lighttpd. + +**CentOS 7** + +As lighttpd is not available in the official repository of CentOS 7, we'll need to install epel additional repository to our system. To do so, we'll need to run the following `yum` command. + + # yum install epel-release + +Then, we'll gonna update our system and proceed towards the installation of lighttpd. + + # yum update + # yum install lighttpd + +![Install Lighttpd Centos](http://blog.linoxide.com/wp-content/uploads/2016/02/install-lighttpd-centos.png) + +**Ubuntu 15.04** + +Lighttpd is available on the official repository of Ubuntu 15.04 so, we'll simply update our local repository index and then go for the installation of lighttpd using `apt-get` command. + + # apt-get update + # apt-get install lighttpd + +![Install lighttpd ubuntu](http://blog.linoxide.com/wp-content/uploads/2016/02/install-lighttpd-ubuntu.png) + +#### Installing from Source + +If we wanna install lighttpd from the latest version of source code ie 1.4.39, we'll need to compile the source code and install it into our system. First of all, we'll need to install the dependencies required to compile it. + + # cd /tmp/ + # wget http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.39.tar.gz + +After its downloaded, we'll need to extract it the tarball by running the following. + + # tar -zxvf lighttpd-1.4.39.tar.gz + +Then, we'll compile it by running the following commands. + + # cd lighttpd-1.4.39 + # ./configure + # make + +**Note:** In this tutorial, we are installing lighttpd with its standard configuration. If you wanna configure beyond the standard configuration and want to install more features like support for SSL, `mod_rewrite`, `mod_redirect` then you can configure. + +Once, its compiled, we'll install it in our system. + + # make install + +### Configuring Lighttpd + +If we need to configure our lighttpd web server further as our requirements, we can make changes to the default configuration file ie `/etc/lighttpd/lighttpd.conf` . As wee'll go with the default configuration here in this tutorial, we'll not gonna make changes to it. If we had made any changes and we wanna check for errors in the config file, we'll need to run the following command. + + # lighttpd -t -f /etc/lighttpd/lighttpd.conf + +#### On CentOS 7 + +If we are running CentOS 7, we'll need to create a new directory for our webroot defined in our lighttpd's default configuration ie `/src/www/htdocs/` . + + # mkdir -p /srv/www/htdocs/ + +Then, we'll copy the default welcome page from `/var/www/lighttpd/` directory to the above created directory. + + # cp -r /var/www/lighttpd/* /srv/www/htdocs/ + +### Starting and Enabling Services + +Now, we'll gonna restart our database server by executing the following `systemctl` command. + + # systemctl start lighttpd + +Then, we'll enable it to start automatically in every system boot. + + # systemctl enable lighttpd + +### Allowing Firewall + +To allow our webpages or websites running lighttpd web server on the internet or inside the same network, we'll need to allow port 80 from the firewall program. As both CentOS 7 and Ubuntu 15.04 are shipped with systemd as the default init system, we will have firewalld installed as a firewall solution. To allow port 80 or http service, we'll need to run the following commands. + + # firewall-cmd --permanent --add-service=http + success + # firewall-cmd --reload + success + +### Accessing Web Server + +As we have allowed port 80 which is the default port of lighttpd, we should be able to access lighttpd's welcome page by default. To do so, we'll need to point our browser to the ip address or domain of our machine running lighttpd according to our configuration. In this tutorial, we'll point our browser to [http://lighttpd.linoxide.com/](http://lighttpd.linoxide.com/) as we have pointed our sub-domain to its ip address. On doing so, we'll see the following welcome page in our browser. + +![Lighttpd Welcome Page](http://blog.linoxide.com/wp-content/uploads/2016/02/lighttpd-welcome-page.png) + +Further, we can add our website's files to the webroot directory and remove the default lighttpd's index file to make our static website live to the internet. + +If we want to run our PHP application in our lighttpd webserver, we'll need to follow the following steps. + +### Installing PHP5 Modules + +Once our lighttpd is installed successfully, we'll need to install PHP and some PHP modules to run PHP5 scripts in our lighttpd web server. + +#### On Ubuntu 15.04 + + # apt-get install php5 php5-cgi php5-fpm php5-mysql php5-curl php5-gd php5-intl php5-imagick php5-mcrypt php5-memcache php-pear + +#### On CentOS 7 + + # yum install php php-cgi php-fpm php-mysql php-curl php-gd php-intl php-pecl-imagick php-mcrypt php-memcache php-pear lighttpd-fastcgi + +### Configuring Lighttpd with PHP + +To make PHP work with lighttpd web server, we'll need to follow the following methods respect to the distribution we are running. + +#### On CentOS 7 + +First of all, we'll need to edit our php configuration ie `/etc/php.ini` and uncomment a line **cgi.fix_pathinfo=1** using a text editor. + + # nano /etc/php.ini + +After its done, we'll need to change the ownership of PHP-FPM process from apache to lighttpd. To do so, we'll need to open the configuration file `/etc/php-fpm.d/www.conf` using a text editor. + + # nano /etc/php-fpm.d/www.conf + +Then, we'll append the file with the following configurations. + + user = lighttpd + group = lighttpd + +Once done, we'll need to save the file and exit the text editor. Then, we'll need to include fastcgi module from `/etc/lighttpd/modules.conf` configuration file. + + # nano /etc/lighttpd/modules.conf + +Then, we'll need to uncomment the following line by removing `#` from it. + + include "conf.d/fastcgi.conf" + +At last, we'll need to configure our fastcgi configuration file using our favorite text editor. + + # nano /etc/lighttpd/conf.d/fastcgi.conf + +Then, we'll need to add the following lines at the end of the file. + + fastcgi.server += ( ".php" => + (( + "host" => "127.0.0.1", + "port" => "9000", + "broken-scriptfilename" => "enable" + )) + ) + +After its done, we'll save the file and exit the text editor. + +#### On Ubuntu 15.04 + +To enable fastcgi with lighttpd web server, we'll simply need to execute the following commands. + + # lighttpd-enable-mod fastcgi + + Enabling fastcgi: ok + Run /etc/init.d/lighttpd force-reload to enable changes + + # lighttpd-enable-mod fastcgi-php + + Enabling fastcgi-php: ok + Run `/etc/init.d/lighttpd` force-reload to enable changes + +Then, we'll reload our lighttpd by running the following command. + + # systemctl force-reload lighttpd + +### Testing if PHP is working + +In order to see if PHP is working as expected or not, we'll need to create a new php file under the webroot of our lighttpd web server. Here, in this tutorial we have `/var/www/html` in Ubuntu and `/srv/www/htdocs` in CentOS as the default webroot so, we'll create a info.php file under it using a text editor. + +**On CentOS 7** + + # nano /var/www/info.php + +**On Ubuntu 15.04** + + # nano /srv/www/htdocs/info.php + +Then, we'll simply add the following line into the file. + + + +Once done, we'll simply save the file and exit from the text editor. + +Now, we'll point our web browser to our machine running lighttpd using its ip address or domain name with the info.php file path as [http://lighttpd.linoxide.com/info.php](http://lighttpd.linoxide.com/info.php) If everything was done as described above, we will see our PHP information page as shown below. + +![phpinfo lighttpd](http://blog.linoxide.com/wp-content/uploads/2016/02/phpinfo-lighttpd.png) + +### Conclusion + +Finally we have successfully installed the world's lightweight, fast and secure web server Lighttpd in our machine running CentOS 7 and Ubuntu 15.04 linux distributions. Once its ready, we can upload our website files into our web root, configure virtual host, enable ssl, connect database, run web apps and much more with our lighttpd web server. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-lighttpd-web-server-ubuntu-15-04-centos-7/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ diff --git a/sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md b/sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md new file mode 100644 index 0000000000..cd2ffee237 --- /dev/null +++ b/sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md @@ -0,0 +1,135 @@ +Best Cloud Services For Linux To Replace Copy +=============================================== + +![](http://itsfoss.com/wp-content/uploads/2016/02/Linux-cloud-services.jpg) + +Cloud storage service Copy is shutting down and it is time for us Linux users to look for a worthy **cloud storage alternative to Copy for Linux**. + +All files will be deleted on May 1st, 2016. If you are a Copy user, you should save your files and move it to other + +Copy has been my favorite cloud storage for past couple of years. It gave me plenty of free storage and came with native apps for desktop platforms including Linux and mobile platforms as iOS and Android. + +It was a perfect Cloud storage for me where I get plenty of free storage (380 GB) with a seamless experience between desktop and mobile OSes. But this ‘easy free storage’, 15GB for signup and 5Gb for each referral, had me thinking that if Copy doesn’t get business customers, they will be running out of business soon. Such huge free storage only meant that they were not targeting individual customers like Dropbox do. + +My fear came true when I read about the shutting down of Copy.com. In fact, Copy is not alone. Its parent company [Barracuda Networks](https://www.barracuda.com/) is going through a rough patch and has [hired Morgan Stanely to look for suitable buyer](http://www.bloomberg.com/news/articles/2016-02-01/barracuda-networks-said-to-work-with-morgan-stanley-to-seek-sale)(s). + +Whatever be the reason, all we know is that Copy will soon be history and we need to find similarly **good cloud services for Linux**. I am putting emphasis on Linux because other popular cloud storage services like [Microsoft’s OneDrive](https://onedrive.live.com/about/en-us/) and [Google Drive](https://www.google.com/drive/) do not provide native Linux client. This is something expected out of Microsoft but [Google’s apathy towards Linux](http://itsfoss.com/google-hates-desktop-linux/) is shocking. + +## Best Copy alternatives for Linux + +Now, what do you want in a cloud storage services as a Linux storage? Let me guess: + +- Lots of free storage. After all, individuals cannot pay hefty amounts every month. +- Native Linux client. So that you can synchronize files easily with the server without doing special tweaking or running scripts at regular intervals. +- Desktop clients for other desktop OSes i.e. Windows and OS X. Portability is a necessity and syncing files between devices is such a good relief. +- Mobile apps for Android and iOS. In today’s modern world, you need to be connected across all the devices. + +I am not counting the self-hosted cloud services like OwnCloud or [Seafile](https://www.seafile.com/en/home/) because they require set-up and run a server. This is not apt for all home users who want a Copy like cloud service. + +Let’s see what are the services that you could use to replace Copy.com on Linux. + +## Mega + +![](http://itsfoss.com/wp-content/uploads/2016/02/Mega-Linux.jpg) + +If you are a regular It’s FOSS reader, you might have come across my earlier article about [Mega on Linux](http://itsfoss.com/install-mega-cloud-storage-linux/). This cloud service is an offering by the infamous [Kim Dotcom](https://en.wikipedia.org/wiki/Kim_Dotcom) of [Megaupload scandal](https://en.wikipedia.org/wiki/Megaupload). This also makes some users skeptical about it because Kim Dotcom has been a target by US authorities for a long time. + +Mega has everything that you would expect in a hassle free cloud service. It provides 50 GB of free storage to individual users. Provide native clients for Linux and other platforms and also has end to end encryption. The native Linux client works fine and the sync across the device is seamless. You can also view and access your files in a web browser. + +### Pros: + +- 50 GB of free storage +- End to end encryption +- Native clients for Linux and other platforms such as Windows, Mac OS X, Android, iOS + +### Cons: + +- Shady past of the owner + +[Mega](https://mega.nz/) + +## Hubic + +![](http://itsfoss.com/wp-content/uploads/2016/02/hubic.jpeg) + +Hubic is a cloud service from French company [OVH](https://www.ovh.com/fr/). Hubic also offers 25 GB of free cloud storage at sign up. You can further extend it to 50GB (for free users) by referring it to friends. + +Hubic has a Linux client which is in beta (for over two years now). Hubic has an official Linux client but it is limited to command line. I did not go on to test the mobile versions. + +Hubic boasts of some nice features though. Apart from simple to use interface, file sharing etc, it has a Backup feature where you can archive your important files regularly. + +### Pros: + +- 25 GB of free storage, extendable up to 50 GB +- Available on multiple platforms +- Backup feature + +### Cons: + +- Linux client in beta, only available in command line + +[Hubic](https://hubic.com/) + +## pCloud + +![](http://itsfoss.com/wp-content/uploads/2016/02/pCloud-Linux.jpeg) + +pCloud is another European offering but this time across the French border, from Switzerland. Focused on encryption and security, pCloud offers 10 GB of free storage for each signup. You can further increase it up to 20 GB by inviting friends, sharing links on social media etc. + +It has all the standard features of a cloud service such as file sharing and synchronization, selective syncing etc. pCloud also has native clients across platforms, including Linux of course. + +Linux client is easy to use and worked well in my limited testing on Linux Mint 17.3. + +### Pros: + +- 10 GB of free storage, extendable up to 20 GB +- A good working Linux client with GUI + +### Cons: + +- Encryption is a premium feature + +[pCloud](https://www.pcloud.com/) + +## Yandex Disk + +![](http://itsfoss.com/wp-content/uploads/2016/02/Yandex.jpg) + +Russian internet giant Yandex has everything that Google has. A search engine, analytics and webmaster tool, email, web browser and cloud storage service. + +Yandex Disk offers 10 GB of free cloud storage on sign up. It has native clients for multiple platforms, including Linux. However, the official Linux client is only command line. You can get [unofficial GUI client for Yandex disk](https://mintguide.org/tools/265-yd-tools-gui-indicator-for-yandexdisk-free-cloud-storage-in-linux-mint.html) though. File sharing via links is available as along with other standard cloud storage feature. + +### Pros: + +- 10 GB of free storage, extendable up to 20 GB via referrals. + +### Cons: + +- Only command line client available + +[Yandex Disk](https://disk.yandex.com/) + +## Honorable and deliberate omissions + +I have deliberately skipped [Dropbox](https://www.dropbox.com/), [SpiderOak](https://spideroak.com/) from the list. Dropbox is excellent for Linux but the free storage is limited to 2 GB. Over the past several years, I have managed to increase it to over 21 GB, but that’s another story. + +SpiderOak also provides only 2 GB of free storage and you cannot access it in a web browser. + +OwnCloud needs its own server and set-up and thus it is not everyone’s cup of tea. And it certainly doesn’t fit the criteria of a typical cloud service. + +## Verdict + +If you ask me what I am going to use in place of Copy, my answer is Mega. It has plenty of free cloud storage and a great Linux desktop client. What is your choice among this list of **best cloud storage services for Linux**? Which one do you prefer? + + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/cloud-services-linux/ + +作者:[ABHISHEK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ diff --git a/sources/tech/20160220 Convergence Becomes Real With First Ubuntu Tablet.md b/sources/tech/20160220 Convergence Becomes Real With First Ubuntu Tablet.md new file mode 100644 index 0000000000..a7beb58156 --- /dev/null +++ b/sources/tech/20160220 Convergence Becomes Real With First Ubuntu Tablet.md @@ -0,0 +1,73 @@ +Convergence Becomes Real With First Ubuntu Tablet +==================================================== + +![](http://itsfoss.com/wp-content/uploads/2016/02/front-landscape-1-e1454624669422.jpg) + +First Ubuntu tablet has been just announced. Canonical, parent company of Ubuntu, and Spanish hardware manufacturer BQ are all set to unveil the first Ubuntu tablet at Mobile World Congress, later this month. + +BQ is also the manufacturer of the [first Ubuntu Phone](http://itsfoss.com/ubuntu-phone-specification-release-date-pricing/). The partnership between Canonical and BQ extends to the tablet as well. + +Ubuntu has been running the [#reinvent campaign on social media](https://business.facebook.com/media/set/?set=a.656637987810305.1073741827.115098615297581&type=3) and the web ahead of the launch to generate curiosity over the tablet. But does an Ubuntu fan really need a dedicated campaign to know about such things? I think not. + +Ahead of this launch, specifications of the Ubuntu tablet and some teasers have been released. No surprises that the main focus has been on [convergence](https://insights.ubuntu.com/2015/10/20/ubuntus-path-to-convergence/). + +[Ubuntu Phone has demonstrated convergence](http://www.omgubuntu.co.uk/2015/02/new-video-shows-off-ubuntu-convergence-demoed-on-tablet-phone) several times in the past. Ubuntu tablet takes it to the next level. Just adding an HDMI cable makes it to a full-fledged desktop. All you need is a keyboard and a mouse. + +![](http://itsfoss.com/wp-content/uploads/2016/02/convergence-ubuntu-e1454624459103.jpg) + +## BQ Ubuntu tablet specification + +BQ will be using its trusted [Aquaris M10](http://www.bq.com/es/aquaris-m10) series to launch an Ubuntu edition. This is a strategy they used earlier with Ubuntu Phone where they launched an Ubuntu edition of their Aquaris e4.5 Android smartphone. + +Aquaris M10 boasts of a decent hardware and an enormous 10 inches screen size. A quick list of specification includes: + +- 10.1 inch multi-touch screen +- MediaTek Quad Core MT8163A processor up to 1.5GHz +- High capacity Li-Po battery (7280mAh) +- Full HD (1080p) camera for super-sharp video recording +- 2GB RAM and 16GB internal memory +- MicroSD slot for extra storage (up to 64GB) +- 12 megapixel camera with autofocus and dual flash +- Frontal speakers +- Micro HDMI slot +- Dimensions: 246 x 171 x 8.2mm +- Lightweight at only 470g + +These proposed specifications have been taken from Ubuntu’s official website which doesn’t match up with the Aquaris M10 specification on BQ website though. Ubuntu website shows a 12 MP camera while BQ website has 8 MP max. + +As you can see, first Ubuntu tablet is not really a power horse. In 2016, 2GB of RAM doesn’t seem to be sufficient. Moreover, the closed source MediaTek processors are another let down of the first Ubuntu Phone. + +However, a supposed price tag of Euro 260 (the Android version costs the same) is a positive factor here and considering its capability to converge into a desktop, 10 inches screen keeps it in the entry level Netbook section. + +The 470 g weight is another plus factor. + +## First look at Ubuntu tablet + +While Ubuntu tablet will be officially unveiled at Mobile World Congress, you can have a glimpse of its looks and functionings in the pictures below: + +![](http://itsfoss.com/wp-content/uploads/2016/02/tablet-overview-hero-300x182.png) + +## Price, availability and release date + +BQ Aquaris M10 Ubuntu edition will go on sale in the second quarter of the year 2016. Guessing from Ubuntu Phone experience, it should be available for Europe and UK first and later in other parts of the world. + +The price should be around 260-270 Euro. This too is an estimate based on the price of the Android version. + +## Up for the grab? + +I was not very convinced at the first Ubuntu Phone. However, I think Ubuntu tablet is a better device than the Ubuntu Phone. With Snappy coming in action, Ubuntu tablet has the potential to become a mobile device cum desktop. + +What do you think of it? + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/ubuntu-tablet/ + +作者:[ABHISHEK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ + diff --git a/sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md b/sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md new file mode 100644 index 0000000000..dc3b2a1a76 --- /dev/null +++ b/sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md @@ -0,0 +1,35 @@ +Former Kubuntu Head Unveils New KDE Project +============================================== + +The name Jonathan Riddell should ring a bell if you read Linux and [open source news](http://itsfoss.com/category/news/). He was the creator and longtime lead developer of the [Kubuntu](http://www.kubuntu.org/) distribution. He was [forced out of his position by Ubuntu boss Mark Shuttleworth](http://www.cio.com/article/2926838/linux/mark-shuttleworth-ubuntu-community-council-ask-kubuntu-developer-to-step-down-as-leader.html) last year because he dared to ask what happened to the funds Canonical had raised for Kubuntu. (To the best of my knowledge, Canonical never really answered to his questions about finances.) + +![](http://itsfoss.com/wp-content/uploads/2016/02/kde-neon-e1454448724263.png) + +## KDE neon logo + +On Saturday, Riddell [announced](https://dot.kde.org/2016/01/30/fosdem-announcing-kde-neon) a new project: [KDE neon](http://neon.kde.org.uk/). According to Riddell’s announcement “Neon will provide a way to get the latest KDE software on the day it’s released.” + +After reading both the announcement and looking at the brief site, **it appears that neon is a mainly a “rapidly updated software repository” that allows KDE fans to be on the bleeding edge**. Instead of waiting for months for distro developers to release the updated KDE on their repos, you’ll be able to get it hot off the presses. + +KDE did state in the [noen FAQ](http://neon.kde.org.uk/faq) that this is not a KDE created distro. In fact, they say “KDE believes it is important to work with many distributions, as each brings unique value and expertise for their respective users. This is one project out of hundreds from KDE.” + +![](http://itsfoss.com/wp-content/uploads/2016/02/kde-neon-e1454448830870.jpg) + +However, the way the site and the announcement refer to the fact that neon runs on Ubuntu 15.10 (until the next LTS version is available) and that there will soon be images makes me wonder. KDE could be saying this to keep Canonical from seeing this project as a competitor to Kubuntu. If they that there is a demand for KDE neon, they could spin it off as a full distro. Both the announcement and site state that this is a KDE Incubator project, so the future could hold anything for this project. + +[KDE neon](http://neon.kde.org.uk/) + +Does neon sound like it would be useful for you or are you happy with your current distro’s KDE release rate? Do you think there is room for another KDE distro (if KDE decides to head in that direction)? Let me know in the comment section below. + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/kde-neon-unveiled/ + +作者:[JOHN PAUL][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/john/ + diff --git a/sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md b/sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md new file mode 100644 index 0000000000..0d503b3010 --- /dev/null +++ b/sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md @@ -0,0 +1,31 @@ +Manjaro Linux Is Coming To ARM With Manjaro-ARM +=================================================== + +![](http://itsfoss.com/wp-content/uploads/2016/02/manjaro-arm.jpg) + +Recently, the developers of Manjaro have announced the release of an [alpha build for ARM devices](https://manjaro.github.io/Manjaro-ARM-launched/). This is a big step for the Arch-based distro, which up until this point only ran on 32 and 64-bit PCs. + +According to the announcement, “[Manjaro Arm](http://manjaro-arm.org/) is a project aimed to bring you the simplicity and customability that is Manjaro to [ARM devices](https://www.arm.com/). These devices are growing in numbers and can be used for any number of applications. Most famous is the Raspberry Pi series and BeagleBoard series.” The alpha build only supports the Raspberry Pi 2, but that will undoubtedly grow with time. + +The developers currently include dodgejcr, Torei, Strit, and Ringo32. They are looking for more people to help the project grow and develop. Besides developers, [they are looking for maintainers, moderators and admins, and artists](http://manjaro-arm.org/forums/website/looking-for-contributors/?PHPSESSID=876d5c11400e9c25eb727e9965300a9a). + +Manjaro-ARM will be available in four different versions. The Media Edition will allow you to create a media center with very little configuration and will run Kodi. The Server Edition will come with SSH, FTP, and a LAMP server preconfigured so you can use your ARM device as a file or web server. The Base Edition acts as the desktop edition, with an XFCE desktop. If you want to build you own system from scratch, the Minimal Edition is your choice. It will come with no preloaded packages or desktop, only have a root user. + +## Final Thoughts + +As a fan of Manjaro (I have it installed on 4 computers), I’m glad to hear that they are branching out into the ARM world. ARM is being used in more and more devices. According to technology commentator Robert Cringely, [device makers are starting to look at cheap ARM chips over more expensive Intel or AMD chips](http://www.cringely.com/2016/01/21/prediction-8-intel-starts-to-become-irrelevent/). Even Microsoft (please don’t strike me down) is thinking of porting some of its software to ARM. As the use of ARM powered devices increase, Manjaro will be ready to give those users a great Linux experience. + +What do you think? Do you wish that more Linux distros would create ARM ports? Or do you think that ARM is a passing fad? Tell us below. + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/manjaro-linux-arm/ + +作者:[JOHN PAUL][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/john/ + diff --git a/sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md b/sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md new file mode 100644 index 0000000000..db69940892 --- /dev/null +++ b/sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md @@ -0,0 +1,80 @@ +JonathanKang is translating + +[Free Download] Vi Cheat Sheet For Beginners +================================================ + +![](http://itsfoss.com/wp-content/uploads/2016/01/VI.jpg) + +I have often shared my Linux experience with you. Today I am going to share my **Vi cheat sheet** that has often saved me time in googling for a quick command. + +## Basic Vi commands + +This is not a detailed tutorial to teach you each and every aspect of [Vi editor](https://en.wikipedia.org/wiki/Vi). In fact, it’s not a tutorial at all. It’s just a collection of basic Vi commands and their brief description for a quick reference. + +command|explain +:--|:-- +:x |Save the file and quit +:q!|Quit without saving the file +i|Insert starting left of the cursor +a|Append starting right of the cursor +ESC|Exit insert/append mode +arrows|Move cursor +/text|Search string text (case sensitive) +n|Search next occurrence of the searched item +x|Delete character under the cursor +dd|Delete line under the cursor +u|Undo last change +:0|Beginning of the file +:n|Go to line n +G|End of the file +^|Beginning of the line +$|End of the line +:set list|See special characters in the file +yy|Copy the line into the buffer +5yy|Copy 5 lines into the buffer +p|Paste buffer after the current line + +You can download the above cheat sheet in a PDF format from the link below: + +[Download Vi Cheat Sheet](https://drive.google.com/file/d/0By49_3Av9sT1X3dlWkNQa3g2b2c/view?usp=sharing) + +You can print it and keep it at your desk or just save it for offline use. + +## Why I created the Vi cheat sheet? + +Several years ago, when I started working in Linux terminal, the idea of using a command line editor horrified me. I had used desktop Linux before but it was my personal computer so I happily used the GUI text editor like Gedit. But in the working environment, I was stuck with the command line and there was no scope of using a graphical editor. + +I was forced to use Vi for basic edits in the files on remote Linux boxes and this is where I identified and started to admire the power of command line editing tool Vi. + +Since, at that time, I was new at Vi editor, I found myself baffling with it. The first time, I could not even come out of the file because I did not know how to close Vi editor. No shame in accepting that I had to Google it. + +So, I decided to make a list of all the basic commands that I used frequently for editing in Vi. This list or cheat sheet, as you may call it, helped me a lot in my early days with Vi. With time, I grew up with Vi and now I don’t even need to look at the Vi cheat sheet because I have the commands memorized by heart. + +## Why should you use Vi cheat sheet? + +I can understand your situation if you are just getting started with Vi. Your favorite Ctrl+S doesn’t work for saving files. Ctrl+C and Ctrl+V were supposed to be the universal shortcut for copy and paste but it won’t work in Vi universe.Thousands of people use cheat sheets + +Thousands of people use such cheat sheets for various programming languages and `/` or tools that give them a quick reference to commonly used steps `/` commands. Trust me, using cheat sheets among the best practices advised to programmers. + +This Vi cheat sheet will help you a lot if you are just starting with Vi or if you infrequently use the Vi editor (so you keep forgetting the commands). You can save it and use it for quick reference in future, that too offline. + +## Do you like it? + +So far, I have refrained myself from going into too much on terminal side. How do you find this post? Do you want me to share more such cheat sheets and downloadable items? Your suggestions are welcomed. + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/download-vi-cheat-sheet/ + +作者:[ABHISHEK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ + + + + + diff --git a/sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md b/sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md new file mode 100644 index 0000000000..2acebc8473 --- /dev/null +++ b/sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md @@ -0,0 +1,37 @@ +NXP unveils a tiny 64-bit ARM processor for the Internet of Things +========================================================================= + +**TAGS**:[ARM][1], [INTERNET OF THINGS][2], [NXP][3], [NXP SEMICONDUCTORS][4] + +![](http://1u88jj3r4db2x4txp44yqfj1.wpengine.netdna-cdn.com/wp-content/uploads/2016/02/nxp-930x556.jpg) + +[NXP Semiconductors][5] has unveiled what it calls the world’s smallest and lowest-power 64-bit ARM processor for the Internet of Things (IoT). + +The tiny QorIQ LS1012A delivers networking-grade security and performance acceleration to battery-powered, space-constrained applications. This includes powering applications for Internet of Things, or everyday objects that are smart and connected. If IoT is to reach its potential of $1.7 trillion by 2020 (as estimated by market researcher IDC), it’s going to need processors like the new one from NXP, which was unveiled at the Embedded World 2016 event in Nuremberg, Germany. + +The chip has a 64-bit ARMv8 processor with network packet acceleration and built-in security. It fits in a 9.6 mm-square space and draws about 1 watt of power. Potential applications include next-generation IoT gateways, portable entertainment platforms, high-performance portable storage applications, mobile hard disk drives, and mobile storage for cameras, tablets, and other rechargeable devices. + +Additionally, the LS1012A is the first processor designed specifically for an emerging new storage solution, dubbed object-based storage. Object-based storage relies on a smart hard disk drive that is directly connected to the data center’s Ethernet network. The processor must be small enough to be integrated directly on the circuit board for a hard disk drive. + +“The groundbreaking combination of low power, tiny footprint and networking-grade performance of NXP’s LS1012 processor is ideal for consumer, networking and Internet of Things applications alike,” said Tareq Bustami, senior vice president and general manager of NXP’s Digital Networking division, in a statement. “This unique blend of capabilities unleashes embedded systems designers and developers to imagine and create radically innovative end-products across a broad spectrum of high-growth markets.” + +NXP said it is the only 1-watt, 64-bit processor in the market to combine such a comprehensive set of high-speed peripherals in a single chip, thus enabling lower system-level costs. And due to innovative packaging, the processor can be routed on low-cost circuit boards. + +NXP’s LS1012A will be available in April 2016 and can be ordered now. NXP has more than 45,000 employees in 35 countries. + +-------------------------------------------------------------------------------- + +via: http://venturebeat.com/2016/02/21/nxp-unveils-a-small-and-tiny-64-bit-arm-processor-for-the-internet-of-things/ + +作者:[DEAN TAKAHASHI][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://venturebeat.com/author/dean-takahashi/ +[1]:http://venturebeat.com/tag/arm/ +[2]:http://venturebeat.com/tag/internet-of-things/ +[3]:http://venturebeat.com/tag/nxp/ +[4]:http://venturebeat.com/tag/nxp-semiconductors/ +[5]:http://www.nxp.com/ diff --git a/sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md b/sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md new file mode 100644 index 0000000000..81f7467719 --- /dev/null +++ b/sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md @@ -0,0 +1,80 @@ +Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI +=========================================== + +For enterprises, containers offer more efficient build environments, cloud-native applications and migration from legacy systems to the cloud. But enterprise adoption of the technology -- Docker specifically -- has been hampered by, among other issues, [a lack of mature developer tools][1]. + +Amsterdam-based [Wercker][2] is one of many early-stage companies looking to meet the need for better tools with its cloud platform for automating microservices and application development, based on Docker. + +The company [announced a $4.5 million Series A][3] funding round this month, which will help it ramp up development on an upcoming on-premise enterprise product. Key to its success, however, will be building a community around its newly [open-sourced CLI][4] tool. Wercker must quickly integrate with myriad other container technologies -- open source Kubernetes and Mesos among them -- to remain competitive in the evolving container space. + +“By open sourcing our CLI technology, we hope to get to dev-prod parity faster and turn “build once, ship anywhere” into an automated reality,” said Wercker CEO and founder Micha Hernández van Leuffen. + +I reached out to van Leuffen to learn more about the company, its CLI tool, and how it’s planning to help grow the pool of enterprise customers actually using containers in production. Below is an edited version of the interview. + +### Linux.com: Can you briefly tell us about Wercker? + +van Leuffen: Wercker is a container-centric platform for automating the development of microservices and applications. + +With Wercker’s Docker-based infrastructure, teams can increase developer velocity with custom automation pipelines using steps that produce containers as artifacts. Once the build passes, users can continue to deploy the steps as specified in the wercker.yml. Continuously repeating these steps allows teams to work in small increments, making it easy to debug and ship faster. + +![](https://www.linux.com/images/stories/66866/wercker-cli.png) + +### Linux.com: How does it help developers? + +van Leuffen: The Wercker CLI helps developers attain greater dev-prod parity. They’re able to release faster and more often because they are developing, building and testing in an environment very similar to that in production. We’ve open sourced the exact same program that we execute in the Wercker cloud platform to run your pipelines. + +### Linux.com: Can you point out some of the features and advantages of your tool as compared to competitors? + +van Leuffen: Unlike some of our competitors, we’re not just offering Docker support. With Wercker, the Docker container is the unit of work. All jobs run inside containers, and each build artifact can be a Docker container. + +Wercker’s Docker container pipeline is completely customizable. A ‘pipeline’ refers to any automated workflow, for instance, a build or deploy pipeline. In those workflows, you want to execute tasks: install dependencies, test your code, push your container, or create a slack notification when something fails, for example. We call these tasks ‘steps,’ and there is no limit to the types of steps created. In fact, we have a marketplace of steps built by the Wercker community. So if you’ve built a step that fits my workflow, I can use that in my pipeline. + +Our Docker container pipelines adapt to any developer workflow. Users can use any Docker container out there — not just those made by or for Wercker. Whether the container is on Docker Hub or a private registry such as CoreOS’s Quay, it works with Wercker. + +Our competitors range from the classic CI/CD tools to larger-scale DevOps solutions like CloudBees. + +### Linux.com: How does it integrate with other cloud technologies? + +van Leuffen: Wercker is vendor-agnostic and can automate development with any cloud platform or service. We work closely with ecosystem partners like Mesosphere, Kubernetes and CoreOS to make integrations as seamless as possible. We also recently partnered with Atlassian to integrate the Wercker platform with Bitbucket. More than 3 million Bitbucket users can install the Wercker Pipeline Viewer and view build status directly from their dashboard. + +### Linux.com: Why did you open source the Wercker CLI tool? + +van Leuffen: Open sourcing the Wercker CLI will help us stay ahead of the curve and strengthen the developer community. The market landscape is changing fast; developers are expected to release more frequently, using infrastructure of increasing complexity. While Docker has solved a lot of infrastructure problems, developer teams are still looking for the perfect tools to test, build and deploy rapidly. + +The Wercker community is already experimenting with these new tools: Kubernetes, Mesosphere, CoreOS. It makes sense to tap that community to create integrations that work with our technology – and make that process as frictionless as possible. By open sourcing our CLI technology, we hope to get to dev-prod parity faster and turn “build once, ship anywhere” into an automated reality. + +### Linux.com: You recently raised over $4.5 million, so how is this fund being used for product development? + +van Leuffen: We’re focused on building out our commercial team and bringing an enterprise product to market. We’ve had a lot of inbound interest from the enterprise looking for VPC and on-premise solutions. While the enterprise is still largely in the discovery stage, we can see the market shifting toward containers. Enterprise software devs need to release often, just like the small, agile teams with whom they are increasingly competing. We need to prove containers can scale, and that Wercker has the organizational permissions and the automation suite to make that process as efficient as possible. + +In addition to continuing to invest in our product, we’ll be focusing our resources on market education and developer evangelism. Developer teams are still looking for the right mix of tools to test, build and deploy rapidly (including Kubernetes, Mesosphere, CoreOS, etc.). As an ecosystem, we need to do more to educate and provide the tutorials and resources to help developers succeed in this changing landscape. + +### Linux.com: What products do you offer and who is your target audience? + +van Leuffen: We currently offer one service level of our product Wercker; however, we’re developing an enterprise offering. Current organizations using Wercker range from startups, such as Open Listings, to larger companies and big agencies, like Pivotal Labs. + + +### Linux.com: What does this recently open-sourced CLI do? + +van Leuffen: Using the Wercker Command Line Interface (CLI), developers can spin up Docker containers on their desktop, automate their build and deploy processes and then deploy them to various cloud providers, like AWS, and scheduler and orchestration platforms, such as Mesosphere and Kubernetes. + +The Wercker Command Line Interface is available as an open source project on GitHub and runs on both OSX and Linux machines. + + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/enterprise/systems-management/887177-achieving-enterprise-ready-container-tools-with-werckers-open-source-cli + +作者:[Swapnil Bhartiya][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linux.com/community/forums/person/61003 +[1]:http://thenewstack.io/adopting-containers-enterprise/ +[2]:http://wercker.com/ +[3]:http://venturebeat.com/2016/01/28/wercker-raises-4-5-million-open-sources-its-command-line-tool/ +[4]:https://github.com/wercker/wercker + + diff --git a/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md b/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md index 3ffb1dc54f..4d0a5a229a 100644 --- a/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md +++ b/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md @@ -312,4 +312,4 @@ via: http://www.tecmint.com/linux-basic-shell-scripting-and-linux-filesystem-tro [1]:http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ [2]:http://www.tecmint.com/vi-editor-usage/ [3]:http://www.tecmint.com/learning-shell-scripting-language-a-guide-from-newbies-to-system-administrator/ -[4]:http://www.tecmint.com/basic-shell-programming-part-ii/ \ No newline at end of file +[4]:http://www.tecmint.com/basic-shell-programming-part-ii/ diff --git a/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md b/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md deleted file mode 100644 index 23e1b30f57..0000000000 --- a/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md +++ /dev/null @@ -1,389 +0,0 @@ -GHLandy Translating - -Part 2 - LFCS: How to Install and Use vi/vim as a Full Text Editor -================================================================================ -A couple of months ago, the Linux Foundation launched the LFCS (Linux Foundation Certified Sysadmin) certification in order to help individuals from all over the world to verify they are capable of doing basic to intermediate system administration tasks on Linux systems: system support, first-hand troubleshooting and maintenance, plus intelligent decision-making to know when it’s time to raise issues to upper support teams. - -![Learning VI Editor in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/LFCS-Part-2.png) - -Learning VI Editor in Linux - -Please take a look at the below video that explains The Linux Foundation Certification Program. - -注:youtube 视频 - - -This post is Part 2 of a 10-tutorial series, here in this part, we will cover the basic file editing operations and understanding modes in vi/m editor, that are required for the LFCS certification exam. - -### Perform Basic File Editing Operations Using vi/m ### - -Vi was the first full-screen text editor written for Unix. Although it was intended to be small and simple, it can be a bit challenging for people used exclusively to GUI text editors, such as NotePad++, or gedit, to name a few examples. - -To use Vi, we must first understand the 3 modes in which this powerful program operates, in order to begin learning later about the its powerful text-editing procedures. - -Please note that most modern Linux distributions ship with a variant of vi known as vim (“Vi improved”), which supports more features than the original vi does. For that reason, throughout this tutorial we will use vi and vim interchangeably. - -If your distribution does not have vim installed, you can install it as follows. - -- Ubuntu and derivatives: aptitude update && aptitude install vim -- Red Hat-based distributions: yum update && yum install vim -- openSUSE: zypper update && zypper install vim - -### Why should I want to learn vi? ### - -There are at least 2 good reasons to learn vi. - -1. vi is always available (no matter what distribution you’re using) since it is required by POSIX. - -2. vi does not consume a considerable amount of system resources and allows us to perform any imaginable tasks without lifting our fingers from the keyboard. - -In addition, vi has a very extensive built-in manual, which can be launched using the :help command right after the program is started. This built-in manual contains more information than vi/m’s man page. - -![vi Man Pages](http://www.tecmint.com/wp-content/uploads/2014/10/vi-man-pages.png) - -vi Man Pages - -#### Launching vi #### - -To launch vi, type vi in your command prompt. - -![Start vi Editor](http://www.tecmint.com/wp-content/uploads/2014/10/start-vi-editor.png) - -Start vi Editor - -Then press i to enter Insert mode, and you can start typing. Another way to launch vi/m is. - - # vi filename - -Which will open a new buffer (more on buffers later) named filename, which you can later save to disk. - -#### Understanding Vi modes #### - -1. In command mode, vi allows the user to navigate around the file and enter vi commands, which are brief, case-sensitive combinations of one or more letters. Almost all of them can be prefixed with a number to repeat the command that number of times. - -For example, yy (or Y) copies the entire current line, whereas 3yy (or 3Y) copies the entire current line along with the two next lines (3 lines in total). We can always enter command mode (regardless of the mode we’re working on) by pressing the Esc key. The fact that in command mode the keyboard keys are interpreted as commands instead of text tends to be confusing to beginners. - -2. In ex mode, we can manipulate files (including saving a current file and running outside programs). To enter this mode, we must type a colon (:) from command mode, directly followed by the name of the ex-mode command that needs to be used. After that, vi returns automatically to command mode. - -3. In insert mode (the letter i is commonly used to enter this mode), we simply enter text. Most keystrokes result in text appearing on the screen (one important exception is the Esc key, which exits insert mode and returns to command mode). - -![vi Insert Mode](http://www.tecmint.com/wp-content/uploads/2014/10/vi-insert-mode.png) - -vi Insert Mode - -#### Vi Commands #### - -The following table shows a list of commonly used vi commands. File edition commands can be enforced by appending the exclamation sign to the command (for example, - - - - - - -  Key command -  Description - - -  h or left arrow -  Go one character to the left - - -  j or down arrow -  Go down one line - - -  k or up arrow -  Go up one line - - -  l (lowercase L) or right arrow -  Go one character to the right - - -  H -  Go to the top of the screen - - -  L -  Go to the bottom of the screen - - -  G -  Go to the end of the file - - -  w -  Move one word to the right - - -  b -  Move one word to the left - - -  0 (zero) -  Go to the beginning of the current line - - -  ^ -  Go to the first nonblank character on the current line - - -  $ -  Go to the end of the current line - - -  Ctrl-B -  Go back one screen - - -  Ctrl-F -  Go forward one screen - - -  i -  Insert at the current cursor position - - -  I (uppercase i) -  Insert at the beginning of the current line - - -  J (uppercase j) -  Join current line with the next one (move next line up) - - -  a -  Append after the current cursor position - - -  o (lowercase O) -  Creates a blank line after the current line - - -  O (uppercase o) -  Creates a blank line before the current line - - -  r -  Replace the character at the current cursor position - - -  R -  Overwrite at the current cursor position - - -  x -  Delete the character at the current cursor position - - -  X -  Delete the character immediately before (to the left) of the current cursor position - - -  dd -  Cut (for later pasting) the entire current line - - -  D -  Cut from the current cursor position to the end of the line (this command is equivalent to d$) - - -  yX -  Give a movement command X, copy (yank) the appropriate number of characters, words, or lines from the current cursor position - - -  yy or Y -  Yank (copy) the entire current line - - -  p -  Paste after (next line) the current cursor position - - -  P -  Paste before (previous line) the current cursor position - - -  . (period) -  Repeat the last command - - -  u -  Undo the last command - - -  U -  Undo the last command in the last line. This will work as long as the cursor is still on the line. - - -  n -  Find the next match in a search - - -  N -  Find the previous match in a search - - -  :n -  Next file; when multiple files are specified for editing, this commands loads the next file. - - -  :e file -  Load file in place of the current file. - - -  :r file -  Insert the contents of file after (next line) the current cursor position - - -  :q -  Quit without saving changes. - - -  :w file -  Write the current buffer to file. To append to an existing file, use :w >> file. - - -  :wq -  Write the contents of the current file and quit. Equivalent to x! and ZZ - - -  :r! command -  Execute command and insert output after (next line) the current cursor position. - - - - -#### Vi Options #### - -The following options can come in handy while running vim (we need to add them in our ~/.vimrc file). - - # echo set number >> ~/.vimrc - # echo syntax on >> ~/.vimrc - # echo set tabstop=4 >> ~/.vimrc - # echo set autoindent >> ~/.vimrc - -![vi Editor Options](http://www.tecmint.com/wp-content/uploads/2014/10/vi-options.png) - -vi Editor Options - -- set number shows line numbers when vi opens an existing or a new file. -- syntax on turns on syntax highlighting (for multiple file extensions) in order to make code and config files more readable. -- set tabstop=4 sets the tab size to 4 spaces (default value is 8). -- set autoindent carries over previous indent to the next line. - -#### Search and replace #### - -vi has the ability to move the cursor to a certain location (on a single line or over an entire file) based on searches. It can also perform text replacements with or without confirmation from the user. - -a). Searching within a line: the f command searches a line and moves the cursor to the next occurrence of a specified character in the current line. - -For example, the command fh would move the cursor to the next instance of the letter h within the current line. Note that neither the letter f nor the character you’re searching for will appear anywhere on your screen, but the character will be highlighted after you press Enter. - -For example, this is what I get after pressing f4 in command mode. - -![Search String in Vi](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-string.png) - -Search String in Vi - -b). Searching an entire file: use the / command, followed by the word or phrase to be searched for. A search may be repeated using the previous search string with the n command, or the next one (using the N command). This is the result of typing /Jane in command mode. - -![Vi Search String in File](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-line.png) - -Vi Search String in File - -c). vi uses a command (similar to sed’s) to perform substitution operations over a range of lines or an entire file. To change the word “old” to “young” for the entire file, we must enter the following command. - - :%s/old/young/g - -**Notice**: The colon at the beginning of the command. - -![Vi Search and Replace](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-and-replace.png) - -Vi Search and Replace - -The colon (:) starts the ex command, s in this case (for substitution), % is a shortcut meaning from the first line to the last line (the range can also be specified as n,m which means “from line n to line m”), old is the search pattern, while young is the replacement text, and g indicates that the substitution should be performed on every occurrence of the search string in the file. - -Alternatively, a c can be added to the end of the command to ask for confirmation before performing any substitution. - - :%s/old/young/gc - -Before replacing the original text with the new one, vi/m will present us with the following message. - -![Replace String in Vi](http://www.tecmint.com/wp-content/uploads/2014/10/vi-replace-old-with-young.png) - -Replace String in Vi - -- y: perform the substitution (yes) -- n: skip this occurrence and go to the next one (no) -- a: perform the substitution in this and all subsequent instances of the pattern. -- q or Esc: quit substituting. -- l (lowercase L): perform this substitution and quit (last). -- Ctrl-e, Ctrl-y: Scroll down and up, respectively, to view the context of the proposed substitution. - -#### Editing Multiple Files at a Time #### - -Let’s type vim file1 file2 file3 in our command prompt. - - # vim file1 file2 file3 - -First, vim will open file1. To switch to the next file (file2), we need to use the :n command. When we want to return to the previous file, :N will do the job. - -In order to switch from file1 to file3. - -a). The :buffers command will show a list of the file currently being edited. - - :buffers - -![Edit Multiple Files](http://www.tecmint.com/wp-content/uploads/2014/10/vi-edit-multiple-files.png) - -Edit Multiple Files - -b). The command :buffer 3 (without the s at the end) will open file3 for editing. - -In the image above, a pound sign (#) indicates that the file is currently open but in the background, while %a marks the file that is currently being edited. On the other hand, a blank space after the file number (3 in the above example) indicates that the file has not yet been opened. - -#### Temporary vi buffers #### - -To copy a couple of consecutive lines (let’s say 4, for example) into a temporary buffer named a (not associated with a file) and place those lines in another part of the file later in the current vi section, we need to… - -1. Press the ESC key to be sure we are in vi Command mode. - -2. Place the cursor on the first line of the text we wish to copy. - -3. Type “a4yy to copy the current line, along with the 3 subsequent lines, into a buffer named a. We can continue editing our file – we do not need to insert the copied lines immediately. - -4. When we reach the location for the copied lines, use “a before the p or P commands to insert the lines copied into the buffer named a: - -- Type “ap to insert the lines copied into buffer a after the current line on which the cursor is resting. -- Type “aP to insert the lines copied into buffer a before the current line. - -If we wish, we can repeat the above steps to insert the contents of buffer a in multiple places in our file. A temporary buffer, as the one in this section, is disposed when the current window is closed. - -### Summary ### - -As we have seen, vi/m is a powerful and versatile text editor for the CLI. Feel free to share your own tricks and comments below. - -#### Reference Links #### - -- [About the LFCS][1] -- [Why get a Linux Foundation Certification?][2] -- [Register for the LFCS exam][3] - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/vi-editor-usage/ - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/gacanepa/ -[1]:https://training.linuxfoundation.org/certification/LFCS -[2]:https://training.linuxfoundation.org/certification/why-certify-with-us -[3]:https://identity.linuxfoundation.org/user?destination=pid/1 diff --git a/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md b/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md deleted file mode 100644 index 82cc54a5a6..0000000000 --- a/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md +++ /dev/null @@ -1,382 +0,0 @@ -Part 3 - LFCS: How to Archive/Compress Files & Directories, Setting File Attributes and Finding Files in Linux -================================================================================ -Recently, the Linux Foundation started the LFCS (Linux Foundation Certified Sysadmin) certification, a brand new program whose purpose is allowing individuals from all corners of the globe to have access to an exam, which if approved, certifies that the person is knowledgeable in performing basic to intermediate system administration tasks on Linux systems. This includes supporting already running systems and services, along with first-level troubleshooting and analysis, plus the ability to decide when to escalate issues to engineering teams. - -![Linux Foundation Certified Sysadmin – Part 3](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-3.png) - -Linux Foundation Certified Sysadmin – Part 3 - -Please watch the below video that gives the idea about The Linux Foundation Certification Program. - -注:youtube 视频 - - -This post is Part 3 of a 10-tutorial series, here in this part, we will cover how to archive/compress files and directories, set file attributes, and find files on the filesystem, that are required for the LFCS certification exam. - -### Archiving and Compression Tools ### - -A file archiving tool groups a set of files into a single standalone file that we can backup to several types of media, transfer across a network, or send via email. The most frequently used archiving utility in Linux is tar. When an archiving utility is used along with a compression tool, it allows to reduce the disk size that is needed to store the same files and information. - -#### The tar utility #### - -tar bundles a group of files together into a single archive (commonly called a tar file or tarball). The name originally stood for tape archiver, but we must note that we can use this tool to archive data to any kind of writeable media (not only to tapes). Tar is normally used with a compression tool such as gzip, bzip2, or xz to produce a compressed tarball. - -**Basic syntax:** - - # tar [options] [pathname ...] - -Where … represents the expression used to specify which files should be acted upon. - -#### Most commonly used tar commands #### - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Long optionAbbreviationDescription
 –create c Creates a tar archive
 –concatenate A Appends tar files to an archive
 –append r Appends files to the end of an archive
 –update u Appends files newer than copy in archive
 –diff or –compare d Find differences between archive and file system
 –file archive f Use archive file or device ARCHIVE
 –list t Lists the contents of a tarball
 –extract or –get x Extracts files from an archive
- -#### Normally used operation modifiers #### - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Long optionAbbreviationDescription
 –directory dir C Changes to directory dir before performing operations
 –same-permissions p Preserves original permissions
 –verbose v Lists all files read or extracted. When this flag is used along with –list, the file sizes, ownership, and time stamps are displayed.
 –verify W Verifies the archive after writing it
 –exclude file — Excludes file from the archive
 –exclude=pattern X Exclude files, given as a PATTERN
 –gzip or –gunzip z Processes an archive through gzip
 –bzip2 j Processes an archive through bzip2
 –xz J Processes an archive through xz
- -Gzip is the oldest compression tool and provides the least compression, while bzip2 provides improved compression. In addition, xz is the newest but (usually) provides the best compression. This advantages of best compression come at a price: the time it takes to complete the operation, and system resources used during the process. - -Normally, tar files compressed with these utilities have .gz, .bz2, or .xz extensions, respectively. In the following examples we will be using these files: file1, file2, file3, file4, and file5. - -**Grouping and compressing with gzip, bzip2 and xz** - -Group all the files in the current working directory and compress the resulting bundle with gzip, bzip2, and xz (please note the use of a regular expression to specify which files should be included in the bundle – this is to prevent the archiving tool to group the tarballs created in previous steps). - - # tar czf myfiles.tar.gz file[0-9] - # tar cjf myfiles.tar.bz2 file[0-9] - # tar cJf myfile.tar.xz file[0-9] - -![Compress Multiple Files Using tar](http://www.tecmint.com/wp-content/uploads/2014/10/Compress-Multiple-Files.png) - -Compress Multiple Files - -**Listing the contents of a tarball and updating / appending files to the bundle** - -List the contents of a tarball and display the same information as a long directory listing. Note that update or append operations cannot be applied to compressed files directly (if you need to update or append a file to a compressed tarball, you need to uncompress the tar file and update / append to it, then compress again). - - # tar tvf [tarball] - -![Check Files in tar Archive](http://www.tecmint.com/wp-content/uploads/2014/10/List-Archive-Content.png) - -List Archive Content - -Run any of the following commands: - - # gzip -d myfiles.tar.gz [#1] - # bzip2 -d myfiles.tar.bz2 [#2] - # xz -d myfiles.tar.xz [#3] - -Then - - # tar --delete --file myfiles.tar file4 (deletes the file inside the tarball) - # tar --update --file myfiles.tar file4 (adds the updated file) - -and - - # gzip myfiles.tar [ if you choose #1 above ] - # bzip2 myfiles.tar [ if you choose #2 above ] - # xz myfiles.tar [ if you choose #3 above ] - -Finally, - - # tar tvf [tarball] #again - -and compare the modification date and time of file4 with the same information as shown earlier. - -**Excluding file types** - -Suppose you want to perform a backup of user’s home directories. A good sysadmin practice would be (may also be specified by company policies) to exclude all video and audio files from backups. - -Maybe your first approach would be to exclude from the backup all files with an .mp3 or .mp4 extension (or other extensions). What if you have a clever user who can change the extension to .txt or .bkp, your approach won’t do you much good. In order to detect an audio or video file, you need to check its file type with file. The following shell script will do the job. - - #!/bin/bash - # Pass the directory to backup as first argument. - DIR=$1 - # Create the tarball and compress it. Exclude files with the MPEG string in its file type. - # -If the file type contains the string mpeg, $? (the exit status of the most recently executed command) expands to 0, and the filename is redirected to the exclude option. Otherwise, it expands to 1. - # -If $? equals 0, add the file to the list of files to be backed up. - tar X <(for i in $DIR/*; do file $i | grep -i mpeg; if [ $? -eq 0 ]; then echo $i; fi;done) -cjf backupfile.tar.bz2 $DIR/* - -![Exclude Files in tar Archive](http://www.tecmint.com/wp-content/uploads/2014/10/Exclude-Files-in-Tar.png) - -Exclude Files in tar - -**Restoring backups with tar preserving permissions** - -You can then restore the backup to the original user’s home directory (user_restore in this example), preserving permissions, with the following command. - - # tar xjf backupfile.tar.bz2 --directory user_restore --same-permissions - -![Restore Files from tar Archive](http://www.tecmint.com/wp-content/uploads/2014/10/Restore-tar-Backup-Files.png) - -Restore Files from Archive - -**Read Also:** - -- [18 tar Command Examples in Linux][1] -- [Dtrx – An Intelligent Archive Tool for Linux][2] - -### Using find Command to Search for Files ### - -The find command is used to search recursively through directory trees for files or directories that match certain characteristics, and can then either print the matching files or directories or perform other operations on the matches. - -Normally, we will search by name, owner, group, type, permissions, date, and size. - -#### Basic syntax: #### - -# find [directory_to_search] [expression] - -**Finding files recursively according to Size** - -Find all files (-f) in the current directory (.) and 2 subdirectories below (-maxdepth 3 includes the current working directory and 2 levels down) whose size (-size) is greater than 2 MB. - - # find . -maxdepth 3 -type f -size +2M - -![Find Files by Size in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Find-Files-Based-on-Size.png) - -Find Files Based on Size - -**Finding and deleting files that match a certain criteria** - -Files with 777 permissions are sometimes considered an open door to external attackers. Either way, it is not safe to let anyone do anything with files. We will take a rather aggressive approach and delete them! (‘{}‘ + is used to “collect” the results of the search). - - # find /home/user -perm 777 -exec rm '{}' + - -![Find all 777 Permission Files](http://www.tecmint.com/wp-content/uploads/2014/10/Find-Files-with-777-Permission.png) - -Find Files with 777Permission - -**Finding files per atime or mtime** - -Search for configuration files in /etc that have been accessed (-atime) or modified (-mtime) more (+180) or less (-180) than 6 months ago or exactly 6 months ago (180). - -Modify the following command as per the example below: - - # find /etc -iname "*.conf" -mtime -180 -print - -![Find Files by Modification Time](http://www.tecmint.com/wp-content/uploads/2014/10/Find-Modified-Files.png) - -Find Modified Files - -- Read Also: [35 Practical Examples of Linux ‘find’ Command][3] - -### File Permissions and Basic Attributes ### - -The first 10 characters in the output of ls -l are the file attributes. The first of these characters is used to indicate the file type: - -- – : a regular file -- -d : a directory -- -l : a symbolic link -- -c : a character device (which treats data as a stream of bytes, i.e. a terminal) -- -b : a block device (which handles data in blocks, i.e. storage devices) - -The next nine characters of the file attributes are called the file mode and represent the read (r), write (w), and execute (x) permissions of the file’s owner, the file’s group owner, and the rest of the users (commonly referred to as “the world”). - -Whereas the read permission on a file allows the same to be opened and read, the same permission on a directory allows its contents to be listed if the execute permission is also set. In addition, the execute permission in a file allows it to be handled as a program and run, while in a directory it allows the same to be cd’ed into it. - -File permissions are changed with the chmod command, whose basic syntax is as follows: - - # chmod [new_mode] file - -Where new_mode is either an octal number or an expression that specifies the new permissions. - -The octal number can be converted from its binary equivalent, which is calculated from the desired file permissions for the owner, the group, and the world, as follows: - -The presence of a certain permission equals a power of 2 (r=22, w=21, x=20), while its absence equates to 0. For example: - -![Linux File Permissions](http://www.tecmint.com/wp-content/uploads/2014/10/File-Permissions.png) - -File Permissions - -To set the file’s permissions as above in octal form, type: - - # chmod 744 myfile - -You can also set a file’s mode using an expression that indicates the owner’s rights with the letter u, the group owner’s rights with the letter g, and the rest with o. All of these “individuals” can be represented at the same time with the letter a. Permissions are granted (or revoked) with the + or – signs, respectively. - -**Revoking execute permission for a shell script to all users** - -As we explained earlier, we can revoke a certain permission prepending it with the minus sign and indicating whether it needs to be revoked for the owner, the group owner, or all users. The one-liner below can be interpreted as follows: Change mode for all (a) users, revoke (–) execute permission (x). - - # chmod a-x backup.sh - -Granting read, write, and execute permissions for a file to the owner and group owner, and read permissions for the world. - -When we use a 3-digit octal number to set permissions for a file, the first digit indicates the permissions for the owner, the second digit for the group owner and the third digit for everyone else: - -- Owner: (r=22 + w=21 + x=20 = 7) -- Group owner: (r=22 + w=21 + x=20 = 7) -- World: (r=22 + w=0 + x=0 = 4), - - # chmod 774 myfile - -In time, and with practice, you will be able to decide which method to change a file mode works best for you in each case. A long directory listing also shows the file’s owner and its group owner (which serve as a rudimentary yet effective access control to files in a system): - -![Linux File Listing](http://www.tecmint.com/wp-content/uploads/2014/10/Linux-File-Listing.png) - -Linux File Listing - -File ownership is changed with the chown command. The owner and the group owner can be changed at the same time or separately. Its basic syntax is as follows: - - # chown user:group file - -Where at least user or group need to be present. - -**Few Examples** - -Changing the owner of a file to a certain user. - - # chown gacanepa sent - -Changing the owner and group of a file to an specific user:group pair. - - # chown gacanepa:gacanepa TestFile - -Changing only the group owner of a file to a certain group. Note the colon before the group’s name. - - # chown :gacanepa email_body.txt - -### Conclusion ### - -As a sysadmin, you need to know how to create and restore backups, how to find files in your system and change their attributes, along with a few tricks that can make your life easier and will prevent you from running into future issues. - -I hope that the tips provided in the present article will help you to achieve that goal. Feel free to add your own tips and ideas in the comments section for the benefit of the community. Thanks in advance! -Reference Links - -- [About the LFCS][4] -- [Why get a Linux Foundation Certification?][5] -- [Register for the LFCS exam][6] - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/compress-files-and-finding-files-in-linux/ - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/gacanepa/ -[1]:http://www.tecmint.com/18-tar-command-examples-in-linux/ -[2]:http://www.tecmint.com/dtrx-an-intelligent-archive-extraction-tar-zip-cpio-rpm-deb-rar-tool-for-linux/ -[3]:http://www.tecmint.com/35-practical-examples-of-linux-find-command/ -[4]:https://training.linuxfoundation.org/certification/LFCS -[5]:https://training.linuxfoundation.org/certification/why-certify-with-us -[6]:https://identity.linuxfoundation.org/user?destination=pid/1 \ No newline at end of file diff --git a/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md b/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md deleted file mode 100644 index ada637fabb..0000000000 --- a/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md +++ /dev/null @@ -1,191 +0,0 @@ -Part 4 - LFCS: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition -================================================================================ -Last August, the Linux Foundation launched the LFCS certification (Linux Foundation Certified Sysadmin), a shiny chance for system administrators to show, through a performance-based exam, that they can perform overall operational support of Linux systems: system support, first-level diagnosing and monitoring, plus issue escalation – if needed – to other support teams. - -![Linux Foundation Certified Sysadmin – Part 4](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-4.png) - -Linux Foundation Certified Sysadmin – Part 4 - -Please aware that Linux Foundation certifications are precise, totally based on performance and available through an online portal anytime, anywhere. Thus, you no longer have to travel to a examination center to get the certifications you need to establish your skills and expertise. - -Please watch the below video that explains The Linux Foundation Certification Program. - -注:youtube 视频 - - -This post is Part 4 of a 10-tutorial series, here in this part, we will cover the Partitioning storage devices, Formatting filesystems and Configuring swap partition, that are required for the LFCS certification exam. - -### Partitioning Storage Devices ### - -Partitioning is a means to divide a single hard drive into one or more parts or “slices” called partitions. A partition is a section on a drive that is treated as an independent disk and which contains a single type of file system, whereas a partition table is an index that relates those physical sections of the hard drive to partition identifications. - -In Linux, the traditional tool for managing MBR partitions (up to ~2009) in IBM PC compatible systems is fdisk. For GPT partitions (~2010 and later) we will use gdisk. Each of these tools can be invoked by typing its name followed by a device name (such as /dev/sdb). - -#### Managing MBR Partitions with fdisk #### - -We will cover fdisk first. - - # fdisk /dev/sdb - -A prompt appears asking for the next operation. If you are unsure, you can press the ‘m‘ key to display the help contents. - -![fdisk Help Menu](http://www.tecmint.com/wp-content/uploads/2014/10/fdisk-help.png) - -fdisk Help Menu - -In the above image, the most frequently used options are highlighted. At any moment, you can press ‘p‘ to display the current partition table. - -![Check Partition Table in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Show-Partition-Table.png) - -Show Partition Table - -The Id column shows the partition type (or partition id) that has been assigned by fdisk to the partition. A partition type serves as an indicator of the file system, the partition contains or, in simple words, the way data will be accessed in that partition. - -Please note that a comprehensive study of each partition type is out of the scope of this tutorial – as this series is focused on the LFCS exam, which is performance-based. - -**Some of the options used by fdisk as follows:** - -You can list all the partition types that can be managed by fdisk by pressing the ‘l‘ option (lowercase l). - -Press ‘d‘ to delete an existing partition. If more than one partition is found in the drive, you will be asked which one should be deleted. - -Enter the corresponding number, and then press ‘w‘ (write modifications to partition table) to apply changes. - -In the following example, we will delete /dev/sdb2, and then print (p) the partition table to verify the modifications. - -![fdisk Command Options](http://www.tecmint.com/wp-content/uploads/2014/10/fdisk-options.png) - -fdisk Command Options - -Press ‘n‘ to create a new partition, then ‘p‘ to indicate it will be a primary partition. Finally, you can accept all the default values (in which case the partition will occupy all the available space), or specify a size as follows. - -![Create New Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-New-Partition.png) - -Create New Partition - -If the partition Id that fdisk chose is not the right one for our setup, we can press ‘t‘ to change it. - -![Change Partition Name in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Change-Partition-Name.png) - -Change Partition Name - -When you’re done setting up the partitions, press ‘w‘ to commit the changes to disk. - -![Save Partition Changes](http://www.tecmint.com/wp-content/uploads/2014/10/Save-Partition-Changes.png) - -Save Partition Changes - -#### Managing GPT Partitions with gdisk #### - -In the following example, we will use /dev/sdb. - - # gdisk /dev/sdb - -We must note that gdisk can be used either to create MBR or GPT partitions. - -![Create GPT Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-GPT-Partitions.png) - -Create GPT Partitions - -The advantage of using GPT partitioning is that we can create up to 128 partitions in the same disk whose size can be up to the order of petabytes, whereas the maximum size for MBR partitions is 2 TB. - -Note that most of the options in fdisk are the same in gdisk. For that reason, we will not go into detail about them, but here’s a screenshot of the process. - -![gdisk Command Options](http://www.tecmint.com/wp-content/uploads/2014/10/gdisk-options.png) - -gdisk Command Options - -### Formatting Filesystems ### - -Once we have created all the necessary partitions, we must create filesystems. To find out the list of filesystems supported in your system, run. - - # ls /sbin/mk* - -![Check Filesystems Type in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Filesystems.png) - -Check Filesystems Type - -The type of filesystem that you should choose depends on your requirements. You should consider the pros and cons of each filesystem and its own set of features. Two important attributes to look for in a filesystem are. - -- Journaling support, which allows for faster data recovery in the event of a system crash. -- Security Enhanced Linux (SELinux) support, as per the project wiki, “a security enhancement to Linux which allows users and administrators more control over access control”. - -In our next example, we will create an ext4 filesystem (supports both journaling and SELinux) labeled Tecmint on /dev/sdb1, using mkfs, whose basic syntax is. - - # mkfs -t [filesystem] -L [label] device - or - # mkfs.[filesystem] -L [label] device - -![Create ext4 Filesystems in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-ext4-Filesystems.png) - -Create ext4 Filesystems - -### Creating and Using Swap Partitions ### - -Swap partitions are necessary if we need our Linux system to have access to virtual memory, which is a section of the hard disk designated for use as memory, when the main system memory (RAM) is all in use. For that reason, a swap partition may not be needed on systems with enough RAM to meet all its requirements; however, even in that case it’s up to the system administrator to decide whether to use a swap partition or not. - -A simple rule of thumb to decide the size of a swap partition is as follows. - -Swap should usually equal 2x physical RAM for up to 2 GB of physical RAM, and then an additional 1x physical RAM for any amount above 2 GB, but never less than 32 MB. - -So, if: - -M = Amount of RAM in GB, and S = Amount of swap in GB, then - - If M < 2 - S = M *2 - Else - S = M + 2 - -Remember this is just a formula and that only you, as a sysadmin, have the final word as to the use and size of a swap partition. - -To configure a swap partition, create a regular partition as demonstrated earlier with the desired size. Next, we need to add the following entry to the /etc/fstab file (X can be either b or c). - - /dev/sdX1 swap swap sw 0 0 - -Finally, let’s format and enable the swap partition. - - # mkswap /dev/sdX1 - # swapon -v /dev/sdX1 - -To display a snapshot of the swap partition(s). - - # cat /proc/swaps - -To disable the swap partition. - - # swapoff /dev/sdX1 - -For the next example, we’ll use /dev/sdc1 (=512 MB, for a system with 256 MB of RAM) to set up a partition with fdisk that we will use as swap, following the steps detailed above. Note that we will specify a fixed size in this case. - -![Create-Swap-Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Swap-Partition.png) - -Create Swap Partition - -![Add Swap Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Swap-Partition.png) - -Enable Swap Partition - -### Conclusion ### - -Creating partitions (including swap) and formatting filesystems are crucial in your road to Sysadminship. I hope that the tips given in this article will guide you to achieve your goals. Feel free to add your own tips & ideas in the comments section below, for the benefit of the community. -Reference Links - -- [About the LFCS][1] -- [Why get a Linux Foundation Certification?][2] -- [Register for the LFCS exam][3] - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-partitions-and-filesystems-in-linux/ - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/gacanepa/ -[1]:https://training.linuxfoundation.org/certification/LFCS -[2]:https://training.linuxfoundation.org/certification/why-certify-with-us -[3]:https://identity.linuxfoundation.org/user?destination=pid/1 \ No newline at end of file diff --git a/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md b/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md deleted file mode 100644 index 1544a378bc..0000000000 --- a/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md +++ /dev/null @@ -1,232 +0,0 @@ -Part 5 - LFCS: How to Mount/Unmount Local and Network (Samba & NFS) Filesystems in Linux -================================================================================ -The Linux Foundation launched the LFCS certification (Linux Foundation Certified Sysadmin), a brand new program whose purpose is allowing individuals from all corners of the globe to get certified in basic to intermediate system administration tasks for Linux systems, which includes supporting running systems and services, along with overall monitoring and analysis, plus smart decision-making when it comes to raising issues to upper support teams. - -![Linux Foundation Certified Sysadmin – Part 5](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-5.png) - -Linux Foundation Certified Sysadmin – Part 5 - -The following video shows an introduction to The Linux Foundation Certification Program. - -注:youtube 视频 - - -This post is Part 5 of a 10-tutorial series, here in this part, we will explain How to mount/unmount local and network filesystems in linux, that are required for the LFCS certification exam. - -### Mounting Filesystems ### - -Once a disk has been partitioned, Linux needs some way to access the data on the partitions. Unlike DOS or Windows (where this is done by assigning a drive letter to each partition), Linux uses a unified directory tree where each partition is mounted at a mount point in that tree. - -A mount point is a directory that is used as a way to access the filesystem on the partition, and mounting the filesystem is the process of associating a certain filesystem (a partition, for example) with a specific directory in the directory tree. - -In other words, the first step in managing a storage device is attaching the device to the file system tree. This task can be accomplished on a one-time basis by using tools such as mount (and then unmounted with umount) or persistently across reboots by editing the /etc/fstab file. - -The mount command (without any options or arguments) shows the currently mounted filesystems. - - # mount - -![Check Mounted Filesystem in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/check-mounted-filesystems.png) - -Check Mounted Filesystem - -In addition, mount is used to mount filesystems into the filesystem tree. Its standard syntax is as follows. - - # mount -t type device dir -o options - -This command instructs the kernel to mount the filesystem found on device (a partition, for example, that has been formatted with a filesystem type) at the directory dir, using all options. In this form, mount does not look in /etc/fstab for instructions. - -If only a directory or device is specified, for example. - - # mount /dir -o options - or - # mount device -o options - -mount tries to find a mount point and if it can’t find any, then searches for a device (both cases in the /etc/fstab file), and finally attempts to complete the mount operation (which usually succeeds, except for the case when either the directory or the device is already being used, or when the user invoking mount is not root). - -You will notice that every line in the output of mount has the following format. - - device on directory type (options) - -For example, - - /dev/mapper/debian-home on /home type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered) - -Reads: - -dev/mapper/debian-home is mounted on /home, which has been formatted as ext4, with the following options: rw,relatime,user_xattr,barrier=1,data=ordered - -**Mount Options** - -Most frequently used mount options include. - -- async: allows asynchronous I/O operations on the file system being mounted. -- auto: marks the file system as enabled to be mounted automatically using mount -a. It is the opposite of noauto. -- defaults: this option is an alias for async,auto,dev,exec,nouser,rw,suid. Note that multiple options must be separated by a comma without any spaces. If by accident you type a space between options, mount will interpret the subsequent text string as another argument. -- loop: Mounts an image (an .iso file, for example) as a loop device. This option can be used to simulate the presence of the disk’s contents in an optical media reader. -- noexec: prevents the execution of executable files on the particular filesystem. It is the opposite of exec. -- nouser: prevents any users (other than root) to mount and unmount the filesystem. It is the opposite of user. -- remount: mounts the filesystem again in case it is already mounted. -- ro: mounts the filesystem as read only. -- rw: mounts the file system with read and write capabilities. -- relatime: makes access time to files be updated only if atime is earlier than mtime. -- user_xattr: allow users to set and remote extended filesystem attributes. - -**Mounting a device with ro and noexec options** - - # mount -t ext4 /dev/sdg1 /mnt -o ro,noexec - -In this case we can see that attempts to write a file to or to run a binary file located inside our mounting point fail with corresponding error messages. - - # touch /mnt/myfile - # /mnt/bin/echo “Hi there” - -![Mount Device in Read Write Mode](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Device-Read-Write.png) - -Mount Device Read Write - -**Mounting a device with default options** - -In the following scenario, we will try to write a file to our newly mounted device and run an executable file located within its filesystem tree using the same commands as in the previous example. - - # mount -t ext4 /dev/sdg1 /mnt -o defaults - -![Mount Device in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Device.png) - -Mount Device - -In this last case, it works perfectly. - -### Unmounting Devices ### - -Unmounting a device (with the umount command) means finish writing all the remaining “on transit” data so that it can be safely removed. Note that if you try to remove a mounted device without properly unmounting it first, you run the risk of damaging the device itself or cause data loss. - -That being said, in order to unmount a device, you must be “standing outside” its block device descriptor or mount point. In other words, your current working directory must be something else other than the mounting point. Otherwise, you will get a message saying that the device is busy. - -![Unmount Device in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Unmount-Device.png) - -Unmount Device - -An easy way to “leave” the mounting point is typing the cd command which, in lack of arguments, will take us to our current user’s home directory, as shown above. - -### Mounting Common Networked Filesystems ### - -The two most frequently used network file systems are SMB (which stands for “Server Message Block”) and NFS (“Network File System”). Chances are you will use NFS if you need to set up a share for Unix-like clients only, and will opt for Samba if you need to share files with Windows-based clients and perhaps other Unix-like clients as well. - -Read Also - -- [Setup Samba Server in RHEL/CentOS and Fedora][1] -- [Setting up NFS (Network File System) on RHEL/CentOS/Fedora and Debian/Ubuntu][2] - -The following steps assume that Samba and NFS shares have already been set up in the server with IP 192.168.0.10 (please note that setting up a NFS share is one of the competencies required for the LFCE exam, which we will cover after the present series). - -#### Mounting a Samba share on Linux #### - -Step 1: Install the samba-client samba-common and cifs-utils packages on Red Hat and Debian based distributions. - - # yum update && yum install samba-client samba-common cifs-utils - # aptitude update && aptitude install samba-client samba-common cifs-utils - -Then run the following command to look for available samba shares in the server. - - # smbclient -L 192.168.0.10 - -And enter the password for the root account in the remote machine. - -![Mount Samba Share in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Samba-Share.png) - -Mount Samba Share - -In the above image we have highlighted the share that is ready for mounting on our local system. You will need a valid samba username and password on the remote server in order to access it. - -Step 2: When mounting a password-protected network share, it is not a good idea to write your credentials in the /etc/fstab file. Instead, you can store them in a hidden file somewhere with permissions set to 600, like so. - - # mkdir /media/samba - # echo “username=samba_username” > /media/samba/.smbcredentials - # echo “password=samba_password” >> /media/samba/.smbcredentials - # chmod 600 /media/samba/.smbcredentials - -Step 3: Then add the following line to /etc/fstab file. - - # //192.168.0.10/gacanepa /media/samba cifs credentials=/media/samba/.smbcredentials,defaults 0 0 - -Step 4: You can now mount your samba share, either manually (mount //192.168.0.10/gacanepa) or by rebooting your machine so as to apply the changes made in /etc/fstab permanently. - -![Mount Password Protect Samba Share](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Password-Protect-Samba-Share.png) - -Mount Password Protect Samba Share - -#### Mounting a NFS share on Linux #### - -Step 1: Install the nfs-common and portmap packages on Red Hat and Debian based distributions. - - # yum update && yum install nfs-utils nfs-utils-lib - # aptitude update && aptitude install nfs-common - -Step 2: Create a mounting point for the NFS share. - - # mkdir /media/nfs - -Step 3: Add the following line to /etc/fstab file. - -192.168.0.10:/NFS-SHARE /media/nfs nfs defaults 0 0 - -Step 4: You can now mount your nfs share, either manually (mount 192.168.0.10:/NFS-SHARE) or by rebooting your machine so as to apply the changes made in /etc/fstab permanently. - -![Mount NFS Share in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-NFS-Share.png) - -Mount NFS Share - -### Mounting Filesystems Permanently ### - -As shown in the previous two examples, the /etc/fstab file controls how Linux provides access to disk partitions and removable media devices and consists of a series of lines that contain six fields each; the fields are separated by one or more spaces or tabs. A line that begins with a hash mark (#) is a comment and is ignored. - -Each line has the following format. - - - -Where: - -- : The first column specifies the mount device. Most distributions now specify partitions by their labels or UUIDs. This practice can help reduce problems if partition numbers change. -- : The second column specifies the mount point. -- : The file system type code is the same as the type code used to mount a filesystem with the mount command. A file system type code of auto lets the kernel auto-detect the filesystem type, which can be a convenient option for removable media devices. Note that this option may not be available for all filesystems out there. -- : One (or more) mount option(s). -- : You will most likely leave this to 0 (otherwise set it to 1) to disable the dump utility to backup the filesystem upon boot (The dump program was once a common backup tool, but it is much less popular today.) -- : This column specifies whether the integrity of the filesystem should be checked at boot time with fsck. A 0 means that fsck should not check a filesystem. The higher the number, the lowest the priority. Thus, the root partition will most likely have a value of 1, while all others that should be checked should have a value of 2. - -**Mount Examples** - -1. To mount a partition with label TECMINT at boot time with rw and noexec attributes, you should add the following line in /etc/fstab file. - - LABEL=TECMINT /mnt ext4 rw,noexec 0 0 - -2. If you want the contents of a disk in your DVD drive be available at boot time. - - /dev/sr0 /media/cdrom0 iso9660 ro,user,noauto 0 0 - -Where /dev/sr0 is your DVD drive. - -### Summary ### - -You can rest assured that mounting and unmounting local and network filesystems from the command line will be part of your day-to-day responsibilities as sysadmin. You will also need to master /etc/fstab. I hope that you have found this article useful to help you with those tasks. Feel free to add your comments (or ask questions) below and to share this article through your network social profiles. -Reference Links - -- [About the LFCS][3] -- [Why get a Linux Foundation Certification?][4] -- [Register for the LFCS exam][5] - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/mount-filesystem-in-linux/ - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/gacanepa/ -[1]:http://www.tecmint.com/setup-samba-server-using-tdbsam-backend-on-rhel-centos-6-3-5-8-and-fedora-17-12/ -[2]:http://www.tecmint.com/how-to-setup-nfs-server-in-linux/ -[3]:https://training.linuxfoundation.org/certification/LFCS -[4]:https://training.linuxfoundation.org/certification/why-certify-with-us -[5]:https://identity.linuxfoundation.org/user?destination=pid/1 \ No newline at end of file diff --git a/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md b/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md deleted file mode 100644 index fd23db110f..0000000000 --- a/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md +++ /dev/null @@ -1,276 +0,0 @@ -Part 6 - LFCS: Assembling Partitions as RAID Devices – Creating & Managing System Backups -================================================================================ -Recently, the Linux Foundation launched the LFCS (Linux Foundation Certified Sysadmin) certification, a shiny chance for system administrators everywhere to demonstrate, through a performance-based exam, that they are capable of performing overall operational support on Linux systems: system support, first-level diagnosing and monitoring, plus issue escalation, when required, to other support teams. - -![Linux Foundation Certified Sysadmin – Part 6](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-6.png) - -Linux Foundation Certified Sysadmin – Part 6 - -The following video provides an introduction to The Linux Foundation Certification Program. - -注:youtube 视频 - - -This post is Part 6 of a 10-tutorial series, here in this part, we will explain How to Assemble Partitions as RAID Devices – Creating & Managing System Backups, that are required for the LFCS certification exam. - -### Understanding RAID ### - -The technology known as Redundant Array of Independent Disks (RAID) is a storage solution that combines multiple hard disks into a single logical unit to provide redundancy of data and/or improve performance in read / write operations to disk. - -However, the actual fault-tolerance and disk I/O performance lean on how the hard disks are set up to form the disk array. Depending on the available devices and the fault tolerance / performance needs, different RAID levels are defined. You can refer to the RAID series here in Tecmint.com for a more detailed explanation on each RAID level. - -- RAID Guide: [What is RAID, Concepts of RAID and RAID Levels Explained][1] - -Our tool of choice for creating, assembling, managing, and monitoring our software RAIDs is called mdadm (short for multiple disks admin). - - ---------------- Debian and Derivatives ---------------- - # aptitude update && aptitude install mdadm - ----------- - - ---------------- Red Hat and CentOS based Systems ---------------- - # yum update && yum install mdadm - ----------- - - ---------------- On openSUSE ---------------- - # zypper refresh && zypper install mdadm # - -#### Assembling Partitions as RAID Devices #### - -The process of assembling existing partitions as RAID devices consists of the following steps. - -**1. Create the array using mdadm** - -If one of the partitions has been formatted previously, or has been a part of another RAID array previously, you will be prompted to confirm the creation of the new array. Assuming you have taken the necessary precautions to avoid losing important data that may have resided in them, you can safely type y and press Enter. - - # mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sdc1 - -![Creating RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Creating-RAID-Array.png) - -Creating RAID Array - -**2. Check the array creation status** - -After creating RAID array, you an check the status of the array using the following commands. - - # cat /proc/mdstat - or - # mdadm --detail /dev/md0 [More detailed summary] - -![Check RAID Array Status](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Array-Status.png) - -Check RAID Array Status - -**3. Format the RAID Device** - -Format the device with a filesystem as per your needs / requirements, as explained in [Part 4][2] of this series. - -**4. Monitor RAID Array Service** - -Instruct the monitoring service to “keep an eye” on the array. Add the output of mdadm –detail –scan to /etc/mdadm/mdadm.conf (Debian and derivatives) or /etc/mdadm.conf (CentOS / openSUSE), like so. - - # mdadm --detail --scan - -![Monitor RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Monitor-RAID-Array.png) - -Monitor RAID Array - - # mdadm --assemble --scan [Assemble the array] - -To ensure the service starts on system boot, run the following commands as root. - -**Debian and Derivatives** - -Debian and derivatives, though it should start running on boot by default. - - # update-rc.d mdadm defaults - -Edit the /etc/default/mdadm file and add the following line. - - AUTOSTART=true - -**On CentOS and openSUSE (systemd-based)** - - # systemctl start mdmonitor - # systemctl enable mdmonitor - -**On CentOS and openSUSE (SysVinit-based)** - - # service mdmonitor start - # chkconfig mdmonitor on - -**5. Check RAID Disk Failure** - -In RAID levels that support redundancy, replace failed drives when needed. When a device in the disk array becomes faulty, a rebuild automatically starts only if there was a spare device added when we first created the array. - -![Check RAID Faulty Disk](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Faulty-Disk.png) - -Check RAID Faulty Disk - -Otherwise, we need to manually attach an extra physical drive to our system and run. - - # mdadm /dev/md0 --add /dev/sdX1 - -Where /dev/md0 is the array that experienced the issue and /dev/sdX1 is the new device. - -**6. Disassemble a working array** - -You may have to do this if you need to create a new array using the devices – (Optional Step). - - # mdadm --stop /dev/md0 # Stop the array - # mdadm --remove /dev/md0 # Remove the RAID device - # mdadm --zero-superblock /dev/sdX1 # Overwrite the existing md superblock with zeroes - -**7. Set up mail alerts** - -You can configure a valid email address or system account to send alerts to (make sure you have this line in mdadm.conf). – (Optional Step) - - MAILADDR root - -In this case, all alerts that the RAID monitoring daemon collects will be sent to the local root account’s mail box. One of such alerts looks like the following. - -**Note**: This event is related to the example in STEP 5, where a device was marked as faulty and the spare device was automatically built into the array by mdadm. Thus, we “ran out” of healthy spare devices and we got the alert. - -![RAID Monitoring Alerts](http://www.tecmint.com/wp-content/uploads/2014/10/RAID-Monitoring-Alerts.png) - -RAID Monitoring Alerts - -#### Understanding RAID Levels #### - -**RAID 0** - -The total array size is n times the size of the smallest partition, where n is the number of independent disks in the array (you will need at least two drives). Run the following command to assemble a RAID 0 array using partitions /dev/sdb1 and /dev/sdc1. - - # mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sdc1 - -Common uses: Setups that support real-time applications where performance is more important than fault-tolerance. - -**RAID 1 (aka Mirroring)** - -The total array size equals the size of the smallest partition (you will need at least two drives). Run the following command to assemble a RAID 1 array using partitions /dev/sdb1 and /dev/sdc1. - - # mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1 - -Common uses: Installation of the operating system or important subdirectories, such as /home. - -**RAID 5 (aka drives with Parity)** - -The total array size will be (n – 1) times the size of the smallest partition. The “lost” space in (n-1) is used for parity (redundancy) calculation (you will need at least three drives). - -Note that you can specify a spare device (/dev/sde1 in this case) to replace a faulty part when an issue occurs. Run the following command to assemble a RAID 5 array using partitions /dev/sdb1, /dev/sdc1, /dev/sdd1, and /dev/sde1 as spare. - - # mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1 --spare-devices=1 /dev/sde1 - -Common uses: Web and file servers. - -**RAID 6 (aka drives with double Parity** - -The total array size will be (n*s)-2*s, where n is the number of independent disks in the array and s is the size of the smallest disk. Note that you can specify a spare device (/dev/sdf1 in this case) to replace a faulty part when an issue occurs. - -Run the following command to assemble a RAID 6 array using partitions /dev/sdb1, /dev/sdc1, /dev/sdd1, /dev/sde1, and /dev/sdf1 as spare. - - # mdadm --create --verbose /dev/md0 --level=6 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde --spare-devices=1 /dev/sdf1 - -Common uses: File and backup servers with large capacity and high availability requirements. - -**RAID 1+0 (aka stripe of mirrors)** - -The total array size is computed based on the formulas for RAID 0 and RAID 1, since RAID 1+0 is a combination of both. First, calculate the size of each mirror and then the size of the stripe. - -Note that you can specify a spare device (/dev/sdf1 in this case) to replace a faulty part when an issue occurs. Run the following command to assemble a RAID 1+0 array using partitions /dev/sdb1, /dev/sdc1, /dev/sdd1, /dev/sde1, and /dev/sdf1 as spare. - - # mdadm --create --verbose /dev/md0 --level=10 --raid-devices=4 /dev/sd[b-e]1 --spare-devices=1 /dev/sdf1 - -Common uses: Database and application servers that require fast I/O operations. - -#### Creating and Managing System Backups #### - -It never hurts to remember that RAID with all its bounties IS NOT A REPLACEMENT FOR BACKUPS! Write it 1000 times on the chalkboard if you need to, but make sure you keep that idea in mind at all times. Before we begin, we must note that there is no one-size-fits-all solution for system backups, but here are some things that you do need to take into account while planning a backup strategy. - -- What do you use your system for? (Desktop or server? If the latter case applies, what are the most critical services – whose configuration would be a real pain to lose?) -- How often do you need to take backups of your system? -- What is the data (e.g. files / directories / database dumps) that you want to backup? You may also want to consider if you really need to backup huge files (such as audio or video files). -- Where (meaning physical place and media) will those backups be stored? - -**Backing Up Your Data** - -Method 1: Backup entire drives with dd command. You can either back up an entire hard disk or a partition by creating an exact image at any point in time. Note that this works best when the device is offline, meaning it’s not mounted and there are no processes accessing it for I/O operations. - -The downside of this backup approach is that the image will have the same size as the disk or partition, even when the actual data occupies a small percentage of it. For example, if you want to image a partition of 20 GB that is only 10% full, the image file will still be 20 GB in size. In other words, it’s not only the actual data that gets backed up, but the entire partition itself. You may consider using this method if you need exact backups of your devices. - -**Creating an image file out of an existing device** - - # dd if=/dev/sda of=/system_images/sda.img - OR - --------------------- Alternatively, you can compress the image file --------------------- - # dd if=/dev/sda | gzip -c > /system_images/sda.img.gz - -**Restoring the backup from the image file** - - # dd if=/system_images/sda.img of=/dev/sda - OR - - --------------------- Depending on your choice while creating the image --------------------- - gzip -dc /system_images/sda.img.gz | dd of=/dev/sda - -Method 2: Backup certain files / directories with tar command – already covered in [Part 3][3] of this series. You may consider using this method if you need to keep copies of specific files and directories (configuration files, users’ home directories, and so on). - -Method 3: Synchronize files with rsync command. Rsync is a versatile remote (and local) file-copying tool. If you need to backup and synchronize your files to/from network drives, rsync is a go. - -Whether you’re synchronizing two local directories or local < — > remote directories mounted on the local filesystem, the basic syntax is the same. -Synchronizing two local directories or local < — > remote directories mounted on the local filesystem - - # rsync -av source_directory destination directory - -Where, -a recurse into subdirectories (if they exist), preserve symbolic links, timestamps, permissions, and original owner / group and -v verbose. - -![rsync Synchronizing Files](http://www.tecmint.com/wp-content/uploads/2014/10/rsync-synchronizing-Files.png) - -rsync Synchronizing Files - -In addition, if you want to increase the security of the data transfer over the wire, you can use ssh over rsync. - -**Synchronizing local → remote directories over ssh** - - # rsync -avzhe ssh backups root@remote_host:/remote_directory/ - -This example will synchronize the backups directory on the local host with the contents of /root/remote_directory on the remote host. - -Where the -h option shows file sizes in human-readable format, and the -e flag is used to indicate a ssh connection. - -![rsync Synchronize Remote Files](http://www.tecmint.com/wp-content/uploads/2014/10/rsync-synchronize-Remote-Files.png) - -rsync Synchronize Remote Files - -Synchronizing remote → local directories over ssh. - -In this case, switch the source and destination directories from the previous example. - - # rsync -avzhe ssh root@remote_host:/remote_directory/ backups - -Please note that these are only 3 examples (most frequent cases you’re likely to run into) of the use of rsync. For more examples and usages of rsync commands can be found at the following article. - -- Read Also: [10 rsync Commands to Sync Files in Linux][4] - -### Summary ### - -As a sysadmin, you need to ensure that your systems perform as good as possible. If you’re well prepared, and if the integrity of your data is well supported by a storage technology such as RAID and regular system backups, you’ll be safe. - -If you have questions, comments, or further ideas on how this article can be improved, feel free to speak out below. In addition, please consider sharing this series through your social network profiles. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/creating-and-managing-raid-backups-in-linux/ - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/gacanepa/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ -[2]:http://www.tecmint.com/create-partitions-and-filesystems-in-linux/ -[3]:http://www.tecmint.com/compress-files-and-finding-files-in-linux/ -[4]:http://www.tecmint.com/rsync-local-remote-file-synchronization-commands/ \ No newline at end of file diff --git a/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md b/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md index abf09ee523..2a822e8a45 100644 --- a/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md +++ b/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md @@ -364,4 +364,4 @@ via: http://www.tecmint.com/linux-boot-process-and-manage-services/ [3]:http://www.tecmint.com/chkconfig-command-examples/ [4]:http://www.tecmint.com/remove-unwanted-services-from-linux/ [5]:http://www.tecmint.com/chkconfig-command-examples/ -[6]:http://upstart.ubuntu.com/cookbook/ \ No newline at end of file +[6]:http://upstart.ubuntu.com/cookbook/ diff --git a/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md b/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md deleted file mode 100644 index 2cec4de4ae..0000000000 --- a/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md +++ /dev/null @@ -1,330 +0,0 @@ -Part 8 - LFCS: Managing Users & Groups, File Permissions & Attributes and Enabling sudo Access on Accounts -================================================================================ -Last August, the Linux Foundation started the LFCS certification (Linux Foundation Certified Sysadmin), a brand new program whose purpose is to allow individuals everywhere and anywhere take an exam in order to get certified in basic to intermediate operational support for Linux systems, which includes supporting running systems and services, along with overall monitoring and analysis, plus intelligent decision-making to be able to decide when it’s necessary to escalate issues to higher level support teams. - -![Linux Users and Groups Management](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-8.png) - -Linux Foundation Certified Sysadmin – Part 8 - -Please have a quick look at the following video that describes an introduction to the Linux Foundation Certification Program. - -注:youtube视频 - - -This article is Part 8 of a 10-tutorial long series, here in this section, we will guide you on how to manage users and groups permissions in Linux system, that are required for the LFCS certification exam. - -Since Linux is a multi-user operating system (in that it allows multiple users on different computers or terminals to access a single system), you will need to know how to perform effective user management: how to add, edit, suspend, or delete user accounts, along with granting them the necessary permissions to do their assigned tasks. - -### Adding User Accounts ### - -To add a new user account, you can run either of the following two commands as root. - - # adduser [new_account] - # useradd [new_account] - -When a new user account is added to the system, the following operations are performed. - -1. His/her home directory is created (/home/username by default). - -2. The following hidden files are copied into the user’s home directory, and will be used to provide environment variables for his/her user session. - - .bash_logout - .bash_profile - .bashrc - -3. A mail spool is created for the user at /var/spool/mail/username. - -4. A group is created and given the same name as the new user account. - -**Understanding /etc/passwd** - -The full account information is stored in the /etc/passwd file. This file contains a record per system user account and has the following format (fields are delimited by a colon). - - [username]:[x]:[UID]:[GID]:[Comment]:[Home directory]:[Default shell] - -- Fields [username] and [Comment] are self explanatory. -- The x in the second field indicates that the account is protected by a shadowed password (in /etc/shadow), which is needed to logon as [username]. -- The [UID] and [GID] fields are integers that represent the User IDentification and the primary Group IDentification to which [username] belongs, respectively. -- The [Home directory] indicates the absolute path to [username]’s home directory, and -- The [Default shell] is the shell that will be made available to this user when he or she logins the system. - -**Understanding /etc/group** - -Group information is stored in the /etc/group file. Each record has the following format. - - [Group name]:[Group password]:[GID]:[Group members] - -- [Group name] is the name of group. -- An x in [Group password] indicates group passwords are not being used. -- [GID]: same as in /etc/passwd. -- [Group members]: a comma separated list of users who are members of [Group name]. - -![Add User Accounts in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-user-accounts.png) - -Add User Accounts - -After adding an account, you can edit the following information (to name a few fields) using the usermod command, whose basic syntax of usermod is as follows. - - # usermod [options] [username] - -**Setting the expiry date for an account** - -Use the –expiredate flag followed by a date in YYYY-MM-DD format. - - # usermod --expiredate 2014-10-30 tecmint - -**Adding the user to supplementary groups** - -Use the combined -aG, or –append –groups options, followed by a comma separated list of groups. - - # usermod --append --groups root,users tecmint - -**Changing the default location of the user’s home directory** - -Use the -d, or –home options, followed by the absolute path to the new home directory. - - # usermod --home /tmp tecmint - -**Changing the shell the user will use by default** - -Use –shell, followed by the path to the new shell. - - # usermod --shell /bin/sh tecmint - -**Displaying the groups an user is a member of** - - # groups tecmint - # id tecmint - -Now let’s execute all the above commands in one go. - - # usermod --expiredate 2014-10-30 --append --groups root,users --home /tmp --shell /bin/sh tecmint - -![usermod Command Examples](http://www.tecmint.com/wp-content/uploads/2014/10/usermod-command-examples.png) - -usermod Command Examples - -Read Also: - -- [15 useradd Command Examples in Linux][1] -- [15 usermod Command Examples in Linux][2] - -For existing accounts, we can also do the following. - -**Disabling account by locking password** - -Use the -L (uppercase L) or the –lock option to lock a user’s password. - - # usermod --lock tecmint - -**Unlocking user password** - -Use the –u or the –unlock option to unlock a user’s password that was previously blocked. - - # usermod --unlock tecmint - -![Lock User in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/lock-user-in-linux.png) - -Lock User Accounts - -**Creating a new group for read and write access to files that need to be accessed by several users** - -Run the following series of commands to achieve the goal. - - # groupadd common_group # Add a new group - # chown :common_group common.txt # Change the group owner of common.txt to common_group - # usermod -aG common_group user1 # Add user1 to common_group - # usermod -aG common_group user2 # Add user2 to common_group - # usermod -aG common_group user3 # Add user3 to common_group - -**Deleting a group** - -You can delete a group with the following command. - - # groupdel [group_name] - -If there are files owned by group_name, they will not be deleted, but the group owner will be set to the GID of the group that was deleted. - -### Linux File Permissions ### - -Besides the basic read, write, and execute permissions that we discussed in [Setting File Attributes – Part 3][3] of this series, there are other less used (but not less important) permission settings, sometimes referred to as “special permissions”. - -Like the basic permissions discussed earlier, they are set using an octal file or through a letter (symbolic notation) that indicates the type of permission. -Deleting user accounts - -You can delete an account (along with its home directory, if it’s owned by the user, and all the files residing therein, and also the mail spool) using the userdel command with the –remove option. - - # userdel --remove [username] - -#### Group Management #### - -Every time a new user account is added to the system, a group with the same name is created with the username as its only member. Other users can be added to the group later. One of the purposes of groups is to implement a simple access control to files and other system resources by setting the right permissions on those resources. - -For example, suppose you have the following users. - -- user1 (primary group: user1) -- user2 (primary group: user2) -- user3 (primary group: user3) - -All of them need read and write access to a file called common.txt located somewhere on your local system, or maybe on a network share that user1 has created. You may be tempted to do something like, - - # chmod 660 common.txt - OR - # chmod u=rw,g=rw,o= common.txt [notice the space between the last equal sign and the file name] - -However, this will only provide read and write access to the owner of the file and to those users who are members of the group owner of the file (user1 in this case). Again, you may be tempted to add user2 and user3 to group user1, but that will also give them access to the rest of the files owned by user user1 and group user1. - -This is where groups come in handy, and here’s what you should do in a case like this. - -**Understanding Setuid** - -When the setuid permission is applied to an executable file, an user running the program inherits the effective privileges of the program’s owner. Since this approach can reasonably raise security concerns, the number of files with setuid permission must be kept to a minimum. You will likely find programs with this permission set when a system user needs to access a file owned by root. - -Summing up, it isn’t just that the user can execute the binary file, but also that he can do so with root’s privileges. For example, let’s check the permissions of /bin/passwd. This binary is used to change the password of an account, and modifies the /etc/shadow file. The superuser can change anyone’s password, but all other users should only be able to change their own. - -![passwd Command Examples](http://www.tecmint.com/wp-content/uploads/2014/10/passwd-command.png) - -passwd Command Examples - -Thus, any user should have permission to run /bin/passwd, but only root will be able to specify an account. Other users can only change their corresponding passwords. - -![Change User Password in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/change-user-password.png) - -Change User Password - -**Understanding Setgid** - -When the setgid bit is set, the effective GID of the real user becomes that of the group owner. Thus, any user can access a file under the privileges granted to the group owner of such file. In addition, when the setgid bit is set on a directory, newly created files inherit the same group as the directory, and newly created subdirectories will also inherit the setgid bit of the parent directory. You will most likely use this approach whenever members of a certain group need access to all the files in a directory, regardless of the file owner’s primary group. - - # chmod g+s [filename] - -To set the setgid in octal form, prepend the number 2 to the current (or desired) basic permissions. - - # chmod 2755 [directory] - -**Setting the SETGID in a directory** - -![Add Setgid in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-setgid-to-directory.png) - -Add Setgid to Directory - -**Understanding Sticky Bit** - -When the “sticky bit” is set on files, Linux just ignores it, whereas for directories it has the effect of preventing users from deleting or even renaming the files it contains unless the user owns the directory, the file, or is root. - -# chmod o+t [directory] - -To set the sticky bit in octal form, prepend the number 1 to the current (or desired) basic permissions. - -# chmod 1755 [directory] - -Without the sticky bit, anyone able to write to the directory can delete or rename files. For that reason, the sticky bit is commonly found on directories, such as /tmp, that are world-writable. - -![Add Stickybit in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-sticky-bit-to-directory.png) - -Add Stickybit to Directory - -### Special Linux File Attributes ### - -There are other attributes that enable further limits on the operations that are allowed on files. For example, prevent the file from being renamed, moved, deleted, or even modified. They are set with the [chattr command][4] and can be viewed using the lsattr tool, as follows. - - # chattr +i file1 - # chattr +a file2 - -After executing those two commands, file1 will be immutable (which means it cannot be moved, renamed, modified or deleted) whereas file2 will enter append-only mode (can only be open in append mode for writing). - -![Protect File from Deletion](http://www.tecmint.com/wp-content/uploads/2014/10/chattr-command.png) - -Chattr Command to Protect Files - -### Accessing the root Account and Using sudo ### - -One of the ways users can gain access to the root account is by typing. - - $ su - -and then entering root’s password. - -If authentication succeeds, you will be logged on as root with the current working directory as the same as you were before. If you want to be placed in root’s home directory instead, run. - - $ su - - -and then enter root’s password. - -![Enable sudo Access on Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Sudo-Access.png) - -Enable Sudo Access on Users - -The above procedure requires that a normal user knows root’s password, which poses a serious security risk. For that reason, the sysadmin can configure the sudo command to allow an ordinary user to execute commands as a different user (usually the superuser) in a very controlled and limited way. Thus, restrictions can be set on a user so as to enable him to run one or more specific privileged commands and no others. - -- Read Also: [Difference Between su and sudo User][5] - -To authenticate using sudo, the user uses his/her own password. After entering the command, we will be prompted for our password (not the superuser’s) and if the authentication succeeds (and if the user has been granted privileges to run the command), the specified command is carried out. - -To grant access to sudo, the system administrator must edit the /etc/sudoers file. It is recommended that this file is edited using the visudo command instead of opening it directly with a text editor. - - # visudo - -This opens the /etc/sudoers file using vim (you can follow the instructions given in [Install and Use vim as Editor – Part 2][6] of this series to edit the file). - -These are the most relevant lines. - - Defaults secure_path="/usr/sbin:/usr/bin:/sbin" - root ALL=(ALL) ALL - tecmint ALL=/bin/yum update - gacanepa ALL=NOPASSWD:/bin/updatedb - %admin ALL=(ALL) ALL - -Let’s take a closer look at them. - - Defaults secure_path="/usr/sbin:/usr/bin:/sbin:/usr/local/bin" - -This line lets you specify the directories that will be used for sudo, and is used to prevent using user-specific directories, which can harm the system. - -The next lines are used to specify permissions. - - root ALL=(ALL) ALL - -- The first ALL keyword indicates that this rule applies to all hosts. -- The second ALL indicates that the user in the first column can run commands with the privileges of any user. -- The third ALL means any command can be run. - - tecmint ALL=/bin/yum update - -If no user is specified after the = sign, sudo assumes the root user. In this case, user tecmint will be able to run yum update as root. - - gacanepa ALL=NOPASSWD:/bin/updatedb - -The NOPASSWD directive allows user gacanepa to run /bin/updatedb without needing to enter his password. - - %admin ALL=(ALL) ALL - -The % sign indicates that this line applies to a group called “admin”. The meaning of the rest of the line is identical to that of an regular user. This means that members of the group “admin” can run all commands as any user on all hosts. - -To see what privileges are granted to you by sudo, use the “-l” option to list them. - -![Sudo Access Rules](http://www.tecmint.com/wp-content/uploads/2014/10/sudo-access-rules.png) - -Sudo Access Rules - -### Summary ### - -Effective user and file management skills are essential tools for any system administrator. In this article we have covered the basics and hope you can use it as a good starting to point to build upon. Feel free to leave your comments or questions below, and we’ll respond quickly. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/manage-users-and-groups-in-linux/ - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/gacanepa/ -[1]:http://www.tecmint.com/add-users-in-linux/ -[2]:http://www.tecmint.com/usermod-command-examples/ -[3]:http://www.tecmint.com/compress-files-and-finding-files-in-linux/ -[4]:http://www.tecmint.com/chattr-command-examples/ -[5]:http://www.tecmint.com/su-vs-sudo-and-how-to-configure-sudo-in-linux/ -[6]:http://www.tecmint.com/vi-editor-usage/ \ No newline at end of file diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md deleted file mode 100644 index 3d5943fc07..0000000000 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md +++ /dev/null @@ -1,66 +0,0 @@ -How To Find Files by Content Under UNIX -================================================================================ -I had written lots of code in C for my school work and saved it as source code under /home/user/c/*.c and *.h. How do I find files by content such as string or words (function name such as main() under UNIX shell prompt? - -You need to use the following tools: - -[a] **grep command** : print lines matching a pattern. - -[b] **find command**: search for files in a directory hierarchy. - -### [grep Command To Find Files By][1] Content ### - -Type the command as follows: - - grep 'string' *.txt - grep 'main(' *.c - grep '#include' *.c - grep 'getChar*' *.c - grep -i 'ultra' *.conf - grep -iR 'ultra' *.conf - -Where - -- **-i** : Ignore case distinctions in both the PATTERN (match valid, VALID, ValID string) and the input files (math file.c FILE.c FILE.C filename). -- **-R** : Read all files under each directory, recursively - -### Highlighting searched patterns ### - -You can highlight patterns easily while searching large number of files: - - $ grep --color=auto -iR 'getChar();' *.c - -### Displaying file names and line number for searched patterns ### - -You may also need to display filenames and numbers: - - $ grep --color=auto -iRnH 'getChar();' *.c - -Where, - -- **-n** : Prefix each line of output with the 1-based line number within its input file. -- **-H** Print the file name for each match. This is the default when there is more than one file to search. - - $grep --color=auto -nH 'DIR' * - -Sample output: - -![Fig.01: grep command displaying searched pattern](http://www.cyberciti.biz/faq/wp-content/uploads/2008/09/grep-command.png) - -Fig.01: grep command displaying searched pattern - -You can also use find command: - - $ find . -name "*.c" -print | xargs grep "main(" - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/faq/unix-linux-finding-files-by-content/ - -作者:Vivek Gite -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:http://www.cyberciti.biz/faq/howto-search-find-file-for-text-string/ \ No newline at end of file diff --git a/translated/share/20151104 Optimize Web Delivery with these Open Source Tools.md b/translated/share/20151104 Optimize Web Delivery with these Open Source Tools.md new file mode 100644 index 0000000000..21fd8ad8e2 --- /dev/null +++ b/translated/share/20151104 Optimize Web Delivery with these Open Source Tools.md @@ -0,0 +1,195 @@ +使用开源工具优化Web响应 +================================================================================ +Web代理软件转发HTTP请求时并不会改变数据流量。它们经过配置后,可以免客户端配置,作为透明代理。它们还可以作为网站反向代理的前端;缓存服务器在此能支撑一台或多台web服务器为海量用户提供服务。 + +网站代理功能多样,有着宽泛的用途:从页面缓存、DNS和其他查询,到加速web服务器响应、降低带宽消耗。代理软件广泛用于大型高访问量的网站,比如纽约时报、卫报, 以及社交媒体网站如Twitter、Facebook和Wikipedia。 + +页面缓存已经成为优化单位时间内所能吞吐的数据量的至关重要的机制。好的Web缓存还能降低延迟,尽可能快地响应页面,让终端用户不至于因等待内容的时间过久而失去耐心。它们还能将频繁访问的内容缓存起来以节省带宽。如果你需要降低服务器负载并改善网站内容响应速度,那缓存软件能带来的好处就绝对值得探索一番。 + +为深入探查Linux下可用的相关软件的质量,我列出了下边5个优秀的开源web代理工具。它们中有些功能完备强大,也有几个只需很低的资源就能运行。 + +### Squid ### + +Squid是一个高性能、开源的代理缓存和Web缓存服务器,支持FTP、Internet Gopher、HTTPS和SSL等多种协议。它通过一个非阻塞,I/O事件驱动的单一进程处理所有IPV4或IPV6上的请求。 + +Squid由一个主服务程序squid,和DNS查询程序dnsserver,另外还有可选的请求重写、执行认证程序组件,及一些管理和客户端工具构成。 + +Squid提供了丰富的访问控制、认证和日志环境, 用于开发web代理和内容服务网站应用。 + +其特性包括: + +- Web代理: + - 通过缓存来降低访问时间和带宽使用 + - 将元数据和特别热的对象缓存到内存中 + - 缓存DNS查询 + - 支持非阻塞的DNS查询 + - 实现了失败请求的未果缓存 +- Squid缓存可架设为层次结构,或网状结构以节省额外的带宽 +- 通过可扩展的访问控制来执行网站使用条款 +- 隐匿请求,如禁用或修改客户端HTTP请求头特定属性 +- 反向代理 +- 媒体范围限制 +- 支持SSL +- 支持IPv6 +- 错误页面的本地化 - Squid可以根据访问者的语言选项对每个请求展示本地化的错误页面 +- 连接Pinning(用于NTLM Auth Passthrough) - 一种通过Web代理,允许Web服务器使用Microsoft NTLM安全认证替代HTTP标准认证的方案 +- 支持服务质量 (QoS, Quality of Service) 流 + - 选择一个TOS/Diffserv值来标记本地命中 + - 选择一个TOS/Diffserv值来标记邻居命中 + - 选择性地仅标记同级或上级请求 + - 允许任意发往客户端的HTTP响应保持由远程服务器处响应的TOS值 + - 对收到的远程服务器的TOS值,在复制之前对指定位进行掩码操作,再发送到客户端 +- SSL Bump (用于HTTPS过滤和适配) - Squid-in-the-middle,在CONNECT方式的SSL隧道中,用配置化的客户端和服务器端证书,对流量进行解密和加密 +- 支持适配模块 +- ICAP旁路和重试增强 - 通过完全的旁路和动态链式路由扩展ICAP,来处理多多个适应性服务。 +- 支持ICY流式协议 - 俗称SHOUTcast多媒体流 +- 动态SSL证书生产 +- 支持ICAP协议(Internet Content Adaptation Protocol) +- 完整的请求日志记录 +- 匿名连接 + +- 网站: [www.squid-cache.org][1] +- 开发: 美国国家应用网络研究实验室和网络志愿者 +- 授权: GNU GPL v2 +- 版本号: 4.0.1 + +### Privoxy ### + +Privoxy(Privacy Enhancing Proxy)是一个非缓存类Web代理软件,它自带的高级过滤功能用来增强隐私保护,修改页面内容和HTTP头部信息,访问控制,以及去除广告和其它招人反感的互联网垃圾。Privoxy的配置非常灵活,能充分定制已满足各种各样的需求和偏好。它支持单机和多用户网络两种模式。 + +Privoxy使用Actions规则来处理浏览器和远程站点间的数据流。 + +其特性包括: + +- 高度配置化 +- 广告拦截 +- Cookie管理 +- 支持"Connection: keep-alive"。可以无视客户端配置而保持持久连接 +- 支持IPv6 +- 标签化,允许按照客户端和服务器的请求头进行处理 +- 作为拦截代理器运行 +- 巧妙的手段和过滤机制用来处理服务器和客户端的HTTP头部 +- 可以与其他代理软件链式使用 +- 整合了基于浏览器的配置和控制工具,能在线跟踪规则和过滤效果,可远程开关 +- 页面过滤(文本替换、根据尺寸大小删除广告栏, 隐藏的"web-bugs"元素和HTML容错等) +- 模块化的配置使得标准配合和用户配置可以存放于不同文件中,这样安装更新就不会覆盖用户的个性化设置 +- 配置文件支持Perl兼容的正则表达式,以及更为精妙和灵活的配置语法 +- GIF去动画 +- 旁路处理大量click-tracking脚本(避免脚本重定向) +- 大多数代理生成的页面(例如 "访问受限" 页面)可由用户自定义HTML模板 +- 自动监测配置文件的修改并重新读取 +- 最大特点是可以基于每个站点或每个位置来进行控制 + +- 网站: [www.privoxy.org][2] +- 开发: Fabian Keil(开发领导者), David Schmidt, 和众多其他贡献者 +- 授权: GNU GPL v2 +- 版本号: 3.4.2 + +### Varnish Cache ### + +Varnish Cache是一个为性能和灵活性而生的web加速器。它新颖的架构设计能带来显著的性能提升。根据你的架构,通常情况下它能加速响应速度300-1000倍。Varnish将页面存储到内存,这样web服务器就无需重复地创建相同的页面,只需要在页面发生变化后重新生成。页面内容直接从内存中访问,当然比其他方式更快。 + +此外Varnish能大大提升响应web页面的速度,用任何应用服务器都能使网站访问速度大幅度地提升。 + +按按经验,Varnish Cache比较经济的配置是1-16GB内存+SSD固态硬盘。 + +其特性包括: + +- 新颖的设计 +- VCL - 非常灵活的配置语言。VCL配置转换成C,然后编译、加载、运行,灵活且高效 +- 能使用round-robin轮询和随机分发两种方式来负载均衡,两种方式下后端服务器都可以设置权重 +- 基于DNS、随机、散列和客户端IP的分发器 +- 多台后端主机间的负载均衡 +- 支持Edge Side Includes,包括拼装压缩后的ESI片段 +- 多线程并发 +- URL重写 +- 单Varnish缓存多个虚拟主机 +- 日志数据存储在共享内存中 +- 基本的后端服务器健康检查 +- 优雅地处理后端服务器“挂掉” +- 命令行界面的管理控制台 +- 使用内联C来扩展Varnish +- 可以与Apache用在相同的系统上 +- 单系统可运行多个Varnish +- 支持HAProxy代理协议。该协议在每个收到的TCP请求,例如SSL终止过程中,附加小段头信息,以记录客户端的真实地址 +- 冷热VCL状态 +- 用名为VMODs的Varnish模块来提供插件扩展 +- 通过VMODs定义后端主机 +- Gzip压缩及解压 +- HTTP流通过和获取 +- 神圣模式和优雅模式。用Varnish作为负载均衡器,神圣模式下可以将不稳定的后端服务器在一段时间内打入黑名单,阻止它们继续提供流量服务。优雅模式允许Varnish在获取不到后端服务器状态良好的响应时,提供已过期版本的页面或其它内容。 +- 实验性支持持久化存储,无需LRU缓存淘汰 + +- 网站: [www.varnish-cache.org][3] +- 开发: Varnish Software +- 授权: FreeBSD +- 版本号: 4.1.0 + +### Polipo ### + +Polipo是一个开源的HTTP缓存代理,只需要非常低的资源开销。 + +它监听来自浏览器的web页面请求,转发到web服务器,然后将服务器的响应转发到浏览器。在此过程中,它能优化和整形网络流量。从本质来讲Polipo与WWWOFFLE很相似,但其实现技术更接近于Squid。 + +Polipo最开始的目标是作为一个兼容HTTP/1.1的代理,理论它能在任何兼容HTTP/1.1或更早的HTTP/1.0的站点上运行。 + +其特性包括: + +- HTTP 1.1、IPv4 & IPv6、流量过滤和隐私保护增强 +- 如确认远程服务器支持,则无论收到的请求是管道处理过的还是在多个连接上同时收到的,都使用HTTP/1.1管道 +- 下载被中断时缓存起始部分,当需要续传时用区间请求来完成下载 +- 将HTTP/1.0的客户端请求升级为HTTP/1.1,然后按照客户端支持的级别进行升级或降级后回复 +- 全面支持IPv6 (作用域(链路本地)地址除外) +- 作为IPv4和IPv6网络的网桥 +- 内容过滤 +- 能使用Poor Man多路复用技术降低延迟 +- 支持SOCKS 4和SOCKS 5协议 +- HTTPS代理 +- 扮演透明代理的角色 +- 可以与Privoxy或tor一起运行 + +- 网站: [www.pps.univ-paris-diderot.fr/~jch/software/polipo/][4] +- 开发: Juliusz Chroboczek, Christopher Davis +- 授权: MIT License +- 版本号: 1.1.1 + +### Tinyproxy ### + +Tinyproxy是一个轻量级的开源web代理守护进程,其设计目标是快而小。它适用于需要完整HTTP代理特性,但系统资源又不足以运行大型代理的场景,比如嵌入式部署。 + +Tinyproxy对小规模网络非常有用,这样的场合下大型代理会使系统资源紧张,或有安全风险。Tinyproxy的一个关键特性是其缓冲连接的理念。实质上Tinyproxy服务器的响应进行了高速缓冲,然后按照客户端能够处理的最高速度进行响应。该特性极大的降低了网络延滞带来的问题。 + +特性: + +- 易于修改 +- 隐匿模式 - 定义哪些HTTP头允许通过,哪些又会被拦截 +- 支持HTTPS - Tinyproxy允许通过CONNECT方法转发HTTPS连接,任何情况下都不会修改数据流量 +- 远程监控 - 远程访问代理统计数据,让你能清楚了解代理服务当前的忙碌状态 +- 平均负载监控 - 通过配置,当服务器的负载接近一定值后拒绝新连接 +- 访问控制 - 通过配置,仅允许指定子网或IP地址的访问 +- 安全 - 运行无需额外权限,减小了系统受到威胁的概率 +- 基于URL的过滤 - 允许基于域和URL的黑白名单 +- 透明代理 - 配位为透明代理,这样客户端就无需任何配置 +- 代理链 - 来流量出口处采用上游代理服务器,而不是直接转发到目标服务器,创建我们所说的代理链 +- 隐私特性 - 限制允许从浏览器收到的来自HTTP服务器的数据(例如cookies),同时限制允许通过的从浏览器到HTTP服务器的数据(例如版本信息) +- 低开销 - 使用glibc内存开销只有2MB,CPU负载按并发连接数线性增长(取决于网络连接速度)。 Tinyproxy可以运行在老旧的机器上而无需担心性能问题。 + +- 网站: [banu.com/tinyproxy][5] +- 开发: Robert James Kaes和其他贡献者 +- 授权: GNU GPL v2 +- 版本号: 1.8.3 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20151101020309690/WebDelivery.html + +译者:[fw8899](https://github.com/fw8899) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.squid-cache.org/ +[2]:http://www.privoxy.org/ +[3]:https://www.varnish-cache.org/ +[4]:http://www.pps.univ-paris-diderot.fr/%7Ejch/software/polipo/ +[5]:https://banu.com/tinyproxy/ diff --git a/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md b/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md deleted file mode 100644 index 623886b896..0000000000 --- a/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md +++ /dev/null @@ -1,69 +0,0 @@ -黑客利用Wi-Fi侵犯你隐私的七种方法 -================================================================================ -![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/intro_title-100626673-orig.jpg) - -### 黑客利用Wi-Fi侵犯你隐私的七种方法 ### - -Wi-Fi — 既然方便又危险的东西!这里给大家介绍一下通过Wi-Fi连接泄露身份信息的七种方法和预防措施。 - -![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/1_free-hotspots-100626674-orig.jpg) - -### 利用免费热点 ### - -它们似乎无处不在,而且它们的数量会在[下一个四年里增加四倍][1]。但是它们当中很多都是不值得信任的,从你的登录凭证、email甚至更加敏感的账户,都能被黑客用一款名叫“sniffers”的软件截获 — 这款软件能截获到任何你通过该连接提交的信息。防止被黑客盯上的最好办法就是使用VPN(virtual private network),它能保护你的数据隐私它会加密你所输入的信息。 - -![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/2_online-banking-100626675-orig.jpg) - -### 网上银行 ### - -你可能认为没有人需要自己被提醒不要使用免费Wi-Fi来操作网上银行, 但网络安全厂商卡巴斯基实验室表示[全球超过100家银行因为网络黑客而损失9亿美元][2],由此可见还是有很多人因此受害。如果你真的想要在一家咖吧里使用免费真实的Wi-Fi,那么你应该向服务员确认网络名称。[在店里用路由器设置一个开放的无线连接][3]并将它的网络名称设置成店名是一件相当简单的事。 - -![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/3_keeping-wifi-on-100626676-orig.jpg) - -### 始终开着Wi-Fi开关 ### - -如果你手机的Wi-Fi开关一直开着的,你会自动被连接到一个不安全的网络中去,你甚至都没有意识到。你可以利用你手机的[基于位置的Wi-Fi功能][4],如果它是可用的,那它会在你离开你所保存的网络范围后自动关闭你的Wi-Fi开关并在你回去之后再次开启。 - -![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/4_not-using-firewall-100626677-orig.jpg) - -### 不使用防火墙 ### - -防火墙是你的第一道抵御恶意入侵的防线,它能有效地让你的电脑网络通畅并阻挡黑客和恶意软件。你应该时刻开启它除非你的杀毒软件有它自己的防火墙。 - -![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/5_browsing-unencrypted-sites-100626678-orig.jpg) - -### 浏览非加密网页 ### - -说起来很难过,[世界上排名前100万个网站中55%是不加密的][5],一个未加密的网站则会让传输的数据暴露在黑客的眼下。如果一个网页是安全的,你的浏览器则会有标明(比如说火狐浏览器是一把绿色的挂锁、Chrome蓝旗则是个绿色的图标)。但是一个安全的网站不能让你免于被劫持的风险,它能通过公共网络从你访问过的网站上窃取cookies,无论是不是正当网站与否。 - -![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/6_updating-security-software-100626679-orig.jpg) - -### 不更新你的安全防护软件 ### - -如果你想要确保你自己的网络是受保护的,就更新的路由器固件。你要做的就是进入你的路由器管理页面去检查,通常你能在厂商的官方网页上下载到最新的固件版本。 - -![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/7_securing-home-wifi-100626680-orig.jpg) - -### 不保护你的家用Wi-Fi ### - -不用说,设置一个复杂的密码和更改无线连接的默认名都是非常重要的。你还可以过滤你的MAC地址来让你的路由器只承认那些确认过的设备。 - -**Josh Althuser**是一个开源支持者、网络架构师和科技企业家。在过去12年里,他花了很多时间去倡导使用开源软件来管理团队和项目,同时为网络应用程序提供企业级咨询并帮助它们走向市场。你可以联系[他的推特][6]. - --------------------------------------------------------------------------------- - -via: http://www.networkworld.com/article/3003170/mobile-security/7-ways-hackers-can-use-wi-fi-against-you.html - -作者:[Josh Althuser][a] -译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://twitter.com/JoshAlthuser -[1]:http://www.pcworld.com/article/243464/number_of_wifi_hotspots_to_quadruple_by_2015_says_study.html -[2]:http://www.nytimes.com/2015/02/15/world/bank-hackers-steal-millions-via-malware.html?hp&action=click&pgtype=Homepage&module=first-column-region%C2%AEion=top-news&WT.nav=top-news&_r=3 -[3]:http://news.yahoo.com/blogs/upgrade-your-life/banking-online-not-hacked-182159934.html -[4]:http://pocketnow.com/2014/10/15/should-you-leave-your-smartphones-wifi-on-or-turn-it-off -[5]:http://www.cnet.com/news/chrome-becoming-tool-in-googles-push-for-encrypted-web/ -[6]:https://twitter.com/JoshAlthuser diff --git a/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md b/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md deleted file mode 100644 index 271866ff47..0000000000 --- a/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md +++ /dev/null @@ -1,64 +0,0 @@ -eSpeak: Linux文本转语音工具 -================================================================================ -![Text to speech tool in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Text-to-speech-Linux.jpg) - -[eSpeak][1]是Linux的命令行工具,能把文本转变成语音。这是一款用C语言写就的精致的语音合成器,提供英语和其它多种语言支持。 - -eSpeak从标准输入或者输入文件中读取文本。虽然语音输出与真人声音相去甚远,但是,在你项目有用得到的地方,eSpeak仍不失为一个精致快捷的工具。 - -eSpeak部分主要特性如下: - -- 为Linux和Windows准备的命令行工具 -- 从文件或者标准输入中把文本读出来 -- 提供给其它程序使用的共享库版本 -- 为Windows提供SAPI5版本,在screen-readers或者其它支持Windows SAPI5接口程序的支持下,eSpeak仍然能正常使用 -- 可移植到其它平台,包括安卓,OSX等 -- 多种特色声音提供选择 -- 语音输出可保存为[.WAV][2]格式的文件 -- 部分SSML([Speech Synthesis Markup Language][3])能为HTML所支持 -- 体积小巧,整个程序包括语言支持等占用不足2MB -- 可以实现文本到音素编码的转化,能被其它语音合成引擎吸纳为前端工具 -- 可作为生成和调制音素数据的开发工具 - -### 安装eSpeak ### - -基于Ubuntu的系统中,在终端运行以下命令安装eSpeak: - - sudo apt-get install espeak - -eSpeak is an old tool and I presume that it should be available in the repositories of other Linux distributions such as Arch Linux, Fedora etc. You can install eSpeak easily using dnf, pacman etc.eSpeak是一个古老的工具,我推测它应该能在其它众多Linux发行版如Arch,Fedora中运行。使用dnf,pacman等命令就能轻易安装。 - -eSpeak用法如下:输入espeak按enter键运行程序。输入字符按enter转换为语音输出(译补)。使用Ctrl+C来关闭运行中的程序。 - -![eSpeak command line](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-example.png) - -还有其它可以的选项,可以通过程序帮助进行查看。 - -### GUI版本:Gespeaker ### - -如果你更倾向于使用GUI版本,可以安装Gespeaker,它为eSpeak提供了GTK界面。 - -使用以下命令来安装Gespeaker: - - sudo apt-get install gespeaker - -操作接口简明易用,你完全可以自行探索。 - -![eSpeak GUI tool for text to speech in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-GUI.png) - -虽然这个工具不能为大部分计算所用,但是当你的项目需要把文本转换成语音,espeak还是挺方便使用的。需则用之吧~ - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/espeak-text-speech-linux/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/soooogreen) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://espeak.sourceforge.net/ -[2]:http://en.wikipedia.org/wiki/WAV -[3]:http://en.wikipedia.org/wiki/Speech_Synthesis_Markup_Language diff --git a/translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md b/translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md new file mode 100644 index 0000000000..7f93b149ba --- /dev/null +++ b/translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md @@ -0,0 +1,65 @@ +EXT4,Btrfs和XFS 文件系统之点评 +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/09/1385698302_funny_linux_wallpapers-593x445.jpg) + +老实说,人们最不曾考虑的问题之一是他们的个人电脑中使用了什么文件系统。Windows 和 Mac OS X 用户更没有理由去考虑,因为对于他们的操作系统,只有一种选择,那就是 NTFS 和 HFS+。相反,对于 Linux 系统而言,有很多种文件系统可以选择,现在默认的是广泛采用的 ext4。然而,现在也有改用一种称为 btrfs 文件系统的趋势。那是什么使得 btrfs更优秀,其它的文件系统又是什么,什么时候我们又能看到 Linux 发行版作出改变呢? + +首先让我们对文件系统以及它们真正干什么有个总体的认识,然后我们再对一些有名的文件系统做详细的比较。 + +### 文件系统是干什么的? ### + +如果你不清楚文件系统是干什么的,一句话总结起来也非常简单。文件系统主要用于控制所有程序不再使用数据时如何存储数据、如何访问数据以及有什么其它信息(元数据)和数据本身相关,等等。听起来要编程实现并不是轻而易举的事情,实际上也确实如此。文件系统一直在改进,包括更多的功能、更高效地完成它需要做的事情。总而言之,它是所有计算机的基本需求、但并不像听起来那么简单。 + +### 为什么要分区? ### + +由于每个操作系统都能创建或者删除分区,很多人对分区都有模糊的认识。Linux 操作系统在同一块磁盘上即便使用标准安装过程,仍可以使用多个分区,这看起来很奇怪,因此需要一些解释。拥有不同分区的一个主要目的就是为了在灾难发生时能获得更好的数据安全性。 + +通过将硬盘划分为分区,数据会被分隔以及重组。当事故发生的时候,只有存储在被损坏分区的数据会被破坏,很大可能上其它分区的数据能得以保留。这个原因可以追溯到 Linux 操作系统还没有日志文件系统,任何电力故障都有可能导致灾难发生的时候。 + +使用分区也考虑到了安全和健壮性原因,因此操作系统部分损坏并不意味着整个计算机就有风险或者会受到破坏。这也是当前采用分区的一个最重要因素。举个例子,用户创建了一些会填满磁盘的脚本、程序或者 web 应用,如果该磁盘只有一个大的分区,如果磁盘满了那么整个系统就不能工作。如果用户把数据保存在不同的分区,那么就只有那个分区会受到影响,而系统分区或者其它数据分区仍能正常运行。 + +记住,拥有一个日志文件系统只能在掉电或者和存储设备意外断开连接时提供数据安全性,并不能在文件系统出现坏块或者发生逻辑错误时保护数据。对于这种情况,用户可以采用廉价磁盘冗余阵列(RAID:Redundant Array of Inexpensive Disks)的方案。 + +### 为什么要改变文件系统? ### + +ext4 文件系统由 ext3 文件系统改进而来,而后者又是从 ext2 文件系统改进而来。虽然 ext4 文件系统已经非常稳定,是过去几年中绝大部分发行版的默认选择,但它是基于陈旧的代码开发而来。另外, Linux 操作系统用户也需要很多 ext4 文件系统本身不提供的新功能。虽然通过某些软件能满足这种需求,但性能会受到影响,在文件系统层次做到这些能获得更好的性能。 + +### Ext4 文件系统 ### + +ext4 还有一些明显的限值。最大文件大小是 16tebibytes(大概是 17.6 terabytes),这比普通用户当前能买到的硬盘还要大的多。使用 ext4 能创建的最大卷/分区是 1 exbibyte(大概是 1,152,921.5 terabytes)。通过使用多种技巧, ext4 比 ext3 有很大的速度提升。类似一些最先进的文件系统,它是一个日志文件系统,意味着它会对文件在磁盘中的位置以及任何其它对磁盘的更改做记录。纵观它的所有功能,它还不支持透明压缩、重复数据删除或者透明加密。技术上支持了快照,但该功能还处于实验性阶段。 + +### Btrfs 文件系统 ### + +btrfs 有很多不同的发音,例如 Better FS、Butter FS 或者 B-Tree FS。它是一个几乎完全从头开发的文件系统。btrfs 存在的原因是它的开发者期初希望扩展文件系统的功能使得它包括快照、池化、校验以及其它一些功能。虽然和 ext4 无关,它也希望能保留 ext4 中能使消费者和商家受益的功能,并整合额外的能使每个人,尤其是企业受益的功能。对于使用大型软件以及大规模数据库的企业,对于多种不同的硬盘看起来一致的文件系统能使他们受益并且使数据整合变得更加简单。删除重复数据能降低数据实际使用的空间,当需要镜像一个单一和广泛文件系统时使用 btrfs 也能使数据镜像变得简单。 + +用户当然可以继续选择创建多个分区从而无需镜像任何东西。考虑到这种情况,btrfs 能横跨多种硬盘,和 ext4 相比,它能支持 16 倍以上的驱动空间。btrfs 文件系统一个分区最大是 16 exbibytes,最大的文件大小也是 16 exbibytes。 + +### XFS 文件系统 ### + +XFS 文件系统是扩展文件系统(extent file system)的扩展。XFS 是 64 位高性能日志文件系统。对 XFS 的支持大概在 2002 年合并到了 Linux 内核,到了 2009 年,红帽企业版 Linux 5.4 也支持了 XFS 文件系统。对于 64 位文件系统,XFS 支持最大文件系统大小为 8 exbibytes。XFS 文件系统有一些缺陷,例如它不能压缩,删除大量文件时性能低下。目前RHEL 7.0 文件系统默认使用 XFS。 + +### 总后总结 ### + +不幸的是,还不知道 btrfs 什么时候能到来。官方说,下一代文件系统仍然被归类为“不稳定”,但是如果用户下载最新版本的 Ubuntu,就可以选择安装到 btrfs 分区上。什么时候 btrfs 会被归类到 “稳定” 仍然是个谜, 直到真的认为它“稳定”之前,用户也不应该期望 Ubuntu 会默认采用 btrfs。有报道说 Fedora 18 会用 btrfs 作为它的默认文件系统,因为到了发布它的时候,应该有了 btrfs 文件系统校验器。由于还没有实现所有的功能,另外和 ext4 相比性能上也比较缓慢,btrfs 还有很多的工作要做。 + +那么,究竟使用哪个更好呢?尽管性能几乎相同,但 ext4 还是赢家。为什么呢?答案在于易用性以及广泛性。对于桌面或者工作站, ext4 仍然是一个很好的文件系统。由于默认提供,用户可以在上面安装操作系统。同时, ext4 支持最大 1 exabytes 的卷和 16 terabytes 的文件,因此考虑到大小,它也还有很大的进步空间。 + +btrfs 能提供更大的高达 16 exabytes 的卷以及更好的容错,但是,到现在为止,它感觉更像是一个附加文件系统,而没有集成到 Linux 操作系统。比如,尽管 btrfs 支持不同的发行版,使用 btrfs 格式化硬盘之前先要有 btrfs-tools 工具,这意味着安装 Linux 操作系统的时候它并不是一个可选项,即便不同发行版之间会有差异。 + +尽管传输速率非常重要,评价一个文件系统出了文件传输速度之外还有很多因素。btrfs 有很多好用的功能,例如写复制、扩展校验、快照、清洗、自修复数据、冗余删除以及其它保证数据完整性的功能。和 ZFS 相比 btrfs 缺少 RAID-Z 功能,因此对于 btrfs, RAID 还处于实验性阶段。对于单纯的数据存储,和 ext4 相比 btrfs 似乎更加优秀,但时间会验证一切。 + +迄今为止,对于桌面系统而言,ext4 似乎是一个更好的选择,因为它是默认的文件系统,传输文件时也比 btrfs 更快。btrfs 当然值得尝试、但要在桌面 Linux 上完全取代 ext4 可能还需要一些时间。数据场和大存储池会揭示关于 ext4、XCF 以及 btrfs 不同的故事和差异。 + +如果你有不同或者其它的观点,在下面的评论框中告诉我们吧。 + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/review-ext4-vs-btrfs-vs-xfs/ + +作者:[M.el Khamlichi][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[Caroline](https://github.com/carolinewuyan) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/pirat9/ diff --git a/translated/talk/20101020 19 Years of KDE History--Step by Step.md b/translated/talk/20101020 19 Years of KDE History--Step by Step.md deleted file mode 100644 index ef90acd91f..0000000000 --- a/translated/talk/20101020 19 Years of KDE History--Step by Step.md +++ /dev/null @@ -1,209 +0,0 @@ -# 19年KDE进化历程 -注:youtube 视频 - - -## 概述 -KDE – 史上功能最强大的桌面环境之一; 开源且免费。19年前,1996年10月14日,德国程序员 Matthias Ettrich 开始了编写这个美观的桌面环境。KDE提供了诸如shell以及其他很多日常使用的程序。今日,KDE被成千上万人在 Unix 和 Windows 上使用。19年----一个对软件项目而言极为漫长的年岁。现在是时候让我们回到最初,看看这一切从哪里开始了。 - -K Desktop Environment(KDE)有很多创新之处:新设计,美观,连贯性,易于使用,对普通用户和专业用户都足够强大的应用库。"KDE"这个名字是对单词"通用桌面环境"(Common Desktop Environment)玩的一个简单谐音游戏,"K"----"Cool"。 第一代KDE在双证书授权下使用了有专利的 Trolltech's Qt 框架 (现Qt的前身),这两个许可证分别是 open source QPL(Q public license) 和 商业专利许可证(proprietary commercial license)。在2000年 Trolltech 让一部分 Qt 软件库开始发布在 GPL 证书下; Qt 4.5 发布在了 LGPL 2.1 许可证下。自2009起 KDE 桌面环境由三部分构成:Plasma Workspaces (作Shell),KDE 应用,作为 KDE Software 编译的 KDE Platform. - -## 各发布版本 -### Pre-Release – 1996年10月14日 -![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/0b3.png) - -当时名称为 Kool Desktop Environment;"Kool"这个单词在很快就被弃用了。最初,所有KDE的组件都是被单独发布在开发社区里的,他们之间没有任何环绕大项目的组装配合。开发组邮件列表中的第一封通信是发往kde@fiwi02.wiwi.uni-Tubingen.de 的邮件。 - -### KDE 1.0 – 1998年7月12日 -![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/10.png) - -这个版本受到了颇有争议的反馈。很多人反对使用Qt框架----当时的 FreeQt 许可证和自由软件许可证并不兼容----并建议开发组使用 Motif 或者 LessTif 替代。尽管有着这些反对声,KDE 仍然被很多用户所青睐,并且成功作为第一个Linux发行版的环境被集成了进去。(made its way into the first Linux distributions) - -![28 January 1999](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/11.png) - -1999年1月28日 - -一次升级,**K Desktop Environment 1.1**,更快,更稳定的同时加入了很多小升级。这个版本同时也加入了很多新的图标,背景,外观文理。和这些全面翻新同时出现的还有 Torsten Rahn 绘制的全新KDE图标----齿轮前的3个K字母;这个图标的修改版也一直沿用至今。 - -### KDE 2.0 – 2000年10月23日 -![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/20.png) - -重大更新:_ DCOP (Desktop COmmunication Protocol),一个端到端的通信协议 _ KIO,一个应用程序I/O库 _ KParts,组件对象模板 _ KHTML,一个符合 HTML 4.0 标准的图像绘制引擎。 - -![26 February 2001](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/21.png) - -2001年2月26日 - -**K Desktop Environment 2.1** 首次发布了媒体播放器 noatun,noatun使用了先进的模组-插件设计。为了便利开发者,K Desktop Environment 2.1 打包了 KDevelop - -![15 August 2001](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/22.png) - -2001年8月15日 - -**KDE 2.2**版本在GNU/Linux上加快了50%的应用启动速度,同时提高了稳定性和 HTML、JavaScript的解析性能,同时还增加了一些 KMail 的功能。 - -### KDE 3.0 – 2002年4月3日 -![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/30.png) - -K Desktop Environment 3.0 加入了更好的限制使用功能,这个功能在网咖,企业公用电脑上被广泛需求。 - -![28 January 2003](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/31.png) - -2003年1月28日 - -**K Desktop Environment 3.1** 加入了新的默认窗口(Keramik)和图标样式(Crystal)和其他一些改进。 - -![3 February 2004](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/32.png) - -2004年2月3日 - -**K Desktop Environment 3.2** 加入了诸如网页表格,书写邮件中拼写检查的新功能;补强了邮件和日历功能。完善了Konqueror 中的标签机制和对 Microsoft Windows 桌面共享协议的支持。 - -![19 August 2004](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/33.png) - -2004年8月19日 - -**K Desktop Environment 3.3** 侧重于组合不同的桌面组件。Kontact 被放进了群件应用Kolab 并与 Kpilot 结合。Konqueror 的加入让KDE有了更好的 IM 交流功能,比如支持发送文件,以及其他 IM 协议(如IRC)的支持。 - -![16 March 2005](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/34.png) - -2005年3月16日 - -**K Desktop Environment 3.4** 侧重于提高易用性。这次更新为Konqueror,Kate,KPDF加入了文字-语音转换功能;也在桌面系统中加入了独立的 KSayIt 文字-语音转换软件。 - -![29 November 2005](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/35.png) - -2005年11月29日 - -**The K Desktop Environment 3.5** 发布加入了 SuperKaramba,为桌面环境提供了易于安装的插件机制。 desktop. Konqueror 加入了广告屏蔽功能并成为了有史以来第二个通过Acid2 CSS 测试的浏览器。 - -### KDE SC 4.0 – 2008年1月11日 -![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/400.png) - -大部分开组投身于把最新的技术和开发框架整合进 KDE 4 当中。Plasma 和 Oxygen 是两次最大的用户界面风格变更。同时,Dolphin 替代 Konqueror 成为默认文件管理器,Okular 成为了默认文档浏览器。 - -![29 July 2008](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/401.png) - -2008年7月29日 - -**KDE 4.1** 引入了一个在 PIM 和 Kopete 中使用的表情主题系统;引入了可以让用户便利地从互联网上一键下载数据的DXS。同时引入了 GStreamer,QuickTime,和 DirectShow 9 Phonon 后台。加入了新应用如:_ Dragon Player _ Kontact _ Skanlite – 扫描仪软件,_ Step – 物理模拟软件 * 新游戏: Kdiamond,Kollision,KBreakout 和更多...... - -![27 January 2009](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/402.png) - -2009年1月27日 - -**KDE 4.2** 被认为是在已经极佳的 KDE 4.1 基础上的又一次全面超越,同时也成为了大多数用户替换旧 3.5 版本的完美选择。 - -![4 August 2009](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/403.png) - -2009年8月4日 - -**KDE 4.3** 修复了超过10,000个 bugs,同时加入了让近2,000个被用户需求的功能。整合一些新的技术例如:PolicyKit,NetworkManage & Geolocation services 等也是这个版本的一大重点。 - -![9 February 2010](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/404.png) - -2010年2月9日 - -**KDE SC 4.4** 基础 Qt 4 开框架的 4.6 版本,新的应用 KAddressBook 被加入,同时也是is based on version 4.6 of the Qt 4 toolkit. New application – KAddressBook,Kopete首次发布。 - -![10 August 2010](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/405.png) - -2010年8月10日 - -**KDE SC 4.5** 增加了一些新特性:整合了 WebKit 库----一个开源的浏览器引擎库,现在也被在 Apple Safari 和 Google Chrome 中广泛使用。KPackageKit 替换了 Kpackage。 - -![26 January 2011](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/406.png) - -2011年1月26日 - -**KDE SC 4.6** 加强了 OpenGl 的性能,同时照常更新了无数bug和小改进。 - -![27 July 2011](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/407.png) - -2011年7月27日 - -**KDE SC 4.7** 升级 KWin 以兼容 OpenGL ES 2.0 ,更新了 Qt Quick,Plasma Desktop 中在应用里普遍使用的新特性 1.2万个bug被修复。 - -![25 January 2012](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/408.png) - -2012年1月25日 - -**KDE SC 4.8**: 更好的 KWin 性能与 Wayland 支持,更新了 Doplhin 的外观设计。 - -![1 August 2012](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/409.png) - -2012年8月1日 - -**KDE SC 4.9**: 向 Dolphin 文件管理器增加了一些更新,比如加入了实时文件重命名,鼠标辅助按钮支持,更好的位置标签和更多文件分类管理功能。 - -![6 February 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/410.png) - -2013年2月6日 - -**KDE SC 4.10**: 很多 Plasma 插件使用 QML 重写; Nepomuk,Kontact 和 Okular 得到了很大程度的性能和功能提升。 - -![14 August 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/411.png) - -2013年8月14日 - -**KDE SC 4.11**: Kontact 和 Nepomuk 有了很大的优化。 第一代 Plasma Workspaces 进入了仅有维护而没有新生开发的软件周期。 - -![18 December 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/412.png) - -2013年12月18日 - -**KDE SC 4.12**: Kontact 得到了极大的提升。 - -![16 April 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/413.png) - -2014年4月16日 - -**KDE SC 4.13**: Nepomuk 语义搜索功能替代了桌面上的原有的Baloo搜索。 KDE SC 4.13 发布了53个语言版本。 - -![20 August 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/414.png) - -2014年8月20日 - -**KDE SC 4.14**: 这个发布版本侧重于稳定性提升:大量的bug修复和小更新。这是最后一个 KDE SC 4 发布版本。 - -### KDE Plasma 5.0 – 2014年7月15日 -![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/500.png) - -KDE Plasma 5 – 第五代 KDE。大幅改进了设计和系统,新的默认主题 ---- Breeze,完全迁移到了 QML,更好的 OpenGL 性能,更完美的 HiDPI (高分辨率)显示支持。 - -![11 November 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/501.png) - -2014年11月11日 - -**KDE Plasma 5.1**:加入了Plasma 4里原先没有补完的功能。 - -![27 January 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/502.png) - -2015年1月27日 - -**KDE Plasma 5.2**:新组件:BlueDevil,KSSHAskPass,Muon,SDDM 主题设置,KScreen,GTK+ 样式设置 和 KDecoration. - -![28 April 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/503.png) - -2015年4月28日 - -**KDE Plasma 5.3**:Plasma Media Center 技术预览。新的蓝牙和触摸板小程序;改良了电源管理。 - -![25 August 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/504.png) - -2015年8月25日 - -**KDE Plasma 5.4**:Wayland 登场,新的基于 QML 的音频管理程序,交替式全屏程序显示。 - -万分感谢 [KDE][1] 开发者和社区及Wikipedia 为书写 [概述][2] 带来的帮助,同时,感谢所有读者。希望大家保持自由精神(be free)并继续支持如同 KDE 一样的开源的自由软件发展。 - --------------------------------------------------------------------------------- - -via: [https://tlhp.cf/kde-history/](https://tlhp.cf/kde-history/) - -作者:[Pavlo RudyiCategories][a] 译者:[jerryling315](https://github.com/jerryling315) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]: https://www.kde.org/ -[2]: https://en.wikipedia.org/wiki/KDE_Plasma_5 -[a]: https://tlhp.cf/author/paul/ diff --git a/translated/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md b/translated/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md new file mode 100644 index 0000000000..614f10bb85 --- /dev/null +++ b/translated/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md @@ -0,0 +1,200 @@ + +一步一脚印:GNOME十八年进化史 +================================================================================ +注:youtube 视频 + + +[GNOME][1] (GNU Object Model Environment)由两位墨西哥的程序员Miguel de Icaza和Federico Mena 始创于1997年8月15日。GNOME自由软件的桌面环境和应用程序计划由志愿者和全职开发者来开发。所有的GNOME桌面环境都由开源软件组成,并且支持Linux, FreeBSD, OpenBSD 等操作系统。 + +现在就让我穿越到1997年来看看GNOME的第一个版本: + +### GNOME 1 ### + +![GNOME 1.0 - First major GNOME release](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/1.0/gnome.png) + +**GNOME 1.0** (1997) – GNOME 发布的第一个版本 + +![GNOME 1.2 Bongo](https://raw.githubusercontent.com/paulcarroty/Articles/master/GNOME_History/1.2/1361441938.or.86429.png) + +**GNOME 1.2** “Bongo”, 2000 + +![GNOME 1.4 Tranquility](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/1.4/1.png) + +**GNOME 1.4** “Tranquility”, 2001 + +### GNOME 2 ### + +![GNOME 2.0](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.0/1.png) + +**GNOME 2.0**, 2002 + +基于GTK+2的重大更新。引入了人机界面指南。 + +![GNOME 2.2](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.2/GNOME_2.2_catala.png) + +**GNOME 2.2**, 2003 + +改进了多媒体和文件管理器。 + +![GNOME 2.4 Temujin](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.4/gnome-desktop.png) + +**GNOME 2.4** “Temujin”, 2003 + +首次发布Epiphany浏览器,增添了辅助功能。 + +![GNOME 2.6](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.6/Adam_Hooper.png) + +**GNOME 2.6**, 2004 + +启用Nautilus空间文件管理工具同时引入了新的GTK+ (译注:跨平台图形用户界面工具包)对话框。这个转瞬即逝的版本变更被称做是GNOME的一个分支:GoneME。 + +![GNOME 2.8](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.8/3.png) + +**GNOME 2.8**, 2004 + +改良了对可移动设备的支持并新增了Evolution邮件应用。 + +![GNOME 2.10](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.10/GNOME-Screenshot-2.10-FC4.png) + +**GNOME 2.10**, 2005 + +减小内存需求,改进显示界面。增加网络控制、磁盘挂载和回收站组件以及Totem影片播放器和Sound Juicer CD抓取工具。 + +![GNOME 2.12](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.12/gnome-livecd.jpg) + +**GNOME 2.12**, 2005 + +改进了Nautilus以及跨平台剪切/粘贴功能的整合。 新增Evince PDF阅读器;新预设主题Clearlooks;新增菜单编辑器、管理员工具与环状管理器。基于支持Cairo的GTK+2.8。 + +![GNOME 2.14](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.14/debian4-stable.jpg) + +**GNOME 2.14**, 2006 + +改善显示效果;增强易用性;基于GStreamer 0.10多媒体框架。增加了Ekiga视频会议应用,Deskbar搜索工具,Pessulus权限管理器,和Sabayon系统管理员工具和快速切换用户功能。 + +![GNOME 2.16](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.16/Gnome-2.16-screenshot.png) + +**GNOME 2.16**, 2006 + +界面改良。增加了Tomboy笔记应用,Baobab磁盘用量分析应用,Orca屏幕朗读器以及GNOME 电源管理程序(以延长笔记本电池寿命);改进了Totem, Nautilus, 使用了新的图标主题。基于GTK+ 2.0 的全新显示对话框。 + +![GNOME 2.18](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.18/Gnome-2.18.1.png) + +**GNOME 2.18**, 2007 + +界面改良。增加了Seahorse GPG安全应用,可以对邮件和本地文件进行加密;Baobab增加了环状图表显示方式;改进了Orca,Evince, Epiphany, GNOME电源管理,音量控制;增加了两款新游戏:GNOME数独和国际象棋。支持MP3和AAC音频解码。 + +![GNOME 2.20](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.20/rnintroduction-screenshot.png) + +**GNOME 2.20**, 2007 + +发布十周年版本。Evolution增加了备份功能;改进了Epiphany,EOG,GNOME电源管理以及Seahorse中的Keyring密码管理方式;在Evince中可以编辑PDF文档;文件管理界面中整合了搜索模块;自动安装多媒体解码器。 + +![GNOME 2.22, 2008](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.22/GNOME-2-22-2-Released-2.png) + +**GNOME 2.22**, 2008 + +新增Cheese应用,它是一个可以截取网络摄像头和远程桌面图像的工具;Metacity支持基本的窗口叠加复合;引入GVFS(译注:GNOME Virtual file system,GNOME虚拟文件系统);改善了Totem播放DVD 和YouTube的效果,支持播放MythTV;在Evolution中新增了谷歌日历以及为信息添加标签的功能;改进了Evince, Tomboy, Sound Juicer和计算器。 + +![GNOME 2.24](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.24/gnome-224.jpg) + +**GNOME 2.24**, 2008 + +新增了Empathy即时通讯软件,Ekiga升级至3.0版本;Nautilus支持标签式浏览,更好的支持了多屏幕显示方式和数字电视功能。 + +![GNOME 2.26](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.26/gnome226-large_001.jpg) + +**GNOME 2.26**, 2009 + +新增光盘刻录应用Brasero;简化了文件分享的流程,改进了媒体播放器的性能;支持多显示器和指纹识别器。 + +![GNOME 2.28](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.28/1.png) + +**GNOME 2.28**, 2009 + +增加了GNOME 蓝牙模块;改进了Epiphany ,Empathy,时间追踪器和辅助功能。GTK+升级至2.18版本。 + +![GNOME 2.30](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.30/GNOME2.30.png) + +**GNOME 2.30**, 2010 + +改进了Nautilus,Empathy,Tomboy,Evince,Time Tracker,Epiphany和 Vinagre。借助基于libimobiledevice(译注:支持iOS®设备跨平台使用的工具协议库)的GVFS可以访问部分iPod 和iPod Touch。 + +![GNOME 2.32](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.32/gnome-2-32.png.en_GB.png) + +**GNOME 2.32**, 2010 + +新增Rygel 媒体分享工具和GNOME色彩管理器;改进了Empathy即时通讯客户端,Evince,Nautilus文件管理器等。计划于2010年9月发布3.0版本,因此大部分开发者的精力都由2.3x转移至了3.0版本。 + +### GNOME 3 ### + +![GNOME 3.0](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.0/chat-3-0.png) + +**GNOME 3.0**, 2011 + +引入GNOME Shell,一个重新设计的、具有更简练更集中的选项的框架。基于Mallard标记语言的话题导向型帮助。支持窗口并列堆叠。启用新的视觉主题和字体。采用GTK+3.0,具有更好的语言绑定,主题,触控以及多平台支持。去除了长期弃用的API。 + +![GNOME 3.2](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.2/gdm.png) + +**GNOME 3.2**, 2011 + +支持在线帐户,Web应用;新增通讯录应用和文档文件管理器;文件管理器支持快速预览;整合性能,更新文档以及对外观的一些小改进。 + +![GNOME 3.4](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.4/application-view.png) + +**GNOME 3.4**, 2012 + +全新的GNOME 3 应用程序外观:文件,Epiphany(更名为Web),GNOME 通讯录。可以在Activities Overview中搜索本地文件。支持应用菜单。焕然一新的界面元素:崭新的颜色拾取器,重新设计的滚动条,更易使用的旋转按钮以及可隐藏的标题栏。支持视角平滑。全新的动态壁纸。在系统设置中增添了对Wacom数位板的支持。更简便的扩展应用管理。更好的硬件支持。面向主题的文档。在Empathy中提供了对视频电话和动态信息的支持。更好的辅助功能:提升Orca整合度,增强高对比度模式适配性,以及全新的缩放设置。大量应用和细节的改进。 + +![GNOME 3.6](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.6/gnome-3-6.png) + +**GNOME 3.6**, 2012 + +全新设计的核心元素:新的应用按钮和改进的Activities Overview布局。新的登陆锁定界面。重新设计的通知栏。通知现在更智能,可见性更高,同时更容易操作。改进了系统设置的界面和设定逻辑。用户菜单默认显示关机操作。整合了输入法。辅助功能一直开启。新的应用:Boxes虚拟机,在GNOME 3.4中发布了预览版。Clocks时钟, 可以显示世界时间。升级了磁盘用量分析,Empathy和 Font Viewer的外观。改进了Orca对布莱叶盲文的支持。 在Web浏览器中, 用最常访问页面取代了之前的空白起始页,增添了更好的全屏模式并使用了WebKit2测试版引擎. Evolution 开始使用WebKit提交邮件。 改进了磁盘功能。 改进了文件管理应用即之前的Nautilus, 新增诸如最近访问的文件和搜索等功能。 + +![GNOME 3.8](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.8/applications-view.png) + +**GNOME 3.8**, 2013 + +令人耳目一新的核心组件:新应用界面可以分别显示常用应用及全部应用,窗口布局得到全面改造。新的屏幕即现式输入法开关。通知和信息现在会对屏幕边缘的点击作出回应。为那些喜欢传统桌面的用户提供了经典模式。重新设计了设置界面的工具栏。新的初始化引导流程。GNOME 在线帐户添加了对更多供应商的支持。浏览器正式启用WebKit2引擎。文档支持双页模式并且整合了Google 文档。通讯录的UI升级。GNOME Files,GNOME Boxes和GNOME Disks都得到了大幅改进。两款全新的GNOME核心应用:GNOME时钟和GNOME天气。 + +![GNOME 3.10](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.10/GNOME-3-10-Release-Schedule-2.png) + +**GNOME 3.10**, 2013 + +全新设计的系统状态界面,能够更直观的纵览全局。一系列新应用,包括GNOME Maps, GNOME Notes, GNOME Music 和GNOME Photos。新的基于位置的功能,如自动时区和世界时间。支持高分辨率及智能卡。 基于GLib 2.38提供了对D-Bus的支持。 + +![GNOME 3.12](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.12/app-folders.png) + +**GNOME 3.12**, 2014 + +改进了Overview中的键盘导航和窗口选择,基于易用性测试对初始设置进行了修改。有线网络重新回到了状态栏上,在应用预览中可以自定义应用文件夹。在大量应用的对话框中引入了新的GTK+小工具同时使用了新的GTK+标签风格。GNOME Videos,GNOME 终端以及Gedit都改用了全新外观,更贴合HIG(译注:Human Interface Guidelines,人机界面指南)。在GNOME Shell的终端仿真器中提供了搜索预测功能。增强了对GNOME软件和高密度显示屏的支持。提供了新的录音工具。增加了新的桌面通知接口。在Wayland中的进程被置于更易使用的位置并可以进行选择性预览。 + +![GNOME 3.14](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.14/Top-Features-of-GNOME-3-14-Gallery-459893-2.jpg) + +**GNOME 3.14**, 2014 + +更炫酷的桌面环境效果,改善了对触摸屏的支持。GNOME Software supports managing installed add-ons. 在GNOME Photos中可以访问Google相册。重绘了Evince,数独,扫雷和天气应用的用户界面,同时增加了一款叫做Hitori 的GNOME游戏。 + +![GNOME 3.16](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.16/preview-apps.png) + +**GNOME 3.16**, 2015 + +33,000处改变。主要修改了UI的配色方案。 增加了即现式滚动条。通知窗口中整合了日历应用。对文件管理器,图像查看器和地图等大量应用进行了微调。可以预览应用程序。进一步使用Wayland取代X11。 + +感谢GNOME Project及[Wikipedia][2]提供的变更日志!感谢阅读!(译注:原文此处为“敬请期待”。) + + +-------------------------------------------------------------------------------- + +via: https://tlhp.cf/18-years-of-gnome-evolution/ + +作者:[Pavlo Rudyi][a] +译者:[Haohong WANG](https://github.com/HaohongWANG) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://tlhp.cf/author/paul/ +[1]:https://www.gnome.org/ +[2]:https://en.wikipedia.org/wiki/GNOME diff --git a/translated/talk/20151125 20 Years of GIMP Evolution--Step by Step.md b/translated/talk/20151125 20 Years of GIMP Evolution--Step by Step.md new file mode 100644 index 0000000000..20acfc1ee8 --- /dev/null +++ b/translated/talk/20151125 20 Years of GIMP Evolution--Step by Step.md @@ -0,0 +1,169 @@ +GHLandy Translated + +GIMP 过去的 20 年:一点一滴的进步 +================================================================================ +注:youtube 视频 + + +[GIMP][1](GNU 图像处理程序)—— 一流的开源免费图像处理程序。加州大学伯克利分校的 Peter Mattis 和 Spencer Kimball 最早在 1995 年的时候就进行了该程序的开发。到了 1997 年,该程序成为了 [GNU Project][2] 官方的一部分,并正式更名为 GIMP。时至今日,GIMP 已经成为了最好的图像编辑器之一,并有最受欢迎的 “GIMP vs Photoshop” 之争。 + +1995 年 11 月 21 日,首版发布: + +> 发布者: Peter Mattis +> +> 发布主题: ANNOUNCE: The GIMP +> +> 日期: 1995-11-21 +> +> 消息ID: <48s543$r7b@agate.berkeley.edu> +> +> 新闻组: comp.os.linux.development.apps,comp.os.linux.misc,comp.windows.x.apps +> +> GIMP:通用图像处理程序 +> ------------------------------------------------ +> +> GIMP 是为各种图像编辑操作提供一个直观的图形界面而设计的。 +> +> 以下是 GIMP 的主要功能介绍: +> +> 图像查看 +> ------------- +> +> * 支持 8 位,15 位,16 位和 24 位颜色 +> * 8 位色显示的图像序列的稳定算法 +> * 以 RGB 色、灰度和索引色模式查看图像 +> * 同时编辑多个图像 +> * 实时缩放和全图查看 +> * 支持 GIF、JPEG、PNG、TIFF 和 XPM 格式 +> +> 图像编辑 +> ------------- +> +> * 选区工具:包括矩形、椭圆、自由、模糊、贝尔赛曲线以及智能 +> * 变换工具:包括旋转、缩放、剪切和翻转 +> * 绘画工具:包括油漆桶、笔刷、喷枪、克隆、卷积、混合和文本 +> * 效果滤镜:如模糊和边缘检测 +> * 通道和颜色操作:叠加、反相和分解 +> * 组件功能:允许你方便的添加新的文件格式和效果滤镜 +> * 多步撤销/重做功能 + +1996 年,GIMP 0.54 版 + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/054.png) + +GIMP 0.54 版需要具备 X11 显示、X-server 以及 Motif 1.2 微件,支持 8 位、15 位、16 位和 24 位的颜色深度和灰度,支持 GIF、JPEG、PNG、TIFF 和 XPM 图像格式。 + +基本功能:具备矩形、椭圆、自由、模糊、贝塞尔曲线和智能等选择工具,旋转、缩放、剪切、克隆、混合和翻转等变换工具。 + +扩展工具:文字添加、效果滤镜、通道和颜色操纵工具、撤销/重做功能。由于第一个版本支持组件扩展,才方便添加这些功能。 + +GIMP 0.54 版可以在 Linux、HP-UX、Solaris 和 SGI IRIX 中运行。 + +### 1997 年,GIMP 0.60 版 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/060.gif) + +这只是一个开发版本,并非面向用户发布的。GIMP 有了新的工具包——GDK(GIMP Drawing Kit,GIMP 绘图工具)和 GTK(GIMP Toolkit,GIMP 工具包),并弃用 Motif。GIMP 工具包随后也发展成为了 GTK+ 跨平台的微件工具包。新特性: + +- 基本的图层功能 +- 子像素采集 +- 笔刷间距 +- 改进剂喷枪功能 +- 绘制模式 + +### 1997 年,GIMP 0.99 版 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/099.png) + +从 0.99 版本开始,GIMP 有了宏脚本的支持。GTK 及 GTK 功能增强版正式更名为 GTK+。其他更新: + +- 支持大体积图像(大于 100M) +- 新增原生格式 – XCF +- 新的 API – 使得更加容易编写组件和扩展 + +### 1998 年,GIMP 1.0 版 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/100.gif) + +GIMP 和 GTK+ 开始分为两个不同的项目。GIMP 官网进行重构,包含新教程、组件和文档。新特性: + +- 基于瓦片式的内存管理 +- 组件 API 做了较大改变 +- XFC 格式现在支持图层、导航和选择 +- web 界面 +- 在线图像生成 + +### 2000 年,GIMP 1.2 版 ### + +新特性: + +- 进行了非英文语言翻译 +- 修复 GTK+ 和 GIMP 中的大量bug +- 增加大量组件 +- 图像映射 +- 新工具:调整大小、测量、加亮、燃烧效果、颜色吸管和翻转等。 +- 图像管道 +- 保存前可以进行图像预览 +- 按比例缩放的笔刷进行预览 +- 通过路径进行递归选择 +- 新的窗口导航 +- 支持图像拖拽 +- 支持水印 + +### 2004 年,GIMP 2.0 版 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/200.png) + +重大更新 – 更新 GTK+ 2.x toolkit. + +### 2004 年,GIMP 2.2 版 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/220.png) + +修复大量 Bug 并支持图像拖拽 + +### 2007 年,GIMP 2.4 版 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/240.png) + +新特性: + +- 更好的图像拖拽体验 +- 使用新的脚本解释器 Script-Fu 替代了 旧的 Ti-Fu +- 新组件:影印效果、光晕效果、霓虹灯效果、卡通效果、小狗笔刷、水珠笔刷以及其他组件 + +### 2008 年,GIMP 2.6 版 ### + +新特性: + +- 更新了图形界面 +- 新的选择工具 +- 继承了 GEGL (GEneric Graphics Library,通用图形库) +- 为 MDI 行为实现了实用程序窗口提示 + +### 2012 年,GIMP 2.8 版 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/280.png) + +新特性: + +- GUI 在视觉上做了一些改变 +- 新的保存和导出菜单 +- 更新文本框工具 +- 支持图层群组 +- 支持 JPEG2000 和导出为 pdf +- 网页截图工具 + +-------------------------------------------------------------------------------- + +via: https://tlhp.cf/20-years-of-gimp-evolution/ + +作者:[Pavlo Rudyi][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://tlhp.cf/author/paul/ +[1]:https://gimp.org/ +[2]:http://www.gnu.org/ diff --git a/translated/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md b/translated/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md new file mode 100644 index 0000000000..d16ed99114 --- /dev/null +++ b/translated/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md @@ -0,0 +1,77 @@ +微软和 Linux :真正的浪漫还是有毒的爱情? +================================================================================ +时不时的我们会读到一个能让你喝咖啡呛到或者把热拿铁喷到你显示器上的新闻故事。微软最近宣布的对 Linux 的钟爱就是这样一个鲜明的例子。 + +从常识来讲,微软和自由开源软件(FOSS)运动就是恒久的敌人。在很多人眼里,微软体现了过分的贪婪,而这正为自由开源软件运动(FOSS)所拒绝。另外,之前微软就已经给自由开源软件社区贴上了"一伙强盗"的标签。 + +我们能够理解为什么微软一直以来都害怕免费的操作系统。免费操作系统结合挑战微软核心产品线的开源应用时,就威胁到了微软在台式机和笔记本电脑市场的控制地位。 + +尽管微软有对在台式机主导地位的担忧,在网络服务器市场 Linux 却有着最高的影响力。今天,大多数的服务器都是 Linux 系统。包括世界上最繁忙的站点服务器。对微软来说,看到这么多没有被声明的许可证收入一定是非常痛苦的。 + +掌上设备是微软输给免费软件的另一个领域。曾几何时,微软的 Windows CE 和 Pocket PC 操作系统走在移动计算的前沿。Windows PDA 设备是最闪亮的和豪华的产品。但是这一切在苹果公司发布了iphone之后都结束了。从那时起,安卓已经开始进入公众视野,Windows的移动产品开始被忽略被遗忘。而安卓平台是建立在免费开源的组件的基础上的。 + +由于安卓平台的开放性,安卓的市场份额在迅速扩大。不像 IOS,任何一个手机制造商都可以发布安卓手机。也不像Windows手机,安卓没有许可费用。这对消费者来说是件好事。这也导致了许多强大却又价格低廉的手机制造商在世界各地涌现。这非常明确的证明了自由开源软件(FOSS)的价值。 + +在服务器和移动计算的角逐中失利对微软来说是非常惨重的损失。考虑一下服务器和移动计算这两个加起来所占有的市场大小,台式机市场似乎是死水一潭。没有人喜欢失败,尤其是涉及到金钱。并且,微软确实有许多正在慢慢失去。你可能期望着微软自尝苦果。在过去,确实如此。 + +微软使用了各种可以支配的手段来对 Linux 和自由开源软件(FOSS)进行反击,从宣传到专利威胁。尽管这种攻击确实减慢了适配 Linux 的步伐,但却从来没有让 Linux 的脚步停下。 + +所以,当微软在开源大会和重大事件上拿出印有"Microsoft Loves Linux"的T-恤和徽章时,请原谅我们表现出来的震惊。这是真的吗?微软真的爱 Linux ? + +当然,公关的口号和免费的T-恤并不代表真理。行动胜于雄辩。当你思考一下微软的行动时,微软的立场就变得有点模棱两可了。 + +一方面,微软招募了几百名 Linux 开发者和系统管理员。将 .NET 核心框架作为一个开源的项目进行了发布,并提供了跨平台的支持(这样 .NET 就可以跑在 OS X 和 Linux 上了)。并且,微软与 Linux 公司合作把最流行的发型版本放到了Azure平台上。事实上,微软已经走的如此之远以至于要为Azure数据中心开发自己的Linux发行版了。 + +另一方面,微软继续直接通过法律或者傀儡公司来对开源项目进行攻击。很明显,微软在与自由软件的所有权较量上并没有发自内心的进行大的道德转变。那为什么要公开生命对Linux的钟爱之情呢? + +一个显而易见的事实:微软是一个经营性实体。对股东来说是一个投资工具,对雇员来说是收入来源。微软所做的只有一个终极目标:盈利。微软并没有表现出来爱或者恨(尽管这是一个最常见的指控)。 + +所以问题不应该是"微软真的爱 Linux 吗?"相反,我们应该问,微软是怎么从这一切中获利的。 + +让我们以 .NET 核心框架的开源发行为例。这一举动使得任何平台都很容易进入 .NET 的运行时环境。这使得微软的.NET框架所涉及到的范围远远大于Windows平台。 + +开放 .NET 的核心包,最终使得 .NET 开发者开发跨平台的app成为可能,比如OS X,Linux甚至安卓——都基于同一个核心代码库。 + +从开发者角度来讲,这使得.NET框架比之前更有吸引力了。能够从单一的代码库就可以触及到多个平台,使得使用.NET框架开发的任何app戏剧性的扩大了潜在的目标市场。 + +另外,一个强大的开源社区能够提供给开发者一些代码来在他们自己的项目中进行服用。所以,开源项目的可利用性也将会成就.NET框架。 + +更进一步讲,开放 .NET 的核心代码能够减少跨越不同平台锁产生的碎片,意味着对消费者来说有对app更广的选择。无论是开源软件还是专用的app,都有更多的选择。 + +从微软的角度来讲,会得到一队开发者大军。微软可以通过销售培训、证书、技术支持、开发者工具(包括Visual Studio)和应用扩展来获利。 + +我们应该自问的是,这对自由软件社区有利还是有弊? + +.NET 框架的大范围适用意味着许多参与竞争的开源项目的消亡,迫使我们会跟着微软的节奏走下去。 + +先抛开.NET不谈,微软正在花费大量的精力在Linux对Azure云计算平台的支持上。要记得,Azure最初是Windows的Azure。Windows服务器是唯一能够支持Azure的操作系统。今天,Azure也提供了对多个Linux发行版的支持。 + +关于此,有一个原因:付费给需要或者想要Linux服务的顾客。如果微软不提供Linux虚拟机,那些顾客就会跟别人合作了。 + +看上去好像是微软意识到"Linux就在这里"的这样一个现实。微软不能真正的消灭它,所以必须接收它。 + +这又把我们带回到那个问题:关于微软和Linux为什么有这么多的流言?我们在谈论这个问题,因为微软希望我们思考这个问题。毕竟,所有这些谈资都会追溯到微软,不管是在新闻稿、博客还是会议上的公开声明。微软在努力吸引大家对其在Linux专业知识方面的注意力。 + +首席架构师 Kamala Subramaniam 的博文声明Azure Cloud Switch背后的其他企图会是什么?ACS是一个定制的Linux发行版。微软用它来对Azure数据中心的开关硬件进行自动配置。 + +ACS不是公开的。它是用于Azure内部使用的。别人也不太可能找到这个发行版其他的用途。事实上,Subramaniam 在她的博文中也表述了同样的观点。 + +所以,微软不会通过卖ACS来获利,也不会因为放弃使用而获得一个用户基础。相反,微软在Linux和Azure上花费经历,加强其在Linux云计算平台方面的地位。 + +微软最近迷上Linux对社区来说是好消息吗? + +我们不应该慢慢忘记微软的"拥抱、扩展、消灭"的诅咒。现在,微软处在拥抱Linux的初期阶段。微软会通过定制扩展和专有标准来分裂社区吗? + +赶紧评论吧,让我们知道你是怎么想的。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxjournal.com/content/microsoft-and-linux-true-romance-or-toxic-love-0 + +作者:[James Darvell][a] +译者:[sonofelice](https://github.com/sonofelice) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxjournal.com/users/james-darvell \ No newline at end of file diff --git a/translated/talk/20151202 KDE vs GNOME vs XFCE Desktop.md b/translated/talk/20151202 KDE vs GNOME vs XFCE Desktop.md new file mode 100644 index 0000000000..bdbaf2cdbd --- /dev/null +++ b/translated/talk/20151202 KDE vs GNOME vs XFCE Desktop.md @@ -0,0 +1,47 @@ +translating by kylepeng93 +KDE,GNOME和XFCE的较量 +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2013/07/300px-Xfce_logo.svg_.png) +这么多年来,很多人一直都在他们的linux桌面端使用KDE或者GNOME桌面环境。这两个桌面环境经过多年的发展之后仍然在继续增加他们的用户基数。然而,在轻量级桌面环境下,XFCE一举成为了最受欢迎的桌面环境,相较于LXDE缺少的优美视觉效果,默认配置下的XFCE就可以在这方面打败前者。XFCE提供了用户能在GNOME2下使用的所有功能特性。但是,必须承认,在一些太老的计算机上,它的轻量级的特性并不能得到很好的效果。 + +### 桌面主题定制 ### +用户完成安装之后,XFCE看起来可能会有一点无聊,因为它在视觉上还缺少一些吸引力。但是,请不要误解我的话,XFCE仍然拥有漂亮的桌面,可能看起来像是用户眼中的香草,正如大多数刚刚接触XFCE桌面环境的人。好消息是当我们给XFCE安装新的主题的时候,这会是一个十分容易的过程,因为你能够快速的找到你喜欢的XFCE主题,之后,你可以将它解压到一个合适的目录中。从这一点上来说,XFCE自带的一个重要的图形界面工具可以帮助用户更加容易的选中你已经选好的主题,这可能是目前在XFCE上最好用的工具了。如果用户按照上面的指示去做的话,对于任何想要尝试使用XFCE的用户来说将不存在任何困难。 + +在GNOME桌面上,用户也可以按照上面的方法去做。不过,其中最主要的不同点就是用户必须手动下载并安装GNOME Tweak Tool,这样才能继续你想做的事。当然,对于使用任何一种方式都不会有什么障碍,但是对于用户来说,使用XFCE安装和激活主题并不需要去额外的下载并安装任何tweak tool可能是他们无法忽略的一个优势。而在GNOME上,尤其是在用户已经下载并安装了GNOME Tweak tool之后,你仍将必须确保你已经安装了用户主题拓展。 + +在XFCE一样,用户将会去搜索并下载自己喜欢的主题,然后,用户可以重新使用GNOME Tweak tool,并点击该工具界面左边的Appearance按钮,接着用户便可以简单的通过点击相应的按钮并选择自己已经下载好的主题来使用自己的主题,当一切都完成之后,用户将会看到一个告诉用户已经成功应用了主题的对话框,这样,你的主题便已经安装完成。对于这一点,用户可以简单的使用滚动条来选择他们想要的主题。和XFCE一样,主题激活的过程也是十分简单的,然而,对于因为要使用一个新的主题而下载一个不被包含的应用的需求也是需要考虑的。 + +最后,就是KDE桌面主题定制的过程了。和XFCE一样,不需要去下载额外的工具来安装主题。从这点来看,让人有种XFCE必将使KDE成为最后的赢家的感觉。不仅在KDE上可以完全使用图形用户界面来安装主题,而且甚至只需要用户点击获取新主题的按钮就可以定位,查看,并且最后自动安装新的主题。 + +然而,我们不应该认为KDE相比XFCE是一个更加稳定的桌面环境。因此,现在正是我们思考为什么一些额外的功能可能会从桌面环境中移除来达到最小化的目的。为此,我们都必须为拥有这样出色的功能而给予KDE更多的支持。 + +### MATE不是一个轻量级的桌面环境 ### +在继续比较XFCE,GNOME3和KDE之前,必须对这方面的老手作一个事先说明,我们不会将MATE桌面环境加入到我们的比较中。MATE可被认为是GNOME2的另一个衍生品,但是它并没有声称是作为一款轻量级或者快捷桌面。相反,它的主要目的是成为一款更加传统和舒适的桌面环境,并使它的用户感觉就像在家里使用它一样。 + +另一方面,XFCE生来就是要实现他自己的一系列使命。XFCE给它的用户提供一个更加轻量级的桌面环境,至今仍然有着吸引人的桌面视觉体验。然后,对于一些认为MATE也是一款轻量级的桌面环境的人来说,其实MATE真正的目标并不是成为一款轻量级的桌面环境。这两个选择在各自安装了一款好的主题之后看起来都会让人觉得非常具有吸引力。 + +### 桌面导航 ### +XFCE在窗口之外提供了一个显眼的导航器。任何使用过传统的windows或者GNOME 2/MATE桌面环境的用户都可以在没有任何帮助的情况下自如的使用新安装的XFCE桌面环境的导航器。紧接着,添加小程序到面板中也是很明显的。和找到已经安装的应用程序一样,直接使用启动器并点击你想要运行的应用程序图标。除了LXDE和MATE之外,还没有其他的桌面的导航器可以做到如此简单。不仅如此,更加简单的是对控制面板的使用,对于刚刚使用这个新桌面的每个用户来说这是一个非常大的好处。如果用户更喜欢通过老式的方法去使用他们的桌面,对于GNOME来说,这不是一个问题。和没有最小化按钮形成的用户关注热点一样,加上其他应用布局方法,这将使新用户更加容易习惯这个风格设计。 + +如果用户来自windows桌面环境,那么这些用户将要放弃这些习惯,因为,他们将不能简单的通过鼠标右击一下就可以将一个小程序添加到他们的工作空间的顶部。与此相反,它可以通过使用拓展来实现。GNOME中的KDE拓展是可用的,并且是非常的容易,这些容易之处体现在只需要用户简单的使用位于GNOME拓展页面上的on/off开关。用户必须清楚,只能通过访问该页面才能使用这个功能。 + +另一方面,GNOME正在它的外观中体现它的设计理念,即为用户提供一个直观和易用的控制面板。你可能认为那并不是什么大事,但是,在我看来,它确实是我认为值得称赞并且有必要被提及的方面。KDE提供给它的用户大量传统的桌面使用体验,并通过提供相似的启动器和一种更加类似的获取软件的方式的能力来迎合来自windows的用户。添加小图标或者小程序到KDE桌面是件非常简单的事情,只需要在桌面的底部右击即可。只有在KDE的使用中才会存在的的问题,对于KDE用户寻找的很多KDE的特性实际上都是隐藏的。KDE的用户可能会指责这我的观点,但我仍然坚持我的说法。 + +为了增加小部件,仅仅在我的面板上右击就可以看见面板选项,但是并不是安装小部件的一个快速的方法。通常在你选择面板选项之前你都不会看到添加的小部件,然后,就添加小部件吧。这对我来说不是个问题,但是后来对于一些用户来说,它变成了不必要的困惑。而使事情变得更加复杂,用户管理定位部件区域后,他们后来发现一种称为“Activities”的品牌新术语。在同一地区的小部件,但它是在自己的领域是什么。 + +现在请不要误解我,KDE中的活动特性是很不错的,也是很有价值的,但是从可用性的角度看,为了不让新手感到困惑,它更加适合于应用在另一个目录选项。欢迎来自用户的分歧,,但为了测试这个新手对一些长时间的可以一遍又一遍的证明它是正确的。责骂放在一边,KDE添加新部件的方法的确很棒。与KDE的主题一样,用户不能通过使用提供的图形用户界面浏览和自动安装部件。这是一个神奇的功能,也可以是这样的方式去庆祝。KDE的控制面板可能和用户希望的样子不一样,它不是足够的简单。但是有一点很清楚,这将是他们致力于改进的地方。 + +### 因此,XFCE是最好的桌面环境,对吗? ### +我在我的计算机上使用GNOME,KDE,并在我的办公室和家里的电脑上使用Xfce。我也有一些老机器在使用Openbox和LXDE。每一个使用桌面的经验都可以给我提供一些有用的东西,可以帮助我使用每台机器,因为我认为它是合适的。对我来说,在我的心里有一个柔软的地方,因为Xfce作为一个桌面环境,我坚持使用了很多年。但在这篇文章中,我只是在写我使用电脑的日常,事实上,它是GNOME。 +这篇文章的主要思想是我还是觉得Xfce能提供好一点的用户体验,对于那些正在寻找稳定的、传统的、容易理解的桌面环境的用户来说,XFCE是理想的。欢迎您在评论部分和我们分享你的意见。 +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/kde-vs-gnome-vs-xfce-desktop/ + +作者:[M.el Khamlichi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/pirat9/ diff --git a/translated/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md b/translated/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md new file mode 100644 index 0000000000..5d81ed9cdf --- /dev/null +++ b/translated/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md @@ -0,0 +1,95 @@ +GHLandy Translated + +使用 ownCloud 的六个创意方法 +================================================================================ +![Yearbook cover 2015](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/osdc-open-source-yearbook-lead1-inc0335020sw-201511-01.png) + +图片来源:Opensource.com + +[ownCloud][1] 是一个自我托管且开源的文件同步和共享服务上。就像 "big boys" Dropbox、Google Drive、Box 和其他的同类服务一样,ownCloud 可以让你访问自己的文件、日历、联系人和其他数据。你可以在自己设备之间进行任意数据(包括它自身的一部分)同步以及给其他人分享文件。然而,ownCloud 并非只能运行在它自己的开发商之中,试试[将 ownCloud 运行在其他服务器上][2] + +现在,一起来看看在 ownCloud 上的六件创意事件。其中一些是由于 ownCloud 的开源才得以完成,而另外的则是 ownCloud 自身特有的功能。 + +### 1. 可扩展的 ownCloud 派集群 ### + +由于 ownCloud 是开源的,你可以选择将它运行在自己的服务器中,或者从你信任的服务器提供商那里获取空间——没必要将你的文件存储在大公司的服务器中,谁知他们将你的文件存储到哪里去。[点击此处查看部分 ownCloud 服务商][3],或者下载该服务软件到你的虚拟主机中[搭建自己的服务器][4]. + +![](https://opensource.com/sites/default/files/images/life-uploads/banana-pi-owncloud-cluster.jpg) + +拍摄: Jörn Friedrich Dreyer. [CC BY-SA 4.0.][5] + +我们见过最具创意的事情就是组建 [香蕉派集群][6] 和 [树莓派集群][7]。ownCloud 的扩展性通常是成千上万的用户来完成的,这些人则将它往不同方向发展,通过大量的小型系统集群在一起,就可以创建出运行速度非常快的 ownCloud。酷毙了! + +### 2. 密码同步 ### + +为了让 ownCloud 更容易扩展,我们需要将它模块化,并拥有 [ownCloud app store][8]。然后你就可以在里边搜索音乐、视频播放器、日历、联系人、生产应用、游戏、应用框架等。 + +仅从 200 多个可用应用中挑选一个是一件非常困难的事,但密码管理则是一个很好的特性。ownCloud app store 里边至少有三款这种应用:[Passwords][9]、[Secure Container][10] 和 [Passman][11]。 + +![](https://opensource.com/sites/default/files/images/life-uploads/password.png) + +### 3. 随心所欲地存储文件 ### + +外部存储允许你通过接口将现有数据联系到 ownCloud,让你轻松访问存储在FTP、WebDAV、Amazon S3,甚至 Dropbox 和Google Drive。 + +注:youtube 视频 + + +DropBox 喜欢创建自己的 “围墙式花园”,只有注册用户之间才可以进行协作;假如你通过Google Drive 来分享文件,你的同伴也必须要有一个 Google 账号才可以访问的分享。通过 ownCloud 的外部存储功能,你可以轻松打破这些规则障碍。 + +最有创意的就是把 Google Drive 和 Dropbox 添加为外部存储。这样你就可以无缝的使用它们,并使用不需要账户地链接把文件分享给和你协作的人。 + +### 4. 下载以上传的文件 ### + +由于 ownCloud 的开源,人们可以不受公司需求限制地向它共享代码,增加新特性。共献者关注的往往是安全和隐私,所以 ownCloud 引入的特性常常比别人的要早,比如通过密码保护的公共链接和[设置失效期限][12]。 + +现在,ownCloud 可以配置分享链接的读写权限了,这就是说链接的访问者可以无缝的编辑你分享给他们的文件(不管是否有密码保护),或者在不提供他们的私人数据来登录其他服务的情况下将文件上传到服务器。 + +注:youtube 视频 + + +对于有人想给你分享大体积的文件时,这个特性就非常有用了。相比于上传到第三方站点、然后给你发送一个连接、你再去下载文件(通常需要登录),ownCloud 仅需要上传文件到你提供的分享文件夹、你就可以买上获取到文件了。 + +### 5. 免费却又安全的存储空间 ### + +之前就强调过,我们的代码贡献者最关注的就是安全和隐私,这就是 ownCloud 中有用于加密和解密存储数据的应用的原因。 + +通过使用 ownCloud 将你的文件存储到 Dropbox 或者 Google Drive,则会违背控制数据以及保持数据隐私的原则。但是加密应用则刚好可以满足安全及隐私问题。在发送数据给这些提供商前进行数据加密,并在取回数据的时候进行解密,你的数据就会变得很安全。 + +### 6. 在你的可控范围内分享文件 ### + +作为开源项目,ownCloud 没有必要自建 “围墙式花园”。进入联邦云共享:[developed and published by ownCloud][13] 协议使不同的文件同步和共享服务器可以彼此之间进行通信,并能够安全地传输文件。联邦云共享本身有一个有趣的故事:[22 所德国大学][14] 想要为自身的 500,000 学生建立一个庞大的云服务,但是每个大学都想控制自己学生数据。于是乎,我们需要一个可行性解决方案:也就是联邦云服务。该解决方案让让学生保持连接,使得他们可以无缝的协同工作。同时,每个大学的系统管理员保持着对自己学生创建的文件的控制权,如限制存储或者限制什么人、什么文件以及如何共享。 + +注:youtube 视频 + + +并且,这项令人崇敬的技术并没有限制于德国的大学之间,而是每个 ownCloud 用户都能在自己的用户设置中找到自己的 [联邦云 ID][15],并将之分享给同伴。 + +现在你明白了吧。仅六个方法,ownCloud 就能让人们完成特殊和特别的事。而是这一切成为可能的,就是 ownCloud 的开源 —— 设计用来释放你数据。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/15/12/6-creative-ways-use-owncloud + +作者:[Jos Poortvliet][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jospoortvliet +[1]:https://owncloud.com/ +[2]:https://blogs.fsfe.org/mk/new-stickers-and-leaflets-no-cloud-and-e-mail-self-defense/ +[3]:https://owncloud.org/providers +[4]:https://owncloud.org/install/#instructions-server +[5]:https://creativecommons.org/licenses/by-sa/4.0/ +[6]:http://www.owncluster.de/ +[7]:https://christopherjcoleman.wordpress.com/2013/01/05/host-your-owncloud-on-a-raspberry-pi-cluster/ +[8]:https://apps.owncloud.com/ +[9]:https://apps.owncloud.com/content/show.php/Passwords?content=170480 +[10]:https://apps.owncloud.com/content/show.php/Secure+Container?content=167268 +[11]:https://apps.owncloud.com/content/show.php/Passman?content=166285 +[12]:https://owncloud.com/owncloud45-community/ +[13]:http://karlitschek.de/2015/08/announcing-the-draft-federated-cloud-sharing-api/ +[14]:https://owncloud.com/customer/sciebo/ +[15]:https://owncloud.org/federation/ diff --git a/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md b/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md deleted file mode 100644 index 5dcea06611..0000000000 --- a/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md +++ /dev/null @@ -1,164 +0,0 @@ -debian linux上安装配置 ISC DHCP Server -================================================================================ -动态主机控制协议(DHCP)给网络管理员提供一种便捷的方式,为不断变化的网络主机或是动态网络提供网络层地址。其中最常用的DHCP服务工具是 ISC DHCP Server。DHCP服务的目的是给主机提供必要的网络信息以便能够和其他连接在网络中的主机互相通信。DHCP服务一般包括以下信息:DNS服务器信息,网络地址(IP),子网掩码,默认网关信息,主机名等等。 - -本教程介绍4.2.4版的ISC-DHCP-Server如何在Debian7.7上管理多个虚拟局域网(VLAN),它也可以非常容易的配置的用于单一网络。 - -测试用的网络是通过思科路由器使用传统的方式来管理DHCP租约地址的,目前有12个VLANs需要通过路由器的集中式服务器来管理。把DHCP的任务转移到一个专用的服务器上面,路由器可以收回相应的资源,把资源用到更重要的任务上,比如路由寻址,访问控制列表,流量监测以及网络地址转换等。 - -另一个将DHCP服务转移到专用服务器的好处,以后会讲到,它可以建立动态域名服务器(DDNS)这样当主机从服务器请求DHCP地址的时候,新主机的主机名将被添加到DNS系统里面。 - -### 安装和配置ISC DHCP Server### - -1. 使用apt工具用来安装Debian软件仓库中的ISC软件,来创建这个多宿主服务器。与其他教程一样需要使用root或者sudo访问权限。请适当的修改,以便使用下面的命令。(译者注:下面中括号里面是注释,使用的时候请删除,#表示使用的root权限) - - - # apt-get install isc-dhcp-server [安装 the ISC DHCP Server 软件] - # dpkg --get-selections isc-dhcp-server [确认软件已经成功安装] - # dpkg -s isc-dhcp-server [用另一种方式确认成功安装] - -![Install ISC DHCP Server in Debian](http://www.tecmint.com/wp-content/uploads/2015/04/Install-ISC-DHCP-Server.jpg) - -2. 确认服务软件已经安装完成,现在需要一些网络的需求来配置服务器,这样服务器才能够根据我们的需要来分发网络信息。作为管理员最起码需要了解的DHCP信息如下: -- 网络地址 -- 子网掩码 -- 动态分配的地址范围 - -其他一些服务器动态分配的有用信息包括: -- 默认网关 -- DNS服务器IP地址 -- 域名 -- 主机名 -- 网络广播地址 - - -这只是能让ISC DHCP server处理的选项中非常少的一部分。如果你想查看所有选项及其描述需要在安装好软件后输入以下命令: - # man dhcpd.conf - -3. 一旦管理员已经确定了这台服务器需要分发的需求信息,那么是时候配置服务器并且分配必要的地址池了。在配置任何地址池或服务器配置之前,DHCP服务必须配置好,来侦听这台服务器上面的一个接口。 - -在这台特定的服务器上,设置好网卡后,DHCP会侦听名称名为`'bond0'`的接口。请适根据你的实际情况来更改服务器以及网络环境。下面的配置都是针对本教程的。 - -![Configure ISC DHCP Network](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ISC-DHCP-Network.jpg) - -这行指定的是DHCP服务侦听接口(一个或多个)上的DHCP流量。修改主要的配置文件分配适合的DHCP地址池到所需要的网络上。配置文件所在置/etc/dhcp/dhcpd.conf。用文本编辑器打开这个文件 - # nano /etc/dhcp/dhcpd.conf - -这个配置文件可以配置我们所需要的地址池/主机。文件顶部有‘ddns-update-style‘这样一句,在本教程中它设置为‘none‘。在以后的教程中动态DNS,ISC-DHCP-Server 将被整合到 BIND9,它能够使主机名更新到IP地址。 - -4. 接下来的部分是管理员配置全局网络设置,如DNS域名,默认的租约时间,IP地址,子网的掩码,以及更多的区域。如果你想了解所有的选项,请阅读man手册中的dhcpd.conf文件,命令如下: - - # man dhcpd.conf - - -对于这台服务器,我们需要在顶部配置一些全局网络设置,这样就不用到每个地址池中去单独设置了。 - -![Configure ISC DDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ISC-DDNS.png) - - -我们花一点时间来解释一下这些选项,在本教程中虽然它们是一些全局设置,但是也可以为单独的为某一个地址池进行配置。 - -- option domain-name “comptech.local”; – 所有使用这台DHCP服务器的主机,都将成为DNS域名为“comptech.local”的一员 - -- option domain-name-servers 172.27.10.6; DHCP向所有配置这台DHCP服务器的的网络主机分发DNS服务器地址为172.27.10.6 - -- option subnet-mask 255.255.255.0; – 分派子网掩码到每一个网络设备 255.255.255.0 或a /24 - -- default-lease-time 3600; – 默认有效的地址租约时间(单位是秒)。如果租约时间耗尽,那么主机可以重新申请租约。如果租约完成,那么相应的地址也将被尽快回收。 - -- max-lease-time 86400; – 这是一台主机最大的租约时间(单位为秒)。 - -- ping-check true; – 这是一个额外的测试,以确保服务器分发出的网络地址不是当前网络中另一台主机已使用的网络地址。 - -- ping-timeout; – 如果地址以前没有使用过,可以用这个选项来检测2个ping返回值之间的时间长度。 - -- ignore client-updates; 现在这个选项是可以忽略的,因为DDNS在前面已在配置文件中已经被禁用,但是当DDNS运行时,这个选项会忽略更新其DNS主机名的请求。 - -5. 文件中下面一行是权威DHCP所在行。这行的意义是如果服务器是为文件中所配置的网络分发地址的服务器,那么取消注释权威字节(authoritative stanza)来实现。 - -通过去掉关键字authoritative 前面的‘#’,取消注释全局权威字节。这台服务器将是它所管理网络里面的唯一权威。 - -![Enable ISC Authoritative](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-authoritative.png) -开启 ISC Authoritative - -默认情况下服务器被假定为不是网络上的权威。之所以这样做是出于安全考虑。如果有人因为不了解DHCP服务的配置,导致配置不当或配置到一个不该出现的网络里面,这都将带来非常严重的重连接问题。这行还可用在每个网络中单独配置使用。也就是说如果这台服务器不是整个网络的DHCP服务器,authoritative行可以用在每个单独的网络中,而不是像上面截图中那样的全局配置。 - -6. 这一步是配置服务器将要管理的所有DHCP地址池/网络。简短起见,本教程只配置了地址池。作为管理员需要收集一些必要的网络信息(比如域名,网络地址,有多少地址能够被分发等等) - -以下这个地址池所用到的信息都是管理员收集整理的:网络id 172.27.60.0, 子网掩码 255.255.255.0 or a /24, 默认子网网关172.27.60.1,广播地址 172.27.60.255.0 - -以上这些信息用于构建hcpd.conf文件中新的网络非常重要。使用文本编辑器修改配置文件添加新的网络进去,这里我们需要使用root或sudo访问权限。网络非常重要。使用文本编辑器修改配置文件添加新的网络进去,这里我们需要使用root或sudo访问权限。 - - # nano /etc/dhcp/dhcpd.conf - -![Configure DHCP Pools and Networks](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-network.png) -配置DHCP的地址池和网络 - -当前这个例子是给用VMWare创建的虚拟服务器分配IP地址。第一行显示是该网络的子网掩码。括号里面的内容是DHCP服务器应该提供给网络上面主机的所有选项。 - -第一节, range 172.27.60.50 172.27.60.254;这一行显示的是,DHCP服务在这个网络上能够给主机动态分发的地址范围。 - -第二节,option routers 172.27.60.1;这里显示的是网络里面所有的主机分发默认网关地址。 - -最后一节, option broadcast-address 172.27.60.255;,显示当前网络的广播地址。这个地址不能被包含在要分发放的地址范围内,因为广播地址不能分配到一个主机上面。 - -必须要强调的是每行的结尾必须要用(;)来结束,所有创建的网络必须要在{}里面。 - -7. 如果是创建多个网络,连续的创建完它们的相应选项后保存文本文件即可。配置完成以后如果有更改,ISC-DHCP-Server进程需要重启来使新的更改生效。重启进程可以通过下面的命令来完成: - # service isc-dhcp-server restart - -这条命令将重启DHCP服务,管理员能够使用几种不同的方式来检查服务器是否已经可以处理dhcp请求。最简单的方法是通过lsof命令[1]来查看服务器是否在侦听67端口,命令如下: - - # lsof -i :67 - -![Check DHCP Listening Port](http://www.tecmint.com/wp-content/uploads/2015/04/lsof.png) -检查DHCP侦听端口 - -这里输出的结果表明DHCPD(DHCP服务守护进程)正在运行并且侦听67端口。由于/etc/services文件中67端口是端口映射,所以输出中的67端口实际上被转换成了“bootps”。 - -在大多数的系统中这是非常常见的,现在服务器应该已经为网络连接做好准备,我们可以将一台主机接入网络请求DHCP地址来验证服务是否正常。 - -### 测试客户端连接 ### - -8. 现在许多系统使用网络管理器来维护网络连接状态,因此这个设备应该预先配置好的,只要对应的接口处于活跃状态就能够获取DHCP。 - -然而当一台设备无法使用网络管理器时,它可能需要手动获取DHCP地址。下面的几步将演示怎样手动获取以及如何查看服务器是否已经按需要分发地址。 - - ‘[ifconfig][2]‘工具能够用来检查接口的配置。这台被用来测试的DHCP服务器的设备,它只有一个网络适配器(网卡),这块网卡被命名为‘eth0‘。 - - # ifconfig eth0 - -![Check Network Interface IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/No-ip.png) -检查网络接口IP地址 - -从输出结果上看,这台设备目前没IPv4地址,这样很好便于测试。我们把这台设备连接到DHCP服务器并发出一个请求。这台设备上已经安装了一个名为‘dhclient‘ 的DHCP客户端工具。因为操作系统各不相同,所以这个客户端软件也是互不一样的。 - # dhclient eth0 - -![Request IP Address from DHCP](http://www.tecmint.com/wp-content/uploads/2015/04/IP.png) -从DHCP请求IP地址 - -当前 `'inet addr:'` 字段中显示了属于172.27.60.0网络地址范围内的IPv4地址。值得欣慰的是当前网络还配置了正确的子网掩码并且分发了广播地址。 - -到这里看起来还都不错,让我们来测试一下,看看这台设备收到新IP地址是不是由服务器发出的。这里我们参照服务器的日志文件来完成这个任务。虽然这个日志的内容有几十万条,但是里面只有几条是用来确定服务器是否正常工作的。这里我们使用一个工具‘tail’,它只显示日志文件的最后几行,这样我们就可以不用拿一个文本编辑器去查看所有的日志文件了。命令如下: - - # tail /var/log/syslog - -![Check DHCP Logs](http://www.tecmint.com/wp-content/uploads/2015/04/DHCP-Log.png) -检查DHCP日志文件 - -OK!服务器记录表明它分发了一个地址给这台主机(HRTDEBXENSRV)。服务器按预期运行,给它充当权威的网络分发适合的网络地址。至此DHCP服务器搭建成功并且运行。如果有需要你可以继续配置其他的网络,排查故障,确保安全。 - -在以后的Debian教程中我会讲一些新的 ISC-DHCP-Server 功能。有时间的话我将写一篇关于Bind9和DDNS的教程,融入到这篇文章里面。 --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-and-configure-multihomed-isc-dhcp-server-on-debian-linux/ - -作者:[Rob Turner][a] -译者:[ivo-wang](https://github.com/ivo-wang) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/robturner/ -[1]:http://www.tecmint.com/10-lsof-command-examples-in-linux/ -[2]:http://www.tecmint.com/ifconfig-command-examples/ diff --git a/translated/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/translated/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md new file mode 100644 index 0000000000..b7c86609bd --- /dev/null +++ b/translated/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md @@ -0,0 +1,63 @@ + +Linux 有问必答 - 如何通过代理服务器安装 Ubuntu 桌面 +================================================================================ +> **问题**: 我的电脑通过 HTTP 代理连接到公司网络。当我尝试从 CD-ROM 在计算机上安装 Ubuntu 桌面时,在检索文件时安装程序会被挂起,检索则不会完成,这可能是由于代理造成的。然而问题是,Ubuntu 的安装程序从不要求我在安装过程中配置代理。那我该怎么使用代理来安装 Ubuntu 桌面? + +与 Ubuntu 服务器不太一样,安装 Ubuntu 桌面几乎都是自动安装,没有留下太多自定义的空间,如自定义磁盘分区,手动网络设置,包选择等等。尽管非常简单,一键安装被认为是用户友好的,它不需要用户寻找“高级安装模式”来定制自己的 Ubuntu 桌面。 + +此外,Ubuntu 默认桌面的安装程序中一个大问题是代理设置。如果你的计算机连接在一个代理上,你会发现 Ubuntu 安装时会卡在准备下载文件处。 + +![](https://c2.staticflickr.com/6/5683/22195372232_cea81a5e45_c.jpg) + +这篇文章描述了如何解决当使用代理时 Ubuntu **安装程序的限制和安装 Ubuntu 桌面**。 + +其基本思路如下。不是直接使用 Ubuntu 的安装程序开始安装,首先进入 live Ubuntu 桌面,配置代理服务器,最后从 live 桌面手动启动 Ubuntu 的安装程序。以下是程序的安装步骤。 + +从 CD/DVD 或 USB 启动 Ubuntu 桌面后,点击第一个欢迎屏幕上的"Try Ubuntu"。 + +![](https://c1.staticflickr.com/1/586/22195371892_3816ba09c3_c.jpg) + +一旦进入 live Ubuntu 桌面,点击左侧设置图标。 + +![](https://c1.staticflickr.com/1/723/22020327738_058610c19d_c.jpg) + +进入 Network 菜单。 + +![](https://c2.staticflickr.com/6/5675/22021212239_ba3901c8bf_c.jpg) + +手动配置代理服务器。 + +![](https://c1.staticflickr.com/1/735/22020025040_59415e0b9a_c.jpg) + +接下来,打开一个终端。 + +![](https://c2.staticflickr.com/6/5642/21587084823_357b5c48cb_c.jpg) + +通过输入以下命令切换到 root 用户: + + $ sudo su + +最后,在 root 用户下输入以下命令。 + + # ubiquity gtk_ui + +然后将启动基于 GUI 的 Ubuntu 安装程序。 + + +![](https://c1.staticflickr.com/1/723/22020025090_cc64848b6c_c.jpg) + +继续安装其余部分。 + +![](https://c1.staticflickr.com/1/628/21585344214_447020e9d6_c.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-ubuntu-desktop-behind-proxy.html + +作者:[Dan Nanni][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni diff --git a/sources/tech/20151109 How to Configure Tripwire IDS on Debian.md b/translated/tech/20151109 How to Configure Tripwire IDS on Debian.md similarity index 78% rename from sources/tech/20151109 How to Configure Tripwire IDS on Debian.md rename to translated/tech/20151109 How to Configure Tripwire IDS on Debian.md index 11e7dbad60..23bf8eef65 100644 --- a/sources/tech/20151109 How to Configure Tripwire IDS on Debian.md +++ b/translated/tech/20151109 How to Configure Tripwire IDS on Debian.md @@ -1,49 +1,49 @@ -正在翻译:zky001 -How to Configure Tripwire IDS on Debian +如何在Debian中配置Tripewire IDS ================================================================================ -This article is about Tripwire installation and configuration on Debian OS. It is a host based Intrusion detection system (IDS) for Linux environment. Prime function of tripwire IDS is to detect and report any unauthorized change (files and directories ) on linux system. After tripwire installation, baseline database created first, tripwire monitors and detects changes such as new file addition/creation, file modification and user who changed it etc. If the changes are legitimate, you can accept the changes to update tripwire database. +本文是一篇关于Debian中安装和配置Tripewire的文章。它是Linux环境下基于主机的入侵检测系统(IDS)。tripwire的高级功能有检测并报告任何Linux中未授权的更改(文件和目录)。tripewire安装之后,会先创建一个基本的数据库,tripewire监控并检测新文件的创建修改和谁修改了它等等。如果修改过是合法的,你可以接受修改并更新tripwire的数据库。 -### Installation and Configuration ### +### 安装和配置 ### -Tripwire installation on Debian VM is shown below. +tripwire在Debian VM中的安装如下。 # apt-get install tripwire ![installation](http://blog.linoxide.com/wp-content/uploads/2015/11/installation.png) -During installation, tripwire prompt for following configuration. +安装中,tripwire会有下面的配置提示。 -#### Site key Creation #### +#### 站点密钥创建 #### + +tripwire需要一个站点口令来加密tripwire的配置文件tw.cfg和策略文件tw.pol。tripewire使用指定的密码加密两个文件。一个tripewire实例必须指定站点口令。 -Tripwire required a site passphrase to secure the tw.cfg tripwire configuration file and tw.pol tripwire policy file. Tripewire encrypte both files using given passphrase. Site passphrase is must even for a single instance tripwire. ![site key1](http://blog.linoxide.com/wp-content/uploads/2015/11/site-key1.png) -#### Local Key passphrase #### +#### 本地密钥口令 #### -Local passphrase is needed for the protection of tripwire database and report files . Local key used by the tripwire to avoid unauthorized modification of tripwire baseline database. +本地口令用来保护tripwire数据库和报告文件。本地密钥用于阻止非授权的tripewire数据库修改。 ![local key1](http://blog.linoxide.com/wp-content/uploads/2015/11/local-key1.png) -#### Tripwire configuration path #### +#### Tripwire配置路径 #### -Tripwire configuration saved in the /etc/tripwire/twcfg.txt file. It is used to generate encrypted configuration file tw.cfg. +tripewire配置存储在/etc/tripwire/twcfg.txt。它用于生成加密的配置文件tw.cfg。 ![configuration file](http://blog.linoxide.com/wp-content/uploads/2015/11/configuration-file.png) -**Tripwire Policy path** +**Tripwire策略路径** -Tripwire saves policies in /etc/tripwire/twpol.txt file . It is used for the generation of encrypted policy file tw.pol used by the tripwire. +tripwire在/etc/tripwire/twpol.txt中保存策略文件。它用于生成加密的策略文件tw.pol。 ![tripwire policy](http://blog.linoxide.com/wp-content/uploads/2015/11/tripwire-policy.png) -Final installation of tripwire is shown in the following snapshot. +安装完成后如下图所示。 ![installed tripewire1](http://blog.linoxide.com/wp-content/uploads/2015/11/installed-tripewire1.png) -#### Tripwire Configuration file (twcfg.txt) #### +#### Tripwire配置文件 (twcfg.txt) #### -Tripwire configuration file (twcfg.txt) details is given below. Paths of encrypted policy file (tw.pol), site key (site.key) and local key (hostname-local.key) etc are given below. +tripewire配置文件(twcfg.txt)细节如下图所示。加密策略文件(tw.pol),站点密钥(site.key)和本地密钥(hostname-local.key)如下所示。 ROOT =/usr/sbin @@ -79,9 +79,9 @@ Tripwire configuration file (twcfg.txt) details is given below. Paths of encrypt TEMPDIRECTORY =/tmp -#### Tripwire Policy Configuration #### +#### Tripwire策略配置 #### -Configure tripwire configuration before generation of baseline database. It is necessary to disable few policies such as /dev , /proc ,/root/mail etc. Detailed policy file twpol.txt is given below. +在生成基础数据库之前先配置tripwire配置。有必要经用一些策略如/dev、 /proc 、/root/mail等。详细的twpol.txt策略文件如下所示。 @@section GLOBAL TWBIN = /usr/sbin; @@ -237,13 +237,13 @@ Configure tripwire configuration before generation of baseline database. It is n #/proc -> $(Device) ; } -#### Tripwire Report #### +#### Tripwire 报告 #### -**tripwire –check** command checks the twpol.txt file and based on this file generates tripwire report which is shown below. If this is any error in the twpol.txt file, tripwire does not generate report. +**tripwire –check** 命令检查twpol.txt文件并基于此文件生成tripwire报告如下。如果twpol.txt中有任何错误,tripwire不会生成报告。 ![tripwire report](http://blog.linoxide.com/wp-content/uploads/2015/11/tripwire-report.png) -**Report in text form** +**文本形式报告** root@VMdebian:/home/labadmin# tripwire --check @@ -363,18 +363,20 @@ Configure tripwire configuration before generation of baseline database. It is n Integrity check complete. -### Conclusion ### +### 总结 ### -In this article, we learned installation and basic configuration of open source IDS tool Tripwire. First it generates baseline database and detects any change (file/folder) by comparing it with already generated baseline. However, tripwire is not live monitoring IDS. +本篇中,我们学习安装配置开源入侵检测软件tripwire。首先生成基础数据库并通过比较检测出任何改动(文件/文件夹)。然而,tripwire并不是实时监测的IDS。 -------------------------------------------------------------------------------- via: http://linoxide.com/security/configure-tripwire-ids-debian/ 作者:[nido][a] -译者:[译者zky001](https://github.com/zky001) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/naveeda/ + + diff --git a/translated/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md b/translated/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md new file mode 100644 index 0000000000..73397819cd --- /dev/null +++ b/translated/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md @@ -0,0 +1,125 @@ +在 Linux 上将 BQ Aquaris Ubuntu 手机刷成 Android 系统 +================================================================================ +![How to install Android on Ubuntu Phone](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-on-Ubuntu-Phone.jpg) + +如果你正好拥有全球第一支运行 Ubuntu 的手机并且希望将 **BQ Aquaris E4.5 自带的 Ubuntu 系统换成 Android **,那这篇文章能帮你点小忙。 + +有一万种理由来解释为什么要将 Ubuntu 换成主流 Android OS。其中最主要的一个,就是这个系统本身仍然处于非常早期的阶段,针对的目标用户仍然是开发者和爱好者。不管你的理由是什么,要谢谢 bq 提供的工具,让我们能非常轻松地在 BQ Aquaris 上安装 Android OS。 + +下面让我们一起看下在 BQ Aquaris 上安装 Android 需要做哪些事情。 + +### 前提条件 ### + +- 可用的因特网连接,用来下载 Android 出厂固件以及安装刷机工具。 +- USB 数据线 +- 运行 Linux 的电脑 + +本文是基于 Ubuntu 15.10 操作的。但是这些步骤应该也可以应用于其他大多数 Linux 发行版。 + +### 将 BQ Aquaris E4.5 上的 Ubuntu 换成 Android ### + +#### 第一步:下载 Android 固件 #### + +首先是下载可以在 BQ Aquaris E4.5 上运行的 Android 固件。幸运的是我们可以在 bq 的技术支持网站找到。可以从下面的链接直接下载,差不多 650 MB: + +- [下载为 BQ Aquaris E4.5 制作的 Android][1] + +是的,这个版本还支持 OTA 自动升级。目前,固件版本是 2.0.1,基于 Android Lolipop 开发。过一段时间,应该就会放出基于 Marshmallow 的新版本,上边的链接可能就无效了。 + +我建议去[ bq 的技术支持网站][2]下载最新的固件。 + +下载完成后解压。在解压后的目录里,找到一个名字是 **MT6582_Android_scatter.txt** 的文件。后面将要用到它。 + +#### 第二步:下载刷机工具 #### + +bq 已经提供了自己的刷机工具,Herramienta MTK Flash Tool,可以轻松地给设备安装 Andriod 或者 Ubuntu 系统。你可以从下面的链接下载工具: + +- [下载 MTK Flash Tool][3] + +考虑到刷机工具在以后可能会升级,你总是可以从[bq 技术支持网站][4]上找到最新的版本。 + +下载完后解压。之后应该可以在目录里找到一个叫 **flash_tool** 的可执行文件。我们稍后会用到。 + +#### 第三步:移除冲突的软件包(可选) #### + +如果你正在用最新版本的 Ubuntu 或 基于 Ubuntu 的 Linux 发行版,稍后可能会碰到 “BROM ERROR : S_UNDEFINED_ERROR (1001)” 错误。 + +要避免这个错误,你需要卸载有冲突的软件包。可以使用下面的命令: + + sudo apt-get remove modemmanager + +用下面的命令重启 udev 服务: + + sudo service udev restart + +检查一下内核模块 cdc_acm 可能存在的边际效应,运行下面的命令: + + lsmod | grep cdc_acm + +如果上面命令输出是空,你将需要重新加载一下这个内核模块: + + sudo modprobe cdc_acm + +#### 第四步:准备刷入 Android #### + +切换到下载好并解压完成的刷机工具目录(第二步)。请使用命令行来完成,这是因为将要用到 root 权限。 + +假设你保存在下载目录里,使用下面的命令切换目录(为那些不懂如何在命令行下切换目录的朋友考虑)。 + + cd ~/Downloads/SP_Flash* + +然后使用下面的命令以 root 权限启动刷机工具: + + sudo ./flash_tool + +然后你会看到一个像下面的窗口界面。不用在意 Download Agent 区域,它将会被自动填入。只要关心 Scatter-loading 区域。 + +![Replace Ubuntu with Android](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-1.jpeg) + +还记得之前第一步里提到的 **MT6582_Android_scatter.txt** 文件吗?这个文本文件就在你第一步中下载的 Android 固件解压后的目录里。点击 Scatter-loading(上图中)然后选中 MT6582_Android_scatter.txt 文件。 + +之后,你将看到类似下面图片里的一些绿色线条: + +![Install-Android-bq-aquaris-Ubuntu-2](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-2.jpeg) + +#### 第五步:刷入 Android #### + +已经差不多了。把你的手机关机,然后通过 USB 线连接到电脑上。 + +在下拉列表里选择 Firmware Upgrade,然后点击那个大的 Download 按钮。 + +![flash Android with Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu.jpeg) + +如果一切顺利,你应该可以在工具下方的状态栏里看到刷机状态: + +![Replace Ubuntu with Android](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-3.jpeg) + +当所有过程都完成后,你将看到一个类似这样的提示: + +![Successfully flashed Android on bq qauaris Ubuntu Phone](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-4.jpeg) + +将手机从电脑上移除然后开机。你应该看到屏幕上显示白色并在中间和底部有 AQUARIS 文字,还应该有 “powered by Android” 字样。差不多需要差不多十分钟,你才可以设置和开始使用 Android。 + +注意:如果中间出了什么问题,同时按下电源、音量加、音量减按键可以进入 fast boot 模式。然后再次关机并连接电脑。重复升级固件的过程。应该可以。 + +### 总结 ### + +要感谢厂商提供的工具,让我们可以轻松地 **在 bq Ubuntu 手机上刷 Android**。当然,你可以使用相同的步骤将 Android 替换回 Ubuntu。只是下载的时候选 Ubuntu 固件而不是 Android。 + +希望这篇文章可以帮你将你的 bq 手机上的 Ubuntu 刷成 Android。如果有什么问题或建议,可以在下面留言区里讨论。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-android-ubuntu-phone/ + +作者:[Abhishek][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:https://storage.googleapis.com/otas/2014/Smartphones/Aquaris_E4.5_L/2.0.1_20150623-1900_bq-FW.zip +[2]:http://www.bq.com/gb/support/aquaris-e4-5 +[3]:https://storage.googleapis.com/otas/2014/Smartphones/Aquaris_E4.5/Ubuntu/Web%20version/Web%20version/SP_Flash_Tool_exe_linux_v5.1424.00.zip +[4]:http://www.bq.com/gb/support/aquaris-e4-5-ubuntu-edition diff --git a/translated/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md b/translated/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md new file mode 100644 index 0000000000..077c945b9c --- /dev/null +++ b/translated/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md @@ -0,0 +1,317 @@ +如何在linux 上配置持续集成服务 - Drone +============================================================== + +如果你对一次又一次的克隆、构建、测试和部署代码感到厌倦了,可以考虑一下持续集成。持续集成也就是CI,是软件工程的像我们一样的频繁提交的代码库,构建、测试和部署的实践。CI 帮助我们快速的集成新代码到已有的代码基线。如果这个过程是自动化进行的,那么就会提高开发的速度,因为这可以减少开发人员手工构建和测试的时间。[Drone][1] 是一个免费的开源项目,用来提供一个非常棒的持续集成服务的环境,采用了Apache 2.0 协议。它已经集成近很多代码库提供商,比如Github、Bitbucket 以及Google COde,并且它可以从代码库提取代码,使我们可以编译多种语言,包括PHP, Node, Ruby, Go, Dart, Python, C/C++, JAVA 等等。它是如此一个强大的平台是因为它每次构建都使用了容器和docker 技术,这让用户可以在保证隔离的条件下完全控制他们自己的构建环境。 + +### 1. 安装 Docker ### + +首先,我们要安装docker,因为这是Drone 的工作流的最关键的元素。Drone 合理的利用了docker 来构建和测试应用。容器技术提高了应用部署的效率。要安装docker ,我们需要在不同的linux 发行版本运行下面对应的命令,我们这里会说明Ubuntu 14.04 和CentOS 7 两个版本。 + +#### Ubuntu #### + +要在Ubuntu 上安装Docker ,我们只需要运行下面的命令。 + + # apt-get update + # apt-get install docker.io + +安装之后我们需要使用`service` 命令重启docker 引擎。 + + # service docker restart + +然后我们让docker 在系统启动时自动启动。 + + # update-rc.d docker defaults + + Adding system startup for /etc/init.d/docker ... + /etc/rc0.d/K20docker -> ../init.d/docker + /etc/rc1.d/K20docker -> ../init.d/docker + /etc/rc6.d/K20docker -> ../init.d/docker + /etc/rc2.d/S20docker -> ../init.d/docker + /etc/rc3.d/S20docker -> ../init.d/docker + /etc/rc4.d/S20docker -> ../init.d/docker + /etc/rc5.d/S20docker -> ../init.d/docker + +#### CentOS #### + +第一,我们要更新机器上已经安装的软件包。我们可以使用下面的命令。 + + # sudo yum update + +要在centos 上安装docker,我们可以简单的运行下面的命令。 + + # curl -sSL https://get.docker.com/ | sh + +安装好docker 引擎之后我么只需要简单实用下面的`systemd` 命令启动docker,因为centos 7 的默认init 系统是systemd。 + + # systemctl start docker + +然后我们要让docker 在系统启动时自动启动。 + + # systemctl enable docker + + ln -s '/usr/lib/systemd/system/docker.service' '/etc/systemd/system/multi-user.target.wants/docker.service' + +### 2. 安装 SQlite 驱动 ### + +Drone 默认使用SQLite3 数据库服务器来保存数据和信息。它会在/var/lib/drone/ 自动创建名为drone.sqlite 的数据库来处理数据库模式的创建和迁移。要安装SQLite3 我们要完成以下几步。 + +#### Ubuntu 14.04 #### + +因为SQLite3 存在于Ubuntu 14.04 的默认软件库,我们只需要简单的使用apt 命令安装它。 + + # apt-get install libsqlite3-dev + +#### CentOS 7 #### + +要在Centos 7 上安装选哟使用下面的yum 命令。 + + # yum install sqlite-devel + +### 3. 安装 Drone ### + +最后,我们安装好依赖的软件,我们现在更进一步的接近安装Drone。在这一步里我们值简单的从官方链接下载对应的二进制软件包,然后使用默认软件包管理器安装Drone。 + +#### Ubuntu #### + +我们将使用wget 从官方的[Debian 文件下载链接][2]下载drone 的debian 软件包。下面就是下载命令。 + + # wget downloads.drone.io/master/drone.deb + + Resolving downloads.drone.io (downloads.drone.io)... 54.231.48.98 + Connecting to downloads.drone.io (downloads.drone.io)|54.231.48.98|:80... connected. + HTTP request sent, awaiting response... 200 OK + Length: 7722384 (7.4M) [application/x-debian-package] + Saving to: 'drone.deb' + 100%[======================================>] 7,722,384 1.38MB/s in 17s + 2015-11-06 14:09:28 (456 KB/s) - 'drone.deb' saved [7722384/7722384] + +下载好之后,我们将使用dpkg 软件包管理器安装它。 + + # dpkg -i drone.deb + + Selecting previously unselected package drone. + (Reading database ... 28077 files and directories currently installed.) + Preparing to unpack drone.deb ... + Unpacking drone (0.3.0-alpha-1442513246) ... + Setting up drone (0.3.0-alpha-1442513246) ... + Your system ubuntu 14: using upstart to control Drone + drone start/running, process 9512 + +#### CentOS #### + +在CentOS 机器上我们要使用wget 命令从[下载链接][3]下载RPM 包。 + + # wget downloads.drone.io/master/drone.rpm + + --2015-11-06 11:06:45-- http://downloads.drone.io/master/drone.rpm + Resolving downloads.drone.io (downloads.drone.io)... 54.231.114.18 + Connecting to downloads.drone.io (downloads.drone.io)|54.231.114.18|:80... connected. + HTTP request sent, awaiting response... 200 OK + Length: 7763311 (7.4M) [application/x-redhat-package-manager] + Saving to: ‘drone.rpm’ + 100%[======================================>] 7,763,311 1.18MB/s in 20s + 2015-11-06 11:07:06 (374 KB/s) - ‘drone.rpm’ saved [7763311/7763311] + +然后我们使用yum 安装rpm 包。 + + # yum localinstall drone.rpm + +### 4. 配置端口 ### + +安装完成之后,我们要使它工作要先进行配置。drone 的配置文件在**/etc/drone/drone.toml** 。默认情况下drone 的web 接口使用的是80,而这也是http 默认的端口,如果我们要下面所示的修改配置文件里server 块对应的值。 + + [server] + port=":80" + +### 5. 集成 Github ### + +为了运行Drone 我们必须设置最少一个和GitHub、GitHub 企业版,Gitlab,Gogs,Bitbucket 关联的集成点。在本文里我们只集成了github,但是如果哦我们要集成其他的我们可以在配置文件做修改。为了集成github 我们需要在[github setting] 创建一个新的应用。 + +![Registering App Github](http://blog.linoxide.com/wp-content/uploads/2015/11/registering-app-github.png) + +要创建一个应用,我们需要在`New Application` 页面点击`Register`,然后如下所示填表。 + +![Registering OAuth app github](http://blog.linoxide.com/wp-content/uploads/2015/11/registering-OAuth-app-github.png) + +我们应该保证在应用的配置项里设置了**授权了的回调链接**,链接看起来像`http://drone.linoxide.com/api/auth/github.com`。然后我们点击注册应用。所有都做好之后我们会看到我们需要在我们的Drone 配置文件里配置的客户端ID 和客户端密钥。 + +![Client ID and Secret Token](http://blog.linoxide.com/wp-content/uploads/2015/11/client-id-secret-token.png) + +在这些都完成之后我们需要使用文本编辑器编辑drone 配置文件,比如使用下面的命令。 + + # nano /etc/drone/drone.toml + +然后我们会在drone 的配置文件里面找到`[github]` 部分,紧接着的是下面所示的配置内容 + + [github] + client="3dd44b969709c518603c" + secret="4ee261abdb431bdc5e96b19cc3c498403853632a" + # orgs=[] + # open=false + +![Configuring Github Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-github-drone-e1446835124465.png) + +### 6. 配置 SMTP 服务器 ### + +如果我们想让drone 使用email 发送通知,那么我们需要在SMTP 配置里面设置我们的SMTP 服务器。如果我们已经有了一个SMTP 服务,那就只需要简单的使用它的配置文件就行了,但是因为我们没有一个SMTP 服务器,我们需要安装一个MTA 比如Postfix,然后在drone 配置文件里配置好SMTP。 + +#### Ubuntu #### + +在ubuntu 里使用下面的apt 命令安装postfix。 + + # apt-get install postfix + +#### CentOS #### + +在CentOS 里使用下面的yum 命令安装postfix。 + + # yum install postfix + +安装好之后,我们需要编辑我们的postfix 配置文件。 + + # nano /etc/postfix/main.cf + +然后我们要把myhostname 的值替换为我们自己的FQDN,比如drone.linoxide.com。 + + myhostname = drone.linoxide.com + +现在开始配置drone 配置文件里的SMTP 部分。 + + # nano /etc/drone/drone.toml + +找到`[smtp]` 部分补充上下面的内容。 + + [smtp] + host = "drone.linoxide.com" + port = "587" + from = "root@drone.linoxide.com" + user = "root" + pass = "password" + +![Configuring SMTP Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-smtp-drone.png) + +注意:这里的**user** 和 **pass** 参数强烈推荐一定要改成一个用户的配置。 + +### 7. 配置 Worker ### + +如我们所知的drone 利用了docker 完成构建、测试任务,我们需要把docker 配置为drone 的worker。要完成这些需要修改drone 配置文件里的`[worker]` 部分。 + + # nano /etc/drone/drone.toml + +然后取消底下几行的注释并且补充上下面的内容。 + + [worker] + nodes=[ + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock" + ] + +这里我们只设置了两个节点,这意味着上面的配置文件只能同时执行2 个构建操作。要提高并发性可以增大节点的值。 + + [worker] + nodes=[ + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock" + ] + +使用上面的配置文件drone 被配置为使用本地的docker 守护程序可以同时构建4个任务。 + +### 8. 重启 Drone ### + +最后,当所有的安装和配置都准备好之后,我们现在要在本地的linux 机器上启动drone 服务器。 + +#### Ubuntu #### + +因为ubuntu 14.04 使用了sysvinit 作为默认的init 系统,所以只需要简单执行下面的service 命令就可以启动drone 了。 + + # service drone restart + +要让drone 在系统启动时也自动运行,需要运行下面的命令。 + + # update-rc.d drone defaults + +#### CentOS #### + +因为CentOS 7使用systemd 作为init 系统,所以只需要运行下面的systemd 命令就可以重启drone。 + + # systemctl restart drone + +要让drone 自动运行只需要运行下面的命令。 + + # systemctl enable drone + +### 9. 添加防火墙例外 ### + +众所周知drone 默认使用了80 端口而我们又没有修改他,所以我们需要配置防火墙程序允许80 端口(http)开发并允许其他机器可以通过网络连接。 + +#### Ubuntu 14.04 #### + +iptables 是最流行的防火墙程序,并且ubuntu 默认安装了它。我们需要修改iptable 暴露端口80,这样我们才能让drone 的web 界面在网络上被大家访问。 + + # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT + # /etc/init.d/iptables save + +#### CentOS 7 #### + +因为CentOS 7 默认安装了systemd,它使用firewalld 作为防火墙程序。为了在firewalld 上打开80端口(http 服务),我们需要执行下面的命令。 + + # firewall-cmd --permanent --add-service=http + + success + + # firewall-cmd --reload + + success + +### 10. 访问web 界面 ### + +现在我们将在我们最喜欢的浏览器上通过web 界面打开drone。要完成这些我们要把浏览器指向运行drone 的服务器。因为drone 默认使用80 端口而我们有没有修改过,所以我们只需要在浏览器里根据我们的配置输入`http://ip-address/` 或 `http://drone.linoxide.com` 就行了。在我们正确的完成了上述操作后,我们就可以看到登陆界面了。 + +![Login Github Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/login-github-drone-e1446834688394.png) + +因为在上面的步骤里配置了Github,我们现在只需要简单的选择github然后进入应用授权步骤,这些完成后我们就可以进入工作台了。 + +![Drone Dashboard](http://blog.linoxide.com/wp-content/uploads/2015/11/drone-dashboard.png) + +这里它会同步我们在github 上的代码库,然后询问我们要在drone 上构建那个代码库。 + +![Activate Repository](http://blog.linoxide.com/wp-content/uploads/2015/11/activate-repository-e1446835574595.png) + +这一步完成后,它会询问我们在代码库里添加`.drone.yml` 文件的新名称,并且在这个文件里定义构建的过程和配置项,比如使用那个docker 镜像,执行那些命令和脚本来编译,等等。 + +我们按照下面的内容来配置我们的`.drone.yml`。 + + image: python + script: + - python helloworld.py + - echo "Build has been completed." + +这一步完成后我们就可以使用drone 应用里的YAML 格式的配置文件来构建我们的应用了。所有对代码库的提交和改变此时都会同步到这个仓库。一旦提交完成了,drone 就会自动开始构建。 + +![Building Application Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/building-application-drone.png) + +所有操作都完成后,我们就能在终端看到构建的结果了。 + +![Build Success Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/build-success-drone.png) + +### 总结 ### + +在本文中我们学习了如何安装一个可以工作的使用drone 的持续集成平台。如果我们愿意我们甚至可以从drone.io 官方提供的服务开始工作。我们可以根据自己的需求从免费的服务或者收费服务开始。它通过漂亮的web界面和强大的功能改变了持续集成的世界。它可以集成很多第三方应用和部署平台。如果你有任何问题、建议可以直接反馈给我们,谢谢。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-drone-continuous-integration-linux/ + +作者:[Arun Pyasi][a] +译者:[ezio](https://github.com/oska874) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://drone.io/ +[2]:http://downloads.drone.io/master/drone.deb +[3]:http://downloads.drone.io/master/drone.rpm +[4]:https://github.com/settings/developers diff --git a/translated/tech/20151117 Linux 101--Get the most out of Systemd.md b/translated/tech/20151117 Linux 101--Get the most out of Systemd.md deleted file mode 100644 index 1a382479ec..0000000000 --- a/translated/tech/20151117 Linux 101--Get the most out of Systemd.md +++ /dev/null @@ -1,171 +0,0 @@ -Linux 101:最有效地使用 Systemd -================================================================================ -干嘛要这么做? - -- 理解现代 Linux 发行版中的显著变化; -- 看看 Systemd 是如何取代 SysVinit 的; -- 处理好*单元* (unit)和新的 journal 日志。 - -吐槽邮件,人身攻击,死亡威胁——Lennart Poettering,Systemd 的作者,对收到这些东西早就习以为常了。这位 Red Hat 公司的员工最近在 Google+ 上怒斥 FOSS 社区([http://tinyurl.com/poorlennart][1])的本质,悲痛且失望地表示:“那真是个令人恶心的地方”。他着重指出 Linus Torvalds 在邮件列表上言辞刻薄的帖子,并谴责这位内核的领导者为在线讨论定下基调,并使得人身攻击及贬抑之辞成为常态。 - -但为何 Poettering 会遭受如此多的憎恨?为何就这么个搞搞开源软件的人要忍受这等愤怒?答案就在于他的软件的重要性。如今大多数发行版中,Systemd 是 Linux 内核发起的第一个程序,并且它还扮演多种角色。它会启动系统服务,处理用户登陆,每隔特定的时间执行一些任务,还有很多很多。它在不断地成长,并逐渐成为 Linux 的某种“基础系统”——提供系统启动和发行版维护所需的所有工具。 - -如今,在以下几点上 Systemd 颇具争议:它逃避了一些确立好的 Unix 传统,例如纯文本的日志文件;它被看成是个“大一统”的项目,试图接管一切;它还是我们这个操作系统的支柱的重要革新。然而大多数主流发行版已经接受了(或即将接受)它,因此它就保留了下来。而且它确实是有好处的:更快地启动,更简单地管理那些有依赖的服务程序,提供强大且安全的日志系统等。 - -因此在这篇教程中,我们将探索 Systemd 的特性,并向您展示如何最有效地利用这些特性。即便您此刻并不是这款软件的粉丝,读完本文后您至少可以更加了解和适应它。 - -![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/eating-large.jpg) - -**这部没正经的动画片来自[http://tinyurl.com/m2e7mv8][2],它把 Systemd 塑造成一只狂暴的动物,吞噬它路过的一切。大多数批评者的言辞可不像这只公仔一样柔软。** - -### 启动及服务 ### - -大多数主流发行版要么已经采用 Systemd,要么即将在下个发布中采用(如 Debian 和 Ubuntu)。在本教程中,我们使用 Fedora 21——该发行版已经是 Systemd 的优秀实验场地——的一个预览版进行演示,但不论您用哪个发行版,要用到的命令和注意事项都应该是一样的。这是 Systemd 的一个加分点:它消除了不同发行版之间许多细微且琐碎的区别。 - -在终端中输入 **ps ax | grep systemd**,看到第一行,其中的数字 **1** 表示它的进程号是1,也就是说它是 Linux 内核发起的第一个程序。因此,内核一旦检测完硬件并组织好了内存,就会运行 **/usr/lib/systemd/systemd** 可执行程序,这个程序会按顺序依次发起其他程序。(在还没有 Systemd 的日子里,内核会去运行 **/sbin/init**,随后这个程序会在名为 SysVinit 的系统中运行其余的各种启动脚本。) - -Systemd 的核心是一个叫*单元* (unit)的概念,它是一些存有关于服务(在运行在后台的程序),设备,挂载点,和操作系统其他方面信息的配置文件。Systemd 的其中一个目标就是简化这些事物之间的相互作用,因此如果你有程序需要在某个挂载点被创建或某个设备被接入后开始运行,Systemd 可以让这一切正常运作起来变得相当容易。(在没有 Systemd 的日子里,要使用脚本来把这些事情调配好,那可是相当丑陋的。)要列出您 Linux 系统上的所有单元,输入以下命令: - - systemctl list-unit-files - -现在,**systemctl** 是与 Systemd 交互的主要工具,它有不少选项。在单元列表中,您会注意到这儿有一些格式:被使能的单元显示为绿色,被禁用的显示为红色。标记为“static”的单元不能直接启用,它们是其他单元所依赖的对象。若要限制输出列表只包含服务,使用以下命令: - - systemctl list-unit-files --type=service - -注意,一个单元显示为“enabled”,并不等于对应的服务正在运行,而只能说明它可以被开启。要获得某个特定服务的信息,以 GDM (the Gnome Display Manager) 为例,输入以下命令: - - systemctl status gdm.service - -这条命令提供了许多有用的信息:一段人类可读的服务描述,单元配置文件的位置,启动的时间,进程号,以及它所从属的 CGroups (用以限制各组进程的资源开销)。 - -如果您去查看位于 **/usr/lib/systemd/system/gdm.service** 的单元配置文件,您可以看到多种选项,包括要被运行的二进制文件(“ExecStart”那一行),相冲突的其他单元(即不能同时进入运行的单元),以及需要在本单元执行前进入运行的单元(“After”那一行)。一些单元有附加的依赖选项,例如“Requires”(必要的依赖)和“Wants”(可选的依赖)。 - -此处另一个有趣的选项是: - - Alias=display-manager.service - -当您启动 **gdm.service** 后,您将可以通过 **systemctl status display-manager.service** 来查看它的状态。当您知道有*显示管理程序* (display manager)在运行并想对它做点什么,但您不关心那究竟是 GDM,KDM,XDM 还是什么别的显示管理程序时,这个选项会非常有用。 - -![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/status-large.jpg) - -**使用 systemctl status 命令后面跟一个单元名,来查看对应的服务有什么情况。** - -### “目标”锁定 ### - -如果您在 **/usr/lib/systemd/system** 目录中输入 **ls** 命令,您将看到各种以 **.target** 结尾的文件。一个*启动目标* (target)是一种将多个单元聚合在一起以致于将它们同时启动的方式。例如,对大多数类 Unix 操作系统而言有一种“多用户”状态,意思是系统已被成功启动,后台服务正在运行,并且已准备好让一个或多个用户登陆并工作——至少在文本模式下。(其他状态包括用于进行管理工作的单用户状态,以及用于机器关机的重启状态。) - -如果您打开 **multi-user.target** 文件一探究竟,您可能期待看到的是一个要被启动的单元列表。但您会发现这个文件内部几乎空空如也——其实,一个服务会通过 **WantedBy** 选项让自己成为启动目标的依赖。因此如果您去打开 **avahi-daemon.service**, **NetworkManager.service** 及其他 **.service** 文件看看,您将在 Install 段看到这一行: - - WantedBy=multi-user.target - -因此,切换到多用户启动目标会使能那些包含上述语句的单元。还有其他一些启动目标可用(例如 **emergency.target** 用于一个紧急情况使用的 shell,以及 **halt.target** 用于机器关机),您可以用以下方式轻松地在它们之间切换: - - systemctl isolate emergency.target - -在许多方面,这些都很像 SysVinit 中的*运行级* (runlevel),如文本模式的 **multi-user.target** 类似于第3运行级,**graphical.target** 类似于第5运行级,**reboot.target** 类似于第6运行级,诸如此类。 - -![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/unit-large.jpg) - -**与传统的脚本相比,单元配置文件也许看起来很陌生,但并不难以理解。** - -### 开启与停止 ### - -现在您也许陷入了沉思:我们已经看了这么多,但仍没看到如何停止和开启服务!这其实是有原因的。从外部看,Systemd 也许很复杂,像野兽一般难以驾驭。因此在您开始摆弄它之间,有必要从宏观的角度看看它是如何工作的。实际用来管理服务的命令非常简单: - - systemctl stop cups.service - systemctl start cups.service - -(若某个单元被禁用了,您可以先通过 **systemctl enable** 加该单元名的方式将其使能。这种做法会为该单元创建一个符号链接,并将其放置在当前启动目标的 .wants 目录下,这些 .wants 目录在**/etc/systemd/system** 文件夹中。) - -还有两个有用的命令是 **systemctl restart** 和 **systemctl reload**,后面接单元名。后者要求单元重新加载它的配置文件。Systemd 的绝大部分都有良好的文档,因此您可以查看手册 (**man systemctl**) 了解每条命令的细节。 - -> ### 定时器单元:取代 Cron ### -> -> 除了系统初始化和服务管理,Systemd 还染指其他方面。在很大程度上,它能够完成 **cron** 的工作,而且可以说是以更灵活的方式(并带有更易读的语法)。**cron** 是一个以规定时间间隔执行任务的程序——例如清楚临时文件,刷新缓存等。 -> -> 如果您再次进入 **/usr/lib/systemd/system** 目录,您会看到那儿有多个 **.timer** 文件。用 **less** 来查看这些文件,您会发现它们与 **.service** 和 **.target** 文件有着相似的结构,而区别在于 **[Timer]** 段。举个例子: -> -> [Timer] -> OnBootSec=1h -> OnUnitActiveSec=1w -> -> **OnBootSec** 选项告诉 Systemd 在系统启动一小时后启动这个单元。第二个选项的意思是:自那以后每周启动这个单元一次。关于定时器有大量选项您可以设置——输入 **man systemd.time** 查看完整列表。 -> -> Systemd 的时间精度默认为一分钟。也就是说,它会在设定时刻的一分钟内运行单元,但不一定精确到那一秒。这么做是基于电源管理方面的原因,但如果您需要一个没有任何延时且精确到毫秒的定时器,您可以添加以下一行: -> -> AccuracySec=1us -> -> 另外, **WakeSystem** 选项(可以被设置为 true 或 false)决定了定时器是否可以唤醒处于休眠状态的机器。 - -![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/systemd_gui-large.jpg) - -**存在一个 Systemd 的图形界面程序,即便它已有多年未被积极维护。** - -### 日志文件:向 journald 问声好 ### - -Systemd 的第二个主要部分是 journal 。这是个日志系统,类似于 syslog 但也有些显著区别。如果您是个 Unix 日志管理模式的 粉丝,准备好热血沸腾吧:这是个二进制日志,因此您不能使用常规的命令行文本处理工具来解析它。这个设计决定不出意料地在网上引起了激烈的争论,但它的确有些优点。例如,日志可以被更系统地组织,带有更多元数据,因此可以更容易地根据可执行文件名和进程号等过滤出信息。 - -要查看整个 journal,输入以下命令: - - journalctl - -像许多其他的 Systemd 命令一样,该命令将输出通过管道的方式引向 **less** 程序,因此您可以使用空格键向下滚动,“/”(斜杠)键查找,以及其他熟悉的快捷键。您也能在此看到少许颜色,像红色的警告及错误信息。 - -以上命令会输出很多信息。为了限制其只输出当前启动的消息,使用如下命令: - - journalctl -b - -这就是 Systemd 大放异彩的地方!您想查看自上次启动以来的全部消息吗?试试 **journalctl -b -1** 吧。再上一次的?用 **-2** 替换 **-1** 吧。那自某个具体时间,例如2014年10月24日16:38以来的呢? - - journalctl -b --since=”2014-10-24 16:38” - -即便您对二进制日志感到遗憾,那依然是个有用的特性,并且对许多系统管理员来说,构建类似的过滤器比起写正则表达式而言容易多了。 - -我们已经可以根据特定的时间来准确查找日志了,那可以根据特定程序吗?对单元而言,试试这个: - - journalctl -u gdm.service - -(注意:这是个查看 X server 产生的日志的好办法。)那根据特定的进程号? - - journalctl _PID=890 - -您甚至可以请求只看某个可执行文件产生的消息: - - journalctl /usr/bin/pulseaudio - -若您想将输出的消息限制在某个优先级,可以使用 **-p** 选项。该选项参数为 0 的话只会显示紧急消息(也就是说,是时候向 **\$DEITY** 祈求保佑了),为 7 的话会显示所有消息,包括调试消息。请查看手册 (**man journalctl**) 获取更多关于优先级的信息。 - -值得指出的是,您也可以将多个选项结合在一起,若想查看在当前启动中由 GDM 服务输出的优先级数小于等于 3 的消息,请使用下述命令: - - journalctl -u gdm.service -p 3 -b - -最后,如果您仅仅想打开一个随 journal 持续更新的终端窗口,就像在没有 Systemd 时使用 tail 命令实现的那样,输入 **journalctl -f** 就好了。 - -![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/journal-large.jpg) - -**二进制日志并不流行,但 journal 的确有它的优点,如非常方便的信息查找及过滤。** - -> ### 没有 Systemd 的生活?### -> -> 如果您就是完全不能接收 Systemd,您仍然有一些主流发现版中的选择。尤其是 Slackware,作为历史最为悠久的发行版,目前还没有做出改变,但它的主要开发者并没有将其从未来规划中移除。一些不出名的发行版也在坚持使用 SysVinit 。 -> -> 但这又将持续多久呢?Gnome 正越来越依赖于 Systemd,其他的主流桌面环境也会步其后尘。这也是引起 BSD 社区一阵恐慌的原因:Systemd 与 Linux 内核紧密相连,导致在某种程度上,桌面环境正变得越来越不可移植。一种折中的解决方案也许会以 Uselessd ([http://uselessd.darknedgy.net][3]) 的形式到来:一种裁剪版的 Systemd,纯粹专注于启动和监控进程,而不消耗整个基础系统。 -> -> ![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/gentoo-large.jpg) -> -> 若您不喜欢 Systemd,可以尝试一下 Gentoo 发行版,它将 Systemd 作为初始化工具的一种选择,但并不强制用户使用 Systemd。 - --------------------------------------------------------------------------------- - -via: http://www.linuxvoice.com/linux-101-get-the-most-out-of-systemd/ - -作者:[Mike Saunders][a] -译者:[Ricky-Gong](https://github.com/Ricky-Gong) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxvoice.com/author/mike/ -[1]:http://tinyurl.com/poorlennart -[2]:http://tinyurl.com/m2e7mv8 -[3]:http://uselessd.darknedgy.net/ diff --git a/translated/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md b/translated/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md new file mode 100644 index 0000000000..38a89dcbc2 --- /dev/null +++ b/translated/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md @@ -0,0 +1,148 @@ +如何在 Fedora/CentOS/RHEL 或 Arch Linux 上安装 Cockpit +================================================================================ +Cockpit 是一个免费开源的服务器管理软件,它使得我们可以通过它好看的 web 前端界面轻松地管理我们的 GNU/Linux 服务器。Cockpit 使得 linux 系统管理员、系统维护员和开发者能轻松地管理他们的服务器并执行一些简单的任务,例如管理存储、检测日志、启动或停止服务以及一些其它任务。它的报告界面添加了一些很好的功能使得可以轻松地在终端和 web 界面之间切换。另外,它不仅使得管理一台服务器变得简单,更重要的是只需要一个单击就可以在一个地方同时管理多个通过网络连接的服务器。它非常轻量级,web 界面也非常简单易用。在这篇博文中,我们会学习如何安装 Cockpit 并用它管理我们的运行着 Fedora、CentOS、Arch Linux 以及 RHEL 发行版操作系统的服务器。下面是 Cockpit 在我们的 GNU/Linux 服务器中一些非常棒的功能: + +1. 它包含 systemd 服务管理器。 +2. 有一个用于故障排除和日志分析的 Journal 日志查看器。 +3. 包括 LVM 在内的存储配置比以前任何时候都要简单。 +4. 用 Cockpit 可以进行基本的网络配置。 +5. 可以轻松地添加和删除用户以及管理多台服务器。 + +### 1. 安装 Cockpit ### + +首先,我们需要在我们基于 linux 的服务器上安装 Cockpit。大部分发行版的官方软件仓库中都有可用的 cockpit 安装包。这篇博文中,我们会在 Fedora 22、CentOS 7、Arch Linux 和 RHEL 7 中通过它们的官方软件仓库安装 Cockpit。 + +#### CentOS / RHEL #### + +CentOS 和 RHEL 官方软件库中有可用的 Cockpit。我们只需要用 yum 管理器就可以安装。只需要以 sudo/root 权限运行下面的命令就可以安装它。 + + # yum install cockpit + +![Centos 上安装 Cockpit](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-centos.png) + +#### Fedora 22/21 #### + +和 CentOS 一样, Fedora 的官方软件库默认也有可用的 Cockpit。我们只需要用 dnf 软件包管理器就可以安装 Cockpit。 + + # dnf install cockpit + +![Fedora 上安装 Cockpit](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-fedora.png) + +#### Arch Linux #### + +现在 Arch Linux 官方软件库中还没有可用的 Cockpit,但 Arch 用户库(Arch User Repository,AUR)有。只需要运行下面的 yaourt 命令就可以安装。 + + # yaourt cockpit + +![Arch linux 上安装 Cockpit](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-archlinux.png) + +### 2. 启动并启用 Cockpit ### + +成功安装完 Cockpit,我们就要用服务/守护进程管理器启动 Cockpit 服务。到了 2015 年,尽管一些 linux 发行版仍然运行 SysVinit 管理守护进程,但大部分 linux 发行版都采用了 Systemd,Cockpit 使用 systemd 完成从运行守护进程到服务几乎所有的功能。因此,我们只能在运行着 Systemd 的最新的 linux 发行版中安装 Cockpit。要启动 Cockpit 并让它在每次系统重启时自动启动,我们需要在终端或控制台中运行下面的命令。 + # systemctl start cockpit + + # systemctl enable cockpit.socket + + 创建从 /etc/systemd/system/sockets.target.wants/cockpit.socket 到 /usr/lib/systemd/system/cockpit.socket 的符号链接。 + +### 3. 允许通过防火墙 ### + +启动 Cockpit 并使得它能在每次系统重启时自动启动后,我们现在要给它配置防火墙。由于我们的服务器上运行着防火墙程序,我们需要允许它通过某些端口使得从服务器外面可以访问 Cockpit。 + +#### Firewalld #### + + # firewall-cmd --add-service=cockpit --permanent + + success + + # firewall-cmd --reload + + success + +![允许 Cockpit 通过 Firewalld](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-allowing-firewalld.png) + +#### Iptables #### + + # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT + + # service iptables save + +### 4. 访问 Cockpit Web 界面 ### + +下面,我们终于要通过 web 浏览器访问 Cockpit web 界面了。根据配置,我们只需要用浏览器打开 https://ip-address:9090 或 https://server.domain.com:9090。在我们这篇博文中,我们用浏览器打开 https://128.199.114.17:9090,正如下图所示。 + +![通过 SSL 访问 Cockpit Web 服务](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-webserver-ssl-proceed.png) + +此时会出现一个 SSL 认证警告,因为我们正在使用一个自签名认证。我们只需要忽略这个警告并进入到登录页面,在 chrome/chromium 中,我们需要点击 Show Advanced 然后点击 **Proceed to 128.199.114.17 (unsafe)**。 + +![Cockpit 登录界面](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-login-screen.png) + +现在,要进入仪表盘,我们需要输入详细的登录信息。这里,用户名和密码和用于登录我们的 linux 服务器的用户名和密码相同。当我们输入登录信息并点击 Log In 按钮后,我们就会进入到 Cockpit 仪表盘。 + +![Cockpit 仪表盘](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-dashboard.png) + +这里我们可以看到所有的菜单以及 CPU、磁盘、网络、存储使用情况的可视化结果。仪表盘正如上图所示。 + +#### 服务 #### + +要管理服务,我们需要点击 web 页面右边菜单中的 Services 按钮。然后,我们会看到服务被分成了 5 个类别,目标、系统服务、套接字、计时器和路径。 + +![Cockpit 服务](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-services.png) + +#### Docker 容器 #### + +我们甚至可以用 Cockpit 管理 docker 容器。用 Cockpit 监控和管理 Docker 容器非常简单。由于我们的服务器中没有安装运行 docker,我们需要点击 Start Docker。 + + +![Cockpit 容器](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-container.png) + +Cockpit 会自动在我们的服务器上安装和运行 docker。启动之后,我们就会看到下面的截图。然后我们就可以按照需求管理 docker 镜像、容器。 + +![Cockpit 容器管理](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-containers-mangement.png) + +#### Journal 日志查看器 #### + +Cockpit 有个日志查看器,它把错误、警告、注意分到不同的标签页。我们也有一个 All 标签页,在这里可以看到所有的日志信息。 + +![Cockpit Journal 日志](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-journal-logs.png) + +#### 网络 #### + +在网络部分,我们可以看到两个可视化发送和接收速度的图。我们可以看到这里有一个可用网卡的列表,还有 Add Bond、Bridge、VLAN 的选项。如果我们需要配置一个网卡,我们只需要点击网卡名称。在下面,我们可以看到网络的 Journal 日志信息。 + +![Cockpit Network](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-network.png) + +#### 存储 #### + +现在,用 Cockpit 可以方便地查看硬盘的读写速度。我们可以查看存储的 Journal 日志以便进行故障排除和修复。在页面中还有一个已用空间的可视化图。我们甚至可以卸载、格式化、删除一块硬盘的某个分区。它还有类似创建 RAID 设备、卷组等攻能。 + +![Cockpit Storage](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-storage.png) + +#### 用户管理 #### + +通过 Cockpit Web 界面我们可以方便地创建新用户。在这里创建的账户会应用到系统用户账户。我们可以用它更改密码、指定角色、以及删除用户账户。 + +![Cockpit Accounts](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-accounts.png) + +#### 实时终端 #### + +Cockpit 还有一个很棒的特性。是的,我们可以执行命令,用 Cockpit 界面提供的实时终端执行任务。这使得我们可以根据我们的需求在 web 界面和终端之间自由切换。 + +![Cockpit 终端](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-terminal.png) + +### 总结 ### + +Cockpit 是由 [Red Hat][1] 开发的使得管理服务器变得轻松简单的免费开源软件。它非常适合于进行简单的系统管理任务和新手系统管理员。它仍然处于开发阶段,还没有稳定版发行。因此不适合于生产环境。它是针对最新的默认安装了 systemd 的 Fedora、CentOS、Arch Linux、RHEL 系统开发的。如果你想在 Ubuntu 上安装 Cockpit,你可以通过 PPA 访问,但现在已经过期了。如果你有任何疑问、建议,请在下面的评论框中反馈给我们,这样我们可以改进和更新我们的内容。非常感谢 ! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-cockpit-fedora-centos-rhel-arch-linux/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://www.redhat.com/ \ No newline at end of file diff --git a/translated/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md b/translated/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md new file mode 100644 index 0000000000..f115444665 --- /dev/null +++ b/translated/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md @@ -0,0 +1,425 @@ +15条给系统管理员的实用 Linux/Unix 磁带管理命令 +================================================================================ +磁带设备应只用于定期的文件归档或将数据从一台服务器传送至另一台。通常磁带设备与 Unix 机器连接,用 mt 或 mtx 控制。你可以将所有的数据备份到磁盘(也许是云中)和磁带设备。在这个教程中你将会了解到: + +- 磁带设备名 +- 管理磁带驱动器的基本命令 +- 基本的备份和恢复命令 + +### 为什么备份? ### + +一个备份设备是很重要的: + +- 从磁盘故障中恢复的能力 +- 意外的文件删除 +- 文件或文件系统损坏 +- 服务器完全毁坏,包括由于火灾或其他问题导致的同盘备份毁坏 + +你可以使用磁带归档备份整个服务器并将其离线存储。 + +### 理解磁带文件标记和块大小 ### + +![Fig.01: Tape file marks](http://s0.cyberciti.org/uploads/cms/2015/10/tape-format.jpg) + +图01:磁带文件标记 + +每个磁带设备能存储多个备份文件。磁带备份文件通过 cpio,tar,dd 等命令创建。但是,磁带设备可以由各种程序打开,写入数据,并关闭。你可以存储若干备份(磁带文件)到一个物理磁带上。在每个磁带文件之间有个“磁带文件标记”。这个是用来指示一个物理磁带上磁带文件的结尾以及另一个文件的开始。你需要使用 mt 命令来定位磁带(快进,倒带和标记)。 + +#### 磁带上的数据是如何存储的 #### + +![Fig.02: How data is stored on a tape](http://s0.cyberciti.org/uploads/cms/2015/10/how-data-is-stored-on-a-tape.jpg) + +图02:磁带上的数据是如何存储的 + +所有的数据使用 tar 以连续磁带存储格式连续地存储。第一个磁带归档会从磁带的物理开始端开始存储(tar #0)。接下来的就是 tar #1,以此类推。 + +### Unix 上的磁带设备名 ### + +1. /dev/rmt/0 或 /dev/rmt/1 或 /dev/rmt/[0-127] :Unix 上的常规磁带设备名。磁带自动倒回。 +1. /dev/rmt/0n :以无倒回为特征,换言之,磁带使用之后,停留在当前状态等待下个命令。 +1. /dev/rmt/0b :使用磁带接口,也就是 BSD 的行为。各种类型的操作系统比如 AIX,Windows,Linux,FreeBSD 等的行为更有可读性。 +1. /dev/rmt/0l :设置密度为低。 +1. /dev/rmt/0m :设置密度为中。 +1. /dev/rmt/0u :设置密度为高。 +1. /dev/rmt/0c :设置密度为压缩。 +1. /dev/st[0-9] :Linux 特定 SCSI 磁带设备名。 +1. /dev/sa[0-9] :FreeBSD 特定 SCSI 磁带设备名。 +1. /dev/esa0 :FreeBSD 特定 SCSI 磁带设备名,在关闭时弹出(如果可以的话)。 + +#### 磁带设备名示例 #### + +- /dev/rmt/1cn 指明正在使用 unity 1,压缩密度,无倒回。 +- /dev/rmt/0hb 指明正在使用 unity 0,高密度,BSD 行为。 +- Linux 上的自动倒回 SCSI 磁带设备名:/dev/st0 +- Linux 上的无倒回 SCSI 磁带设备名:/dev/nst0 +- FreeBSD 上的自动倒回 SCSI 磁带设备名:/dev/sa0 +- FreeBSD 上的无倒回 SCSI 磁带设备名:/dev/nsa0 + +#### 如何列出已安装的 scsi 磁带设备? #### + +输入下列命令: + + ## Linux(更多信息参阅 man) ## + lsscsi + lsscsi -g + + ## IBM AIX ## + lsdev -Cc tape + lsdev -Cc adsm + lscfg -vl rmt* + + ## Solaris Unix ## + cfgadm –a + cfgadm -al + luxadm probe + iostat -En + + ## HP-UX Unix ## + ioscan Cf + ioscan -funC tape + ioscan -fnC tape + ioscan -kfC tape + + +来自我的 Linux 服务器的输出示例: + +![Fig.03: Installed tape devices on Linux server](http://s0.cyberciti.org/uploads/cms/2015/10/linux-find-tape-devices-command.jpg) + +图03:Linux 服务器上已安装的磁带设备 + +### mt 命令实例 ### + +在 Linux 和类Unix系统上,mt 命令用来控制磁带驱动器的操作,比如查看状态或查找磁带上的文件或写入磁带控制标记。下列大多数命令需要作为 root 用户执行。语法如下: + + mt -f /tape/device/name operation + +#### 设置环境 #### + +你可以设置 TAPE shell 变量。这是磁带驱动器的路径名。在 FreeBSD 上默认的(如果变量没有设置,而不是 null)是 /dev/nsa0。可以通过 mt 命令的 -f 参数传递变量覆盖它,就像下面解释的那样。 + + ## 添加到你的 shell 配置文件 ## + TAPE=/dev/st1 #Linux + TAPE=/dev/rmt/2 #Unix + TAPE=/dev/nsa3 #FreeBSD + export TAPE + +### 1:显示磁带/驱动器状态 ### + + mt status #Use default + mt -f /dev/rmt/0 status #Unix + mt -f /dev/st0 status #Linux + mt -f /dev/nsa0 status #FreeBSD + mt -f /dev/rmt/1 status #Unix unity 1 也就是 tape device no. 1 + +你可以像下面一样使用 shell 循环调查系统并定位所有的磁带驱动器: + + for d in 0 1 2 3 4 5 + do + mt -f "/dev/rmt/${d}" status + done + +### 2:倒带 ### + + mt rew + mt rewind + mt -f /dev/mt/0 rewind + mt -f /dev/st0 rewind + +### 3:弹出磁带 ### + + mt off + mt offline + mt eject + mt -f /dev/mt/0 off + mt -f /dev/st0 eject + +### 4:擦除磁带(倒带,在可以的情况下卸载磁带) ### + + mt erase + mt -f /dev/st0 erase #Linux + mt -f /dev/rmt/0 erase #Unix + +### 5:张紧磁带盒 ### + +如果磁带在读取时发生错误,你重新张紧磁带,清洁磁带驱动器,像下面这样再试一次: + + mt retension + mt -f /dev/rmt/1 retension #Unix + mt -f /dev/st0 retension #Linux + +### 6:在磁带当前位置写入 EOF 标记 ### + + mt eof + mt weof + mt -f /dev/st0 eof + +### 7:将磁带前进指定的文件标记数目,即跳过指定个 EOF 标记 ### + +磁带定位在下一个文件的第一个块,即磁带会定位在下一区域的第一个块(见图01): + + mt fsf + mt -f /dev/rmt/0 fsf + mt -f /dev/rmt/1 fsf 1 #go 1 forward file/tape (see fig.01) + +### 8:将磁带后退指定的文件标记数目,即倒带指定个 EOF 标记 ### + +磁带定位在下一个文件的第一个块,即磁带会定位在 EOF 标记之后(见图01): + + mt bsf + mt -f /dev/rmt/1 bsf + mt -f /dev/rmt/1 bsf 1 #go 1 backward file/tape (see fig.01) + +这里是磁带定位命令列表: + + fsf 前进指定的文件标记数目。磁带定位在下一个文件的第一块。 + + fsfm 前进指定的文件标记数目。磁带定位在前一文件的最后一块。 + + bsf 后退指定的文件标记数目。磁带定位在前一文件的最后一块。 + + bsfm 后退指定的文件标记数目。磁带定位在下一个文件的第一块。 + + asf The tape is positioned at the beginning of the count file. Positioning is done by first rewinding the tape and then spacing forward over count filemarks.磁带定位在 + + fsr 前进指定的记录数。 + + bsr 后退指定的记录数。 + + fss (SCSI tapes)前进指定的 setmarks。 + + bss (SCSI tapes)后退指定的 setmarks。 + +### 基本备份命令 ### + +让我们来看看备份和恢复命令。 + +### 9:备份目录(tar 格式) ### + + tar cvf /dev/rmt/0n /etc + tar cvf /dev/st0 /etc + +### 10:恢复目录(tar 格式) ### + + tar xvf /dev/rmt/0n -C /path/to/restore + tar xvf /dev/st0 -C /tmp + +### 11:列出或检查磁带内容(tar 格式) ### + + mt -f /dev/st0 rewind; dd if=/dev/st0 of=- + + ## tar 格式 ## + tar tvf {DEVICE} {Directory-FileName} + tar tvf /dev/st0 + tar tvf /dev/st0 desktop + tar tvf /dev/rmt/0 foo > list.txt + +### 12:使用 dump 或 ufsdump 备份分区 ### + + ## Unix 备份 c0t0d0s2 分区 ## + ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t0d0s2 + + ## Linux 备份 /home 分区 ## + dump 0uf /dev/nst0 /dev/sda5 + dump 0uf /dev/nst0 /home + + ## FreeBSD 备份 /usr 分区 ## + dump -0aL -b64 -f /dev/nsa0 /usr + +### 12:使用 ufsrestore 或 restore 恢复分区 ### + + ## Unix ## + ufsrestore xf /dev/rmt/0 + ## Unix 交互式恢复 ## + ufsrestore if /dev/rmt/0 + + ## Linux ## + restore rf /dev/nst0 + ## 从磁带媒介上的第6个备份交互式恢复 ## + restore isf 6 /dev/nst0 + + ## FreeBSD 恢复 ufsdump 格式 ## + restore -i -f /dev/nsa0 + +### 13:从磁带开头开始写入(见图02) ### + + ## 这会覆盖磁带上的所有数据 ## + mt -f /dev/st1 rewind + + ### 备份 home ## + tar cvf /dev/st1 /home + + ## 离线并卸载磁带 ## + mt -f /dev/st0 offline + +从磁带开头开始恢复: + + mt -f /dev/st0 rewind + tar xvf /dev/st0 + mt -f /dev/st0 offline + +### 14:从最后一个 tar 后开始写入(见图02) ### + + ## 这会保留之前写入的数据 ## + mt -f /dev/st1 eom + + ### 备份 home ## + tar cvf /dev/st1 /home + + ## 卸载 ## + mt -f /dev/st0 offline + +### 15:从 tar number 2 后开始写入(见图02) ### + + ## 在 tar number 2 之后写入(应该是 2+1) + mt -f /dev/st0 asf 3 + tar cvf /dev/st0 /usr + + ## asf 等效于 fsf ## + mt -f /dev/sf0 rewind + mt -f /dev/st0 fsf 2 + +从 tar number 2 恢复 tar: + + mt -f /dev/st0 asf 3 + tar xvf /dev/st0 + mt -f /dev/st0 offline + +### 如何验证使用 tar 创建的备份磁带? ### + +定期做全系统修复和服务测试是很重要的,这是唯一确定整个系统正确工作的途径。参见我们的[验证 tar 命令磁带备份的教程][1]以获取更多信息。 + +### 示例 shell 脚本 ### + + #!/bin/bash + # A UNIX / Linux shell script to backup dirs to tape device like /dev/st0 (linux) + # This script make both full and incremental backups. + # You need at two sets of five tapes. Label each tape as Mon, Tue, Wed, Thu and Fri. + # You can run script at midnight or early morning each day using cronjons. + # The operator or sys admin can replace the tape every day after the script has done. + # Script must run as root or configure permission via sudo. + # ------------------------------------------------------------------------- + # Copyright (c) 1999 Vivek Gite + # This script is licensed under GNU GPL version 2.0 or above + # ------------------------------------------------------------------------- + # This script is part of nixCraft shell script collection (NSSC) + # Visit http://bash.cyberciti.biz/ for more information. + # ------------------------------------------------------------------------- + # Last updated on : March-2003 - Added log file support. + # Last updated on : Feb-2007 - Added support for excluding files / dirs. + # ------------------------------------------------------------------------- + LOGBASE=/root/backup/log + + # Backup dirs; do not prefix / + BACKUP_ROOT_DIR="home sales" + + # Get todays day like Mon, Tue and so on + NOW=$(date +"%a") + + # Tape devie name + TAPE="/dev/st0" + + # Exclude file + TAR_ARGS="" + EXCLUDE_CONF=/root/.backup.exclude.conf + + # Backup Log file + LOGFIILE=$LOGBASE/$NOW.backup.log + + # Path to binaries + TAR=/bin/tar + MT=/bin/mt + MKDIR=/bin/mkdir + + # ------------------------------------------------------------------------ + # Excluding files when using tar + # Create a file called $EXCLUDE_CONF using a text editor + # Add files matching patterns such as follows (regex allowed): + # home/vivek/iso + # home/vivek/*.cpp~ + # ------------------------------------------------------------------------ + [ -f $EXCLUDE_CONF ] && TAR_ARGS="-X $EXCLUDE_CONF" + + #### Custom functions ##### + # Make a full backup + full_backup(){ + local old=$(pwd) + cd / + $TAR $TAR_ARGS -cvpf $TAPE $BACKUP_ROOT_DIR + $MT -f $TAPE rewind + $MT -f $TAPE offline + cd $old + } + + # Make a partial backup + partial_backup(){ + local old=$(pwd) + cd / + $TAR $TAR_ARGS -cvpf $TAPE -N "$(date -d '1 day ago')" $BACKUP_ROOT_DIR + $MT -f $TAPE rewind + $MT -f $TAPE offline + cd $old + } + + # Make sure all dirs exits + verify_backup_dirs(){ + local s=0 + for d in $BACKUP_ROOT_DIR + do + if [ ! -d /$d ]; + then + echo "Error : /$d directory does not exits!" + s=1 + fi + done + # if not; just die + [ $s -eq 1 ] && exit 1 + } + + #### Main logic #### + + # Make sure log dir exits + [ ! -d $LOGBASE ] && $MKDIR -p $LOGBASE + + # Verify dirs + verify_backup_dirs + + # Okay let us start backup procedure + # If it is Monday make a full backup; + # For Tue to Fri make a partial backup + # Weekend no backups + case $NOW in + Mon) full_backup;; + Tue|Wed|Thu|Fri) partial_backup;; + *) ;; + esac > $LOGFIILE 2>&1 + +### 关于第三方备份工具 ### + +Linux 和类Unix系统都提供了许多第三方工具,可以用来安排备份,包括磁带备份在内,如: + +- Amanda +- Bacula +- rsync +- duplicity +- rsnapshot + +另行参阅 + +- Man pages - [mt(1)][2], [mtx(1)][3], [tar(1)][4], [dump(8)][5], [restore(8)][6] + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/hardware/unix-linux-basic-tape-management-commands/ + +作者:Vivek Gite +译者:[alim0x](https://github.com/alim0x) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.cyberciti.biz/faq/unix-verify-tape-backup/ +[2]:http://www.manpager.com/linux/man1/mt.1.html +[3]:http://www.manpager.com/linux/man1/mtx.1.html +[4]:http://www.manpager.com/linux/man1/tar.1.html +[5]:http://www.manpager.com/linux/man8/dump.8.html +[6]:http://www.manpager.com/linux/man8/restore.8.html diff --git a/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md b/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md index 7e0ccc87c7..c931365600 100644 --- a/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md +++ b/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md @@ -1,6 +1,10 @@ -# 使用SystemBack备份你的Ubuntu/Linux Mint(系统还原) +# 使用 SystemBack 备份你的 Ubuntu/Linux Mint(系统还原) -系统还原对于任何一款允许用户还原电脑到之前状态(包括文件系统,安装的应用,以及系统设置)的操作系统来说,都是必备功能,可以处理系统故障以及其他的问题。有的时候安装一个程序或者驱动可能让你的系统黑屏。系统还原则让你电脑里面的系统文件(译者注:是系统文件,并非普通文件,详情请看**注意**部分)和程序恢复到之前工作正常时候的状态,进而让你远离那让人头痛的排障过程了。而且它也不会影响你的文件,照片或者其他数据。简单的系统备份还原工具[Systemback](https://launchpad.net/systemback)让你很容易地创建系统备份以及用户配置文件。如果遇到问题,你可以傻瓜式还原。它还有一些额外的特征包括系统复制,系统安装以及Live系统创建。 +对于任何一款允许用户还原电脑到之前状态(包括文件系统,安装的应用,以及系统设置)的操作系统来说,系统还原都是必备功能,可以恢复系统故障以及其他的问题。 + +有的时候安装一个程序或者驱动可能让你的系统黑屏。系统还原则让你电脑里面的系统文件(译者注:是系统文件,并非普通文件,详情请看**注意**部分)和程序恢复到之前工作正常时候的状态,进而让你远离那让人头痛的排障过程了。而且它也不会影响你的文件,照片或者其他数据。 + +简单的系统备份还原工具[Systemback](https://launchpad.net/systemback)让你很容易地创建系统备份以及用户配置文件。一旦遇到问题,你可以简单地恢复到系统先前的状态。它还有一些额外的特征包括系统复制,系统安装以及Live系统创建。 截图 @@ -12,7 +16,7 @@ ![](http://1.bp.blogspot.com/-t_gmcoQZrvM/VlilhLP--TI/AAAAAAAAGt0/GWBg6bGeeaI/s1600/systemback-5.jpg) -**注意**:使用系统还原不会还原你的文件,音乐,电子邮件或者其他任何类型的私人文件。对不同用户来讲,这既是优点又是缺点。坏消息是它不会还原你意外删除的文件,不过你可以通过一个文件恢复程序来解决这个问题。如果你的计算机上没有系统还原点,那么系统还原工具就不会奏效了。(最后一句没有太理解) +**注意**:使用系统还原不会还原你的文件,音乐,电子邮件或者其他任何类型的私人文件。对不同用户来讲,这既是优点又是缺点。坏消息是它不会还原你意外删除的文件,不过你可以通过一个文件恢复程序来解决这个问题。如果你的计算机没有还原点,那么系统恢复就无法奏效,所以这个工具就无法帮助你(还原系统),如果你尝试恢复一个主要问题,你将需要移步到另外的步骤来进行故障排除。 > > >适用于Ubuntu 15.10 Wily/16.04/15.04 Vivid/14.04 Trusty/Linux Mint 14.x/其他Ubuntu衍生版,打开终端,将下面这些命令复制过去: @@ -32,7 +36,7 @@ sudo apt-get install systemback via: http://www.noobslab.com/2015/11/backup-system-restore-point-your.html 译者:[DongShuaike](https://github.com/DongShuaike) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20151201 How to use Mutt email client with encrypted passwords.md b/translated/tech/20151201 How to use Mutt email client with encrypted passwords.md deleted file mode 100644 index 1e8a032a04..0000000000 --- a/translated/tech/20151201 How to use Mutt email client with encrypted passwords.md +++ /dev/null @@ -1,138 +0,0 @@ -如何使用加密过密码的Mutt邮件客户端 -================================================================================ -Mutt是一个开源的Linux/UNIX终端环境下的邮件客户端。连同[Alpine][1],Mutt有充分的理由在Linux命令行热衷者中有最忠诚的追随者。想一下你对邮件客户端的期待的事情,Mutt拥有:多协议支持(e.g., POP3, IMAP and SMTP),S/MIME和PGP/GPG集成,线程会话,颜色编码,可定制宏/快捷键,等等。另外,基于命令行的Mutt相比笨重的web浏览器(如:Gmail,Ymail)或可视化邮件客户端(如:Thunderbird,MS Outlook)是一个轻量访问电子邮件的选择。 - -当你想使用Mutt通过公司的SMTP/IMAP服务器访问或发送邮件,或取代网页邮件服务,可能所关心的一个问题是如何保护您的邮件凭据(如:SMTP/IMAP密码)存储在一个纯文本Mutt配置文件(~/.muttrc)。 - -对于一些人安全的担忧,确实有一个容易的方法来**加密Mutt配置文件***,防止这种风险。在这个教程中,我描述了如何加密Mutt敏感配置,比如SMTP/IMAP密码使用GnuPG(GPG),一个开源的OpenPGP实现。 - -### 第一步 (可选):创建GPG密钥 ### - -因为我们将要使用GPG加密Mutt配置文件,如果你没有,第一步就是创建一个GPG密钥(公有/私有 密钥对)。如果有,忽略这步。 - -创建一个新GPG密钥,输入下面的。 - - $ gpg --gen-key - -选择密钥类型(RSA),密钥长度(2048 bits),和过期时间(0,不过期)。当出现用户ID提示时,输入你的名字(Dan Nanni) 和邮箱地址(myemail@email.com)关联到私有/公有密钥对。最后,输入一个密码来保护你的私钥。 - -![](https://c2.staticflickr.com/6/5726/22808727824_7735f11157_c.jpg) - -生成一个GPG密钥需要大量的随机字节熵,所以在生成密钥期间确保在你的系统上执行一些随机行为(如:打键盘,移动鼠标或者读写磁盘)。根据密钥长度决定生成GPG密钥要花几分钟或更多时间。 - -![](https://c1.staticflickr.com/1/644/23328597612_6ac5a29944_c.jpg) - -### 第二部:加密Mutt敏感配置 ### - -下一步,在~/.mutt目录创建一个新的文本文件,然后把一些你想隐藏的Mutt敏感配置放进去。这个例子里,我指定了SMTP/IMAP密码。 - - $ mkdir ~/.mutt - $ vi ~/.mutt/password - ----------- - - set smtp_pass="XXXXXXX" - set imap_pass="XXXXXXX" - -现在gpg用你的公钥加密这个文件如下。 - - $ gpg -r myemail@email.com -e ~/.mutt/password - -这将创建~/.mutt/password.gpg,这个是一个GPG加密原始版本文件。 - -继续删除~/.mutt/password,只保留GPG加密版本。 - -### 第三部:创建完整Mutt配置文件 ### - -由于你已经在一个单独的文件加密了Mutt敏感配置,你可以在~/.muttrc指定其余的Mutt配置。然后增加下面这行在~/.muttrc末尾。 - - source "gpg -d ~/.mutt/password.gpg |" - -当你使用Mutt,这行将解密~/.mutt/password.gpg,然后将解密内容应用到你的Mutt配置。 - -下面展示一个完整Mutt配置例子,这允许你用Mutt访问Gmail,没有暴露你的SMTP/IMAP密码。取代你用Gmail ID登陆你的账户。 - - set from = "yourgmailaccount@gmail.com" - set realname = "Your Name" - set smtp_url = "smtp://yourgmailaccount@smtp.gmail.com:587/" - set imap_user = "yourgmailaccount@gmail.com" - set folder = "imaps://imap.gmail.com:993" - set spoolfile = "+INBOX" - set postponed = "+[Google Mail]/Drafts" - set trash = "+[Google Mail]/Trash" - set header_cache =~/.mutt/cache/headers - set message_cachedir =~/.mutt/cache/bodies - set certificate_file =~/.mutt/certificates - set move = no - set imap_keepalive = 900 - - # encrypted IMAP/SMTP passwords - source "gpg -d ~/.mutt/password.gpg |" - -### 第四部(可选):配置GPG代理 ### - -这时候,你将可以使用加密了IMAP/SMTP密码的Mutt。无论如何,每次你运行Mutt,你都要先被提示输入一个GPG密码来使用你的私钥解密IMAP/SMTP密码。 - -![](https://c2.staticflickr.com/6/5667/23437064775_20c874940f_c.jpg) - -如果你想避免这样的GPG密码提示,你可以部署gpg代理。运行一个后台程序,gpg代理安全的缓存你的GPG密码,无需手工干预gpg自动从gpg代理获得你的GPG密码。如果你正在使用Linux桌面,你可以使用桌面特定方式来配置一些东西等价于gpg代理,例如,GNOME桌面的gnome-keyring-daemon。 - -你可以在基于Debian系统安装gpg代理: - -$ sudo apt-get install gpg-agent - -gpg代理是基于Red Hat系统预装的。 - -现在增加下面这些道你的.bashrc文件。 - - envfile="$HOME/.gnupg/gpg-agent.env" - if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then - eval "$(cat "$envfile")" - else - eval "$(gpg-agent --daemon --allow-preset-passphrase --write-env-file "$envfile")" - fi - export GPG_AGENT_INFO - -重载.bashrc,或单纯的登出然后登陆回来。 - - $ source ~/.bashrc - -现在确认GPG_AGENT_INFO环境变量已经设置妥当。 - - $ echo $GPG_AGENT_INFO - ----------- - - /tmp/gpg-0SKJw8/S.gpg-agent:942:1 - -并且,当你输入gpg-agent命令时,你应该看到下面的信息。 - - $ gpg-agent - ----------- - - gpg-agent: gpg-agent running and available - -一旦gpg-agent启动运行,它将会在第一次提示你输入密码时缓存你的GPG密码。随后你运行Mutt多次,你将不会被提示要GPG密码(gpg-agent一直开着,缓存就不会过期)。 - -![](https://c1.staticflickr.com/1/664/22809928093_3be57698ce_c.jpg) - -### 结论 ### - -在这个指导里,我提出一个方法加密Mutt敏感配置如SMTP/IMAP密码使用GnuPG。注意,如果你想在Mutt上使用GnuPG或者登陆你的邮件信息,你可以参考[官方指南][2]在使用GPG与Mutt结合。 - -如果你知道任何使用Mutt的安全技巧,随时分享他。 - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/mutt-email-client-encrypted-passwords.html - -作者:[Dan Nanni][a] -译者:[wyangsun](https://github.com/wyangsun) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://xmodulo.com/gmail-command-line-linux-alpine.html -[2]:http://dev.mutt.org/trac/wiki/MuttGuide/UseGPG diff --git a/sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md b/translated/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md similarity index 50% rename from sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md rename to translated/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md index 5424c7cd68..3b3f72ac4c 100644 --- a/sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md +++ b/translated/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md @@ -1,61 +1,64 @@ -How to Install Light Table 0.8 in Ubuntu 14.04, 15.10 + 如何在 Ubuntu 14.04, 15.10 中安装Light Table 0.8 ================================================================================ ![](http://ubuntuhandbook.org/wp-content/uploads/2014/11/LightTable-IDE-logo-icon.png) -The Light Table IDE has just reached a new stable release after more than one year of development. Now it provides 64-bit only binary for Linux. +Light Table 在经过一年以上的开发,已经推出了新的稳定发行版本。现在它只为Linux提供64位的二进制包。 +LightTable 0.8.0的改动: -Changes in LightTable 0.8.0: - -- CHANGED: We have switched to Electron from NW.js -- CHANGED: LT’s releases and self-updating processes are completely in the open on Github -- ADDED: LT can be built from source with provided scripts across supported platforms -- ADDED: Most of LT’s node libraries are installed as npm dependencies instead of as forked libraries -- ADDED: Significant documentation. See more below -- FIX: Major usability issues on >= OSX 10.10 -- CHANGED: 32-bit linux is no longer an official download. Building from source will still be supported -- FIX: ClojureScript eval for modern versions of ClojureScript -- More details at [github.com/LightTable/LightTable/releases][1] +- 更改: 我们从 NW.js 中选择了 Electron +- 更改: LT’s 发行版本与自更新进程在github上面完全的公开 +- 增加: LT 可以由提供的脚本从源码在支持的不同平台上安装 +- 增加: LT’s 大部分的代码库将用npm依赖来安装以取代以forked库安装 +- 增加: 有效文档. 更多详情内容见下面 +- 修复: 版本号>= OSX 10.10的系统下工作的主要的可用性问题 +- 更改: 32位Linux不再提供官方包文件下载,从源码安装仍旧将被支持 +- 修复: ClojureScript eval 在ClojureScript的现代版本可以正常工作 +- 参阅更多 [github.com/LightTable/LightTable/releases][1] ![LightTable 0.8.0](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-08.jpg) -### How to Install Light Table 0.8.0 in Ubuntu: ### +### 如何在Ubuntu中安Light Table 0.8.0: ### -Below steps show you how to install the official binary in Ubuntu. Works on all current Ubuntu releases (**64-bit only**). +下面的步骤回指导你怎么样在Ubuntu下安装官方的二进制包,在目前Ubuntu发行版本都适用(**仅仅针对64位**)。 -Before getting started, please make a backup if you have a previous release installed. +在开始之前,如果你安装了之前的版本请做好备份。 -**1.** Download the Linux binary from link below: +**1.** +从以下链接下载LightTable Linux下的二进制文件: - [lighttable-0.8.0-linux.tar.gz][2] -**2.** Open terminal from Unity Dash, App Launcher, or via Ctrl+Alt+T keys. When it opens, paste below command and hit enter: +**2.** +从dash或是应用启动器,或者是Ctrl+Alt+T快捷键打开终端,并且在输入以下命令后敲击回车键: gksudo file-roller ~/Downloads/lighttable-0.8.0-linux.tar.gz ![open-via-fileroller](http://ubuntuhandbook.org/wp-content/uploads/2015/12/open-via-fileroller.jpg) -Install `gksu` from Ubuntu Software Center if the command does not work. +如果命令不工作的话从Ubuntu软件中心安装`gksu`。 -**3.** Previous command opens the downloaded archive via Archive Manager using root user privilege. +**3.** +之前的命令使用了root用户权限通过档案管理器打开了下载好的存档。 -When it opens, do: -- right-click and rename the folder name to **LightTable** -- extract it to **Computer -> /opt/** directory. +打开它后,请做以下步骤: + +- 右击文件并且将其重命名为 **LightTable** +- 将其解压到 **Computer -> /opt/** 目录下。 ![extract-lighttable](http://ubuntuhandbook.org/wp-content/uploads/2015/12/extract-lighttable.jpg) -Finally you should have the LightTable installed to /opt/ directory: +最终你应该安装好了LightTable,可以在/opt/ 目录下查看: ![lighttable-in-opt](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-in-opt.jpg) -**4.** Create a launcher so you can start LightTable from Unity Dash or App Launcher. +**4.** 创建一个启动器使你可以从dash工具或是应用启动器打开LightTable。 -Open terminal and run below command to create & edit a launcher file for LightTable: +打开终端,运行以下命令来创建与编辑一个LightTable的启动文件: gksudo gedit /usr/share/applications/lighttable.desktop -When the file opens via Gedit text editor, paste below and save the file: +通过Gedit文本编辑器打开文件后, 粘贴下面的内容并保存: [Desktop Entry] Version=1.0 @@ -83,11 +86,11 @@ When the file opens via Gedit text editor, paste below and save the file: Exec=/opt/LightTable/LightTable --command new_file OnlyShowIn=Unity; -So it looks like: +因此它看起来像: ![lighttable-launcher](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-launcher.jpg) -Finally launch the IDE from Unity Dash or Application Launcher and enjoy! +最后,从dash工具或者是应用启动器打开IDE,好好享受它吧! -------------------------------------------------------------------------------- @@ -101,4 +104,4 @@ via: http://ubuntuhandbook.org/index.php/2015/12/install-light-table-0-8-ubuntu- [a]:http://ubuntuhandbook.org/index.php/about/ [1]:https://github.com/LightTable/LightTable/releases -[2]:https://github.com/LightTable/LightTable/releases/download/0.8.0/lighttable-0.8.0-linux.tar.gz \ No newline at end of file +[2]:https://github.com/LightTable/LightTable/releases/download/0.8.0/lighttable-0.8.0-linux.tar.gz diff --git a/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md b/translated/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md similarity index 70% rename from sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md rename to translated/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md index db254d3858..ce9c76f324 100644 --- a/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md +++ b/translated/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md @@ -1,14 +1,18 @@ -Linux / Unix Desktop Fun: Text Mode ASCII-art Box and Comment Drawing + +Linux / Unix 桌面娱乐 : +文字模式的带有ASCII艺术的Box与评论绘制 + ================================================================================ -Boxes command is a text filter and a little known tool that can draw any kind of ASCII art box around its input text or code for fun and profit. You can quickly create email signatures, or create regional comments in any programming language. This command was intended to be used with the vim text editor, but can be tied to any text editor which supports filters, as well as from the command line as a standalone tool. +Boxes 命令不仅是一个文本过滤器,同时是一个很少人知道的可以为了乐趣或者需要在它的输入文本或者代码周围画各种ASCII艺术画的工具。你可以迅速创建邮件签名,或者使用各种编程语言创建局部评论。这个命令计划被vim文本编辑器使用,但是也可以被支持过滤的文本编辑器使用,同时从命令行作为一个单独的工具使用。 -### Task: Install boxes ### -Use the [apt-get command][1] to install boxes under Debian / Ubuntu Linux: +### 任务: 安装 boxes ### + +使用 [apt-get command][1] 在 Debian / Ubuntu Linux中安装 boxes : $ sudo apt-get install boxes -Sample outputs: +输出示例 : Reading package lists... Done Building dependency tree @@ -24,11 +28,11 @@ Sample outputs: Processing triggers for man-db ... Setting up boxes (1.0.1a-2.3) ... -RHEL / CentOS / Fedora Linux users, use the [yum command to install boxes][2] (first [enable EPEL repo as described here][3]): +RHEL / CentOS / Fedora Linux 用户, 使用 [yum command to install boxes][2] (首先 [enable EPEL repo as described here][3]): # yum install boxes -Sample outputs: +输出示例 : Loaded plugins: rhnplugin Setting up Install Process @@ -60,51 +64,53 @@ Sample outputs: boxes.x86_64 0:1.1-8.el6 Complete! -FreeBSD user can use the port as follows: +FreeBSD 用户可以按如下来使用 : cd /usr/ports/misc/boxes/ && make install clean -Or, add the package using the pkg_add command: +或者,使用 pkg_add 命令来增加包: # pkg_add -r boxes -### Draw any kind of box around some given text ### +### 在一些给定文本周围画出任何种类的box ### -Type the following command: +输入下列命令 : echo "This is a test" | boxes -Or specify the name of the design to use: +或者,通过设置要使用的设计的名字来使用 : echo -e "\n\tVivek Gite\n\tvivek@nixcraft.com\n\twww.cyberciti.biz" | boxes -d dog -Sample outputs: +输出示例 : ![Unix / Linux: Boxes Command To Draw Various Designs](http://s0.cyberciti.org/uploads/l/tips/2012/06/unix-linux-boxes-draw-dog-design.png) -Fig.01: Unix / Linux: Boxes Command To Draw Various Designs +Fig.01: Unix / Linux: Boxes 命令来画出各式各样的设计 -#### How do I list all designs? #### +#### 怎么样输出所有的设计 #### -The syntax is: +语法如下: boxes option pipe | boxes options echo "text" | boxes -d foo boxes -l -The -d design option sets the name of the design to use. The syntax is: +设计 -d 选项设置要使用的设计的名字 . 语法如下: + echo "Text" | boxes -d design pipe | boxes -d desig -The -l option list designs. It produces a listing of all available box designs in the config file, along with a sample box and information about it's creator: +-l 选项列出所有设计 . 它显示在配置文件中的所有的box设计图,同时也显示关于其创作者的信息。 + boxes -l boxes -l | more boxes -l | less -Sample outputs: +输出示例: 43 Available Styles in "/etc/boxes/boxes-config": ------------------------------------------------- @@ -140,32 +146,32 @@ Sample outputs: output truncated .. -### How do I filter text via boxes while using vi/vim text editor? ### +### 在使用vi/vim文本编辑器时如何通过boxes过滤文本? ### -You can use any external command with vi or vim. In this example, [insert current date and time][4], enter: +你可以使用vi或vim支持的任何附加命令,在这个例子中, [insert current date and time][4], 输入: !!date -OR +或者 :r !date - -You need to type above command in Vim to read the output from the date command. This will insert the date and time after the current line: +你需要在vim中输入以上命令来读取数据命令的输出,这将在当前行后面加入日期和时分秒: Tue Jun 12 00:05:38 IST 2012 -You can do the same with boxes command. Create a sample shell script or a c program as follows: +你可以用boxes命令做到同样的. 创建一个作为样本的shell脚本或者如下的一个c程序: + #!/bin/bash Purpose: Backup mysql database to remote server. Author: Vivek Gite Last updated on: Tue Jun, 12 2012 -Now type the following (move cursor to the second line i.e. line which starts with "Purpose: ...") +现在输入如下 (将光标移到第二行,也就是以"Purpose: ..."开头的行) 3!!boxes -And voila you will get the output as follows: +瞧,你就会看到如下的输出 : #!/bin/bash /****************************************************/ @@ -173,24 +179,23 @@ And voila you will get the output as follows: /* Author: Vivek Gite */ /* Last updated on: Tue Jun, 12 2012 */ /****************************************************/ - -This video will give you an introduction to boxes command: +这个短片将会给你介绍boxes命令: 注:youtube 视频 (Video:01: boxes command in action. BTW, this is my first video so go easy on me and let me know what you think.) -See also +另见 -- boxes man page +- boxes man 手册 -------------------------------------------------------------------------------- via: http://www.cyberciti.biz/tips/unix-linux-draw-any-kind-of-boxes-around-text-editor.html 作者:Vivek Gite -译者:[译者ID](https://github.com/译者ID) +译者:[zky001](https://github.com/zky001) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -198,4 +203,4 @@ via: http://www.cyberciti.biz/tips/unix-linux-draw-any-kind-of-boxes-around-text [1]:http://www.cyberciti.biz/tips/linux-debian-package-management-cheat-sheet.html [2]:http://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/ [3]:http://www.cyberciti.biz/faq/fedora-sl-centos-redhat6-enable-epel-repo/ -[4]:http://www.cyberciti.biz/faq/vim-inserting-current-date-time-under-linux-unix-osx/ \ No newline at end of file +[4]:http://www.cyberciti.biz/faq/vim-inserting-current-date-time-under-linux-unix-osx/ diff --git a/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md b/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md new file mode 100644 index 0000000000..6f9f3690cb --- /dev/null +++ b/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md @@ -0,0 +1,297 @@ + +怎样在ubuntu和debian中用命令行使用KVM +================================================================================ +有很多不同的方式去管理运行在KVM管理程序上的虚拟机。例如,virt-manager就是一个流行的基于图形用户界面的前端虚拟机管理工具。然而,如果你想要在没有图形窗口的服务器环境下使用KVM,那么基于图形用户界面的解决方案显然是行不通的。事实上,你可以纯粹的使用包装了kvm命令行脚本的命令行来管理KVM虚拟机。作为替代方案,你可以使用virsh这个容易使用的命令行用户接口来管理客户虚拟机。在virsh中,它通过和libvirtd服务通信来达到控制虚拟机的目的,而libvirtd可以控制几个不同的虚拟机管理器,包括KVM,Xen,QEMU,LXC和OpenVZ。 + 当你想要对虚拟机的前期准备和后期管理实现自动化操作时,像virsh这样的命令行管理工具是非常有用的。同样,virsh支持多个管理器的事实也意味着你可以通过相同的virsh接口去管理不同的虚拟机管理器。 + 在这篇文章中,我会示范**怎样在ubuntu和debian上通过使用virsh命令行去运行KVM**。 + +### 第一步:确认你的硬件平台支持虚拟化 ### + +作为第一步,首先要确认你的主机CPU配备了硬件虚拟化拓展(e.g.,Intel VT或者AMD-V),这是KVM对硬件的要求。下面的命令可以检查硬件是否支持虚拟化。 + + $ egrep '(vmx|svm)' --color /proc/cpuinfo + +![](https://c2.staticflickr.com/2/1505/24050288606_758a44c4c6_c.jpg) + + 如果在输出中不包含vmx或者svm标识,那么就意味着你的主机cpu不支持硬件虚拟化。因此你不能在你的机器上使用KVM。确认了主机cpu存在vmx或者svm之后,接下来开始安装KVM。 +对于KVM来说,它不要求运行在拥有64位内核系统的主机上,但是通常我们会推荐在64位系统的主机上面运行KVM。 + +### 第二步:安装KVM ### + +使用apt-get安装KVM和相关的用户空间工具。 + + $ sudo apt-get install qemu-kvm libvirt-bin + +安装期间,libvirtd组(在debian上是libvirtd-qemu组)将会被创建,并且你的用户id将会被自动添加到该组中。这样做的目的是让你可以以一个普通用户而不是root用户的身份去管理虚拟机。你可以使用id命令来确认这一点,下面将会告诉你怎么去显示你的组id: + + $ id + +![](https://c2.staticflickr.com/6/5597/15432586092_64dfb867d3_c.jpg) + +如果因为某些原因,libvirt(在debian中是libvirt-qemu)没有在你的组id中被找到,你也可以手动将你自己添加到对应的组中,如下所示: +在ubuntu上: + + $ sudo adduser [youruserID] libvirtd + +在debian上: + + $ sudo adduser [youruserID] libvirt-qemu + +按照如下形式重修载入更新后的组成员关系。如果要求输入密码,那么输入你的登陆密码即可。 + + $ exec su -l $USER + +这时,你应该可以以普通用户的身份去执行virsh了。做一个如下所示的测试,这个命令将会以列表的形式列出可用的虚拟机(当前的列表是空的)。如果你没有遇到权限问题,那意味着迄今为止一切都是正常的。 + + $ virsh list + +---------- + + Id Name State + ---------------------------------------------------- + +### 第三步:配置桥接网络 ### + +为了使KVM虚拟机能够访问外部网络,一种方法是通过在KVM宿主机上创建Linux桥来实现。创建之后的桥能够将虚拟机的虚拟网卡和宿主机的物理网卡连接起来,因此,虚拟机能够发送和接受由物理网卡发送过来的流量数据包。这种方式叫做网桥连接。 +下面将告诉你如何创建并且配置网桥,我们称它为br0. +首先,安装一个必需的包,然后用命令行创建一个网桥。 + + $ sudo apt-get install bridge-utils + $ sudo brctl addbr br0 + +下一步就是配置已经创建好的网桥,即修改位于/etc/network/interfaces的配置文件。我们需要将该桥接网卡设置成开机启动。为了修改该配置文件,你需要关闭你的操作系统上的网络管理器(如果你在使用它的话)。跟随[操作指南][1]的说明去关闭网络管理器。 + 关闭网络管理器之后,接下来就是通过修改配置文件来配置网桥了。 + + #auto eth0 + #iface eth0 inet dhcp + + auto br0 + iface br0 inet dhcp + bridge_ports eth0 + bridge_stp off + bridge_fd 0 + bridge_maxwait 0 + + +在上面的配置中,我假设eth0是主要网卡,它也是连接到外网的网卡,同样,我假设eth0将会通过DHCP得到它的ip地址。注意,之前在/etc/network/interfaces中还没有对eth0进行任何配置。桥接网卡br0引用了eth0的配置,而eth0也会受到br0的制约。 +重启网络服务,并确认网桥已经被成功的配置好。如果成功的话,br0的ip地址将会是eth0的被自动分配的ip地址,而且eth0不会被分配任何ip地址。 + + $ sudo /etc/init.d/networking restart + $ ifconfig + +如果因为某些原因,eth0仍然保留了之前分配给了br0的ip地址,那么你可能必须明确的删除eth0的ip地址。 + +![](https://c2.staticflickr.com/2/1698/23780708850_66cd7ba6ea_c.jpg) + +###第四步:用命令行创建一个虚拟机 ### + +对于虚拟机来说,它的配置信息被存储在它对应的xml文件中。因此,创建一个虚拟机的第一步就是准备一个与主机名对应的xml文件。 +下面是一个示例xml文件,你可以根据需要手动修改它。 + + + alice + f5b8c05b-9c7a-3211-49b9-2bd635f7e2aa + 1048576 + 1048576 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/kvm + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + + + + +上面的主机xml配置文件定义了如下的虚拟机内容。 + +- 1GB内存,一个虚拟cpu和一个硬件驱动。 +- Disk image:/home/dev/images/alice.img。 +- Boot from CD-ROM(/home/dev/iso/CentOS-6.5-x86_64-minomal.iso)。 +- Networking:一个桥接到br0的虚拟网卡。 +- 通过VNC远程访问。 +中的UUID字符串可以随机生成。为了得到一个随机的uuid字符串,你可能需要使用uuid命令行工具。 + + $ sudo apt-get install uuid + $ uuid + +生成一个主机xml配置文件的方式就是通过一个已经存在的虚拟机来导出它的xml配置文件。如下所示。 + + $ virsh dumpxml alice > bob.xml + +![](https://c2.staticflickr.com/6/5808/23968234602_25e8019ec8_c.jpg) + +###第五步:使用命令行启动虚拟机### + +在启动虚拟机之前,我们需要创建它的初始磁盘镜像。为此,你需要使用qemu-img命令来生成一个你已经安装的qemu-kvm镜像。下面的命令将会创建10GB大小的空磁盘,并且它是qcow2格式的。 + + $ qemu-img create -f qcow2 /home/dev/images/alice.img 10G + +使用qcow2格式的磁盘镜像的好处就是它在创建之初并不会给它分配全部大小磁盘容量(这里是10GB),而是随着虚拟机中文件的增加而逐渐增大。因此,它对空间的使用更加有效。 +现在,你可以准备通过使用之前创建的xml配置文件启动你的虚拟机了。下面的命令将会创建一个虚拟机,然后自动启动它。 + + $ virsh create alice.xml + +---------- + + Domain alice created from alice.xml + +**注意**:如果你对一个已经存在的虚拟机运行了上面的命令,那么这个操作将会在没有警告信息的情况下抹去那个已经存在的虚拟机的全部信息。如果你已经创建了一个虚拟机,你可能会使用下面的命令来启动虚拟机。 + + $ virsh start alice.xml + +使用如下命令确认一个新的虚拟机已经被创建并成功的被启动。 + + $ virsh list + +---------- + + Id Name State + ---------------------------------------------------- + 3 alice running + +同样,使用如下命令确认你的虚拟机的虚拟网卡已经被成功的添加到了你先前创建的br0网桥中。 + + $ sudo brctl show + +![](https://c2.staticflickr.com/2/1546/23449585383_a371e9e579_c.jpg) + +### 远程连接虚拟机 ### + +为了远程访问一个正在运行的虚拟机的控制台,你可以使用VNC客户端。 +首先,你需要使用如下命令找出用于虚拟机的VNC端口号。 + + $ sudo netstat -nap | egrep '(kvm|qemu)' + +![](https://c2.staticflickr.com/6/5633/23448144274_49045bc868_c.jpg) + +在这个例子中,用于alice虚拟机的VNC端口号是5900 +然后启动一个VNC客户端,连接到一个端口号为5900的VNC服务器。在我们的例子中,虚拟机支持由CentOS光盘文件启动。 + +![](https://c2.staticflickr.com/2/1533/24076369675_99408972a4_c.jpg) + +### 使用virsh管理虚拟机 ### + +下面列出了virsh命令的常规用法 +创建客户机并且启动虚拟机: + + $ virsh create alice.xml + +停止虚拟机并且删除客户机 + + $ virsh destroy alice + +关闭虚拟机(不用删除它) + + $ virsh shutdown alice + +暂停虚拟机 + + $ virsh suspend alice + +恢复虚拟机 + + $ virsh resume alice + +访问正在运行的虚拟机的登陆控制台 + + $ virsh console alice + +设置虚拟机开机启动: + + $ virsh autostart alice + +查看虚拟机的详细信息 + + $ virsh dominfo alice + +编辑虚拟机的配置文件: + + $ virsh edit alice + +上面的这个命令将会使用一个默认的编辑器来调用主机配置文件。该配置文件中的任何改变都将自动被libvirt验证其正确性。 +你也可以在一个virsh会话中管理虚拟机。下面的命令会创建并进入到一个virsh会话中: + + $ virsh +在virsh提示中,你可以使用任何virsh命令。 + +![](https://c2.staticflickr.com/6/5645/23708565129_b1ef968b30_c.jpg) + +### 问题处理 ### + +1. 我在创建虚拟机的时候遇到了一个错误: + + error: internal error: no supported architecture for os type 'hvm' + + 如果你的硬件不支持虚拟化的话你可能就会遇到这个错误。(例如,Intel VT或者AMD-V),这是运行KVM所必需的。如果你遇到了这个错误,而你的cpu支持虚拟化,那么这里可以给你一些可用的解决方案: + +首先,检查你的内核模块是否丢失。 + + $ lsmod | grep kvm + +如果内核模块没有加载,你必须按照如下方式加载它。 + + $ sudo modprobe kvm_intel (for Intel processor) + $ sudo modprobe kvm_amd (for AMD processor) + +第二个解决方案就是添加“--connect qemu:///system”参数到virsh命令中,如下所示。当你正在你的硬件平台上使用超过一个虚拟机管理器的时候就需要添加这个参数(例如,VirtualBox,VMware)。 + $ virsh --connect qemu:///system create alice.xml + +2. 当我试着访问我的虚拟机的登陆控制台的时候遇到了错误: + + $ virsh console alice + +---------- + + error: internal error: cannot find character device + +这个错误发生的原因是你没有在你的虚拟机配置文件中定义控制台设备。在xml文件中加上下面的内部设备部分即可。 + + + + + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/use-kvm-command-line-debian-ubuntu.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/disable-network-manager-linux.html diff --git a/translated/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md b/translated/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md new file mode 100644 index 0000000000..befa31312f --- /dev/null +++ b/translated/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md @@ -0,0 +1,119 @@ +启用Nginx/Apache的PHP-FPM多实例 +================================================================================ + +PHP-FPM作为FastCGI进程管理器而广为熟知,它是PHP FastCGI实现的改进,带有更为有用的功能,用于处理高负载的服务器和网站。下面列出其中一些功能: +### 新功能 ### + + - 拥有具有优雅启动/停止选项的高级进程管理能力。 + - 可以以监听不同端口以及使用不同PHP配置的不同用户身份/组身份来运行进程。 + - 错误日志记录。 + - 支持上传加速。 + - 用于在处理一些耗时任务时结束请求和清空所有数据的特别功能。 + - 同时支持动态和静态子进程重生。 + - 支持IP地址限制。 + +在本文中,我将要讨论的是,在运行EA3下CPanel 11.52的CentOS 7服务器上与Nginx和Apache一起安装PHP-FPM,以及如何来通过CPanel管理这些安装好的多个PHP-FPM实例。 +Before going to the installation procedures, let us take a look on the pre-requisites. + +### 先决条件 ### + + 1. 启用 Mod_proxy_fcgi模块 + 2. 启用 MPM_Event + +由于我们要将PHP-FPM安装到一台EA3服务器,我们需要运行EasyApache来编译Apache以启用这些模块。 + +你们可以参考我以前写的,关于如何在Apache服务器上安装Nginx作为反向代理的文档来确认Nginx的安装。 + +这里,我将再次简述那些安装步骤。具体细节,你可以参考我之前写的**(如何在CentOS 7/CPanel服务器上配置Nginx反向代理)**一文。 + + 步骤 1:安装Epel仓库 + 步骤 2:安装nDeploy RPM仓库,这是此次安装中最为**重要**的步骤。 + 步骤 3:使用yum从nDeploy仓库安装nDeploy和Nginx插件。 + 步骤 4:启用/配置Nginx为反向代理。 + +完成这些步骤后,下面为服务器中所有可用PHP版本安装PHP-FPM包,EA3使用remi仓库来安装这些包。你可以运行这个nDeploy脚本来下载所有的包。 + + root@server1 [~]# /opt/nDeploy/scripts/easy_php_setup.sh + Loaded plugins: fastestmirror, tsflags, universal-hooks + EA4 | 2.9 kB 00:00:00 + base | 3.6 kB 00:00:00 + epel/x86_64/metalink | 9.7 kB 00:00:00 + epel | 4.3 kB 00:00:00 + extras | 3.4 kB 00:00:00 + updates | 3.4 kB 00:00:00 + (1/2): epel/x86_64/updateinfo | 460 kB 00:00:00 + (2/2): epel/x86_64/primary_db + +运行该脚本将为PHP 54,PHP 55,PHP 56和PHP 70安装所有这些FPM包。 + + Installed Packages + php54-php-fpm.x86_64 5.4.45-3.el7.remi @remi + php55-php-fpm.x86_64 5.5.31-1.el7.remi @remi + php56-php-fpm.x86_64 5.6.17-1.el7.remi @remi + php70-php-fpm.x86_64 7.0.2-1.el7.remi @remi + +在以上安装完成后,你需要为Apache启用PHP-FPM SAPI。你可以运行下面这个脚本来启用PHP-FPM实例。 + + root@server1 [~]# /opt/nDeploy/scripts/apache_php-fpm_setup.sh enable + mod_proxy_fcgi.c + Please choose one default PHP version from the list below + PHP70 + PHP56 + PHP54 + PHP55 + Provide the exact desired version string here and press ENTER: PHP54 + ConfGen:: lxblogger + ConfGen:: blogr + ConfGen:: saheetha + ConfGen:: satest + which: no cagefsctl in (/usr/local/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin) + info [rebuildhttpdconf] Missing owner for domain server1.centos7-test.com, force lookup to root + Built /usr/local/apache/conf/httpd.conf OK + Waiting for “httpd” to restart gracefully …waiting for “httpd” to initialize …… + …finished. + +它会问你需要运行哪个PHP版本作为服务器默认版本,你可以输入那些细节内容,然后继续配置并为现存的域生成虚拟主机文件。 + +我选择了PHP 54作为我服务器上的默认PHP-FPM版本。 + +![confirm-php-fpm](http://blog.linoxide.com/wp-content/uploads/2016/01/confirm-php-fpm-1024x525.png) + +虽然服务器配置了PHP-FPM 54,但是我们可以通过CPanel为各个独立的域修改PHP-FPM实例。 + +下面我将通过一些截图来为你们说明一下,怎样通过CPanel为各个独立域修改PHP-FPM实例。 + +Nginx插件的安装将为你的域的CPanel提供一个Nginx Webstack图标,你可以点击该图标来配置你的Web服务器。我已经登陆进了我其中的一个CPanel来配置相应的Web服务器。 + +请看这些截图。 + +![nginx webstack](http://blog.linoxide.com/wp-content/uploads/2016/01/nginx-webstack.png) + +![nginxicon1](http://blog.linoxide.com/wp-content/uploads/2016/01/nginxicon1-1024x253.png) + +现在,你可以根据需要为选中的主域配置web服务器(这里,我已经选择了主域saheetha.com)。我已经继续通过自动化配置选项来进行了,因为我不需要添加任何手动设置。 + +![nginx_auto_proxy](http://blog.linoxide.com/wp-content/uploads/2016/01/nginx_auto_proxy-1024x408.png) + +当Nginx配置完后,你可以在这里为你的域选择PHP-FPM实例。 + +![php-fpm1](http://blog.linoxide.com/wp-content/uploads/2016/01/php-fpm1-1024x408.png) + +![php54](http://blog.linoxide.com/wp-content/uploads/2016/01/php54-1024x169.png) + +![php55](http://blog.linoxide.com/wp-content/uploads/2016/01/php55.png) + +就像你在截图中所看到的,我服务器上的默认PHP-FPM是**PHP 54**,而我正要将我的域的PHP-FPM实例单独修改成**PHP 55**。当你为你的域修改PHP-FPM后,你可以通过访问**phpinfo**页面来确认。 + +谢谢你们参考本文,我相信这篇文章会给你提供不少信息和帮助。我会为你们推荐关于这个内容的有价值的评论 :)。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/enable-multiple-php-fpm-instances-nginx-apache/ + +作者:[Saheetha Shameer][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/saheethas/ diff --git a/translated/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md b/translated/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md new file mode 100644 index 0000000000..efe2ff27bc --- /dev/null +++ b/translated/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md @@ -0,0 +1,24 @@ +Canonical的ZFS计划将会进入Ubuntu 16.04 +======================================================= + +![](https://www.phoronix.com/assets/categories/ubuntu.jpg) + +Ubuntu开发者正在为[Ubuntu 16.04 加上支持ZFS](http://www.phoronix.com/scan.php?page=news_item&px=ZFS-For-Ubuntu-16.04) ,并且所遇的文件系统支持都已经准备就绪。 + +Ubuntu 16.04的默认安装将会继续是ext4,但是ZFS支持将会自动构建进Ubuntu发布中,模块将在需要时自动加载,zfsutils-linux是Ubuntu的一部分,并且通过Canonical对商业客户提供支持 + +对于那些对Ubuntu中的ZFS感兴趣的人,Canonical的Dustin Kirkland已经写了[一篇新的博客](http://blog.dustinkirkland.com/2016/02/zfs-is-fs-for-containers-in-ubuntu-1604.html)覆盖了一些细节及为何“ZFS是Ubuntu 16.04中为容器使用的文件系统!” + +------------------------------------------------------------------------------ + +via: https://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-ZFS-Continues-16.04&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Phoronix+%28Phoronix%29 + +作者:[Michael Larabel][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.michaellarabel.com/ + + diff --git a/translated/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md b/translated/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md new file mode 100644 index 0000000000..4a53818b49 --- /dev/null +++ b/translated/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md @@ -0,0 +1,27 @@ +Linux最大版本4.1.18 LTS发布,带来大量修改 +================================================================================= + +**著名的内核维护者Greg Kroah-Hartman貌似正在度假中,因为Sasha Levin有幸在今天,2016年2月16日,的早些时候来[宣布](http://lkml.iu.edu/hypermail/linux/kernel/1602.2/00520.html),第十八个Linux内核维护版本Linux Kernel 4.1 LTS通用版本正式发布。** + +作为长期支持的内核分支,Linux 4.1将再多几年接收到更新和补丁,而今天的维护构建版本也证明一点,就是内核开发者们正致力于统保持该系列在所有使用该版本的GNU/Linux操作系统上稳定和可靠。Linux Kernel 4.1.18 LTS是一个大规模发行版,它带来了总计达228个文件修改,这些修改包含了多达5304个插入修改和1128个删除修改。 + +Linux Kernel 4.1.18 LTS更新了什么呢?好吧,首先是对ARM,ARM64(AArch64),MIPS,PA-RISC,m32r,PowerPC(PPC),s390以及x86等硬件架构的改进。此外,还有对Btrfs,CIFS,NFS,XFS,OCFS2,OverlayFS以及UDF文件系统的加强。对网络堆栈的修复,尤其是对mac80211的修复。同时,还有多核心、加密和mm等方面的改进和对声音的更新。 + +“我宣布4.1.18内核正式发布,所有4.1内核系列的用户都应当升级。”Sasha Levin说,“更新的4.1.y git树可以在这里找到:git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.1.y,并且可以在常规kernel.org git网站浏览器:http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary 进行浏览。” +## 大量驱动被更新 + +除了架构、文件系统、声音、网络、加密、mm和核心内核方面的改进之外,Linux Kernel 4.1.18 LTS更新了各个驱动,以提供更好的硬件支持,特别是像蓝牙、DMA、EDAC、GPU(主要是Radeon和Intel i915)、无限带宽技术、IOMMU、IRQ芯片、MD、MMC、DVB、网络(主要是无线)、PCI、SCSI、USB、散热、暂存和Virtio等此类东西。 + +和以往一样,我们鼓励所有基于Linux内核的操作系统平台的用户,凡是使用了Linux 4.1 LTS系列内核包的,尽快更新到今天的4.1.18版本。这些用户可以通过默认软件仓库安装更新,也可以手动编译源码包,这些包你现在就可以从[kernel.org](http://kernel.org/)网站或者[Softpedia](http://linux.softpedia.com/get/System/Operating-Systems/Kernels/Linux-Kernel-Stable-1960.shtml)下载。 + +------------------------------------------------------------------------------ + +via: http://news.softpedia.com/news/linux-kernel-4-1-18-lts-is-the-biggest-in-the-series-with-hundreds-of-changes-500500.shtml + +作者:[Marius Nestor ][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/marius-nestor diff --git a/translated/tech/20160218 Mozilla contributor creates diabetes project for the masses.md b/translated/tech/20160218 Mozilla contributor creates diabetes project for the masses.md new file mode 100644 index 0000000000..de61ff1d7b --- /dev/null +++ b/translated/tech/20160218 Mozilla contributor creates diabetes project for the masses.md @@ -0,0 +1,51 @@ +Mozilla贡献者为群众创建糖尿病项目 +================================================================ + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/myopensourcestory.png?itok=6TXlAkFi) + + +我的开源生涯从我还是一名高中生开始,我总想着自己能成为一名黑客,没有什么恶意的,只是喜欢钻研代码和硬件那种。我第一次接触开源是2001年, +我安装了我的第一个Linux发行版[Lindows](https://en.wikipedia.org/wiki/Linspire)。当然,我也是[Mozilla Firefox](https://www.mozilla.org/en-US/firefox/new/?utm_source=firefox-com&utm_medium=referral)的早期用户。 + +由于我很早使用Linux,我用的第一个版本是1.0.4(如果我没记错的话),我就立即爱上了它。我没在Lindows上呆太久, +而是活跃于多个发行版([Debian](https://www.debian.org/), +[Puppy Linux](http://puppylinux.org/main/Overview%20and%20Getting%20Started.htm), [SUSE](https://www.suse.com/), +[Slackware](http://www.slackware.com/), [Ubuntu](http://ubuntu.com/)),多年来我一直每天使用着开源软件,从青少年时候直到我成年。 + +最后,我坚持使用Ubuntu。大概是在Hardy Heron(译者注:Ubuntu8.04 LTS)发布时候,我开始第一次为Ubuntu做些贡献,在IRC频道和当地社区 +帮助那些需要帮助的用户。我是通过Ubuntu认识开源的,它在我心里总有着特殊的意义。Ubuntu背后的社区的是非常多样化的,热情的,友好的, +每个人都做些共享,是他们共同的目标也是个人目标,这成为他们为开源贡献的动力。 + +在为Ubuntu贡献一段时间后,我开始了为一些上游项目作贡献,比如Debian, [GNOME](https://www.gnome.org/), +[Ganeti](https://code.google.com/p/ganeti/),还有许多其他的开源项目。 +在过去的几年里,我为超过40个开源项目贡献过,有些小的,也有很大的。 + +在Ubuntu项目方向上有些变化之后,我最终决定不仅对于我是时候该尝试新东西,而且我也想贡献一些新的东西。所以我在2009年参与Mozilla, +在IRC帮忙,最终通过参与[Mozilla WebFWD program](https://webfwd.org/),成为一名团队成员,接着[Mozilla Reps Program](https://reps.mozilla.org/), +[Mozilla DevRel Program](https://wiki.mozilla.org/Devrel),刚过两年时间,我成为了火狐社区的发布经理,负责监督Firefox Nightly +和Firefox ESR的发布。比为其他开源项目,在为Mozilla贡献中会获得更多有益的经验。在所有我参与过的开源社区中,Mozilla是最不同的 +,最大的也是最友好的。 + +这些年来,关于开源我觉得,免费软件,更具安全的隐私和尊重许可,以及公开的工作,我越来越与这样的价值观相一致。我相信这三个主题 +对于开源来说是非常重要的,虽然许多人并没在意到提倡它们是很重要的。 + +今天在这,我已不再是全职的他人开源项目的贡献者。最近我被诊断出患有糖尿病,我看到了开源软件中健康软件不是很丰富这一缺口。确实, +它不像其它开源软件应用如Linux发行版或浏览器那样活跃。 + +我最近创立了自己的开源项目[Glucosio](http://www.glucosio.org/),带给人们糖尿病管理和研究的开源软件。经过几年来对开源项目的贡献, +和见过的多种架构,使得我作为项目领导能够得心应手。我对于Glucosio的未来很兴奋,但最重要的是未来的开源将在医疗健康领域发展的如何。 + +医疗保健软件的创新具有很大潜力,我想我们很快就会看到用于改善医疗卫生保健的开源新方案。 + + +------------------------------------------------------------------------------ + +via: https://opensource.com/life/15/11/my-open-source-story-ben-kerensa + +作者:[opensource.com][a] +译者:[ynmlml](https://github.com/ynmll) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:opensource.com diff --git a/translated/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md b/translated/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md new file mode 100644 index 0000000000..0a0008ab8d --- /dev/null +++ b/translated/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md @@ -0,0 +1,58 @@ +让sudo在用户输错密码时侮辱用户 +=========================================================== + +你在Linux终端中会有很多的乐趣。我今天要讲的不是在[终端中跑火车](http://itsfoss.com/ubuntu-terminal-train/)。 + +我今天要讲的技巧可以放松你的心情。前面一篇文章中,你学习了[如何在命令行中增加sudo命令的超时](http://itsfoss.com/change-sudo-password-timeout-ubuntu/)。今天的文章中,我会向你展示如让sudo在输错密码的时候侮辱你(或者其他人)。 + + +对我讲的感到疑惑?这里,让我们看下这张gif来了解sudo如何在你输错密码之后侮辱你的。 + +![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux.gif) + +现在,你为什要这么做?毕竟,侮辱不会让你的一天开心,不是么? + +对我来说,一点小技巧都是有趣的,并且要比以前的“密码错误”的错误提示更有趣。另外,我可以向我的朋友展示娱乐(这个例子中是通过自由开源软件)。我很肯定你有你自己的里有来使用这个技巧的。 + +## 在sudo中启用侮辱 + +你可以在`sudo`配置中增加下面的行来启用侮辱功能: + +``` +Defaults insults +``` + +让我们看看该如何做。打开终端并使用下面的命令: + +``` +sudo visudo +``` + +这会在[nano](http://www.nano-editor.org/)中打开配置文件。使得,我知道传统的‘visudo’应该在vi中打开`/etc/sudoers` 文件,但是Ubuntu及基于它的发行版会使用nano打开。由于我们再讨论vi,这里有一份[vi速查表](http://itsfoss.com/download-vi-cheat-sheet)可以在你决定使用vi的时候使用。 + +回到编辑sudeors文件界面,你需要找出Defaults所在的行。幸运的是,只需要在文件的开头加上“Defaults insults”,就像这样: + +![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux-Mint.png) + +如果你正在使用nano,使用`Ctrl+X`来退出编辑器。在退出的时候,它会询问你是否保存更改。要保存更改,按下“Y”。 + +一旦你保存了sudoers文件之后,打开终端并在任何命令中使用sudo。故意输错密码病享受辱骂:) + +sudo可能会讨厌的。看见没,他甚至在我再次输错之后威胁我。哈哈 + +![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux-Mint-1.jpeg) + +如果你喜欢这个终端技巧,你也可以查看[其他终端技巧的文章](http://itsfoss.com/category/terminal-tricks/)。如果你有其他有趣的技巧,在评论中分享。 + + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/sudo-insult-linux/ + +作者:[ABHISHEK][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ diff --git a/translated/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md b/translated/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md new file mode 100644 index 0000000000..c7f3d5140c --- /dev/null +++ b/translated/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md @@ -0,0 +1,392 @@ +GHLandy Translated + +LFCS系列第二讲:如何安装和使用纯文本编辑器vi/vim + +================================================================================ + +几个月前, Linux 基金会发起了 LFCS (Linux Foundation Certified System administrator,Linux 基金会认证系统管理员)认证,以帮助世界各地的人来验证他们能够在 Linux 系统上做基本的中间系统管理任务:如系统支持,第一手的故障诊断和处理,以及何时向上游支持团队提出问题的智能决策。 + +![Learning VI Editor in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/LFCS-Part-2.png) + +在 Linux 中学习 vi 编辑器 + +请简要看看一下视频,里边介绍了 Linux 基金会认证的程序。 + +注:youtube 视频 + + + +这篇文章是《十个教程》系列的第二部分,在这个部分,我们会介绍 vi/vim 基本的文件编辑操作,帮助读者理解编辑器中的三个模式,这是LFCS认证考试中必须掌握的。 + +### 使用 vi/vim 执行基本的文件编辑操作 ### + +vi 是为 Unix 而生的第一个全屏文本编辑器。它的设计小巧简单,对于仅仅使用过诸如 NotePad++ 或 gedit 等图形界面的文本编辑器的用户来说,使用起来可能存在一些困难。 + +为了使用 vi,我们必须首先理解这个强大的程序操作中的三种模式,方便我们后边学习这个强大的文本处理软件的相关操作。 + +请注意,大多数的现代 Linux 发行版都集成了 vi 的变种——— vim(Vi IMproved,VI 的改进),相比于 vi,它有更多新功能。所以,我们会在本教程中交替使用 vi 和 vim。 + +如果你的发行版还没有安装 vim,你可以通过以下方法来安装: + +- Ubuntu 及其衍生版:apt-get update && apt-get install vim +- 以 Red-Hat 为基础的发行版:yum update && yum install vim +- openSUSE :zypper update && zypper install vim + +### 我为什么要学习 vi ### + +至少有以下两个理由: + +1.因为它是 POSIX 标准的一部分,所以不管你使用什么发行版 vi 总是可用的。 + +2.vi 基本不消耗多少系统资源,并且允许我们仅仅通过键盘来完成任何可能的任务。 + +此外,vi 有的非常丰富的内置帮助手册,程序打开后就可以通过 :help 命令来查看。这个内置帮助手册比 vi/vim 的 man 页面包含了更多信息。 + +![vi Man Pages](http://www.tecmint.com/wp-content/uploads/2014/10/vi-man-pages.png) + +vi Man 页面 + +#### 启动 vi #### + +可以通过在命令提示符下输入 vi 来启动。 + +![Start vi Editor](http://www.tecmint.com/wp-content/uploads/2014/10/start-vi-editor.png) + +使用 vi 编辑器 + +然后按下字母 i,你就可以开始输入了。或者通过下面的方法来启动 vi: + + # vi filename + +这样会打开一个名为 filename 的 buffer(稍后详细介绍 buffer),在你编辑完成之后就可以存储在磁盘中了。 + +#### 理解 vi 的三个模式 #### + +1.在命令模式中,vi 允许用户浏览该文件并输入由一个或多个字母组成简短的、大小写敏感的 vi 命令。这些命令的大部分都可以增加一个前缀数字表示执行次数。 + +比如:yy(或Y) 复制当前的整行,3yy(或3Y) 复制当前整行和下边紧接着的两行(总共3行)。通过 Esc 键可以随时进入命令模式(而不管当前工作在什么模式下)。事实上,在命令模式下,键盘上所有的输入都被解释为命令而非文本,这往往使得初学者困惑不已。 + +2.在末行模式中,我们可以处理文件(包括保存当前文件和运行外部程序)。我们必须在命令模式下输入一个冒号(:),才能进入这个模式,紧接着是需要使用的末行模式下的命令。执行之后 vi 自动回到命令模式。 + +3.在文本输入模式(通常使用字母 i 进入这个模式)中,我们可以随意输入文本。大多数的键入将以文本形式输出到屏幕(一个重要的例外是Esc键,它将退出文本编辑模式并回到命令模式)。 + +![vi Insert Mode](http://www.tecmint.com/wp-content/uploads/2014/10/vi-insert-mode.png) + +vi 文本插入模式 + +#### vi 命令 #### + +下面的表格列出常用的 vi 命令。文件版本的命令可以通过添加叹号的命令强制执行(如,:q! 命令强制退出编辑器而不保存文件)。 + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 关键命令 描述
 h 或 ← 光标左移一个字符
 j 或 ↓ 光标下移一行
 k 或 ↑ 光标上移一行
 l (小写 L) 或 → 光标右移一个字符
 H 光标移至屏幕顶行
 L 光标移至屏幕末行
 G 光标移至文件末行
 w 光标右移一个词
 b 光标左移一个词
 0 (零) 光标移至行首
 ^ 光标移至当前行第一个非空格字符
 $ 光标移至当前行行尾
 Ctrl-B 向后翻页
 Ctrl-F 向前翻页
 i 在光标所在位置插入文本
 I (大写 i) 在当前行首插入文本
 J (大写 j) 将下一行与当前行合并(下一行上移到当前行)
 a 在光标所在位置后追加文本
 o (小写 O) 在当前行下边插入空白行
 O (大写 o) 在当前行上边插入空白行
 r 替换光标所在位置的字符
 R 光标所在位置覆盖插入文本
 x 删除光标所在位置的字符
 X 立即删除光标所在位置之前(左边)的一个字符
 dd 剪切当前整行文本(为了之后进行粘贴)
 D 剪切光标所在位置到行末的文本(该命令等效于 d$)
 yX 给 X 命令一个移动长度,复制适当数量的字符、单词或者从光标开始到一定数量的行
 yy 或 Y 复制当前整行
 p 粘贴在光标所在位置之后(下一行)
 P 粘贴在光标所在位置之前(上一行)
 . (句点) 重复最后一个命令
 u 撤销最后一个命令
 U 撤销最后一行的最后一个命令,只有光标仍在最后一行才能执行。
 n 在查找中跳到下一个匹配项
 N 在查找中跳到前一个匹配项
 :n 下一个文件,编辑多个指定文件时,该命令加载下一个文件。
 :e file 加载新文件来替代当前文件
 :r file 将新文件的内容插入到光标所在位置的下一行
 :q 退出并放弃更改
 :w file 将当期打开的buffer保存为file。如果是追加到已存在的文件中,则使用 :w >> file 命令
 :wq 保存当前文件的内容并退出。等效于 x! 和 ZZ
 :r! command 执行 command 命令,并将命令的输出插入到光标所在位置的下一行
+ +#### vi 选项 #### + +下列选项将会在启动 Vim 的时候进行加载(需要写入到~/.vimrc文件): + + # echo set number >> ~/.vimrc + # echo syntax on >> ~/.vimrc + # echo set tabstop=4 >> ~/.vimrc + # echo set autoindent >> ~/.vimrc + +![vi Editor Options](http://www.tecmint.com/wp-content/uploads/2014/10/vi-options.png) + +vi编辑器选项 + +- set number 当 vi 打开或新建文件时,显示行号。 +- syntax on 打开语法高亮(对应多个文件扩展名),以便源码文件和配置文件更具可读性。 +- set tabstop=4 设置制表符间距为 4 个空格(默认为 8)。 +- set autoindent 将前一行的缩进应用于下一行。 + +#### 查找和替换 #### + +vi 具有通过查找将光标移动到(在单独一行或者整个文件中的)指定位置。它还可自动或者通过用户确认来执行文本替换。 + +a) 在行内查找。f 命令在当前行查找指定字符,并将光标移动到指定字符出现的位置。 + +例如,命令 fh 会在本行中将光标实例字母h出现的位置。注意,字母 f 和你要查找的字符都不会出现在屏幕上,但是当你按下回车的时候,要查找的字符会被高亮显示。 + +比如,以下是在命令模式按下 f4 之后的结果。 + +![Search String in Vi](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-string.png) + +在 vi 中查找字符。 + +b) 在整个文件内查找。使用 / 命令,紧接着需要查找的单词或短语。这个查找可以通过使用 n 命令或者 N 重复查找上一个查找的字符串。以下是在命令模式键入 /Jane 的查找结果。 + +![Vi Search String in File](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-line.png) + +在vi中查找字符 + +c) vi 通过使用命令来完成多行或者整个文件的替换操作(类似于 sed)。我们可以使用以下命令,使得整个文件中的单词 “old” 替换为 “young”。 + + :%s/old/young/g + +**注意**:冒号位于命令的最前面。 + +![Vi Search and Replace](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-and-replace.png) + +vi 的查找和替换 + +冒号 (:) 进入末行模式,在本例中 s 表示替换,% 是从第一行到最后一行的表示方式(也可以使用 nm 表示范围,即第 n 行到第 m 行),old 是查找模式,young 是用来替换的文本,g 表示在每个查找出来的字符串都进行替换。 + +另外,在命令最后增加一个 c,可以在每一个匹配项替换前进行确认。 + + :%s/old/young/gc + +将就文本替换为新文本前,vi/vim 会想我们显示一下信息: + +![Replace String in Vi](http://www.tecmint.com/wp-content/uploads/2014/10/vi-replace-old-with-young.png) + +vi 中替换字符串 + +- y: 执行替换(yes) +- n: 跳过这个匹配字符的替换并转到下一个(no) +- a: 在当前匹配字符及后边的相同项全部执行替换 +- q 或 Esc: 取消替换 +- l (小写 L): 执行本次替换并退出 +- Ctrl-e, Ctrl-y: 下翻页,上翻页,查看相应的文本来进行替换 + +#### 同时编辑多个文件 #### + +我们在命令提示符输入 vim file1 file2 file3 如下: + + # vim file1 file2 file3 + +vim 会首先打开 file1,要跳到 file2 需用 :n 命令。当需要打开前一个文件时,:N 就可以了。 + +为了从 file1 跳到 file3 + +a) :buffers 命令会显示当前正在编辑的文件列表 + + :buffers + +![Edit Multiple Files](http://www.tecmint.com/wp-content/uploads/2014/10/vi-edit-multiple-files.png) + +编辑多个文件 + +b) :buffer 3 命令(后边没有 s)会打开 file 进行编辑。 + +在上边的图片中,标记符号 # 表示该文件当前已被打开在后台,而 %a 标记的文件是正在被编辑的。另外,文件号(如上边例子的 3)后边的空格表示该文件还没有被打开。 + +#### vi 的临时 buffers #### + +为了复制连续的多行(比如,假设为 4 行)到一个名为 a 的临时 buffer(与文件无关),并且还要将这些行粘贴到在当前 vi 会话文件中的其它位置,我们需要: + +1. 按下 Esc 键以确认 vi 处在命令模式 + +2. 将光标放在我们希望复制的第一行文本 + +3. 输入 a4yy 复制当前行和接下来的 3 行,进入一个名为 a 的 buffer。我们一继续编辑我们的文件————我们不需要立即插入刚刚复制的行。 + +4. 当到了需要使用刚刚复制行的位置,在 p(小写)或 P(大写)命令来讲复制行插入到名为 a 的 buffer: + +- 输入 ap,复制行将插入到光标位置所在行的下一行。 +- 输入 aP,复制行将插入到光标位置所在行的上一行。 + +如果愿意,我们可以重复上述步骤,将 buffer a 中的内容插入到我们文件的多个位置。一个临时 buffer,像本次会话中的一样,会在当前窗口关闭时释放掉。 + +### 总结 ### + +像我们看到的一样,vi/vim 在命令接口下是一个强大而灵活的文本编辑器。通过以下链接,随时分享你自己的技巧和评论。 + +#### 参考链接 #### + +- [About the LFCS][1] +- [Why get a Linux Foundation Certification?][2] +- [Register for the LFCS exam][3] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/vi-editor-usage/ + +作者:[Gabriel Cánepa][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[东风唯笑](https://github.com/dongfengweixiao) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:https://training.linuxfoundation.org/certification/LFCS +[2]:https://training.linuxfoundation.org/certification/why-certify-with-us +[3]:https://identity.linuxfoundation.org/user?destination=pid/1 diff --git a/translated/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md b/translated/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md new file mode 100644 index 0000000000..876fa4d3af --- /dev/null +++ b/translated/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md @@ -0,0 +1,390 @@ +GHLandy Translated + +LFCS 系列第三讲:如何在 Linux 中归档/压缩文件及目录、设置文件属性和搜索文件 + +================================================================================ +最近,Linux 基金会发起了 一个全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让遍布全世界的人都有机会参加该认证的考试,并且通过考试的人将会得到关于他们有能力在 Linux 上执行基本的中间系统管理任务的认证证书。这项认证包括了对已运行的系统和服务的支持、一流水平的问题解决和分析以及决定何时将问题反映给工程师团队的能力。 + +![Linux Foundation Certified Sysadmin – Part 3](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-3.png) + +LFCS 系列第三讲 + +请看以下视频,这里边讲给出 Linux 基金会认证程序的一些想法。 + +注:youtube 视频 + + +本讲是《十套教程》系列中的第三讲,在这一讲中,我们会涵盖如何在文件系统中归档/压缩文件及目录、设置文件属性和搜索文件等内容,这些都是 LFCS 认证中必须掌握的知识。 + +### 归档和压缩的相关工具 ### + +文件归档工具将一堆文件整合到一个单独的归档文件之后,我们可以将归档文件备份到不同类型的媒介或者通过网络传输和发送 Email 来备份。在 Linux 中使用频率最高的归档实用工具是 tar。当归档工具和压缩工具一起使用的时候,可以减少同一文件和信息在硬盘中的存储空间。 + +#### tar 使用工具 #### + +tar 将一组文件打包到一个单独的归档文件(通常叫做 tar 文件或者 tarball)。tar 这个名称最初代表磁带存档程序(tape archiver),但现在我们可以用它来归档任意类型的可读写媒介上边的数据,而不是只能归档磁带数据。tar 通常与 gzip、bzip2 或者 xz 等压缩工具一起使用,生成一个压缩的 tarball。 + +**基本语法:** + + # tar [选项] [路径名 ...] + +其中 ... 代表指定那些文件进行归档操作的表达式 + +#### tar 的常用命令 #### + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
长选项简写描述
 –create c 创建 tar 归档文件
 –concatenate A 将一存档与已有的存档合并
 –append r 把要存档的文件追加到归档文件的末尾
 –update u 更新新文件到归档文件中去
 –diff 或 –compare d 比较存档与当前文件的不同之处
 –file archive f 使用档案文件或设备
 –list t 列出 tarball 中的内容
 –extract 或 –get x 从归档文件中释放文件
+ +#### 常用的操作修饰符 #### + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
长选项缩写描述
 –directory dir C 执行归档操作前,先转到指定目录
 –same-permissions p 保持原始的文件权限
 –verbose v 列出所有的读取或提取文件。但这个标识符与 –list 一起使用的时候,还会显示出文件大小、属主和时间戳的信息
 –verify W 写入存档后进行校验
 –exclude file — 不把指定文件包含在内
 –exclude=pattern X 以PATTERN模式排除文件
 –gzip 或 –gunzip z 通过gzip压缩归档
 –bzip2 j 通过bzip2压缩归档
 –xz J 通过xz压缩归档
+ +Gzip 是最古老的压缩工具,压缩率最小,bzip2 的压缩率稍微高一点。另外,xz是最新的压缩工具,压缩率最好。xz 具有最佳压缩率的代价是:完成压缩操作花费最多时间,压缩过程中占有较多系统资源。 + +通常,通过这些工具压缩的 tar 文件相应的具有 .gz、.bz2 或 .xz的扩展名。在下列的例子中,我们使用 file1、file2、file3、file4 和 file5 进行演示。 + +**通过 gzip、bzip2 和 xz 压缩归档** + +归档当前工作目录的所有文件,并以 gzip、bzip2 和 xz 压缩刚刚的归档文件(请注意,用正则表达式来指定那些文件应该归档——这是为了防止归档工具包前一步生成的文件打包进来)。 + + # tar czf myfiles.tar.gz file[0-9] + # tar cjf myfiles.tar.bz2 file[0-9] + # tar cJf myfile.tar.xz file[0-9] + +![Compress Multiple Files Using tar](http://www.tecmint.com/wp-content/uploads/2014/10/Compress-Multiple-Files.png) + +压缩多个文件 + +**列举 tarball 中的内容和更新/追加文件到归档文件中** + +列举 tarball 中的内容,并显示相同信息为一个详细目录清单。注意,不能直接向压缩的归档文件更新/追加文件(若你需要向压缩的 tarball 中更新/追加文件,需要先解压 tar 文件后再进行操作,然后重新压缩)。 + + # tar tvf [tarball] + +![Check Files in tar Archive](http://www.tecmint.com/wp-content/uploads/2014/10/List-Archive-Content.png) + +列举归档文件中的内容 + +运行一下任意一条命令: + + # gzip -d myfiles.tar.gz [#1] + # bzip2 -d myfiles.tar.bz2 [#2] + # xz -d myfiles.tar.xz [#3] + +然后: + + # tar --delete --file myfiles.tar file4 (删除tarball中的file4) + # tar --update --file myfiles.tar file4 (更新tarball中的file4) + +和 + + # gzip myfiles.tar [ 如果你运行 #1 命令 ] + # bzip2 myfiles.tar [ 如果你运行 #2 命令 ] + # xz myfiles.tar [ 如果你运行 #3 命令 ] + +最后 + + # tar tvf [tarball] #again + +将 file4 修改后的日期和时间与之前显示的对应信息进行比较 + +**排除文件类型** + +假设你现在需要备份用户的家目录。一个有经验的系统管理员会选择忽略所有视频和音频文件再备份(也可能是公司规定)。 + +可能你最先想到的方法是在备份是时候,忽略扩展名为 .mp3 和 .mp4(或者其他格式)的文件。但如果你有些自作聪明的用户将扩展名改为 .txt 或者 .bkp,那你的方法就不灵了。为了发现并排除音频或者视频文件,你需要先检查文件类型。以下 shell 脚本可以代你完成类型检查: + + #!/bin/bash + # 把需要进行备份的目录传递给 $1 参数. + DIR=$1 + #排除文件类型中包含了 mpeg 字符串的文件,然后创建 tarball 并进行压缩。 + # -若文件类型中包含 mpeg 字符串, $?(最后执行的命令的退出状态)返回 0,然后文件名被定向到排除选项。否则返回 1。 + # -若 $? 等于 0,该文件从需要备份文件的列表排除。 + tar X <(for i in $DIR/*; do file $i | grep -i mpeg; if [ $? -eq 0 ]; then echo $i; fi;done) -cjf backupfile.tar.bz2 $DIR/* + +![Exclude Files in tar Archive](http://www.tecmint.com/wp-content/uploads/2014/10/Exclude-Files-in-Tar.png) + +排除文件进行备份 + +**使用 tar 保持文件的原有权限进行恢复** + +通过以下命令,你可以保留文件的权限将备份文件恢复到原始用户的家目录(本例是 user_restore)。 + + # tar xjf backupfile.tar.bz2 --directory user_restore --same-permissions + +![Restore Files from tar Archive](http://www.tecmint.com/wp-content/uploads/2014/10/Restore-tar-Backup-Files.png) + +从归档文件中恢复 + +**扩展阅读:** + +- [18 tar Command Examples in Linux][1] +- [Dtrx – An Intelligent Archive Tool for Linux][2] + +### 通过 find 命令搜索文件 ### + +find 命令用于递归搜索目录树中包含指定字符的文件和目录,然后在屏幕显示出于指定字符相匹配的文件和目录,或者在匹配项进行其他操作。 + +通常,我们通过文件名、文件的属主、属组、类型权限、日期及大小来搜索。 + +#### 基本语法:#### + +# find [需搜索的目录] [表达式] + +**通过文件大小递归搜索文件** + +以下命令会搜索当前目录(.)及其下两层子目录(-maxdepth 3,包含当前目录及往下两层的子目录)大于 2 MB(-size +2M)的所有文件(-f)。 + + # find . -maxdepth 3 -type f -size +2M + +![Find Files by Size in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Find-Files-Based-on-Size.png) + +通过文件大小搜索文件 + +**搜索符合一定规则的文件并将其删除** + +有时候,777 权限的文件通常为外部攻击者打开便利之门。不管是以何种方式,让所有人都可以对文件进行任意操作都是不安全的。对此,我们采取一个相对激进的方法——删除这些文件(‘{ }’用来“聚集”搜索的结果)。 + + # find /home/user -perm 777 -exec rm '{}' + + +![Find all 777 Permission Files](http://www.tecmint.com/wp-content/uploads/2014/10/Find-Files-with-777-Permission.png) + +搜索 777 权限的文件 + +**按访问时间和修改时间搜索文件** + +搜索 /etc 目录下访问时间(-atime)或修改时间(-mtime)大于或小于 6 个月或者刚好 6 个月的配置文件。 + +按照下面例子对命令进行修改: + + # find /etc -iname "*.conf" -mtime -180 -print + +![Find Files by Modification Time](http://www.tecmint.com/wp-content/uploads/2014/10/Find-Modified-Files.png) + +按修改时间搜索文件 + +- 扩展阅读: [35 Practical Examples of Linux ‘find’ Command][3] + +### 文件权限及基本属性 ### + +ls -l 命令输出的前 10 位字符是文件的属性,其中第一个字符用来表明文件的类型。 + +- – : 普通文件 +- -d : 目录 +- -l : 符号链接 +- -c : 字符设备 (它将数据作为字节流处理,如terminal) +- -b : 块设备 (在块设备中处理数据,如存储设备) + +接下来表示文件属性的 9 位字符叫做文件的读写模式,代表文件属主、同组用户和其他用户(通常指的是“外部世界”)对应的读(r)、写(w)和执行(x)权限。 + +文件的写权限允许对应的用户对文件进行打开和读写,对于同时设置了执行权限的目录,对应用户可以列举出该目录的内容。另外,文件的执行权限允许将文件当做是一个可执行程序来运行,而目录的执行权限则是允许用户进入和退出该目录。 + +文件的权限通过 chown 命令来更改,其基本语法如下: + + # chmod [new_mode] file + +new_mode 可以是 3 位八进制数值或者对应权限的表达式。 + +八进制数值可以从二进制数值进行等值转换,通过下列方法来计算文件属主、同组用户和其他用户权限对应的二进制数值: + +一个确定权限的二进制数值表现为 2 的幂(r=2^2,w=2^1,x=2^0),当权限省缺时,二进制数值为 0。如下: + +![Linux File Permissions](http://www.tecmint.com/wp-content/uploads/2014/10/File-Permissions.png) + +文件权限 + +使用八进制数值设置上图的文件权限,请输入: + + # chmod 744 myfile + +通过 u、g 和 o 分别代表用户、同组用户和其他用户,然后你也可以使用权限表达式来单独对用户设置文件的权限模式。也可以通过 a 代表所有用户,然后设置文件权限。通过 + 号或者 - 号相应的赋予或移除文件权限。 + + +**为所有用户撤销一个 shell 脚本的执行权限** + +正如之前解释的那样,我们可以通过 - 号为需要移除权限的属主、同组用户、其他用户或者所有用户去掉指定的文件权限。下面命令中的短横线(-)可以理解为:移除(-)所有用户(a)的 backup.sh 文件执行权限(x)。 + + # chmod a-x backup.sh + +下面演示为文件属主、同组用户赋予读、写和执行权限,并赋予其他用户读权限。 + +当我们使用 3 位八进制数值为文件设置权限的时候,第一位数字代表属主权限,第二位数字代表同组用户权限,第三位数字代表其他用户的权限: + +- 属主:(r=2^2 + w=2^1 + x=2^0 = 7) +- 同组用户:(r=2^2 + w=2^1 + x=2^0 = 7) +- 其他用户:(r=2^2 + w=0 + x=0 = 4), + + # chmod 774 myfile + +随着练习时间的推移,你会知道何种情况下使用哪种方式来更改文件的权限模式的效果最好。 + +使用 ls -l 详细列举目录详细同样会显示出文件的属主和属组(这个很基本,而且影响到系统文件的访问控制)。 + +![Linux File Listing](http://www.tecmint.com/wp-content/uploads/2014/10/Linux-File-Listing.png) + +列举 Linux 文件 + +通过 chown 命令可以对文件的归属权进行更改,可以同时或者分开更改属主和属组。其基本语法为: + + # chown user:group file + +至少要指定用户或者用户组 + +**举几个例子:** + +将文件的属主更改为指定用户: + + # chown gacanepa sent + +同时将文件的属主和属组更改为指定的用户和组: + + # chown gacanepa:gacanepa TestFile + +只将文件的属组更改为指定组。注意组名前的冒号(:)。 + + # chown :gacanepa email_body.txt + +### 结论 ### + +作为一个系统管理员,你需要懂得如何创建和恢复备份、如何在系统中搜索文件并更改它们的属性。通过一些技巧,你可以更好地管理系统并避免以后出问题。 + +我希望,本文给出的技巧可以帮助你达成管理系统的目标。你可以随时在评论中发表自己的技巧及社区给你带来的益处。 + +先行感谢! + +参考链接 +- [About the LFCS][4] +- [Why get a Linux Foundation Certification?][5] +- [Register for the LFCS exam][6] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/compress-files-and-finding-files-in-linux/ + +作者:[Gabriel Cánepa][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:http://www.tecmint.com/18-tar-command-examples-in-linux/ +[2]:http://www.tecmint.com/dtrx-an-intelligent-archive-extraction-tar-zip-cpio-rpm-deb-rar-tool-for-linux/ +[3]:http://www.tecmint.com/35-practical-examples-of-linux-find-command/ +[4]:https://training.linuxfoundation.org/certification/LFCS +[5]:https://training.linuxfoundation.org/certification/why-certify-with-us +[6]:https://identity.linuxfoundation.org/user?destination=pid/1 diff --git a/translated/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md b/translated/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md new file mode 100644 index 0000000000..987ea4a7f8 --- /dev/null +++ b/translated/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md @@ -0,0 +1,195 @@ +GHLandy Translated + +LFCS 系列第四讲:分区存储设备、格式化文件系统和配置交换分区 + +================================================================================ +去年八月份,Linux 基金会发起了 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,给所有系统管理员一个展现自己的机会。通过基础考试后,他们可以胜任在 Linux 上的整体运维工作:包括系统支持、一流水平的诊断和监控以及在必要之时向其他支持团队提交帮助请求等。 + +![Linux Foundation Certified Sysadmin – Part 4](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-4.png) + +LFCS 系列第四讲 + +需要注意的是,Linux 基金会认证是非常严格的,通过与否完全要看个人能力。通过在线链接,你可以随时随地参加 Linux 基金会认证考试。所以,你再也不用到考试中心了,只需要不断提高自己的专业技能和经验就可去参加考试了。 + +请看一下视频,这里将讲解 Linux 基金会认证程序。 + +注:youtube 视频 + + +本讲是《十套教程》系列中的第四讲。在本讲中,我们将涵盖分区存储设备、格式化文件系统和配置交换分区等内容,这些都是 LFCS 认证中的必备知识。 + +### 分区存储设备 ### + +分区是一种将单独的硬盘分成一个或多个区的手段。一个分区只是硬盘的一部分,我们可以认为这部分是独立的磁盘,里边包含一个单一类型的文件系统。分区表则是将硬盘上这些分区与分区标识符联系起来的索引。 + +在 Linux 中,IBM PC 兼容系统里边用于管理传统 MBR(最新到2009年)分区的工具是 fdisk。对于 GPT(2010年至今)分区,我们使用 gdisk。这两个工具都可以通过程序名后面加上设备名称(如 /dev/sdb)进行调用。 + +#### 使用 fdisk 管理 MBR 分区 #### + +我们先来介绍 fdisk: + + # fdisk /dev/sdb + +然后出现提示说进行下一步操作。若不确定如何操作,按下 “m” 键显示帮助。 + +![fdisk Help Menu](http://www.tecmint.com/wp-content/uploads/2014/10/fdisk-help.png) + +fdisk 帮助菜单 + +上图中,使用频率最高的选项已高亮显示。你可以随时按下 “p” 显示分区表。 + +![Check Partition Table in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Show-Partition-Table.png) + +显示分区表 + +Id 列显示由 fdisk 分配给每个分区的分区类型(分区 id)。一个分区类型代表一种文件系统的标识符,简单来说,包括该分区上数据的访问方法。 + +请注意,每个分区类型的全面都全面讲解将超出了本教程的范围——本系列教材主要专注于 LFCS 测试,因能力为主。 + +**下面列出一些 fdisk 常用选项:** + +按下 “l”(小写 L)选项来显示所有可以由 fdisk 管理的分区类型。 + +按下 “d” 可以删除现有的分区。若硬盘上有多个分区,fdisk 将询问你要删除那个分区。 + +键入对应的数字,并按下 “w” 保存更改(将更改写入分区表)。 + +在下图的命令中,我们将删除 /dev/sdb2,然后显示(p)分区表来验证更改。 + +![fdisk Command Options](http://www.tecmint.com/wp-content/uploads/2014/10/fdisk-options.png) + +fdisk 命令选项 + +按下 “n” 后接着按下 “p” 会创建新一个主分区。最后,你可以使用所有的默认值(这将占用所有的可用空间),或者像下面一样自定义分区大小。 + +![Create New Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-New-Partition.png) + +创建新分区 + +若 fdisk 分配的分区 Id 并不是我们想用的,可以按下 “t” 来更改。 + +![Change Partition Name in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Change-Partition-Name.png) + +更改分区类型 + +全部设置好分区后,按下 “w” 将更改保存到硬盘分区表上。 + +![Save Partition Changes](http://www.tecmint.com/wp-content/uploads/2014/10/Save-Partition-Changes.png) + +保存分区更改 + +#### 使用 gdisk 管理 GPT 分区 #### + +下面的例子中,我们使用 /dev/sdb。 + + # gdisk /dev/sdb + +必须注意的是,gdisk 可以用于创建 MBR 和 GPT 两种分区表。 + +![Create GPT Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-GPT-Partitions.png) + +创建 GPT 分区 + +使用 GPT 分区方案,我们可以在同一个硬盘上创建最多 128 个分区,单个分区最大以 PB 为单位,而 MBR 分区方案最大的只能 2TB。 + +注意,fdisk 与 gdisk 中大多数命令都是一样的。因此,我们不会详细介绍这些命令选项,而是给出一张使用过程中的截图。 + +![gdisk Command Options](http://www.tecmint.com/wp-content/uploads/2014/10/gdisk-options.png) + +gdisk 命令选项 + +### 格式化文件系统 ### + +一旦创建完需要的分区,我们就必须为分区创建文件系统。查询你所用系统支持的文件系统,请运行: + + # ls /sbin/mk* + +![Check Filesystems Type in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Filesystems.png) + +检查文件系统类型 + +选择文件系统取决于你的需求。你应该考虑到每个文件系统的优缺点以及其特点。选择文件系统需要看的两个重要属性: + +- 日志支持,允许从系统崩溃事件中快速恢复数据。 +- 安全增强式 Linux(SELinux)支持,按照项目 wiki 所说,“安全增强式 Linux 允许用户和管理员更好的把握访问控制权限”。 + +在接下来的例子中,我们通过 mkfs 在 /dev/sdb1上创建 ext4 文件系统(支持日志和 SELinux),标卷为 Tecmint。mkfs 基本语法如下: + + # mkfs -t [filesystem] -L [label] device + 或者 + # mkfs.[filesystem] -L [label] device + +![Create ext4 Filesystems in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-ext4-Filesystems.png) + +创建 ext4 文件系统 + +### 创建并启用交换分区 ### + +要让 Linux 系统访问虚拟内存,则必须有一个交换分区,当内存(RAM)用完的时候,将硬盘中指定分区(即 Swap 分区)当做内存来使用。因此,当有足够的系统内存(RAM)来满足系统的所有的需求时,我们并不需要划分交换分区。尽管如此,是否使用交换分区取决于管理员。 + +下面列出选择交换分区大小的经验法则: + +物理内存不高于 2GB 时,取两倍物理内存大小即可;物理内存在 2GB 以上时,取一倍物理内存大小即可;并且所取大小应该大于 32MB。 + +所以,如果: + +M为物理内存大小,S 为交换分区大小,单位 GB,那么: + + 若 M < 2 + S = M *2 + 否则 + S = M + 2 + +记住,这只是基本的经验。对于作为系统管理员的你,才是决定是否使用交换分区及其大小的关键。 + +要配置交换分区,首先要划分一个常规分区,大小像我们之前演示的那样来选取。然后添加以下条目到 /etc/fstab 文件中(其中的X要更改为对应的 b 或 c)。 + + /dev/sdX1 swap swap sw 0 0 + +最后,格式化并启用交换分区: + + # mkswap /dev/sdX1 + # swapon -v /dev/sdX1 + +显示交换分区的快照: + + # cat /proc/swaps + +关闭交换分区: + + # swapoff /dev/sdX1 + +下面的例子,我们会使用 fdisk 将 /dev/sdc1(512MB,系统和内存为 256MB)来设置交换分区,下面是我们之前详细提过的步骤。注意,这种情况下我们使用的是指定大小分区。 + +![Create-Swap-Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Swap-Partition.png) + +创建交换分区 + +![Add Swap Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Swap-Partition.png) + +启用交换分区 + +### 结论 ### + +在你的系统管理员之路上,创建分区(包括交换分区)和格式化文件系统是非常重要的一部。我希望本文中所给出的技巧指导你到达你的管理员目标。随时在本讲评论区中发表你的技巧和想法,一起为社区做贡献。 + +参考链接 + +- [About the LFCS][1] +- [Why get a Linux Foundation Certification?][2] +- [Register for the LFCS exam][3] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-partitions-and-filesystems-in-linux/ + +作者:[Gabriel Cánepa][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:https://training.linuxfoundation.org/certification/LFCS +[2]:https://training.linuxfoundation.org/certification/why-certify-with-us +[3]:https://identity.linuxfoundation.org/user?destination=pid/1 diff --git a/translated/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md b/translated/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md new file mode 100644 index 0000000000..1551f4de0c --- /dev/null +++ b/translated/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md @@ -0,0 +1,246 @@ +GHLandy Translated + +LFCS 系列第五讲:如何在 Linux 中挂载/卸载本地文件系统和网络文件系统(Samba 和 NFS) + +================================================================================ + +Linux 基金会已经发起了一个全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让来自世界各地的人有机会参加到 LFCS 测试,获得关于有能力在 Linux 系统中执行中间系统管理任务的认证。该认证包括:维护正在运行的系统和服务的能力、全面监控和分析的能力以及何时上游团队请求支持的决策能力。 + +![Linux Foundation Certified Sysadmin – Part 5](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-5.png) + +LFCS 系列第五讲 + +请看以下视频,这里边介绍了 Linux 基金会认证程序。 + +注:youtube 视频 + + +本讲是《十套教程》系列中的第三讲,在这一讲里边,我们会解释如何在 Linux 中挂载/卸载本地和网络文件系统。这些都是 LFCS 认证中的必备知识。 + + +### 挂载文件系统 ### + +在个硬盘分好区之后,Linux 需要通过某些方式对硬盘分区上的数据进行访问。Linux 并不会像 DOS 或者 Windows 那样给每个硬盘分区分配一个字母来作为盘符,而是将硬盘分区挂载到统一的目录树上的挂载点。 + +挂载点是一个目录,挂载是一种访问分区上文件系统的方法,挂载文件系统实际上是将一个确切的文件系统(比如一个分区)和目录树中指定的目录联系起来的过程。 + +换句话说,管理存储设备的第一步就是把设备关联到文件系统树。要完成这一步,通常可以这样:用 mount 命令来进行临时挂载(用完的时候,使用 umount 命令来卸载),或者通过编辑 /etc/fstab 文件之后重启系统来永久性挂载,这样每次开机都会进行挂载。 + + +不带任何选项的 mount 命令,可以显示当前已挂载的文件系统。 + + # mount + +![Check Mounted Filesystem in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/check-mounted-filesystems.png) + +检查已挂载的文件系统 + +另外,mount 命令通常用来挂载文件系统。其基本语法如下: + + # mount -t type device dir -o options + +该命令会指引内核在设备上找到的文件系统(如已格式化为指定类型的文件系统)挂载到指定目录。像这样的形式,mount 命令不会再到 /etc/fstab 文件中进行确认。 + +除非像下面,挂载指定的目录或者设备: + + # mount /dir -o options + 或 + # mount device -o options + +mount 命令会尝试寻找挂载点,如果找不到就会查找设备(上述两种情况下,mount 命令会在 /etc/fstab 查找相应的设备或挂载点),最后尝试完成挂载操作(这个通常可以成功执行,除非你的挂载点或者设备正在使用中,或者你调用 mount 命令的时候没有 root 权限)。 + +你可以看到,mount 命令的每行输出都是如下格式: + + device on directory type (options) + +例如: + + /dev/mapper/debian-home on /home type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered) + +读作: + +设备 dev/mapper/debian-home 的格式为 ext4,挂载在 /home 下,并且有以下挂载选项: rw,relatime,user_xattr,barrier=1,data=ordered。 + +**mount 命令选项** + +下面列出 mount 命令的常用选项 + + +- async:运许在将要挂载的文件系统上进行异步 I/O 操作 +- auto:标志文件系统通过 mount -a 命令挂载,与 noauto 相反。 + +- defaults:该选项为 async,auto,dev,exec,nouser,rw,suid 的一个别名。注意,多个选项必须由逗号隔开并且中间没有空格。倘若你不小心在两个选项中间输入了一个空格,mount 命令会把后边的字符解释为另一个参数。 +- loop:将镜像文件(如 .iso 文件)挂载为 loop 设备。该选项可以用来模拟显示光盘中的文件内容。 +- noexec:阻止该文件系统中可执行文件的执行。与 exec 选项相反。 + +- nouser:阻止任何用户(除 root 用户外) 挂载或卸载文件系统。与 user 选项相反。 +- remount:重新挂载文件系统。 +- ro:只读模式挂载。 +- rw:读写模式挂载。 +- relatime:只要访问时间早于修改时间,就更新文件的的访问时间。 +- user_xattr:允许用户设置和移除可扩展文件系统属性。 + +**以 ro 和 noexec 模式挂载设备** + + # mount -t ext4 /dev/sdg1 /mnt -o ro,noexec + +在本例中,我们可以看到,在挂载点 /mnt 中尝试写入文件或者运行可执行文件都会显示相应的错误信息。 + + # touch /mnt/myfile + # /mnt/bin/echo “Hi there” + +![Mount Device in Read Write Mode](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Device-Read-Write.png) + +可读写模式挂载设备 + +**以默认模式挂载设备** + +以下场景,我们在重新挂载设备的挂载点中,像上例一样尝试你写入文件和运行可执行文件。 + + + # mount -t ext4 /dev/sdg1 /mnt -o defaults + +![Mount Device in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Device.png) + +挂载设备 + +在这个例子中,我们发现写入文件和命令都完美执行了。 + +### 卸载设备 ### + +使用 umount 命令卸载设备,意味着将所有的“在使用”数据全部写入到文件系统了,然后可以安全移除文件系统。请注意,倘若你移除一个没有事先正确卸载的文件系统,就会有造成设备损坏和数据丢失的风险。 + +也就是说,你必须设备的盘符或者挂载点中退出,才能卸载设备。换言之,当前工作目录不能是需要卸载设备的挂载点。否则,系统将返回设备繁忙的提示信息。 + +![Unmount Device in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Unmount-Device.png) + +卸载设备 + +离开需卸载设备的挂载点最简单的方法就是,运行不带任何选项的 cd 命令,这样会回到当前用户的家目录。 + + +### 挂载常见的网络文件系统 ### +最常用的两种网络文件系统是 SMB(Server Message Block,服务器消息块)和 NFS(Network File System,网络文件系统)。如果你只向类 Unix 客户端提供共享,用 NFS 就可以了,如果是向 Windows 和其他类 Unix客户端提供共享服务,就需要用到 Samba 了。 + + +扩展阅读 + +- [Setup Samba Server in RHEL/CentOS and Fedora][1] +- [Setting up NFS (Network File System) on RHEL/CentOS/Fedora and Debian/Ubuntu][2] + +下面的例子中,假设 Samba 和 NFS 已经在地址为 192.168.0.10 的服务器上架设好了(请注意,架设 NFS 服务器也是 LFCS 考试中需要考核的能力,我们会在后边中提到)。 + + +#### 在 Linux 中挂载 Samba 共享 #### + +第一步:在 Red Hat 以 Debian 系发行版中安装 samba-client、samba-common 和 cifs-utils 软件包,如下: + + # yum update && yum install samba-client samba-common cifs-utils + # aptitude update && aptitude install samba-client samba-common cifs-utils +然后运行下列命令,查看服务器上可用的 Samba 共享。 + + # smbclient -L 192.168.0.10 + +并输入远程机器上 root 账户的密码。 + +![Mount Samba Share in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Samba-Share.png) + +挂载 Samba 共享 + +上图中,已经对可以挂载到我们本地系统上的共享进行高亮显示。你只需要与一个远程服务器上的合法用户名及密码就可以访问共享了。 + +第二步:当挂载有密码保护的网络文件系统时候,将你的访问凭证写入到 /etc/fstab 文件中并非明智的选择。你需要将这些信息写入到具有 600 权限的隐藏文件中,像这样: + + # mkdir /media/samba + # echo “username=samba_username” > /media/samba/.smbcredentials + # echo “password=samba_password” >> /media/samba/.smbcredentials + # chmod 600 /media/samba/.smbcredentials + +第三步:然后将下面的内容添加到 /etc/fstab 文件中。 + + # //192.168.0.10/gacanepa /media/samba cifs credentials=/media/samba/.smbcredentials,defaults 0 0 + +第四步:现在可以挂载你的 Samba 共享了。手动挂载(mount //192.168.0.10/gacanepa)或者重启系统并应用 /etc/fstab 中相应行来用就挂载都可以。 + +![Mount Password Protect Samba Share](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Password-Protect-Samba-Share.png) + +挂载有密码保护的 Samba 共享 + +#### 在 Linux 系统中挂载 NFS 共享 #### + +第一步:在 Red Hat 以 Debian 系发行版中安装 nfs-common 和 portmap 软件包。如下: + + # yum update && yum install nfs-utils nfs-utils-lib + # aptitude update && aptitude install nfs-common + +第二步:为 NFS 共享创建挂载点。 + + # mkdir /media/nfs + +第三步:将下面的内容添加到 /etc/fstab 文件中。 + +192.168.0.10:/NFS-SHARE /media/nfs nfs defaults 0 0 + +第四步:现在可以挂载你的 Samba 共享了。手动挂载(mount 192.168.0.10:/NFS-SHARE)或者重启系统并应用 /etc/fstab 中相应行来用就挂载都可以。 + +![Mount NFS Share in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-NFS-Share.png) + +挂载 NFS 共享 + +### 永久性挂载文件系统 ### + +像前面两个例子那样,/etc/fstab 控制着Linux如何访问硬盘分区及可移动设备。/etc/fstab 由六个字段的内容组成,各个字段之间通过一个空格符或者制表符来分开。井号(#)开始的行只是会被忽略的注释。 + +每一行都按照这个格式来写入: + + + +其中: + +- : 第一个字段指定挂载的设备。大多数发行版本都通过分区的标卷(label)或者 UUID 来指定。这样做可以避免分区号改变是带来的错误。 +- : 第二字段指定挂载点。 +- :文件系统的类型代码与 mount 命令挂载文件系统时使用的类型代码是一样的。通过 auto 类型代码可以让内核自动检测文件系统,这对于可移动设备来说非常方便。注意,该选项可能不是对所有文件系统可用。 +- : 一个(或多个)挂载选项。 +- : 你可能把这个字段设置为 0(否则设置为 1),使得系统启动时禁用 dump 工具(dump 程序曾经是一个常用的备份工具,但现在越来越少用了)对文件系统进行备份。 + +- : 这个字段指定启动系统是是否通过 fsck 来检查文件系统的完整性。0 表示 fsck 不对文件系统进行检查。数字越大,优先级越低。因此,根分区(/)最可能使用数字 1,其他所有需要检查的分区则是以数字 2. + +**Mount 命令例示** + +1. 在系统启动时,通过 TECMINT 标卷来挂载文件系统,并具备 rw 和 noexec 属性,你应该将以下语句添加到 /etc/fstab 文件中。 + + LABEL=TECMINT /mnt ext4 rw,noexec 0 0 + +2. 若你想在系统启动时挂载 DVD 光驱中的内容,添加已下语句。 + + /dev/sr0 /media/cdrom0 iso9660 ro,user,noauto 0 0 + +其中 /dev/sr0 为你的 DVD 光驱。 + +### 总结 ### + +可以放心,在命令行中挂载/卸载本地和网络文件系统将是你作为系统管理员的日常责任的一部分。同时,你需要掌握 /etc/fstab 文件的编写。希望本文对你有帮助。随时在下边发表评论(或者提问),并分享本文到你的朋友圈。 + + +参考链接 + +- [About the LFCS][3] +- [Why get a Linux Foundation Certification?][4] +- [Register for the LFCS exam][5] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/mount-filesystem-in-linux/ + +作者:[Gabriel Cánepa][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:http://www.tecmint.com/setup-samba-server-using-tdbsam-backend-on-rhel-centos-6-3-5-8-and-fedora-17-12/ +[2]:http://www.tecmint.com/how-to-setup-nfs-server-in-linux/ +[3]:https://training.linuxfoundation.org/certification/LFCS +[4]:https://training.linuxfoundation.org/certification/why-certify-with-us +[5]:https://identity.linuxfoundation.org/user?destination=pid/1 diff --git a/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md b/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md new file mode 100644 index 0000000000..5de5004424 --- /dev/null +++ b/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md @@ -0,0 +1,284 @@ +LFCS 系列第六讲:组装分区为RAID设备——创建和管理系统备份 +========================================================= +Linux 基金会已经发起了一个全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让来自世界各地的人有机会参加到 LFCS 测试,获得关于有能力在 Linux 系统中执行中间系统管理任务的认证。该认证包括:维护正在运行的系统和服务的能力、全面监控和分析的能力以及何时上游团队请求支持的决策能力。 + +![Linux Foundation Certified Sysadmin – Part 6](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-6.png) + +LFCS 系列第六讲 + +以下视频介绍了 Linux 基金会认证程序。 + +注:youtube 视频 + + +本讲是《十套教程》系列中的第六讲,在这一讲里,我们将会解释如何组装分区为RAID设备——创建和管理系统备份。这些都是 LFCS 认证中的必备知识。 + +### 了解RAID ### + +一种被称为独立磁盘冗余阵列(RAID)的技术是将多个硬盘组合成一个单独逻辑单元的存储解决方案,它提供了数据冗余功能并且改善硬盘的读写操作性能。 + +然而,实际的容错和磁盘I/O性能硬盘取决于如何将多个硬盘组装成磁盘阵列。根据可用的设备和容错/性能的需求,RAID被分为不同的级别,你可以在Tecmint.com上参考RAID系列文章以获得每个RAID级别更详细的解释。 + +- RAID Guide: [What is RAID, Concepts of RAID and RAID Levels Explained][1] + +我们选择用于创建、组装、管理、监视软件RAID的工具,叫做mdadm(multiple disk admin的简写)。 + +``` +---------------- Debian and Derivatives ---------------- +# aptitude update && aptitude install mdadm +``` + +``` +---------------- Red Hat and CentOS based Systems ---------------- +# yum update && yum install mdadm +``` + +``` +---------------- On openSUSE ---------------- +# zypper refresh && zypper install mdadm # +``` + +#### 组装分区作为RAID设备 #### + +组装已有分区作为RAID设备的过程由以下步骤组成。 + +**1. 使用mdadm创建阵列** + +如果先前其中一个分区被格式化,或者作为了另一个RAID阵列的一部分,你会被提示以确认创建一个新的阵列。假设你已经采取了必要的预防措施以避免丢失重要数据,那么可以安全地输入Y并且按下回车。 + +``` +# mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sdc1 +``` + +![Creating RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Creating-RAID-Array.png) + +创建RAID阵列 + +**2. 检查阵列的创建状态** + +在创建了RAID阵列之后,你可以检查使用以下命令检查阵列的状态。 + + + # cat /proc/mdstat + or + # mdadm --detail /dev/md0 [More detailed summary] + +![Check RAID Array Status](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Array-Status.png) + +检查RAID阵列的状态 + +**3. 格式化RAID设备** + +如本系列[Part 4][2]所介绍的,按照你的需求/要求采用某种文件系统格式化你的设备。 + +4. 监控RAID阵列服务 + +指示监控服务时刻监视你的RAID阵列。把```# mdadm --detail --scan```命令输出结果添加到/etc/mdadm/mdadm.conf(Debian和derivatives)或者/etc/mdadm.conf(Cent0S/openSUSE),如下。 + + # mdadm --detail --scan + + +![Monitor RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Monitor-RAID-Array.png) + +监控RAID阵列 + + # mdadm --assemble --scan [Assemble the array] + +为了确保服务能够开机启动,需要以root权限运行以下命令。 + +**Debian 和 Derivatives** + +Debian 和 Derivatives能够通过下面步骤使服务默认开机启动 + + # update-rc.d mdadm defaults + +在/etc/default/mdadm文件中添加下面这一行 + + AUTOSTART=true + + +**CentOS 和 openSUSE(systemd-based)** + + # systemctl start mdmonitor + # systemctl enable mdmonitor + +**CentOS 和 openSUSEi(SysVinit-based)** + + # service mdmonitor start + # chkconfig mdmonitor on + +**5. 检查RAID磁盘故障** + +在支持冗余的的RAID级别中,在需要时会替换故障的驱动器。当磁盘阵列中的设备出现故障时,仅当存在我们第一次创建阵列时预留的备用设备时,磁盘阵列会将自动启动重建。 + +![Check RAID Faulty Disk](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Faulty-Disk.png) + +检查RAID故障磁盘 + +否则,我们需要手动连接一个额外的物理驱动器到我们的系统,并且运行。 + + # mdadm /dev/md0 --add /dev/sdX1 + +/dev/md0是出现了问题的阵列,而/dev/sdx1是新添加的设备。 + +**6. 分解一个工作阵列** + +如果你需要使用工作阵列的设备创建一个新的阵列,你可能不得不去分解已有工作阵列——(可选步骤) + + # mdadm --stop /dev/md0 # Stop the array + # mdadm --remove /dev/md0 # Remove the RAID device + # mdadm --zero-superblock /dev/sdX1 # Overwrite the existing md superblock with zeroes + +**7. 设置邮件通知** + +你可以配置一个用于发送通知的有效邮件地址或者系统账号(确保在mdadm.conf文件中有下面这一行)。——(可选步骤) + + MAILADDR root + +在这种情况下,来自RAID后台监控程序所有的通知将会发送到你的本地root账号的邮件箱中。其中一个类似的通知如下。 + +说明:此次通知事件和第5步中的例子相关。一个设备被标志为错误并且一个空闲的设备自动地被mdadm加入到阵列。我们用完了所有"健康的"空闲设备,因此我们得到了通知。 + +![RAID Monitoring Alerts](http://www.tecmint.com/wp-content/uploads/2014/10/RAID-Monitoring-Alerts.png) + +RAID监控通知 + +#### 了解RAID级别 #### + +** RAID 0 ** + +阵列总大小是最小分区大小的n倍,n是阵列中独立磁盘的个数(你至少需要两个驱动器/磁盘)。运行下面命令,使用/dev/sdb1和/dev/sdc1分区组装一个RAID 0 阵列。 + + # mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sdc1 + +常见用途:用于支持性能比容错更重要的实时应用程序的设置 + +**RAID 1 (又名镜像/Mirroring)** + +阵列总大小等于最小分区大小(你至少需要两个驱动器/磁盘)。运行下面命令,使用/dev/sdb1和/dev/sdc1分区组装一个RAID 1 阵列。 + + # mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1 + +常见用途:操作系统的安装或者重要的子文件夹,例如 /home + +**RAID 5 (又名奇偶校验码盘/drives with Parity)** + +阵列总大小将是最小分区大小的(n-1)倍。//用于奇偶校验(冗余)计算(你至少需要3个驱动器/磁盘)。 + +说明:你可以指定一个空闲设备(/dev/sde1)替换问题出现时的故障部分(分区)。运行下面命令,使用/dev/sdb1, /dev/sdc1, /dev/sdd1,/dev/sde1组装一个RAID 5 阵列,其中/dev/sde1作为空闲分区。 + + # mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1 --spare-devices=1 /dev/sde1 + +常见用途:Web和文件服务 + +**RAID 6 (又名双重奇偶校验码盘/drives with double Parity)** + +阵列总大小为(n*s)-2*s,其中n为阵列中独立磁盘的个数,s为最小磁盘大小。 + +说明:你可以指定一个空闲分区(在这个例子为/dev/sdf1)替换问题出现时的故障部分(分区)。 + +运行下面命令,使用/dev/sdb1, /dev/sdc1, /dev/sdd1, /dev/sde1和/dev/sdf1组装RAID 6阵列,其中/dev/sdf1作为空闲分区。 + + # mdadm --create --verbose /dev/md0 --level=6 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde --spare-devices=1 /dev/sdf1 + +常见用途:大容量、高可用性要求的文件服务器和备份服务器。 + +**RAID 1+0 (又名镜像条带/stripe of mirrors)** + +因为RAID 1+0是RAID 0 和 RAID 1的组合,所以阵列总大小是基于两者的公式计算的。首先,计算每一个镜像的大小,然后再计算条带的大小。 + + + # mdadm --create --verbose /dev/md0 --level=10 --raid-devices=4 /dev/sd[b-e]1 --spare-devices=1 /dev/sdf1 + +常见用途:需要快速IO操作的数据库和应用服务器 + +#### 创建和管理系统备份 #### + +记住RAID其所有的价值不是在于备份的替换者是对你有益的!在黑板上写上1000次,如果你需要的话,但无论何时一定要记住它。在我们开始前,我们必须注意的是,没有一个放之四海皆准的针对所有系统备份的解决方案,但这里有一些东西,是你在规划一个备份策略时需要考虑的。 + +- 你的系统将用于什么?(桌面或者服务器?如果系统是应用于后者,那么最重要的服务是什么——//其配置?) +- 你每隔多久备份你的系统? +- 你需要备份的数据是什么(比如 文件/文件夹/数据库转储)?你还可以考虑是否需要备份大型文件(比如音频和视频文件)。 +- 这些备份将会存储在哪里(物理位置和媒体)? + +**备份你的数据** + +方法1:使用dd命令备份整个磁盘。你可以在任意时间点通过创建一个准确的镜像来备份一整个硬盘或者是分区。注意当设备是离线时,这种方法效果最好,也就是说它没有被挂载并且没有任何进程的I/O操作访问它。 + +这种备份方法的缺点是镜像将具有和磁盘或分区一样的大小,即使实际数据占用的是一个很小的比例。比如,如果你想要为只使用了10%的20GB的分区创建镜像,那么镜像文件将仍旧是20GB。换句话来讲,它不仅包含了备份的实际数据,而且也包含了整个分区。如果你想完整备份你的设备,那么你可以考虑使用这个方法。 + +**从现有的设备创建一个镜像文件** + + # dd if=/dev/sda of=/system_images/sda.img + 或者 + --------------------- 可选地,你可以压缩镜像文件 ------------------- + # dd if=/dev/sda | gzip -c > /system_images/sda.img.gz + +**从镜像文件恢复备份** + + # dd if=/system_images/sda.img of=/dev/sda + 或者 + --------------------- 根据你创建镜像文件时的选择(译者注:比如压缩) ---------------- + # gzip -dc /system_images/sda.img.gz | dd of=/dev/sda + +方法2:使用tar命令备份确定的文件/文件夹——已经在本系列[Part 3][3]中讲了。如果你想要备份指定的文件/文件夹(配置文件,用户主目录等等),你可以使用这种方法。 + +方法3:使用rsync命令同步文件。rsync是一种多功能远程(和本地)文件复制工具。如果你想要从网络设备备份或同步文件,rsync是一种选择。 + + +无论是你是正在同步两个本地文件夹还是本地 < — > 挂载在本地文件系统的远程文件夹,其基本语法是一样的。 + + # rsync -av source_directory destination directory + +在这里,-a 递归遍历子目录(如果它们存在的话),维持符号链接、时间戳、权限以及原本的属主/属组,-v 显示详细过程。 + +![rsync Synchronizing Files](http://www.tecmint.com/wp-content/uploads/2014/10/rsync-synchronizing-Files.png) + +rsync 同步文件 + +除此之外,如果你想增加在网络上传输数据的安全性,你可以通过rsync使用ssh协议。 + +**通过ssh同步本地 → 远程文件夹** + + # rsync -avzhe ssh backups root@remote_host:/remote_directory/ + +这个示例,本地主机上的backups文件夹将与远程主机上的/root/remote_directory的内容同步。 + +在这里,-h 选项以人可读的格式显示文件的大小,-e 标志用于表示一个ssh连接。 + +![rsync Synchronize Remote Files](http://www.tecmint.com/wp-content/uploads/2014/10/rsync-synchronize-Remote-Files.png) + +rsync 同步远程文件 + +**通过ssh同步远程 → 本地 文件夹** + +在这种情况下,交换前面示例中的source和destination文件夹。 + + # rsync -avzhe ssh root@remote_host:/remote_directory/ backups + +请注意这些只是rsync用法的三个示例而已(你可能遇到的最常见的情形)。对于更多有关rsync命令的示例和用法 ,你可以查看下面的文章。 + +- Read Also: [10 rsync Commands to Sync Files in Linux][4] + +### Summary ### + +作为一个系统管理员,你需要确保你的系统表现得尽可能好。如果你做好了充分准备,并且如果你的数据完整性能被诸如RAID和系统日常备份的存储技术支持,那你将是安全的。 + +如果你有有关完善这篇文章的问题、评论或者进一步的想法,可以在下面畅所欲言。除此之外,请考虑通过你的社交网络简介分享这系列文章。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/creating-and-managing-raid-backups-in-linux/ + +作者:[Gabriel Cánepa][a] +译者:[cpsoture](https://github.com/cposture) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/create-partitions-and-filesystems-in-linux/ +[3]:http://www.tecmint.com/compress-files-and-finding-files-in-linux/ +[4]:http://www.tecmint.com/rsync-local-remote-file-synchronization-commands/ + diff --git a/translated/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md b/translated/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md new file mode 100644 index 0000000000..5f511676af --- /dev/null +++ b/translated/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md @@ -0,0 +1,333 @@ +GHLandy Translated + +LFCS 系列第八讲:管理用户和用户组、文件权限和属性以及启用账户 sudo 访问权限 + +================================================================================ + +去年八月份,Linux 基金会发起了全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让世界各地的人能够参与到关于 Linux 系统中间层的基本管理操作的认证考试中去,这项认证包括:维护正在运行的系统和服务的能力、全面监控和分析的能力以及何时向上游团队请求支持的决策能力。 + +![Linux Users and Groups Management](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-8.png) + +LFCS 系列第八讲 + +请看以下视频,里边将描述 LFCS 认证程序。 + +注:youtube视频 + + +本讲是《十套教程》系列的第八讲,在这一讲中,我们将引导你学习如何在 Linux 管理用户和用户组权限的设置,这些内容是 LFCS 认证开始中的必备知识。 + +由于 Linux 是一个多用户的操作系统(允许多个用户通过不同主机或者终端访问一个独立系统),因此你需要知道如何才能有效地管理用户:如何添加、编辑、禁用和删除用户账户,并赋予他们足以完成自身任务的必要权限。 + +### 添加用户账户 ### + +添加新用户账户,你需要以 root 运行一下两条命令中的任意一条: + + # adduser [new_account] + # useradd [new_account] + +当新用户账户添加到系统时,会自动执行以下操作: + +1. 自动创建用户家目录(默认是 /home/username)。 + +2. 自动拷贝下列隐藏文件到新建用户的家目录,用来设置新用户会话的环境变量。 + + .bash_logout + .bash_profile + .bashrc + +3. 自动创建邮件缓存目录 /var/spool/mail/username。 + +4. 自动创建于用户名相同的用户组。 + +**理解 /etc/passwd 中的内容** + +/etc/passwd 文件中存储了所有用户账户的信息,每个用户在里边都有一条对应的记录,其格式(每个字段用冒号隔开)如下: + + [username]:[x]:[UID]:[GID]:[Comment]:[Home directory]:[Default shell] + +- 字段 [username] 和 [Comment] 是自解释的关系。 +- 第二个字段中 x 表明通过用户名 username 登录系统是有密码保护的, 密码保存在 /etc/shadow 文件中。 +- [UID] 和 [GID] 字段用整数表示,代表该用户的用户标识符和对应所在组的组标志符。 +- 字段 [Home directory] 为 username 用户家目录的绝对路径。 +- 字段 [Default shell] 指定用户登录系统时默认使用的 shell。 + +**理解 /etc/group 中的内容** + +/etc/group 文件存储所有用户组的信息。每行记录的格式如下: + + [Group name]:[Group password]:[GID]:[Group members] + +- [Group name] 为用户组名称。 +- 字段 [Group password] 为 x 的话,则说明不适用用户组密码。 +- [GID] 与 /etc/passwd 中保存的 GID 相同。 +- [Group members] 用户组中的用户使用逗号隔开。 + +![Add User Accounts in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-user-accounts.png) + +添加用户账户 + +添加用户账户之后,你可以使用 usermod 命令来修改用户信息中的部分字段,该命令基本语法如下: + + # usermod [options] [username] + +**设置账户的过期时间** + +通过 –expiredate 标记后边接 年-月-日 格式的日期,如下: + + # usermod --expiredate 2014-10-30 tecmint + +**将用户添加到其他组** + +使用 -aG 或者 –append –groups 选项,后边跟着用户组,如果有多个用户组,每个用户组之间使用逗号隔开。 + + # usermod --append --groups root,users tecmint + +**改变用户家目录的默认位置** + +使用 -d 或者 –home 选项,后边跟着新的家目录的绝对路径。 + + # usermod --home /tmp tecmint + +**改变用户的默认 shell** + +使用 –shell 选项,后边跟着新 shell 的路径。 + + # usermod --shell /bin/sh tecmint + +**显示用户所属的用户组** + + # groups tecmint + # id tecmint + +下面,我们一次运行上述命令: + + # usermod --expiredate 2014-10-30 --append --groups root,users --home /tmp --shell /bin/sh tecmint + +![usermod Command Examples](http://www.tecmint.com/wp-content/uploads/2014/10/usermod-command-examples.png) + +usermod 命令例示 + +扩展阅读 + +- [15 useradd Command Examples in Linux][1] +- [15 usermod Command Examples in Linux][2] + +对于已有用户账户,我们还可以: + +**通过锁定密码来禁用账户** + +使用 -L (大写 l)或者 –lock 选项来锁定用户密码。 + + # usermod --lock tecmint + +**解锁用户密码** + +使用 –u 或者 –unlock 选项来解锁我们之前锁定的账户。 + + # usermod --unlock tecmint + +![Lock User in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/lock-user-in-linux.png) + +锁定用户账户 + +**为需要对指定文件进行读写的多个用户建立用户组** + +运行下列几条命令来完成: + + # groupadd common_group # 添加新用户组 + # chown :common_group common.txt # 将 common.txt 的用户组修改为 common_group + # usermod -aG common_group user1 # 添加用户 user1 到 common_group 用户组 + # usermod -aG common_group user2 # 添加用户 user2 到 common_group 用户组 + # usermod -aG common_group user3 # 添加用户 user3 到 common_group 用户组 + +**删除用户组** + +通过以下命令删除用户组: + + # groupdel [group_name] + +属于这个 group_name 用户组的文件是不会被删除的,而仅仅是删除了用户组。 + +### Linux 文件权限 ### + +除了我们在 [Setting File Attributes – Part 3][3] 中说到的基本的读取、写入和执行权限外,文件还有一些不常用却很重要的的权限设置,有时候把它当做“特殊权限”。 + +就像之前我们讨论的基本权限,这里同样使用八进制数字或者一个字母(象征性符号)好表示该权限类型。 + +**删除用户账户** + +你可以通过 userdel --remove 命令来删除用户账户。这样会删除用户拥有的家目录和家目录下的所有文件,以及邮件缓存目录。 + + # userdel --remove [username] + +#### 用户组管理 #### + +每次添加新用户,系统会为该用户创建同名的用户组,此时用户组里边只有新建的用户,其他用户可以随后添加进去。建立用户组的目的之一,就是为了通过对指定资源设置权限来完成对这些资源和文件进行访问控制。 + +比如,你有下列用户: + +- user1 (primary group: user1) +- user2 (primary group: user2) +- user3 (primary group: user3) + +他们都需要对你系统里边某个位置的 common.txt 文件,或者 user1 用户刚刚创建的共享进行读写。你可能会运行下列命令: + + # chmod 660 common.txt + 或 + # chmod u=rw,g=rw,o= common.txt [注意最后那个 = 号和文件名之间的空格] + +然而,这样仅仅给文件所属的用户和用户组(本例为 user1)成员的提供了读写权限。你还需要将 user2 和 user3 添加到 user1 组,打这样做也将 user1 用户和用户组的其他文件的权限开放给了 user2 和 user3。 + +这时候,用户组就派上用场了,下面将演示怎么做。 + +**理解 Setuid 位** + +当为可执行文件设置 setuid 位之后,用户运行程序是会继承该程序属主的有效特权。由于这样做会引起安全风险,因此设置 setuid 权限的文件及程序必须尽量少。你会发现,当系统中有用户需要执行 root 用户所管辖的程序时就是设置了 setuid 权限。 + +也就是说,用户不仅仅可以运行这个可执行文件,而且能以 root 权限来运行。比如,先检查 /bin/passwd 的权限,这个可执行文件用于改变账户的密码,并修改 /etc/shadow 文件。超级用户可以改变任意账户的密码,但是其他用户只能改变自己账户的密码。 + +![passwd Command Examples](http://www.tecmint.com/wp-content/uploads/2014/10/passwd-command.png) + +passwd 命令例示 + +因此,所有用户都有权限运行 /bin/passwd,但只有 root 用户可以指定改变指定用户账户的密码。其他用户只能改变其自身的密码。 + +![Change User Password in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/change-user-password.png) + +修改用户密码 + +**理解 Setgid 位** + +设置 setgid 位之后,真实用户的有效 GID 变为属组的 GID。因此,任何用户都能以赋予属组用户的权限来访问文件。另外,当目录置了 setgid 位之后,新建的文件将继承其所属目录的 GID,并且新建的子目录会继承父目录的 setgid 位。通过这个方法,你能够以一个指定用户组的身份来访问该目录里边的文件,而不必管文件属主的主属组。 + + # chmod g+s [filename] + +以八进制形式来设置 setgid 位,在当前基本权限(或者想要设置的权限)前加上数字 2 就行了。 + + # chmod 2755 [directory] + +**给目录设置 SETGID 位** + +![Add Setgid in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-setgid-to-directory.png) + +给命令设置 setgid 位 + +**理解 Sticky 位** + +文件设置了 Sticky 为之后,Linux 会将文件忽略,对于该文件影响到的目录,除了属主或者 root 用户外,其他用户无法删除,甚至重命名目录中其他文件也不行。 + +# chmod o+t [directory] + +以八进制形式来设置 sticky 位,在当前基本权限(或者想要设置的权限)前加上数字 1 就行了。 + +# chmod 1755 [directory] + +若没有 sticky 位,任何有权限读写目录的用户都可删除和重命名文件。因此,sticky 为通常出现在像 /tmp 之类的目录,这些目录是所有人都具有写权限的。 + +![Add Stickybit in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-sticky-bit-to-directory.png) + +给目录设置 sticky 位 + +### Linux 特殊文件属性 ### + +文件还有其他一些属性,用来做进一步的操作限制。比如,阻止对文件的重命名、移动、删除甚至是修改。可以通过使用 [chattr 命令][4] 来设置,并可以使用 lsattr 工具来查看这些属性。设置如下: + + # chattr +i file1 + # chattr +a file2 + +运行这些命令之后,file1 成为不可变状态(即不可移动、重命名、修改或删除),而 file2 进入“仅追加”模式(仅在追加内容模式中打开)。 + +![Protect File from Deletion](http://www.tecmint.com/wp-content/uploads/2014/10/chattr-command.png) + +通过 Chattr 命令来包含文件 + +### 访问 root 账户并启用 sudo ### + +访问 root 账户的方法之一,就是通过输入: + + $ su + +然后输入 root 账户密码。 + +倘若授权成功,你将以 root 身份登录,工作目录则是登录前所在的位置。如果是想要一登录就自动进入 root 用户的家目录,请运行: + $ su - + +然后输入 root 账户密码。 + +![Enable sudo Access on Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Sudo-Access.png) + +为用户启用 sudo 访问权限 + +执行上个步骤需要普通用户知道 root 账户的密码,这样会引起非常严重的安全问题。于是,系统管理员通常会配置 sudo 命令来让普通用户在严格控制的环境中以其他用户身份(通常是 root)来执行命令。所有,可以在严格控制用户的情况下,又允许他运行一条或多条特权命令。 + +- 扩展阅读:[Difference Between su and sudo User][5] + +普通用户通过他自己的用户密码来完成 sudo 授权。输入命令之后会出现输入密码(并不是超级用户密码)的提示,授权成功(只要赋予了用户运行该命令的权限)的话,指定的命令就会运行。 + +系统管理员必须编辑 /etc/sudoers 文件,才能为 sudo 赋予相应权限。通常建议使用 visudo 命令来编辑这个文件,而不是使用文本编辑器来打开它。 + + # visudo + +这样会使用 vim(如果你按照 [Install and Use vim as Editor – Part 2][6] 里边说的来编辑文件)来打开 /etc/sudoers 文件。 + +以下是需要设置的相关的行: + + Defaults secure_path="/usr/sbin:/usr/bin:/sbin" + root ALL=(ALL) ALL + tecmint ALL=/bin/yum update + gacanepa ALL=NOPASSWD:/bin/updatedb + %admin ALL=(ALL) ALL + +来更加深入了解这些项: + + Defaults secure_path="/usr/sbin:/usr/bin:/sbin:/usr/local/bin" + +这一行指定 sudo 将要使用的目录,这样可以阻止使用用户指定的目录,那样的话可能会危及系统。 + +下一行是用来指定权限的: + + root ALL=(ALL) ALL + +- 第一个 ALL 关键词表明这条规则适用于所有主机。 +- 第二个 ALL 关键词表明第一个字段中指定的用户能以任何用户身份所具有的权限来运行相应命令。 +- 第三个 ALL 关键词表明可以运行任何命令。 + + tecmint ALL=/bin/yum update + +如果 = 号后边没有指定用户,sudo 则默认为 root 用户。本例中,tecmint 用户能以 root身份运行 yum update 命令。 + + gacanepa ALL=NOPASSWD:/bin/updatedb + +NOPASSWD 关键词表明 gacanepa 用户不需要密码,可以直接运行 /bin/updatedb 命令。 + + %admin ALL=(ALL) ALL + +% 符号表示该行应用 admin 用户组。其他部分的含义与对于用户的含义是一样的。本例表示 admin 用户组的成员可以通过任何主机的链接来运行任何命令。 + +通过 sudo -l 命令可以查看,你的账户拥有什么样的权限。 + +![Sudo Access Rules](http://www.tecmint.com/wp-content/uploads/2014/10/sudo-access-rules.png) + +Sudo 访问规则 + +### 总结 ### +对于系统管理员来说,高效能的用户和文件管理技能是非常必要的。本文已经涵盖了这些内容,我们希望你将这些作为一个开始,,然后慢慢进步。随时在下边发表评论或提问,我们会尽快回应的。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-users-and-groups-in-linux/ + +作者:[Gabriel Cánepa][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:http://www.tecmint.com/add-users-in-linux/ +[2]:http://www.tecmint.com/usermod-command-examples/ +[3]:http://www.tecmint.com/compress-files-and-finding-files-in-linux/ +[4]:http://www.tecmint.com/chattr-command-examples/ +[5]:http://www.tecmint.com/su-vs-sudo-and-how-to-configure-sudo-in-linux/ +[6]:http://www.tecmint.com/vi-editor-usage/ diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md deleted file mode 100644 index b539b9a4a8..0000000000 --- a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md +++ /dev/null @@ -1,143 +0,0 @@ -grepƥַ򵥴ʸʽļļͨ˵grep ʾƥ䵽Уʹgrepһʽƥ䵽УֻʾʵУgrepΪLinuxUnixϵͳõ -### ֪ ### -grep֣ԴڱʾһƵΪgrepUnixLinuxı༭ǣ - - g/re/p - -### grep﷨ ### - -﷨ʾ: - - grep 'word' filename - grep 'word' file1 file2 file3 - grep 'string1 string2' filename - cat otherfile | grep 'something' - command | grep 'something' - command option1 | grep 'data' - grep --color 'data' fileName - -###ôʹgrepһļ### - - /etc/passwd ļµbooû,: - - $ grep boo /etc/passwd - -: - - foo:x:1000:1000:foo,,,:/home/foo:/bin/ksh - -ʹgrepȥǿƺԴСд i.e ʹ-iƥ boo, Boo, BOO ѡ: - - $ grep -i "boo" /etc/passwd - -### ݹʹgrep ### - -ʹgrepݹ i.e. ļĿ¼аַ192.168.1.5ļ - - $ grep -r "192.168.1.5" /etc/ - -ǣ - - $ grep -R "192.168.1.5" /etc/ - -ʾ: - - /etc/ppp/options:# ms-wins 192.168.1.50 - /etc/ppp/options:# ms-wins 192.168.1.51 - /etc/NetworkManager/system-connections/Wired connection 1:addresses1=192.168.1.5;24;192.168.1.2; - -ῴҵ 192.168.1.5 ĽļΪʾڵ棬֮аļԼ-hѡֹ - $ grep -h -R "192.168.1.5" /etc/ - - - - $ grep -hR "192.168.1.5" /etc/ - -ʾ: - - # ms-wins 192.168.1.50 - # ms-wins 192.168.1.51 - addresses1=192.168.1.5;24;192.168.1.2; - -### ʹgrepȥı ### - -boogrepƥfoobooboo123, barfoo35 booַʹ-wѡȥǿѡЩǸʵС - - $ grep -w "boo" file - -### ʹegrepȥȽϲͬ ### - -ʹegrep: - - $ egrep -w 'word1|word2' /path/to/file - -### ıƥʱͳ ### - -grepͨ-cʾÿļƥ䵽Ĵ - - $ grep -c 'word' /path/to/file - --nѡȥʾǰƥ䵽ļ - - $ grep -n 'root' /etc/passwd - -ʾ: - - 1:root:x:0:0:root:/root:/bin/bash - 1042:rootdoor:x:0:0:rootdoor:/home/rootdoor:/bin/csh - 3319:initrootapp:x:0:0:initrootapp:/home/initroot:/bin/ksh - -### תƥ ### - -ʹ-vѡȥӡƥݣݽЩʵУɾbarʵУ - - $ grep -v bar /path/to/file - -### UNIX / Linux ܵ grep ### - -grep ܵһʹãУʾӲ֣ - - # dmesg | egrep '(s|h)d[a-z]' - -ʾCPUģ - - # cat /proc/cpuinfo | grep -i 'Model' - -Ȼ԰·ʹõͬʱʹùܵ: - - # grep -i 'Model' /proc/cpuinfo - -ʾ: - - model : 30 - model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz - model : 30 - model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz - -### νʾƥ䵽ݵļ? ### - -ʹ-lѡȥʾЩļаmainļ: - - $ grep -l 'main' *.c - -ʹgrepɫʵʾ: - - $ grep --color vivek /etc/passwd - -ʾ: - -![Grep command in action](http://files.cyberciti.biz/uploads/faq/2007/08/grep_command_examples.png) - - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/ - -ߣVivek Gite -ߣ[zky001](https://github.com/zky001) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ - -УID -[1]:http://bash.cyberciti.biz/guide/Pipes \ No newline at end of file diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md deleted file mode 100755 index 8389f4c339..0000000000 --- a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md +++ /dev/null @@ -1,288 +0,0 @@ -## grep 中的正则表达式 -================================================================================ -在 Linux 、类 Unix 系统中我该如何使用 Grep 命令的正则表达式呢? - -Linux 附带有 GNU grep 命令工具,它支持正则表达式,而且 GNU grep 在所有的 Linux 系统中都是默认有的。Grep 命令被用于搜索定位存储在您服务器或工作站的信息。 - -### 正则表达式 ### - -正则表达式仅仅是对每个输入行的匹配的一种模式,即对字符序列的匹配模式。下面是范例: - - ^w1 - w1|w2 - [^ ] - -#### grep 正则表达式示例 #### - -在 /etc/passswd 目录中搜索 'vivek' - - grep vivek /etc/passwd - -输出例子: - - vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash - vivekgite:x:1001:1001::/home/vivekgite:/bin/sh - gitevivek:x:1002:1002::/home/gitevivek:/bin/sh - -摸索任何情况下的 vivek(即不区分大小写的搜索) - - grep -i -w vivek /etc/passwd - -摸索任何情况下的 vivek 或 raj - - grep -E -i -w 'vivek|raj' /etc/passwd - -上面最后的例子显示的,就是一个正则表达式扩展的模式。 - -### 锚 ### - -你可以分别使用 ^ 和 $ 符号来正则匹配输入行的开始或结尾。下面的例子搜索显示仅仅以 vivek 开始的输入行: - - grep ^vivek /etc/passwd - -输出例子: - - vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash - vivekgite:x:1001:1001::/home/vivekgite:/bin/sh - -你可以仅仅只搜索出以单词 vivek 开始的行,即不显示 vivekgit、vivekg 等 - - grep -w ^vivek /etc/passwd - -找出以单词 word 结尾的行: - - grep 'foo$' 文件名 - -匹配仅仅只包含 foo 的行: - - grep '^foo$' 文件名 - -如下所示的例子可以搜索空行: - - grep '^$' 文件名 - -### 字符类 ### - -匹配 Vivek 或 vivek: - - grep '[vV]ivek' 文件名 - -或者 - - grep '[vV][iI][Vv][Ee][kK]' 文件名 - -也可以匹配数字 (即匹配 vivek1 或 Vivek2 等等): - - grep -w '[vV]ivek[0-9]' 文件名 - -可以匹配两个数字字符(即 foo11、foo12 等): - - grep 'foo[0-9][0-9]' 文件名 - -不仅仅局限于数字,也能匹配至少一个字母的: - - grep '[A-Za-z]' 文件名 - -显示含有"w" 或 "n" 字符的所有行: - - grep [wn] 文件名 - -在括号内的表达式,即包在"[:" 和 ":]" 之间的字符类的名字,它表示的是属于此类的所有字符列表。标准的字符类名称如下: - -- [:alnum:] - 字母数字字符. -- [:alpha:] - 字母字符 -- [:blank:] - 空字符: 空格键符 和 制表符. -- [:digit:] - 数字: '0 1 2 3 4 5 6 7 8 9'. -- [:lower:] - 小写字母: 'a b c d e f g h i j k l m n o p q r s t u v w x y z'. -- [:space:] - 空格字符: 制表符、换行符、垂直制表符、换页符、回车符和空格键符. -- [:upper:] - 大写字母: 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'. - -例子所示的是匹配所有大写字母: - - grep '[:upper:]' 文件名 - -### 通配符 ### - -你可以使用 "." 来匹配单个字符。例子中匹配以"b"开头以"t"结尾的3个字符的单词: - - grep '\' 文件名 - -在这儿, - -- \< 匹配单词前面的空字符串 -- \> 匹配单词后面的空字符串 - -打印出只有两个字符的所有行: - - grep '^..$' 文件名 - -显示以一个点和一个数字开头的行: - - grep '^\.[0-9]' 文件名 - -#### 点号转义 #### - -下面要匹配到 IP 地址为 192.168.1.254 的正则式是不会工作的: - - egrep '192.168.1.254' /etc/hosts - -三个点符号都需要转义: - - grep '192\.168\.1\.254' /etc/hosts - -下面的例子仅仅匹配出 IP 地址: - - egrep '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' 文件名 - -下面的例子会匹配任意大小写的 Linux 或 UNIX 这两个单词: - - egrep -i '^(linux|unix)' 文件名 - -### 怎么样搜索以 - 符号开头的匹配模式? ### - -要使用 -e 选项来搜索匹配 '--test--' 字符串,如果不使用 -e 选项,grep 命令会试图把 '--test--' 当作自己的选项参数来解析: - - grep -e '--test--' 文件名 - -### 怎么使用 grep 的 OR 匹配? ### - -使用如下的语法: - - grep 'word1|word2' 文件名 - -或者是 - - grep 'word1\|word2' 文件名 - -### 怎么使用 grep 的 AND 匹配? ### - -使用下面的语法来显示既包含 'word1' 又包含 'word2' 的所有行 - - grep 'word1' 文件名 | grep 'word2' - -### 怎么样使用序列检测? ### - -使用如下的语法,您可以检测一个字符在序列中重复出现次数: - - {N} - {N,} - {min,max} - -要匹配字符 “v" 出现两次: - - egrep "v{2}" 文件名 - -下面的命令能匹配到 "col" 和 "cool" : - - egrep 'co{1,2}l' 文件名 - -下面的命令将会匹配出至少有三个 'c' 字符的所有行。 - - egrep 'c{3,}' 文件名 - -下面的例子会匹配 91-1234567890(即二个数字-十个数字) 这种格式的手机号。 - - grep "[[:digit:]]\{2\}[ -]\?[[:digit:]]\{10\}" 文件名 - -### 怎么样使 grep 命令突出显示?### - -使用如下的语法: - - grep --color regex 文件名 - -### 怎么样仅仅只显示匹配出的字符,而不是匹配出的行? ### - -使用如下语法: - - grep -o regex 文件名 - -### 正则表达式限定符### - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
限定符描述
.匹配任意的一个字符.
?匹配前面的子表达式,最多一次。
*匹配前面的子表达式零次或多次。
+匹配前面的子表达式一次或多次。
{N}匹配前面的子表达式 N 次。
{N,}匹配前面的子表达式 N 次到多次。
{N,M}匹配前面的子表达式 N 到 M 次,至少 N 次至多 M 次。
-只要不是在序列开始、结尾或者序列的结束点上,表示序列范围
^匹配一行开始的空字符串;也表示字符不在要匹配的列表中。
$匹配一行末尾的空字符串。
\b匹配一个单词前后的空字符串。
\B匹配一个单词中间的空字符串
\<匹配单词前面的空字符串。
\> 匹配单词后面的空字符串。
- -#### grep 和 egrep #### - -egrep 跟 **grep -E** 是一样的。他会以正则表达式的模式来解释。下面是 grep 的帮助页(man): - - 基本的正则表达式元字符 ?、+、 {、 |、 ( 和 ) 已经失去了他们特殊的意义,要使用的话用反斜线的版本 \?、\+、\{、\|、\( 和 \) 来代替。 - 传统的 egrep 不支持 { 元字符,一些 egrep 的实现是以 \{ 替代的,所以有 grep -E 的通用脚本应该避免使用 { 符号,要匹配字面的 { 应该使用 [}]。 - GNU grep -E 试图支持传统的用法,如果 { 出在在无效的间隔规范字符串这前,它就会假定 { 不是特殊字符。 - 例如,grep -E '{1' 命令搜索包含 {1 两个字符的串,而不会报出正则表达式语法错误。 - POSIX.2 标准允许对这种操作的扩展,但在可移植脚本文件里应该避免这样使用。 - -引用: - -- grep 和 regex 帮助手册页(7) -- grep 的 info 页` - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/faq/grep-regular-expressions/ - -作者:Vivek Gite -译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/中文排版指北.md b/中文排版指北.md new file mode 100644 index 0000000000..8f54947f8f --- /dev/null +++ b/中文排版指北.md @@ -0,0 +1,300 @@ +# 中文文案排版指北 +[![devDependency Status](https://david-dm.org/mzlogin/chinese-copywriting-guidelines/dev-status.svg)](https://david-dm.org/mzlogin/chinese-copywriting-guidelines#info=devDependencies) + +统一中文文案、排版的相关用法,降低团队成员之间的沟通成本,增强网站气质。 + +Other languages: + +- [English](https://github.com/mzlogin/chinese-copywriting-guidelines/blob/Simplified/README.en.md) +- [Chinese Traditional](https://github.com/sparanoid/chinese-copywriting-guidelines) +- [Chinese Simplified](README.md) + +----- + +## 目录 + +- [空格](#空格) + - [中英文之间需要增加空格](#中英文之间需要增加空格) + - [中文与数字之间需要增加空格](#中文与数字之间需要增加空格) + - [数字与单位之间需要增加空格](#数字与单位之间需要增加空格) + - [全角标点与其他字符之间不加空格](#全角标点与其他字符之间不加空格) + - [`-ms-text-autospace` to the rescue?](#-ms-text-autospace-to-the-rescue) +- [标点符号](#标点符号) + - [不重复使用标点符号](#不重复使用标点符号) +- [全角和半角](#全角和半角) + - [使用全角中文标点](#使用全角中文标点) + - [数字使用半角字符](#数字使用半角字符) + - [遇到完整的英文整句、特殊名词,其內容使用半角标点](#遇到完整的英文整句特殊名词其內容使用半角标点) +- [名词](#名词) + - [专有名词使用正确的大小写](#专有名词使用正确的大小写) + - [不要使用不地道的缩写](#不要使用不地道的缩写) +- [争议](#争议) + - [链接之间增加空格](#链接之间增加空格) + - [简体中文使用直角引号](#简体中文使用直角引号) +- [工具](#工具) +- [谁在这样做?](#谁在这样做) +- [参考文献](#参考文献) + +## 空格 + +「有研究显示,打字的时候不喜欢在中文和英文之间加空格的人,感情路都走得很辛苦,有七成的比例会在 34 岁的时候跟自己不爱的人结婚,而其余三成的人最后只能把遗产留给自己的猫。毕竟爱情跟书写都需要适时地留白。 + +与大家共勉之。」——[vinta/paranoid-auto-spacing](https://github.com/vinta/pangu.js) + +### 中英文之间需要增加空格 + +正确: + +> 在 LeanCloud 上,数据存储是围绕 `AVObject` 进行的。 + +错误: + +> 在LeanCloud上,数据存储是围绕`AVObject`进行的。 + +> 在 LeanCloud上,数据存储是围绕`AVObject` 进行的。 + +完整的正确用法: + +> 在 LeanCloud 上,数据存储是围绕 `AVObject` 进行的。每个 `AVObject` 都包含了与 JSON 兼容的 key-value 对应的数据。数据是 schema-free 的,你不需要在每个 `AVObject` 上提前指定存在哪些键,只要直接设定对应的 key-value 即可。 + +例外:「豆瓣FM」等产品名词,按照官方所定义的格式书写。 + +### 中文与数字之间需要增加空格 + +正确: + +> 今天出去买菜花了 5000 元。 + +错误: + +> 今天出去买菜花了 5000元。 + +> 今天出去买菜花了5000元。 + +### 数字与单位之间需要增加空格 + +正确: + +> 我家的光纤入户宽带有 10 Gbps,SSD 一共有 20 TB。 + +错误: + +> 我家的光纤入户宽带有 10Gbps,SSD 一共有 10TB。 + +例外:度/百分比与数字之间不需要增加空格: + +正确: + +> 今天是 233° 的高温。 + +> 新 MacBook Pro 有 15% 的 CPU 性能提升。 + +错误: + +> 今天是 233 ° 的高温。 + +> 新 MacBook Pro 有 15 % 的 CPU 性能提升。 + +### 全角标点与其他字符之间不加空格 + +正确: + +> 刚刚买了一部 iPhone,好开心! + +错误: + +> 刚刚买了一部 iPhone ,好开心! + +### `-ms-text-autospace` to the rescue? + +Microsoft 有个 [`-ms-text-autospace`](http://msdn.microsoft.com/en-us/library/ie/ms531164(v=vs.85).aspx) 的 CSS 属性可以实现自动为中英文之间增加空白。不过目前并未普及,另外在其他应用场景,例如 OS X、iOS 的用户界面目前并不存在这个特性,所以请继续保持随手加空格的习惯。 + +## 标点符号 + +### 不重复使用标点符号 + +正确: + +> 德国队竟然战胜了巴西队! + +> 她竟然对你说「喵」?! + +错误: + +> 德国队竟然战胜了巴西队!! + +> 德国队竟然战胜了巴西队!!!!!!!! + +> 她竟然对你说「喵」??!! + +> 她竟然对你说「喵」?!?!??!! + +## 全角和半角 + +不明白什么是全角(全形)与半角(半形)符号?请查看维基百科词条『[全角和半角](http://zh.wikipedia.org/wiki/%E5%85%A8%E5%BD%A2%E5%92%8C%E5%8D%8A%E5%BD%A2)』。 + +### 使用全角中文标点 + +正确: + +> 嗨!你知道嘛?今天前台的小妹跟我说「喵」了哎! + +> 核磁共振成像(NMRI)是什么原理都不知道?JFGI! + +错误: + +> 嗨! 你知道嘛? 今天前台的小妹跟我说 "喵" 了哎! + +> 嗨!你知道嘛?今天前台的小妹跟我说"喵"了哎! + +> 核磁共振成像 (NMRI) 是什么原理都不知道? JFGI! + +> 核磁共振成像(NMRI)是什么原理都不知道?JFGI! + +### 数字使用半角字符 + +正确: + +> 这件蛋糕只卖 1000 元。 + +错误: + +> 这件蛋糕只卖 1000 元。 + +例外:在设计稿、宣传海报中如出现极少量数字的情形时,为方便文字对齐,是可以使用全角数字的。 + +### 遇到完整的英文整句、特殊名词,其內容使用半角标点 + +正确: + +> 乔布斯那句话是怎么说的?「Stay hungry, stay foolish.」 + +> 推荐你阅读《Hackers & Painters: Big Ideas from the Computer Age》,非常的有趣。 + +错误: + +> 乔布斯那句话是怎么说的?「Stay hungry,stay foolish。」 + +> 推荐你阅读《Hackers&Painters:Big Ideas from the Computer Age》,非常的有趣。 + +## 名词 + +### 专有名词使用正确的大小写 + +大小写相关用法原属于英文书写范畴,不属于本 wiki 讨论內容,在这里只对部分易错用法进行简述。 + +正确: + +> 使用 GitHub 登录 + +> 我们的客户有 GitHub、Foursquare、Microsoft Corporation、Google、Facebook, Inc.。 + +错误: + +> 使用 github 登录 + +> 使用 GITHUB 登录 + +> 使用 Github 登录 + +> 使用 gitHub 登录 + +> 使用 gイんĤЦ8 登录 + +> 我们的客户有 github、foursquare、microsoft corporation、google、facebook, inc.。 + +> 我们的客户有 GITHUB、FOURSQUARE、MICROSOFT CORPORATION、GOOGLE、FACEBOOK, INC.。 + +> 我们的客户有 Github、FourSquare、MicroSoft Corporation、Google、FaceBook, Inc.。 + +> 我们的客户有 gitHub、fourSquare、microSoft Corporation、google、faceBook, Inc.。 + +> 我们的客户有 gイんĤЦ8、キouЯƧquムгє、๓เςг๏ร๏Ŧt ς๏гק๏гคtเ๏ภn、900913、ƒ4ᄃëв๏๏к, IПᄃ.。 + +注意:当网页中需要配合整体视觉风格而出现全部大写/小写的情形,HTML 中请使用标准的大小写规范进行书写;并通过 `text-transform: uppercase;`/`text-transform: lowercase;` 对表现形式进行定义。 + +### 不要使用不地道的缩写 + +正确: + +> 我们需要一位熟悉 JavaScript、HTML5,至少理解一种框架(如 Backbone.js、AngularJS、React 等)的前端开发者。 + +错误: + +> 我们需要一位熟悉 Js、h5,至少理解一种框架(如 backbone、angular、RJS 等)的 FED。 + +## 争议 + +以下用法略带有个人色彩,既:无论是否遵循下述规则,从语法的角度来讲都是**正确**的。 + +### 链接之间增加空格 + +用法: + +> 请 [提交一个 issue](#) 并分配给相关同事。 + +> 访问我们网站的最新动态,请 [点击这里](#) 进行订阅! + +对比用法: + +> 请[提交一个 issue](#) 并分配给相关同事。 + +> 访问我们网站的最新动态,请[点击这里](#)进行订阅! + +### 简体中文使用直角引号 + +用法: + +> 「老师,『有条不紊』的『紊』是什么意思?」 + +对比用法: + +> “老师,‘有条不紊’的‘紊’是什么意思?” + +## 工具 + +仓库 | 语言 +--- | --- +[vinta/paranoid-auto-spacing](https://github.com/vinta/paranoid-auto-spacing) | JavaScript +[huei90/pangu.node](https://github.com/huei90/pangu.node) | Node.js +[huacnlee/auto-correct](https://github.com/huacnlee/auto-correct) | Ruby +[sparanoid/space-lover](https://github.com/sparanoid/space-lover) | PHP (WordPress) +[nauxliu/auto-correct](https://github.com/NauxLiu/auto-correct) | PHP +[hotoo/pangu.vim](https://github.com/hotoo/pangu.vim) | Vim +[sparanoid/grunt-auto-spacing](https://github.com/sparanoid/grunt-auto-spacing) | Node.js (Grunt) +[hjiang/scripts/add-space-between-latin-and-cjk](https://github.com/hjiang/scripts/blob/master/add-space-between-latin-and-cjk) | Python + +## 谁在这样做? + +网站 | 文案 | UGC +--- | --- | --- +[Apple 中国](http://www.apple.com/cn/) | Yes | N/A +[Apple 香港](http://www.apple.com/hk/) | Yes | N/A +[Apple 台湾](http://www.apple.com/tw/) | Yes | N/A +[Microsoft 中国](http://www.microsoft.com/zh-cn/) | Yes | N/A +[Microsoft 香港](http://www.microsoft.com/zh-hk/) | Yes | N/A +[Microsoft 台湾](http://www.microsoft.com/zh-tw/) | Yes | N/A +[LeanCloud](https://leancloud.cn/) | Yes | N/A +[知乎](https://www.zhihu.com/) | Yes | 部分用户达成 +[V2EX](https://www.v2ex.com/) | Yes | Yes +[SegmentFault](https://segmentfault.com/) | Yes | 部分用户达成 +[Apple4us](http://apple4us.com/) | Yes | N/A +[豌豆荚](https://www.wandoujia.com/) | Yes | N/A +[Ruby China](https://ruby-china.org/) | Yes | 标题达成 +[PHPHub](https://phphub.org/) | Yes | 标题达成 + +## 参考文献 + +- [Guidelines for Using Capital Letters](http://grammar.about.com/od/punctuationandmechanics/a/Guidelines-For-Using-Capital-Letters.htm) +- [Letter case - Wikipedia](http://en.wikipedia.org/wiki/Letter_case) +- [Punctuation - Oxford Dictionaries](http://www.oxforddictionaries.com/words/punctuation) +- [Punctuation - The Purdue OWL](https://owl.english.purdue.edu/owl/section/1/6/) +- [How to Use English Punctuation Corrently - wikiHow](http://www.wikihow.com/Use-English-Punctuation-Correctly) +- [格式 - openSUSE](https://zh.opensuse.org/index.php?title=Help:%E6%A0%BC%E5%BC%8F) +- [全角和半角 - 维基百科](http://zh.wikipedia.org/wiki/%E5%85%A8%E5%BD%A2%E5%92%8C%E5%8D%8A%E5%BD%A2) +- [引号 - 维基百科](http://zh.wikipedia.org/wiki/%E5%BC%95%E8%99%9F) +- [疑问惊叹号 - 维基百科](http://zh.wikipedia.org/wiki/%E7%96%91%E5%95%8F%E9%A9%9A%E5%98%86%E8%99%9F) + +## CopyRight + +[中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines)