mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-25 00:50:15 +08:00
commit
34a4de8535
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
||||
members.md
|
||||
*.html
|
||||
*.bak
|
||||
.DS_Store
|
||||
|
73
README.md
73
README.md
@ -40,6 +40,8 @@ LCTT的组成
|
||||
- CORE [geekpi](https://github.com/geekpi),
|
||||
- CORE [GOLinux](https://github.com/GOLinux),
|
||||
- CORE [reinoir](https://github.com/reinoir),
|
||||
- CORE [bazz2](https://github.com/bazz2),
|
||||
- CORE [zpl1025](https://github.com/zpl1025),
|
||||
- Senior [tinyeyeser](https://github.com/tinyeyeser),
|
||||
- Senior [vito-L](https://github.com/vito-L),
|
||||
- Senior [jasminepeng](https://github.com/jasminepeng),
|
||||
@ -47,66 +49,73 @@ LCTT的组成
|
||||
- Senior [vizv](https://github.com/vizv),
|
||||
- [runningwater](https://github.com/runningwater),
|
||||
- [luoxcat](https://github.com/Luoxcat),
|
||||
- [bazz2](https://github.com/bazz2),
|
||||
- [Vic020](https://github.com/Vic020),
|
||||
- [alim0x](https://github.com/alim0x),
|
||||
- [KayGuoWhu](https://github.com/KayGuoWhu),
|
||||
- [zpl1025](https://github.com/zpl1025),
|
||||
- [blueabysm](https://github.com/blueabysm),
|
||||
- [flsf](https://github.com/flsf),
|
||||
- [crowner](https://github.com/crowner),
|
||||
- [Linux-pdz](https://github.com/Linux-pdz),
|
||||
- [Linchenguang](https://github.com/Linchenguang),
|
||||
- [linuhap](https://github.com/linuhap),
|
||||
- [alim0x](https://github.com/alim0x),
|
||||
- [ZTinoZ](https://github.com/ZTinoZ),
|
||||
- [2q1w2007](https://github.com/2q1w2007),
|
||||
- [flsf](https://github.com/flsf),
|
||||
- [blueabysm](https://github.com/blueabysm),
|
||||
- [barney-ro](https://github.com/barney-ro),
|
||||
- [su-kaiyao](https://github.com/su-kaiyao),
|
||||
- [crowner](https://github.com/crowner),
|
||||
- [Linchenguang](https://github.com/Linchenguang),
|
||||
- [Linux-pdz](https://github.com/Linux-pdz),
|
||||
- [linuhap](https://github.com/linuhap),
|
||||
- [yechunxiao19](https://github.com/yechunxiao19),
|
||||
- [woodboow](https://github.com/woodboow),
|
||||
- [su-kaiyao](https://github.com/su-kaiyao),
|
||||
- [SPccman](https://github.com/SPccman),
|
||||
- [disylee](https://github.com/disylee),
|
||||
- [cvsher](https://github.com/cvsher),
|
||||
- [ThomazL](https://github.com/ThomazL),
|
||||
- [Stevearzh](https://github.com/Stevearzh),
|
||||
- [felixonmars](https://github.com/felixonmars),
|
||||
- [scusjs](https://github.com/scusjs),
|
||||
- [johnhoow](https://github.com/johnhoow),
|
||||
- [hyaocuk](https://github.com/hyaocuk),
|
||||
- [MikeCoder](https://github.com/MikeCoder),
|
||||
- [ThomazL](https://github.com/ThomazL),
|
||||
- [theo-l](https://github.com/theo-l),
|
||||
- [wangjiezhe](https://github.com/wangjiezhe),
|
||||
- [jiajia9linuxer](https://github.com/jiajia9linuxer),
|
||||
- [SteveArcher](https://github.com/SteveArcher),
|
||||
- [l3b2w1](https://github.com/l3b2w1),
|
||||
- [NearTan](https://github.com/NearTan),
|
||||
- [l3b2w1](https://github.com/l3b2w1),
|
||||
- [shipsw](https://github.com/shipsw),
|
||||
- [disylee](https://github.com/disylee),
|
||||
- [Love-xuan](https://github.com/Love-xuan),
|
||||
- [boredivan](https://github.com/boredivan),
|
||||
- [cvsher](https://github.com/cvsher),
|
||||
- [owen-carter](https://github.com/owen-carter),
|
||||
- [Love-xuan](https://github.com/Love-xuan),
|
||||
- [JonathanKang](https://github.com/JonathanKang),
|
||||
- [tenght](https://github.com/tenght),
|
||||
- [luoyutiantang](https://github.com/luoyutiantang),
|
||||
- [owen-carter](https://github.com/owen-carter),
|
||||
- [icybreaker](https://github.com/icybreaker),
|
||||
- [liuaiping](https://github.com/liuaiping),
|
||||
- [tenght](https://github.com/tenght),
|
||||
- [rogetfan](https://github.com/rogetfan),
|
||||
- [liuaiping](https://github.com/liuaiping),
|
||||
- [nd0104](https://github.com/nd0104),
|
||||
- [whatever1992](https://github.com/whatever1992),
|
||||
- [szrlee](https://github.com/szrlee),
|
||||
- [lfzark](https://github.com/lfzark),
|
||||
- [CNprober](https://github.com/CNprober),
|
||||
- [213edu](https://github.com/213edu),
|
||||
- [johnhoow](https://github.com/johnhoow),
|
||||
- [yujianxuechuan](https://github.com/yujianxuechuan),
|
||||
- [ggaaooppeenngg](https://github.com/ggaaooppeenngg),
|
||||
- [CNprober](https://github.com/CNprober),
|
||||
- [coloka](https://github.com/coloka),
|
||||
- [213edu](https://github.com/213edu),
|
||||
- [guodongxiaren](https://github.com/guodongxiaren),
|
||||
- [Tanete](https://github.com/Tanete),
|
||||
- [zzlyzq](https://github.com/zzlyzq),
|
||||
- [yujianxuechuan](https://github.com/yujianxuechuan),
|
||||
- [ailurus1991](https://github.com/ailurus1991),
|
||||
- [FineFan](https://github.com/FineFan),
|
||||
- [shaohaolin](https://github.com/shaohaolin),
|
||||
- [tomatoKiller](https://github.com/tomatoKiller),
|
||||
- [CHINAANSHE](https://github.com/CHINAANSHE),
|
||||
- [stduolc](https://github.com/stduolc),
|
||||
- [Maclauring](https://github.com/Maclauring),
|
||||
- [zsJacky](https://github.com/zsJacky),
|
||||
- [Hao-Ding](https://github.com/Hao-Ding),
|
||||
- [luoyutiantang](https://github.com/luoyutiantang),
|
||||
- [zsJacky](https://github.com/zsJacky),
|
||||
- [small-Wood](https://github.com/small-Wood),
|
||||
- [CHINAANSHE](https://github.com/CHINAANSHE),
|
||||
- [guodongxiaren](https://github.com/guodongxiaren),
|
||||
- [cereuz](https://github.com/cereuz),
|
||||
- [lijhg](https://github.com/lijhg),
|
||||
- [fbigun](https://github.com/fbigun),
|
||||
|
||||
|
||||
(更新于2014/09/09)
|
||||
(更新于2014/12/02,以Github contributors列表排名)
|
||||
|
||||
谢谢大家的支持!
|
||||
|
||||
@ -124,5 +133,7 @@ LCTT的组成
|
||||
* 2014/01/02 增加了Core Translators 成员: geekpi。
|
||||
* 2014/05/04 更换了新的QQ群:198889102
|
||||
* 2014/05/16 增加了Core Translators 成员: will.qian、vizv。
|
||||
* 2014/06/18 由于GOLinux令人惊叹的翻译速度和不错的翻译质量,升级为Core Translators 成员。
|
||||
* 2014/09/09 LCTT 一周年,做一年[总结](http://linux.cn/article-3784-1.html)。并将曾任 CORE 的成员分组为 Senior,以表彰他们的贡献。
|
||||
* 2014/06/18 由于GOLinux令人惊叹的翻译速度和不错的翻译质量,升级为Core Translators成员。
|
||||
* 2014/09/09 LCTT 一周年,做一年[总结](http://linux.cn/article-3784-1.html)。并将曾任 CORE 的成员分组为 Senior,以表彰他们的贡献。
|
||||
* 2014/10/08 提升bazz2为Core Translators成员。
|
||||
* 2014/11/04 提升zpl1025为Core Translators成员。
|
@ -1,7 +1,9 @@
|
||||
对Linux系统管理员有帮助的命令行工具
|
||||
Linux系统管理员的命令行工具箱目录
|
||||
================================================================================
|
||||
系统管理员(sysadmins)负责日常维护生产系统和服务。其中一个关键任务就是保证功能性服务能24小时工作。为了这个,他们得很小心地计划备份方式,灾难管理策略,定时维护,安全审查,等等。和任意其他管理一样,系统管理员也有他们的必备工具。在正确的时间正确的情况下使用合适的工具,可以帮助维护操作系统的健壮,达到最小的服务中断时间和最大的运行时间。
|
||||
|
||||

|
||||
|
||||
这篇文章会介绍一些系统管理员日常活动中最常用和有效的命令行工具。如果你想推荐其他没在这里列出来的好用的工具,别忘了在评论区里分享一下。
|
||||
|
||||
### 网络工具 ###
|
||||
@ -14,7 +16,7 @@
|
||||
|
||||
4. **mtr**:traceroute的一个变种,能根据运行时统计数据整理出每一跳的包丢失/抖动。用来评估路由路径延时很不错。
|
||||
|
||||
5. **[netcat][2]/[socat][3]**:TCP/IP网络里的瑞士军刀,可以读/写TCP/UDP协议字节流。用来调试防火墙策略和服务可用性很不错。
|
||||
5. **[netcat][2]/[socat][3]**:TCP/IP网络里的瑞士军刀,可以读/写 TCP/UDP 协议字节流。用来调试防火墙策略和服务可用性很不错。
|
||||
|
||||
6. **dig**:DNS调试工具,可以生成正向查询,反向查询,搜索域名服务器,检查CNAME,MX和其他DNS记录。可以在侦错的时候查询特定的DNS服务器。
|
||||
|
||||
@ -68,7 +70,7 @@
|
||||
|
||||
29. **[parted][15]**:另一个磁盘分区编辑器,支持超过2TB的磁盘的GPT(GUID分区表)格式。gparted是parted的一个前端GTK+图形界面。
|
||||
|
||||
30. **df**:用来查看不同分区或文件路径的已用/可用存储空间和挂载点。存在一个用户友好的变种dfc。
|
||||
30. **df**:用来查看不同分区或文件路径的已用/可用存储空间和挂载点。还有一个更易用的变种dfc。
|
||||
|
||||
31. **du**:用来查看不同文件和目录的当前磁盘占用情况(例如,du -sh *)。
|
||||
|
||||
@ -86,7 +88,7 @@
|
||||
|
||||
37. **tail**:用来查看一个(增长中的)日志文件的尾部。有几个变种,包括multitail(多窗口查看)和[ztail][16](支持inotify和正则表达式过滤以及颜色)。
|
||||
|
||||
38. **logrotate**:一个命令行工具,可以在根据设定的时间段拆分、压缩并邮寄旧的/大的日志文件。用来管理可能产生大量日志文件的繁忙主机很有用。
|
||||
38. **logrotate**:一个命令行工具,可以在根据设定的时间段拆分、压缩并通过邮件发送旧的/大的日志文件。用来管理可能产生大量日志文件的繁忙主机很有用。
|
||||
|
||||
39. **grep/egrep**:可以通过特定的模式或正则表达式过滤日志内容。变种包括用户更友好的ack和速度更快的ag。
|
||||
|
||||
@ -96,7 +98,7 @@
|
||||
|
||||
### 备份工具 ###
|
||||
|
||||
42. **[rsync][17]**:一个快速的单向增量备份和镜像工具。常用于复制一个数据仓库到线下存储,可以选择通过SSH或stunnel的加密连接。
|
||||
42. **[rsync][17]**:一个快速的单向增量备份和镜像工具(LCTT 译注:rsync 应是双向的)。常用于复制一个数据仓库到线下存储,可以选择通过SSH或stunnel的加密连接。
|
||||
|
||||
43. **[rdiff-backup][18]**:另一个有效利用带宽的增量备份工具。管理两个连续快照之间的差分。
|
||||
|
||||
@ -104,13 +106,13 @@
|
||||
|
||||
### 性能监视工具 ###
|
||||
|
||||
45. **top**:一个命令行的进程查看程序。可以监视系统负载、进程状态、CPU和内存占用。有一个更用户友好的变种htop。
|
||||
45. **top**:一个命令行的进程查看程序。可以监视系统负载、进程状态、CPU和内存占用。有一个更易用的变种htop。
|
||||
|
||||
46. **ps**:显示系统所有运行中进程的一个快照。输出可以定制成显示PID、PPID、用户、负载、内存、积累的用户/系统时间、启动时间、以及更多。有一个变种是pstree可以用树结构显示进程。
|
||||
46. **ps**:显示系统所有运行中进程的一个快照。输出可以定制成显示PID、PPID、用户、负载、内存、积累的用户/系统时间、启动时间、以及更多。有一个变种pstree可以用树结构显示进程。
|
||||
|
||||
47. **[nethogs][19]**:一个带宽监视工具,按进程来分组显示活动网络连接,实时汇报每个进程占用的(上传/下载)带宽。
|
||||
|
||||
48. **ngxtop**:一个网页服务器访问日志解析和监视工具,界面是受top命令启发。它可以实时汇报整理过的页面请求列表,包括频率、大小、HTTP返回值、IP地址,等等。
|
||||
48. **ngxtop**:一个网页服务器访问日志解析和监视工具,界面受到了top命令启发。它可以实时汇报整理过的页面请求列表,包括频率、大小、HTTP返回值、IP地址,等等。
|
||||
|
||||
49. **vmstat**:一个简单的命令行工具,可以显示多个实时系统特征,例如进程数、剩余内存、分页状态、CPU占用、块设备I/O活动、中断/上下文切换统计、等等。
|
||||
|
||||
@ -138,9 +140,9 @@
|
||||
|
||||
59. **dpkg**:一个用来手动安装.deb包的命令行工具。强烈建议尽可能的使用apt。
|
||||
|
||||
60. **yum**:基于红帽的系统的事实上的自动包管理工具,比如RHEL、CentOS或Fedora。另一个救生圈。
|
||||
60. **yum**:用于基于红帽的系统的自动包管理工具,比如RHEL、CentOS或Fedora。这是另一个救生圈!
|
||||
|
||||
61. **rpm**:通常我都是rpmyum一下。有很多有用的参数,比如-q、-f、-l可以分别用来查询、指定文件和路径。
|
||||
61. **rpm**:通常我都是使用 rpm 来配合 yum 使用。有很多有用的参数,比如-q、-f、-l可以分别用来查询、指定文件和路径。
|
||||
|
||||
### 硬件工具 ###
|
||||
|
||||
@ -158,7 +160,7 @@ via: http://xmodulo.com/2014/08/useful-cli-tools-linux-system-admins.html
|
||||
|
||||
作者:[Sarmed Rahman][a]
|
||||
译者:[zpl1025](https://github.com/zpl1025)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,4 +1,4 @@
|
||||
Postfix的20个问答题
|
||||
20个关于Postfix的面试题
|
||||
================================================================================
|
||||
### 问题1:什么是 Postfix,它的默认端口是多少? ###
|
||||
|
||||
@ -10,19 +10,19 @@ Postfix的20个问答题
|
||||
|
||||
### 问题3:什么是 MTA,它在邮件系统中扮演什么角色? ###
|
||||
|
||||
答:MTA 是 Mail Transfer Agent 的缩写。MTA 负责接收和发送邮件、确定发送路径和地址重写(LCTT:address rewriting,就是完善发送地址,比如将“username”这个地址重写为“username@example.com”)。本地转发就是将邮件发送给 MDA。Qmail、Postix、Sendmail 都是 MTA。
|
||||
答:MTA 是 Mail Transfer Agent (邮件传输代理)的缩写。MTA 负责接收和发送邮件、确定发送路径和地址重写(LCTT译注:address rewriting,就是完善发送地址,比如将“username”这个地址重写为“username@example.com”)。本地转发就是将邮件发送给 MDA。Qmail、Postix、Sendmail 都是 MTA。
|
||||
|
||||
### 问题4:什么是 MDA? ###
|
||||
|
||||
答:MDA 是 Mail Delivery Agent 的缩写。MDA 这个程序用于从 MTA 获取邮件并传送至本地接受者的邮箱。MDA 通常可以过滤邮件或为邮件分类。一个 MDA 也能决定一封邮件是否需要转发到另一个邮箱地址。Procmail 就是一个 MDA。
|
||||
答:MDA 是 Mail Delivery Agent (邮件投递代理)的缩写。MDA 这个程序用于从 MTA 获取邮件并投递至本地收件人的邮箱。MDA 通常可以过滤邮件或为邮件分类。一个 MDA 也能决定一封邮件是否需要转发到另一个邮箱地址。Procmail 就是一个 MDA。
|
||||
|
||||
### 问题5:什么是 MUA? ###
|
||||
|
||||
答:MUA 是 Mail User Agent 的缩写。MUA 是一个邮件客户端软件,可以用来写邮件、发送邮件、接收邮件。发送邮件时使用的是 MTA;接收邮件时可以从邮件存储区直接收取,也可以通过 POP/IMAP 服务器间接收取。Outlook、Thunkerbird、Evolution 都是 MUA。
|
||||
答:MUA 是 Mail User Agent (邮件用户代理)的缩写。MUA 是一个邮件客户端软件,可以用来写邮件、发送邮件、接收邮件。发送邮件时使用的是 MTA;接收邮件时可以从邮件存储区直接收取,也可以通过 POP/IMAP 服务器间接收取。Outlook、Thunkerbird、Evolution 都是 MUA。
|
||||
|
||||
### 问题6:Mailserver 里 postmaster 的作用是什么? ###
|
||||
### 问题6:邮件服务器里 postmaster 的作用是什么? ###
|
||||
|
||||
答:邮件管理者一般就是 postmaster。一个 postmaster 的责任就是保证邮件系统正常工作、更新系统配置、添加/删除邮箱帐号,以及其他。每个域中必须存在一个 postmaster 的别名(LCTT:postmaster 别名的作用就是能让你的邮件系统以外的用户往邮件系统里面的用户发邮件,当然也能接收来自系统内部用户发送出来的邮件),用于将邮件发往正确的用户。
|
||||
答:邮件管理者一般就是 postmaster。一个 postmaster 的责任就是保证邮件系统正常工作、更新系统配置、添加/删除邮箱帐号,以及其他工作。每个域中必须存在一个 postmaster 的别名(LCTT译注:postmaster 别名用于接受一些其它服务器/用户对该邮件系统的沟通邮件,如关于垃圾邮件拒收的投诉等,通常都会直接被邮件服务器的管理员所接受。一些系统错误和提示的邮件,也往往以postmaster 作为发件人),用于将邮件发往正确的用户。
|
||||
|
||||
### 问题7:Postfix 都有些什么重要的进程? ###
|
||||
|
||||
@ -31,10 +31,10 @@ Postfix的20个问答题
|
||||
- **master**:这条进程是 Postfix 邮件系统的大脑,它产生所有其他进程。
|
||||
- **smtpd**:作为服务器端程序处理所有外部连进来的请求。
|
||||
- **smtp**:作为客户端程序处理所有对外发起连接的请求。
|
||||
- **qmgr**:它是 Postfix 邮件系统的心脏,处理和控制邮件列表里面的所有消息。
|
||||
- **local**:这是 Postfix 自有的本地传送代理,就是它负责把邮件保存到邮箱里。
|
||||
- **qmgr**:它是 Postfix 邮件系统的心脏,处理和控制邮件队列里面的所有消息。
|
||||
- **local**:这是 Postfix 自有的本地投递代理MDA,就是它负责把邮件保存到邮箱里。
|
||||
|
||||
### 问题8:Postfix 服务器的配置什么是什么? ###
|
||||
### 问题8:Postfix 服务器的配置文件是什么? ###
|
||||
|
||||
答:有两个主要配置文件:
|
||||
|
||||
@ -45,9 +45,9 @@ Postfix的20个问答题
|
||||
|
||||
答:使用这个命令重启:`service postfix restart`;使用这个命令设为开机启动:`chkconfig postfix on`
|
||||
|
||||
### 问题10:怎么查看 Postfix 的邮件列表? ###
|
||||
### 问题10:怎么查看 Postfix 的邮件队列? ###
|
||||
|
||||
答:Postfix 维护两个列表:未决邮件队列(pending mails queue)和等待邮件队列(deferred mail queue)。等待队列包含了暂时发送失败、需要重新发送的邮件,Postfix 会定期重发(默认5分钟,可自定义设置)。(LCTT:其实 Postfix 维护5个队列:输入队列,邮件进入 Postfix 系统的第一站;活动队列,qmgr 将输入队列的邮件移到活动队列;等待队列,保存暂时不能发送出去的邮件;故障队列,保存受损或无法解读的邮件;保留队列,将邮件无限期留在 Postfix 队列系统中。)
|
||||
答:Postfix 维护两个队列:未决邮件队列(pending mails queue)和等待邮件队列(deferred mail queue)。等待队列包含了暂时发送失败、需要重新发送的邮件,Postfix 会定期重发(默认5分钟,可自定义设置)。(LCTT译注:其实 Postfix 维护5个队列:输入队列,邮件进入 Postfix 系统的第一站;活动队列,qmgr 将输入队列的邮件移到活动队列;等待队列,保存暂时不能发送出去的邮件;故障队列,保存受损或无法解读的邮件;保留队列,将邮件无限期留在 Postfix 队列系统中。)
|
||||
|
||||
列出邮件队列里面所有邮件:
|
||||
|
||||
@ -85,9 +85,9 @@ Postfix的20个问答题
|
||||
|
||||
# echo "Test mail from postfix" | mail -s "Plz ignore" info@something.com
|
||||
|
||||
### 问题15:什么是“开放邮件转发”? ###
|
||||
### 问题15:什么是“开放邮件转发(Open Relay)”? ###
|
||||
|
||||
答:开放邮件转发是 SMTP 服务器的一项设定,允许因特网上其他用户能通过该服务器转发邮件,而不是直接发送到某个帐号。过去,这项功能在许多邮件服务器中都是默认开启的,但是现在已经不再流行了,因为邮件转发会导致大量垃圾邮件和病毒邮件在网络上肆虐。
|
||||
答:开放邮件转发是 SMTP 服务器的一项设定,允许因特网上任意的其他用户能通过该服务器转发邮件,而不是直接发送到某个帐号的服务器或只允许授权用户通过它来发送邮件。过去,这项功能在许多邮件服务器中都是默认开启的,但是现在已经不再流行了,因为邮件转发会导致大量垃圾邮件和病毒邮件在网络上肆虐。
|
||||
|
||||
### 问题16:什么是 Postfix 上的邮件转发主机? ###
|
||||
|
||||
@ -95,11 +95,11 @@ Postfix的20个问答题
|
||||
|
||||
### 问题17:什么是灰名单? ###
|
||||
|
||||
答:灰名单(LCTT:介于白名单和黑名单之间)用于拦截垃圾邮件。一个 MTA 使用灰名单时就会“暂时拒绝”未被识别的发送者发来的所有邮件。如果邮件是正当合理的,发起者会在一段时间后重新发送,然后这份邮件就能被接收。(LCTT:灰名单基于这样一个事实,就是大多数的垃圾邮件服务器和僵尸网络的邮件只发送一次,而会忽略要求它们在一定的时间间隔后再次发送的请求。)
|
||||
答:灰名单(LCTT译注:介于白名单和黑名单之间)是一种用于拦截垃圾邮件的技术。一个 MTA 使用灰名单时就会“暂时拒绝”未被识别的发送者发来的所有邮件。如果邮件是正当合理的,发起者会在一段时间后重新发送,然后这份邮件就能被接收。(LCTT译注:灰名单基于这样一个事实,就是大多数的垃圾邮件服务器和僵尸网络的邮件只发送一次,而会忽略要求它们在一定的时间间隔后再次发送的请求。)
|
||||
|
||||
### 问题18:邮件系统中 SPF 记录有什么重要作用? ###
|
||||
|
||||
答:SPF 是 Sender Policy Framework 的缩写,用于帮助域的拥有者确认发送方是否来自他们的域,目的是其他邮件系统能够保证发送方在发送邮件时是否经过授权 —— 这种方法可以减小遇到邮件地址欺骗、网络钓鱼和垃圾邮件的风险。
|
||||
答:SPF 是 Sender Policy Framework 的缩写,用于帮助邮件域的拥有者确认发送方是否来自他们的域,目的是其他邮件系统能够保证发送方在发送邮件时来自经过授权的来源 —— 这种方法可以减小遇到邮件地址欺骗、网络钓鱼和垃圾邮件的风险。
|
||||
|
||||
### 问题19:邮件系统中 DKIM 有什么用处? ###
|
||||
|
||||
@ -115,7 +115,7 @@ via: http://www.linuxtechi.com/postfix-interview-questions-answers/
|
||||
|
||||
作者:[Pradeep Kumar][a]
|
||||
译者:[bazz2](https://github.com/bazz2)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,129 @@
|
||||
如何在 Linux 中使用屏幕键盘
|
||||
================================================================================
|
||||
|
||||
屏幕键盘可以作为实体键盘输入的替代方案。在某些时候,屏幕键盘显得非常需要。 比如, 你的键盘刚好坏了;你的机器太多,没有足够的键盘;你的机器没有多余的接口来连接键盘;你是个残疾人,打字有困难;或者你正在组建基于触摸屏的信息服务站。
|
||||
|
||||
屏幕键盘也可以作为一种防范实体键盘记录器的保护手段,键盘记录器会悄悄记录按键来获取密码等敏感信息。一些网上银行页面实际上会强制你使用屏幕键盘来增强交易的安全性。
|
||||
|
||||
在 linux 中有几个可用的开源键盘软件, 比如 [GOK (Gnome 的屏幕键盘)][1],[kvkbd][2],[onboard][3],[Florence][4]。
|
||||
|
||||
我会在这个教程中集中讲解 Florence, 告诉你**如何用 Florence 设置一个屏幕键盘**。 Florence 有着布局方案灵活、输入法多样、自动隐藏等特性。作为教程的一部分,我也将会示范**如何只使用鼠标来操作 Ubuntu 桌面**。
|
||||
|
||||
### 在 Linux 中安装 Florence 屏幕键盘 ###
|
||||
|
||||
幸运的是,Florence 存在于大多数 Linux 发行版的基础仓库中。
|
||||
|
||||
在 Debian,Ubuntu 或者 Linux Mint 中:
|
||||
|
||||
$ sudo apt-get install florence
|
||||
|
||||
在 Fedora,CentOS 或者 RHEL (CentOS/RHEL 需要[EPEL 仓库][5]) 中:
|
||||
|
||||
$ sudo yum install florence
|
||||
|
||||
在 Mandriva 或者 Mageia 中:
|
||||
|
||||
$ sudo urpmi florence
|
||||
|
||||
对于 Archlinux 用户,Florence 存在于 [AUR][6] 中。
|
||||
|
||||
### 配置和加载屏幕键盘 ###
|
||||
|
||||
当你安装好 Florence 之后,你只需要简单的输入以下命令就能加载屏幕键盘:
|
||||
|
||||
$ florence
|
||||
|
||||
默认情况下,屏幕键盘总是在其他窗口的顶部,让你能够在任意活动的窗口上进行输入。
|
||||
|
||||
在键盘的左侧点击工具按键来改变 Florence 的默认配置。
|
||||
|
||||

|
||||
|
||||
在 Florence 的 "样式 (style)" 菜单中,你能够自定义键盘样式,启用/取消声音效果。
|
||||
|
||||

|
||||
|
||||
在“窗口 (window)”菜单中,你能够调整键盘背景透明度、按键不透明度,以及控制键盘比例、工具栏、尺寸和总是置顶等特性。如果你的桌面分辨率不是非常高,透明度调整就显得非常有用,因为屏幕键盘会挡住其他窗口。在这个例子中,我切换到透明键盘,并且设置不透明度为 50%。
|
||||
|
||||

|
||||
|
||||
在“行为 (behaviour)”菜单中,你能够改变输入方法。Florence 支持几种不同的输入法: 鼠标 (mouse)、触摸屏 (touch screen)、计时器 (timer) 和漫步 (ramble)。鼠标输入是默认输入法。最后的两种输入法不需要按鼠标键。 计时器输入通过将指针滞留在按键上一定时间来触发按键。漫步输入的原理跟**计时器**输入差不多,但是经过训练和灵巧使用,能够比**计时器**输入更加迅速。
|
||||
|
||||

|
||||
|
||||
在“布局 (layout)”菜单中,你能够改变键盘布局。比如,你能够扩展键盘布局来增加导航键,数字键和功能键。
|
||||
|
||||

|
||||
|
||||
### 只使用鼠标来操作 Ubuntu 桌面
|
||||
|
||||
我将示范如何将 Florence 集成到 Ubuntu 桌面中,然后我们不需要实体键盘就能够进入桌面。这个教程使用 LightDM (Ubuntu 的默认显示管理器) 来进入 Ubuntu,其他桌面环境也能设置类似的环境。
|
||||
|
||||
初始设置时需要实体键盘,但是一旦设置完成,你只需要一个鼠标,而不是键盘。
|
||||
|
||||
当你启动 Ubuntu 桌面时,启动程序最后会停在显示管理器 (或者登录管理器) 的欢迎界面。在这个界面上你需要输入你的登录信息。默认的情况下,Ubuntu 桌面会使用 LightDM 显示管理器和 Unity 欢迎界面。如果没有实体键盘, 你就不能在登录界面输入用户名和密码。
|
||||
|
||||
为了能够在登录界面加载屏幕键盘,安装配备了屏幕键盘支持的 GTK+ 欢迎界面。
|
||||
|
||||
$ sudo apt-get install lightdm-gtk-greeter
|
||||
|
||||
然后用编辑器打开欢迎界面配置文件 (/etc/lightdm/lightdm-gtk-greeter.conf),指定 Florence 作为屏幕键盘来使用。如果你愿意,你也能够使用 Ubuntu 的默认屏幕键盘 onboard 来代替 Florence。
|
||||
|
||||
$ sudo vi /etc/lightdm/lightdm-gtk-greeter.conf
|
||||
|
||||
----------
|
||||
|
||||
[greeter]
|
||||
keyboard=florence --no-gnome --focus &
|
||||
|
||||

|
||||
|
||||
重启 Ubuntu 桌面,然后看看你是否能够在登录界面使用屏幕键盘。
|
||||
|
||||
启动之后当你看到 GTK+ 欢迎界面时, 点击右上角的人形符号。你会看到“使用屏幕键盘 (On Screen Keyboard)”菜单选项,如下:
|
||||
|
||||

|
||||
|
||||
点击这个选项,屏幕键盘就会在登录界面弹出。现在你应该能够用屏幕键盘来登录了。
|
||||
|
||||

|
||||
|
||||
对于 GDM2/GDM3 用户怎么在 GDM2/GDM3 界面上使用屏幕键盘,Florence 官方网页提供了 [文档 (documentation)][7]。
|
||||
|
||||
Ubuntu 桌面完全无键盘化的最后一步是让屏幕键盘在登录后自动启动,这样我们在登录后能够不使用实体键盘就操作桌面,为了做到这一点,创建以下桌面文件:
|
||||
|
||||
$ mkdir -p ~/.config/autostart
|
||||
$ vi ~/.config/autostart/florence.desktop
|
||||
|
||||
----------
|
||||
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Virtual Keyboard
|
||||
Comment=Auto-start virtual keyboard
|
||||
Exec=florence --no-gnome
|
||||
|
||||
这样可以让你在登录到桌面的时候就看到屏幕键盘。
|
||||
|
||||

|
||||
|
||||
希望这个教程对你有用。与你所看到的一样,Florence 是非常强大的屏幕键盘,可以用于不同目的。请和我分享你使用屏幕键盘的经验。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/2014/08/onscreen-virtual-keyboard-linux.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[forsil](https://github.com/forsil)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://xmodulo.com/author/nanni
|
||||
[1]:https://developer.gnome.org/gok/
|
||||
[2]:http://homepage3.nifty.com/tsato/xvkbd/
|
||||
[3]:https://launchpad.net/onboard
|
||||
[4]:http://florence.sourceforge.net/
|
||||
[5]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html
|
||||
[6]:https://aur.archlinux.org/packages/florence/
|
||||
[7]:http://florence.sourceforge.net/english/how-to.html
|
@ -1,6 +1,6 @@
|
||||
如何在 Linux 系统中创建一个云端的加密文件系统
|
||||
如何在 Linux 系统中创建一个云端加密文件系统
|
||||
================================================================================
|
||||
[Amazon S3][1] 和 [Google Cloud Storage][2] 之类的商业云存储服务以能承受的价格提供了高可用性、可扩展、无限容量的对象存储服务。为了加速这些云产品的广泛采用,这些提供商为他们的产品基于明确的 API 和 SDK 培养了一个良好的开发者生态系统。而基于云的文件系统便是这些活跃的开发者社区中的典型产品,已经有了好几个开源的实现。
|
||||
[Amazon S3][1] 和 [Google Cloud Storage][2] 之类的商业云存储服务以能承受的价格提供了高可用性、可扩展、无限容量的对象存储服务。为了加速这些云产品的广泛采用,这些提供商为他们的产品通过明确的 API 和 SDK 培养了一个良好的开发者生态系统。而基于云的文件系统便是这些活跃的开发者社区中的典型产品,已经有了好几个开源的实现。
|
||||
|
||||
[S3QL][3] 便是最流行的开源云端文件系统之一。它是一个基于 FUSE 的文件系统,提供了好几个商业或开源的云存储后端,比如 Amazon S3、Google Cloud Storage、Rackspace CloudFiles,还有 OpenStack。作为一个功能完整的文件系统,S3QL 拥有不少强大的功能:最大 2T 的文件大小、压缩、UNIX 属性、加密、基于写入时复制的快照、不可变树、重复数据删除,以及软、硬链接支持等等。写入 S3QL 文件系统任何数据都将首先被本地压缩、加密,之后才会传输到云后端。当你试图从 S3QL 文件系统中取出内容的时候,如果它们不在本地缓存中,相应的对象会从云端下载回来,然后再即时地解密、解压缩。
|
||||
|
||||
@ -142,7 +142,7 @@ via: http://xmodulo.com/2014/09/create-cloud-based-encrypted-file-system-linux.h
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[felixonmars](https://github.com/felixonmars)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,61 +1,64 @@
|
||||
# Peer Code Review的实战经验 #
|
||||
|
||||
(译者:Code Review中文可以翻译成代码复查,一般由开发待review的代码的成员以外的团队成员来进行这样的工作。由于是专业术语,没有将Code review用中文代替。)
|
||||
# 同等代码审查(Peer Code Review)实战经验 #
|
||||
|
||||
我有时候会听到我们的团队成员这样议论:
|
||||
|
||||
"项目的Code review 只是浪费时间。"
|
||||
|
||||
"我没有时间做Code review。"
|
||||
"我的发布时间延迟了,因为我的同时还没有完成我代码的Code review。"
|
||||
"你相信我的同事居然要求我对我的代码做修改吗?请跟他们说代码中的一些联系会被打断如果在我原来代码的基础之上做修改的话。"
|
||||
|
||||
"我的发布时间延迟了,因为我的同事还没有完成我代码的Code review。"
|
||||
|
||||
"你相信我的同事居然要求我对我的代码做修改吗?请跟他们说代码中的一些联系会被打断——如果在我原来代码的基础之上做修改的话。"
|
||||
|
||||
(LCTT 译注:Code Review中文可以翻译成代码复查,一般由开发待review的代码的成员以外的团队成员来进行这样的工作。由于是专业术语,没有将Code review用中文代替。)
|
||||
|
||||
### 为什么要做Code review? ###
|
||||
|
||||
每个专业软件开发者都有一个重要的目标:持续的提高它们的工作质量。即使你团队中都是一些优秀的程序员,你依然不能将你自己与一个有能力的自由职业者区分开来,除非你从团队的角度来工作。Code review是团队工作的一个重要的方面。尤其是:
|
||||
每个专业软件开发者都有一个重要的目标:持续的提高他们的工作质量。即使你团队中都是一些优秀的程序员,但是你依然不能将你自己与一个有能力的自由职业者区分开来,除非你从团队的角度来工作。Code review是团队工作的一个重要的方面。尤其是:
|
||||
|
||||
代码复查者(reviewer)能从他们的角度来发现问题并且提出更好的解决方案。
|
||||
|
||||
确保至少你团队的另一个其他成员熟悉你的代码,通过给新员工看有经验的开发者的代码能够某种程度上提高他们的水平。
|
||||
|
||||
公开code reviewer和reviewee的想法和经验能够促进团队间的知识的分享。
|
||||
公开reviewer和被复查者的想法和经验能够促进团队间的知识的分享。
|
||||
|
||||
能够鼓励开发者将他们的工作进行的更彻底,因为他们知道他们的代码将被其他的人阅读。
|
||||
|
||||
### 在review的过程中的注意点 ###
|
||||
|
||||
但是,由于Code review的时间有限,上面所说的目标未必能全部达到。就算只是想要打一个补丁,都要确保意图是正确的。如果只是将变量名改成骆驼拼写法(camelCase),不算是code review。在开发过程中进行结对编程是有益处的,它能够使两个人得到公平的锻炼。你能够在code review上花许多时间,并且仍然能够比在结对编程中使用更少的时间。
|
||||
但是,由于Code review的时间有限,上面所说的目标未必能全部达到。就算只是想要打一个补丁,都要确保意图是正确的。如果只是将变量名改成骆驼拼写法(camelCase),那不算是code review。在开发过程中进行结对编程是有益处的,它能够使两个人得到公平的锻炼。你能够在code review上花许多时间,并且仍然能够比在结对编程中使用更少的时间。
|
||||
|
||||
我的感受是,在项目开发的过程中,25%的时间应该花费在code review上。也就是说,如果开发者用两天的时间来开发一个东西,那么复查者应该使用至少四个小时来审查。
|
||||
|
||||
当然,只要你的review结果准确的话,具体花了多少时间就显得不是那么的重要。重要的是,你能够理解你看的那些代码。这里的理解并不是指你看懂了这些代码书写的语法,而是你要知道这段代码在整个庞大的应用程序,组件或者库中起着什么样的作用。如果你不理解每一行代码的作用,那么换句话说,你的code review就是没有价值的。这就是为什么好的code review不能很快完成的原因。需要时间来探讨各种各样的代码路径,让它们触发一个特定的函数,来确保第三方的API得到了正确的使用(包括一些边缘测试)。
|
||||
当然,只要你的review结果准确的话,具体花了多少时间就显得不是那么的重要。重要的是,你能够理解你看的那些代码。这里的理解并不是指你看懂了这些代码书写的语法,而是你要知道这段代码在整个庞大的应用程序、组件或者库中起着什么样的作用。如果你不理解每一行代码的作用,那么换句话说,你的code review就是没有价值的。这就是为什么好的code review不能很快完成的原因。需要时间来探讨各种各样的代码路径,让它们触发一个特定的函数,来确保第三方的API得到了正确的使用(包括一些边缘测试)。
|
||||
|
||||
为了查阅你所审查的代码的缺陷或者是其他问题,你应该确保:
|
||||
|
||||
所有有必要的测试都已经被包含进去。
|
||||
- 所有必要的测试都已经被包含进去。
|
||||
|
||||
合理的设计文档已经被编写。
|
||||
- 合理的设计文档已经被编写。
|
||||
|
||||
再熟练的开发者也不是每次都会记得在他们对代码改动的时候把测试程序和文档更新上去。来自reviewer的一个提醒能够使得测试用例和开发文档不会一直忘了更新。
|
||||
|
||||
### 避免code review负担太大 ###
|
||||
|
||||
如果你的团队没有强制性的code review,当你的code review记录停留在无法管理的节点上时会很危险。如果你已经两周没有进行code review了,你可以花几天的时间来跟上项目的进度。这意味着你自己的开发工作会被阻断,当你想要处理之前遗留下来的code review的时候。这也会使得你很难再确保code review的质量,因为合理的code review需要长期认真的努力。最终会很难持续几天都保持这样的状态。
|
||||
如果你的团队没有强制性的code review,当你的code review记录停留在无法管理的节点上时会很危险。如果你已经两周没有进行code review了,你可以花几天的时间来跟上项目的进度。这意味着你自己的开发工作会被阻断,当你想要处理之前遗留下来的code review的时候。这也会使得你很难再确保code review的质量,因为合理的code review需要长期认真的努力,最终会很难持续几天都保持这样的状态。
|
||||
|
||||
由于这个原因,开发者应当每天都完成他们的review任务。一种好办法就是将code review作为你每天的第一件事。在你开始自己的开发工作之前完成所有的code review工作,能够使你从头到尾都集中注意力。有些人可能更喜欢在午休前或午休后或者在傍晚下班前做review。无论你在哪个时间做,都要将code review看作你的工作之一并且不能分心,你要避免:
|
||||
|
||||
没有足够的时间来处理你的review任务。
|
||||
- 没有足够的时间来处理你的review任务。
|
||||
|
||||
由于你的code review工作没有做完导致版本的推迟发布。
|
||||
- 由于你的code review工作没有做完导致版本的推迟发布。
|
||||
|
||||
提交不在相关的review由于代码在你review期间已经改动太大。
|
||||
- 提交不再相关的review,由于代码在你review期间已经改动太大。
|
||||
|
||||
因为你要在最后一分钟完成他们一直于review质量太差。
|
||||
- 因为你要在最后一分钟完成他们,以至于review质量太差。
|
||||
|
||||
### 书写易于review的代码 ###
|
||||
|
||||
有时候review没有按时完成并不都是因为代码审查者(reviewer)。如果我的同事使用一周时间在一个大工程中添加了一些乱七八糟的代码,且他们提交的补丁实在是太难以阅读。在一段中有太多的东西要浏览。这样会让人难以理解它的作用,自然会拖慢review的进度。
|
||||
有时候review没有按时完成并不都是因为reviewer。如果我的同事使用一周时间在一个大工程中添加了一些乱七八糟的代码,且他们提交的补丁实在是太难以阅读。在一段代码中有太多的东西要浏览。这样会让人难以理解它的作用,自然会拖慢review的进度。
|
||||
|
||||
为什么将你的工作划分成一些易于管理的片段很重要有很多原因。我们使用scrum方法论(一种软件开发过程方法),因此对我们来说一个合理的单元就是一个story。通过努力将我们的工作使用story组织起来并且只是将review提交到我们正在工作的story上,这样,我们写的代码就会更加易于review。你们的可以使用其他的软件开发方法,但是目的是一样的。
|
||||
为什么将你的工作划分成一些易于管理的片段很重要有很多原因。我们使用scrum方法论(一种软件开发过程方法),因此对我们来说一个合理的单元就是一个story。通过努力将我们的工作使用story组织起来,并且只是将review提交到我们正在工作的story上,这样,我们写的代码就会更加易于review。你们也可以使用其他的软件开发方法,但是目的是一样的。
|
||||
|
||||
书写易于review的代码还有其他先决条件。如果要做一些复杂的架构决策,应该让reviewer事先知道并参与讨论。这会让他们之后review你们的代码更加容易,因为他们知道你们正在试图实现什么功能并且知道你们打算如何来实现。这也避免了开发者需要在reviewer提了一个不同的或者更好的解决方案后大片的重写代码。
|
||||
|
||||
@ -63,7 +66,7 @@
|
||||
|
||||
如果你在你的补丁中包含的第三方的代码,记得单独的提交它。当jQuery的9000行代码被插入到了项目代码的中间,毫无疑问会造成难以阅读。
|
||||
|
||||
创建易读的review代码的另一个非常重要的措施是添加相应的注释代码。这就要求你事先自己做一下review并且在一些你认为会帮助reviewer进行review的地方加上相应的注释。我发现加上注释相对与你来说往往只需要很短的时间(通常是几分钟),但是对于review来说会节约很多的时间。当然,代码注释还有其他相似的好处,应该在合理的地方使用,但往往对code review来说更重要。事实上,有研究表明,开发者在重读并注释他们代码的过程中,通常会发现很多问题。
|
||||
创建易读的review代码的另一个非常重要的措施是添加相应的注释代码。这就要求你事先自己做一下review并且在一些你认为会帮助reviewer进行review的地方加上相应的注释。我发现加上注释相对于你来说往往只需要很短的时间(通常是几分钟),但是对于review来说会节约很多的时间。当然,代码注释还有其他相似的好处,应该在合理的地方使用,但往往对code review来说更重要。事实上,有研究表明,开发者在重读并注释他们代码的过程中,通常会发现很多问题。
|
||||
|
||||
### 代码大范围重构的情况 ###
|
||||
|
||||
@ -77,16 +80,17 @@
|
||||
|
||||
你的团队中都是一些有能力的专家,在一些案例中,完全有可能因为对一个具体编码问题的意见的不同而产生争论。作为一个开发者,应该保持一个开发的头脑并且时刻准备着妥协,当你的reviewer更想要另一种解决方法时。不要对你的代码持有专有的态度,也不要自己持有审查的意见。因为有人会觉得你应该将一些重复的代码写入一个能够复用的函数中去,这并不意味着这是你的问题。
|
||||
|
||||
作为一个reviewer,要灵活。在提出修改建议之前,考虑你的建议是否真的更好或者只是无关紧要。如果你把力气和注意力花在那些原来的代码会明确需要改进的地方会更加成功。你应该说"它或许者的考虑..."或者"一些人建议..."而不是”我的宠物都能写一个比这个更加有效的排序方法"。
|
||||
作为一个reviewer,要灵活。在提出修改建议之前,考虑你的建议是否真的更好或者只是无关紧要。如果你把力气和注意力花在那些原来的代码会明确需要改进的地方会更加成功。你应该说"它或许值得考虑..."或者"一些人建议..."而不是”我的宠物都能写一个比这个更加有效的排序方法"。
|
||||
|
||||
如果你真的决定不了,那就询问另一个你和你的reviewee都尊敬的开发者来听一下你意见并给出建议。
|
||||
如果你真的决定不了,那就询问另一个你及你所审查的人都尊敬的开发者来听一下你意见并给出建议。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://blog.salsitasoft.com/practical-lessons-in-peer-code-review/
|
||||
作者:[Matt][a]
|
||||
|
||||
作者:Matt
|
||||
译者:[john](https://github.com/johnhoow)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,6 +1,7 @@
|
||||
在Linux上组成RAID 10阵列以实现高性能和高容错性的磁盘I/O
|
||||
如何在Linux上构建 RAID 10阵列
|
||||
================================================================================
|
||||
RAID 10阵列 (又名RAID 1+0 或先镜像后分区)通过结合RAID 0 (读写操作并行在多个磁盘上同时执行)和RAID 1 (数据被完全相同地写入到两个或更多的磁盘)两者的特点实现高性能和高容错性的磁盘I/O。
|
||||
|
||||
RAID 10阵列(又名RAID 1+0 或先镜像后分区)通过结合RAID 0 (读写操作在多个磁盘上同时并行执行)和RAID 1(数据被完全相同地写入到两个或更多的磁盘)两者的特点实现高性能和高容错性的磁盘I/O。
|
||||
|
||||
这篇文章会指导你如何使用五块相同的8GB磁盘来组成一个软件RAID 10阵列。因为组成一个RAID 10阵列至少需要4块磁盘(比如,两个镜像各有一对分区组合),而且需要添加一块额外的备用磁盘以防某块主要的磁盘出错。本文也会分享一些工具,在稍后用来分析RAID阵列的性能。
|
||||
|
||||
@ -12,15 +13,15 @@ RAID 10阵列 (又名RAID 1+0 或先镜像后分区)通过结合RAID 0 (读写
|
||||
|
||||

|
||||
|
||||
上图中的文件由A、B、C、D、E和F六种块组成,每一个RAID 1镜像对(如镜像1和2)在两个磁盘上复制相同的块。因为需要这样配置,写操作性能会因为每个块需要写入两次而下降,每个磁盘各一次;而读操作与从单块磁盘中读取相比并未发生改变。不过这种配置的好处是除非一个镜像中有超过一块的磁盘故障,否则都能保持冗余以维持正常的磁盘I/O操作。
|
||||
上图中的文件由A、B、C、D、E和F六种块组成,每一个RAID 1镜像对(如镜像1和2)在两个磁盘上复制相同的块。在这样的配置下,写操作性能会因为每个块需要写入两次而下降,每个磁盘各一次;而读操作与从单块磁盘中读取相比并未发生改变。不过这种配置的好处是除非一个镜像中有超过一块的磁盘故障,否则都能保持冗余以维持正常的磁盘I/O操作。
|
||||
|
||||
RAID 0的分区通过将数据划分到不同的块,然后执行同时将块A写入镜像1、将块B写入镜像2(以此类推)的并行操作以提高整体的读写性能。在另一方面,没有任何一个镜像包含构成主存的数据片的全部信息。这就意味着如果其中一个镜像故障,那么整个RAID 0组件将无法正常工作,数据将遭受不可恢复的损失。
|
||||
|
||||
### 建立RAID 10阵列 ###
|
||||
|
||||
有两种建立RAID 10阵列的可行方案:复杂法(一步完成)和嵌套法(先创建两个或更多的RAID 1阵列,然后使用它们组成RAID 0)。本文会关注复杂法创建RAID 10阵列,因为这种方法能够使用偶数或奇数个磁盘去创建阵列,而且能以单个RAID设备的形式被管理,而嵌套法则恰恰相反(只允许偶数个磁盘,必须以嵌套设备的形式被管理,即分开管理RAID 1和RAID 0)。
|
||||
有两种建立RAID 10阵列的可行方案:复杂法(一步完成)和嵌套法(先创建两个或更多的RAID 1阵列,然后使用它们组成RAID 0)。本文会讲述复杂法创建RAID 10阵列的过程,因为这种方法能够使用偶数或奇数个磁盘去创建阵列,而且能以单个RAID设备的形式被管理,而嵌套法则恰恰相反(只允许偶数个磁盘,必须以嵌套设备的形式被管理,即分开管理RAID 1和RAID 0)。
|
||||
|
||||
假设你的机器已经安装mdadm,并运行着相应的守护进程,细节参见[这篇文章][1]。也假设每个磁盘上已经划分出一个主分区sd[bcdef]1。使用命令
|
||||
假设你的机器已经安装mdadm,并运行着相应的守护进程,细节参见[这篇文章][1]。也假设每个磁盘上已经划分出一个主分区sd[bcdef]1 (LCTT 译注:共计五块磁盘,这里是从sdb - sdf)。使用命令:
|
||||
|
||||
ls -l /dev | grep sd[bcdef]
|
||||
|
||||
@ -28,7 +29,7 @@ RAID 0的分区通过将数据划分到不同的块,然后执行同时将块A
|
||||
|
||||

|
||||
|
||||
然后使用下面的命令创建一个RAID 10阵列:
|
||||
然后使用下面的命令创建一个RAID 10阵列(LCTT 译注:使用了四块磁盘 bcde 创建):
|
||||
|
||||
# mdadm --create --verbose /dev/md0 --level=10 --raid-devices=4 /dev/sd[bcde]1 --spare-devices=1 /dev/sdf1
|
||||
|
||||
@ -46,29 +47,29 @@ RAID 0的分区通过将数据划分到不同的块,然后执行同时将块A
|
||||
|
||||
1. **Used Dev Space**表示阵列所使用的每一块磁盘的容量。
|
||||
|
||||
2. **Array Size**表示阵列的整体大小。RAID 10阵列的大小通过(N*C)/M计算,其中N是活跃磁盘的数目,C是活跃磁盘的总容量,M是每一个镜像中磁盘的数目。在本文的情形下,这个值等于(4*8GiB)/2 = 16GiB。
|
||||
2. **Array Size**表示阵列的整体大小。RAID 10阵列的大小通过(N\*C)/M计算,其中N是活跃磁盘的数目,C是每个活跃磁盘的容量,M是每一个镜像中磁盘的数目。在本文的情形下,这个值等于(4*8GiB)/2 = 16GiB。
|
||||
|
||||
3. **Layout**是整个数据布局的详细信息。可能的布局数值如下所示。
|
||||
|
||||
----------
|
||||
|
||||
- **n**(默认选项):代表就近拷贝。一个数据块的多个拷贝在不同磁盘里有相同的偏移量。这种布局提供和RAID 0阵列相似的读写性能。
|
||||
- **n**(默认选项):代表就近(near)拷贝。一个数据块的多个拷贝在不同磁盘里有相同的偏移量。这种布局提供和RAID 0阵列相似的读写性能。
|
||||
|
||||

|
||||
|
||||
- **o**代表偏移量拷贝。不是复制一个分区里的块,所有的分区都被复制,但会被循环打乱,所以同一个分区中复制的块会出现在不同的磁盘。因此,一个块的后续拷贝会出现在下一个磁盘中,一个块接着一个块。为了在RAID 10阵列中使用这种布局,在创建阵列的命令中添加--layout=o2选项。
|
||||
- **o**代表偏移量(offset)拷贝。块并不是在条带里面复制的,而是整个条带一起复制,但是循环会打乱,所以同一个分区中复制的块会出现在不同的磁盘。因此,一个块的后续拷贝会出现在下一个磁盘中,一个块接着一个块。为了在RAID 10阵列中使用这种布局,在创建阵列的命令中添加--layout=o2选项。
|
||||
|
||||

|
||||
|
||||
- **f**代表远端拷贝(多个拷贝在不同的磁盘中具有不同的偏移量)。这种布局提供更好的读性能但带来更差的写性能。因此,对于读远远多于写的系统来说是最好的选择。为了在RAID 10阵列中使用这种布局,在创建阵列的命令中添加--layout=f2。
|
||||
- **f**代表远端(far)拷贝(多个拷贝在不同的磁盘中具有不同的偏移量)。这种布局提供更好的读性能但带来更差的写性能。因此,对于读远远多于写的系统来说是最好的选择。为了在RAID 10阵列中使用这种布局,在创建阵列的命令中添加--layout=f2。
|
||||
|
||||

|
||||
|
||||
跟在布局选项**n**、**f**和**o**后面的数字代表所需的每一个数据块的副本数目。默认值是2,但可以是2到阵列中磁盘数目之间的某个值。提供足够的副本数目可以最小化单个磁盘上的I/O影响。
|
||||
|
||||
4. **Chunk Size**,以[Linux RAID wiki][2]为准,是写入磁盘的最小数据单元。最佳的chunk大小取决于I/O操作的速率和相关的文件大小。对于大量的写操作,通过设置相对较大的chunks可以得到更低的开销,但对于主要存储小文件的阵列来说更小的chunk性能更好。为了给RAID 10指定一个chunk大小,在创建阵列的命令中添加**--chunk=desired_chunk_size**。
|
||||
4. **Chunk Size**,参考[Linux RAID wiki][2]的说明,是写入磁盘的最小数据单元。最佳的chunk大小取决于I/O操作的速率和相关的文件大小。对于大量的写操作,通过设置相对较大的chunk可以得到更低的开销,但对于主要存储小文件的阵列来说更小的chunk性能更好。为了给RAID 10指定一个chunk大小,在创建阵列的命令中添加**--chunk=desired_chunk_size**。
|
||||
|
||||
不幸的是,并没有设置一个大小就能适合全局的策略用来提高性能,但可以参考下面的一些方案。
|
||||
不幸的是,并没有设置一个大小就能适合全局的策略来提高性能,但可以参考下面的一些方案。
|
||||
|
||||
- 文件系统:就整体而言,[XFS][3]据说是最好的,当然EXT4也是不错的选择。
|
||||
- 最佳布局:远端布局能提高读性能,但会降低写性能。
|
||||
@ -127,7 +128,7 @@ via: http://xmodulo.com/setup-raid10-linux.html
|
||||
|
||||
作者:[Gabriel Cánepa][a]
|
||||
译者:[KayGuoWhu](https://github.com/KayGuoWhu)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,19 +1,19 @@
|
||||
如何在Linux上验证下载文件的可靠性和完整性
|
||||
使用 GnuPG 加密签名来验证下载文件的可靠性和完整性
|
||||
================================================================================
|
||||
当你从网上下载一个文件后(比如:安装程序、ISO镜像或者一个压缩包),文件可能在不同的情况下发生了损坏,比如:由于线路传输错误、中断的下载、存储硬件错误、文件系统错误等等。除了这些错误,文件还可能在下载前或者下载中的攻击而被有意地篡改了。比如,一个攻破证书颁发机构的攻击者可以实施一个MITM攻击(中间人攻击),欺骗你从HTTPS网站上下载隐藏恶意软件的文件。
|
||||
|
||||
要保护你自己免受这些问题的困扰,建议你验证你从网上下载的文件的可靠性和完整性。特别是你下载了一个非常敏感的文件的时候)(比如:操作系统镜像、二进制应用程序、可执行安装包等等),盲目地相信下载的文件不是一个好习惯。
|
||||
要保护你自己免受这些问题的困扰,建议你去验证从网上下载的文件的可靠性和完整性。特别是你下载了一个非常敏感的文件的时候)(比如:操作系统镜像、二进制应用程序、可执行安装包等等),盲目地相信下载的文件不是一个好习惯。
|
||||
|
||||
一个快速和简单地验证下载文件的完整性的方法是使用不同的校验工具(比如:md5sum、sha356sum、cksum)来计算和比较校验码(比如:MD5、SHA、CRC)。然而,然而校验容易受到[碰撞攻击][1],而且同样不能用于验证文件的可靠性(比如:拥有者)。
|
||||
|
||||
integrity by using GnuPG (GNU Privacy Guard).
|
||||
|
||||
如果你想要同时验证下载文件的可靠性(拥有者)和完整性(内容),你需要依赖于加密签名。本教程中,我会描述如何使用GnuPG(GNU Privacy Guard)来检查文件的可靠性和完整性。
|
||||
|
||||
本例中我会验证一个从https://onionshare.org上下载的磁盘镜像。这个网站中,发行商会提供他们的公钥,还有它用于密钥验证的指纹。
|
||||
本例中我会验证一个从 https://onionshare.org 上下载的磁盘镜像。这个网站中,发行商会提供他们的公钥,还有它用于密钥验证的指纹。
|
||||
|
||||

|
||||
|
||||
至于下载的文件,发行上也会提供它相关的PGP签名。
|
||||
至于下载的文件,发行商也会提供它相关的PGP签名。
|
||||
|
||||

|
||||
|
||||
@ -35,7 +35,7 @@ integrity by using GnuPG (GNU Privacy Guard).
|
||||
|
||||

|
||||
|
||||
在生成中间,你会被要求提供你的姓名和email,还有保护你私钥的密码。你同样也可以在键对要过期的时候选择(默认不会过期)。依赖于你选择的key的大小(在1024和4096位之间),key生成会花上几分钟或者更多,这由于它要求收集来自你桌面活动的大量的随机数据。(比如键盘输入、鼠标移动、磁盘访问等等)。
|
||||
在生成键对期间,你会被要求提供你的姓名和email,还有保护你私钥的密码。你同样也可以选择键对何时过期(默认不会过期)。依赖于你选择的key的大小(在1024和4096位之间),key生成会花上几分钟或者更多,同时它要求收集来自你桌面活动的大量的随机数据。(比如键盘输入、鼠标移动、磁盘访问等等,所以这个时候随便动动鼠标键盘什么的)。
|
||||
|
||||
一旦key生成完毕后,公钥和私钥会存储在~/.gnupg目录。
|
||||
|
||||
@ -45,7 +45,7 @@ integrity by using GnuPG (GNU Privacy Guard).
|
||||
|
||||
验证下载文件的第一步是与任何提供文件下载的人建立信任。出于此,我们下载了这个文件的公钥,并且验证公钥的拥有者是否是他或者她自称的。
|
||||
|
||||
在下载玩文件拥有者的公钥后:
|
||||
在下载完文件拥有者的公钥后:
|
||||
|
||||
$ wget https://onionshare.org/signing-key.asc
|
||||
|
||||
@ -55,7 +55,7 @@ integrity by using GnuPG (GNU Privacy Guard).
|
||||
|
||||

|
||||
|
||||
一旦拥有者的共要导入后,他会像下面那样打印出一个key ID(比如:"EBA34B1C")。记住这个key ID。
|
||||
一旦拥有者的公钥导入后,他会像下面那样打印出一个key ID(比如:"EBA34B1C")。记住这个key ID。
|
||||
|
||||
现在,运行下面的命令检查导入的公钥的指纹:
|
||||
|
||||
@ -65,7 +65,7 @@ integrity by using GnuPG (GNU Privacy Guard).
|
||||
|
||||
你会看到key的指纹字符串。把这个和网站上显示的指纹做对比。如果匹配,你可以选择信任这个文件拥有者的公钥。
|
||||
|
||||
一旦你决定相信这个公钥,你可以通过编辑key来标记它:
|
||||
一旦你决定相信这个公钥,你可以通过编辑key来设置信任级别:
|
||||
|
||||
$ gpg --edit-key EBA34B1C
|
||||
|
||||
@ -83,7 +83,7 @@ integrity by using GnuPG (GNU Privacy Guard).
|
||||
|
||||
要注意的是不需要这样明确地给一个公钥指派信任,通过key的导入隐式地信任往往就够了。
|
||||
|
||||
给一个key隐式地分配给“完全”的信任就是任何其他由这个完全信任签名的key X都会被认为是对你有效的。通常上,key验证依赖于一个复杂的机制称之为“[信任网][2]”
|
||||
给一个key隐式地分配给“完全”的信任就是任何其他由这个完全信任签名的key X都会被认为是对你有效的。通常上,key验证依赖于一个称之为“[信任网][2]”的复杂机制。
|
||||
|
||||
回到教程,现在让我们检查导入的key列表。
|
||||
|
||||
@ -97,7 +97,7 @@ integrity by using GnuPG (GNU Privacy Guard).
|
||||
|
||||
一旦你建立了与文件拥有者和他的/她的公钥之间的信任关系,我们需要验证你从拥有者那边下载的文件的可靠性和完整性了。
|
||||
|
||||
本例中,文件拥有者分别公布了一个文件和它相关的PGP签名(.asc)。签名的角色就是认证并且在文件中加入一个时间戳
|
||||
本例中,文件拥有者分别公布了一个文件和它相关的PGP签名(.asc)。签名所起的作用就是认证(文件)并且在其中加入一个时间戳。
|
||||
|
||||
一个典型的签名(*.asc)看上去像这样。
|
||||
|
||||
@ -139,7 +139,7 @@ via: http://xmodulo.com/verify-authenticity-integrity-downloaded-file.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,24 +1,25 @@
|
||||
Linux中的鉴别套接字/网络的ss工具示例
|
||||
在Linux中的使用 ss 命令检查套接字/网络连接
|
||||
================================================================================
|
||||
ss是iproute2包的一部分(控制TCP/IP网络和流量的工具)。iproute2目标是替代先前用于配置网络接口,路由表和管理ARP表的标准Unix网络工具套装(通常称之为“net-tools”)。ss工具用于导出套接字统计,它可以显示与netstat类似的信息,且可以显示更多的TCP和状态信息。它也应该更加快因为它工作与内核空间。ss的操作和netstat很像所以这让它可以很容易就可以取代。
|
||||
ss是iproute2包的一部分(控制TCP/IP网络和流量的工具)。iproute2的目标是替代先前用于配置网络接口、路由表和管理ARP表的标准Unix网络工具套装(通常称之为“net-tools”)。ss工具用于导出套接字统计,它可以显示与netstat类似的信息,且可以显示更多的TCP和状态信息。因为它直接从内核空间获取信息,所以会更快。ss的操作和netstat很像,所以这让它可以很容易就可以取代。
|
||||
|
||||
### 使用和常见选项 ###
|
||||
|
||||
ss和netstat很像,默认他会显示已经建立连接的开放的非监听TCP套接字列表。并且你可以用下面的选项过滤输出:
|
||||
ss和netstat很像,默认它会显示已经建立连接的开放的非监听TCP套接字列表。并且你可以用下面的选项过滤输出:
|
||||
|
||||
- **-n** - 尝试解析服务名。
|
||||
- **-r** - 尝试解析数字地址/端口。
|
||||
- **-n** - 不要尝试解析服务名。
|
||||
- **-r** - 尝试解析数字的地址/端口。
|
||||
- **-a** - 显示所有套接字。
|
||||
- **-l** - 显示监听套接字。
|
||||
- **-p** - 显示进程人使用的套接字。
|
||||
- **-s** - 打印统计
|
||||
- **-p** - 显示使用该套接字的进程。
|
||||
- **-s** - 打印统计数据
|
||||
- **-t** - 只显示TCP套接字。
|
||||
- **-u** - 只显示UDP套接字。
|
||||
- **-d** - 只显示DCCP套接字
|
||||
- **-w** - 只显示原始套接字。
|
||||
- **-w** - 只显示RAW套接字。
|
||||
- **-x** - 只显示Unix域套接字
|
||||
- **-f FAMILY** - 显示FAMILY套接字的类型。目前支持下面这些家族:unix、inet、inet6、link、netlink。
|
||||
- **-A QUERY** - 导出套接字列表,通过逗号分隔。可以识别下面的标识符:all、inet、tcp、udp、raw、unix、packet、netlink、unix_dgram、unix_stream、packet_raw、packet_dgram。
|
||||
- **-f FAMILY** - 显示FAMILY套接字的类型。目前支持下面这些族:unix、inet、inet6、link、netlink。
|
||||
- **-A QUERY** - 指定要列出的套接字列表,通过逗号分隔。可以识别下面的标识符:all、inet、tcp、udp、raw、unix、packet、netlink、unix_dgram、unix_stream、packet_raw、packet_dgram。
|
||||
- **-o STATUS** - 列出指定状态的套接字
|
||||
|
||||
### ss 命令示例 ###
|
||||
|
||||
@ -34,13 +35,13 @@ ss和netstat很像,默认他会显示已经建立连接的开放的非监听TC
|
||||
|
||||

|
||||
|
||||
**3.** 跟上面的行为一样,你只需用n代替t就会显示所有开放的UDP端口。
|
||||
**3.** 跟上面的行为一样,你只需用u代替t就会显示所有开放的UDP端口。
|
||||
|
||||
# ss -tnap
|
||||
# ss -unap
|
||||
|
||||

|
||||
|
||||
**4.** 你可以使用-s标志来打印不同的有用的统计:
|
||||
**4.** 你可以使用-s标志来打印各种有用的统计数据:
|
||||
|
||||
# ss -s
|
||||
|
||||
@ -58,7 +59,7 @@ via: http://linoxide.com/linux-command/ss-sockets-network-connection/
|
||||
|
||||
作者:[Adrian Dinu][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,94 @@
|
||||
使用 UbuTricks 在ubuntu上安装最新游戏和应用
|
||||
===
|
||||
UbuTricks是一个可以帮助你在ubuntu上安装几个最新版本的游戏和应用的程序。
|
||||
|
||||
UbuTricks是一个有简单界面,基于Zenity的图形脚本。虽然早期开发中,它的目标是通过简单的界面操作来安装Ubuntu14.04 及以后发行版上应用程序的更新。
|
||||
|
||||
应用程序会自动下载安装。一些更新可能会需要ppa,其它的将会通过编译源代码安装。编译过程可能会需要一些时间,当从ppa或者deb文件安装应该会快一点,取决于你的下载速度。
|
||||
|
||||
###一共有以下几种安装方式:
|
||||
|
||||
- PPA - 程序将会从PPA下载安装
|
||||
- DEB - 程序将会从DEB文件进行安装
|
||||
- Source - 程序会进行编译安装 (可能需要一点时间)
|
||||
- Script - 程序会通过开发者提供的脚本进行安装
|
||||
- Archive - 程序会通过压缩文件安装
|
||||
- Repository - 程序从仓库安装 (不是PPA)
|
||||
|
||||
###你可以安装的应用程序列表
|
||||
|
||||
通过UbuTricks可以安装下面应用的最新版本:
|
||||
|
||||
###游戏
|
||||
|
||||
- 0 A.D.
|
||||
- Battle for Wesnoth (Dev)
|
||||
- VCMI (Heroes III Engine)
|
||||
|
||||
###文件管理
|
||||
|
||||
- PCManFM
|
||||
|
||||
###互联网应用
|
||||
|
||||
- Geary
|
||||
- HexChat
|
||||
- QupZilla
|
||||
- QuiteRSS
|
||||
|
||||
###多媒体
|
||||
|
||||
- SMPlayer
|
||||
- Transmageddon
|
||||
- Kdenlive
|
||||
- Fotoxx
|
||||
- jAlbum
|
||||
- GIMP
|
||||
- Shutter
|
||||
- Qmmp
|
||||
- XBMC
|
||||
|
||||
###办公/电子书/文档
|
||||
|
||||
- Calibre
|
||||
- LibreOffice
|
||||
|
||||
###工具
|
||||
|
||||
- Ubuntu Tweak
|
||||
|
||||
###桌面环境
|
||||
|
||||
- Cinnamon
|
||||
|
||||
###其他
|
||||
|
||||
- Google Earth
|
||||
- Wine
|
||||
|
||||
###下载,安装Ubuntutricks
|
||||
|
||||
你可以从[这里][1]下载ubuntutricks,让它可执行然后双击脚本或者从终端里运行它。
|
||||
|
||||
###截图
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.ubuntugeek.com/ubutricks-script-to-install-the-latest-versions-of-several-games-and-applications-in-ubuntu.html
|
||||
|
||||
作者:[ruchi][a]
|
||||
译者:[DoubleShit](https://github.com/DoubleShit)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.ubuntugeek.com/author/ubuntufix
|
||||
[1]:http://www.tuxarena.com/intro/files/ubutricks.sh
|
@ -46,7 +46,7 @@
|
||||
$ python -V
|
||||
$ python --version
|
||||
|
||||
如果你的Python CGI脚本要用来处理用户输入的数据(从一个web输入表单),然后你将需要导入Python cgi模块。这个模块可以处理用户通过web输入表单输入的数据。你可以在你的脚本中通过下面的语句导入该脚本:
|
||||
如果你的Python CGI脚本要用来处理用户输入的数据(从一个web输入表单),那么你将需要导入Python cgi模块。这个模块可以处理用户通过web输入表单输入的数据。你可以在你的脚本中通过下面的语句导入该脚本:
|
||||
|
||||
import cgi
|
||||
|
||||
@ -110,7 +110,7 @@
|
||||
</form>
|
||||
</html>
|
||||
|
||||
当"Submit"按钮点击,/var/www/cgi-bin/myscript-2.py脚本将被执行(通过action参数指定)。/var/www//html/page2.html显示在web浏览器中的图片如下所示(注意,三个输入域已经被填写了):
|
||||
当"Submit"按钮点击,/var/www/cgi-bin/myscript-2.py脚本将被执行(通过action参数指定)。/var/www//html/page2.html显示在web浏览器中的图片如下所示(注意,三个输入域已经被填写好了):
|
||||
|
||||

|
||||
|
||||
@ -131,7 +131,7 @@
|
||||
print "</p>"
|
||||
print "</html>"
|
||||
|
||||
正如前面提到,import cgi语句需要用来确保能够处理用户通过web输入表单输入的数据。web输入表单被封装在一个表单对象中,叫做cgi.FieldStorage对象。一旦开始,"Content-Type: text/html"是必需的,因为web服务器需要知道接受自CGI脚本的输出格式。用户输入的数据在包含form["firstName"].value,form["lastName"].value, and form["position"].value的语句中被接受。那些中括号中的名称和**/var/www/html/page2.html**文本输入域中定义的名称参数一致。
|
||||
正如前面提到,import cgi语句用来确保能够处理用户通过web输入表单输入的数据。web输入表单被封装在一个表单对象中,叫做cgi.FieldStorage对象。一旦开始输出,"Content-Type: text/html"是必需的,因为web服务器需要知道接受自CGI脚本的输出格式。用户输入的数据在包含form["firstName"].value,form["lastName"].value,和 form["position"].value的语句中可以得到。那些中括号中的名称和**/var/www/html/page2.html**文本输入域中定义的名称参数一致。
|
||||
|
||||
当网页上的"Submit"按钮被点击,下面的网页将被返回。
|
||||
|
||||
@ -149,7 +149,7 @@ via: http://xmodulo.com/create-use-python-cgi-scripts.html
|
||||
|
||||
作者:[Joshua Reed][a]
|
||||
译者:[su-kaiyao](https://github.com/su-kaiyao)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,6 +1,6 @@
|
||||
怎么样称得上是Linux下优秀的命令行计算器
|
||||
================================================================================
|
||||
每个现代的Linux桌面发行版都预装着一个带有图形界面的计算器程序。不过如果你的工作区中全是命令行窗口,那么你一定会在其中的一个命令行窗口中处理一些数字相关的问题。或许你在寻找一款基于命令行的计算器程序。如果是这样的话,[GNU bc][1](“basic calculator”的缩写)会是你不二的选择。当然Linux下又很多基于命令行的计算器应用,我认为GNU bc是功能最强大和最有用的。
|
||||
每个现代的Linux桌面发行版都预装着一个带有图形界面的计算器程序。不过如果你的工作区中全是命令行窗口,那么你一定会在其中的一个命令行窗口中处理一些数字相关的问题。或许你在寻找一款基于命令行的计算器程序。如果是这样的话,[GNU bc][1](“basic calculator”的缩写)会是你不二的选择。当然Linux下有很多基于命令行的计算器应用,我认为GNU bc是功能最强大和最有用的。
|
||||
|
||||
在GNU时代之前,bc实际上是一个著名的精密计算语言。它的诞生要追溯到70年代的Unix时期了。最初bc作为一个语法和C语言相似的编程语言而著名。随着时间的改变,最开始的bc演化成POSIX bc,最后变成了今天的GNU bc。
|
||||
|
||||
@ -8,19 +8,19 @@
|
||||
|
||||
现在的GNU bc是早期bc经过若干次改进和功能增强的结果。目前它被所有的主流GNU/Linux发行版所收纳。GNU bc支持高精度数字和多种数值类型(例如二进制、十进制、十六进制)的输入输出。
|
||||
|
||||
如果你对C语言很熟悉的话,你会发现bc使用了和C语言一样或相似的算术操作符。受支持的操作符包括算术运算符(+,-,*,/,%,++,--)、比较运算符(<,>,==,!=,<=,>=)、逻辑运算符(!,&&,||)、位运算符(&,|,^,~,<<,>>)和复合赋值运算符(+=,-=,*=,/=,%=,&=,|=,^=,&&=,||=,<<=,>>=)。bc内置了很多有用的函数,像是平方根、正弦、余弦、反正弦、自然对数、指数等。
|
||||
如果你对C语言很熟悉的话,你会发现bc使用了和C语言一样或相似的算术操作符。所支持的操作符包括算术运算符(+, -, *, /, %, ++, --)、比较运算符(<, >, ==, !=, <=, >=)、逻辑运算符(!, &&, ||)、位运算符(&, |, ^, ~, <<, >>)和复合赋值运算符(+=, -=, *=, /=, %=, &=, |=, ^=, &&=, ||=, <<=, >>=)。bc内置了很多有用的函数,像是平方根、正弦、余弦、反正弦、自然对数、指数等。
|
||||
|
||||
### 如何使用GNU bc ###
|
||||
|
||||
作为一个基于命令行的计算器,GNU bc的使用是没有限制的。在本文中,我会向大家介绍bc命令的几个常用的特性。如果你想要更加详细的指导,你可以查阅[官方指南][2]。
|
||||
作为一个基于命令行的计算器,GNU bc的使用没有限制。在本文中,我会向大家介绍bc命令的几个常用的特性。如果你想要更加详细的指导,你可以查阅[官方指南][2]。
|
||||
|
||||
如果你没有一个预先写好的bc脚本,那么你需要在交互模式下运行bc。在这种模式下,你输入的以回车结束的任何声明或者表达式会被立刻计算出结果。你需要输入以下命令来进入bc的交互界面。如果向退出bc,你可以输入'quit'并且按回车。
|
||||
如果你没有一个预先写好的bc脚本,那么你可以在交互模式下运行bc。在这种模式下,你输入的以回车结束的任何声明或者表达式会被立刻计算出结果。你需要输入以下命令来进入bc的交互界面。如果想退出bc,你可以输入'quit'并且按回车。
|
||||
|
||||
$ bc
|
||||
|
||||

|
||||
|
||||
本文下面展示的例子应该在bc交互界面中输入。
|
||||
本文下面展示的例子请在bc交互界面中输入。
|
||||
|
||||
### 输入表达式 ###
|
||||
|
||||
@ -28,15 +28,15 @@
|
||||
|
||||

|
||||
|
||||
在一个bc的交互界面中,存在没有个数限制的命令历史记录。使用上方向键来查看之前输入的命令。如果你想限制历史记录保存的命令数量,你可以将一个名为history的特殊变量设置成你希望的数值。该变量默认为-1,也就是“历史记录数量没有限制”。
|
||||
在一个bc的交互界面中,保存着没有个数限制的命令历史记录。使用上方向键来查看之前输入的命令。如果你想限制历史记录保存的命令数量,你可以将一个名为history的特殊变量设置成你希望的数值。该变量默认为-1,也就是“历史记录数量没有限制”。
|
||||
|
||||
### 输入输出进制切换 ###
|
||||
|
||||
经常会发生的是,你输入一个表达式并且想使用二进制或者十六进制来显示结果。bc允许你在输入输出数字的进制间转换。输入和输出的数系基分别存储在ibase和obase变量中,默认值为10,有效的数值是2到16(或者环境变量BC_BASE_MAX的值).你只需要更改ibase和obase的值就可以在不同进制之间转换了。下面是一个求两个十六进制/二进制数和的例子:
|
||||
经常会发生的是,你输入一个表达式并且想使用二进制或者十六进制来显示结果。bc允许你在输入输出数字的进制间转换。输入和输出的数系基分别存储在ibase和obase变量中,默认值为10,有效的数值是2到16(或者环境变量BC_BASE_MAX的值)。你只需要更改ibase和obase的值就可以在不同进制之间转换了。下面是一个求两个十六进制/二进制数和的例子:
|
||||
|
||||

|
||||
|
||||
需要注意的是,我有意地将obase=16放到了ibase=16前面,反过来则是不可以的。这个是因为如果我先输入ibase=16,那么随后输入的obase=16中的16会被认为是16进制的数字,也就是十进制的22。当然这个不是我们所期望的。
|
||||
需要注意的是,我有意地将obase=16放到了ibase=16前面,**反过来则是不可以的**。这个是因为如果我先输入ibase=16,那么随后输入的obase=16中的16会被认为是16进制的数字,也就是十进制的22。当然这个不是我们所期望的。
|
||||
|
||||
### 调整精度 ###
|
||||
|
||||
@ -76,7 +76,7 @@ X的指数对数:
|
||||
|
||||
e(X)
|
||||
|
||||
### Other goodies as a language ###
|
||||
### 当做语言来用 ###
|
||||
|
||||
作为一个计算语言,GNU bc支持简单的声明(变量赋值、中断、返回等)、复合语句(if、while、for loop等)和自定义函数。在这里我不会涉及到这些特性的细节,不过你可以通过[官方指南][2]来学习如何使用这些特性。下面是一个简单的函数示例:
|
||||
|
||||
@ -98,7 +98,7 @@ X的指数对数:
|
||||
|
||||

|
||||
|
||||
总结以下,GNU bc是一款强大并且通用的基于命令行的计算器应用,因此它绝对不会让你失望。它预装在所有的现代Linux发行版中,bc可以让你不用离开命令行就可以进行高效的数学计算。所以,GNU bc一定会是你的最爱。
|
||||
总结一下,GNU bc是一款强大并且通用的基于命令行的计算器应用,它绝对不会让你失望。它预装在所有的现代Linux发行版中,bc可以让你不用离开命令行就可以进行高效的数学计算。所以,GNU bc一定会是你的最爱。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -106,7 +106,7 @@ via: http://xmodulo.com/command-line-calculator-linux.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[JonathanKang](https://github.com/JonathanKang)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,4 +1,4 @@
|
||||
磁盘写满或磁盘不可写?解决Linux和UNIX系统这些硬盘问题的8个小贴士
|
||||
解决八种Linux硬盘问题的技巧
|
||||
================================================================================
|
||||
不能在Linux或者类UNIX系统的硬盘上写入数据?想解决服务器上磁盘损坏的问题吗?想知道你为什么总是在屏幕上看到“磁盘已满”的字眼吗?想学习处理这些问题的办法吗?试试一下这8个解决Linux及UNIX服务器硬盘问题的小贴士吧。
|
||||
|
||||
@ -95,6 +95,8 @@
|
||||
|
||||
# mount -o remount,rw /ftpusers/tmp
|
||||
|
||||
(LCTT 译注:如果硬盘由于硬件故障而 fallback 到只读模式,建议不要强制变回读写模式,而是赶快替换硬盘)
|
||||
|
||||
另外,我是这样[用rw模式重新挂载FreeBSD 9.x服务器的根目录][7]的:
|
||||
|
||||
# mount -o rw /dev/ad0s1a /
|
||||
@ -111,11 +113,13 @@
|
||||
Filesystem Inodes IUsed IFree IUse% Mounted on
|
||||
/dev/sda8 6250496 11568 6238928 1% /ftpusers
|
||||
|
||||
所以 /ftpusers 下有总计62,50,496KB大小的索引节点但是只有11,568KB被使用。你可以在 /ftpusers 位置下另外创建62,38,928KB大小的文件。如果你的索引节点100%被使用了,试试看以下的选项:
|
||||
如上 /ftpusers 下有总计62,50,496KB大小的索引节点但是只有11,568KB被使用。你可以在 /ftpusers 位置下另外创建62,38,928KB大小的文件。如果你的索引节点100%被使用了,试试看以下的选项:
|
||||
|
||||
- 找出不想要的文件并删除它,或者把它移动到其它服务器上。
|
||||
- 找出不想要的大文件并删除它,或者把它移动到其它服务器上。
|
||||
|
||||
(LCTT 译注:如果一个分区存储了太多的小文件,会出现 inode 用完而存储扇区还有空闲的情况,这种情况下要么清除小文件或在不需要独立访问的情况下将它们打包成一个大文件;要么将数据保存好之后重新分区,并设置分区的 -t news 属性,增加 inode 分配)
|
||||
|
||||
### #4 - 我的硬盘驱动器宕了吗? ###
|
||||
|
||||
[日志文件中的输入/输出错误(例如 /var/log/messages)][9]说明硬盘出了一些问题并且可能已经失效,你可以用smartctl命令来查看硬盘的错误,这是一个在类UNIX系统下控制和监控硬盘状态的一个命令。语法如下:
|
||||
@ -130,15 +134,16 @@
|
||||
|
||||
图 01: Gnome磁盘工具(Applications > System Tools > Disk Utility)
|
||||
|
||||
> **注意**: 不要对SMART工具期望太高,它在某些状况下无法工作,我们要定期做备份。
|
||||
> **注意**: 不要对S.M.A.R.T.工具期望太高,它在某些状况下无法工作,我们要定期做备份。
|
||||
|
||||
### #5 - 我的硬盘驱动器和服务器是不是太热了? ###
|
||||
|
||||
高温会引起服务器低效,所以你需要把服务器和磁盘维持在一个平稳适当的温度,高温甚至能导致服务器宕机或损坏文件系统和磁盘。[用hddtemp或smartctl功能,通过从支持此特点的驱动上的SMART技术来读取数据的方式,从而查出你的Linux或基于UNIX系统上的硬件温度。][11]只有现代硬驱动器有温度传感器。hddtemp功能也支持从SCSI驱动器读取SMART信息。hddtemp能作为一个简单的命令行工具或守护程序来从所有服务器中获取信息:
|
||||
高温会引起服务器低效,所以你需要把服务器和磁盘维持在一个平稳适当的温度,高温甚至能导致服务器宕机或损坏文件系统和磁盘。[用hddtemp或smartctl功能,通过从支持S.M.A.R.T.功能的硬盘上读取数据的方式,从而查出你的Linux或基于UNIX系统上的硬盘温度][11]。只有现代硬驱动器有温度传感器。hddtemp功能也支持从SCSI驱动器读取S.M.A.R.T.信息。hddtemp能作为一个简单的命令行工具或守护程序来从所有服务器中获取信息:
|
||||
|
||||
hddtemp /dev/DISK
|
||||
hddtemp /dev/sg0
|
||||
|
||||
部分输出内容:
|
||||
部分输出内容如下:
|
||||
|
||||
[][12]
|
||||
|
||||
@ -150,7 +155,7 @@
|
||||
|
||||
#### 我怎么获取CPU的温度 ####
|
||||
|
||||
你可以使用Linux硬件监控工具例如像[用基于Linux系统的lm_sensor功能来获取CPU温度][13]:
|
||||
你可以使用Linux硬件监控工具,例如像[用基于Linux系统的lm_sensor功能来获取CPU温度][13]:
|
||||
|
||||
sensors
|
||||
|
||||
@ -162,7 +167,7 @@ Debian服务器的部分输出内容:
|
||||
|
||||
### #6 - 处理损坏的文件系统 ###
|
||||
|
||||
服务器上的文件系统可能会因为硬件重启或一些其它的错误比如坏区而损坏。你可以[用fsck命令来修复损坏的文件系统][15]:
|
||||
服务器上的文件系统可能会因为硬件重启或一些其它的错误比如坏的扇区而损坏。你可以[用fsck命令来修复损坏的文件系统][15]:
|
||||
|
||||
umount /ftpusers
|
||||
fsck -y /dev/sda8
|
||||
@ -251,7 +256,7 @@ via: http://www.cyberciti.biz/datacenter/linux-unix-bsd-osx-cannot-write-to-hard
|
||||
|
||||
作者:[nixCraft][a]
|
||||
译者:[ZTinoZ](https://github.com/ZTinoZ)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,32 +1,32 @@
|
||||
如何在 Linux 上针对 Apache 日志文件运行 SQL 查询语句
|
||||
如何在 Linux 上用 SQL 语句来查询 Apache 日志
|
||||
================================================
|
||||
|
||||
Linux 有一个显著的特点,在正常情况下,你可以通过分析系统日志来了解你的系统中发生了什么,或正在发生什么。的确,系统日志是系统管理员在解决系统和应用问题时最需要的第一手资源。我们将在这篇文章中着重讲解 Apache HTTP web server 生成的 Apache access 日志。
|
||||
Linux 有一个显著的特点,在正常情况下,你可以通过日志分析系统日志来了解你的系统中发生了什么,或正在发生什么。的确,系统日志是系统管理员在解决系统和应用问题时最需要的第一手资源。我们将在这篇文章中着重讲解 Apache HTTP web server 生成的 Apache access 日志。
|
||||
|
||||
我们会通过另类的途径分析 Apache access 日志,我们使用的工具是 [asql][1]。asql 是一个开源的工具,它能够允许使用者针对日志运行 SQL 查询,从而通过更加友好的格式展现相同的信息。
|
||||
这次,我们会通过另类的途径来分析 Apache access 日志,我们使用的工具是 [asql][1]。asql 是一个开源的工具,它能够允许使用者使用 SQL 语句来查询日志,从而通过更加友好的格式展现相同的信息。
|
||||
|
||||
### Apache 日志背景知识 ###
|
||||
|
||||
Apache 有两种日志:
|
||||
|
||||
- **Access log**:存放在路径 /var/log/apache2/access.log (Debian) 或者 /var/log/httpd/access_log (Red Hat)。Access Log 记录所有 Apache web server 执行的请求。
|
||||
- **Error log**:存放在路径 /var/log/apache2/error.log (Debian) 或者 /var/log/httpd/error_log (Red Hat)。Error log 记录所有 Apache web server 报告的错误以及错误的情况。Error 情况包括(不限于)403(Forbidden,通常在有效请求丢失访问许可时被报告),404(Not found,在请求资源不存在时被报告)。
|
||||
- **Error log**:存放在路径 /var/log/apache2/error.log (Debian) 或者 /var/log/httpd/error_log (Red Hat)。Error log 记录所有 Apache web server 报告的错误以及错误的情况。Error 情况包括(不限于)403(Forbidden,通常在请求被拒绝访问时被报告),404(Not found,在请求资源不存在时被报告)。
|
||||
|
||||
虽然管理员可以通过配置 Apache 的配置文件来自定义 Apache access log 的罗嗦程度,在这篇文章中,我们会使用默认的配置,如下:
|
||||
虽然管理员可以通过配置 Apache 的配置文件来自定义 Apache access log 的详细程度,不过在这篇文章中,我们会使用默认的配置,如下:
|
||||
|
||||
Remote IP - Request date - Request type - Response code - Requested resource - Remote browser (may also include operating system)
|
||||
远程 IP - 请求时间 - 请求类型 - 响应代码 - 请求的 URL - 远程的浏览器信息 (也许包含操作系统信息)
|
||||
|
||||
因此一个典型的 Apache 日志条目就是下面这个样子:
|
||||
|
||||
192.168.0.101 - - [22/Aug/2014:12:03:36 -0300] "GET /icons/unknown.gif HTTP/1.1" 200 519 "http://192.168.0.10/test/projects/read_json/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0"
|
||||
|
||||
但是 Apache error log 又是怎么样的呢?因为 error log 条目主要记录 access log 中特殊的请求(你可以自定义),你可以通过 access log 来获得关于错误情况的更多信息(example 5 有更多细节)。
|
||||
但是 Apache error log 又是怎么样的呢?因为 error log 条目主要记录 access log 中特殊的请求(你可以自定义),所以你可以通过 access log 来获得关于错误情况的更多信息(example 5 有更多细节)。
|
||||
|
||||
话在前头, access log 是系统级别的日志文件。要分析 virtual hosts 的日志文件,你需要检查它们相应的配置文件(e.g. 在 /etc/apache2/sites-available/[virtual host name] 里(Debian))。
|
||||
此外要提前说明的, access log 是系统级别的日志文件。要分析虚拟主机的日志文件,你需要检查它们相应的配置文件(例如: 在 /etc/apache2/sites-available/[virtual host name] 里(Debian))。
|
||||
|
||||
### 在 Linux 上安装 asql ###
|
||||
|
||||
asql 由 Perl 编写,而且需求以下两个 Perl module:SQLite 的 DBI 驱动以及 GNU readline.
|
||||
asql 由 Perl 编写,而且需求以下两个 Perl 模块:SQLite 的 DBI 驱动以及 GNU readline。
|
||||
|
||||
### 在 Debian, Ubuntu 以及其衍生发行版上安装 asql ###
|
||||
|
||||
@ -46,7 +46,7 @@ asql 由 Perl 编写,而且需求以下两个 Perl module:SQLite 的 DBI 驱
|
||||
|
||||
### asql 是如何工作的? ###
|
||||
|
||||
从上面代码中的依赖中你就可以看出来,asql 转换未结构化的明文 Apache 日志成结构化的 SQLite 数据库信息。生成的 SQLite 数据库接受正常的 SQL 查询语句。数据库可以通过当前以及曾经的日志文件生成,其中包括压缩转换过的日志文件,类似 access.log.X.gz 或者 access_log.old。
|
||||
从上面代码中的依赖中你就可以看出来,asql 转换未结构化的明文 Apache 日志为结构化的 SQLite 数据库信息。生成的 SQLite 数据库可以接受正常的 SQL 查询语句。数据库可以通过当前以及之前的日志文件生成,其中也包括压缩转换过的日志文件,类似 access.log.X.gz 或者 access_log.old。
|
||||
|
||||
首先,从命令行启动 asql:
|
||||
|
||||
@ -62,7 +62,7 @@ asql 由 Perl 编写,而且需求以下两个 Perl module:SQLite 的 DBI 驱
|
||||
|
||||
首先在 asql 中加载所有的 access 日志:
|
||||
|
||||
asql > load <path/to/apache-access-logs>
|
||||
asql > load <apache-access-logs 的路径>
|
||||
|
||||
比如在 Debian 下:
|
||||
|
||||
@ -72,7 +72,7 @@ asql 由 Perl 编写,而且需求以下两个 Perl module:SQLite 的 DBI 驱
|
||||
|
||||
asql > load /var/log/httpd/access_log*
|
||||
|
||||
当 asql 完成对 access 日志的加载后,我们就可以开始数据库查询了。注意一下,加载后生成的数据库是 "temporary" 的,意思就是数据库会在你退出 asql 的时候被清除。如果你想要保留数据库,你必须先将其保存为一个文件。我们会在后面介绍如何这么做(参考 example 3 和 4)。
|
||||
当 asql 完成对 access 日志的加载后,我们就可以开始数据库查询了。注意一下,加载后生成的数据库是 "temporary" (临时)的,意思就是数据库会在你退出 asql 的时候被清除。如果你想要保留数据库,你必须先将其保存为一个文件。我们会在后面介绍如何这么做(参考 example 3 和 4)。
|
||||
|
||||

|
||||
|
||||
@ -80,7 +80,7 @@ asql 由 Perl 编写,而且需求以下两个 Perl module:SQLite 的 DBI 驱
|
||||
|
||||

|
||||
|
||||
名为 .asql 的隐藏文件,保存于用户的 home 目录下,记录用户在 asql shell 中输入的命令历史。因此你可以使用方向键浏览历史命令,按下 ENTER 来重复执行之前的命令。
|
||||
一个名为 .asql 的隐藏文件,保存于用户的 home 目录下,记录用户在 asql shell 中输入的命令历史。因此你可以使用方向键浏览命令历史,按下 ENTER 来重复执行之前的命令。
|
||||
|
||||
### asql 上的示例 SQL 查询 ###
|
||||
|
||||
@ -106,7 +106,7 @@ asql 由 Perl 编写,而且需求以下两个 Perl module:SQLite 的 DBI 驱
|
||||
|
||||
这样做可以避免使用 load 命令对日志的语法分析所占用的处理时间。
|
||||
|
||||
**Example 4**:在重新启动 asql 后载入数据库。
|
||||
**Example 4**:在重新进入 asql 后载入数据库。
|
||||
|
||||
restore [filename]
|
||||
|
||||
@ -135,7 +135,7 @@ via: http://xmodulo.com/sql-queries-apache-log-files-linux.html
|
||||
|
||||
作者:[Gabriel Cánepa][a]
|
||||
译者:[ThomazL](https://github.com/ThomazL)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,14 +1,14 @@
|
||||
Linux服务器监控和排障利器:sysdig
|
||||
系统之锹sysdig:Linux服务器监控和排障利器
|
||||
================================================================================
|
||||
当你需要追踪某个进程产生和接收的系统调用时,首先浮现在你脑海中的是什么?你可能会想到strace,那么你是对的。你会使用什么样的命令行工具来监控原始网络通信呢?如果你想到了tcpdump,你又作出了一个极佳的选择。而如果你碰到必须追踪打开的文件(在Unix意义上:一切皆文件)的需求,可能你会使用lsof。
|
||||
|
||||
strace、tcpdump以及lsof,确实是些伟大的工具,它们应该成为每个系统管理员工具集中的一部分,而这也正是你为什么会爱上[sysdig][1]的原因。它是一个强大的开源工具,用于系统级别的勘察和排障,它的创建者在介绍它时称之为“strace+tcpdump+lsof+上面点缀着lua樱桃的绝妙酱汁”。抛开幽默不说,sysdig的最棒特性之一在于,它不仅能分析Linux系统的“存活”状态,也能将该状态保存为转储文件以供离线检查。更重要的是,你可以自定义sysdig的行为,或者甚至通过内建的(你也可以自己编写)名为凿子的小脚本增强其功能。单独的凿子可以脚本指定的各种风格分析sysdig捕获的事件流。
|
||||
strace、tcpdump以及lsof,确实是些伟大的工具,它们应该成为每个系统管理员工具集之中的一部分,而这也正是你为什么应该爱上[sysdig][1]的原因。它是一个强大的开源工具,用于系统级别的勘察和排障,它的创建者在介绍它时称之为“strace+tcpdump+lsof+上面点缀着lua樱桃的绝妙酱汁”。抛开幽默不说,sysdig的最棒特性之一在于,它不仅能分析Linux系统的“现场”状态,也能将该状态保存为转储文件以供离线检查。更重要的是,你可以自定义sysdig的行为,或者甚至通过内建的(你也可以自己编写)名为凿子(chisel)的小脚本增强其功能。单独的凿子可以以脚本指定的各种风格分析sysdig捕获的事件流。
|
||||
|
||||
在本教程中,我们将探索sysdig的安装及其基本用法,在Linux上实施系统监控和排障。
|
||||
|
||||
### 安装Sysdig ###
|
||||
|
||||
对于本教程,由于为了简便、缩短安装流程以及版本不可知,我们将选择使用官方网站提供的自动化安装过程。在自动化过程中,安装脚本会自动检测操作系统并安装必需的依赖包。
|
||||
对于本教程,由于为了简便、缩短安装流程以及版本的不可知,我们将选择使用官方网站提供的自动化安装过程。在自动化过程中,安装脚本会自动检测操作系统并安装必需的依赖包。
|
||||
|
||||
以root身份运行以下命令来从官方apt/yum仓库安装sysdig:
|
||||
|
||||
@ -20,7 +20,7 @@ strace、tcpdump以及lsof,确实是些伟大的工具,它们应该成为每
|
||||
|
||||
# sysdig
|
||||
|
||||
我们的屏幕将马上被系统上发生的所有事件填满,对于这些信息,我们不能做更多操作。要进一步处理,我们可以运行:
|
||||
我们的屏幕将马上被系统上发生的所有事件填满,对于这些信息,不便于我们做更多操作。要进一步处理,我们可以运行:
|
||||
|
||||
# sysdig -cl | less
|
||||
|
||||
@ -28,7 +28,6 @@ strace、tcpdump以及lsof,确实是些伟大的工具,它们应该成为每
|
||||
|
||||

|
||||
|
||||
The following categories are available by default, each of which is populated by multiple built-in chisels.
|
||||
默认有以下类目可用,各个类目中分布有多个内建的凿子。
|
||||
|
||||
- CPU Usage:CPU使用量
|
||||
@ -43,7 +42,7 @@ The following categories are available by default, each of which is populated by
|
||||
|
||||
要显示指定凿子上的信息(包括详细的命令行用法),运行以下命令:
|
||||
|
||||
# sysdig -cl [chisel_name]
|
||||
# sysdig -cl [凿子名称]
|
||||
|
||||
例如,我们可以检查“网络”类目下关于spy_port凿子的信息:
|
||||
|
||||
@ -51,14 +50,14 @@ The following categories are available by default, each of which is populated by
|
||||
|
||||

|
||||
|
||||
凿子可以通过过滤器(可同时应用于存活数据和记录文件)组合,以获取更多有用的输出。
|
||||
凿子可以通过过滤器(可同时应用于实时数据和记录文件)组合,以获取更多有用的输出。
|
||||
|
||||
过滤器遵从“类.字段”结构。例如:
|
||||
|
||||
- **fd.cip**:客户端IP地址。
|
||||
- **evt.dir**:事件方向,可以是‘>’用于进入事件,或‘<’用于退出事件。
|
||||
|
||||
完成得过滤器列表可以通过以下命令显示:
|
||||
完整的过滤器列表可以通过以下命令显示:
|
||||
|
||||
# sysdig -l
|
||||
|
||||
@ -68,7 +67,7 @@ The following categories are available by default, each of which is populated by
|
||||
|
||||
假定你的服务器发生了性能问题(如,没有回应,或者重大的回应延迟)。你可以使用瓶颈凿子来显示当前10个最慢系统调用的列表。
|
||||
|
||||
使用以下命令在存活服务器上进行实时检查。“-c”标识,后跟凿子名告诉sysdig运行指定的凿子。
|
||||
使用以下命令在存活服务器上进行实时检查。“-c”标识,后跟凿子名称告诉sysdig运行指定的凿子。
|
||||
|
||||
# sysdig -c bottlenecks
|
||||
|
||||
@ -84,7 +83,7 @@ The following categories are available by default, each of which is populated by
|
||||
|
||||

|
||||
|
||||
你想要关注栏#2,#3和#4,这些分别表示执行时间、进程名和PID。
|
||||
你需要关注栏#2,#3和#4,这些分别表示执行时间、进程名和PID。
|
||||
|
||||
### Sysdig实例: 监控交互用户活动 ###
|
||||
|
||||
@ -130,7 +129,7 @@ The following categories are available by default, each of which is populated by
|
||||
|
||||
# sysdig -s 4096 -A -c echo_fds fd.cip=192.168.0.100 -r /mnt/sysdig/debian.scap.gz proc.name=apache2
|
||||
|
||||
如果你想要监控原生数据传输(二进制格式),请用“-A”替换“-X”:
|
||||
如果你想要监控原生数据传输(二进制格式),请把“-A”替换为“-X”:
|
||||
|
||||
# sysdig -s 4096 -X -c echo_fds fd.cip=192.168.0.100 -r /mnt/sysdig/debian.scap.gz proc.name=apache2
|
||||
|
||||
@ -142,7 +141,7 @@ via: http://xmodulo.com/monitor-troubleshoot-linux-server-sysdig.html
|
||||
|
||||
作者:[Gabriel Cánepa][a]
|
||||
译者:[GOLinux](https://github.com/GOLinux)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,4 +1,4 @@
|
||||
Linux有问必答——如何检查Linux上的glibc版本
|
||||
Linux有问必答:如何检查Linux上的glibc版本
|
||||
================================================================================
|
||||
> **问题**:我需要找出我的Linux系统上的GNU C库(glibc)的版本,我怎样才能检查Linux上的glibc版本呢?
|
||||
|
||||
@ -20,7 +20,7 @@ GNU C库(glibc)是标准C库的GNU实现。glibc是GNU工具链的关键组
|
||||
|
||||
### 方法二 ###
|
||||
|
||||
另一个方法是在命令行“输入”**glibc library**(如,libc.so.6),就像命令一样。
|
||||
另一个方法是在命令行“输入”**glibc 库的名称**(如,libc.so.6),就像命令一样执行。
|
||||
|
||||
输出结果会显示更多关于**glibc库**的详细信息,包括glibc的版本以及使用的GNU编译器,也提供了glibc扩展的信息。glibc变量的位置取决于Linux版本和处理器架构。
|
||||
|
||||
@ -49,6 +49,6 @@ GNU C库(glibc)是标准C库的GNU实现。glibc是GNU工具链的关键组
|
||||
via: http://ask.xmodulo.com/check-glibc-version-linux.html
|
||||
|
||||
译者:[GOLinux](https://github.com/GOLinux)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -0,0 +1,84 @@
|
||||
如何在 CentOS 7 上安装 Docker
|
||||
================================================================================
|
||||
|
||||
Docker 是一个开源工具,它可以让创建和管理 **Linux 容器**变得简单。容器就像是轻量级的虚拟机,并且可以以毫秒级的速度来启动或停止。Docker 帮助系统管理员和程序员在容器中开发应用程序,并且可以扩展到成千上万的节点。
|
||||
|
||||
容器和 VM(虚拟机)的主要区别是,容器提供了**基于进程的隔离**,而虚拟机提供了资源的完全隔离。虚拟机可能需要一分钟来启动,而容器只需要一秒钟或更短。容器使用宿主操作系统的内核,而虚拟机使用独立的内核。
|
||||
|
||||
Docker 的局限性之一是,它只能用在 **64 位**的操作系统上。
|
||||
|
||||
在这篇文章中我们将讨论如何在 CentOS 7.x 中安装 docker。
|
||||
|
||||
### CentOS 7 中 Docker 的安装 ###
|
||||
|
||||
Docker 软件包已经包括在默认的 CentOS-Extras 软件源里。因此想要安装 docker,只需要运行下面的 yum 命令:
|
||||
|
||||
[root@localhost ~]# yum install docker
|
||||
|
||||
### 启动 Docker 服务 ###
|
||||
|
||||
安装完成后,使用下面的命令来启动 docker 服务,并将其设置为开机启动:
|
||||
|
||||
[root@localhost ~]# service docker start
|
||||
[root@localhost ~]# chkconfig docker on
|
||||
|
||||
(LCTT 译注:此处采用了旧式的 sysv 语法,如采用CentOS 7中支持的新式 systemd 语法,如下:
|
||||
|
||||
[root@localhost ~]# systemctl start docker.service
|
||||
[root@localhost ~]# systemctl enable docker.service
|
||||
|
||||
)
|
||||
|
||||
**下载官方的 CentOS 镜像到本地** (LCTT 译注:由于 Docker 被**墙** :-< ,所以请使用 http://docker.cn 的[镜像][1],感谢 @马全一 的镜像。 )
|
||||
|
||||
[root@localhost ~]# docker pull centos
|
||||
Pulling repository centos
|
||||
192178b11d36: Download complete
|
||||
70441cac1ed5: Download complete
|
||||
ae0c2d0bdc10: Download complete
|
||||
511136ea3c5a: Download complete
|
||||
5b12ef8fd570: Download complete
|
||||
|
||||
**确认 CentOS 镜像已经被获取:**
|
||||
|
||||
[root@localhost ~]# docker images centos
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
centos centos5 192178b11d36 2 weeks ago 466.9 MB
|
||||
centos centos6 70441cac1ed5 2 weeks ago 215.8 MB
|
||||
centos centos7 ae0c2d0bdc10 2 weeks ago 224 MB
|
||||
centos latest ae0c2d0bdc10 2 weeks ago 224 MB
|
||||
|
||||
**运行一个 Docker 容器:**
|
||||
|
||||
[root@localhost ~]# docker run -i -t centos /bin/bash
|
||||
[root@dbf66395436d /]#
|
||||
|
||||
我们可以看到,CentOS 容器已经被启动,并且我们得到了 bash 提示符。在 docker 命令中我们使用了 “-i 捕获标准输入输出”和 “-t 分配一个终端或控制台”选项。若要断开与容器的连接,输入 exit。
|
||||
|
||||
[root@cd05639b3f5c /]# cat /etc/redhat-release
|
||||
CentOS Linux release 7.0.1406 (Core)
|
||||
[root@cd05639b3f5c /]# exit
|
||||
exit
|
||||
[root@localhost ~]#
|
||||
|
||||
我们还可以搜索基于 Fedora 和 Ubuntu 操作系统的容器。
|
||||
|
||||
[root@localhost ~]# docker search ubuntu
|
||||
[root@localhost ~]# docker search fedora
|
||||
|
||||
**显示当前正在运行容器的列表**
|
||||
|
||||

|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linuxtechi.com/install-docker-on-centos-7/
|
||||
|
||||
作者:[Pradeep Kumar][a]
|
||||
译者:[felixonmars](https://github.com/felixonmars)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.linuxtechi.com/author/pradeep/
|
||||
[1]:https://docker.cn/h/how-to-use-docker-official-repositories
|
@ -1,19 +1,18 @@
|
||||
systemd这个有争议的项目正在接管你身边的Linux发行版
|
||||
Systemd这个有争议的项目正在接管你身边的Linux发行版
|
||||
=========
|
||||

|
||||
|
||||
systemd 是目前为止在Linux平台上最有争议的项目之一。它到底有多大的争议?它的争议大到systemd的开发者之一Lennart Poettering 声称有人使用[比特币][2]雇佣职业杀手要干掉他。但是还是有比较理智的做法的,有一个[抵制systemd网站][3]在技术角度上提出了抵制systemd的原因。
|
||||
Systemd 是目前为止在Linux平台上最有争议的项目之一。它到底有多大的争议?它的争议大到systemd的开发者之一Lennart Poettering 声称有人使用[比特币][2]雇佣职业杀手要干掉他。但是还是有比较理智的做法的,有一个[抵制systemd网站][3]在技术角度上提出了抵制systemd的原因。
|
||||
|
||||
如此强烈的抵制也反映了systemd的成功。它已经被或将要被Fedroa、OpenSUSE、Ubuntu、Debian、Arch Linux等众多发型版采用。随着时间推移,GNOME越来越依赖它,Debian[回归GNOME][4]的原因之一就是它采用了systemd。systemd无处不在。
|
||||
|
||||
那么如此激烈的争论到底是关于什么呢?让我们及距离观察这场战争。
|
||||
如此强烈的抵制也反映了systemd的成功。它已经被或将要被Fedroa、OpenSUSE、Ubuntu、Debian、Arch Linux等众多发行版采用。随着时间推移,GNOME越来越依赖它,Debian[回归GNOME][4]的原因之一就是它采用了systemd。systemd无处不在!
|
||||
|
||||
那么如此激烈的争论到底是关于什么呢?让我们近距离观察这场战争。
|
||||
|
||||
###Systemd是一个全新的init
|
||||
|
||||
[systemd][5]的核心是取代老旧的[SysV init][6]。init用来初始化你的操作系统,当你启动系统时,init负责加载需要的驱动,激活你的网络链接,启动众多的系统服务,最后进入图形登陆界面。而SysV init 是一个老旧的系统,它基本上仅运行**/etc/init.d**目录下的一些脚本。
|
||||
[Systemd][5]的核心是取代老旧的[SysV init][6]。init用来初始化你的操作系统,当你启动系统时,init负责加载需要的驱动,激活你的网络链接,启动众多的系统服务,最后进入图形登陆界面。而SysV init 是一个老旧的系统,它基本上仅运行**/etc/init.d**目录下的一些脚本。
|
||||
|
||||
systemd是一个现代技术用以取代老旧以及粗糙的SysV init。它可以在接收到事件响应时启动相关服务;比如,当你接入了一个USB打印机,systemd可以在接收到设备接入响应时启动打印服务。当它接收到某个网络端口的连接请求时,它可以启动在此端口上监听的服务并且传递这个连接。
|
||||
Systemd是一个现代技术,用以取代老旧以及粗糙的SysV init。它可以在接收到事件响应时启动相关服务;比如,当你接入了一个USB打印机,systemd可以在接收到设备接入响应时启动打印服务。当它接收到某个网络端口的连接请求时,它可以启动在此端口上监听的服务并且传递这个连接。
|
||||
|
||||
获取更多关于SysV init 与 systemd的信息,可以参考Jorgen Schäfer的 “[Why systemd?][9]”
|
||||
|
||||
@ -23,18 +22,15 @@ systemd的反对者之中也有部分人认为SysV太老了,应该被取代掉
|
||||
|
||||

|
||||
|
||||
[维基共享资源][10]
|
||||
*[维基共享资源][10] systemd 结构图解*
|
||||
|
||||
|
||||
systemd 结构图解。
|
||||
|
||||
systemd包括用于管理用户登陆的守护进程logind,还包括journald,并且journald 颇有争议的使用了二进制形式保存系统日志而不是以文本形式。systemd也采用了[udev][11]的思想及代码,它对**/dev/**目录下的虚拟设备文件进行管理,并且处理设备接入或推出时所产生的事件。除了这些还有很多其他的,如:systemd还包括了[cron][12]风格的任务调度器与网络守护进程networkd。
|
||||
Systemd包括用于管理用户登陆的守护进程logind,还包括journald,并且journald 颇有争议的使用了二进制形式保存系统日志而不是以文本形式。systemd也采用了[udev][11]的思想及代码,它对**/dev/**目录下的虚拟设备文件进行管理,并且处理设备接入或推出时所产生的事件。除了这些还有很多其他的,如:systemd还包括了[cron][12]风格的任务调度器与网络守护进程networkd等等。
|
||||
|
||||
###抨击者认为systemd不是类UNIX风格
|
||||
|
||||
多数的抱怨源于人们认为systemd项目太大以至于超出了它的工作范围,并且它从Linux系统接管的部分太多了。不要感到惊奇,systemd的抵制活动是以下面的抱怨开始的:
|
||||
|
||||
>"systemd文件是一大堆的复杂的高度耦合的二进制组成的,这违反了UNIX哲学:“做一件事情,并把它做好”。它超出了一个init程序的职责范围,因为它还有电源管理,设备管理,挂载管理,cron(定时执行工具),磁盘加密,socket接口/inetd,syslog,网络配置,登陆/绘画管理,文件预读,GPT分区发现,容器注册,hostname/locale/time管理,mDNS/DNS-SD等功能,它将Linux控制台以及其他的一些功能都包装在一个程序里面。
|
||||
>"systemd文件是一大堆的复杂的高度耦合的二进制组成的,这违反了UNIX哲学:‘做一件事情,并把它做好’。它超出了一个init程序的职责范围,因为它还有电源管理,设备管理,挂载管理,cron(定时执行工具),磁盘加密,socket接口/inetd,syslog,网络配置,登陆/会话管理,文件预读,GPT分区发现,容器注册,hostname/locale/time管理,mDNS/DNS-SD等功能,它将Linux控制台以及其他的一些功能都包装在一个程序里面。
|
||||
|
||||
##那么,systemd是好是坏?
|
||||
|
||||
@ -42,25 +38,25 @@ systemd包括用于管理用户登陆的守护进程logind,还包括journald,
|
||||
|
||||

|
||||
|
||||
systemd最初的想法是非常好的。Linux需要一个新的东西来替换老的SysV init和沉重的 SysV init 脚本,这个新的程序应该是灵活的,现代化的系统守护进程,它可以响应更多类型,并且智能化的管理众多的守护进程。然而,事实上systemd好像成为了一个仅依赖Linux核心的完全统一的系统层。
|
||||
systemd最初的想法是非常好的。Linux需要一个新的东西来替换老的 SysV init 和沉重的 SysV init 脚本,这个新的程序应该是灵活的,现代化的系统守护进程,它可以响应更多类型,并且智能化的管理众多的守护进程。然而,事实上systemd好像成为了**一个仅依赖Linux核心的完全统一的系统层**。
|
||||
|
||||
*但是*,尽管Linux是一个社区开发项目,但它不是为PC世界的专栏作家或者是一群网络评论者提供的,这些人都不能决定它的进化与发展。只有那些亲手贡献代码以及全身心投入的人才有这个资格。巧的是,Linux发行版以及那些参与者好像大部分都倾向与systemd。
|
||||
*但是*,尽管Linux是一个社区开发项目,但它不是为PC世界的专栏作家或者是一群网络评论者提供的,这些人都不能决定它的进化与发展。只有那些亲手贡献代码以及全身心投入的人才有这个资格。巧的是,Linux发行版以及那些参与者好像大部分都倾向与systemd。
|
||||
|
||||
>'我对于systemd本身并没有很强烈的个人看法。我与核心开发人员争论过它的bug与兼容性,并且我认为它的一些设计是愚蠢的(比如二进制的日志),但这只是细节,不是大问题。
|
||||
|
||||
如果Linux Torvald 对于systemd的设计没有什么反对意见,那么说明它可能还是不错的。如果你想平静的看下为什么Linux发型版要使用systemd的话,我推荐这篇文章,[Debian's systemd discussion document][13]。
|
||||
如果 Linux Torvald 对于systemd的设计没有什么反对意见,那么说明它可能还是不错的。如果你想平静的看下为什么Linux发行版要使用systemd的话,我推荐这篇文章,[Debian's systemd discussion document][13]。
|
||||
|
||||
你是如何看systemd的,可以在评论回复!但是请文明讨论。
|
||||
|
||||
*更新这篇文章以澄清之前的错误,ubuntu 桌面版将在下一个版本中纳入systemd。之前我们错误的认为ubuntu已经使用了systemd*(这段应该不用了吧,校对把握一下吧)
|
||||
*更新这篇文章以澄清之前的错误的消息,ubuntu 桌面版将在下一个版本中纳入systemd。之前我们错误的认为ubuntu已经使用了systemd*。
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.pcworld.com/article/2841873/meet-systemd-the-controversial-project-taking-over-a-linux-distro-near-you.html
|
||||
|
||||
作者:[Chris Hoffman][a]
|
||||
译者:[SPccman](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[SPccman](https://github.com/SPccman)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,9 +1,8 @@
|
||||
Linux FAQs with Answers--How to convert a text file to PDF format on Linux
|
||||
Linux 有问必答 --如何在Linux上将文本文件转换成PDF格式
|
||||
Linux 有问必答:在Linux上如何将文本文件转换成PDF格式
|
||||
================================================================================
|
||||
> **提问**: 我想要将一个纯文本文件转换成PDF文档。是否有一个简单的方法在Linux命令行下将文本文件转换成PDF文件?
|
||||
> **提问**: 我想要将一个纯文本文件转换成PDF文档。在Linux命令行下是否有一个简单的方法将文本文件转换成PDF文件?
|
||||
|
||||
当你有一打文本文件要维护的时候,把它们转换成PDF文档有一些好处。比如,PDF对打印更友好因为PDF文档有预定义布局。除此之外,还可以减少文档被意外修改的风险。
|
||||
当你有一大堆文本文件要维护的时候,把它们转换成PDF文档会好一些。比如,PDF更适合打印,因为PDF文档有预定义布局。除此之外,还可以减少文档被意外修改的风险。
|
||||
|
||||
要将文本文件转换成PDF格式,你要按照下面的两步。
|
||||
|
||||
@ -27,7 +26,7 @@ Linux 有问必答 --如何在Linux上将文本文件转换成PDF格式
|
||||
|
||||
准备工作完成之后,按照下面的两步从文本文件生成一个PDF文件
|
||||
|
||||
首先,将文本文件使用enscript命令行工具转换成postscript格式。
|
||||
首先,使用enscript命令行工具将文本文件转换成postscript格式。
|
||||
|
||||
$ enscript -p output.ps input.txt
|
||||
|
||||
@ -40,6 +39,6 @@ Linux 有问必答 --如何在Linux上将文本文件转换成PDF格式
|
||||
via: http://ask.xmodulo.com/convert-text-to-pdf-linux.html
|
||||
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[Caroline](https://github.com/carolinewuyan)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -1,14 +1,14 @@
|
||||
如何让树莓派默认以图形界面启动
|
||||
如何让树莓派默认启动进入图形界面
|
||||
================================================================================
|
||||

|
||||
|
||||
我买树莓派已经有一段时间了,但是实话说我几乎还没有用它做过什么事情。自从我的Dell超级本送到Dell服务中心后(已经有数星期了),我再次开始使用树莓派作为替代。
|
||||
|
||||
我之前已经写过一篇[如何在Ubuntu中在SD卡上安装Raspbian系统][1]。我也重装了一次树莓派。第一次启动的时候我漏掉了一件事情就是设置图形界面。这样当我再次启动树莓派的时候,我直接进入了命令行。我该接下来如何运行Respbian图形界面呢?
|
||||
我之前已经写过一篇[在Ubuntu中如何在SD卡上安装Raspbian系统][1]。我也重装了一次树莓派。第一次启动的时候我漏掉了一件事情就是设置图形界面。这样当我再次启动树莓派的时候,我直接进入了命令行。我该接下来如何运行Respbian图形界面呢?
|
||||
|
||||
### 设置Raspbian图形启动 ###
|
||||
|
||||
入Raspbian系统的命令行界面,不用失望,因为很容易设置树莓派以图形界面启动。让我们看看该如何做。
|
||||
当你第一次安装Raspbian系统时,确实有一些选项需要你来配置,由于匆忙,我没有注意到这些,只是快速完成屏幕上的选项。如果你遇到了和我一样的情况,最终只是进入到了Raspbian操作系统的命令行界面,不要失望,因为设置树莓派以图形界面启动很容易。让我们看看该如何操作。
|
||||
|
||||
### 第一步: ###
|
||||
|
||||
@ -24,14 +24,13 @@
|
||||
|
||||
#### 第三步: ####
|
||||
|
||||
在这个配置界面下, 寻找**Enable Boot to Desktop/Scratch**这个选项。用箭头、tab和/或者回车键的组合来选中它(我忘记该使用哪一个了)。
|
||||
在这个配置界面下, 寻找**Enable Boot to Desktop/Scratch**这个选项。用箭头、tab和/或者回车键的组合来选中它(我忘记使用的是哪些了)。
|
||||
|
||||

|
||||
|
||||
#### 第四步: ####
|
||||
|
||||
下一屏中,选择**Desktop Login as user ‘Pi’ at the graphical desktop.
|
||||
**
|
||||
下一屏中,选择** Desktop Login as user ‘Pi’ at the graphical desktop. **
|
||||
|
||||

|
||||
|
||||
@ -45,7 +44,7 @@
|
||||
|
||||

|
||||
|
||||
我希望这边教程能够帮助你设置你的树莓派默认以图形界面启动。欢迎在评论区留下你的问题和建议。
|
||||
我希望这个教程能够帮助设置你的树莓派默认启动进入图形界面。欢迎在评论区留下你的问题和建议。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -53,9 +52,9 @@ via: http://itsfoss.com/raspberry-pi-gui-boot/
|
||||
|
||||
作者:[Abhishek][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[Caroline](https://github.com/carolinewuyan)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://itsfoss.com/author/Abhishek/
|
||||
[1]:http://itsfoss.com/tutorial-how-to-install-raspberry-pi-os-raspbian-wheezy/
|
||||
[1]:http://itsfoss.com/tutorial-how-to-install-raspberry-pi-os-raspbian-wheezy/
|
@ -1,18 +1,19 @@
|
||||
Qshutdown – 一个先进的关机神器
|
||||
================================================================================
|
||||
qshutdown是一个QT程序,用于让计算机在指定时间或者在几分钟后关机/重启/挂起/睡眠。它会一直显示时间,直到相应的请求被发送到Gnome或KDE会话管理器,或者发送到HAL或DeviceKit。而如果这一切都没有发生,将会使用‘sudo shutdown -P now’进行关机。对于那些只在特定时间使用计算机工作的人而言,可能很有用。
|
||||
qshutdown是一个QT程序,用于让计算机在指定时间或者在几分钟后关机/重启/挂起/睡眠。对于那些只在特定时间使用计算机工作的人而言,可能很有用。
|
||||
|
||||
qshutdown将在最后70秒时显示3次警告提醒。(如果设置了1分钟或者本地时间+1,它只会显示一次。)
|
||||

|
||||
|
||||
该程序使用qdbus来发送关机/重启/挂起/睡眠请求到gnome或kde会话管理器,或者到HAL或DeviceKit,而如果这些都没有工作,那么就会使用‘sudo shutdown’命令进行关机(注意,但发送请求到HAL或DeviceKit,或者使用shutdown命令时,会话不会被保存。如果使用shutdown命令,该程序只会被关机或重启)。所以,如果在shutdown或reboot时间到时什么都没发生,这就意味着用户缺少使用shutdown命令的权限。
|
||||
qshutdown将在最后70秒时显示3次警告提醒。(如果设置了1分钟或者“本地时间+1”,它只会显示一次。)
|
||||
|
||||
该程序使用qdbus来发送关机/重启/挂起/睡眠请求到gnome或kde会话管理器,或者到HAL或DeviceKit,而如果这些都没有工作,那么就会使用‘sudo shutdown -P now’命令进行关机(注意,当发送请求到HAL或DeviceKit,或者使用shutdown命令时,会话不会被保存。如果使用shutdown命令,该程序只会被关机或重启)。所以,如果在shutdown或reboot时间到时却什么都没发生,这就意味着用户缺少使用shutdown命令的权限。
|
||||
|
||||
在这种情况下,你可以进行以下操作:
|
||||
|
||||
粘贴以下信息到终端:“EDITOR:nano sudo -E visudo”并添加此行:“* ALL = NOPASSWD:/sbin/shutdown”这里*替换username或%groupname。
|
||||
粘贴以下信息到终端:“EDITOR:nano sudo -E visudo”并添加此行:“* ALL = NOPASSWD:/sbin/shutdown”这里*替换为你的“用户名”或“%组名”。
|
||||
|
||||
配置文件qshutdown.conf
|
||||
|
||||
倒计时最大计数为1440分钟(24小时)。配置文件(和日志文件)位于~/.qshutdown。
|
||||
倒计时最大计数为1440分钟(24小时)。配置文件(和日志文件)位于~/.qshutdown,配置文件为:qshutdown.conf。
|
||||
|
||||
对于管理员:
|
||||
|
||||
@ -26,7 +27,6 @@ qshutdown将在最后70秒时显示3次警告提醒。(如果设置了1分钟
|
||||
|
||||
### 屏幕截图 ###
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
@ -40,7 +40,7 @@ via: http://www.ubuntugeek.com/qshutdown-an-avanced-shutdown-tool.html
|
||||
|
||||
作者:[ruchi][a]
|
||||
译者:[GOLinux](https://github.com/GOLinux)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
106
published/20141119 When Microsoft Went A-Courting.md
Normal file
106
published/20141119 When Microsoft Went A-Courting.md
Normal file
@ -0,0 +1,106 @@
|
||||
当微软离去时
|
||||
================================================================================
|
||||

|
||||
|
||||
**开源.Net,“这与Linux无关——它与SaaS相关,也和一位并不偏执和狂热的90后CEO相关,”SoylentNews博主hairyfeet道,“纳德拉很明智,而且意识到了编程语言的价值不在于专利或OS排他性,而在于服务和对语言的支持……越多的平台使用该语言,它就会越好。”**
|
||||
|
||||
如果自由和开源软件迷们在过去的那些日子里感到有些许困惑的话,这也许是可以理解的,即便是头昏、头痛以及头晕也算是常见的。
|
||||
|
||||
你或许会问,这又是什么新的病症?
|
||||
|
||||
好吧,Linux女孩很高兴告诉你,它不是什么病症。不过,然而它并不意味着它很容易治愈。
|
||||
|
||||
原因无他,而是微软开源.Net并让它可以在Linux或Mac OS上运行的消息。
|
||||
|
||||
是的,你没听错:史蒂夫·鲍尔默曾经可能[称Linux为“癌症”][1],但今天雷蒙德(微软总部,代称微软)有个新发现,曾经不被包容的,但是却转头[“爱”上了Linux][2]!
|
||||
|
||||
它让微软看起来很奇怪——它也驱使FOSS迷们聚拢到博客圈的破败的Broken Windows Lounge,而去的人的数量更是空前的。
|
||||
|
||||
一杯龙舌兰可以让你不再头疼么?这是现在众多探究的问题之一。
|
||||
|
||||
### ‘繁荣的机遇’ ###
|
||||
|
||||
“这是个重大的消息,虽然有点过时了,”克里斯·特拉弗斯,一位[博主][3],他为[LedgerSMB][4]项目工作,告诉Linux女孩。
|
||||
|
||||

|
||||
|
||||
“我们生活的世界中,即使没有大的商业公司支持,新的开源编程语言也很兴旺,而闭源的编程语言仅能在大的商业公司的帮助下得到支持,”特拉弗斯说,“例如,Bing闭源杀死了REBOL 2.x。”
|
||||
|
||||
“这项运动很明显酝酿已久——一家像微软这样庞大的公司不会有‘突然开源’这种复杂的东西——而我想,在某种程度上,微软一定看到了Sun开源OpenJDK时的一些前兆了。”他暗示道。
|
||||
|
||||
同时,“这也为诸如C#和F#这样的语言提供了比当前市场更为兴盛的机会,”特拉弗斯说。
|
||||
|
||||
### ‘我仍然不相信你’ ###
|
||||
|
||||
“我首先想说,‘谢谢你,微软!’”[Linux Rants][5]博主麦克·斯通开篇说,“我们真的很欣赏你开源.Net并推动它跨平台,这是迈向正确方向的一步!”
|
||||
|
||||
“然而,我仍然不相信你。”他补充道。
|
||||
|
||||
“我很喜欢微软在考虑开源,但是我没有见到它向GPL迈进,”斯通告诉Linux女孩,“这让我想到了这么个可能性,微软提供了多个平台的软件供你使用,但却会把开发者和它捆绑起来。”
|
||||
|
||||
此外,微软不会作出任何保证,保证.Net常年开源,他指出。
|
||||
|
||||
“这意味着微软可以退出,并让开发出来的应用程序成为跨平台的Windows专有软件,”他警告道,“我不会相信微软的承诺,我会翘首期盼微软他们的突然而必然的背叛。”
|
||||
|
||||
### ‘留心不怀好意的礼物’ ###
|
||||
|
||||
该运动明显带有失望的气息,Google+博主阿里桑德罗·埃伯索尔暗示道。
|
||||
|
||||
“他们来得太晚了,”埃伯索尔说,“Java已经先下手为强了,当.Net还是Windows/Microsoft专有产品时,Java已经遍布四处了。试着让人采用,希望好运吧。”
|
||||
|
||||
此外,“如果它打上GPL烙印来保护代码创建者的话我才会相信它,”他补充道,“一个脆弱的MIT许可证任何时候都是逆天而行的。”
|
||||
|
||||
无论如何,“在该公司产生的对FLOSS社区的全部的敌意下,他们会过河拆桥,”埃伯索尔总结道,“底线是:送礼的希腊人也很可畏——仔细留心希腊人不怀好意的礼物……”
|
||||
|
||||
### ‘就像猫爱上老鼠’ ###
|
||||
|
||||
微软爱上Linux“就像猫爱上老鼠,”博主[罗伯特·伯格森][6]打趣道,“当然,他们会玩玩*/Linux,但是他们不是我们的朋友。”
|
||||
|
||||
所发生的事情是,FOSS和LInux社区已经击溃了“MS自从和IBM达成提供OS的交易后放置在竞争道路入口上的所有障碍,”伯格森说,“MS肯定是在绝望地试着和‘敌人’‘做朋友’,因为它们的位置被侵占了。”
|
||||
|
||||
“一切都会好的,”他补充道,“MS仍然可以通过愚蠢地花大量的金钱来制造麻烦,或者他们可以进行常规商业运作并在价格/性能上开展竞争。那不是‘爱’——那是接受现实。”
|
||||
|
||||
### 适应或者灭亡 ###
|
||||
|
||||
对于微软而言,问题在于“开源开发包对于开发者而言开始变得足够好用了,”参团顾问和[Slashdot][7]博主格哈德·麦克。
|
||||
|
||||
“在我的最后一份职业中,大多数的程序员想要Eclipse,而不是Visual Studio,即使客户端软件是Windows专用的。用Windows做测试的开发者们迁移到Linux的数量在缓慢增长。”麦克回忆道。
|
||||
|
||||
“很要有人想被固定在一个平台中,因此单一平台的语言的份额会越来越少,”他补充道,“微软现在必须在适应与灭亡中作出选择。”
|
||||
|
||||
### 这里没有温暖的毛球 ###
|
||||
|
||||
驱动此项运动的策略也在于“各种云大量地在Linux上部署,即便在微软自己的Azure云,Linux也被大量部署,”Google+博主凯文·奥布莱恩暗示道。
|
||||
|
||||
“纳德拉清楚地指出,他正将微软向云方向推进,因为他几乎不得不如此,以期继续将游戏玩下去。”奥布莱恩坚信。
|
||||
|
||||
那就是说,不管怎样,“我都不期待微软变得可爱又善意——他们将做所有他们认为能获得最佳公司利益的事情。”他说。
|
||||
|
||||
事实上,“根本没Linux什么事——它只和SaaS相关,也和一位并不偏执和狂热的90后CEO相关,”SoylentNews博主hairyfeet告诉Linux女孩。
|
||||
|
||||
“纳德拉很明智,而且意识到了编程语言的价值不在于专利或OS排他性,而在于服务和对语言的支持,”hairyfeet解释道,“考虑到这一点,越多的平台使用该语言,它就会越好,因为那会增加该语言的价值,并且为你的服务带来更多客户。”
|
||||
|
||||
### 帝国的没落 ###
|
||||
|
||||
总得来说,一切都很明了,那就是“微软帝国正在摇摇欲坠,”Google+博主贡萨洛·维拉斯科 C说。
|
||||
|
||||
“我不知道,或者不关心他们为什么会说谎,说他们热爱Linux,”他补充道,“我只希望GNU/Linux社区变得比现今更聪明些(咳,Systemd,咳咳),拒绝微软.Net和其它产生影响的东西。GNU/Linux必须只用FLOSS工具。”
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linuxinsider.com/story/When-Microsoft-Went-A-Courting-81374.html
|
||||
|
||||
作者:[Katherine Noyes][a]
|
||||
译者:[GOLinux](https://github.com/GOLinux)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://twitter.com/noyesk
|
||||
[1]:http://www.linuxinsider.com/perl/story/35697.html
|
||||
[2]:http://www.theregister.co.uk/2014/10/20/microsoft_cloud_event/
|
||||
[3]:http://ledgersmbdev.blogspot.com/
|
||||
[4]:http://www.ledgersmb.org/
|
||||
[5]:http://linuxrants.com/
|
||||
[6]:http://mrpogson.com/
|
||||
[7]:http://slashdot.org/
|
@ -0,0 +1,265 @@
|
||||
菜鸟教程:全面学习 pwd 命令
|
||||
================================================================================
|
||||
对于那些使用Linux命令行的人来说,‘**pwd**‘命令是非常有用的,它告诉你你现在在那个目录,从根目录(**/**)如何到达。特别是对于或许会在目录的切换间容易糊涂的Linux新手而言,‘**pwd**‘ 可以拯救他们。
|
||||
|
||||

|
||||
|
||||
*15个 pwd 命令示例*
|
||||
|
||||
### 什么是pwd? ###
|
||||
|
||||
‘**pwd**‘ 代表的是‘**Print Working Directory**’(打印当前目录)。如它的名字那样,‘**pwd**’会打印出当前工作目录,或简单的来说就是当前用户所位于的目录。它会打印出以根目录 (**/**)为起点的完整目录名(绝对目录)。这条命令是一条shell内建命令,并且在大多数shell中都可以使用,如bash、Bourne shell,ksh、zsh等等。
|
||||
|
||||
#### pwd的基本语法: ####
|
||||
|
||||
# pwd [OPTION]
|
||||
|
||||
#### pwd的选项 ####
|
||||
|
||||
<table border="0" cellspacing="0">
|
||||
<colgroup width="126"></colgroup>
|
||||
<colgroup width="450"></colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td height="21" align="LEFT" style="border: 1px solid #000000;"><b><span style="font-size: small;"> 选项</span></b></td>
|
||||
<td align="LEFT" style="border: 1px solid #000000;"><b><span style="font-size: small;"> 描述</span></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="19" align="LEFT" style="border: 1px solid #000000;"><span style="font-family: Liberation Serif,Times New Roman; font-size: small;"> -L (即逻辑路径logical )</span></td>
|
||||
<td align="LEFT" style="border: 1px solid #000000;"><span style="font-family: Liberation Serif,Times New Roman; font-size: small;"> 使用环境中的路径,即使包含了符号链接</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="19" align="LEFT" style="border: 1px solid #000000;"><span style="font-family: Liberation Serif,Times New Roman; font-size: small;"> -P (即物理路径physical)</span></td>
|
||||
<td align="LEFT" style="border: 1px solid #000000;"><span style="font-family: Liberation Serif,Times New Roman; font-size: small;"> 避免所有的符号链接</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="19" align="LEFT" style="border: 1px solid #000000;"><span style="font-family: Liberation Serif,Times New Roman; font-size: small;"> –help </span></td>
|
||||
<td align="LEFT" style="border: 1px solid #000000;"><span style="font-family: Liberation Serif,Times New Roman; font-size: small;"> 显示帮助并退出</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="19" align="LEFT" style="border: 1px solid #000000;"><span style="font-family: Liberation Serif,Times New Roman; font-size: small;"> –version</span></td>
|
||||
<td align="LEFT" style="border: 1px solid #000000;"><span style="font-family: Liberation Serif,Times New Roman; font-size: small;"> 输出版本信息并退出</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
如果同时使用了‘**-L**‘和‘**-P**‘,‘**-L**‘会有更高的优先级。如果没有指定参数,pwd会避开所有的软链接,也就是说会使用‘**-P**‘参数。
|
||||
|
||||
pwd的退出状态:
|
||||
|
||||
<table border="0" cellspacing="0">
|
||||
<colgroup width="128"></colgroup>
|
||||
<colgroup width="151"></colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td height="19" align="CENTER" style="border: 1px solid #000000;"><span style="font-size: small;">0</span></td>
|
||||
<td align="CENTER" style="border: 1px solid #000000;"><span style="font-size: small;">成功</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="19" align="CENTER" style="border: 1px solid #000000;"><span style="font-size: small;">非零值</span></td>
|
||||
<td align="CENTER" style="border: 1px solid #000000;"><span style="font-size: small;">失败</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
本篇的目的是采用例子让你对‘**pwd**‘有更深入的领悟。
|
||||
|
||||
**1.** 打印当前工作目录.
|
||||
|
||||
avi@tecmint:~$ /bin/pwd
|
||||
|
||||
/home/avi
|
||||
|
||||

|
||||
|
||||
*打印工作目录*
|
||||
|
||||
**2.** 为文件夹创建一个符号链接(比如说在home目录下创建一个**htm**链接指向**/var/www/html**)。进入新创建的目录并打印出含有以及不含符号链接的目录。
|
||||
|
||||
在home目录下创建一个htm链接指向/var/www/html,并进入。
|
||||
|
||||
avi@tecmint:~$ ln -s /var/www/html/ htm
|
||||
avi@tecmint:~$ cd htm
|
||||
|
||||

|
||||
|
||||
*创建符号链接*
|
||||
|
||||
**3.** 从当前环境中打印目录即使它含有符号链接。
|
||||
|
||||
avi@tecmint:~$ /bin/pwd -L
|
||||
|
||||
/home/avi/htm
|
||||
|
||||

|
||||
|
||||
*打印工作目录*
|
||||
|
||||
**4.** 解析符号链接并打印出物理目录。
|
||||
|
||||
avi@tecmint:~$ /bin/pwd -P
|
||||
|
||||
/var/www/html
|
||||
|
||||

|
||||
|
||||
*打印物理工作目录*
|
||||
|
||||
**5.** 查看一下“**pwd**”和“**pwd -P**”的输出是否一致,也就是说,如果没有跟上选项,“**pwd**”时候会自动采用**-P**选项。
|
||||
|
||||
avi@tecmint:~$ /bin/pwd
|
||||
|
||||
/var/www/html
|
||||
|
||||

|
||||
|
||||
*检查pwd输出*
|
||||
|
||||
**结论:** 上面例子4和5的输出很明显(结果相同),当你“**pwd**”后面不带参数时,pwd会使用“**-P**”选项。
|
||||
|
||||
**6.** 打印pwd命令的版本。
|
||||
|
||||
avi@tecmint:~$ /bin/pwd --version
|
||||
|
||||
pwd (GNU coreutils) 8.23
|
||||
Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
|
||||
Written by Jim Meyering.
|
||||
|
||||

|
||||
|
||||
*检查pwd命令版本*
|
||||
|
||||
**注意:** ‘pwd’ 通常不带选项运行,且没有任何参数
|
||||
|
||||
**重要:** 你可能注意到我们刚才运行的都是 “**/bin/pwd**” 而不是 “**pwd**”。
|
||||
|
||||
这有什么区别呢?直接使用“**pwd**”意味着使用shell内置的pwd。你的shell可能有不同版本的pwd。具体请参考手册。当你使用的是**/bin/pwd**时,我们调用的是二进制版本的命令。虽然二进制的版本有更多的选项,但是它们两者都能打印当前的目录。
|
||||
|
||||
**7.** 打印所有含有可执行pwd的路径
|
||||
|
||||
avi@tecmint:~$ type -a pwd
|
||||
|
||||
pwd is a shell builtin
|
||||
pwd is /bin/pwd
|
||||
|
||||

|
||||
|
||||
*打印可执行文件路径*
|
||||
|
||||
**8.** 存储“**pwd**”命令的值到变量中(比如说:**a** ),并从中打印变量的值(对于观察shell脚本很重要)。
|
||||
|
||||
avi@tecmint:~$ a=$(pwd)
|
||||
avi@tecmint:~$ echo "Current working directory is : $a"
|
||||
|
||||
Current working directory is : /home/avi
|
||||
|
||||

|
||||
|
||||
*存储pwd的值到变量中*
|
||||
|
||||
下面的例子中也可以用**printf**来替代。
|
||||
|
||||
**9.** 将工作路径切换到其他地方(比如说 **/home**),并在命令行中显示。通过执行命令(比如说 ‘**ls**‘)来验证一切**OK**。
|
||||
|
||||
avi@tecmint:~$ cd /home
|
||||
avi@tecmint:~$ PS1='$pwd> ' [注意例子中的单引号]
|
||||
> ls
|
||||
|
||||

|
||||
|
||||
*改变当前工作路径*
|
||||
|
||||
**10.** 设置多行显示 (就像下面这样),
|
||||
|
||||
/home
|
||||
123#Hello#!
|
||||
|
||||
接着执行命令(比如说 **ls**)来检验一切**OK**。
|
||||
|
||||
avi@tecmint:~$ PS1='
|
||||
> $PWD
|
||||
$ 123#Hello#!
|
||||
$ '
|
||||
|
||||
/home
|
||||
123#Hello#!
|
||||
|
||||

|
||||
|
||||
*设置多行显示*
|
||||
|
||||
**11.** 一下子检查当前工作路径以及先前的工作路径。
|
||||
|
||||
avi@tecmint:~$ echo “$PWD $OLDPWD”
|
||||
|
||||
/home /home/avi
|
||||
|
||||

|
||||
|
||||
*检查当前工作路径*
|
||||
|
||||
**12.** pwd文件的绝对路径(以**/**开始)。
|
||||
|
||||
/bin/pwd
|
||||
|
||||
**13.** pwd源文件文件的绝对路径(以**/**开始)。
|
||||
|
||||
/usr/include/pwd.h
|
||||
|
||||
**13.** pwd手册的绝对路径(以**/**开始)。
|
||||
|
||||
/usr/share/man/man1/pwd.1.gz
|
||||
|
||||
**15.** 写一个shell脚本分析home目录下的一个目录(比如**tecmint**)。如果当前目录是**tecmint**就输出“**Well! You are in tecmint directory**”接着输出“**Good Bye**”,不然就在**tecmint**下面创建一个目录并提示你cd进入它。
|
||||
|
||||
让我们首先创建一个‘tecmint’目录,在下面创建一个名为‘pwd.sh’的脚本文件。
|
||||
|
||||
avi@tecmint:~$ mkdir tecmint
|
||||
avi@tecmint:~$ cd tecmint
|
||||
avi@tecmint:~$ nano pwd.sh
|
||||
|
||||
接下来在pwd.sh中加入下面的脚本。
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
x="$(pwd)"
|
||||
if [ "$x" == "/home/$USER/tecmint" ]
|
||||
then
|
||||
{
|
||||
echo "Well you are in tecmint directory"
|
||||
echo "Good Bye"
|
||||
}
|
||||
else
|
||||
{
|
||||
mkdir /home/$USER/tecmint
|
||||
echo "Created Directory tecmint you may now cd to it"
|
||||
}
|
||||
fi
|
||||
|
||||
给予执行权限并运行。
|
||||
|
||||
avi@tecmint:~$ chmod 755 pwd.sh
|
||||
avi@tecmint:~$ ./pwd.sh
|
||||
|
||||
Well you are in tecmint directory
|
||||
Good Bye
|
||||
|
||||
#### 总结 ####
|
||||
|
||||
**pwd**是一个最简单且会广泛用到的命令。掌握好pwd是使用Linux终端的基础。就是这些了。我很快会再带来另外有趣的文章,请不要走开继续关注我们。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/pwd-command-examples/
|
||||
|
||||
作者:[Avishek Kumar][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/avishek/
|
@ -0,0 +1,67 @@
|
||||
Linux 有问必答:如何从VirtualBox中从主机访问NAT客户机
|
||||
================================================================================
|
||||
> **提问**: 我有一台运行在VirtualBox上的使用NAT的虚拟机,因此虚拟机会被VirtualBox分配一个私有IP地址(10.x.x.x)。如果我想要从主机SSH到虚拟机中,我该怎么做?
|
||||
|
||||
VirtualBox对虚拟机支持几种不同的网络方式,其中一种是NAT网络。当虚拟机启用NAT后,VirtualBox会自动在虚拟机和主机之间进行网络翻译,因此你不必在虚拟机和主机之间配置任何东西。这也意味着NAT中的虚拟机对于外部网络以及主机本身是不可见的。这会在你想要从主机访问虚拟机时会产生问题(比如SSH)。
|
||||
|
||||
如果你想从VirtualBox的NAT环境的虚拟机,你可以在GUI或者命令行下启用VirtualBox NAT的端口转发。本篇教程将会演示**如何通过启用22端口转发而从主机SSH连接到NAT环境的客户机**。如果你先想要从HTTP访问NAT的客户机,用80端口代替22端口即可。
|
||||
|
||||
### 通过GUI配置VirtualBox端口转发 ###
|
||||
|
||||
在VirtualBox中选择你想要访问的虚拟机,打开虚拟机的“设置”。点击左侧的“网络”菜单,点击网络适配选项的“高级”。
|
||||
|
||||

|
||||
|
||||
点击“端口转发”按钮
|
||||
|
||||

|
||||
|
||||
你会看到一个配置端口转发规则的窗口。点击右上角的“添加”图标。
|
||||
|
||||

|
||||
|
||||
就会看到像下面那样的转发规则。
|
||||
|
||||
- **Name**: SSH (可以是任意唯一名)
|
||||
- **Protocol**: TCP
|
||||
- **Host IP**: 127.0.0.1
|
||||
- **Host Port**: 2222 (任何大于1024未使用的端口)
|
||||
- **Guest IP**: 虚拟机IP
|
||||
- **Guest Port**: 22 (SSH 端口)
|
||||
|
||||

|
||||
|
||||
端口转发的规则会自动在你启动虚拟机的时候启用。为了验证。可以在你启用虚拟机后检查端口2222是否被VirtualBox开启了。
|
||||
|
||||
$ sudo netstat -nap | grep 2222
|
||||
|
||||

|
||||
|
||||
现在端口转发可以使用了,你可以用下面的命令SSH到虚拟机。
|
||||
|
||||
$ ssh -p 2222 <login>@127.0.0.1
|
||||
|
||||
发送到127.0.0.1:2222的登录请求会自动被VirtualBox翻译成10.0.2.15:22,这可以让你SSH到虚拟机中。
|
||||
|
||||
### 通过命令行配置VirtualBox端口转发 ###
|
||||
|
||||
VirtualBox有一个称为VBoxManage的命令行管理工具。使用命令行工具,你也可以为你的虚拟机设置端口转发。
|
||||
|
||||
下面的命令会为IP地址为10.0.2.15的虚拟机设置一个名字为"centos7"的端口转发规则,SSH的端口号为22,映射到本地主机的端口为2222。规则的名字(本例中是SSH)必须是唯一的。
|
||||
|
||||
$ VBoxManage modifyvm "centos7" --natpf1 "SSH,tcp,127.0.0.1,2222,10.0.2.15,22"
|
||||
|
||||
规则创建之后,你可以用下面的命令来验证。
|
||||
|
||||
$ VBoxManage showvminfo "centos7" | grep NIC
|
||||
|
||||

|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/access-nat-guest-from-host-virtualbox.html
|
||||
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -1,10 +1,11 @@
|
||||
Linux有问必答——如何修复“ImportError: No module named scapy.all”
|
||||
Linux有问必答:如何修复“ImportError: No module named scapy.all”
|
||||
================================================================================
|
||||
> **问题**:当我运行一个Python应用程序时,出现了这个提示消息“ImportError: No module named scapy.all”。我怎样才能修复这个导入错误呢?
|
||||
|
||||
[Scapy][1]是一个用Python写的灵活包生成和嗅探程序。使用Scapy,你可以完成创建专有包,发送上线,从线上或转储文件中读取包,转换包等工作。使用Scapy的通用包处理能力,你可以很容易地完成像SYN扫描、TCP路由跟踪以及OS指纹打印之类的工作。你也可以通过导入,将Scapy整合到其它工具中。
|
||||
[Scapy][1]是一个用Python写的灵活的数据包生成及嗅探程序。使用Scapy,你可以完成创建任意数据包并发送到网络上、从网络上或转储文件中读取数据包、转换数据包等工作。使用Scapy的通用包处理能力,你可以很容易地完成像SYN扫描、TCP路由跟踪以及OS指纹检测之类的工作。你也可以通过导入,将Scapy整合到其它工具中。
|
||||
|
||||
该导入错误表明:你还没有在你的Linux系统上安装Scapy。下面介绍安装方法。
|
||||
|
||||
### 安装Scapy到Debian, Ubuntu或Linux Mint ###
|
||||
|
||||
$ sudo apt-get install python-scapy
|
||||
@ -30,7 +31,7 @@ Linux有问必答——如何修复“ImportError: No module named scapy.all”
|
||||
via: http://ask.xmodulo.com/importerror-no-module-named-scapy-all.html
|
||||
|
||||
译者:[GOLinux](https://github.com/GOLinux)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
65
published/20141127 What Makes a Good Programmer.md
Normal file
65
published/20141127 What Makes a Good Programmer.md
Normal file
@ -0,0 +1,65 @@
|
||||
是什么造就了一个优秀的程序员?
|
||||
================================================================================
|
||||
是什么造就了一个优秀的程序员?首先问问你自己吧,这会是个有趣的问题。它让你反思自己的软件开发技术。这个问题也适合问问你的同事们。它可以带来一些关于如何协同工作的有趣讨论。下面是我认为成为一个优秀程序员必备的五个重要技能。
|
||||
|
||||
### 1. 分解问题 ###
|
||||
|
||||
编程是为了解决问题,但在你开始写代码前,需要明白如何解决问题。优秀程序员的一项技能是把大的问题逐层分解成一个个更小的部分,直到每一部分都可以很容易解决。但找到解决问题的方式往往并没有那么简单。优秀程序员能找到方法去建立问题模型,这种方法使得输出结果的程序容易解释、实现和测试。
|
||||
|
||||
我写过的某些最复杂的程序在局部上都是难懂的,因为代码实现并不能很好地匹配这个问题,也就导致了编写的代码难以理解。当问题很好地建模的时候,我赞同伯尼·科赛尔所说的话(取自著名的[程序员在工作][1]中的访谈记录):
|
||||
|
||||
> “……很少有本质上很难的程序。如果你盯着某一块代码,它看起来确实很难;如果你无法理解这段代码应该产生什么结果,这基本上就是暗示它很难被理解了。在这个时候,你不应该卷起袖子,尝试修复代码;你需要只是往回一步,再仔细考虑清楚。当你已经深思熟虑后,你会发现问题变得很简单”。
|
||||
|
||||
### 2. 场景分析 ###
|
||||
|
||||
优秀开发者能考虑到如何使程序适合多种不同的场景。这项能力既适用于处理程序本身的逻辑,又适用于处理可能会发生的外部和内部事件。为了考虑逻辑上的不同思路,他们问自己这样的问题:如果这个参数为空会发生什么?如果所有条件都为假呢?这个方法在线程上是安全的吗?为了发现软件需要处理的各种类型的事件,他们问自己这样的问题:如果队列占满了会怎样?如果请求收不到响应会怎样?如果在这台服务器重启的同时另外一台服务器也重启了会怎样?
|
||||
|
||||
优秀程序员问他们自己:如何发现程序的缺陷?换句话说,他们有能力像测试人员一样思考。相反,缺少经验的程序员通常只考虑正确的路径——在一切都按照预期进行时正常的控制流(当然这也是程序在大部分时候的情况)。当然,异常不可避免要发生,所以需要程序能处理这些情况。
|
||||
|
||||
### 3. 命名 ###
|
||||
|
||||
编程由大量的命名对象组成:类、方法和变量。当编码完成得很好时,程序也具备了自我描述的能力,也就是说通过阅读源代码可以清楚地明白程序中函数的含义。自描述代码的一个好处就是很自然地产生许多更短的命名方法,而不是少数更长的方法,因为你有更多空间去放置有意义的名字(还有[其它原因][2]解释为什么短小方法更好)。
|
||||
|
||||
想出好的名字比它听起来更困难一些。我喜欢这段引用(来自菲尔·卡尔顿):“在计算机科学领域只有两件困难的事情:缓存失效和命名对象。”命名在一定程度上很困难是因为你需要清楚地明白每一个名字究竟要代表什么。有时候命名不是一下子就清晰明了,只有随着软件开发进展才会慢慢显现。因此,重命名和命名一样重要。
|
||||
|
||||
命名对象也包含提出要用的概念和这些概念该如何称呼。通过深思熟虑,清楚命名所使用的惯用概念(在程序中和与程序员、非程序员讨论时使用),这使得编写程序变得更加容易。
|
||||
|
||||
### 4. 一致性 ###
|
||||
|
||||
也许编程中最大的挑战是管理复杂性。保持一致性是处理复杂性的一种方法。它通过允许我们看到对象命名、使用和处理所采用的模式和推理来降低了某些复杂性。有了一致性,我们就无需用脑去记住异常和随机变量。取而代之,我们可以更关注[程序本身的复杂性,而不是偶然产生的复杂性][3]。
|
||||
|
||||
保持一致性从整体看来是很重要的。它应用在变量名字和分组、方法命名、模块划分、目录结构、GUI、错误处理、日志输出和文档等很多方面。比如,如果某些变量是的相关,并一起出现(在声明、方法调用或数据库中的列),而且总是以相同的顺序使用它们。那么当其中一个消失或者整体被打乱时,你就会很容易发现。对于一个操作,如果在一个地方叫delete,就不要在另一个地方叫remove:务必使用相同的名字。史蒂夫·麦克奈尔在[代码大全][4]中对于使用相反命名有相同的建议。比如,begin和end是相反的,就如同start和stop一样。当使用相反对时不要混用不同对的名字(比如使用begin和stop)。
|
||||
|
||||
当修改一段程序时可能会引入非一致性。粗心大意的程序员不会注意到他们添加的代码是否和已有的代码保持一致。优秀程序员会严苛地确保在这些看似很小的细节上都要做到精益求精。他们知道保持一致性对于在软件开发的整个过程中处理复杂性是多么的重要。
|
||||
|
||||
### 5. 学习能力 ###
|
||||
|
||||
作为一名软件开发者,你需要持续学习。在为软件添加一项新功能前,你必须明白为什么要这么做。在给一个已有程序添加代码前,你通常必须知道已有代码在做什么,以便合适地嵌入新功能。你还需要学习相关系统,以便正确地与它们交互。因此,快速学习的能力使你成为一名更加高效的开发者。
|
||||
|
||||
而且,因为软件工程领域的开发速度是如此的快速,所以新的编程语言、工具、技术和框架需要学习层出不穷。这是好还是坏,就看你怎么看。佛瑞德·布鲁克斯把学习能力列为[技能的快乐之一][5],对此我深表赞同。学习新事物本身就是令人心满意足的,它也意味着开发者的生活从不无聊。
|
||||
|
||||
### 总结 ###
|
||||
|
||||
上面所有的技能都是通用的——它们中没有一项是针对某种语言、某个框架或某种技术。如果你拥有它们,你就能快速学习一门新的语言或工具,在新的环境下写出优秀的软件。而且,因为它们在本质上是通用的,所以不会在若干年以后过时。
|
||||
|
||||
是什么造就了一个优秀的程序员?以上便是我的观点。你认为造就一个优秀程序员的因素有哪些?在评论里告诉我吧。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://henrikwarne.com/2014/06/30/what-makes-a-good-programmer/
|
||||
|
||||
作者:[Henrik Warne][a]
|
||||
译者:[KayGuoWhu](https://github.com/KayGuoWhu)
|
||||
校对:[Caroline](https://github.com/carolinewuyan)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://henrikwarne.com/about/
|
||||
[1]:http://www.amazon.com/review/R2OV0TG7MJGXGL
|
||||
[2]:http://henrikwarne.com/2013/08/31/7-ways-more-methods-can-improve-your-program/
|
||||
[3]:http://faculty.salisbury.edu/~xswang/Research/Papers/SERelated/no-silver-bullet.pdf
|
||||
[4]:http://www.amazon.com/review/R269BBARXH1V6R/
|
||||
[5]:http://henrikwarne.com/2012/06/02/why-i-love-coding/
|
||||
|
||||
|
||||
|
@ -0,0 +1,34 @@
|
||||
Ubuntu 14.10 ‘乌托邦的独角兽’官方 T 恤开始发售
|
||||
================================================================================
|
||||

|
||||
|
||||
**Ubuntu 14.10 发布以来,很少能见到随同发布的带有官方吉祥物的 T 恤。不过今天 Canonical 商店终于上架了这件粉丝喜欢的商品。**
|
||||
|
||||
现在有两种T恤,一种是‘dusk blue’(男士版本)或者‘hot pink’(女士版本),但是审美与设计的形式是相同的。每种T恤印有由Canonical定制设计的折纸型的‘乌托邦的独角兽’。每件衬衫的背面是Ubuntu的标识以及含有“Utopic Unicorn 14.10”文字,从前到后帮你推广系统-我喜欢!
|
||||
|
||||

|
||||
|
||||
男士的尺寸有从S到XXL, 女士的尺寸有8-10与14-16,每件T恤在英国的价格是£11,美国的价格是$17.45,欧洲的价格是$17.45。这个价格较往年高一点,与以往一样这是减去了运费和包装的费用。
|
||||
|
||||
- [购买男士的 Ubuntu 14.10 T恤][1]
|
||||
|
||||
- [购买女士的 Ubuntu 14.10 T恤][2]
|
||||
|
||||
吉祥物 T 恤已经成为自Ubuntu 8.04 Hardy Heron后每个Ubuntu版本发布的传统,虽然它一般在系统发布前发布。
|
||||
|
||||
如果你不是特定版本的粉丝,你会发现可以购买的老版本吉祥物商品的数量有限且降价出售。如果你想在你的衬衫上印一条蝾螈,推广穿山甲或者塔尔羊,可以在[出售页面][3]看看。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/12/last-ubuntu-14-10-unicorn-t-shirts-now-available
|
||||
|
||||
作者:[Joey-Elijah Sneddon][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/117485690627814051450/?rel=author
|
||||
[1]:http://shop.canonical.com/product_info.php?products_id=1153
|
||||
[2]:http://shop.canonical.com/product_info.php?products_id=1159
|
||||
[3]:http://shop.canonical.com/index.php?cPath=29
|
@ -0,0 +1,44 @@
|
||||
Linux有问必答——如何在Linux命令行中剪裁图像
|
||||
================================================================================
|
||||
> **问题**:我想要去除图像文件中的白色空白,有没有什么便捷的方法能在Linux命令行中对图像文件进行剪裁?
|
||||
|
||||
当涉及到在Linux中转换或编辑图像文件时,ImageMagick毫无疑问是最为熟知的一体化软件之一。它包含了一整套命令行工具,用以显示、转换,或复制超过200中类型的光栅或矢量图像文件,所有这一切都在命令行下完成。ImageMagick可以用于多样化的图像编辑工作,如转换文件格式,添加特殊效果,添加文本,以及改变图像(调整大小、旋转、翻转、剪裁)。
|
||||
|
||||
如果你想要剪裁映像以去除空白,你可以使用ImageMagick自带的两个命令行工具。如果你还没有安装ImageMagick,请参照[本指南][1]来安装。
|
||||
|
||||
在本教程中,让我们来剪裁以下PNG图像。我们想要去除图像右边和底部的边缘,以便让图标居中。
|
||||
|
||||

|
||||
|
||||
首先,鉴定图像文件的尺寸(宽度和高度)。你可以使用identity命令来完成。
|
||||
|
||||
$ identify chart.png
|
||||
|
||||
----------
|
||||
|
||||
chart.png PNG 1500x1000 1500x1000+0+0 8-bit DirectClass 31.7KB 0.000u 0:00.000
|
||||
|
||||
就像上面显示的那样,输入的图像是1500x1000px。
|
||||
|
||||
接下来,确定图像剪裁要做的两件事:(1)剪裁图像开始的位置(2)剪裁矩形区域的大小。
|
||||
|
||||
在本实例中,让我们假定图像剪裁从左上角开始,更精确点是在x=20px和y=10px,那样的话,剪裁后的图像尺寸为1200x700px。
|
||||
|
||||
用于剪裁图像的工具是convert。使用“-crop”选项后,convert命令会在输入图像中剪裁出一个矩形区域。
|
||||
|
||||
$ convert chart.png -crop 1200x700+20+10 chart-cropped.png
|
||||
|
||||
指定输入图像为chart.png,convert命令会将剪裁后的图像存储为chart-cropped.png。
|
||||
|
||||

|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/crop-image-command-line-linux.html
|
||||
|
||||
译者:[GOLinux](https://github.com/GOLinux)
|
||||
校对:[Caroline](https://github.com/carolinewuyan)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://ask.xmodulo.com/install-imagemagick-linux.html
|
32
published/20141208 Nathive--A libre software image editor.md
Normal file
32
published/20141208 Nathive--A libre software image editor.md
Normal file
@ -0,0 +1,32 @@
|
||||
Nathive——libre软件图像编辑器
|
||||
================================================================================
|
||||
Nathive是一个libre软件图像编辑器,类似于 Adobe Photoshop、Corel Photo-Paint 或 GIMP,但是侧重于适用性和逻辑性,并为每个用户提供平滑的学习曲线。该项目在 GNOME 桌面环境中运行,并欢迎每个人参与到合作中,分享代码、翻译或想法等方面。
|
||||
|
||||
该项目尚处于测试阶段,所以它还是个未完成的工作,还不适用于终端用户。直到现在,开发始终专注于积淀应用的核心功能和创建便捷的开发工具。所以,目前我们将致力于创建新的插件,因为很明显在这方面还很缺乏。
|
||||
|
||||
其目的是在不放弃最初的可用性的情况下,逐步将该软件打造成一个专业的图像编辑器。Nathive由基于GTK+的Python脚本写成的,它设计为简洁、轻量,而且易于安装和使用。
|
||||
|
||||
### 在 ubuntu 上安装Nathive ###
|
||||
|
||||
你需要从[这里][1]下载.deb包,然后双击来安装。
|
||||
|
||||
### 屏幕截图 ###
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.ubuntugeek.com/nathive-a-libre-software-image-editor.html
|
||||
|
||||
作者:[ruchi][a]
|
||||
译者:[GOLinux](https://github.com/GOLinux)
|
||||
校对:[Caroline](https://github.com/carolinewuyan)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.ubuntugeek.com/author/ubuntufix
|
||||
[1]:http://www.nathive.org/download
|
@ -1,32 +1,32 @@
|
||||
安卓编年史
|
||||
安卓编年史(4)
|
||||
================================================================================
|
||||

|
||||
安卓0.9显示着横屏的主屏幕——后续一些版本无法实现的一个特性。
|
||||
Ron Amadeo供图
|
||||
|
||||
尽管从功能上很难将模拟器和操作系统区分开,但安卓0.9是第一个支持横屏显示的版本。更让人惊讶的是,几乎所有东西都支持横屏模式,在某些方面安卓0.9甚至做的比KitKat更好。在Kiakat中,主屏幕和拨号被锁定为竖向并且无法旋转。但在安卓0.9这里,对任何一个应用横向显示都不是问题。(有谁知道怎么把Nexus 5从Kitkat升级到安卓0.9吗?)
|
||||
*安卓0.9显示着横屏的主屏幕——后续一些版本无法实现的一个特性* [Ron Amadeo供图]
|
||||
|
||||
尽管从功能上很难将模拟器和操作系统区分开,但安卓0.9是第一个支持横屏显示的版本。更让人惊讶的是,几乎所有东西都支持横屏模式,在某些方面安卓0.9甚至做的比KitKat更好。在Kiakat中,主屏幕和拨号被锁定为竖向并且无法旋转。但在安卓0.9这里,对任何一个应用横向显示都不是问题。(有谁知道怎么把Nexus 5从Kitkat升(降)级到安卓0.9吗?)
|
||||
|
||||
截图同样显示了安卓0.9中的新的音量显示设计。它抛弃了在Milestone 3中初次登场的旧铃铛式控制界面。那是一个巨大的,充满屏幕的界面。实际上,安卓4.0的重新设计中让它变得更小了,但它仍然是个问题。(你想增加音量却因此没法看到视频了这种情况特别烦人。)
|
||||
|
||||

|
||||
新通知面板,抛弃了应用快捷方式并添加了顶部部分。
|
||||
Ron Amadeo供图
|
||||
|
||||
*新通知面板,抛弃了应用快捷方式并添加了顶部部分* [Ron Amadeo供图]
|
||||
|
||||
几乎每个安卓版本中的通知面板都有一定的调整,安卓0.9也不例外。电池电量图标进行了重绘,变成了黑底绿色图标,其它的状态栏图标变为黑色,白色以及灰色。状态栏左侧部分明智地选择在通知面板打开的时候显示日期。
|
||||
|
||||
通知面板加入了一个新的顶部部分,它能够显示运营商名称(在模拟器里显示“安卓”),以及一个巨大的写着“清除通知”的按钮,它能够让你不用打开应用而彻底清除通知。应用程序图标被取消了,替换为通知到达的时间,“最新事件”文字被更换为简单的“通知”。面板的空白部分现在是灰色的而不是之前的白色,底部的滑动条也进行了重新设计。上面两张图片的底部看起来并没有对齐,但这是因为Milestone 5的通知面板在面板底部有一圈空白。安卓0.9的通知面板是完全直达底部边缘的。
|
||||
|
||||

|
||||
安卓0.9和0.5的浏览器,展现出新的无色彩菜单。
|
||||
Ron Amadeo供图
|
||||
|
||||
*安卓0.9和0.5的浏览器,展现出新的无色彩菜单* [Ron Amadeo供图]
|
||||
|
||||
浏览器主页现在是加载一个真正的网站,而不是像Milestone 5中那样的本地存储的假Google页面。Webkit的版本升至525.10,但是看起来它似乎没法正确渲染更现代的Google.com搜索按钮。纵观安卓0.9,Milestone 5中的菜单设计已经被抛弃,取而代之的是重新设计的灰色图标。这些截图的区别十分的明显,因为所有的颜色都被去除了。
|
||||
|
||||
“更趋向于”列表式的菜单变得更高了一点,并且只是一个没有图标的列表而已。安卓0.9已经获得了其它搜索方式,这次是在浏览器菜单里。和主屏幕小部件,主屏幕菜单按钮,以及浏览器主页,它们共同组成了四个搜索框。谷歌从未隐藏它的主要业务是什么,就连在它的操作系统中也是这样。
|
||||
|
||||

|
||||
从左到右:安卓0.9的浏览器缩放控件,页面内搜索界面,浏览器窗口,以及设置。
|
||||
Ron Amadeo供图
|
||||
|
||||
*从左到右:安卓0.9的浏览器缩放控件,页面内搜索界面,浏览器窗口,以及设置* [Ron Amadeo供图]
|
||||
|
||||
安卓0.9带来了许多浏览器改进。谢天谢地缩放控件又能正常使用了,而且从疯狂的垂直控制变成了简单的加减按钮。谷歌做了个符合常识的决定,将缩放控制从屏幕中间移到了屏幕底部。在这些缩放控件中,安卓在一致性方面的努力显而易见。这些看起来是系统中唯一的圆形按钮。
|
||||
|
||||
@ -35,20 +35,20 @@ Ron Amadeo供图
|
||||
这个版本的系统没有设置界面,但是浏览器最终还是有了自己的设置界面。它会有个桌面式选项的弹窗,Javascript,隐私和cookie,保存的密码以及表单数据。甚至还有Google Gears整合(还记得Google Gears吗?)。
|
||||
|
||||

|
||||
拨号盘以及打开菜单的正在通话界面。
|
||||
Ron Amadeo供图
|
||||
|
||||
*拨号盘以及打开菜单的正在通话界面* [Ron Amadeo供图]
|
||||
|
||||
拨号和联系人在安卓0.9中实际上是同一个应用——两个图标只是打开不同的标签而已。将联系人像这样附到拨号盘表明了智能手机联系人的第一目的还是通话,不是短信,电子邮件,即时通讯或查找地址。最终谷歌还是会完全接受非传统的智能手机沟通,将联系人和拨号分为两个独立的应用程序。
|
||||
|
||||
Milestone 5中大多数拨号盘的缺陷在安卓0.9中得到了修复。“最小化”标签被一组正常的亮/暗标签替代。对话气泡式的退格键被替换为正常的退格图标并集成到了拨号数字显示界面。数字键变成了圆形,尽管这个系统的其它东西是圆角矩形的(至少这次文本是垂直对齐的)。谷歌还修复了Milestone 5中“一”键,“星”键和“井”键不平衡的问题。
|
||||
Milestone 5中大多数拨号盘的缺陷在安卓0.9中得到了修复。“最小化”标签被一组正常的亮/暗标签替代。对话气泡式的退格键被替换为正常的退格图标并集成到了拨号数字显示界面。数字键变成了圆形,尽管这个系统的其它东西是圆角矩形的(至少这次文本是垂直对齐的)。谷歌还修复了Milestone 5中“-”键,“*”键和“#”键不平衡的问题。
|
||||
|
||||
在安卓0.9中点击显示的号码会开始一个通话。这是十分重要的,因为这是摆脱安卓设备硬件实体“拨号”和“结束”键的一大步。另一方面,来电界面却走的是完全相反的道路,去除了在安卓0.5中显示于屏幕之上的“接听”和“拒绝”按键。谷歌会花上接下来几个版本的时间去摸索在特定的显示之下是否需要硬件实体拨号键。但是直到安卓2.0和摩托罗拉Droid面世,实体拨号按钮才最终变成了可选选项。
|
||||
|
||||
来电界面的所有选项隐藏在目录按钮之后。Milestone 5不支持距离传感器,所以它采取了简单粗暴的路线,在通话过程中禁用触摸屏。安卓0.9为G1开发,它有个距离传感器。最终谷歌没有在通话的时候禁用触摸传感器。
|
||||
|
||||

|
||||
安卓0.9和0.5中独立的联系人界面和联系人编缉界面。
|
||||
Ron Amadeo供图
|
||||
|
||||
*安卓0.9和0.5中独立的联系人界面和联系人编缉界面* [Ron Amadeo供图]
|
||||
|
||||
Milestone 5的一些联系人信息有令人困惑的标签,像电子邮件只被打上“主要的”标签而不是“主电子邮箱”标签。安卓0.9用各部分的水平标题纠正了这个错误。而且现在左侧的每个联系人类型都有了手形图标(Action icons)。
|
||||
|
||||
@ -66,7 +66,7 @@ Milestone 5的一些联系人信息有令人困惑的标签,像电子邮件只
|
||||
|
||||
via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/4/
|
||||
|
||||
译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[alim0x](https://github.com/alim0x) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,64 @@
|
||||
After an 18 Month Gap, Opera for Linux Returns With New Stable Release
|
||||
================================================================================
|
||||
**The first stable release of Opera for Linux in more than 18 months is now available for download.**
|
||||
|
||||

|
||||
|
||||
Hello again, Opera!
|
||||
|
||||
Opera for Computers for Linux 26 (no really, that’s its name) features a complete top-to-bottom overhaul, new features, and better performance thanks to its Aura and Blink underpinnings (yes, it’s no longer based on the proprietary Presto web engine).
|
||||
|
||||
#### Features ####
|
||||
|
||||
The browser [wiggled its toes in tux-friendly waters back in June with the launch of a developer preview][1], but if you last tried Opera when it looked like this, you’ll want to grab some smelling salts: things have changed.
|
||||
|
||||
注:youtube 视频,发布时可换成链接地址
|
||||
<iframe width="750" height="422" src="https://www.youtube.com/embed/-kS10C2BUOs?feature=oembed" frameborder="0" allowfullscreen></iframe>
|
||||
|
||||
Alongside an impressive new look and blazing fast, standards-compliant rendering engine come many new and improved features.
|
||||
|
||||
- **Discover** — Shows articles from around the web in a range of categories
|
||||
- **Speed Dial** — Supports interactive widgets, folders, and themes
|
||||
- **Tab Peek** — Preview the content of an open tab without switching back to it
|
||||
- **Opera Turbo** — Data-saving mode ideal for patchy connections
|
||||
- **Rich bookmarking** — including new sharing functionality
|
||||
- **Add-ons** — compatible with Chrome extensions, too
|
||||
- **Support for HiDPI displays on Linux**
|
||||
|
||||
### Download Opera for Linux 26 ###
|
||||
|
||||
Opera say those running Opera 12.6 on a 64-bit version of Ubuntu still supported by Canonical will automatically receive this new update through the Ubuntu Software Center.
|
||||
|
||||
But in all honesty I’m not sure anyone is in that boat! So, helpfully, a Debian installer can be downloaded from the Opera website. This will also add the Opera repository to your Software Sources to enable you to receive future updates in a timely fashion.
|
||||
|
||||
- [Download Opera for Computers for Linux 26][2]
|
||||
|
||||
Feel free to kit your new browser out with our nifty Opera Add-On, too:
|
||||
|
||||
- [Install OMG! Ubuntu! Opera Extension][3]
|
||||
|
||||
#### Important Notice about Linux Support ####
|
||||
|
||||
**Opera for Linux is 64-bit only**. The company say this decision was made based on ‘what most Linux desktop users have installed’. While annoying it is part of a larger overall trend away from 32-bit software, with Opera for Mac also being 64-bit exclusive, too.
|
||||
|
||||
In another case of “spending limited resources wisely”, this release is only being officially supported on Ubuntu (and ‘buntu-based derivatives, including Linux Mint).
|
||||
|
||||
Users on other distributions, from Arch to openSUSE, can still install Opera for Linux but will need to [use a (fairly simple) workaround][4] or hunt down an unofficial repository.
|
||||
|
||||
**If you give it a spin let us know what you make of it in the comments below.**
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/12/new-opera-for-linux-goes-stable-download-now
|
||||
|
||||
作者:[Joey-Elijah Sneddon][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/117485690627814051450/?rel=author
|
||||
[1]:http://www.omgubuntu.co.uk/2014/06/opera-linux-chromium-download-released
|
||||
[2]:http://opera.com/computer/linux
|
||||
[3]:https://addons.opera.com/en/extensions/details/omg-ubuntu-for-opera/?display=en
|
||||
[4]:https://gist.github.com/ruario/99522c94838d0680633c#file-manual-install-of-opera-md
|
@ -0,0 +1,61 @@
|
||||
Firefox 34 Arrives with Plugin-Free Video Calling and Powerful WebIDE
|
||||
================================================================================
|
||||

|
||||
|
||||
**It’s been a busy few months for Mozilla, what with agreeing to a deal to switch its default search provider to Yahoo!, launching a custom version of its browser packed full of developer goodies, and launching Firefox OS handsets in new territories.**
|
||||
|
||||
Today, Mozilla has released Firefox 34 for Windows, Mac and Linux desktops, the first stable release since last month’s security n’ bug fix update.
|
||||
|
||||
### Headline Feature ###
|
||||
|
||||
Despite the rapid release cycle Mozilla once again manages to deliver some great new features.
|
||||
|
||||
Making its first appearance in a stable release is **Firefox Hello**, Mozilla’s WebRTC feature.
|
||||
|
||||
Though not enabled for all (you can manually turn it on via about:config), the feature bring plugin-free video and voice calls to the browser. No Skype, no add-ons, no hassle. You simple click the Firefox Hello icon, send your share link to the recipient to initiate a connection (assuming they’re also using a WebRTC-enabled browser, like Google Chrome or Opera).
|
||||
|
||||

|
||||
|
||||
The ‘Hello Firefox’ Popup
|
||||
|
||||
Signing in with a Firefox account will give you more features, including a contacts book with one-click calling (no need to share links).
|
||||
|
||||
#### Other Changes ####
|
||||
|
||||
Version 34 also makes it easier to **switch themes** (formerly known as ‘personas’), with live previews and a switcher menu now available on the **Customising canvas**:
|
||||
|
||||

|
||||
|
||||
Ad-hoc theme switching
|
||||
|
||||
The first major search engine change arrives in this release, with Yandex shipping as default for Belarusian, Kazakh, and Russian locales. Yahoo! will be enabled for US users in the near future. But remember: [this does not affect the version of Firefox provided in Ubuntu][1].
|
||||
|
||||
US users get secure **HTTPS** Wikipedia searching from the search box:
|
||||
|
||||

|
||||
|
||||
Secure Wikipedia Searches for English US Users
|
||||
|
||||
In addition to improved HTML5 support (largely around WebCrypto features) a [**new WebIDE tool**][2] ships in this release, and is packed full of great tools for developers.
|
||||
|
||||
From Android connectivity and an in-app editor to support for deploying and testing apps in a Firefox OS simulator. If you haven’t tried Firefox OS in a while, v2.2 (unstable) has plenty to play with including edge swiping, new home screen arranging features, and some new APIs.
|
||||
|
||||

|
||||
|
||||
### Download Firefox 34 ###
|
||||
|
||||
Canonical will roll out Firefox 34 to users of Ubuntu 12.04, 14.04 and 14.10 in the next 24 hours or so, so keep an eye out. If you’re super impatient the release can also be downloaded from Mozilla servers directly.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/12/firefox-34-changes-include-hello-html5-webide
|
||||
|
||||
作者:[Joey-Elijah Sneddon ][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/117485690627814051450/?rel=author
|
||||
[1]:http://www.omgubuntu.co.uk/2014/11/firefox-set-yahoo-default-search-engine-ubuntu-not-affected
|
||||
[2]:https://developer.mozilla.org/en-US/docs/Tools/WebIDE
|
@ -0,0 +1,78 @@
|
||||
From Mint to Trisquel: The Top Linux Distro Releases in November 2014
|
||||
================================================================================
|
||||
**November wasn’t heavy on new Linux distribution releases, but still had more than enough to keep distro-hoppers bouncing from download server to ISO mirror and back again.**
|
||||
|
||||
From the free software ethic of **Trisquel** to the nostalgic glow of **Ubuntu MATE**, let’s take a look at the major Linux distribution releases made in November 2014.
|
||||
|
||||

|
||||
|
||||
### Linux Mint 17.1 ###
|
||||
|
||||
Linux Mint 17.1 ‘Rebecca’ is the big hitter on this list, going stable just in time to make it.
|
||||
|
||||
Based on Ubuntu 14.04 and using Linux kernel 3.13, the update also comes loaded with the **latest [Cinnamon 2.4][1] desktop environment, a customisable version of the Nemo file manager**, and improvements to the Update Manager to make package upgrades safer, saner and swifter.
|
||||
|
||||
Other changes see the ‘**Background**’, ‘**Login**’ and ‘**Theme**’ settings panes redesigned, and **‘Privacy’ and ‘Notification’ sections** added. The default **system font has been switched to Noto Sans**, while fans of customisation will enjoy new colors added to the Mint-X theme package.
|
||||
|
||||
Linux Mint 17.1 delivers a set of solid, well thought out changes and performance improvements, important for an LTS release supported until 2019.
|
||||
|
||||
More information and those all important downloads can be found on the official project website.
|
||||
|
||||
- [Visit the Linux Mint Website][2]
|
||||
|
||||
### Ubuntu Mate 14.04 LTS ###
|
||||
|
||||

|
||||
|
||||
It may have [arrived after the release of Ubuntu MATE 14.10][3] (**timey-wimey**), but as the first Long Term Support release of the flavor Ubuntu MATE 14.04 was welcomed with warm arms, especially by those who love to bask in the green-hued glow of GNOME 2 nostalgia.
|
||||
|
||||
Packed with security updates, MATE 1.8.1, and new software included out of the box, Ubuntu MATE 14.04 LTS is a notable update with plenty to tempt those on the newer (but older) 14.10 release.
|
||||
|
||||
For full hardware requirements, support information and download links, head on over to the official project website.
|
||||
|
||||
- [Download Ubuntu MATE 14.04 LTS][4]
|
||||
|
||||
### Trisquel 7.0 ###
|
||||
|
||||

|
||||
|
||||
The [latest stable release of Trisquel][5], an Ubuntu-based distribution endorsed by the Free Software Foundation (FSF), arrived in the middle of November — and was met by **a lot** of interest.
|
||||
|
||||
The free (as in freedom) distribution is built on Ubuntu 14.04 LTS but ships without any of the proprietary bits and pieces. It’s a “pure” Linux experience that may require some workarounds, but serves to flag up the areas where more attention is needed in FOSS hardware support and app alternatives.
|
||||
|
||||
The Libre Linux 3.13 Kernel, GNOME 3.12 ‘Flashback’ desktop and the Firefox-based Abrowser 33 are among the changes to be found in Trisquel 7.
|
||||
|
||||
- [Download Trisquel 7][6]
|
||||
|
||||
### Other Notable Releases ###
|
||||
|
||||

|
||||
|
||||
Outside of the Ubuntu-based bubble November 2014 saw releases of other popular Linux distributions, including beta milestones of Mageia 5 and Fedora 21, and a new stable release of Scientific Linux 6.6.
|
||||
|
||||
Joining them is openSUSE 13.2 (stable) — the first release to follow a change in the way openSUSE development takes place, the first to adopt the new openSUSE design guidelines and the first to ship with a streamlined (if still unwieldy) installer.
|
||||
|
||||
The release has been getting great reviews from the geek press, who gave particular praise for the GNOME 3.14 implementation.
|
||||
|
||||
Coming from Ubuntu, where “everything just works”, the cultural and technical gulf can be daunting at first. But if you have some free time, like the color green and relish a challenge, the official openSUSE 13.2 [release announcement][7] should be your starting point.
|
||||
|
||||
**Have you tried any of these releases above? Let us know what you made of them in the space down below .**
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/11/linux-distro-releases-round-november-2014
|
||||
|
||||
作者:[Joey-Elijah Sneddon][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/117485690627814051450/?rel=author
|
||||
[1]:http://www.omgubuntu.co.uk/2014/11/install-cinnamon-2-4-ubuntu-14-04-lts
|
||||
[2]:http://www.linuxmint.com/download.php
|
||||
[3]:http://www.omgubuntu.co.uk/2014/11/ubuntu-mate-14-04-download-released
|
||||
[4]:https://ubuntu-mate.org/longterm/
|
||||
[5]:http://www.omgubuntu.co.uk/2014/11/download-trisquel-7-0-kernel-3-13
|
||||
[6]:https://trisquel.info/en/download
|
||||
[7]:https://news.opensuse.org/2014/11/04/opensuse-13-2-green-light-to-freedom/
|
@ -0,0 +1,540 @@
|
||||
translating by yupmoon
|
||||
|
||||
|
||||
Readers' Choice Awards 2014--Linux Journal
|
||||
================================================================================
|
||||
It's time for another Readers' Choice issue of Linux Journal! The format last year was well received, so we've followed suit making your voices heard loud again. I couldn't help but add some commentary in a few places, but for the most part, we just reported results. Please enjoy this year's Readers' Choice Awards!
|
||||
|
||||
We'd like to make Readers' Choice Awards even better next year. Please send ideas for new categories and any comments or feedback via [http://www.linuxjournal.com/contact][1].
|
||||
|
||||
Please see the December 2014 issue of Linux Journal for the complete list of winners.
|
||||
|
||||
### Best Linux Distribution ###
|
||||
|
||||

|
||||
|
||||
Although this year the Debian/Ubuntu-based distros took the lion's share of the votes, the "Best Linux Distribution" category is a bit like "Best Kind of Pizza"—even the bottom of the list is still pizza. It's hard to go wrong with Linux, and the wide variety of votes only proves how many different choices exist in our wonderful Open Source world.
|
||||
|
||||
- Ubuntu 16.5%
|
||||
- Debian 16.4%
|
||||
- Linux Mint 11%
|
||||
- Arch Linux 8.5%
|
||||
- Fedora 8.3%
|
||||
- CentOS 6%
|
||||
- openSUSE 5.3%
|
||||
- Kubuntu 4.1%
|
||||
- Gentoo 2.9%
|
||||
- Slackware 2.7%
|
||||
- Xubuntu 2.5%
|
||||
- Other 2.3%
|
||||
- Red Hat Enterprise Linux 1.6%
|
||||
- NixOS 1.4%
|
||||
- elementary OS 1.3%
|
||||
- Lubuntu 1.2%
|
||||
- CrunchBang 1%
|
||||
- Mageia .7%
|
||||
- LXLE .4%
|
||||
- Tails .4%
|
||||
- Android-x86 .3%
|
||||
- Bodhi Linux .3%
|
||||
- Chakra .3%
|
||||
- Kali Linux .3%
|
||||
- PCLinuxOS .3%
|
||||
- SolydK .3%
|
||||
- Mandriva .1%
|
||||
- Oracle Linux .1%
|
||||
|
||||
### Best Mobile Linux OS ###
|
||||
|
||||

|
||||
|
||||
Android is such a dominant force in the mobile world, we decided to allow Android variants to be counted separately. So although the underlying system on some of these are indeed Android, it seems far more informative this way.
|
||||
|
||||
- Stock Android 37.1%
|
||||
- Sailfish OS 27.6%
|
||||
- CyanogenMod 20.2%
|
||||
- Other 3%
|
||||
- Ubuntu Phone 3%
|
||||
- Amazon Fire OS 1.5%
|
||||
- Ubuntu for Android 1.4%
|
||||
- Replicant .8%
|
||||
- Tizen .8%
|
||||
|
||||
### Best Linux Smartphone Manufacturer ###
|
||||
|
||||

|
||||
|
||||
- Samsung 29%
|
||||
- Jolla 26.7%
|
||||
- Nexus 16.5%
|
||||
- Other 7.1%*
|
||||
- HTC 7%
|
||||
- LG 5.3%
|
||||
- Sony 3.7%
|
||||
- Nokia 1.8%
|
||||
- Huawei 1.4%
|
||||
- GeeksPhone 1%
|
||||
- Amazon .6%
|
||||
|
||||
*Under "Other", Motorola got many write-ins, followed by OnePlus.
|
||||
|
||||
### Best Linux Tablet ###
|
||||
|
||||

|
||||
|
||||
- Google Nexus 7 35.3%
|
||||
- Google Nexus 10 14.8%
|
||||
- Samsung Galaxy Tab 14%
|
||||
- Samsung Galaxy Note 9.8%
|
||||
- ASUS Transformer Pad 8.4%
|
||||
- Other 6.4%
|
||||
- Kindle Fire HD 4.7%
|
||||
- ASUS MeMO Pad 2%
|
||||
- Dell Venue 1.6%
|
||||
- Acer Iconia One 1.4%
|
||||
- Samsung Galaxy Note Edge .9%
|
||||
- Ekoore Python S3 .7%
|
||||
|
||||
### Best Other Linux-Based Gadget (not including smartphones or tablets) ###
|
||||
|
||||

|
||||
|
||||
We are a Raspberry Pi-loving bunch, that's for sure! But really, who can blame us? With the new B+ model, the already awesome RPi is getting sleeker and more useful. I'm no fortune teller, but I suspect I know next year's winner already.
|
||||
|
||||
- Raspberry Pi 71.4%
|
||||
- BeagleBone Black 8.1%
|
||||
- Other 4.3%*
|
||||
- Lego Mindstorms Ev3 3.7%
|
||||
- Moto 360 3.4%
|
||||
- Cubieboard 1.7%
|
||||
- Parrot A.R Drone 1.7%
|
||||
- Samsung Gear S 1.4%
|
||||
- Yamaha Motif XF8 1.1%
|
||||
- Nvidia Jetson-K1 Development System .8%
|
||||
- Cloudsto EVO Ubuntu Linux Mini PC .5%
|
||||
- VoCore Open Hardware Computer .5%
|
||||
- LG G Watch .4%
|
||||
- RaZberry .4%
|
||||
- VolksPC .4%
|
||||
- IFC6410 Pico-ITX Board .2%
|
||||
- JetBox 5300 .1%
|
||||
|
||||
*Under "Other", the most popular write-ins were Odroid and CuBox.
|
||||
|
||||
### Best Laptop Vendor ###
|
||||
|
||||

|
||||
|
||||
This category used to be a rating of which vendors worked the best with Linux, but thankfully, now most laptops work fairly well. So, we truly get to see the cream rise to the top and focus on things other than "it works with Linux". It's awesome living in the future.
|
||||
|
||||
- Lenovo 32%
|
||||
- ASUS 19.3%
|
||||
- Dell 18.5%
|
||||
- System76 10.6%
|
||||
- Other 7.9%*
|
||||
- Acer 4.5%
|
||||
- ThinkPenguin 1.9%
|
||||
- LinuxCertified 1.8%
|
||||
- ZaReason 1.6%
|
||||
- EmperorLinux 1.5%
|
||||
- CyberPower .3%
|
||||
- Eurocom .1%
|
||||
|
||||
*Under "Other", the most popular write-ins were (in this order) Apple running Linux, HP, Toshiba and Samsung.
|
||||
|
||||
### Best Content Management System ###
|
||||
|
||||

|
||||
|
||||
- WordPress 34.7%
|
||||
- Drupal 25.3%
|
||||
- Joomla! 11.1%
|
||||
- MediaWiki 10.5%
|
||||
- Other 10%*
|
||||
- Alfresco 4.3%
|
||||
- WebGUI 1.3%
|
||||
- ikiwiki 1.1%
|
||||
- eZ publish .7%
|
||||
- Wolf CMS .4%
|
||||
- Elgg .3%
|
||||
- Blosxom .2%
|
||||
|
||||
*Under "Other", the most popular write-ins were (in this order) DokuWiki, Plone, Django and Typo3.
|
||||
|
||||
### Best Linux-Friendly Web Hosting Company ###
|
||||
|
||||

|
||||
|
||||
When it comes to Web hosting, it's hard to find a company that isn't Linux-friendly these days. In fact, finding a hosting provider running Windows is more of a challenge. As is obvious by our winner ("Other"), the options are amazing. Perhaps a "Worst Web Hosting" category would be more useful!
|
||||
|
||||
- Other 22.8%*
|
||||
- Amazon 22.5%
|
||||
- Rackspace 13.1%
|
||||
- Linode 10.4%
|
||||
- GoDaddy.com 6.5%
|
||||
- OVH 5.6%
|
||||
- DreamHost 5.4%
|
||||
- 1&1 4.8%
|
||||
- LAMP Host 2.9%
|
||||
- Hurricane Electric 2.6%
|
||||
- Liquid Web .6%
|
||||
- RimuHosting .6%
|
||||
- Host Media .5%
|
||||
- Savvis .5%
|
||||
- Blacknight Solutions .4%
|
||||
- Netfirms .4%
|
||||
- Prgmr .4%
|
||||
|
||||
*Under "Other", the most write-ins went to (in this order) Digital Ocean (by a landslide), followed by Hetzner, BlueHost and WebFaction.
|
||||
|
||||
### Best Web Browser ###
|
||||
|
||||

|
||||
|
||||
Firefox takes the gold this year by a significant margin. Even if you combine Chrome and Chromium, Firefox still takes the top spot. There was a time when we worried that the faithful Firefox would fade away, but thankfully, it's remained strong and continues to be a fast, viable, compatible browser.
|
||||
|
||||
- Firefox 53.8%
|
||||
- Chrome 26.9%
|
||||
- Chromium 8.1%
|
||||
- Iceweasel 4%
|
||||
- Opera 3%
|
||||
- Other 2%
|
||||
- SeaMonkey .8%
|
||||
- rekonq .5%
|
||||
- dwb .4%
|
||||
- QupZill .4%
|
||||
- Dillo .2%
|
||||
|
||||
### Best E-mail Client ###
|
||||
|
||||

|
||||
|
||||
If I didn't know firsthand how many hard-core geeks live among us, I might accuse Kyle Rankin of voting fraud. His beloved Mutt e-mail client doesn't take top spot, but for a program without any graphical interface, third place is impressive!
|
||||
|
||||
- Mozilla Thunderbird 44.4%
|
||||
- Gmail 24.7%
|
||||
- Mutt 6.8%
|
||||
- Evolution 5.5%
|
||||
- KMail 5.3%
|
||||
- Other 3.2%
|
||||
- Claws Mail 2.2%
|
||||
- Zimbra 2%
|
||||
- Alpine 1.8%
|
||||
- Geary 1.7%
|
||||
- SeaMonkey 1%
|
||||
- Opera Mail .9%
|
||||
- Sylpheed .4%
|
||||
|
||||
### Best Audio Editing Tool ###
|
||||
|
||||

|
||||
|
||||
- Audacity 69.1%
|
||||
- FFmpeg 10.8%
|
||||
- VLC 9.7%
|
||||
- Ardour 4.9%
|
||||
- Other 1.9%
|
||||
- SoX 1.3%
|
||||
- Mixxx 1.1%
|
||||
- LMMS .7%
|
||||
- Format Junkie .5%
|
||||
|
||||
### Best Audio Player ###
|
||||
|
||||

|
||||
|
||||
We figured VLC would take top spot in the video player category (see below), but it was a bit of a surprise to see how many folks prefer it as an audio player as well. Perhaps it's become the one-stop shop for media playback. Either way, we're thrilled to see VLC on the top.
|
||||
|
||||
- VLC 25.2%
|
||||
- Amarok 15.3%
|
||||
- Rhythmbox 10.4%
|
||||
- Clementine 8.6%
|
||||
- MPlayer 6.1%
|
||||
- Spotify 5.9%
|
||||
- Audacious 5.5%
|
||||
- Banshee 4.6%
|
||||
- Other 4%*
|
||||
- XBMC 3.1%
|
||||
- foobar2000 3%
|
||||
- Xmms 2.4%
|
||||
- DeaDBeeF 1.2%
|
||||
- MOC .9%
|
||||
- cmus .8%
|
||||
- Ncmpcpp .8%
|
||||
- Guayadeque .6%
|
||||
- Mixxx .4%
|
||||
- MPC-HC .4%
|
||||
- Subsonic .4%
|
||||
- Nightingale .3%
|
||||
- Decibel Audio Player .2%
|
||||
|
||||
*Under "Other", Quod Libet had the most write-ins.
|
||||
|
||||
### Best Video Player ###
|
||||
|
||||

|
||||
|
||||
- VLC 64.7%
|
||||
- MPlayer 14.5%
|
||||
- XBMC 6.4%
|
||||
- Totem 2.7%
|
||||
- Other 2.7%*
|
||||
- Plex 2%
|
||||
- Kaffeine 1.9%
|
||||
- mpv 1.6%
|
||||
- MythTV 1.6%
|
||||
- Amarok 1.4%
|
||||
- Xmms .3%
|
||||
- Daum Potplayer .2%
|
||||
- Clementine .1%
|
||||
|
||||
*Under "Other", most write-ins were for SMPlayer.
|
||||
|
||||
### Best Video Editor ###
|
||||
|
||||

|
||||
|
||||
This is another testament to the geek factor when it comes to our readers. We didn't specify "non-linear editor", so by a transcoding technicality, VLC eked out a win in the video editing category. Well played, VLC, well played.
|
||||
|
||||
- VLC 17.5%
|
||||
- Kdenlive 16.4%
|
||||
- Blender 15.1%
|
||||
- Avidemux 13.2%
|
||||
- OpenShot 13.2%
|
||||
- Cinelerra 7.5%
|
||||
- PiTiVi 4.9%
|
||||
- LightWorks 4.8%
|
||||
- Other 4.7%
|
||||
- LiVES 1.4%
|
||||
- Shotcut .6%
|
||||
- Jahshaka .4%
|
||||
- Flowblade .4%
|
||||
|
||||
### Best Cloud-Based File Storage ###
|
||||
|
||||

|
||||
|
||||
In a category that used to have few options, Dropbox still takes top spot, but the margin is closing. It's hard to argue against Dropbox's convenience and stability, but hosting your own data on ownCloud gives it quite a boost into the second-place spot.
|
||||
|
||||
- Dropbox 30.5%
|
||||
- ownCloud 23.6%
|
||||
- Google Drive 16%
|
||||
- rsync 8.3%
|
||||
- Other 7.5%*
|
||||
- Amazon S3 6.6%
|
||||
- SpiderOak 4.4%
|
||||
- Box 1.8%
|
||||
- Copy 1%
|
||||
- AjaXplorer .3%
|
||||
|
||||
*Under "Other", the most write-ins went to Younited and MEGA. Many also said things like "no cloud is the best choice/my files stay on my storage/local only".
|
||||
|
||||
### Best Linux Game ###
|
||||
|
||||

|
||||
|
||||
I rarely play games, so every year I look forward to this category to find the most popular options for those few times I do. I'm personally tickled to see NetHack so high on the list, especially considering the opposition. There's just something about wandering around random tunnels that appeals to the old-school DnD player in all of us.
|
||||
|
||||
- Civilization 5 26.5%
|
||||
- Other 23.5%*
|
||||
- Team Fortress 2 8.7%
|
||||
- NetHack 8.4%
|
||||
- X-Plane 10 7.1%
|
||||
- Dota 6.1%
|
||||
- Bastion 5.4%
|
||||
- Scorched 3D 3.7%
|
||||
- Destiny 3.6%
|
||||
- Ultima IV 1.9%
|
||||
- FreeCol 1.8%
|
||||
- Kpat 1.4%
|
||||
- FreeOrion 1.1%
|
||||
- Ryzom .9%
|
||||
|
||||
*Under "Other", the most write-ins were (in this order) Minecraft, 0 A.D., Frozen Bubble, Battle for Wesnoth, Portal and Counter Strike.
|
||||
|
||||
### Best Virtualization Solution ###
|
||||
|
||||
I think the relationship with Vagrant has helped Oracle's VirtualBox significantly in popularity. Yes, Vagrant works with other virtualization platforms, but since it so seamlessly integrates with VirtualBox, I think it gets quite a boost. Virtualization is such an efficient and reliable way to implement systems, bare-metal solutions are almost a thing of the past!
|
||||
|
||||

|
||||
|
||||
- Oracle VM VirtualBox 33.4%
|
||||
- VMware 22.3%
|
||||
- KVM 21.1%
|
||||
- XEN 5.7%
|
||||
- QEMU 5.3%
|
||||
- OpenStack 4.9%
|
||||
- Other 4.2%*
|
||||
- OpenVZ 1.7%
|
||||
- Linux-VServer 1.3%
|
||||
- Symantec Workspace Virtualization .1%
|
||||
|
||||
*Under "Other", the most write-ins went to Docker, ProxMox and LXC, in that order.
|
||||
|
||||
### Best Monitoring Application ###
|
||||
|
||||

|
||||
|
||||
- Nagios 27.1%
|
||||
- Wireshark 20.7%
|
||||
- htop 12.3%
|
||||
- Zabbix 10.5%
|
||||
- Other 8.6%*
|
||||
- Zenoss 6.2%
|
||||
- Munin 3.4%
|
||||
- PC Monitor 2.8%
|
||||
- New Relic 1.9%
|
||||
- Opsview 1.2%
|
||||
- SaltStack 1%
|
||||
- NTM (Network Traffic Monitor) .7%
|
||||
- xosview .7%
|
||||
- Manage Engine .5%
|
||||
- FlowViewer .3%
|
||||
- Circonus .2%
|
||||
- SysPeek .2%
|
||||
|
||||
*Under "Other", most write-ins went to Icinga and OpenNMS.
|
||||
|
||||
### Best DevOps Configuration Management Tool ###
|
||||
|
||||

|
||||
|
||||
It was interesting to see Git take top spot in this category, because although it certainly would work to use standard version control on configuration files, I always assumed it would be used alongside tools like Chef or Puppet. If nothing else, the DevOps movement has taught crusty old system administrators like myself to treat configuration files like code. Version control is incredible, and it seems as though most readers agree.
|
||||
|
||||
- Git 39.4%
|
||||
- Puppet 17.2%
|
||||
- Ansible 8.9%
|
||||
- cron jobs 8.8%
|
||||
- Subversion 7.6%
|
||||
- Chef 5%
|
||||
- SaltStack 5.4%
|
||||
- Other 4.6%*
|
||||
- CFEngine 3%
|
||||
|
||||
*Under "Other", most write-ins went to NixOps.
|
||||
|
||||
### Best Programming Language ###
|
||||
|
||||

|
||||
|
||||
- Python 30.2%
|
||||
- C++ 17.8%
|
||||
- C 16.7%
|
||||
- Perl 7.1%
|
||||
- Java 6.9%
|
||||
- Other 4.6%
|
||||
- Ruby 4.3%
|
||||
- Go 2.4%
|
||||
- JavaScript 2.4%
|
||||
- QML 2.2%
|
||||
- Fortran 1.4%
|
||||
- Haskell 1.4%
|
||||
- Lisp 1.2%
|
||||
- Erlang .6%
|
||||
- Rust .6%
|
||||
- D .4%
|
||||
- Hack .1%
|
||||
|
||||
*Under "Other", most write-ins went to Scala, PHP and Clojure (in that order).
|
||||
|
||||
### Best Scripting Language ###
|
||||
|
||||

|
||||
|
||||
Python is incredibly powerful, and it appears to be a favorite in both the scripting and programming categories. As someone who knows Bash and a little PHP, I think it's clear what I need to focus on as I delve into the world of development. Meaningful whitespace, here I come!
|
||||
|
||||
- Python 37.1%
|
||||
- Bash/Shell scripts 27%
|
||||
- Perl 11.8%
|
||||
- PHP 8.4%
|
||||
- JavaScript 6.7%
|
||||
- Ruby 4.9%
|
||||
- Other 2.1%
|
||||
- Lua 2%
|
||||
|
||||
### Best New Linux/Open-Source Product/Project ###
|
||||
|
||||

|
||||
|
||||
Docker is clearly our winner here, and rightly so—what a game-changing technology. It's nice to see Jolla/Sailfish get some love as well. We love Android, but having a choice is a vital part of who we are as Open Source advocates.
|
||||
|
||||
- Docker 28%
|
||||
- Jolla and Sailfish OS 19%
|
||||
- LibreOffice 7%
|
||||
- ownCloud 5%
|
||||
- Steam 5%
|
||||
- Zenoss Control Center 5%
|
||||
- Raspberry Pi 4%
|
||||
- Git 4%
|
||||
- Apache Cordova/OpenOffice/Spark/Tika 3%
|
||||
- Ansible 2%
|
||||
- Elementary OS 2%
|
||||
- OpenStack 2%
|
||||
- Zabbix 2%
|
||||
- CoreOS 2%
|
||||
- Firefox OS 2%
|
||||
- KDE Connect 1%
|
||||
- NixOS and NixOps 1%
|
||||
- Open Media Vault 1%
|
||||
|
||||
### Coolest Thing You've Ever Done with Linux ###
|
||||
|
||||

|
||||
|
||||
This is my favorite new category for the Readers' Choice Awards. Imagine attending a Linux conference and asking everyone the coolest thing they've done with Linux. That's basically what happened here! We've listed a handful of our favorites, but for the entire list, check out: [http://www.linuxjournal.com/rc2014/coolest][2].
|
||||
|
||||
Note: the most common answers were "use it"; "rescue data/photos/whatever off broken Windows machines"; "convert friends/family/businesses to Linux"; "learn"; "teach"; "get a job"; "home automation"; and "build a home media server". The following list is of our favorite more-specific and unique answers, not the most common ones.
|
||||
|
||||
- Building my procmail pre-spam spam filter back in the mid-late 1990s.
|
||||
- 450-node compute cluster.
|
||||
- 7.1 channel preamp with integrated mopidy music player.
|
||||
- A robot running Linux (for the Eurobot annual competition).
|
||||
- Accidentally printing on the wrong continent.
|
||||
- Adding an audio channel to a video while also syncing it.
|
||||
- Analyzed NASA satellite data with self-written code.
|
||||
- Annoyed the cat remotely.
|
||||
- Automated my entire lighting setup in my house to respond to voice and my mobile apps.
|
||||
- Automatic window plant irrigation system.
|
||||
- Bathroom radio.
|
||||
- Brewing beer.
|
||||
- Built an application that runs on the International Space Station.
|
||||
- Built a system for real-time toll collection for a major toll highway system.
|
||||
- Built our own smartphone.
|
||||
- Built Web-based home alarm system on Raspberry Pi.
|
||||
- Cluster of Raspberry Pis to crack encrypted office documents.
|
||||
- Controlled my Parrot drone.
|
||||
- Controlled the comms for 186 Wind turbines.
|
||||
- Controlling my Meade Telescope with Stellarium under Linux.
|
||||
- Converted my old VHS family videos, using a laptop more than ten years old.
|
||||
- Created a mesh network in the subarctic.
|
||||
- Created an ocean environmental sensor buoy with radio data transmitter.
|
||||
- Discovered new planets.
|
||||
- Fixed a jabber server in Denver, USA, while in a hotel lobby in Amman, Jordan.
|
||||
- Got Linus' autograph on a Red Hat 5.0 CD.
|
||||
- Hacked my coffee machine to send me a text message when the coffee is ready.
|
||||
- Introduced my daughter to Lego Mindstorm EV3.
|
||||
- Monitor the temp and humidity of my wine cellar and open the doors when too hot or humid.
|
||||
- Replaced the controller in my hot tub with a Raspberry Pi.
|
||||
- Scripted opening and closing of a co-worker's CD tray every 15 seconds for four days.
|
||||
- Used an LFS system to move ACH transfers for a national gas company.
|
||||
- Flushed my toilet from another city.
|
||||
- Remote chicken door.
|
||||
- Web-based sprinkler controller for 16 stations on a Raspberry PI (also control the pool and yard lights).
|
||||
- Chaining SSH tunnels together to get from work to home via three hops due to restrictive network settings.
|
||||
- Built a system that monitors a renewable energy installation with two fixed solar arrays, a two axis sun tracking solar array and a wind turbine. Production and weather data are displayed on a Web site in real time.
|
||||
- Back in the days of modems, I had my computer call up my girlfriend every morning, so she would wake up and go to work.
|
||||
- Used a Wii controller, through Bluetooth with my Linux computer as an Infrared Camera, to detect the movement of my daughter's Fisher Price Sit and Spin Pony, and to control a video game.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linuxjournal.com/rc2014
|
||||
|
||||
作者:[Shawn Powers][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.linuxjournal.com/users/shawn-powers
|
||||
[1]:http://www.linuxjournal.com/contact
|
||||
[2]:http://www.linuxjournal.com/rc2014/coolest
|
@ -0,0 +1,38 @@
|
||||
Linus Torvalds Thanks Microsoft for a Great Black Friday Monitor Deal
|
||||
================================================================================
|
||||

|
||||
|
||||
> The creator of the Linux kernel now has a UHD display
|
||||
|
||||
**Linus Torvalds is the creator of the Linux Kernel, he advocated for years against Microsoft's practices and he often talked about Windows. These are just some of the reasons why it's funny to see him thank Microsoft, even if it's probably done sarcastically.**
|
||||
|
||||
The rhetoric regarding the Linux vs. Windows subject has subsided a great deal in the last few years. There have been some issues with UEFI and other similar problems, but for the most part things have quieted down.
|
||||
|
||||
There is no one left at the Redmond campus to call Linux a cancer and no one is making fun of Windows for crashing all the time. In fact, there has been some sort of reconciliation between the two sides, which seems to benefit everyone.
|
||||
|
||||
It's not like Microsoft is ready to adopt the Linux kernel for their operating system, but the new management of the company talks about Linux as a friend, especially in the cloud.
|
||||
|
||||
They can no longer ignore it, even if they want to. The same happened with Linus Torvalds who hasn't said anything bad about Microsoft and Windows for a long time, and that is a good thing.
|
||||
|
||||
### Linus Torvalds saying "thanks" to Microsoft is not something you see every day ###
|
||||
|
||||
The creator of the Linux kernel talked about a great Black Friday deal he got from the Microsoft store, for a UHD monitor. He shared this piece of info on Google+ and some of the users also found it amusing to read that he's giving sincere thanks to Microsoft for their great deal.
|
||||
|
||||
"Whee. Just installed a new monitor. 3840x2160 resolution - it's the Dell 28" UHD panel - for $299 (€241) thanks to Microsoft's black Friday deal. Thanks MS! Ok, I have to admit that it's not actually a great panel: very clear color shifts off-center, 30Hz refresh etc. But still - I'm a nut for resolution, and at $299 (€241) I decided that this will carry me over until better panels start showing up at good prices," wrote Linus on [Google+][1].
|
||||
|
||||
In the meantime, he is also working on the latest kernel branch, 3.18, which will probably be released sometime at the end of this week. It's not clear how things will evolve after that, especially given the fact that the holidays are approaching fast, and devs might be a little sluggish when it comes to pushing patches and new features for the next 3.19 branch.
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://news.softpedia.com/news/Linus-Torvalds-Thanks-Microsoft-for-a-Great-Black-Friday-Monitor-Deal-466599.shtml
|
||||
|
||||
作者:[Silviu Stahie][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://news.softpedia.com/editors/browse/silviu-stahie
|
||||
[1]:https://plus.google.com/+LinusTorvalds/posts/4MwQKZhGkEr
|
@ -0,0 +1,47 @@
|
||||
U.S. Marine Corps Wants to Change OS for Radar System from Windows XP to Linux
|
||||
================================================================================
|
||||
**A new radar system has been sent back for upgrade**
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
> When it comes to stability and performance, nothing can really beat Linux. This is why the U.S. Marine Corps leaders have decided to ask Northrop Grumman Corp. Electronic Systems to change the operating system of the newly delivered Ground/Air Task-Oriented Radar (G/ATOR) from Windows XP to Linux.
|
||||
|
||||
The Ground/Air Task-Oriented Radar (G/ATOR) system has been in the works for many years and it's very likely that when the project was started, Windows XP could have been considered the logical choice. In the mean time, things changed. Microsoft has pulled the support for Windows XP and very few entities still use it. The operating system is either upgraded or replaced. In this case, Linux is the logical choice, especially since the replacement cost are probably much smaller than an eventual upgrade.
|
||||
|
||||
It's interesting to note that the Ground/Air Task-Oriented Radar (G/ATOR) was just delivered to the U.S. Marine Corps, but the company that built it chose to keep that aging operating system. Someone must have noticed the fact that it was a poor decision and the chain of command was informed of the problems that might have appeared.
|
||||
|
||||
### G/ATOR radar software will be Linux-based ###
|
||||
|
||||
Unix systems, like BSD-based or Linux-based OSes, are usually found in critical areas and technologies that can't fail, under any circumstances. That's why most of the servers out there are running Linux servers, for example. Having a radar system with an operating systems that is very unlikely to crash seems to fit the bill perfectly.
|
||||
|
||||
"Officials of the Marine Corps Systems Command at Quantico Marine Base, Va., announced a $10.2 million contract modification Wednesday to the Northrop Grumman Corp. Electronic Systems segment in Linthicum Heights, Md., to convert the Ground/Air Task-Oriented Radar (G/ATOR) operator command and control computer from Windows XP to Linux. The contract modification will incorporate a change order to switch the G/ATOR control computer from the Microsoft Windows XP operating system to a Defense Information Systems Agency (DISA)-compliant Linux operating system."
|
||||
|
||||
'G/ATOR is an expeditionary, three-dimensional, short-to-medium-range multi-role radar system designed to detect low-observable targets with low radar cross sections such as rockets, artillery, mortars, cruise missiles, and UAVs," reads the entry on [militaryaerospace.com][1].
|
||||
|
||||
This piece of military technology, the Ground/Air Task-Oriented Radar (G/ATOR) was first contracted from the Northrop Grumman Corp. back in 2005, so it's easy to understand why the US Marines might want to hurry this up. No time frame has been proposed for the switch.
|
||||
|
||||
视频链接:[http://youtu.be/H2ppl4x-eu8][2]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://news.softpedia.com/news/U-S-Marine-Corps-Want-to-Change-OS-for-Radar-System-from-Windows-XP-to-Linux-466756.shtml
|
||||
|
||||
作者:[Silviu Stahie][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://news.softpedia.com/editors/browse/silviu-stahie
|
||||
[1]:http://www.militaryaerospace.com/articles/2014/12/gator-linux-software.html
|
||||
[2]:http://youtu.be/H2ppl4x-eu8
|
@ -0,0 +1,42 @@
|
||||
Apparently This Trojan Virus May Have Infected Linux Systems For Years
|
||||
================================================================================
|
||||

|
||||
|
||||
One of the first few argument in [why should you switch to Linux][1] is that Linux is secure and virus free. It is widely perceived by most of the Linux users that Linux is immune to viruses, which is true to an extent but not entirely.
|
||||
|
||||
Like any other OS, Linux too is not immune to malware, trojan, rootkit, virus etc. There have been several [famous Linux viruses][2]. But if you compare those to that of Windows, the number is infinitesimal. So, why am I talking about Linux viruses today then? Because a new trojan has been detected in market which might be impacting Linux systems.
|
||||
|
||||
### Turla infects Linux systems as well ###
|
||||
|
||||
Few months back a sophisticated cyber espionage program, nicknamed [Turla][3], was detected. It was supposed to be originated in Russia, allegedly with Russian government backing. The spyware program was targeting government organizations in Europe and the United States for four years.
|
||||
|
||||
In a recent report, researchers at [Kaspersky][4] has found that Turla was not only affecting Windows system but also Linux operating system. Kaspersky researchers have termed it the ‘missing piece of Turla puzzle’. As per the report:
|
||||
|
||||
> “This newly found Turla component supports Linux for broader system support at victim sites. The attack tool takes us further into the set alongside the Snake rootkit and components first associated with this actor a couple years ago. We suspect that this component was running for years at a victim site, but do not have concrete data to support that statement just yet.”
|
||||
|
||||
### What is this Linux module of Turla and how dangerous it is? ###
|
||||
|
||||
Going by the Kaspersky report,
|
||||
|
||||
> The Linux Turla module is a C/C++ executable statically linked against multiple libraries, greatly increasing its file size. It was stripped of symbol information, more likely intended to increase analysis effort than to decrease file size. Its functionality includes hidden network communications, arbitrary remote command execution, and remote management. Much of its code is based on public sources.
|
||||
|
||||
Report also mentions that this trojan doesn’t require elevated privileges (read root) while running arbitrary remote commands and it cannot be discovered by commonly used administrative tools. Personally, I doubt their claims.
|
||||
|
||||
So, as a Linux desktop user, should you be scared? In my opinion, it is too early to go in to panic mode as we experienced with [ShellShock Linux bug][5]. Turla was originally intended for government organization, not common users. Let’s wait and watch for more concrete news. I’ll keep on updating this article. Till then enjoy Linux.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://itsfoss.com/apparently-trojan-virus-infected-linux-systems-years/
|
||||
|
||||
作者:[Abhishek][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://itsfoss.com/author/Abhishek/
|
||||
[1]:http://itsfoss.com/reasons-switch-linux-windows-xp/
|
||||
[2]:http://www.unixmen.com/meet-linux-viruses/
|
||||
[3]:http://www.reuters.com/article/2014/03/07/us-russia-cyberespionage-insight-idUSBREA260YI20140307
|
||||
[4]:https://securelist.com/blog/research/67962/the-penquin-turla-2/
|
||||
[5]:http://itsfoss.com/linux-shellshock-check-fix/
|
@ -0,0 +1,35 @@
|
||||
Turla espionage operation infects Linux systems with malware
|
||||
================================================================================
|
||||

|
||||
|
||||
> A newly identified Linux backdoor program is tied to the Turla cyberespionage campaign, researchers from Kaspersky Lab said
|
||||
|
||||
A newly discovered malware program designed to infect Linux systems is tied to a sophisticated cyberespionage operation of Russian origin dubbed Epic Turla, security researchers found.
|
||||
|
||||
The Turla campaign, also known as Snake or Uroburos, [was originally uncovered in February][1], but goes back several years. The massive operation infected computers at government organizations, embassies, military installations, education and research institutions and pharmaceutical companies in over 45 countries.
|
||||
|
||||
The newly identified Turla component for Linux was uploaded recently to a multi-engine antivirus scanning service and was described by security researchers from antivirus vendor Kaspersky Lab as "a previously unknown piece of a larger puzzle."
|
||||
|
||||
"So far, every single Turla sample we've encountered was designed for the Microsoft Windows family, 32 and 64 bit operating systems," the Kaspersky researchers said Monday in a [blog post][2]. "The newly discovered Turla sample is unusual in the fact that it's the first Turla sample targeting the Linux operating system that we have discovered."
|
||||
|
||||
The Turla Linux malware is based on an open-source backdoor program called cd00r developed in 2000. It allows attackers to execute arbitrary commands on a compromised system, but doesn't require elevated privileges or root access to function and listens to commands received via hidden TCP/UDP packets, making it stealthy.
|
||||
|
||||
"It can't be discovered via netstat, a commonly used administrative tool," said the Kaspersky researchers, who are still analyzing the malware's functionality.
|
||||
|
||||
"We suspect that this component was running for years at a victim site, but do not have concrete data to support that statement just yet," they said.
|
||||
|
||||
Since their blog post Monday, the Kaspersky researchers also found a second Turla Linux component that appears to be a separate malware program.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.computerworld.com/article/2857129/turla-espionage-operation-infects-linux-systems-with-malware.html
|
||||
|
||||
作者:[Lucian Constantin][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.computerworld.com/author/Lucian-Constantin/
|
||||
[1]:http://news.techworld.com/security/3505688/invisible-russian-cyberweapon-stalked-us-and-ukraine-since-2005-new-research-reveals/
|
||||
[2]:https://securelist.com/blog/research/67962/the-penquin-turla-2/
|
@ -0,0 +1,74 @@
|
||||
Yes, This Trojan Infects Linux. No, It’s Not The Tuxpocalypse
|
||||
================================================================================
|
||||

|
||||
|
||||
Is something watching you?
|
||||
|
||||
Grab a crate of canned food, start digging a deep underground bunker and prepare to settle into a world that will never be the same again: [a powerful trojan has been uncovered on Linux][1].
|
||||
|
||||
Yes, the hitherto impregnable fortress of computing nirvana has been compromised in a way that has left security experts a touch perturbed.
|
||||
|
||||
Unplug your PC, disinfect your keyboard and buy a cat (no more YouTube ). The Tuxpocalypse is upon us. We’ve reached the end of days.
|
||||
|
||||
Right? RIGHT? Nah, not quite.
|
||||
|
||||
### A Terrifying Anomalous Thing! ###
|
||||
|
||||
Let me set off by saying that **I am not underplaying the severity of this threat (known by the nickname ‘Turla’)** nor, for the avoidance of doubt, am I suggesting that we as Linux users shouldn’t be concerned by the implications.
|
||||
|
||||
The discovery of a silent trojan infecting Linux systems is terrifying. The fact it was tasked with sucking up and sending off all sorts of sensitive information is horrific. And to learn it’s been doing this for at least four years and doesn’t require root privileges? My seat is wet. I’m sorry.
|
||||
|
||||
But — and along with hyphens and typos, there’s always a ‘but’ on this site — the panic currently sweeping desktop Linux fans, Mexican wave style, is a little out of context.
|
||||
|
||||
Vulnerability may be a new feeling for some of us, yet let’s keep it in check: Linux remains an inherently secure operating system for desktop users. One clever workaround does not negate that and shouldn’t send you scurrying offline.
|
||||
|
||||
### State Sponsored, Targeting Governments ###
|
||||
|
||||

|
||||
|
||||
Is a penguin snake a ‘Penguake’ or a ‘Snaguin’?
|
||||
|
||||
‘Turla’ is a complex APT (Advanced Persistent Threat) that has (thus far) targeted government, embassy and pharmaceutical companies’ systems for around four years using a method based on [14 year old code, no less][2].
|
||||
|
||||
On Windows, where the superhero security researchers at Symantec and Kaspersky Lab first sighted the slimy snake, Turla and components of it were found to have **infected hundreds (100s) of PCs across 45 countries**, many through unpatched zero-day exploits.
|
||||
|
||||
*Nice one Microsoft.*
|
||||
|
||||
Further diligence by Kaspersky Lab has now uncovered that parts of the same trojan have also been active on Linux for some time.
|
||||
|
||||
The Trojan doesn’t require elevated privileges and can “intercept incoming packets and run incoming commands on the system”, but it’s not yet clear how deep its tentacles reach or how many Linux systems are infected, nor is the full extent of its capabilities known.
|
||||
|
||||
“Turla” (and its children) are presumed to be nation-state sponsored due to its choice of targets. US and UK readers shouldn’t assume it’s “*them*“, either. Our own governments are just as happy to play in the mud, too.
|
||||
|
||||
#### Perspective and Responsibility ####
|
||||
|
||||
As terrible a breach as this discovery is emotionally, technically and ethically it remains far, far, far away from being an indication that we’re entering a new “free for all” era of viruses and malware aimed at the desktop.
|
||||
|
||||
**Turla is not a user-focused “i wantZ ur CredIt carD” virus** bundled inside a faux software download. It’s a complex, finessed and adaptable threat with specific targets in mind (ergo grander ambitions than collecting a bunch of fruity tube dot com passwords, sorry ego!).
|
||||
|
||||
Kaspersky Lab explains:
|
||||
|
||||
> “The Linux Turla module is a C/C++ executable statically linked against multiple libraries, greatly increasing its file size. It was stripped of symbol information, more likely intended to increase analysis effort than to decrease file size. Its functionality includes hidden network communications, arbitrary remote command execution, and remote management. Much of its code is based on public sources.”
|
||||
|
||||
Regardless of impact or infection rate its precedes will still raise big, big questions that clever, clever people will now spend time addressing, analysing and (importantly) solving.
|
||||
|
||||
IANACSE (I am not a computer security expert) but IAFOA (I am a fan of acronyms), and AFAICT (as far as I can tell) this news should be viewed as as a cautionary PSA or FYI than the kind of OMGGTFO that some sites are painting it as.
|
||||
|
||||
Until more details are known none of us should panic. Let’s continue to practice safe computing. Avoid downloading/running scripts, apps, or binaries from untrusted sites or PPAs, and don’t venture into dodgy dark parts of the web.
|
||||
|
||||
If you remain super concerned you can check out the [Kaspersky blog][1] for details on how to check that you’re not infected.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/12/government-spying-turla-linux-trojan-found
|
||||
|
||||
作者:[Joey-Elijah Sneddon][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/117485690627814051450/?rel=author
|
||||
[1]:https://securelist.com/blog/research/67962/the-penquin-turla-2/
|
||||
[2]:https://twitter.com/joernchen/status/542060412188262400
|
||||
[3]:https://securelist.com/blog/research/67962/the-penquin-turla-2/
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user