From b044e0b5821e65c0ec435df6fa49ec0d2e2b419d Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 13 Jan 2015 12:50:55 +0800 Subject: [PATCH 001/104] Translating by ZTinoZ --- ...1223 20 Linux Commands Interview Questions & Answers.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md index 88e9b83ce2..e6e3fa1c2e 100644 --- a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md +++ b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md @@ -1,11 +1,10 @@ -Translating by ZTinoZ -20 Linux Commands Interview Questions & Answers +20条Linux命令面试问答 ================================================================================ **Q:1 How to check current run level of a linux server ?** Ans: ‘who -r’ & ‘runlevel’ commands are used to check the current runlevel of a linux box. -**Q:2 How to check the default gatway in linux ?** +**Q:2 怎么检查Linux的默认网关?** Ans: Using the commands “route -n” and “netstat -nr” , we can check default gateway. Apart from the default gateway info , these commands also display the current routing tables . @@ -116,7 +115,7 @@ Ans: The lspci command displays information about PCI buses and the devices atta via: http://www.linuxtechi.com/20-linux-commands-interview-questions-answers/ 作者:[Pradeep Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d1e967b1abce035eae3ea421ea8bed98292b02f1 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 13 Jan 2015 15:01:19 +0800 Subject: [PATCH 002/104] Translating by ZTinoZ --- ...nux Commands Interview Questions & Answers.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md index e6e3fa1c2e..50da521e4e 100644 --- a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md +++ b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md @@ -1,16 +1,16 @@ 20条Linux命令面试问答 ================================================================================ -**Q:1 How to check current run level of a linux server ?** +**问:1 如何查看当前的Linux服务器的运行级别?** -Ans: ‘who -r’ & ‘runlevel’ commands are used to check the current runlevel of a linux box. +答: ‘who -r’ 和 ‘runlevel’ 命令可以用来查看当前的Linux服务器的运行级别。 -**Q:2 怎么检查Linux的默认网关?** +**问:2 如何检查Linux的默认网关?** -Ans: Using the commands “route -n” and “netstat -nr” , we can check default gateway. Apart from the default gateway info , these commands also display the current routing tables . +答: Using the commands “route -n” and “netstat -nr” , we can check default gateway. Apart from the default gateway info , these commands also display the current routing tables . -**Q:3 How to rebuild initrd image file on Linux ?** +**问:3 How to rebuild initrd image file on Linux ?** -Ans: In case of CentOS 5.X / RHEL 5.X , mkinitrd command is used to create initrd file , example is shown below : +答: In case of CentOS 5.X / RHEL 5.X , mkinitrd command is used to create initrd file , example is shown below : # mkinitrd -f -v /boot/initrd-$(uname -r).img $(uname -r) @@ -24,9 +24,9 @@ Above command will create the initrd file for the current version. To rebuild th # dracut -f initramfs-2.x.xx-xx.el6.x86_64.img 2.x.xx-xx.el6.x86_64 -**Q:4 What is cpio command ?** +**问:4 What is cpio command ?** -Ans: cpio stands for Copy in and copy out. Cpio copies files, lists and extract files to and from a archive ( or a single file). +答: cpio stands for Copy in and copy out. Cpio copies files, lists and extract files to and from a archive ( or a single file). **Q:5 What is patch command and where to use it ?** From 222bfbbd4450cd04d34f9ebaa1fdf76fb851d81b Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 14 Jan 2015 11:19:47 +0800 Subject: [PATCH 003/104] Translating by ZTinoZ --- ... Commands Interview Questions & Answers.md | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md index 50da521e4e..a57eadab5c 100644 --- a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md +++ b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md @@ -4,33 +4,33 @@ 答: ‘who -r’ 和 ‘runlevel’ 命令可以用来查看当前的Linux服务器的运行级别。 -**问:2 如何检查Linux的默认网关?** +**问:2 如何查看Linux的默认网关?** -答: Using the commands “route -n” and “netstat -nr” , we can check default gateway. Apart from the default gateway info , these commands also display the current routing tables . +答: 用 “route -n” 和 “netstat -nr” 命令,我们可以查看默认网关。除了默认的网关信息,这两个命令还可以显示当前的路由表。 -**问:3 How to rebuild initrd image file on Linux ?** +**问:3 如何在Linux上重建初始化内存盘影响文件?** -答: In case of CentOS 5.X / RHEL 5.X , mkinitrd command is used to create initrd file , example is shown below : +答: 在CentOS 5.X / RHEL 5.X中,可以用mkinitrd命令来创建初始化内存盘文件,举例如下: # mkinitrd -f -v /boot/initrd-$(uname -r).img $(uname -r) -If you want to create initrd for a specific kernel version , then replace ‘uname -r’ with desired kernel +如果你想要给特定的内核版本创建初始化内存盘,你就用所需的内核名替换掉 ‘uname -r’ 。 -In Case of CentOS 6.X / RHEL 6.X , dracut command is used to create initrd file example is shown below : +在CentOS 6.X / RHEL 6.X中,则用dracut命令来创建初始化内存盘文件,举例如下: # dracut -f -Above command will create the initrd file for the current version. To rebuild the initrd file for a specific kernel , use below command : +以上命令能给当前的系统版本创建初始化内存盘,给特定的内核版本重建初始化内存盘文件则使用以下命令: # dracut -f initramfs-2.x.xx-xx.el6.x86_64.img 2.x.xx-xx.el6.x86_64 -**问:4 What is cpio command ?** +**问:4 cpio命令是什么?** -答: cpio stands for Copy in and copy out. Cpio copies files, lists and extract files to and from a archive ( or a single file). +答: cpio就是复制入和复制出的意思。cpio可以向一个归档文件(或单个文件)复制文件、列表,还可以从中提取文件。 -**Q:5 What is patch command and where to use it ?** +**问:5 patch命令是什么?如何使用?** -Ans: As the name suggest patch command is used to apply changes ( or patches) to the text file. Patch command generally accept output from the diff and convert older version of files into newer versions. For example Linux kernel source code consists of number of files with millions of lines , so whenever any contributor contribute the changes , then he/she will be send the only changes instead of sending the whole source code. Then the receiver will apply the changes with patch command to its original source code. +答: As the name suggest patch command is used to apply changes ( or patches) to the text file. Patch command generally accept output from the diff and convert older version of files into newer versions. For example Linux kernel source code consists of number of files with millions of lines , so whenever any contributor contribute the changes , then he/she will be send the only changes instead of sending the whole source code. Then the receiver will apply the changes with patch command to its original source code. Create a diff file for use with patch, @@ -42,73 +42,73 @@ Once the diff file has been created, we can apply it to patch the old file into # patch < diff_file -**Q:6 What is use of aspell ?** +**问:6 What is use of aspell ?** -Ans: As the name suggest aspell is an interactive spelling checker in linux operating system. The aspell command is the successor to an earlier program named ispell, and can be used, for the most part, as a drop-in replacement. While the aspell program is mostly used by other programs that require spell-checking capability, it can also be used very effectively as a stand-alone tool from the command line. +答: As the name suggest aspell is an interactive spelling checker in linux operating system. The aspell command is the successor to an earlier program named ispell, and can be used, for the most part, as a drop-in replacement. While the aspell program is mostly used by other programs that require spell-checking capability, it can also be used very effectively as a stand-alone tool from the command line. -**Q:7 How to check the SPF record of domain from command line ?** +**问:7 How to check the SPF record of domain from command line ?** -Ans: We can check SPF record of a domain using dig command. Example is shown below : +答: We can check SPF record of a domain using dig command. Example is shown below : linuxtechi@localhost:~$ dig -t TXT google.com -**Q:8 How to identify which package the specified file (/etc/fstab) is associated with in linux ?** +**问:8 How to identify which package the specified file (/etc/fstab) is associated with in linux ?** -Ans: # rpm -qf /etc/fstab +答: # rpm -qf /etc/fstab Above command will list the package which provides file “/etc/fstab” -**Q:9 Which command is used to check the status of bond0 ?** +**问:9 Which command is used to check the status of bond0 ?** -Ans: cat /proc/net/bonding/bond0 +答: cat /proc/net/bonding/bond0 -**Q:10 What is the use of /proc file system in linux ?** +**问:10 What is the use of /proc file system in linux ?** -Ans: The /proc file system is a RAM based file system which maintains information about the current state of the running kernel including details on CPU, memory, partitioning, interrupts, I/O addresses, DMA channels, and running processes. This file system is represented by various files which do not actually store the information, they point to the information in the memory. The /proc file system is maintained automatically by the system. +答: The /proc file system is a RAM based file system which maintains information about the current state of the running kernel including details on CPU, memory, partitioning, interrupts, I/O addresses, DMA channels, and running processes. This file system is represented by various files which do not actually store the information, they point to the information in the memory. The /proc file system is maintained automatically by the system. -**Q:11 How to find files larger than 10MB in size in /usr directory ?** +**问:11 How to find files larger than 10MB in size in /usr directory ?** -Ans: # find /usr -size +10M +答: # find /usr -size +10M -**Q:12 How to find files in the /home directory that were modified more than 120 days ago ?** +**问:12 How to find files in the /home directory that were modified more than 120 days ago ?** -Ans: # find /home -mtime +l20 +答: # find /home -mtime +l20 -**Q:13 How to find files in the /var directory that have not been accessed in the last 90 days ?** +**问:13 How to find files in the /var directory that have not been accessed in the last 90 days ?** -Ans: # find /var -atime -90 +答: # find /var -atime -90 -**Q:14 Search for core files in the entire directory tree and delete them as found without prompting for confirmation** +**问:14 Search for core files in the entire directory tree and delete them as found without prompting for confirmation** -Ans: # find / -name core -exec rm {} \; +答: # find / -name core -exec rm {} \; -**Q:15 What is the purpose of strings command ?** +**问:15 What is the purpose of strings command ?** -Ans: The strings command is used to extract and display the legible contents of a non-text file. +答: The strings command is used to extract and display the legible contents of a non-text file. -**Q:16 What is the use tee filter ?** +**问:16 What is the use tee filter ?** -Ans: The tee filter is used to send an output to more than one destination. It can send one copy of the output to a file and another to the screen (or some other program) if used with pipe. +答: The tee filter is used to send an output to more than one destination. It can send one copy of the output to a file and another to the screen (or some other program) if used with pipe. linuxtechi@localhost:~$ ll /etc | nl | tee /tmp/ll.out In the above example, the output from ll is numbered and captured in /tmp/ll.out file. The output is also displayed on the screen. -**Q:17 What would the command export PS1 = ”$LOGNAME@`hostname`:\$PWD: do ?** +**问:17 What would the command export PS1 = ”$LOGNAME@`hostname`:\$PWD: do ?** -Ans: The export command provided will change the login prompt to display username, hostname, and the current working directory. +答: The export command provided will change the login prompt to display username, hostname, and the current working directory. -**Q:18 What would the command ll | awk ‘{print $3,”owns”,$9}’ do ?** +**问:18 What would the command ll | awk ‘{print $3,”owns”,$9}’ do ?** -Ans: The ll command provided will display file names and their owners. +答: The ll command provided will display file names and their owners. -**Q:19 What is the use of at command in linux ?** +**问:19 What is the use of at command in linux ?** -Ans: The at command is used to schedule a one-time execution of a program in the future. All submitted jobs are spooled in the /var/spool/at directory and executed by the atd daemon when the scheduled time arrives. +答: The at command is used to schedule a one-time execution of a program in the future. All submitted jobs are spooled in the /var/spool/at directory and executed by the atd daemon when the scheduled time arrives. -**Q:20 What is the role of lspci command in linux ?** +**问:20 What is the role of lspci command in linux ?** -Ans: The lspci command displays information about PCI buses and the devices attached to your system. Specify -v, -vv, or -vvv for detailed output. With the -m option, the command produces more legible output. +答: The lspci command displays information about PCI buses and the devices attached to your system. Specify -v, -vv, or -vvv for detailed output. With the -m option, the command produces more legible output. -------------------------------------------------------------------------------- From 10f7554731367f6982f4716f0e293b702e2b659e Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 16 Jan 2015 16:58:03 +0800 Subject: [PATCH 004/104] Translating by ZTinoZ --- ... 20 Linux Commands Interview Questions & Answers.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md index a57eadab5c..3f032a3ac9 100644 --- a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md +++ b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md @@ -30,19 +30,19 @@ **问:5 patch命令是什么?如何使用?** -答: As the name suggest patch command is used to apply changes ( or patches) to the text file. Patch command generally accept output from the diff and convert older version of files into newer versions. For example Linux kernel source code consists of number of files with millions of lines , so whenever any contributor contribute the changes , then he/she will be send the only changes instead of sending the whole source code. Then the receiver will apply the changes with patch command to its original source code. +答: 顾名思义,patch命令就是用来将修改(或补丁)写进文本文件里。Patch命令通常是接收diff的输出并把文件的旧版本转换为新版本。举个例子,Linux内核源代码由百万行代码文件构成,所以无论何时,任何代码贡献者贡献出代码,只需发送改动的部分而不是整个源代码,然后接收者用patch命令将改动写进原始的源代码里。 -Create a diff file for use with patch, +创建一个diff文件给patch使用, # diff -Naur old_file new_file > diff_file -Where old_file and new_file are either single files or directories containing files. The r option supports recursion of a directory tree. +旧文件和新文件要么都是单个的文件要么都是包含文件的目录,r选项支持目录树递归。 -Once the diff file has been created, we can apply it to patch the old file into the new file: +一旦diff文件创建好,我们就能在旧的文件上打上补丁,把它变成新文件: # patch < diff_file -**问:6 What is use of aspell ?** +**问:6 aspell有什么用 ?** 答: As the name suggest aspell is an interactive spelling checker in linux operating system. The aspell command is the successor to an earlier program named ispell, and can be used, for the most part, as a drop-in replacement. While the aspell program is mostly used by other programs that require spell-checking capability, it can also be used very effectively as a stand-alone tool from the command line. From 3b7420b19a16beaf9cd7c32b490b945de0533bc6 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Sun, 18 Jan 2015 16:25:33 +0800 Subject: [PATCH 005/104] Translating by ZTinoZ --- .../20141223 20 Linux Commands Interview Questions & Answers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md index 3f032a3ac9..16347b7cc5 100644 --- a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md +++ b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md @@ -44,7 +44,7 @@ **问:6 aspell有什么用 ?** -答: As the name suggest aspell is an interactive spelling checker in linux operating system. The aspell command is the successor to an earlier program named ispell, and can be used, for the most part, as a drop-in replacement. While the aspell program is mostly used by other programs that require spell-checking capability, it can also be used very effectively as a stand-alone tool from the command line. +答: 顾名思义,aspell就是Linux操作系统上的一款交互式拼写检查器。aspell命令继任了更早的一个名为ispell的程序,并且作为一款嵌入式替代品,最重要的是它非常好用。While the aspell program is mostly used by other programs that require spell-checking capability, it can also be used very effectively as a stand-alone tool from the command line. **问:7 How to check the SPF record of domain from command line ?** From e17efcba03810347c8e9f4d1271f9f735d1f18ed Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 19 Jan 2015 17:50:59 +0800 Subject: [PATCH 006/104] Translating by ZTinoZ --- ...223 20 Linux Commands Interview Questions & Answers.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md index 16347b7cc5..d2374752ea 100644 --- a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md +++ b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md @@ -44,11 +44,11 @@ **问:6 aspell有什么用 ?** -答: 顾名思义,aspell就是Linux操作系统上的一款交互式拼写检查器。aspell命令继任了更早的一个名为ispell的程序,并且作为一款嵌入式替代品,最重要的是它非常好用。While the aspell program is mostly used by other programs that require spell-checking capability, it can also be used very effectively as a stand-alone tool from the command line. +答: 顾名思义,aspell就是Linux操作系统上的一款交互式拼写检查器。aspell命令继任了更早的一个名为ispell的程序,并且作为一款嵌入式替代品 ,最重要的是它非常好用。当aspell程序主要被其它一些需要拼写检查能力的程序所使用的时候,在命令行中作为一个独立运行的工具的它也能十分有效。 -**问:7 How to check the SPF record of domain from command line ?** +**问:7 如何从命令行查看域SPF记录?** -答: We can check SPF record of a domain using dig command. Example is shown below : +答: 我们可以用dig命令来查看域SPF记录。举例如下: linuxtechi@localhost:~$ dig -t TXT google.com @@ -56,7 +56,7 @@ 答: # rpm -qf /etc/fstab -Above command will list the package which provides file “/etc/fstab” +以上命令能列出Above command will list the package which provides file “/etc/fstab” **问:9 Which command is used to check the status of bond0 ?** From 785f7b7adeb375545dbbdc1232d02cc5ab9820af Mon Sep 17 00:00:00 2001 From: mtunique Date: Wed, 21 Jan 2015 22:26:43 +0800 Subject: [PATCH 007/104] merge origin/master --- ...Answers--How to check disk space on Linux with df command.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md b/sources/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md index ef10342238..b6595f555c 100644 --- a/sources/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md +++ b/sources/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md @@ -1,7 +1,7 @@ translating by mtunique Linux FAQs with Answers--How to check disk space on Linux with df command ================================================================================ -> **Question**: I know I can use df command to check a file system's disk space usage on Linux. Can you show me practical examples of the df command so that I can make the most out of it? +> **问题**: 我知道在Linux上我可以用df命令来查看I know I can use df command to check a file system's disk space usage on Linux. Can you show me practical examples of the df command so that I can make the most out of it? As far as disk storage is concerned, there are many command-line or GUI-based tools that can tell you about current disk space usage. These tools report on detailed disk utilization in various human-readable formats, such as easy-to-understand summary, detailed statistics, or [intuitive visualization][1]. If you simply want to know how much free disk space is available for different file systems, then df command is probably all you need. From 848826d036585df3bb04d49fe4923cd3d0cf795a Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 22 Jan 2015 16:33:45 +0800 Subject: [PATCH 008/104] Translating by ZTinoZ --- ...41223 20 Linux Commands Interview Questions & Answers.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md index d2374752ea..256a6cd5df 100644 --- a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md +++ b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md @@ -52,13 +52,13 @@ linuxtechi@localhost:~$ dig -t TXT google.com -**问:8 How to identify which package the specified file (/etc/fstab) is associated with in linux ?** +**问:8 如何识别Linux系统中指定文件(/etc/fstab)的关联包?** 答: # rpm -qf /etc/fstab -以上命令能列出Above command will list the package which provides file “/etc/fstab” +以上命令能列出供应给“/etc/fstab”文件的包。 -**问:9 Which command is used to check the status of bond0 ?** +**问:9 哪条命令用来查看bond0的状态?** 答: cat /proc/net/bonding/bond0 From 8b4a97ada2a95ffae796ab25ee3a6b0cba010c58 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 23 Jan 2015 17:59:27 +0800 Subject: [PATCH 009/104] Translating by ZTinoZ --- ...nux Commands Interview Questions & Answers.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md index 256a6cd5df..17a1179b8e 100644 --- a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md +++ b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md @@ -62,23 +62,23 @@ 答: cat /proc/net/bonding/bond0 -**问:10 What is the use of /proc file system in linux ?** +**问:10 Linux系统中的/proc文件系统有什么用?** -答: The /proc file system is a RAM based file system which maintains information about the current state of the running kernel including details on CPU, memory, partitioning, interrupts, I/O addresses, DMA channels, and running processes. This file system is represented by various files which do not actually store the information, they point to the information in the memory. The /proc file system is maintained automatically by the system. +答: /proc文件系统是一个基于维护关于当前正在运行的内核状态信息的文件系统的随机存取存储器(RAM),其中包括CPU、内存、分区划分、I/O地址、直接内存访问通道和正在运行的进程。这个文件系统所代表的是各种不实际存储信息的文件,它们指向的是内存里的信息。/proc文件系统是由系统自动维护的。 -**问:11 How to find files larger than 10MB in size in /usr directory ?** +**问:11 如何在/usr目录下找出大小超过10MB的文件?** 答: # find /usr -size +10M -**问:12 How to find files in the /home directory that were modified more than 120 days ago ?** +**问:12 如何在/home目录下找出120天之前被修改过的文件?** -答: # find /home -mtime +l20 +答: # find /home -mtime +120 -**问:13 How to find files in the /var directory that have not been accessed in the last 90 days ?** +**问:13 如何在/var目录下找出90天之内未被访问过的文件?** -答: # find /var -atime -90 +答: # find /var \! -atime -90 -**问:14 Search for core files in the entire directory tree and delete them as found without prompting for confirmation** +**问:14 在整个目录树下查找核心文件并Search for core files in the entire directory tree and delete them as found without prompting for confirmation** 答: # find / -name core -exec rm {} \; From e44e56151d063e91272318bdc0df3f4c4badbb09 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Sun, 25 Jan 2015 23:10:58 +0800 Subject: [PATCH 010/104] Translating by ZTinoZ --- ...0141223 20 Linux Commands Interview Questions & Answers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md index 17a1179b8e..2b1fa24d92 100644 --- a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md +++ b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md @@ -82,9 +82,9 @@ 答: # find / -name core -exec rm {} \; -**问:15 What is the purpose of strings command ?** +**问:15 strings命令有什么作用?** -答: The strings command is used to extract and display the legible contents of a non-text file. +答: strings命令用来extract and display the legible contents of a non-text file. **问:16 What is the use tee filter ?** From f069f6bca7d4d8057d9d96b4e8c2188b37f70dcb Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 26 Jan 2015 16:52:38 +0800 Subject: [PATCH 011/104] Translating by ZTinoZ --- ...x Commands Interview Questions & Answers.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md index 2b1fa24d92..7e73344c2d 100644 --- a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md +++ b/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md @@ -78,29 +78,29 @@ 答: # find /var \! -atime -90 -**问:14 在整个目录树下查找核心文件并Search for core files in the entire directory tree and delete them as found without prompting for confirmation** +**问:14 在整个目录树下查找核心文件,如发现则删除它们且不提示确认信息。** 答: # find / -name core -exec rm {} \; **问:15 strings命令有什么作用?** -答: strings命令用来extract and display the legible contents of a non-text file. +答: strings命令用来提取和显示非文本文件的清晰内容。 -**问:16 What is the use tee filter ?** +**问:16 tee filter有什么作用 ?** -答: The tee filter is used to send an output to more than one destination. It can send one copy of the output to a file and another to the screen (or some other program) if used with pipe. +答: tee filter用来向多个目标发送输出内容。它可以向一个文件发送一份输出的拷贝并且如果使用管道的话可以在屏幕上(或一些其它程序)输出其它内容。 linuxtechi@localhost:~$ ll /etc | nl | tee /tmp/ll.out -In the above example, the output from ll is numbered and captured in /tmp/ll.out file. The output is also displayed on the screen. +在以上例子中,从ll输出的是在 /tmp/ll.out 文件中被捕获的,输出同样在屏幕上显示了出来。 -**问:17 What would the command export PS1 = ”$LOGNAME@`hostname`:\$PWD: do ?** +**问:17 export PS1 = ”$LOGNAME@`hostname`:\$PWD: 这条命令是在做什么?** -答: The export command provided will change the login prompt to display username, hostname, and the current working directory. +答: 这条export命令会更改登录提示符来显示用户名、本机名和当前工作目录。 -**问:18 What would the command ll | awk ‘{print $3,”owns”,$9}’ do ?** +**问:18 ll | awk ‘{print $3,”owns”,$9}’ 这条命令是在做什么?** -答: The ll command provided will display file names and their owners. +答: 这条ll命令会显示这些文件的文件名和它们的拥有者。 **问:19 What is the use of at command in linux ?** From 2037d825cc4d12cdf10859634c043f416aea96e1 Mon Sep 17 00:00:00 2001 From: shipsw Date: Tue, 27 Jan 2015 13:29:10 +0800 Subject: [PATCH 012/104] Auditd - Tool for Security Auditing on Linux Server Auditd - Tool for Security Auditing on Linux Server --- ...104 Auditd--Tool for Security Auditing on Linux Server.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150104 Auditd--Tool for Security Auditing on Linux Server.md b/sources/tech/20150104 Auditd--Tool for Security Auditing on Linux Server.md index 9375385927..e5b148a4df 100644 --- a/sources/tech/20150104 Auditd--Tool for Security Auditing on Linux Server.md +++ b/sources/tech/20150104 Auditd--Tool for Security Auditing on Linux Server.md @@ -1,3 +1,6 @@ +Translating by shipsw + + Auditd - Tool for Security Auditing on Linux Server ================================================================================ First of all , we wish all our readers **Happy & Prosperous New YEAR 2015** from our Linoxide team. So lets start this new year explaining about Auditd tool. @@ -200,4 +203,4 @@ via: http://linoxide.com/how-tos/auditd-tool-security-auditing/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/pungki/ -[1]:http://linoxide.com/tools/wajig-package-management-debian/ \ No newline at end of file +[1]:http://linoxide.com/tools/wajig-package-management-debian/ From 71bd0f676a25dfe7d07e7080276a8633891c0f68 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 27 Jan 2015 15:37:39 +0800 Subject: [PATCH 013/104] =?UTF-8?q?20150127-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...How to limit network bandwidth on Linux.md | 90 +++++++++++++++++++ ...27 Install Jetty Web Server On CentOS 7.md | 78 ++++++++++++++++ ...ID--A Graphical Wi-Fi Scanner for Linux.md | 61 +++++++++++++ 3 files changed, 229 insertions(+) create mode 100644 sources/tech/20150127 How to limit network bandwidth on Linux.md create mode 100644 sources/tech/20150127 Install Jetty Web Server On CentOS 7.md create mode 100644 sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md diff --git a/sources/tech/20150127 How to limit network bandwidth on Linux.md b/sources/tech/20150127 How to limit network bandwidth on Linux.md new file mode 100644 index 0000000000..1deaa38b49 --- /dev/null +++ b/sources/tech/20150127 How to limit network bandwidth on Linux.md @@ -0,0 +1,90 @@ +How to limit network bandwidth on Linux +================================================================================ +If you often run multiple networking applications on your Linux desktop, or share bandwidth among multiple computers at home, you will want to have a better control over bandwidth usage. Otherwise, when you are downloading a big file with a downloader, your interactive SSH session may become sluggish to the point where it's unusable. Or when you sync a big folder over Dropbox, your roommate may complain that video streaming at her computer gets choppy. + +In this tutorial, I am going to describe two different ways to rate limit network traffic on Linux. + +### Rate Limit an Application on Linux ### + +One way to rate limit network traffic is via a command-line tool called [trickle][1]. The trickle command allows you to shape the traffic of any particular program by "pre-loading" a rate-limited socket library at run-time. A nice thing about trickle is that it runs purely in user-space, meaning you don't need root privilege to restrict the bandwidth usage of a program. To be compatible with trickle, the program must use socket interface with no statically linked library. trickle can be handy when you want to rate limit a program which does not have a built-in bandwidth control functionality. + +To install trickle on Ubuntu, Debian and their derivatives: + + $ sudo apt-get install trickle + +To install trickle on Fedora or CentOS/RHEL (with [EPEL repository][2]): + + $ sudo yum install trickle + +Basic usage of trickle is as follows. Simply put, you prepend trickle (with rate) in front of the command you are trying to run. + + $ trickle -d -u + +This will limit the download and upload rate of to specified values (in KBytes/s). + +For example, set the maximum upload bandwidth of your scp session to 100 KB/s: + + $ trickle -u 100 scp backup.tgz alice@remote_host.com: + +If you want, you can set the maximum download speed (e.g., 300 KB/s) of your Firefox browser by creating a [custom launcher][3] with the following command. + + trickle -d 300 firefox %u + +Finally, trickle can run in a daemon mode, where it can restrict the "aggregate" bandwidth usage of all running programs launched via trickle. To launch trickle as a daemon (i.e., trickled): + + $ sudo trickled -d 1000 + +Once the trickled daemon is running in the background, you can launch other programs via trickle. If you launch one program with trickle, its maximum download rate is 1000 KB/s. If you launch another program with trickle, each of them will be rate limited to 500 KB/s, etc. + +### Rate Limit a Network Interface on Linux ### + +Another way to control your bandwidth resource is to enforce bandwidth limit on a per-interface basis. This is useful when you are sharing your upstream Internet connection with someone else. Like anything else, Linux has a tool for you. [wondershaper][4] exactly does that: rate-limit a network interface. + +wondershaper is in fact a shell script which uses [tc][5] to define traffic shaping and QoS for a specific network interface. Outgoing traffic is shaped by being placed in queues with different priorities, while incoming traffic is rate-limited by packet dropping. + +In fact, the stated goal of wondershaper is much more than just adding bandwidth cap to an interface. wondershaper tries to maintain low latency for interactive sessions such as SSH while bulk download or upload is going on. Also, it makes sure that bulk upload (e.g., Dropbox sync) does not suffocate download, and vice versa. + +To install wondershaper on Ubuntu, Debian and their derivatives: + + $ sudo apt-get install wondershaper + +To install wondershaper on Fedora or CentOS/RHEL (with [EPEL repository][6]): + + $ sudo yum install wondershaper + +Basic usage of wondershaper is as follows. + + $ sudo wondershaper + +For example, to set the maximum download/upload bandwidth for eth0 to 1000Kbit/s and 500Kbit/s, respectively: + + $ sudo wondershaper eth0 1000 500 + +You can remove the rate limit by running: + + $ sudo wondershaper clear eth0 + +If you are interested in how wondershaper works, you can read its shell script (/sbin/wondershaper). + +### Conclusion ### + +In this tutorial, I introduced two different ways to control your bandwidth usages on Linux desktop, on per-application or per-interface basis. Both tools are extremely user-friendly, offering you a quick and easy way to shape otherwise unconstrained traffic. For those of you who want to know more about rate control on Linux, refer to [the Linux bible][7]. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/limit-network-bandwidth-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://monkey.org/~marius/trickle +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[3]:http://xmodulo.com/create-desktop-shortcut-launcher-linux.html +[4]:http://lartc.org/wondershaper/ +[5]:http://lartc.org/manpages/tc.txt +[6]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[7]:http://www.lartc.org/lartc.html \ No newline at end of file diff --git a/sources/tech/20150127 Install Jetty Web Server On CentOS 7.md b/sources/tech/20150127 Install Jetty Web Server On CentOS 7.md new file mode 100644 index 0000000000..0cfb868498 --- /dev/null +++ b/sources/tech/20150127 Install Jetty Web Server On CentOS 7.md @@ -0,0 +1,78 @@ +Install Jetty Web Server On CentOS 7 +================================================================================ +[Jetty][1] is a pure Java-based HTTP **(Web) server** and Java Servlet container. Jetty is now often used for machine to machine communications, usually within larger software frameworks. But the other Web Servers are usually associated with serving documents to humans. Jetty is developed as a free and open source project as part of the Eclipse Foundation. The web server is used in products such as Apache ActiveMQ, Alfresco, Apache Geronimo, Apache Maven, Apache Spark, Google App Engine, Eclipse, FUSE, Twitter’s Streaming API and Zimbra. + +This article explains ‘How to install jetty web server in your CentOS server’. + +**First of all we have to install java JDK, By the following command:** + + yum -y install java-1.7.0-openjdk wget + +**After the JDK installation, We will download the latest version of Jetty:** + + wget http://download.eclipse.org/jetty/stable-9/dist/jetty-distribution-9.2.5.v20141112.tar.gz + +**Extract and move the the downloaded package to /opt:** + + tar zxvf jetty-distribution-9.2.5.v20141112.tar.gz -C /opt/ + +**Rename the file name to jetty:** + + mv /opt/jetty-distribution-9.2.5.v20141112/ /opt/jetty + +**Create a user called jetty:** + + useradd -m jetty + +**Change the ownership of jetty:** + + chown -R jetty:jetty /opt/jetty/ + +**Make a Symlink jetty.sh to /etc/init.d directory to create a start up script file:** + + ln -s /opt/jetty/bin/jetty.sh /etc/init.d/jetty + +**Add script:** + + chkconfig --add jetty + +**Make the jetty web server auto starts on system boot:** + + chkconfig --level 345 jetty on + +**Open /etc/default/jetty in your favorite editor and replace port and listening address desired value:** + + vi /etc/default/jetty + +---------- + + JETTY_HOME=/opt/jetty + JETTY_USER=jetty + JETTY_PORT=8080 + JETTY_HOST=50.116.24.78 + JETTY_LOGS=/opt/jetty/logs/ + +**We finished the installation, Now you have to start the jetty service.** + + service jetty start + +All done! + +Now you can access jetty web sever in **http://:8080** + +That’s it! + +Cheers!! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/install-jetty-web-server-centos-7/ + +作者:[Jijo][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/jijo/ +[1]:http://eclipse.org/jetty/ \ No newline at end of file diff --git a/sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md b/sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md new file mode 100644 index 0000000000..2a004ed174 --- /dev/null +++ b/sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md @@ -0,0 +1,61 @@ +LinSSID – A Graphical Wi-Fi Scanner for Linux +================================================================================ +### Introduction ### + +As you may know, **LinSSID** is a simple graphical software that can be used to find the wireless networks available.It is completely open source, written in C++ using Linux wireless tools, Qt5, and Qwt 6.1., and is similar to **Inssider** (MS Windows) in terms of look and functionality. + +### Installation ### + +You can install it either using source, or using a PPA if you use DEB based systems such as Ubuntu, and LinuxMint etc. + +You can download and install LinSSID using source packages from [this link][1]. + +Here, we will install and test this software on Ubuntu 14.04 LTS using PPA. + +Add the LinSSID PPA, and install it by typing. + + sudo add-apt-repository ppa:wseverin/ppa + sudo apt-get update + sudo apt-get install linssid + +### Usage ### + +Once you installed, launch it either from menu or unity. + +You”ll be asked to enter the administrative user password of your system. + +![Password required for iwlist scan_001](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Password-required-for-iwlist-scan_001.png) + +This is how LinSSID interface looks. + +![LinSSID_002](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/LinSSID_002.png) + +Now, select the network interface you used to connect to the Wireless networks, for example wlan0 in my case. Click the Play button to search the list of available wi-fi networks. + +After a new seconds, LinSSID will display the wi-fi networks. + +![LinSSID_003](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/LinSSID_003.png) + +As you see in the above screenshot, LinSSID displays the details of SSID names, MAC Id, Channel, Privacy, Cipher, Signal, and Protocol etc. Ofcourse, you can make LinSSID to display more options such as Security, bandwidth details etc. To do that, go to **View** menu, and select the desired option. Also, it displays the graphs of signal strength by channel and over time. Additionally, It works both on 2.4Ghz, and 5Ghz channels. + +That’s it. Hope this tool will useful for you. + +Cheers!! + +Reference Links: + +- [LinSSID Homepage][2] + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/linssid-graphical-wi-fi-scanner-linux/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:http://sourceforge.net/projects/linssid/files/ +[2]:http://sourceforge.net/projects/linssid/ \ No newline at end of file From 0da40258cd79b4928f2016f4eb08c274e8944627 Mon Sep 17 00:00:00 2001 From: tinyeyeser Date: Tue, 27 Jan 2015 16:20:59 +0800 Subject: [PATCH 014/104] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD=20by?= =?UTF-8?q?=E5=B0=8F=E7=9C=BC=E5=84=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...126 Data of 20 Million Users Stolen from Dating Website.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/news/20150126 Data of 20 Million Users Stolen from Dating Website.md b/sources/news/20150126 Data of 20 Million Users Stolen from Dating Website.md index 449f159b00..2a1dea8478 100644 --- a/sources/news/20150126 Data of 20 Million Users Stolen from Dating Website.md +++ b/sources/news/20150126 Data of 20 Million Users Stolen from Dating Website.md @@ -1,3 +1,5 @@ +翻译中 by小眼儿 + Data of 20 Million Users Stolen from Dating Website ---------- *Info includes Gmail, Hotmail and Yahoo emails* @@ -47,4 +49,4 @@ via:http://news.softpedia.com/news/Data-of-20-Million-Users-Stolen-from-Dating-W 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://news.softpedia.com/editors/browse/ionut-ilascu -[1]:http://newblog.easysol.net/dating-site-breached/ \ No newline at end of file +[1]:http://newblog.easysol.net/dating-site-breached/ From 4afd140f709a9e6a4430b5fdb00aa71351704b64 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 27 Jan 2015 16:28:04 +0800 Subject: [PATCH 015/104] =?UTF-8?q?20150127-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../talk/20150127 Windows 10 versus Linux.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sources/talk/20150127 Windows 10 versus Linux.md diff --git a/sources/talk/20150127 Windows 10 versus Linux.md b/sources/talk/20150127 Windows 10 versus Linux.md new file mode 100644 index 0000000000..e2cdfc14c1 --- /dev/null +++ b/sources/talk/20150127 Windows 10 versus Linux.md @@ -0,0 +1,31 @@ +Windows 10 versus Linux +================================================================================ +![](https://farm4.staticflickr.com/3852/14863156322_e4edbae70e_t.jpg) + +Windows 10 seemed to dominate the headlines today, even in many Linux circles. Leading the pack is Brian Fagioli at betanews.com saying Windows 10 is ringing the death knell for Linux desktops. Microsoft announced today that Windows 10 will be free for loyal Windows users and Steven J. Vaughan-Nichols said it's the newest Open Source company. Then Matt Hartley compares Windows 10 to Ubuntu and Jesse Smith reviews Windows 10 from a Linux user's perspective. + +**Windows 10** was the talk around water coolers today with Microsoft's [announcement][1] that it would be free for Windows 7 and up users. Here in Linuxland, that didn't go unnoticed. Brian Fagioli at betanews.com, a self-proclaimed Linux fan, said today, "Windows 10 closes the door entirely. The year of the Linux desktop will never happen. Rest in peace." [Fagioli explained][2] that Microsoft listened to user complaints and not only addressed them but improved way beyond that. He said Linux missed the boat by failing to capitalize on the Windows 8 unpopularity and ultimate failure. Then he concluded that we on the fringe must accept our "shattered dreams" thanks to Windows 10. + +**H**owever, Jesse Smith, of Distrowatch.com fame, said Microsoft isn't making it easy to find the download, but it is possible and he did it. The installer was simple enough except for the partitioner, which was quite limited and almost scary. After finally getting into Windows 10, Smith said the layout was "sparce" without a lot of the distractions folks hated about 7. The menu is back and the start screen is gone. A new package manager looks a lot like Ubuntu's and Android's according to Smith, but requires an online Microsoft account to use. [Smith concludes][3] in part, "Windows 10 feels like a beta for an early version of Android, a consumer operating system that is designed to be on-line all the time. It does not feel like an operating system I would use to get work done." + +**S**mith's [full article][4] compares Windows 10 to Linux quite a bit, but Matt Hartley today posted an actual Windows 10 vs Linux report. [He said][5] both installers were straightforward and easy Windows still doesn't dual boot easily and Windows provides encryption by default but Ubuntu offers it as an option. At the desktop Hartley said Windows 10 "is struggling to let go of its Windows 8 roots." He thought the Windows Store looks more polished than Ubuntu's but didn't really like the "tile everything" approach to newly installed apps. In conclusion, Hartley said, "The first issue is that it's going to be a free upgrade for a lot of Windows users. This means the barrier to entry and upgrade is largely removed. Second, it seems this time Microsoft has really buckled down on listening to what their users want." + +**S**teven J. Vaughan-Nichols today said that Microsoft is the newest Open Source company; not because it's going to be releasing Windows 10 as a free upgrade but because Microsoft is changing itself from a software company to a software as a service company. And, according to Vaughan-Nichols, Microsoft needs Open Source to do it. They've been working on it for years beginning with Novell/SUSE. Not only that, they've been releasing software as Open Source as well (whatever the motives). [Vaughan-Nichols concluded][6], "Most people won't see it, but Microsoft -- yes Microsoft -- has become an open-source company." + +-------------------------------------------------------------------------------- + +via: http://ostatic.com/blog/windows-10-versus-linux + +作者:[Susan Linton][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ostatic.com/member/susan-linton +[1]:https://news.google.com/news/section?q=microsoft+windows+10+free&ie=UTF-8&oe=UTF-8 +[2]:http://betanews.com/2015/01/25/windows-10-is-the-final-nail-in-the-coffin-for-the-linux-desktop/ +[3]:http://blowingupbits.com/2015/01/an-outsiders-perspective-on-windows-10-preview/ +[4]:http://blowingupbits.com/2015/01/an-outsiders-perspective-on-windows-10-preview/ +[5]:http://www.datamation.com/open-source/windows-vs-linux-the-2015-version-1.html +[6]:http://www.zdnet.com/article/microsoft-the-open-source-company/ \ No newline at end of file From 00c9b5043f4935e6f9516c50fbc0325c15acc711 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 27 Jan 2015 16:48:43 +0800 Subject: [PATCH 016/104] =?UTF-8?q?20150127-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Tricks to Secure and Customize Websites.md | 422 ++++++++++++++++++ 1 file changed, 422 insertions(+) create mode 100644 sources/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md diff --git a/sources/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md b/sources/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md new file mode 100644 index 0000000000..e9e8ecb4eb --- /dev/null +++ b/sources/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md @@ -0,0 +1,422 @@ +25 Useful Apache ‘.htaccess’ Tricks to Secure and Customize Websites +================================================================================ +Websites are important parts of our lives. They serve the means to expand businesses, share knowledge and lots more. Earlier restricted to providing only static contents, with introduction of dynamic client and server side scripting languages and continued advancement of existing static language like html to html5, adding every bit of dynamicity is possible to the websites and what left is expected to follow soon in near future. + +With websites, comes the need of a unit that can display these websites to a huge set of audience all over the globe. This need is fulfilled by the servers that provide means to host a website. This includes a list of servers like: Apache HTTP Server, Joomla, and WordPress that allow one to host their websites. + +![Apache htaccess Tricks](http://www.tecmint.com/wp-content/uploads/2015/01/htaccess-tricks.jpg) +25 htaccess Tricks + +One who wants to host a website can create a local server of his own or can contact any of above mentioned or any another server administrator to host his website. But the actual issue starts from this point. Performance of a website depends mainly on following factors: + +- Bandwidth consumed by the website. +- How secure is the website against hackers. +- Optimism when it comes to data search through the database +- User-friendliness when it comes to displaying navigation menus and providing more UI features. + +Alongside this, various factors that govern success of servers in hosting websites are: + +- Amount of data compression achieved for a particular website. +- Ability to simultaneously serve multiple clients asking for a same or different website. +- Securing the confidential data entered on the websites like: emails, credit card details and so on. +- Allowing more and more options to enhance dynamicity to a website. + +This article deals with one such feature provided by the servers that help enhance performance of websites along with securing them from bad bots, hotlinks etc. i.e. ‘.htaccess‘ file. + +### What is .htaccess? ### + +htaccess (or hypertext access) are the files that provide options for website owners to control the server environment variables and other parameters to enhance functionality of their websites. These files can reside in any and every directory in the directory tree of the website and provide features to the directory and the files and folders inside it. + +What are these features? Well these are the server directives i.e. the lines that instruct server to perform a specific task, and these directives apply only to the files and folders inside the folder in which this file is placed. These files are hidden by default as all Operating System and the web servers are configured to ignore them by default but making the hidden files visible can make you see this very special file. What type of parameters can be controlled is the topic of discussion of subsequent sections. + +Note: If .htaccess file is placed in /apache/home/www/Gunjit/ directory then it will provide directives for all the files and folders in that directory, but if this directory contains another folder namely: /Gunjit/images/ which again has another .htaccess file then the directives in this folder will override those provided by the master .htaccess file (or file in the folder up in hierarchy). + +### Apache Server and .htaccess files ### + +Apache HTTP Server colloquially called Apache was named after a Native American Tribe Apache to respect its superior skills in warfare strategy. Build on C/C++ and XML it is cross-platform web server which is based on NCSA HTTPd server and has a key role in growth and advancement of World Wide Web. + +Most commonly used on UNIX, Apache is available for wide variety of platforms including FreeBSD, Linux, Windows, Mac OS, Novel Netware etc. In 2009, Apache became the first server to serve more than 100 million websites. + +Apache server has one .htaccess file per user in www/ directory. Although these files are hidden but can be made visible if required. In www/ directory there are a number of folders each pertaining to a website named on user’s or owner’s name. Apart from this you can have one .htaccess file in each folder which configured files in that folder as stated above. + +How to configure htaccess file on Apache server is as follows… + +### Configuration on Apache Server ### + +There can be two cases: + +#### Hosting website on own server #### + +In this case, if .htaccess files are not enabled, you can enable .htaccess files by simply going to httpd.conf (Default configuration file for Apache HTTP Daemon) and finding the section. + + + +And locate the line that says… + + AllowOverride None + +And correct it to. + + AllowOverride All + +Now, on restarting Apache, .htaccess will work. + +#### Hosting website on different hosting provider server #### + +In this case it is better to consult the hosting admin, if they allow access to .htaccess files. + +### 25 ‘.htaccess’ Tricks of Apache Web Server for Websites ### + +#### 1. How to enable mod_rewrite in .htaccess file #### + +mod_rewrite option allows you to use redirections and hiding your true URL with redirecting to some other URL. This option can prove very useful allowing you to replace the lengthy and long URL’s to short and easy to remember ones. + +To allow mod_rewrite just have a practice to add the following line as the first line of your .htaccess file. + + Options +FollowSymLinks + +This option allows you to follow symbolic links and thus enable the mod_rewrite option on the website. Replacing the URL with short and crispy one is presented later on. + +#### 2. How to Allow or Deny Access to Websites #### + +htaccess file can allow or deny access of website or a folder or files in the directory in which it is placed by using order, allow and deny keywords. + +**Allowing access to only 192.168.3.1 IP** + + Order Allow, Deny + Deny from All + Allow from 192.168.3.1 + + OR + + Order Allow, Deny + Allow from 192.168.3.1 + +Order keyword here specifies the order in which allow, deny access would be processed. For the above ‘Order’ statement, the Allow statements would be processed first and then the deny statements would be processed. + +**Denying access to only one IP Address** + +The below lines provide the means to allow access of the website to all the users accept one with IP Address: 192.168.3.1. + + rder Allow, Deny + Deny from 192.168.3.1 + Allow from All + + OR + + + Order Deny, Allow + Deny from 192.168.3.1 + +#### 3. Generate Apache Error documents for different error codes. #### + +Using some simple lines, we can fix the error document that run on different error codes generated by the server when user/client requests a page not available on the website like most of us would have seen the ‘404 Page not found’ page in their web browser. ‘.htaccess’ files specify what action to take in case of such error conditions. + +To do this, the following lines are needed to be added to the ‘.htaccess’ files: + + ErrorDocument + +‘ErrorDocument’ is a keyword, error-code can be any of 401, 403, 404, 500 or any valid error representing code and lastly, ‘path-of-document’ represents the path on the local machine (in case you are using your own local server) or on the server (in case you are using any other’s server to host your website). + +**Example:** + + ErrorDocument 404 /error-docs/error-404.html + +The above line sets the document ‘error-404.html’ placed in error-docs folder to be displayed in case the 404 error is reported by the server for any invalid request for a page by the client. + +rrorDocument 404 "404 Page not found

The page you request is not present. Check the URL you have typed

" + +The above representation is also correct which places the string representing a usual html file. + +#### 4. Setting/Unsetting Apache server environment variables #### + +In .htaccess file you can set or unset the global environment variables that server allow to be modified by the hosters of the websites. For setting or unsetting the environment variables you need to add the following lines to your .htaccess files. + +**Setting the Environment variables** + + SetEnv OWNER “Gunjit Khera” + +Unsetting the Environment variables + + UnsetEnv OWNER + +#### 5. Defining different MIME types for files #### + +MIME (Multipurpose Internet Multimedia Extensions) are the types that are recognized by the browser by default when running any web page. You can define MIME types for your website in .htaccess files, so that different types of files as defined by you can be recognized and run by the server. + + + AddType application/javascript js + AddType application/x-font-ttf ttf ttc + + +Here, mod_mime.c is the module for controlling definitions of different MIME types and if you have this module installed on your system then you can use this module to define different MIME types for different extensions used in your website so that server can understand them. + +#### 6. How to Limit the size of Uploads and Downloads in Apache #### + +.htaccess files allow you the feature to control the amount of data being uploaded or downloaded by a particular client from your website. For this you just need to append the following lines to your .htaccess file: + + php_value upload_max_filesize 20M + php_value post_max_size 20M + php_value max_execution_time 200 + php_value max_input_time 200 + +The above lines set maximum upload size, maximum size of data being posted, maximum execution time i.e. the maximum time the a user is allowed to execute a website on his local machine, maximum time constrain within on the input time. + +#### 7. Making Users to download .mp3 and other files before playing on your website. #### + +Mostly, people play songs on websites before downloading them to check the song quality etc. Being a smart seller you can add a feature that can come in very handy for you which will not let any user play songs or videos online and users have to download them for playing. This is very useful as online playing of songs and videos consumes a lot of bandwidth. + +Following lines are needed to be added to be added to your .htaccess file: + + AddType application/octet-stream .mp3 .zip + +#### 8. Setting Directory Index for Website #### + +Most of website developers would already know that the first page that is displayed i.e. the home page of a website is named as ‘index.html’ .Many of us would have seen this also. But how is this set? + +.htaccess file provides a way to list a set of pages which would be scanned in order when a client requests to visit home page of the website and accordingly any one of the listed set of pages if found would be listed as the home page of the website and displayed to the user. + +Following line is needed to be added to produce the desired effect. + + DirectoryIndex index.html index.php yourpage.php + +The above line specifies that if any request for visiting the home page comes by any visitor then the above listed pages will be searched in order in the directory firstly: index.html which if found will be displayed as the sites home page, otherwise list will proceed to the next page i.e. index.php and so on till the last page you have entered in the list. + +#### 9. How to enable GZip compression for Files to save site’s bandwidth. #### + +This is a common observation that heavy sites generally run bit slowly than light weight sites that take less amount of space. This is just because for a heavy site it takes time to load the huge script files and images before displaying them on the client’s web browser. + +This is a common mechanism that when a browser requests a web page, server provides the browser with that webpage and now to locally display that web page, the browser has to download that page and then run the script inside that page. + +What GZip compression does here is saving the time required to serve a single customer thus increasing the bandwidth. The source files of the website on the server are kept in compressed form and when the request comes from a user then these files are transferred in compressed form which are then uncompressed and executed on the server. This improves the bandwidth constrain. + +Following lines can allow you to compress the source files of your website but this requires mod_deflate.c module to be installed on your server. + + + AddOutputFilterByType DEFLATE text/plain + AddOutputFilterByType DEFLATE text/html + AddOutputFilterByType DEFLATE text/xml + AddOutputFilterByType DEFLATE application/html + AddOutputFilterByType DEFLATE application/javascript + AddOutputFilterByType DEFLATE application/x-javascript + + +#### 10. Playing with the File types. #### + +There are certain conditions that the server assumes by default. Like: .php files are run on the server, similarly .txt files say for example are meant to be displayed. Like this we can make some executable cgi-scripts or files to be simply displayed as the source code on our website instead of being executed. + +To do this observe the following lines from a .htaccess file. + + RemoveHandler cgi-script .php .pl .py + AddType text/plain .php .pl .py + +These lines tell the server that .pl (perl script), .php (PHP file) and .py (Python file) are meant to just be displayed and not executed as cgi-scripts. + +#### 11. Setting the Time Zone for Apache server #### + +The power and importance of .htaccess files can be seen by the fact that this can be used to set the Time Zone of the server accordingly. This can be done by setting a global Environment variable ‘TZ’ of the list of global environment variables that are provided by the server to each of the hosted website for modification. + +Due to this reason only, we can see time on the websites (that display it) according to our time zone. May be some other person hosting his website on the server would have the timezone set according to the location where he lives. + +Following lines set the Time Zone of the Server. + + SetEnv TZ India/Kolkata + +#### 12. How to enable Cache Control on Website #### + +A very interesting feature of browser, most have observed is that on opening one website simultaneously more than one time, the latter one opens fast as compared to the first time. But how is this possible? Well in this case, the browser stores some frequently visited pages in its cache for faster access later on. + +But for how long? Well this answer depends on you i.e. on the time you set in your .htaccess file for Cache control. The .htaccess file can specify the amount of time for which the pages of website can stay in the browser’s cache and after expiration of time, it must revalidate i.e. pages would be deleted from the Cache and recreated the next time user visits the site. + +Following lines implement Cache Control for your website. + + + Header Set Cache-Control "max-age=3600, public" + + + Header Set Cache-Control "public" + Header Set Expires "Sat, 24 Jan 2015 16:00:00 GMT" + + +The above lines allow caching of the pages which are inside the directory in which .htaccess files are placed for 1 hour. + +#### 13. Configuring a single file, the option. #### + +Usually the content in .htaccess files apply to all the files and folders inside the directory in which the file is placed, but you can also provide some special permissions to a special file, like denying access to that file only or so on. + +For this you need to add tag to your file in a way like this: + + + Order allow, deny + Deny from 188.100.100.0 + + +This is a simple case of denying a file ‘conf.html’ from access by IP 188.100.100.0, but you can add any or every feature described for .htaccess file till now including the features yet to be described to the file like: Cache-control, GZip compression. + +This feature is used by most of the servers to secure .htaccess files which is the reason why we are not able to see the .htaccess files on the browsers. How the files are authenticated is demonstrated in subsequent heading. + +#### 14. Enabling CGI scripts to run outside of cgi-bin folder. #### + +Usually servers run CGI scripts that are located inside the cgi-bin folder but, you can enable running of CGI scripts located in your desired folder but just adding following lines to .htaccess file located in the desired folder and if not, then creating one, appending following lines: + + AddHandler cgi-script .cgi + Options +ExecCGI + +#### 15. How to enable SSI on Website with .htaccess #### + +Server side includes as the name suggests would be related to something included at the server side. But what? Generally when we have many pages in our website and we have a navigation menu on our home page that displays links to other pages then, we can enable SSI (Server Size Includes) option that allows all the pages displayed in the navigation menu to be included with the home page completely. + +The SSI allows inclusion of multiple pages as if content they contain is a part of a single page so that any editing needed to be done is done in one file only which saves a lot of disk space. This option is by default enabled on servers but for .shtml files. + +In case you want to enable it for .html files you need to add following lines: + + AddHandler server-parsed .html + +After this following in the html file would lead to SSI. + + + +#### 16. How to Prevent website Directory Listing #### + +To prevent any client being able to list the directories of the website on the server at his local machine add following lines to the file inside the directory you don’t want to get listed. + + Options -Indexes + +#### 17. Changing Default charset and language headers. #### + +.htaccess files allow you to modify the character set used i.e. ASCII or UNICODE, UTF-8 etc. for your website along with the default language used for the display of content. + +Following server’s global environment variables allow you to achieve above feature. + + AddDefaultCharset UTF-8 + DefaultLanguage en-US + +**Re-writing URL’s: Redirection Rules** + +Re-writing feature simply means replacing the long and un-rememberable URL’s with short and easy to remember ones. But, before going into this topic there are some rules and some conventions for special symbols used later on in this article. + +**Special Symbols:** + + Symbol Meaning + ^ - Start of the string + $ - End of the String + | - Or [a|b] – a or b + [a-z] - Any of the letter between a to z + + - One or more occurrence of previous letter + * - Zero or more occurrence of previous letter + ? - Zero or one occurrence of previous letter + +**Constants and their meaning:** + + Constant Meaning + NC - No-case or case sensitive + L - Last rule – stop processing further rules + R - Temporary redirect to new URL + R=301 - Permanent redirect to new URL + F - Forbidden, send 403 header to the user + P - Proxy – grab remote content in substitution section and return it + G - Gone, no longer exists + S=x - Skip next x rules + T=mime-type - Force specified MIME type + E=var:value - Set environment variable var to value + H=handler - Set handler + PT - Pass through – in case of URL’s with additional headers. + QSA - Append query string from requested to substituted URL + +#### 18. Redirecting a non-www URL to a www URL. #### + +Before starting with the explanation, lets first see the lines that are needed to be added to .htaccess file to enable this feature. + + RewriteEngine ON + RewriteCond %{HTTP_HOST} ^abc\.net$ + RewriteRule (.*) http://www.abc.net/$1 [R=301,L] + +The above lines enable the Rewrite Engine and then in second line check all those URL’s that pertain to host abc.net or have the HTTP_HOST environment variable set to “abc.net”. + +For all such URL’s the code permanently redirects them (as R=301 rule is enabled) to the new URL http://www.abc.net/$1 where $1 is the non-www URL having host as abc.net. The non-www URL is the one in bracket and is referred by $1. + +#### 19. Redirecting entire website to https. #### + +Following lines will help you transfer entire website to https: + + RewriteEngine ON + RewriteCond %{HTTPS} !on + RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} + +The above lines enable the re-write engine and then check the value of HTTPS environment variable. If it is on then re-write the entire pages of the website to https. + +#### 20. A custom redirection example #### + +For example, redirect url ‘http://www.abc.net?p=100&q=20 ‘ to ‘http://www.abc.net/10020pq’. + + RewriteEngine ON + RewriteRule ^http://www.abc.net/([0-9]+)([0-9]+)pq$ ^http://www.abc.net?p=$1&q=$2 + +In above lines, $1 represents the first bracket and $2 represents the second bracket. + +#### 21. Renaming the htaccess file #### + +For preventing the .htaccess file from the intruders and other people from viewing those files you can rename that file so that it is not accessed by client’s browser. The line that does this is: + + AccessFileName htac.cess + +#### 22. How to Prevent Image Hotlinking for your Website #### + +Another problem that is major factor of large bandwidth consumption by the websites is the problem of hot links which are links to your websites by other websites for display of images mostly of your website which consumes your bandwidth. This problem is also called as ‘bandwidth theft’. + +A common observation is when a site displays the image contained in some other site due to this hot-linking your site needs to be loaded and at the stake of your site’s bandwidth, the other site’s images are displayed. To prevent this for like: images such as: .gif, .jpeg etc. following lines of code would help: + + RewriteEngine ON + RewriteCond %{HTTP_REFERER} !^$ + RewriteCond %{HTTP_REFERERER} !^http://(www\.)?mydomain.com/.*$ [NC] + RewriteRule \.(gif|jpeg|png)$ - [F]. + +The above lines check if the HTTP_REFERER is not set to blank or not set to any of the links in your websites. If this is happening then all the images in your page are replaced by 403 forbidden. + +#### 23. How to Redirect Users to Maintenance Page. #### + +In case your website is down for maintenance and you want to notify all your clients that need to access your websites about this then for such cases you can add following lines to your .htaccess websites that allow only admin access and replace the site pages having links to any .jpg, .css, .gif, .js etc. + + RewriteCond %{REQUEST_URI} !^/admin/ [NC] + RewriteCond %{REQUEST_URI} !^((.*).css|(.*).js|(.*).png|(.*).jpg) [NC] + RewriteRule ^(.*)$ /ErrorDocs/Maintainence_Page.html + [NC,L,U,QSA] + +These lines check if the Requested URL contains any request for any admin page i.e. one starting with ‘/admin/’ or any request to ‘.png, .jpg, .js, .css’ pages and for any such requests it replaces that page to ‘ErrorDocs/Maintainence_Page.html’. + +#### 24. Mapping IP Address to Domain Name #### + +Name servers are the servers that convert a specific IP Address to a domain name. This mapping can also be specified in the .htaccess files in the following manner. + + For Mapping L.M.N.O address to a domain name www.hellovisit.com + RewriteCond %{HTTP_HOST} ^L\.M\.N\.O$ [NC] + RewriteRule ^(.*)$ http://www.hellovisit.com/$1 [L,R=301] + +The above lines check if the host for any page is having the IP Address as: L.M.N.O and if so the page is mapped to the domain name http://www.hellovisit.com by the third line by permanent redirection. + +#### 25. FilesMatch Tag #### + +Like tag that is used to apply conditions to a single file, can be used to match to a group of files and apply some conditions to the group of files as below: + + + Order Allow, Deny + Deny from All + + +### Conclusion ### + +The list of tricks that can be done with .htaccess files is much more. Thus, this gives us an idea how powerful this file is and how much security and dynamicity and other features it can give to your website. + +We’ve tried our best to cover as much as htaccess tricks in this article, but incase if we’ve missed any important trick, or you most welcome to post your htaccess ideas and tricks that you know via comments section below – we will include those in our article too… + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/apache-htaccess-tricks/ + +作者:[Gunjit Khera][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gunjitk94/ \ No newline at end of file From 32d3f3d3d248134f677a669ca45c4f938a2e4c79 Mon Sep 17 00:00:00 2001 From: Ping Date: Tue, 27 Jan 2015 16:40:52 +0800 Subject: [PATCH 017/104] Translated by Ping --- ...ers--How to check memory usage on Linux.md | 113 ------------------ ...ers--How to check memory usage on Linux.md | 113 ++++++++++++++++++ 2 files changed, 113 insertions(+), 113 deletions(-) delete mode 100644 sources/tech/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md create mode 100644 translated/tech/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md diff --git a/sources/tech/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md b/sources/tech/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md deleted file mode 100644 index 0ed5ab4394..0000000000 --- a/sources/tech/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md +++ /dev/null @@ -1,113 +0,0 @@ -Ping Translating - -Linux FAQs with Answers--How to check memory usage on Linux -================================================================================ -> **Question**: I would like to monitor memory usage on my Linux system. What are the available GUI-based or command-line tools for checking current memory usage of Linux? - -When it comes to optimizing the performance of a Linux system, physical memory is the single most important factor. Naturally, Linux offers a wealth of options to monitor the usage of the precious memory resource. Different tools vary in terms of their monitoring granularity (e.g., system-wide, per-process, per-user), interface (e.g., GUI, command-line, ncurses) or running mode (e.g., interactive, batch mode). - -Here is a non-exhaustive list of GUI or command-line tools to choose from to check used and free memory on Linux platform. - -### 1. /proc/meminfo ### - -The simpliest method to check RAM usage is via /proc/meminfo. This dynamically updated virtual file is actually the source of information displayed by many other memory related tools such as free, top and ps tools. From the amount of available/free physical memory to the amount of buffer waiting to be or being written back to disk, /proc/meminfo has everything you want to know about system memory usage. Process-specific memory information is also available from /proc//statm and /proc//status - - $ cat /proc/meminfo - -![](https://farm8.staticflickr.com/7483/15989497899_bb6afede11_b.jpg) - -### 2. atop ### - -The atop command is an ncurses-based interactive system and process monitor for terminal environments. It shows a dynamically-updated summary of system resources (CPU, memory, network, I/O, kernel), with colorized warnings in case of high system load. It also offers a top-like view of processes (or users) along with their resource usage, so that system admin can tell which processes or users are responsible for system load. Reported memory statistics include total/free memory, cached/buffer memory and committed virtual memory. - - $ sudo atop - -![](https://farm8.staticflickr.com/7552/16149756146_893773b84c_b.jpg) - -### 3. free ### - -The free command is a quick and easy way to get an overview of memory usage gleaned from /proc/meminfo. It shows a snapshot of total/free physical memory and swap space of the system, as well as used/free buffer space in the kernel. - - $ free -h -![](https://farm8.staticflickr.com/7531/15988117988_ba8c6b7b63_b.jpg) - -### 4. GNOME System Monitor ### - -GNOME System Monitor is a GUI application that shows a short history of system resource utilization for CPU, memory, swap space and network. It also offers a process view of CPU and memory usage. - - $ gnome-system-monitor - -![](https://farm8.staticflickr.com/7539/15988118078_279f0da494_c.jpg) - -### 5. htop ### - -The htop command is an ncurses-based interactive processor viewer which shows per-process memory usage in real time. It can report resident memory size (RSS), total program size in memory, library size, shared page size, and dirty page size for all running processes. You can scroll the (sorted) list of processes horizontally or vertically. - - $ htop - -![](https://farm9.staticflickr.com/8236/8599814378_de071de408_c.jpg) - -### 6. KDE System Monitor ### - -While GNOME desktop has GNOME System Monitor, KDE desktop has its own counterpart: KDE System Monitor. Its functionality is mostly similar to GNOME version, i.e., showing a real-time history of system resource usage, as well as a process list along with per-process CPU/memory consumption. - - $ ksysguard - -![](https://farm8.staticflickr.com/7479/15991397329_ec5d786ffd_c.jpg) - -### 7. memstat ### - -The memstat utility is useful to identify which executable(s), process(es) and shared libraries are consuming virtual memory. Given a process ID, memstat identifies how much virtual memory is used by the process' associated executable, data, and shared libraries. - - $ memstat -p - -![](https://farm8.staticflickr.com/7518/16175635905_1880e50055_b.jpg) - -### 8. nmon ### - -The nmon utility is an ncurses-based system benchmark tool which can monitor CPU, memory, disk I/O, kernel, filesystem and network resources in interactive mode. As for memory usage, it can show information such as total/free memory, swap space, buffer/cached memory, virtual memory page in/out statistics, all in real time. - - $ nmon - -![](https://farm9.staticflickr.com/8648/15989760117_30f62f4aba_b.jpg) - -### 9. ps ### - -The ps command can show per-process memory usage in real-time. Reported memory usage information includes %MEM (percent of physical memory used), VSZ (total amount of virtual memory used), and RSS (total amount of physical memory used). You can sort the process list by using "--sort" option. For example, to sort in the decreasing order of RSS: - - $ ps aux --sort -rss - -![](https://farm9.staticflickr.com/8602/15989881547_ca40839c19_c.jpg) - -### 10. smem ### - -The [smem][1] command allows you to measure physical memory usage by different processes and users based on information available from /proc. It utilizes proportional set size (PSS) metric to accurately quantify effective memory usage of Linux processes. Memory usage analysis can be exported to graphical charts such as bar and pie graphs. - - $ sudo smem --pie name -c "pss" - -![](https://farm8.staticflickr.com/7466/15614838428_eed7426cfe_c.jpg) - -### 11. top ### - -The top command offers a real-time view of running processes, along with various process-specific resource usage statistics. Memory related information includes %MEM (memory utilization percentage), VIRT (total amount of virtual memory used), SWAP (amount of swapped-out virtual memory), CODE (amount of physical memory allocated for code execution), DATA (amount of physical memory allocated to non-executable data), RES (total amount of physical memory used; CODE+DATA), and SHR (amount of memory potentially shared with other processes). You can sort the process list based on memory usage or size. - -![](https://farm8.staticflickr.com/7464/15989760047_eb8d51d9f2_c.jpg) - -### 12. vmstat ### - -The vmstat command-line utility displays instantaneous and average statistics of various system activities covering CPU, memory, interrupts, and disk I/O. As for memory information, the command shows not only physical memory usage (e.g., tota/used memory and buffer/cache memory), but also virtual memory statistics (e.g., memory paged in/out, swapped in/out). - - $ vmstat -s - -![](https://farm9.staticflickr.com/8582/15988236860_3f142008d2_b.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/check-memory-usage-linux.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://xmodulo.com/visualize-memory-usage-linux.html \ No newline at end of file diff --git a/translated/tech/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md b/translated/tech/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md new file mode 100644 index 0000000000..a04fdb1f52 --- /dev/null +++ b/translated/tech/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md @@ -0,0 +1,113 @@ +Linux有问必答:如何检查Linux的内存使用状况 +================================================================================ + +>**问题**:我想要监测Linux系统的内存使用状况。有哪些可用的图形界面或者命令行工具来检查当前内存使用情况? + +当涉及到Linux系统性能优化的时候,物理内存是一个最重要的因素。自然的,Linux提供了丰富的选择来监测对于珍贵的内存资源的使用。不同的工具,在监测粒度(例如:全系统范围, 每个进程, 每个用户),接口(例如:图形用户界面, 命令行, ncurses)或者运行模式(交互模式, 批量处理模式)上都不尽相同。 + +下面是一个可供选择的但并不全面的图形或命令行工具列表,这些工具用来检查并且释放Linux平台中内存。 + +### 1. /proc/meminfo ### + +一种最简单的方法是通过“/proc/meminfo”来检查内存使用状况。这个动态更新的虚拟文件事实上是许多信息资源的集中展示,这些资源来自于诸如free,top和ps这些与内存相关的工具。从可用/闲置物理内存数量到等待被写入缓存的数量或者已写回磁盘的数量,只要是你想要的关于内存使用的信息,“/proc/meminfo”应有尽有。特定进程的内存信息也可以通过“/proc//statm”和“/proc//status”来获取。 + + $ cat /proc/meminfo + +![](https://farm8.staticflickr.com/7483/15989497899_bb6afede11_b.jpg) + +### 2. atop ### + +atop命令是用于终端环境的基于ncurses的交互系统和进程监测工具。它展示了动态更新的系统资源(中央处理器, 内存, 网络, 输入/输出, 内核)摘要,并且用醒目的颜色将高系统负载的警告信息标注出来。它同样提供了类似于top的线程(或用户)资源使用视图,因此系统管理员可以指出哪个进程或者用户对系统负载负责。内存统计报告包括了总计/闲置内存,缓存的/缓冲的内存 和 提交的虚拟内存。 + + $ sudo atop + +![](https://farm8.staticflickr.com/7552/16149756146_893773b84c_b.jpg) + +### 3. free ### + +free命令是一个用来获得内存使用概况的快速简单的方法,这些信息从“/proc/meminfo”获取。它提供了一个快照用于展示总计/闲置的物理内存和系统交换区,以及已使用/闲置的内核缓冲区。 + + $ free -h + +![](https://farm8.staticflickr.com/7531/15988117988_ba8c6b7b63_b.jpg) + +### 4. GNOME System Monitor ### + +GNOME System Monitor 是一个图形界面应用,它展示了包括中央处理器,内存,交换区和网络在内的系统资源使用率的短暂历史记录。它同时也可以提供一个带有中央处理器和内存使用情况的进程视图。 + + $ gnome-system-monitor + +![](https://farm8.staticflickr.com/7539/15988118078_279f0da494_c.jpg) + +### 5. htop ### + +htop命令是一个基于ncurses的交互处理视图,它实时展示了每个进程的内存使用情况。它可以报告所有运行中进程的常驻内存大小(RSS)、内存中程序的总大小、库大小、共享文件大小、和脏页面大小。你可以横向或者纵向滚动进程列表进行查看。 + + $ htop + +![](https://farm9.staticflickr.com/8236/8599814378_de071de408_c.jpg) + +### 6. KDE System Monitor ### + +就像GNOME桌面拥有GNOME System Monitor一样,KDE桌面也有它自己的对口应用:KDE System Monitor。这个工具的功能与GNOME版本极其相似,也就是说,它同样展示了一个关于系统资源使用情况,以及带有每个进程的中央处理器/内存消耗情况的实时历史记录。 + + $ ksysguard + +![](https://farm8.staticflickr.com/7479/15991397329_ec5d786ffd_c.jpg) + +### 7. memstat ### + +memstat工具对于识别正在消耗虚拟内存的可执行文件、进程和共享库非常有用。给出一个进程识别号,memstat即可识别出与之相关联的可执行文件、数据和共享库究竟使用了多少虚拟内存。 + + $ memstat -p + +![](https://farm8.staticflickr.com/7518/16175635905_1880e50055_b.jpg) + +### 8. nmon ### + +nmon工具是一个基于ncurses系统基准测试工具,它能够以交互方式监测中央处理器、内存、磁盘输入/输出、内核、文件系统以及网络资源。对于内存使用状况而言,它能够展示像总计/闲置内存、交换区、缓冲的/缓存的内存,虚拟内存页面输入输出统计,所有这些都是实时的。 + + $ nmon + +![](https://farm9.staticflickr.com/8648/15989760117_30f62f4aba_b.jpg) + +### 9. ps ### + +ps命令能够实时展示每个进程的内存使用状况。内存使用报告里包括了 %MEM (物理内存使用百分比), VSZ (虚拟内存使用总量), and RSS (物理内存使用总量)。你可以使用“--sort”选项来对进程列表排序。例如,按照RSS降序排序: + + $ ps aux --sort -rss + +![](https://farm9.staticflickr.com/8602/15989881547_ca40839c19_c.jpg) + +### 10. smem ### + +[smem][1]命令允许你测定不同进程和用户的物理内存使用状况,这些信息来源于“/proc”目录。它利用比例设置大小(PSS)指标来精确量化Linux进程的有效内存使用情况。内存使用分析能够扩展成为柱状图或者饼图类的图形化图表。 + + $ sudo smem --pie name -c "pss" + +![](https://farm8.staticflickr.com/7466/15614838428_eed7426cfe_c.jpg) + +### 11. top ### + +top命令提供了一个运行中进程的实时视图,以及特定进程的各种资源使用统计信息。与内存相关的信息包括 %MEM (内存使用率), VIRT (虚拟内存使用总量), SWAP (交换出的虚拟内存使用量), CODE (分配给代码执行的物理内存数量), DATA (分配给无需执行的数据的物理内存数量), RES (物理内存使用总量; CODE+DATA), and SHR (有可能与其他进程共享的内存数量).你能够基于内存使用情况或者大小对进程列表进行排序。 + +![](https://farm8.staticflickr.com/7464/15989760047_eb8d51d9f2_c.jpg) + +### 12. vmstat ### + +vmstat命令行工具显示涵盖了中央处理器、内存、中断和磁盘输入/输出在内的各种系统活动的瞬时和平均统计数据。对于内存信息而言,命令不仅仅展示了物理内存使用情况(例如总计/已使用内存和缓冲的/缓存的内存),还同样展示了虚拟内存统计数据(例如,内存的页输入/输出,交换输入/输出) + + $ vmstat -s + +![](https://farm9.staticflickr.com/8582/15988236860_3f142008d2_b.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/check-memory-usage-linux.html + +译者:[Ping](https://github.com/mr-ping) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://xmodulo.com/visualize-memory-usage-linux.html \ No newline at end of file From 164091f5c507fd73180580fe6b9a7603e5f14984 Mon Sep 17 00:00:00 2001 From: Ping Date: Tue, 27 Jan 2015 16:54:56 +0800 Subject: [PATCH 018/104] Ping Translating --- ...0150126 iptraf--A TCP or UDP Network Monitoring Utility.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md b/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md index cc6badecc2..f39d53a47d 100644 --- a/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md +++ b/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md @@ -1,3 +1,5 @@ +Ping -- Translating + iptraf: A TCP/UDP Network Monitoring Utility ================================================================================ [iptraf][1] is an ncurses-based IP LAN monitor that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others. @@ -61,4 +63,4 @@ via: http://www.unixmen.com/iptraf-tcpudp-network-monitoring-utility/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.unixmen.com/author/seth/ -[1]:http://iptraf.seul.org/about.html \ No newline at end of file +[1]:http://iptraf.seul.org/about.html From 16571b7dff5621e08eb55fa98dd93adf334b599f Mon Sep 17 00:00:00 2001 From: su-kaiyao <1250471161@qq.com> Date: Tue, 27 Jan 2015 17:41:57 +0800 Subject: [PATCH 019/104] =?UTF-8?q?=E5=AF=92=E5=81=87=E5=88=B0=E4=BA=86?= =?UTF-8?q?=EF=BC=8C=E9=A2=86=E4=B8=80=E7=AF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...150125 4 Best Modern Open Source Code Editors For Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150125 4 Best Modern Open Source Code Editors For Linux.md b/sources/share/20150125 4 Best Modern Open Source Code Editors For Linux.md index d3ed7d6dd9..43ff7e9877 100644 --- a/sources/share/20150125 4 Best Modern Open Source Code Editors For Linux.md +++ b/sources/share/20150125 4 Best Modern Open Source Code Editors For Linux.md @@ -1,3 +1,5 @@ +su-kaiyao translating + 4 Best Modern Open Source Code Editors For Linux ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Best_Open_Source_Editors.jpeg) @@ -83,4 +85,4 @@ via: http://itsfoss.com/best-modern-open-source-code-editors-for-linux/ [12]:http://lighttable.com/ [13]:https://github.com/LightTable/LightTable [14]:http://itsfoss.com/notepadqq-notepad-for-linux/ -[15]:http://itsfoss.com/scite-the-notepad-for-linux/ \ No newline at end of file +[15]:http://itsfoss.com/scite-the-notepad-for-linux/ From 68c7c4c0fe65ac2a318172917e03781cfb602f47 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 27 Jan 2015 20:32:00 +0800 Subject: [PATCH 020/104] PUB:20150121 Linux FAQs with Answers--How to boot into command line on Ubuntu or Debian @geekpi --- ...t into command line on Ubuntu or Debian.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150121 Linux FAQs with Answers--How to boot into command line on Ubuntu or Debian.md (68%) diff --git a/translated/tech/20150121 Linux FAQs with Answers--How to boot into command line on Ubuntu or Debian.md b/published/20150121 Linux FAQs with Answers--How to boot into command line on Ubuntu or Debian.md similarity index 68% rename from translated/tech/20150121 Linux FAQs with Answers--How to boot into command line on Ubuntu or Debian.md rename to published/20150121 Linux FAQs with Answers--How to boot into command line on Ubuntu or Debian.md index 64cb1b36e0..93bca3583c 100644 --- a/translated/tech/20150121 Linux FAQs with Answers--How to boot into command line on Ubuntu or Debian.md +++ b/published/20150121 Linux FAQs with Answers--How to boot into command line on Ubuntu or Debian.md @@ -1,30 +1,30 @@ -Linux 有问必答:如何在Ubuntu或者Debian中启动进入命令行 +Linux 有问必答:如何在Ubuntu或者Debian中启动后进入命令行 ================================================================================ > **提问**:我运行的是Ubuntu桌面,但是我希望启动后临时进入命令行。有什么简便的方法可以启动进入终端? -Linux桌面自带了一个显示管理器(比如:GDM、KDM、LightDM),它们可以让计算机启动自动进入一个基于GUI的登录环境。然而,如果你要直接启动进入终端怎么办? 比如,你在排查桌面相关的问题或者想要运行一个不需要GUI的发行程序。 +Linux桌面自带了一个显示管理器(比如:GDM、KDM、LightDM),它们可以让计算机启动自动进入一个基于GUI的登录环境。然而,如果你要直接启动进入终端怎么办? 比如,你在排查桌面相关的问题或者想要运行一个不需要GUI的应用程序。 -注意你可以通过按下Ctrl+Alt+F1到F6临时从桌面GUI切换到虚拟终端。然而,在本例中你的桌面GUI仍在后台运行,这不同于纯文本模式启动。 +注意虽然你可以通过按下Ctrl+Alt+F1到F6临时从桌面GUI切换到虚拟终端。然而,在这种情况下你的桌面GUI仍在后台运行,这不同于纯文本模式启动。 在Ubuntu或者Debian桌面中,你可以通过传递合适的内核参数在启动时启动文本模式。 ### 启动临时进入命令行 ### -如果你想要禁止桌面GUI并只有一次进入文本模式,你可以使用GRUB菜单。 +如果你想要禁止桌面GUI并临时进入一次文本模式,你可以使用GRUB菜单。 首先,打开你的电脑。当你看到初始的GRUB菜单时,按下‘e’。 ![](https://farm8.staticflickr.com/7490/16112246542_bc1875a397_z.jpg) -接着会进入下一屏,这里你可以修改内核启动选项。向下滚动到以“linux”开始的行,这里就是内核参数的列表。删除列表中的“quiet”和“splash”。在列表中添加“text”。 +接着会进入下一屏,这里你可以修改内核启动选项。向下滚动到以“linux”开始的行,这里就是内核参数的列表。删除参数列表中的“quiet”和“splash”。在参数列表中添加“text”。 ![](https://farm8.staticflickr.com/7471/15493282603_8a70f70af2_z.jpg) -升级的内核选项列表看上去像这样。按下Ctrl+x继续启动。这会一次性以详细模式启动控制台。 +升级的内核选项列表看上去像这样。按下Ctrl+x继续启动。这会以详细模式启动控制台一次(LCTT译注:由于没有保存修改,所以下次重启还会进入 GUI)。 ![](https://farm8.staticflickr.com/7570/15925676530_b11af59243_z.jpg) -永久启动进入命令行。 +### 永久启动进入命令行 ### 如果你想要永久启动进入命令行,你需要[更新定义了内核启动参数GRUB设置][1]。 @@ -32,7 +32,7 @@ Linux桌面自带了一个显示管理器(比如:GDM、KDM、LightDM), $ sudo vi /etc/default/grub -查找以GRUB_CMDLINE_LINUX_DEFAULT开头的行,并用“#”注释这行。这会禁止初始屏幕,而启动详细模式(也就是说显示详细的的启动过程)。 +查找以GRUB\_CMDLINE\_LINUX\_DEFAULT开头的行,并用“#”注释这行。这会禁止初始屏幕,而启动详细模式(也就是说显示详细的的启动过程)。 更改GRUB_CMDLINE_LINUX="" 成: @@ -48,7 +48,7 @@ Linux桌面自带了一个显示管理器(比如:GDM、KDM、LightDM), $ sudo update-grub -这时,你的桌面应该从GUI启动切换到控制台启动了。可以通过重启验证。 +这时,你的桌面应该可以从GUI启动切换到控制台启动了。可以通过重启验证。 ![](https://farm8.staticflickr.com/7518/16106378151_81ac6b5a49_b.jpg) @@ -57,7 +57,7 @@ Linux桌面自带了一个显示管理器(比如:GDM、KDM、LightDM), via: http://ask.xmodulo.com/boot-into-command-line-ubuntu-debian.html 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 47913d0680c69a8446d671c8f89e9fb1fdb9d76a Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 27 Jan 2015 20:52:18 +0800 Subject: [PATCH 021/104] PUB:How to filter, split or merge pcap files on Linux @SPccman --- ...ter, split or merge pcap files on Linux.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/tech => published}/How to filter, split or merge pcap files on Linux.md (61%) diff --git a/translated/tech/How to filter, split or merge pcap files on Linux.md b/published/How to filter, split or merge pcap files on Linux.md similarity index 61% rename from translated/tech/How to filter, split or merge pcap files on Linux.md rename to published/How to filter, split or merge pcap files on Linux.md index 3c3335544d..82caa80cbd 100644 --- a/translated/tech/How to filter, split or merge pcap files on Linux.md +++ b/published/How to filter, split or merge pcap files on Linux.md @@ -1,7 +1,7 @@ Linux下如何过滤、分割以及合并 pcap 文件 ============= -如果你是个网络管理员,并且你的工作包括测试一个[入侵侦测系统][1]或一些网络访问控制策略,那么你通常需要抓取数据包并且在离线状态下分析这些文件。当需要保存捕获的数据包时,我们会想到 libpcap 的数据包格式被广泛使用于许多开源的嗅探工具以及捕包程序。如果 pcap 文件被用于入侵测试或离线分析的话,那么在将他们[注入][2]网络之前通常要先对 pcap 文件进行一些操作。 +如果你是一个测试[入侵侦测系统][1]或一些网络访问控制策略的网络管理员,那么你经常需要抓取数据包并在离线状态下分析这些文件。当需要保存捕获的数据包时,我们一般会存储为 libpcap 的数据包格式 pcap,这是一种被许多开源的嗅探工具以及捕包程序广泛使用的格式。如果 pcap 文件被用于入侵测试或离线分析的话,那么在将他们[注入][2]网络之前通常要先对 pcap 文件进行一些操作。 ![](https://farm8.staticflickr.com/7570/15425147404_a69f416673_c.jpg) @@ -9,9 +9,9 @@ Linux下如何过滤、分割以及合并 pcap 文件 ### Editcap 与 Mergecap### -Wireshark,是最受欢迎的 GUI 嗅探工具,实际上它来源于一套非常有用的命令行工具集。其中包括 editcap 与 mergecap。editcap 是一个万能的 pcap 编辑器,它可以过滤并且能以多种方式来分割 pcap 文件。mergecap 可以将多个 pcap 文件合并为一个。 这篇文章就是基于这些 Wireshark 命令行工具。 +Wireshark,是最受欢迎的 GUI 嗅探工具,实际上它带了一套非常有用的命令行工具集。其中包括 editcap 与 mergecap。editcap 是一个万能的 pcap 编辑器,它可以过滤并且能以多种方式来分割 pcap 文件。mergecap 可以将多个 pcap 文件合并为一个。 这篇文章就是基于这些 Wireshark 命令行工具的。 -如果你已经安装过Wireshark了,那么这些工具已经在你的系统中了。如果还没装的话,那么我们接下来就安装 Wireshark 命令行工具。 需要注意的是,在基于 Debian 的发行版上我们可以不用安装 Wireshark GUI 而仅安装 命令行工具,但是在 Red Hat 及 基于它的发行版中则需要安装整个 Wireshark 包。 +如果你已经安装过 Wireshark 了,那么这些工具已经在你的系统中了。如果还没装的话,那么我们接下来就安装 Wireshark 命令行工具。 需要注意的是,在基于 Debian 的发行版上我们可以不用安装 Wireshark GUI 而仅安装命令行工具,但是在 Red Hat 及 基于它的发行版中则需要安装整个 Wireshark 包。 **Debian, Ubuntu 或 Linux Mint** @@ -27,15 +27,15 @@ Wireshark,是最受欢迎的 GUI 嗅探工具,实际上它来源于一套非 通过 editcap, 我们能以很多不同的规则来过滤 pcap 文件中的内容,并且将过滤结果保存到新文件中。 -首先,以“起止时间”来过滤 pcap 文件。 " - A < start-time > and " - B < end-time > 选项可以过滤出处在这个时间段到达的数据包(如,从 2:30 ~ 2:35)。时间的格式为 “ YYYY-MM-DD HH:MM:SS"。 +首先,以“起止时间”来过滤 pcap 文件。 " - A < start-time > 和 " - B < end-time > 选项可以过滤出在这个时间段到达的数据包(如,从 2:30 ~ 2:35)。时间的格式为 “ YYYY-MM-DD HH:MM:SS"。 - $ editcap -A '2014-12-10 10:11:01' -B '2014-12-10 10:21:01' input.pcap output.pcap + $ editcap -A '2014-12-10 10:11:01' -B '2014-12-10 10:21:01' input.pcap output.pcap 也可以从某个文件中提取指定的 N 个包。下面的命令行从 input.pcap 文件中提取100个包(从 401 到 500)并将它们保存到 output.pcap 中: $ editcap input.pcap output.pcap 401-500 -使用 "-D< dup-window >" (dup-window可以看成是对比的窗口大小,仅与此范围内的包进行对比)选项可以提取出重复包。每个包都依次与它之前的 < dup-window > -1 个包对比长度与MD5值,如果有匹配的则丢弃。 +使用 "-D < dup-window >" (dup-window可以看成是对比的窗口大小,仅与此范围内的包进行对比)选项可以提取出重复包。每个包都依次与它之前的 < dup-window > -1 个包对比长度与MD5值,如果有匹配的则丢弃。 $ editcap -D 10 input.pcap output.pcap @@ -71,13 +71,13 @@ Wireshark,是最受欢迎的 GUI 嗅探工具,实际上它来源于一套非 如果要忽略时间戳,仅仅想以命令行中的顺序来合并文件,那么使用 -a 选项即可。 -例如,下列命令会将 input.pcap文件的内容写入到 output.pcap, 并且将 input2.pcap 的内容追加在后面。 +例如,下列命令会将 input.pcap 文件的内容写入到 output.pcap, 并且将 input2.pcap 的内容追加在后面。 $ mergecap -a -w output.pcap input.pcap input2.pcap ###总结### -在这篇指导中,我演示了多个 editcap、 mergecap 操作 pcap 文件的案例。除此之外,还有其它的相关工具,如 [reordercap][3]用于将数据包重新排序,[text2pcap][4] 用于将pcap 文件转换为 文本格式, [pcap-diff][5]用于比较 pcap 文件的异同,等等。当进行网络入侵测试及解决网络问题时,这些工具与[包注入工具][6]非常实用,所以最好了解他们。 +在这篇指导中,我演示了多个 editcap、 mergecap 操作 pcap 文件的例子。除此之外,还有其它的相关工具,如 [reordercap][3]用于将数据包重新排序,[text2pcap][4] 用于将 pcap 文件转换为文本格式, [pcap-diff][5]用于比较 pcap 文件的异同,等等。当进行网络入侵测试及解决网络问题时,这些工具与[包注入工具][6]非常实用,所以最好了解他们。 你是否使用过 pcap 工具? 如果用过的话,你用它来做过什么呢? @@ -86,8 +86,8 @@ Wireshark,是最受欢迎的 GUI 嗅探工具,实际上它来源于一套非 via: http://xmodulo.com/filter-split-merge-pcap-linux.html 作者:[Dan Nanni][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/) 荣誉推出 From 611bccf6a542e4d2a6a27434359339e579f91402 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 27 Jan 2015 21:24:24 +0800 Subject: [PATCH 022/104] PUB:20100105 How to Backup and Restore Your Apps and PPAs in Ubuntu Using Aptik @mr-ping --- ...our Apps and PPAs in Ubuntu Using Aptik.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename {translated/tech => published}/20100105 How to Backup and Restore Your Apps and PPAs in Ubuntu Using Aptik.md (86%) diff --git a/translated/tech/20100105 How to Backup and Restore Your Apps and PPAs in Ubuntu Using Aptik.md b/published/20100105 How to Backup and Restore Your Apps and PPAs in Ubuntu Using Aptik.md similarity index 86% rename from translated/tech/20100105 How to Backup and Restore Your Apps and PPAs in Ubuntu Using Aptik.md rename to published/20100105 How to Backup and Restore Your Apps and PPAs in Ubuntu Using Aptik.md index d55bf79f62..5b422eaef6 100644 --- a/translated/tech/20100105 How to Backup and Restore Your Apps and PPAs in Ubuntu Using Aptik.md +++ b/published/20100105 How to Backup and Restore Your Apps and PPAs in Ubuntu Using Aptik.md @@ -2,9 +2,9 @@ ================================================================================ ![00_lead_image_aptik](http://cdn5.howtogeek.com/wp-content/uploads/2014/12/650x300x00_lead_image_aptik.png.pagespeed.ic.n3TJwp8YK_.png) -当你想重装Ubuntu或者仅仅是想安装它的一个新版本的时候,寻到一个便捷的方法去重新安装之前的应用并且重置其设置是很有用的。此时 *Aptik* 粉墨登场,它可以帮助你轻松实现。 +当你想重装Ubuntu或者仅仅是想安装它的一个新版本的时候,如果有个便捷的方法来重新安装之前的应用并且重置其设置会很方便的。此时 *Aptik* 粉墨登场,它可以帮助你轻松实现。 -Aptik(自动包备份和回复)是一个可以用在Ubuntu,Linux Mint, 和其他基于Debian以及Ubuntu的Linux发行版上的应用,它允许你将已经安装过的包括软件库、下载包、安装的应用及其主题和设置在内的PPAs(个人软件包存档)备份到外部的U盘、网络存储或者类似于Dropbox的云服务上。 +Aptik(自动包备份和恢复)是一个可以用在Ubuntu,Linux Mint 和其他基于Debian以及Ubuntu的Linux发行版上的应用,它允许你将已经安装过的包括软件库、下载包、安装的应用和主题、用户设置在内的PPAs(个人软件包存档)备份到外部的U盘、网络存储或者类似于Dropbox的云服务上。 注意:当我们在此文章中说到输入某些东西的时候,如果被输入的内容被引号包裹,请不要将引号一起输入进去,除非我们有特殊说明。 @@ -16,7 +16,7 @@ Aptik(自动包备份和回复)是一个可以用在Ubuntu,Linux Mint, 和 ![01_command_to_add_repository](http://cdn5.howtogeek.com/wp-content/uploads/2014/12/650x99x01_command_to_add_repository.png.pagespeed.ic.UfVC9QLj54.png) -输入下边的命令到提示符旁边,来确保资源库已经是最新版本。 +在命令行提示符输入下边的命令,来确保资源库已经是最新版本。 sudo apt-get update @@ -86,11 +86,11 @@ Aptik的主窗口显示出来了。从“Backup Directory”下拉列表中选 接下来,“Downloaded Packages (APT Cache)”的项目只对重装同样版本的Ubuntu有用处。它会备份下你系统缓存(/var/cache/apt/archives)中的包。如果你是升级系统的话,可以跳过这个条目,因为针对新系统的包会比现有系统缓存中的包更加新一些。 -备份和回复下载过的包,这可以在重装Ubuntu,并且重装包的时候节省时间和网络带宽。因为一旦你把这些包恢复到系统缓存中之后,他们可以重新被利用起来,这样下载过程就免了,包的安装会更加快捷。 +备份和恢复下载过的包,这可以在重装Ubuntu,并且重装包的时候节省时间和网络带宽。因为一旦你把这些包恢复到系统缓存中之后,他们可以重新被利用起来,这样下载过程就免了,包的安装会更加快捷。 如果你是重装相同版本的Ubuntu系统的话,点击 “Downloaded Packages (APT Cache)” 右侧的 “Backup” 按钮来备份系统缓存中的包。 -注意:当你备份下载过的包的时候是没有二级对话框出现。你系统缓存 (/var/cache/apt/archives) 中的包会被拷贝到备份目录下一个名叫 “archives” 的文件夹中,当整个过程完成后会出现一个对话框来告诉你备份已经完成。 +注意:当你备份下载过的包的时候是没有二级对话框出现的。你系统缓存 (/var/cache/apt/archives) 中的包会被拷贝到备份目录下一个名叫 “archives” 的文件夹中,当整个过程完成后会出现一个对话框来告诉你备份已经完成。 ![16_downloaded_packages_backed_up](http://cdn5.howtogeek.com/wp-content/uploads/2014/12/650x544x16_downloaded_packages_backed_up.png.pagespeed.ic.z8ysuwzQAK.png) @@ -104,7 +104,7 @@ Aptik的主窗口显示出来了。从“Backup Directory”下拉列表中选 ![18_clicking_backup_for_software_selections](http://cdn5.howtogeek.com/wp-content/uploads/2014/12/650x530x18_clicking_backup_for_software_selections.png.pagespeed.ic.QI5D-IgnP_.png) -名为 “packages.list” and “packages-installed.list” 的两个文件出现在了备份目录中,并且一个用来通知你备份完成的对话框出现。点击 ”OK“关闭它。 +备份目录中出现了两个名为 “packages.list” 和“packages-installed.list” 的文件,并且会弹出一个通知你备份完成的对话框。点击 ”OK“关闭它。 注意:“packages-installed.list”文件包含了所有的包,而 “packages.list” 在包含了所有包的前提下还指出了那些包被选择上了。 @@ -120,27 +120,27 @@ Aptik的主窗口显示出来了。从“Backup Directory”下拉列表中选 ![21_zipping_settings_files](http://cdn5.howtogeek.com/wp-content/uploads/2014/12/650x530x21_zipping_settings_files.png.pagespeed.ic.dgoBj7egqv.png) -当打包完成后,打包后的文件被拷贝到备份目录下,另外一个备份成功的对话框出现。点击”OK“,关掉。 +当打包完成后,打包后的文件被拷贝到备份目录下,另外一个备份成功的对话框出现。点击“OK”关掉。 ![22_app_settings_backed_up](http://cdn5.howtogeek.com/wp-content/uploads/2014/12/650x530x22_app_settings_backed_up.png.pagespeed.ic.Mb6utyLJ3W.png) -来自 “/usr/share/themes” 目录的主题和来自 “/usr/share/icons” 目录的图标也可以备份。点击 “Themes and Icons” 右侧的 “Backup” 来进行此操作。“Backup Themes” 对话框默认选择了所有的主题和图标。你可以安装需要取消到一些然后点击 “Backup” 进行备份。 +放在 “/usr/share/themes” 目录的主题和放在 “/usr/share/icons” 目录的图标也可以备份。点击 “Themes and Icons” 右侧的 “Backup” 来进行此操作。“Backup Themes” 对话框默认选择了所有的主题和图标。你可以安装需要的、取消一些不要的,然后点击 “Backup” 进行备份。 ![22a_backing_up_themes_and_icons](http://cdn5.howtogeek.com/wp-content/uploads/2014/12/650x530x22a_backing_up_themes_and_icons.png.pagespeed.ic.KXa8W3YhyF.png) -主题被打包拷贝到备份目录下的 “themes” 文件夹中,图标被打包拷贝到备份目录下的 “icons” 文件夹中。然后成功提示对话框出现,点击”OK“关闭它。 +主题被打包拷贝到备份目录下的 “themes” 文件夹中,图标被打包拷贝到备份目录下的 “icons” 文件夹中。然后成功提示对话框出现,点击“OK”关闭它。 ![22b_themes_and_icons_backed_up](http://cdn5.howtogeek.com/wp-content/uploads/2014/12/650x530x22b_themes_and_icons_backed_up.png.pagespeed.ic.ejjRaymD39.png) -一旦你完成了需要的备份,点击主界面左上角的”X“关闭 Aptik 。 +一旦你完成了需要的备份,点击主界面左上角的“X”关闭 Aptik 。 ![23_closing_aptik](http://cdn5.howtogeek.com/wp-content/uploads/2014/12/650x542x23_closing_aptik.png.pagespeed.ic.pNk9Vt3--l.png) -备份过的文件已存在于你选择的备份目录中,可以随时取阅。 +备份过的文件已存在于你选择的备份目录中,可以随时查看。 ![24_backup_files_in_directory](http://cdn5.howtogeek.com/wp-content/uploads/2014/12/650x374x24_backup_files_in_directory.png.pagespeed.ic.vwblOfN915.png) -当你重装Ubuntu或者安装新版本的Ubuntu后,在新的系统中安装 Aptik 并且将备份好的文件置于新系统中让其可被使用。运行 Aptik,并使用每个条目的 “Restore” 按钮来恢复你的软件源、应用、包、设置、主题以及图标。 +当你重装Ubuntu或者安装新版本的Ubuntu后,在新的系统中安装 Aptik 并且将备份好的文件置于新系统中使用。运行 Aptik,并使用每个条目的 “Restore” 按钮来恢复你的软件源、应用、包、设置、主题以及图标。 -------------------------------------------------------------------------------- @@ -148,7 +148,7 @@ via: http://www.howtogeek.com/206454/how-to-backup-and-restore-your-apps-and-ppa 作者:Lori Kaufman 译者:[Ping](https://github.com/mr-ping) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2539cba212909abdeae1e9f6f3060006c3ed034e Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 27 Jan 2015 21:47:20 +0800 Subject: [PATCH 023/104] PUB:20141222 How to Sync Time Properly with NTP Server in CentOS 7.x @GOLinux --- ...c Time Properly with NTP Server in CentOS 7.x.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) rename {translated/tech => published}/20141222 How to Sync Time Properly with NTP Server in CentOS 7.x.md (70%) diff --git a/translated/tech/20141222 How to Sync Time Properly with NTP Server in CentOS 7.x.md b/published/20141222 How to Sync Time Properly with NTP Server in CentOS 7.x.md similarity index 70% rename from translated/tech/20141222 How to Sync Time Properly with NTP Server in CentOS 7.x.md rename to published/20141222 How to Sync Time Properly with NTP Server in CentOS 7.x.md index 80a8237b6d..d8bfbd7c49 100644 --- a/translated/tech/20141222 How to Sync Time Properly with NTP Server in CentOS 7.x.md +++ b/published/20141222 How to Sync Time Properly with NTP Server in CentOS 7.x.md @@ -1,6 +1,6 @@ CentOS 7.x中正确设置时间与时钟服务器同步 ================================================================================ -**Chrony**是一个开源而自由的应用,它能帮助你保持系统时钟与时钟服务器同步,因此让你的时间保持精确。它由两个程序组成,分别是chronyd和chronyc。chronyd是一个后台运行的守护进程,用于调整内核中运行的系统时钟和时钟服务器同步。它确定计算机获取或丢失时间的比率,并对此进行补偿。chronyc提供了一个用户界面,用于监控性能并进行多样化的配置。它可以在chronyd实例控制的计算机上干这些事,也可以在一台不同的远程计算机上干这些事。 +**Chrony**是一个开源的自由软件,它能帮助你保持系统时钟与时钟服务器(NTP)同步,因此让你的时间保持精确。它由两个程序组成,分别是chronyd和chronyc。chronyd是一个后台运行的守护进程,用于调整内核中运行的系统时钟和时钟服务器同步。它确定计算机增减时间的比率,并对此进行补偿。chronyc提供了一个用户界面,用于监控性能并进行多样化的配置。它可以在chronyd实例控制的计算机上工作,也可以在一台不同的远程计算机上工作。 在像CentOS 7之类基于RHEL的操作系统上,已经默认安装有Chrony。 @@ -10,19 +10,17 @@ CentOS 7.x中正确设置时间与时钟服务器同步 **server** - 该参数可以多次用于添加时钟服务器,必须以"server "格式使用。一般而言,你想添加多少服务器,就可以添加多少服务器。 - Example: server 0.centos.pool.ntp.org server 3.europe.pool.ntp.org -**stratumweight** - stratumweight指令设置当chronyd从可用源中选择同步源时,每个层应该添加多少距离到同步距离。默认情况下,CentOS中设置为0,让chronyd在选择源时忽略层。 +**stratumweight** - stratumweight指令设置当chronyd从可用源中选择同步源时,每个层应该添加多少距离到同步距离。默认情况下,CentOS中设置为0,让chronyd在选择源时忽略源的层级。 -**driftfile** - chronyd程序的主要行为之一,就是根据实际时间计算出计算机获取或丢失时间的比率,将它记录到一个文件中是最合理的,它会在重启后为系统时钟作出补偿,甚至它可能有机会从时钟服务器获得好的估值。 +**driftfile** - chronyd程序的主要行为之一,就是根据实际时间计算出计算机增减时间的比率,将它记录到一个文件中是最合理的,它会在重启后为系统时钟作出补偿,甚至可能的话,会从时钟服务器获得较好的估值。 **rtcsync** - rtcsync指令将启用一个内核模式,在该模式中,系统时间每11分钟会拷贝到实时时钟(RTC)。 **allow / deny** - 这里你可以指定一台主机、子网,或者网络以允许或拒绝NTP连接到扮演时钟服务器的机器。 - Examples: allow 192.168.4.5 deny 192.168/16 @@ -30,11 +28,10 @@ CentOS 7.x中正确设置时间与时钟服务器同步 **bindcmdaddress** - 该指令允许你限制chronyd监听哪个网络接口的命令包(由chronyc执行)。该指令通过cmddeny机制提供了一个除上述限制以外可用的额外的访问控制等级。 - Example: bindcmdaddress 127.0.0.1 bindcmdaddress ::1 -**makestep** - 通常,chronyd将根据需求通过减慢或加速时钟,使得系统逐步纠正所有时间偏差。在某些特定情况下,系统时钟可能会漂移过快,导致该回转过程消耗很长的时间来纠正系统时钟。该指令强制chronyd在调整期大于某个阀值时调停系统时钟,但只有在因为chronyd启动时间超过指定限制(可使用负值来禁用限制),没有更多时钟更新时才生效。 +**makestep** - 通常,chronyd将根据需求通过减慢或加速时钟,使得系统逐步纠正所有时间偏差。在某些特定情况下,系统时钟可能会漂移过快,导致该调整过程消耗很长的时间来纠正系统时钟。该指令强制chronyd在调整期大于某个阀值时步进调整系统时钟,但只有在因为chronyd启动时间超过指定限制(可使用负值来禁用限制),没有更多时钟更新时才生效。 ### 使用chronyc ### @@ -66,7 +63,7 @@ via: http://linoxide.com/linux-command/chrony-time-sync/ 作者:[Adrian Dinu][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 0c6739c7e49b1db508c7f8d1e01e09e1795fd139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E4=BC=AF=E7=91=9E?= Date: Tue, 27 Jan 2015 22:21:48 +0800 Subject: [PATCH 024/104] Update 20150123 How to Boot Linux ISO Images Directly From Your Hard Drive.md --- ... to Boot Linux ISO Images Directly From Your Hard Drive.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150123 How to Boot Linux ISO Images Directly From Your Hard Drive.md b/sources/tech/20150123 How to Boot Linux ISO Images Directly From Your Hard Drive.md index 0a1670da58..b7ccf253f9 100644 --- a/sources/tech/20150123 How to Boot Linux ISO Images Directly From Your Hard Drive.md +++ b/sources/tech/20150123 How to Boot Linux ISO Images Directly From Your Hard Drive.md @@ -1,4 +1,4 @@ -How to Boot Linux ISO Images Directly From Your Hard Drive +[xieborui translating]How to Boot Linux ISO Images Directly From Your Hard Drive ================================================================================ Hi all, today we'll teach you an awesome interesting stuff related with the Operating System Disk Image and Booting. Now, try many OS you like without installing them in your Physical Hard Drive and without burning DVDs or USBs. @@ -75,4 +75,4 @@ via: http://linoxide.com/linux-how-to/boot-linux-iso-images-directly-hard-drive/ [a]:http://linoxide.com/author/arunp/ [1]:http://ubuntu.com/ [2]:http://linuxmint.com/ -[3]:http://git.marmotte.net/git/glim/tree/grub2 \ No newline at end of file +[3]:http://git.marmotte.net/git/glim/tree/grub2 From 62a61ee56d422586c0e5b4936dd3671552d462fb Mon Sep 17 00:00:00 2001 From: 2q1w2007 <2q1w2007@163.com> Date: Tue, 27 Jan 2015 22:59:18 +0800 Subject: [PATCH 025/104] =?UTF-8?q?20150127=20=E9=80=89=E9=A2=98=20Bug=20i?= =?UTF-8?q?n=20Wi-Fi=20Direct=20Android=20Implementation=20Causes=20Denial?= =?UTF-8?q?=20of=20Service?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Implementation Causes Denial of Service.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sources/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md diff --git a/sources/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md b/sources/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md new file mode 100644 index 0000000000..8829296d18 --- /dev/null +++ b/sources/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md @@ -0,0 +1,49 @@ +Bug in Wi-Fi Direct Android Implementation Causes Denial of Service +---- +*Google marks the issue as having low severity, is not in a hurry to fix it* + +![Wi-Fi Direct glitch crashes Android](http://i1-news.softpedia-static.com/images/news2/Bug-In-Wi-Fi-Direct-Android-Implementation-Causes-Denial-of-Service-471299-2.jpg) + +#A vulnerability in the way Android handles Wi-Fi Direct connections leads to rebooting the device when searching for peers to connect to, which can be anything from other phones, cameras, gaming devices, computers, or printers. + +The Wi-Fi Direct technology allows devices capable of wireless connection to establish communication directly, without the need to join a local network. + +##Security company insisted on proper coordination for a fix + +The vulnerability allows an attacker to send a specially crafted 802.11 Probe Response frame to the device and crashes it due to an unhandled exception occurring on the WiFi monitoring class. + +Core Security discovered the flaw (CVE-2014-0997) through its CoreLabs team, and reported it to Google back in September 2014. The vendor acknowledged it but classified the glitch as having low severity, with no timeline for a fix being provided. + +The same answer was received by Core Security each time they contacted the Android security team to inform of a timeframe for rolling out a fix. The last reply of this kind was received on January 20, meaning that there is no patch for the time being. On Monday, the security company made their findings public. + +The security company created a (proof-of-concept)[1] to demonstrate the validity of the results obtained during their research. + +According to the technical details of the vulnerability, some Android devices can be induced a denial-of-service condition if they receive a malformed wpa_supplicant event, which makes available the interface between the wireless driver and the Android platform framework. + +##Google is not in a hurry to eliminate the problem + +The relaxed stance from the Android security team regarding the issue may be on account of the fact that denial-of-service condition occurs only for a short period of time, when scanning for peers. + +More than this, the result is not severe in nature as it consists in rebooting the device. There is no risk of data exfiltration or an attack that could lead to this, which would make it unappealing to a threat actor. On the other hand, a patch should be provided regardless, in order to mitigate any potential future risks. + +Core Security says that the issue was not detected on Android 5.0.1 and above, and among the devices affected they found Nexus 5 and 4 running version 4.4.4 of the mobile operating system, LG D806 and Samsung SM-T310 with Android 4.2.2, and Motorola RAZR HD with build 4.1.2 of the OS. + +For the time being, mitigation consists in refraining from using Wi-Fi Direct or updating to a non-vulnerable version of Android. + + +-------------------------------------------------------------------------------- + +via:http://news.softpedia.com/news/Bug-In-Wi-Fi-Direct-Android-Implementation-Causes-Denial-of-Service-471299.shtml + +本文发布时间:27 Jan 2015, 09:11 GMT + +作者:[Ionut Ilascu][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/ionut-ilascu +[1]:http://www.coresecurity.com/advisories/android-wifi-direct-denial-service \ No newline at end of file From f44993845aedc2a8a27bd072d0a7e2e6fe0e1034 Mon Sep 17 00:00:00 2001 From: mtunique Date: Wed, 28 Jan 2015 00:21:35 +0800 Subject: [PATCH 026/104] translated Linux FAQs with Answers--How to check disk space on Linux with df command --- ...eck disk space on Linux with df command.md | 158 ------------------ 1 file changed, 158 deletions(-) delete mode 100644 sources/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md diff --git a/sources/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md b/sources/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md deleted file mode 100644 index b6595f555c..0000000000 --- a/sources/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md +++ /dev/null @@ -1,158 +0,0 @@ -translating by mtunique -Linux FAQs with Answers--How to check disk space on Linux with df command -================================================================================ -> **问题**: 我知道在Linux上我可以用df命令来查看I know I can use df command to check a file system's disk space usage on Linux. Can you show me practical examples of the df command so that I can make the most out of it? - -As far as disk storage is concerned, there are many command-line or GUI-based tools that can tell you about current disk space usage. These tools report on detailed disk utilization in various human-readable formats, such as easy-to-understand summary, detailed statistics, or [intuitive visualization][1]. If you simply want to know how much free disk space is available for different file systems, then df command is probably all you need. - -![](https://farm9.staticflickr.com/8632/15505309473_51bffec3f1_b.jpg) - -The df command can report on disk utilization of any "mounted" file system. There are different ways this command can be invoked. Here are some **useful** df **command examples**. - -### Display in Human-Readable Format ### - -By default, the df command reports disk space in 1K blocks, which is not easily interpretable. The "-h" parameter will make df print disk space in a more human-readable format (e.g., 100K, 200M, 3G). - - $ df -h - ----------- - - Filesystem Size Used Avail Use% Mounted on - /dev/mapper/ubuntu-root 909G 565G 299G 66% / - none 4.0K 0 4.0K 0% /sys/fs/cgroup - udev 3.9G 4.0K 3.9G 1% /dev - tmpfs 785M 1.2M 784M 1% /run - none 5.0M 0 5.0M 0% /run/lock - none 3.9G 63M 3.8G 2% /run/shm - none 100M 48K 100M 1% /run/user - /dev/sda1 228M 98M 118M 46% /boot - -### Display Inode Usage ### - -When you monitor disk usage, you must watch out for not only disk space, but also "inode" usage. In Linux, inode is a data structure used to store metadata of a particular file, and when a file system is created, a pre-defined number of inodes are allocated. This means that a file system can run out of space not only because big files use up all available space, but also because many small files use up all available inodes. To display inode usage, use "-i" option. - - $ df -i - ----------- - - Filesystem Inodes IUsed IFree IUse% Mounted on - /dev/mapper/ubuntu-root 60514304 1217535 59296769 3% / - none 1004417 13 1004404 1% /sys/fs/cgroup - udev 1000623 552 1000071 1% /dev - tmpfs 1004417 608 1003809 1% /run - none 1004417 11 1004406 1% /run/lock - none 1004417 288 1004129 1% /run/shm - none 1004417 28 1004389 1% /run/user - /dev/sda1 124496 346 124150 1% /boot - -### Display Disk Usage Grant Total ### - -By default, the df command shows disk utilization of individual file systems. If you want to know the total disk usage over all existing file systems, add "--total" option. - - $ df -h --total - ----------- - - Filesystem Size Used Avail Use% Mounted on - /dev/mapper/ubuntu-root 909G 565G 299G 66% / - none 4.0K 0 4.0K 0% /sys/fs/cgroup - udev 3.9G 4.0K 3.9G 1% /dev - tmpfs 785M 1.2M 784M 1% /run - none 5.0M 0 5.0M 0% /run/lock - none 3.9G 62M 3.8G 2% /run/shm - none 100M 48K 100M 1% /run/user - /dev/sda1 228M 98M 118M 46% /boot - total 918G 565G 307G 65% - - -### Display File System Types ### - -By default, the df command does not show file system type information. Use "-T" option to add file system types to the output. - - $ df -T - ----------- - - Filesystem Type 1K-blocks Used Available Use% Mounted on - /dev/mapper/ubuntu-root ext4 952893348 591583292 312882844 66% / - none tmpfs 4 0 4 0% /sys/fs/cgroup - udev devtmpfs 4002492 4 4002488 1% /dev - tmpfs tmpfs 803536 1196 802340 1% /run - none tmpfs 5120 0 5120 0% /run/lock - none tmpfs 4017668 60176 3957492 2% /run/shm - none tmpfs 102400 48 102352 1% /run/user - /dev/sda1 ext2 233191 100025 120725 46% /boot - -### Include or Exclude a Specific File System Type ### - -If you want to know free space of a specific file system type, use "-t " option. You can use this option multiple times to include more than one file system types. - - $ df -t ext2 -t ext4 - ----------- - - Filesystem 1K-blocks Used Available Use% Mounted on - /dev/mapper/ubuntu-root 952893348 591583380 312882756 66% / - /dev/sda1 233191 100025 120725 46% /boot - -To exclude a specific file system type, use "-x " option. You can use this option multiple times as well. - - $ df -x tmpfs - -### Display Disk Usage of a Specific Mount Point ### - -If you specify a mount point with df, it will report disk usage of the file system mounted at that location. If you specify a regular file (or a directory) instead of a mount point, df will display disk utilization of the file system which contains the file (or the directory). - - $ df / - ----------- - - Filesystem 1K-blocks Used Available Use% Mounted on - /dev/mapper/ubuntu-root 952893348 591583528 312882608 66% / - ----------- - - $ df /home/dev - ----------- - - Filesystem 1K-blocks Used Available Use% Mounted on - /dev/mapper/ubuntu-root 952893348 591583528 312882608 66% / - -### Display Information about Dummy File Systems ### - -If you want to display disk space information for all existing file systems including dummy file systems, use "-a" option. Here, dummy file systems refer to pseudo file systems which do not have corresponding physical devices, e.g., tmpfs, cgroup virtual file system or FUSE file systems. These dummy filesystems have size of 0, and are not reported by df without "-a" option. - - $ df -a - ----------- - - Filesystem 1K-blocks Used Available Use% Mounted on - /dev/mapper/ubuntu-root 952893348 591578716 312887420 66% / - proc 0 0 0 - /proc - sysfs 0 0 0 - /sys - none 4 0 4 0% /sys/fs/cgroup - none 0 0 0 - /sys/fs/fuse/connections - none 0 0 0 - /sys/kernel/debug - none 0 0 0 - /sys/kernel/security - udev 4002492 4 4002488 1% /dev - devpts 0 0 0 - /dev/pts - tmpfs 803536 1196 802340 1% /run - none 5120 0 5120 0% /run/lock - none 4017668 58144 3959524 2% /run/shm - none 102400 48 102352 1% /run/user - none 0 0 0 - /sys/fs/pstore - cgroup 0 0 0 - /sys/fs/cgroup/cpuset - cgroup 0 0 0 - /sys/fs/cgroup/hugetlb - /dev/sda1 233191 100025 120725 46% /boot - vmware-vmblock 0 0 0 - /run/vmblock-fuse - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/check-disk-space-linux-df-command.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://xmodulo.com/visualize-disk-usage-linux.html From 743040498a7bde86504080532f931cf31c5cd461 Mon Sep 17 00:00:00 2001 From: mtunique Date: Wed, 28 Jan 2015 00:23:25 +0800 Subject: [PATCH 027/104] move 20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md --- ...eck disk space on Linux with df command.md | 156 ++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 translated/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md diff --git a/translated/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md b/translated/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md new file mode 100644 index 0000000000..6b1d65ca8b --- /dev/null +++ b/translated/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md @@ -0,0 +1,156 @@ +Linux有问必答:在Linux下如何用df命令检查磁盘空间? +================================================================================ +> **问题**: 我知道在Linux上我可以用df命令来查看磁盘使用空间。你能告诉我df命令的实际例子使我可以最大限度得利用它吗? + +对于磁盘存储方面,有很多命令行或基于GUI的工具,它可以告诉你关于当前磁盘空间的使用情况。这些工具用各种人们可读的格式展示磁盘利用率的详细信息,比如易于理解的总结,详细的统计信息或直观的[可视化报告][1]。如果你只想知道不同文件系统有多少空闲的磁盘空间,那么df命令可能是你所需要的。 + +![](https://farm9.staticflickr.com/8632/15505309473_51bffec3f1_b.jpg) + +df命令可以展示任何“mounted”文件系统的磁盘利用率。该命令可以用不同的方式调用。这里有一些**有用的** df **命令例子**. + +### 用人们可读的方式展示 ### + +默认情况下,df命令用1K为块来展示磁盘空间,这不容易解释。“-h”参数使df用更可读的方式打印磁盘空间(例如 100K,200M,3G)。 + + $ df -h + +---------- + + Filesystem Size Used Avail Use% Mounted on + /dev/mapper/ubuntu-root 909G 565G 299G 66% / + none 4.0K 0 4.0K 0% /sys/fs/cgroup + udev 3.9G 4.0K 3.9G 1% /dev + tmpfs 785M 1.2M 784M 1% /run + none 5.0M 0 5.0M 0% /run/lock + none 3.9G 63M 3.8G 2% /run/shm + none 100M 48K 100M 1% /run/user + /dev/sda1 228M 98M 118M 46% /boot + +### 展示Inode使用情况 ### + +当你监视磁盘使用情况时,你必须注意的不仅仅是磁盘空间还有“inode”的使用情况。在Linux中,inode是用来存储特定文件的元数据的一种数据结构,在创建一个文件系统时,inode的预先定义数量将被分配。这意味着,一个文件系统可能耗尽空间不只是因为大文件用完了所有可用空间,也可能是因为很多小文件用完了所有可能的inode。用“-i”选项展示inode使用情况。 + + $ df -i + +---------- + + Filesystem Inodes IUsed IFree IUse% Mounted on + /dev/mapper/ubuntu-root 60514304 1217535 59296769 3% / + none 1004417 13 1004404 1% /sys/fs/cgroup + udev 1000623 552 1000071 1% /dev + tmpfs 1004417 608 1003809 1% /run + none 1004417 11 1004406 1% /run/lock + none 1004417 288 1004129 1% /run/shm + none 1004417 28 1004389 1% /run/user + /dev/sda1 124496 346 124150 1% /boot + +### 展示磁盘总利用率 ### + +默认情况下, df命令显示磁盘的单个文件系统的利用率。如果你想知道的所有文件系统的总磁盘使用量,增加“ --total ”选项。 + $ df -h --total + +---------- + + Filesystem Size Used Avail Use% Mounted on + /dev/mapper/ubuntu-root 909G 565G 299G 66% / + none 4.0K 0 4.0K 0% /sys/fs/cgroup + udev 3.9G 4.0K 3.9G 1% /dev + tmpfs 785M 1.2M 784M 1% /run + none 5.0M 0 5.0M 0% /run/lock + none 3.9G 62M 3.8G 2% /run/shm + none 100M 48K 100M 1% /run/user + /dev/sda1 228M 98M 118M 46% /boot + total 918G 565G 307G 65% - + +### 展示文件系统类型 ### + +默认情况下,df命令不现实文件系统类型信息。用“-T”选项来添加文件系统信息到输出中。 + + $ df -T + +---------- + + Filesystem Type 1K-blocks Used Available Use% Mounted on + /dev/mapper/ubuntu-root ext4 952893348 591583292 312882844 66% / + none tmpfs 4 0 4 0% /sys/fs/cgroup + udev devtmpfs 4002492 4 4002488 1% /dev + tmpfs tmpfs 803536 1196 802340 1% /run + none tmpfs 5120 0 5120 0% /run/lock + none tmpfs 4017668 60176 3957492 2% /run/shm + none tmpfs 102400 48 102352 1% /run/user + /dev/sda1 ext2 233191 100025 120725 46% /boot + +### 包含或排除特定的文件系统类型 ### + +如果你想知道特定文件系统类型的剩余空间,用“-t ”选项。你可以多次使用这个选项来包含更多的文件系统类型。 + + $ df -t ext2 -t ext4 + +---------- + + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/ubuntu-root 952893348 591583380 312882756 66% / + /dev/sda1 233191 100025 120725 46% /boot + +排除特定的文件系统类型,用“-x ”选项。同样,你可以用这个选项多次。 + + $ df -x tmpfs + +### 显示一个具体的挂载点磁盘使用情况 ### + +如果你用df指定一个挂载点,它将报告挂载在那个地方的文件系统的磁盘使用情况。如果你指定一个普通文件(或一个目录)而不是一个挂载点,df将现实包含这个文件(或目录)的文件系统的磁盘利用率。 + + $ df / + +---------- + + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/ubuntu-root 952893348 591583528 312882608 66% / + +---------- + + $ df /home/dev + +---------- + + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/ubuntu-root 952893348 591583528 312882608 66% / + +### 现实虚拟文件系统的信息 ### + +如果你想显示所有已经存在的文件系统(包括虚拟文件系统)的磁盘空间信息,用“-a”选项。这里,虚拟文件系统是指没有相对应的物理设备的假的文件系统,例如,tmpfs,cgroup虚拟文件系统或FUSE文件安系统。这些虚拟文件系统大小为0,不用“-a”选项将不会被报告出来。 + + $ df -a + +---------- + + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/ubuntu-root 952893348 591578716 312887420 66% / + proc 0 0 0 - /proc + sysfs 0 0 0 - /sys + none 4 0 4 0% /sys/fs/cgroup + none 0 0 0 - /sys/fs/fuse/connections + none 0 0 0 - /sys/kernel/debug + none 0 0 0 - /sys/kernel/security + udev 4002492 4 4002488 1% /dev + devpts 0 0 0 - /dev/pts + tmpfs 803536 1196 802340 1% /run + none 5120 0 5120 0% /run/lock + none 4017668 58144 3959524 2% /run/shm + none 102400 48 102352 1% /run/user + none 0 0 0 - /sys/fs/pstore + cgroup 0 0 0 - /sys/fs/cgroup/cpuset + cgroup 0 0 0 - /sys/fs/cgroup/hugetlb + /dev/sda1 233191 100025 120725 46% /boot + vmware-vmblock 0 0 0 - /run/vmblock-fuse + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/check-disk-space-linux-df-command.html + +译者:[mtunique](https://github.com/mtunique) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://xmodulo.com/visualize-disk-usage-linux.html From 8b7c46f9004bf28d29a6c008e572c0651ed3e900 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Wed, 28 Jan 2015 08:51:38 +0800 Subject: [PATCH 028/104] half the work --- .../tech/20141204 Linux Namespaces.md | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) rename {sources => translated}/tech/20141204 Linux Namespaces.md (75%) diff --git a/sources/tech/20141204 Linux Namespaces.md b/translated/tech/20141204 Linux Namespaces.md similarity index 75% rename from sources/tech/20141204 Linux Namespaces.md rename to translated/tech/20141204 Linux Namespaces.md index 6424d8f6a4..4d81eddcb9 100644 --- a/sources/tech/20141204 Linux Namespaces.md +++ b/translated/tech/20141204 Linux Namespaces.md @@ -1,33 +1,32 @@ -[bazz2222222222] -Linux Namespaces +Linux ռ ================================================================================ -### Background ### +### ### -Starting from kernel 2.6.24, Linux supports 6 different types of namespaces. Namespaces are useful in creating processes that are more isolated from the rest of the system, without needing to use full low level virtualization technology. +2.6.24ں˿ʼLinux ֧6ֲͬ͵ռ䡣ǵij֣ʹûĽܹϵͳøӳףӶҪ̫ײ⻯ -- **CLONE_NEWIPC**: IPC Namespaces: SystemV IPC and POSIX Message Queues can be isolated. -- **CLONE_NEWPID**: PID Namespaces: PIDs are isolated, meaning that a virtual PID inside of the namespace can conflict with a PID outside of the namespace. PIDs inside the namespace will be mapped to other PIDs outside of the namespace. The first PID inside the namespace will be '1' which outside of the namespace is assigned to init -- **CLONE_NEWNET**: Network Namespaces: Networking (/proc/net, IPs, interfaces and routes) are isolated. Services can be run on the same ports within namespaces, and "duplicate" virtual interfaces can be created. -- **CLONE_NEWNS**: Mount Namespaces. We have the ability to isolate mount points as they appear to processes. Using mount namespaces, we can achieve similar functionality to chroot() however with improved security. -- **CLONE_NEWUTS**: UTS Namespaces. This namespaces primary purpose is to isolate the hostname and NIS name. -- **CLONE_NEWUSER**: User Namespaces. Here, user and group IDs are different inside and outside of namespaces and can be duplicated. +- **CLONE_NEWIPC**: ̼ͨ(IPC)ռ䣬Խ SystemV IPC POSIX Ϣж +- **CLONE_NEWPID**: ID ռ䣬 ID ˼ռڵĽ ID ܻռĽ ID ͻռڵĽ ID ӳ䵽ռʱʹһ ID˵ռ ID Ϊ1Ḷ̌ռָ init ̡ +- **CLONE_NEWNET**: ռ䣬ڸԴ/proc/netIP ַ·ɵȣ̨̿ڲͬռڵͬ˿ϣûһ +- **CLONE_NEWNS**: ռ䣬ʱԽصϵͳ룬ʹʱǿԴﵽ chroot ĹܣڰȫԷ chroot ߡ +- **CLONE_NEWUTS**: UTS ռ䣬ҪĿǶϢNIS +- **CLONE_NEWUSER**: ûռ䣬ͬ ID һû ID ID ռDzһģڲͬռڿԴͬ ID -Let's look first at the structure of a C program, required to demonstrate process namespaces. The following has been tested on Debian 6 and 7. First, we need to allocate a page of memory on the stack, and set a pointer to the end of that memory page. We use **alloca** to allocate stack memory rather than malloc which would allocate memory on the heap. + C ԽΪʾռʱҪõ C ԡIJԹ Debian 6 Debian 7 ִСȣջڷһҳڴռ䣬ָָڴҳĩβʹ **alloca()** ڴ棬Ҫ malloc() ڴڶϡ void *mem = alloca(sysconf(_SC_PAGESIZE)) + sysconf(_SC_PAGESIZE); -Next, we use **clone** to create a child process, passing the location of our child stack 'mem', as well as the required flags to specify a new namespace. We specify 'callee' as the function to execute within the child space: +Ȼʹ **clone()** ӽ̣ջռĵַ "mem"ԼָռıǡͬʱǻָcalleeΪӽеĺ mypid = clone(callee, mem, SIGCHLD | CLONE_NEWIPC | CLONE_NEWPID | CLONE_NEWNS | CLONE_FILES, NULL); -After calling **clone** we then wait for the child process to finish, before terminating the parent. If not, the parent execution flow will continue and terminate immediately after, clearing up the child with it: +**clone** ֮Ҫڸеȴӽ˳Ļ̻ȥֱ̽ӽ̱ɹ¶̣ while (waitpid(mypid, &r, 0) < 0 && errno == EINTR) { continue; } -Lastly, we'll return to the shell with the exit code of the child: +ӽ˳ǻص shell 档 if (WIFEXITED(r)) { @@ -35,7 +34,7 @@ Lastly, we'll return to the shell with the exit code of the child: } return EXIT_FAILURE; -Now, let's look at the **callee** function: +Ľܵ **callee** £ static int callee() { @@ -48,7 +47,7 @@ Now, let's look at the **callee** function: return ret; } -Here, we mount a **/proc** filesystem, and then set the uid (User ID) and gid (Group ID) to the value of 'u' before spawning the **/bin/bash** shell. [LXC][1] is an OS level virtualization tool utilizing cgroups and namespaces for resource isolation. Let's put it all together, setting 'u' to 65534 which is user "nobody" and group "nogroup" on Debian: + **/proc** ļϵͳû ID IDֵΪuȻ **/bin/bash** [LXC][1] Dzϵͳ⻯ߣʹ cgroups ռԴķ롣ǰдһ𣬱uֵΪ65534 Debian ϵͳУǡnobody͡nogroup #define _GNU_SOURCE #include @@ -90,7 +89,7 @@ Here, we mount a **/proc** filesystem, and then set the uid (User ID) and gid (G return ret; } -To execute the code produces the following: +ִĴ룺 root@w:~/pen/tmp# gcc -O -o ns.c -Wall -Werror -ansi -c89 ns.c root@w:~/pen/tmp# ./ns From 226fcd1cc5d0e12c554535e27988c3c1d8a5a6cf Mon Sep 17 00:00:00 2001 From: tinyeyeser Date: Wed, 28 Jan 2015 08:54:35 +0800 Subject: [PATCH 029/104] =?UTF-8?q?=E5=B7=B2=E7=BF=BB=E8=AF=91=20by?= =?UTF-8?q?=E5=B0=8F=E7=9C=BC=E5=84=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tinyeyeser --- ...illion Users Stolen from Dating Website.md | 52 ------------------- ...illion Users Stolen from Dating Website.md | 51 ++++++++++++++++++ 2 files changed, 51 insertions(+), 52 deletions(-) delete mode 100644 sources/news/20150126 Data of 20 Million Users Stolen from Dating Website.md create mode 100644 translated/news/20150126 Data of 20 Million Users Stolen from Dating Website.md diff --git a/sources/news/20150126 Data of 20 Million Users Stolen from Dating Website.md b/sources/news/20150126 Data of 20 Million Users Stolen from Dating Website.md deleted file mode 100644 index 2a1dea8478..0000000000 --- a/sources/news/20150126 Data of 20 Million Users Stolen from Dating Website.md +++ /dev/null @@ -1,52 +0,0 @@ -翻译中 by小眼儿 - -Data of 20 Million Users Stolen from Dating Website ----------- -*Info includes Gmail, Hotmail and Yahoo emails* - -![Details could belong to users of online dating website Topface](http://i1-news.softpedia-static.com/images/news2/Data-of-20-Million-Users-Stolen-from-Dating-Website-471179-2.jpg) - -#A database containing details of more than 20 million users of an online dating website has been allegedly stolen by a hacker. - -It is unclear at the moment if the information has been dumped into the public domain, but someone using the online alias “Mastermind” claims to have it, according to a post on an undisclosed paste site. - -#List contains hundreds of domains from all over the world - -The individual claims that the details are 100% valid and Daniel Ingevaldson, Chief Technology Officer at Easy Solutions, said in a blog post on Sunday that the list included email addresses from Hotmail, Yahoo and Gmail. - -Easy Solutions is a US-based company that provides security products for detecting and preventing cyber fraud across different computer platforms. - -According to Ingevaldson, the list contains over 7 million credentials from Hotmail, 2.5 million from Yahoo, and 2.2 million from Gmail.com. - -It is unclear if “credentials” refers to usernames and passwords that can be used to access the email accounts or the account of the dating website. Also, it is unknown whether the database stored the passwords in a secure manner or if they were available in plain text. - -An email address is often used as the username for an online service, to which the user can log in with a unique password. However, password recycling is a common practice for many users and the same string could be used to sign in to multiple online accounts. - -“The list appears to be international in nature with hundreds of domains listed from all over the world. Hackers and fraudsters are likely to leverage stolen credentials to commit fraud not on the original hacked site, but to use them to exploit password re-use to automatically scan and compromise other sites including banking, travel and email providers,” [says Ingevaldson](1). - -#More information is expected to emerge - -According to our sources, the affected website is Topface, an online dating location that touts over 90 million users. The business is headquartered in Sankt Petersburg, Russia, and it advertises that more than 50% of its users are from outside Russia. - -We contacted Topface to confirm or deny whether they suffered a breach recently that could have resulted in exposing a database this big; we are yet to receive an answer from the company. - -The credentials could have been stolen without perpetrators needing to gain unauthorized access, as Easy Solutions draws attention to the fact that email phishing may also have been used to get the info straight from the clients of the website. - -Easy Solutions could not be contacted through the online form available on its website, but we tried alternative communication and are currently waiting for more details. - --------------------------------------------------------------------------------- - -via:http://news.softpedia.com/news/Data-of-20-Million-Users-Stolen-from-Dating-Website-471179.shtml - -本文发布时间:26 Jan 2015, 10:20 GMT - -作者:[Ionut Ilascu][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/ionut-ilascu -[1]:http://newblog.easysol.net/dating-site-breached/ diff --git a/translated/news/20150126 Data of 20 Million Users Stolen from Dating Website.md b/translated/news/20150126 Data of 20 Million Users Stolen from Dating Website.md new file mode 100644 index 0000000000..14c5249dc3 --- /dev/null +++ b/translated/news/20150126 Data of 20 Million Users Stolen from Dating Website.md @@ -0,0 +1,51 @@ +2000万用户网站数据遭泄露 +---------- +*泄露数据包括Gmail、Hotmail以及Yahoo邮箱* + +![泄露的数据很可能来自于线数据网站Topface](http://i1-news.softpedia-static.com/images/news2/Data-of-20-Million-Users-Stolen-from-Dating-Website-471179-2.jpg) + +#一名黑客非法窃取了在线数据网站Topface一个包含2000万用户资料的数据库。 + +目前并不清楚这些数据是否已经公开,但是根据某些未公开页面的消息说,某个使用在线代理工具“Mastermind”的人声称掌握着这些数据。 + +#泄露数据列表涵盖了全世界数百个域名 + +此人号称泄露数据的内容100%可用,而Easy Solutions的CTO,Daniel Ingevaldson 周日在一篇博客中说道,泄露数据包括Hotmail、Yahoo和Gmail等邮箱地址。 + +Easy Solutions是一家位于美国的公司,提供多个不同平台的网络检测与安全防护产品。 + +据Ingevaldson所说,泄露的数据中,700万来自于Hotmail,250万来自于Yahoo,220万来自于Gmail.com。 + +我们并不清楚这些数据是可以直接登录邮箱账户的用户名密码,还是只是登录数据网站的账户。另外,也不清楚这些数据在数据库中是加密状态还是明文存在的。 + +邮箱地址常常被用于在线网站的登录用户名,用户可以凭借唯一密码进行登录。然而重复使用同一个密码是许多用户的常用作法,同一个密码可以登录许多在线账户。 + + +[Ingevaldson 还说](1):“看起来,这些数据事实上涵盖了全世界数百个域名。除了原始的被黑的网页,黑客和不法分子很可能利用窃取的帐密进行暴库、自动扫描、危害包括银行业、旅游业以及email提供商在内的多个网站。” + +#预计将披露更多信息 + +据我们的多个消息源爆料,数据的泄露源就是Topface,一个包含9000万用户的在线数据网站。其总部位于俄罗斯圣彼得堡,超过50%的用户来自于俄罗斯以外的国家。 + +我们联系了Topface,向他们求证最近是否遭受了可能导致如此大量数据泄露的网络攻击;但目前我们仍未收到该公司的回复。 + +攻击者可能无需获得非法访问权限就窃取了这些数据,Easy Solutions 推测攻击者很可能针对网站客户端使用钓鱼邮件直接获取到了用户数据。 + +我们无法通过Easy Solutions的在线网站联系到它们,但我们已经尝试通过其他交互方式联系了它们,目前正在等待更多信息的披露。 + +-------------------------------------------------------------------------------- + +via:http://news.softpedia.com/news/Data-of-20-Million-Users-Stolen-from-Dating-Website-471179.shtml + +本文发布时间:26 Jan 2015, 10:20 GMT + +作者:[Ionut Ilascu][a] + +译者:[Mr小眼儿](https://github.com/tinyeyeser) + +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/ionut-ilascu +[1]:http://newblog.easysol.net/dating-site-breached/ \ No newline at end of file From 4e879557df2f47a5cd685843dbc08ce46e3cf458 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 28 Jan 2015 10:08:36 +0800 Subject: [PATCH 030/104] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...50126 Data of 20 Million Users Stolen from Dating Website.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/news/20150126 Data of 20 Million Users Stolen from Dating Website.md b/translated/news/20150126 Data of 20 Million Users Stolen from Dating Website.md index 14c5249dc3..b4de21c0eb 100644 --- a/translated/news/20150126 Data of 20 Million Users Stolen from Dating Website.md +++ b/translated/news/20150126 Data of 20 Million Users Stolen from Dating Website.md @@ -48,4 +48,4 @@ via:http://news.softpedia.com/news/Data-of-20-Million-Users-Stolen-from-Dating-W 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://news.softpedia.com/editors/browse/ionut-ilascu -[1]:http://newblog.easysol.net/dating-site-breached/ \ No newline at end of file +[1]:http://newblog.easysol.net/dating-site-breached/ From 5f06c4ea2555f5dfa23de3910d6e9546b6f249c1 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 28 Jan 2015 10:26:39 +0800 Subject: [PATCH 031/104] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...illion Users Stolen from Dating Website.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/translated/news/20150126 Data of 20 Million Users Stolen from Dating Website.md b/translated/news/20150126 Data of 20 Million Users Stolen from Dating Website.md index b4de21c0eb..2fd4acc06d 100644 --- a/translated/news/20150126 Data of 20 Million Users Stolen from Dating Website.md +++ b/translated/news/20150126 Data of 20 Million Users Stolen from Dating Website.md @@ -1,37 +1,36 @@ -2000万用户网站数据遭泄露 +交友网站的2000万用户数据遭泄露 ---------- *泄露数据包括Gmail、Hotmail以及Yahoo邮箱* -![泄露的数据很可能来自于线数据网站Topface](http://i1-news.softpedia-static.com/images/news2/Data-of-20-Million-Users-Stolen-from-Dating-Website-471179-2.jpg) +![泄露的数据很可能来自于在线交友网站Topface](http://i1-news.softpedia-static.com/images/news2/Data-of-20-Million-Users-Stolen-from-Dating-Website-471179-2.jpg) -#一名黑客非法窃取了在线数据网站Topface一个包含2000万用户资料的数据库。 +#一名黑客非法窃取了在线交友网站Topface一个包含2000万用户资料的数据库。 -目前并不清楚这些数据是否已经公开,但是根据某些未公开页面的消息说,某个使用在线代理工具“Mastermind”的人声称掌握着这些数据。 +目前并不清楚这些数据是否已经公开,但是根据某些未公开页面的消息说,某个网名为“Mastermind”的人声称掌握着这些数据。 #泄露数据列表涵盖了全世界数百个域名 -此人号称泄露数据的内容100%可用,而Easy Solutions的CTO,Daniel Ingevaldson 周日在一篇博客中说道,泄露数据包括Hotmail、Yahoo和Gmail等邮箱地址。 +此人号称泄露数据的内容100%真实有效,而Easy Solutions的CTO,Daniel Ingevaldson 周日在一篇博客中说道,泄露数据包括Hotmail、Yahoo和Gmail等邮箱地址。 Easy Solutions是一家位于美国的公司,提供多个不同平台的网络检测与安全防护产品。 据Ingevaldson所说,泄露的数据中,700万来自于Hotmail,250万来自于Yahoo,220万来自于Gmail.com。 -我们并不清楚这些数据是可以直接登录邮箱账户的用户名密码,还是只是登录数据网站的账户。另外,也不清楚这些数据在数据库中是加密状态还是明文存在的。 +我们并不清楚这些数据是可以直接登录邮箱账户的用户名和密码,还是登录交友网站的账户。另外,也不清楚这些数据在数据库中是加密状态还是明文存在的。 邮箱地址常常被用于在线网站的登录用户名,用户可以凭借唯一密码进行登录。然而重复使用同一个密码是许多用户的常用作法,同一个密码可以登录许多在线账户。 - -[Ingevaldson 还说](1):“看起来,这些数据事实上涵盖了全世界数百个域名。除了原始的被黑的网页,黑客和不法分子很可能利用窃取的帐密进行暴库、自动扫描、危害包括银行业、旅游业以及email提供商在内的多个网站。” +[Ingevaldson 还说](1):“看起来,这些数据事实上涵盖了全世界数百个域名。除了原始被黑的网页,黑客和不法分子很可能利用窃取的帐密进行暴库、自动扫描、危害包括银行业、旅游业以及email提供商在内的多个网站。” #预计将披露更多信息 -据我们的多个消息源爆料,数据的泄露源就是Topface,一个包含9000万用户的在线数据网站。其总部位于俄罗斯圣彼得堡,超过50%的用户来自于俄罗斯以外的国家。 +据我们的多个消息源爆料,数据的泄露源就是Topface,一个包含9000万用户的在线交友网站。其总部位于俄罗斯圣彼得堡,超过50%的用户来自于俄罗斯以外的国家。 我们联系了Topface,向他们求证最近是否遭受了可能导致如此大量数据泄露的网络攻击;但目前我们仍未收到该公司的回复。 攻击者可能无需获得非法访问权限就窃取了这些数据,Easy Solutions 推测攻击者很可能针对网站客户端使用钓鱼邮件直接获取到了用户数据。 -我们无法通过Easy Solutions的在线网站联系到它们,但我们已经尝试通过其他交互方式联系了它们,目前正在等待更多信息的披露。 +我们无法通过Easy Solutions的在线网站联系到他们,但我们已经尝试了其他交互通讯方式,目前正在等待更多信息的披露。 -------------------------------------------------------------------------------- @@ -43,7 +42,7 @@ via:http://news.softpedia.com/news/Data-of-20-Million-Users-Stolen-from-Dating-W 译者:[Mr小眼儿](https://github.com/tinyeyeser) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From dca9140beb63c885315375c433d3d3f055664b27 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 28 Jan 2015 10:43:12 +0800 Subject: [PATCH 032/104] Finish the translation by ZTinoZ --- ...0 Linux Commands Interview Questions & Answers.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {sources => translated}/talk/20141223 20 Linux Commands Interview Questions & Answers.md (89%) diff --git a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md b/translated/talk/20141223 20 Linux Commands Interview Questions & Answers.md similarity index 89% rename from sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md rename to translated/talk/20141223 20 Linux Commands Interview Questions & Answers.md index 7e73344c2d..40d5019c52 100644 --- a/sources/talk/20141223 20 Linux Commands Interview Questions & Answers.md +++ b/translated/talk/20141223 20 Linux Commands Interview Questions & Answers.md @@ -36,7 +36,7 @@ # diff -Naur old_file new_file > diff_file -旧文件和新文件要么都是单个的文件要么都是包含文件的目录,r选项支持目录树递归。 +旧文件和新文件要么都是单个的文件要么都是包含文件的目录,-r参数支持目录树递归。 一旦diff文件创建好,我们就能在旧的文件上打上补丁,把它变成新文件: @@ -76,7 +76,7 @@ **问:13 如何在/var目录下找出90天之内未被访问过的文件?** -答: # find /var \! -atime -90 +答: # find /var \\! -atime -90 **问:14 在整个目录树下查找核心文件,如发现则删除它们且不提示确认信息。** @@ -102,13 +102,13 @@ 答: 这条ll命令会显示这些文件的文件名和它们的拥有者。 -**问:19 What is the use of at command in linux ?** +**问:19 :Linux中的at命令有什么用?** -答: The at command is used to schedule a one-time execution of a program in the future. All submitted jobs are spooled in the /var/spool/at directory and executed by the atd daemon when the scheduled time arrives. +答: at命令用来安排一个程序在未来的做一次一次性执行。所有提交的任务都被放在 /var/spool/at 目录下并且到了执行时间的时候通过atd守护进程来执行。 -**问:20 What is the role of lspci command in linux ?** +**问:20 linux中lspci命令的作用是什么?** -答: The lspci command displays information about PCI buses and the devices attached to your system. Specify -v, -vv, or -vvv for detailed output. With the -m option, the command produces more legible output. +答: lspci命令用来显示你的系统上PCI总线和附加设备的信息。指定-v,-vv或-vvv来获取详细输出,加上-r参数的话,命令的输出则会更具有易读性。 -------------------------------------------------------------------------------- From 39f39dccb7f1d82fb7126b5ec90c47ce2a707fc9 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 28 Jan 2015 11:09:24 +0800 Subject: [PATCH 033/104] Update 20150127 Install Jetty Web Server On CentOS 7.md --- sources/tech/20150127 Install Jetty Web Server On CentOS 7.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150127 Install Jetty Web Server On CentOS 7.md b/sources/tech/20150127 Install Jetty Web Server On CentOS 7.md index 0cfb868498..d7c4b41a24 100644 --- a/sources/tech/20150127 Install Jetty Web Server On CentOS 7.md +++ b/sources/tech/20150127 Install Jetty Web Server On CentOS 7.md @@ -1,3 +1,5 @@ +Translating---geekpi + Install Jetty Web Server On CentOS 7 ================================================================================ [Jetty][1] is a pure Java-based HTTP **(Web) server** and Java Servlet container. Jetty is now often used for machine to machine communications, usually within larger software frameworks. But the other Web Servers are usually associated with serving documents to humans. Jetty is developed as a free and open source project as part of the Eclipse Foundation. The web server is used in products such as Apache ActiveMQ, Alfresco, Apache Geronimo, Apache Maven, Apache Spark, Google App Engine, Eclipse, FUSE, Twitter’s Streaming API and Zimbra. @@ -75,4 +77,4 @@ via: http://www.unixmen.com/install-jetty-web-server-centos-7/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.unixmen.com/author/jijo/ -[1]:http://eclipse.org/jetty/ \ No newline at end of file +[1]:http://eclipse.org/jetty/ From 42ec379de6e7182f8e315c968adeccbc1fe84183 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 28 Jan 2015 11:21:02 +0800 Subject: [PATCH 034/104] =?UTF-8?q?20150128-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...A New Web Browser Built for Power Users.md | 60 ++++++++ ...A Package Is Installed Or Not In Ubuntu.md | 137 ++++++++++++++++++ 2 files changed, 197 insertions(+) create mode 100644 sources/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md create mode 100644 sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md diff --git a/sources/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md b/sources/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md new file mode 100644 index 0000000000..c55a5fabe7 --- /dev/null +++ b/sources/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md @@ -0,0 +1,60 @@ +Meet Vivaldi — A New Web Browser Built for Power Users +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/Screen-Shot-2015-01-27-at-17.36.jpg) + +**A brand new web browser has arrived this week that aims to meet the needs of power users — and it’s already available for Linux.** + +Vivaldi is the name of this new browser and it has been launched as a tech preview (read: a beta without the responsibility) for 64-bit Linux machines, Windows and Mac. It is built — shock — on the tried-and-tested open-source frameworks of Chromium, Blink and Google’s open-source V8 JavaScript engine (among other projects). + +Does the world really want another browser? Vivaldi, the brain child of former Opera Software CEO Jon von Tetzchner, is less concerned about want and more about need. + +Vivaldi is being built with the sort of features that keyboard preferring tab addicts need. It is not being pitched at users who find Firefox perplexing or whose sole criticism of Chrome is that it moved the bookmarks button. + +That’s not tacky marketing spiel either. Despite the ‘technical preview’ badge it comes with, Vivaldi is already packed with features that demonstrate its power user slant. + +Plenty of folks feel left behind and underserved by the simplified, paired back offerings other software companies are producing. Vivaldi, even at this early juncture, looks well placed to succeed in winning them over. + +### Vivaldi Features ### + +A few of Vivaldi’s key features already present include: + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/quick.jpg) + +**Quick Commands** (Ctrl + Q) is an in-app HUD that lets you quickly filter through settings, options and features, be it opening a bookmark or hiding the status bar, using your keyboard. No clicks needed. + +**Tab Stacks** let you clean up your workspace by grouping separate tabs into one, and then using a keyboard command or the tab preview picker to switch between them. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/tab-stacks.jpg) + +A collapsible **side panel** that houses extra features (just like old Opera) including a (not yet working) mail client, contacts, bookmarks browser and note taking section that lets you take and annotate screenshots. + +A bunch of other features are on offer too, including customizable keyboard shortcuts, a tabs bar that can be set on any edge of the browser (or hidden entirely), privacy options and a speed dial with folders. + +### Opera Mark II ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/vivaldi-settings-in-ubuntu-750x434.jpg) + +It’s not a leap to see Vivaldi as the true successor to Opera post-Presto (Opera’s old, proprietary rendering engine). Opera (which also pushed out a minor new update today) has split out many of its “power user” features as it chases a lighter, more manageable set of features. + +Vivaldi wants to pick up the baggage Opera has been so keen to offload. And while that might not help it grab marketshare it will see it grab the attention of power users, many of whom will no doubt already be using Linux. + +### Download ### + +Interested in taking it for a spin? You can. Vivaldi is available to download for Windows, Mac and 64-bit Linux distributions. On the latter you have a choice of Debian or RPM installer. + +Bear in mind that it’s not finished and that more features (including extensions, sync and more) are planned for future builds. + +- [Download Vivaldi Tech Preview for Linux][1] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/01/vivaldi-web-browser-linux-download-power-users + +作者:[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://vivaldi.com/#Download \ No newline at end of file diff --git a/sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md b/sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md new file mode 100644 index 0000000000..6b68f02b1e --- /dev/null +++ b/sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md @@ -0,0 +1,137 @@ +Linux Basics: How To Check If A Package Is Installed Or Not In Ubuntu +================================================================================ +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/04/ubuntu-790x558.png) + +If you’re managing Debian or Ubuntu servers, probably, you may use **dpkg** or **apt-get** commands often. These two commands are used to install, remove, update packages. + +In this brief tutorial, let us see how to check if a package is installed or not in DEB based systems. + +To check whether a particular package for example firefox, is installed or not using command: + + dpkg -s firefox + +Sample output: + + Package: firefox + Status: install ok installed + Priority: optional + Section: web + Installed-Size: 93339 + Maintainer: Ubuntu Mozilla Team + Architecture: amd64 + Version: 35.0+build3-0ubuntu0.14.04.2 + Replaces: kubuntu-firefox-installer + Provides: gnome-www-browser, iceweasel, www-browser + Depends: lsb-release, libasound2 (>= 1.0.16), libatk1.0-0 (>= 1.12.4), libc6 (>= 2.17), libcairo2 (>= 1.2.4), libdbus-1-3 (>= 1.0.2), libdbus-glib-1-2 (>= 0.78), libfontconfig1 (>= 2.9.0), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.1.1), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.37.3), libgtk2.0-0 (>= 2.24.0), libpango-1.0-0 (>= 1.22.0), libpangocairo-1.0-0 (>= 1.14.0), libstartup-notification0 (>= 0.8), libstdc++6 (>= 4.6), libx11-6, libxcomposite1 (>= 1:0.3-1), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxrender1, libxt6 + Recommends: xul-ext-ubufox, libcanberra0, libdbusmenu-glib4, libdbusmenu-gtk4 + Suggests: ttf-lyx + Conffiles: + /etc/firefox/syspref.js 09e457e65435a1a043521f2bd19cd2a1 + /etc/apport/blacklist.d/firefox ee63264f847e671832d42255912ce144 + /etc/apport/native-origins.d/firefox 7c26b75c7c2b715c89cc6d85338252a4 + /etc/apparmor.d/usr.bin.firefox f54f7a43361c7ecfa3874abca2f292cf + Description: Safe and easy web browser from Mozilla + Firefox delivers safe, easy web browsing. A familiar user interface, + enhanced security features including protection from online identity theft, + and integrated search let you get the most out of the web. + Xul-Appid: {ec8030f7-c20a-464f-9b0e-13a3a9e97384} + +As you see in the above output, the firefox is installed. + +Also, you can do the same using **dpkg-query** command. This command displays the decent output, and ofcourse, you can wild cards too. + + dpkg-query -l firefox + +Sample output: + + Desired=Unknown/Install/Remove/Purge/Hold + | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend + |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) + ||/ Name Version Architecture Description + +++-====================================-=======================-=======================-============================================================================= + ii firefox 35.0+build3-0ubuntu0.14 amd64 Safe and easy web browser from Mozilla + +To list all installed package in your system, enter the following command + + dpkg --get-selections + +Sample output: + + abiword install + abiword-common install + accountsservice install + acl install + adduser install + alsa-base install + alsa-utils install + anacron install + app-install-data install + apparmor install + . + . + . + zeitgeist install + zeitgeist-core install + zeitgeist-datahub install + zenity install + zenity-common install + zip install + zlib1g:amd64 install + zlib1g:i386 install + +The above might be very long depending upon the number of packages you have installed on your system. + +You can also filter through **grep** to get results for the exact package you need. For example, I want to see which gcc packages are already installed on my system using **dpkg** command: + + dpkg --get-selections | grep gcc + +Sample output: + + gcc install + gcc-4.8 install + gcc-4.8-base:amd64 install + gcc-4.8-base:i386 install + gcc-4.9-base:amd64 install + gcc-4.9-base:i386 install + libgcc-4.8-dev:amd64 install + libgcc1:amd64 install + libgcc1:i386 install + +Additionally, you can find location of the files within a package using the parameter “**-L**”. + + dpkg -L gcc-4.8 + +Sample output: + + /. + /usr + /usr/share + /usr/share/doc + /usr/share/doc/gcc-4.8-base + /usr/share/doc/gcc-4.8-base/README.Bugs + /usr/share/doc/gcc-4.8-base/NEWS.html + /usr/share/doc/gcc-4.8-base/quadmath + /usr/share/doc/gcc-4.8-base/quadmath/changelog.gz + /usr/share/doc/gcc-4.8-base/gcc + . + . + . + /usr/bin/x86_64-linux-gnu-gcc-4.8 + /usr/bin/x86_64-linux-gnu-gcc-ar-4.8 + /usr/bin/x86_64-linux-gnu-gcov-4.8 + +That’s all for now. Hope this short tutorial will useful for you. + +Good day! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/linux-basics-check-package-installed-not-ubuntu/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ \ No newline at end of file From c4cf2f2a7d87d487d831f99fd7b0a48936947ae8 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 28 Jan 2015 11:35:02 +0800 Subject: [PATCH 035/104] translated --- ...27 Install Jetty Web Server On CentOS 7.md | 40 +++++++++---------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/sources/tech/20150127 Install Jetty Web Server On CentOS 7.md b/sources/tech/20150127 Install Jetty Web Server On CentOS 7.md index d7c4b41a24..3cdb89ca76 100644 --- a/sources/tech/20150127 Install Jetty Web Server On CentOS 7.md +++ b/sources/tech/20150127 Install Jetty Web Server On CentOS 7.md @@ -1,48 +1,46 @@ -Translating---geekpi - -Install Jetty Web Server On CentOS 7 +在CentOS 7中安装Jetty服务器 ================================================================================ -[Jetty][1] is a pure Java-based HTTP **(Web) server** and Java Servlet container. Jetty is now often used for machine to machine communications, usually within larger software frameworks. But the other Web Servers are usually associated with serving documents to humans. Jetty is developed as a free and open source project as part of the Eclipse Foundation. The web server is used in products such as Apache ActiveMQ, Alfresco, Apache Geronimo, Apache Maven, Apache Spark, Google App Engine, Eclipse, FUSE, Twitter’s Streaming API and Zimbra. +[Jetty][1] 是一款纯Java的HTTP **(Web) 服务器**和Java Servlet容器。 通常在更大的网络框架中,Jetty经常用于设备间的通信。但是其他Web服务器通常给人类传递文件。Jetty是一个Eclipse基金中免费开源项目。这个Web服务器用于如Apache ActiveMQ、 Alfresco、 Apache Geronimo、 Apache Maven、 Apache Spark、Google App Engine、 Eclipse、 FUSE、 Twitter的 Streaming API 和 Zimbra中。 -This article explains ‘How to install jetty web server in your CentOS server’. +这篇文章会解释‘如何在CentOS服务器中安装Jetty服务器’。 -**First of all we have to install java JDK, By the following command:** +**首先我们要用下面的命令安装JDK:** yum -y install java-1.7.0-openjdk wget -**After the JDK installation, We will download the latest version of Jetty:** +**JDK安装之后,我们就可以下载最新版本的Jetty了:** wget http://download.eclipse.org/jetty/stable-9/dist/jetty-distribution-9.2.5.v20141112.tar.gz -**Extract and move the the downloaded package to /opt:** +**解压并移动下载的包到/opt:** tar zxvf jetty-distribution-9.2.5.v20141112.tar.gz -C /opt/ -**Rename the file name to jetty:** +**重命名文件夹名为jetty:** mv /opt/jetty-distribution-9.2.5.v20141112/ /opt/jetty -**Create a user called jetty:** +**创建一个jetty用户:** useradd -m jetty -**Change the ownership of jetty:** +**改变jetty文件夹的所属用户:** chown -R jetty:jetty /opt/jetty/ -**Make a Symlink jetty.sh to /etc/init.d directory to create a start up script file:** +**为jetty.sh创建一个软链接到 /etc/init.d directory 来创建一个启动脚本文件:** ln -s /opt/jetty/bin/jetty.sh /etc/init.d/jetty -**Add script:** +**添加脚本:** chkconfig --add jetty -**Make the jetty web server auto starts on system boot:** +**是jetty在系统启动时启动:** chkconfig --level 345 jetty on -**Open /etc/default/jetty in your favorite editor and replace port and listening address desired value:** +**使用你最喜欢的文本编辑器打开 /etc/default/jetty 并修改端口和监听地址:** vi /etc/default/jetty @@ -54,24 +52,24 @@ This article explains ‘How to install jetty web server in your CentOS server JETTY_HOST=50.116.24.78 JETTY_LOGS=/opt/jetty/logs/ -**We finished the installation, Now you have to start the jetty service.** +**我们完成了安装,现在可以启动jetty服务了 ** service jetty start -All done! +完成了! -Now you can access jetty web sever in **http://:8080** +现在你可以在 **http://:8080** 中访问了 -That’s it! +就是这样。 -Cheers!! +干杯!! -------------------------------------------------------------------------------- via: http://www.unixmen.com/install-jetty-web-server-centos-7/ 作者:[Jijo][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 8bd4ee503f0540e33a4887e85997e77c2c62b8d2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 28 Jan 2015 11:35:50 +0800 Subject: [PATCH 036/104] Rename sources/tech/20150127 Install Jetty Web Server On CentOS 7.md to sources/translated/20150127 Install Jetty Web Server On CentOS 7.md --- .../20150127 Install Jetty Web Server On CentOS 7.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => translated}/20150127 Install Jetty Web Server On CentOS 7.md (100%) diff --git a/sources/tech/20150127 Install Jetty Web Server On CentOS 7.md b/sources/translated/20150127 Install Jetty Web Server On CentOS 7.md similarity index 100% rename from sources/tech/20150127 Install Jetty Web Server On CentOS 7.md rename to sources/translated/20150127 Install Jetty Web Server On CentOS 7.md From de548c0edf1e8332f34d02ed866d1906552e5f13 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 28 Jan 2015 11:42:32 +0800 Subject: [PATCH 037/104] =?UTF-8?q?20150128-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... The top 10 rookie open source projects.md | 153 ++++++++++++++++++ ...s Point Signal Strength With wifi-linux.md | 86 ++++++++++ 2 files changed, 239 insertions(+) create mode 100644 sources/talk/20150128 The top 10 rookie open source projects.md create mode 100644 sources/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md diff --git a/sources/talk/20150128 The top 10 rookie open source projects.md b/sources/talk/20150128 The top 10 rookie open source projects.md new file mode 100644 index 0000000000..0dfcb07a48 --- /dev/null +++ b/sources/talk/20150128 The top 10 rookie open source projects.md @@ -0,0 +1,153 @@ +The top 10 rookie open source projects +================================================================================ +Black Duck presents its Open Source Rookies of the Year -- the 10 most exciting, active new projects germinated by the global open source community + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_01-100564902-orig.jpeg) + +### Open Source Rookies of the Year ### + +Each year sees the start of thousands of new open source projects. Only a handful gets real traction. Some projects gain momentum by building on existing, well-known technologies; others truly break new ground. Many projects are created to solve a simple development problem, while others begin with loftier intentions shared by like-minded developers around the world. + +Since 2009, the open source software logistics company Black Duck has identified the [Open Source Rookies of the Year][1], based on activity tracked by its [Open Hub][2] (formerly Ohloh) site. This year, we're delighted to present 10 winners and two honorable mentions for 2015, selected from thousands of open source projects. Using a weighted scoring system, points were awarded based on project activity, the pace of commits, and several other factors. + +Open source has become the industry's engine of innovation. This year, for example, growth in projects related to Docker containerization trumped every other rookie area -- and not coincidentally reflected the most exciting area of enterprise technology overall. At the very least, the projects described here provide a window on what the global open source developer community is thinking, which is fast becoming a good indicator of where we're headed. + +### 2015 Open Source Rookie of the Year: DebOps ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_02-100564903-orig.jpeg) + +[DebOps][3] is a collection of [Ansible][4] playbooks and roles, scalable from one container to an entire data center. Founder Maciej Delmanowski open-sourced DebOps to ensure his work outlived his current work environment and could grow in strength and depth from outside contributors. + +DebOps began at a small university in Poland that ran its own data center, where everything was configured by hand. Crashes sometimes led to days of downtime -- and Delmanowski realized that a configuration management system was needed. Starting with a Debian base, DebOps is a group of Ansible playbooks that configure an entire data infrastructure. The project has been implemented in many different working environments, and the founders plan to continue supporting and improving it as time goes on. + +### 2015 Open Source Rookie of the Year: Code Combat ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_03-100564904-gallery.idge.jpg) + +The traditional pen-and-paper way of learning falls short for technical subjects. Games, however, are all about engagement -- which is why the founders of [CodeCombat][5] went about creating a multiplayer programming game to teach people how to code. + +At its inception, CodeCombat was an idea for a startup, but the founders decided to create an open source project instead. The idea blossomed within the community, and the project gained contributors at a steady rate. A mere two months after its launch, the game was accepted into Google’s Summer of Code. The game reaches a broad audience and is available in 45 languages. CodeCombat hopes to become the standard for people who want to learn to code and have fun at the same time. + +### 2015 Open Source Rookie of the Year: Storj ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_04-100564905-gallery.idge.jpg) + +[Storj][6] is a peer-to-peer cloud storage network that implements end-to-end encryption, enabling users to transfer and share data without reliance on a third party. Based on bitcoin blockchain technology and peer-to-peer protocols, Storj provides secure, private, and encrypted cloud storage. + +Opponents of cloud-based data storage worry about cost efficiencies and vulnerability to attack. Intended to address both concerns, Storj is a private cloud storage marketplace where space is purchased and traded via Storjcoin X (SJCX). Files uploaded to Storj are shredded, encrypted, and stored across the community. File owners are the sole individuals who possess keys to the encrypted information. + +The proof of concept for this decentralized cloud storage marketplace was first presented at the Texas Bitcoin Conference Hackathon in 2014. After winning first place in the hackathon, the project founders and leaders used open forums, Reddit, bitcoin forums, and social media to grow an active community, now an essential part of the Storj decision-making process. + +### 2015 Open Source Rookie of the Year: Neovim ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_05-100564906-orig.jpg) + +Since its inception in 1991, Vim has been a beloved text editor adopted by millions of software developers. [Neovim][6] is the next generation. + +The software development ecosystem has experienced exponential growth and innovation over the past 23 years. Neovim founder Thiago de Arruda knew that Vim was lacking in modern-day features and development speed. Although determined to preserve the signature features of Vim, the community behind Neovim seeks to improve and evolve the technology of its favorite text editor. Crowdfunding initially enabled de Arruda to focus six uninterrupted months on launching this endeavor. He credits the Neovim community for supporting the project and for inspiring him to continue contributing. + +### 2015 Open Source Rookie of the Year: CockroachDB ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_06-100564907-orig.jpg) + +Former Googlers are bringing a big-company data solution to open source in the form of [CockroachDB][8], a scalable, geo-replicated, transactional data store. + +To maintain the terabytes of data transacted over its global online properties, Google developed Spanner. This powerful tool provides Google with scalability, survivability, and transactionality -- qualities that the team behind CockroachDB is serving up to the open source community. Like an actual cockroach, CockroachDB can survive without its head, tolerating the failure of any node. This open source project has a devoted community of experienced contributors, actively cultivated by the founders via social media, GitHub, networking, conferences, and meet-ups. + +### 2015 Open Source Rookie of the Year: Kubernetes ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_07-100564908-orig.jpg) + +In introducing containerized software development to the open source community, [Docker][9] has become the backbone of a strong, innovative set of tools and technologies. [Kubernetes][10], which Google introduced last June, is an open source container management tool used to accelerate development and simplify operations. + +Google has been using containers for years in its internal operations. At the summer 2014 DockerCon, the Internet giant open-sourced Kubernetes, which was developed to meet the needs of the exponentially growing Docker ecosystem. Through collaborations with other organizations and projects, such as Red Hat and CoreOS, Kubernetes project managers have grown their project to be the No. 1 downloaded tool on the Docker Hub. The Kubernetes team hopes to expand the project and grow the community, so software developers can spend less time managing infrastructure and more time building the apps they want. + +### 2015 Open Source Rookie of the Year: Open Bazaar ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_08-100564909-orig.jpg) + +[OpenBazaar][11] is a decentralized marketplace for trading with anyone using bitcoin. The proof of concept for OpenBazaar was born at a hackathon, where its founders combined BitTorent, bitcoin, and traditional financial server methodologies to create a censorship-resistant trading platform. The OpenBazaar team sought new members, and before long they were able to expand the OpenBazaar community immensely. The table stakes of OpenBazaar -- transparency and a common goal to revolutionize trade and commerce -- are helping founders and contributors work toward a real-world, uncontrolled, and decentralized marketplace. + +### 2015 Open Source Rookie of the Year: IPFS ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_09-100564910-orig.jpg) + +[IPFS (InterPlanetary File System)][12] is a global, versioned, peer-to-peer file system.It synthesizes many of the ideas behind Git, BitTorrent, and HTTP to bring a new data and data structure transport protocol to the open Web. + +Open source is known for developing simple solutions to complex problems that result in many innovations, but these powerful projects represent only one slice of the open source community. IFPS belong to a more radical group whose proof of concept seems daring, outrageous, and even unattainable -- in this case, a peer-to-peer distributed file system that seeks to connect all computing devices. This possible HTTP replacement maintains a community through multiple mediums, including the Git community and an IRC channel that has more than 100 current contributors. This “crazy” idea will be available for alpha testing in 2015. + +### 2015 Open Source Rookie of the Year: cAdvisor ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_10-100564911-orig.jpg) + +[cAdvisor (Container Advisor)][13] is a daemon that collects, aggregates, processes, and exports information about running containers, providing container users with an understanding of resource usage and performance characteristics. For each container, cAdvisor keeps resource isolation parameters, historical resource usage, histograms of complete historical resource usage, and network statistics. This data is exported by container and across machines. + +cAdvisor can run on most Linux distros and supports many container types, including Docker. It has become the de facto monitoring agent for containers, has been integrated into many systems, and is one of the most downloaded images on the Docker Hub. The team hopes to grow cAdvisor to understand application performance more deeply and to integrate this information into clusterwide systems. + +### 2015 Open Source Rookie of the Year: Terraform ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_11-100564912-orig.jpg) + +[Terraform][14] provides a common configuration to launch infrastructure, from physical and virtual servers to email and DNS providers. The idea is to encompass everything from custom in-house solutions to services offered by public cloud platforms. Once launched, Terraform enables ops to change infrastructure safely and efficiently as the configuration evolves. + +Working at a devops company, Terraform.io's founders identified a pain point in codifying the knowledge required to build a complete data center, from plugged-in servers to a fully networked and functional data center. Infrastructure is described using a high-level configuration syntax, which allows a blueprint of your data center to be versioned and treated as you would any other code. Sponsorship from the well-respected open source company HashiCorp helped launch the project. + +### Honorable mention: Docker Fig ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_12-100564913-orig.jpg) + +[Fig][15] provides fast, isolated development environments using [Docker][16]. It moves the configuration required to orchestrate Docker into a simple fig.yml file. It handles all the work of building and running containers and forwarding their ports, as well as sharing volumes and linking them. + +Orchard formed Fig last year to create a new system of tools to make Docker work. It was developed as a way of setting up development environments with Docker, enabling users to define the exact environment for their apps, while also running databases and caches inside Docker. Fig solved a major pain point for developers. Docker fully supports this open source project and [recently purchased Orchard][17] to expand the reach of Fig. + +### Honorable mention: Drone ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_13-100564916-orig.jpg) + +[Drone][18] is a Continuous Integration platform built on Docker and [written in Go][19]. The Drone project grew out of frustration with existing available technologies and processes for setting up development environments. + +Drone provides a simple approach to automated testing and continuous delivery: Simply pick a Docker image tailored to your needs, connect GitHub, and commit. Drone uses Docker containers to provision isolated testing environments, giving every project complete control over its stack without the burden of traditional server administration. The community behind Drone is 100 contributors strong and hopes to bring this project to the enterprise and to mobile app development. + +### Open source rookies ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_14-100564941-orig.jpg) + +- [Open Source Rookies of the 2014 Year][20] +- [InfoWorld's 2015 Technology of the Year Award winners][21] +- [Bossies: The Best of Open Source Software Awards][22] +- [15 essential open source tools for Windows admins][23] + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2875439/open-source-software/the-top-10-rookie-open-source-projects.html + +作者:[Black Duck Software][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Black-Duck-Software/ +[1]:https://www.blackducksoftware.com/open-source-rookies +[2]:https://www.openhub.net/ +[3]:https://github.com/debops/debops +[4]:http://www.infoworld.com/article/2612397/data-center/review--ansible-orchestration-is-a-veteran-unix-admin-s-dream.html +[5]:https://codecombat.com/ +[6]:http://storj.io/ +[7]:http://neovim.org/ +[8]:https://github.com/cockroachdb/cockroach +[9]:http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker +[10]:http://kubernetes.io/ +[11]:https://openbazaar.org/ +[12]:http://ipfs.io/ +[13]:https://github.com/google/cadvisor +[14]:https://www.terraform.io/ +[15]:http://www.fig.sh/ +[16]:http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker +[17]:http://www.infoworld.com/article/2608546/application-virtualization/docker-acquires-orchard-in-a-sign-of-rising-ambitions.html +[18]:https://drone.io/ +[19]:http://www.infoworld.com/article/2683845/google-go/164121-Fast-guide-to-Go-programming.html +[20]:https://www.blackducksoftware.com/open-source-rookies +[21]:http://www.infoworld.com/article/2871935/application-development/infoworlds-2015-technology-of-the-year-award-winners.html +[22]:http://www.infoworld.com/article/2688104/open-source-software/article.html +[23]:http://www.infoworld.com/article/2854954/microsoft-windows/15-essential-open-source-tools-for-windows-admins.html \ No newline at end of file diff --git a/sources/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md b/sources/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md new file mode 100644 index 0000000000..d652b15d8c --- /dev/null +++ b/sources/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md @@ -0,0 +1,86 @@ +How To Monitor Access Point Signal Strength With wifi-linux +================================================================================ +As a python geek I love exploring new python tools on github that target the linux users. Today I discovered a simple application written in python programming language that can be used to monitor access point signal strength. + +I have been experimenting for about two hours with **wifi-linux** and it works great but I would like to see some unittests in the near future from the author as the command **plot** is not working on my machine and is also causing some errors. + +### What is wifi-linux ### + +According to the official readme.md file on author's github account wifi-linux is a very simple python script which collects RSSI information about wifi access points around you and draws graphics showing RSSI activity. + +The author states that the program also draws RSSI activity graphic and this can be generated with the command plot but unfortunetly it is not working for me. wifi-linux supports other commands such as **bp** to add a breakpoint, **print** to print some statistics and **start changer**. + +The wifi-linux application has the folowing dependencies: + +- dbus-python +- gnuplot-py + +So first we have to install all the package dependencies for our project in order to run it in our linux machine. + +### Install pakages required by wifi-linux ### + +I tried to install python-dbus by using the pip tool which is used to manage python packages but it did not work and the reason for this is that pip looks for setup.py, which dbus-python doesn't have. So the following command is not going to work. + + pip install dbus-python + +And to make sure it does not work give it a try. It is a very high probability that you will get the following error displayed on your console. + + IOError: [Errno 2] No such file or directory: '/tmp/pip_build_oltjano/dbus-python/setup.py' + +How did I manage to solve this problem? It is very simple. I installed the the system package for the Python DBUS bindings using the following command. + + sudo apt-get install python-dbus + +The above command will work only in machines that make use of the apt-get package manager such as Debian and Ubuntu. + +Then the second dependency we have to take care is the gnuplot-py. Download it, extract using the tar utility and then run setup.py install to install the python package. + +First step is to download gnuplot-py. + + wget http://prdownloads.sourceforge.net/gnuplot-py/gnuplot-py-1.8.tar.gz + +Then use the tar utility to extract it. + + tar xvf gnuplot-py-1.8.tar.gz + +Then use the cd command to change directory. + + cd gnuplot-py-1.8 + +Once there then run the following command to install the package gunplot-py on your system. + + sudo setup.py install + +Once the installation is finished you are ready to run the wifi-linux on your machine. Just download it and use the following command to run the script. + +Download wifi-linux on your local machine by using the following command. + + wget https://github.com/dixel/wifi-linux/archive/master.zip + +Extract the master.zip archive and then use the following command to run the python script list_rsssi.py + + python list_rssi.py + +The following screenshot shows wifi-linux in action. + +![wifi-linux to monitor wifi signal strength](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux.png) + +Then the command **bp** is executed to add a breakpoint like shown below. + +![the bp command in wifi-linux](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux2.png) + +The command **print** can be used to display stats on the console of your machine. An example of its usage is shown below. + +![the print command](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux3.png) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/monitor-access-point-signal-strength-wifi-linux/ + +作者:[Oltjano Terpollari][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/oltjano/ \ No newline at end of file From 3d2f5499edb81cdf61c7415246495c0458f9a577 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 28 Jan 2015 12:19:38 +0800 Subject: [PATCH 038/104] Rename sources/translated/20150127 Install Jetty Web Server On CentOS 7.md to translated/tech/20150127 Install Jetty Web Server On CentOS 7.md --- .../tech}/20150127 Install Jetty Web Server On CentOS 7.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources/translated => translated/tech}/20150127 Install Jetty Web Server On CentOS 7.md (100%) diff --git a/sources/translated/20150127 Install Jetty Web Server On CentOS 7.md b/translated/tech/20150127 Install Jetty Web Server On CentOS 7.md similarity index 100% rename from sources/translated/20150127 Install Jetty Web Server On CentOS 7.md rename to translated/tech/20150127 Install Jetty Web Server On CentOS 7.md From d41d49ab7e0d1a0bfb023e36b53d5cbc034e84b4 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 28 Jan 2015 12:49:31 +0800 Subject: [PATCH 039/104] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0150126 Data of 20 Million Users Stolen from Dating Website.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/news => published}/20150126 Data of 20 Million Users Stolen from Dating Website.md (100%) diff --git a/translated/news/20150126 Data of 20 Million Users Stolen from Dating Website.md b/published/20150126 Data of 20 Million Users Stolen from Dating Website.md similarity index 100% rename from translated/news/20150126 Data of 20 Million Users Stolen from Dating Website.md rename to published/20150126 Data of 20 Million Users Stolen from Dating Website.md From a43c57cda8eec9586de5644ee58b58ec1013e23b Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 27 Jan 2015 23:57:15 -0500 Subject: [PATCH 040/104] add a file for PR#2296 --- ...nstall ixgbe driver on Ubuntu or Debian.md | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 translated/tech/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md diff --git a/translated/tech/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md b/translated/tech/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md new file mode 100644 index 0000000000..aab015201e --- /dev/null +++ b/translated/tech/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md @@ -0,0 +1,144 @@ +Linux 有问必答: 如何在Ubuntu或者Debian中下载和安装ixgbe驱动 +================================================================================ +> **提问**: 我想为我的Intel 10G网卡下载安装最新的ixgbe。我该如何在Ubuntu(或者Debian)中安装ixgbe驱动? + +Intel的10G网卡(比如,82598、 82599、 x540)由ixgbe驱动支持。现代的Linux发版已经将ixgbe作为一个可加载模块。然而,有些情况你不想要你机器上的已经编译和安装的ixgbe驱动。比如,你想要体验ixbge驱动的最新特性。同样,自带内核中的ixgbe中的一个默认问题是不允许你自定义旭东内核参数。如果你想要完全自动一ixgbe驱动(比如 RSS、多队列、中断阈值等等),你需要手动从源码编译ixgbe驱动。 + +这里是如何在Ubuntu、Debian或者它们的衍生版中下载安装ixgbe驱动。 + +### 第一步: 安装前提 ### + +安装之前,需要安装匹配的内核头文件和开发工具包。 + + $ sudo apt-get install linux-headers-$(uname -r) + $ sudo apt-get install gcc make + +### 第二步: 编译Ixgbe驱动 ### + +从[最新的ixgbe驱动][1]中下载源码。 + + $ wget http://sourceforge.net/projects/e1000/files/ixgbe%20stable/3.23.2/ixgbe-3.23.2.tar.gz + +如下编译ixgbe驱动。 + + $ tar xvfvz ixgbe-3.23.2.tar.gz + $ cd ixgbe-3.23.2/src + $ make + +### 第三步: 检查Ixgbe驱动 ### + +编译之后,你会看到在ixgbe-3.23.2/src目录下创建了**ixgbe.ko**。这就是会加载到内核之中的ixgbe驱动。 + +用modinfo命令检查内核模块的信息。注意你需要指定模块的绝对路径(比如 ./ixgbe.ko 或者 /home/xmodulo/ixgbe/ixgbe-3.23.2/src/ixgbe.ko)。输出中会显示ixgbe内核的版本。 + + $ modinfo ./ixgbe.ko + +---------- + + filename: /home/xmodulo/ixgbe/ixgbe-3.23.2/src/ixgbe.ko + version: 3.23.2 + license: GPL + description: Intel(R) 10 Gigabit PCI Express Network Driver + author: Intel Corporation, + srcversion: 2ADA5E537923E983FA9DAE2 + alias: pci:v00008086d00001560sv*sd*bc*sc*i* + alias: pci:v00008086d00001558sv*sd*bc*sc*i* + alias: pci:v00008086d0000154Asv*sd*bc*sc*i* + alias: pci:v00008086d00001557sv*sd*bc*sc*i* + alias: pci:v00008086d0000154Fsv*sd*bc*sc*i* + alias: pci:v00008086d0000154Dsv*sd*bc*sc*i* + alias: pci:v00008086d00001528sv*sd*bc*sc*i* + alias: pci:v00008086d000010F8sv*sd*bc*sc*i* + alias: pci:v00008086d0000151Csv*sd*bc*sc*i* + alias: pci:v00008086d00001529sv*sd*bc*sc*i* + alias: pci:v00008086d0000152Asv*sd*bc*sc*i* + alias: pci:v00008086d000010F9sv*sd*bc*sc*i* + alias: pci:v00008086d00001514sv*sd*bc*sc*i* + alias: pci:v00008086d00001507sv*sd*bc*sc*i* + alias: pci:v00008086d000010FBsv*sd*bc*sc*i* + alias: pci:v00008086d00001517sv*sd*bc*sc*i* + alias: pci:v00008086d000010FCsv*sd*bc*sc*i* + alias: pci:v00008086d000010F7sv*sd*bc*sc*i* + alias: pci:v00008086d00001508sv*sd*bc*sc*i* + alias: pci:v00008086d000010DBsv*sd*bc*sc*i* + alias: pci:v00008086d000010F4sv*sd*bc*sc*i* + alias: pci:v00008086d000010E1sv*sd*bc*sc*i* + alias: pci:v00008086d000010F1sv*sd*bc*sc*i* + alias: pci:v00008086d000010ECsv*sd*bc*sc*i* + alias: pci:v00008086d000010DDsv*sd*bc*sc*i* + alias: pci:v00008086d0000150Bsv*sd*bc*sc*i* + alias: pci:v00008086d000010C8sv*sd*bc*sc*i* + alias: pci:v00008086d000010C7sv*sd*bc*sc*i* + alias: pci:v00008086d000010C6sv*sd*bc*sc*i* + alias: pci:v00008086d000010B6sv*sd*bc*sc*i* + depends: ptp,dca + vermagic: 3.11.0-19-generic SMP mod_unload modversions + parm: InterruptType:Change Interrupt Mode (0=Legacy, 1=MSI, 2=MSI-X), default IntMode (deprecated) (array of int) + parm: IntMode:Change Interrupt Mode (0=Legacy, 1=MSI, 2=MSI-X), default 2 (array of int) + parm: MQ:Disable or enable Multiple Queues, default 1 (array of int) + parm: DCA:Disable or enable Direct Cache Access, 0=disabled, 1=descriptor only, 2=descriptor and data (array of int) + parm: RSS:Number of Receive-Side Scaling Descriptor Queues, default 0=number of cpus (array of int) + parm: VMDQ:Number of Virtual Machine Device Queues: 0/1 = disable, 2-16 enable (default=8) (array of int) + parm: max_vfs:Number of Virtual Functions: 0 = disable (default), 1-63 = enable this many VFs (array of int) + parm: VEPA:VEPA Bridge Mode: 0 = VEB (default), 1 = VEPA (array of int) + parm: InterruptThrottleRate:Maximum interrupts per second, per vector, (0,1,956-488281), default 1 (array of int) + parm: LLIPort:Low Latency Interrupt TCP Port (0-65535) (array of int) + parm: LLIPush:Low Latency Interrupt on TCP Push flag (0,1) (array of int) + parm: LLISize:Low Latency Interrupt on Packet Size (0-1500) (array of int) + parm: LLIEType:Low Latency Interrupt Ethernet Protocol Type (array of int) + parm: LLIVLANP:Low Latency Interrupt on VLAN priority threshold (array of int) + parm: FdirPballoc:Flow Director packet buffer allocation level: + 1 = 8k hash filters or 2k perfect filters + 2 = 16k hash filters or 4k perfect filters + 3 = 32k hash filters or 8k perfect filters (array of int) + parm: AtrSampleRate:Software ATR Tx packet sample rate (array of int) + parm: FCoE:Disable or enable FCoE Offload, default 1 (array of int) + parm: LRO:Large Receive Offload (0,1), default 1 = on (array of int) + parm: allow_unsupported_sfp:Allow unsupported and untested SFP+ modules on 82599 based adapters, default 0 = Disable (array of int) + +### 第四步: 测试Ixgbe驱动 ### + +在测试新的模块之前,如果你内核中已存在旧版本ixgbe模块的话你需要先移除它。 + + $ sudo rmmod ixgbe + +接着使用insmod命令插入新编译的ixgbe模块。确保指定一个模块的绝对路径。 + + $ sudo insmod ./ixgbe.ko + +如果上面的命令成功运行,就不会显示任何的信息。 + +如果你需要,你可以尝试加入额外的参数。比如,设置RSS的队列数量为16: + + $ sudo insmod ./ixgbe.ko RSS=16 + +检查**/var/log/kern.log**来查看ixgbe驱动是否成功激活。查看日志中的“Intel(R) 10 Gigabit PCI Express Network Driver”。ixgbe的版本信息应该和之前的modinfo的显示应该相同。 + + Sep 18 14:48:52 spongebob kernel: [684717.906254] Intel(R) 10 Gigabit PCI Express Network Driver - version 3.22.3 + +![](https://farm8.staticflickr.com/7583/16056721867_f06e152076_c.jpg) + +### 第五步: 安装Ixgbe驱动 ### + +一旦你验证新的ixgbe驱动已经成功家在,最后一步是在你的系统中安装驱动。 + + $ sudo make install + +**ixgbe.ko** 接着会安装在/lib/modules//kernel/drivers/net/ethernet/intel/ixgbe 下。 + +这一步起,你可以用下面的modprobe命令加载ixgbe驱动了。注意你不必再指定绝对路径。 + + $ sudo modprobe ixgbe + +如果你希望在启动时家在ixgbe驱动,你可以在/etc/modules的最后加入“ixgbe”。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/download-install-ixgbe-driver-ubuntu-debian.html + +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://sourceforge.net/projects/e1000/files/ixgbe%20stable/ From e3b73270a102d2fdbadc3e12b4ba34c06d28f593 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Wed, 28 Jan 2015 13:56:16 +0800 Subject: [PATCH 041/104] [translated by bazz2]Linux Namespace --- translated/tech/20141204 Linux Namespaces.md | 38 ++++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/translated/tech/20141204 Linux Namespaces.md b/translated/tech/20141204 Linux Namespaces.md index 4d81eddcb9..aae091f29c 100644 --- a/translated/tech/20141204 Linux Namespaces.md +++ b/translated/tech/20141204 Linux Namespaces.md @@ -101,18 +101,18 @@ Linux nobody 5 0.0 0.0 2784 1064 pts/1 R+ 21:21 0:00 ps auxw nobody@w:~/pen/tmp$ -Notice that the UID and GID are set to that of nobody and nogroup. Specifically notice that the full ps output shows only two running processes and that their PIDs are 1 and 5 respectively. Now, let's move on to using ip netns to work with network namespaces. First, let's confirm that no namespaces exist currently: +עĽUID GID ó nobody nogroup ˣر ps ֻ̣ǵ ID ֱ15LCTTעĽ CLONE_NEWPID ʱᵽĹܣ߳ڵռڣ ID Ϊ1ӳ䵽ռ65534ռ ID Ϊ1Ľһֱ initֵʹ ip netns ռ䡣һȷǰϵͳûռ䣺 root@w:~# ip netns list Object "netns" is unknown, try "ip help". -In this case, either ip needs an upgrade, or the kernel does. Assuming you have a kernel newer than 2.6.24, it's most likely **ip**. After upgrading, **ip netns list** should by default return nothing. Let's add a new namespace called 'ns1': +£ҪϵͳںˣԼ ip ߡں˰2.6.24ip ߰汾Ҳ࣬2.6.24LCTTעip iproute װṩ˰װ汾ں˰汾ºú**ip netns list** ûռڵ²ϢӸΪns1ռ俴 root@w:~# ip netns add ns1 root@w:~# ip netns list ns1 -First, let's list the current interfaces: +г root@w:~# ip link list 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT @@ -120,7 +120,7 @@ First, let's list the current interfaces: 2: eth0: mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT qlen 1000 link/ether 00:0c:29:65:25:9e brd ff:ff:ff:ff:ff:ff -Now to create a new virtual interface, and add it to our new namespace. Virtual interfaces are created in pairs, and are linked to each other - imagine a virtual crossover cable: +µӵռ䡣ҪɶԴ뽻°ɣ root@w:~# ip link add veth0 type veth peer name veth1 root@w:~# ip link list @@ -133,9 +133,9 @@ Now to create a new virtual interface, and add it to our new namespace. Virtual 4: veth0: mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000 link/ether f2:f7:5e:e2:22:ac brd ff:ff:ff:ff:ff:ff -**ifconfig** -a will also now show the addition of both veth0 and veth1. +ʱ **ifconfig** -a Ҳʾӵ veth0 veth1 -Great, now to assign our new interfaces to the namespace. Note that ip **netns exec** is used to execute commands within the namespace: +ܺãڽݿӵռȥעһ£ ip **netns exec** ڽռִУLCTTעĽʾ ns1 ռУֻ lo veth1 root@w:~# ip link set veth1 netns ns1 root@w:~# ip netns exec ns1 ip link list @@ -144,21 +144,21 @@ Great, now to assign our new interfaces to the namespace. Note that ip **netns e 3: veth1: mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000 link/ether d2:e9:52:18:19:ab brd ff:ff:ff:ff:ff:ff -**ifconfig** -a will now only show veth0, as veth1 is in the ns1 namespace. +ʱ **ifconfig** -a ֻʾ veth0ʾ veth1Ϊ ns1 ռС -Should we want to delete veth0/veth1: +ɾ veth1ִ ip netns exec ns1 ip link del veth1 -We can now assign IP address 192.168.5.5/24 to veth0 on our host: +Ϊ veth0 IP ַ ifconfig veth0 192.168.5.5/24 -And assign veth1 192.168.5.10/24 within ns1: +ռΪ veth1 IP ַ ip netns exec ns1 ifconfig veth1 192.168.5.10/24 up -To execute ip addr **list** on both our host and within our namespace: +ռִ ip addr **list**  root@w:~# ip addr list 1: lo: mtu 65536 qdisc noqueue state UNKNOWN @@ -185,7 +185,7 @@ To execute ip addr **list** on both our host and within our namespace: inet6 fe80::10bd:b6ff:fe76:a6eb/64 scope link valid_lft forever preferred_lft forever -To view routing tables inside and outside of the namespace: +ռ鿴·ɱ root@w:~# ip route list default via 192.168.3.1 dev eth0 proto static @@ -194,7 +194,7 @@ To view routing tables inside and outside of the namespace: root@w:~# ip netns exec ns1 ip route list 192.168.5.0/24 dev veth1 proto kernel scope link src 192.168.5.10 -Lastly, to connect our physical and virtual interfaces, we'll require a bridge. Let's bridge eth0 and veth0 on the host, and then use DHCP to gain an IP within the ns1 namespace: +󣬽ϣҪõŽӡǽ veth0 Žӵ eth0 ns1 ռʹ DHCP Զȡ IP ַ root@w:~# brctl addbr br0 root@w:~# brctl addif br0 eth0 @@ -209,7 +209,7 @@ Lastly, to connect our physical and virtual interfaces, we'll require a bridge. inet6 fe80::20c:29ff:fe65:259e/64 scope link valid_lft forever preferred_lft forever -br0 has been assigned an IP of 192.168.3.122/24. Now for the namespace: +Ϊ br0 IP ַΪ192.168.3.122/24Ϊռַ root@w:~# ip netns exec ns1 dhclient veth1 root@w:~# ip netns exec ns1 ip addr list @@ -221,17 +221,17 @@ br0 has been assigned an IP of 192.168.3.122/24. Now for the namespace: inet6 fe80::10bd:b6ff:fe76:a6eb/64 scope link valid_lft forever preferred_lft forever -Excellent! veth1 has been assigned 192.168.3.248/24 +ڣ veth1 IP ó 192.168.3.248/24 ˡ -------------------------------------------------------------------------------- via: http://www.howtoforge.com/linux-namespaces -作者:[aziods][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +ߣ[aziods][a] +ߣ[bazz2](https://github.com/bazz2) +Уԣ[УID](https://github.com/УID) -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ [a]:http://www.howtoforge.com/forums/private.php?do=newpm&u=138952 [1]:http://en.wikipedia.org/wiki/LXC From f8d13bbc415c8cb4e88329eb2e180b1b4240f9d1 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Wed, 28 Jan 2015 14:10:07 +0800 Subject: [PATCH 042/104] [gbk->utf-8]Linux Namespaces --- translated/tech/20141204 Linux Namespaces.md | 72 ++++++++++---------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/translated/tech/20141204 Linux Namespaces.md b/translated/tech/20141204 Linux Namespaces.md index aae091f29c..522131a50b 100644 --- a/translated/tech/20141204 Linux Namespaces.md +++ b/translated/tech/20141204 Linux Namespaces.md @@ -1,32 +1,32 @@ -Linux ռ +Linux 命名空间 ================================================================================ -### ### +### 背景 ### -2.6.24ں˿ʼLinux ֧6ֲͬ͵ռ䡣ǵij֣ʹûĽܹϵͳøӳףӶҪ̫ײ⻯ +从2.6.24版的内核开始,Linux 就支持6种不同类型的命名空间。它们的出现,使用户创建的进程能够与系统分离得更加彻底,从而不需要考虑太多底层的虚拟化技术。 -- **CLONE_NEWIPC**: ̼ͨ(IPC)ռ䣬Խ SystemV IPC POSIX Ϣж -- **CLONE_NEWPID**: ID ռ䣬 ID ˼ռڵĽ ID ܻռĽ ID ͻռڵĽ ID ӳ䵽ռʱʹһ ID˵ռ ID Ϊ1Ḷ̌ռָ init ̡ -- **CLONE_NEWNET**: ռ䣬ڸԴ/proc/netIP ַ·ɵȣ̨̿ڲͬռڵͬ˿ϣûһ -- **CLONE_NEWNS**: ռ䣬ʱԽصϵͳ룬ʹʱǿԴﵽ chroot ĹܣڰȫԷ chroot ߡ -- **CLONE_NEWUTS**: UTS ռ䣬ҪĿǶϢNIS -- **CLONE_NEWUSER**: ûռ䣬ͬ ID һû ID ID ռDzһģڲͬռڿԴͬ ID +- **CLONE_NEWIPC**: 进程间通信(IPC)的命名空间,可以将 SystemV 的 IPC 和 POSIX 的消息队列独立出来。 +- **CLONE_NEWPID**: 进程 ID 的命名空间,进程 ID 独立,意思就是命名空间内的进程 ID 可能会与命名空间外的进程 ID 冲突,于是命名空间内的进程 ID 映射到命名空间外时会使用另外一个进程 ID。比如说,命名空间内 ID 为1的进程,在命名空间外就是指 init 进程。 +- **CLONE_NEWNET**: 网络命名空间,用于隔离网络资源(/proc/net、IP 地址、网卡、路由等)。后台进程可以运行在不同命名空间内的相同端口上,用户还可以虚拟出一块网卡。 +- **CLONE_NEWNS**: 挂载命名空间,进程运行时可以将挂载点与系统分离,使用这个功能时,我们可以达到 chroot 的功能,而在安全性方面比 chroot 更高。 +- **CLONE_NEWUTS**: UTS 命名空间,主要目的是独立出主机名和网络信息服务(NIS)。 +- **CLONE_NEWUSER**: 用户命名空间,同进程 ID 一样,用户 ID 和组 ID 在命名空间内外是不一样的,并且在不同命名空间内可以存在相同的 ID。 - C ԽΪʾռʱҪõ C ԡIJԹ Debian 6 Debian 7 ִСȣջڷһҳڴռ䣬ָָڴҳĩβʹ **alloca()** ڴ棬Ҫ malloc() ڴڶϡ +本文用 C 语言介绍上述概念,因为演示进程命名空间的时候需要用到 C 语言。下面的测试过程在 Debian 6 和 Debian 7 上执行。首先,在栈内分配一页内存空间,并将指针指向内存页的末尾。这里我们使用 **alloca()** 函数来分配内存,不要用 malloc() 函数,它会把内存分配在堆上。 void *mem = alloca(sysconf(_SC_PAGESIZE)) + sysconf(_SC_PAGESIZE); -Ȼʹ **clone()** ӽ̣ջռĵַ "mem"ԼָռıǡͬʱǻָcalleeΪӽеĺ +然后使用 **clone()** 函数创建子进程,传入栈空间的地址 "mem",以及指定命名空间的标记。同时我们还指定“callee”作为子进程运行的函数。 mypid = clone(callee, mem, SIGCHLD | CLONE_NEWIPC | CLONE_NEWPID | CLONE_NEWNS | CLONE_FILES, NULL); -**clone** ֮Ҫڸеȴӽ˳Ļ̻ȥֱ̽ӽ̱ɹ¶̣ +**clone** 之后我们要在父进程中等待子进程先退出,否则的话,父进程会继续运行下去,直到进程结束,留下子进程变成孤儿进程: while (waitpid(mypid, &r, 0) < 0 && errno == EINTR) { continue; } -ӽ˳ǻص shell 档 +最后当子进程退出后,我们会回到 shell 界面。 if (WIFEXITED(r)) { @@ -34,7 +34,7 @@ Linux } return EXIT_FAILURE; -Ľܵ **callee** £ +上文介绍的 **callee** 函数功能如下: static int callee() { @@ -47,7 +47,7 @@ Linux return ret; } - **/proc** ļϵͳû ID IDֵΪuȻ **/bin/bash** [LXC][1] Dzϵͳ⻯ߣʹ cgroups ռԴķ롣ǰдһ𣬱uֵΪ65534 Debian ϵͳУǡnobody͡nogroup +程序挂载 **/proc** 文件系统,设置用户 ID 和组 ID,值都为“u”,然后运行 **/bin/bash** 程序,[LXC][1] 是操作系统级的虚拟化工具,使用 cgroups 和命名空间来完成资源的分离。现在我们把所有代码放在一起,变量“u”的值设为65534,在 Debian 系统中,这是“nobody”和“nogroup”: #define _GNU_SOURCE #include @@ -89,7 +89,7 @@ Linux return ret; } -ִĴ룺 +执行以下命令来运行上面的代码: root@w:~/pen/tmp# gcc -O -o ns.c -Wall -Werror -ansi -c89 ns.c root@w:~/pen/tmp# ./ns @@ -101,18 +101,18 @@ Linux nobody 5 0.0 0.0 2784 1064 pts/1 R+ 21:21 0:00 ps auxw nobody@w:~/pen/tmp$ -עĽUID GID ó nobody nogroup ˣر ps ֻ̣ǵ ID ֱ15LCTTעĽ CLONE_NEWPID ʱᵽĹܣ߳ڵռڣ ID Ϊ1ӳ䵽ռ65534ռ ID Ϊ1Ľһֱ initֵʹ ip netns ռ䡣һȷǰϵͳûռ䣺 +注意上面的结果,UID 和 GID 被设置成 nobody 和 nogroup 了,特别是 ps 工具只输出两个进程,它们的 ID 分别是1和5(LCTT注:这就是上文介绍 CLONE_NEWPID 时提到的功能,在线程所在的命名空间内,进程 ID 可以为1,映射到命名空间外就是65534;而命名空间外的 ID 为1的进程一直是 init)。接下来轮到使用 ip netns 来设置网络的命名空间。第一步先确定当前系统没有命名空间: root@w:~# ip netns list Object "netns" is unknown, try "ip help". -£ҪϵͳںˣԼ ip ߡں˰2.6.24ip ߰汾Ҳ࣬2.6.24LCTTעip iproute װṩ˰װ汾ں˰汾ºú**ip netns list** ûռڵ²ϢӸΪns1ռ俴 +这种情况下,你需要更新你的系统内核,以及 ip 工具。这里假设你的内核版高于2.6.24,ip 工具版本也差不多,高于2.6.24(LCTT注:ip 工具由 iproute 安装包提供,此安装包版本与内核版本相近)。更新好后,**ip netns list** 在没有命名空间存在的情况下不会输出任务信息。加个名为“ns1”的命名空间看看: root@w:~# ip netns add ns1 root@w:~# ip netns list ns1 -г +列出网卡: root@w:~# ip link list 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT @@ -120,7 +120,7 @@ Linux 2: eth0: mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT qlen 1000 link/ether 00:0c:29:65:25:9e brd ff:ff:ff:ff:ff:ff -µӵռ䡣ҪɶԴ뽻°ɣ +创建新的虚拟网卡,加到命名空间。虚拟网卡需要成对创建,互相关联——想想交叉电缆吧: root@w:~# ip link add veth0 type veth peer name veth1 root@w:~# ip link list @@ -133,9 +133,9 @@ Linux 4: veth0: mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000 link/ether f2:f7:5e:e2:22:ac brd ff:ff:ff:ff:ff:ff -ʱ **ifconfig** -a Ҳʾӵ veth0 veth1 +这个时候 **ifconfig** -a 命令也能显示新添加的 veth0 和 veth1 两块网卡。 -ܺãڽݿӵռȥעһ£ ip **netns exec** ڽռִУLCTTעĽʾ ns1 ռУֻ lo veth1 +很好,现在将这两份块网卡加到命名空间中去。注意一下,下面的 ip **netns exec** 命令用于将后面的命令在命名空间中执行(LCTT注:下面的结果显示了在 ns1 这个网络命名空间中,只存在 lo 和 veth1 两块网卡): root@w:~# ip link set veth1 netns ns1 root@w:~# ip netns exec ns1 ip link list @@ -144,21 +144,21 @@ Linux 3: veth1: mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000 link/ether d2:e9:52:18:19:ab brd ff:ff:ff:ff:ff:ff -ʱ **ifconfig** -a ֻʾ veth0ʾ veth1Ϊ ns1 ռС +这个时候 **ifconfig** -a 命令只能显示 veth0,不能显示 veth1,因为后者现在在 ns1 命名空间中。 -ɾ veth1ִ +如果想删除 veth1,可以执行下面的命令: ip netns exec ns1 ip link del veth1 -Ϊ veth0 IP ַ +为 veth0 分配 IP 地址: ifconfig veth0 192.168.5.5/24 -ռΪ veth1 IP ַ +在命名空间内为 veth1 分配 IP 地址: ip netns exec ns1 ifconfig veth1 192.168.5.10/24 up -ռִ ip addr **list**  +在命名空间内外执行 ip addr **list** 命令: root@w:~# ip addr list 1: lo: mtu 65536 qdisc noqueue state UNKNOWN @@ -185,7 +185,7 @@ Linux inet6 fe80::10bd:b6ff:fe76:a6eb/64 scope link valid_lft forever preferred_lft forever -ռ鿴·ɱ +在命名空间内外查看路由表: root@w:~# ip route list default via 192.168.3.1 dev eth0 proto static @@ -194,7 +194,7 @@ Linux root@w:~# ip netns exec ns1 ip route list 192.168.5.0/24 dev veth1 proto kernel scope link src 192.168.5.10 -󣬽ϣҪõŽӡǽ veth0 Žӵ eth0 ns1 ռʹ DHCP Զȡ IP ַ +最后,将虚拟网卡连到物理网卡上,我们需要用到桥接。这里做的是将 veth0 桥接到 eth0,而 ns1 命名空间内则使用 DHCP 自动获取 IP 地址: root@w:~# brctl addbr br0 root@w:~# brctl addif br0 eth0 @@ -209,7 +209,7 @@ Linux inet6 fe80::20c:29ff:fe65:259e/64 scope link valid_lft forever preferred_lft forever -Ϊ br0 IP ַΪ192.168.3.122/24Ϊռַ +为网桥 br0 分配的 IP 地址为192.168.3.122/24。接下来为命名空间分配地址: root@w:~# ip netns exec ns1 dhclient veth1 root@w:~# ip netns exec ns1 ip addr list @@ -221,17 +221,19 @@ Linux inet6 fe80::10bd:b6ff:fe76:a6eb/64 scope link valid_lft forever preferred_lft forever -ڣ veth1 IP ó 192.168.3.248/24 ˡ +现在, veth1 的 IP 被设置成 192.168.3.248/24 了。 -------------------------------------------------------------------------------- via: http://www.howtoforge.com/linux-namespaces -ߣ[aziods][a] -ߣ[bazz2](https://github.com/bazz2) -Уԣ[УID](https://github.com/УID) +作者:[aziods][a] +译者:[bazz2](https://github.com/bazz2) +校对:[校对者ID](https://github.com/校对者ID) - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.howtoforge.com/forums/private.php?do=newpm&u=138952 [1]:http://en.wikipedia.org/wiki/LXC + + From f4f61f060a02c449e8bd8149cb1e1976e797a70f Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 28 Jan 2015 14:20:08 +0800 Subject: [PATCH 043/104] PUB:20141008 How to configure HTTP load balancer with HAProxy on Linux @liaoishere --- ...TTP load balancer with HAProxy on Linux.md | 67 +++++++++---------- 1 file changed, 33 insertions(+), 34 deletions(-) rename {translated/tech => published}/20141008 How to configure HTTP load balancer with HAProxy on Linux.md (82%) diff --git a/translated/tech/20141008 How to configure HTTP load balancer with HAProxy on Linux.md b/published/20141008 How to configure HTTP load balancer with HAProxy on Linux.md similarity index 82% rename from translated/tech/20141008 How to configure HTTP load balancer with HAProxy on Linux.md rename to published/20141008 How to configure HTTP load balancer with HAProxy on Linux.md index 216483ab3c..bd7c865cda 100644 --- a/translated/tech/20141008 How to configure HTTP load balancer with HAProxy on Linux.md +++ b/published/20141008 How to configure HTTP load balancer with HAProxy on Linux.md @@ -1,18 +1,17 @@ -如何在 Linux 上使用 HAProxy 配置 HTTP 负载均衡器 +使用 HAProxy 配置 HTTP 负载均衡器 ================================================================================ -随着基于 Web 的应用和服务的增多,IT 系统管理员肩上的责任也越来越重。当遇到不可预期的事件如流量达到高峰,流量增大或者内部的挑战比如硬件的损坏或紧急维修,无论如何,你的 Web 应用都必须要保持可用性。甚至现在流行的 devops 和持续交付也可能威胁到你的 Web 服务的可靠性和性能的一致性。 +随着基于 Web 的应用和服务的增多,IT 系统管理员肩上的责任也越来越重。当遇到不可预期的事件如流量达到高峰,流量增大或者内部的挑战比如硬件的损坏或紧急维修,无论如何,你的 Web 应用都必须要保持可用性。甚至现在流行的 devops 和持续交付(CD)也可能威胁到你的 Web 服务的可靠性和性能的一致性。 -不可预测,不一直的性能表现是你无法接受的。但是我们怎样消除这些缺点呢?大多数情况下一个合适的负载均衡解决方案可以解决这个问题。今天我会给你们介绍如何使用 [HAProxy][1] 配置 HTTP 负载均衡器。 +不可预测,不一致的性能表现是你无法接受的。但是我们怎样消除这些缺点呢?大多数情况下一个合适的负载均衡解决方案可以解决这个问题。今天我会给你们介绍如何使用 [HAProxy][1] 配置 HTTP 负载均衡器。 ###什么是 HTTP 负载均衡? ### -HTTP 负载均衡是一个网络解决方案,它将发入的 HTTP 或 HTTPs 请求分配至一组提供相同的 Web 应用内容的服务器用于响应。通过将请求在这样的多个服务器间进行均衡,负载均衡器可以防止服务器出现单点故障,可以提升整体的可用性和响应速度。它还可以让你能够简单的通过添加或者移除服务器来进行横向扩展或收缩,对工作负载进行调整。 +HTTP 负载均衡是一个网络解决方案,它将进入的 HTTP 或 HTTPs 请求分配至一组提供相同的 Web 应用内容的服务器用于响应。通过将请求在这样的多个服务器间进行均衡,负载均衡器可以防止服务器出现单点故障,可以提升整体的可用性和响应速度。它还可以让你能够简单的通过添加或者移除服务器来进行横向扩展或收缩,对工作负载进行调整。 ### 什么时候,什么情况下需要使用负载均衡? ### 负载均衡可以提升服务器的使用性能和最大可用性,当你的服务器开始出现高负载时就可以使用负载均衡。或者你在为一个大型项目设计架构时,在前端使用负载均衡是一个很好的习惯。当你的环境需要扩展的时候它会很有用。 - ### 什么是 HAProxy? ### HAProxy 是一个流行的开源的 GNU/Linux 平台下的 TCP/HTTP 服务器的负载均衡和代理软件。HAProxy 是单线程,事件驱动架构,可以轻松的处理 [10 Gbps 速率][2] 的流量,在生产环境中被广泛的使用。它的功能包括自动健康状态检查,自定义负载均衡算法,HTTPS/SSL 支持,会话速率限制等等。 @@ -24,13 +23,13 @@ HAProxy 是一个流行的开源的 GNU/Linux 平台下的 TCP/HTTP 服务器的 ### 准备条件 ### 你至少要有一台,或者最好是两台 Web 服务器来验证你的负载均衡的功能。我们假设后端的 HTTP Web 服务器已经配置好并[可以运行][3]。 -You will need at least one, or preferably two web servers to verify functionality of your load balancer. We assume that backend HTTP web servers are already [up and running][3]. + -### 在 Linux 中安装 HAProxy ### +## 在 Linux 中安装 HAProxy ## 对于大多数的发行版,我们可以使用发行版的包管理器来安装 HAProxy。 -#### 在 Debian 中安装 HAProxy #### +### 在 Debian 中安装 HAProxy ### 在 Debian Wheezy 中我们需要添加源,在 /etc/apt/sources.list.d 下创建一个文件 "backports.list" ,写入下面的内容 @@ -41,25 +40,25 @@ You will need at least one, or preferably two web servers to verify functionalit # apt­ get update # apt ­get install haproxy -#### 在 Ubuntu 中安装 HAProxy #### +### 在 Ubuntu 中安装 HAProxy ### # apt ­get install haproxy -#### 在 CentOS 和 RHEL 中安装 HAProxy #### +### 在 CentOS 和 RHEL 中安装 HAProxy ### # yum install haproxy -### 配置 HAProxy ### +## 配置 HAProxy ## 本教程假设有两台运行的 HTTP Web 服务器,它们的 IP 地址是 192.168.100.2 和 192.168.100.3。我们将负载均衡配置在 192.168.100.4 的这台服务器上。 为了让 HAProxy 工作正常,你需要修改 /etc/haproxy/haproxy.cfg 中的一些选项。我们会在这一节中解释这些修改。一些配置可能因 GNU/Linux 发行版的不同而变化,这些会被标注出来。 -#### 1. 配置日志功能 #### +### 1. 配置日志功能 ### 你要做的第一件事是为 HAProxy 配置日志功能,在排错时日志将很有用。日志配置可以在 /etc/haproxy/haproxy.cfg 的 global 段中找到他们。下面是针对不同的 Linux 发型版的 HAProxy 日志配置。 -**CentOS 或 RHEL:** +#### CentOS 或 RHEL:#### 在 CentOS/RHEL中启用日志,将下面的: @@ -82,7 +81,7 @@ You will need at least one, or preferably two web servers to verify functionalit # service rsyslog restart -**Debian 或 Ubuntu:** +####Debian 或 Ubuntu:#### 在 Debian 或 Ubuntu 中启用日志,将下面的内容 @@ -106,7 +105,7 @@ You will need at least one, or preferably two web servers to verify functionalit # service rsyslog restart -#### 2. 设置默认选项 #### +### 2. 设置默认选项 ### 下一步是设置 HAProxy 的默认选项。在 /etc/haproxy/haproxy.cfg 的 default 段中,替换为下面的配置: @@ -124,7 +123,7 @@ You will need at least one, or preferably two web servers to verify functionalit 上面的配置是当 HAProxy 为 HTTP 负载均衡时建议使用的,但是并不一定是你的环境的最优方案。你可以自己研究 HAProxy 的手册并配置它。 -#### 3. Web 集群配置 #### +### 3. Web 集群配置 ### Web 集群配置定义了一组可用的 HTTP 服务器。我们的负载均衡中的大多数设置都在这里。现在我们会创建一些基本配置,定义我们的节点。将配置文件中从 frontend 段开始的内容全部替换为下面的: @@ -141,14 +140,14 @@ Web 集群配置定义了一组可用的 HTTP 服务器。我们的负载均衡 server web01 192.168.100.2:80 cookie node1 check server web02 192.168.100.3:80 cookie node2 check -"listen webfarm *:80" 定义了负载均衡器监听的地址和端口。为了教程的需要,我设置为 "\*" 表示监听在所有接口上。在真实的场景汇总,这样设置可能不太合适,应该替换为可以从 internet 访问的那个网卡接口。 +"listen webfarm \*:80" 定义了负载均衡器监听的地址和端口。为了教程的需要,我设置为 "*" 表示监听在所有接口上。在真实的场景汇总,这样设置可能不太合适,应该替换为可以从 internet 访问的那个网卡接口。 stats enable stats uri /haproxy?stats stats realm Haproxy\ Statistics stats auth haproxy:stats -上面的设置定义了,负载均衡器的状态统计信息可以通过 http:///haproxy?stats 访问。访问需要简单的 HTTP 认证,用户名为 "haproxy" 密码为 "stats"。这些设置可以替换为你自己的认证方式。如果你不需要状态统计信息,可以完全禁用掉。 +上面的设置定义了,负载均衡器的状态统计信息可以通过 http://\/haproxy?stats 访问。访问需要简单的 HTTP 认证,用户名为 "haproxy" 密码为 "stats"。这些设置可以替换为你自己的认证方式。如果你不需要状态统计信息,可以完全禁用掉。 下面是一个 HAProxy 统计信息的例子 @@ -160,7 +159,7 @@ Web 集群配置定义了一组可用的 HTTP 服务器。我们的负载均衡 - **source**:对请求的客户端 IP 地址进行哈希计算,根据哈希值和服务器的权重将请求调度至后端服务器。 - **uri**:对 URI 的左半部分(问号之前的部分)进行哈希,根据哈希结果和服务器的权重对请求进行调度 - **url_param**:根据每个 HTTP GET 请求的 URL 查询参数进行调度,使用固定的请求参数将会被调度至指定的服务器上 -- **hdr(name**):根据 HTTP 首部中的 字段来进行调度 +- **hdr(name**):根据 HTTP 首部中的 \ 字段来进行调度 "cookie LBN insert indirect nocache" 这一行表示我们的负载均衡器会存储 cookie 信息,可以将后端服务器池中的节点与某个特定会话绑定。节点的 cookie 存储为一个自定义的名字。这里,我们使用的是 "LBN",你可以指定其他的名称。后端节点会保存这个 cookie 的会话。 @@ -169,25 +168,25 @@ Web 集群配置定义了一组可用的 HTTP 服务器。我们的负载均衡 上面是我们的 Web 服务器节点的定义。服务器有由内部名称(如web01,web02),IP 地址和唯一的 cookie 字符串表示。cookie 字符串可以自定义,我这里使用的是简单的 node1,node2 ... node(n) -### 启动 HAProxy ### +## 启动 HAProxy ## 如果你完成了配置,现在启动 HAProxy 并验证是否运行正常。 -#### 在 Centos/RHEL 中启动 HAProxy #### +### 在 Centos/RHEL 中启动 HAProxy ### 让 HAProxy 开机自启,使用下面的命令 # chkconfig haproxy on # service haproxy start -当然,防火墙需要开放 80 端口,想下面这样 +当然,防火墙需要开放 80 端口,像下面这样 -**CentOS/RHEL 7 的防火墙** +####CentOS/RHEL 7 的防火墙#### # firewall­cmd ­­permanent ­­zone=public ­­add­port=80/tcp # firewall­cmd ­­reload -**CentOS/RHEL 6 的防火墙** +####CentOS/RHEL 6 的防火墙#### 把下面内容加至 /etc/sysconfig/iptables 中的 ":OUTPUT ACCEPT" 段中 @@ -197,9 +196,9 @@ Web 集群配置定义了一组可用的 HTTP 服务器。我们的负载均衡 # service iptables restart -#### 在 Debian 中启动 HAProxy #### +### 在 Debian 中启动 HAProxy ### -#### 启动 HAProxy #### +启动 HAProxy # service haproxy start @@ -207,7 +206,7 @@ Web 集群配置定义了一组可用的 HTTP 服务器。我们的负载均衡 ­A INPUT ­p tcp ­­dport 80 ­j ACCEPT -#### 在 Ubuntu 中启动HAProxy #### +### 在 Ubuntu 中启动HAProxy ### 让 HAProxy 开机自动启动在 /etc/default/haproxy 中配置 @@ -221,7 +220,7 @@ Web 集群配置定义了一组可用的 HTTP 服务器。我们的负载均衡 # ufw allow 80 -### 测试 HAProxy ### +## 测试 HAProxy ## 检查 HAProxy 是否工作正常,我们可以这样做 @@ -239,7 +238,7 @@ Web 集群配置定义了一组可用的 HTTP 服务器。我们的负载均衡 $ curl http://192.168.100.4/test.php -我们多次使用这个命令此时,会发现交替的输出下面的内容(因为使用了轮询算法): +我们多次运行这个命令此时,会发现交替的输出下面的内容(因为使用了轮询算法): Server IP: 192.168.100.2 X-Forwarded-for: 192.168.100.4 @@ -251,13 +250,13 @@ Web 集群配置定义了一组可用的 HTTP 服务器。我们的负载均衡 如果我们停掉一台后端 Web 服务,curl 命令仍然正常工作,请求被分发至另一台可用的 Web 服务器。 -### 总结 ### +## 总结 ## -现在你有了一个完全可用的负载均衡器,以轮询的模式对你的 Web 节点进行负载均衡。还可以去实验其他的配置选项以适应你的环境。希望这个教程可以帮会组你们的 Web 项目有更好的可用性。 +现在你有了一个完全可用的负载均衡器,以轮询的模式对你的 Web 节点进行负载均衡。还可以去实验其他的配置选项以适应你的环境。希望这个教程可以帮助你们的 Web 项目有更好的可用性。 你可能已经发现了,这个教程只包含单台负载均衡的设置。这意味着我们仍然有单点故障的问题。在真实场景中,你应该至少部署 2 台或者 3 台负载均衡以防止意外发生,但这不是本教程的范围。 -如果 你有任何问题或建议,请在评论中提出,我会尽我的努力回答。 +如果你有任何问题或建议,请在评论中提出,我会尽我的努力回答。 -------------------------------------------------------------------------------- @@ -265,11 +264,11 @@ via: http://xmodulo.com/haproxy-http-load-balancer-linux.html 作者:[Jaroslav Štěpánek][a] 译者:[Liao](https://github.com/liaoishere) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/jaroslav [1]:http://www.haproxy.org/ [2]:http://www.haproxy.org/10g.html -[3]:http://xmodulo.com/how-to-install-lamp-server-on-ubuntu.html +[3]:http://linux.cn/article-1567-1.html From df3a8b808d446041974cd641b4b904f1b87ee6e7 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 28 Jan 2015 14:24:55 +0800 Subject: [PATCH 044/104] =?UTF-8?q?=E6=B8=85=E9=99=A4=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...SO Images Directly From Your Hard Drive.md | 78 ------------------- 1 file changed, 78 deletions(-) delete mode 100644 sources/tech/20150123 How to Boot Linux ISO Images Directly From Your Hard Drive.md diff --git a/sources/tech/20150123 How to Boot Linux ISO Images Directly From Your Hard Drive.md b/sources/tech/20150123 How to Boot Linux ISO Images Directly From Your Hard Drive.md deleted file mode 100644 index b7ccf253f9..0000000000 --- a/sources/tech/20150123 How to Boot Linux ISO Images Directly From Your Hard Drive.md +++ /dev/null @@ -1,78 +0,0 @@ -[xieborui translating]How to Boot Linux ISO Images Directly From Your Hard Drive -================================================================================ -Hi all, today we'll teach you an awesome interesting stuff related with the Operating System Disk Image and Booting. Now, try many OS you like without installing them in your Physical Hard Drive and without burning DVDs or USBs. - -We can boot Linux ISO files directly from your hard drive with Linux’s GRUB2 boot loader. We can boot any Linux Distribution's using this method without creating bootable USBs, Burn DVDs, etc but the changes made will be temporary. - -![boot iso files directly from hard drive in grub2](http://blog.linoxide.com/wp-content/uploads/2015/01/boot-iso-files-directly-from-hard-drive-in-grub2.png) - -### 1. Get the ISO of the Linux Distributions: ### - -Here, we're gonna create Menu of Ubuntu 14.04 LTS "Trusty" and Linux Mint 17.1 LTS "Rebecca" so, we downloaded them from their official site: - -Ubuntu from : [http://ubuntu.com/][1] And Linux Mint from: [http://linuxmint.com/][2] - -You can download ISO files of required linux distributions from their respective websites. If you have mirror of the iso files hosted near your area or country, it is recommended if you have no sufficient internet download speed. - -### 2. Determine the Hard Drive Partition’s Path ### - -GRUB uses a different “device name” scheme than Linux does. On a Linux system, /dev/sda0 is the first partition on the first hard disk — **a** means the first hard disk and **0** means its first partition. In GRUB, (hd0,1) is equivalent to /dev/sda0. The **0** means the first hard disk, while **1** means the first partition on it. In other words, in a GRUB device name, the disk numbers start counting at 0 and the partition numbers start counting at 1. For example, (hd3,6) refers to the sixth partition on the fourth hard disk. - -You can use the **fdisk -l** command to view this information. On Ubuntu, open a Terminal and run the following command: - - $ sudo fdisk -l - -![fdisk-l view the list of the hard disk and its partitions](http://blog.linoxide.com/wp-content/uploads/2015/01/fdisk-l.png) - -You’ll see a list of Linux device paths, which you can convert to GRUB device names on your own. For example, below we can see the system partition is /dev/sda1 — so that’s (hd0,1) for GRUB. - -### 3. Adding boot menu to Grub2 ### - -The easiest way to add a custom boot entry is to edit the /etc/grub.d/40_custom script. This file is designed for user-added custom boot entries. After editing the file, the contents of your /etc/defaults/grub file and the /etc/grub.d/ scripts will be combined to create a /boot/grub/grub.cfg file. You shouldn't edit this file by hand. It’s designed to be automatically generated from settings you specify in other files. - -So we’ll need to open the /etc/grub.d/40_custom file for editing with root privileges. On Ubuntu, you can do this by opening a Terminal window and running the following command: - - $ sudo nano /etc/grub.d/40_custom - -Unless we’ve added other custom boot entries, we should see a mostly empty file. We'll need to add one or more ISO-booting sections to the file below the commented lines. - - ===== - menuentry “Ubuntu 14.04 ISO” { - set isofile=”/home/linoxide/Downloads/ubuntu-14.04.1-desktop-amd64.iso” - loopback loop (hd0,1)$isofile - linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash - initrd (loop)/casper/initrd.lz - } - menuentry "Linux Mint 17.1 Cinnamon ISO" { - set isofile=”/home/linoxide/Downloads/mint-17.1-desktop-amd64.iso” - loopback loop (hd0,1)$isofile - linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash - initrd (loop)/casper/initrd.lz - } - -![Grub2 Menu configuration for adding the ISOs](http://blog.linoxide.com/wp-content/uploads/2015/01/grub-added-iso.png) - -**Important Note**: Different Linux distributions require different boot entries with different boot options. The GRUB Live ISO Multiboot project offers a variety of [menu entries for different Linux distributions][3]. You should be able to adapt these example menu entries for the ISO file you want to boot. You can also just perform a web search for the name and release number of the Linux distribution you want to boot along with “boot from ISO in GRUB” to find more information. - -### 4. Updating Grub2 ### - -To make the custom menu entries active, we'll run "sudo update-grub" - - sudo update-grub - -Hurray, we have successfully added our brand new linux distribution's ISO to our GRUB Menu. Now, we'll be able to boot them and enjoy trying them. You can add many distributions and try them all. Note that the changes made in those OS will don't be kept preserved, which means you'll loose changes made in that distros after the restart. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/boot-linux-iso-images-directly-hard-drive/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:http://ubuntu.com/ -[2]:http://linuxmint.com/ -[3]:http://git.marmotte.net/git/glim/tree/grub2 From 28c16bb997c81ac3e29efe9fd4f79634b0ab4499 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 28 Jan 2015 14:28:00 +0800 Subject: [PATCH 045/104] Translating by ZTinoZ --- ... Linux FAQs with Answers--How to check CPU info on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md b/sources/tech/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md index b9a9712a49..f099000ef2 100644 --- a/sources/tech/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md +++ b/sources/tech/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ Linux FAQs with Answers--How to check CPU info on Linux ================================================================================ > **Question**: I would like to know detailed information about the CPU processor of my computer. What are the available methods to check CPU information on Linux? @@ -112,4 +113,4 @@ via: http://ask.xmodulo.com/check-cpu-info-linux.html [1]:http://xmodulo.com/how-to-find-number-of-cpu-cores-on.html [2]:http://en.wikipedia.org/wiki/CPUID [3]:http://xmodulo.com/identify-cpu-processor-architecture-linux.html -[4]:http://xmodulo.com/identify-cpu-processor-architecture-linux.html \ No newline at end of file +[4]:http://xmodulo.com/identify-cpu-processor-architecture-linux.html From 210f5b5c5fbeed38a06ff84cb59d004c562561f2 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 28 Jan 2015 14:13:54 +0800 Subject: [PATCH 046/104] =?UTF-8?q?20150128-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...unities driving open source development.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sources/talk/20150128 7 communities driving open source development.md diff --git a/sources/talk/20150128 7 communities driving open source development.md b/sources/talk/20150128 7 communities driving open source development.md new file mode 100644 index 0000000000..3b3c450cf8 --- /dev/null +++ b/sources/talk/20150128 7 communities driving open source development.md @@ -0,0 +1,86 @@ +7 communities driving open source development +================================================================================ +Not so long ago, the open source model was the rebellious kid on the block, viewed with suspicion by established industry players. Today, open initiatives and foundations are flourishing with long lists of vendor committers who see the model as a key to innovation. + +![](http://images.techhive.com/images/article/2015/01/0_opensource-title-100539095-orig.jpg) + +### Open Development of Tech Drives Innovation ### + +Over the past two decades, open development of technology has come to be seen as a key to driving innovation. Even companies that once saw open source as a threat have come around — Microsoft, for example, is now active in a number of open source initiatives. To date, most open development has focused on software. But even that is changing as communities have begun to coalesce around open hardware initiatives. Here are seven organizations that are successfully promoting and developing open technologies, both hardware and software. + +### OpenPOWER Foundation ### + +![](http://images.techhive.com/images/article/2015/01/1_openpower-100539100-orig.jpg) + +The [OpenPOWER Foundation][2] was founded by IBM, Google, Mellanox, Tyan and NVIDIA in 2013 to drive open collaboration hardware development in the same spirit as the open source software development which has found fertile ground in the past two decades. + +IBM seeded the foundation by opening up its Power-based hardware and software technologies, offering licenses to use Power IP in independent hardware products. More than 70 members now work together to create custom open servers, components and software for Linux-based data centers. + +In April, OpenPOWER unveiled a technology roadmap based on new POWER8 process-based servers capable of analyzing data 50 times faster than the latest x86-based systems. In July, IBM and Google released a firmware stack. October saw the availability of NVIDIA GPU accelerated POWER8 systems and the first OpenPOWER reference server from Tyan. + +### The Linux Foundation ### + +![](http://images.techhive.com/images/article/2015/01/2_the-linux-foundation-100539101-orig.jpg) + +Founded in 2000, [The Linux Foundation][2] is now the host for the largest open source, collaborative development effort in history, with more than 180 corporate members and many individual and student members. It sponsors the work of key Linux developers and promotes, protects and advances the Linux operating system and collaborative software development. + +Some of its most successful collaborative projects include Code Aurora Forum (a consortium of companies with projects serving the mobile wireless industry), MeeGo (a project to build a Linux kernel-based operating system for mobile devices and IVI) and the Open Virtualization Alliance (which fosters the adoption of free and open source software virtualization solutions). + +### Open Virtualization Alliance ### + +![](http://images.techhive.com/images/article/2015/01/3_open-virtualization-alliance-100539102-orig.jpg) + +The [Open Virtualization Alliance (OVA)][3] exists to foster the adoption of free and open source software virtualization solutions like Kernel-based Virtual Machine (KVM) through use cases and support for the development of interoperable common interfaces and APIs. KVM turns the Linux kernel into a hypervisor. + +Today, KVM is the most commonly used hypervisor with OpenStack. + +### The OpenStack Foundation ### + +![](http://images.techhive.com/images/article/2015/01/4_the-openstack-foundation-100539096-orig.jpg) + +Originally launched as an Infrastructure-as-a-Service (IaaS) product by NASA and Rackspace hosting in 2010, the [OpenStack Foundation][4] has become the home for one of the biggest open source projects around. It boasts more than 200 member companies, including AT&T, AMD, Avaya, Canonical, Cisco, Dell and HP. + +Organized around a six-month release cycle, the foundation's OpenStack projects are developed to control pools of processing, storage and networking resources through a data center — all managed or provisioned through a Web-based dashboard, command-line tools or a RESTful API. So far, the collaborative development supported by the foundation has resulted in the creation of OpenStack components including OpenStack Compute (a cloud computing fabric controller that is the main part of an IaaS system), OpenStack Networking (a system for managing networks and IP addresses) and OpenStack Object Storage (a scalable redundant storage system). + +### OpenDaylight ### + +![](http://images.techhive.com/images/article/2015/01/5_opendaylight-100539097-orig.jpg) + +Another collaborative project to come out of the Linux Foundation, [OpenDaylight][5] is a joint initiative of industry vendors, like Dell, HP, Oracle and Avaya founded in April 2013. Its mandate is the creation of a community-led, open, industry-supported framework consisting of code and blueprints for Software-Defined Networking (SDN). The idea is to provide a fully functional SDN platform that can be deployed directly, without requiring other components, though vendors can offer add-ons and enhancements. + +### Apache Software Foundation ### + +![](http://images.techhive.com/images/article/2015/01/6_apache-software-foundation-100539098-orig.jpg) + +The [Apache Software Foundation (ASF)][7] is home to nearly 150 top level projects ranging from open source enterprise automation software to a whole ecosystem of distributed computing projects related to Apache Hadoop. These projects deliver enterprise-grade, freely available software products, while the Apache License is intended to make it easy for users, whether commercial or individual, to deploy Apache products. + +ASF was incorporated in 1999 as a membership-based, not-for-profit corporation with meritocracy at its heart — to become a member you must first be actively contributing to one or more of the foundation's collaborative projects. + +### Open Compute Project ### + +![](http://images.techhive.com/images/article/2015/01/7_open-compute-project-100539099-orig.jpg) + +An outgrowth of Facebook's redesign of its Oregon data center, the [Open Compute Project (OCP)][7] aims to develop open hardware solutions for data centers. The OCP is an initiative made up of cheap, vanity-free servers, modular I/O storage for Open Rack (a rack standard designed for data centers to integrate the rack into the data center infrastructure) and a relatively "green" data center design. + +OCP board members include representatives from Facebook, Intel, Goldman Sachs, Rackspace and Microsoft. + +OCP recently announced two options for licensing: an Apache 2.0-like license that allows for derivative works and a more prescriptive license that encourages changes to be rolled back into the original software. + +-------------------------------------------------------------------------------- + +via: http://www.networkworld.com/article/2866074/opensource-subnet/7-communities-driving-open-source-development.html + +作者:[Thor Olavsrud][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.networkworld.com/author/Thor-Olavsrud/ +[1]:http://openpowerfoundation.org/ +[2]:http://www.linuxfoundation.org/ +[3]:https://openvirtualizationalliance.org/ +[4]:http://www.openstack.org/foundation/ +[5]:http://www.opendaylight.org/ +[6]:http://www.apache.org/ +[7]:http://www.opencompute.org/ \ No newline at end of file From 35bdd1c7421014618a0aeb9c290191fe87e364f8 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 28 Jan 2015 14:47:57 +0800 Subject: [PATCH 047/104] =?UTF-8?q?20150128-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150128 Docker-1 Moving to Docker.md | 81 ++++++ ...-2 Setting up a private Docker registry.md | 241 +++++++++++++++++ ...utomated Docker-based Rails deployments.md | 253 ++++++++++++++++++ 3 files changed, 575 insertions(+) create mode 100644 sources/tech/20150128 Docker-1 Moving to Docker.md create mode 100644 sources/tech/20150128 Docker-2 Setting up a private Docker registry.md create mode 100644 sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md diff --git a/sources/tech/20150128 Docker-1 Moving to Docker.md b/sources/tech/20150128 Docker-1 Moving to Docker.md new file mode 100644 index 0000000000..6917b3b7b1 --- /dev/null +++ b/sources/tech/20150128 Docker-1 Moving to Docker.md @@ -0,0 +1,81 @@ +Moving to Docker +================================================================================ +![](http://cocoahunter.com/content/images/2015/01/docker1.jpeg) + +[TL;DR] This is the first post in a series of 3 on how my company moved its infrastructure from PaaS to Docker based deployment. If you want, you can skip the intro (this post) and head directly to the technical topics (links at the bottom of the page). + +---------- + +In the last month I've been strggling with devops. This is my very personal story and experience in trying to streamline a deployment process of a Raila app with Docker. + +When I started my company – [Touchware][1] – in 2012 I was a lone developer. Things were small, uncomplicated, they didn't require a lot of maintenance, nor they needed to scale all that much. During the course of last year though, we grew quite a lot (we are now a team of 10 people) and our server-side applications and API grew both in terms of scope and scale. + +### Step 1 - Heroku ### + +We still are a very small team and we need to make things going and run as smoothly as possible. When we looked for possible solutions, we decided to stick with something that would have removed from our shoulders the burden of managing hardware. Since we develop mainly Rails based applications and Heroku has a great support for RoR and various kind of DBs and cached (Postgres / Mongo / Redis etc.), the smartest choice seemed to be going with [Heroku][2]. And that's what we did. + +Heroku has a great support and great documentation and deploying apps is just so snappy! Only problem is, when you start growing, you need to have piles of cash around to pay the bills. Not the best deal, really. + +### Step 2 - Dokku ### + +In a rush to try and cut the costs, we decided to try with Dokku. [Dokku][3], quoting the Github repo is a + +> Docker powered mini-Heroku in around 100 lines of Bash + +We launched some instances on [DigitalOcean][4] with Dokku pre-installed and we gave it spin. Dokku is very much like Heroku, but when you have complex applications for whom you need to twear params, or where you need certain dependencies, it's just not gonna work out. We had an app where we needed to apply multiple transformations on images and we couldn't find a way to install the correct version of imagemagick into the dokku-based Docker container that was hosting our Rails app. We still have a couple of very simple apps that are running on Dokku, but we had to move some of them back to Heroku. + +### Step 3 - Docker ### + +A couple of months ago, since the problem of devops and managing production apps was resurfacing, I decided to try out [Docker][5]. Docker, in simple terms, allows developers to containerize applications and to ease the deployment. Since a Docker container basically has all the dependencies it needs to run your app, if everything runs fine on your laptop, you can be sure it'll also run like a champ in production on a remote server, be it an AWS E2C instance or a VPS on DigitalOcean. + +Docker IMHO is particularly interesting for the following reasons: + +- it promotes modularization and separation of concerns: you need to start thinking about your apps in terms of logical components (load balancer: 1 container, DB: 1 container, webapp: 1 container etc.); +- it's very flexible in terms of deployment options: containers can be deployed to a wide variety of HW and can be easily redeployed to different servers / providers; +- it allows for a very fine grained tuning of your app environment: you build the images your containers runs from, so you have plenty of options for configuring your environment exactly as you would like to. + +There are howerver some downsides: + +- the learning curve is quite steep (this is probably a very personal problem, but I'm talking as a software dev and not as a skilled operations professional); +- setup is not simple, especially if you want to have a private registry / repository (more about this later). + +Following are some tips I put together during the course of the last week with the findings of someone that is new to the game. + +---------- + +In the following articles we'll see how to setup a semi-automated Docker based deployment system. + +- [Setting up a private Docker registry][6] +- [Configuring a Rails app for semi-automated deployment][7] + +-------------------------------------------------------------------------------- + +via: http://cocoahunter.com/2015/01/23/docker-1/ + +作者:[Michelangelo Chasseur][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://cocoahunter.com/author/michelangelo/ +[1]:http://www.touchwa.re/ +[2]:http://cocoahunter.com/2015/01/23/docker-1/www.heroku.com +[3]:https://github.com/progrium/dokku +[4]:http://cocoahunter.com/2015/01/23/docker-1/www.digitalocean.com +[5]:http://www.docker.com/ +[6]:http://cocoahunter.com/2015/01/23/docker-2/ +[7]:http://cocoahunter.com/2015/01/23/docker-3/ +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: \ No newline at end of file diff --git a/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md b/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md new file mode 100644 index 0000000000..9a9341b4b7 --- /dev/null +++ b/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md @@ -0,0 +1,241 @@ +Setting up a private Docker registry +================================================================================ +![](http://cocoahunter.com/content/images/2015/01/docker2.jpg) + +[TL;DR] This is the second post in a series of 3 on how my company moved its infrastructure from PaaS to Docker based deployment. + +- [First part][1]: where I talk about the process we went thru before approaching Docker; +- [Third pard][2]: where I show how to automate the entire process of building images and deploying a Rails app with Docker. + +---------- + +Why would ouy want ot set up a provate registry? Well, for starters, Docker Hub only allows you to have one free private repo. Other companies are beginning to offer similar services, but they are all not very cheap. In addition, if you need to deploy production ready applications built with Docker, you might not want to publish those images on the public Docker Hub. + +This is a very pragmatic approach to dealing with the intricacies of setting up a private Docker registry. For the tutorial we will be using a small 512MB instance on DigitalOcean (from now on DO). I also assume you already know the basics of Docker since I will be concentrating on some more complicated stuff. + +### Local set up ### + +First of all you need to install **boot2docker** and docker CLI. If you already have your basic Docker environment up and running, you can just skip to the next section. + +From the terminal run the following command[1][3]: + + brew install boot2docker docker + +If everything is ok[2][4], you will now be able to start the VM inside which Docker will run with the following command: + + boot2docker up + +Follow the instructions, copy and paste the export commands that boot2docker will print in the terminal. If you now run `docker ps` you should be greeted by the following line + + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + +Ok, Docker is ready to go. This will be enough for the moment. Let's go back to setting up the registry. + +### Creating the server ### + +Log into you DO account and create a new Droplet by selecting an image with Docker pre-installed[^n]. + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-18-26-14.png) + +You should receive your root credentials via email. Log into your instance and run `docker ps` to see if eveything is ok. + +### Setting up AWS S3 ### + +We are going to use Amazon Simple Storage Service (S3) as the storage layer for our registry / repository. We will need to create a bucket and user credentials to allow our docker container accessoing it. + +Login into your AWS account (if you don't have one you can set one up at [http://aws.amazon.com/][5]) and from the console select S3 (Simple Storage Service). + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-29-21.png) + +Click on **Create Bucket**, enter a unique name for your bucket (and write it down, we're gonna need it later), then click on **Create**. + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-22-50.png) + +That's it! We're done setting up the storage part. + +### Setup AWS access credentials ### + +We are now going to create a new user. Go back to your AWS console and select IAM (Identity & Access Management). + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-29-08.png) + +In the dashboard, on the left side of the webpage, you should click on Users. Then select **Create New Users**. + +You should be presented with the following screen: + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-31-42.png) + +Enter a name for your user (e.g. docker-registry) and click on Create. Write down (or download the csv file with) your Access Key and Secret Access Key that we'll need when running the Docker container. Go back to your users list and select the one you just created. + +Under the Permission section, click on Attach User Policy. In the next screen, you will be presented with multiple choices: select Custom Policy. + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-41-21.png) + +Here's the content of the custom policy: + + { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "SomeStatement", + "Effect": "Allow", + "Action": [ + "s3:*" + ], + "Resource": [ + "arn:aws:s3:::docker-registry-bucket-name/*", + "arn:aws:s3:::docker-registry-bucket-name" + ] + } + ] + } + +This will allow the user (i.e. the registry) to manage (read/write) content on the bucket (make sure to use the bucket name you previously defined when setting up AWS S3). To sum it up: when you'll be pushing Docker images from your local machine to your repository, the server will be able to upload them to S3. + +### Installing the registry ### + +Now let's head back to our DO server and SSH into it. We are going to use[^n] one of the [official Docker registry images][6]. + +Let's start our registry with the following command: + + docker run \ + -e SETTINGS_FLAVOR=s3 \ + -e AWS_BUCKET=bucket-name \ + -e STORAGE_PATH=/registry \ + -e AWS_KEY=your_aws_key \ + -e AWS_SECRET=your_aws_secret \ + -e SEARCH_BACKEND=sqlalchemy \ + -p 5000:5000 \ + --name registry \ + -d \ + registry + +Docker should pull the required fs layers from the Docker Hub and eventually start the daemonised container. + +### Testing the registry ### + +If everything worked out, you should now be able to test the registry by pinging it and by searching its content (though for the time being it's still empty). + +Our registry is very basic and it does not provide any means of authentication. Since there are no easy ways of adding authentication (at least none that I'm aware of that are easy enough to implment in order to justify the effort), I've decided that the easiest way of querying / pulling / pushing the registry is an unsecure (over HTTP) connection tunneled thru SSH. + +Opening an SSH tunnel from your local machine is straightforward: + + ssh -N -L 5000:localhost:5000 root@your_registry.com + +The command is tunnelling connections over SSH from port 5000 of the registry server (which is the one we exposed with the `docker run` command in the previous paragraph) to port 5000 on the localhost. + +If you now browse to the following address [http://localhost:5000/v1/_ping][7] you should get the following very simple response + + {} + +This just means that the registry is working correctly. You can also list the whole content of the registry by browsing to [http://localhost:5000/v1/search][8] that will get you a similar response: + + { + "num_results": 2, + "query": "", + "results": [ + { + "description": "", + "name": "username/first-repo" + }, + { + "description": "", + "name": "username/second-repo" + } + ] + } + +### Building an image ### + +Let's now try and build a very simple Docker image to test our newly installed registry. On your local machine, create a Dockerfile with the following content[^n]: + + # Base image with ruby 2.2.0 + FROM ruby:2.2.0 + + MAINTAINER Michelangelo Chasseur + +...and build it: + + docker build -t localhost:5000/username/repo-name . + +The `localhost:5000` part is especially important: the first part of the name of a Docker image will tell the `docker push` command the endpoint towards which we are trying to push our image. In our case, since we are connecting to our remote private registry via an SSH tunnel, `localhost:5000` represents exactly the reference to our registry. + +If everything works as expected, when the command returns, you should be able to list your newly created image with the `docker images` command. Run it and see it for yourself. + +### Pushing to the registry ### + +Now comes the trickier part. It took a me a while to realize what I'm about to describe, so just be patient if you don't get it the first time you read and try to follow along. I know that all this stuff will seem pretty complicated (and it would be if you didn't automate the process), but I promise in the end it will all make sense. In the next post I will show a couple of shell scripts and Rake tasks that will automate the whole process and will let you deploy a Rails to your registry app with a single easy command. + +The docker command you are running from your terminal is actually using the boot2docker VM to run the containers and do all the magic stuff. So when we run a command like `docker push some_repo` what is actually happening is that it's the boot2docker VM that is reacing out for the registry, not our localhost. + +This is an extremely important point to understand: in order to push the Docker image to the remote private registry, the SSH tunnel needs to be established from the boot2docker VM and not from your local machine. + +There are a couple of ways to go with it. I will show you the shortest one (which is not probably the easiest to understand, but it's the one that will let us automate the process with shell scripts). + +First of all though we need to sort one last thing with SSH. + +### Setting up SSH ### + +Let's add our boot2docker SSH key to our remote server (registry) known hosts. We can do so using the ssh-copy-id utility that you can install with the following command shouldn't you already have it: + + brew install ssh-copy-id + +Then run: + + ssh-copy-id -i /Users/username/.ssh/id_boot2docker root@your-registry.com + +Make sure to substitute `/Users/username/.ssh/id_boot2docker` with the correct path of your ssh key. + +This will allow us to connect via SSH to our remote registry without being prompted for the password. + +Finally let's test it out: + + boot2docker ssh "ssh -o 'StrictHostKeyChecking no' -i /Users/michelangelo/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@registry.touchwa.re &" & + +To break things out a little bit: + +- `boot2docker ssh` lets you pass a command as a parameter that will be executed by the boot2docker VM; +- the final `&` indicates that we want our command to be executed in the background; +- `ssh -o 'StrictHostKeyChecking no' -i /Users/michelangelo/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@registry.touchwa.re &` is the actual command our boot2docker VM will run; + - the `-o 'StrictHostKeyChecking no'` will make sure that we are not prompted with security questions; + - the `-i /Users/michelangelo/.ssh/id_boot2docker` indicates which SSH key we want our VM to use for authentication purposes (note that this should be the key you added to your remote registry in the previous step); + - finally we are opening a tunnel on mapping port 5000 to localhost:5000. + +### Pulling from another server ### + +You should now be able to push your image to the remote registry by simply issuing the following command: + + docker push localhost:5000/username/repo_name + +In the [next post][9] we'll se how to automate some of this stuff and we'll containerize a real Rails application. Stay tuned! + +P.S. Please use the comments to let me know of any inconsistencies or fallacies in my tutorial. Hope you enjoyed it! + +1. I'm also assuming you are running on OS X. +1. For a complete list of instructions to set up your docker environment and requirements, please visit [http://boot2docker.io/][10] +1. Select Image > Applications > Docker 1.4.1 on 14.04 at the time of this writing. +1. [https://github.com/docker/docker-registry/][11] +1. This is just a stub, in the next post I will show you how to bundle a Rails application into a Docker container. + +-------------------------------------------------------------------------------- + +via: http://cocoahunter.com/2015/01/23/docker-2/ + +作者:[Michelangelo Chasseur][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://cocoahunter.com/author/michelangelo/ +[1]:http://cocoahunter.com/2015/01/23/docker-1/ +[2]:http://cocoahunter.com/2015/01/23/docker-3/ +[3]:http://cocoahunter.com/2015/01/23/docker-2/#fn:1 +[4]:http://cocoahunter.com/2015/01/23/docker-2/#fn:2 +[5]:http://aws.amazon.com/ +[6]:https://registry.hub.docker.com/_/registry/ +[7]:http://localhost:5000/v1/_ping +[8]:http://localhost:5000/v1/search +[9]:http://cocoahunter.com/2015/01/23/docker-3/ +[10]:http://boot2docker.io/ +[11]:https://github.com/docker/docker-registry/ \ No newline at end of file diff --git a/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md b/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md new file mode 100644 index 0000000000..f450361a68 --- /dev/null +++ b/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md @@ -0,0 +1,253 @@ +Automated Docker-based Rails deployments +================================================================================ +![](http://cocoahunter.com/content/images/2015/01/docker3.jpeg) + +[TL;DR] This is the third post in a series of 3 on how my company moved its infrastructure from PaaS to Docker based deployment. + +- [First part][1]: where I talk about the process we went thru before approaching Docker; +- [Second part][2]: where I explain how setting up a private registry for in house secure deployments. + +---------- + +In this final part we will see how to automate the whole deployment process with a real world (though very basic) example. + +### Basic Rails app ### + +Let's dive into the topic right away and bootstrap a basic Rails app. For the purpose of this demonstration I'm going to use Ruby 2.2.0 and Rails 4.1.1 + +From the terminal run: + + $ rvm use 2.2.0 + $ rails new && cd docker-test + +Let's create a basic controller: + + $ rails g controller welcome index + +...and edit `routes.rb` so that the root of the project will point to our newly created welcome#index method: + + root 'welcome#index' + +Running `rails s` from the terminal and browsing to [http://localhost:3000][3] should bring you to the index page. We're not going to make anything fancier to the app, it's just a basic example to prove that when we'll build and deploy the container everything is working. + +### Setup the webserver ### + +We are going to use Unicorn as our webserver. Add `gem 'unicorn'` and `gem 'foreman'` to the Gemfile and bundle it up (run `bundle install` from the command line). + +Unicorn needs to be configured when the Rails app launches, so let's put a **unicorn.rb** file inside the **config** directory. [Here is an example][4] of a Unicorn configuration file. You can just copy & paste the content of the Gist. + +Let's also add a Procfile with the following content inside the root of the project so that we will be able to start the app with foreman: + + web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb + +If you now try to run the app with **foreman start** everything should work as expected and you should have a running app on [http://localhost:5000][5] + +### Building a Docker image ### + +Now let's build the image inside which our app is going to live. In the root of our Rails project, create a file named **Dockerfile** and paste in it the following: + + # Base image with ruby 2.2.0 + FROM ruby:2.2.0 + + # Install required libraries and dependencies + RUN apt-get update && apt-get install -qy nodejs postgresql-client sqlite3 --no-install-recommends && rm -rf /var/lib/apt/lists/* + + # Set Rails version + ENV RAILS_VERSION 4.1.1 + + # Install Rails + RUN gem install rails --version "$RAILS_VERSION" + + # Create directory from where the code will run + RUN mkdir -p /usr/src/app + WORKDIR /usr/src/app + + # Make webserver reachable to the outside world + EXPOSE 3000 + + # Set ENV variables + ENV PORT=3000 + + # Start the web app + CMD ["foreman","start"] + + # Install the necessary gems + ADD Gemfile /usr/src/app/Gemfile + ADD Gemfile.lock /usr/src/app/Gemfile.lock + RUN bundle install --without development test + + # Add rails project (from same dir as Dockerfile) to project directory + ADD ./ /usr/src/app + + # Run rake tasks + RUN RAILS_ENV=production rake db:create db:migrate + +Using the provided Dockerfile, let's try and build an image with the following command[1][7]: + + $ docker build -t localhost:5000/your_username/docker-test . + +And again, if everything worked out correctly, the last line of the long log output should read something like: + + Successfully built 82e48769506c + $ docker images + REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE + localhost:5000/your_username/docker-test latest 82e48769506c About a minute ago 884.2 MB + +Let's try and run the container! + + $ docker run -d -p 3000:3000 --name docker-test localhost:5000/your_username/docker-test + +You should be able to reach your Rails app running inside the Docker container at port 3000 of your boot2docker VM[2][8] (in my case [http://192.168.59.103:3000][6]). + +### Automating with shell scripts ### + +Since you should already know from the previous post3 how to push your newly created image to a private regisitry and deploy it on a server, let's skip this part and go straight to automating the process. + +We are going to define 3 shell scripts and finally tie it all together with rake. + +### Clean ### + +Every time we build our image and deploy we are better off always clean everything. That means the following: + +- stop (if running) and restart boot2docker; +- remove orphaned Docker images (images that are without tags and that are no longer used by your containers). + +Put the following into a **clean.sh** file in the root of your project. + + echo Restarting boot2docker... + boot2docker down + boot2docker up + + echo Exporting Docker variables... + sleep 1 + export DOCKER_HOST=tcp://192.168.59.103:2376 + export DOCKER_CERT_PATH=/Users/user/.boot2docker/certs/boot2docker-vm + export DOCKER_TLS_VERIFY=1 + + sleep 1 + echo Removing orphaned images without tags... + docker images | grep "" | awk '{print $3}' | xargs docker rmi + +Also make sure to make the script executable: + + $ chmod +x clean.sh + +### Build ### + +The build process basically consists in reproducing what we just did before (docker build). Create a **build.sh** script at the root of your project with the following content: + + docker build -t localhost:5000/your_username/docker-test . + +Make the script executable. + +### Deploy ### + +Finally, create a **deploy.sh** script with this content: + + # Open SSH connection from boot2docker to private registry + boot2docker ssh "ssh -o 'StrictHostKeyChecking no' -i /Users/username/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@your-registry.com &" & + + # Wait to make sure the SSH tunnel is open before pushing... + echo Waiting 5 seconds before pushing image. + + echo 5... + sleep 1 + echo 4... + sleep 1 + echo 3... + sleep 1 + echo 2... + sleep 1 + echo 1... + sleep 1 + + # Push image onto remote registry / repo + echo Starting push! + docker push localhost:5000/username/docker-test + +If you don't understand what's going on here, please make sure you've read thoroughfully [part 2][9] of this series of posts. + +Make the script executable. + +### Tying it all together with rake ### + +Having 3 scripts would now require you to run them individually each time you decide to deploy your app: + +1. clean +1. build +1. deploy / push + +That wouldn't be much of an effort, if it weren't for the fact that developers are lazy! And lazy be it, then! + +The final step to wrap things up, is tying the 3 parts together with rake. + +To make things even simpler you can just append a bunch of lines of code to the end of the already present Rakefile in the root of your project. Open the Rakefile file - pun intended :) - and paste the following: + + namespace :docker do + desc "Remove docker container" + task :clean do + sh './clean.sh' + end + + desc "Build Docker image" + task :build => [:clean] do + sh './build.sh' + end + + desc "Deploy Docker image" + task :deploy => [:build] do + sh './deploy.sh' + end + end + +Even if you don't know rake syntax (which you should, because it's pretty awesome!), it's pretty obvious what we are doing. We have declared 3 tasks inside a namespace (docker). + +This will create the following 3 tasks: + +- rake docker:clean +- rake docker:build +- rake docker:deploy + +Deploy is dependent on build, build is dependent on clean. So every time we run from the command line + + $ rake docker:deploy + +All the script will be executed in the required order. + +### Test it ### + +To see if everything is working, you just need to make a small change in the code of your app and run + + $ rake docker:deploy + +and see the magic happening. Once the image has been uploaded (and the first time it could take quite a while), you can ssh into your production server and pull (thru an SSH tunnel) the docker image onto the server and run. It's that easy! + +Well, maybe it takes a while to get accustomed to how everything works, but once it does, it's almost (almost) as easy as deploying with Heroku. + +P.S. As always, please let me have your ideas. I'm not sure this is the best, or the fastest, or the safest way of doing devops with Docker, but it certainly worked out for us. + +- make sure to have **boot2docker** up and running. +- If you don't know your boot2docker VM address, just run `$ boot2docker ip` +- if you don't, you can read it [here][10] + +-------------------------------------------------------------------------------- + +via: http://cocoahunter.com/2015/01/23/docker-3/ + +作者:[Michelangelo Chasseur][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://cocoahunter.com/author/michelangelo/ +[1]:http://cocoahunter.com/docker-1 +[2]:http://cocoahunter.com/2015/01/23/docker-2/ +[3]:http://localhost:3000/ +[4]:https://gist.github.com/chasseurmic/0dad4d692ff499761b20 +[5]:http://localhost:5000/ +[6]:http://192.168.59.103:3000/ +[7]:http://cocoahunter.com/2015/01/23/docker-3/#fn:1 +[8]:http://cocoahunter.com/2015/01/23/docker-3/#fn:2 +[9]:http://cocoahunter.com/2015/01/23/docker-2/ +[10]:http://cocoahunter.com/2015/01/23/docker-2/ \ No newline at end of file From dd544d31aef81644229c6644d82d30d4f5bb23fb Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Wed, 28 Jan 2015 20:44:04 +0800 Subject: [PATCH 048/104] Delete 20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成,删除该文档。 --- ...ning up Ubuntu 14.10,14.04,13.10 system.md | 165 ------------------ 1 file changed, 165 deletions(-) delete mode 100644 sources/tech/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md diff --git a/sources/tech/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md b/sources/tech/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md deleted file mode 100644 index 2c4ee5b2d6..0000000000 --- a/sources/tech/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md +++ /dev/null @@ -1,165 +0,0 @@ -FSSLC Translating ! - -Cleaning up Ubuntu 14.10,14.04,13.10 system -================================================================================ -We have already discussed [Cleaning up a Ubuntu GNU/Linux system][1] and this tutorial is updated with new ubuntu versions and more tools added. - -If you want to clean your ubuntu machine you need to follow these simple steps to remove all unnecessary junk files. - -### Remove partial packages ### - -This is yet another built-in feature, but this time it is not used in Synaptic Package Manager. It is used in the Terminal. Now, in the Terminal, key in the following command - - sudo apt-get autoclean - -Then enact the package clean command. What this commnad does is to clean remove .deb packages that apt caches when you install/update programs. To use the clean command type the following in a terminal window: - - sudo apt-get clean - -You can then use the autoremove command. What the autoremove command does is to remove packages installed as dependencies after the original package is removed from the system. To use autoremove tye the following in a terminal window: - - sudo apt-get autoremove - -### Remove unnecessary locale data ### - -For this we need to install localepurge.Automagically remove unnecessary locale data.This is just a simple script to recover diskspace wasted for unneeded locale files and localized man pages. It will automagically be invoked upon completion of any apt installation run. - -Install localepurge in Ubuntu - - sudo apt-get install localepurge - -After installing anything with apt-get install, localepurge will remove all translation files and translated man pages in languages you cannot read. - -If you want to configure localepurge you need to edit /etc/locale.nopurge - -This can save you several megabytes of disk space, depending on the packages you have installed. - -Example:- - -I am trying to install dicus using apt-get - -sudo apt-get install discus - -after end of this installation you can see something like below - -localepurge: Disk space freed in /usr/share/locale: 41860K - -### Remove "orphaned" packages ### - -If you want to remove orphaned packages you need to install deborphan package. - -Install deborphan in Ubuntu - - sudo apt-get install deborphan - -### Using deborphan ### - -Open Your terminal and enter the following command - - sudo deborphan | xargs sudo apt-get -y remove --purge - -### Remove "orphaned" packages Using GtkOrphan ### - -GtkOrphan (a Perl/Gtk2 application for debian systems) is a graphical tool which analyzes the status of your installations, looking for orphaned libraries. It implements a GUI front-end for deborphan, adding the package-removal capability. - -### Install GtkOrphan in Ubuntu ### - -Open the terminal and run the following command - - sudo apt-get install gtkorphan - -#### Screenshot #### - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/01/41.png) - -### Remove Orphan packages using Wajig ### - -simplified Debian package management front end.Wajig is a single commandline wrapper around apt, apt-cache, dpkg,/etc/init.d scripts and more, intended to be easy to use and providing extensive documentation for all of its functions. - -With a suitable sudo configuration, most (if not all) package installation as well as creation tasks can be done from a user shell. Wajig is also suitable for general system administration.A Gnome GUI command ‘gjig' is also included in the package. - -### Install Wajig in Ubuntu ### - -Open the terminal and run the following command - - sudo apt-get install wajig - -### Debfoster --- Keep track of what you did install ### - -debfoster maintains a list of installed packages that were explicitly requested rather than installed as a dependency. Arguments are entirely optional, debfoster can be invoked per se after each run of dpkg and/or apt-get. - -Alternatively you can use debfoster to install and remove packages by specifying the packages on the command line. Packages suffixed with a --- are removed while packages without a suffix are installed. - -If a new package is encountered or if debfoster notices that a package that used to be a dependency is now an orphan, it will ask you what to do with it. If you decide to keep it, debfoster will just take note and continue. If you decide that this package is not interesting enough it will be removed as soon as debfoster is done asking questions. If your choices cause other packages to become orphaned more questions will ensue. - -### Install debfoster in Ubuntu ### - -Open the terminal and run the following command - - sudo apt-get install debfoster - -### Using debfoster ### - -to create the initial keepers file use the following command - - sudo debfoster -q - -you can always edit the file /var/lib/debfosterkeepers which defines the packages you want to remain on your system. - -to edit the keepers file type - - sudo vi /var/lib/debfoster/keepers - -To force debfoster to remove all packages that aren't listed in this list or dependencies of packages that are listed in this list.It will also add all packages in this list that aren't installed. So it makes your system comply with this list. Do this - - sudo debfoster -f - -To keep track of what you installed additionally do once in a while : - - sudo debfoster - -### xdiskusage -- Check where the space on your hard drive goes ### - -Displays a graphic of your disk usage with du.xdiskusage is a user-friendly program to show you what is using up all your disk space. It is based on the design of the "xdu" program written by Phillip C. Dykstra. Changes have been made so it runs "du" for you, and can display the free space left on the disk, and produce a PostScript version of the display.xdiskusage is nice if you want to easily see where the space on your hard drive goes. - -### Install xdiskusage in Ubuntu ### - - sudo apt-get install xdiskusage - -If you want to open this application you need to use the following command - - sudo xdiskusage - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/01/5.png) - -Once it opens you should see similar to the following screen - -### Bleachbit ### - -BleachBit quickly frees disk space and tirelessly guards your privacy. Free cache, delete cookies, clear Internet history, shred temporary files, delete logs, and discard junk you didn't know was there. Designed for Linux and Windows systems, it wipes clean a thousand applications including Firefox, Internet Explorer, Adobe Flash, Google Chrome, Opera, Safari,and more. Beyond simply deleting files, BleachBit includes advanced features such as shredding files to prevent recovery, wiping free disk space to hide traces of files deleted by other applications, and vacuuming Firefox to make it faster. Better than free, BleachBit is open source. - -### Install Bleachbit in ubuntu ### - -Open the terminal and run the following command - - sudo apt-get install bleachbit - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/01/6.png) - -### Using Ubuntu-Tweak ### - -You can also Use [Ubuntu-Tweak][2] To clean up your system - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/cleaning-up-a-ubuntu-gnulinux-system-updated-with-ubuntu-14-10-and-more-tools-added.html - -作者:[ruchi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.ubuntugeek.com/author/ubuntufix -[1]:http://www.ubuntugeek.com/cleaning-up-all-unnecessary-junk-files-in-ubuntu.html -[2]:http://www.ubuntugeek.com/www.ubuntugeek.com/install-ubuntu-tweak-on-ubuntu-14-10.html From 1a136b0aaf83e49a543ed41db44b85f94849bd29 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Wed, 28 Jan 2015 21:06:42 +0800 Subject: [PATCH 049/104] Translated "20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成 "20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md" --- ...ning up Ubuntu 14.10,14.04,13.10 system.md | 204 ++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 translated/tech/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md diff --git a/translated/tech/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md b/translated/tech/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md new file mode 100644 index 0000000000..a49467781e --- /dev/null +++ b/translated/tech/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md @@ -0,0 +1,204 @@ +清理 Ubuntu 14.10,14.04,13.10 系统 +================================================================================ +前面我们已经讨论了[如何清理 Ubuntu GNU/Linux 系统][1],这篇教程将在原有教程的基础上,增加对新的 Ubuntu 发行版本的支持,并介绍更多的工具。 + +假如你想清理你的 Ubuntu 主机,你可以按照以下的一些简单步骤来移除所有不需要的垃圾文件。 + +### 移除多余软件包 ### + +这又是一个内置功能,但这次我们不必使用新得立包管理软件(Synaptic Package Manager),而是在终端中达到目的。 + +现在,在终端窗口中键入如下命令: + +``` +sudo apt-get autoclean +``` + +这便激活了包清除命令。这个命令所做的工作是: 自动清除那些当你安装或升级程序时系统所缓存的 `.deb` 包(即清除 `/var/cache/apt/archives` 目录,不过只清理过时的包)。如果需要使用 清除命令,只需在终端窗口中键入以下命令: + +``` +sudo apt-get clean +``` + +然后你就可以使用自动移除命令。这个命令所做的工作是:清除那些 在系统中被某个已经卸载的软件 作为依赖所安装的软件包。要使用自动移除命令,在终端窗口中键入以下命令: + +``` +sudo apt-get autoremove +``` + +### 移除不需要的本地数据 ### + +为达到此目的,我们需要安装 `localepurge` 软件,它将自动移除一些不需要的本地数据。这个软件是一个简单的脚本,它将从那些 不再需要的本地文件和本地联机手册( man pages ) 所占用的空间中回收磁盘空间。这个软件将在任何 apt 安装命令运行时 被自动激活。 + +在 Ubuntu 中安装 `localepurge` + +``` +sudo apt-get install localepurge +``` + +在通过 `apt-get install` 安装任意软件后, localepurge 将移除所有 不是使用你系统中所设定语言的 翻译文件和翻译的联机手册。 + +假如你想设置 `localepurge`,你需要编辑 `/ect/locale.nopurge` 文件。 + +根据你已经安装的软件,这将为你节省几兆的磁盘空间。 + +例子:- + +假如我试着使用 `apt-get` 来安装 `dicus`软件: + +``` +sudo apt-get install discus +``` + +在软件安装完毕之后,你将看到如下提示: + +> localepurge: Disk space freed in /usr/share/locale: 41860K + +### 移除 孤包 ### + +假如你想移除孤包,你需要安装 `deborphan` 软件: + +在 Ubuntu 中安装 `deborphan` : + +``` +sudo apt-get install deborphan +``` + +### 使用 deborphan ### + +打开终端并键入如下命令即可: + +``` +sudo deborphan | xargs sudo apt-get -y remove --purge +``` + +### 使用 GtkOrphan 来移除 孤包 ### + +`GtkOrphan` (一个针对 debian 系发行版本的 Perl/Gtk2 应用) 是一个分析 用户安装过程状态并查找孤立库文件的图形化工具, 它为 `deborphan` 提供了一个 GUI 前端,并具备移除软件包的功能。 + +### 在 Ubuntu 中安装 GtkOrphan ### + +打开终端并运行如下命令: + +``` +sudo apt-get install gtkorphan +``` + +#### 一张截图 #### + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/01/41.png) + +### 使用 Wajig 移除孤包 ### + +`Wajig`是 Debian 包管理系统中一个简单的软件包管理前端。它将 apt、apt-cache、 dpkg、 /etc/init.d 中的脚本等 通过一个单一命令集成在一起,它的设计初衷是 使用简单 和 为它所包含的函数提供丰富的文档。 + +通过适当的 `sudo`配置,大多数(如果不是全部)的软件包安装和创建等任务可以通过 一个用户 shell 来完成。`Wajig` 也适用于一般的系统管理。另外,一个 Gnome GUI 命令 `gjig`也被囊括在这个软件包之中。 + +### 在 Ubuntu 中安装 Wajig ### + +打开终端并运行如下命令: + +``` +sudo apt-get install wajig +``` + +### Debfoster --- 跟踪你在安装过程中的操作 ### + +debfoster 将会维护一个列有 被明确要求安装的软件包的列表,但不包括那些作为某个软件的依赖而被安装的软件包。参数是完全可选的,你甚至可以使得 在 dpkg 和/或 apt-get 每次运行之后的每一秒内 激活 debfoster 。 + +另外,你还可以在命令行中使用 debfoster 来安装或移除某些特定的软件包。那些后缀为 `---` 的软件包将会被移除,而没有后缀的软件包将会被安装。 + +假如一个新的软件包或 debfoster 注意到 作为某个软件包的依赖的软件包 是一个孤包,则 debfoster 将会询问你下一步如何操作。若你决定保留这个孤包, debfoster 将只会进行记录并继续安装过程;若你觉得这个软件包不足以引起你的兴趣,在 debfoster 询问这个问题后,它将移除这个软件包。进一步的,如果你的决定使得其他的软件包变为孤包,更多的提问将会接踵而来。 + +### 在 Ubuntu 中安装 debfoster ### + +打开终端并运行如下命令: + +``` +sudo apt-get install debfoster +``` + +### 使用 debfoster ### + +为了创建一个 初始跟踪文件,可以使用如下命令: + +``` +sudo debfoster -q +``` + +你总可以编辑 `/var/lib/debfoster/keepers` 文件,来定义那些 你想留在系统中的软件包。 + +为了编辑这个文件,可以键入: + +``` +sudo vi /var/lib/debfoster/keepers +``` + +强制使 debfoster 去移除 所有没有被列在上面这个文件的软件包 或 安装作为某些列在这个文件中的软件包的依赖, 它也会添加所有在这个列表中没有被安装的软件包。若要根据这个列表来执行相关操作,只需执行 + +``` +sudo debfoster -f +``` + +若需要跟踪你新安装的软件包,你需要时不时地执行如下命令: + +``` +sudo debfoster +``` + +### xdiskusage -- 查看你的硬盘空间都去哪儿了 ### + +图形化地展示磁盘使用情况的 du.xdiskusage 是一个用户友好型程序,它将为你展示你所有磁盘的使用情况。 它是在 Phillip C. Dykstra 所写的 “xdu” 程序的基础上设计的。一些改变使得它可以为你运行 “du”命令,并显示磁盘的剩余空间,并且假如你想清晰地了解你的磁盘空间都去哪儿了,它还可以生成一个 PostScript 格式的名为 display.xdiskusage 的文件。 + +### 在 Ubuntu 中安装 xdiskusage ### + +只需使用如下命令: + +``` +sudo apt-get install xdiskusage +``` + +若你想打开这个应用,你需要使用如下命令: + +``` +sudo xdiskusage +``` + +一旦这个应用被打开,你将看到如下图所示的界面: + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/01/5.png) + + +### Bleachbit ### + +BleachBit 能快速地释放磁盘空间并不知疲倦地保护你的隐私。它可以 释放缓存,删除 cookie,清除 Internet 上网历史,粉碎临时文件,删除日志,丢弃你所不知道存在何处的垃圾。为 Linux 和 Windows 系统设计,它支持擦除清理数以千计的应用程序,如 Firefox, Internet Explorer, Adobe Flash, Google Chrome, Opera, Safari 等等。除了简单地删除文件,BleachBit 还包括许多高级功能,诸如 粉碎文件以防止恢复,擦除磁盘空间 来隐藏被其他应用程序所删除文件的痕迹,为火狐“除尘”,使其速度更快等。比免费更好,BleachBit 是一个开源软件。 + +### 在 Ubuntu 中安装 Bleachbit ### + +打开终端并运行如下命令: + +``` +sudo apt-get install bleachbit +``` + +### 一张截图 ### + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/01/6.png) + +### 使用 Ubuntu-Tweak ### + +最后,你也可以使用 [Ubuntu-Tweak][2] 来清理你的系统。 + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/cleaning-up-a-ubuntu-gnulinux-system-updated-with-ubuntu-14-10-and-more-tools-added.html + +作者:[ruchi][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix +[1]:http://www.ubuntugeek.com/cleaning-up-all-unnecessary-junk-files-in-ubuntu.html +[2]:http://www.ubuntugeek.com/www.ubuntugeek.com/install-ubuntu-tweak-on-ubuntu-14-10.html From b9aaa625d48b6171ff286fdd88de6973004a1d0e Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 28 Jan 2015 21:08:50 +0800 Subject: [PATCH 050/104] Update 20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md --- ...How To Check If A Package Is Installed Or Not In Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md b/sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md index 6b68f02b1e..7fe8ae172c 100644 --- a/sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md +++ b/sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md @@ -1,3 +1,5 @@ +Translating-----geekpi + Linux Basics: How To Check If A Package Is Installed Or Not In Ubuntu ================================================================================ ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/04/ubuntu-790x558.png) @@ -134,4 +136,4 @@ via: http://www.unixmen.com/linux-basics-check-package-installed-not-ubuntu/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.unixmen.com/author/sk/ \ No newline at end of file +[a]:http://www.unixmen.com/author/sk/ From 4ad74fa941a3713540e25d57a90448c84feb9e3b Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 28 Jan 2015 21:22:44 +0800 Subject: [PATCH 051/104] translated --- ...A Package Is Installed Or Not In Ubuntu.md | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) rename {sources => translated}/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md (77%) diff --git a/sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md b/translated/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md similarity index 77% rename from sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md rename to translated/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md index 7fe8ae172c..9139b8dd92 100644 --- a/sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md +++ b/translated/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md @@ -1,18 +1,16 @@ -Translating-----geekpi - -Linux Basics: How To Check If A Package Is Installed Or Not In Ubuntu +Linux 基础:如何在Ubuntu上检查是否已经安装了一个包 ================================================================================ ![](http://180016988.r.cdn77.net/wp-content/uploads/2014/04/ubuntu-790x558.png) -If you’re managing Debian or Ubuntu servers, probably, you may use **dpkg** or **apt-get** commands often. These two commands are used to install, remove, update packages. +如果你正在管理Debian或者Ubuntu服务器,你也许会经常使用**dpkg** 或者 **apt-get**命令。这两个命令用来安装、卸载和更新包。 -In this brief tutorial, let us see how to check if a package is installed or not in DEB based systems. +在本篇中,让我们看下如何在基于DEB的系统下检查是否安装了一个包。 -To check whether a particular package for example firefox, is installed or not using command: +要检查特定的包,比如firefox是否安装了,使用这个命令: dpkg -s firefox -Sample output: +示例输出: Package: firefox Status: install ok installed @@ -38,13 +36,13 @@ Sample output: and integrated search let you get the most out of the web. Xul-Appid: {ec8030f7-c20a-464f-9b0e-13a3a9e97384} -As you see in the above output, the firefox is installed. +如上所见,firefox已经安装了。 -Also, you can do the same using **dpkg-query** command. This command displays the decent output, and ofcourse, you can wild cards too. +同样,你可以使用**dpkg-query** 命令。这个命令会有一个更好的输出,当然,你可以用通配符。 dpkg-query -l firefox -Sample output: +示例输出: Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend @@ -53,11 +51,11 @@ Sample output: +++-====================================-=======================-=======================-============================================================================= ii firefox 35.0+build3-0ubuntu0.14 amd64 Safe and easy web browser from Mozilla -To list all installed package in your system, enter the following command +要列出你系统中安装的包,输入下面的命令: dpkg --get-selections -Sample output: +示例输出: abiword install abiword-common install @@ -81,13 +79,13 @@ Sample output: zlib1g:amd64 install zlib1g:i386 install -The above might be very long depending upon the number of packages you have installed on your system. +上面的输出可能会非常长,这依赖于你的系统已安装的包。 -You can also filter through **grep** to get results for the exact package you need. For example, I want to see which gcc packages are already installed on my system using **dpkg** command: +你同样可以通过**grep**来过滤割到更精确的包。比如,我想要使用**dpkg**命令查看系统中安装的gcc包: dpkg --get-selections | grep gcc -Sample output: +示例输出: gcc install gcc-4.8 install @@ -99,11 +97,11 @@ Sample output: libgcc1:amd64 install libgcc1:i386 install -Additionally, you can find location of the files within a package using the parameter “**-L**”. +额外的,你可以使用“**-L**”参数来找出包中文件的位置。 dpkg -L gcc-4.8 -Sample output: +示例输出: /. /usr @@ -122,16 +120,16 @@ Sample output: /usr/bin/x86_64-linux-gnu-gcc-ar-4.8 /usr/bin/x86_64-linux-gnu-gcov-4.8 -That’s all for now. Hope this short tutorial will useful for you. +就是这样了。希望这篇对你有用。 -Good day! +美好的一天! -------------------------------------------------------------------------------- via: http://www.unixmen.com/linux-basics-check-package-installed-not-ubuntu/ 作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9b23ad7309c2fcad36cf88c9feb0ffad9da26917 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 28 Jan 2015 21:28:56 +0800 Subject: [PATCH 052/104] Rename translated/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md to sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md --- ...cs--How To Check If A Package Is Installed Or Not In Ubuntu.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated => sources}/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md (100%) diff --git a/translated/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md b/sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md similarity index 100% rename from translated/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md rename to sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md From ab71b2b62bf5448d4986411c7ce0bcc7f906ebd4 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 28 Jan 2015 21:30:00 +0800 Subject: [PATCH 053/104] translated --- ...cs--How To Check If A Package Is Installed Or Not In Ubuntu.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md (100%) diff --git a/sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md b/translated/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md similarity index 100% rename from sources/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md rename to translated/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md From 4854a7761095b1b10506828ba05337baaed2eb6a Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 29 Jan 2015 08:53:56 +0800 Subject: [PATCH 054/104] Update 20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【translating】准备翻译这篇文章。 --- ...nd And Remove Duplicate Files Instantly From Hard Drive.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md b/sources/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md index d81a33de40..b9e9598d16 100644 --- a/sources/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md +++ b/sources/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md @@ -1,3 +1,5 @@ +Translating by FSSlc + dupeGuru – Find And Remove Duplicate Files Instantly From Hard Drive ================================================================================ ### Introduction ### @@ -95,4 +97,4 @@ via: http://www.unixmen.com/dupeguru-find-remove-duplicate-files-instantly-hard- [a]:http://www.unixmen.com/author/sk/ [1]:http://www.hardcoded.net/dupeguru/ [2]:http://www.hardcoded.net/dupeguru_me/ -[3]:http://www.hardcoded.net/dupeguru_pe/ \ No newline at end of file +[3]:http://www.hardcoded.net/dupeguru_pe/ From 77d386e9c72afc3ccbaaa057e5d09e1493f7766e Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 29 Jan 2015 10:48:40 +0800 Subject: [PATCH 055/104] translating --- .../20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md b/sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md index 2a004ed174..489e78dfaf 100644 --- a/sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md +++ b/sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md @@ -1,3 +1,5 @@ +Translating---geekpi + LinSSID – A Graphical Wi-Fi Scanner for Linux ================================================================================ ### Introduction ### @@ -58,4 +60,4 @@ via: http://www.unixmen.com/linssid-graphical-wi-fi-scanner-linux/ [a]:http://www.unixmen.com/author/sk/ [1]:http://sourceforge.net/projects/linssid/files/ -[2]:http://sourceforge.net/projects/linssid/ \ No newline at end of file +[2]:http://sourceforge.net/projects/linssid/ From 17e8c6440bc21ca8c8068170b2ed2f1532c461b5 Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Thu, 29 Jan 2015 10:55:40 +0800 Subject: [PATCH 056/104] [translating] 20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md --- ...ll Primer--Master Your Linux OS X Unix Shell Environment.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md b/sources/tech/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md index eafc6d21e5..4f46e43dd7 100644 --- a/sources/tech/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md +++ b/sources/tech/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md @@ -1,3 +1,4 @@ +zpl1025 A Shell Primer: Master Your Linux, OS X, Unix Shell Environment ================================================================================ On a Linux or Unix-like systems each user and process runs in a specific environment. An environment includes variables, settings, aliases, functions and more. Following is a very brief introduction to some useful shell environment commands, including examples of how to use each command and setup your own environment to increase productivity in the command prompt. @@ -689,4 +690,4 @@ via: http://www.cyberciti.biz/howto/shell-primer-configuring-your-linux-unix-osx [12]:http://www.cyberciti.biz/faq/fedora-redhat-scientific-linuxenable-bash-completion/ [13]:http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html [14]:http://bash.cyberciti.biz/guide/Setting_shell_options -[15]:http://www.cyberciti.biz/write-for-nixcraft/ \ No newline at end of file +[15]:http://www.cyberciti.biz/write-for-nixcraft/ From 543d0957b8cacf54fa53b02e48cb3d119f2e2f12 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 29 Jan 2015 11:08:31 +0800 Subject: [PATCH 057/104] translated --- ...ID--A Graphical Wi-Fi Scanner for Linux.md | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md b/sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md index 489e78dfaf..5935a4545c 100644 --- a/sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md +++ b/sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md @@ -1,59 +1,58 @@ -Translating---geekpi - -LinSSID – A Graphical Wi-Fi Scanner for Linux +LinSSID - 一款Linux下的图形化Wi-Fi扫描器 ================================================================================ -### Introduction ### +### 介绍 ### -As you may know, **LinSSID** is a simple graphical software that can be used to find the wireless networks available.It is completely open source, written in C++ using Linux wireless tools, Qt5, and Qwt 6.1., and is similar to **Inssider** (MS Windows) in terms of look and functionality. +如你所知,**LinSSID** 是一款可以用于寻找可用无线网络的图形化软件。它完全开源,用C++写成,使用了Linux无线工具、Qt5、Qwt6.1,它在外观和功能上与**Inssider** (MS Windows)相近。 -### Installation ### +### 安装 ### -You can install it either using source, or using a PPA if you use DEB based systems such as Ubuntu, and LinuxMint etc. +你可以使用源码安装,如果你使用的是基于DEB的系统比如Ubuntu和LinuxMint等等,你也可以使用PPA安装。 -You can download and install LinSSID using source packages from [this link][1]. +你可用从[this link][1]这个链接下载并安装LinSSID。 -Here, we will install and test this software on Ubuntu 14.04 LTS using PPA. +这里我门将使用PPA来安装并测试这个软件。 -Add the LinSSID PPA, and install it by typing. +添加LinSSID的PPA并输入下面的命令安装。 sudo add-apt-repository ppa:wseverin/ppa sudo apt-get update sudo apt-get install linssid -### Usage ### +### 用法 ### -Once you installed, launch it either from menu or unity. +安装完成之后,你可以从菜单或者unity中启动。 -You”ll be asked to enter the administrative user password of your system. +你将被要求输入管理员密码。 ![Password required for iwlist scan_001](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Password-required-for-iwlist-scan_001.png) -This is how LinSSID interface looks. +这就是LinSSID的界面。 ![LinSSID_002](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/LinSSID_002.png) -Now, select the network interface you used to connect to the Wireless networks, for example wlan0 in my case. Click the Play button to search the list of available wi-fi networks. +现在选择你想要连接无线网络的网卡,比如这里是wlan0.点击Play按钮来搜寻wi-fi网络列表。 -After a new seconds, LinSSID will display the wi-fi networks. +几秒钟之后,LinSSID就会显示wi-fi网络了。 ![LinSSID_003](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/LinSSID_003.png) -As you see in the above screenshot, LinSSID displays the details of SSID names, MAC Id, Channel, Privacy, Cipher, Signal, and Protocol etc. Ofcourse, you can make LinSSID to display more options such as Security, bandwidth details etc. To do that, go to **View** menu, and select the desired option. Also, it displays the graphs of signal strength by channel and over time. Additionally, It works both on 2.4Ghz, and 5Ghz channels. +如你在上面的截屏中所见,LinSSID显示SSID名、MAC ID、通道、隐私、加密方式、信号和协议等等信息。当然,你可以让LinSSID显示更多的选项,比如安全、带宽等等。要显示这些,进入**View**菜单并选择需要的选项。同样,它显示了不同通道中的信号随着时间信号强度的变化。最后,它可以工作在2.4Ghz和5Ghz通道上。 -That’s it. Hope this tool will useful for you. -Cheers!! +就是这样。希望这个工具对你有用。 -Reference Links: +干杯!! -- [LinSSID Homepage][2] +参考链接: + +- [LinSSID 主页][2] -------------------------------------------------------------------------------- via: http://www.unixmen.com/linssid-graphical-wi-fi-scanner-linux/ 作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d561a85fbea44255e02bd2d1577568a8cdb98198 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 29 Jan 2015 11:11:10 +0800 Subject: [PATCH 058/104] Rename sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md to translated/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md --- .../tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md (100%) diff --git a/sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md b/translated/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md similarity index 100% rename from sources/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md rename to translated/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md From 7b143a8b5bcc95550f6577ea400fa095fdf8885e Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 29 Jan 2015 14:42:46 +0800 Subject: [PATCH 059/104] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...gration From 2.2 to 2.4 on Ubuntu 14.04.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/translated/tech/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md b/translated/tech/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md index f4edd9e627..dc42dae33a 100644 --- a/translated/tech/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md +++ b/translated/tech/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md @@ -1,21 +1,21 @@ -Ubuntu 14.04 Apache2.2迁移2.4问题解决 +小贴士:在 Ubuntu 14.04 中Apache从2.2迁移到2.4的问题 ================================================================================ -如果你进行了一次**Ubuntu**从12.04到14.04的升级,那么这次升级还包括了一个重大的升级--**Apache**从2.2版本到2.4版本。**Apache**的这次升级带来了许多性能提升,但是如果继续使用2.2的配置会导致很多错误。 +如果你进行了一次**Ubuntu**从12.04到14.04的升级,那么它还包括了一个重大的升级--**Apache**从2.2版本升级到2.4版本。**Apache**的这次升级带来了许多性能提升,但是如果继续使用2.2的配置文件会导致很多错误。 ### 访问控制的改变 ### -从**Apache 2.4**起,授权(authorization)开始启用,比起2.2的一个检查一个数据存储,授权更加灵活。过去很难确定那些命令授权应用了,但是授权(authorization)的引入解决了这些问题,现在,配置可以控制什么时候授权方法被调用,什么条件决定何时授权访问。 +从**Apache 2.4**起,授权(authorization)开始启用,比起2.2的一个检查一个数据存储,授权更加灵活。过去很难确定授权如何并且以什么样的顺序被应用,但是授权容器指令的介绍解决了这些问题,现在,配置可以控制什么时候授权方法被调用,什么条件决定何时授权访问。 这就是为什么大多数的升级失败是由于错误配置,2.2的访问控制基于IP地址,主机名和其他字符通过使用指令Order,来设置Allow, Deny或 Satisfy,但是2.4,这些一切被新模板授权(authorization)来替代检查。 -为了弄清楚这些,可以来看一些虚拟主机的例子,这些可以在/etc/apache2/sites-enabled/default 或者 /etc/apache2/sites-enabled/网页名称 中找到: +为了弄清楚这些,可以来看一些虚拟主机的例子,这些可以在/etc/apache2/sites-enabled/default 或者 /etc/apache2/sites-enabled/你的网页名称 中找到: -老2.2虚拟主机配置: +旧的2.2虚拟主机配置: Order allow,deny Allow from all -新2.4虚拟主机配置: +新的2.4虚拟主机配置: Require all granted @@ -23,24 +23,24 @@ Ubuntu 14.04 Apache2.2迁移2.4问题解决 ### .htaccess 问题 ### -升级后如果一些设置不执行或者得到重定向错误,检查是否这些设置是在.htaccess文件中。如果是,2.4已经不再使用.htaccess文件,在2.4中默认使用AllowOverride指令来设置,因此忽略了.htaccess文件。你需要做的就是改变和增加AllowOverride All命令到你的页面配置文件中。 +升级后如果一些设置不执行或者得到重定向错误,检查是否这些设置是在.htaccess文件中。如果是,2.4已经不再使用.htaccess文件,在2.4中默认使用AllowOverride指令来设置,因此忽略了.htaccess文件。你需要做的全部就是改变或者添加AllowOverride All命令到你的网站配置文件中。 上面截图中,可以看见AllowOverride All指令。 ### 丢失配置文件或者模块 ### -根据我的经验,这次升级带了其他问题就是老模块和配置文件不再需要或者不被支持了。所以你必须十分清楚Apache不再支持的各种文件,并且在老配置中移除这些老模块来解决问题。之后你可以搜索和安装相似的模块来替代。 +根据我的经验,这次升级带来的另一个问题就是在2.4中旧模块和配置文件不再需要或者不被支持了。你将会收到一条“Apache不能包含这个相应文件”的明确警告,你需要做的是在配置文件中移除这些导致问题的命令行。之后你可以搜索和安装相似的模块来替代。 -### 其他需要的知道的小改变 ### +### 其他需要了解的小改变 ### 这里还有一些其他改变的需要考虑,虽然这些通常只会发生警告,而不是错误。 -- MaxClients重命名为MaxRequestWorkers,使之有更准确的描述。而异步MPM,如event,客服端最大连接数不量比与工作线程数。老名字依然支持。 +- MaxClients重命名为MaxRequestWorkers,使之有更准确的描述。而异步MPM,如event,客户端最大连接数不量比于工作线程数。旧的名字依然支持。 - DefaultType命令无效,使用它已经没有任何效果了。需要使用其他配置设定来替代它 - EnableSendfile默认关闭 - FileETag 默认"MTime Size"(没有INode) -- KeepAlive 只接受On或Off值。之前的任何值不是Off或者0都认为是On -- Mutex 替代 Directives AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex, 和 WatchdogMutexPath 。需要删除或者替代所有2.2老配置的设置。 +- KeepAlive 只接受“On”或“Off”值。之前的任何不是“Off”或者“0”的值都被认为是“On” +- Mutex 已经替代了 Directives AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex 和 WatchdogMutexPath 。你需要做的是估计一下这些被移动的指令在2.2中的使用情况,来决定是否删除或者使用Mutex来替代。 -------------------------------------------------------------------------------- From 46d31701a4ab2de3ceb43f028d0d14f22c94bba8 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 29 Jan 2015 14:43:23 +0800 Subject: [PATCH 060/104] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md b/translated/tech/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md index dc42dae33a..49c465d17d 100644 --- a/translated/tech/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md +++ b/translated/tech/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md @@ -48,7 +48,7 @@ via: http://linoxide.com/linux-how-to/apache-migration-2-2-to-2-4-ubuntu-14-04/ 作者:[Adrian Dinu][a] 译者:[Vic020/VicYu](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7ad95a117bec657a46f4ca6b4bdf635e01c2fe2b Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 29 Jan 2015 20:47:02 +0800 Subject: [PATCH 061/104] Delete 20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完毕,删除原文。 --- ...plicate Files Instantly From Hard Drive.md | 100 ------------------ 1 file changed, 100 deletions(-) delete mode 100644 sources/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md diff --git a/sources/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md b/sources/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md deleted file mode 100644 index b9e9598d16..0000000000 --- a/sources/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md +++ /dev/null @@ -1,100 +0,0 @@ -Translating by FSSlc - -dupeGuru – Find And Remove Duplicate Files Instantly From Hard Drive -================================================================================ -### Introduction ### - -Disk full is one of the big trouble for us. No matter how we’re careful, sometimes we might copy the same file to multiple locations, or download the same file twice unknowingly. Therefore, sooner or later we will end up with disk full error message, which is worst when we really need some space to store important data. If you believe your system has multiple duplicate files, then **dupeGuru** might help you. - -dupeGuru team have also developed applications called **dupeGuru Music Edition** to remove duplicate music files, and **dupeGuru Picture Edition** to remove duplicate pictures. - -### 1. dupeGuru (Standard Edition) ### - -For those who don’t know about [dupeGuru][1], It is a free, open source, cross-platform application that can used to find and remove the duplicate files in your system. It will run under Linux, Windows, and Mac OS X platforms. It uses a quick fuzzy matching algorithm to find the duplicate files in minutes. Also, you can tweak dupeGuru to find exactly what kind of duplicate files you want to, and eliminate what kind of files from deletion. It supports English, French, German, Chinese (Simplified), Czech, Italian, Armenian, Russian, Ukrainian, Brazilian, and Vietnamese. - -#### Install dupeGuru On Ubuntu 14.10/14.04/13.10/13.04/12.04 #### - -dupeGuru developers have created a Ubuntu PPA to ease the installation. To install dupeGuru, enter the following commands one by one in your Terminal. - - sudo apt-add-repository ppa:hsoft/ppa - sudo apt-get update - sudo apt-get install dupeguru-se - -#### Usage #### - -Usage is very simple. Launch dupeGuru either from Unity Dash or Menu. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru_007.png) - -Click + button on the bottom, and add the folder you want to scan. Click Scan button to start finding the duplicate files. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru_008.png) - -If the selected folder contains any duplicate files, it will display them. As you in the below screen shot, I have a duplicate file in the Downloads directory. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Results_009.png) - -Now, you can decide what to do. You can either delete the duplicate file, or rename it, or copy/move it to another location. To do that select the duplicate files, or check the box that says “**Dupes only**” on the Menu bar. If you selected the Dupes only option, the duplicates files will only visible. So you can select and delete them easily. Click on the **Actions** drop-down box. Finally, select the action you want to perform. Here, I just want to delete the duplicate file, so I selected the option: **Send marked to Recycle bin**. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Menu_010.png) - -Then, click **Proceed** to delete the duplicate files. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Deletion-Options_011.png) - -### 2. dupeGuru Music Edition ### - -[dupeGuru Music Edition][2] or dupeGuru ME in short, is just like dupeGuru. It does everything dupeGuru does, but it has more information columns (such as bitrate, duration, tags, etc..) and more scan types (filename with fields, tags and audio content). Like dupeGuru, dupeGuru ME also runs on Linux, Windows, and Mac OS X. - -It supports variety of formats such as MP3, WMA, AAC (iTunes format), OGG, FLAC, loss-less AAC and loss-less WMA etc, - -#### Install dupeGuru ME On Ubuntu 14.10/14.04/13.10/13.04/12.04 #### - -Now, we don’t have to add any PPA, because already the added in the previous steps. So, enter the following command to install from your Terminal. - - sudo apt-get install dupeguru-me - -#### Usage #### - -Launch it either from Unity dash or Menu. The usage, interface, and look of dupeGuru ME is similar to normal dupeGuru. Add the folder you to scan and select the action you want to perform. The duplicate music files will be deleted. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Music-Edition-Results_012.png) - -### 3. dupeGuru Picture Edition ### - -[dupeGuru Picture Edition][3], or duepGuru PE in short, is a tool to find duplicate pictures on your computer. It is as like as dupeGuru, but is specialized for duplicate pictures matching. dupeGuru PE runs on Linux, Windows, and Mac OS X. - -dupeGuru PE supports JPG, PNG, TIFF, GIF and BMP formats. All these formats can be compared together. The Mac OS X version of dupeGuru PE also supports PSD and RAW (CR2 and NEF) formats. - -#### Install dupeGuru PE On Ubuntu 14.10/14.04/13.10/13.04/12.04 #### - -As we have already added the PPA, We don’t need to add PPA for dupeGuru either. Just, run the following command to install it. - - sudo apt-get install dupeguru-pe - -#### Usage #### - -It’s also look like dupeGuru, and dupeGuru ME in terms of usage, interface, and look.I wonder why the developer have created there separate versions for each category. It would be better, a single application has all of the above three features combined. - -Launch it, add the folder you want to scan, and select the action you want to perform. That’s it. you duplicated files will be gone. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Picture-Edition-Results_014.png) - -If you can’t remove them in case of any security problems, note down the location of the files, and manually delete them either from Terminal or File manager. - -Cheers! - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/dupeguru-find-remove-duplicate-files-instantly-hard-drive/ - -作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/sk/ -[1]:http://www.hardcoded.net/dupeguru/ -[2]:http://www.hardcoded.net/dupeguru_me/ -[3]:http://www.hardcoded.net/dupeguru_pe/ From ae1bd97ef60a9230a400cee35df766099a65bef4 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 29 Jan 2015 21:26:35 +0800 Subject: [PATCH 062/104] =?UTF-8?q?=E3=80=90translated=E3=80=91=2020141127?= =?UTF-8?q?=20dupeGuru--Find=20And=20Remove=20Duplicate=20Files=20Instantl?= =?UTF-8?q?y=20From=20Hard=20Drive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完毕 “20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive” --- ...plicate Files Instantly From Hard Drive.md | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 translated/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md diff --git a/translated/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md b/translated/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md new file mode 100644 index 0000000000..17da6a9508 --- /dev/null +++ b/translated/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md @@ -0,0 +1,105 @@ +dupeGuru - 直接从硬盘中查找并移除重复文件 +================================================================================ + +### 简介 ### + +对我们来说,磁盘被装满是一个较大的困扰。无论我们如何小心谨慎,我们总可能将相同的文件复制到多个不同的地方,或者在不知情的情况下,重复下载了同一个文件。因此,迟早你会看到“磁盘已满”的错误提示,若此时我们确实需要一些磁盘空间来存储重要数据,以上情形无疑是最糟糕的。假如你确信自己的系统中有重复文件,那么 **dupeGuru** 可能会帮助到你。 + +dupeGuru 团队也开发了名为 **dupeGuru 音乐版** 的应用来移除重复的音乐文件,和名为 **dupeGuru 图片版** 的应用来移除重复的图片文件。 + +### 1. dupeGuru (标准版) ### + +对于那些不熟悉 [dupeGuru][1] 的人来说,它是一个免费,开源,跨平台的应用,其用途是在系统中查找和移除重复文件。它可以在 Linux, Windows, 和 Mac OS X 等平台下使用。通过使用一个快速的模糊匹配算法,它可以在几分钟内找到重复文件。同时,你还可以调整 dupeGuru 使它去精确查找特定文件类型的重复文件,以及从你想删除的文件中,消除特定的某些文件。它支持英语、 法语、 德语、 中文 (简体)、 捷克语、 意大利语、亚美尼亚语、 俄语、乌克兰语、巴西语和越南语。 + +#### 在 Ubuntu 14.10/14.04/13.10/13.04/12.04 中安装 dupeGuru #### + +dupeGuru 开发者已经构建了一个 Ubuntu PPA (Personal Package Archives)来简化安装过程。为了安装 dupeGuru,依次在终端中键入以下命令: + +``` +sudo apt-add-repository ppa:hsoft/ppa +sudo apt-get update +sudo apt-get install dupeguru-se +``` + +### 使用 ### + +使用非常简单,可从 Unity 面板或菜单中启动 dupeGuru 。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru_007.png) + +点击位于底部的 `+` 按钮来添加你想扫描的文件目录。点击 `扫描` 按钮开始查找重复文件。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru_008.png) + +一旦所选目录中含有重复文件,则它将在窗口中展示重复文件。正如你所看到的,在下面的截图中,我的下载目录中有一个重复文件。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Results_009.png) + +现在,你可以决定下一步如何操作。你可以删除这个重复的文件,或者对它进行重命名,抑或是 复制/移动 这个文件到另一个位置。为此,选定该重复文件,或 在菜单栏中选定写有“**仅显示重复**”选项 ,如果你选择了“**仅显示重复**”选项,则只有重复文件在窗口中可见,这样你便可以轻易地选择并删除这些文件。点击“操作”下拉菜单,最后选择你将执行的操作。在这里,我只想删除重复文件,所以我选择了“移动标记文件到垃圾箱”这个选项。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Menu_010.png) + +接着,点击“继续”选项来移除重复文件。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Deletion-Options_011.png) + +### 2. dupeGuru 音乐版 ### + +[dupeGuru 音乐版][2] 或 简称 dupeGuru ME ,它的功能与 dupeGuru 类似。它拥有 dupeGuru 的所有功能,但它包含更多的信息列 (如比特率,持续时间,标签等)和更多的扫描类型(如带有字段的文件名,标签以及音频内容)。同 dupeGuru 一样, dupeGuru ME 也运行在 Linux, Windows, 和 Mac OS X 中。 + +它支持众多的格式,诸如 MP3, WMA, AAC (iTunes 格式), OGG, FLAC, 即失真率较少的 AAC 和 WMA 格式等。 + +#### 在 Ubuntu 14.10/14.04/13.10/13.04/12.04 中安装 dupeGuru ME #### + +现在,我们不必再添加任何 PPA,因为在前面的步骤中,我们已经进行了添加。所以在终端中键入以下命令来安装它: + +``` +sudo apt-get install dupeguru-me +``` + +### 使用 ### + +你可以从 Unity 面板或菜单中启动它。dupeGuru ME 的使用方法,操作界面和外观与正常的 dupeGuru 类似。添加你想扫描的目录并选择你想执行的操作。重复的音乐文件就会被删除。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Music-Edition-Results_012.png) + +### 3. dupeGuru 图片版 ### + +[dupeGuru 图片版][3],或简称为 duepGuru PE,是一个在你的电脑中查找重复图片的工具。它与 dupeGuru 类似,但独具匹配重复图片的功能。dupeGuru PE 可运行在 Linux, Windows, 和 Mac OS X 中。 + +dupeGuru PE 支持 JPG, PNG, TIFF, GIF 和 BMP 等图片格式。所有的这些格式可以被同时比较。Mac OS X 版的 dupeGuru PE 还支持 PSD 和 RAW (CR2 和 NEF) 格式。 + +#### 在 Ubuntu 14.10/14.04/13.10/13.04/12.04 中安装 dupeGuru PE #### + +由于我们已经添加了 PPA, 我们也不必为 dupeGuru PE 添加 PPA。只需运行如下命令来安装它。 + +``` +sudo apt-get install dupeguru-pe +``` + +#### 使用 #### + +就使用方法,操作界面和外观而言,它与 dupeGuru ,dupeGuru ME 类似。我就纳闷为什么开发者为不同的类别开发了不同的版本。我想如果开发一个结合以上三个版本功能的应用,或许会更好。 + +启动它,添加你想扫描的目录,并选择你想执行的操作。就这样,你的重复文件将消失。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Picture-Edition-Results_014.png) + +如若因为任何的安全问题而不能移除某些重复文件,请记下这些文件的位置,通过终端或文件管理器来手动删除它们。 + +欢呼吧! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/dupeguru-find-remove-duplicate-files-instantly-hard-drive/ + +作者:[SK][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:http://www.hardcoded.net/dupeguru/ +[2]:http://www.hardcoded.net/dupeguru_me/ +[3]:http://www.hardcoded.net/dupeguru_pe/ From c2d349c526fb7937b23c78f2cd217f4c5b4384a9 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 30 Jan 2015 08:12:32 +0800 Subject: [PATCH 063/104] PUB:20141203 Docker--Present and Future MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @disylee 这篇是挺难的,我校对也花了一晚上呢,辛苦你啦~ --- .../20141203 Docker--Present and Future.md | 158 ++++++++++++++++ .../20141203 Docker--Present and Future.md | 168 ------------------ 2 files changed, 158 insertions(+), 168 deletions(-) create mode 100644 published/20141203 Docker--Present and Future.md delete mode 100644 translated/talk/20141203 Docker--Present and Future.md diff --git a/published/20141203 Docker--Present and Future.md b/published/20141203 Docker--Present and Future.md new file mode 100644 index 0000000000..bdec540363 --- /dev/null +++ b/published/20141203 Docker--Present and Future.md @@ -0,0 +1,158 @@ +Docker 的现状与未来 +================================================================================ + +### Docker - 迄今为止发生的那些事情 ### + +Docker 是一个专为 Linux 容器而设计的工具集,用于‘构建、交付和运行’分布式应用。它最初是 DotCloud 的一个开源项目,于2013年3月发布。这个项目越来越受欢迎,以至于 DotCloud 公司都更名为 Docker 公司(并最终[出售了原有的 PaaS 业务][1])。[Docker 1.0][2]是在2014年6月发布的,而且延续了之前每月更新一个版本的传统。 + +Docker 1.0版本的发布标志着 Docker 公司认为该平台已经充分成熟,足以用于生产环境中(由该公司与合作伙伴提供付费支持选择)。每个月发布的更新表明该项目正在迅速发展,比如增添一些新特性、解决一些他们发现的问题。该项目已经成功地分离了‘运行’和‘交付’两件事,所以来自任何版本的 Docker 镜像源都可以与其它版本共同使用(具备向前和向后兼容的特性),这为 Docker 应对快速变化提供了稳定的保障。 + +Docker 之所以能够成为最受欢迎的开源项目之一可能会被很多人看做是炒作,但是也是由其坚实的基础所决定的。Docker 的影响力已经得到整个行业许多大企业的支持,包括亚马逊, Canonical 公司, CenturyLink, 谷歌, IBM, 微软, New Relic, Pivotal, 红帽和 VMware。这使得只要有 Linux 的地方,Docker 就可以无处不在。除了这些鼎鼎有名的大公司以外,许多初创公司也在围绕着 Docker 发展,或者改变他们的发展方向来与 Docker 更好地结合起来。这些合作伙伴们(无论大或小)都将帮助推动 Docker 核心项目及其周边生态环境的快速发展。 + +### Docker 技术简要综述 ### + +Docker 利用 Linux 的一些内核机制例如 [cGroups][3]、命名空间和 [SElinux][4] 来实现容器之间的隔离。起初 Docker 只是 [LXC][5] 容器管理器子系统的前端,但是在 0.9 版本中引入了 [libcontainer][6],这是一个原生的 go 语言库,提供了用户空间和内核之间的接口。 + +容器是基于 [AUFS][7] 这样的联合文件系统的,它允许跨多个容器共享组件,如操作系统镜像和已安装的相关库。这种文件系统的分层方法也被 [Dockerfile][8] 的 DevOps 工具所利用,这些工具能够缓存成功完成的操作。这就省下了安装操作系统和相关应用程序依赖包的时间,极大地加速测试周期。另外,在容器之间的共享库也能够减少内存的占用。 + +一个容器是从一个镜像开始运行的,它可以来自本地创建,本地缓存,或者从一个注册库(registry)下载。Docker 公司运营的 [Docker Hub 公有注册库][9],为各种操作系统、中间件和数据库提供了官方仓库存储。各个组织和个人都可以在 docker Hub 上发布的镜像的公有库,也可以注册成私有仓库。由于上传的镜像可以包含几乎任何内容,所以 Docker 提供了一种自动构建工具(以往称为“可信构建”),镜像可以从一种称之为 Dockerfile 的镜像内容清单构建而成。 + +### 容器 vs. 虚拟机 ### + +容器会比虚拟机更高效,因为它们能够分享一个内核和分享应用程序库。相比虚拟机系统,这也将使得 Docker 使用的内存更小,即便虚拟机利用了内存超量使用的技术。部署容器时共享底层的镜像层也可以减少存储占用。IBM 的 Boden Russel 已经做了一些[基准测试][10]来说明两者之间的不同。 + +相比虚拟机系统,容器具有较低系统开销的优势,所以在容器中,应用程序的运行效率将会等效于在同样的应用程序在虚拟机中运行,甚至效果更佳。IBM 的一个研究团队已经发表了一本名为[虚拟机与 Linux 容器的性能比较]的文章[11]。 + +容器只是在隔离特性上要比虚拟机逊色。虚拟机可以利用如 Intel 的 VT-d 和 VT-x 技术的 ring-1 [硬件隔离][12]技术。这种隔离可以防止虚拟机突破和彼此交互。而容器至今还没有任何形式的硬件隔离,这使它容易受到攻击。一个称为 [Shocker][13] 的概念攻击验证表明,在 Docker 1.0 之前的版本是存在这种脆弱性的。尽管 Docker 1.0 修复了许多由 Shocker 漏洞带来的较为严重的问题,Docker 的 CTO Solomon Hykes 仍然[说][14],“当我们可以放心宣称 Docker 的开箱即用是安全的,即便是不可信的 uid0 程序(超级用户权限程序),我们将会很明确地告诉大家。”Hykes 的声明承认,其漏洞及相关的风险依旧存在,所以在容器成为受信任的工具之前将有更多的工作要做。 + +对于许多用户案例而言,在容器和虚拟机之间二者选择其一是种错误的二分法。Docker 同样可以在虚拟机中工作的很好,这让它可以用在现有的虚拟基础措施、私有云或者公有云中。同样也可以在容器里跑虚拟机,这也类似于谷歌在其云平台的使用方式。像 IaaS 服务这样普遍可用的基础设施,能够即时提供所需的虚拟机,可以预期容器与虚拟机一起使用的情景将会在数年后出现。容器管理和虚拟机技术也有可能被集成到一起提供一个两全其美的方案;这样,一个硬件信任锚微虚拟化所支撑的 libcontainer 容器,可与前端 Docker 工具链和生态系统整合,而使用提供更好隔离性的不同后端。微虚拟化(例如 Bromium 的 [vSentry][15] 和 VMware 的 [Project Fargo][16])已经用于在桌面环境中以提供基于硬件的应用程序隔离,所以类似的方法也可以用于 libcontainer,作为 Linux内核中的容器机制的替代技术。 + +### ‘容器化’ 的应用程序 ### + +几乎所有 Linux 应用程序都可以在 Docker 容器中运行,并没有编程语言或框架的限制。唯一的实际限制是以操作系统的角度来允许容器做什么。即使如此,也可以在特权模式下运行容器,从而大大减少了限制(与之对应的是容器中的应用程序的风险增加,可能导致损坏主机操作系统)。 + +容器都是从镜像开始运行的,而镜像也可以从运行中的容器获取。本质上说,有两种方法可以将应用程序放到容器中,分别是手动构建和 Dockerfile。 + +#### 手动构建 #### + +手动构建从启动一个基础的操作系统镜像开始,然后在交互式终端中用你所选的 Linux 提供的包管理器安装应用程序及其依赖项。Zef Hemel 在‘[使用 Linux 容器来支持便携式应用程序部署][17]’的文章中讲述了他部署的过程。一旦应用程序被安装之后,容器就可以被推送至注册库(例如Docker Hub)或者导出为一个tar文件。 + +#### Dockerfile #### + +Dockerfile 是一个用于构建 Docker 容器的脚本化系统。每一个 Dockerfile 定义了开始的基础镜像,以及一系列在容器中运行的命令或者一些被添加到容器中的文件。Dockerfile 也可以指定对外的端口和当前工作目录,以及容器启动时默认执行的命令。用 Dockerfile 构建的容器可以像手工构建的镜像一样推送或导出。Dockerfile 也可以用于 Docker Hub 的自动构建系统,即在 Docker 公司的控制下从头构建,并且该镜像的源代码是任何需要使用它的人可见的。 + +#### 单进程? #### + +无论镜像是手动构建还是通过 Dockerfile 构建,有一个要考虑的关键因素是当容器启动时仅启动一个进程。对于一个单一用途的容器,例如运行一个应用服务器,运行一个单一的进程不是一个问题(有些关于容器应该只有一个单独的进程的争议)。对于一些容器需要启动多个进程的情况,必须先启动 [supervisor][18] 进程,才能生成其它内部所需的进程。由于容器内没有初始化系统,所以任何依赖于 systemd、upstart 或类似初始化系统的东西不修改是无法工作的。 + +### 容器和微服务 ### + +全面介绍使用微服务结构体系的原理和好处已经超出了这篇文章的范畴(在 [InfoQ eMag: Microservices][19] 有全面阐述)。然而容器是绑定和部署微服务实例的捷径。 + +大规模微服务部署的多数案例都是部署在虚拟机上,容器只是用于较小规模的部署上。容器具有共享操作系统和公用库的的内存和硬盘存储的能力,这也意味着它可以非常有效的并行部署多个版本的服务。 + +### 连接容器 ### + +一些小的应用程序适合放在单独的容器中,但在许多案例中应用程序需要分布在多个容器中。Docker 的成功包括催生了一连串新的应用程序组合工具、编制工具及平台作为服务(PaaS)的实现。在这些努力的背后,是希望简化从一组相互连接的容器来创建应用的过程。很多工具也在扩展、容错、性能管理以及对已部署资产进行版本控制方面提供了帮助。 + +#### 连通性 #### + +Docker 的网络功能是相当原始的。在同一主机,容器内的服务可以互相访问,而且 Docker 也可以通过端口映射到主机操作系统,使服务可以通过网络访问。官方支持的提供连接能力的库叫做 [libchan][20],这是一个提供给 Go 语言的网络服务库,类似于[channels][21]。在 libchan 找到进入应用的方法之前,第三方应用仍然有很大空间可提供配套的网络服务。例如,[Flocker][22] 已经采取了基于代理的方法使服务实现跨主机(以及底层存储)的移植。 + +#### 合成 #### + +Docker 本身拥有把容器连接在一起的机制,与元数据相关的依赖项可以被传递到相依赖的容器中,并用于环境变量和主机入口。如 [Fig][23] 和 [geard][24] 这样的应用合成工具可以在单一文件中展示出这种依赖关系图,这样多个容器就可以汇聚成一个连贯的系统。CenturyLink 公司的 [Panamax][25] 合成工具类似 Fig 和 geard 的底层实现方法,但新增了一些基于 web 的用户接口,并直接与 GitHub 相结合,以便于应用程序分享。 + +#### 编制 #### + +像 [Decking][26]、New Relic 公司的 [Centurion][27] 和谷歌公司的 [Kubernetes][28] 这样的编制系统都是旨在协助容器的部署和管理其生命周期系统。也有许多 [Apache Mesos][30] (特别是 [Marathon(马拉松式)持续运行很久的框架])的案例(例如[Mesosphere][29])已经被用于配合 Docker 一起使用。通过为应用程序与底层基础架构之间(例如传递 CPU 核数和内存的需求)提供一个抽象的模型,编制工具提供了两者的解耦,简化了应用程序开发和数据中心操作。有很多各种各样的编制系统,因为许多来自内部系统的以前开发的用于大规模容器部署的工具浮现出来了;如 Kubernetes 是基于谷歌的 [Omega][32] 系统的,[Omega][32] 是用于管理遍布谷歌云环境中容器的系统。 + +虽然从某种程度上来说合成工具和编制工具的功能存在重叠,但这也是它们之间互补的一种方式。例如 Fig 可以被用于描述容器间如何实现功能交互,而 Kubernetes pods(容器组)可用于提供监控和扩展。 + +#### 平台(即服务)#### + +有一些 Docker 原生的 PaaS 服务实现,例如 [Deis][33] 和 [Flynn][34] 已经显现出 Linux 容器在开发上的的灵活性(而不是那些“自以为是”的给出一套语言和框架)。其它平台,例如 CloudFoundry、OpenShift 和 Apcera Continuum 都已经采取将 Docker 基础功能融入其现有的系统的技术路线,这样基于 Docker 镜像(或者基于 Dockerfile)的应用程序也可以与之前用支持的语言和框架的开发的应用一同部署和管理。 + +### 所有的云 ### + +由于 Docker 能够运行在任何正常更新内核的 Linux 虚拟机中,它几乎可以用在所有提供 IaaS 服务的云上。大多数的主流云厂商已经宣布提供对 Docker 及其生态系统的支持。 + +亚马逊已经把 Docker 引入它们的 Elastic Beanstalk 系统(这是在底层 IaaS 上的一个编制系统)。谷歌使 Docker 成为了“可管理的 VM”,它提供了GAE PaaS 和GCE IaaS 之间的中转站。微软和 IBM 也都已经宣布了基于 Kubernetes 的服务,这样可以在它们的云上部署和管理多容器应用程序。 + +为了给现有种类繁多的后端提供可用的一致接口,Docker 团队已经引进 [libswarm][35], 它可以集成于众多的云和资源管理系统。Libswarm 所阐明的目标之一是“通过切换服务来源避免被特定供应商套牢”。这是通过呈现一组一致的服务(与API相关联的)来完成的,该服务会通过特定的后端服务所实现。例如 Docker 服务器将支持本地 Docker 命令行工具的 Docker 远程 API 调用,这样就可以管理一组服务供应商的容器了。 + +基于 Docker 的新服务类型仍在起步阶段。总部位于伦敦的 Orchard 实验室提供了 Docker 的托管服务,但是 Docker 公司表示,收购 Orchard 后,其相关服务不会置于优先位置。Docker 公司也出售了之前 DotCloud 的PaaS 业务给 cloudControl。基于更早的容器管理系统的服务例如 [OpenVZ][36] 已经司空见惯了,所以在一定程度上 Docker 需要向主机托管商们证明其价值。 + +### Docker 及其发行版 ### + +Docker 已经成为大多数 Linux 发行版例如 Ubuntu、Red Hat 企业版(RHEL)和 CentOS 的一个标准功能。遗憾的是这些发行版的步调和 Docker 项目并不一致,所以在发布版中找到的版本总是远远落后于最新版本。例如 Ubuntu 14.04 版本中的版本是 Docker 0.9.1,而当 Ubuntu 升级至 14.04.1 时 Docker 版本并没有随之升级(此时 Docker 已经升至 1.1.2 版本)。在发行版的软件仓库中还有一个名字空间的冲突,因为 “Docker” 也是 KDE 系统托盘的名字;所以在 Ubuntu 14.04 版本中相关安装包的名字和命令行工具都是使用“Docker.io”的名字。 + +在企业级 Linux 的世界中,情况也并没有因此而不同。CentOS 7 中的 Docker 版本是 0.11.1,这是 Docker 公司宣布准备发行 Docker 1.0 产品版本之前的开发版。Linux 发行版用户如果希望使用最新版本以保障其稳定、性能和安全,那么最好地按照 Docker 的[安装说明][37]进行,使用 Docker 公司的所提供的软件库而不是采用发行版的。 + +Docker 的到来也催生了新的 Linux 发行版,如 [CoreOS][38] 和红帽的 [Project Atomic][39],它们被设计为能运行容器的最小环境。这些发布版相比传统的发行版,带着更新的内核及 Docker 版本,对内存的使用和硬盘占用率也更低。新发行版也配备了用于大型部署的新工具,例如 [fleet][40](一个分布式初始化系统)和[etcd][41](用于元数据管理)。这些发行版也有新的自我更新机制,以便可以使用最新的内核和 Docker。这也意味着使用 Docker 的影响之一是它抛开了对发行版和相关的包管理解决方案的关注,而对 Linux 内核(及使用它的 Docker 子系统)更加关注。 + +这些新发行版也许是运行 Docker 的最好方式,但是传统的发行版和它们的包管理器对容器来说仍然是非常重要的。Docker Hub 托管的官方镜像有 Debian、Ubuntu 和 CentOS,以及一个‘半官方’的 Fedora 镜像库。RHEL 镜像在Docker Hub 中不可用,因为它是 Red Hat 直接发布的。这意味着在 Docker Hub 的自动构建机制仅仅用于那些纯开源发行版下(并愿意信任那些源于 Docker 公司团队提供的基础镜像)。 + +Docker Hub 集成了如 Git Hub 和 Bitbucket 这样源代码控制系统来自动构建包管理器,用于管理构建过程中创建的构建规范(在Dockerfile中)和生成的镜像之间的复杂关系。构建过程的不确定结果并非是 Docker 的特定问题——而与软件包管理器如何工作有关。今天构建完成的是一个版本,明天构建的可能就是更新的版本,这就是为什么软件包管理器需要升级的原因。容器抽象(较少关注容器中的内容)以及容器扩展(因为轻量级资源利用率)有可能让这种不确定性成为 Docker 的痛点。 + +### Docker 的未来 ### + +Docker 公司对核心功能(libcontainer),跨服务管理(libswarm) 和容器间的信息传递(libchan)的发展上提出了明确的路线。与此同时,该公司已经表明愿意收购 Orchard 实验室,将其纳入自身生态系统。然而 Docker 不仅仅是 Docker 公司的,这个项目的贡献者也来自许多大牌贡献者,其中不乏像谷歌、IBM 和 Red Hat 这样的大公司。在仁慈独裁者、CTO Solomon Hykes 掌舵的形势下,为公司和项目明确了技术领导关系。在前18个月的项目中通过成果输出展现了其快速行动的能力,而且这种趋势并没有减弱的迹象。 + +许多投资者正在寻找10年前 VMware 公司的 ESX/vSphere 平台的特征矩阵,并试图找出虚拟机的普及而带动的企业预期和当前 Docker 生态系统两者的距离(和机会)。目前 Docker 生态系统正缺乏类似网络、存储和(对于容器的内容的)细粒度版本管理,这些都为初创企业和创业者提供了机会。 + +随着时间的推移,在虚拟机和容器(Docker 的“运行”部分)之间的区别将变得没那么重要了,而关注点将会转移到“构建”和“交付”方面。这些变化将会使“Docker发生什么?”变得不如“Docker将会给IT产业带来什么?”那么重要了。 + + +-------------------------------------------------------------------------------- + +via: http://www.infoq.com/articles/docker-future + +作者:[Chris Swan][a] +译者:[disylee](https://github.com/disylee) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoq.com/author/Chris-Swan +[1]:http://blog.dotcloud.com/dotcloud-paas-joins-cloudcontrol +[2]:http://www.infoq.com/news/2014/06/docker_1.0 +[3]:https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt +[4]:http://selinuxproject.org/page/Main_Page +[5]:https://linuxcontainers.org/ +[6]:http://blog.docker.com/2014/03/docker-0-9-introducing-execution-drivers-and-libcontainer/ +[7]:http://aufs.sourceforge.net/aufs.html +[8]:https://docs.docker.com/reference/builder/ +[9]:https://registry.hub.docker.com/ +[10]:http://bodenr.blogspot.co.uk/2014/05/kvm-and-docker-lxc-benchmarking-with.html?m=1 +[11]:http://domino.research.ibm.com/library/cyberdig.nsf/papers/0929052195DD819C85257D2300681E7B/$File/rc25482.pdf +[12]:https://en.wikipedia.org/wiki/X86_virtualization#Hardware-assisted_virtualization +[13]:http://stealth.openwall.net/xSports/shocker.c +[14]:https://news.ycombinator.com/item?id=7910117 +[15]:http://www.bromium.com/products/vsentry.html +[16]:http://cto.vmware.com/vmware-docker-better-together/ +[17]:http://www.infoq.com/articles/docker-containers +[18]:http://docs.docker.com/articles/using_supervisord/ +[19]:http://www.infoq.com/minibooks/emag-microservices +[20]:https://github.com/docker/libchan +[21]:https://gobyexample.com/channels +[22]:http://www.infoq.com/news/2014/08/clusterhq-launch-flocker +[23]:http://www.fig.sh/ +[24]:http://openshift.github.io/geard/ +[25]:http://panamax.io/ +[26]:http://decking.io/ +[27]:https://github.com/newrelic/centurion +[28]:https://github.com/GoogleCloudPlatform/kubernetes +[29]:https://mesosphere.io/2013/09/26/docker-on-mesos/ +[30]:http://mesos.apache.org/ +[31]:https://github.com/mesosphere/marathon +[32]:http://static.googleusercontent.com/media/research.google.com/en/us/pubs/archive/41684.pdf +[33]:http://deis.io/ +[34]:https://flynn.io/ +[35]:https://github.com/docker/libswarm +[36]:http://openvz.org/Main_Page +[37]:https://docs.docker.com/installation/#installation +[38]:https://coreos.com/ +[39]:http://www.projectatomic.io/ +[40]:https://github.com/coreos/fleet +[41]:https://github.com/coreos/etcd diff --git a/translated/talk/20141203 Docker--Present and Future.md b/translated/talk/20141203 Docker--Present and Future.md deleted file mode 100644 index da2b1b7b48..0000000000 --- a/translated/talk/20141203 Docker--Present and Future.md +++ /dev/null @@ -1,168 +0,0 @@ -Docker的现状与未来 -================================================================================ - -### Docker - 故事渊源流长 ### - -Docker是一个专为Linux容器而设计的工具集,用于‘构建,交付和运行’分布式应用。它最初是通过DotCloud作为一个开源项目在2013年3月的时候发布的。这个项目越来越受欢迎,这使得DotCloud更名为Docker公司(并最终 [出售了原有的PaaS业务][1]).[Docker 1.0][2]是在2014年6月发布的,而且延续了之前每月更新一个版本的习惯。 - - -1.0版本的发布标志着Docker公司认为这个平台的充分成熟已经足以用于生产环境中(由本公司与合作伙伴提供付费支持选项).每个月发布的更新显示,该项目正在迅速发展,增添一些新特性、解决一些他们发现的问题。然而该项目已经成功地从‘运行’和‘交付’实现分离,所以任何版本的Docker镜像源都可以与其它版本共同使用(具备向前和向后兼容的特性),这为Docker使用的快速变化提供了稳定的保障。 - -Docker之所以能够成为最受欢迎的开源项目之一除了很多人会认为是的炒作成分,也是由坚实的物质基础奠定的。Docker的影响力已经得到整个行业许多品牌的支持,包括亚马逊, Canonical公司, 世纪互联, 谷歌, IBM, 微软, New Relic, Pivotal, 红帽和VMware. 这使只要Linux可使用的地方,Docker的使用便无处不在。除了这些鼎鼎有名的大公司以外,许多初创公司也在围绕着Docker在成长,或者改变他们的发展方向来与Docker更好地结合起来。这些合作关系(无论大于小)都将帮助推动Docker核心项目及其周边生态环境的快速发展。 - - -### Docker技术的简要综述 ### - -Docker利用Linux的一些内核工具例如[cGroups][3],命名空间和[SElinux][4]来实现容器之间的隔离。起初Docker只是[LXC][5]容器管理器子系统的前端,但是在0.9版本中引入了[libcontainer][6],这是原生go语言库用于提供用户空间和内核之间的接口。 - -容器位于联合文件系统的顶部,例如[AUFS][7],它允许跨多个容器共享例如操作系统镜和安装相关库的组件。在文件系统中的分层方法也利用[ Dockerfile ] [8]中的DevOps工具,这些工具能够成功地完成高速缓存的操作。利用等待时间来安装操作系统和相关应用程序依赖包将会极大地加速测试周期。容器之间的共享库也能够减少内存的占用。 - -一个容器是从一个镜像开始运行的,它可以本地创建,本地缓存,或者通过注册表来下载。Docker公司经营的 [Docker 公有注册库][9],这为各种操作系统、中间件和数据库提供了主机官方仓库。组织和个人可以在docker公司的为镜像创建公有库,并且也有举办私人仓库的订阅服务。由于上传的镜像会包含几乎所有Docker提供的自动化构建工具(以往称为“受信任的构建”),它的镜像是从Dockerfile创建的,而Dockerfile是镜像内容的清单。 - -### 容器 vs 虚拟机 ### - -容器会比虚拟机更高效,因为它们能够分享一个内核和分享共享应用程序库。相比虚拟机系统,这也将使得Docker使用的内存空间很小,即使虚拟机利用了内存超量使用的技术。部署容器时共享底层的镜像层也可以减少内存的占用。IBM的Boden Russel已经做了一些[基准测试][10]说明两者的不同。 - -相比虚拟机系统,容器呈现出较低系统开销的优势,所以在容器中,应用程序的运行效率将会等效于在同样的应用程序在虚拟机中运行甚至效果更佳。IBM的一个研究团队已经发表了一本名为[虚拟机与Linux容器的性能比较]的文章[11]. - - -容器在隔离特性上要比虚拟机逊色。虚拟机可以利用ring-1[硬件隔离][12]例如Intel的VT-d和VT-x技术。这种隔离可以防止虚拟机爆发和彼此交互。而容器至今还没有任何形式的硬件隔离,这使它容易受到攻击。一个命名为[Shocker][13]的概念攻击验证表明,在之前的1.0版本中Docker是存在这种脆弱性的。尽管Docker1.0修复了许多由于Shocker漏洞引发较为的严重问题,Docker的CTO Solomon Hykes仍然[表态][14],“当我们自然而然地说Docker的开箱即用是安全的,即便包含了不收信任的uid0程序,我们将会很明确地这样表述。”Hykes的声明承认,其它的漏洞及相关的风险依旧存在,所以在容器成为受信任的工具之前将有更多的工作需要被完成。 - -对于许多用户案例而言,在容器和虚拟机两者之间选择一种是一种错误的二分法。Docker同样可以在虚拟机中很好工作,它可以被用于现有的虚拟基础措施、私有云或者公有云。同样也可以在容器里跑虚拟机,这也是谷歌使用云平台的一部分。给予一个广泛可利用的基础设施例如IaaS服务,可以为虚拟机提供合理的预期需求,这个合理的预期即容器与虚拟机一起使用的情景将会在数年后出现。容器管理和虚拟机技术有可能被集成到一起提供一个两全其美的方案;所以,位于libcontainer 容器后面的硬件信任锚微虚拟化实施例,可与前端 Docker 工具链和生态系统整合,而不同于后端使用的是能够提供更好绝缘性。微虚拟化(例如Bromium的[vSentry][15]和VMware的 [Project Fargo][16])已经在桌面环境中使用以提供应用程序之间基于硬件的隔离,所以类似的方法可以用于连接libcontainer代替Linux内核中的容器机制。 - -### ‘Dockerizing’ 应用程序 ### - -几乎所有Linux应用程序都可以在Docker容器中运行。它们不受任何语言的选择或框架的限制。唯一在实践中受限的是从操作系统的角度来允许容器做什么。即使如此,bar可以在特权模式下通过运行容器,从而大大减少了控制(并相应地增加了容器中的应用程序,这将会导致损坏主机操作系统存在的风险)。 - - -容器都是从镜像开始运行的,而镜像也可以从运行中的容器获取。通常使用2中方法从容器中获取应用程序,分别是手动获取和Dockerfile.. - -#### 手动构建 #### - -手动构建首先通过基础操作系统镜像启动一个基本操作。交互式的终端可以安装应用程序和用于包管理的依赖项来选择所需要的Linux风格。Zef Hemel在‘[使用Linux容器来支持便携式应用程序部署][17]’的文章中讲述了他部署的过程。一旦应用程序被安装之后,容器可以被推送至注册中心(例如Docker Hub)或者导出一个tar文件。 - -#### Dockerfile #### - -Dockerfile是一个用于构建Docker容器的脚本化系统。每一个Dockerfile定义了开始的基础镜像,从一系列的命令在容器中运行或者一些列的文件被添加到容器中。当容器启动时默认命令会在启动时被执行,Dockerfile也可以指定对外的端口和当前工作目录。容器类似手工构建一样可以通过可推送或导出的Dockerfiles来构建。Dockerfiles也可以被用于Docker Hub的自动构建系统,使用的镜像受Docker公司的控制并且该镜像源代码是任何人可视的。 - - -####仅仅一个进程? #### - -无论镜像是手动构建还是通过Dockerfile构建,有一个关键的考虑因素是当容器启动时,只有一个进程进程被启动。对于一个容器一对一服务的目的,例如运行一个应用服务器,运行一个单一的进程不是一个问题(有些关于容器应该只有一个单独的进程的争议)。对于一些容器需要启动多个进程的情况,必须先启动 [supervisor][18]进程,才能生成其它内部所需的进程。 - -### 容器和微服务 ### - -一个完整的关于使用微服务结构体系的原理和好处已经远远超出了这篇文章(并已经覆盖了[InfoQ eMag: Microservices][19])的范围).然而容器是微服务捆绑和部署实例的捷径。 - -尽管大多数实际案例表明大量的微服务目前还是大多数部署在虚拟机,容器相对拥有较小的部署机会。容器具备位操作系统共享内存和硬盘占用量的能力,库常见的应用程序代码也意味着并排部署多个办法的服务是非常高效的。 - -### 连接容器 ### - -一些小的应用程序适合放在单独的容器中,但在许多案例中应用程序将遍布多个容器。Docker的成功包括催生了一连串的新应用程序组合工具、业务流程工具和实现平台作为服务(PaaS)过程。许多工具还帮助实现缩放、容错、业务管理以及对已部署资产进行版本控制。 - - -#### 连接 #### - -Docker的网络功能是相当原始的。在同一主机,容器内的服务和一互相访问,而且Docker也可以通过端口映射到主机操作系统使服务可以通过网络服务被调用。官方的赞助方式是连接到[libchan][20],这是一个提供给Go语言的网络服务库,类似于[channels][21]。直至libcan找到方法进入应用程序,第三方应用仍然有很大空间可提供配套的网络服务。例如,[Flocker][22]已经采取了基于代理的方法使服务实现跨主机(以及底层存储)移植。 - -#### 合成 #### - -Docker本身拥有把容器连接在一起的机制,与元数据相关的依赖项可以被传递到相依赖的容器并用于环境变量和主机入口的消耗。应用合成工具例如[Fig][23]和[geard][24]展示出其依赖关系图在一个独立的文件中,于是多个容器可以汇聚成一个连贯的系统。世纪互联公司的[Panamax][25]合成工具类似底层Fig和 geard的方法,但新增了一些基于web的用户接口,并直接与GitHub相结合,以便于应用程序可以直接被共享。 - -#### 业务流程 #### - -业务流程系统例如[Decking][26],New Relic公司的[Centurion][27]和谷歌公司的[Kubernetes][28]都是旨在帮助部署容器和管理其生命周期系统。也有无数的例子(例如[Apache Mesos][30](特别是[Marathon(马拉松式)持续运行很久的框架] 的 [Mesosphere][29]正在与Docker一起使用。通过为应用程序(例如传递CPU核数和内存的需求)与底层基础架构之间提供一个抽象的模型,业务流程工具提供了解耦,旨在简化应用程序开发和数据中心操作。还有各种各样的业务流程系统,因为人们已经淘汰了以前开发的内部系统,取而代之的是大量容器部署的管理系统;例如Kubernetes是基于谷歌的[Omega][32]系统,这个系统用于管理谷歌区域内的容器。 - -虽然从某种程度上来说合成工具和业务流程工具的功能存在重叠,另外这也是它们之间互补的一种方式。例如Fig可以被用于描述容器间如何实现功能交互,而Kubernetes pods可能用于提供监控和缩放。 - - -#### 平台 (类似一个服务) #### - -大量的Docker已经实现本地PaaS安装部署,例如[Deis][33] 和 [Flynn][34]的出现并在现实中得到利用,Linux容器在很大程度上为开发人员提供了灵活性(而不是“固执己见”地给出一组语言和框架)。其它平台例如CloudFoundry, OpenShift 和 Apcera Continuum都已经采取Docker基础功能融入其现有的系统,这样基于Docker镜像(或者基于Dockerfile)的应用程序也可以用之前支持的语言和框架一起部署和管理。 - -### 支持所有的云 ### - -由于Docker能够在任何的Linux虚拟机中运行并合理地更新内核,它几乎可以为所有云提供IaaS服务。大多数的云厂商已经宣布对码头及其生态系统提供附加支持。 - -亚马逊已经把Docker引入它们的Elastic Beanstalk系统(这是在底层IaaS的一个业务流程系统)。谷歌已经启用‘managed VMs'’,这是提供 -程序引擎PaaS和计算引擎IaaS之间的中转站。微软和IBM都已经宣布基于Kubernetes的服务,所以多容器应用程序可以在它们的云上被部署和管理。 - -为了给现有种类繁多的后端提供可用的一致接口,Docker团队已经引进[libswarm][35], 它能用于集成众多云和资源管理系统。Libswarm所阐明的目标之一是‘避免供应商通过交换任何服务锁定另一个’。这是通过呈现一组一致服务(与API相关联的)来完成的,该服务会附加执行特定的后端服务。例如装有Docker服务的服务器将对Docker命令行工具展示Docker远程API,这样容器就可以被托管在一些列的服务供应商。 - -基于Docker的新服务类型仍在起步阶段。总部位于伦敦的Orchard实验室提供了Docker的托管服务,但是Docker公司表示,收购后,Orchard的服务将不会是一个有优先事项。Docker公司也出售之前DotCloud的PaaS业务给cloudControl。基于就更早前的容器管理系统的服务例如[OpenVZ][36]已经司空见惯了,所以在一定程度上Docker需要向托管供应商证明其价值。 - -### Docker 及其发行版 ### - -Docker已经成为大多数Linux发行版例如Ubuntu,Red Hat企业版(RHEL)和CentOS的一个标准功能。遗憾的是发布是以不同的移动速度到Docker项目,所以在发布版中找到的版本总是远远落后于可用版本。例如Ubuntu 14.04版本是对应Docker 0.9.1版本发布的,但是并没有相应的版本更改点当Ubuntu升级至14.04.1(这个时候Docker已经升至1.1.2版本)。由于Docker也是一个KDE系统托盘,所以在官方库同样存在命名问题;所以在Ubuntu14.04版本中相关安装包的名字和命令行工具都是使用‘Docker.io’命名。 - -在企业版的Linux世界中,情况也并没有因此而不同。CentOS7伴随着Docker 0.11.1的到来,该发行版本即是之前Docker公司宣布准备发行Docker 1.0版本的准备版。Linux发行版用户希望最新版本可以承诺其稳定性,性能和安全性能够更完善,并且更好地结合[安装说明][37]和使用Docker公司的库托管而不是采取包括其分布的版本库。 - -Docker的到来催生了新的Linux发行版本例如[CoreOS][38]和红帽被用于设计为运行容器最小环境的[Project Atomic][39]。这些发布版相比传统的发布版伴随着更多新内核和Docker版本的特性。它们对内存的使用和硬盘占用率更小。新的发行也配备了新的工具用于大型部署例如[fleet][40],这是‘一个分布式init系统’和[etcd][41]是用于元数据管理。也有新机制用于更新发布版本身来使得内核和Docker可以被使用。这也意味着使用Docker的影响之一是它抛开分布版和相关的包管理解决方案的关注,使Linux内核(即Docker子系统正在使用)更加重要。 - -新的发布版将是运行Docker的最好方式,但是传统的发布版本和它们的包管理对容器来说仍然是非常重要的。Docker Hub托管的官方镜像有Debian,Ubuntu和CentOS。当然也有一个‘半官方’的库用于Fedora镜像。RHEL镜像在Docker Hub中不可用,因为是从Red Hat直接发布的。这意味着在Docker Hub的自动构建机制仅仅用于那些纯粹的开源发布版不(并愿意信任基于Docker公司团队所策划镜像的出处)。 - - -虽然Docker Hub与源代码控制系统相结合,例如Git Hub和Bitbucket在构建过程中用于自动创建包管理及生成规范之间的复杂关系(在Dockerfile中),并在构建过程中建立镜像。在构建过程中的非确定性结果并非是Docker具体的问题——这个是由于软件包如何管理工作的结果。在构建完成的当天将会给出一个版本,这个构建完成的另外一次将会得到最新版本,这就是为什么软件包管理需要升级措施。容器的抽象(较少关注一个容器的内容)以及容器的分散(因为轻量级资源利用率)是更有可能与Docker获取关联的痛点。 - -### Docker的未来 ### - -Docker公司对核心功能(libcontainer),跨服务管理(libswarm) 和容器间的信息传递(libchan)的发展提出了明确的路线。与此同时公司已经表明愿意利用自身生态系统和收购Orchard实验室。然而Docker相比Docker公司意味着更多,随着项目的壮大,越来越多对这个项目的 -大牌贡献者,其中不乏像谷歌、IBM和Red Hat这样的大公司。在仁慈独裁者CTO Solomon Hykes 掌舵的形势下,为公司和项目明确了技术领导的关系。在前18个月的项目中通过成果输出展现了快速行动的能力,而且这种趋势并没有减弱的迹象。 - -许多投资者正在寻找10年前VMware公司的ESX/vSphere平台的特征矩阵,并找出虚拟机的普及而驱动的企业预期和当前Docker生态系统两者的距离(和机会)。目前Docker生态系统正缺乏类似网络、存储和版本细粒度的管理(对容器的内容),这些都为初创企业和在职人员提供机会。 - -随着时间的推移,在虚拟机和容器(Docker的运行部分)之间的区别将变得不重要了,而关注点将会转移到‘构建’和‘交付’缓解。这些变化将会使‘Docker发生什么?’这个问题变得比‘Docker将会给IT产业带来什么?’更不重要了。 - - --------------------------------------------------------------------------------- - -via: http://www.infoq.com/articles/docker-future - -作者:[Chris Swan][a] -译者:[disylee](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.infoq.com/author/Chris-Swan -[1]:http://blog.dotcloud.com/dotcloud-paas-joins-cloudcontrol -[2]:http://www.infoq.com/news/2014/06/docker_1.0 -[3]:https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt -[4]:http://selinuxproject.org/page/Main_Page -[5]:https://linuxcontainers.org/ -[6]:http://blog.docker.com/2014/03/docker-0-9-introducing-execution-drivers-and-libcontainer/ -[7]:http://aufs.sourceforge.net/aufs.html -[8]:https://docs.docker.com/reference/builder/ -[9]:https://registry.hub.docker.com/ -[10]:http://bodenr.blogspot.co.uk/2014/05/kvm-and-docker-lxc-benchmarking-with.html?m=1 -[11]:http://domino.research.ibm.com/library/cyberdig.nsf/papers/0929052195DD819C85257D2300681E7B/$File/rc25482.pdf -[12]:https://en.wikipedia.org/wiki/X86_virtualization#Hardware-assisted_virtualization -[13]:http://stealth.openwall.net/xSports/shocker.c -[14]:https://news.ycombinator.com/item?id=7910117 -[15]:http://www.bromium.com/products/vsentry.html -[16]:http://cto.vmware.com/vmware-docker-better-together/ -[17]:http://www.infoq.com/articles/docker-containers -[18]:http://docs.docker.com/articles/using_supervisord/ -[19]:http://www.infoq.com/minibooks/emag-microservices -[20]:https://github.com/docker/libchan -[21]:https://gobyexample.com/channels -[22]:http://www.infoq.com/news/2014/08/clusterhq-launch-flocker -[23]:http://www.fig.sh/ -[24]:http://openshift.github.io/geard/ -[25]:http://panamax.io/ -[26]:http://decking.io/ -[27]:https://github.com/newrelic/centurion -[28]:https://github.com/GoogleCloudPlatform/kubernetes -[29]:https://mesosphere.io/2013/09/26/docker-on-mesos/ -[30]:http://mesos.apache.org/ -[31]:https://github.com/mesosphere/marathon -[32]:http://static.googleusercontent.com/media/research.google.com/en/us/pubs/archive/41684.pdf -[33]:http://deis.io/ -[34]:https://flynn.io/ -[35]:https://github.com/docker/libswarm -[36]:http://openvz.org/Main_Page -[37]:https://docs.docker.com/installation/#installation -[38]:https://coreos.com/ -[39]:http://www.projectatomic.io/ -[40]:https://github.com/coreos/fleet -[41]:https://github.com/coreos/etcd From 3db0238c24b2c60c9aaf011228d4f563a4249b90 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Fri, 30 Jan 2015 08:38:00 +0800 Subject: [PATCH 064/104] [bazz2 translating] How to Configure Chroot Environment in Ubuntu 14.04 --- ...0114 How to Configure Chroot Environment in Ubuntu 14.04.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md b/sources/tech/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md index 63acd23a67..540789d367 100644 --- a/sources/tech/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md +++ b/sources/tech/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md @@ -1,3 +1,4 @@ +[bazz2222222] How to Configure Chroot Environment in Ubuntu 14.04 ================================================================================ There are many instances when you may wish to isolate certain applications, user, or environments within a Linux system. Different operating systems have different methods of achieving isolation, and in Linux, a classic way is through a `chroot` environment. @@ -143,4 +144,4 @@ via: http://linoxide.com/ubuntu-how-to/configure-chroot-environment-ubuntu-14-04 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunp/ -[1]:https://launchpad.net/ubuntu/+archivemirrors \ No newline at end of file +[1]:https://launchpad.net/ubuntu/+archivemirrors From 0f47cdd6f304d3576e79b8725999d5f3ebf7f860 Mon Sep 17 00:00:00 2001 From: 2q1w2007 <2q1w2007@163.com> Date: Fri, 30 Jan 2015 13:57:52 +0800 Subject: [PATCH 065/104] =?UTF-8?q?20150130=20=E9=80=89=E9=A2=98=202015013?= =?UTF-8?q?0=20OpenJDK=207=20Vulnerabilities=20Closed=20in=20Ubuntu=2014.0?= =?UTF-8?q?4=20and=20Ubuntu=2014.10.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Closed in Ubuntu 14.04 and Ubuntu 14.10.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md diff --git a/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md b/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md new file mode 100644 index 0000000000..3b77b69017 --- /dev/null +++ b/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md @@ -0,0 +1,33 @@ +OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10 +---- +*Users have been advised to upgrade as soon as possible* + +##Canonical published details about a new OpenJDK 7 version has been pushed to the Ubuntu 14.04 LTS and Ubuntu 14.10 repositories. This update fixes a number of problems and various vulnerabilities. + +The Ubuntu maintainers have upgraded the OpenJDK packages in the repositories and numerous fixes have been implemented. This is an important update and it covers a few libraries. + +"Several vulnerabilities were discovered in the OpenJDK JRE related to information disclosure, data integrity and availability. An attacker could +exploit these to cause a denial of service or expose sensitive data over the network,” reads the security notice. + +Also, "a vulnerability was discovered in the OpenJDK JRE related to information disclosure and integrity. An attacker could exploit this to +expose sensitive data over the network." + +These are just a couple of the vulnerabilities identified and corrected by the developer and implemented by the maintainers/., and for a more detailed description of the problems, you can see Canonical's security notification. Users have been advised to upgrade their systems as soon as possible. + +The flaws can be fixed if you upgrade your system to the latest openjdk-7-related packages specific to each distribution. To apply the patch, users will have to run the Update Manager application. In general, a standard system update will make all the necessary changes. All Java-related applications will have to be restarted. + +-------------------------------------------------------------------------------- + +via:http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-14-04-and-Ubuntu-14-10-471605.shtmll + +本文发布时间:29 Jan 2015, 16:53 GMT + +作者:[Silviu Stahie][a] + +译者:[译者ID](https://github.com/译者ID) + +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie \ No newline at end of file From f5d8d4a52f166b69a99a8f1c87c6028dac32bae5 Mon Sep 17 00:00:00 2001 From: 2q1w2007 <2q1w2007@163.com> Date: Fri, 30 Jan 2015 14:04:33 +0800 Subject: [PATCH 066/104] =?UTF-8?q?20150130=20=E9=80=89=E9=A2=98=202015013?= =?UTF-8?q?0=20OpenJDK=207=20Vulnerabilities=20Closed=20in=20Ubuntu=2014.0?= =?UTF-8?q?4=20and=20Ubuntu=2014.10.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... as the Most Beautiful LibreOffice Ever.md | 38 +++++++++++++++++++ ...Closed in Ubuntu 14.04 and Ubuntu 14.10.md | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md diff --git a/sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md b/sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md new file mode 100644 index 0000000000..3718ee58a6 --- /dev/null +++ b/sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md @@ -0,0 +1,38 @@ +LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever +---- +*The developer has made a lot of UI improvements* + +![LibreOffice 4.4](http://i1-news.softpedia-static.com/images/news2/LibreOffice-4-4-Releases-As-the-Most-Beautiful-LibreOffice-Ever-471575-2.jpg) + +The Document Foundation has just announced that a new major update has been released for LibreOffice and it brings important UI improvements, enough for them to call this the most beautiful version ever. + +The Document Foundation doesn't usually make the UI the main focus of an update, but now the developers are saying that this is the most beautiful release made so far and that says a lot. Fortunately, this version is not just about interface fixes and there are plenty of other major improvements that should really provide a very good reason to get LibreOffice 4.4. + +LibreOffice has been gaining quite a lot of fans and users, and the past couple of years have been very successful. The office suite is implemented by default in most of the important Linux distributions out there and it was adopted by numerous administrations and companies across the world. LibreOffice is proving to be a difficult adversary for Microsoft's Office and each new version makes it even better. +LibreOffice 4.4 brings a lot of new features + +If we move aside all the improvements made to the interface, we're still left with a ton of fixes and changes. The Document Foundation takes its job very seriously and all upgrades really improve the users' experience tremendously. + +"LibreOffice 4.4 has got a lot of UX and design love, and in my opinion is the most beautiful ever. We have completed the dialog conversion, redesigned menu bars, context menus, toolbars, status bars and rulers to make them much more useful. The Sifr monochrome icon theme is extended and now the default on OS X. We also developed a new Color Selector, improved the Sidebar to integrate more smoothly with menus, and reworked many user interface details to follow today’s UX trends," [says Jan "Kendy" Holesovsky](1), a member of the Membership Committee and the leader of the design team. + +Some of the other improvements include much better support for OOXML file formats, the source code has been "groomed" and cleaned after a Coverity Scan analysis, digital signatures for exported PDF files, improved import filters for Microsoft Visio, Microsoft Publisher and AbiWord files, and Microsoft Works spreadsheets, and much more. + +For now, the PPA doesn't have the latest version, but that should change soon. For the time being, you can download the [LibreOffice 4.4](2) source packages from Softpedia, if you want to compile them yourself. + +-------------------------------------------------------------------------------- + +via:http://news.softpedia.com/news/LibreOffice-4-4-Releases-As-the-Most-Beautiful-LibreOffice-Ever-471575.shtml + +本文发布时间:29 Jan 2015, 14:16 GMT + +作者:[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://blog.documentfoundation.org/2015/01/29/libreoffice-4-4-the-most-beautiful-libreoffice-ever/ +[2]:http://linux.softpedia.com/get/Office/Office-Suites/LibreOffice-60713.shtml \ No newline at end of file diff --git a/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md b/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md index 3b77b69017..552f98e3f2 100644 --- a/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md +++ b/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md @@ -18,7 +18,7 @@ The flaws can be fixed if you upgrade your system to the latest openjdk-7-relate -------------------------------------------------------------------------------- -via:http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-14-04-and-Ubuntu-14-10-471605.shtmll +via:http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-14-04-and-Ubuntu-14-10-471605.shtml 本文发布时间:29 Jan 2015, 16:53 GMT From 8f67ae408eadcc3ef4fafd11d5e022930ecf0a38 Mon Sep 17 00:00:00 2001 From: 2q1w2007 <2q1w2007@163.com> Date: Fri, 30 Jan 2015 14:04:33 +0800 Subject: [PATCH 067/104] =?UTF-8?q?20150130=20=E9=80=89=E9=A2=98=202015013?= =?UTF-8?q?0=20OpenJDK=207=20Vulnerabilities=20Closed=20in=20Ubuntu=2014.0?= =?UTF-8?q?4=20and=20Ubuntu=2014.10.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... as the Most Beautiful LibreOffice Ever.md | 38 +++++++++++++++++++ ...Closed in Ubuntu 14.04 and Ubuntu 14.10.md | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md diff --git a/sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md b/sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md new file mode 100644 index 0000000000..ddcd650327 --- /dev/null +++ b/sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md @@ -0,0 +1,38 @@ +LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever +---- +*The developer has made a lot of UI improvements* + +![LibreOffice 4.4](http://i1-news.softpedia-static.com/images/news2/LibreOffice-4-4-Releases-As-the-Most-Beautiful-LibreOffice-Ever-471575-2.jpg) + +The Document Foundation has just announced that a new major update has been released for LibreOffice and it brings important UI improvements, enough for them to call this the most beautiful version ever. + +The Document Foundation doesn't usually make the UI the main focus of an update, but now the developers are saying that this is the most beautiful release made so far and that says a lot. Fortunately, this version is not just about interface fixes and there are plenty of other major improvements that should really provide a very good reason to get LibreOffice 4.4. + +LibreOffice has been gaining quite a lot of fans and users, and the past couple of years have been very successful. The office suite is implemented by default in most of the important Linux distributions out there and it was adopted by numerous administrations and companies across the world. LibreOffice is proving to be a difficult adversary for Microsoft's Office and each new version makes it even better. +LibreOffice 4.4 brings a lot of new features + +If we move aside all the improvements made to the interface, we're still left with a ton of fixes and changes. The Document Foundation takes its job very seriously and all upgrades really improve the users' experience tremendously. + +"LibreOffice 4.4 has got a lot of UX and design love, and in my opinion is the most beautiful ever. We have completed the dialog conversion, redesigned menu bars, context menus, toolbars, status bars and rulers to make them much more useful. The Sifr monochrome icon theme is extended and now the default on OS X. We also developed a new Color Selector, improved the Sidebar to integrate more smoothly with menus, and reworked many user interface details to follow today’s UX trends," [says Jan "Kendy" Holesovsky](1), a member of the Membership Committee and the leader of the design team. + +Some of the other improvements include much better support for OOXML file formats, the source code has been "groomed" and cleaned after a Coverity Scan analysis, digital signatures for exported PDF files, improved import filters for Microsoft Visio, Microsoft Publisher and AbiWord files, and Microsoft Works spreadsheets, and much more. + +For now, the PPA doesn't have the latest version, but that should change soon. For the time being, you can download the [LibreOffice 4.4](2) source packages from Softpedia, if you want to compile them yourself. + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/LibreOffice-4-4-Releases-As-the-Most-Beautiful-LibreOffice-Ever-471575.shtml + +本文发布时间:29 Jan 2015, 14:16 GMT + +作者:[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://blog.documentfoundation.org/2015/01/29/libreoffice-4-4-the-most-beautiful-libreoffice-ever/ +[2]:http://linux.softpedia.com/get/Office/Office-Suites/LibreOffice-60713.shtml \ No newline at end of file diff --git a/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md b/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md index 3b77b69017..a1652fbd04 100644 --- a/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md +++ b/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md @@ -18,7 +18,7 @@ The flaws can be fixed if you upgrade your system to the latest openjdk-7-relate -------------------------------------------------------------------------------- -via:http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-14-04-and-Ubuntu-14-10-471605.shtmll +via: http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-14-04-and-Ubuntu-14-10-471605.shtml 本文发布时间:29 Jan 2015, 16:53 GMT From 06afd512503fcd970c1988522d94ab2dbca144c7 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Fri, 30 Jan 2015 16:20:31 +0800 Subject: [PATCH 068/104] [translated] 20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md --- ... Your Linux OS X Unix Shell Environment.md | 334 +++++++++--------- 1 file changed, 166 insertions(+), 168 deletions(-) rename {sources => translated}/tech/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md (56%) diff --git a/sources/tech/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md b/translated/tech/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md similarity index 56% rename from sources/tech/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md rename to translated/tech/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md index 4f46e43dd7..2709602c87 100644 --- a/sources/tech/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md +++ b/translated/tech/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md @@ -1,45 +1,44 @@ -zpl1025 -A Shell Primer: Master Your Linux, OS X, Unix Shell Environment +Shell入门:掌握Linux,OS X,Unix的Shell环境 ================================================================================ -On a Linux or Unix-like systems each user and process runs in a specific environment. An environment includes variables, settings, aliases, functions and more. Following is a very brief introduction to some useful shell environment commands, including examples of how to use each command and setup your own environment to increase productivity in the command prompt. +在Linux或类Unix系统中,每个用户和进程都运行在一个特定环境中。这个环境包含了变量,设置,别名,函数以及更多的。下面是对Shell环境下一些常用命令的简单介绍,包括每个命令如何使用的例子,以及在命令行下设定你自己的环境来提高效率。 ![](http://s0.cyberciti.org/uploads/cms/2015/01/bash-shell-welcome-image.jpg) -### Finding out your current shell ### +### 找出你当前的shell ### -Type any one of the following command at the Terminal app: +在终端应用中输入下面命令中的任意一个: ps $$ ps -p $$ -OR +或者 echo "$0" -Sample outputs: +输出范例: -[![Fig.01: Finding out your shell name](http://s0.cyberciti.org/uploads/cms/2015/01/finding-your-shell-like-a-pro.jpg)][1] -Fig.01: Finding out your shell name +[![图1: Finding out your shell name](http://s0.cyberciti.org/uploads/cms/2015/01/finding-your-shell-like-a-pro.jpg)][1] +图1:找出当前的shell -### Finding out installed shells ### +### 找出所有已安装的shell ### -To find out the full path for installed shell type: +找到已安装shell的完整路径: type -a zsh type -a ksh type -a sh type -a bash -Sample outputs: +输出范例: [![Fig.02: Finding out your shell path](http://s0.cyberciti.org/uploads/cms/2015/01/finding-and-verifying-shell-path.jpg)][2] -Fig.02: Finding out your shell path +图2:找出shell的路径 -The /etc/shells file contains a list of the shells on the system. For each shell a single line should be present, consisting of the shell's path, relative to root. Type the following [cat command][3] to see shell database: +文件/etc/shells里包含了系统支持的shell列表。每一行代表一个shell,是相对根目录的完整路径。用这个[cat命令][3]来查看这些数据: cat /etc/shells -Sample outputs: +输出范例: # List of acceptable shells for chpass(1). # Ftpd will not allow users to connect who are not using @@ -53,47 +52,47 @@ Sample outputs: /bin/zsh /usr/local/bin/fish -### Changing your current shell temporarily ### +### 临时改变当前shell ### -Just type the shell name. In this example, I'm changing from bash to zsh: +只需要输入shell的名字。在下面的例子里,我从bash切换到了zsh: zsh -You just changed your shell temporarily to zsh. Also known as subshell. To exit from subshell/temporary shell, type the following command or hit CTRL-d: +这只是临时改变了系统shell。也叫做子shell。要从子/临时shell退出,输入下面的命令或者按下CTRL-D: exit -### Finding out subshell level/temporary shell nesting level ### +### 找出子shell的层级或临时shell的嵌套层级 ### -The $SHLVL incremented by one each time an instance of bash is started. Type the following command: +每个bash实例启动后,变量$SHLVL的值都会加一。输入下面的命令: echo "$SHLVL" -Sample outputs: +示例输出: [![Fig. 03: Bash shell nesting level (subshell numbers)](http://s0.cyberciti.org/uploads/cms/2015/01/a-nested-shell-level-command.jpg)][4] -Fig. 03: Bash shell nesting level (subshell numbers) +图3:Bash shell嵌套层级(子shell数目) -### Changing your current shell permanently with chsh command ### +### 通过chsh命令永久变更系统shell ### -Want to change your own shell from bash to zsh permanently? Try: +想要把当前系统shell从bash永久换成zsh?试试这个: chsh -s /bin/zsh -Want to change the other user's shell from bash to ksh permanently? Try: +想把其他用户的shell从bash永久换成ksh?试试这个: sudo chsh -s /bin/ksh userNameHere -### Finding out your current environment ### +### 查看当前的环境 ### -You need to use the +你需要用到 env env | more env | less env | grep 'NAME' -Sample outputs: +示例输出: TERM_PROGRAM=Apple_Terminal SHELL=/bin/bash @@ -116,12 +115,12 @@ Sample outputs: _=/usr/bin/env OLDPWD=/Users/vivek -Here is a table of commonly used bash shell variables: +下面是bash shell里一些常见变量的列表: ![Fig.04: Common bash environment variables](http://s0.cyberciti.org/uploads/cms/2015/01/common-shell-vars.jpg) -Fig.04: Common bash environment variables +图4:常见bash环境变量 -> **Warning**: It is always a good idea not to change the following environment variables. Some can be changed and may results into unstable session for you: +> **注意**:下面这些环境变量没事不要乱改。很可能会造成不稳定的shell会话: > > SHELL > @@ -141,163 +140,162 @@ Fig.04: Common bash environment variables > > LINENO -### Displays the values of environment variables ### +### 显示环境变量的值 ### -Use any one of the following command to show the values of environment variable called HOME: +使用下面任意一条命令显示环境变量HOME的值: - ## Use printenv ## + ## 使用printenv ## printenv HOME - ## or use echo ## + ## 或者用echo ## echo "$HOME" - # or use printf for portability ## + # 考虑到可移植性,也可以用printf ## printf "%s\n" "$HOME" -Sample outputs: +示例输出: /home/vivek -### Adding or setting a new variables ### +### 增加或设定一个新变量 ### -The syntax is as follows in bash or zsh or sh or ksh shell: +下面是bash,zsh,sh和ksh的语法: - ## The syntax is ## + ## 语法 ## VAR=value FOO=bar - ## Set the default editor to vim ## + ## 设定vim为默认文本编辑器 ## EDITOR=vim export $EDITOR - ## Set default shell timeout for security ## + ## 考虑安全性,设定默认shell连接超时时间 ## TMOUT=300 export TMOUT - ## You can directly use export command to set the search path for commands ## + ## 你可以直接使用export命令设定命令的搜素路径 ## export PATH=$PATH:$HOME/bin:/usr/local/bin:/path/to/mycoolapps -Again, use the printenv or echo or printf command to see the values of environment variables called PATH, EDITOR, and TMOUT: +然后,使用printenv或者echo或printf命令查看环境变量PATH,EDITOR,和TMOUT的值: printenv PATH echo "$EDITOR" printf "%s\n" $TMOUT -### How do I change an existing environment variables? ### +### 怎么修改一个现有的环境变量? ### -The syntax is as follows: +下面是语法: export VAR=value - ## OR ## + ## 或者 ## VAR=value export $VAR - ## Change the default editor from vim to emacs ## - echo "$EDITOR" ## <--- print vim - EDITOR=emacs ## <--- change it - export $EDITOR ## <--- export it for next session too - echo "$EDITOR" ## <--- print emacs + ## 把默认文本编辑器从vim改为emacs ## + echo "$EDITOR" ## <--- 屏幕输出vim + EDITOR=emacs ## <--- 修改 + export $EDITOR ## <--- 让修改在其他会话生效 + echo "$EDITOR" ## <--- 屏幕输出emacs -The syntax is as follows for the **tcsh shell for adding or changing a variables**: +**tcsh shell下增加和修改变量**的语法是下面这样的: - ## Syntax + ## 语法 setenv var value printenv var - ## Set foo variable with bar as a value ## + ## 设置变量foo的值为bar ## setenv foo bar echo "$foo" printenv foo - ## Set PATH variable ## + ## 设置变量PATH ## setenv PATH $PATH\:$HOME/bin echo "$PATH" - ## set PAGER variable ## + ## 设置变量PAGER ## setenv PAGER most printf "%s\n" $PAGER -### Finding your bash shell configuration files ### +### 找出bash shell的配置文件 ### -Type the following command to list your bash shell files, enter: +用下面的命令列出bash shell的文件: ls -l ~/.bash* ~/.profile /etc/bash* /etc/profile -Sample output: +示例输出: [![Fig.05: List all bash environment configuration files](http://s0.cyberciti.org/uploads/cms/2015/01/list-bash-enviroment-variables.jpg)][5] -Fig.05: List all bash environment configuration files +图5:列出bash的所有配置文件 -To look at all your bash config files, enter: +要查看所有的bash配置文件,输入: less ~/.bash* ~/.profile /etc/bash* /etc/profile -You can edit bash config files one by one using the text editor such as vim or emacs: +可以使用文字编辑器比如vim或emacs来一个一个编辑bash配置文件: vim ~/.bashrc -To edit files located in /etc/, type: +编辑/etc/目录下的文件,输入: - ## first make a backup.. just in case + ## 首先是备份,以防万一 sudo cp -v /etc/bashrc /etc/bashrc.bak.22_jan_15 ######################################################################## - ## Alright, edit it to your hearts content and by all means, have fun ## - ## with your environment or just increase the productivity :) ## + ## 然后,随心所欲随便改吧,好好玩玩shell环境或者提高一下效率:) ## ######################################################################## sudo vim /etc/bashrc -### Confused by Bash shell Initialization files? ### +### 被Bash shell初始化过程中应用的文件搞糊涂了吗? ### -The following "bash file initialization" graph will help you: +下面的"bash初始化文件"流程图应该有些帮助: ![](http://s0.cyberciti.org/uploads/cms/2015/01/BashStartupfiles.jpg) -Depending on which shell is set up as your default, your user profile or system profile can be one of the following: +根据账户设定的默认shell,你的用户配置或系统配置可能是下面其中一种: -### Finding your zsh shell configuration files ### +### 找出zsh shell配置文件 ### -The zsh [wiki][6] recommend the following command: +zsh的[wiki][6]中建议用下面的命令: strings =zsh | grep zshrc -Sample outputs: +示例输出: /etc/zshrc .zshrc -Type the following command to list your zsh shell files, enter: +输入下面的命令列出你的zsh shell文件: ls -l /etc/zsh/* /etc/profile ~/.z* -To look at all your zsh config files, enter: +查看所有zsh配置文件: less /etc/zsh/* /etc/profile ~/.z* -### Finding your ksh shell configuration files ### +### 找出ksh shell配置文件 ### -1. See ~/.profile or /etc/profile file. +1. 查看~/.profile或者/etc/profile文件。 -### Finding your tcsh shell configuration files ### +### 找出tcsh shell配置文件 ### -1. See ~/.login, ~/.cshrc for the C shell. -2. See ~/.tcshrc and ~/.cshrc for the TC shell. +1. C shell查看~/.login,~/.cshrc文件。 +2. TC shell查看~/.tcshrc和~/.cshrc文件。 -### Can I have a script like this execute automatically every time I login? ### +### 我可以写个类似这样每次登录时都自动执行的脚本吗? ### -Yes, add your commands or aliases or other settings to ~/.bashrc (bash shell) or ~/.profile (sh/ksh/bash) or ~/.login (csh/tcsh) file. +是的,把你的命令或别名或其他设定添加到~/.bashrc(bash shell)或者~/.profile(sh/ksh/bash)或者~/.login(csh/tcsh)文件中。 -### Can I have a script like this execute automatically every time I logout? ### +### 我可以写个类似这样每次登出都自动执行的脚本吗? ### -Yes, add your commands or aliases or other settings to ~/.bash_logout (bash) or ~/.logout (csh/tcsh) file. +是的,把你的命令或别名或其他设定添加到~/.bash_logout(bash)或者~/.logout(csh/tcsh)文件。 -### History: Getting more info about your shell session ### +### history:获取关于shell会话的更多信息 ### -Just type the history command to see session history: +输入history命令来查看本次会话的历史: history -Sample outputs: +示例输出: 9 ls 10 vi advanced-cache.php @@ -321,56 +319,56 @@ Sample outputs: 98 smartctl -A /dev/sg1 | grep -i temperature 99 sensors -Type history 20 to see the last 20 commands from your history: +输入history 20来查看命令历史的后20条: history 20 -Sample outputs: +示例输出: [![Fig.06: View session history in the bash shell using history command](http://s0.cyberciti.org/uploads/cms/2015/01/history-outputs.jpg)][7] -Fig.06: View session history in the bash shell using history command +图6:在bash shell中使用history命令查看会话历史 -You can reuses commands. Simply hit [Up] and [Down] arrow keys to see previous commands. Press [CTRL-r] from the shell prompt to search backwards through history buffer or file for a command. To repeat last command just type !! at a shell prompt: +你可以重复使用命令。简单地按下[上]或[下]方向键就可以查看之前的命令。在shell提示符下按下[CTRL-R]可以向后搜索历史缓存或文件来查找命令。重复最后一次命令,只需要在shell提示符下输入!!就好了: ls -l /foo/bar !! -To see command #93 (hddtemp /dev/sda)from above history session, type: +在以上的历史记录中查看命令#93 (hddtemp /dev/sda),输入: !93 -### Changing your identity with sudo or su ### +### 使用sudo或su改变用户 ### -The syntax is as follows: +下面是语法: su userName - ## To log in as a tom user ## + ## 登录为tom用户 ## su tom - ## To start a new login shell for tom user ## + ## 为用户tom打开一个新的shell会话 ## su tom - ## To login as root user ## + ## 登录为root用户 ## su - - ## The sudo command syntax (must be configured on your system) ## + ## sudo命令语法(必须在系统中配置有这个命令) ## sudo -s sudo tom -See "[Linux Run Command As Another User][8]" post for more on sudo, su and runuser commands. +看看帖子"[Linux下使用其他用户身份运行命令][8]"更多地了解sudo,su和runuser命令。 -### Shell aliases ### +### shell别名 ### -An alias is nothing but shortcut to commands. +别名仅仅是命令的一个快捷方式。 -### Listing aliases ### +### 列出所有的别名 ### -Type the following command: +输入下面的命令: alias -Sample outputs: +示例输出: alias ..='cd ..' alias ...='cd ../../../' @@ -388,31 +386,31 @@ Sample outputs: alias egrep='egrep --color=auto' alias ethtool='ethtool eth1' -### Create an alias ### +### 设定一个别名 ### -The bash/zsh syntax is: +bash/zsh语法: alias c='clear' alias down='sudo /sbin/shutdown -h now' -Type c alias for the system command clear, so we can type c instead of clear command to clear the screen: +对于命令clear可以输入c别名,这样我们就可以输入c代替clear命令来清空屏幕: c -Or type down to shutdown the Linux based server: +或者输入down来关闭基于Linux的服务器: down -You can create as many aliases you want. See "[30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X][9]" for practical usage of aliases on Unix-like system. +你可以设定任意多的别名。看下"[Linux/Unix/Mac OS X系统中的30个方便的bash shell别名][9]"了解在类Unix系统中别名的实际应用。 -### Shell functions ### +### shell函数 ### -Bash/ksh/zsh functions allows you further customization of your environment. In this example, I'm creating a simple bash function called memcpu() to display top 10 cpu and memory eating process: +Bash/ksh/zsh函数允许你更进一步地配置shell环境。在这个例子中,我写了一个简单的名叫memcpu()的bash函数,用来显示前10个最占用CPU和内存的进程: memcpu() { echo "*** Top 10 cpu eating process ***"; ps auxf | sort -nr -k 3 | head -10; echo "*** Top 10 memory eating process ***"; ps auxf | sort -nr -k 4 | head -10; } -Just type memcpu to see the info on screen: +输入memcpu就可以在屏幕上看到下面的信息: memcpu @@ -440,95 +438,95 @@ Just type memcpu to see the info on screen: squid 9995 0.0 0.5 175152 72396 ? S 2014 27:00 \_ (squid) -f /etc/squid/squid.conf cybercit 3922 0.0 0.4 303380 56304 ? S Jan10 0:13 | \_ /usr/bin/php-cgi -See "[how to write and use shell functions][10]" for more information. +看下"[如何编写和应用shell函数][10]"了解更多信息。 -### Putting it all together: Customizing your Linux or Unix bash shell working environment ### +### 综合一下:定制你自己的Linux或Unix bash shell工作环境 ### -Now, you are ready to configure your environment using bash shell. I'm only covering bash. But the theory remains same from zsh, ksh and other common shells. Let us see how to adopt shell to my need as a sysadmin. Edit your ~/.bashrc file and append settings. Here are some useful configuration options for you. +现在,你将使用bash shell配置自己的环境。我只介绍bash。但是理论上zsh,ksh和其他常用shell都差不多。让我们看看如何调整shell来适合我作为系统管理员的需求。编辑你的~/.bashrc文件来附加设定。下面是一些常用的配置选项。 -#### #1: Setting up bash path and environment variables #### +#### #1: 设定bash路径和环境变量 #### - # Set path ## + # 设定路径 ## export PATH=$PATH:/usr/local/bin:/home/vivek/bin:/opt/firefox/bin:/opt/oraapp/bin - # Also set path for cd command + # 为cd命令设定路径 export CDPATH=.:$HOME:/var/www -Use less or most command as a pager: +使用less或more命令作为翻页器: export PAGER=less -Set vim as default text editor for us: +设定vim作为默认文本编辑器: export EDITOR=vim export VISUAL=vim export SVN_EDITOR="$VISUAL" -Set Oracle database specific stuff: +设定Oracle数据库特别要求的参数: export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server export ORACLE_SID=XE export NLS_LANG=$($ORACLE_HOME/bin/nls_lang.sh) -Set JAVA_HOME and other paths for java as per java version: +设定JAVA_HOME和其他java路径,比如java版本: export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre - # Add ORACLE, JAVA to PATH + # 把ORACLE和JAVA加入到PATH里 export PATH=$PATH:$ORACLE_HOME/bin:$JAVA_HOME/bin -Secure my remote [SSH login using keychain for password less login][11]: +[使用密钥实现免密码登录][11]让ssh远程登录更安全: - # No need to input password again ever + # 再也不用输密码了 /usr/bin/keychain $HOME/.ssh/id_rsa source $HOME/.keychain/$HOSTNAME-sh -Finally, [turn on bash command completion][12] +最后,[打开bash命令补齐][12] source /etc/bash_completio -#### #2: Setting up bash command prompt #### +#### #2: 设定bash命令提示符 #### -Set [custom bash prompt (PS1)][13]: +设定[定制的bash提示符(PS1)][13]: PS1='{\u@\h:\w }\$ ' -#### #3: Setting default file permissions #### +#### #3: 设定默认文件权限 #### - ## Set default to 644 ## + ## 设定默认权限为644 ## umask 022 -#### #4: Control your shell history settings #### +#### #4: 调整shell命令历史设定 #### - # Dont put duplicate lines in the history + # 不往命令历史里写入相同的行 HISTCONTROL=ignoreboth - # Ignore these commands + # 忽略这些命令 HISTIGNORE="reboot:shutdown *:ls:pwd:exit:mount:man *:history" - # Set history length via HISTSIZE and HISTFILESIZE + # 通过HISTSIZE和HISTFILESIZE设定命令历史的长度 export HISTSIZE=10000 export HISTFILESIZE=10000 - # Add timestamp to history file. + # 为命令历史文件增加时间戳 export HISTTIMEFORMAT="%F %T " - #Append to history, don't overwrite + # 附加到命令历史文件,俄不是覆盖 shopt -s histappend -#### #5: Set the time zone for your session #### +#### #5: 设定shell会话的时区 #### - ## set to IST for my own session ## + ## 为我自己的shell会话设定IST(印度标准时间) ## TZ=Asia/Kolkata -#### #6: Setting up shell line editing interface #### +#### #6: 设定shell行编辑接口 #### - ## use a vi-style line editing interface for bash from default emacs mode ## + ## 使用vi风格的行编辑接口,替代bash默认的emacs模式 ## set -o vi -#### #7: Setting up your favorite aliases #### +#### #7: 设定自己喜好的别名 #### - ## add protection ## + ## 增加一些保护 ## alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' @@ -538,7 +536,7 @@ Set [custom bash prompt (PS1)][13]: alias mcdshow='/usr/bin/memcached-tool 10.10.29.68:11211 display' alias mcdflush='echo "flush_all" | nc 10.10.29.68 11211' - ## Default command options ## + ## 默认命令参数 ## alias vi='vim' alias grep='grep --color=auto' alias egrep='egrep --color=auto' @@ -551,41 +549,41 @@ Set [custom bash prompt (PS1)][13]: alias rm='rm -I --preserve-root' alias ln='ln -i' -Here are some additional OS X Unix bash shell aliases: +下面是一些额外的OS X Unix bash shell别名: - # Open desktop apps from bash + # 从bash打开桌面应用 alias preview="open -a '$PREVIEW'" alias safari="open -a safari" alias firefox="open -a firefox" alias chrome="open -a google\ chrome" alias f='open -a Finder ' - # Get rid of those .DS_Store files + # 清理那些.DS_Store文件 alias dsclean='find . -type f -name .DS_Store -delete' -#### #8: Colour my world #### +#### #8: 让世界充满色彩 #### - # Get colored grep output + # 彩色的grep输出 alias grep='grep --color=auto' export GREP_COLOR='1;33' - # colored ls too + # 彩色的ls export LSCOLORS='Gxfxcxdxdxegedabagacad' - # Gnu/linux ls + # Gnu/linux的ls ls='ls --color=auto' - # BSD/os x ls command + # BSD/os x的ls命令 # alias ls='ls -G' -#### #9: Setting up your favorite bash functions #### +#### #9: 设定自己喜好的bash函数 #### - # Show top 10 history command on screen + # 在屏幕上显示10个最近的历史命令 function ht { history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head } - # Wrapper for host and ping command - # Accept http:// or https:// or ftps:// names for domain and hostnames + # host和ping命令的替代 + # 接受http:// 或 https:// 或 ftps:// 名称用作域或主机名 _getdomainnameonly(){ local h="$1" local f="${h,,}" @@ -629,48 +627,48 @@ Here are some additional OS X Unix bash shell aliases: $_host $args $c } -#### #10: Configure bash shell behavior via shell shopt options command #### +#### #10: 通过shell shopt命令设定bash shell行为 #### -Finally, you can [make changes to your bash shell environment using set and shopt][14] commands: +最后,你可以[使用set和shopt命令调整bash shell环境][14]: - # Correct dir spellings + # 目录拼写纠正 shopt -q -s cdspell - # Make sure display get updated when terminal window get resized + # 保证每次终端窗口改变大小后会更新显示 shopt -q -s checkwinsize - # Turn on the extended pattern matching features + # 打开高级模式匹配功能 shopt -q -s extglob - # Append rather than overwrite history on exit + # 退出时附加命令历史而不是覆盖 shopt -s histappend - # Make multi-line commandsline in history + # 在命令历史使用多行 shopt -q -s cmdhist - # Get immediate notification of background job termination + # 在后台任务结束时立刻通知 set -o notify - # Disable [CTRL-D] which is used to exit the shell + # 禁用[CTRL-D]来结束shell set -o ignoreeof -### Conclusion ### +### 总结 ### -This post is by no means comprehensive. It provided a short walkthrough of how to customize your enviorment. For a thorough look at bash/ksh/zsh/csh/tcsh capabilities, I suggest you read the man page by typing the following command: +这个帖子不难理解。它简短地将如何定制用户环境从头介绍了一下。要深入了解bash/ksh/zsh/csh/tcsh/的能力,我建议你用下面的命令阅读man文档: man bash man zsh man tcsh man ksh -> This article was contributed by Aadrika T. J.; Editing and additional content added by admin. You can too [contribute to nixCraft][15]. +> 这篇文章由Aadrika T. J.贡献;由admin编辑并增加了额外内容。你也可以[为nixCraft做出贡献][15]。 -------------------------------------------------------------------------------- via: http://www.cyberciti.biz/howto/shell-primer-configuring-your-linux-unix-osx-environment/ 作者:[nixCraft][a] -译者:[译者ID](https://github.com/译者ID) +译者:[zpl1025](https://github.com/zpl1025) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 217c388f6f0f230f15f6b5d0f385fc63198616a9 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Fri, 30 Jan 2015 16:28:02 +0800 Subject: [PATCH 069/104] [translating] Bug in Wi-Fi Direct Android Implementation Causes Denial of Service --- ...i Direct Android Implementation Causes Denial of Service.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md b/sources/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md index 8829296d18..4e3337ef3e 100644 --- a/sources/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md +++ b/sources/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md @@ -1,3 +1,4 @@ +zpl1025 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service ---- *Google marks the issue as having low severity, is not in a hurry to fix it* @@ -46,4 +47,4 @@ via:http://news.softpedia.com/news/Bug-In-Wi-Fi-Direct-Android-Implementation-Ca 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://news.softpedia.com/editors/browse/ionut-ilascu -[1]:http://www.coresecurity.com/advisories/android-wifi-direct-denial-service \ No newline at end of file +[1]:http://www.coresecurity.com/advisories/android-wifi-direct-denial-service From 37517534c7d2c72154ca9271dbeca767f11d3755 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Fri, 30 Jan 2015 17:35:31 +0800 Subject: [PATCH 070/104] [translated] 20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service --- ...Implementation Causes Denial of Service.md | 50 ------------------- ...Implementation Causes Denial of Service.md | 49 ++++++++++++++++++ 2 files changed, 49 insertions(+), 50 deletions(-) delete mode 100644 sources/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md create mode 100644 translated/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md diff --git a/sources/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md b/sources/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md deleted file mode 100644 index 4e3337ef3e..0000000000 --- a/sources/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md +++ /dev/null @@ -1,50 +0,0 @@ -zpl1025 -Bug in Wi-Fi Direct Android Implementation Causes Denial of Service ----- -*Google marks the issue as having low severity, is not in a hurry to fix it* - -![Wi-Fi Direct glitch crashes Android](http://i1-news.softpedia-static.com/images/news2/Bug-In-Wi-Fi-Direct-Android-Implementation-Causes-Denial-of-Service-471299-2.jpg) - -#A vulnerability in the way Android handles Wi-Fi Direct connections leads to rebooting the device when searching for peers to connect to, which can be anything from other phones, cameras, gaming devices, computers, or printers. - -The Wi-Fi Direct technology allows devices capable of wireless connection to establish communication directly, without the need to join a local network. - -##Security company insisted on proper coordination for a fix - -The vulnerability allows an attacker to send a specially crafted 802.11 Probe Response frame to the device and crashes it due to an unhandled exception occurring on the WiFi monitoring class. - -Core Security discovered the flaw (CVE-2014-0997) through its CoreLabs team, and reported it to Google back in September 2014. The vendor acknowledged it but classified the glitch as having low severity, with no timeline for a fix being provided. - -The same answer was received by Core Security each time they contacted the Android security team to inform of a timeframe for rolling out a fix. The last reply of this kind was received on January 20, meaning that there is no patch for the time being. On Monday, the security company made their findings public. - -The security company created a (proof-of-concept)[1] to demonstrate the validity of the results obtained during their research. - -According to the technical details of the vulnerability, some Android devices can be induced a denial-of-service condition if they receive a malformed wpa_supplicant event, which makes available the interface between the wireless driver and the Android platform framework. - -##Google is not in a hurry to eliminate the problem - -The relaxed stance from the Android security team regarding the issue may be on account of the fact that denial-of-service condition occurs only for a short period of time, when scanning for peers. - -More than this, the result is not severe in nature as it consists in rebooting the device. There is no risk of data exfiltration or an attack that could lead to this, which would make it unappealing to a threat actor. On the other hand, a patch should be provided regardless, in order to mitigate any potential future risks. - -Core Security says that the issue was not detected on Android 5.0.1 and above, and among the devices affected they found Nexus 5 and 4 running version 4.4.4 of the mobile operating system, LG D806 and Samsung SM-T310 with Android 4.2.2, and Motorola RAZR HD with build 4.1.2 of the OS. - -For the time being, mitigation consists in refraining from using Wi-Fi Direct or updating to a non-vulnerable version of Android. - - --------------------------------------------------------------------------------- - -via:http://news.softpedia.com/news/Bug-In-Wi-Fi-Direct-Android-Implementation-Causes-Denial-of-Service-471299.shtml - -本文发布时间:27 Jan 2015, 09:11 GMT - -作者:[Ionut Ilascu][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/ionut-ilascu -[1]:http://www.coresecurity.com/advisories/android-wifi-direct-denial-service diff --git a/translated/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md b/translated/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md new file mode 100644 index 0000000000..fa3139f2dc --- /dev/null +++ b/translated/news/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md @@ -0,0 +1,49 @@ +Wi-Fi直连的Android实现中的Bug导致拒绝服务 +---- +*Google标记这个问题为低严重性,并不急着修复* + +![Wi-Fi Direct glitch crashes Android](http://i1-news.softpedia-static.com/images/news2/Bug-In-Wi-Fi-Direct-Android-Implementation-Causes-Denial-of-Service-471299-2.jpg) + +#Android处理Wi-Fi直连连接的方式中的一个漏洞会导致在搜索连接节点的时候设备重启,这个节点可能是其他手机,摄像头,游戏设备,电脑或是打印机等任何设备。 + +Wi-Fi直连技术允许无线设备之间直接建立通信,而不用加入到本地网络中。 + +##安全公司致力于协调修复这个问题 + +这个漏洞允许攻击者发送一个特定的修改过的802.11侦测响应帧给设备,从而因为WiFi监控类中的一个未处理的异常导致设备重启。 + +Core Security通过自己的CoreLabs团队发现了这个下次(CVE-2014-0997),早在2014年9月就汇报给了Google。这家供应商确认了这个问题,却把它列为低严重性,并不提供修复时间表。 + +每次Core Security联系Android安全组要求提供修复时间表的时候都会收到同样的答复。最后一次答复是1月20日,意味着这么段时间中都没有补丁。在星期一的时候,这家安全公司公布了他们的发现。 + +这家安全公司建立了一个(概念证明)[1]来展示他们研究结果的有效性。 + +根据这个漏洞的技术细节,一些Android设备在收到一个错误的wpa_supplicant事件后可能会进入拒绝服务状态,这些事件让无线驱动和Android平台框架之间的接口有效。 + +##Google并不着急结束这个问题 + +Android安全组对于这个问题的放松态度可能是基于这个原因,这种拒绝服务状态只发生在扫描节点这一小段时间。 + +不仅如此,实际上结果也并不严重,因为它会导致设备重启。不存在数据泄漏的风险或是能引起这个问题的攻击,不会吸引攻击者。另一方面,不管怎样都应该提供一个补丁,以减轻任何未来的潜在风险。 + +Core Security声称在Android 5.0.1及以上版本中没有测试到这个问题,他们发现的受影响的设备有运行移动操作系统版本4.4.4的Nexus 5和4,运行Android 4.2.2的LG D806和Samsung SM-T310,以及4.1.2版本系统的Motorola RAZR HD。 + +目前,减轻影响的方式是尽量不用Wi-Fi直连,或者升级到没有漏洞的Android版本。 + + +-------------------------------------------------------------------------------- + +via:http://news.softpedia.com/news/Bug-In-Wi-Fi-Direct-Android-Implementation-Causes-Denial-of-Service-471299.shtml + +本文发布时间:27 Jan 2015, 09:11 GMT + +作者:[Ionut Ilascu][a] + +译者:[zpl1025](https://github.com/zpl1025) + +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/ionut-ilascu +[1]:http://www.coresecurity.com/advisories/android-wifi-direct-denial-service From 3121e70dd93a29bc26b1e1372d254cfb21b77bc3 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Fri, 30 Jan 2015 17:40:11 +0800 Subject: [PATCH 071/104] [transltaing] Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon --- ... Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/news/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md b/sources/news/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md index 1fa678a6c1..9ec2de9a13 100644 --- a/sources/news/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md +++ b/sources/news/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md @@ -1,3 +1,4 @@ +zpl1025 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon ---- *A new kernel branch is being tracked by Ubuntu* @@ -30,4 +31,4 @@ via:http://news.softpedia.com/news/Data-of-20-Million-Users-Stolen-from-Dating-W [a]:http://news.softpedia.com/editors/browse/silviu-stahie [1]:https://lists.ubuntu.com/archives/ubuntu-devel/2015-January/038644.html -[2]:http://linux.softpedia.com/get/Linux-Distributions/Ubuntu-Vivid-Vervet-103651.shtml \ No newline at end of file +[2]:http://linux.softpedia.com/get/Linux-Distributions/Ubuntu-Vivid-Vervet-103651.shtml From e05018392e35cd7935fe66da49db56f134e950a6 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Fri, 30 Jan 2015 18:05:46 +0800 Subject: [PATCH 072/104] [translated] 20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon --- ...Integrate Linux Kernel 3.19 Branch Soon.md | 34 ------------------- ...Integrate Linux Kernel 3.19 Branch Soon.md | 33 ++++++++++++++++++ 2 files changed, 33 insertions(+), 34 deletions(-) delete mode 100644 sources/news/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md create mode 100644 translated/news/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md diff --git a/sources/news/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md b/sources/news/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md deleted file mode 100644 index 9ec2de9a13..0000000000 --- a/sources/news/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md +++ /dev/null @@ -1,34 +0,0 @@ -zpl1025 -Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon ----- -*A new kernel branch is being tracked by Ubuntu* - -![Ubuntu 15.04 shortcuts](http://i1-news.softpedia-static.com/images/news2/Ubuntu-15-04-to-Integrate-Linux-Kernel-3-19-Branch-Soon-471121-2.jpg) - -#The Linux kernel is one of the most important components in a distribution and Ubuntu users are interested to know what will be used in the stable edition for the 15.04 branch, which is scheduled to arrive in a couple of months. - -The Ubuntu and the Linux kernel development cycles are not in sync and it's hard to anticipate what version will eventually land in Ubuntu 15.04. For now, Ubuntu 15.04 (Vivid Vervet) is using Linux kernel 3.18, but the developers are already looking to implement the 3.19 branch. - -"Our Vivid kernel remains based on the v3.18.2 upstream stable kernel, but we'll be rebasing to v3.18.3 shortly. We'll also be re-basing our unstable branch to v3.19-rc5 and get that uploaded to our team PPA soon," [said](1) Canonical's Joseph Salisbury. - -Linux kernel 3.19 is still under development and it will take a few weeks to see a stable version, but it's enough time to implement it in Ubuntu and test it properly. It won't be possible to get the 3.20 branch, for example, even if it launches before the April 23. - -You can [download Ubuntu 15.04](2) right now from Softpedia and give it a spin. It's a daily build and it contains all the improvements made so far to the distribution. - --------------------------------------------------------------------------------- - -via:http://news.softpedia.com/news/Data-of-20-Million-Users-Stolen-from-Dating-Website-471179.shtml - -本文发布时间:25 Jan 2015, 20:39 GMT - -作者:[Silviu Stahie][a] - -译者:[译者ID](https://github.com/译者ID) - -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/silviu-stahie -[1]:https://lists.ubuntu.com/archives/ubuntu-devel/2015-January/038644.html -[2]:http://linux.softpedia.com/get/Linux-Distributions/Ubuntu-Vivid-Vervet-103651.shtml diff --git a/translated/news/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md b/translated/news/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md new file mode 100644 index 0000000000..5ff335214f --- /dev/null +++ b/translated/news/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md @@ -0,0 +1,33 @@ +Ubuntu 15.04即将整合Linux内核3.19分支 +---- +*Ubuntu已经开始跟踪一个新的内核分支* + +![Ubuntu 15.04 shortcuts](http://i1-news.softpedia-static.com/images/news2/Ubuntu-15-04-to-Integrate-Linux-Kernel-3-19-Branch-Soon-471121-2.jpg) + +#Linux内核是一个发行版中最重要的组成部分,Ubuntu用户很想知道哪个版本将用于15.04分支的稳定版中,预计几个月后就会发布。 + +Ubuntu和Linux内核开发周期并不同步,所以很难预测最终哪个版本将应用在Ubuntu 15.04中。目前,Ubuntu 15.04(长尾黑颚猴)使用的是Linux内核3.18,但是开发者们已经准备应用3.19分支了。 + +“我们的Vivid内核仍然基于v3.18.2的稳定内核上游,但是我们很快将基础变更到v3.18.3。我们也将把我们的非稳定版分支的基础变更到v3.19-rc5,然后上传到我们的团队PPA。”Canonical的Joseph Salisbury[说](1)。 + +Linux内核3.19仍然处于开发阶段,预计还要几个星期才会出稳定版本,但是有充足的时间将它加入到Ubuntu中并测试。不可能等到3.20分支了,举个例子,即使它能在4月23日前发布。 + +你现在就可以从Softpedia[下载Ubuntu 15.04](2),试用一下。这是一个每日构建版本,会包含发行版中目前已经做出的所有改善。 + +-------------------------------------------------------------------------------- + +via:http://news.softpedia.com/news/Data-of-20-Million-Users-Stolen-from-Dating-Website-471179.shtml + +本文发布时间:25 Jan 2015, 20:39 GMT + +作者:[Silviu Stahie][a] + +译者:[zpl1025](https://github.com/zpl1025) + +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:https://lists.ubuntu.com/archives/ubuntu-devel/2015-January/038644.html +[2]:http://linux.softpedia.com/get/Linux-Distributions/Ubuntu-Vivid-Vervet-103651.shtml From 4ff41b3e8b0f403569df77bd1bc6f8874752d861 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Fri, 30 Jan 2015 18:13:38 +0800 Subject: [PATCH 073/104] [translating] Test drive Linux with nothing but a flash drive --- ...20141030 Test drive Linux with nothing but a flash drive.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141030 Test drive Linux with nothing but a flash drive.md b/sources/tech/20141030 Test drive Linux with nothing but a flash drive.md index 84d5b7a9d4..7b5c5511c8 100644 --- a/sources/tech/20141030 Test drive Linux with nothing but a flash drive.md +++ b/sources/tech/20141030 Test drive Linux with nothing but a flash drive.md @@ -1,3 +1,4 @@ +zpl1025 Test drive Linux with nothing but a flash drive ================================================================================ ![Penguins gathered together: Linux for the win](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/OSDC_Penguin_Image_520x292_12324207_0714_mm_v1a.png) @@ -72,4 +73,4 @@ via: https://opensource.com/life/14/10/test-drive-linux-nothing-flash-drive [a]:https://opensource.com/users/scottnesbitt [1]:http://en.wikipedia.org/wiki/ISO_image [2]:http://unetbootin.sourceforge.net/ -[3]:http://en.wikipedia.org/wiki/BIOS \ No newline at end of file +[3]:http://en.wikipedia.org/wiki/BIOS From af6cb2be2ec5021489295cfdedad8fc88f918bce Mon Sep 17 00:00:00 2001 From: Vic___ Date: Sat, 31 Jan 2015 09:56:09 +0800 Subject: [PATCH 074/104] =?UTF-8?q?=E5=BC=BA=E5=9C=B0=E4=B8=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20150126 4 lvcreate Command Examples on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150126 4 lvcreate Command Examples on Linux.md b/sources/tech/20150126 4 lvcreate Command Examples on Linux.md index ae7e177116..bce08cc203 100644 --- a/sources/tech/20150126 4 lvcreate Command Examples on Linux.md +++ b/sources/tech/20150126 4 lvcreate Command Examples on Linux.md @@ -1,3 +1,5 @@ + Vic020 + 4 lvcreate Command Examples on Linux ================================================================================ Logical volume management (LVM) is a widely-used technique and extremely flexible disk management scheme. It basically contain three basic command : @@ -117,4 +119,4 @@ via: http://www.ehowstuff.com/4-lvcreate-command-examples-on-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.ehowstuff.com/author/mhstar/ \ No newline at end of file +[a]:http://www.ehowstuff.com/author/mhstar/ From 1611855c9b25df3a870ff5c935b4607975f331d7 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 31 Jan 2015 11:15:16 +0800 Subject: [PATCH 075/104] Update 20150127 How to limit network bandwidth on Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译这篇文章。 by FSSlc --- .../tech/20150127 How to limit network bandwidth on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150127 How to limit network bandwidth on Linux.md b/sources/tech/20150127 How to limit network bandwidth on Linux.md index 1deaa38b49..5507b3283d 100644 --- a/sources/tech/20150127 How to limit network bandwidth on Linux.md +++ b/sources/tech/20150127 How to limit network bandwidth on Linux.md @@ -1,3 +1,5 @@ +[Translating] by FSSlc + How to limit network bandwidth on Linux ================================================================================ If you often run multiple networking applications on your Linux desktop, or share bandwidth among multiple computers at home, you will want to have a better control over bandwidth usage. Otherwise, when you are downloading a big file with a downloader, your interactive SSH session may become sluggish to the point where it's unusable. Or when you sync a big folder over Dropbox, your roommate may complain that video streaming at her computer gets choppy. @@ -87,4 +89,4 @@ via: http://xmodulo.com/limit-network-bandwidth-linux.html [4]:http://lartc.org/wondershaper/ [5]:http://lartc.org/manpages/tc.txt [6]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[7]:http://www.lartc.org/lartc.html \ No newline at end of file +[7]:http://www.lartc.org/lartc.html From 2d9fe2df0130c2a4af2710b6d11922db6ae92998 Mon Sep 17 00:00:00 2001 From: Stevearzh Date: Sat, 31 Jan 2015 19:16:18 +0800 Subject: [PATCH 076/104] translated by Stevearzh --- ...114 Why Mac users don't switch to Linux.md | 82 ------------------- ...114 Why Mac users don't switch to Linux.md | 81 ++++++++++++++++++ 2 files changed, 81 insertions(+), 82 deletions(-) delete mode 100644 sources/talk/20150114 Why Mac users don't switch to Linux.md create mode 100644 translated/talk/20150114 Why Mac users don't switch to Linux.md diff --git a/sources/talk/20150114 Why Mac users don't switch to Linux.md b/sources/talk/20150114 Why Mac users don't switch to Linux.md deleted file mode 100644 index 6a72276819..0000000000 --- a/sources/talk/20150114 Why Mac users don't switch to Linux.md +++ /dev/null @@ -1,82 +0,0 @@ -[Translating by Stevearzh] -Why Mac users don’t switch to Linux -================================================================================ -Linux and Mac users share at least one common thing: they prefer not to use Windows. But after that the two groups part company and tend to go their separate ways. But why don’t more Mac users switch to Linux? Is there something that prevents Mac users from making the jump? - -[Datamation took a look at these questions][1] and tried to answer them. Datamation’s conclusion was that it’s really about the applications and workflow, not the operating system: - -> …there are some instances where replacing existing applications with new options isn’t terribly practical – both in workflow and in overall functionality. This is an area where, sadly, Apple has excelled in. So while it’s hardly “impossible” to get around these issues, they are definitely a large enough challenge that it will give the typical Mac enthusiast pause. -> -> But outside of Web developers, honestly, I don’t see Mac users “en masse,” seeking to disrupt their workflows for the mere idea of avoiding the upgrade to OS X Yosemite. Granted, having seen Yosemite up close – Mac users who are considered power users will absolutely find this change-up to be hideous. However, despite poor OS X UI changes, the core workflow for existing Mac users will remain largely unchanged and unchallenged. -> -> No, I believe Linux adoption will continue to be sporadic and random. Ever-growing, but not something that is easily measured or accurately calculated. - -I agree to a certain extent with Datamation’s take on the importance of applications and workflows, both things are important and matter in the choice of a desktop operating system. But I think there’s something more going on with Mac users than just that. I believe that there’s a different mentality that exists between Linux and Mac users, and I think that’s the real reason why many Mac users don’t switch to Linux. - -![](http://jimlynch.com/wp-content/uploads/2015/01/mac-users-switch-to-linux.jpeg) - -### It’s all about control for Linux users ### - -Linux users tend to want control over their computing experience, they want to be able to change things to make them the way that they want them. One simply cannot do that in the same way with OS X or any other Apple products. With Apple you get what they give you for the most part. - -For Mac (and iOS) users this is fine, they seem mostly content to stay within Apple’s walled garden and live according to whatever standards and options Apple gives them. But this is totally unacceptable to most Linux users. People who move to Linux usually come from Windows, and it’s there that they develop their loathing for someone else trying to define or control their computing experiences. - -And once someone like that has tasted the freedom that Linux offers, it’s almost impossible for them to want to go back to living under the thumb of Apple, Microsoft or anyone else. You’d have to pry Linux from their cold, dead fingers before they’d accept the computing experience created for them Apple or Microsoft. - -But you won’t find that same determination to have control among most Mac users. For them it’s mostly about getting the most out of whatever Apple has done with OS X in its latest update. They tend to adjust fairly quickly to new versions of OS X and even when unhappy with Apple’s changes they seem content to continue living within Apple’s walled garden. - -So the need for control is a huge difference between Mac and Linux users. I don’t see it as a problem though since it just reflects the reality of two very different attitudes toward using computers. - -### Mac users need Apple’s support mechanisms ### - -Linux users are also different in the sense that they don’t mind getting their hands dirty by getting “under the hood” of their computers. Along with control comes the personal responsibility of making sure that their Linux systems work well and efficiently, and digging into the operating system is something that many Linux users have no problem doing. - -When a Linux user needs to fix something, chances are they will attempt to do so immediately themselves. If that doesn’t work then they’ll seek additional information online from other Linux users and work through the problem until it has been resolved. - -But Mac users are most likely not going to do that to the same extent. That is probably one of the reasons why Apple stores are so popular and why so many Mac users opt to buy Apple Care when they get a new Mac. A Mac user can simply take his or her computer to the Apple store and ask someone to fix it for them. There they can belly up to the Genius Bar and have their computer looked at by someone Apple has paid to fix it. - -Most Linux users would blanche at the thought of doing such a thing. Who wants some guy you don’t even know to lay hands on your computer and start trying to fix it for you? Some Linux users would shudder at the very idea of such a thing happening. - -So it would be hard for a Mac user to switch to Linux and suddenly be bereft of the support from Apple that he or she was used to getting in the past. Some Mac users might feel very vulnerable and uncertain if they were cut off from the Apple mothership in terms of support. - -### Mac users love Apple’s hardware ### - -The Datamation article focused on software, but I believe that hardware also matters to Mac users. Most Apple customers tend to love Apple’s hardware. When they buy a Mac, they aren’t just buying it for OS X. They are also buying Apple’s industrial design expertise and that can be an important differentiator for Mac users. Mac users are willing to pay more because they perceive that the overall value they are getting from Apple for a Mac is worth it. - -Linux users, on the other hand, seem less concerned by such things. I think they tend to focus more on cost and less on the looks or design of their computer hardware. For them it’s probably about getting the most value from the hardware at the lowest cost. They aren’t in love with the way their computer hardware looks in the same way that some Mac users probably are, and so they don’t make buying decisions based on it. - -I think both points of view on hardware are equally valid. It ultimately gets down to the needs of the individual user and what matters to them when they choose to buy or, in the case of some Linux users, build their computer. Value is the key for both groups, and each has its own perceptions of what constitutes real value in a computer. - -Of course it is [possible to run Linux on a Mac][2], directly or indirectly via virtual machine. So a user that really liked Apple’s hardware does have the option of keeping their Mac but installing Linux on it. - -### Too many Linux distros to choose from? ### - -Another reason that might make it hard for a Mac user to move to Linux is the sheer number of distributions to choose from in the world of Linux. While most Linux users probably welcome the huge diversity of distros available, it could also be very confusing for a Mac user who hasn’t learned to navigate those choices. - -Over time I think a Mac user would learn and adjust by figuring out which distribution worked best for him or her. But in the short term it might be a very daunting hurdle to overcome after being used to OS X for a long period of time. I don’t think it’s insurmountable, but it’s definitely something that is worth mentioning here. - -Of course we do have helpful resources like [DistroWatch][3] and even my own [Desktop Linux Reviews][4] blog that can help people find the right Linux distribution. Plus there are many articles available about “the best Linux distro” and that sort of thing that Mac users can use as resources when trying to figure out the distribution they want to use. - -But one of the reasons why Apple customers buy Macs is the simplicity and all-in-one solution that they offer in terms of the hardware and software being unified by Apple. So I am not sure how many Mac users would really want to spend the time trying to find the right Linux distribution. It might be something that puts them off really considering the switch to Linux. - -### Mac users are apples and Linux users are oranges ### - -I see nothing wrong with Mac and Linux users going their separate ways. I think we’re just talking about two very different groups of people, and it’s a good thing that both groups can find and use the operating system and software that they prefer. Let Mac users enjoy OS X and let Linux users enjoy Linux, and hopefully both groups will be happy and content with their computers. - -Every once in a while a Mac user might stray over to Linux or vice versa, but for the most part I think the two groups live in different worlds and mostly prefer to stay separate and apart from one another. I generally don’t compare the two because when you get right down to it, it’s really just a case of apples and oranges. - --------------------------------------------------------------------------------- - -via: http://jimlynch.com/linux-articles/why-mac-users-dont-switch-to-linux/ - -作者:[Jim Lynch][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://jimlynch.com/author/Jim/ -[1]:http://www.datamation.com/open-source/why-linux-isnt-winning-over-mac-users-1.html -[2]:http://www.howtogeek.com/187410/how-to-install-and-dual-boot-linux-on-a-mac/ -[3]:http://distrowatch.com/ -[4]:http://desktoplinuxreviews.com/ \ No newline at end of file diff --git a/translated/talk/20150114 Why Mac users don't switch to Linux.md b/translated/talk/20150114 Why Mac users don't switch to Linux.md new file mode 100644 index 0000000000..ae5337b1f2 --- /dev/null +++ b/translated/talk/20150114 Why Mac users don't switch to Linux.md @@ -0,0 +1,81 @@ +为什么 Mac 用户不选择 Linux +================================================================================ +Linux 与 Mac 用户至少有一个共同点:他们都不太喜欢用 Windows。但除了这点外,二者再也无法达成其他共识,只得分道扬镳。为什么 Mac 用户不选择 Linux 呢?是什么因素致使 Mac 用户做出了这种选择的? + +[Datamation 就此问题做了一番调查][1],并试图进行解答。Datamation 的结论是,所有原因都只归结于众多应用及工作区,而非操作系统的关系: + +> …某些事例表明,尝试用新应用接替现有应用,并非会是很糟糕的体验 - 对工作区和实用性来说都是如此。但不幸的是,苹果在这些方面做得非常好。因此,在几乎不可能改变这些事实的情况下,想要拉拢那些 Mac忠实用户实在是很大的挑战。 + +> 不过老实来说,除了 Web 开发者,我还没见过 Mac 用户仅仅为了避免升级到 OS X Yosemite 而 “ +en masse”(法语:共同,一起) 尝试变更他们的工作区。诚然,经历过 Yosemite 更新后 - 考虑过权限的用户应该会发现这方面已经变得非常令人讨厌。并且,OS X 除了在 UI 方面几乎没有变化,针对现有 Mac 用户的核心工作区也在最大程度上保持了原样。 + +> 但,我相信 Linux 在未来将会继续保持多样化特点。Linux 会继续成长,但绝不是经过精确计量般得一成不变。 + +我大体上同意 Datamation 关于应用和工作区的重要性的结论,在选择操作系统时这两方面是必须要考虑顾及的。但我认为对 Mac 用户来说,选择 Mac 有比这两方面更重要的因素。我相信是不同的心态造就了 Linux 和 Mac 用户,并且我认为这才是为什么 Mac 用户不选择 Linux 的真实原因。 + +![](http://jimlynch.com/wp-content/uploads/2015/01/mac-users-switch-to-linux.jpeg) + +### 控制权才是 Linux 用户最看重的地方 ### +Linux 用户倾向于控制电脑上的所有细节,他们试图作出一切能做的努力使操作系统变成他们想要的样子。但这种方式并不适用于 OS X 以及其他任何苹果的产品。如果你使用了苹果的产品,就意味着绝大多数情况下,你只能按照苹果预先设定的模式来使用它们。 + +对 Mac(以及 iOS)用户来说这没什么,因为他们似乎并不在乎生活在苹果那围墙高筑的花园里,仅仅使用那些苹果给予他们的标准和选择。但这对绝大多数 Linux 用户来说是完全不能接受的。Linux 的新用户通常来自 Windows,正是从那里,他们开始厌恶那些告诉他们什么才叫操作系统,并试图限制操作系统权限的东西的。 + +自从他们尝到使用自由的 Linux 系统所带来的甜头之后,他们就再也不会再回到苹果或者微软的监牢里去了。即使你在他们死后,把 Linux 从他们那冰冷僵硬的手指下撬出来,他们也不会接受苹果和微软那种糟糕的操作系统。 + +但绝大部分 Mac 用户不会有这样的意志和决心。对他们来说当苹果升级 OS X 时放弃他们现有的习惯方式是非常容易的。在苹果那围墙高筑的花园里,即使他们不满意苹果的变化,他们也会迅速地接受。 + +因此,对控制权的渴望是 Mac 用户与 Linux 用户的最大不同。但我并未把它视为一个问题,尽管这反映出使用电脑的两类人的截然不同的态度。 + +### Mac 用户离不开苹果的技术支持 ### + +Linux 用户与 Mac 用户的区别也体现在 Linux 用户并不介意亲自维护自己的电脑。虽然维护电脑及控制操作系统都是很大的责任,但 Linux 用户还是愿意独自承担,愿意通过自己的力量使他们的系统工作得更棒更有效率,并且深入了解操作系统是每一位 Linux 用户都乐衷的事情。 + +当 Linux 用户遇到问题的时,他们会迅速地尝试自己来解决问题。如果这不奏效的话,他们会在网上寻找其他用户在遇到类似问题是怎么解决的,并不断进行尝试,直到问题解决。 + +但 Mac 用户却不大会这样。这也许是为什么苹果零售店如此火爆、为什么如此多的 Mac 用户在拿到新 Mac 的时候会选择购买苹果维护服务的原因。Mac 用户会很轻易得带着 TA 的电脑去苹果零售店,走进天才吧并要求苹果的工作人员为其查看和修复电脑。 + +绝大多数 Linux 用户连想都不会像这种事情。谁会愿意让一个你都不认识的家伙碰你的电脑并维修它呢? + +因此对 Mac 用户来说,很难抛弃过去可以从苹果那里得到的技术支持,转而使用 Linux。这种选择会令某些 Mac 用户觉得自己的电脑将变得非常脆弱、容易被攻击,他们如同离开母亲怀抱的婴儿般充满了无助感。 + +### Mac 用户喜爱苹果的硬件 ### + +Datamation 发表的文章中主要研究了软件方面的原因,但我认为硬件因素同样对 Mac 用户有很大影响。绝大部分 Mac 用户非常喜爱苹果的硬件。TA 们购买 Mac 并不仅仅是为了 OS X。苹果那精美的工艺设计也是 Mac 用户购买时着重考虑的一点。Mac 用户愿意支付高价购买电脑,因为他们认为这样绝对是物有所值的。 + +另一方面,Linux 用户似乎并不会考虑这些东西。我认为他们更偏向于在他们的电脑外观上花费较少的金钱。对他们来说,花费最少的金钱来获取尽可能好的硬件才是最重要的。他们并不像 Mac 用户一样热衷于电脑的外观,因此这一点并不是他们在购买电脑时考虑的地方。 + +我认为对于硬件的两种不同观点是没有高低之分的。这仅仅和用户的不同需求有关,仅仅会在他们购买电脑时影响他们,或者对某些 Linux 用户来说只是因为他们想要自己组装电脑而已。两种观点只是因为出发点不同、对于电脑的真正价值体现所在之处的理解不同罢了。 + +当然[在 Mac 上运行 Linux 是可能的][2],直接运行或者间接地通过虚拟机运行。因此真心喜欢苹果硬件的 Mac 用户是可以选择在 Mac 上安装 Linux 的。 + +### Linux 发行版太多了不知道选哪个? ### + +另一个让 Mac 用户无法选择 Linux 的原因是:要从从众多 Linux 发行版当中选择一个实在是太困难了。在大多数 Linux 并不抗拒的多元化发行版时代,没有任何相关知识的 Mac 用户感到十分困惑。 + +我认为,随着时间的推移,Mac 用户是可以找出不适应最适合自己的发行版的。但在短时间内,尤其是在长时期得使用 OS X 之后,这是一个艰巨的任务。我不认为这个问题是无法克服的,但却有必要在这里提一下。 + +当然我们可以给 Mac 用户指明道路,推荐参考 [DistroWatch][3] 还有我们人的博客 [Desktop Linux Reviews][4],这都有助于 Mac 用户找到正确的 Linux 发行版。再说一条,网上有很多诸如“最好的 Linux 发行版”等类似的文章,当 Mac 用户想要寻找适合自己使用的发行版时可以参考一下。 + +但有苹果顾客购买 Mac 的其中一个原因是苹果硬件软件协调统一起来的简便性和易用性。所以我不确定有多少 Mac 用户愿意花费时间找出适合自己的 Linux 发行版。也许是否要使用 Linux 确实会令 TA 们考虑一阵子了。 + +### Mac 用户是苹果,Linux 用户是橘子 ### + +Mac 用户与 Linux 用户分道扬镳我认为并没有什么不妥。我认为我们只是在谈论两类完全不同的人群,这是一件好事,因为两类人群都在按自己四环的方式去使用操作系统和软件。让 Mac 用户和 Linux 用户各自沉浸在 OS X 和 Linux 中吧,希望他们都能高兴,都能对自己的电脑满意。 + +也许 Mac 用户会偶然走入 Linux 的世界并开始转向 Linux,但我认为绝大多数时候,两类人都愿意呆在在不同的世界并不与对方接触。通常来说我并不会随意比较二者,尤其是你已经自己拿定主意的时候,况且这只不过是选苹果还是选橘子的问题罢了。 + +-------------------------------------------------------------------------------- + +via: http://jimlynch.com/linux-articles/why-mac-users-dont-switch-to-linux/ + +作者:[Jim Lynch][a] +译者:[Stevearzh](https://github.com/Stevearzh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://jimlynch.com/author/Jim/ +[1]:http://www.datamation.com/open-source/why-linux-isnt-winning-over-mac-users-1.html +[2]:http://www.howtogeek.com/187410/how-to-install-and-dual-boot-linux-on-a-mac/ +[3]:http://distrowatch.com/ +[4]:http://desktoplinuxreviews.com/ \ No newline at end of file From f97c46490fbe9cb77142a52ea0510bccca8dc1be Mon Sep 17 00:00:00 2001 From: 2q1w2007 <2q1w2007@163.com> Date: Sat, 31 Jan 2015 21:56:30 +0800 Subject: [PATCH 077/104] =?UTF-8?q?20150131=20=E9=80=89=E9=A2=98=202015013?= =?UTF-8?q?1=20WordPress=20Can=20Be=20Used=20to=20Leverage=20Critical=20Gh?= =?UTF-8?q?ost=20Flaw=20in=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...o Leverage Critical Ghost Flaw in Linux.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sources/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md diff --git a/sources/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md b/sources/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md new file mode 100644 index 0000000000..3d132079a4 --- /dev/null +++ b/sources/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md @@ -0,0 +1,49 @@ +WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux +----- +*Users are advised to apply available patches immediately* + +![WordPress validating pingback’s post URL](http://i1-news.softpedia-static.com/images/news2/WordPress-Can-Be-Used-to-Leverage-Critical-Ghost-Flaw-in-Linux-471730-2.jpg) + +**The vulnerability revealed this week by security researchers at Qualys, who dubbed it [Ghost](1), could be taken advantage of through WordPress or other PHP applications to compromise web servers.** + +The glitch is a buffer overflow that can be triggered by an attacker to gain command execution privileges on a Linux machine. It is present in the glibc’s “__nss_hostname_digits_dots()” function that can be used by the “gethostbyname()” function. + +##PHP applications can be used to exploit the glitch + +Marc-Alexandre Montpas at Sucuri says that the problem is significant because these functions are used in plenty of software and server-level mechanism. + +“An example of where this could be a big issue is within WordPress itself: it uses a function named wp_http_validate_url() to validate every pingback’s post URL,” which is carried out through the “gethostbyname()” function wrapper used by PHP applications, he writes in a blog post on Wednesday. + +An attacker could use this method to introduce a malicious URL designed to trigger the vulnerability on the server side and thus obtain access to the machine. + +In fact, security researchers at Trustwave created [proof-of-concept](2) code that would cause the buffer overflow using the pingback feature in WordPress. + +##Multiple Linux distributions are affected + +Ghost is present in glibc versions up to 2.17, which was made available in May 21, 2013. The latest version of glibc is 2.20, available since September 2014. + +However, at that time it was not promoted as a security fix and was not included in many Linux distributions, those offering long-term support (LTS) in particular. + +Among the impacted operating systems are Debian 7 (wheezy), Red Hat Enterprise Linux 6 and 7, CentOS 6 and 7, Ubuntu 12.04. Luckily, Linux vendors have started to distribute updates with the fix that mitigates the risk. Users are advised to waste no time downloading and applying them. + +In order to demonstrate the flaw, Qualys has created an exploit that allowed them remote code execution through the Exim email server. The security company said that it would not release the exploit until the glitch reached its half-life, meaning that the number of the affected systems has been reduced by 50%. + +Vulnerable application in Linux are clockdiff, ping and arping (under certain conditions), procmail, pppd, and Exim mail server. + +-------------------------------------------------------------------------------- + +via:http://news.softpedia.com/news/WordPress-Can-Be-Used-to-Leverage-Critical-Ghost-Flaw-in-Linux-471730.shtml + +本文发布时间:30 Jan 2015, 17:36 GMT + +作者:[Ionut Ilascu][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/ionut-ilascu +[1]:http://news.softpedia.com/news/Linux-Systems-Affected-by-14-year-old-Vulnerability-in-Core-Component-471428.shtml +[2]:http://blog.spiderlabs.com/2015/01/ghost-gethostbyname-heap-overflow-in-glibc-cve-2015-0235.html From a9b73de3d3340c03ce805e268857621f80a7b102 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 1 Feb 2015 10:16:31 +0800 Subject: [PATCH 078/104] PUB:20150121 Linux FAQs with Answers--How to check disk space on Linux with df command @mtunique --- ...eck disk space on Linux with df command.md | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md (88%) diff --git a/translated/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md b/published/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md similarity index 88% rename from translated/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md rename to published/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md index 6b1d65ca8b..adecdd2520 100644 --- a/translated/tech/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md +++ b/published/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md @@ -1,4 +1,4 @@ -Linux有问必答:在Linux下如何用df命令检查磁盘空间? +在 Linux 下你所不知道的 df 命令的那些功能 ================================================================================ > **问题**: 我知道在Linux上我可以用df命令来查看磁盘使用空间。你能告诉我df命令的实际例子使我可以最大限度得利用它吗? @@ -10,7 +10,7 @@ df命令可以展示任何“mounted”文件系统的磁盘利用率。该命 ### 用人们可读的方式展示 ### -默认情况下,df命令用1K为块来展示磁盘空间,这不容易解释。“-h”参数使df用更可读的方式打印磁盘空间(例如 100K,200M,3G)。 +默认情况下,df命令用1K为块来展示磁盘空间,这看起来不是很直观。“-h”参数使df用更可读的方式打印磁盘空间(例如 100K,200M,3G)。 $ df -h @@ -28,7 +28,7 @@ df命令可以展示任何“mounted”文件系统的磁盘利用率。该命 ### 展示Inode使用情况 ### -当你监视磁盘使用情况时,你必须注意的不仅仅是磁盘空间还有“inode”的使用情况。在Linux中,inode是用来存储特定文件的元数据的一种数据结构,在创建一个文件系统时,inode的预先定义数量将被分配。这意味着,一个文件系统可能耗尽空间不只是因为大文件用完了所有可用空间,也可能是因为很多小文件用完了所有可能的inode。用“-i”选项展示inode使用情况。 +当你监视磁盘使用情况时,你必须注意的不仅仅是磁盘空间还有“inode”的使用情况。在Linux中,inode是用来存储特定文件的元数据的一种数据结构,在创建一个文件系统时,inode的预先定义数量将被分配。这意味着,**一个文件系统可能耗尽空间不只是因为大文件用完了所有可用空间,也可能是因为很多小文件用完了所有可能的inode**。用“-i”选项展示inode使用情况。 $ df -i @@ -46,7 +46,8 @@ df命令可以展示任何“mounted”文件系统的磁盘利用率。该命 ### 展示磁盘总利用率 ### -默认情况下, df命令显示磁盘的单个文件系统的利用率。如果你想知道的所有文件系统的总磁盘使用量,增加“ --total ”选项。 +默认情况下, df命令显示磁盘的单个文件系统的利用率。如果你想知道的所有文件系统的总磁盘使用量,增加“ --total ”选项(见最下面的汇总行)。 + $ df -h --total ---------- @@ -64,7 +65,7 @@ df命令可以展示任何“mounted”文件系统的磁盘利用率。该命 ### 展示文件系统类型 ### -默认情况下,df命令不现实文件系统类型信息。用“-T”选项来添加文件系统信息到输出中。 +默认情况下,df命令不显示文件系统类型信息。用“-T”选项来添加文件系统信息到输出中。 $ df -T @@ -92,13 +93,13 @@ df命令可以展示任何“mounted”文件系统的磁盘利用率。该命 /dev/mapper/ubuntu-root 952893348 591583380 312882756 66% / /dev/sda1 233191 100025 120725 46% /boot -排除特定的文件系统类型,用“-x ”选项。同样,你可以用这个选项多次。 +排除特定的文件系统类型,用“-x ”选项。同样,你可以用这个选项多次来排除多种文件系统类型。 $ df -x tmpfs ### 显示一个具体的挂载点磁盘使用情况 ### -如果你用df指定一个挂载点,它将报告挂载在那个地方的文件系统的磁盘使用情况。如果你指定一个普通文件(或一个目录)而不是一个挂载点,df将现实包含这个文件(或目录)的文件系统的磁盘利用率。 +如果你用df指定一个挂载点,它将报告挂载在那个地方的文件系统的磁盘使用情况。如果你指定一个普通文件(或一个目录)而不是一个挂载点,df将显示包含这个文件(或目录)的文件系统的磁盘利用率。 $ df / @@ -116,9 +117,9 @@ df命令可以展示任何“mounted”文件系统的磁盘利用率。该命 Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/ubuntu-root 952893348 591583528 312882608 66% / -### 现实虚拟文件系统的信息 ### +### 显示虚拟文件系统的信息 ### -如果你想显示所有已经存在的文件系统(包括虚拟文件系统)的磁盘空间信息,用“-a”选项。这里,虚拟文件系统是指没有相对应的物理设备的假的文件系统,例如,tmpfs,cgroup虚拟文件系统或FUSE文件安系统。这些虚拟文件系统大小为0,不用“-a”选项将不会被报告出来。 +如果你想显示所有已经存在的文件系统(包括虚拟文件系统)的磁盘空间信息,用“-a”选项。这里,虚拟文件系统是指没有相对应的物理设备的假文件系统,例如,tmpfs,cgroup虚拟文件系统或FUSE文件安系统。这些虚拟文件系统大小为0,不用“-a”选项将不会被报告出来。 $ df -a @@ -149,7 +150,7 @@ df命令可以展示任何“mounted”文件系统的磁盘利用率。该命 via: http://ask.xmodulo.com/check-disk-space-linux-df-command.html 译者:[mtunique](https://github.com/mtunique) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 98e68b6b8b5f25fa311fc170a0410423862d38cc Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 1 Feb 2015 10:35:04 +0800 Subject: [PATCH 079/104] PUB:20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu @GOLinux --- ... Track of Multiple Time Zones in Ubuntu.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/tech => published}/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md (78%) diff --git a/translated/tech/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md b/published/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md similarity index 78% rename from translated/tech/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md rename to published/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md index 273d949490..57ff68b6d2 100644 --- a/translated/tech/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md +++ b/published/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md @@ -2,13 +2,13 @@ Ubuntu中跟踪多个时区的简捷方法 ================================================================================ ![date-time](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/date-time.jpg) -**我是否要确保在我醒来时或者安排与*山姆陈*,Ohso的半个开发商,进行Skype通话时,澳大利亚一个关于Chromebook销售的推特已经售罄,我大脑同时在多个时区下工作。** +**无论我是要在醒来时发个关于澳大利亚的 Chromebook 销售已经售罄的推特,还是要记着和Ohso的半个开发商山姆陈进行Skype通话,我大脑都需要同时工作在多个时区下。** 那里头有个问题,如果你认识我,你会知道我的脑容量也就那么丁点,跟金鱼差不多,里头却塞着像Windows Vista这样一个臃肿货(也就是,不是很好)。我几乎记不得昨天之前的事情,更记不得我的门和金门大桥脚之间的时间差! -作为臂助,我使用一些小部件和菜单项来让我保持同步。在我常规工作日的空间里,我在多个操作系统间游弋,涵盖移动系统和桌面系统,但只有一个让我最快速便捷地设置“世界时钟”。 +作为臂助,我使用一些小部件和菜单项来让我保持同步。在我常规工作日的空间里,我在多个操作系统间游弋,涵盖移动系统和桌面系统,但只有一个可以让我最快速便捷地设置“世界时钟”。 -**而它刚好是那个名字放在门上方的东西。** +**它的名字就是我们标题上提到的那个。** ![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/timezones-300x180.jpg) @@ -16,10 +16,10 @@ Ubuntu中跟踪多个时区的简捷方法 Unity中默认的日期-时间指示器提供了添加并查看多个时区的支持,不需要附加组件,不需要额外的包。 -1. 点击时钟小应用,然后uxuanze‘**时间和日期设置**’条目 +1. 点击时钟小应用,然后选择‘**时间和日期设置**’条目 1. 在‘**时钟**’标签中,选中‘**其它位置的时间**’选框 1. 点击‘**选择位置**’按钮 -1. 点击‘**+**’,然后输入位置名称那个 +1. 点击‘**+**’,然后输入位置名称 #### 其它桌面环境 #### @@ -34,13 +34,13 @@ Unity中默认的日期-时间指示器提供了添加并查看多个时区的 ![World Clock Calendar in Cinnamon 2.4](http://www.omgubuntu.co.uk/wp-content/uploads/2014/12/cinnamon-applet.jpg) -Cinnamon 2.4中的世界时钟日历 +*Cinnamon 2.4中的世界时钟日历* -**XFCE**和**LXDE**就不那么慷慨了,除了自带的“工作区”作为**多个时钟**添加到面板外,每个都需要手动配置以指定位置。两个都支持‘指示器小部件’,所以,如果你没有依赖于Unity,你可以安装/添加单独的日期/时间指示器。 +**XFCE**和**LXDE**就不那么慷慨了,除了自带的“工作区”作为**多个时钟**添加到面板外,每个都需要手动配置以指定位置。两个都支持‘指示器小部件’,所以,如果你不用Unity的话,你可以安装/添加单独的日期/时间指示器。 -**Budgie**还刚初出茅庐,不足以胜任角落里的需求,因为Pantheon我还没试过——希望你们通过评论来让我知道得更多。 +**Budgie**还刚初出茅庐,不足以胜任这种角落里的需求,因为Pantheon我还没试过——希望你们通过评论来让我知道得更多。 -#### Desktop Apps, Widgets & Conky Themes桌面应用、不见和Conky主题 #### +#### 桌面应用、部件和Conky主题 #### 当然,面板小部件只是收纳其它国家多个时区的一种方式。如果你不满意通过面板去访问,那里还有各种各样的**桌面应用**可供使用,其中许多都可以跨版本,甚至跨平台使用。 @@ -54,7 +54,7 @@ via: http://www.omgubuntu.co.uk/2014/12/add-time-zones-world-clock-ubuntu 作者:[Joey-Elijah Sneddon][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 02766f1a2b07ce87a31aba09d77ef0a70326b99f Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 1 Feb 2015 11:07:13 +0800 Subject: [PATCH 080/104] PUB:20141223 20 Linux Commands Interview Questions & Answers @ZTinoZ --- ... Commands Interview Questions & Answers.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/talk => published}/20141223 20 Linux Commands Interview Questions & Answers.md (71%) diff --git a/translated/talk/20141223 20 Linux Commands Interview Questions & Answers.md b/published/20141223 20 Linux Commands Interview Questions & Answers.md similarity index 71% rename from translated/talk/20141223 20 Linux Commands Interview Questions & Answers.md rename to published/20141223 20 Linux Commands Interview Questions & Answers.md index 40d5019c52..d7e20f6b24 100644 --- a/translated/talk/20141223 20 Linux Commands Interview Questions & Answers.md +++ b/published/20141223 20 Linux Commands Interview Questions & Answers.md @@ -8,7 +8,7 @@ 答: 用 “route -n” 和 “netstat -nr” 命令,我们可以查看默认网关。除了默认的网关信息,这两个命令还可以显示当前的路由表。 -**问:3 如何在Linux上重建初始化内存盘影响文件?** +**问:3 如何在Linux上重建初始化内存盘镜像文件?** 答: 在CentOS 5.X / RHEL 5.X中,可以用mkinitrd命令来创建初始化内存盘文件,举例如下: @@ -30,7 +30,7 @@ **问:5 patch命令是什么?如何使用?** -答: 顾名思义,patch命令就是用来将修改(或补丁)写进文本文件里。Patch命令通常是接收diff的输出并把文件的旧版本转换为新版本。举个例子,Linux内核源代码由百万行代码文件构成,所以无论何时,任何代码贡献者贡献出代码,只需发送改动的部分而不是整个源代码,然后接收者用patch命令将改动写进原始的源代码里。 +答: 顾名思义,patch命令就是用来将修改(或补丁)写进文本文件里。patch命令通常是接收diff的输出并把文件的旧版本转换为新版本。举个例子,Linux内核源代码由百万行代码文件构成,所以无论何时,任何代码贡献者贡献出代码,只需发送改动的部分而不是整个源代码,然后接收者用patch命令将改动写进原始的源代码里。 创建一个diff文件给patch使用, @@ -44,7 +44,7 @@ **问:6 aspell有什么用 ?** -答: 顾名思义,aspell就是Linux操作系统上的一款交互式拼写检查器。aspell命令继任了更早的一个名为ispell的程序,并且作为一款嵌入式替代品 ,最重要的是它非常好用。当aspell程序主要被其它一些需要拼写检查能力的程序所使用的时候,在命令行中作为一个独立运行的工具的它也能十分有效。 +答: 顾名思义,aspell就是Linux操作系统上的一款交互式拼写检查器。aspell命令继任了更早的一个名为ispell的程序,并且作为一款免费替代品 ,最重要的是它非常好用。当aspell程序主要被其它一些需要拼写检查能力的程序所使用的时候,在命令行中作为一个独立运行的工具的它也能十分有效。 **问:7 如何从命令行查看域SPF记录?** @@ -56,7 +56,7 @@ 答: # rpm -qf /etc/fstab -以上命令能列出供应给“/etc/fstab”文件的包。 +以上命令能列出提供“/etc/fstab”这个文件的包。 **问:9 哪条命令用来查看bond0的状态?** @@ -64,7 +64,7 @@ **问:10 Linux系统中的/proc文件系统有什么用?** -答: /proc文件系统是一个基于维护关于当前正在运行的内核状态信息的文件系统的随机存取存储器(RAM),其中包括CPU、内存、分区划分、I/O地址、直接内存访问通道和正在运行的进程。这个文件系统所代表的是各种不实际存储信息的文件,它们指向的是内存里的信息。/proc文件系统是由系统自动维护的。 +答: /proc文件系统是一个基于内存的文件系统,其维护着关于当前正在运行的内核状态信息,其中包括CPU、内存、分区划分、I/O地址、直接内存访问通道和正在运行的进程。这个文件系统所代表的并不是各种实际存储信息的文件,它们指向的是内存里的信息。/proc文件系统是由系统自动维护的。 **问:11 如何在/usr目录下找出大小超过10MB的文件?** @@ -78,21 +78,21 @@ 答: # find /var \\! -atime -90 -**问:14 在整个目录树下查找核心文件,如发现则删除它们且不提示确认信息。** +**问:14 在整个目录树下查找文件“core”,如发现则无需提示直接删除它们。** 答: # find / -name core -exec rm {} \; **问:15 strings命令有什么作用?** -答: strings命令用来提取和显示非文本文件的清晰内容。 +答: strings命令用来提取和显示非文本文件中的文本字符串。(LCTT 译注:当用来分析你系统上莫名其妙出现的二进制程序时,可以从中找到可疑的文件访问,对于追查入侵有用处) -**问:16 tee filter有什么作用 ?** +**问:16 tee 过滤器有什么作用 ?** -答: tee filter用来向多个目标发送输出内容。它可以向一个文件发送一份输出的拷贝并且如果使用管道的话可以在屏幕上(或一些其它程序)输出其它内容。 +答: tee 过滤器用来向多个目标发送输出内容。如果用于管道的话,它可以将输出复制一份到一个文件,并复制另外一份到屏幕上(或一些其它程序)。 linuxtechi@localhost:~$ ll /etc | nl | tee /tmp/ll.out -在以上例子中,从ll输出的是在 /tmp/ll.out 文件中被捕获的,输出同样在屏幕上显示了出来。 +在以上例子中,从ll输出可以捕获到 /tmp/ll.out 文件中,并且同样在屏幕上显示了出来。 **问:17 export PS1 = ”$LOGNAME@`hostname`:\$PWD: 这条命令是在做什么?** @@ -108,7 +108,7 @@ **问:20 linux中lspci命令的作用是什么?** -答: lspci命令用来显示你的系统上PCI总线和附加设备的信息。指定-v,-vv或-vvv来获取详细输出,加上-r参数的话,命令的输出则会更具有易读性。 +答: lspci命令用来显示你的系统上PCI总线和附加设备的信息。指定-v,-vv或-vvv来获取越来越详细的输出,加上-r参数的话,命令的输出则会更具有易读性。 -------------------------------------------------------------------------------- @@ -116,7 +116,7 @@ via: http://www.linuxtechi.com/20-linux-commands-interview-questions-answers/ 作者:[Pradeep Kumar][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From c5b7cdcd7b0340a7627878e5782fa79786a39865 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 1 Feb 2015 11:29:31 +0800 Subject: [PATCH 081/104] PUB:20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux @Vic020 --- ...swers--How to install Kingsoft Office on Linux.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) rename {translated/tech => published}/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md (79%) diff --git a/translated/tech/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md b/published/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md similarity index 79% rename from translated/tech/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md rename to published/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md index 0c7a0110b1..28cef519f8 100644 --- a/translated/tech/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md +++ b/published/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md @@ -1,13 +1,11 @@ -Linux有问必答 - linux如何安装WPS +Linux有问必答 - 如何在linux上安装WPS ================================================================================ > **问题**: 我听说一个好东西Kingsoft Office(译注:就是WPS),所以我想在我的Linux上试试。我怎样才能安装Kingsoft Office呢? -Kingsoft Office 一套办公套件,支持多个平台,包括Windows, Linux, iOS 和 Android。它包含三个组件:Writer(WPS文字)用来文字处理,Presentation(WPS演示)支持幻灯片,Spereadsheets(WPS表格)为电子表格。使用免费增值模式,其中基础版本是免费使用。比较其他的linux办公套件,如LibreOffice、 OpenOffice,最大优势在于,Kingsoft Office能最好的兼容微软的Office(译注:版权问题?了解下wps和Office的历史问题,可以得到一些结论)。因此如果你需要在windowns和linux平台间交互,Kingsoft office是一个很好的选择。 - +Kingsoft Office 是一套办公套件,支持多个平台,包括Windows, Linux, iOS 和 Android。它包含三个组件:Writer(WPS文字)用来文字处理,Presentation(WPS演示)支持幻灯片,Spereadsheets(WPS表格)是电子表格。其使用免费增值模式,其中基础版本是免费使用。比较其他的linux办公套件,如LibreOffice、 OpenOffice,其最大优势在于,Kingsoft Office能最好的兼容微软的Office(译注:版权问题?了解下wps和Office的历史问题,可以得到一些结论)。因此如果你需要在windows和linux平台间交互,Kingsoft office是一个很好的选择。 ### CentOS, Fedora 或 RHEL中安装Kingsoft Office ### - 在[官方页面][1]下载RPM文件.官方RPM包只支持32位版本linux,但是你可以在64位中安装。 需要使用yum命令并用"localinstall"选项来本地安装这个RPM包 @@ -39,7 +37,7 @@ DEB包同样遇到一堆依赖。因此使用[gdebi][3]命令来代替dpkg来自 ### 启动 Kingsoft Office ### -安装完成后,你就可以在桌面管理器轻松启动Witer(WPS文字), Presentation(WPS演示), and Spreadsheets(WPS表格),如下图 +安装完成后,你就可以在桌面管理器轻松启动Witer(WPS文字), Presentation(WPS演示), and Spreadsheets(WPS表格),如下图。 Ubuntu Unity中: @@ -49,7 +47,7 @@ GNOME桌面中: ![](https://farm9.staticflickr.com/8617/16039583622_4e7c1d8545_b.jpg) -不但如此,你也可以在命令行中启动Kingsoft Office +不但如此,你也可以在命令行中启动Kingsoft Office。 启动Wirter(WPS文字),使用这个命令: @@ -74,7 +72,7 @@ GNOME桌面中: via: http://ask.xmodulo.com/install-kingsoft-office-linux.html 译者:[Vic020/VicYu](http://www.vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 27bf18f3a648bd04a2c5eeecc308a0d72901802d Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 1 Feb 2015 11:40:04 +0800 Subject: [PATCH 082/104] PUB:20150127 Install Jetty Web Server On CentOS 7 @geekpi --- .../20150127 Install Jetty Web Server On CentOS 7.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150127 Install Jetty Web Server On CentOS 7.md (79%) diff --git a/translated/tech/20150127 Install Jetty Web Server On CentOS 7.md b/published/20150127 Install Jetty Web Server On CentOS 7.md similarity index 79% rename from translated/tech/20150127 Install Jetty Web Server On CentOS 7.md rename to published/20150127 Install Jetty Web Server On CentOS 7.md index 3cdb89ca76..3de2c7d9fb 100644 --- a/translated/tech/20150127 Install Jetty Web Server On CentOS 7.md +++ b/published/20150127 Install Jetty Web Server On CentOS 7.md @@ -1,8 +1,8 @@ 在CentOS 7中安装Jetty服务器 ================================================================================ -[Jetty][1] 是一款纯Java的HTTP **(Web) 服务器**和Java Servlet容器。 通常在更大的网络框架中,Jetty经常用于设备间的通信。但是其他Web服务器通常给人类传递文件。Jetty是一个Eclipse基金中免费开源项目。这个Web服务器用于如Apache ActiveMQ、 Alfresco、 Apache Geronimo、 Apache Maven、 Apache Spark、Google App Engine、 Eclipse、 FUSE、 Twitter的 Streaming API 和 Zimbra中。 +[Jetty][1] 是一款纯Java的HTTP **(Web) 服务器**和Java Servlet容器。 通常在更大的网络框架中,Jetty经常用于设备间的通信,而其他Web服务器通常给“人类”传递文件 :D。Jetty是一个Eclipse基金会的免费开源项目。这个Web服务器用于如Apache ActiveMQ、 Alfresco、 Apache Geronimo、 Apache Maven、 Apache Spark、Google App Engine、 Eclipse、 FUSE、 Twitter的 Streaming API 和 Zimbra中。 -这篇文章会解释‘如何在CentOS服务器中安装Jetty服务器’。 +这篇文章会介绍‘如何在CentOS服务器中安装Jetty服务器’。 **首先我们要用下面的命令安装JDK:** @@ -58,7 +58,7 @@ 完成了! -现在你可以在 **http://:8080** 中访问了 +现在你可以在 **http://\<你的 IP 地址>:8080** 中访问了 就是这样。 @@ -70,7 +70,7 @@ via: http://www.unixmen.com/install-jetty-web-server-centos-7/ 作者:[Jijo][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 3888bd0147bf3c0e18235eca2696d71c6d35c7a3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 1 Feb 2015 11:40:53 +0800 Subject: [PATCH 083/104] translating --- ...To Monitor Access Point Signal Strength With wifi-linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md b/sources/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md index d652b15d8c..e4d380aa94 100644 --- a/sources/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md +++ b/sources/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md @@ -1,3 +1,5 @@ +Translating----geekpi + How To Monitor Access Point Signal Strength With wifi-linux ================================================================================ As a python geek I love exploring new python tools on github that target the linux users. Today I discovered a simple application written in python programming language that can be used to monitor access point signal strength. @@ -83,4 +85,4 @@ via: http://linoxide.com/linux-how-to/monitor-access-point-signal-strength-wifi- 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/oltjano/ \ No newline at end of file +[a]:http://linoxide.com/author/oltjano/ From 4bba943f961bc8f6d6ceb84af662644a8aa16830 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 1 Feb 2015 11:41:31 +0800 Subject: [PATCH 084/104] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20201501?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Backup and Restore Your Apps and PPAs in Ubuntu Using Aptik.md | 0 ...0701 Easy File Comparisons With These Great Free Diff Tools.md | 0 ...th Apple Watch Unveiled, Could an Ubuntu Smartwatch Be Next.md | 0 ...40912 What' s wrong with IPv4 and Why we are moving to IPv6.md | 0 .../20140915 10 Open Source Cloning Software For Linux Users.md | 0 .../20140926 ChromeOS vs Linux--The Good, the Bad and the Ugly.md | 0 .../20140928 What is a good subtitle editor on Linux.md | 0 .../20140929 What Linux Users Should Know About Open Hardware.md | 0 ...8 How to configure HTTP load balancer with HAProxy on Linux.md | 0 ...1009 How to convert image audio and video formats on Ubuntu.md | 0 .../20141013 How to configure peer-to-peer VPN on Linux.md | 0 ... How to turn your CentOS box into a BGP router using Quagga.md | 0 .../20141023 What are useful Bash aliases and functions.md | 0 published/{ => 201501}/20141027 ntpq -p output.md | 0 ...Open Source Backup Software For Linux and Unix-like Systems.md | 0 published/{ => 201501}/20141108 When hackers grow old.md | 0 .../20141112 How to Debug CPU Regressions Using Flame Graphs.md | 0 ...5 How to perform system backup with backup-manager on Linux.md | 0 .../20141115 What are some obscure but useful Vim commands.md | 0 ...stricting process CPU usage using nice cpulimit and cgroups.md | 0 .../20141118 How to boot on an ISO image from Grub.md | 0 ...0141119 Smartctl--Monitoring & Analysis tool for Hard drive.md | 0 ...41120 How to configure and secure your Postfix email server.md | 0 .../20141120 How to install an Opensource VPN Server on Linux.md | 0 .../20141124 Important 10 Linux ps command Practical Examples.md | 0 .../20141124 Linux blkid Command to Find Block Devices Details.md | 0 ...5 Four ways Linux is headed for no-downtime kernel patching.md | 0 ...w to install Cacti (Monitoring tool) on ubuntu 14.10 server.md | 0 .../20141127 Five Magnificent Linux Music Streaming Clients.md | 0 ...How To Create A Multiboot USB From Ubuntu Using MultiSystem.md | 0 published/{ => 201501}/20141203 Docker--Present and Future.md | 0 .../20141204 How To Delete Oracle 11g Database Manually.md | 0 ... To Run Linux Programs From The Terminal In Background Mode.md | 0 .../20141205 10 free Commands to Check Memory Usage in Linux.md | 0 ...0141205 Find Out Network Adapters Available In Ubuntu Linux.md | 0 ...5 How To Create A Bootable Ubuntu USB Drive For Mac In OS X.md | 0 ... (Java servlet engine and webserver) on Ubuntu 14.10 Server.md | 0 ...s--How to disable Apport internal error reporting on Ubuntu.md | 0 ...ants to Change OS for Radar System from Windows XP to Linux.md | 0 ...20141210 How to use Evernote from the command line on Linux.md | 0 published/{ => 201501}/20141211 NetHack.md | 0 ..., This Trojan Infects Linux. No, It' s Not The Tuxpocalypse.md | 0 ...141222 A Great Tool To Show Linux Command Progress Like ETA.md | 0 ...222 How to Sync Time Properly with NTP Server in CentOS 7.x.md | 0 .../20141224 Calife--A lightweight alternative to sudo.md | 0 ...Qs with Answers--How to check SSH protocol version on Linux.md | 0 ...41224 Linux FAQs with Answers--How to install 7zip on Linux.md | 0 ...x FAQs with Answers--How to install kernel headers on Linux.md | 0 .../20141226 The Good The Bad And The Ugly Of Linux In 2014.md | 0 ...ix The UEFI Bootloader When Dual Booting Windows And Ubuntu.md | 0 ...0141229 How to Install Bugzilla 4.4 on Ubuntu or CentOS 6.x.md | 0 published/{ => 201501}/20150104 Docker Image Insecurity.md | 0 .../20150106 2015--Open Source Has Won, But It Isn't Finished.md | 0 ...20150106 How To Install New Fonts In Ubuntu 14.04 and 14.10.md | 0 ... Answers--How to boot into command line on Ubuntu or Debian.md | 0 ...0150126 Data of 20 Million Users Stolen from Dating Website.md | 0 .../How to Setup Bind Chroot DNS Server on CentOS 7.0 VPS.md | 0 .../How to filter, split or merge pcap files on Linux.md | 0 published/{ => 201501}/Quick systemd-nspawn guide.md | 0 59 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201501}/20100105 How to Backup and Restore Your Apps and PPAs in Ubuntu Using Aptik.md (100%) rename published/{ => 201501}/20140701 Easy File Comparisons With These Great Free Diff Tools.md (100%) rename published/{ => 201501}/20140910 With Apple Watch Unveiled, Could an Ubuntu Smartwatch Be Next.md (100%) rename published/{ => 201501}/20140912 What' s wrong with IPv4 and Why we are moving to IPv6.md (100%) rename published/{ => 201501}/20140915 10 Open Source Cloning Software For Linux Users.md (100%) rename published/{ => 201501}/20140926 ChromeOS vs Linux--The Good, the Bad and the Ugly.md (100%) rename published/{ => 201501}/20140928 What is a good subtitle editor on Linux.md (100%) rename published/{ => 201501}/20140929 What Linux Users Should Know About Open Hardware.md (100%) rename published/{ => 201501}/20141008 How to configure HTTP load balancer with HAProxy on Linux.md (100%) rename published/{ => 201501}/20141009 How to convert image audio and video formats on Ubuntu.md (100%) rename published/{ => 201501}/20141013 How to configure peer-to-peer VPN on Linux.md (100%) rename published/{ => 201501}/20141023 How to turn your CentOS box into a BGP router using Quagga.md (100%) rename published/{ => 201501}/20141023 What are useful Bash aliases and functions.md (100%) rename published/{ => 201501}/20141027 ntpq -p output.md (100%) rename published/{ => 201501}/20141106 5 Awesome Open Source Backup Software For Linux and Unix-like Systems.md (100%) rename published/{ => 201501}/20141108 When hackers grow old.md (100%) rename published/{ => 201501}/20141112 How to Debug CPU Regressions Using Flame Graphs.md (100%) rename published/{ => 201501}/20141115 How to perform system backup with backup-manager on Linux.md (100%) rename published/{ => 201501}/20141115 What are some obscure but useful Vim commands.md (100%) rename published/{ => 201501}/20141117 Restricting process CPU usage using nice cpulimit and cgroups.md (100%) rename published/{ => 201501}/20141118 How to boot on an ISO image from Grub.md (100%) rename published/{ => 201501}/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md (100%) rename published/{ => 201501}/20141120 How to configure and secure your Postfix email server.md (100%) rename published/{ => 201501}/20141120 How to install an Opensource VPN Server on Linux.md (100%) rename published/{ => 201501}/20141124 Important 10 Linux ps command Practical Examples.md (100%) rename published/{ => 201501}/20141124 Linux blkid Command to Find Block Devices Details.md (100%) rename published/{ => 201501}/20141125 Four ways Linux is headed for no-downtime kernel patching.md (100%) rename published/{ => 201501}/20141125 How to install Cacti (Monitoring tool) on ubuntu 14.10 server.md (100%) rename published/{ => 201501}/20141127 Five Magnificent Linux Music Streaming Clients.md (100%) rename published/{ => 201501}/20141127 How To Create A Multiboot USB From Ubuntu Using MultiSystem.md (100%) rename published/{ => 201501}/20141203 Docker--Present and Future.md (100%) rename published/{ => 201501}/20141204 How To Delete Oracle 11g Database Manually.md (100%) rename published/{ => 201501}/20141204 How To Run Linux Programs From The Terminal In Background Mode.md (100%) rename published/{ => 201501}/20141205 10 free Commands to Check Memory Usage in Linux.md (100%) rename published/{ => 201501}/20141205 Find Out Network Adapters Available In Ubuntu Linux.md (100%) rename published/{ => 201501}/20141205 How To Create A Bootable Ubuntu USB Drive For Mac In OS X.md (100%) rename published/{ => 201501}/20141208 Install Jetty 9 (Java servlet engine and webserver) on Ubuntu 14.10 Server.md (100%) rename published/{ => 201501}/20141208 Linux FAQs with Answers--How to disable Apport internal error reporting on Ubuntu.md (100%) rename published/{ => 201501}/20141208 U.S. Marine Corps Wants to Change OS for Radar System from Windows XP to Linux.md (100%) rename published/{ => 201501}/20141210 How to use Evernote from the command line on Linux.md (100%) rename published/{ => 201501}/20141211 NetHack.md (100%) rename published/{ => 201501}/20141211 Yes, This Trojan Infects Linux. No, It' s Not The Tuxpocalypse.md (100%) rename published/{ => 201501}/20141222 A Great Tool To Show Linux Command Progress Like ETA.md (100%) rename published/{ => 201501}/20141222 How to Sync Time Properly with NTP Server in CentOS 7.x.md (100%) rename published/{ => 201501}/20141224 Calife--A lightweight alternative to sudo.md (100%) rename published/{ => 201501}/20141224 Linux FAQs with Answers--How to check SSH protocol version on Linux.md (100%) rename published/{ => 201501}/20141224 Linux FAQs with Answers--How to install 7zip on Linux.md (100%) rename published/{ => 201501}/20141224 Linux FAQs with Answers--How to install kernel headers on Linux.md (100%) rename published/{ => 201501}/20141226 The Good The Bad And The Ugly Of Linux In 2014.md (100%) rename published/{ => 201501}/20141229 2 Ways To Fix The UEFI Bootloader When Dual Booting Windows And Ubuntu.md (100%) rename published/{ => 201501}/20141229 How to Install Bugzilla 4.4 on Ubuntu or CentOS 6.x.md (100%) rename published/{ => 201501}/20150104 Docker Image Insecurity.md (100%) rename published/{ => 201501}/20150106 2015--Open Source Has Won, But It Isn't Finished.md (100%) rename published/{ => 201501}/20150106 How To Install New Fonts In Ubuntu 14.04 and 14.10.md (100%) rename published/{ => 201501}/20150121 Linux FAQs with Answers--How to boot into command line on Ubuntu or Debian.md (100%) rename published/{ => 201501}/20150126 Data of 20 Million Users Stolen from Dating Website.md (100%) rename published/{ => 201501}/How to Setup Bind Chroot DNS Server on CentOS 7.0 VPS.md (100%) rename published/{ => 201501}/How to filter, split or merge pcap files on Linux.md (100%) rename published/{ => 201501}/Quick systemd-nspawn guide.md (100%) diff --git a/published/20100105 How to Backup and Restore Your Apps and PPAs in Ubuntu Using Aptik.md b/published/201501/20100105 How to Backup and Restore Your Apps and PPAs in Ubuntu Using Aptik.md similarity index 100% rename from published/20100105 How to Backup and Restore Your Apps and PPAs in Ubuntu Using Aptik.md rename to published/201501/20100105 How to Backup and Restore Your Apps and PPAs in Ubuntu Using Aptik.md diff --git a/published/20140701 Easy File Comparisons With These Great Free Diff Tools.md b/published/201501/20140701 Easy File Comparisons With These Great Free Diff Tools.md similarity index 100% rename from published/20140701 Easy File Comparisons With These Great Free Diff Tools.md rename to published/201501/20140701 Easy File Comparisons With These Great Free Diff Tools.md diff --git a/published/20140910 With Apple Watch Unveiled, Could an Ubuntu Smartwatch Be Next.md b/published/201501/20140910 With Apple Watch Unveiled, Could an Ubuntu Smartwatch Be Next.md similarity index 100% rename from published/20140910 With Apple Watch Unveiled, Could an Ubuntu Smartwatch Be Next.md rename to published/201501/20140910 With Apple Watch Unveiled, Could an Ubuntu Smartwatch Be Next.md diff --git a/published/20140912 What' s wrong with IPv4 and Why we are moving to IPv6.md b/published/201501/20140912 What' s wrong with IPv4 and Why we are moving to IPv6.md similarity index 100% rename from published/20140912 What' s wrong with IPv4 and Why we are moving to IPv6.md rename to published/201501/20140912 What' s wrong with IPv4 and Why we are moving to IPv6.md diff --git a/published/20140915 10 Open Source Cloning Software For Linux Users.md b/published/201501/20140915 10 Open Source Cloning Software For Linux Users.md similarity index 100% rename from published/20140915 10 Open Source Cloning Software For Linux Users.md rename to published/201501/20140915 10 Open Source Cloning Software For Linux Users.md diff --git a/published/20140926 ChromeOS vs Linux--The Good, the Bad and the Ugly.md b/published/201501/20140926 ChromeOS vs Linux--The Good, the Bad and the Ugly.md similarity index 100% rename from published/20140926 ChromeOS vs Linux--The Good, the Bad and the Ugly.md rename to published/201501/20140926 ChromeOS vs Linux--The Good, the Bad and the Ugly.md diff --git a/published/20140928 What is a good subtitle editor on Linux.md b/published/201501/20140928 What is a good subtitle editor on Linux.md similarity index 100% rename from published/20140928 What is a good subtitle editor on Linux.md rename to published/201501/20140928 What is a good subtitle editor on Linux.md diff --git a/published/20140929 What Linux Users Should Know About Open Hardware.md b/published/201501/20140929 What Linux Users Should Know About Open Hardware.md similarity index 100% rename from published/20140929 What Linux Users Should Know About Open Hardware.md rename to published/201501/20140929 What Linux Users Should Know About Open Hardware.md diff --git a/published/20141008 How to configure HTTP load balancer with HAProxy on Linux.md b/published/201501/20141008 How to configure HTTP load balancer with HAProxy on Linux.md similarity index 100% rename from published/20141008 How to configure HTTP load balancer with HAProxy on Linux.md rename to published/201501/20141008 How to configure HTTP load balancer with HAProxy on Linux.md diff --git a/published/20141009 How to convert image audio and video formats on Ubuntu.md b/published/201501/20141009 How to convert image audio and video formats on Ubuntu.md similarity index 100% rename from published/20141009 How to convert image audio and video formats on Ubuntu.md rename to published/201501/20141009 How to convert image audio and video formats on Ubuntu.md diff --git a/published/20141013 How to configure peer-to-peer VPN on Linux.md b/published/201501/20141013 How to configure peer-to-peer VPN on Linux.md similarity index 100% rename from published/20141013 How to configure peer-to-peer VPN on Linux.md rename to published/201501/20141013 How to configure peer-to-peer VPN on Linux.md diff --git a/published/20141023 How to turn your CentOS box into a BGP router using Quagga.md b/published/201501/20141023 How to turn your CentOS box into a BGP router using Quagga.md similarity index 100% rename from published/20141023 How to turn your CentOS box into a BGP router using Quagga.md rename to published/201501/20141023 How to turn your CentOS box into a BGP router using Quagga.md diff --git a/published/20141023 What are useful Bash aliases and functions.md b/published/201501/20141023 What are useful Bash aliases and functions.md similarity index 100% rename from published/20141023 What are useful Bash aliases and functions.md rename to published/201501/20141023 What are useful Bash aliases and functions.md diff --git a/published/20141027 ntpq -p output.md b/published/201501/20141027 ntpq -p output.md similarity index 100% rename from published/20141027 ntpq -p output.md rename to published/201501/20141027 ntpq -p output.md diff --git a/published/20141106 5 Awesome Open Source Backup Software For Linux and Unix-like Systems.md b/published/201501/20141106 5 Awesome Open Source Backup Software For Linux and Unix-like Systems.md similarity index 100% rename from published/20141106 5 Awesome Open Source Backup Software For Linux and Unix-like Systems.md rename to published/201501/20141106 5 Awesome Open Source Backup Software For Linux and Unix-like Systems.md diff --git a/published/20141108 When hackers grow old.md b/published/201501/20141108 When hackers grow old.md similarity index 100% rename from published/20141108 When hackers grow old.md rename to published/201501/20141108 When hackers grow old.md diff --git a/published/20141112 How to Debug CPU Regressions Using Flame Graphs.md b/published/201501/20141112 How to Debug CPU Regressions Using Flame Graphs.md similarity index 100% rename from published/20141112 How to Debug CPU Regressions Using Flame Graphs.md rename to published/201501/20141112 How to Debug CPU Regressions Using Flame Graphs.md diff --git a/published/20141115 How to perform system backup with backup-manager on Linux.md b/published/201501/20141115 How to perform system backup with backup-manager on Linux.md similarity index 100% rename from published/20141115 How to perform system backup with backup-manager on Linux.md rename to published/201501/20141115 How to perform system backup with backup-manager on Linux.md diff --git a/published/20141115 What are some obscure but useful Vim commands.md b/published/201501/20141115 What are some obscure but useful Vim commands.md similarity index 100% rename from published/20141115 What are some obscure but useful Vim commands.md rename to published/201501/20141115 What are some obscure but useful Vim commands.md diff --git a/published/20141117 Restricting process CPU usage using nice cpulimit and cgroups.md b/published/201501/20141117 Restricting process CPU usage using nice cpulimit and cgroups.md similarity index 100% rename from published/20141117 Restricting process CPU usage using nice cpulimit and cgroups.md rename to published/201501/20141117 Restricting process CPU usage using nice cpulimit and cgroups.md diff --git a/published/20141118 How to boot on an ISO image from Grub.md b/published/201501/20141118 How to boot on an ISO image from Grub.md similarity index 100% rename from published/20141118 How to boot on an ISO image from Grub.md rename to published/201501/20141118 How to boot on an ISO image from Grub.md diff --git a/published/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md b/published/201501/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md similarity index 100% rename from published/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md rename to published/201501/20141119 Smartctl--Monitoring & Analysis tool for Hard drive.md diff --git a/published/20141120 How to configure and secure your Postfix email server.md b/published/201501/20141120 How to configure and secure your Postfix email server.md similarity index 100% rename from published/20141120 How to configure and secure your Postfix email server.md rename to published/201501/20141120 How to configure and secure your Postfix email server.md diff --git a/published/20141120 How to install an Opensource VPN Server on Linux.md b/published/201501/20141120 How to install an Opensource VPN Server on Linux.md similarity index 100% rename from published/20141120 How to install an Opensource VPN Server on Linux.md rename to published/201501/20141120 How to install an Opensource VPN Server on Linux.md diff --git a/published/20141124 Important 10 Linux ps command Practical Examples.md b/published/201501/20141124 Important 10 Linux ps command Practical Examples.md similarity index 100% rename from published/20141124 Important 10 Linux ps command Practical Examples.md rename to published/201501/20141124 Important 10 Linux ps command Practical Examples.md diff --git a/published/20141124 Linux blkid Command to Find Block Devices Details.md b/published/201501/20141124 Linux blkid Command to Find Block Devices Details.md similarity index 100% rename from published/20141124 Linux blkid Command to Find Block Devices Details.md rename to published/201501/20141124 Linux blkid Command to Find Block Devices Details.md diff --git a/published/20141125 Four ways Linux is headed for no-downtime kernel patching.md b/published/201501/20141125 Four ways Linux is headed for no-downtime kernel patching.md similarity index 100% rename from published/20141125 Four ways Linux is headed for no-downtime kernel patching.md rename to published/201501/20141125 Four ways Linux is headed for no-downtime kernel patching.md diff --git a/published/20141125 How to install Cacti (Monitoring tool) on ubuntu 14.10 server.md b/published/201501/20141125 How to install Cacti (Monitoring tool) on ubuntu 14.10 server.md similarity index 100% rename from published/20141125 How to install Cacti (Monitoring tool) on ubuntu 14.10 server.md rename to published/201501/20141125 How to install Cacti (Monitoring tool) on ubuntu 14.10 server.md diff --git a/published/20141127 Five Magnificent Linux Music Streaming Clients.md b/published/201501/20141127 Five Magnificent Linux Music Streaming Clients.md similarity index 100% rename from published/20141127 Five Magnificent Linux Music Streaming Clients.md rename to published/201501/20141127 Five Magnificent Linux Music Streaming Clients.md diff --git a/published/20141127 How To Create A Multiboot USB From Ubuntu Using MultiSystem.md b/published/201501/20141127 How To Create A Multiboot USB From Ubuntu Using MultiSystem.md similarity index 100% rename from published/20141127 How To Create A Multiboot USB From Ubuntu Using MultiSystem.md rename to published/201501/20141127 How To Create A Multiboot USB From Ubuntu Using MultiSystem.md diff --git a/published/20141203 Docker--Present and Future.md b/published/201501/20141203 Docker--Present and Future.md similarity index 100% rename from published/20141203 Docker--Present and Future.md rename to published/201501/20141203 Docker--Present and Future.md diff --git a/published/20141204 How To Delete Oracle 11g Database Manually.md b/published/201501/20141204 How To Delete Oracle 11g Database Manually.md similarity index 100% rename from published/20141204 How To Delete Oracle 11g Database Manually.md rename to published/201501/20141204 How To Delete Oracle 11g Database Manually.md diff --git a/published/20141204 How To Run Linux Programs From The Terminal In Background Mode.md b/published/201501/20141204 How To Run Linux Programs From The Terminal In Background Mode.md similarity index 100% rename from published/20141204 How To Run Linux Programs From The Terminal In Background Mode.md rename to published/201501/20141204 How To Run Linux Programs From The Terminal In Background Mode.md diff --git a/published/20141205 10 free Commands to Check Memory Usage in Linux.md b/published/201501/20141205 10 free Commands to Check Memory Usage in Linux.md similarity index 100% rename from published/20141205 10 free Commands to Check Memory Usage in Linux.md rename to published/201501/20141205 10 free Commands to Check Memory Usage in Linux.md diff --git a/published/20141205 Find Out Network Adapters Available In Ubuntu Linux.md b/published/201501/20141205 Find Out Network Adapters Available In Ubuntu Linux.md similarity index 100% rename from published/20141205 Find Out Network Adapters Available In Ubuntu Linux.md rename to published/201501/20141205 Find Out Network Adapters Available In Ubuntu Linux.md diff --git a/published/20141205 How To Create A Bootable Ubuntu USB Drive For Mac In OS X.md b/published/201501/20141205 How To Create A Bootable Ubuntu USB Drive For Mac In OS X.md similarity index 100% rename from published/20141205 How To Create A Bootable Ubuntu USB Drive For Mac In OS X.md rename to published/201501/20141205 How To Create A Bootable Ubuntu USB Drive For Mac In OS X.md diff --git a/published/20141208 Install Jetty 9 (Java servlet engine and webserver) on Ubuntu 14.10 Server.md b/published/201501/20141208 Install Jetty 9 (Java servlet engine and webserver) on Ubuntu 14.10 Server.md similarity index 100% rename from published/20141208 Install Jetty 9 (Java servlet engine and webserver) on Ubuntu 14.10 Server.md rename to published/201501/20141208 Install Jetty 9 (Java servlet engine and webserver) on Ubuntu 14.10 Server.md diff --git a/published/20141208 Linux FAQs with Answers--How to disable Apport internal error reporting on Ubuntu.md b/published/201501/20141208 Linux FAQs with Answers--How to disable Apport internal error reporting on Ubuntu.md similarity index 100% rename from published/20141208 Linux FAQs with Answers--How to disable Apport internal error reporting on Ubuntu.md rename to published/201501/20141208 Linux FAQs with Answers--How to disable Apport internal error reporting on Ubuntu.md diff --git a/published/20141208 U.S. Marine Corps Wants to Change OS for Radar System from Windows XP to Linux.md b/published/201501/20141208 U.S. Marine Corps Wants to Change OS for Radar System from Windows XP to Linux.md similarity index 100% rename from published/20141208 U.S. Marine Corps Wants to Change OS for Radar System from Windows XP to Linux.md rename to published/201501/20141208 U.S. Marine Corps Wants to Change OS for Radar System from Windows XP to Linux.md diff --git a/published/20141210 How to use Evernote from the command line on Linux.md b/published/201501/20141210 How to use Evernote from the command line on Linux.md similarity index 100% rename from published/20141210 How to use Evernote from the command line on Linux.md rename to published/201501/20141210 How to use Evernote from the command line on Linux.md diff --git a/published/20141211 NetHack.md b/published/201501/20141211 NetHack.md similarity index 100% rename from published/20141211 NetHack.md rename to published/201501/20141211 NetHack.md diff --git a/published/20141211 Yes, This Trojan Infects Linux. No, It' s Not The Tuxpocalypse.md b/published/201501/20141211 Yes, This Trojan Infects Linux. No, It' s Not The Tuxpocalypse.md similarity index 100% rename from published/20141211 Yes, This Trojan Infects Linux. No, It' s Not The Tuxpocalypse.md rename to published/201501/20141211 Yes, This Trojan Infects Linux. No, It' s Not The Tuxpocalypse.md diff --git a/published/20141222 A Great Tool To Show Linux Command Progress Like ETA.md b/published/201501/20141222 A Great Tool To Show Linux Command Progress Like ETA.md similarity index 100% rename from published/20141222 A Great Tool To Show Linux Command Progress Like ETA.md rename to published/201501/20141222 A Great Tool To Show Linux Command Progress Like ETA.md diff --git a/published/20141222 How to Sync Time Properly with NTP Server in CentOS 7.x.md b/published/201501/20141222 How to Sync Time Properly with NTP Server in CentOS 7.x.md similarity index 100% rename from published/20141222 How to Sync Time Properly with NTP Server in CentOS 7.x.md rename to published/201501/20141222 How to Sync Time Properly with NTP Server in CentOS 7.x.md diff --git a/published/20141224 Calife--A lightweight alternative to sudo.md b/published/201501/20141224 Calife--A lightweight alternative to sudo.md similarity index 100% rename from published/20141224 Calife--A lightweight alternative to sudo.md rename to published/201501/20141224 Calife--A lightweight alternative to sudo.md diff --git a/published/20141224 Linux FAQs with Answers--How to check SSH protocol version on Linux.md b/published/201501/20141224 Linux FAQs with Answers--How to check SSH protocol version on Linux.md similarity index 100% rename from published/20141224 Linux FAQs with Answers--How to check SSH protocol version on Linux.md rename to published/201501/20141224 Linux FAQs with Answers--How to check SSH protocol version on Linux.md diff --git a/published/20141224 Linux FAQs with Answers--How to install 7zip on Linux.md b/published/201501/20141224 Linux FAQs with Answers--How to install 7zip on Linux.md similarity index 100% rename from published/20141224 Linux FAQs with Answers--How to install 7zip on Linux.md rename to published/201501/20141224 Linux FAQs with Answers--How to install 7zip on Linux.md diff --git a/published/20141224 Linux FAQs with Answers--How to install kernel headers on Linux.md b/published/201501/20141224 Linux FAQs with Answers--How to install kernel headers on Linux.md similarity index 100% rename from published/20141224 Linux FAQs with Answers--How to install kernel headers on Linux.md rename to published/201501/20141224 Linux FAQs with Answers--How to install kernel headers on Linux.md diff --git a/published/20141226 The Good The Bad And The Ugly Of Linux In 2014.md b/published/201501/20141226 The Good The Bad And The Ugly Of Linux In 2014.md similarity index 100% rename from published/20141226 The Good The Bad And The Ugly Of Linux In 2014.md rename to published/201501/20141226 The Good The Bad And The Ugly Of Linux In 2014.md diff --git a/published/20141229 2 Ways To Fix The UEFI Bootloader When Dual Booting Windows And Ubuntu.md b/published/201501/20141229 2 Ways To Fix The UEFI Bootloader When Dual Booting Windows And Ubuntu.md similarity index 100% rename from published/20141229 2 Ways To Fix The UEFI Bootloader When Dual Booting Windows And Ubuntu.md rename to published/201501/20141229 2 Ways To Fix The UEFI Bootloader When Dual Booting Windows And Ubuntu.md diff --git a/published/20141229 How to Install Bugzilla 4.4 on Ubuntu or CentOS 6.x.md b/published/201501/20141229 How to Install Bugzilla 4.4 on Ubuntu or CentOS 6.x.md similarity index 100% rename from published/20141229 How to Install Bugzilla 4.4 on Ubuntu or CentOS 6.x.md rename to published/201501/20141229 How to Install Bugzilla 4.4 on Ubuntu or CentOS 6.x.md diff --git a/published/20150104 Docker Image Insecurity.md b/published/201501/20150104 Docker Image Insecurity.md similarity index 100% rename from published/20150104 Docker Image Insecurity.md rename to published/201501/20150104 Docker Image Insecurity.md diff --git a/published/20150106 2015--Open Source Has Won, But It Isn't Finished.md b/published/201501/20150106 2015--Open Source Has Won, But It Isn't Finished.md similarity index 100% rename from published/20150106 2015--Open Source Has Won, But It Isn't Finished.md rename to published/201501/20150106 2015--Open Source Has Won, But It Isn't Finished.md diff --git a/published/20150106 How To Install New Fonts In Ubuntu 14.04 and 14.10.md b/published/201501/20150106 How To Install New Fonts In Ubuntu 14.04 and 14.10.md similarity index 100% rename from published/20150106 How To Install New Fonts In Ubuntu 14.04 and 14.10.md rename to published/201501/20150106 How To Install New Fonts In Ubuntu 14.04 and 14.10.md diff --git a/published/20150121 Linux FAQs with Answers--How to boot into command line on Ubuntu or Debian.md b/published/201501/20150121 Linux FAQs with Answers--How to boot into command line on Ubuntu or Debian.md similarity index 100% rename from published/20150121 Linux FAQs with Answers--How to boot into command line on Ubuntu or Debian.md rename to published/201501/20150121 Linux FAQs with Answers--How to boot into command line on Ubuntu or Debian.md diff --git a/published/20150126 Data of 20 Million Users Stolen from Dating Website.md b/published/201501/20150126 Data of 20 Million Users Stolen from Dating Website.md similarity index 100% rename from published/20150126 Data of 20 Million Users Stolen from Dating Website.md rename to published/201501/20150126 Data of 20 Million Users Stolen from Dating Website.md diff --git a/published/How to Setup Bind Chroot DNS Server on CentOS 7.0 VPS.md b/published/201501/How to Setup Bind Chroot DNS Server on CentOS 7.0 VPS.md similarity index 100% rename from published/How to Setup Bind Chroot DNS Server on CentOS 7.0 VPS.md rename to published/201501/How to Setup Bind Chroot DNS Server on CentOS 7.0 VPS.md diff --git a/published/How to filter, split or merge pcap files on Linux.md b/published/201501/How to filter, split or merge pcap files on Linux.md similarity index 100% rename from published/How to filter, split or merge pcap files on Linux.md rename to published/201501/How to filter, split or merge pcap files on Linux.md diff --git a/published/Quick systemd-nspawn guide.md b/published/201501/Quick systemd-nspawn guide.md similarity index 100% rename from published/Quick systemd-nspawn guide.md rename to published/201501/Quick systemd-nspawn guide.md From 2d7384b45d476540935fe38eef4589a75badf0c8 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 1 Feb 2015 12:35:53 +0800 Subject: [PATCH 085/104] translated --- ...s Point Signal Strength With wifi-linux.md | 88 ------------------- ...s Point Signal Strength With wifi-linux.md | 86 ++++++++++++++++++ 2 files changed, 86 insertions(+), 88 deletions(-) delete mode 100644 sources/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md create mode 100644 translated/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md diff --git a/sources/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md b/sources/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md deleted file mode 100644 index e4d380aa94..0000000000 --- a/sources/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md +++ /dev/null @@ -1,88 +0,0 @@ -Translating----geekpi - -How To Monitor Access Point Signal Strength With wifi-linux -================================================================================ -As a python geek I love exploring new python tools on github that target the linux users. Today I discovered a simple application written in python programming language that can be used to monitor access point signal strength. - -I have been experimenting for about two hours with **wifi-linux** and it works great but I would like to see some unittests in the near future from the author as the command **plot** is not working on my machine and is also causing some errors. - -### What is wifi-linux ### - -According to the official readme.md file on author's github account wifi-linux is a very simple python script which collects RSSI information about wifi access points around you and draws graphics showing RSSI activity. - -The author states that the program also draws RSSI activity graphic and this can be generated with the command plot but unfortunetly it is not working for me. wifi-linux supports other commands such as **bp** to add a breakpoint, **print** to print some statistics and **start changer**. - -The wifi-linux application has the folowing dependencies: - -- dbus-python -- gnuplot-py - -So first we have to install all the package dependencies for our project in order to run it in our linux machine. - -### Install pakages required by wifi-linux ### - -I tried to install python-dbus by using the pip tool which is used to manage python packages but it did not work and the reason for this is that pip looks for setup.py, which dbus-python doesn't have. So the following command is not going to work. - - pip install dbus-python - -And to make sure it does not work give it a try. It is a very high probability that you will get the following error displayed on your console. - - IOError: [Errno 2] No such file or directory: '/tmp/pip_build_oltjano/dbus-python/setup.py' - -How did I manage to solve this problem? It is very simple. I installed the the system package for the Python DBUS bindings using the following command. - - sudo apt-get install python-dbus - -The above command will work only in machines that make use of the apt-get package manager such as Debian and Ubuntu. - -Then the second dependency we have to take care is the gnuplot-py. Download it, extract using the tar utility and then run setup.py install to install the python package. - -First step is to download gnuplot-py. - - wget http://prdownloads.sourceforge.net/gnuplot-py/gnuplot-py-1.8.tar.gz - -Then use the tar utility to extract it. - - tar xvf gnuplot-py-1.8.tar.gz - -Then use the cd command to change directory. - - cd gnuplot-py-1.8 - -Once there then run the following command to install the package gunplot-py on your system. - - sudo setup.py install - -Once the installation is finished you are ready to run the wifi-linux on your machine. Just download it and use the following command to run the script. - -Download wifi-linux on your local machine by using the following command. - - wget https://github.com/dixel/wifi-linux/archive/master.zip - -Extract the master.zip archive and then use the following command to run the python script list_rsssi.py - - python list_rssi.py - -The following screenshot shows wifi-linux in action. - -![wifi-linux to monitor wifi signal strength](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux.png) - -Then the command **bp** is executed to add a breakpoint like shown below. - -![the bp command in wifi-linux](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux2.png) - -The command **print** can be used to display stats on the console of your machine. An example of its usage is shown below. - -![the print command](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux3.png) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/monitor-access-point-signal-strength-wifi-linux/ - -作者:[Oltjano Terpollari][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/oltjano/ diff --git a/translated/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md b/translated/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md new file mode 100644 index 0000000000..db2ae3c05a --- /dev/null +++ b/translated/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md @@ -0,0 +1,86 @@ +如何用wifi-linux检测AP信号强度 +================================================================================ +作为一名python极客,我喜欢在github上发现新的针对linux用户的python工具。今天我发现了一款用python写成的用于检测AP信号强度的工具。 + +我已经在**wifi-linux**上实验了大约两个小时,并且它工作的很好但是我希望在不久的将来在作者那里看到一些单元测试,因为命令**plot**无法在我的电脑上工作,并且会导致一些问题。 + +### 什么是wifi-linux ### + +根据github作者账号的官方的offical readme.md文件, wifi-linux是一个简单的收集你周围AP的RSSI信息的python脚本,它还会画出RSSI活动图形。 + +,这同样可以用命令plot生成,但是不幸的是,这对我不可行。wifi-linux支持其他的命令,比如**bp** 来加入一个断点,**print**会打印一些统计和**启动开关**。 + +wifi-linux程序有下面这些依赖: + +- dbus-python +- gnuplot-py + +首先我们需要安装所有的包依赖以使它可以运行在我们的linux机器上。 + +### 安装wifi-linux需要的包 ### + +我怕尝试使用python包管理工具pip安装python-dbus但是失败了,因为pip会查找setup.py,但是python-dbus中没有。因此下面的命令不工作。 + + pip install dbus-python + +你可以试一下但是很有可能会在终端中下面的错误。 + + IOError: [Errno 2] No such file or directory: '/tmp/pip_build_oltjano/dbus-python/setup.py' + +我该怎么解决这个问题呢?很简单,用下面命令中的系统包管理工具安装Python DBUS。 + + sudo apt-get install python-dbus + +上面的命令只有在有apt-get包管理器的机器中才可以使用,比如Debian和Ubuntu。 + +我们要安装的第二个依赖是gnuplot-py。下载并用tar解压,接着运行setup.py来安装包。 + +第一步是下载gnuplot-py。 + + wget http://prdownloads.sourceforge.net/gnuplot-py/gnuplot-py-1.8.tar.gz + +接着使用tar工具解压。 + + tar xvf gnuplot-py-1.8.tar.gz + +接着使用cd命令改变目录。 + + cd gnuplot-py-1.8 + +接着运行下面的命令在你的系统中安装gnuplot-py。 + + sudo setup.py install + +安装完成后,你就可以在你的系统中运行wifi-linux了。只需下载并用下面的命令运行脚本。 + +用下面的命令下载wifi-linux到你的机器中。 + + wget https://github.com/dixel/wifi-linux/archive/master.zip + +解压master.zip接着使用下面的命令运行list_rsssi.py脚本。 + + python list_rssi.py + +下面的截图说明wifi-linux在工作了。 + +![wifi-linux to monitor wifi signal strength](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux.png) + +命令**bp**用于像下面那样添加一个断点。 + +![the bp command in wifi-linux](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux2.png) + +命令**print**可以用于显示你机器的状态。下面就是一个例子。 + +![the print command](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux3.png) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/monitor-access-point-signal-strength-wifi-linux/ + +作者:[Oltjano Terpollari][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/oltjano/ From 7dafdee8905fb84bbfbccfe92df3e83a5c6952c0 Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Sun, 1 Feb 2015 16:55:55 +0800 Subject: [PATCH 086/104] [translated] 20141030 Test drive Linux with nothing but a flash drive.md --- ...ve Linux with nothing but a flash drive.md | 76 ------------------- ...ve Linux with nothing but a flash drive.md | 75 ++++++++++++++++++ 2 files changed, 75 insertions(+), 76 deletions(-) delete mode 100644 sources/tech/20141030 Test drive Linux with nothing but a flash drive.md create mode 100644 translated/tech/20141030 Test drive Linux with nothing but a flash drive.md diff --git a/sources/tech/20141030 Test drive Linux with nothing but a flash drive.md b/sources/tech/20141030 Test drive Linux with nothing but a flash drive.md deleted file mode 100644 index 7b5c5511c8..0000000000 --- a/sources/tech/20141030 Test drive Linux with nothing but a flash drive.md +++ /dev/null @@ -1,76 +0,0 @@ -zpl1025 -Test drive Linux with nothing but a flash drive -================================================================================ -![Penguins gathered together: Linux for the win](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/OSDC_Penguin_Image_520x292_12324207_0714_mm_v1a.png) -Image by : Opensource.com - -Maybe you’ve heard about Linux and are intrigued by it. So intrigued that you want to give it a try. But you might not know where to begin. - -You’ve probably done a bit of research online and have run across terms like dual booting and virtualization. Those terms might mean nothing to you, and you’re definitely not ready to sacrifice the operating system that you’re currently using to give Linux a try. So what can you do? - -If you have a USB flash drive lying around, you can test drive Linux by creating a live USB. It’s a USB flash drive that contains an operating system that can start from the flash drive. It doesn’t take much technical ability to create one. Let’s take a look at how to do that and how to run Linux using a live USB. - -### What you’ll need ### - -Aside from a desktop or laptop computer, you’ll need: - -- A blank USB flash drive—preferably one that has a capacity of 4 GB or more. -- An [ISO image][1] (an archive of the contents of a hard disk) of the Linux distribution that you want to try. More about this in a moment. -- An application called [Unetbootin][2], an open source tool, cross platform tool that creates a live USB. You don’t need to be running Linux to use it. In the instructions that below, I’m running Unetbootin on a MacBook. - -### Getting to work ### - -Plug your flash drive into a USB port on your computer and then fire up Unetbootin. You’ll be asked for the password that you use to log into your computer. - -![Unetbootin main window](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-main.png) - -Remember the ISO image that was mentioned a few moments ago? There are two ways you can get one: either by downloading it from the website of the Linux distribution that you want to try, or by having Unetbootin download it for you. To do that latter, click **Select Distribution** at the top of the window, choose the distribution that you want to download, and then click **Select Version** to select the version of the distribution that you want to try. - -![Downloading a Linux distribution](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-download-distro.png) - -Or, you can download the distribution yourself. Usually, the Linux distributions that I want to try aren’t in the list. If you go the second route, click **Disk image** and then click the button to search for the .iso file that you downloaded. - -Notice the **Space used to preserve files across reboots (Ubuntu only)** option? If you’re testing Ubuntu or one of its derivatives (like Lubuntu or Xubuntu), you can set aside a few megabytes of space on your flash drive to save files like web browser bookmarks or documents that you create. When you load Ubuntu from the flash drive again, you can reuse those files. - -![Ready to create a live USB](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-ready-to-go.png) - -Once the ISO image is loaded, click **OK**. It takes anywhere from a couple of minutes to 10 minutes for Unetbootin to create the live USB. - -![Creating the live USB](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-creating-disk.png) - -### Testing out the live USB ### - -This is the point where you have to embrace your inner geek a bit. Not too much, but you will be taking a peek into the innards of your computer by going into the [BIOS][3]. Your computer’s BIOS starts various bits of hardware and controls where the computer’s operating system starts, or boots, from. - -The BIOS usually looks for the operating system in this order (or something like it): hard drive, then CD-ROM or DVD drive, and then an external drive. You’ll want to change that order so that the external drive (in this case, your live USB) is the one that the BIOS checks first. - -To do that, restart your computer with the flash drive plugged into a USB port. When you see the message **Press F2 to enter setup**, do just that. On some computers, the key might be F10. - -In the BIOS, use the right arrow key on your keyboard to navigate to the **Boot** menu. You’ll see a list of drives on your computer. Use the down arrow key on your keyboard to navigate to the item labeled **USB HDD** and then press **F6** to move that item to the top of the list. - -Once you’ve done that, press **F10** to save the changes. You’ll be kicked out of the BIOS and your computer will start up. After a short amount of time, you’ll be presented with a menu listing the options for starting the Linux distribution you’re trying out. Select **Run without installing** (or the menu item closest to it). - -Once the desktop loads, you can connect to a wireless or wired network, browse the web, and give the pre-installed software a whirl. You can also check to see if, for example, your printer or scanner works with the Linux distribution you’re testing. If you really, really want to you can also fiddle at the command line. - -### What to expect ### - -Depending on the Linux distribution you’re testing and the speed of the flash drive you’re using, the operating system might take longer to load and it might run a bit slower than it would if it was installed on your hard drive. - -As well, you’ll only have the basic software that the Linux distribution packs out of the box. You generally get a web browser, a word processor, a text editor, a media player, an image viewer, and a set of utilities. That should be enough to give you a feel for what it’s like to use Linux. - -If you decide that you like using Linux, you can install it from the flash drive by double clicking on the installer. - --------------------------------------------------------------------------------- - -via: https://opensource.com/life/14/10/test-drive-linux-nothing-flash-drive - -作者:[Scott Nesbitt][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/scottnesbitt -[1]:http://en.wikipedia.org/wiki/ISO_image -[2]:http://unetbootin.sourceforge.net/ -[3]:http://en.wikipedia.org/wiki/BIOS diff --git a/translated/tech/20141030 Test drive Linux with nothing but a flash drive.md b/translated/tech/20141030 Test drive Linux with nothing but a flash drive.md new file mode 100644 index 0000000000..9c1c8684d6 --- /dev/null +++ b/translated/tech/20141030 Test drive Linux with nothing but a flash drive.md @@ -0,0 +1,75 @@ +试试只用U盘加载Linux系统 +================================================================================ +![Penguins gathered together: Linux for the win](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/OSDC_Penguin_Image_520x292_12324207_0714_mm_v1a.png) +图片来源:Opensource.com + +也许你听过Linux并对它有点好奇,终于想要实际体验一下,但可能不知道从哪儿开始。 + +很可能你已经在网上搜索过一些信息,然后遇到一些像双系统和虚拟机这样的词汇。它们对你来说也许太专业了,所以你肯定不会仅仅为了尝试一下Linux而牺牲正在使用的操作系统。那我们该怎么办? + +如果你手上正好有个U盘的话,那就可以试试做一个USB Linux启动盘。它是一个包含了整个操作系统并可以直接引导开机的U盘。创建它并不需要什么专业技术能力,让我们来看看怎么做,以及如何从USB引导进入Linux系统。 + +### 你需要准备的 ### + +除了一台台式机或笔记本电脑外,你还需要: + +- 一个空白的U盘-最好容量能有4GB或更多。 +- 一个你想尝试的Linux发行版[ISO镜像][1](一种把所有磁盘内容打包起来的档案文件)。待会再详细介绍。 +- 一个叫[Unetbootin][2]的应用程序,它是一个开源的,跨平台的工具,用来创建USB启动盘。运行它并不需要启动Linux。在下面的教程中,我是在MacBook上运行的Unetbootiin。 + +### 开始干活 ### + +把U盘插到你电脑的USB端口上,然后启动Unetbootin。然后会要求你输入电脑的登录密码。 + +![Unetbootin main window](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-main.png) + +还记得之前提到的ISO镜像文件吗?有两种方式可以获得:要么自己从你想尝试的Linux发行版网站上下载,或者让Unetbootin帮你下载。还是选后者,在窗口顶部点击**选择发行版**,选择你想下载的发行版,然后点击**选择版本**来选择你希望尝试的发行版版本。 + +![Downloading a Linux distribution](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-download-distro.png) + +或者,你也可以自己下载发行版。通常,我想尝试的Linux发行版都没有在列表中。如果选择另一个方向,点击**磁盘镜像**,然后点击按钮来选择你下载好的.iso文件。 + +注意到下面的选项**预留每次重新启动后保存文件的空间(仅Ubuntu有效)**吗?如果你尝试的是Ubuntu或它的任一个衍生版(比如Lubuntu或Xubuntu),你可以在U盘上留出几M空间用来保存文件,比如网页书签或你自己创建的文档。当用这个U盘下次启动Ubuntu的时候,你可以继续使用这些文件。 + +![Ready to create a live USB](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-ready-to-go.png) + +在加载好ISO镜像后,点击**确定**。Unetbootin大概需要不到10分钟来创建USB启动盘。 + +![Creating the live USB](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-creating-disk.png) + +### 检验USB启动盘 ### + +这个时候,你需要拥抱一下自己内在的极客精神。不会太难,不过你将需要进入[BIOS][3]去偷看一下你电脑内部空间。你的电脑的BIOS会加载各种硬件,并控制电脑操作系统的引导或启动。 + +BIOS通常会按这个顺序搜索操作系统(或者类似的顺序):硬盘,然后是CD/DVD光驱,然后是外部存储设备。你需要调整这个顺序,让外部存储设备(在这里,意味着你的U盘启动盘)成为BIOS第一个搜索的设备。 + +要做到这个,把U盘插到电脑上再重启电脑。在看到提示信息**Press F2 to enter setup**之后,按它要求的做。在有的电脑上,这个键可能是F10。 + +在BIOS里,用键盘上的向右方向键切换到**Boot**菜单。然后你将看到你电脑上的驱动器列表。使用键盘上的向下方向键选中名字为**USB HDD**的选项,然后按下**F6**移动这个选项到列表的顶部。 + +完成后,按下**F10**来保存改动。然后你会从BIOS里被踢出来,然后电脑会自己启动。等一小会,你就会看到一个你正在尝试的Linux发行版的启动菜单。选择**Run without installing**(或者最接近的选项)。 + +在进入桌面后,你可以连接上无线或有线网络,看看网页,试一试预装的软件。你还可以看看,比如说,你的打印机或扫描仪是否能在你试的这个发行版下正常工作。你要是真的想不开,也可以去摸一下命令行。 + +### 能干什么 ### + +根据你尝试的Linux发行版和你使用的U盘的速度,操作系统可能会需要更长的时间来加载,而且很可能比直接装到硬盘上会慢一点。 + +还有,你也只能运行Linux发行版里预装好的基本软件。通常会有网页浏览器,一个文字处理软件,一个文本编辑器,一个媒体播放器,一个相片浏览器,以及一套实用工具。这些应该足够给你使用Linux的感觉了。 + +如果你决定使用Linux,你可以双击安装器从U盘安装到硬盘。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/14/10/test-drive-linux-nothing-flash-drive + +作者:[Scott Nesbitt][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/scottnesbitt +[1]:http://en.wikipedia.org/wiki/ISO_image +[2]:http://unetbootin.sourceforge.net/ +[3]:http://en.wikipedia.org/wiki/BIOS From 7ed53ce0e4c294af1cac5143503c62f38d9d37d2 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Sun, 1 Feb 2015 21:54:17 +0800 Subject: [PATCH 087/104] translated --- .../20150121 If a 32-bit integer overflows.md | 96 ------------------- .../20150121 If a 32-bit integer overflows.md | 93 ++++++++++++++++++ 2 files changed, 93 insertions(+), 96 deletions(-) delete mode 100644 sources/talk/20150121 If a 32-bit integer overflows.md create mode 100644 translated/talk/20150121 If a 32-bit integer overflows.md diff --git a/sources/talk/20150121 If a 32-bit integer overflows.md b/sources/talk/20150121 If a 32-bit integer overflows.md deleted file mode 100644 index fc8c375919..0000000000 --- a/sources/talk/20150121 If a 32-bit integer overflows.md +++ /dev/null @@ -1,96 +0,0 @@ -KayGuoWhu translating -If a 32-bit integer overflows, can we use a 40-bit structure instead of a 64-bit long one? ---------- - -#Q: - -If, say, a 32-bit integer is overflowing, instead of upgrading int to long, can we make use of some 40-bit type if we need a range only within 240, so that we save 24 (64-40) bits for every integer? - -If so, how? - -I have to deal with billions and space is a bigger constraint. - -#A: - -##Yes, but... - -It is certainly possible, but it is usually nonsensical (for any program that doesn't use billions of these numbers): - -```C -#include // don't want to rely on something like long long -struct bad_idea -{ - uint64_t var : 40; -}; -``` - -Here, var will indeed have a width of 40 bits at the expense of much less efficient code generated (it turns out that "much" is very much wrong -- the measured overhead is a mere 1-2%, see timings below), and usually to no avail. Unless you have need for another 24-bit value (or an 8 and 16 bit value) which you wish to pack into the same structure, alignment will forfeit anything that you may gain. - -In any case, unless you have billions of these, the effective difference in memory consumption will not be noticeable (but the extra code needed to manage the bit field will be noticeable!). - -###Note: - -The question has in the mean time been updated to reflect that indeed billions of numbers are needed, so this may be a viable thing to do, presumed that you take measures not to lose the gains due to structure alignment and padding, i.e. either by storing something else in the remaining 24 bits or by storing your 40-bit values in structures of 8 each or multiples thereof). -Saving three bytes a billion times is worthwhile as it will require noticeably fewer memory pages and thus cause fewer cache and TLB misses, and above all page faults (a single page fault weighting tens of millions instructions). - -While the above snippet does not make use of the remaining 24 bits (it merely demonstrates the "use 40 bits" part), something akin to the following will be necessary to really make the approach useful in a sense of preserving memory -- presumed that you indeed have other "useful" data to put in the holes: - -```C -struct using_gaps -{ - uint64_t var : 40; - uint64_t useful_uint16 : 16; - uint64_t char_or_bool : 8; -}; -``` - -Structure size and alignment will be equal to a 64 bit integer, so nothing is wasted if you make e.g. an array of a billion such structures (even without using compiler-specific extensions). If you don't have use for an 8-bit value, you could also use an 48-bit and a 16-bit value (giving a bigger overflow margin). -Alternatively you could, at the expense of usability, put 8 40-bit values into a structure (least common multiple of 40 and 64 being 320 = 8*40). Of course then your code which accesses elements in the array of structures will become much more complicated (though one could probably implement an operator[] that restores the linear array functionality and hides the structure complexity). - -Update: -Wrote a quick test suite, just to see what overhead the bitfields (and operator overloading with bitfield refs) would have. Posted code (due to length) at gcc.godbolt.org, test output from my Win7-64 machine is: - -```TXT -Running test for array size = 1048576 -what alloc seq(w) seq(r) rand(w) rand(r) free ------------------------------------------------------------ -uint32_t 0 2 1 35 35 1 -uint64_t 0 3 3 35 35 1 -bad40_t 0 5 3 35 35 1 -packed40_t 0 7 4 48 49 1 - - -Running test for array size = 16777216 -what alloc seq(w) seq(r) rand(w) rand(r) free ------------------------------------------------------------ -uint32_t 0 38 14 560 555 8 -uint64_t 0 81 22 565 554 17 -bad40_t 0 85 25 565 561 16 -packed40_t 0 151 75 765 774 16 - - -Running test for array size = 134217728 -what alloc seq(w) seq(r) rand(w) rand(r) free ------------------------------------------------------------ -uint32_t 0 312 100 4480 4441 65 -uint64_t 0 648 172 4482 4490 130 -bad40_t 0 682 193 4573 4492 130 -packed40_t 0 1164 552 6181 6176 130 -``` - -What one can see is that the extra overhead of bitfields is neglegible, but the operator overloading with bitfield reference as a convenience thing is rather drastic (about 3x increase) when accessing data linearly in a cache-friendly manner. On the other hand, on random access it barely even matters. - -These timings suggest that simply using 64-bit integers would be better since they are still faster overall than bitfields (despite touching more memory), but of course they do not take into account the cost of page faults with much bigger datasets. It might look very different once you run out of physical RAM (I didn't test that). - ------- - -via:[stackoverflow](http://stackoverflow.com/questions/27705409/if-a-32-bit-integer-overflows-can-we-use-a-40-bit-structure-instead-of-a-64-bit/27705562#27705562) - -作者:[Damon][a][Michael Kohne][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://stackoverflow.com/users/572743/damon -[b]:http://stackoverflow.com/users/5801/michael-kohne \ No newline at end of file diff --git a/translated/talk/20150121 If a 32-bit integer overflows.md b/translated/talk/20150121 If a 32-bit integer overflows.md new file mode 100644 index 0000000000..651e829189 --- /dev/null +++ b/translated/talk/20150121 If a 32-bit integer overflows.md @@ -0,0 +1,93 @@ +如果使用32位整型会溢出,那么是否可以使用一个40位结构体代替64位长整型? +--------- + +#问题: +假如说,使用32位的整型会溢出,在不考虑使用长整型的情况下,如果我们只需要表示2的40次方范围内的数,是否可以利用某些40位长的数据类型来表示呢?这样的话,每个整型数就可以节省24位的空间。 + +如果可以,该怎么做? + +需求是:我现在必须处理数以亿计的数字,所以在存储空间上受到了很大的限制。 + +#回答: + +##可以是可以,但是…… + +这种方法的确可行,但这么做通常没什么意义(因为几乎没有程序需要处理多达十亿的数字): + +```C +#include // 不要考虑使用long long类型 +struct bad_idea +{ + uint64_t var : 40; +}; +``` + +在这里,变量var占据40位大小,但是以生成代码时拥有非常低的运行效率来换取的(事实证明“非常”二字言过其实了——测试中程序开销仅仅增加了1%到2%,正如下面的测试时间所示),而且这么做通常没什么用。除非你还需要保存一个24位的值(或者是8位、16位的值),这样你皆可以它们放到同一个结构中。不然的话,因为对齐内存地址产生的开销会抵消这么做带来的好处。 + +在任何情况下,除非你是真的需要保存数以亿计的数字,否则这样做给内存消耗带来的好处是可以忽略不计的(但是为了处理这些位字段的额外代码量是不可忽略的!)。 + +###说明: + +在此期间,这个问题已经被更新了,是为了说明实际上确实有需要处理数以亿计数字的情况。假设,采取某些措施来防止因为结构体对齐和填充抵消好处(比如在后24位中存储其它的内容,或者使用多个8位来存储40位),那么这么做就变得有意义了。 +如果有十亿个数,每个数都节省三个字节的空间,那么这么做就非常有用了。因为使用更小的空间存储要求更少的内存页,也就会产生更少的cache和TLB不命中和内存缺页(单个缺页会产生数以千万计的指令(译者注:直译是这样,但语义说不通!))。 + +尽管上面提到的情况不足以充分利用到剩余的24位(它仅仅使用了40位部分),如果确实在剩余位中放入了有用的数据,那么使用类似下面的方法会使得这种思路就管理内存而言显得非常有用。 + +```C +struct using_gaps +{ + uint64_t var : 40; + uint64_t useful_uint16 : 16; + uint64_t char_or_bool : 8; +}; +``` + +结构体大小和对齐长度等于64位整型的大小,所以只要使用得当就不会浪费空间,比如对一个保存10亿个数的数组使用这个结构(不考虑使用指定编译器的扩展)。如果你不会用到一个8位的值,那么你可以使用一个48位和16位的值(giving a bigger overflow margin)。 +或者以牺牲可用性为代价,把8个64位的值放入这样的结构体中(或者使用40和64的组合使得其和满足320)。当然,在这种情况下,通过代码去访问数组结构体中的元素会变得非常麻烦(尽管一种方法是实现一个operator[]在功能上还原线性数组,隐藏结构体的复杂性)。 + +更新: + +我写了一个快速测试工具,只是为了获得位字段的开销(以及伴随位字段引用的重载操作)。由于长度限制将代码发布在gcc.godbolt.org上,在本人64位Win7上的测试结果如下: + +```TXT +运行测试的数组大小为1048576 +what alloc seq(w) seq(r) rand(w) rand(r) free +----------------------------------------------------------- +uint32_t 0 2 1 35 35 1 +uint64_t 0 3 3 35 35 1 +bad40_t 0 5 3 35 35 1 +packed40_t 0 7 4 48 49 1 + +运行测试的数组大小为16777216 +what alloc seq(w) seq(r) rand(w) rand(r) free +----------------------------------------------------------- +uint32_t 0 38 14 560 555 8 +uint64_t 0 81 22 565 554 17 +bad40_t 0 85 25 565 561 16 +packed40_t 0 151 75 765 774 16 + +运行测试的数组大小为134177228 +what alloc seq(w) seq(r) rand(w) rand(r) free +----------------------------------------------------------- +uint32_t 0 312 100 4480 4441 65 +uint64_t 0 648 172 4482 4490 130 +bad40_t 0 682 193 4573 4492 130 +packed40_t 0 1164 552 6181 6176 130 +``` + +我们看到,位字段的额外开销是微不足道的,但是当以友好的方式线性访问数据时伴随位字段引用的操作符重载产生的开销则相当显著(大概有3倍)。在另一方面,随机访问产生的开销则无足轻重。 + +这些时间表明简单的使用64位整型会更好,因为它们在整体性能上要比位字段好(尽管占用更多的内存),但是显然它们并没有考虑随着数据集增大带来的缺页开销。一旦程序内存超过RAM大小,结果可能就不一样了(未亲自考证)。 + +------ + +via:[stackoverflow](http://stackoverflow.com/questions/27705409/if-a-32-bit-integer-overflows-can-we-use-a-40-bit-structure-instead-of-a-64-bit/27705562#27705562) + +作者:[Damon][a][Michael Kohne][b] +译者:[KayGuoWhu](https://github.com/KayGuoWhu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://stackoverflow.com/users/572743/damon +[b]:http://stackoverflow.com/users/5801/michael-kohne \ No newline at end of file From d3efeb3beefaea1fd307d4eb9bec641796718c16 Mon Sep 17 00:00:00 2001 From: Tao Meng Date: Mon, 2 Feb 2015 10:35:26 +0800 Subject: [PATCH 088/104] Translating 20150128 Docker-1 Moving to Docker.md --- sources/tech/20150128 Docker-1 Moving to Docker.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150128 Docker-1 Moving to Docker.md b/sources/tech/20150128 Docker-1 Moving to Docker.md index 6917b3b7b1..1c1d4b78cc 100644 --- a/sources/tech/20150128 Docker-1 Moving to Docker.md +++ b/sources/tech/20150128 Docker-1 Moving to Docker.md @@ -1,3 +1,4 @@ +Translating by mtunique Moving to Docker ================================================================================ ![](http://cocoahunter.com/content/images/2015/01/docker1.jpeg) @@ -53,7 +54,7 @@ In the following articles we'll see how to setup a semi-automated Docker based d via: http://cocoahunter.com/2015/01/23/docker-1/ 作者:[Michelangelo Chasseur][a] -译者:[译者ID](https://github.com/译者ID) +译者:[mtunique](https://github.com/mtunique) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -78,4 +79,4 @@ via: http://cocoahunter.com/2015/01/23/docker-1/ [17]: [18]: [19]: -[20]: \ No newline at end of file +[20]: From 180b9d6ba9261a22cb96df8a50bc16bcd9487d11 Mon Sep 17 00:00:00 2001 From: Junkai <2q1w2007@163.com> Date: Mon, 2 Feb 2015 14:46:34 +0800 Subject: [PATCH 089/104] =?UTF-8?q?20150202=20=E9=80=89=E9=A2=98=202015020?= =?UTF-8?q?2=20The=20Pirate=20Bay=20Is=20Now=20Back=20Online.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...50202 The Pirate Bay Is Now Back Online.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sources/news/20150202 The Pirate Bay Is Now Back Online.md diff --git a/sources/news/20150202 The Pirate Bay Is Now Back Online.md b/sources/news/20150202 The Pirate Bay Is Now Back Online.md new file mode 100644 index 0000000000..acde800ad8 --- /dev/null +++ b/sources/news/20150202 The Pirate Bay Is Now Back Online.md @@ -0,0 +1,38 @@ +The Pirate Bay Is Now Back Online +------ +*The website was closed for about seven weeks* +![The Pirate Bay](http://i1-news.softpedia-static.com/images/news2/The-Pirate-Bay-Is-Now-Back-Online-471802-2.jpg) +##After being [raided](1) by the police almost two months ago, (in)famous torrent website The Pirate Bay is now back online. Those who thought the website will never return will be either disappointed or happy given that The Pirate Bay seems to live once again. + +In order to celebrate its coming back, The Pirate Bay admins have posted a Phoenix bird on the front page, which signifies the fact that the website can't be killed only damaged. + +About two weeks after The Pirate Bay was raided the domain miraculously came back to life. Soon after a countdown appeared on the temporary homepage of The Pirate Bay indicating that the website is almost ready for a comeback. + +The countdown hinted to February 1, as the possible date for The Pirate Bay's comeback, but it looks like those who manage the website manage to pull it out one day earlier. + +Beginning today, those who have accounts on The Pirate Bay can start downloading the torrents they want. Other than the Phoenix on the front page there are no other messages that might point to the resurrection The Pirate Bay except for the fact that it's now operational. + +Admins of the website said a few weeks ago they will find ways to manage and optimize The Pirate Bay, so that there will be minimal chances for the website to be closed once again. Let's see how it lasts this time. + +##Another version of The Pirate Bay may be launched soon + +In related news, one of the members of the original staff was dissatisfied with the decisions made by the majority regarding some of the changes made in the way admins interact with the website. + +He told [Torrentfreak](2) earlier this week that he, along with a few others, will open his version of The Pirate Bay, which they claim will be the "real" one. + +------ +via:http://news.softpedia.com/news/The-Pirate-Bay-Is-Now-Back-Online-471802.shtml + +本文发布时间:31 Jan 2015, 22:49 GMT + +作者:[Cosmin Vasile][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/cosmin-vasile +[1]:http://news.softpedia.com/news/The-Pirate-Bay-Is-Down-December-9-2014-466987.shtml +[2]:http://torrentfreak.com/pirate-bay-back-online-150131/ \ No newline at end of file From 42b67205ce597b2b7f6262e3aaf19d95231f2bc0 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 2 Feb 2015 16:36:42 +0800 Subject: [PATCH 090/104] =?UTF-8?q?20150202-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...entation from the command line on Linux.md | 186 ++++++++++++++++ ... filter BGP routes in Quagga BGP router.md | 201 ++++++++++++++++++ 2 files changed, 387 insertions(+) create mode 100644 sources/tech/20150202 How to create and show a presentation from the command line on Linux.md create mode 100644 sources/tech/20150202 How to filter BGP routes in Quagga BGP router.md diff --git a/sources/tech/20150202 How to create and show a presentation from the command line on Linux.md b/sources/tech/20150202 How to create and show a presentation from the command line on Linux.md new file mode 100644 index 0000000000..d80b385544 --- /dev/null +++ b/sources/tech/20150202 How to create and show a presentation from the command line on Linux.md @@ -0,0 +1,186 @@ +How to create and show a presentation from the command line on Linux +================================================================================ +When you prepare a talk for audience, the first thing that will probably come to your mind is shiny presentation charts filled with fancy diagrams, graphics and animation effects. Fine. No one can deny the power of visually charming presentation. However, not all presentations need to be Ted talk quality. Often times, the purpose of a presentation is to convey specific information, which can easily be done with textual messages. In such cases, your time can be better spent on gathering information and checking facts, rather than searching for good-looking graphics from Google Image. + +In the world of Linux, you can do presentation in several different ways, e.g., Impress for multimedia-rich content, [Impress.js][1] for stunning visualization, Beamer for hardcore LaTex users, and so on. If you are looking for a simple means to create and show a textual presentation, look no further. [mdp][2] can get the job done for you. + +### What is Mdp? ### + +mdp is an ncurses-based command-line presentation tool for Linux. What I like about mdp is its [markdown][3] support, which makes it easy to create slides with familiar markdown format. Naturally, it becomes painless to publish the slides in HTML format as well. Another plus is its support for UTF-8 character encoding, which comes in handy when showing non-English characters (e.g., Greek or Cyrillic alphabets). + +### Install Mdp on Linux ### + +Installation of mdp is mostly painless due to its light dependency requirement (i.e., ncursesw). + +#### Debian, Ubuntu or their derivatives #### + + $ sudo apt-get install git gcc make libncursesw5-dev + $ git clone https://github.com/visit1985/mdp.git + $ cd mdp + $ make + $ sudo make install + +#### Fedora or CentOS/RHEL #### + + $ sudo yum install git gcc make ncurses-devel + $ git clone https://github.com/visit1985/mdp.git + $ cd mdp + $ make + $ sudo make install + +#### Arch Linux #### + +On Arch Linux, you can easily install mdp from [AUR][4]. + +### Create a Presentation from the Command Line ### + +Once you installed mdp, you can easily create a presentation by using your favorite text editor. If you are familiar with markdown, it will take no time to master mdp. For those of you who are not familiar with markdown, starting with an example is the best way to learn mdp. + +Here is a 6-page sample presentation for your reference. + + %title: Sample Presentation made with mdp (Xmodulo.com) + %author: Dan Nanni + %date: 2015-01-28 + + -> This is a slide title <- + ========= + + -> mdp is a command-line based presentation tool with markdown support. <- + + *_Features_* + + * Multi-level headers + * Code block formatting + * Nested quotes + * Nested list + * Text highlight and underline + * Citation + * UTF-8 special characters + + ------------------------------------------------- + + -> # Example of nested list <- + + This is an example of multi-level headers and a nested list. + + # first-level title + + second-level + ------------ + + - *item 1* + - sub-item 1 + - sub-sub-item 1 + - sub-sub-item 2 + - sub-sub-item 3 + - sub-item 2 + + ------------------------------------------------- + + -> # Example of code block formatting <- + + This example shows how to format a code snippet. + + 1 /* Hello World program */ + 2 + 3 #include + 4 + 5 int main() + 6 { + 7 printf("Hello World"); + 8 return 0; + 9 } + + This example shows inline code: `sudo reboot` + + ------------------------------------------------- + + -> # Example of nested quotes <- + + This is an example of nested quotes. + + # three-level nested quotes + + > This is the first-level quote. + >> This is the second-level quote + >> and continues. + >>> *This is the third-level quote, and so on.* + + ------------------------------------------------- + + -> # Example of citations <- + + This example shows how to place a citation inside a presentation. + + This tutorial is published at [Xmodulo](http://xmodulo.com) + + You are welcome to connect with me at [LinkedIn](http://www.linkedin.com/in/xmodulo) + + Pretty cool, huh? + + ------------------------------------------------- + + -> # Example of UTF-8 special characters <- + + This example shows UTF-8 special characters. + + ae = ä, oe = ö, ue = ü, ss = ß + alpha = ?, beta = ?, upsilon = ?, phi = ? + Omega = ?, Delta = ?, Sigma = ? + + ??????????? + ?rectangle? + ??????????? + +### Show a Presentation from the Command Line ### + +Once you save the above code as slide.md text file, you can show the presentation by simply running: + + $ mdp slide.md + +You can navigate the presentation by pressing Enter/Space/Page-Down/Down-Arrow (next slide), Backspace/Page-Up/Up-Arrow (previous slide), Home (first slide), End (last slide), or numeric-N (N-th slide). + +The title of the presentation appears on top of each slide, and your name and page number are shown at the bottom. + +![](https://farm9.staticflickr.com/8637/16392457702_ec732d0094_c.jpg) + +This is an example of a nested list and multi-level headers. + +![](https://farm9.staticflickr.com/8567/16367397606_29be7df633_c.jpg) + +This is an example of a code snippet and inline code. + +![](https://farm9.staticflickr.com/8682/15770926144_0f982b0863_b.jpg) + +This is an example of nested quotes. + +![](https://farm9.staticflickr.com/8587/16393383115_0865c8b89b_c.jpg) + +This is an example of placing citations. + +![](https://farm8.staticflickr.com/7409/16392457712_ed36c14bc2_c.jpg) + +This is an example of UTF-8 special characters. + +![](https://farm9.staticflickr.com/8648/16205981560_7fa3debc75_c.jpg) + +### Summary ### + +In this tutorial, I showed you how to use mdp to create and show a presentation from the command line. Its markdown compatibility saves us the trouble and hassle of having to learn any new formatting, which is an advantage compared to [tpp][5], another command-line presentation tool. Due to its limitations, mdp may not qualify as your default presentation tool, but there should be definitely a use case for that. What do you think of mdp? Do you prefer something else? + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/presentation-command-line-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://bartaz.github.io/impress.js/ +[2]:https://github.com/visit1985/mdp +[3]:http://daringfireball.net/projects/markdown/ +[4]:https://aur.archlinux.org/packages/mdp-git/ +[5]:http://www.ngolde.de/tpp.html \ No newline at end of file diff --git a/sources/tech/20150202 How to filter BGP routes in Quagga BGP router.md b/sources/tech/20150202 How to filter BGP routes in Quagga BGP router.md new file mode 100644 index 0000000000..d92c47c774 --- /dev/null +++ b/sources/tech/20150202 How to filter BGP routes in Quagga BGP router.md @@ -0,0 +1,201 @@ +How to filter BGP routes in Quagga BGP router +================================================================================ +In the [previous tutorial][1], we demonstrated how to turn a CentOS box into a BGP router using Quagga. We also covered basic BGP peering and prefix exchange setup. In this tutorial, we will focus on how we can control incoming and outgoing BGP prefixes by using **prefix-list** and **route-map**. + +As described in earlier tutorials, BGP routing decisions are made based on the prefixes received/advertised. To ensure error-free routing, it is recommended that you use some sort of filtering mechanism to control these incoming and outgoing prefixes. For example, if one of your BGP neighbors starts advertising prefixes which do not belong to them, and you accept such bogus prefixes by mistake, your traffic can be sent to that wrong neighbor, and end up going nowhere (so-called "getting blackholed"). To make sure that such prefixes are not received or advertised to any neighbor, you can use prefix-list and route-map. The former is a prefix-based filtering mechanism, while the latter is a more general prefix-based policy mechanism used to fine-tune actions. + +We will show you how to use prefix-list and route-map in Quagga. + +### Topology and Requirement ### + +In this tutorial, we assume the following topology. + +![](https://farm8.staticflickr.com/7394/16407625405_4f7d24d1f6_c.jpg) + +Service provider A has already established an eBGP peering with service provider B, and they are exchanging routing information between them. The AS and prefix details are as stated below. + +- **Peering block**: 192.168.1.0/24 +- **Service provider A**: AS 100, prefix 10.10.0.0/16 +- **Service provider B**: AS 200, prefix 10.20.0.0/16 + +In this scenario, service provider B wants to receive only prefixes 10.10.10.0/23, 10.10.10.0/24 and 10.10.11.0/24 from provider A. + +### Quagga Installation and BGP Peering ### + +In the [previous tutorial][1], we have already covered the method of installing Quagga and setting up BGP peering. So we will not go through the details here. Nonetheless, I am providing a summary of BGP configuration and prefix advertisements: + +![](https://farm8.staticflickr.com/7428/16219986668_97cb193b15_c.jpg) + +The above output indicates that the BGP peering is up. Router-A is advertising multiple prefixes towards router-B. Router-B, on the other hand, is advertising a single prefix 10.20.0.0/16 to router-A. Both routers are receiving the prefixes without any problems. + +### Creating Prefix-List ### + +In a router, a prefix can be blocked with either an ACL or prefix-list. Using prefix-list is often preferred to ACLs since prefix-list is less processor intensive than ACLs. Also, prefix-list is easier to create and maintain. + + ip prefix-list DEMO-PRFX permit 192.168.0.0/23 + +The above command creates prefix-list called 'DEMO-FRFX' that allows only 192.168.0.0/23. + +Another great feature of prefix-list is that we can specify a range of subnet mask(s). Take a look at the following example: + + ip prefix-list DEMO-PRFX permit 192.168.0.0/23 le 24 + +The above command creates prefix-list called 'DEMO-PRFX' that permits prefixes between 192.168.0.0/23 and /24, which are 192.168.0.0/23, 192.168.0.0/24 and 192.168.1.0/24. The 'le' operator means less than or equal to. You can also use 'ge' operator for greater than or equal to. + +A single prefix-list statement can have multiple permit/deny actions. Each statement is assigned a sequence number which can be determined automatically or specified manually. + +Multiple prefix-list statements are parsed one by one in the increasing order of sequence numbers. When configuring prefix-list, we should keep in mind that there is always an **implicit deny** at the end of all prefix-list statements. This means that anything that is not explicitly allowed will be denied. + +To allow everything, we can use the following prefix-list statement which allows any prefix starting from 0.0.0.0/0 up to anything with subnet mask /32. + + ip prefix-list DEMO-PRFX permit 0.0.0.0/0 le 32 + +Now that we know how to create prefix-list statements, we will create prefix-list called 'PRFX-LST' that will allow prefixes required in our scenario. + + router-b# conf t + router-b(config)# ip prefix-list PRFX-LST permit 10.10.10.0/23 le 24 + +### Creating Route-Map ### + +Besides prefix-list and ACLs, there is yet another mechanism called route-map, which can control prefixes in a BGP router. In fact, route-map can fine-tune possible actions more flexibly on the prefixes matched with an ACL or prefix-list. + +Similar to prefix-list, a route-map statement specifies permit or deny action, followed by a sequence number. Each route-map statement can have multiple permit/deny actions with it. For example: + + route-map DEMO-RMAP permit 10 + +The above statement creates route-map called 'DEMO-RMAP', and adds permit action with sequence 10. Now we will use match command under sequence 10. + + router-a(config-route-map)# match (press ? in the keyboard) + +---------- + + as-path Match BGP AS path list + community Match BGP community list + extcommunity Match BGP/VPN extended community list + interface match first hop interface of route + ip IP information + ipv6 IPv6 information + metric Match metric of route + origin BGP origin code + peer Match peer address + probability Match portion of routes defined by percentage value + tag Match tag of route + +As we can see, route-map can match many attributes. We will match a prefix in this tutorial. + + route-map DEMO-RMAP permit 10 + match ip address prefix-list DEMO-PRFX + +The match command will match the IP addresses permitted by the prefix-list 'DEMO-PRFX' created earlier (i.e., prefixes 192.168.0.0/23, 192.168.0.0/24 and 192.168.1.0/24). + +Next, we can modify the attributes by using the set command. The following example shows possible use cases of set. + + route-map DEMO-RMAP permit 10 + match ip address prefix-list DEMO-PRFX + set (press ? in keyboard) + +---------- + + aggregator BGP aggregator attribute + as-path Transform BGP AS-path attribute + atomic-aggregate BGP atomic aggregate attribute + comm-list set BGP community list (for deletion) + community BGP community attribute + extcommunity BGP extended community attribute + forwarding-address Forwarding Address + ip IP information + ipv6 IPv6 information + local-preference BGP local preference path attribute + metric Metric value for destination routing protocol + metric-type Type of metric + origin BGP origin code + originator-id BGP originator ID attribute + src src address for route + tag Tag value for routing protocol + vpnv4 VPNv4 information + weight BGP weight for routing table + +As we can see, the set command can be used to change many attributes. For a demonstration purpose, we will set BGP local preference. + + route-map DEMO-RMAP permit 10 + match ip address prefix-list DEMO-PRFX + set local-preference 500 + +Just like prefix-list, there is an implicit deny at the end of all route-map statements. So we will add another permit statement in sequence number 20 to permit everything. + + route-map DEMO-RMAP permit 10 + match ip address prefix-list DEMO-PRFX + set local-preference 500 + ! + route-map DEMO-RMAP permit 20 + +The sequence number 20 does not have a specific match command, so it will, by default, match everything. Since the decision is permit, everything will be permitted by this route-map statement. + +If you recall, our requirement is to only allow/deny some prefixes. So in our scenario, the set command is not necessary. We will just use one permit statement as follows. + + router-b# conf t + router-b(config)# route-map RMAP permit 10 + router-b(config-route-map)# match ip address prefix-list PRFX-LST + +This route-map statement should do the trick. + +### Applying Route-Map ### + +Keep in mind that ACLs, prefix-list and route-map are not effective unless they are applied to an interface or a BGP neighbor. Just like ACLs or prefix-list, a single route-map statement can be used with any number of interfaces or neighbors. However, any one interface or a neighbor can support only one route-map statement for inbound, and one for outbound traffic. + +We will apply the created route-map to the BGP configuration of router-B for neighbor 192.168.1.1 with incoming prefix advertisement. + + router-b# conf terminal + router-b(config)# router bgp 200 + router-b(config-router)# neighbor 192.168.1.1 route-map RMAP in + +Now, we check the routes advertised and received by using the following commands. + +For advertised routes: + + show ip bgp neighbor-IP advertised-routes + +For received routes: + + show ip bgp neighbor-IP routes + +![](https://farm8.staticflickr.com/7424/16221405429_4d86119548_c.jpg) + +You can see that while router-A is advertising four prefixes towards router-B, router-B is accepting only three prefixes. If we check the range, we can see that only the prefixes that are allowed by route-map are visible on router-B. All other prefixes are discarded. + +**Tip**: If there is no change in the received prefixes, try resetting the BGP session using the command: "clear ip bgp neighbor-IP". In our case: + + clear ip bgp 192.168.1.1 + +As we can see, the requirement has been met. We can create similar prefix-list and route-map statements in routers A and B to further control inbound and outbound prefixes. + +I am summarizing the configuration in one place so you can see it all at a glance. + + router bgp 200 + network 10.20.0.0/16 + neighbor 192.168.1.1 remote-as 100 + neighbor 192.168.1.1 route-map RMAP in + ! + ip prefix-list PRFX-LST seq 5 permit 10.10.10.0/23 le 24 + ! + route-map RMAP permit 10 + match ip address prefix-list PRFX-LST + +### Summary ### + +In this tutorial, we showed how we can filter BGP routes in Quagga by defining prefix-list and route-map. We also demonstrated how we can combine prefix-list with route-map to fine-control incoming prefixes. You can create your own prefix-list and route-map in a similar way to match your network requirements. These tools are one of the most effective ways to protect the production network from route poisoning and advertisement of bogon routes. + +Hope this helps. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html + +作者:[Sarmed Rahman][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/sarmed +[1]:http://xmodulo.com/centos-bgp-router-quagga.html \ No newline at end of file From b8a7935aa130d379c95e6cc93ba84cc471dc1773 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 2 Feb 2015 16:54:55 +0800 Subject: [PATCH 091/104] =?UTF-8?q?20150205-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...all Websvn for Subversion in CentOS 7.0.md | 123 ++++++++++++++++++ ...ache Tomcat to IPv4 in Centos or Redhat.md | 79 +++++++++++ ...Python Tool To Test Your Internet Speed.md | 76 +++++++++++ 3 files changed, 278 insertions(+) create mode 100644 sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md create mode 100644 sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md create mode 100644 sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md diff --git a/sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md b/sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md new file mode 100644 index 0000000000..0a9dfdb442 --- /dev/null +++ b/sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md @@ -0,0 +1,123 @@ +How To Install Websvn for Subversion in CentOS 7.0 +================================================================================ +Hi all, today we'll be installing latest WebSVN in our CentOS 7 for subversion repositories. + +WebSVN offers a view onto your subversion repositories that’s been designed to reflect the Subversion methodology. We can view the log of any file or directory and see a list of all the files changed, added or deleted in any given revision. We can also view the differences between two versions of a file so as to see exactly what was changed in a particular revision. + +### Features ### + +WebSVN offers the following features: + +- Easy to use interface +- Customisable templating system +- Colourisation of file listings +- Blame view +- Log message searching +- RSS feed support +- [and more...][1] + +Since it's written using PHP, WebSVN is also very portable and easy to install. + +Now, we'll install WebSVN for our Subversion (Apache SVN). Make sure that you have installed Apache SVN in your server. If you don't have it installed, you can install from this tutorial. + +After you installed Apache SVN(Subversion), you'll need to follow the easy steps below. + +### 1. Download WebSVN ### + +You can download WebSVN from their official site http://www.websvn.info/download/ . We'll first get inside directory /var/www/html/ and then download the package inside it. + + $ sudo -s + +**Please execute the above command in a shell or terminal as wee'll need to switch to root privilege so that we'll have full access to the system's restricted areas.** + + # cd /var/www/html + # wget http://websvn.tigris.org/files/documents/1380/49057/websvn-2.3.3.zip + +![downloading websvn package](http://blog.linoxide.com/wp-content/uploads/2015/01/downloading-websvn.png) + +Here, I am download the latest version 2.3.3 of websvn. You can get the link from the site. You can simply replace the above link with the link of the package you wanna install. + +### 2. Extract the downloaded zip ### + + # unzip websvn-2.3.3.zip + + # mv websvn-2.3.3 websvn + +![extracting websvn](http://blog.linoxide.com/wp-content/uploads/2015/01/extracting-websvn.png) + +### 3. Install php ### + + # yum install php + +![yum install php](http://blog.linoxide.com/wp-content/uploads/2015/01/yum-install-php.png) + +### 4. Edit WebSVN config ### + +Now, we'll need to copy distconfig.php which is situated inside /var/www/html/websvn/include directory to config.php and then edit the configuration file. + + # cd /var/www/html/websvn/include + + # cp distconfig.php config.php + + # nano config.php + +Now, we'll need to make changes to the file as shown below. After it is done, please save the file and exit. + + // Configure these lines if your commands aren't on your path. + // + $config->setSVNCommandPath('/usr/bin'); // e.g. c:\\program files\\subversion\\bin + $config->setDiffPath('/usr/bin'); + + // For syntax colouring, if option enabled... + $config->setEnscriptPath('/usr/bin'); + $config->setSedPath('/bin'); + + // For delivered tarballs, if option enabled... + $config->setTarPath('/bin'); + + // For delivered GZIP'd files and tarballs, if option enabled... + $config->setGZipPath('/bin'); + + // + $config->parentPath('/svn/'); + + $extEnscript[".pl"] = "perl"; + $extEnscript[".py"] = "python"; + $extEnscript[".sql"] = "sql"; + $extEnscript[".java"] = "java"; + $extEnscript[".html"] = "html"; + $extEnscript[".xml"] = "html"; + $extEnscript[".thtml"] = "html"; + $extEnscript[".tpl"] = "html"; + $extEnscript[".sh"] = "bash"; + +![websvn config file](http://blog.linoxide.com/wp-content/uploads/2015/01/config-file-websvn.png) + +### 5. Starting WebSVN ### + +Now, we are almost done. We now need to restart our Apache server. You can do that by the command below. + + # systemctl restart httpd.service + +And then, we'll open WebSVN inside our favorite browser with the address as http://Ip-address/websvn or if you are on local computer, you can goto http://localhost/websvn . + +![websvn successfully installed](http://blog.linoxide.com/wp-content/uploads/2015/01/websvn-success.png) + +**Note**: If you encountered error like "Unable to find "enscript" tool at location "/usr/bin/enscript"" then, you'll need to install enscript using the command "yum install enscript" which will fix the problem. + +### Conclusion ### + +Hurray, we have completed installing WebSVN in our CentOS 7 server. This tutorial works great on RHEL 7 too. WebSVN offers a view onto your subversion repositories that’s been designed to reflect the subversion methodology. You can view the log of any file or directory and see a list of all the files changed, added or deleted in any given revision. So, if you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy WebSVN :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-websvn-subversion-centos-7/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://www.websvn.info/features/ \ No newline at end of file diff --git a/sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md b/sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md new file mode 100644 index 0000000000..92ac657b5a --- /dev/null +++ b/sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md @@ -0,0 +1,79 @@ +How to Bind Apache Tomcat to IPv4 in Centos / Redhat +================================================================================ +Hi all, today we'll learn how to bind tomcat to ipv4 in CentOS 7 Linux Distribution. + +**Apache Tomcat** is an open source web server and servlet container developed by the [Apache Software Foundation][1]. It implements the Java Servlet, JavaServer Pages (JSP), Java Unified Expression Language and Java WebSocket specifications from Sun Microsystems and provides a web server environment for Java code to run in. + +Binding Tomcat to IPv4 is necessary if we have our server not working due to the default binding of our tomcat server to IPv6. As we know IPv6 is the modern way of assigning IP address to a device and is not in complete practice these days but may come into practice in soon future. So, currently we don't need to switch our tomcat server to IPv6 due to no use and we should bind it to IPv4. + +Before thinking to bind to IPv4, we should make sure that we've got tomcat installed in our CentOS 7. Here's is a quick tutorial on [how to install tomcat 8 in CentOS 7.0 Server][2]. + +### 1. Switching to user tomcat ### + +First of all, we'll gonna switch user to **tomcat** user. We can do that by running **su - tomcat** in a shell or terminal. + + # su - tomcat + +![Switch user to tomcat](http://blog.linoxide.com/wp-content/uploads/2015/01/switch-user-tomcat.png) + +### 2. Finding Catalina.sh ### + +Now, we'll First Go to bin directory inside the directory of Apache Tomcat installation which is usually under **/usr/share/apache-tomcat-8.0.x/bin/** where x is sub version of the Apache Tomcat Release. In my case, its **/usr/share/apache-tomcat-8.0.18/bin/** as I have version 8.0.18 installed in my CentOS 7 Server. + + $ cd /usr/share/apache-tomcat-8.0.18/bin + +**Note: Please replace 8.0.18 to the version of Apache Tomcat installed in your system. ** + +Inside the bin folder, there is a script file named catalina.sh . Thats the script file which we'll gonna edit and add a line of configuration which will bind tomcat to IPv4 . You can see that file by running **ls** into a terminal or shell. + + $ ls + +![finding catalina.sh](http://blog.linoxide.com/wp-content/uploads/2015/01/finding-catalina.sh_.png) + +### 3. Configuring Catalina.sh ### + +Now, we'll add **JAVA_OPTS= "$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"** to that scripting file catalina.sh at the end of the file as shown in the figure below. We can edit the file using our favorite text editing software like nano, vim, etc. Here, we'll gonna use nano. + + $ nano catalina.sh + +![Catalina script](http://blog.linoxide.com/wp-content/uploads/2015/01/catalina-script.png) + +Then, add to the file as shown below: + +**JAVA_OPTS= "$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"** + +![configured catalina](http://blog.linoxide.com/wp-content/uploads/2015/01/configured-catalina.png) + +Now, as we've added the configuration to the file, we'll now save and exit nano. + +### 4. Restarting ### + +Now, we'll restart our tomcat server to get our configuration working. We'll need to first execute shutdown.sh and then startup.sh . + + $ ./shutdown.sh + +Now, well run execute startup.sh as: + + $ ./startup.sh + +![restarting apache tomcat server](http://blog.linoxide.com/wp-content/uploads/2015/01/restarting-tomcat-server.png) + +This will restart our tomcat server and the configuration will be loaded which will ultimately bind the server to IPv4. + +### Conclusion ### + +Hurray, finally we'have got our tomcat server bind to IPv4 running in our CentOS 7 Linux Distribution. Binding to IPv4 is easy and is necessary if your Tomcat server is bind to IPv6 which will infact will make your tomcat server not working as IPv6 is not used these days and may come into practice in coming future. If you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/bind-apache-tomcat-ipv4-centos/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://www.apache.org/ +[2]:http://linoxide.com/linux-how-to/install-tomcat-8-centos-7/ \ No newline at end of file diff --git a/sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md b/sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md new file mode 100644 index 0000000000..a12f0b68b3 --- /dev/null +++ b/sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md @@ -0,0 +1,76 @@ +tespeed - Python Tool To Test Your Internet Speed +================================================================================ +Many computer nerds know how to test their internet speed by using the **speedtest.net** but the thing is that it does not give you full control of the operationg going on during the measurement of your speed. Linux users love to type commands on their terminal emualator and do stuff, at least me. + +The tespeed tool is a python tool with many features that helps to test network speed from the terminal. According to the documentation it makes use of nearest speedtest.net server but the users can also manually specify one. + +In the beginning the author wrote the tespeed tool in the php programming language and proved to the ISP he was working for at that time that the internet they served was far from what they advertised. But things were not working all the time as they supposed to be so the author ported his php scripts to python and his tool counts 180 stars on github. + +It means **alot**. + +### How to use tespeed on linux ### + +Before running a python application on your machine you have to make sure that the system you are working meets the dependencies required by the tool. The python tool tespeed dependes on the two following python packages: + +- lxml +- SocksiPy + +You can easily install lxml with the help of the pip python package management system and to do that run the following command. + + pip install lxml + +Now we have to perform a simple trick to make use of the SocksiPy which you can download by using the the following command like shown below. + + wget http://sourceforge.net/projects/socksipy/files/socksipy/SocksiPy%201.00/SocksiPy.zip/ + +Once the installation is finished unzip **SocksiPy.zip** and run the following command to clone tespeed repo on your local machine. + + git clone https://github.com/Janhouse/tespeed.git + +Then place the SocksiPy folder inside the tespeed project you cloned. Now we have to create an empety file inside the SocksiPy folder under the name of **__init__.py** like shown in the following screenshot. + +![simple trick to make tespeed work](http://blog.linoxide.com/wp-content/uploads/2015/01/tespeed1.png) + +Now that we have fixed the dependencies for out projet we can easily run it by using the following command. + + python tespeed.py + +Then some magic is going to happen. The application is going to test your download and upload speed and display them in your console using some really nice colors. + +![testing download and upload speed with tespeed python application](http://blog.linoxide.com/wp-content/uploads/2015/01/tespeed2.png) + +There are many commands available in tespeed such as the option **-ls** to list the servers, option **-p** to specify and use a proxy server, the option **-s** to suppress debugging (STDERR) output and many others that we will explore in this tutorial. + +For example if you want to display results in mebibits you need to use the command **python tespeed.py** followed by the option **-mib** + + python tespeed.py -mib + +You can easily see how the unit used for measurement of the internet speed changed after using the tespeed app with the option -mib. + +![testing internet speed with tespeed python application](http://blog.linoxide.com/wp-content/uploads/2015/01/tespeed3.png) + +A very nice useful option I like to use while working with tespeed is the option -w which can be used to print CSV formated output to STDOUT. + + python tespeed.py -w + +Use the following command to list the servers. + + python tespeed -ls + +After running the above command you will get a list of servers used to test your upload and download speed. My list is really long so I am not going to share it in this tutorial. + +### Conclusion ### + +tespeed is a really easy to use high performance python script that helps computer users to test their upload and download speed by typing commands on their terminal. It supports many options and also you can specify the list of servers you would like to use. Keep playing with tespeed and please share your experience with us in the comment section. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/tespeed-python-tool-test-internet-speed/ + +作者:[Oltjano Terpollari][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/oltjano/ \ No newline at end of file From a124d126b1fa7d7e072a1eb74274dd7fd2852187 Mon Sep 17 00:00:00 2001 From: zheng Date: Mon, 2 Feb 2015 20:51:01 +0800 Subject: [PATCH 092/104] translating --- ...0150202 tespeed - Python Tool To Test Your Internet Speed.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md b/sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md index a12f0b68b3..2a48ca6deb 100644 --- a/sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md +++ b/sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md @@ -1,3 +1,5 @@ +Translating-----geekpi + tespeed - Python Tool To Test Your Internet Speed ================================================================================ Many computer nerds know how to test their internet speed by using the **speedtest.net** but the thing is that it does not give you full control of the operationg going on during the measurement of your speed. Linux users love to type commands on their terminal emualator and do stuff, at least me. From 4b2bc7c5233881edc2ffcbd97d0474ad39988d2c Mon Sep 17 00:00:00 2001 From: su-kaiyao <1250471161@qq.com> Date: Mon, 2 Feb 2015 22:47:29 +0800 Subject: [PATCH 093/104] translated --- ...dern Open Source Code Editors For Linux.md | 88 ------------------- ...dern Open Source Code Editors For Linux.md | 87 ++++++++++++++++++ 2 files changed, 87 insertions(+), 88 deletions(-) delete mode 100644 sources/share/20150125 4 Best Modern Open Source Code Editors For Linux.md create mode 100644 translated/share/20150125 4 Best Modern Open Source Code Editors For Linux.md diff --git a/sources/share/20150125 4 Best Modern Open Source Code Editors For Linux.md b/sources/share/20150125 4 Best Modern Open Source Code Editors For Linux.md deleted file mode 100644 index 43ff7e9877..0000000000 --- a/sources/share/20150125 4 Best Modern Open Source Code Editors For Linux.md +++ /dev/null @@ -1,88 +0,0 @@ -su-kaiyao translating - -4 Best Modern Open Source Code Editors For Linux -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Best_Open_Source_Editors.jpeg) - -Looking for **best programming editors in Linux**? If you ask the old school Linux users, their answer would be Vi, Vim, Emacs, Nano etc. But I am not talking about them. I am going to talk about new age, cutting edge, great looking, sleek and yet powerful, feature rich **best open source code editors for Linux** that would enhance your programming experience. - -### Best modern Open Source editors for Linux ### - -I use Ubuntu as my main desktop and hence I have provided installation instructions for Ubuntu based distributions. But this doesn’t make this list as **best text editors for Ubuntu** because the list is apt for any Linux distribution. Just to add, the list is not in any particular priority order. - -#### Brackets #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/brackets_UI.jpeg) - -[Brackets][1] is an open source code editor from [Adobe][2]. Brackets focuses exclusively on the needs of web designers with built in support for HTML, CSS and Java Script. It’s light weight and yet powerful. It provides you with inline editing and live preview. There are plenty of plugins available to further enhance your experience with Brackets. - -To [install Brackets in Ubuntu][3] and Ubuntu based distributions such as Linux Mint, you can use this unofficial PPA: - - sudo add-apt-repository ppa:webupd8team/brackets - sudo apt-get update - sudo apt-get install brackets - -For other Linux distributions, you can get the source code as well as binaries for Linux, OS X and Windows on its website. - -- [Download Brackets Source Code and Binaries][5] - -#### Atom #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Atom_Editor.jpeg) - -[Atom][5] is another modern and sleek looking open source editor for programmers. Atom is developed by Github and promoted as a “hackable text editor for the 21st century”. The looks of Atom resembles a lot like Sublime Text editor, a hugely popular but closed source text editors among programmers. - -Atom has recently released .deb and .rpm packages so that one can easily install Atom in Debian and Fedora based Linux distributions. Of course, its source code is available as well. - -- [Download Atom .deb][6] -- [Download Atom .rpm][7] -- [Get Atom source code][8] - -#### Lime Text #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/LimeTextEditor.jpeg) - -So you like Sublime Text editor but you are not comfortable with the fact that it is not open source. No worries. We have an [open source clone of Sublime Text][9], called [Lime Text][10]. It is built on Go, HTML and QT. The reason behind cloning of Sublime Text is that there are numerous bugs in Sublime Text 2 and Sublime Text 3 is in beta since forever. There are no transparency in its development, on whether the bugs are being fixed or not. - -So open source lovers, rejoice and get the source code of Lime Text from the link below: - -- [Get Lime Text Source Code][11] - -#### Light Table #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Light_Table.jpeg) - -Flaunted as “the next generation code editor”, [Light Table][12] is another modern looking, feature rich open source editor which is more of an IDE than a mere text editor. There are numerous extensions available to enhance its capabilities. Inline evaluation is what you would love in it. You have to use it to believe how useful Light Table actually is. - -- [Get Light Table Source Code][13] - -### What’s your pick? ### - -No, we are not limited to just four code editors in Linux. The list was about modern editors for programmers. Of course you have plenty of other options such as [Notepad++ alternative Notepadqq][14] or [SciTE][15] and many more. So, among these four, which one is your favorite code editor for Linux? - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/best-modern-open-source-code-editors-for-linux/ - -作者:[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://brackets.io/ -[2]:http://www.adobe.com/ -[3]:http://itsfoss.com/install-brackets-ubuntu/ -[4]:https://github.com/adobe/brackets/releases -[5]:https://atom.io/ -[6]:https://atom.io/download/deb -[7]:https://atom.io/download/rpm -[8]:https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md -[9]:http://itsfoss.com/lime-text-open-source-alternative/ -[10]:http://limetext.org/ -[11]:https://github.com/limetext/lime -[12]:http://lighttable.com/ -[13]:https://github.com/LightTable/LightTable -[14]:http://itsfoss.com/notepadqq-notepad-for-linux/ -[15]:http://itsfoss.com/scite-the-notepad-for-linux/ diff --git a/translated/share/20150125 4 Best Modern Open Source Code Editors For Linux.md b/translated/share/20150125 4 Best Modern Open Source Code Editors For Linux.md new file mode 100644 index 0000000000..d64d84881f --- /dev/null +++ b/translated/share/20150125 4 Best Modern Open Source Code Editors For Linux.md @@ -0,0 +1,87 @@ +4个最流行的Linux平台开源代码编辑器 +=== + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Best_Open_Source_Editors.jpeg) + +寻找**Linux平台最棒的代码编辑器**?如果你询问那些很早就玩Linux的人,他们会回答是Vi, Vim, Emacs, Nano等。但是,我今天不讨论那些。我将谈论一些新时代, 最权威的, 漂亮的, 时髦但十分强大, 功能丰富的**最好的Linux平台开源代码编辑器**,它们将会提升你的编程经验。 + +### Linux平台最时髦的开源代码编辑器 ### + +我使用Ubunt作为我的主桌面,所以我提供的安装说明是基于Ubuntu发布的操作系统。但是这并不意味着本文列表就可以作为**Ubuntu最好的文本编辑器**,因为本列表是适用于任何Linux发布操作系统的。而且,列表的介绍顺序并没有特定的优先级别。 + +#### Brackets #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/brackets_UI.jpeg) + +[Brackets][1]是出自[Adobe][2]的一个开源代码编辑器。它专门关注web设计者的需求,内置支持HTML, CSS和Java Script。它轻量级,但却十分强大,提供在线编辑和实时预览。而且,为了你能更好地体验Brackets,你可以使用许多可用的插件。 + +为了[在Ubuntu][3],以及其余基于Ubuntu发布的版本,诸如Linux Minit上安装Brackets,你可以使用这个非官方的PPA源: + + sudo add-apt-repository ppa:webupd8team/brackets + sudo apt-get update + sudo apt-get install brackets + +其他的Linux发行版本,你可以通过下载源代码或相应Linux, OS X和Windows的二进制文件,进行安装。 + +- [下载Brackets源码和二进制文件][5] + +#### Atom #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Atom_Editor.jpeg) + +[Atom][5]是为程序员准备的另一个时髦开源代码编辑器。Atom由Github开发,被誉为“21世纪可破解的文本编辑器”。Atom的界面和Sublime Text编辑器十分相似。Sublime Text是一个十分流行但闭源的文本编辑器。 + +Atom最近已经发布了 .deb 和 .rpm包,所以在Debian和基于Fedora的Linux版本上安装很简单。当然,你也可以获取它的源代码。 + +- [下载Atom .deb][6] +- [下载Atom .rpm][7] +- [获取Atom源代码][8] + +#### Lime Text ### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/LimeTextEditor.jpeg) + +如果你喜欢Sublime Text,但是你对它的闭源十分反感。别担心,我们有一个[Sublime Text的开源克隆][9],叫做[Lime Text][10]。它基于Go, HTML和QT构造。说它是Sublime Text的克隆,背后原因是Sublime Text2仍有许多bug,而且Sublime Text3到目前为止仍处于测试版本。Sublime Text的开发过程中的bug是否修复,外界并不知情。 + +所以,开源爱好者们,你们可以很开心地通过下面的连接获得Lime Text的源码: + +- [获取Lime Text源码][11] + +#### Light Table #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Light_Table.jpeg) + +被誉为“下一个时代的代码编辑器”,[Light Table][12]是另一个时髦,功能丰富的开源编辑器,它更像是一个IDE,而非仅仅是一个文本编辑器。并且,有许多可以提高其性能的扩展方法。内联评价将是你会爱上它的原因。你一定要去使用看看,这样你才会体会它的实用之处。 + +- [获取Light Table的源码][13] + +### 你的选择是什么? ### + +在Linux平台,我们不能只局限于这四种代码编辑器。这份列表仅介绍了一些时髦的,可供程序员使用的编辑器。当然,你也有许多其他的选择,比如[Notepad++的替代品Notepadqq][14]或者[SciTE][15],等等还有其余一些。所以,这四个中,你最喜欢哪个呢? + +--- + +via: http://itsfoss.com/best-modern-open-source-code-editors-for-linux/ + +作者:[Abhishek][a] +译者:[su-kaiyao](https://github.com/su-kaiyao) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/Abhishek/ +[1]:http://brackets.io/ +[2]:http://www.adobe.com/ +[3]:http://itsfoss.com/install-brackets-ubuntu/ +[4]:https://github.com/adobe/brackets/releases +[5]:https://atom.io/ +[6]:https://atom.io/download/deb +[7]:https://atom.io/download/rpm +[8]:https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md +[9]:http://itsfoss.com/lime-text-open-source-alternative/ +[10]:http://limetext.org/ +[11]:https://github.com/limetext/lime +[12]:http://lighttable.com/ +[13]:https://github.com/LightTable/LightTable +[14]:http://itsfoss.com/notepadqq-notepad-for-linux/ +[15]:http://itsfoss.com/scite-the-notepad-for-linux/ From d8838e11815aba6c3cbb21ed04ca6fb3bb0d9616 Mon Sep 17 00:00:00 2001 From: zheng Date: Mon, 2 Feb 2015 22:04:34 +0800 Subject: [PATCH 094/104] translated --- ...Python Tool To Test Your Internet Speed.md | 78 ------------------- ...Python Tool To Test Your Internet Speed.md | 76 ++++++++++++++++++ 2 files changed, 76 insertions(+), 78 deletions(-) delete mode 100644 sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md create mode 100644 translated/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md diff --git a/sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md b/sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md deleted file mode 100644 index 2a48ca6deb..0000000000 --- a/sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md +++ /dev/null @@ -1,78 +0,0 @@ -Translating-----geekpi - -tespeed - Python Tool To Test Your Internet Speed -================================================================================ -Many computer nerds know how to test their internet speed by using the **speedtest.net** but the thing is that it does not give you full control of the operationg going on during the measurement of your speed. Linux users love to type commands on their terminal emualator and do stuff, at least me. - -The tespeed tool is a python tool with many features that helps to test network speed from the terminal. According to the documentation it makes use of nearest speedtest.net server but the users can also manually specify one. - -In the beginning the author wrote the tespeed tool in the php programming language and proved to the ISP he was working for at that time that the internet they served was far from what they advertised. But things were not working all the time as they supposed to be so the author ported his php scripts to python and his tool counts 180 stars on github. - -It means **alot**. - -### How to use tespeed on linux ### - -Before running a python application on your machine you have to make sure that the system you are working meets the dependencies required by the tool. The python tool tespeed dependes on the two following python packages: - -- lxml -- SocksiPy - -You can easily install lxml with the help of the pip python package management system and to do that run the following command. - - pip install lxml - -Now we have to perform a simple trick to make use of the SocksiPy which you can download by using the the following command like shown below. - - wget http://sourceforge.net/projects/socksipy/files/socksipy/SocksiPy%201.00/SocksiPy.zip/ - -Once the installation is finished unzip **SocksiPy.zip** and run the following command to clone tespeed repo on your local machine. - - git clone https://github.com/Janhouse/tespeed.git - -Then place the SocksiPy folder inside the tespeed project you cloned. Now we have to create an empety file inside the SocksiPy folder under the name of **__init__.py** like shown in the following screenshot. - -![simple trick to make tespeed work](http://blog.linoxide.com/wp-content/uploads/2015/01/tespeed1.png) - -Now that we have fixed the dependencies for out projet we can easily run it by using the following command. - - python tespeed.py - -Then some magic is going to happen. The application is going to test your download and upload speed and display them in your console using some really nice colors. - -![testing download and upload speed with tespeed python application](http://blog.linoxide.com/wp-content/uploads/2015/01/tespeed2.png) - -There are many commands available in tespeed such as the option **-ls** to list the servers, option **-p** to specify and use a proxy server, the option **-s** to suppress debugging (STDERR) output and many others that we will explore in this tutorial. - -For example if you want to display results in mebibits you need to use the command **python tespeed.py** followed by the option **-mib** - - python tespeed.py -mib - -You can easily see how the unit used for measurement of the internet speed changed after using the tespeed app with the option -mib. - -![testing internet speed with tespeed python application](http://blog.linoxide.com/wp-content/uploads/2015/01/tespeed3.png) - -A very nice useful option I like to use while working with tespeed is the option -w which can be used to print CSV formated output to STDOUT. - - python tespeed.py -w - -Use the following command to list the servers. - - python tespeed -ls - -After running the above command you will get a list of servers used to test your upload and download speed. My list is really long so I am not going to share it in this tutorial. - -### Conclusion ### - -tespeed is a really easy to use high performance python script that helps computer users to test their upload and download speed by typing commands on their terminal. It supports many options and also you can specify the list of servers you would like to use. Keep playing with tespeed and please share your experience with us in the comment section. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/tools/tespeed-python-tool-test-internet-speed/ - -作者:[Oltjano Terpollari][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/oltjano/ \ No newline at end of file diff --git a/translated/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md b/translated/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md new file mode 100644 index 0000000000..99bfab9842 --- /dev/null +++ b/translated/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md @@ -0,0 +1,76 @@ +tespeed - 测试网速的Python工具 +================================================================================ +许多电脑呆子知道可以用**speedtest.net**测试网速,但是这个不能在测试中给你足够的控制。Linux用户喜欢在终端中输入命令来完成任务,至少对我是这样的。 + +tespeed是一款有很多特性的python工具,可以在终端在测试网速。根据文档,它利用了speedtest.net的服务器,但是用户可以手动指定。 + +最初作者用php语言写了tespeed工具,并且证明了ISP提供的网络远低于它广告中所说的那样。但是事情并不是一直如它们想的那样,因此作者移植他的php脚本到python中并且他的工具在github中已经有180个star了。 + +这意味着**alot**。 + +### 如何在linux中测试tespeed ### + +在你电脑上运行这个python程序前先确保系统已经满足了这个工具的依赖。tespeed依赖下面两个包: + +- lxml +- SocksiPy + +你可以用pip包管理系统来安装lxml,只要用下面的命令就行。 + + pip install lxml + +现在我们需要输入下面的命令来下载安装SocksiPy。 + + wget http://sourceforge.net/projects/socksipy/files/socksipy/SocksiPy%201.00/SocksiPy.zip/ + +下载完成后 解压**SocksiPy.zip**病运行下面的命令来克隆tespeed仓库到你本地机器中。 + + git clone https://github.com/Janhouse/tespeed.git + +接着把SocksiPy文件夹放到你克隆下来的tespeed项目中。现在我们要像截图那样在SocksPy中的**__init__.py**下面创建一个空文件。 + +![simple trick to make tespeed work](http://blog.linoxide.com/wp-content/uploads/2015/01/tespeed1.png) + +现在我们已经解决了项目的依赖问题,我们可以用下面的命令运行了。 + + python tespeed.py + +接下来就会发生一些神奇的事了。程序会测试你的下载和上传速度并且在你的终端中用漂亮的颜色显示出来。 + +![testing download and upload speed with tespeed python application](http://blog.linoxide.com/wp-content/uploads/2015/01/tespeed2.png) + +在tespeed中有很多选项,如**-ls**来现实服务器,**-p**来指定代理服务器, **-s**来阻止调试(STDERR)输出, 还有很多我们会在本教程中探索。 + +如果你想要结果现实成MB,你可以在**python tespeed.py** 后面接上选项 **-mib**。 + + python tespeed.py -mib + +在你使用了-mib选项后你可以看到计量网速的单位改变了。 + +![testing internet speed with tespeed python application](http://blog.linoxide.com/wp-content/uploads/2015/01/tespeed3.png) + +我非常喜欢用的一个选项是-w,它可以把标准输出转化成CSV格式。 + + python tespeed.py -w + +使用下面的命令来列出服务器。 + + python tespeed -ls + +运行上面的命令后,你会看到可以用于测试上传和下载速度的服务器列表。我的列表非常长,所以我不会在教程中共享了。 + +### 总结 ### + +=tespeed的确是一款帮助用户在终端中测试上传和下载速度的高性能python脚本。它支持很多的选项并且你可以指定列表中你想使用的服务器。继续使用tespeed并在留言区写下你们的体验吧。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/tespeed-python-tool-test-internet-speed/ + +作者:[Oltjano Terpollari][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/oltjano/ \ No newline at end of file From dadfa460067915d0863207f5100ed9eba41a3813 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 3 Feb 2015 10:52:43 +0800 Subject: [PATCH 095/104] translating --- ...0202 How To Install Websvn for Subversion in CentOS 7.0.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md b/sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md index 0a9dfdb442..5d782a80e4 100644 --- a/sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md +++ b/sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md @@ -1,3 +1,5 @@ +Translating----geekpi + How To Install Websvn for Subversion in CentOS 7.0 ================================================================================ Hi all, today we'll be installing latest WebSVN in our CentOS 7 for subversion repositories. @@ -120,4 +122,4 @@ via: http://linoxide.com/linux-how-to/install-websvn-subversion-centos-7/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunp/ -[1]:http://www.websvn.info/features/ \ No newline at end of file +[1]:http://www.websvn.info/features/ From 6fffa54187f40ffcc2a2d89a9c3aaf8ff1529200 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 3 Feb 2015 11:39:53 +0800 Subject: [PATCH 096/104] translated --- ...all Websvn for Subversion in CentOS 7.0.md | 125 ------------------ ...all Websvn for Subversion in CentOS 7.0.md | 124 +++++++++++++++++ 2 files changed, 124 insertions(+), 125 deletions(-) delete mode 100644 sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md create mode 100644 translated/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md diff --git a/sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md b/sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md deleted file mode 100644 index 5d782a80e4..0000000000 --- a/sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md +++ /dev/null @@ -1,125 +0,0 @@ -Translating----geekpi - -How To Install Websvn for Subversion in CentOS 7.0 -================================================================================ -Hi all, today we'll be installing latest WebSVN in our CentOS 7 for subversion repositories. - -WebSVN offers a view onto your subversion repositories that’s been designed to reflect the Subversion methodology. We can view the log of any file or directory and see a list of all the files changed, added or deleted in any given revision. We can also view the differences between two versions of a file so as to see exactly what was changed in a particular revision. - -### Features ### - -WebSVN offers the following features: - -- Easy to use interface -- Customisable templating system -- Colourisation of file listings -- Blame view -- Log message searching -- RSS feed support -- [and more...][1] - -Since it's written using PHP, WebSVN is also very portable and easy to install. - -Now, we'll install WebSVN for our Subversion (Apache SVN). Make sure that you have installed Apache SVN in your server. If you don't have it installed, you can install from this tutorial. - -After you installed Apache SVN(Subversion), you'll need to follow the easy steps below. - -### 1. Download WebSVN ### - -You can download WebSVN from their official site http://www.websvn.info/download/ . We'll first get inside directory /var/www/html/ and then download the package inside it. - - $ sudo -s - -**Please execute the above command in a shell or terminal as wee'll need to switch to root privilege so that we'll have full access to the system's restricted areas.** - - # cd /var/www/html - # wget http://websvn.tigris.org/files/documents/1380/49057/websvn-2.3.3.zip - -![downloading websvn package](http://blog.linoxide.com/wp-content/uploads/2015/01/downloading-websvn.png) - -Here, I am download the latest version 2.3.3 of websvn. You can get the link from the site. You can simply replace the above link with the link of the package you wanna install. - -### 2. Extract the downloaded zip ### - - # unzip websvn-2.3.3.zip - - # mv websvn-2.3.3 websvn - -![extracting websvn](http://blog.linoxide.com/wp-content/uploads/2015/01/extracting-websvn.png) - -### 3. Install php ### - - # yum install php - -![yum install php](http://blog.linoxide.com/wp-content/uploads/2015/01/yum-install-php.png) - -### 4. Edit WebSVN config ### - -Now, we'll need to copy distconfig.php which is situated inside /var/www/html/websvn/include directory to config.php and then edit the configuration file. - - # cd /var/www/html/websvn/include - - # cp distconfig.php config.php - - # nano config.php - -Now, we'll need to make changes to the file as shown below. After it is done, please save the file and exit. - - // Configure these lines if your commands aren't on your path. - // - $config->setSVNCommandPath('/usr/bin'); // e.g. c:\\program files\\subversion\\bin - $config->setDiffPath('/usr/bin'); - - // For syntax colouring, if option enabled... - $config->setEnscriptPath('/usr/bin'); - $config->setSedPath('/bin'); - - // For delivered tarballs, if option enabled... - $config->setTarPath('/bin'); - - // For delivered GZIP'd files and tarballs, if option enabled... - $config->setGZipPath('/bin'); - - // - $config->parentPath('/svn/'); - - $extEnscript[".pl"] = "perl"; - $extEnscript[".py"] = "python"; - $extEnscript[".sql"] = "sql"; - $extEnscript[".java"] = "java"; - $extEnscript[".html"] = "html"; - $extEnscript[".xml"] = "html"; - $extEnscript[".thtml"] = "html"; - $extEnscript[".tpl"] = "html"; - $extEnscript[".sh"] = "bash"; - -![websvn config file](http://blog.linoxide.com/wp-content/uploads/2015/01/config-file-websvn.png) - -### 5. Starting WebSVN ### - -Now, we are almost done. We now need to restart our Apache server. You can do that by the command below. - - # systemctl restart httpd.service - -And then, we'll open WebSVN inside our favorite browser with the address as http://Ip-address/websvn or if you are on local computer, you can goto http://localhost/websvn . - -![websvn successfully installed](http://blog.linoxide.com/wp-content/uploads/2015/01/websvn-success.png) - -**Note**: If you encountered error like "Unable to find "enscript" tool at location "/usr/bin/enscript"" then, you'll need to install enscript using the command "yum install enscript" which will fix the problem. - -### Conclusion ### - -Hurray, we have completed installing WebSVN in our CentOS 7 server. This tutorial works great on RHEL 7 too. WebSVN offers a view onto your subversion repositories that’s been designed to reflect the subversion methodology. You can view the log of any file or directory and see a list of all the files changed, added or deleted in any given revision. So, if you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy WebSVN :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/install-websvn-subversion-centos-7/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:http://www.websvn.info/features/ diff --git a/translated/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md b/translated/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md new file mode 100644 index 0000000000..35af70fc51 --- /dev/null +++ b/translated/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md @@ -0,0 +1,124 @@ +如何在CentOS 7.0上为Subverison安装Websvn +================================================================================ +大家好,今天我们会在CentOS 7.0 上为subversion安装WebSVN。 + +WebSVN提供了Svbverion中的各种方法来查看你的仓库。我们可以看到任何给定版本的任何文件或者目录的日志并且看到所有文件改动、添加、删除的列表。我们同样可以看到两个版本间的不同来知道特定版本改动了什么。 + + +### 特性 ### + +WebSVN提供了下面这些特性: + +- 易于使用的用户界面 +- 可定制的模板系统 +- 色彩化的文件列表 +- blame 视图 +- 日志信息查询 +- RSS支持 +- [更多][1] + +由于使用PHP写成,WebSVN同样易于移植和安装。 + +现在我们将为Subverison(Apache SVN)安装WebSVN。请确保你的服务器上已经安装了Apache SVN。如果你还没有安装,你可以在本教程中安装。 + +After you installed Apache SVN(Subversion), you'll need to follow the easy steps below.安装完Apache SVN(Subversion)后,你需要以下几步。 + +### 1. 下载 WebSVN ### + +你可以从官方网站http://www.websvn.info/download/中下载WebSVN。我们首先进入/var/www/html/并在这里下载安装包。 + + $ sudo -s + +**请在shell或者终端中执行上面的命令,因为我们需要切换到root权限来对系统限制区域有访问权。** + + # cd /var/www/html + # wget http://websvn.tigris.org/files/documents/1380/49057/websvn-2.3.3.zip + +![downloading websvn package](http://blog.linoxide.com/wp-content/uploads/2015/01/downloading-websvn.png) + +这里,我下载的是最新的2.3.3版本的websvn。你可以从这个网站得到链接。你可以用你要安装的包的链接来替换上面的链接。 + +### 2. 解压下载的zip ### + + # unzip websvn-2.3.3.zip + + # mv websvn-2.3.3 websvn + +![extracting websvn](http://blog.linoxide.com/wp-content/uploads/2015/01/extracting-websvn.png) + +### 3. 安装php ### + + # yum install php + +![yum install php](http://blog.linoxide.com/wp-content/uploads/2015/01/yum-install-php.png) + +### 4. 编辑WebSVN配置 ### + +现在,我们需要拷贝位于/var/www/html/websvn/include的distconfig.php为config.php,并且接着编辑配置文件。 + + # cd /var/www/html/websvn/include + + # cp distconfig.php config.php + + # nano config.php + +现在我们需要按如下改变文件。这完成之后,请保存病退出。 + + // Configure these lines if your commands aren't on your path. + // + $config->setSVNCommandPath('/usr/bin'); // e.g. c:\\program files\\subversion\\bin + $config->setDiffPath('/usr/bin'); + + // For syntax colouring, if option enabled... + $config->setEnscriptPath('/usr/bin'); + $config->setSedPath('/bin'); + + // For delivered tarballs, if option enabled... + $config->setTarPath('/bin'); + + // For delivered GZIP'd files and tarballs, if option enabled... + $config->setGZipPath('/bin'); + + // + $config->parentPath('/svn/'); + + $extEnscript[".pl"] = "perl"; + $extEnscript[".py"] = "python"; + $extEnscript[".sql"] = "sql"; + $extEnscript[".java"] = "java"; + $extEnscript[".html"] = "html"; + $extEnscript[".xml"] = "html"; + $extEnscript[".thtml"] = "html"; + $extEnscript[".tpl"] = "html"; + $extEnscript[".sh"] = "bash"; + +![websvn config file](http://blog.linoxide.com/wp-content/uploads/2015/01/config-file-websvn.png) + +### 5. 启动 WebSVN ### + +现在,我们将近完成了。现在需要重启Apache服务。你可以用下面的命令。 + + # systemctl restart httpd.service + +接着我们在浏览器中打开WebSVN,输入http://Ip-address/websvn,或者你在本地的话,你可以输入http://localhost/websvn。 + +![websvn successfully installed](http://blog.linoxide.com/wp-content/uploads/2015/01/websvn-success.png) + +**注意**: 如果你遇到一个像"Unable to find "enscript" tool at location "/usr/bin/enscript"这样的问题,那么你需要使用“yum install enscript”安装enscript来修复这个问题。 + +### 总结 ### + +好了,我们已经在CentOS 7上哇安城WebSVN的安装了。这个教程同样适用于RHEL 7。WebSVN提供了Svbverion中的各种方法来查看你的仓库。你可以看到任何给定版本的任何文件或者目录的日志并且看到所有文件改动、添加、删除的列表。如果你有任何问题、评论、反馈请在下面的评论栏中留下,来让我们知道该添加什么和改进。谢谢!享受WebSVN吧。:-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-websvn-subversion-centos-7/ + +作者:[Arun Pyasi][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://www.websvn.info/features/ From 95b1822fc70f7b4958ce7db70c7eaf0f50a8081f Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 3 Feb 2015 15:49:14 +0800 Subject: [PATCH 097/104] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Modern Open Source Code Editors For Linux.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/translated/share/20150125 4 Best Modern Open Source Code Editors For Linux.md b/translated/share/20150125 4 Best Modern Open Source Code Editors For Linux.md index d64d84881f..6072c2b759 100644 --- a/translated/share/20150125 4 Best Modern Open Source Code Editors For Linux.md +++ b/translated/share/20150125 4 Best Modern Open Source Code Editors For Linux.md @@ -3,11 +3,11 @@ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Best_Open_Source_Editors.jpeg) -寻找**Linux平台最棒的代码编辑器**?如果你询问那些很早就玩Linux的人,他们会回答是Vi, Vim, Emacs, Nano等。但是,我今天不讨论那些。我将谈论一些新时代, 最权威的, 漂亮的, 时髦但十分强大, 功能丰富的**最好的Linux平台开源代码编辑器**,它们将会提升你的编程经验。 +寻找**Linux平台最棒的代码编辑器**?如果你询问那些很早就玩Linux的人,他们会回答是Vi, Vim, Emacs, Nano等。但是,我今天不讨论那些。我将谈论一些新时代尖端、漂亮、时髦而且十分强大, 功能丰富的**最好的Linux平台开源代码编辑器**,它们将会提升你的编程经验。 ### Linux平台最时髦的开源代码编辑器 ### -我使用Ubunt作为我的主桌面,所以我提供的安装说明是基于Ubuntu发布的操作系统。但是这并不意味着本文列表就可以作为**Ubuntu最好的文本编辑器**,因为本列表是适用于任何Linux发布操作系统的。而且,列表的介绍顺序并没有特定的优先级别。 +我使用Ubuntu作为我的主桌面,所以我提供的安装说明是基于Ubuntu的发行版。但是这并不意味着本文列表就是**Ubuntu最好的文本编辑器**,因为本列表是适用于任何Linux发行版。而且,列表的介绍顺序并没有特定的优先级别。 #### Brackets #### @@ -15,7 +15,7 @@ [Brackets][1]是出自[Adobe][2]的一个开源代码编辑器。它专门关注web设计者的需求,内置支持HTML, CSS和Java Script。它轻量级,但却十分强大,提供在线编辑和实时预览。而且,为了你能更好地体验Brackets,你可以使用许多可用的插件。 -为了[在Ubuntu][3],以及其余基于Ubuntu发布的版本,诸如Linux Minit上安装Brackets,你可以使用这个非官方的PPA源: +为了[在Ubuntu][3],以及其它基于Ubuntu的发行版,诸如Linux Minit上安装Brackets,你可以使用这个非官方的PPA源: sudo add-apt-repository ppa:webupd8team/brackets sudo apt-get update @@ -29,7 +29,7 @@ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Atom_Editor.jpeg) -[Atom][5]是为程序员准备的另一个时髦开源代码编辑器。Atom由Github开发,被誉为“21世纪可破解的文本编辑器”。Atom的界面和Sublime Text编辑器十分相似。Sublime Text是一个十分流行但闭源的文本编辑器。 +[Atom][5]是为程序员准备的另一个时尚开源代码编辑器。Atom由Github开发,被誉为“21世纪可破解的文本编辑器”。Atom的界面和Sublime Text编辑器十分相似。Sublime Text是一个十分流行但闭源的文本编辑器。 Atom最近已经发布了 .deb 和 .rpm包,所以在Debian和基于Fedora的Linux版本上安装很简单。当然,你也可以获取它的源代码。 @@ -41,7 +41,7 @@ Atom最近已经发布了 .deb 和 .rpm包,所以在Debian和基于Fedora的Li ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/LimeTextEditor.jpeg) -如果你喜欢Sublime Text,但是你对它的闭源十分反感。别担心,我们有一个[Sublime Text的开源克隆][9],叫做[Lime Text][10]。它基于Go, HTML和QT构造。说它是Sublime Text的克隆,背后原因是Sublime Text2仍有许多bug,而且Sublime Text3到目前为止仍处于测试版本。Sublime Text的开发过程中的bug是否修复,外界并不知情。 +如果你喜欢Sublime Text,但是你对它的闭源十分反感。别担心,我们有一个[Sublime Text的开源克隆][9],叫做[Lime Text][10]。它基于Go, HTML和QT构造。说它是Sublime Text的克隆,背后原因是Sublime Text2仍有许多bug,而且Sublime Text3到目前为止仍处于测试版本。Sublime Text在开发过程中的bug是否修复,外界并不知情。 所以,开源爱好者们,你们可以很开心地通过下面的连接获得Lime Text的源码: @@ -51,13 +51,13 @@ Atom最近已经发布了 .deb 和 .rpm包,所以在Debian和基于Fedora的Li ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Light_Table.jpeg) -被誉为“下一个时代的代码编辑器”,[Light Table][12]是另一个时髦,功能丰富的开源编辑器,它更像是一个IDE,而非仅仅是一个文本编辑器。并且,有许多可以提高其性能的扩展方法。内联评价将是你会爱上它的原因。你一定要去使用看看,这样你才会体会它的实用之处。 +被誉为“下一代的代码编辑器”,[Light Table][12]是另一个时髦,功能丰富的开源编辑器,它更像是一个IDE,而非仅仅是一个文本编辑器。并且,有许多可以提高其性能的扩展方法。内联评价将是你会爱上它的原因。你一定要试用一下看,这样你才会体会它的实用之处。 - [获取Light Table的源码][13] ### 你的选择是什么? ### -在Linux平台,我们不能只局限于这四种代码编辑器。这份列表仅介绍了一些时髦的,可供程序员使用的编辑器。当然,你也有许多其他的选择,比如[Notepad++的替代品Notepadqq][14]或者[SciTE][15],等等还有其余一些。所以,这四个中,你最喜欢哪个呢? +在Linux平台,我们不能只局限于这四种代码编辑器。这份列表仅介绍了一些时髦的,可供程序员使用的编辑器。当然,你也有许多其他的选择,比如[Notepad++的替代品Notepadqq][14]或者[SciTE][15]等等。那么,文中这四个编辑器,你最喜欢哪个呢? --- @@ -65,7 +65,7 @@ via: http://itsfoss.com/best-modern-open-source-code-editors-for-linux/ 作者:[Abhishek][a] 译者:[su-kaiyao](https://github.com/su-kaiyao) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7b818dcaf786900b70e137007593267c507c4822 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 3 Feb 2015 16:23:46 +0800 Subject: [PATCH 098/104] =?UTF-8?q?20150203-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...s and Code Editors for JavaScript Users.md | 82 +++++++++++++++++++ ... Install KDE Plasma 5.2 In Ubuntu 14.10.md | 60 ++++++++++++++ ...t be opened correctly' on Google Chrome.md | 50 +++++++++++ 3 files changed, 192 insertions(+) create mode 100644 sources/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md create mode 100644 sources/tech/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md create mode 100644 sources/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md diff --git a/sources/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md b/sources/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md new file mode 100644 index 0000000000..83f5f11293 --- /dev/null +++ b/sources/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md @@ -0,0 +1,82 @@ +9 Best IDEs and Code Editors for JavaScript Users +================================================================================ +Web designing and developing is one of the trending sectors in the recent times, where more and more peoples started to search for their career opportunities. But, Getting the right opportunity as a web developer or graphic designer is not just a piece of cake for everyone, It certainly requires a strong mind presence as well as right skills to find the find the right job. There are a lot of websites available today which can help you to get the right job description according to your knowledge. But still if you want to achieve something in this sector you must have some excellent skills like working with different platforms, IDEs and various other tools too. + +Talking about the different platforms and IDEs used for various languages for different purposes, gone is the time when we learn just one IDE and get the optimum solutions for our web design projects easily. Today we are living in the modern lifestyle where competition is getting more and more tough on every single day. Same is the case with the IDEs, IDE is basically a powerful client application for creating and deploying applications. Today we are going to share some best javascript IDE for web designers and developers. + +Please visit this list of best code editors for javascript user and share your thought with us. + +### 1) [Spket][1] ### + +**Spket IDE** is powerful toolkit for JavaScript and XML development. The powerful editor for JavaScript, XUL/XBL and Yahoo! Widget development. The JavaScript editor provides features like code completion, syntax highlighting and content outline that helps developers productively create efficient JavaScript code. + +![](http://i0.wp.com/devzum.com/wp-content/uploads/2015/01/spket-e1422674329554.png) + +### 2) [Ixedit][2] ### + +IxEdit is a JavaScript-based interaction design tool for the web. With IxEdit, designers can practice DOM-scripting without coding to change, add, move, or transform elements dynamically on your web pages. + +![](http://i0.wp.com/devzum.com/wp-content/uploads/2015/01/ixedit.png) + +### 3) [Komodo Edit][3] ### + +Komode is free and powerful code editor for Javascript and other programming languages. + +![](http://i2.wp.com/devzum.com/wp-content/uploads/2015/01/komodo-edit-e1422674596277.png) + +### 4) [EpicEditor][4] ### + +EpicEditor is an embeddable JavaScript Markdown editor with split fullscreen editing, live previewing, automatic draft saving, offline support, and more. For developers, it offers a robust API, can be easily themed, and allows you to swap out the bundled Markdown parser with anything you throw at it. + +![](http://i1.wp.com/devzum.com/wp-content/uploads/2015/01/epiceditor-e1422674732281.png) + +### 5) [codepress][5] ### + +CodePress is web-based source code editor with syntax highlighting written in JavaScript that colors text in real time while it’s being typed in the browser. + +![](http://i1.wp.com/devzum.com/wp-content/uploads/2015/01/codepres-e1422674893706.png) + +### 6) [ACe][6] ### + +Ace is an embeddable code editor written in JavaScript. It matches the features and performance of native editors such as Sublime, Vim and TextMate. It can be easily embedded in any web page and JavaScript application. + +![](http://i0.wp.com/devzum.com/wp-content/uploads/2015/01/ace-e1422675089912.png) + +### 7) [scripted][7] ### + +Scripted is a fast and lightweight code editor with an initial focus on JavaScript editing. Scripted is a browser based editor and the editor itself is served from a locally running Node.js server instance. + +![](http://i1.wp.com/devzum.com/wp-content/uploads/2015/01/scripted-e1422675188408.png) + +### 8) [Netbeans][8] ### + +This is another more impressive and useful code editors for javascript and other programming languages. + +![](http://i1.wp.com/devzum.com/wp-content/uploads/2015/01/code_editing1-e1422675506226.png) + +### 9) [Webstorm][9] ### + +This is the smartest ID for javascript. WebStorm is a lightweight yet powerful IDE, perfectly equipped for complex client-side development and server-side development with Node.js. + +![](http://i0.wp.com/devzum.com/wp-content/uploads/2015/01/webstorm.png) + +-------------------------------------------------------------------------------- + +via: http://devzum.com/2015/01/31/9-best-ides-and-code-editors-for-javascript-users/ + +作者:[vikas][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://devzum.com/author/vikas/ +[1]:http://spket.com/ +[2]:http://www.ixedit.com/ +[3]:http://komodoide.com/komodo-edit/ +[4]:http://oscargodson.github.io/EpicEditor/ +[5]:http://codepress.sourceforge.net/ +[6]:http://ace.c9.io/#nav=about +[7]:https://github.com/scripted-editor/scripted +[8]:https://netbeans.org/ +[9]:http://www.jetbrains.com/webstorm/ \ No newline at end of file diff --git a/sources/tech/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md b/sources/tech/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md new file mode 100644 index 0000000000..cd1a5eb525 --- /dev/null +++ b/sources/tech/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md @@ -0,0 +1,60 @@ +How To Install KDE Plasma 5.2 In Ubuntu 14.10 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Plasma_Ubuntu_1410.jpg) + +[KDE][1] Plasma 5.2 has been [released][2] and in this post we shall see how to install KDE Plasma 5.2 in Ubuntu 14.10. + +Ubuntu’s default desktop environment Unity is beautiful and packs quite some feature. But if you ask any experienced Linux user about desktop customization, his answer will be KDE. KDE is boss when it comes to customization and its popularity can be guessed that Ubuntu has an official KDE flavor, known as [Kubuntu][3]. + +A good thing about Ubuntu (or any other Linux OS for that matter) is that it doesn’t bind you with one particular desktop environment. You can always install additional desktop environments and choose to switch between them while keeping several desktop environments at the same time. Earlier, we have seen the installation of following desktop environments: + +- [How to install Mate desktop in Ubuntu 14.04][4] +- [How to install Cinnamon in Ubuntu 14.04][5] +- [How to install Budgie desktop in Ubuntu 14.04][6] +- [How to install GNOME Shell in Ubuntu 14.04][7] + +And today we shall see how to install KDE Plasma in Ubuntu 14.10. + +### Install KDE Plasma 5.2 in Ubuntu 14.04 ### + +Before you go on installing Plasma on Ubuntu 14.10, you should know that it will download around one GB of data. So consider your network speed and data package (if any) before opting for KDE installation. The PPA we are going to use for installing Plasma is the official PPA provided by the KDE community. Use the commands below in terminal: + + sudo apt-add-repository ppa:kubuntu-ppa/next-backports + sudo apt-get update + sudo apt-get dist-upgrade + sudo apt-get install kubuntu-plasma5-desktop plasma-workspace-wallpapers + +During the installation, it will as you to choose the default display manager. I chose the default LightDM. Once installed, restart the system. At the login, click on the Ubuntu symbol beside the login field. In here, select Plasma. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Select_Plasma_KDE_Ubuntu.jpeg) + +You’ll be logged in to KDE Plasma now. Here is a quick screenshot of how KDE Plasma 5.2 looks like in Ubuntu 14.10: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/KDE_Plasma_Desktop.jpeg) + +### Remove KDE Plasma from Ubuntu ### + +If you want to revert the changes, use the following commands to get rid of KDE Plasma from Ubuntu 14.10. + + sudo apt-get install ppa-purge + sudo apt-get remove kubuntu-plasma5-desktop + sudo ppa-purge ppa:kubuntu-ppa/next + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-kde-plasma-ubuntu-1410/ + +作者:[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]:https://www.kde.org/ +[2]:https://dot.kde.org/2015/01/27/plasma-52-beautiful-and-featureful +[3]:http://www.kubuntu.org/ +[4]:http://itsfoss.com/install-mate-desktop-ubuntu-14-04/ +[5]:http://itsfoss.com/install-cinnamon-24-ubuntu-1404/ +[6]:http://itsfoss.com/install-budgie-desktop-ubuntu-1404/ +[7]:http://itsfoss.com/how-to-install-gnome-in-ubuntu-14-04/ \ No newline at end of file diff --git a/sources/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md b/sources/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md new file mode 100644 index 0000000000..0608359029 --- /dev/null +++ b/sources/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md @@ -0,0 +1,50 @@ +Linux FAQs with Answers--How to fix “Your profile could not be opened correctly” on Google Chrome +================================================================================ +> **Question**: When I open Google Chrome web browser on my Linux box, I have several pop-up messages saying "Your profile could not be opened correctly." This error happens every time I open Google Chrome. How can I solve this error? + +When you see an error message saying "Your profile could not be opened correctly" on your Google Chrome web browser," that is because somehow your profile data on Google Chrome got corrupted. This can happen while you upgrade your Google Chrome browser manually on Linux. + +![](https://farm8.staticflickr.com/7428/16238502737_27bdda6685_o.png) + +Depending on exactly which file got corrupted, you can try one of these methods. + +### Method One ### + +Close all your Chrome browser windows/tabs. + +Go to ~/.config/google-chrome/Default, and remove/rename "Web Data" file as below. + + $ cd ~/.config/google-chrome/Default + $ rm "Web Data" + +Re-open Google Chrome browser. + +### Method Two ### + +Close all your Chrome browser windows/tabs. + +Go to ~/.config/google-chrome/"Profile 1", and rename "History" file as below. + + $ cd ~/.config/google-chrome/"Profile 1" + $ mv History History.bak + +Re-open Google Chrome browser. + +### Method Three ### + +If the problem still persists, you can remove the Default profile folder (~/.config/google-chrome/Default) altogether. Note that by doing so, you will lose all previously opened Google tabs, imported bookmarks, browsing history, sign-in data, etc. + +Before removing it, first close all your Chrome browser windows/tabs. + + $ rm -rf ~/.config/google-chrome/Default + +After restarting Google Chrome, the folder ~/.config/google-chrome/Default will automatically be re-generated. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/your-profile-could-not-be-opened-correctly-google-chrome.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file From 4c4d31b2dca217f3a2be05a1f55c35a98979d1b4 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 3 Feb 2015 16:29:50 +0800 Subject: [PATCH 099/104] =?UTF-8?q?20150203-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...sed Monitoring System In CentOS or RHEL.md | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 sources/tech/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md diff --git a/sources/tech/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md b/sources/tech/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md new file mode 100644 index 0000000000..51983921f6 --- /dev/null +++ b/sources/tech/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md @@ -0,0 +1,111 @@ +How To Install Linux-dash Web Based Monitoring System In CentOS/RHEL +================================================================================ +**Linux-dash** is a web-based lightweight monitoring dashboard for Linux machines. This application will display real-time, various system properties, such as CPU load, RAM usage, disk usage, Internet speed, network connections, RX/TX bandwidth, logged-in users, running processes etc. It will not store long term statistics, Thus it doesn’t have a backend database. + +In this article i will show you how to install and setup Linux dash, Here my web server is **Nginx**. + +### Installation ### + +First of all we should enable, [EPEL repository][1]. + +**Next, we need to install nginx with the following command.** + + sudo yum install nginx + +**Install php-fpm component** + + sudo yum install git php-common php-fpm + +Now, we have to configure nginx for Linux-dash. So create /etc/nginx/conf.d/linuxdash.conf as follows. + + sudo vim /etc/nginx/conf.d/linuxdash.conf + +---------- + + server { + server_name $domain_name; + listen 8080; + root /var/www; + index index.html index.php; + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + + location ~* \.(?:xml|ogg|mp3|mp4|ogv|svg|svgz|eot|otf|woff|ttf|css|js|jpg|jpeg|gif|png|ico)$ { + try_files $uri =404; + expires max; + access_log off; + add_header Pragma public; + add_header Cache-Control "public, must-revalidate, proxy-revalidate"; + } + + location /linux-dash { + index index.html index.php; + } + + # PHP-FPM via sockets + location ~ \.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+?\.php)(/.*)$; + fastcgi_pass unix:/var/run/php-fpm.sock; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + try_files $uri $uri/ /index.php?$args; + include fastcgi_params; + } + } + +**Next job is to configure php-fpm. Open /etc/php-fpm.d/www.conf in your Favorite editor.** + + sudo vim /etc/php-fpm.d/www.conf + +**Make sure to set “listen”, “user” and “group” fields as below. You can leave the rest of the configuration unchanged.** + + . . . + listen = /var/run/php-fpm.sock + user = nginx + group = nginx + . . . + +**Now, We are going to Download and install linux-dash under /var/www** + + git clone https://github.com/afaqurk/linux-dash.git + sudo cp -r linux-dash/ /var/www/ + sudo chown -R nginx:nginx /var/www + +**Next, restart Nginx web server as well as** php-fpm + + sudo service nginx restart + sudo service php-fpm restart + +**Set nginx and php-fpm to auto-start upon boot** + + sudo chkconfig nginx on + sudo chkconfig php-fpm on + +In this example, we have configured linux-dash to use TCP port 8080. So make sure that the firewall is not blocking TCP port 8080. + +### Monitor a Linux server with linux-dash ### + +You can access Linux-dash by pointing you browser to **http://:8080/linux-dash/** + +The web dashboard consists of several widgets, each of which displays particular system properties. You can customize the look of the web dashboard by rearranging and/or closing some of the widgets. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Lin-dash.png) + +Good day! + +See you guys with next article. + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/install-linux-dash-web-based-monitoring-system-centosrhel/ + +作者:[Jijo][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/jijo/ +[1]:http://www.unixmen.com/install-epel-repository-centos-rhel-7/ \ No newline at end of file From efab980f484535a0772de8fbd11c94b7a492f78f Mon Sep 17 00:00:00 2001 From: Vic___ Date: Tue, 3 Feb 2015 17:44:41 +0800 Subject: [PATCH 100/104] translated --- ...26 4 lvcreate Command Examples on Linux.md | 89 +++++++------------ 1 file changed, 30 insertions(+), 59 deletions(-) diff --git a/sources/tech/20150126 4 lvcreate Command Examples on Linux.md b/sources/tech/20150126 4 lvcreate Command Examples on Linux.md index bce08cc203..145f2c52ee 100644 --- a/sources/tech/20150126 4 lvcreate Command Examples on Linux.md +++ b/sources/tech/20150126 4 lvcreate Command Examples on Linux.md @@ -1,76 +1,74 @@ - Vic020 - -4 lvcreate Command Examples on Linux +在linux中4个lvcreate命令例子 ================================================================================ -Logical volume management (LVM) is a widely-used technique and extremely flexible disk management scheme. It basically contain three basic command : +逻辑卷管理(LVM)是广泛使用的技术,并拥有极其灵活磁盘管理方案。主要包含3个基础命令: -a. Creates the physical volumes using **pvcreate** -b. Create the volume group and add partition into volume group using **vgcreate** -c. Create a new logical volume using **lvcreate** +a. 创建物理卷使用**pvcreate** +b. 创建卷组并给卷组增加分区**vgcreate** +c. 创建新的逻辑卷使用**lvcreate** ![](http://www.ehowstuff.com/wp-content/uploads/2015/01/lvm-diagram1.jpg) -The following examples focus on the command to create a logical volume in an existing volume group, **lvcreate**. **lvcreate** is the command do allocating logical extents from the free physical extent pool of that volume group. Normally logical volumes use up any space available on the underlying physical volumes on a next-free basis. Modifying the logical volume will frees and reallocates space in the physical volumes. The following **lvcreate** command has been tested on linux CentOS 5, CentOS 6, CentOS 7, RHEL 5, RHEl 6 and RHEL 7 version. +随后的例子着重在已经存在的卷组上使用**lvcreate**创建逻辑卷。**lvcreate**命令可以在来自自由物理扩展池的卷组分配逻辑扩展。通常,逻辑卷可以随意使用底层逻辑卷上的任意空间。修改逻辑卷将释放或重新分配在物理卷空间。这些例子已经在CentOS 5, CentOS 6, CentOS 7, RHEL 5, RHEl 6 和 RHEL 7 版本中测试通过。 -### 4 lvcreate Command Examples on Linux : ### +### 4个lvcreate命令例子 ### -1. The following command creates a logical volume 15 gigabytes in size in the volume group vg_newlvm : +1. 在名为vg_newlvm卷组中创建15G大小的逻辑卷: [root@centos7 ~]# lvcreate -L 15G vg_newlvm -2. The following command creates a 2500 MB linear logical volume named centos7_newvol in the volume group -vg_newlvm, creating the block device /dev/vg_newlvm/centos7_newvol : +2. 在名为vg_newlvm中创建大小为2500MB的逻辑卷并命名centos7_newvol,创建块设备/dev/vg_newlvm/centos7_newvol: [root@centos7 ~]# lvcreate -L 2500 -n centos7_newvol vg_newlvm -3. You can use the -l argument of the **lvcreate** command to specify the size of the logical volume in extents. You can also use this argument to specify the percentage of the volume group to use for the logical volume. The following command creates a logical volume called centos7_newvol that uses 50% of the total space in volume group vg_newlvm : +3.可以使用**lvcreate**命令的参数-l,能指定一些特别的逻辑卷扩展大小。也可以使用这个参数以卷组的大小百分比来扩展逻辑卷。这下列的命令创建了centos7_newvol卷组的50%大小的逻辑卷vg_newlvm: [root@centos7 ~]# lvcreate -l 50%VG -n centos7_newvol vg_newlvm -4. The following command creates a logical volume called centos7_newvol that uses all of the unallocated space in the volume group vg_newlvm : +4. 使用卷组剩下的所有空间创建逻辑卷 [root@centos7 ~]# lvcreate --name centos7_newvol -l 100%FREE vg_newlvm -To see more **lvcreate** command options, issue the following command : +更多帮助,使用**lvcreate**命令--help选项来查看: [root@centos7 ~]# lvcreate --help ---------- +以下空号中是帮助字面翻译 - lvcreate: Create a logical volume + lvcreate: Create a logical volume(创建逻辑卷) lvcreate - [-A|--autobackup {y|n}] + [-A|--autobackup {y|n}](自动备份) [-a|--activate [a|e|l]{y|n}] - [--addtag Tag] - [--alloc AllocationPolicy] - [--cachemode CacheMode] + [--addtag Tag](增加标签) + [--alloc AllocationPolicy](分配策略) + [--cachemode CacheMode](Cache模式) [-C|--contiguous {y|n}] [-d|--debug] [-h|-?|--help] - [--ignoremonitoring] - [--monitor {y|n}] + [--ignoremonitoring](忽略监听) + [--monitor {y|n}](监听) [-i|--stripes Stripes [-I|--stripesize StripeSize]] [-k|--setactivationskip {y|n}] [-K|--ignoreactivationskip] - {-l|--extents LogicalExtentsNumber[%{VG|PVS|FREE}] | - -L|--size LogicalVolumeSize[bBsSkKmMgGtTpPeE]} + {-l|--extents LogicalExtentsNumber[%{VG|PVS|FREE}] |(逻辑扩展数) + -L|--size LogicalVolumeSize[bBsSkKmMgGtTpPeE]}(逻辑卷大小) [-M|--persistent {y|n}] [--major major] [--minor minor] - [-m|--mirrors Mirrors [--nosync] [{--mirrorlog {disk|core|mirrored}|--corelog}]] - [-n|--name LogicalVolumeName] + [-m|--mirrors Mirrors [--nosync] [{--mirrorlog {disk|core|mirrored}|--corelog}]](镜像) + [-n|--name LogicalVolumeName](逻辑卷名字) [--noudevsync] [-p|--permission {r|rw}] [--[raid]minrecoveryrate Rate] [--[raid]maxrecoveryrate Rate] - [-r|--readahead ReadAheadSectors|auto|none] - [-R|--regionsize MirrorLogRegionSize] - [-T|--thin [-c|--chunksize ChunkSize] + [-r|--readahead ReadAheadSectors|auto|none](读取头扇区) + [-R|--regionsize MirrorLogRegionSize](镜像逻辑区域尺寸) + [-T|--thin [-c|--chunksize ChunkSize](块大小) [--discards {ignore|nopassdown|passdown}] [--poolmetadatasize MetadataSize[bBsSkKmMgG]]] [--poolmetadataspare {y|n}] - [--thinpool ThinPoolLogicalVolume{Name|Path}] + [--thinpool ThinPoolLogicalVolume{Name|Path}]精简池逻辑卷 [-t|--test] - [--type VolumeType] + [--type VolumeType](卷类型) [-v|--verbose] [-W|--wipesignatures {y|n}] [-Z|--zero {y|n}] @@ -81,34 +79,7 @@ To see more **lvcreate** command options, issue the following command : { {-s|--snapshot} OriginalLogicalVolume[Path] | [-s|--snapshot] VolumeGroupName[Path] -V|--virtualsize VirtualSize} {-T|--thin} VolumeGroupName[Path][/PoolLogicalVolume] - -V|--virtualsize VirtualSize} - [-c|--chunksize] - [-A|--autobackup {y|n}] - [--addtag Tag] - [--alloc AllocationPolicy] - [-C|--contiguous {y|n}] - [-d|--debug] - [--discards {ignore|nopassdown|passdown}] - [-h|-?|--help] - [--ignoremonitoring] - [--monitor {y|n}] - [-i|--stripes Stripes [-I|--stripesize StripeSize]] - [-k|--setactivationskip {y|n}] - [-K|--ignoreactivationskip] - {-l|--extents LogicalExtentsNumber[%{VG|FREE|ORIGIN}] | - -L|--size LogicalVolumeSize[bBsSkKmMgGtTpPeE]} - [--poolmetadatasize MetadataVolumeSize[bBsSkKmMgG]] - [-M|--persistent {y|n}] [--major major] [--minor minor] - [-n|--name LogicalVolumeName] - [--noudevsync] - [-p|--permission {r|rw}] - [-r|--readahead ReadAheadSectors|auto|none] - [-t|--test] - [--thinpool ThinPoolLogicalVolume[Path]] - [-v|--verbose] - [--version] - [PhysicalVolumePath...] - + -V|--virtualsize VirtualSize}( -------------------------------------------------------------------------------- via: http://www.ehowstuff.com/4-lvcreate-command-examples-on-linux/ From 82e8b17ba96bac350e7268dedf76bcd7a2d06dd6 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Tue, 3 Feb 2015 17:45:42 +0800 Subject: [PATCH 101/104] Moved --- .../tech/20150126 4 lvcreate Command Examples on Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150126 4 lvcreate Command Examples on Linux.md (100%) diff --git a/sources/tech/20150126 4 lvcreate Command Examples on Linux.md b/translated/tech/20150126 4 lvcreate Command Examples on Linux.md similarity index 100% rename from sources/tech/20150126 4 lvcreate Command Examples on Linux.md rename to translated/tech/20150126 4 lvcreate Command Examples on Linux.md From 2424c72949939a22ad405ba66921df3f7cfc7a0f Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 3 Feb 2015 18:11:47 +0800 Subject: [PATCH 102/104] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ferent Directory on a Linux or Unix-like Systems.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/translated/tech/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md b/translated/tech/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md index 34923b5ec3..ee9af03058 100644 --- a/translated/tech/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md +++ b/translated/tech/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md @@ -2,7 +2,7 @@ ================================================================================ 我想要解压一个tar文件到一个指定的目录叫/tmp/data。我该如何在Linux或者类Unix的系统中使用tar命令解压一个tar文件到不同的目录中? -你不必使用cd名切换到其他的目录并解压。可以使用下面的语法解压一个文件: +你不必使用cd命令切换到其他的目录并解压。可以使用下面的语法解压一个文件: ### 语法 ### @@ -16,9 +16,9 @@ GNU/tar 语法: tar xf file.tar --directory /path/to/directory -### 示例:解压文件到另一个文件夹中 ### +### 示例:解压文件到另一个目录中 ### -在本例中。我解压$HOME/etc.backup.tar到文件夹/tmp/data中。首先,你需要手动创建这个目录,输入: +在本例中。我解压$HOME/etc.backup.tar到/tmp/data目录中。首先,需要手动创建这个目录,输入: mkdir /tmp/data @@ -56,8 +56,8 @@ via: http://www.cyberciti.biz/faq/howto-extract-tar-file-to-specific-directory-o 作者:[nixCraft][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://www.cyberciti.biz/tips/about-us \ No newline at end of file +[a]:http://www.cyberciti.biz/tips/about-us From 5015d4fefe1fe085a2725a259fd97da499a89525 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 3 Feb 2015 22:14:23 +0800 Subject: [PATCH 103/104] PUB:20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems @geekpi --- ... Different Directory on a Linux or Unix-like Systems.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename {translated/tech => published}/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md (88%) diff --git a/translated/tech/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md b/published/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md similarity index 88% rename from translated/tech/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md rename to published/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md index ee9af03058..55866282e8 100644 --- a/translated/tech/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md +++ b/published/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md @@ -1,6 +1,7 @@ -如何在Linux/类Unix系统中解压tar文件到不同的目录中 +如何解压 tar 文件到不同的目录中 ================================================================================ -我想要解压一个tar文件到一个指定的目录叫/tmp/data。我该如何在Linux或者类Unix的系统中使用tar命令解压一个tar文件到不同的目录中? + +我想要解压一个tar文件到一个叫/tmp/data的指定目录。我该如何在Linux或者类Unix的系统中使用tar命令解压一个tar文件到不同的目录中? 你不必使用cd命令切换到其他的目录并解压。可以使用下面的语法解压一个文件: @@ -34,7 +35,7 @@ GNU/tar 语法: ![Gif 01: tar Command Extract Archive To Different Directory Command](http://s0.cyberciti.org/uploads/faq/2015/01/tar-extract-archive-to-dir.gif) -Gif 01: tar命令解压文件到不同的目录 +*Gif 01: tar命令解压文件到不同的目录* 你也可以指定解压的文件: From a8d938713e7c7866125f94926cecd5d6d5adf0bc Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 3 Feb 2015 22:48:30 +0800 Subject: [PATCH 104/104] PUB:20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04 @Vic020 --- ...gration From 2.2 to 2.4 on Ubuntu 14.04.md | 58 +++++++++++++++++++ ...gration From 2.2 to 2.4 on Ubuntu 14.04.md | 56 ------------------ 2 files changed, 58 insertions(+), 56 deletions(-) create mode 100644 published/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md delete mode 100644 translated/tech/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md diff --git a/published/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md b/published/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md new file mode 100644 index 0000000000..c18c9ed4f7 --- /dev/null +++ b/published/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md @@ -0,0 +1,58 @@ +在 Ubuntu 14.04 中Apache从2.2迁移到2.4的问题 +================================================================================ +如果你将**Ubuntu**从12.04升级跨越到了14.04的,那么这其中包括了一个重大的升级--**Apache**从2.2版本升级到2.4版本。**Apache**的这次升级带来了许多性能提升,**但是如果继续使用2.2的配置文件会导致很多错误**。 + +### 访问控制的改变 ### + +从**Apache 2.4**起所启用授权机制比起2.2的只是针对单一数据存储的单一检查更加灵活。过去很难确定哪个 order 授权怎样被使用的,但是授权容器指令的引入解决了这些问题,现在,配置可以控制什么时候授权方法被调用,什么条件决定何时授权访问。 + +这就是为什么大多数的升级失败是由于配置错误的原因。2.2的访问控制是基于IP地址、主机名和其他角色,通过使用指令Order,来设置Allow, Deny或 Satisfy;但是2.4,这些一切都通过新的授权方式进行检查。 + +为了弄清楚这些,可以来看一些虚拟主机的例子,这些可以在/etc/apache2/sites-enabled/default 或者 /etc/apache2/sites-enabled/*你的网站名称* 中找到: + +旧的2.2虚拟主机配置: + + Order allow,deny + Allow from all + +新的2.4虚拟主机配置: + + Require all granted + +![apache 2.4 config](http://blog.linoxide.com/wp-content/uploads/2014/12/apache-2.4-config.jpg) + +(LCTT 译注:Order、Allow和deny 这些将在之后的版本废弃,请尽量避免使用,Require 指令已可以提供比其更强大和灵活的功能。) + +### .htaccess 问题 ### + +升级后如果一些设置不工作,或者你得到重定向错误,请检查是否这些设置是放在.htaccess文件中。如果Apache 2.4没有使用 .htaccess 文件中的设置,那是因为在2.4中AllowOverride指令的默认是 none,因此忽略了.htaccess文件。你只需要做的就是修改或者添加AllowOverride All命令到你的网站配置文件中。 + +上面截图中,可以看见AllowOverride All指令。 + +### 丢失配置文件或者模块 ### + +根据我的经验,这次升级带来的另一个问题就是在2.4中,一些旧模块和配置文件不再需要或者不被支持了。你将会收到一条“Apache不能包含相应的文件”的明确警告,你需要做的是在配置文件中移除这些导致问题的配置行。之后你可以搜索和安装相似的模块来替代。 + +### 其他需要了解的小改变 ### + +这里还有一些其他的改变需要考虑,虽然这些通常只会发生警告,而不是错误。 + +- MaxClients重命名为MaxRequestWorkers,使之有更准确的描述。而异步MPM,如event,客户端最大连接数不等于工作线程数。旧的配置名依然支持。 +- DefaultType命令无效,使用它已经没有任何效果了。如果使用除了 none 之外的其它配置值,你会得到一个警告。需要使用其他配置设定来替代它。 +- EnableSendfile默认关闭 +- FileETag 现在默认为"MTime Size"(没有INode) +- KeepAlive 只接受“On”或“Off”值。之前的任何不是“Off”或者“0”的值都被认为是“On” +- 单一的 Mutex 已经替代了 Directives AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex 和 WatchdogMutexPath 等指令。你需要做的是估计一下这些被替代的指令在2.2中的使用情况,来决定是否删除或者使用Mutex来替代。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/apache-migration-2-2-to-2-4-ubuntu-14-04/ + +作者:[Adrian Dinu][a] +译者:[Vic020/VicYu](http://vicyu.net) +校对:[Caroline](https://github.com/carolinewuyan) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/adriand/ +[1]:http://httpd.apache.org/docs/2.4/ diff --git a/translated/tech/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md b/translated/tech/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md deleted file mode 100644 index 49c465d17d..0000000000 --- a/translated/tech/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md +++ /dev/null @@ -1,56 +0,0 @@ -小贴士:在 Ubuntu 14.04 中Apache从2.2迁移到2.4的问题 -================================================================================ -如果你进行了一次**Ubuntu**从12.04到14.04的升级,那么它还包括了一个重大的升级--**Apache**从2.2版本升级到2.4版本。**Apache**的这次升级带来了许多性能提升,但是如果继续使用2.2的配置文件会导致很多错误。 - -### 访问控制的改变 ### - -从**Apache 2.4**起,授权(authorization)开始启用,比起2.2的一个检查一个数据存储,授权更加灵活。过去很难确定授权如何并且以什么样的顺序被应用,但是授权容器指令的介绍解决了这些问题,现在,配置可以控制什么时候授权方法被调用,什么条件决定何时授权访问。 - -这就是为什么大多数的升级失败是由于错误配置,2.2的访问控制基于IP地址,主机名和其他字符通过使用指令Order,来设置Allow, Deny或 Satisfy,但是2.4,这些一切被新模板授权(authorization)来替代检查。 - -为了弄清楚这些,可以来看一些虚拟主机的例子,这些可以在/etc/apache2/sites-enabled/default 或者 /etc/apache2/sites-enabled/你的网页名称 中找到: - -旧的2.2虚拟主机配置: - - Order allow,deny - Allow from all - -新的2.4虚拟主机配置: - - Require all granted - -![apache 2.4 config](http://blog.linoxide.com/wp-content/uploads/2014/12/apache-2.4-config.jpg) - -### .htaccess 问题 ### - -升级后如果一些设置不执行或者得到重定向错误,检查是否这些设置是在.htaccess文件中。如果是,2.4已经不再使用.htaccess文件,在2.4中默认使用AllowOverride指令来设置,因此忽略了.htaccess文件。你需要做的全部就是改变或者添加AllowOverride All命令到你的网站配置文件中。 - -上面截图中,可以看见AllowOverride All指令。 - -### 丢失配置文件或者模块 ### - -根据我的经验,这次升级带来的另一个问题就是在2.4中旧模块和配置文件不再需要或者不被支持了。你将会收到一条“Apache不能包含这个相应文件”的明确警告,你需要做的是在配置文件中移除这些导致问题的命令行。之后你可以搜索和安装相似的模块来替代。 - -### 其他需要了解的小改变 ### - -这里还有一些其他改变的需要考虑,虽然这些通常只会发生警告,而不是错误。 - -- MaxClients重命名为MaxRequestWorkers,使之有更准确的描述。而异步MPM,如event,客户端最大连接数不量比于工作线程数。旧的名字依然支持。 -- DefaultType命令无效,使用它已经没有任何效果了。需要使用其他配置设定来替代它 -- EnableSendfile默认关闭 -- FileETag 默认"MTime Size"(没有INode) -- KeepAlive 只接受“On”或“Off”值。之前的任何不是“Off”或者“0”的值都被认为是“On” -- Mutex 已经替代了 Directives AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex 和 WatchdogMutexPath 。你需要做的是估计一下这些被移动的指令在2.2中的使用情况,来决定是否删除或者使用Mutex来替代。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/apache-migration-2-2-to-2-4-ubuntu-14-04/ - -作者:[Adrian Dinu][a] -译者:[Vic020/VicYu](http://vicyu.net) -校对:[Caroline](https://github.com/carolinewuyan) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/adriand/ -[1]:http://httpd.apache.org/docs/2.4/