+```
+
+### Building the Client Certificate
+
+Now you're going to generate a client key for your client to use when logging in to the OpenVPN server. OpenVPN is typically configured for certificate-based auth, where the client presents a certificate that was issued by an approved Certificate Authority:
+
+```
+root@test:/etc/openvpn/easy-rsa# ./build-key
+ ↪bills-computer
+Generating a 4096 bit RSA private key
+...................................................++
+...................................................++
+writing new private key to 'bills-computer.key'
+-----
+You are about to be asked to enter information that
+will be incorporated into your certificate request.
+What you are about to enter is what is called a
+Distinguished Name or a DN. There are quite a few
+fields but you can leave some blank.
+For some fields there will be a default value,
+If you enter '.', the field will be left blank.
+-----
+Country Name (2 letter code) [US]:
+State or Province Name (full name) [CA]:
+Locality Name (eg, city) [Silicon Valley]:
+Organization Name (eg, company) [Linux Journal]:
+Organizational Unit Name (eg, section)
+ ↪[changeme]:SecTeam
+Common Name (eg, your name or your server's hostname)
+ ↪[bills-computer]:
+Name [changeme]:bills-computer
+Email Address [bill.childers@linuxjournal.com]:
+
+Please enter the following 'extra' attributes
+to be sent with your certificate request
+A challenge password []:
+An optional company name []:
+Using configuration from
+ ↪/etc/openvpn/easy-rsa/openssl-1.0.0.cnf
+Check that the request matches the signature
+Signature ok
+The Subject's Distinguished Name is as follows
+countryName :PRINTABLE:'US'
+stateOrProvinceName :PRINTABLE:'CA'
+localityName :PRINTABLE:'Silicon Valley'
+organizationName :PRINTABLE:'Linux Journal'
+organizationalUnitName:PRINTABLE:'SecTeam'
+commonName :PRINTABLE:'bills-computer'
+name :PRINTABLE:'bills-computer'
+emailAddress
+ ↪:IA5STRING:'bill.childers@linuxjournal.com'
+Certificate is to be certified until
+ ↪Sep 1 07:35:07 2025 GMT (3650 days)
+Sign the certificate? [y/n]:y
+
+1 out of 1 certificate requests certified,
+ ↪commit? [y/n]y
+Write out database with 1 new entries
+Data Base Updated
+root@test:/etc/openvpn/easy-rsa#
+```
+
+Now you're going to generate an HMAC code as a shared key to increase the security of the system further:
+
+```
+root@test:~# openvpn --genkey --secret
+ ↪/etc/openvpn/easy-rsa/keys/ta.key
+```
+
+### Configuration of the Server
+
+Finally, you're going to get to the meat of configuring the OpenVPN server. You're going to create a new file, /etc/openvpn/server.conf, and you're going to stick to a default configuration for the most part. The main change you're going to do is to set up OpenVPN to use TCP rather than UDP. This is needed for the next major step to work—without OpenVPN using TCP for its network communication, you can't get things working on port 443. So, create a new file called /etc/openvpn/server.conf, and put the following configuration in it: Garrick, shrink below.
+
+```
+port 1194
+proto tcp
+dev tun
+ca easy-rsa/keys/ca.crt
+cert easy-rsa/keys/test.linuxjournal.com.crt ## or whatever
+ ↪your hostname was
+key easy-rsa/keys/test.linuxjournal.com.key ## Hostname key
+ ↪- This file should be kept secret
+management localhost 7505
+dh easy-rsa/keys/dh4096.pem
+tls-auth /etc/openvpn/certs/ta.key 0
+server 10.8.0.0 255.255.255.0 # The server will use this
+ ↪subnet for clients connecting to it
+ifconfig-pool-persist ipp.txt
+push "redirect-gateway def1 bypass-dhcp" # Forces clients
+ ↪to redirect all traffic through the VPN
+push "dhcp-option DNS 192.168.1.1" # Tells the client to
+ ↪use the DNS server at 192.168.1.1 for DNS -
+ ↪replace with the IP address of the OpenVPN
+ ↪machine and clients will use the BIND
+ ↪server setup earlier
+keepalive 30 240
+comp-lzo # Enable compression
+persist-key
+persist-tun
+status openvpn-status.log
+verb 3
+```
+
+And last, you're going to enable IP forwarding on the server, configure OpenVPN to start on boot and start the OpenVPN service:
+
+```
+root@test:/etc/openvpn/easy-rsa/keys# echo
+ ↪"net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
+root@test:/etc/openvpn/easy-rsa/keys# sysctl -p
+ ↪/etc/sysctl.conf
+net.core.wmem_max = 12582912
+net.core.rmem_max = 12582912
+net.ipv4.tcp_rmem = 10240 87380 12582912
+net.ipv4.tcp_wmem = 10240 87380 12582912
+net.core.wmem_max = 12582912
+net.core.rmem_max = 12582912
+net.ipv4.tcp_rmem = 10240 87380 12582912
+net.ipv4.tcp_wmem = 10240 87380 12582912
+net.core.wmem_max = 12582912
+net.core.rmem_max = 12582912
+net.ipv4.tcp_rmem = 10240 87380 12582912
+net.ipv4.tcp_wmem = 10240 87380 12582912
+net.ipv4.ip_forward = 0
+net.ipv4.ip_forward = 1
+
+root@test:/etc/openvpn/easy-rsa/keys# update-rc.d
+ ↪openvpn defaults
+update-rc.d: using dependency based boot sequencing
+
+root@test:/etc/openvpn/easy-rsa/keys#
+ ↪/etc/init.d/openvpn start
+[ ok ] Starting virtual private network daemon:.
+```
+
+### Setting Up OpenVPN Clients
+
+Your client installation depends on the host OS of your client, but you'll need to copy your client certs and keys created above to your client, and you'll need to import those certificates and create a configuration for that client. Each client and client OS does it slightly differently and documenting each one is beyond the scope of this article, so you'll need to refer to the documentation for that client to get it running. Refer to the Resources section for OpenVPN clients for each major OS.
+
+### Installing SSLH—the "Magic" Protocol Multiplexer
+
+The really interesting piece of this solution is SSLH. SSLH is a protocol multiplexer—it listens on port 443 for traffic, and then it can analyze whether the incoming packet is an SSH packet, HTTPS or OpenVPN, and it can forward that packet onto the proper service. This is what enables this solution to bypass most port blocks—you use the HTTPS port for all of this traffic, since HTTPS is rarely blocked.
+
+To start, `apt-get` install SSLH:
+
+```
+root@test:/etc/openvpn/easy-rsa/keys# apt-get
+ ↪install sslh
+Reading package lists... Done
+Building dependency tree
+Reading state information... Done
+The following extra packages will be installed:
+ apache2 apache2-mpm-worker apache2-utils
+ ↪apache2.2-bin apache2.2-common
+ libapr1 libaprutil1 libaprutil1-dbd-sqlite3
+ ↪libaprutil1-ldap libconfig9
+Suggested packages:
+ apache2-doc apache2-suexec apache2-suexec-custom
+ ↪openbsd-inetd inet-superserver
+The following NEW packages will be installed:
+ apache2 apache2-mpm-worker apache2-utils
+ ↪apache2.2-bin apache2.2-common
+ libapr1 libaprutil1 libaprutil1-dbd-sqlite3
+ ↪libaprutil1-ldap libconfig9 sslh
+0 upgraded, 11 newly installed, 0 to remove
+ ↪and 0 not upgraded.
+Need to get 1,568 kB of archives.
+After this operation, 5,822 kB of additional
+ ↪disk space will be used.
+Do you want to continue [Y/n]? y
+```
+
+After SSLH is installed, the package installer will ask you if you want to run it in inetd or standalone mode. Select standalone mode, because you want SSLH to run as its own process. If you don't have Apache installed, the Debian/Raspbian package of SSLH will pull it in automatically, although it's not strictly required. If you already have Apache running and configured, you'll want to make sure it only listens on localhost's interface and not all interfaces (otherwise, SSLH can't start because it can't bind to port 443). After installation, you'll receive an error that looks like this:
+
+```
+[....] Starting ssl/ssh multiplexer: sslhsslh disabled,
+ ↪please adjust the configuration to your needs
+[FAIL] and then set RUN to 'yes' in /etc/default/sslh
+ ↪to enable it. ... failed!
+failed!
+```
+
+This isn't an error, exactly—it's just SSLH telling you that it's not configured and can't start. Configuring SSLH is pretty simple. Its configuration is stored in `/etc/default/sslh`, and you just need to configure the `RUN` and `DAEMON_OPTS` variables. My SSLH configuration looks like this:
+
+```
+# Default options for sslh initscript
+# sourced by /etc/init.d/sslh
+
+# Disabled by default, to force yourself
+# to read the configuration:
+# - /usr/share/doc/sslh/README.Debian (quick start)
+# - /usr/share/doc/sslh/README, at "Configuration" section
+# - sslh(8) via "man sslh" for more configuration details.
+# Once configuration ready, you *must* set RUN to yes here
+# and try to start sslh (standalone mode only)
+
+RUN=yes
+
+# binary to use: forked (sslh) or single-thread
+ ↪(sslh-select) version
+DAEMON=/usr/sbin/sslh
+
+DAEMON_OPTS="--user sslh --listen 0.0.0.0:443 --ssh
+ ↪127.0.0.1:22 --ssl 127.0.0.1:443 --openvpn
+ ↪127.0.0.1:1194 --pidfile /var/run/sslh/sslh.pid"
+ ```
+
+ Save the file and start SSLH:
+
+```
+ root@test:/etc/openvpn/easy-rsa/keys#
+ ↪/etc/init.d/sslh start
+[ ok ] Starting ssl/ssh multiplexer: sslh.
+```
+
+Now, you should be able to ssh to port 443 on your Raspberry Pi, and have it forward via SSLH:
+
+```
+$ ssh -p 443 root@test.linuxjournal.com
+root@test:~#
+```
+
+SSLH is now listening on port 443 and can direct traffic to SSH, Apache or OpenVPN based on the type of packet that hits it. You should be ready to go!
+
+### Conclusion
+
+Now you can fire up OpenVPN and set your OpenVPN client configuration to port 443, and SSLH will route it to the OpenVPN server on port 1194. But because you're talking to your server on port 443, your VPN traffic won't get blocked. Now you can land at a strange coffee shop, in a strange town, and know that your Internet will just work when you fire up your OpenVPN and point it at your Raspberry Pi. You'll also gain some encryption on your link, which will improve the privacy of your connection. Enjoy surfing the Net via your new landing point!
+
+Resources
+
+Installing and Configuring OpenVPN: [https://wiki.debian.org/OpenVPN](https://wiki.debian.org/OpenVPN) and [http://cryptotap.com/articles/openvpn](http://cryptotap.com/articles/openvpn)
+
+OpenVPN client downloads: [https://openvpn.net/index.php/open-source/downloads.html](https://openvpn.net/index.php/open-source/downloads.html)
+
+OpenVPN Client for iOS: [https://itunes.apple.com/us/app/openvpn-connect/id590379981?mt=8](https://itunes.apple.com/us/app/openvpn-connect/id590379981?mt=8)
+
+OpenVPN Client for Android: [https://play.google.com/store/apps/details?id=net.openvpn.openvpn&hl=en](https://play.google.com/store/apps/details?id=net.openvpn.openvpn&hl=en)
+
+Tunnelblick for Mac OS X (OpenVPN client): [https://tunnelblick.net](https://tunnelblick.net)
+
+SSLH—Protocol Multiplexer: [http://www.rutschle.net/tech/sslh.shtml](http://www.rutschle.net/tech/sslh.shtml) and [https://github.com/yrutschle/sslh](https://github.com/yrutschle/sslh)
+
+
+----------
+via: http://www.linuxjournal.com/content/securi-pi-using-raspberry-pi-secure-landing-point?page=0,0
+
+作者:[Bill Childers][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.linuxjournal.com/users/bill-childers
+
+
diff --git a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md
new file mode 100644
index 0000000000..45dbf42e96
--- /dev/null
+++ b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md
@@ -0,0 +1,631 @@
+translate by zky001
+* * *
+
+# GCC-Inline-Assembly-HOWTO
+v0.1, 01 March 2003.
+* * *
+
+_This HOWTO explains the use and usage of the inline assembly feature provided by GCC. There are only two prerequisites for reading this article, and that’s obviously a basic knowledge of x86 assembly language and C._
+
+* * *
+
+## 1. Introduction.
+
+## 1.1 Copyright and License.
+
+Copyright (C)2003 Sandeep S.
+
+This document is free; you can redistribute and/or modify this under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+## 1.2 Feedback and Corrections.
+
+Kindly forward feedback and criticism to [Sandeep.S](mailto:busybox@sancharnet.in). I will be indebted to anybody who points out errors and inaccuracies in this document; I shall rectify them as soon as I am informed.
+
+## 1.3 Acknowledgments.
+
+I express my sincere appreciation to GNU people for providing such a great feature. Thanks to Mr.Pramode C E for all the helps he did. Thanks to friends at the Govt Engineering College, Trichur for their moral-support and cooperation, especially to Nisha Kurur and Sakeeb S. Thanks to my dear teachers at Govt Engineering College, Trichur for their cooperation.
+
+Additionally, thanks to Phillip, Brennan Underwood and colin@nyx.net; Many things here are shamelessly stolen from their works.
+
+* * *
+
+## 2. Overview of the whole thing.
+
+We are here to learn about GCC inline assembly. What this inline stands for?
+
+We can instruct the compiler to insert the code of a function into the code of its callers, to the point where actually the call is to be made. Such functions are inline functions. Sounds similar to a Macro? Indeed there are similarities.
+
+What is the benefit of inline functions?
+
+This method of inlining reduces the function-call overhead. And if any of the actual argument values are constant, their known values may permit simplifications at compile time so that not all of the inline function’s code needs to be included. The effect on code size is less predictable, it depends on the particular case. To declare an inline function, we’ve to use the keyword `inline` in its declaration.
+
+Now we are in a position to guess what is inline assembly. Its just some assembly routines written as inline functions. They are handy, speedy and very much useful in system programming. Our main focus is to study the basic format and usage of (GCC) inline assembly functions. To declare inline assembly functions, we use the keyword `asm`.
+
+Inline assembly is important primarily because of its ability to operate and make its output visible on C variables. Because of this capability, "asm" works as an interface between the assembly instructions and the "C" program that contains it.
+
+* * *
+
+## 3. GCC Assembler Syntax.
+
+GCC, the GNU C Compiler for Linux, uses **AT&T**/**UNIX** assembly syntax. Here we’ll be using AT&T syntax for assembly coding. Don’t worry if you are not familiar with AT&T syntax, I will teach you. This is quite different from Intel syntax. I shall give the major differences.
+
+1. Source-Destination Ordering.
+
+ The direction of the operands in AT&T syntax is opposite to that of Intel. In Intel syntax the first operand is the destination, and the second operand is the source whereas in AT&T syntax the first operand is the source and the second operand is the destination. ie,
+
+ "Op-code dst src" in Intel syntax changes to
+
+ "Op-code src dst" in AT&T syntax.
+
+2. Register Naming.
+
+ Register names are prefixed by % ie, if eax is to be used, write %eax.
+
+3. Immediate Operand.
+
+ AT&T immediate operands are preceded by ’$’. For static "C" variables also prefix a ’$’. In Intel syntax, for hexadecimal constants an ’h’ is suffixed, instead of that, here we prefix ’0x’ to the constant. So, for hexadecimals, we first see a ’$’, then ’0x’ and finally the constants.
+
+4. Operand Size.
+
+ In AT&T syntax the size of memory operands is determined from the last character of the op-code name. Op-code suffixes of ’b’, ’w’, and ’l’ specify byte(8-bit), word(16-bit), and long(32-bit) memory references. Intel syntax accomplishes this by prefixing memory operands (not the op-codes) with ’byte ptr’, ’word ptr’, and ’dword ptr’.
+
+ Thus, Intel "mov al, byte ptr foo" is "movb foo, %al" in AT&T syntax.
+
+5. Memory Operands.
+
+ In Intel syntax the base register is enclosed in ’[’ and ’]’ where as in AT&T they change to ’(’ and ’)’. Additionally, in Intel syntax an indirect memory reference is like
+
+ section:[base + index*scale + disp], which changes to
+
+ section:disp(base, index, scale) in AT&T.
+
+ One point to bear in mind is that, when a constant is used for disp/scale, ’$’ shouldn’t be prefixed.
+
+Now we saw some of the major differences between Intel syntax and AT&T syntax. I’ve wrote only a few of them. For a complete information, refer to GNU Assembler documentations. Now we’ll look at some examples for better understanding.
+
+> `
+>
+> +------------------------------+------------------------------------+
+> | Intel Code | AT&T Code |
+> +------------------------------+------------------------------------+
+> | mov eax,1 | movl $1,%eax |
+> | mov ebx,0ffh | movl $0xff,%ebx |
+> | int 80h | int $0x80 |
+> | mov ebx, eax | movl %eax, %ebx |
+> | mov eax,[ecx] | movl (%ecx),%eax |
+> | mov eax,[ebx+3] | movl 3(%ebx),%eax |
+> | mov eax,[ebx+20h] | movl 0x20(%ebx),%eax |
+> | add eax,[ebx+ecx*2h] | addl (%ebx,%ecx,0x2),%eax |
+> | lea eax,[ebx+ecx] | leal (%ebx,%ecx),%eax |
+> | sub eax,[ebx+ecx*4h-20h] | subl -0x20(%ebx,%ecx,0x4),%eax |
+> +------------------------------+------------------------------------+
+>
+>
+> `
+
+* * *
+
+## 4. Basic Inline.
+
+The format of basic inline assembly is very much straight forward. Its basic form is
+
+`asm("assembly code");`
+
+Example.
+
+> `
+>
+> * * *
+>
+> asm("movl %ecx %eax"); /* moves the contents of ecx to eax */
+> __asm__("movb %bh (%eax)"); /*moves the byte from bh to the memory pointed by eax */
+>
+>
+> * * *
+>
+> `
+
+You might have noticed that here I’ve used `asm` and `__asm__`. Both are valid. We can use `__asm__` if the keyword `asm` conflicts with something in our program. If we have more than one instructions, we write one per line in double quotes, and also suffix a ’\n’ and ’\t’ to the instruction. This is because gcc sends each instruction as a string to **as**(GAS) and by using the newline/tab we send correctly formatted lines to the assembler.
+
+Example.
+
+> `
+>
+> * * *
+>
+> __asm__ ("movl %eax, %ebx\n\t"
+> "movl $56, %esi\n\t"
+> "movl %ecx, $label(%edx,%ebx,$4)\n\t"
+> "movb %ah, (%ebx)");
+>
+>
+> * * *
+>
+> `
+
+If in our code we touch (ie, change the contents) some registers and return from asm without fixing those changes, something bad is going to happen. This is because GCC have no idea about the changes in the register contents and this leads us to trouble, especially when compiler makes some optimizations. It will suppose that some register contains the value of some variable that we might have changed without informing GCC, and it continues like nothing happened. What we can do is either use those instructions having no side effects or fix things when we quit or wait for something to crash. This is where we want some extended functionality. Extended asm provides us with that functionality.
+
+* * *
+
+## 5. Extended Asm.
+
+In basic inline assembly, we had only instructions. In extended assembly, we can also specify the operands. It allows us to specify the input registers, output registers and a list of clobbered registers. It is not mandatory to specify the registers to use, we can leave that head ache to GCC and that probably fit into GCC’s optimization scheme better. Anyway the basic format is:
+
+> `
+>
+> * * *
+>
+> asm ( assembler template
+> : output operands /* optional */
+> : input operands /* optional */
+> : list of clobbered registers /* optional */
+> );
+>
+>
+> * * *
+>
+> `
+
+The assembler template consists of assembly instructions. Each operand is described by an operand-constraint string followed by the C expression in parentheses. A colon separates the assembler template from the first output operand and another separates the last output operand from the first input, if any. Commas separate the operands within each group. The total number of operands is limited to ten or to the maximum number of operands in any instruction pattern in the machine description, whichever is greater.
+
+If there are no output operands but there are input operands, you must place two consecutive colons surrounding the place where the output operands would go.
+
+Example:
+
+> `
+>
+> * * *
+>
+> asm ("cld\n\t"
+> "rep\n\t"
+> "stosl"
+> : /* no output registers */
+> : "c" (count), "a" (fill_value), "D" (dest)
+> : "%ecx", "%edi"
+> );
+>
+>
+> * * *
+>
+> `
+
+Now, what does this code do? The above inline fills the `fill_value` `count` times to the location pointed to by the register `edi`. It also says to gcc that, the contents of registers `eax` and `edi` are no longer valid. Let us see one more example to make things more clearer.
+
+> `
+>
+> * * *
+>
+>
+> int a=10, b;
+> asm ("movl %1, %%eax;
+> movl %%eax, %0;"
+> :"=r"(b) /* output */
+> :"r"(a) /* input */
+> :"%eax" /* clobbered register */
+> );
+>
+>
+> * * *
+>
+> `
+
+Here what we did is we made the value of ’b’ equal to that of ’a’ using assembly instructions. Some points of interest are:
+
+* "b" is the output operand, referred to by %0 and "a" is the input operand, referred to by %1.
+* "r" is a constraint on the operands. We’ll see constraints in detail later. For the time being, "r" says to GCC to use any register for storing the operands. output operand constraint should have a constraint modifier "=". And this modifier says that it is the output operand and is write-only.
+* There are two %’s prefixed to the register name. This helps GCC to distinguish between the operands and registers. operands have a single % as prefix.
+* The clobbered register %eax after the third colon tells GCC that the value of %eax is to be modified inside "asm", so GCC won’t use this register to store any other value.
+
+When the execution of "asm" is complete, "b" will reflect the updated value, as it is specified as an output operand. In other words, the change made to "b" inside "asm" is supposed to be reflected outside the "asm".
+
+Now we may look each field in detail.
+
+## 5.1 Assembler Template.
+
+The assembler template contains the set of assembly instructions that gets inserted inside the C program. The format is like: either each instruction should be enclosed within double quotes, or the entire group of instructions should be within double quotes. Each instruction should also end with a delimiter. The valid delimiters are newline(\n) and semicolon(;). ’\n’ may be followed by a tab(\t). We know the reason of newline/tab, right?. Operands corresponding to the C expressions are represented by %0, %1 ... etc.
+
+## 5.2 Operands.
+
+C expressions serve as operands for the assembly instructions inside "asm". Each operand is written as first an operand constraint in double quotes. For output operands, there’ll be a constraint modifier also within the quotes and then follows the C expression which stands for the operand. ie,
+
+"constraint" (C expression) is the general form. For output operands an additional modifier will be there. Constraints are primarily used to decide the addressing modes for operands. They are also used in specifying the registers to be used.
+
+If we use more than one operand, they are separated by comma.
+
+In the assembler template, each operand is referenced by numbers. Numbering is done as follows. If there are a total of n operands (both input and output inclusive), then the first output operand is numbered 0, continuing in increasing order, and the last input operand is numbered n-1\. The maximum number of operands is as we saw in the previous section.
+
+Output operand expressions must be lvalues. The input operands are not restricted like this. They may be expressions. The extended asm feature is most often used for machine instructions the compiler itself does not know as existing ;-). If the output expression cannot be directly addressed (for example, it is a bit-field), our constraint must allow a register. In that case, GCC will use the register as the output of the asm, and then store that register contents into the output.
+
+As stated above, ordinary output operands must be write-only; GCC will assume that the values in these operands before the instruction are dead and need not be generated. Extended asm also supports input-output or read-write operands.
+
+So now we concentrate on some examples. We want to multiply a number by 5\. For that we use the instruction `lea`.
+
+> `
+>
+> * * *
+>
+> asm ("leal (%1,%1,4), %0"
+> : "=r" (five_times_x)
+> : "r" (x)
+> );
+>
+>
+> * * *
+>
+> `
+
+Here our input is in ’x’. We didn’t specify the register to be used. GCC will choose some register for input, one for output and does what we desired. If we want the input and output to reside in the same register, we can instruct GCC to do so. Here we use those types of read-write operands. By specifying proper constraints, here we do it.
+
+> `
+>
+> * * *
+>
+> asm ("leal (%0,%0,4), %0"
+> : "=r" (five_times_x)
+> : "0" (x)
+> );
+>
+>
+> * * *
+>
+> `
+
+Now the input and output operands are in the same register. But we don’t know which register. Now if we want to specify that also, there is a way.
+
+> `
+>
+> * * *
+>
+> asm ("leal (%%ecx,%%ecx,4), %%ecx"
+> : "=c" (x)
+> : "c" (x)
+> );
+>
+>
+> * * *
+>
+> `
+
+In all the three examples above, we didn’t put any register to the clobber list. why? In the first two examples, GCC decides the registers and it knows what changes happen. In the last one, we don’t have to put `ecx` on the c lobberlist, gcc knows it goes into x. Therefore, since it can know the value of `ecx`, it isn’t considered clobbered.
+
+## 5.3 Clobber List.
+
+Some instructions clobber some hardware registers. We have to list those registers in the clobber-list, ie the field after the third ’**:**’ in the asm function. This is to inform gcc that we will use and modify them ourselves. So gcc will not assume that the values it loads into these registers will be valid. We shoudn’t list the input and output registers in this list. Because, gcc knows that "asm" uses them (because they are specified explicitly as constraints). If the instructions use any other registers, implicitly or explicitly (and the registers are not present either in input or in the output constraint list), then those registers have to be specified in the clobbered list.
+
+If our instruction can alter the condition code register, we have to add "cc" to the list of clobbered registers.
+
+If our instruction modifies memory in an unpredictable fashion, add "memory" to the list of clobbered registers. This will cause GCC to not keep memory values cached in registers across the assembler instruction. We also have to add the **volatile** keyword if the memory affected is not listed in the inputs or outputs of the asm.
+
+We can read and write the clobbered registers as many times as we like. Consider the example of multiple instructions in a template; it assumes the subroutine _foo accepts arguments in registers `eax` and `ecx`.
+
+> `
+>
+> * * *
+>
+> asm ("movl %0,%%eax;
+> movl %1,%%ecx;
+> call _foo"
+> : /* no outputs */
+> : "g" (from), "g" (to)
+> : "eax", "ecx"
+> );
+>
+>
+> * * *
+>
+> `
+
+## 5.4 Volatile ...?
+
+If you are familiar with kernel sources or some beautiful code like that, you must have seen many functions declared as `volatile` or `__volatile__` which follows an `asm` or `__asm__`. I mentioned earlier about the keywords `asm` and `__asm__`. So what is this `volatile`?
+
+If our assembly statement must execute where we put it, (i.e. must not be moved out of a loop as an optimization), put the keyword `volatile` after asm and before the ()’s. So to keep it from moving, deleting and all, we declare it as
+
+`asm volatile ( ... : ... : ... : ...);`
+
+Use `__volatile__` when we have to be verymuch careful.
+
+If our assembly is just for doing some calculations and doesn’t have any side effects, it’s better not to use the keyword `volatile`. Avoiding it helps gcc in optimizing the code and making it more beautiful.
+
+In the section `Some Useful Recipes`, I have provided many examples for inline asm functions. There we can see the clobber-list in detail.
+
+* * *
+
+## 6. More about constraints.
+
+By this time, you might have understood that constraints have got a lot to do with inline assembly. But we’ve said little about constraints. Constraints can say whether an operand may be in a register, and which kinds of register; whether the operand can be a memory reference, and which kinds of address; whether the operand may be an immediate constant, and which possible values (ie range of values) it may have.... etc.
+
+## 6.1 Commonly used constraints.
+
+There are a number of constraints of which only a few are used frequently. We’ll have a look at those constraints.
+
+1. **Register operand constraint(r)**
+
+ When operands are specified using this constraint, they get stored in General Purpose Registers(GPR). Take the following example:
+
+ `asm ("movl %%eax, %0\n" :"=r"(myval));`
+
+ Here the variable myval is kept in a register, the value in register `eax` is copied onto that register, and the value of `myval` is updated into the memory from this register. When the "r" constraint is specified, gcc may keep the variable in any of the available GPRs. To specify the register, you must directly specify the register names by using specific register constraints. They are:
+
+ > `
+ >
+ > +---+--------------------+
+ > | r | Register(s) |
+ > +---+--------------------+
+ > | a | %eax, %ax, %al |
+ > | b | %ebx, %bx, %bl |
+ > | c | %ecx, %cx, %cl |
+ > | d | %edx, %dx, %dl |
+ > | S | %esi, %si |
+ > | D | %edi, %di |
+ > +---+--------------------+
+ >
+ >
+ > `
+
+2. **Memory operand constraint(m)**
+
+ When the operands are in the memory, any operations performed on them will occur directly in the memory location, as opposed to register constraints, which first store the value in a register to be modified and then write it back to the memory location. But register constraints are usually used only when they are absolutely necessary for an instruction or they significantly speed up the process. Memory constraints can be used most efficiently in cases where a C variable needs to be updated inside "asm" and you really don’t want to use a register to hold its value. For example, the value of idtr is stored in the memory location loc:
+
+ `asm("sidt %0\n" : :"m"(loc));`
+
+3. **Matching(Digit) constraints**
+
+ In some cases, a single variable may serve as both the input and the output operand. Such cases may be specified in "asm" by using matching constraints.
+
+ `asm ("incl %0" :"=a"(var):"0"(var));`
+
+ We saw similar examples in operands subsection also. In this example for matching constraints, the register %eax is used as both the input and the output variable. var input is read to %eax and updated %eax is stored in var again after increment. "0" here specifies the same constraint as the 0th output variable. That is, it specifies that the output instance of var should be stored in %eax only. This constraint can be used:
+
+ * In cases where input is read from a variable or the variable is modified and modification is written back to the same variable.
+ * In cases where separate instances of input and output operands are not necessary.
+
+ The most important effect of using matching restraints is that they lead to the efficient use of available registers.
+
+Some other constraints used are:
+
+1. "m" : A memory operand is allowed, with any kind of address that the machine supports in general.
+2. "o" : A memory operand is allowed, but only if the address is offsettable. ie, adding a small offset to the address gives a valid address.
+3. "V" : A memory operand that is not offsettable. In other words, anything that would fit the `m’ constraint but not the `o’constraint.
+4. "i" : An immediate integer operand (one with constant value) is allowed. This includes symbolic constants whose values will be known only at assembly time.
+5. "n" : An immediate integer operand with a known numeric value is allowed. Many systems cannot support assembly-time constants for operands less than a word wide. Constraints for these operands should use ’n’ rather than ’i’.
+6. "g" : Any register, memory or immediate integer operand is allowed, except for registers that are not general registers.
+
+Following constraints are x86 specific.
+
+1. "r" : Register operand constraint, look table given above.
+2. "q" : Registers a, b, c or d.
+3. "I" : Constant in range 0 to 31 (for 32-bit shifts).
+4. "J" : Constant in range 0 to 63 (for 64-bit shifts).
+5. "K" : 0xff.
+6. "L" : 0xffff.
+7. "M" : 0, 1, 2, or 3 (shifts for lea instruction).
+8. "N" : Constant in range 0 to 255 (for out instruction).
+9. "f" : Floating point register
+10. "t" : First (top of stack) floating point register
+11. "u" : Second floating point register
+12. "A" : Specifies the `a’ or `d’ registers. This is primarily useful for 64-bit integer values intended to be returned with the `d’ register holding the most significant bits and the `a’ register holding the least significant bits.
+
+## 6.2 Constraint Modifiers.
+
+While using constraints, for more precise control over the effects of constraints, GCC provides us with constraint modifiers. Mostly used constraint modifiers are
+
+1. "=" : Means that this operand is write-only for this instruction; the previous value is discarded and replaced by output data.
+2. "&" : Means that this operand is an earlyclobber operand, which is modified before the instruction is finished using the input operands. Therefore, this operand may not lie in a register that is used as an input operand or as part of any memory address. An input operand can be tied to an earlyclobber operand if its only use as an input occurs before the early result is written.
+
+ The list and explanation of constraints is by no means complete. Examples can give a better understanding of the use and usage of inline asm. In the next section we’ll see some examples, there we’ll find more about clobber-lists and constraints.
+
+* * *
+
+## 7. Some Useful Recipes.
+
+Now we have covered the basic theory about GCC inline assembly, now we shall concentrate on some simple examples. It is always handy to write inline asm functions as MACRO’s. We can see many asm functions in the kernel code. (/usr/src/linux/include/asm/*.h).
+
+1. First we start with a simple example. We’ll write a program to add two numbers.
+
+ > `
+ >
+ > * * *
+ >
+ > int main(void)
+ > {
+ > int foo = 10, bar = 15;
+ > __asm__ __volatile__("addl %%ebx,%%eax"
+ > :"=a"(foo)
+ > :"a"(foo), "b"(bar)
+ > );
+ > printf("foo+bar=%d\n", foo);
+ > return 0;
+ > }
+ >
+ >
+ > * * *
+ >
+ > `
+
+ Here we insist GCC to store foo in %eax, bar in %ebx and we also want the result in %eax. The ’=’ sign shows that it is an output register. Now we can add an integer to a variable in some other way.
+
+ > `
+ >
+ > * * *
+ >
+ > __asm__ __volatile__(
+ > " lock ;\n"
+ > " addl %1,%0 ;\n"
+ > : "=m" (my_var)
+ > : "ir" (my_int), "m" (my_var)
+ > : /* no clobber-list */
+ > );
+ >
+ >
+ > * * *
+ >
+ > `
+
+ This is an atomic addition. We can remove the instruction ’lock’ to remove the atomicity. In the output field, "=m" says that my_var is an output and it is in memory. Similarly, "ir" says that, my_int is an integer and should reside in some register (recall the table we saw above). No registers are in the clobber list.
+
+2. Now we’ll perform some action on some registers/variables and compare the value.
+
+ > `
+ >
+ > * * *
+ >
+ > __asm__ __volatile__( "decl %0; sete %1"
+ > : "=m" (my_var), "=q" (cond)
+ > : "m" (my_var)
+ > : "memory"
+ > );
+ >
+ >
+ > * * *
+ >
+ > `
+
+ Here, the value of my_var is decremented by one and if the resulting value is `0` then, the variable cond is set. We can add atomicity by adding an instruction "lock;\n\t" as the first instruction in assembler template.
+
+ In a similar way we can use "incl %0" instead of "decl %0", so as to increment my_var.
+
+ Points to note here are that (i) my_var is a variable residing in memory. (ii) cond is in any of the registers eax, ebx, ecx and edx. The constraint "=q" guarantees it. (iii) And we can see that memory is there in the clobber list. ie, the code is changing the contents of memory.
+
+3. How to set/clear a bit in a register? As next recipe, we are going to see it.
+
+ > `
+ >
+ > * * *
+ >
+ > __asm__ __volatile__( "btsl %1,%0"
+ > : "=m" (ADDR)
+ > : "Ir" (pos)
+ > : "cc"
+ > );
+ >
+ >
+ > * * *
+ >
+ > `
+
+ Here, the bit at the position ’pos’ of variable at ADDR ( a memory variable ) is set to `1` We can use ’btrl’ for ’btsl’ to clear the bit. The constraint "Ir" of pos says that, pos is in a register, and it’s value ranges from 0-31 (x86 dependant constraint). ie, we can set/clear any bit from 0th to 31st of the variable at ADDR. As the condition codes will be changed, we are adding "cc" to clobberlist.
+
+4. Now we look at some more complicated but useful function. String copy.
+
+ > `
+ >
+ > * * *
+ >
+ > static inline char * strcpy(char * dest,const char *src)
+ > {
+ > int d0, d1, d2;
+ > __asm__ __volatile__( "1:\tlodsb\n\t"
+ > "stosb\n\t"
+ > "testb %%al,%%al\n\t"
+ > "jne 1b"
+ > : "=&S" (d0), "=&D" (d1), "=&a" (d2)
+ > : "0" (src),"1" (dest)
+ > : "memory");
+ > return dest;
+ > }
+ >
+ >
+ > * * *
+ >
+ > `
+
+ The source address is stored in esi, destination in edi, and then starts the copy, when we reach at **0**, copying is complete. Constraints "&S", "&D", "&a" say that the registers esi, edi and eax are early clobber registers, ie, their contents will change before the completion of the function. Here also it’s clear that why memory is in clobberlist.
+
+ We can see a similar function which moves a block of double words. Notice that the function is declared as a macro.
+
+ > `
+ >
+ > * * *
+ >
+ > #define mov_blk(src, dest, numwords) \
+ > __asm__ __volatile__ ( \
+ > "cld\n\t" \
+ > "rep\n\t" \
+ > "movsl" \
+ > : \
+ > : "S" (src), "D" (dest), "c" (numwords) \
+ > : "%ecx", "%esi", "%edi" \
+ > )
+ >
+ >
+ > * * *
+ >
+ > `
+
+ Here we have no outputs, so the changes that happen to the contents of the registers ecx, esi and edi are side effects of the block movement. So we have to add them to the clobber list.
+
+5. In Linux, system calls are implemented using GCC inline assembly. Let us look how a system call is implemented. All the system calls are written as macros (linux/unistd.h). For example, a system call with three arguments is defined as a macro as shown below.
+
+ > `
+ >
+ > * * *
+ >
+ > #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
+ > type name(type1 arg1,type2 arg2,type3 arg3) \
+ > { \
+ > long __res; \
+ > __asm__ volatile ( "int $0x80" \
+ > : "=a" (__res) \
+ > : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
+ > "d" ((long)(arg3))); \
+ > __syscall_return(type,__res); \
+ > }
+ >
+ >
+ > * * *
+ >
+ > `
+
+ Whenever a system call with three arguments is made, the macro shown above is used to make the call. The syscall number is placed in eax, then each parameters in ebx, ecx, edx. And finally "int 0x80" is the instruction which makes the system call work. The return value can be collected from eax.
+
+ Every system calls are implemented in a similar way. Exit is a single parameter syscall and let’s see how it’s code will look like. It is as shown below.
+
+ > `
+ >
+ > * * *
+ >
+ > {
+ > asm("movl $1,%%eax; /* SYS_exit is 1 */
+ > xorl %%ebx,%%ebx; /* Argument is in ebx, it is 0 */
+ > int $0x80" /* Enter kernel mode */
+ > );
+ > }
+ >
+ >
+ > * * *
+ >
+ > `
+
+ The number of exit is "1" and here, it’s parameter is 0\. So we arrange eax to contain 1 and ebx to contain 0 and by `int $0x80`, the `exit(0)` is executed. This is how exit works.
+
+* * *
+
+## 8. Concluding Remarks.
+
+This document has gone through the basics of GCC Inline Assembly. Once you have understood the basic concept it is not difficult to take steps by your own. We saw some examples which are helpful in understanding the frequently used features of GCC Inline Assembly.
+
+GCC Inlining is a vast subject and this article is by no means complete. More details about the syntax’s we discussed about is available in the official documentation for GNU Assembler. Similarly, for a complete list of the constraints refer to the official documentation of GCC.
+
+And of-course, the Linux kernel use GCC Inline in a large scale. So we can find many examples of various kinds in the kernel sources. They can help us a lot.
+
+If you have found any glaring typos, or outdated info in this document, please let us know.
+
+* * *
+
+## 9. References.
+
+1. [Brennan’s Guide to Inline Assembly](http://www.delorie.com/djgpp/doc/brennan/brennan_att_inline_djgpp.html)
+2. [Using Assembly Language in Linux](http://linuxassembly.org/articles/linasm.html)
+3. [Using as, The GNU Assembler](http://www.gnu.org/manual/gas-2.9.1/html_mono/as.html)
+4. [Using and Porting the GNU Compiler Collection (GCC)](http://gcc.gnu.org/onlinedocs/gcc_toc.html)
+5. [Linux Kernel Source](http://ftp.kernel.org/)
+
+* * *
+via: http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html
+
+ 作者:[Sandeep.S](mailto:busybox@sancharnet.in) 译者:[zky001](https://github.com/zky001) 校对:[]()
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
diff --git a/sources/tech/20151222 Turn Tor socks to http.md b/sources/tech/20151222 Turn Tor socks to http.md
new file mode 100644
index 0000000000..da6eb0ed5a
--- /dev/null
+++ b/sources/tech/20151222 Turn Tor socks to http.md
@@ -0,0 +1,86 @@
+Turn Tor socks to http
+================================================================================
+
+
+For using Tor service you can use diffrent tools like Tor browser, Foxyproxy and other things, some download managers such as Wget or Aria2 can’t get Tor socks directly and start downloading anonymously with that so we need some tools to change Tor socks to http and then download with that.
+
+**Note** : This tutorial is under Debian distrobutions and in other distrobutions may be diffrent so if your distro is Debian base and you have configured Tor correctly go a head !
+
+**Polipo** : This service uses 8123 Port and 127.0.0.1 IP, use following command to install Polipo on your computer :
+
+ sudo apt install polipo
+
+Now use this command to go in Polipo config file:
+
+ sudo nano /etc/polipo/config
+
+Add the following lines to the end of the file :
+
+ proxyAddress = "::0"
+ allowedClients = 192.168.1.0/24
+ socksParentProxy = "localhost:9050"
+ socksProxyType = socks5
+
+Restart the Polipo service with this command :
+
+ sudo service polipo restart
+
+Now Polipo is ready ! do what ever you like in anonymous world ! as example of how using it :
+
+ pdmt -l "link" -i 127.0.01 -p 8123
+
+With command above, PDMT ( Persian Download Manager Terminal ) will download your file anonymously.
+
+**Proxychains** : In this service you can set Tor or Lantern proxy to turn socks too but in usage it’s a little diffrent with Polipo and Privoxy because you don’t need to use any port ! for installing that use following command :
+
+ sudo apt install proxychains
+
+Open config file with this command :
+
+ sudo nano /etc/proxychains.conf
+
+Now add the following code to the end of text, this code is Tor port and Ip :
+
+ socks5 127.0.0.1 9050
+
+If you put “proxychains” word before a command in terminal and run it, it would run by Tor proxy :
+
+ proxychains firefoxt
+ proxychains aria2c
+ proxychains wget
+
+**Privoxy** : Privoxy uses 8118 port and it’s easy to run first install privoxy package :
+
+ sudo apt install privoxy
+
+We should change the config file now :
+
+ sudo nano /etc/pivoxy/config
+
+Add the following lines to end of the file :
+
+ forward-socks5 / 127.0.0.1:9050 .
+ forward-socks4a / 127.0.0.1:9050 .
+ forward-socks5t / 127.0.0.1:9050 .
+ forward 192.168.*.*/ .
+ forward 10.*.*.*/ .
+ forward 127.*.*.*/ .
+ forward localhost/ .
+
+Restart the service :
+
+ sudo service privoxy restart
+
+Service is ready ! port is 8118 and Ip is 127.0.0.1 use it and enjoy from it !
+
+--------------------------------------------------------------------------------
+
+via: http://www.unixmen.com/turn-tor-socks-http/
+
+作者:[Hossein heydari][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.unixmen.com/author/hossein/
\ No newline at end of file
diff --git a/sources/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md b/sources/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md
new file mode 100644
index 0000000000..b4a2f886a1
--- /dev/null
+++ b/sources/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md
@@ -0,0 +1,105 @@
+How to Setup SSH Login Without Password CentOS / RHEL
+================================================================================
+
+
+As a system administrator, you plan on using OpenSSH for Linux and automate your daily tasks such as transferring files or database dump file for the backup to another server. To achieve this goal, you need to log in automatically from the host A to host B. Login automatically mean you do not want to enter any password because you want to use ssh from a shell script.
+
+In this article we’ll show you how to Setup SSH Login without Password on CentOS / RHEL. After automatic login has been configured, you can use it to move the file using SSH (Secure Shell) and secure copy (SCP).
+
+SSH is open source and the most trusted network protocol which is used to login to the remote server. It is used by system administrators to execute commands, also used to transfer files from one computer to another over a network using SCP protocol.
+
+After you setup SSH login without password, you can get the following advantages :
+
+a) Automate your daily task via scripts.
+b) Enhance security of your linux server. This is one of the recommended method to prevent a brute force attack on virtual private server (VPS), SSH keys are nearly impossible to decipher by brute force alone.
+
+### What is ssh-keygen ###
+
+ssh-keygen is a Unix utility that is used to generate, create, manage the public and private keys for ssh authentication. With the help of the ssh-keygen tool, a user can create passphrase keys for both SSH protocol version 1 and version 2. ssh-keygen creates RSA keys for SSH protocol version 1 and RSA or DSA keys for use by SSH protocol version 2.
+
+### What is ssh-copy-id ###
+
+ssh-copy-id is a script that copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also append the indicated identity file to that machine’s ~/.ssh/authorized_keys file and assigns proper permission to the remote-host’s home.
+
+### SSH keys ###
+
+SSH keys provide better and secure way of logging into a linux server with SSH. After you run ssh-keygen, you will generate public key and private key. You can place the public key on any server, and then unlock it by connecting to it with a client that already has the private key. When the two match up, the system unlocks without the need for a password.
+
+### Setup SSH Login Without Password on CentOS and RHEL. ###
+
+This steps tested on CentOS 5/6/7, RHEL 5/6/7 and Oracle Linux 6/7.
+
+Node1 : 192.168.0.9
+Node2 : 192.168.l.10
+
+#### Step One : ####
+
+Test the connection and access from node1 to node2 :
+
+ [root@node1 ~]# ssh root@192.168.0.10
+ The authenticity of host '192.168.0.10 (192.168.0.10)' can't be established.
+ RSA key fingerprint is 6d:8f:63:9b:3b:63:e1:72:b3:06:a4:e4:f4:37:21:42.
+ Are you sure you want to continue connecting (yes/no)? yes
+ Warning: Permanently added '192.168.0.10' (RSA) to the list of known hosts.
+ root@192.168.0.10's password:
+ Last login: Thu Dec 10 22:04:55 2015 from 192.168.0.1
+ [root@node2 ~]#
+
+#### Step Two : ####
+
+Generate public and private keys using ssh-key-gen. Please take note that you can increase security by protecting the private key with a passphrase.
+
+ [root@node1 ~]# ssh-keygen
+ Generating public/private rsa key pair.
+ Enter file in which to save the key (/root/.ssh/id_rsa):
+ Enter passphrase (empty for no passphrase):
+ Enter same passphrase again:
+ Your identification has been saved in /root/.ssh/id_rsa.
+ Your public key has been saved in /root/.ssh/id_rsa.pub.
+ The key fingerprint is:
+ b4:51:7e:1e:52:61:cd:fb:b2:98:4b:ad:a1:8b:31:6d root@node1.ehowstuff.local
+ The key's randomart image is:
+ +--[ RSA 2048]----+
+ | . ++ |
+ | o o o |
+ | o o o . |
+ | . o + .. |
+ | S . . |
+ | . .. .|
+ | o E oo.o |
+ | = ooo. |
+ | . o.o. |
+ +-----------------+
+
+#### Step Three : ####
+
+Copy or transfer the public key to remote-host using ssh-copy-id command. It will append the indicated identity file to ~/.ssh/authorized_keys on node2 :
+
+ [root@node1 ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.0.10
+ root@192.168.0.10's password:
+ Now try logging into the machine, with "ssh '192.168.0.10'", and check in:
+
+ .ssh/authorized_keys
+
+ to make sure we haven't added extra keys that you weren't expecting.
+
+#### Step Four : ####
+
+Try SSH login without Password to node2 :
+
+ [root@node1 ~]# ssh root@192.168.0.10
+ Last login: Sun Dec 13 14:03:20 2015 from www.ehowstuff.local
+
+I hope this article gives you some ideas and quick guide on how to setup SSH login without password on Linux CentOS / RHEL.
+
+--------------------------------------------------------------------------------
+
+via: http://www.ehowstuff.com/ssh-login-without-password-centos/
+
+作者:[skytech][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.ehowstuff.com/author/skytech/
diff --git a/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md b/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md
new file mode 100644
index 0000000000..b10e7ed47e
--- /dev/null
+++ b/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md
@@ -0,0 +1,106 @@
+How to Use Glances to Monitor System on Ubuntu
+================================================================================
+
+
+Glances is a cross-platform command-line text-based tool to monitor your system. It is written in Python language and uses the `psutil` library to get information from the system. Using it you can monitor CPU, Load Average, Memory, Network Interfaces, Disk I/O, File System spaces utilization, mounted devices, total number of active processes and top processes. There are many interesting options available in Glances. One of the main features is that you can set thresholds (careful, warning and critical) in a configuration file, and information will be shown in colors which indicates the bottleneck in the system.
+
+### Glances Features ###
+
+- the average CPU load
+- total number of processes like active, sleeping processes, etc.
+- total memory information like RAM, swap, free memory, etc.
+- CPU information
+- Network download and upload speed of connections
+- Disk I/O read/write speed details
+- Currently mounted devices’ disk usages
+- Top processes with their CPU/memory usages
+
+### Installing Glances ###
+
+Installing Glances on Ubuntu is easy, as it is available on Ubuntu’s repository. You can install Glances by running the following command.
+
+ sudo apt-get install glances
+
+### Usage of Glances ###
+
+After installation has been finished, you can launch Glances by running the following command:
+
+ glances
+
+You will see an output like the following:
+
+
+
+Press ESC or “Ctrl + C” to quit from the Glances terminal.
+
+By default, the interval time is set to 1 second, but you can define the custom interval time while running glances from the terminal.
+
+To set the interval time to 5 seconds, run the following command:
+
+ glances -t 5
+
+### Glances Color Codes ###
+
+Glances color code meanings:
+
+- `GREEN` : OK
+- `BLUE` : CAREFUL
+- `VIOLET` : ALERT
+- `RED` : CRITICAL
+
+By default, Glances thresholds set is: careful=50, warning=70, critical=90. You can customize the threshold by using the default configuration file glances.conf located at the “/etc/glances/” directory.
+
+### Glances Options ###
+
+Glances provides sever so hot keys to find output information while it is running.
+
+Below are the list of several hot keys.
+
+- `m` : sort processes by MEM%
+- `p` : sort processes by name
+- `c` : sort processes by CPU%
+- `d` : show/hide disk I/O stats
+- `a` : sort processes automatically
+- `f` : show/hide file system statshddtemp
+- `i` : sort processes by I/O rate
+- `s` : show/hide sensors’ stats
+- `y` : show/hide hddtemp stats
+- `l` : show/hide logs
+- `n` : show/hide network stats
+- `x` : delete warning and critical logs
+- `h` : show/hide help screen
+- `q` : quit
+- `w` : delete warning logs
+
+### Use Glances to Monitor Remote Systems ###
+
+You can also monitor remote systems using Glances. To use it on a remote system, use the following command:
+
+ glances -s
+
+You will see an output like the following:
+
+
+
+You will see Glances running on port 61209.
+
+Now, go to the remote machine and execute the following command to connect to a Glances server by specifying the IP address as shown below. For example, 192.168.1.10 is your Glances server IP address.
+
+ glances -c -P 192.168.1.10
+
+### Conclusion ###
+
+Glances is a very useful tool for every Linux system administrator. Using it, you can easily monitor your Linux system in less time. Feel free to comment if you have any questions.
+
+--------------------------------------------------------------------------------
+
+via: https://www.maketecheasier.com/glances-monitor-system-ubuntu/
+
+作者:[Hitesh Jethva][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:https://www.maketecheasier.com/author/hiteshjethva/
+
diff --git a/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md b/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md
new file mode 100644
index 0000000000..a0edd16870
--- /dev/null
+++ b/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md
@@ -0,0 +1,101 @@
+Monitor Linux System Performance Using Nmon
+================================================================================
+Nmon (also known as Nigel’s Monitor) is a computer performance system monitor tool for the AIX and Linux operating systems developed by IBM employee Nigel Griffiths. The tool displays onscreen or saves to a data file the operating system statistics to aid in the understanding of computer resource use, tuning options and bottlenecks. This system benchmark tool gives you a huge amount of important performance information in one go with a single command. You can easily monitor your system’s CPU, memory, network, disks, file systems, NFS, top processes, resources and power micro-partition information using Nmon.
+
+### Installing Nmon ###
+
+By default nmon is available in the Ubuntu repository. You can easily install nmon by running the following command:
+
+ sudo apt-get install nmon
+
+How to Use Nmon to Monitor Linux Performance
+
+Once the installation has been finished, you can launch it by typing the `nmon` command in the terminal.
+
+ nmon
+
+You wI’ll see the following output:
+
+
+
+You can see from the above screenshot that the nmon command-line utility runs completely in interactive mode, and you can easily toggle statistics using shortcut keys.
+
+You can use the following nmon keyboard shortcuts to display different system stats:
+
+- `q` : to stop and exit Nmon
+- `h` : to see help screen
+- `c` : see CPU stats
+- `m` : see memory stats
+- `d` : see disk stats
+- `k` : see kernel stats
+- `n` : see network stats
+- `N` : see NFS stats
+- `j` : see file system stats
+- `t` : see top process
+- `V` : see virtual memory stats
+- `v` : verbose mode
+
+### Check CPU by Processor ###
+
+If you would like to collect some statistics on CPU performance, you should hit the c key on the keyboard.
+
+After hitting the c key you wI’ll see the following output.
+
+
+
+### Check Top Process Statistics ###
+
+To get stats on top processes that are running on your system, press the t key on your keyboard.
+
+You will see the following output.
+
+
+
+### Check Network Statistics ###
+
+To get the network stats of your Linux system, just press the n key on your keyboard.
+
+You wI’ll see the following output:
+
+
+
+### Disk I/O Graphs ###
+
+Use the `d` key to get information about disks.
+
+You wI’ll see the following output:
+
+
+
+### Check Kernel Information ###
+
+A most important key to use with this tool is `k;` it is used to display some brief information on the kernel of your system.
+
+You will see the following output after hitting the `k` key on your keyboard.
+
+
+
+### Get System Information ###
+
+A very useful key for every system admin is the `r` key which is used to give information on different resources such as machine architecture, operating system version, Linux version and CPU.
+
+You will see the following output by hitting the `r` key.
+
+
+
+### Conclusion ###
+
+There are many other tools that can do the same job of the Nmon, but Nmon is so usee friendly for a Linux beginner. Please feel free to comment if you have any questions.
+
+--------------------------------------------------------------------------------
+
+via: https://www.maketecheasier.com/monitor-linux-system-performance/
+
+作者:[Hitesh Jethva][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:https://www.maketecheasier.com/author/hiteshjethva/
+
diff --git a/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md b/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md
new file mode 100644
index 0000000000..3ffb1dc54f
--- /dev/null
+++ b/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md
@@ -0,0 +1,315 @@
+Part 10 - LFCS: Understanding & Learning Basic Shell Scripting and Linux Filesystem Troubleshooting
+================================================================================
+The Linux Foundation launched the LFCS certification (Linux Foundation Certified Sysadmin), a brand new initiative whose purpose is to allow individuals everywhere (and anywhere) to get certified in basic to intermediate operational support for Linux systems, which includes supporting running systems and services, along with overall monitoring and analysis, plus smart decision-making when it comes to raising issues to upper support teams.
+
+
+
+Linux Foundation Certified Sysadmin – Part 10
+
+Check out the following video that guides you an introduction to the Linux Foundation Certification Program.
+
+注:youtube 视频
+
+
+
+This is the last article (Part 10) of the present 10-tutorial long series. In this article we will focus on basic shell scripting and troubleshooting Linux file systems. Both topics are required for the LFCS certification exam.
+
+### Understanding Terminals and Shells ###
+
+Let’s clarify a few concepts first.
+
+- A shell is a program that takes commands and gives them to the operating system to be executed.
+- A terminal is a program that allows us as end users to interact with the shell. One example of a terminal is GNOME terminal, as shown in the below image.
+
+
+
+Gnome Terminal
+
+When we first start a shell, it presents a command prompt (also known as the command line), which tells us that the shell is ready to start accepting commands from its standard input device, which is usually the keyboard.
+
+You may want to refer to another article in this series ([Use Command to Create, Edit, and Manipulate files – Part 1][1]) to review some useful commands.
+
+Linux provides a range of options for shells, the following being the most common:
+
+**bash Shell**
+
+Bash stands for Bourne Again SHell and is the GNU Project’s default shell. It incorporates useful features from the Korn shell (ksh) and C shell (csh), offering several improvements at the same time. This is the default shell used by the distributions covered in the LFCS certification, and it is the shell that we will use in this tutorial.
+
+**sh Shell**
+
+The Bourne SHell is the oldest shell and therefore has been the default shell of many UNIX-like operating systems for many years.
+ksh Shell
+
+The Korn SHell is a Unix shell which was developed by David Korn at Bell Labs in the early 1980s. It is backward-compatible with the Bourne shell and includes many features of the C shell.
+
+A shell script is nothing more and nothing less than a text file turned into an executable program that combines commands that are executed by the shell one after another.
+
+### Basic Shell Scripting ###
+
+As mentioned earlier, a shell script is born as a plain text file. Thus, can be created and edited using our preferred text editor. You may want to consider using vi/m (refer to [Usage of vi Editor – Part 2][2] of this series), which features syntax highlighting for your convenience.
+
+Type the following command to create a file named myscript.sh and press Enter.
+
+ # vim myscript.sh
+
+The very first line of a shell script must be as follows (also known as a shebang).
+
+ #!/bin/bash
+
+It “tells” the operating system the name of the interpreter that should be used to run the text that follows.
+
+Now it’s time to add our commands. We can clarify the purpose of each command, or the entire script, by adding comments as well. Note that the shell ignores those lines beginning with a pound sign # (explanatory comments).
+
+ #!/bin/bash
+ echo This is Part 10 of the 10-article series about the LFCS certification
+ echo Today is $(date +%Y-%m-%d)
+
+Once the script has been written and saved, we need to make it executable.
+
+ # chmod 755 myscript.sh
+
+Before running our script, we need to say a few words about the $PATH environment variable. If we run,
+
+ echo $PATH
+
+from the command line, we will see the contents of $PATH: a colon-separated list of directories that are searched when we enter the name of a executable program. It is called an environment variable because it is part of the shell environment – a set of information that becomes available for the shell and its child processes when the shell is first started.
+
+When we type a command and press Enter, the shell searches in all the directories listed in the $PATH variable and executes the first instance that is found. Let’s see an example,
+
+
+
+Environment Variables
+
+If there are two executable files with the same name, one in /usr/local/bin and another in /usr/bin, the one in the first directory will be executed first, whereas the other will be disregarded.
+
+If we haven’t saved our script inside one of the directories listed in the $PATH variable, we need to append ./ to the file name in order to execute it. Otherwise, we can run it just as we would do with a regular command.
+
+ # pwd
+ # ./myscript.sh
+ # cp myscript.sh ../bin
+ # cd ../bin
+ # pwd
+ # myscript.sh
+
+
+
+Execute Script
+
+#### Conditionals ####
+
+Whenever you need to specify different courses of action to be taken in a shell script, as result of the success or failure of a command, you will use the if construct to define such conditions. Its basic syntax is:
+
+ if CONDITION; then
+ COMMANDS;
+ else
+ OTHER-COMMANDS
+ fi
+
+Where CONDITION can be one of the following (only the most frequent conditions are cited here) and evaluates to true when:
+
+- [ -a file ] → file exists.
+- [ -d file ] → file exists and is a directory.
+- [ -f file ] →file exists and is a regular file.
+- [ -u file ] →file exists and its SUID (set user ID) bit is set.
+- [ -g file ] →file exists and its SGID bit is set.
+- [ -k file ] →file exists and its sticky bit is set.
+- [ -r file ] →file exists and is readable.
+- [ -s file ]→ file exists and is not empty.
+- [ -w file ]→file exists and is writable.
+- [ -x file ] is true if file exists and is executable.
+- [ string1 = string2 ] → the strings are equal.
+- [ string1 != string2 ] →the strings are not equal.
+
+[ int1 op int2 ] should be part of the preceding list, while the items that follow (for example, -eq –> is true if int1 is equal to int2.) should be a “children” list of [ int1 op int2 ] where op is one of the following comparison operators.
+
+- -eq –> is true if int1 is equal to int2.
+- -ne –> true if int1 is not equal to int2.
+- -lt –> true if int1 is less than int2.
+- -le –> true if int1 is less than or equal to int2.
+- -gt –> true if int1 is greater than int2.
+- -ge –> true if int1 is greater than or equal to int2.
+
+#### For Loops ####
+
+This loop allows to execute one or more commands for each value in a list of values. Its basic syntax is:
+
+ for item in SEQUENCE; do
+ COMMANDS;
+ done
+
+Where item is a generic variable that represents each value in SEQUENCE during each iteration.
+
+#### While Loops ####
+
+This loop allows to execute a series of repetitive commands as long as the control command executes with an exit status equal to zero (successfully). Its basic syntax is:
+
+ while EVALUATION_COMMAND; do
+ EXECUTE_COMMANDS;
+ done
+
+Where EVALUATION_COMMAND can be any command(s) that can exit with a success (0) or failure (other than 0) status, and EXECUTE_COMMANDS can be any program, script or shell construct, including other nested loops.
+
+#### Putting It All Together ####
+
+We will demonstrate the use of the if construct and the for loop with the following example.
+
+**Determining if a service is running in a systemd-based distro**
+
+Let’s create a file with a list of services that we want to monitor at a glance.
+
+ # cat myservices.txt
+
+ sshd
+ mariadb
+ httpd
+ crond
+ firewalld
+
+
+
+Script to Monitor Linux Services
+
+Our shell script should look like.
+
+ #!/bin/bash
+
+ # This script iterates over a list of services and
+ # is used to determine whether they are running or not.
+
+ for service in $(cat myservices.txt); do
+ systemctl status $service | grep --quiet "running"
+ if [ $? -eq 0 ]; then
+ echo $service "is [ACTIVE]"
+ else
+ echo $service "is [INACTIVE or NOT INSTALLED]"
+ fi
+ done
+
+
+
+Linux Service Monitoring Script
+
+**Let’s explain how the script works.**
+
+1). The for loop reads the myservices.txt file one element of LIST at a time. That single element is denoted by the generic variable named service. The LIST is populated with the output of,
+
+ # cat myservices.txt
+
+2). The above command is enclosed in parentheses and preceded by a dollar sign to indicate that it should be evaluated to populate the LIST that we will iterate over.
+
+3). For each element of LIST (meaning every instance of the service variable), the following command will be executed.
+
+ # systemctl status $service | grep --quiet "running"
+
+This time we need to precede our generic variable (which represents each element in LIST) with a dollar sign to indicate it’s a variable and thus its value in each iteration should be used. The output is then piped to grep.
+
+The –quiet flag is used to prevent grep from displaying to the screen the lines where the word running appears. When that happens, the above command returns an exit status of 0 (represented by $? in the if construct), thus verifying that the service is running.
+
+An exit status different than 0 (meaning the word running was not found in the output of systemctl status $service) indicates that the service is not running.
+
+
+
+Services Monitoring Script
+
+We could go one step further and check for the existence of myservices.txt before even attempting to enter the for loop.
+
+ #!/bin/bash
+
+ # This script iterates over a list of services and
+ # is used to determine whether they are running or not.
+
+ if [ -f myservices.txt ]; then
+ for service in $(cat myservices.txt); do
+ systemctl status $service | grep --quiet "running"
+ if [ $? -eq 0 ]; then
+ echo $service "is [ACTIVE]"
+ else
+ echo $service "is [INACTIVE or NOT INSTALLED]"
+ fi
+ done
+ else
+ echo "myservices.txt is missing"
+ fi
+
+**Pinging a series of network or internet hosts for reply statistics**
+
+You may want to maintain a list of hosts in a text file and use a script to determine every now and then whether they’re pingable or not (feel free to replace the contents of myhosts and try for yourself).
+
+The read shell built-in command tells the while loop to read myhosts line by line and assigns the content of each line to variable host, which is then passed to the ping command.
+
+ #!/bin/bash
+
+ # This script is used to demonstrate the use of a while loop
+
+ while read host; do
+ ping -c 2 $host
+ done < myhosts
+
+
+
+Script to Ping Servers
+
+Read Also:
+
+- [Learn Shell Scripting: A Guide from Newbies to System Administrator][3]
+- [5 Shell Scripts to Learn Shell Programming][4]
+
+### Filesystem Troubleshooting ###
+
+Although Linux is a very stable operating system, if it crashes for some reason (for example, due to a power outage), one (or more) of your file systems will not be unmounted properly and thus will be automatically checked for errors when Linux is restarted.
+
+In addition, each time the system boots during a normal boot, it always checks the integrity of the filesystems before mounting them. In both cases this is performed using a tool named fsck (“file system check”).
+
+fsck will not only check the integrity of file systems, but also attempt to repair corrupt file systems if instructed to do so. Depending on the severity of damage, fsck may succeed or not; when it does, recovered portions of files are placed in the lost+found directory, located in the root of each file system.
+
+Last but not least, we must note that inconsistencies may also happen if we try to remove an USB drive when the operating system is still writing to it, and may even result in hardware damage.
+
+The basic syntax of fsck is as follows:
+
+ # fsck [options] filesystem
+
+**Checking a filesystem for errors and attempting to repair automatically**
+
+In order to check a filesystem with fsck, we must first unmount it.
+
+ # mount | grep sdg1
+ # umount /mnt
+ # fsck -y /dev/sdg1
+
+
+
+Check Filesystem Errors
+
+Besides the -y flag, we can use the -a option to automatically repair the file systems without asking any questions, and force the check even when the filesystem looks clean.
+
+ # fsck -af /dev/sdg1
+
+If we’re only interested in finding out what’s wrong (without trying to fix anything for the time being) we can run fsck with the -n option, which will output the filesystem issues to standard output.
+
+ # fsck -n /dev/sdg1
+
+Depending on the error messages in the output of fsck, we will know whether we can try to solve the issue ourselves or escalate it to engineering teams to perform further checks on the hardware.
+
+### Summary ###
+
+We have arrived at the end of this 10-article series where have tried to cover the basic domain competencies required to pass the LFCS exam.
+
+For obvious reasons, it is not possible to cover every single aspect of these topics in any single tutorial, and that’s why we hope that these articles have put you on the right track to try new stuff yourself and continue learning.
+
+If you have any questions or comments, they are always welcome – so don’t hesitate to drop us a line via the form below!
+
+--------------------------------------------------------------------------------
+
+via: http://www.tecmint.com/linux-basic-shell-scripting-and-linux-filesystem-troubleshooting/
+
+作者:[Gabriel Cánepa][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.tecmint.com/author/gacanepa/
+[1]:http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/
+[2]:http://www.tecmint.com/vi-editor-usage/
+[3]:http://www.tecmint.com/learning-shell-scripting-language-a-guide-from-newbies-to-system-administrator/
+[4]:http://www.tecmint.com/basic-shell-programming-part-ii/
\ No newline at end of file
diff --git a/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md b/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md
new file mode 100644
index 0000000000..23e1b30f57
--- /dev/null
+++ b/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md
@@ -0,0 +1,389 @@
+GHLandy Translating
+
+Part 2 - LFCS: How to Install and Use vi/vim as a Full Text Editor
+================================================================================
+A couple of months ago, the Linux Foundation launched the LFCS (Linux Foundation Certified Sysadmin) certification in order to help individuals from all over the world to verify they are capable of doing basic to intermediate system administration tasks on Linux systems: system support, first-hand troubleshooting and maintenance, plus intelligent decision-making to know when it’s time to raise issues to upper support teams.
+
+
+
+Learning VI Editor in Linux
+
+Please take a look at the below video that explains The Linux Foundation Certification Program.
+
+注:youtube 视频
+
+
+This post is Part 2 of a 10-tutorial series, here in this part, we will cover the basic file editing operations and understanding modes in vi/m editor, that are required for the LFCS certification exam.
+
+### Perform Basic File Editing Operations Using vi/m ###
+
+Vi was the first full-screen text editor written for Unix. Although it was intended to be small and simple, it can be a bit challenging for people used exclusively to GUI text editors, such as NotePad++, or gedit, to name a few examples.
+
+To use Vi, we must first understand the 3 modes in which this powerful program operates, in order to begin learning later about the its powerful text-editing procedures.
+
+Please note that most modern Linux distributions ship with a variant of vi known as vim (“Vi improved”), which supports more features than the original vi does. For that reason, throughout this tutorial we will use vi and vim interchangeably.
+
+If your distribution does not have vim installed, you can install it as follows.
+
+- Ubuntu and derivatives: aptitude update && aptitude install vim
+- Red Hat-based distributions: yum update && yum install vim
+- openSUSE: zypper update && zypper install vim
+
+### Why should I want to learn vi? ###
+
+There are at least 2 good reasons to learn vi.
+
+1. vi is always available (no matter what distribution you’re using) since it is required by POSIX.
+
+2. vi does not consume a considerable amount of system resources and allows us to perform any imaginable tasks without lifting our fingers from the keyboard.
+
+In addition, vi has a very extensive built-in manual, which can be launched using the :help command right after the program is started. This built-in manual contains more information than vi/m’s man page.
+
+
+
+vi Man Pages
+
+#### Launching vi ####
+
+To launch vi, type vi in your command prompt.
+
+
+
+Start vi Editor
+
+Then press i to enter Insert mode, and you can start typing. Another way to launch vi/m is.
+
+ # vi filename
+
+Which will open a new buffer (more on buffers later) named filename, which you can later save to disk.
+
+#### Understanding Vi modes ####
+
+1. In command mode, vi allows the user to navigate around the file and enter vi commands, which are brief, case-sensitive combinations of one or more letters. Almost all of them can be prefixed with a number to repeat the command that number of times.
+
+For example, yy (or Y) copies the entire current line, whereas 3yy (or 3Y) copies the entire current line along with the two next lines (3 lines in total). We can always enter command mode (regardless of the mode we’re working on) by pressing the Esc key. The fact that in command mode the keyboard keys are interpreted as commands instead of text tends to be confusing to beginners.
+
+2. In ex mode, we can manipulate files (including saving a current file and running outside programs). To enter this mode, we must type a colon (:) from command mode, directly followed by the name of the ex-mode command that needs to be used. After that, vi returns automatically to command mode.
+
+3. In insert mode (the letter i is commonly used to enter this mode), we simply enter text. Most keystrokes result in text appearing on the screen (one important exception is the Esc key, which exits insert mode and returns to command mode).
+
+
+
+vi Insert Mode
+
+#### Vi Commands ####
+
+The following table shows a list of commonly used vi commands. File edition commands can be enforced by appending the exclamation sign to the command (for example,
+
+
+
+
+
+
+ | Key command |
+ Description |
+
+
+ | h or left arrow |
+ Go one character to the left |
+
+
+ | j or down arrow |
+ Go down one line |
+
+
+ | k or up arrow |
+ Go up one line |
+
+
+ | l (lowercase L) or right arrow |
+ Go one character to the right |
+
+
+ | H |
+ Go to the top of the screen |
+
+
+ | L |
+ Go to the bottom of the screen |
+
+
+ | G |
+ Go to the end of the file |
+
+
+ | w |
+ Move one word to the right |
+
+
+ | b |
+ Move one word to the left |
+
+
+ | 0 (zero) |
+ Go to the beginning of the current line |
+
+
+ | ^ |
+ Go to the first nonblank character on the current line |
+
+
+ | $ |
+ Go to the end of the current line |
+
+
+ | Ctrl-B |
+ Go back one screen |
+
+
+ | Ctrl-F |
+ Go forward one screen |
+
+
+ | i |
+ Insert at the current cursor position |
+
+
+ | I (uppercase i) |
+ Insert at the beginning of the current line |
+
+
+ | J (uppercase j) |
+ Join current line with the next one (move next line up) |
+
+
+ | a |
+ Append after the current cursor position |
+
+
+ | o (lowercase O) |
+ Creates a blank line after the current line |
+
+
+ | O (uppercase o) |
+ Creates a blank line before the current line |
+
+
+ | r |
+ Replace the character at the current cursor position |
+
+
+ | R |
+ Overwrite at the current cursor position |
+
+
+ | x |
+ Delete the character at the current cursor position |
+
+
+ | X |
+ Delete the character immediately before (to the left) of the current cursor position |
+
+
+ | dd |
+ Cut (for later pasting) the entire current line |
+
+
+ | D |
+ Cut from the current cursor position to the end of the line (this command is equivalent to d$) |
+
+
+ | yX |
+ Give a movement command X, copy (yank) the appropriate number of characters, words, or lines from the current cursor position |
+
+
+ | yy or Y |
+ Yank (copy) the entire current line |
+
+
+ | p |
+ Paste after (next line) the current cursor position |
+
+
+ | P |
+ Paste before (previous line) the current cursor position |
+
+
+ | . (period) |
+ Repeat the last command |
+
+
+ | u |
+ Undo the last command |
+
+
+ | U |
+ Undo the last command in the last line. This will work as long as the cursor is still on the line. |
+
+
+ | n |
+ Find the next match in a search |
+
+
+ | N |
+ Find the previous match in a search |
+
+
+ | :n |
+ Next file; when multiple files are specified for editing, this commands loads the next file. |
+
+
+ | :e file |
+ Load file in place of the current file. |
+
+
+ | :r file |
+ Insert the contents of file after (next line) the current cursor position |
+
+
+ | :q |
+ Quit without saving changes. |
+
+
+ | :w file |
+ Write the current buffer to file. To append to an existing file, use :w >> file. |
+
+
+ | :wq |
+ Write the contents of the current file and quit. Equivalent to x! and ZZ |
+
+
+ | :r! command |
+ Execute command and insert output after (next line) the current cursor position. |
+
+
+
+
+#### Vi Options ####
+
+The following options can come in handy while running vim (we need to add them in our ~/.vimrc file).
+
+ # echo set number >> ~/.vimrc
+ # echo syntax on >> ~/.vimrc
+ # echo set tabstop=4 >> ~/.vimrc
+ # echo set autoindent >> ~/.vimrc
+
+
+
+vi Editor Options
+
+- set number shows line numbers when vi opens an existing or a new file.
+- syntax on turns on syntax highlighting (for multiple file extensions) in order to make code and config files more readable.
+- set tabstop=4 sets the tab size to 4 spaces (default value is 8).
+- set autoindent carries over previous indent to the next line.
+
+#### Search and replace ####
+
+vi has the ability to move the cursor to a certain location (on a single line or over an entire file) based on searches. It can also perform text replacements with or without confirmation from the user.
+
+a). Searching within a line: the f command searches a line and moves the cursor to the next occurrence of a specified character in the current line.
+
+For example, the command fh would move the cursor to the next instance of the letter h within the current line. Note that neither the letter f nor the character you’re searching for will appear anywhere on your screen, but the character will be highlighted after you press Enter.
+
+For example, this is what I get after pressing f4 in command mode.
+
+
+
+Search String in Vi
+
+b). Searching an entire file: use the / command, followed by the word or phrase to be searched for. A search may be repeated using the previous search string with the n command, or the next one (using the N command). This is the result of typing /Jane in command mode.
+
+
+
+Vi Search String in File
+
+c). vi uses a command (similar to sed’s) to perform substitution operations over a range of lines or an entire file. To change the word “old” to “young” for the entire file, we must enter the following command.
+
+ :%s/old/young/g
+
+**Notice**: The colon at the beginning of the command.
+
+
+
+Vi Search and Replace
+
+The colon (:) starts the ex command, s in this case (for substitution), % is a shortcut meaning from the first line to the last line (the range can also be specified as n,m which means “from line n to line m”), old is the search pattern, while young is the replacement text, and g indicates that the substitution should be performed on every occurrence of the search string in the file.
+
+Alternatively, a c can be added to the end of the command to ask for confirmation before performing any substitution.
+
+ :%s/old/young/gc
+
+Before replacing the original text with the new one, vi/m will present us with the following message.
+
+
+
+Replace String in Vi
+
+- y: perform the substitution (yes)
+- n: skip this occurrence and go to the next one (no)
+- a: perform the substitution in this and all subsequent instances of the pattern.
+- q or Esc: quit substituting.
+- l (lowercase L): perform this substitution and quit (last).
+- Ctrl-e, Ctrl-y: Scroll down and up, respectively, to view the context of the proposed substitution.
+
+#### Editing Multiple Files at a Time ####
+
+Let’s type vim file1 file2 file3 in our command prompt.
+
+ # vim file1 file2 file3
+
+First, vim will open file1. To switch to the next file (file2), we need to use the :n command. When we want to return to the previous file, :N will do the job.
+
+In order to switch from file1 to file3.
+
+a). The :buffers command will show a list of the file currently being edited.
+
+ :buffers
+
+
+
+Edit Multiple Files
+
+b). The command :buffer 3 (without the s at the end) will open file3 for editing.
+
+In the image above, a pound sign (#) indicates that the file is currently open but in the background, while %a marks the file that is currently being edited. On the other hand, a blank space after the file number (3 in the above example) indicates that the file has not yet been opened.
+
+#### Temporary vi buffers ####
+
+To copy a couple of consecutive lines (let’s say 4, for example) into a temporary buffer named a (not associated with a file) and place those lines in another part of the file later in the current vi section, we need to…
+
+1. Press the ESC key to be sure we are in vi Command mode.
+
+2. Place the cursor on the first line of the text we wish to copy.
+
+3. Type “a4yy to copy the current line, along with the 3 subsequent lines, into a buffer named a. We can continue editing our file – we do not need to insert the copied lines immediately.
+
+4. When we reach the location for the copied lines, use “a before the p or P commands to insert the lines copied into the buffer named a:
+
+- Type “ap to insert the lines copied into buffer a after the current line on which the cursor is resting.
+- Type “aP to insert the lines copied into buffer a before the current line.
+
+If we wish, we can repeat the above steps to insert the contents of buffer a in multiple places in our file. A temporary buffer, as the one in this section, is disposed when the current window is closed.
+
+### Summary ###
+
+As we have seen, vi/m is a powerful and versatile text editor for the CLI. Feel free to share your own tricks and comments below.
+
+#### Reference Links ####
+
+- [About the LFCS][1]
+- [Why get a Linux Foundation Certification?][2]
+- [Register for the LFCS exam][3]
+
+--------------------------------------------------------------------------------
+
+via: http://www.tecmint.com/vi-editor-usage/
+
+作者:[Gabriel Cánepa][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.tecmint.com/author/gacanepa/
+[1]:https://training.linuxfoundation.org/certification/LFCS
+[2]:https://training.linuxfoundation.org/certification/why-certify-with-us
+[3]:https://identity.linuxfoundation.org/user?destination=pid/1
diff --git a/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md b/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md
new file mode 100644
index 0000000000..82cc54a5a6
--- /dev/null
+++ b/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md
@@ -0,0 +1,382 @@
+Part 3 - LFCS: How to Archive/Compress Files & Directories, Setting File Attributes and Finding Files in Linux
+================================================================================
+Recently, the Linux Foundation started the LFCS (Linux Foundation Certified Sysadmin) certification, a brand new program whose purpose is allowing individuals from all corners of the globe to have access to an exam, which if approved, certifies that the person is knowledgeable in performing basic to intermediate system administration tasks on Linux systems. This includes supporting already running systems and services, along with first-level troubleshooting and analysis, plus the ability to decide when to escalate issues to engineering teams.
+
+
+
+Linux Foundation Certified Sysadmin – Part 3
+
+Please watch the below video that gives the idea about The Linux Foundation Certification Program.
+
+注:youtube 视频
+
+
+This post is Part 3 of a 10-tutorial series, here in this part, we will cover how to archive/compress files and directories, set file attributes, and find files on the filesystem, that are required for the LFCS certification exam.
+
+### Archiving and Compression Tools ###
+
+A file archiving tool groups a set of files into a single standalone file that we can backup to several types of media, transfer across a network, or send via email. The most frequently used archiving utility in Linux is tar. When an archiving utility is used along with a compression tool, it allows to reduce the disk size that is needed to store the same files and information.
+
+#### The tar utility ####
+
+tar bundles a group of files together into a single archive (commonly called a tar file or tarball). The name originally stood for tape archiver, but we must note that we can use this tool to archive data to any kind of writeable media (not only to tapes). Tar is normally used with a compression tool such as gzip, bzip2, or xz to produce a compressed tarball.
+
+**Basic syntax:**
+
+ # tar [options] [pathname ...]
+
+Where … represents the expression used to specify which files should be acted upon.
+
+#### Most commonly used tar commands ####
+
+注:表格
+
+
+
+
+
+
+
+
+
+ | Long option |
+ Abbreviation |
+ Description |
+
+
+ | –create |
+ c |
+ Creates a tar archive |
+
+
+ | –concatenate |
+ A |
+ Appends tar files to an archive |
+
+
+ | –append |
+ r |
+ Appends files to the end of an archive |
+
+
+ | –update |
+ u |
+ Appends files newer than copy in archive |
+
+
+ | –diff or –compare |
+ d |
+ Find differences between archive and file system |
+
+
+ | –file archive |
+ f |
+ Use archive file or device ARCHIVE |
+
+
+ | –list |
+ t |
+ Lists the contents of a tarball |
+
+
+ | –extract or –get |
+ x |
+ Extracts files from an archive |
+
+
+
+
+#### Normally used operation modifiers ####
+
+注:表格
+
+
+
+
+
+
+
+
+
+ | Long option |
+ Abbreviation |
+ Description |
+
+
+ | –directory dir |
+ C |
+ Changes to directory dir before performing operations |
+
+
+ | –same-permissions |
+ p |
+ Preserves original permissions |
+
+
+ | –verbose |
+ v |
+ Lists all files read or extracted. When this flag is used along with –list, the file sizes, ownership, and time stamps are displayed. |
+
+
+ | –verify |
+ W |
+ Verifies the archive after writing it |
+
+
+ | –exclude file |
+ — |
+ Excludes file from the archive |
+
+
+ | –exclude=pattern |
+ X |
+ Exclude files, given as a PATTERN |
+
+
+ | –gzip or –gunzip |
+ z |
+ Processes an archive through gzip |
+
+
+ | –bzip2 |
+ j |
+ Processes an archive through bzip2 |
+
+
+ | –xz |
+ J |
+ Processes an archive through xz |
+
+
+
+
+Gzip is the oldest compression tool and provides the least compression, while bzip2 provides improved compression. In addition, xz is the newest but (usually) provides the best compression. This advantages of best compression come at a price: the time it takes to complete the operation, and system resources used during the process.
+
+Normally, tar files compressed with these utilities have .gz, .bz2, or .xz extensions, respectively. In the following examples we will be using these files: file1, file2, file3, file4, and file5.
+
+**Grouping and compressing with gzip, bzip2 and xz**
+
+Group all the files in the current working directory and compress the resulting bundle with gzip, bzip2, and xz (please note the use of a regular expression to specify which files should be included in the bundle – this is to prevent the archiving tool to group the tarballs created in previous steps).
+
+ # tar czf myfiles.tar.gz file[0-9]
+ # tar cjf myfiles.tar.bz2 file[0-9]
+ # tar cJf myfile.tar.xz file[0-9]
+
+
+
+Compress Multiple Files
+
+**Listing the contents of a tarball and updating / appending files to the bundle**
+
+List the contents of a tarball and display the same information as a long directory listing. Note that update or append operations cannot be applied to compressed files directly (if you need to update or append a file to a compressed tarball, you need to uncompress the tar file and update / append to it, then compress again).
+
+ # tar tvf [tarball]
+
+
+
+List Archive Content
+
+Run any of the following commands:
+
+ # gzip -d myfiles.tar.gz [#1]
+ # bzip2 -d myfiles.tar.bz2 [#2]
+ # xz -d myfiles.tar.xz [#3]
+
+Then
+
+ # tar --delete --file myfiles.tar file4 (deletes the file inside the tarball)
+ # tar --update --file myfiles.tar file4 (adds the updated file)
+
+and
+
+ # gzip myfiles.tar [ if you choose #1 above ]
+ # bzip2 myfiles.tar [ if you choose #2 above ]
+ # xz myfiles.tar [ if you choose #3 above ]
+
+Finally,
+
+ # tar tvf [tarball] #again
+
+and compare the modification date and time of file4 with the same information as shown earlier.
+
+**Excluding file types**
+
+Suppose you want to perform a backup of user’s home directories. A good sysadmin practice would be (may also be specified by company policies) to exclude all video and audio files from backups.
+
+Maybe your first approach would be to exclude from the backup all files with an .mp3 or .mp4 extension (or other extensions). What if you have a clever user who can change the extension to .txt or .bkp, your approach won’t do you much good. In order to detect an audio or video file, you need to check its file type with file. The following shell script will do the job.
+
+ #!/bin/bash
+ # Pass the directory to backup as first argument.
+ DIR=$1
+ # Create the tarball and compress it. Exclude files with the MPEG string in its file type.
+ # -If the file type contains the string mpeg, $? (the exit status of the most recently executed command) expands to 0, and the filename is redirected to the exclude option. Otherwise, it expands to 1.
+ # -If $? equals 0, add the file to the list of files to be backed up.
+ tar X <(for i in $DIR/*; do file $i | grep -i mpeg; if [ $? -eq 0 ]; then echo $i; fi;done) -cjf backupfile.tar.bz2 $DIR/*
+
+
+
+Exclude Files in tar
+
+**Restoring backups with tar preserving permissions**
+
+You can then restore the backup to the original user’s home directory (user_restore in this example), preserving permissions, with the following command.
+
+ # tar xjf backupfile.tar.bz2 --directory user_restore --same-permissions
+
+
+
+Restore Files from Archive
+
+**Read Also:**
+
+- [18 tar Command Examples in Linux][1]
+- [Dtrx – An Intelligent Archive Tool for Linux][2]
+
+### Using find Command to Search for Files ###
+
+The find command is used to search recursively through directory trees for files or directories that match certain characteristics, and can then either print the matching files or directories or perform other operations on the matches.
+
+Normally, we will search by name, owner, group, type, permissions, date, and size.
+
+#### Basic syntax: ####
+
+# find [directory_to_search] [expression]
+
+**Finding files recursively according to Size**
+
+Find all files (-f) in the current directory (.) and 2 subdirectories below (-maxdepth 3 includes the current working directory and 2 levels down) whose size (-size) is greater than 2 MB.
+
+ # find . -maxdepth 3 -type f -size +2M
+
+
+
+Find Files Based on Size
+
+**Finding and deleting files that match a certain criteria**
+
+Files with 777 permissions are sometimes considered an open door to external attackers. Either way, it is not safe to let anyone do anything with files. We will take a rather aggressive approach and delete them! (‘{}‘ + is used to “collect” the results of the search).
+
+ # find /home/user -perm 777 -exec rm '{}' +
+
+
+
+Find Files with 777Permission
+
+**Finding files per atime or mtime**
+
+Search for configuration files in /etc that have been accessed (-atime) or modified (-mtime) more (+180) or less (-180) than 6 months ago or exactly 6 months ago (180).
+
+Modify the following command as per the example below:
+
+ # find /etc -iname "*.conf" -mtime -180 -print
+
+
+
+Find Modified Files
+
+- Read Also: [35 Practical Examples of Linux ‘find’ Command][3]
+
+### File Permissions and Basic Attributes ###
+
+The first 10 characters in the output of ls -l are the file attributes. The first of these characters is used to indicate the file type:
+
+- – : a regular file
+- -d : a directory
+- -l : a symbolic link
+- -c : a character device (which treats data as a stream of bytes, i.e. a terminal)
+- -b : a block device (which handles data in blocks, i.e. storage devices)
+
+The next nine characters of the file attributes are called the file mode and represent the read (r), write (w), and execute (x) permissions of the file’s owner, the file’s group owner, and the rest of the users (commonly referred to as “the world”).
+
+Whereas the read permission on a file allows the same to be opened and read, the same permission on a directory allows its contents to be listed if the execute permission is also set. In addition, the execute permission in a file allows it to be handled as a program and run, while in a directory it allows the same to be cd’ed into it.
+
+File permissions are changed with the chmod command, whose basic syntax is as follows:
+
+ # chmod [new_mode] file
+
+Where new_mode is either an octal number or an expression that specifies the new permissions.
+
+The octal number can be converted from its binary equivalent, which is calculated from the desired file permissions for the owner, the group, and the world, as follows:
+
+The presence of a certain permission equals a power of 2 (r=22, w=21, x=20), while its absence equates to 0. For example:
+
+
+
+File Permissions
+
+To set the file’s permissions as above in octal form, type:
+
+ # chmod 744 myfile
+
+You can also set a file’s mode using an expression that indicates the owner’s rights with the letter u, the group owner’s rights with the letter g, and the rest with o. All of these “individuals” can be represented at the same time with the letter a. Permissions are granted (or revoked) with the + or – signs, respectively.
+
+**Revoking execute permission for a shell script to all users**
+
+As we explained earlier, we can revoke a certain permission prepending it with the minus sign and indicating whether it needs to be revoked for the owner, the group owner, or all users. The one-liner below can be interpreted as follows: Change mode for all (a) users, revoke (–) execute permission (x).
+
+ # chmod a-x backup.sh
+
+Granting read, write, and execute permissions for a file to the owner and group owner, and read permissions for the world.
+
+When we use a 3-digit octal number to set permissions for a file, the first digit indicates the permissions for the owner, the second digit for the group owner and the third digit for everyone else:
+
+- Owner: (r=22 + w=21 + x=20 = 7)
+- Group owner: (r=22 + w=21 + x=20 = 7)
+- World: (r=22 + w=0 + x=0 = 4),
+
+ # chmod 774 myfile
+
+In time, and with practice, you will be able to decide which method to change a file mode works best for you in each case. A long directory listing also shows the file’s owner and its group owner (which serve as a rudimentary yet effective access control to files in a system):
+
+
+
+Linux File Listing
+
+File ownership is changed with the chown command. The owner and the group owner can be changed at the same time or separately. Its basic syntax is as follows:
+
+ # chown user:group file
+
+Where at least user or group need to be present.
+
+**Few Examples**
+
+Changing the owner of a file to a certain user.
+
+ # chown gacanepa sent
+
+Changing the owner and group of a file to an specific user:group pair.
+
+ # chown gacanepa:gacanepa TestFile
+
+Changing only the group owner of a file to a certain group. Note the colon before the group’s name.
+
+ # chown :gacanepa email_body.txt
+
+### Conclusion ###
+
+As a sysadmin, you need to know how to create and restore backups, how to find files in your system and change their attributes, along with a few tricks that can make your life easier and will prevent you from running into future issues.
+
+I hope that the tips provided in the present article will help you to achieve that goal. Feel free to add your own tips and ideas in the comments section for the benefit of the community. Thanks in advance!
+Reference Links
+
+- [About the LFCS][4]
+- [Why get a Linux Foundation Certification?][5]
+- [Register for the LFCS exam][6]
+
+--------------------------------------------------------------------------------
+
+via: http://www.tecmint.com/compress-files-and-finding-files-in-linux/
+
+作者:[Gabriel Cánepa][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.tecmint.com/author/gacanepa/
+[1]:http://www.tecmint.com/18-tar-command-examples-in-linux/
+[2]:http://www.tecmint.com/dtrx-an-intelligent-archive-extraction-tar-zip-cpio-rpm-deb-rar-tool-for-linux/
+[3]:http://www.tecmint.com/35-practical-examples-of-linux-find-command/
+[4]:https://training.linuxfoundation.org/certification/LFCS
+[5]:https://training.linuxfoundation.org/certification/why-certify-with-us
+[6]:https://identity.linuxfoundation.org/user?destination=pid/1
\ No newline at end of file
diff --git a/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md b/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md
new file mode 100644
index 0000000000..ada637fabb
--- /dev/null
+++ b/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md
@@ -0,0 +1,191 @@
+Part 4 - LFCS: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition
+================================================================================
+Last August, the Linux Foundation launched the LFCS certification (Linux Foundation Certified Sysadmin), a shiny chance for system administrators to show, through a performance-based exam, that they can perform overall operational support of Linux systems: system support, first-level diagnosing and monitoring, plus issue escalation – if needed – to other support teams.
+
+
+
+Linux Foundation Certified Sysadmin – Part 4
+
+Please aware that Linux Foundation certifications are precise, totally based on performance and available through an online portal anytime, anywhere. Thus, you no longer have to travel to a examination center to get the certifications you need to establish your skills and expertise.
+
+Please watch the below video that explains The Linux Foundation Certification Program.
+
+注:youtube 视频
+
+
+This post is Part 4 of a 10-tutorial series, here in this part, we will cover the Partitioning storage devices, Formatting filesystems and Configuring swap partition, that are required for the LFCS certification exam.
+
+### Partitioning Storage Devices ###
+
+Partitioning is a means to divide a single hard drive into one or more parts or “slices” called partitions. A partition is a section on a drive that is treated as an independent disk and which contains a single type of file system, whereas a partition table is an index that relates those physical sections of the hard drive to partition identifications.
+
+In Linux, the traditional tool for managing MBR partitions (up to ~2009) in IBM PC compatible systems is fdisk. For GPT partitions (~2010 and later) we will use gdisk. Each of these tools can be invoked by typing its name followed by a device name (such as /dev/sdb).
+
+#### Managing MBR Partitions with fdisk ####
+
+We will cover fdisk first.
+
+ # fdisk /dev/sdb
+
+A prompt appears asking for the next operation. If you are unsure, you can press the ‘m‘ key to display the help contents.
+
+
+
+fdisk Help Menu
+
+In the above image, the most frequently used options are highlighted. At any moment, you can press ‘p‘ to display the current partition table.
+
+
+
+Show Partition Table
+
+The Id column shows the partition type (or partition id) that has been assigned by fdisk to the partition. A partition type serves as an indicator of the file system, the partition contains or, in simple words, the way data will be accessed in that partition.
+
+Please note that a comprehensive study of each partition type is out of the scope of this tutorial – as this series is focused on the LFCS exam, which is performance-based.
+
+**Some of the options used by fdisk as follows:**
+
+You can list all the partition types that can be managed by fdisk by pressing the ‘l‘ option (lowercase l).
+
+Press ‘d‘ to delete an existing partition. If more than one partition is found in the drive, you will be asked which one should be deleted.
+
+Enter the corresponding number, and then press ‘w‘ (write modifications to partition table) to apply changes.
+
+In the following example, we will delete /dev/sdb2, and then print (p) the partition table to verify the modifications.
+
+
+
+fdisk Command Options
+
+Press ‘n‘ to create a new partition, then ‘p‘ to indicate it will be a primary partition. Finally, you can accept all the default values (in which case the partition will occupy all the available space), or specify a size as follows.
+
+
+
+Create New Partition
+
+If the partition Id that fdisk chose is not the right one for our setup, we can press ‘t‘ to change it.
+
+
+
+Change Partition Name
+
+When you’re done setting up the partitions, press ‘w‘ to commit the changes to disk.
+
+
+
+Save Partition Changes
+
+#### Managing GPT Partitions with gdisk ####
+
+In the following example, we will use /dev/sdb.
+
+ # gdisk /dev/sdb
+
+We must note that gdisk can be used either to create MBR or GPT partitions.
+
+
+
+Create GPT Partitions
+
+The advantage of using GPT partitioning is that we can create up to 128 partitions in the same disk whose size can be up to the order of petabytes, whereas the maximum size for MBR partitions is 2 TB.
+
+Note that most of the options in fdisk are the same in gdisk. For that reason, we will not go into detail about them, but here’s a screenshot of the process.
+
+
+
+gdisk Command Options
+
+### Formatting Filesystems ###
+
+Once we have created all the necessary partitions, we must create filesystems. To find out the list of filesystems supported in your system, run.
+
+ # ls /sbin/mk*
+
+
+
+Check Filesystems Type
+
+The type of filesystem that you should choose depends on your requirements. You should consider the pros and cons of each filesystem and its own set of features. Two important attributes to look for in a filesystem are.
+
+- Journaling support, which allows for faster data recovery in the event of a system crash.
+- Security Enhanced Linux (SELinux) support, as per the project wiki, “a security enhancement to Linux which allows users and administrators more control over access control”.
+
+In our next example, we will create an ext4 filesystem (supports both journaling and SELinux) labeled Tecmint on /dev/sdb1, using mkfs, whose basic syntax is.
+
+ # mkfs -t [filesystem] -L [label] device
+ or
+ # mkfs.[filesystem] -L [label] device
+
+
+
+Create ext4 Filesystems
+
+### Creating and Using Swap Partitions ###
+
+Swap partitions are necessary if we need our Linux system to have access to virtual memory, which is a section of the hard disk designated for use as memory, when the main system memory (RAM) is all in use. For that reason, a swap partition may not be needed on systems with enough RAM to meet all its requirements; however, even in that case it’s up to the system administrator to decide whether to use a swap partition or not.
+
+A simple rule of thumb to decide the size of a swap partition is as follows.
+
+Swap should usually equal 2x physical RAM for up to 2 GB of physical RAM, and then an additional 1x physical RAM for any amount above 2 GB, but never less than 32 MB.
+
+So, if:
+
+M = Amount of RAM in GB, and S = Amount of swap in GB, then
+
+ If M < 2
+ S = M *2
+ Else
+ S = M + 2
+
+Remember this is just a formula and that only you, as a sysadmin, have the final word as to the use and size of a swap partition.
+
+To configure a swap partition, create a regular partition as demonstrated earlier with the desired size. Next, we need to add the following entry to the /etc/fstab file (X can be either b or c).
+
+ /dev/sdX1 swap swap sw 0 0
+
+Finally, let’s format and enable the swap partition.
+
+ # mkswap /dev/sdX1
+ # swapon -v /dev/sdX1
+
+To display a snapshot of the swap partition(s).
+
+ # cat /proc/swaps
+
+To disable the swap partition.
+
+ # swapoff /dev/sdX1
+
+For the next example, we’ll use /dev/sdc1 (=512 MB, for a system with 256 MB of RAM) to set up a partition with fdisk that we will use as swap, following the steps detailed above. Note that we will specify a fixed size in this case.
+
+
+
+Create Swap Partition
+
+
+
+Enable Swap Partition
+
+### Conclusion ###
+
+Creating partitions (including swap) and formatting filesystems are crucial in your road to Sysadminship. I hope that the tips given in this article will guide you to achieve your goals. Feel free to add your own tips & ideas in the comments section below, for the benefit of the community.
+Reference Links
+
+- [About the LFCS][1]
+- [Why get a Linux Foundation Certification?][2]
+- [Register for the LFCS exam][3]
+
+--------------------------------------------------------------------------------
+
+via: http://www.tecmint.com/create-partitions-and-filesystems-in-linux/
+
+作者:[Gabriel Cánepa][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.tecmint.com/author/gacanepa/
+[1]:https://training.linuxfoundation.org/certification/LFCS
+[2]:https://training.linuxfoundation.org/certification/why-certify-with-us
+[3]:https://identity.linuxfoundation.org/user?destination=pid/1
\ No newline at end of file
diff --git a/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md b/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md
new file mode 100644
index 0000000000..1544a378bc
--- /dev/null
+++ b/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md
@@ -0,0 +1,232 @@
+Part 5 - LFCS: How to Mount/Unmount Local and Network (Samba & NFS) Filesystems in Linux
+================================================================================
+The Linux Foundation launched the LFCS certification (Linux Foundation Certified Sysadmin), a brand new program whose purpose is allowing individuals from all corners of the globe to get certified in basic to intermediate system administration tasks for Linux systems, which includes supporting running systems and services, along with overall monitoring and analysis, plus smart decision-making when it comes to raising issues to upper support teams.
+
+
+
+Linux Foundation Certified Sysadmin – Part 5
+
+The following video shows an introduction to The Linux Foundation Certification Program.
+
+注:youtube 视频
+
+
+This post is Part 5 of a 10-tutorial series, here in this part, we will explain How to mount/unmount local and network filesystems in linux, that are required for the LFCS certification exam.
+
+### Mounting Filesystems ###
+
+Once a disk has been partitioned, Linux needs some way to access the data on the partitions. Unlike DOS or Windows (where this is done by assigning a drive letter to each partition), Linux uses a unified directory tree where each partition is mounted at a mount point in that tree.
+
+A mount point is a directory that is used as a way to access the filesystem on the partition, and mounting the filesystem is the process of associating a certain filesystem (a partition, for example) with a specific directory in the directory tree.
+
+In other words, the first step in managing a storage device is attaching the device to the file system tree. This task can be accomplished on a one-time basis by using tools such as mount (and then unmounted with umount) or persistently across reboots by editing the /etc/fstab file.
+
+The mount command (without any options or arguments) shows the currently mounted filesystems.
+
+ # mount
+
+
+
+Check Mounted Filesystem
+
+In addition, mount is used to mount filesystems into the filesystem tree. Its standard syntax is as follows.
+
+ # mount -t type device dir -o options
+
+This command instructs the kernel to mount the filesystem found on device (a partition, for example, that has been formatted with a filesystem type) at the directory dir, using all options. In this form, mount does not look in /etc/fstab for instructions.
+
+If only a directory or device is specified, for example.
+
+ # mount /dir -o options
+ or
+ # mount device -o options
+
+mount tries to find a mount point and if it can’t find any, then searches for a device (both cases in the /etc/fstab file), and finally attempts to complete the mount operation (which usually succeeds, except for the case when either the directory or the device is already being used, or when the user invoking mount is not root).
+
+You will notice that every line in the output of mount has the following format.
+
+ device on directory type (options)
+
+For example,
+
+ /dev/mapper/debian-home on /home type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
+
+Reads:
+
+dev/mapper/debian-home is mounted on /home, which has been formatted as ext4, with the following options: rw,relatime,user_xattr,barrier=1,data=ordered
+
+**Mount Options**
+
+Most frequently used mount options include.
+
+- async: allows asynchronous I/O operations on the file system being mounted.
+- auto: marks the file system as enabled to be mounted automatically using mount -a. It is the opposite of noauto.
+- defaults: this option is an alias for async,auto,dev,exec,nouser,rw,suid. Note that multiple options must be separated by a comma without any spaces. If by accident you type a space between options, mount will interpret the subsequent text string as another argument.
+- loop: Mounts an image (an .iso file, for example) as a loop device. This option can be used to simulate the presence of the disk’s contents in an optical media reader.
+- noexec: prevents the execution of executable files on the particular filesystem. It is the opposite of exec.
+- nouser: prevents any users (other than root) to mount and unmount the filesystem. It is the opposite of user.
+- remount: mounts the filesystem again in case it is already mounted.
+- ro: mounts the filesystem as read only.
+- rw: mounts the file system with read and write capabilities.
+- relatime: makes access time to files be updated only if atime is earlier than mtime.
+- user_xattr: allow users to set and remote extended filesystem attributes.
+
+**Mounting a device with ro and noexec options**
+
+ # mount -t ext4 /dev/sdg1 /mnt -o ro,noexec
+
+In this case we can see that attempts to write a file to or to run a binary file located inside our mounting point fail with corresponding error messages.
+
+ # touch /mnt/myfile
+ # /mnt/bin/echo “Hi there”
+
+
+
+Mount Device Read Write
+
+**Mounting a device with default options**
+
+In the following scenario, we will try to write a file to our newly mounted device and run an executable file located within its filesystem tree using the same commands as in the previous example.
+
+ # mount -t ext4 /dev/sdg1 /mnt -o defaults
+
+
+
+Mount Device
+
+In this last case, it works perfectly.
+
+### Unmounting Devices ###
+
+Unmounting a device (with the umount command) means finish writing all the remaining “on transit” data so that it can be safely removed. Note that if you try to remove a mounted device without properly unmounting it first, you run the risk of damaging the device itself or cause data loss.
+
+That being said, in order to unmount a device, you must be “standing outside” its block device descriptor or mount point. In other words, your current working directory must be something else other than the mounting point. Otherwise, you will get a message saying that the device is busy.
+
+
+
+Unmount Device
+
+An easy way to “leave” the mounting point is typing the cd command which, in lack of arguments, will take us to our current user’s home directory, as shown above.
+
+### Mounting Common Networked Filesystems ###
+
+The two most frequently used network file systems are SMB (which stands for “Server Message Block”) and NFS (“Network File System”). Chances are you will use NFS if you need to set up a share for Unix-like clients only, and will opt for Samba if you need to share files with Windows-based clients and perhaps other Unix-like clients as well.
+
+Read Also
+
+- [Setup Samba Server in RHEL/CentOS and Fedora][1]
+- [Setting up NFS (Network File System) on RHEL/CentOS/Fedora and Debian/Ubuntu][2]
+
+The following steps assume that Samba and NFS shares have already been set up in the server with IP 192.168.0.10 (please note that setting up a NFS share is one of the competencies required for the LFCE exam, which we will cover after the present series).
+
+#### Mounting a Samba share on Linux ####
+
+Step 1: Install the samba-client samba-common and cifs-utils packages on Red Hat and Debian based distributions.
+
+ # yum update && yum install samba-client samba-common cifs-utils
+ # aptitude update && aptitude install samba-client samba-common cifs-utils
+
+Then run the following command to look for available samba shares in the server.
+
+ # smbclient -L 192.168.0.10
+
+And enter the password for the root account in the remote machine.
+
+
+
+Mount Samba Share
+
+In the above image we have highlighted the share that is ready for mounting on our local system. You will need a valid samba username and password on the remote server in order to access it.
+
+Step 2: When mounting a password-protected network share, it is not a good idea to write your credentials in the /etc/fstab file. Instead, you can store them in a hidden file somewhere with permissions set to 600, like so.
+
+ # mkdir /media/samba
+ # echo “username=samba_username” > /media/samba/.smbcredentials
+ # echo “password=samba_password” >> /media/samba/.smbcredentials
+ # chmod 600 /media/samba/.smbcredentials
+
+Step 3: Then add the following line to /etc/fstab file.
+
+ # //192.168.0.10/gacanepa /media/samba cifs credentials=/media/samba/.smbcredentials,defaults 0 0
+
+Step 4: You can now mount your samba share, either manually (mount //192.168.0.10/gacanepa) or by rebooting your machine so as to apply the changes made in /etc/fstab permanently.
+
+
+
+Mount Password Protect Samba Share
+
+#### Mounting a NFS share on Linux ####
+
+Step 1: Install the nfs-common and portmap packages on Red Hat and Debian based distributions.
+
+ # yum update && yum install nfs-utils nfs-utils-lib
+ # aptitude update && aptitude install nfs-common
+
+Step 2: Create a mounting point for the NFS share.
+
+ # mkdir /media/nfs
+
+Step 3: Add the following line to /etc/fstab file.
+
+192.168.0.10:/NFS-SHARE /media/nfs nfs defaults 0 0
+
+Step 4: You can now mount your nfs share, either manually (mount 192.168.0.10:/NFS-SHARE) or by rebooting your machine so as to apply the changes made in /etc/fstab permanently.
+
+
+
+Mount NFS Share
+
+### Mounting Filesystems Permanently ###
+
+As shown in the previous two examples, the /etc/fstab file controls how Linux provides access to disk partitions and removable media devices and consists of a series of lines that contain six fields each; the fields are separated by one or more spaces or tabs. A line that begins with a hash mark (#) is a comment and is ignored.
+
+Each line has the following format.
+
+
+
+Where:
+
+- : The first column specifies the mount device. Most distributions now specify partitions by their labels or UUIDs. This practice can help reduce problems if partition numbers change.
+- : The second column specifies the mount point.
+- : The file system type code is the same as the type code used to mount a filesystem with the mount command. A file system type code of auto lets the kernel auto-detect the filesystem type, which can be a convenient option for removable media devices. Note that this option may not be available for all filesystems out there.
+- : One (or more) mount option(s).
+- : You will most likely leave this to 0 (otherwise set it to 1) to disable the dump utility to backup the filesystem upon boot (The dump program was once a common backup tool, but it is much less popular today.)
+- : This column specifies whether the integrity of the filesystem should be checked at boot time with fsck. A 0 means that fsck should not check a filesystem. The higher the number, the lowest the priority. Thus, the root partition will most likely have a value of 1, while all others that should be checked should have a value of 2.
+
+**Mount Examples**
+
+1. To mount a partition with label TECMINT at boot time with rw and noexec attributes, you should add the following line in /etc/fstab file.
+
+ LABEL=TECMINT /mnt ext4 rw,noexec 0 0
+
+2. If you want the contents of a disk in your DVD drive be available at boot time.
+
+ /dev/sr0 /media/cdrom0 iso9660 ro,user,noauto 0 0
+
+Where /dev/sr0 is your DVD drive.
+
+### Summary ###
+
+You can rest assured that mounting and unmounting local and network filesystems from the command line will be part of your day-to-day responsibilities as sysadmin. You will also need to master /etc/fstab. I hope that you have found this article useful to help you with those tasks. Feel free to add your comments (or ask questions) below and to share this article through your network social profiles.
+Reference Links
+
+- [About the LFCS][3]
+- [Why get a Linux Foundation Certification?][4]
+- [Register for the LFCS exam][5]
+
+--------------------------------------------------------------------------------
+
+via: http://www.tecmint.com/mount-filesystem-in-linux/
+
+作者:[Gabriel Cánepa][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.tecmint.com/author/gacanepa/
+[1]:http://www.tecmint.com/setup-samba-server-using-tdbsam-backend-on-rhel-centos-6-3-5-8-and-fedora-17-12/
+[2]:http://www.tecmint.com/how-to-setup-nfs-server-in-linux/
+[3]:https://training.linuxfoundation.org/certification/LFCS
+[4]:https://training.linuxfoundation.org/certification/why-certify-with-us
+[5]:https://identity.linuxfoundation.org/user?destination=pid/1
\ No newline at end of file
diff --git a/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md b/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md
new file mode 100644
index 0000000000..fd23db110f
--- /dev/null
+++ b/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md
@@ -0,0 +1,276 @@
+Part 6 - LFCS: Assembling Partitions as RAID Devices – Creating & Managing System Backups
+================================================================================
+Recently, the Linux Foundation launched the LFCS (Linux Foundation Certified Sysadmin) certification, a shiny chance for system administrators everywhere to demonstrate, through a performance-based exam, that they are capable of performing overall operational support on Linux systems: system support, first-level diagnosing and monitoring, plus issue escalation, when required, to other support teams.
+
+
+
+Linux Foundation Certified Sysadmin – Part 6
+
+The following video provides an introduction to The Linux Foundation Certification Program.
+
+注:youtube 视频
+
+
+This post is Part 6 of a 10-tutorial series, here in this part, we will explain How to Assemble Partitions as RAID Devices – Creating & Managing System Backups, that are required for the LFCS certification exam.
+
+### Understanding RAID ###
+
+The technology known as Redundant Array of Independent Disks (RAID) is a storage solution that combines multiple hard disks into a single logical unit to provide redundancy of data and/or improve performance in read / write operations to disk.
+
+However, the actual fault-tolerance and disk I/O performance lean on how the hard disks are set up to form the disk array. Depending on the available devices and the fault tolerance / performance needs, different RAID levels are defined. You can refer to the RAID series here in Tecmint.com for a more detailed explanation on each RAID level.
+
+- RAID Guide: [What is RAID, Concepts of RAID and RAID Levels Explained][1]
+
+Our tool of choice for creating, assembling, managing, and monitoring our software RAIDs is called mdadm (short for multiple disks admin).
+
+ ---------------- Debian and Derivatives ----------------
+ # aptitude update && aptitude install mdadm
+
+----------
+
+ ---------------- Red Hat and CentOS based Systems ----------------
+ # yum update && yum install mdadm
+
+----------
+
+ ---------------- On openSUSE ----------------
+ # zypper refresh && zypper install mdadm #
+
+#### Assembling Partitions as RAID Devices ####
+
+The process of assembling existing partitions as RAID devices consists of the following steps.
+
+**1. Create the array using mdadm**
+
+If one of the partitions has been formatted previously, or has been a part of another RAID array previously, you will be prompted to confirm the creation of the new array. Assuming you have taken the necessary precautions to avoid losing important data that may have resided in them, you can safely type y and press Enter.
+
+ # mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sdc1
+
+
+
+Creating RAID Array
+
+**2. Check the array creation status**
+
+After creating RAID array, you an check the status of the array using the following commands.
+
+ # cat /proc/mdstat
+ or
+ # mdadm --detail /dev/md0 [More detailed summary]
+
+
+
+Check RAID Array Status
+
+**3. Format the RAID Device**
+
+Format the device with a filesystem as per your needs / requirements, as explained in [Part 4][2] of this series.
+
+**4. Monitor RAID Array Service**
+
+Instruct the monitoring service to “keep an eye” on the array. Add the output of mdadm –detail –scan to /etc/mdadm/mdadm.conf (Debian and derivatives) or /etc/mdadm.conf (CentOS / openSUSE), like so.
+
+ # mdadm --detail --scan
+
+
+
+Monitor RAID Array
+
+ # mdadm --assemble --scan [Assemble the array]
+
+To ensure the service starts on system boot, run the following commands as root.
+
+**Debian and Derivatives**
+
+Debian and derivatives, though it should start running on boot by default.
+
+ # update-rc.d mdadm defaults
+
+Edit the /etc/default/mdadm file and add the following line.
+
+ AUTOSTART=true
+
+**On CentOS and openSUSE (systemd-based)**
+
+ # systemctl start mdmonitor
+ # systemctl enable mdmonitor
+
+**On CentOS and openSUSE (SysVinit-based)**
+
+ # service mdmonitor start
+ # chkconfig mdmonitor on
+
+**5. Check RAID Disk Failure**
+
+In RAID levels that support redundancy, replace failed drives when needed. When a device in the disk array becomes faulty, a rebuild automatically starts only if there was a spare device added when we first created the array.
+
+
+
+Check RAID Faulty Disk
+
+Otherwise, we need to manually attach an extra physical drive to our system and run.
+
+ # mdadm /dev/md0 --add /dev/sdX1
+
+Where /dev/md0 is the array that experienced the issue and /dev/sdX1 is the new device.
+
+**6. Disassemble a working array**
+
+You may have to do this if you need to create a new array using the devices – (Optional Step).
+
+ # mdadm --stop /dev/md0 # Stop the array
+ # mdadm --remove /dev/md0 # Remove the RAID device
+ # mdadm --zero-superblock /dev/sdX1 # Overwrite the existing md superblock with zeroes
+
+**7. Set up mail alerts**
+
+You can configure a valid email address or system account to send alerts to (make sure you have this line in mdadm.conf). – (Optional Step)
+
+ MAILADDR root
+
+In this case, all alerts that the RAID monitoring daemon collects will be sent to the local root account’s mail box. One of such alerts looks like the following.
+
+**Note**: This event is related to the example in STEP 5, where a device was marked as faulty and the spare device was automatically built into the array by mdadm. Thus, we “ran out” of healthy spare devices and we got the alert.
+
+
+
+RAID Monitoring Alerts
+
+#### Understanding RAID Levels ####
+
+**RAID 0**
+
+The total array size is n times the size of the smallest partition, where n is the number of independent disks in the array (you will need at least two drives). Run the following command to assemble a RAID 0 array using partitions /dev/sdb1 and /dev/sdc1.
+
+ # mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sdc1
+
+Common uses: Setups that support real-time applications where performance is more important than fault-tolerance.
+
+**RAID 1 (aka Mirroring)**
+
+The total array size equals the size of the smallest partition (you will need at least two drives). Run the following command to assemble a RAID 1 array using partitions /dev/sdb1 and /dev/sdc1.
+
+ # mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
+
+Common uses: Installation of the operating system or important subdirectories, such as /home.
+
+**RAID 5 (aka drives with Parity)**
+
+The total array size will be (n – 1) times the size of the smallest partition. The “lost” space in (n-1) is used for parity (redundancy) calculation (you will need at least three drives).
+
+Note that you can specify a spare device (/dev/sde1 in this case) to replace a faulty part when an issue occurs. Run the following command to assemble a RAID 5 array using partitions /dev/sdb1, /dev/sdc1, /dev/sdd1, and /dev/sde1 as spare.
+
+ # mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1 --spare-devices=1 /dev/sde1
+
+Common uses: Web and file servers.
+
+**RAID 6 (aka drives with double Parity**
+
+The total array size will be (n*s)-2*s, where n is the number of independent disks in the array and s is the size of the smallest disk. Note that you can specify a spare device (/dev/sdf1 in this case) to replace a faulty part when an issue occurs.
+
+Run the following command to assemble a RAID 6 array using partitions /dev/sdb1, /dev/sdc1, /dev/sdd1, /dev/sde1, and /dev/sdf1 as spare.
+
+ # mdadm --create --verbose /dev/md0 --level=6 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde --spare-devices=1 /dev/sdf1
+
+Common uses: File and backup servers with large capacity and high availability requirements.
+
+**RAID 1+0 (aka stripe of mirrors)**
+
+The total array size is computed based on the formulas for RAID 0 and RAID 1, since RAID 1+0 is a combination of both. First, calculate the size of each mirror and then the size of the stripe.
+
+Note that you can specify a spare device (/dev/sdf1 in this case) to replace a faulty part when an issue occurs. Run the following command to assemble a RAID 1+0 array using partitions /dev/sdb1, /dev/sdc1, /dev/sdd1, /dev/sde1, and /dev/sdf1 as spare.
+
+ # mdadm --create --verbose /dev/md0 --level=10 --raid-devices=4 /dev/sd[b-e]1 --spare-devices=1 /dev/sdf1
+
+Common uses: Database and application servers that require fast I/O operations.
+
+#### Creating and Managing System Backups ####
+
+It never hurts to remember that RAID with all its bounties IS NOT A REPLACEMENT FOR BACKUPS! Write it 1000 times on the chalkboard if you need to, but make sure you keep that idea in mind at all times. Before we begin, we must note that there is no one-size-fits-all solution for system backups, but here are some things that you do need to take into account while planning a backup strategy.
+
+- What do you use your system for? (Desktop or server? If the latter case applies, what are the most critical services – whose configuration would be a real pain to lose?)
+- How often do you need to take backups of your system?
+- What is the data (e.g. files / directories / database dumps) that you want to backup? You may also want to consider if you really need to backup huge files (such as audio or video files).
+- Where (meaning physical place and media) will those backups be stored?
+
+**Backing Up Your Data**
+
+Method 1: Backup entire drives with dd command. You can either back up an entire hard disk or a partition by creating an exact image at any point in time. Note that this works best when the device is offline, meaning it’s not mounted and there are no processes accessing it for I/O operations.
+
+The downside of this backup approach is that the image will have the same size as the disk or partition, even when the actual data occupies a small percentage of it. For example, if you want to image a partition of 20 GB that is only 10% full, the image file will still be 20 GB in size. In other words, it’s not only the actual data that gets backed up, but the entire partition itself. You may consider using this method if you need exact backups of your devices.
+
+**Creating an image file out of an existing device**
+
+ # dd if=/dev/sda of=/system_images/sda.img
+ OR
+ --------------------- Alternatively, you can compress the image file ---------------------
+ # dd if=/dev/sda | gzip -c > /system_images/sda.img.gz
+
+**Restoring the backup from the image file**
+
+ # dd if=/system_images/sda.img of=/dev/sda
+ OR
+
+ --------------------- Depending on your choice while creating the image ---------------------
+ gzip -dc /system_images/sda.img.gz | dd of=/dev/sda
+
+Method 2: Backup certain files / directories with tar command – already covered in [Part 3][3] of this series. You may consider using this method if you need to keep copies of specific files and directories (configuration files, users’ home directories, and so on).
+
+Method 3: Synchronize files with rsync command. Rsync is a versatile remote (and local) file-copying tool. If you need to backup and synchronize your files to/from network drives, rsync is a go.
+
+Whether you’re synchronizing two local directories or local < — > remote directories mounted on the local filesystem, the basic syntax is the same.
+Synchronizing two local directories or local < — > remote directories mounted on the local filesystem
+
+ # rsync -av source_directory destination directory
+
+Where, -a recurse into subdirectories (if they exist), preserve symbolic links, timestamps, permissions, and original owner / group and -v verbose.
+
+
+
+rsync Synchronizing Files
+
+In addition, if you want to increase the security of the data transfer over the wire, you can use ssh over rsync.
+
+**Synchronizing local → remote directories over ssh**
+
+ # rsync -avzhe ssh backups root@remote_host:/remote_directory/
+
+This example will synchronize the backups directory on the local host with the contents of /root/remote_directory on the remote host.
+
+Where the -h option shows file sizes in human-readable format, and the -e flag is used to indicate a ssh connection.
+
+
+
+rsync Synchronize Remote Files
+
+Synchronizing remote → local directories over ssh.
+
+In this case, switch the source and destination directories from the previous example.
+
+ # rsync -avzhe ssh root@remote_host:/remote_directory/ backups
+
+Please note that these are only 3 examples (most frequent cases you’re likely to run into) of the use of rsync. For more examples and usages of rsync commands can be found at the following article.
+
+- Read Also: [10 rsync Commands to Sync Files in Linux][4]
+
+### Summary ###
+
+As a sysadmin, you need to ensure that your systems perform as good as possible. If you’re well prepared, and if the integrity of your data is well supported by a storage technology such as RAID and regular system backups, you’ll be safe.
+
+If you have questions, comments, or further ideas on how this article can be improved, feel free to speak out below. In addition, please consider sharing this series through your social network profiles.
+
+--------------------------------------------------------------------------------
+
+via: http://www.tecmint.com/creating-and-managing-raid-backups-in-linux/
+
+作者:[Gabriel Cánepa][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.tecmint.com/author/gacanepa/
+[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/
+[2]:http://www.tecmint.com/create-partitions-and-filesystems-in-linux/
+[3]:http://www.tecmint.com/compress-files-and-finding-files-in-linux/
+[4]:http://www.tecmint.com/rsync-local-remote-file-synchronization-commands/
\ No newline at end of file
diff --git a/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md b/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md
new file mode 100644
index 0000000000..abf09ee523
--- /dev/null
+++ b/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md
@@ -0,0 +1,367 @@
+Part 7 - LFCS: Managing System Startup Process and Services (SysVinit, Systemd and Upstart)
+================================================================================
+A couple of months ago, the Linux Foundation announced the LFCS (Linux Foundation Certified Sysadmin) certification, an exciting new program whose aim is allowing individuals from all ends of the world to get certified in performing basic to intermediate system administration tasks on Linux systems. This includes supporting already running systems and services, along with first-hand problem-finding and analysis, plus the ability to decide when to raise issues to engineering teams.
+
+
+
+Linux Foundation Certified Sysadmin – Part 7
+
+The following video describes an brief introduction to The Linux Foundation Certification Program.
+
+注:youtube 视频
+
+
+This post is Part 7 of a 10-tutorial series, here in this part, we will explain how to Manage Linux System Startup Process and Services, that are required for the LFCS certification exam.
+
+### Managing the Linux Startup Process ###
+
+The boot process of a Linux system consists of several phases, each represented by a different component. The following diagram briefly summarizes the boot process and shows all the main components involved.
+
+
+
+Linux Boot Process
+
+When you press the Power button on your machine, the firmware that is stored in a EEPROM chip in the motherboard initializes the POST (Power-On Self Test) to check on the state of the system’s hardware resources. When the POST is finished, the firmware then searches and loads the 1st stage boot loader, located in the MBR or in the EFI partition of the first available disk, and gives control to it.
+
+#### MBR Method ####
+
+The MBR is located in the first sector of the disk marked as bootable in the BIOS settings and is 512 bytes in size.
+
+- First 446 bytes: The bootloader contains both executable code and error message text.
+- Next 64 bytes: The Partition table contains a record for each of four partitions (primary or extended). Among other things, each record indicates the status (active / not active), size, and start / end sectors of each partition.
+- Last 2 bytes: The magic number serves as a validation check of the MBR.
+
+The following command performs a backup of the MBR (in this example, /dev/sda is the first hard disk). The resulting file, mbr.bkp can come in handy should the partition table become corrupt, for example, rendering the system unbootable.
+
+Of course, in order to use it later if the need arises, we will need to save it and store it somewhere else (like a USB drive, for example). That file will help us restore the MBR and will get us going once again if and only if we do not change the hard drive layout in the meanwhile.
+
+**Backup MBR**
+
+ # dd if=/dev/sda of=mbr.bkp bs=512 count=1
+
+
+
+Backup MBR in Linux
+
+**Restoring MBR**
+
+ # dd if=mbr.bkp of=/dev/sda bs=512 count=1
+
+
+
+Restore MBR in Linux
+
+#### EFI/UEFI Method ####
+
+For systems using the EFI/UEFI method, the UEFI firmware reads its settings to determine which UEFI application is to be launched and from where (i.e., in which disk and partition the EFI partition is located).
+
+Next, the 2nd stage boot loader (aka boot manager) is loaded and run. GRUB [GRand Unified Boot] is the most frequently used boot manager in Linux. One of two distinct versions can be found on most systems used today.
+
+- GRUB legacy configuration file: /boot/grub/menu.lst (older distributions, not supported by EFI/UEFI firmwares).
+- GRUB2 configuration file: most likely, /etc/default/grub.
+
+Although the objectives of the LFCS exam do not explicitly request knowledge about GRUB internals, if you’re brave and can afford to mess up your system (you may want to try it first on a virtual machine, just in case), you need to run.
+
+ # update-grub
+
+As root after modifying GRUB’s configuration in order to apply the changes.
+
+Basically, GRUB loads the default kernel and the initrd or initramfs image. In few words, initrd or initramfs help to perform the hardware detection, the kernel module loading and the device discovery necessary to get the real root filesystem mounted.
+
+Once the real root filesystem is up, the kernel executes the system and service manager (init or systemd, whose process identification or PID is always 1) to begin the normal user-space boot process in order to present a user interface.
+
+Both init and systemd are daemons (background processes) that manage other daemons, as the first service to start (during boot) and the last service to terminate (during shutdown).
+
+
+
+Systemd and Init
+
+### Starting Services (SysVinit) ###
+
+The concept of runlevels in Linux specifies different ways to use a system by controlling which services are running. In other words, a runlevel controls what tasks can be accomplished in the current execution state = runlevel (and which ones cannot).
+
+Traditionally, this startup process was performed based on conventions that originated with System V UNIX, with the system passing executing collections of scripts that start and stop services as the machine entered a specific runlevel (which, in other words, is a different mode of running the system).
+
+Within each runlevel, individual services can be set to run, or to be shut down if running. Latest versions of some major distributions are moving away from the System V standard in favour of a rather new service and system manager called systemd (which stands for system daemon), but usually support sysv commands for compatibility purposes. This means that you can run most of the well-known sysv init tools in a systemd-based distribution.
+
+- Read Also: [Why ‘systemd’ replaces ‘init’ in Linux][1]
+
+Besides starting the system process, init looks to the /etc/inittab file to decide what runlevel must be entered.
+
+注:表格
+
+
+
+
+
+
+
+ | Runlevel |
+ Description |
+
+
+ | 0 |
+ Halt the system. Runlevel 0 is a special transitional state used to shutdown the system quickly. |
+
+
+ | 1 |
+ Also aliased to s, or S, this runlevel is sometimes called maintenance mode. What services, if any, are started at this runlevel varies by distribution. It’s typically used for low-level system maintenance that may be impaired by normal system operation. |
+
+
+ | 2 |
+ Multiuser. On Debian systems and derivatives, this is the default runlevel, and includes -if available- a graphical login. On Red-Hat based systems, this is multiuser mode without networking. |
+
+
+ | 3 |
+ On Red-Hat based systems, this is the default multiuser mode, which runs everything except the graphical environment. This runlevel and levels 4 and 5 usually are not used on Debian-based systems. |
+
+
+ | 4 |
+ Typically unused by default and therefore available for customization. |
+
+
+ | 5 |
+ On Red-Hat based systems, full multiuser mode with GUI login. This runlevel is like level 3, but with a GUI login available. |
+
+
+ | 6 |
+ Reboot the system. |
+
+
+
+
+To switch between runlevels, we can simply issue a runlevel change using the init command: init N (where N is one of the runlevels listed above). Please note that this is not the recommended way of taking a running system to a different runlevel because it gives no warning to existing logged-in users (thus causing them to lose work and processes to terminate abnormally).
+
+Instead, the shutdown command should be used to restart the system (which first sends a warning message to all logged-in users and blocks any further logins; it then signals init to switch runlevels); however, the default runlevel (the one the system will boot to) must be edited in the /etc/inittab file first.
+
+For that reason, follow these steps to properly switch between runlevels, As root, look for the following line in /etc/inittab.
+
+ id:2:initdefault:
+
+and change the number 2 for the desired runlevel with your preferred text editor, such as vim (described in [How to use vi/vim editor in Linux – Part 2][2] of this series).
+
+Next, run as root.
+
+ # shutdown -r now
+
+That last command will restart the system, causing it to start in the specified runlevel during next boot, and will run the scripts located in the /etc/rc[runlevel].d directory in order to decide which services should be started and which ones should not. For example, for runlevel 2 in the following system.
+
+
+
+Change Runlevels in Linux
+
+#### Manage Services using chkconfig ####
+
+To enable or disable system services on boot, we will use [chkconfig command][3] in CentOS / openSUSE and sysv-rc-conf in Debian and derivatives. This tool can also show us what is the preconfigured state of a service for a particular runlevel.
+
+- Read Also: [How to Stop and Disable Unwanted Services in Linux][4]
+
+Listing the runlevel configuration for a service.
+
+ # chkconfig --list [service name]
+ # chkconfig --list postfix
+ # chkconfig --list mysqld
+
+
+
+Listing Runlevel Configuration
+
+In the above image we can see that postfix is set to start when the system enters runlevels 2 through 5, whereas mysqld will be running by default for runlevels 2 through 4. Now suppose that this is not the expected behaviour.
+
+For example, we need to turn on mysqld for runlevel 5 as well, and turn off postfix for runlevels 4 and 5. Here’s what we would do in each case (run the following commands as root).
+
+**Enabling a service for a particular runlevel**
+
+ # chkconfig --level [level(s)] service on
+ # chkconfig --level 5 mysqld on
+
+**Disabling a service for particular runlevels**
+
+ # chkconfig --level [level(s)] service off
+ # chkconfig --level 45 postfix off
+
+
+
+Enable Disable Services
+
+We will now perform similar tasks in a Debian-based system using sysv-rc-conf.
+
+#### Manage Services using sysv-rc-conf ####
+
+Configuring a service to start automatically on a specific runlevel and prevent it from starting on all others.
+
+1. Let’s use the following command to see what are the runlevels where mdadm is configured to start.
+
+ # ls -l /etc/rc[0-6].d | grep -E 'rc[0-6]|mdadm'
+
+
+
+Check Runlevel of Service Running
+
+2. We will use sysv-rc-conf to prevent mdadm from starting on all runlevels except 2. Just check or uncheck (with the space bar) as desired (you can move up, down, left, and right with the arrow keys).
+
+ # sysv-rc-conf
+
+
+
+SysV Runlevel Config
+
+Then press q to quit.
+
+3. We will restart the system and run again the command from STEP 1.
+
+ # ls -l /etc/rc[0-6].d | grep -E 'rc[0-6]|mdadm'
+
+
+
+Verify Service Runlevel
+
+In the above image we can see that mdadm is configured to start only on runlevel 2.
+
+### What About systemd? ###
+
+systemd is another service and system manager that is being adopted by several major Linux distributions. It aims to allow more processing to be done in parallel during system startup (unlike sysvinit, which always tends to be slower because it starts processes one at a time, checks whether one depends on another, and waits for daemons to launch so more services can start), and to serve as a dynamic resource management to a running system.
+
+Thus, services are started when needed (to avoid consuming system resources) instead of being launched without a solid reason during boot.
+
+Viewing the status of all the processes running on your system, both systemd native and SysV services, run the following command.
+
+ # systemctl
+
+
+
+Check All Running Processes
+
+The LOAD column shows whether the unit definition (refer to the UNIT column, which shows the service or anything maintained by systemd) was properly loaded, while the ACTIVE and SUB columns show the current status of such unit.
+Displaying information about the current status of a service
+
+When the ACTIVE column indicates that an unit’s status is other than active, we can check what happened using.
+
+ # systemctl status [unit]
+
+For example, in the image above, media-samba.mount is in failed state. Let’s run.
+
+ # systemctl status media-samba.mount
+
+
+
+Check Service Status
+
+We can see that media-samba.mount failed because the mount process on host dev1 was unable to find the network share at //192.168.0.10/gacanepa.
+
+### Starting or Stopping Services ###
+
+Once the network share //192.168.0.10/gacanepa becomes available, let’s try to start, then stop, and finally restart the unit media-samba.mount. After performing each action, let’s run systemctl status media-samba.mount to check on its status.
+
+ # systemctl start media-samba.mount
+ # systemctl status media-samba.mount
+ # systemctl stop media-samba.mount
+ # systemctl restart media-samba.mount
+ # systemctl status media-samba.mount
+
+
+
+Starting Stoping Services
+
+**Enabling or disabling a service to start during boot**
+
+Under systemd you can enable or disable a service when it boots.
+
+ # systemctl enable [service] # enable a service
+ # systemctl disable [service] # prevent a service from starting at boot
+
+The process of enabling or disabling a service to start automatically on boot consists in adding or removing symbolic links in the /etc/systemd/system/multi-user.target.wants directory.
+
+
+
+Enabling Disabling Services
+
+Alternatively, you can find out a service’s current status (enabled or disabled) with the command.
+
+ # systemctl is-enabled [service]
+
+For example,
+
+ # systemctl is-enabled postfix.service
+
+In addition, you can reboot or shutdown the system with.
+
+ # systemctl reboot
+ # systemctl shutdown
+
+### Upstart ###
+
+Upstart is an event-based replacement for the /sbin/init daemon and was born out of the need for starting services only, when they are needed (also supervising them while they are running), and handling events as they occur, thus surpassing the classic, dependency-based sysvinit system.
+
+It was originally developed for the Ubuntu distribution, but is used in Red Hat Enterprise Linux 6.0. Though it was intended to be suitable for deployment in all Linux distributions as a replacement for sysvinit, in time it was overshadowed by systemd. On February 14, 2014, Mark Shuttleworth (founder of Canonical Ltd.) announced that future releases of Ubuntu would use systemd as the default init daemon.
+
+Because the SysV startup script for system has been so common for so long, a large number of software packages include SysV startup scripts. To accommodate such packages, Upstart provides a compatibility mode: It runs SysV startup scripts in the usual locations (/etc/rc.d/rc?.d, /etc/init.d/rc?.d, /etc/rc?.d, or a similar location). Thus, if we install a package that doesn’t yet include an Upstart configuration script, it should still launch in the usual way.
+
+Furthermore, if we have installed utilities such as [chkconfig][5], you should be able to use them to manage your SysV-based services just as we would on sysvinit based systems.
+
+Upstart scripts also support starting or stopping services based on a wider variety of actions than do SysV startup scripts; for example, Upstart can launch a service whenever a particular hardware device is attached.
+
+A system that uses Upstart and its native scripts exclusively replaces the /etc/inittab file and the runlevel-specific SysV startup script directories with .conf scripts in the /etc/init directory.
+
+These *.conf scripts (also known as job definitions) generally consists of the following:
+
+- Description of the process.
+- Runlevels where the process should run or events that should trigger it.
+- Runlevels where process should be stopped or events that should stop it.
+- Options.
+- Command to launch the process.
+
+For example,
+
+ # My test service - Upstart script demo description "Here goes the description of 'My test service'" author "Dave Null "
+ # Stanzas
+
+ #
+ # Stanzas define when and how a process is started and stopped
+ # See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn
+ # When to start the service
+ start on runlevel [2345]
+ # When to stop the service
+ stop on runlevel [016]
+ # Automatically restart process in case of crash
+ respawn
+ # Specify working directory
+ chdir /home/dave/myfiles
+ # Specify the process/command (add arguments if needed) to run
+ exec bash backup.sh arg1 arg2
+
+To apply changes, you will need to tell upstart to reload its configuration.
+
+ # initctl reload-configuration
+
+Then start your job by typing the following command.
+
+ $ sudo start yourjobname
+
+Where yourjobname is the name of the job that was added earlier with the yourjobname.conf script.
+
+A more complete and detailed reference guide for Upstart is available in the project’s web site under the menu “[Cookbook][6]”.
+
+### Summary ###
+
+A knowledge of the Linux boot process is necessary to help you with troubleshooting tasks as well as with adapting the computer’s performance and running services to your needs.
+
+In this article we have analyzed what happens from the moment when you press the Power switch to turn on the machine until you get a fully operational user interface. I hope you have learned reading it as much as I did while putting it together. Feel free to leave your comments or questions below. We always look forward to hearing from our readers!
+
+--------------------------------------------------------------------------------
+
+via: http://www.tecmint.com/linux-boot-process-and-manage-services/
+
+作者:[Gabriel Cánepa][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.tecmint.com/author/gacanepa/
+[1]:http://www.tecmint.com/systemd-replaces-init-in-linux/
+[2]:http://www.tecmint.com/vi-editor-usage/
+[3]:http://www.tecmint.com/chkconfig-command-examples/
+[4]:http://www.tecmint.com/remove-unwanted-services-from-linux/
+[5]:http://www.tecmint.com/chkconfig-command-examples/
+[6]:http://upstart.ubuntu.com/cookbook/
\ No newline at end of file
diff --git a/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md b/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md
new file mode 100644
index 0000000000..2cec4de4ae
--- /dev/null
+++ b/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md
@@ -0,0 +1,330 @@
+Part 8 - LFCS: Managing Users & Groups, File Permissions & Attributes and Enabling sudo Access on Accounts
+================================================================================
+Last August, the Linux Foundation started the LFCS certification (Linux Foundation Certified Sysadmin), a brand new program whose purpose is to allow individuals everywhere and anywhere take an exam in order to get certified in basic to intermediate operational support for Linux systems, which includes supporting running systems and services, along with overall monitoring and analysis, plus intelligent decision-making to be able to decide when it’s necessary to escalate issues to higher level support teams.
+
+
+
+Linux Foundation Certified Sysadmin – Part 8
+
+Please have a quick look at the following video that describes an introduction to the Linux Foundation Certification Program.
+
+注:youtube视频
+
+
+This article is Part 8 of a 10-tutorial long series, here in this section, we will guide you on how to manage users and groups permissions in Linux system, that are required for the LFCS certification exam.
+
+Since Linux is a multi-user operating system (in that it allows multiple users on different computers or terminals to access a single system), you will need to know how to perform effective user management: how to add, edit, suspend, or delete user accounts, along with granting them the necessary permissions to do their assigned tasks.
+
+### Adding User Accounts ###
+
+To add a new user account, you can run either of the following two commands as root.
+
+ # adduser [new_account]
+ # useradd [new_account]
+
+When a new user account is added to the system, the following operations are performed.
+
+1. His/her home directory is created (/home/username by default).
+
+2. The following hidden files are copied into the user’s home directory, and will be used to provide environment variables for his/her user session.
+
+ .bash_logout
+ .bash_profile
+ .bashrc
+
+3. A mail spool is created for the user at /var/spool/mail/username.
+
+4. A group is created and given the same name as the new user account.
+
+**Understanding /etc/passwd**
+
+The full account information is stored in the /etc/passwd file. This file contains a record per system user account and has the following format (fields are delimited by a colon).
+
+ [username]:[x]:[UID]:[GID]:[Comment]:[Home directory]:[Default shell]
+
+- Fields [username] and [Comment] are self explanatory.
+- The x in the second field indicates that the account is protected by a shadowed password (in /etc/shadow), which is needed to logon as [username].
+- The [UID] and [GID] fields are integers that represent the User IDentification and the primary Group IDentification to which [username] belongs, respectively.
+- The [Home directory] indicates the absolute path to [username]’s home directory, and
+- The [Default shell] is the shell that will be made available to this user when he or she logins the system.
+
+**Understanding /etc/group**
+
+Group information is stored in the /etc/group file. Each record has the following format.
+
+ [Group name]:[Group password]:[GID]:[Group members]
+
+- [Group name] is the name of group.
+- An x in [Group password] indicates group passwords are not being used.
+- [GID]: same as in /etc/passwd.
+- [Group members]: a comma separated list of users who are members of [Group name].
+
+
+
+Add User Accounts
+
+After adding an account, you can edit the following information (to name a few fields) using the usermod command, whose basic syntax of usermod is as follows.
+
+ # usermod [options] [username]
+
+**Setting the expiry date for an account**
+
+Use the –expiredate flag followed by a date in YYYY-MM-DD format.
+
+ # usermod --expiredate 2014-10-30 tecmint
+
+**Adding the user to supplementary groups**
+
+Use the combined -aG, or –append –groups options, followed by a comma separated list of groups.
+
+ # usermod --append --groups root,users tecmint
+
+**Changing the default location of the user’s home directory**
+
+Use the -d, or –home options, followed by the absolute path to the new home directory.
+
+ # usermod --home /tmp tecmint
+
+**Changing the shell the user will use by default**
+
+Use –shell, followed by the path to the new shell.
+
+ # usermod --shell /bin/sh tecmint
+
+**Displaying the groups an user is a member of**
+
+ # groups tecmint
+ # id tecmint
+
+Now let’s execute all the above commands in one go.
+
+ # usermod --expiredate 2014-10-30 --append --groups root,users --home /tmp --shell /bin/sh tecmint
+
+
+
+usermod Command Examples
+
+Read Also:
+
+- [15 useradd Command Examples in Linux][1]
+- [15 usermod Command Examples in Linux][2]
+
+For existing accounts, we can also do the following.
+
+**Disabling account by locking password**
+
+Use the -L (uppercase L) or the –lock option to lock a user’s password.
+
+ # usermod --lock tecmint
+
+**Unlocking user password**
+
+Use the –u or the –unlock option to unlock a user’s password that was previously blocked.
+
+ # usermod --unlock tecmint
+
+
+
+Lock User Accounts
+
+**Creating a new group for read and write access to files that need to be accessed by several users**
+
+Run the following series of commands to achieve the goal.
+
+ # groupadd common_group # Add a new group
+ # chown :common_group common.txt # Change the group owner of common.txt to common_group
+ # usermod -aG common_group user1 # Add user1 to common_group
+ # usermod -aG common_group user2 # Add user2 to common_group
+ # usermod -aG common_group user3 # Add user3 to common_group
+
+**Deleting a group**
+
+You can delete a group with the following command.
+
+ # groupdel [group_name]
+
+If there are files owned by group_name, they will not be deleted, but the group owner will be set to the GID of the group that was deleted.
+
+### Linux File Permissions ###
+
+Besides the basic read, write, and execute permissions that we discussed in [Setting File Attributes – Part 3][3] of this series, there are other less used (but not less important) permission settings, sometimes referred to as “special permissions”.
+
+Like the basic permissions discussed earlier, they are set using an octal file or through a letter (symbolic notation) that indicates the type of permission.
+Deleting user accounts
+
+You can delete an account (along with its home directory, if it’s owned by the user, and all the files residing therein, and also the mail spool) using the userdel command with the –remove option.
+
+ # userdel --remove [username]
+
+#### Group Management ####
+
+Every time a new user account is added to the system, a group with the same name is created with the username as its only member. Other users can be added to the group later. One of the purposes of groups is to implement a simple access control to files and other system resources by setting the right permissions on those resources.
+
+For example, suppose you have the following users.
+
+- user1 (primary group: user1)
+- user2 (primary group: user2)
+- user3 (primary group: user3)
+
+All of them need read and write access to a file called common.txt located somewhere on your local system, or maybe on a network share that user1 has created. You may be tempted to do something like,
+
+ # chmod 660 common.txt
+ OR
+ # chmod u=rw,g=rw,o= common.txt [notice the space between the last equal sign and the file name]
+
+However, this will only provide read and write access to the owner of the file and to those users who are members of the group owner of the file (user1 in this case). Again, you may be tempted to add user2 and user3 to group user1, but that will also give them access to the rest of the files owned by user user1 and group user1.
+
+This is where groups come in handy, and here’s what you should do in a case like this.
+
+**Understanding Setuid**
+
+When the setuid permission is applied to an executable file, an user running the program inherits the effective privileges of the program’s owner. Since this approach can reasonably raise security concerns, the number of files with setuid permission must be kept to a minimum. You will likely find programs with this permission set when a system user needs to access a file owned by root.
+
+Summing up, it isn’t just that the user can execute the binary file, but also that he can do so with root’s privileges. For example, let’s check the permissions of /bin/passwd. This binary is used to change the password of an account, and modifies the /etc/shadow file. The superuser can change anyone’s password, but all other users should only be able to change their own.
+
+
+
+passwd Command Examples
+
+Thus, any user should have permission to run /bin/passwd, but only root will be able to specify an account. Other users can only change their corresponding passwords.
+
+
+
+Change User Password
+
+**Understanding Setgid**
+
+When the setgid bit is set, the effective GID of the real user becomes that of the group owner. Thus, any user can access a file under the privileges granted to the group owner of such file. In addition, when the setgid bit is set on a directory, newly created files inherit the same group as the directory, and newly created subdirectories will also inherit the setgid bit of the parent directory. You will most likely use this approach whenever members of a certain group need access to all the files in a directory, regardless of the file owner’s primary group.
+
+ # chmod g+s [filename]
+
+To set the setgid in octal form, prepend the number 2 to the current (or desired) basic permissions.
+
+ # chmod 2755 [directory]
+
+**Setting the SETGID in a directory**
+
+
+
+Add Setgid to Directory
+
+**Understanding Sticky Bit**
+
+When the “sticky bit” is set on files, Linux just ignores it, whereas for directories it has the effect of preventing users from deleting or even renaming the files it contains unless the user owns the directory, the file, or is root.
+
+# chmod o+t [directory]
+
+To set the sticky bit in octal form, prepend the number 1 to the current (or desired) basic permissions.
+
+# chmod 1755 [directory]
+
+Without the sticky bit, anyone able to write to the directory can delete or rename files. For that reason, the sticky bit is commonly found on directories, such as /tmp, that are world-writable.
+
+
+
+Add Stickybit to Directory
+
+### Special Linux File Attributes ###
+
+There are other attributes that enable further limits on the operations that are allowed on files. For example, prevent the file from being renamed, moved, deleted, or even modified. They are set with the [chattr command][4] and can be viewed using the lsattr tool, as follows.
+
+ # chattr +i file1
+ # chattr +a file2
+
+After executing those two commands, file1 will be immutable (which means it cannot be moved, renamed, modified or deleted) whereas file2 will enter append-only mode (can only be open in append mode for writing).
+
+
+
+Chattr Command to Protect Files
+
+### Accessing the root Account and Using sudo ###
+
+One of the ways users can gain access to the root account is by typing.
+
+ $ su
+
+and then entering root’s password.
+
+If authentication succeeds, you will be logged on as root with the current working directory as the same as you were before. If you want to be placed in root’s home directory instead, run.
+
+ $ su -
+
+and then enter root’s password.
+
+
+
+Enable Sudo Access on Users
+
+The above procedure requires that a normal user knows root’s password, which poses a serious security risk. For that reason, the sysadmin can configure the sudo command to allow an ordinary user to execute commands as a different user (usually the superuser) in a very controlled and limited way. Thus, restrictions can be set on a user so as to enable him to run one or more specific privileged commands and no others.
+
+- Read Also: [Difference Between su and sudo User][5]
+
+To authenticate using sudo, the user uses his/her own password. After entering the command, we will be prompted for our password (not the superuser’s) and if the authentication succeeds (and if the user has been granted privileges to run the command), the specified command is carried out.
+
+To grant access to sudo, the system administrator must edit the /etc/sudoers file. It is recommended that this file is edited using the visudo command instead of opening it directly with a text editor.
+
+ # visudo
+
+This opens the /etc/sudoers file using vim (you can follow the instructions given in [Install and Use vim as Editor – Part 2][6] of this series to edit the file).
+
+These are the most relevant lines.
+
+ Defaults secure_path="/usr/sbin:/usr/bin:/sbin"
+ root ALL=(ALL) ALL
+ tecmint ALL=/bin/yum update
+ gacanepa ALL=NOPASSWD:/bin/updatedb
+ %admin ALL=(ALL) ALL
+
+Let’s take a closer look at them.
+
+ Defaults secure_path="/usr/sbin:/usr/bin:/sbin:/usr/local/bin"
+
+This line lets you specify the directories that will be used for sudo, and is used to prevent using user-specific directories, which can harm the system.
+
+The next lines are used to specify permissions.
+
+ root ALL=(ALL) ALL
+
+- The first ALL keyword indicates that this rule applies to all hosts.
+- The second ALL indicates that the user in the first column can run commands with the privileges of any user.
+- The third ALL means any command can be run.
+
+ tecmint ALL=/bin/yum update
+
+If no user is specified after the = sign, sudo assumes the root user. In this case, user tecmint will be able to run yum update as root.
+
+ gacanepa ALL=NOPASSWD:/bin/updatedb
+
+The NOPASSWD directive allows user gacanepa to run /bin/updatedb without needing to enter his password.
+
+ %admin ALL=(ALL) ALL
+
+The % sign indicates that this line applies to a group called “admin”. The meaning of the rest of the line is identical to that of an regular user. This means that members of the group “admin” can run all commands as any user on all hosts.
+
+To see what privileges are granted to you by sudo, use the “-l” option to list them.
+
+
+
+Sudo Access Rules
+
+### Summary ###
+
+Effective user and file management skills are essential tools for any system administrator. In this article we have covered the basics and hope you can use it as a good starting to point to build upon. Feel free to leave your comments or questions below, and we’ll respond quickly.
+
+--------------------------------------------------------------------------------
+
+via: http://www.tecmint.com/manage-users-and-groups-in-linux/
+
+作者:[Gabriel Cánepa][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.tecmint.com/author/gacanepa/
+[1]:http://www.tecmint.com/add-users-in-linux/
+[2]:http://www.tecmint.com/usermod-command-examples/
+[3]:http://www.tecmint.com/compress-files-and-finding-files-in-linux/
+[4]:http://www.tecmint.com/chattr-command-examples/
+[5]:http://www.tecmint.com/su-vs-sudo-and-how-to-configure-sudo-in-linux/
+[6]:http://www.tecmint.com/vi-editor-usage/
\ No newline at end of file
diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md
new file mode 100644
index 0000000000..c145320e5a
--- /dev/null
+++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md
@@ -0,0 +1,34 @@
+(translating by runningwater)
+Grep Count Lines If a String / Word Matches
+================================================================================
+How do I count lines if given word or string matches for each input file under Linux or UNIX operating systems?
+
+You need to pass the -c or --count option to suppress normal output. It will display a count of matching lines for each input file:
+
+ $ grep -c vivek /etc/passwd
+
+OR
+
+ $ grep -w -c vivek /etc/passwd
+
+Sample outputs:
+
+ 1
+
+However, with the -v or --invert-match option it will count non-matching lines, enter:
+
+ $ grep -c vivek /etc/passwd
+
+Sample outputs:
+
+ 45
+
+--------------------------------------------------------------------------------
+
+via: http://www.cyberciti.biz/faq/grep-count-lines-if-a-string-word-matches/
+
+作者:Vivek Gite
+译者:[runningwater](https://github.com/runningwater)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
\ No newline at end of file
diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md
new file mode 100644
index 0000000000..3b683746eb
--- /dev/null
+++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md
@@ -0,0 +1,68 @@
+(translating by runningwater)
+Grep From Files and Display the File Name
+================================================================================
+How do I grep from a number of files and display the file name only?
+
+When there is more than one file to search it will display file name by default:
+
+ grep "word" filename
+ grep root /etc/*
+
+Sample outputs:
+
+ /etc/bash.bashrc: See "man sudo_root" for details.
+ /etc/crontab:17 * * * * root cd / && run-parts --report /etc/cron.hourly
+ /etc/crontab:25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
+ /etc/crontab:47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
+ /etc/crontab:52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
+ /etc/group:root:x:0:
+ grep: /etc/gshadow: Permission denied
+ /etc/logrotate.conf: create 0664 root utmp
+ /etc/logrotate.conf: create 0660 root utmp
+
+The first name is file name (e.g., /etc/crontab, /etc/group). The -l option will only print filename if th
+
+ grep -l "string" filename
+ grep -l root /etc/*
+
+Sample outputs:
+
+ /etc/aliases
+ /etc/arpwatch.conf
+ grep: /etc/at.deny: Permission denied
+ /etc/bash.bashrc
+ /etc/bash_completion
+ /etc/ca-certificates.conf
+ /etc/crontab
+ /etc/group
+
+You can suppress normal output; instead print the name of each input file from **which no output would normally have been** printed:
+
+ grep -L "word" filename
+ grep -L root /etc/*
+
+Sample outputs:
+
+ /etc/apm
+ /etc/apparmor
+ /etc/apparmor.d
+ /etc/apport
+ /etc/apt
+ /etc/avahi
+ /etc/bash_completion.d
+ /etc/bindresvport.blacklist
+ /etc/blkid.conf
+ /etc/bluetooth
+ /etc/bogofilter.cf
+ /etc/bonobo-activation
+ /etc/brlapi.key
+
+--------------------------------------------------------------------------------
+
+via: http://www.cyberciti.biz/faq/grep-from-files-and-display-the-file-name/
+
+作者:Vivek Gite
+译者:[runningwater](https://github.com/runningwater)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
\ No newline at end of file
diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md
new file mode 100644
index 0000000000..3d5943fc07
--- /dev/null
+++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md
@@ -0,0 +1,66 @@
+How To Find Files by Content Under UNIX
+================================================================================
+I had written lots of code in C for my school work and saved it as source code under /home/user/c/*.c and *.h. How do I find files by content such as string or words (function name such as main() under UNIX shell prompt?
+
+You need to use the following tools:
+
+[a] **grep command** : print lines matching a pattern.
+
+[b] **find command**: search for files in a directory hierarchy.
+
+### [grep Command To Find Files By][1] Content ###
+
+Type the command as follows:
+
+ grep 'string' *.txt
+ grep 'main(' *.c
+ grep '#include' *.c
+ grep 'getChar*' *.c
+ grep -i 'ultra' *.conf
+ grep -iR 'ultra' *.conf
+
+Where
+
+- **-i** : Ignore case distinctions in both the PATTERN (match valid, VALID, ValID string) and the input files (math file.c FILE.c FILE.C filename).
+- **-R** : Read all files under each directory, recursively
+
+### Highlighting searched patterns ###
+
+You can highlight patterns easily while searching large number of files:
+
+ $ grep --color=auto -iR 'getChar();' *.c
+
+### Displaying file names and line number for searched patterns ###
+
+You may also need to display filenames and numbers:
+
+ $ grep --color=auto -iRnH 'getChar();' *.c
+
+Where,
+
+- **-n** : Prefix each line of output with the 1-based line number within its input file.
+- **-H** Print the file name for each match. This is the default when there is more than one file to search.
+
+ $grep --color=auto -nH 'DIR' *
+
+Sample output:
+
+
+
+Fig.01: grep command displaying searched pattern
+
+You can also use find command:
+
+ $ find . -name "*.c" -print | xargs grep "main("
+
+--------------------------------------------------------------------------------
+
+via: http://www.cyberciti.biz/faq/unix-linux-finding-files-by-content/
+
+作者:Vivek Gite
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[1]:http://www.cyberciti.biz/faq/howto-search-find-file-for-text-string/
\ No newline at end of file
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md b/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md
deleted file mode 100644
index 0155034c35..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md
+++ /dev/null
@@ -1,315 +0,0 @@
-[translating by xiqingongzi]
-
-RHCSA Series: Reviewing Essential Commands & System Documentation – Part 1
-================================================================================
-RHCSA (Red Hat Certified System Administrator) is a certification exam from Red Hat company, which provides an open source operating system and software to the enterprise community, It also provides support, training and consulting services for the organizations.
-
-
-
-RHCSA Exam Preparation Guide
-
-RHCSA exam is the certification obtained from Red Hat Inc, after passing the exam (codename EX200). RHCSA exam is an upgrade to the RHCT (Red Hat Certified Technician) exam, and this upgrade is compulsory as the Red Hat Enterprise Linux was upgraded. The main variation between RHCT and RHCSA is that RHCT exam based on RHEL 5, whereas RHCSA certification is based on RHEL 6 and 7, the courseware of these two certifications are also vary to a certain level.
-
-This Red Hat Certified System Administrator (RHCSA) is essential to perform the following core system administration tasks needed in Red Hat Enterprise Linux environments:
-
-- Understand and use necessary tools for handling files, directories, command-environments line, and system-wide / packages documentation.
-- Operate running systems, even in different run levels, identify and control processes, start and stop virtual machines.
-- Set up local storage using partitions and logical volumes.
-- Create and configure local and network file systems and its attributes (permissions, encryption, and ACLs).
-- Setup, configure, and control systems, including installing, updating and removing software.
-- Manage system users and groups, along with use of a centralized LDAP directory for authentication.
-- Ensure system security, including basic firewall and SELinux configuration.
-
-To view fees and register for an exam in your country, check the [RHCSA Certification page][1].
-
-To view fees and register for an exam in your country, check the RHCSA Certification page.
-
-In this 15-article RHCSA series, titled Preparation for the RHCSA (Red Hat Certified System Administrator) exam, we will going to cover the following topics on the latest releases of Red Hat Enterprise Linux 7.
-
-- Part 1: Reviewing Essential Commands & System Documentation
-- Part 2: How to Perform File and Directory Management in RHEL 7
-- Part 3: How to Manage Users and Groups in RHEL 7
-- Part 4: Editing Text Files with Nano and Vim / Analyzing text with grep and regexps
-- Part 5: Process Management in RHEL 7: boot, shutdown, and everything in between
-- Part 6: Using ‘Parted’ and ‘SSM’ to Configure and Encrypt System Storage
-- Part 7: Using ACLs (Access Control Lists) and Mounting Samba / NFS Shares
-- Part 8: Securing SSH, Setting Hostname and Enabling Network Services
-- Part 9: Installing, Configuring and Securing a Web and FTP Server
-- Part 10: Yum Package Management, Automating Tasks with Cron and Monitoring System Logs
-- Part 11: Firewall Essentials and Control Network Traffic Using FirewallD and Iptables
-- Part 12: Automate RHEL 7 Installations Using ‘Kickstart’
-- Part 13: RHEL 7: What is SELinux and how it works?
-- Part 14: Use LDAP-based authentication in RHEL 7
-- Part 15: Virtualization in RHEL 7: KVM and Virtual machine management
-
-In this Part 1 of the RHCSA series, we will explain how to enter and execute commands with the correct syntax in a shell prompt or terminal, and explained how to find, inspect, and use system documentation.
-
-
-
-RHCSA: Reviewing Essential Linux Commands – Part 1
-
-#### Prerequisites: ####
-
-At least a slight degree of familiarity with basic Linux commands such as:
-
-- [cd command][2] (change directory)
-- [ls command][3] (list directory)
-- [cp command][4] (copy files)
-- [mv command][5] (move or rename files)
-- [touch command][6] (create empty files or update the timestamp of existing ones)
-- rm command (delete files)
-- mkdir command (make directory)
-
-The correct usage of some of them are anyway exemplified in this article, and you can find further information about each of them using the suggested methods in this article.
-
-Though not strictly required to start, as we will be discussing general commands and methods for information search in a Linux system, you should try to install RHEL 7 as explained in the following article. It will make things easier down the road.
-
-- [Red Hat Enterprise Linux (RHEL) 7 Installation Guide][7]
-
-### Interacting with the Linux Shell ###
-
-If we log into a Linux box using a text-mode login screen, chances are we will be dropped directly into our default shell. On the other hand, if we login using a graphical user interface (GUI), we will have to open a shell manually by starting a terminal. Either way, we will be presented with the user prompt and we can start typing and executing commands (a command is executed by pressing the Enter key after we have typed it).
-
-Commands are composed of two parts:
-
-- the name of the command itself, and
-- arguments
-
-Certain arguments, called options (usually preceded by a hyphen), alter the behavior of the command in a particular way while other arguments specify the objects upon which the command operates.
-
-The type command can help us identify whether another certain command is built into the shell or if it is provided by a separate package. The need to make this distinction lies in the place where we will find more information about the command. For shell built-ins we need to look in the shell’s man page, whereas for other binaries we can refer to its own man page.
-
-
-
-Check Shell built in Commands
-
-In the examples above, cd and type are shell built-ins, while top and less are binaries external to the shell itself (in this case, the location of the command executable is returned by type).
-
-Other well-known shell built-ins include:
-
-- [echo command][8]: Displays strings of text.
-- [pwd command][9]: Prints the current working directory.
-
-
-
-More Built in Shell Commands
-
-**exec command**
-
-Runs an external program that we specify. Note that in most cases, this is better accomplished by just typing the name of the program we want to run, but the exec command has one special feature: rather than create a new process that runs alongside the shell, the new process replaces the shell, as can verified by subsequent.
-
- # ps -ef | grep [original PID of the shell process]
-
-When the new process terminates, the shell terminates with it. Run exec top and then hit the q key to quit top. You will notice that the shell session ends when you do, as shown in the following screencast:
-
-注:youtube视频
-
-
-**export command**
-
-Exports variables to the environment of subsequently executed commands.
-
-**history Command**
-
-Displays the command history list with line numbers. A command in the history list can be repeated by typing the command number preceded by an exclamation sign. If we need to edit a command in history list before executing it, we can press Ctrl + r and start typing the first letters associated with the command. When we see the command completed automatically, we can edit it as per our current need:
-
-注:youtube视频
-
-
-This list of commands is kept in our home directory in a file called .bash_history. The history facility is a useful resource for reducing the amount of typing, especially when combined with command line editing. By default, bash stores the last 500 commands you have entered, but this limit can be extended by using the HISTSIZE environment variable:
-
-
-
-Linux history Command
-
-But this change as performed above, will not be persistent on our next boot. In order to preserve the change in the HISTSIZE variable, we need to edit the .bashrc file by hand:
-
- # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
- HISTSIZE=1000
-
-**Important**: Keep in mind that these changes will not take effect until we restart our shell session.
-
-**alias command**
-
-With no arguments or with the -p option prints the list of aliases in the form alias name=value on standard output. When arguments are provided, an alias is defined for each name whose value is given.
-
-With alias, we can make up our own commands or modify existing ones by including desired options. For example, suppose we want to alias ls to ls –color=auto so that the output will display regular files, directories, symlinks, and so on, in different colors:
-
- # alias ls='ls --color=auto'
-
-
-
-Linux alias Command
-
-**Note**: That you can assign any name to your “new command” and enclose as many commands as desired between single quotes, but in that case you need to separate them by semicolons, as follows:
-
- # alias myNewCommand='cd /usr/bin; ls; cd; clear'
-
-**exit command**
-
-The exit and logout commands both terminate the shell. The exit command terminates any shell, but the logout command terminates only login shells—that is, those that are launched automatically when you initiate a text-mode login.
-
-If we are ever in doubt as to what a program does, we can refer to its man page, which can be invoked using the man command. In addition, there are also man pages for important files (inittab, fstab, hosts, to name a few), library functions, shells, devices, and other features.
-
-#### Examples: ####
-
-- man uname (print system information, such as kernel name, processor, operating system type, architecture, and so on).
-- man inittab (init daemon configuration).
-
-Another important source of information is provided by the info command, which is used to read info documents. These documents often provide more information than the man page. It is invoked by using the info keyword followed by a command name, such as:
-
- # info ls
- # info cut
-
-In addition, the /usr/share/doc directory contains several subdirectories where further documentation can be found. They either contain plain-text files or other friendly formats.
-
-Make sure you make it a habit to use these three methods to look up information for commands. Pay special and careful attention to the syntax of each of them, which is explained in detail in the documentation.
-
-**Converting Tabs into Spaces with expand Command**
-
-Sometimes text files contain tabs but programs that need to process the files don’t cope well with tabs. Or maybe we just want to convert tabs into spaces. That’s where the expand tool (provided by the GNU coreutils package) comes in handy.
-
-For example, given the file NumbersList.txt, let’s run expand against it, changing tabs to one space, and display on standard output.
-
- # expand --tabs=1 NumbersList.txt
-
-
-
-Linux expand Command
-
-The unexpand command performs the reverse operation (converts spaces into tabs).
-
-**Display the first lines of a file with head and the last lines with tail**
-
-By default, the head command followed by a filename, will display the first 10 lines of the said file. This behavior can be changed using the -n option and specifying a certain number of lines.
-
- # head -n3 /etc/passwd
- # tail -n3 /etc/passwd
-
-
-
-Linux head and tail Command
-
-One of the most interesting features of tail is the possibility of displaying data (last lines) as the input file grows (tail -f my.log, where my.log is the file under observation). This is particularly useful when monitoring a log to which data is being continually added.
-
-Read More: [Manage Files Effectively using head and tail Commands][10]
-
-**Merging Lines with paste**
-
-The paste command merges files line by line, separating the lines from each file with tabs (by default), or another delimiter that can be specified (in the following example the fields in the output are separated by an equal sign).
-
- # paste -d= file1 file2
-
-
-
-Merge Files in Linux
-
-**Breaking a file into pieces using split command**
-
-The split command is used split a file into two (or more) separate files, which are named according to a prefix of our choosing. The splitting can be defined by size, chunks, or number of lines, and the resulting files can have a numeric or alphabetic suffixes. In the following example, we will split bash.pdf into files of size 50 KB (-b 50KB), using numeric suffixes (-d):
-
- # split -b 50KB -d bash.pdf bash_
-
-
-
-Split Files in Linux
-
-You can merge the files to recreate the original file with the following command:
-
- # cat bash_00 bash_01 bash_02 bash_03 bash_04 bash_05 > bash.pdf
-
-**Translating characters with tr command**
-
-The tr command can be used to translate (change) characters on a one-by-one basis or using character ranges. In the following example we will use the same file2 as previously, and we will change:
-
-- lowercase o’s to uppercase,
-- and all lowercase to uppercase
-
- # cat file2 | tr o O
- # cat file2 | tr [a-z] [A-Z]
-
-
-
-Translate Characters in Linux
-
-**Reporting or deleting duplicate lines with uniq and sort command**
-
-The uniq command allows us to report or remove duplicate lines in a file, writing to stdout by default. We must note that uniq does not detect repeated lines unless they are adjacent. Thus, uniq is commonly used along with a preceding sort (which is used to sort lines of text files).
-
-By default, sort takes the first field (separated by spaces) as key field. To specify a different key field, we need to use the -k option. Please note how the output returned by sort and uniq change as we change the key field in the following example:
-
- # cat file3
- # sort file3 | uniq
- # sort -k2 file3 | uniq
- # sort -k3 file3 | uniq
-
-
-
-Remove Duplicate Lines in Linux
-
-**Extracting text with cut command**
-
-The cut command extracts portions of input lines (from stdin or files) and displays the result on standard output, based on number of bytes (-b), characters (-c), or fields (-f).
-
-When using cut based on fields, the default field separator is a tab, but a different separator can be specified by using the -d option.
-
- # cut -d: -f1,3 /etc/passwd # Extract specific fields: 1 and 3 in this case
- # cut -d: -f2-4 /etc/passwd # Extract range of fields: 2 through 4 in this example
-
-
-
-Extract Text From a File in Linux
-
-Note that the output of the two examples above was truncated for brevity.
-
-**Reformatting files with fmt command**
-
-fmt is used to “clean up” files with a great amount of content or lines, or with varying degrees of indentation. The new paragraph formatting defaults to no more than 75 characters wide. You can change this with the -w (width) option, which set the line length to the specified number of characters.
-
-For example, let’s see what happens when we use fmt to display the /etc/passwd file setting the width of each line to 100 characters. Once again, output has been truncated for brevity.
-
- # fmt -w100 /etc/passwd
-
-
-
-File Reformatting in Linux
-
-**Formatting content for printing with pr command**
-
-pr paginates and displays in columns one or more files for printing. In other words, pr formats a file to make it look better when printed. For example, the following command:
-
- # ls -a /etc | pr -n --columns=3 -h "Files in /etc"
-
-Shows a listing of all the files found in /etc in a printer-friendly format (3 columns) with a custom header (indicated by the -h option), and numbered lines (-n).
-
-
-
-File Formatting in Linux
-
-### Summary ###
-
-In this article we have discussed how to enter and execute commands with the correct syntax in a shell prompt or terminal, and explained how to find, inspect, and use system documentation. As simple as it seems, it’s a large first step in your way to becoming a RHCSA.
-
-If you would like to add other commands that you use on a periodic basis and that have proven useful to fulfill your daily responsibilities, feel free to share them with the world by using the comment form below. Questions are also welcome. We look forward to hearing from you!
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:https://www.redhat.com/en/services/certification/rhcsa
-[2]:http://www.tecmint.com/cd-command-in-linux/
-[3]:http://www.tecmint.com/ls-command-interview-questions/
-[4]:http://www.tecmint.com/advanced-copy-command-shows-progress-bar-while-copying-files/
-[5]:http://www.tecmint.com/rename-multiple-files-in-linux/
-[6]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/
-[7]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/
-[8]:http://www.tecmint.com/echo-command-in-linux/
-[9]:http://www.tecmint.com/pwd-command-examples/
-[10]:http://www.tecmint.com/view-contents-of-file-in-linux/
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md b/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md
deleted file mode 100644
index 7566862597..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md
+++ /dev/null
@@ -1,322 +0,0 @@
-RHCSA Series: How to Perform File and Directory Management – Part 2
-================================================================================
-In this article, RHCSA Part 2: File and directory management, we will review some essential skills that are required in the day-to-day tasks of a system administrator.
-
-
-
-RHCSA: Perform File and Directory Management – Part 2
-
-### Create, Delete, Copy, and Move Files and Directories ###
-
-File and directory management is a critical competence that every system administrator should possess. This includes the ability to create / delete text files from scratch (the core of each program’s configuration) and directories (where you will organize files and other directories), and to find out the type of existing files.
-
-The [touch command][1] can be used not only to create empty files, but also to update the access and modification times of existing files.
-
-
-
-touch command example
-
-You can use `file [filename]` to determine a file’s type (this will come in handy before launching your preferred text editor to edit it).
-
-
-
-file command example
-
-and `rm [filename]` to delete it.
-
-
-
-rm command example
-
-As for directories, you can create directories inside existing paths with `mkdir [directory]` or create a full path with `mkdir -p [/full/path/to/directory].`
-
-
-
-mkdir command example
-
-When it comes to removing directories, you need to make sure that they’re empty before issuing the `rmdir [directory]` command, or use the more powerful (handle with care!) `rm -rf [directory]`. This last option will force remove recursively the `[directory]` and all its contents – so use it at your own risk.
-
-### Input and Output Redirection and Pipelining ###
-
-The command line environment provides two very useful features that allows to redirect the input and output of commands from and to files, and to send the output of a command to another, called redirection and pipelining, respectively.
-
-To understand those two important concepts, we must first understand the three most important types of I/O (Input and Output) streams (or sequences) of characters, which are in fact special files, in the *nix sense of the word.
-
-- Standard input (aka stdin) is by default attached to the keyboard. In other words, the keyboard is the standard input device to enter commands to the command line.
-- Standard output (aka stdout) is by default attached to the screen, the device that “receives” the output of commands and display them on the screen.
-- Standard error (aka stderr), is where the status messages of a command is sent to by default, which is also the screen.
-
-In the following example, the output of `ls /var` is sent to stdout (the screen), as well as the result of ls /tecmint. But in the latter case, it is stderr that is shown.
-
-
-
-Input and Output Example
-
-To more easily identify these special files, they are each assigned a file descriptor, an abstract representation that is used to access them. The essential thing to understand is that these files, just like others, can be redirected. What this means is that you can capture the output from a file or script and send it as input to another file, command, or script. This will allow you to store on disk, for example, the output of commands for later processing or analysis.
-
-To redirect stdin (fd 0), stdout (fd 1), or stderr (fd 2), the following operators are available.
-
-注:表格
-
-
-
-
-
-| Redirection Operator |
-Effect |
-
-
-| > |
-Redirects standard output to a file containing standard output. If the destination file exists, it will be overwritten. |
-
-
-| >> |
-Appends standard output to a file. |
-
-
-| 2> |
-Redirects standard error to a file containing standard output. If the destination file exists, it will be overwritten. |
-
-
-| 2>> |
-Appends standard error to the existing file. |
-
-
-| &> |
-Redirects both standard output and standard error to a file; if the specified file exists, it will be overwritten. |
-
-
-| < |
-Uses the specified file as standard input. |
-
-
-| <> |
-The specified file is used for both standard input and standard output. |
-
-
-
-
-As opposed to redirection, pipelining is performed by adding a vertical bar `(|)` after a command and before another one.
-
-Remember:
-
-- Redirection is used to send the output of a command to a file, or to send a file as input to a command.
-- Pipelining is used to send the output of a command to another command as input.
-
-#### Examples Of Redirection and Pipelining ####
-
-**Example 1: Redirecting the output of a command to a file**
-
-There will be times when you will need to iterate over a list of files. To do that, you can first save that list to a file and then read that file line by line. While it is true that you can iterate over the output of ls directly, this example serves to illustrate redirection.
-
- # ls -1 /var/mail > mail.txt
-
-
-
-Redirect output of command tot a file
-
-**Example 2: Redirecting both stdout and stderr to /dev/null**
-
-In case we want to prevent both stdout and stderr to be displayed on the screen, we can redirect both file descriptors to `/dev/null`. Note how the output changes when the redirection is implemented for the same command.
-
- # ls /var /tecmint
- # ls /var/ /tecmint &> /dev/null
-
-
-
-Redirecting stdout and stderr ouput to /dev/null
-
-#### Example 3: Using a file as input to a command ####
-
-While the classic syntax of the [cat command][2] is as follows.
-
- # cat [file(s)]
-
-You can also send a file as input, using the correct redirection operator.
-
- # cat < mail.txt
-
-
-
-cat command example
-
-#### Example 4: Sending the output of a command as input to another ####
-
-If you have a large directory or process listing and want to be able to locate a certain file or process at a glance, you will want to pipeline the listing to grep.
-
-Note that we use to pipelines in the following example. The first one looks for the required keyword, while the second one will eliminate the actual `grep command` from the results. This example lists all the processes associated with the apache user.
-
- # ps -ef | grep apache | grep -v grep
-
-
-
-Send output of command as input to another
-
-### Archiving, Compressing, Unpacking, and Uncompressing Files ###
-
-If you need to transport, backup, or send via email a group of files, you will use an archiving (or grouping) tool such as [tar][3], typically used with a compression utility like gzip, bzip2, or xz.
-
-Your choice of a compression tool will be likely defined by the compression speed and rate of each one. Of these three compression tools, gzip is the oldest and provides the least compression, bzip2 provides improved compression, and xz is the newest and provides the best compression. Typically, files compressed with these utilities have .gz, .bz2, or .xz extensions, respectively.
-
-注:表格
-
-
-
-
-
-
-| Command |
-Abbreviation |
-Description |
-
-
-| –create |
-c |
-Creates a tar archive |
-
-
-| –concatenate |
-A |
-Appends tar files to an archive |
-
-
-| –append |
-r |
-Appends non-tar files to an archive |
-
-
-| –update |
-u |
-Appends files that are newer than those in an archive |
-
-
-| –diff or –compare |
-d |
-Compares an archive to files on disk |
-
-
-| –list |
-t |
-Lists the contents of a tarball |
-
-
-| –extract or –get |
-x |
-Extracts files from an archive |
-
-
-
-
-注:表格
-
-
-
-
-
-
-| Operation modifier |
-Abbreviation |
-Description |
-
-
-| —directory dir |
- C |
-Changes to directory dir before performing operations |
-
-
-| —same-permissions and —same-owner |
- p |
-Preserves permissions and ownership information, respectively. |
-
-
-| –verbose |
- v |
-Lists all files as they are read or extracted; if combined with –list, it also displays file sizes, ownership, and timestamps |
-
-
-| —exclude file |
- — |
-Excludes file from the archive. In this case, file can be an actual file or a pattern. |
-
-
-| —gzip or —gunzip |
- z |
-Compresses an archive through gzip |
-
-
-| –bzip2 |
- j |
-Compresses an archive through bzip2 |
-
-
-| –xz |
- J |
-Compresses an archive through xz |
-
-
-
-
-#### Example 5: Creating a tarball and then compressing it using the three compression utilities ####
-
-You may want to compare the effectiveness of each tool before deciding to use one or another. Note that while compressing small files, or a few files, the results may not show much differences, but may give you a glimpse of what they have to offer.
-
- # tar cf ApacheLogs-$(date +%Y%m%d).tar /var/log/httpd/* # Create an ordinary tarball
- # tar czf ApacheLogs-$(date +%Y%m%d).tar.gz /var/log/httpd/* # Create a tarball and compress with gzip
- # tar cjf ApacheLogs-$(date +%Y%m%d).tar.bz2 /var/log/httpd/* # Create a tarball and compress with bzip2
- # tar cJf ApacheLogs-$(date +%Y%m%d).tar.xz /var/log/httpd/* # Create a tarball and compress with xz
-
-
-
-tar command examples
-
-#### Example 6: Preserving original permissions and ownership while archiving and when ####
-
-If you are creating backups from users’ home directories, you will want to store the individual files with the original permissions and ownership instead of changing them to that of the user account or daemon performing the backup. The following example preserves these attributes while taking the backup of the contents in the `/var/log/httpd` directory:
-
- # tar cJf ApacheLogs-$(date +%Y%m%d).tar.xz /var/log/httpd/* --same-permissions --same-owner
-
-### Create Hard and Soft Links ###
-
-In Linux, there are two types of links to files: hard links and soft (aka symbolic) links. Since a hard link represents another name for an existing file and is identified by the same inode, it then points to the actual data, as opposed to symbolic links, which point to filenames instead.
-
-In addition, hard links do not occupy space on disk, while symbolic links do take a small amount of space to store the text of the link itself. The downside of hard links is that they can only be used to reference files within the filesystem where they are located because inodes are unique inside a filesystem. Symbolic links save the day, in that they point to another file or directory by name rather than by inode, and therefore can cross filesystem boundaries.
-
-The basic syntax to create links is similar in both cases:
-
- # ln TARGET LINK_NAME # Hard link named LINK_NAME to file named TARGET
- # ln -s TARGET LINK_NAME # Soft link named LINK_NAME to file named TARGET
-
-#### Example 7: Creating hard and soft links ####
-
-There is no better way to visualize the relation between a file and a hard or symbolic link that point to it, than to create those links. In the following screenshot you will see that the file and the hard link that points to it share the same inode and both are identified by the same disk usage of 466 bytes.
-
-On the other hand, creating a hard link results in an extra disk usage of 5 bytes. Not that you’re going to run out of storage capacity, but this example is enough to illustrate the difference between a hard link and a soft link.
-
-
-
-Difference between a hard link and a soft link
-
-A typical usage of symbolic links is to reference a versioned file in a Linux system. Suppose there are several programs that need access to file fooX.Y, which is subject to frequent version updates (think of a library, for example). Instead of updating every single reference to fooX.Y every time there’s a version update, it is wiser, safer, and faster, to have programs look to a symbolic link named just foo, which in turn points to the actual fooX.Y.
-
-Thus, when X and Y change, you only need to edit the symbolic link foo with a new destination name instead of tracking every usage of the destination file and updating it.
-
-### Summary ###
-
-In this article we have reviewed some essential file and directory management skills that must be a part of every system administrator’s tool-set. Make sure to review other parts of this series as well in order to integrate these topics with the content covered in this tutorial.
-
-Feel free to let us know if you have any questions or comments. We are always more than glad to hear from our readers.
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/file-and-directory-management-in-linux/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/
-[2]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/
-[3]:http://www.tecmint.com/18-tar-command-examples-in-linux/
\ No newline at end of file
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md b/sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md
deleted file mode 100644
index be78c87e3a..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md
+++ /dev/null
@@ -1,248 +0,0 @@
-RHCSA Series: How to Manage Users and Groups in RHEL 7 – Part 3
-================================================================================
-Managing a RHEL 7 server, as it is the case with any other Linux server, will require that you know how to add, edit, suspend, or delete user accounts, and grant users the necessary permissions to files, directories, and other system resources to perform their assigned tasks.
-
-
-
-RHCSA: User and Group Management – Part 3
-
-### Managing User Accounts ###
-
-To add a new user account to a RHEL 7 server, you can run either of the following two commands as root:
-
- # adduser [new_account]
- # useradd [new_account]
-
-When a new user account is added, by default the following operations are performed.
-
-- His/her home directory is created (`/home/username` unless specified otherwise).
-- These `.bash_logout`, `.bash_profile` and `.bashrc` hidden files are copied inside the user’s home directory, and will be used to provide environment variables for his/her user session. You can explore each of them for further details.
-- A mail spool directory is created for the added user account.
-- A group is created with the same name as the new user account.
-
-The full account summary is stored in the `/etc/passwd `file. This file holds a record per system user account and has the following format (fields are separated by a colon):
-
- [username]:[x]:[UID]:[GID]:[Comment]:[Home directory]:[Default shell]
-
-- These two fields `[username]` and `[Comment]` are self explanatory.
-- The second filed ‘x’ indicates that the account is secured by a shadowed password (in `/etc/shadow`), which is used to logon as `[username]`.
-- The fields `[UID]` and `[GID]` are integers that shows the User IDentification and the primary Group IDentification to which `[username]` belongs, equally.
-
-Finally,
-
-- The `[Home directory]` shows the absolute location of `[username]’s` home directory, and
-- `[Default shell]` is the shell that is commit to this user when he/she logins into the system.
-
-Another important file that you must become familiar with is `/etc/group`, where group information is stored. As it is the case with `/etc/passwd`, there is one record per line and its fields are also delimited by a colon:
-
- [Group name]:[Group password]:[GID]:[Group members]
-
-where,
-
-- `[Group name]` is the name of group.
-- Does this group use a group password? (An “x” means no).
-- `[GID]`: same as in `/etc/passwd`.
-- `[Group members]`: a list of users, separated by commas, that are members of each group.
-
-After adding an account, at anytime, you can edit the user’s account information using usermod, whose basic syntax is:
-
- # usermod [options] [username]
-
-Read Also:
-
-- [15 ‘useradd’ Command Examples][1]
-- [15 ‘usermod’ Command Examples][2]
-
-#### EXAMPLE 1: Setting the expiry date for an account ####
-
-If you work for a company that has some kind of policy to enable account for a certain interval of time, or if you want to grant access to a limited period of time, you can use the `--expiredate` flag followed by a date in YYYY-MM-DD format. To verify that the change has been applied, you can compare the output of
-
- # chage -l [username]
-
-before and after updating the account expiry date, as shown in the following image.
-
-
-
-Change User Account Information
-
-#### EXAMPLE 2: Adding the user to supplementary groups ####
-
-Besides the primary group that is created when a new user account is added to the system, a user can be added to supplementary groups using the combined -aG, or –append –groups options, followed by a comma separated list of groups.
-
-#### EXAMPLE 3: Changing the default location of the user’s home directory and / or changing its shell ####
-
-If for some reason you need to change the default location of the user’s home directory (other than /home/username), you will need to use the -d, or –home options, followed by the absolute path to the new home directory.
-
-If a user wants to use another shell other than bash (for example, sh), which gets assigned by default, use usermod with the –shell flag, followed by the path to the new shell.
-
-#### EXAMPLE 4: Displaying the groups an user is a member of ####
-
-After adding the user to a supplementary group, you can verify that it now actually belongs to such group(s):
-
- # groups [username]
- # id [username]
-
-The following image depicts Examples 2 through 4:
-
-
-
-Adding User to Supplementary Group
-
-In the example above:
-
- # usermod --append --groups gacanepa,users --home /tmp --shell /bin/sh tecmint
-
-To remove a user from a group, omit the `--append` switch in the command above and list the groups you want the user to belong to following the `--groups` flag.
-
-#### EXAMPLE 5: Disabling account by locking password ####
-
-To disable an account, you will need to use either the -l (lowercase L) or the –lock option to lock a user’s password. This will prevent the user from being able to log on.
-
-#### EXAMPLE 6: Unlocking password ####
-
-When you need to re-enable the user so that he can log on to the server again, use the -u or the –unlock option to unlock a user’s password that was previously blocked, as explained in Example 5 above.
-
- # usermod --unlock tecmint
-
-The following image illustrates Examples 5 and 6:
-
-
-
-Lock Unlock User Account
-
-#### EXAMPLE 7: Deleting a group or an user account ####
-
-To delete a group, you’ll want to use groupdel, whereas to delete a user account you will use userdel (add the –r switch if you also want to delete the contents of its home directory and mail spool):
-
- # groupdel [group_name] # Delete a group
- # userdel -r [user_name] # Remove user_name from the system, along with his/her home directory and mail spool
-
-If there are files owned by group_name, they will not be deleted, but the group owner will be set to the GID of the group that was deleted.
-
-### Listing, Setting and Changing Standard ugo/rwx Permissions ###
-
-The well-known [ls command][3] is one of the best friends of any system administrator. When used with the -l flag, this tool allows you to view a list a directory’s contents in long (or detailed) format.
-
-However, this command can also be applied to a single file. Either way, the first 10 characters in the output of `ls -l` represent each file’s attributes.
-
-The first char of this 10-character sequence is used to indicate the file type:
-
-- – (hyphen): a regular file
-- d: a directory
-- l: a symbolic link
-- c: a character device (which treats data as a stream of bytes, i.e. a terminal)
-- b: a block device (which handles data in blocks, i.e. storage devices)
-
-The next nine characters of the file attributes, divided in groups of three from left to right, are called the file mode and indicate the read (r), write(w), and execute (x) permissions granted to the file’s owner, the file’s group owner, and the rest of the users (commonly referred to as “the world”), respectively.
-
-While the read permission on a file allows the same to be opened and read, the same permission on a directory allows its contents to be listed if the execute permission is also set. In addition, the execute permission in a file allows it to be handled as a program and run.
-
-File permissions are changed with the chmod command, whose basic syntax is as follows:
-
- # chmod [new_mode] file
-
-where new_mode is either an octal number or an expression that specifies the new permissions. Feel free to use the mode that works best for you in each case. Or perhaps you already have a preferred way to set a file’s permissions – so feel free to use the method that works best for you.
-
-The octal number can be calculated based on the binary equivalent, which can in turn be obtained from the desired file permissions for the owner of the file, the owner group, and the world.The presence of a certain permission equals a power of 2 (r=22, w=21, x=20), while its absence means 0. For example:
-
-
-
-File Permissions
-
-To set the file’s permissions as indicated above in octal form, type:
-
- # chmod 744 myfile
-
-Please take a minute to compare our previous calculation to the actual output of `ls -l` after changing the file’s permissions:
-
-
-
-Long List Format
-
-#### EXAMPLE 8: Searching for files with 777 permissions ####
-
-As a security measure, you should make sure that files with 777 permissions (read, write, and execute for everyone) are avoided like the plague under normal circumstances. Although we will explain in a later tutorial how to more effectively locate all the files in your system with a certain permission set, you can -by now- combine ls with grep to obtain such information.
-
-In the following example, we will look for file with 777 permissions in the /etc directory only. Note that we will use pipelining as explained in [Part 2: File and Directory Management][4] of this RHCSA series:
-
- # ls -l /etc | grep rwxrwxrwx
-
-
-
-Find All Files with 777 Permission
-
-#### EXAMPLE 9: Assigning a specific permission to all users ####
-
-Shell scripts, along with some binaries that all users should have access to (not just their corresponding owner and group), should have the execute bit set accordingly (please note that we will discuss a special case later):
-
- # chmod a+x script.sh
-
-**Note**: That we can also set a file’s mode using an expression that indicates the owner’s rights with the letter `u`, the group owner’s rights with the letter `g`, and the rest with `o`. All of these rights can be represented at the same time with the letter `a`. Permissions are granted (or revoked) with the `+` or `-` signs, respectively.
-
-
-
-Set Execute Permission on File
-
-A long directory listing also shows the file’s owner and its group owner in the first and second columns, respectively. This feature serves as a first-level access control method to files in a system:
-
-
-
-Check File Owner and Group
-
-To change file ownership, you will use the chown command. Note that you can change the file and group ownership at the same time or separately:
-
- # chown user:group file
-
-**Note**: That you can change the user or group, or the two attributes at the same time, as long as you don’t forget the colon, leaving user or group blank if you want to update the other attribute, for example:
-
- # chown :group file # Change group ownership only
- # chown user: file # Change user ownership only
-
-#### EXAMPLE 10: Cloning permissions from one file to another ####
-
-If you would like to “clone” ownership from one file to another, you can do so using the –reference flag, as follows:
-
- # chown --reference=ref_file file
-
-where the owner and group of ref_file will be assigned to file as well:
-
-
-
-Clone File Ownership
-
-### Setting Up SETGID Directories for Collaboration ###
-
-Should you need to grant access to all the files owned by a certain group inside a specific directory, you will most likely use the approach of setting the setgid bit for such directory. When the setgid bit is set, the effective GID of the real user becomes that of the group owner.
-
-Thus, any user can access a file under the privileges granted to the group owner of such file. In addition, when the setgid bit is set on a directory, newly created files inherit the same group as the directory, and newly created subdirectories will also inherit the setgid bit of the parent directory.
-
- # chmod g+s [filename]
-
-To set the setgid in octal form, prepend the number 2 to the current (or desired) basic permissions.
-
- # chmod 2755 [directory]
-
-### Conclusion ###
-
-A solid knowledge of user and group management, along with standard and special Linux permissions, when coupled with practice, will allow you to quickly identify and troubleshoot issues with file permissions in your RHEL 7 server.
-
-I assure you that as you follow the steps outlined in this article and use the system documentation (as explained in [Part 1: Reviewing Essential Commands & System Documentation][5] of this series) you will master this essential competence of system administration.
-
-Feel free to let us know if you have any questions or comments using the form below.
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:http://www.tecmint.com/add-users-in-linux/
-[2]:http://www.tecmint.com/usermod-command-examples/
-[3]:http://www.tecmint.com/ls-interview-questions/
-[4]:http://www.tecmint.com/file-and-directory-management-in-linux/
-[5]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/
\ No newline at end of file
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md b/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md
deleted file mode 100644
index 1529fecf2e..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md
+++ /dev/null
@@ -1,254 +0,0 @@
-RHCSA Series: Editing Text Files with Nano and Vim / Analyzing text with grep and regexps – Part 4
-================================================================================
-Every system administrator has to deal with text files as part of his daily responsibilities. That includes editing existing files (most likely configuration files), or creating new ones. It has been said that if you want to start a holy war in the Linux world, you can ask sysadmins what their favorite text editor is and why. We are not going to do that in this article, but will present a few tips that will be helpful to use two of the most widely used text editors in RHEL 7: nano (due to its simplicity and easiness of use, specially to new users), and vi/m (due to its several features that convert it into more than a simple editor). I am sure that you can find many more reasons to use one or the other, or perhaps some other editor such as emacs or pico. It’s entirely up to you.
-
-
-
-RHCSA: Editing Text Files with Nano and Vim – Part 4
-
-### Editing Files with Nano Editor ###
-
-To launch nano, you can either just type nano at the command prompt, optionally followed by a filename (in this case, if the file exists, it will be opened in edition mode). If the file does not exist, or if we omit the filename, nano will also be opened in edition mode but will present a blank screen for us to start typing:
-
-
-
-Nano Editor
-
-As you can see in the previous image, nano displays at the bottom of the screen several functions that are available via the indicated shortcuts (^, aka caret, indicates the Ctrl key). To name a few of them:
-
-- Ctrl + G: brings up the help menu with a complete list of functions and descriptions:Ctrl + X: exits the current file. If changes have not been saved, they are discarded.
-- Ctrl + R: lets you choose a file to insert its contents into the present file by specifying a full path.
-
-
-
-Nano Editor Help Menu
-
-- Ctrl + O: saves changes made to a file. It will let you save the file with the same name or a different one. Then press Enter to confirm.
-
-
-
-Nano Editor Save Changes Mode
-
-- Ctrl + X: exits the current file. If changes have not been saved, they are discarded.
-- Ctrl + R: lets you choose a file to insert its contents into the present file by specifying a full path.
-
-
-
-Nano: Insert File Content to Parent File
-
-will insert the contents of /etc/passwd into the current file.
-
-- Ctrl + K: cuts the current line.
-- Ctrl + U: paste.
-- Ctrl + C: cancels the current operation and places you at the previous screen.
-
-To easily navigate the opened file, nano provides the following features:
-
-- Ctrl + F and Ctrl + B move the cursor forward or backward, whereas Ctrl + P and Ctrl + N move it up or down one line at a time, respectively, just like the arrow keys.
-- Ctrl + space and Alt + space move the cursor forward and backward one word at a time.
-
-Finally,
-
-- Ctrl + _ (underscore) and then entering X,Y will take you precisely to Line X, column Y, if you want to place the cursor at a specific place in the document.
-
-
-
-Navigate to Line Numbers in Nano
-
-The example above will take you to line 15, column 14 in the current document.
-
-If you can recall your early Linux days, specially if you came from Windows, you will probably agree that starting off with nano is the best way to go for a new user.
-
-### Editing Files with Vim Editor ###
-
-Vim is an improved version of vi, a famous text editor in Linux that is available on all POSIX-compliant *nix systems, such as RHEL 7. If you have the chance and can install vim, go ahead; if not, most (if not all) the tips given in this article should also work.
-
-One of vim’s distinguishing features is the different modes in which it operates:
-
-
-- Command mode will allow you to browse through the file and enter commands, which are brief and case-sensitive combinations of one or more letters. If you need to repeat one of them a certain number of times, you can prefix it with a number (there are only a few exceptions to this rule). For example, yy (or Y, short for yank) copies the entire current line, whereas 4yy (or 4Y) copies the entire current line along with the next three lines (4 lines in total).
-- In ex mode, you can manipulate files (including saving a current file and running outside programs or commands). To enter ex mode, we must type a colon (:) starting from command mode (or in other words, Esc + :), directly followed by the name of the ex-mode command that you want to use.
-- In insert mode, which is accessed by typing the letter i, we simply enter text. Most keystrokes result in text appearing on the screen.
-- We can always enter command mode (regardless of the mode we’re working on) by pressing the Esc key.
-
-Let’s see how we can perform the same operations that we outlined for nano in the previous section, but now with vim. Don’t forget to hit the Enter key to confirm the vim command!
-
-To access vim’s full manual from the command line, type :help while in command mode and then press Enter:
-
-
-
-vim Edito Help Menu
-
-The upper section presents an index list of contents, with defined sections dedicated to specific topics about vim. To navigate to a section, place the cursor over it and press Ctrl + ] (closing square bracket). Note that the bottom section displays the current file.
-
-1. To save changes made to a file, run any of the following commands from command mode and it will do the trick:
-
- :wq!
- :x!
- ZZ (yes, double Z without the colon at the beginning)
-
-2. To exit discarding changes, use :q!. This command will also allow you to exit the help menu described above, and return to the current file in command mode.
-
-3. Cut N number of lines: type Ndd while in command mode.
-
-4. Copy M number of lines: type Myy while in command mode.
-
-5. Paste lines that were previously cutted or copied: press the P key while in command mode.
-
-6. To insert the contents of another file into the current one:
-
- :r filename
-
-For example, to insert the contents of `/etc/fstab`, do:
-
-
-
-Insert Content of File in vi Editor
-
-7. To insert the output of a command into the current document:
-
- :r! command
-
-For example, to insert the date and time in the line below the current position of the cursor:
-
-
-
-Insert Time an Date in vi Editor
-
-In another article that I wrote for, ([Part 2 of the LFCS series][1]), I explained in greater detail the keyboard shortcuts and functions available in vim. You may want to refer to that tutorial for further examples on how to use this powerful text editor.
-
-### Analyzing Text with Grep and Regular Expressions ###
-
-By now you have learned how to create and edit files using nano or vim. Say you become a text editor ninja, so to speak – now what? Among other things, you will also need how to search for regular expressions inside text.
-
-A regular expression (also known as “regex” or “regexp“) is a way of identifying a text string or pattern so that a program can compare the pattern against arbitrary text strings. Although the use of regular expressions along with grep would deserve an entire article on its own, let us review the basics here:
-
-**1. The simplest regular expression is an alphanumeric string (i.e., the word “svm”) or two (when two are present, you can use the | (OR) operator):**
-
- # grep -Ei 'svm|vmx' /proc/cpuinfo
-
-The presence of either of those two strings indicate that your processor supports virtualization:
-
-
-
-Regular Expression Example
-
-**2. A second kind of a regular expression is a range list, enclosed between square brackets.**
-
-For example, `c[aeiou]t` matches the strings cat, cet, cit, cot, and cut, whereas `[a-z]` and `[0-9]` match any lowercase letter or decimal digit, respectively. If you want to repeat the regular expression X certain number of times, type `{X}` immediately following the regexp.
-
-For example, let’s extract the UUIDs of storage devices from `/etc/fstab`:
-
- # grep -Ei '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' -o /etc/fstab
-
-
-
-Extract String from a File
-
-The first expression in brackets `[0-9a-f]` is used to denote lowercase hexadecimal characters, and `{8}` is a quantifier that indicates the number of times that the preceding match should be repeated (the first sequence of characters in an UUID is a 8-character long hexadecimal string).
-
-The parentheses, the `{4}` quantifier, and the hyphen indicate that the next sequence is a 4-character long hexadecimal string, and the quantifier that follows `({3})` denote that the expression should be repeated 3 times.
-
-Finally, the last sequence of 12-character long hexadecimal string in the UUID is retrieved with `[0-9a-f]{12}`, and the -o option prints only the matched (non-empty) parts of the matching line in /etc/fstab.
-
-**3. POSIX character classes.**
-
-注:表格
-
-
-
-
-
-| Character Class |
-Matches… |
-
-
-| [[:alnum:]] |
- Any alphanumeric [a-zA-Z0-9] character |
-
-
-| [[:alpha:]] |
- Any alphabetic [a-zA-Z] character |
-
-
-| [[:blank:]] |
- Spaces or tabs |
-
-
-| [[:cntrl:]] |
- Any control characters (ASCII 0 to 32) |
-
-
-| [[:digit:]] |
- Any numeric digits [0-9] |
-
-
-| [[:graph:]] |
- Any visible characters |
-
-
-| [[:lower:]] |
- Any lowercase [a-z] character |
-
-
-| [[:print:]] |
- Any non-control characters |
-
-
-| [[:space:]] |
- Any whitespace |
-
-
-| [[:punct:]] |
- Any punctuation marks |
-
-
-| [[:upper:]] |
- Any uppercase [A-Z] character |
-
-
-| [[:xdigit:]] |
- Any hex digits [0-9a-fA-F] |
-
-
-| [:word:] |
- Any letters, numbers, and underscores [a-zA-Z0-9_] |
-
-
-
-
-For example, we may be interested in finding out what the used UIDs and GIDs (refer to [Part 2][2] of this series to refresh your memory) are for real users that have been added to our system. Thus, we will search for sequences of 4 digits in /etc/passwd:
-
- # grep -Ei [[:digit:]]{4} /etc/passwd
-
-
-
-Search For a String in File
-
-The above example may not be the best case of use of regular expressions in the real world, but it clearly illustrates how to use POSIX character classes to analyze text along with grep.
-
-### Conclusion ###
-
-In this article we have provided some tips to make the most of nano and vim, two text editors for the command-line users. Both tools are supported by extensive documentation, which you can consult in their respective official web sites (links given below) and using the suggestions given in [Part 1][3] of this series.
-
-#### Reference Links ####
-
-- [http://www.nano-editor.org/][4]
-- [http://www.vim.org/][5]
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/rhcsa-exam-how-to-use-nano-vi-editors/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:http://www.tecmint.com/vi-editor-usage/
-[2]:http://www.tecmint.com/file-and-directory-management-in-linux/
-[3]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/
-[4]:http://www.nano-editor.org/
-[5]:http://www.vim.org/
\ No newline at end of file
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md b/sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md
deleted file mode 100644
index 2befb7bc55..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md
+++ /dev/null
@@ -1,216 +0,0 @@
-RHCSA Series: Process Management in RHEL 7: Boot, Shutdown, and Everything in Between – Part 5
-================================================================================
-We will start this article with an overall and brief revision of what happens since the moment you press the Power button to turn on your RHEL 7 server until you are presented with the login screen in a command line interface.
-
-
-
-Linux Boot Process
-
-**Please note that:**
-
-1. the same basic principles apply, with perhaps minor modifications, to other Linux distributions as well, and
-2. the following description is not intended to represent an exhaustive explanation of the boot process, but only the fundamentals.
-
-### Linux Boot Process ###
-
-1. The POST (Power On Self Test) initializes and performs hardware checks.
-
-2. When the POST finishes, the system control is passed to the first stage boot loader, which is stored on either the boot sector of one of the hard disks (for older systems using BIOS and MBR), or a dedicated (U)EFI partition.
-
-3. The first stage boot loader then loads the second stage boot loader, most usually GRUB (GRand Unified Boot Loader), which resides inside /boot, which in turn loads the kernel and the initial RAM–based file system (also known as initramfs, which contains programs and binary files that perform the necessary actions needed to ultimately mount the actual root filesystem).
-
-4. We are presented with a splash screen that allows us to choose an operating system and kernel to boot:
-
-
-
-Boot Menu Screen
-
-5. The kernel sets up the hardware attached to the system and once the root filesystem has been mounted, launches process with PID 1, which in turn will initialize other processes and present us with a login prompt.
-
-Note: That if we wish to do so at a later time, we can examine the specifics of this process using the [dmesg command][1] and filtering its output using the tools that we have explained in previous articles of this series.
-
-
-
-Login Screen and Process PID
-
-In the example above, we used the well-known ps command to display a list of current processes whose parent process (or in other words, the process that started them) is systemd (the system and service manager that most modern Linux distributions have switched to) during system startup:
-
- # ps -o ppid,pid,uname,comm --ppid=1
-
-Remember that the -o flag (short for –format) allows you to present the output of ps in a customized format to suit your needs using the keywords specified in the STANDARD FORMAT SPECIFIERS section in man ps.
-
-Another case in which you will want to define the output of ps instead of going with the default is when you need to find processes that are causing a significant CPU and / or memory load, and sort them accordingly:
-
- # ps aux --sort=+pcpu # Sort by %CPU (ascending)
- # ps aux --sort=-pcpu # Sort by %CPU (descending)
- # ps aux --sort=+pmem # Sort by %MEM (ascending)
- # ps aux --sort=-pmem # Sort by %MEM (descending)
- # ps aux --sort=+pcpu,-pmem # Combine sort by %CPU (ascending) and %MEM (descending)
-
-
-
-Customize ps Command Output
-
-### An Introduction to SystemD ###
-
-Few decisions in the Linux world have caused more controversies than the adoption of systemd by major Linux distributions. Systemd’s advocates name as its main advantages the following facts:
-
-Read Also: [The Story Behind ‘init’ and ‘systemd’][2]
-
-1. Systemd allows more processing to be done in parallel during system startup (as opposed to older SysVinit, which always tends to be slower because it starts processes one by one, checks if one depends on another, and then waits for daemons to launch so more services can start), and
-
-2. It works as a dynamic resource management in a running system. Thus, services are started when needed (to avoid consuming system resources if they are not being used) instead of being launched without a valid reason during boot.
-
-3. Backwards compatibility with SysVinit scripts.
-
-Systemd is controlled by the systemctl utility. If you come from a SysVinit background, chances are you will be familiar with:
-
-- the service tool, which -in those older systems- was used to manage SysVinit scripts, and
-- the chkconfig utility, which served the purpose of updating and querying runlevel information for system services.
-- shutdown, which you must have used several times to either restart or halt a running system.
-
-The following table shows the similarities between the use of these legacy tools and systemctl:
-
-注:表格
-
-
-
-
-
-
-| Legacy tool |
-Systemctl equivalent |
-Description |
-
-
-| service name start |
-systemctl start name |
-Start name (where name is a service) |
-
-
-| service name stop |
-systemctl stop name |
-Stop name |
-
-
-| service name condrestart |
-systemctl try-restart name |
-Restarts name (if it’s already running) |
-
-
-| service name restart |
-systemctl restart name |
-Restarts name |
-
-
-| service name reload |
-systemctl reload name |
-Reloads the configuration for name |
-
-
-| service name status |
-systemctl status name |
-Displays the current status of name |
-
-
-| service –status-all |
-systemctl |
-Displays the status of all current services |
-
-
-| chkconfig name on |
-systemctl enable name |
-Enable name to run on startup as specified in the unit file (the file to which the symlink points). The process of enabling or disabling a service to start automatically on boot consists in adding or removing symbolic links inside the /etc/systemd/system directory. |
-
-
-| chkconfig name off |
-systemctl disable name |
-Disables name to run on startup as specified in the unit file (the file to which the symlink points) |
-
-
-| chkconfig –list name |
-systemctl is-enabled name |
-Verify whether name (a specific service) is currently enabled |
-
-
-| chkconfig –list |
-systemctl –type=service |
-Displays all services and tells whether they are enabled or disabled |
-
-
-| shutdown -h now |
-systemctl poweroff |
-Power-off the machine (halt) |
-
-
-| shutdown -r now |
-systemctl reboot |
-Reboot the system |
-
-
-
-
-Systemd also introduced the concepts of units (which can be either a service, a mount point, a device, or a network socket) and targets (which is how systemd manages to start several related process at the same time, and can be considered -though not equal- as the equivalent of runlevels in SysVinit-based systems.
-
-### Summing Up ###
-
-Other tasks related with process management include, but may not be limited to, the ability to:
-
-**1. Adjust the execution priority as far as the use of system resources is concerned of a process:**
-
-This is accomplished through the renice utility, which alters the scheduling priority of one or more running processes. In simple terms, the scheduling priority is a feature that allows the kernel (present in versions => 2.6) to allocate system resources as per the assigned execution priority (aka niceness, in a range from -20 through 19) of a given process.
-
-The basic syntax of renice is as follows:
-
- # renice [-n] priority [-gpu] identifier
-
-In the generic command above, the first argument is the priority value to be used, whereas the other argument can be interpreted as process IDs (which is the default setting), process group IDs, user IDs, or user names. A normal user (other than root) can only modify the scheduling priority of a process he or she owns, and only increase the niceness level (which means taking up less system resources).
-
-
-
-Process Scheduling Priority
-
-**2. Kill (or interrupt the normal execution) of a process as needed:**
-
-In more precise terms, killing a process entitles sending it a signal to either finish its execution gracefully (SIGTERM=15) or immediately (SIGKILL=9) through the [kill or pkill commands][3].
-
-The difference between these two tools is that the former is used to terminate a specific process or a process group altogether, while the latter allows you to do the same based on name and other attributes.
-
-In addition, pkill comes bundled with pgrep, which shows you the PIDs that will be affected should pkill be used. For example, before running:
-
- # pkill -u gacanepa
-
-It may be useful to view at a glance which are the PIDs owned by gacanepa:
-
- # pgrep -l -u gacanepa
-
-
-
-Find PIDs of User
-
-By default, both kill and pkill send the SIGTERM signal to the process. As we mentioned above, this signal can be ignored (while the process finishes its execution or for good), so when you seriously need to stop a running process with a valid reason, you will need to specify the SIGKILL signal on the command line:
-
- # kill -9 identifier # Kill a process or a process group
- # kill -s SIGNAL identifier # Idem
- # pkill -s SIGNAL identifier # Kill a process by name or other attributes
-
-### Conclusion ###
-
-In this article we have explained the basics of the boot process in a RHEL 7 system, and analyzed some of the tools that are available to help you with managing processes using common utilities and systemd-specific commands.
-
-Note that this list is not intended to cover all the bells and whistles of this topic, so feel free to add your own preferred tools and commands to this article using the comment form below. Questions and other comments are also welcome.
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/rhcsa-exam-boot-process-and-process-management/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:http://www.tecmint.com/dmesg-commands/
-[2]:http://www.tecmint.com/systemd-replaces-init-in-linux/
-[3]:http://www.tecmint.com/how-to-kill-a-process-in-linux/
\ No newline at end of file
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md b/sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md
deleted file mode 100644
index 474b707d23..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md
+++ /dev/null
@@ -1,269 +0,0 @@
-RHCSA Series: Using ‘Parted’ and ‘SSM’ to Configure and Encrypt System Storage – Part 6
-================================================================================
-In this article we will discuss how to set up and configure local system storage in Red Hat Enterprise Linux 7 using classic tools and introducing the System Storage Manager (also known as SSM), which greatly simplifies this task.
-
-
-
-RHCSA: Configure and Encrypt System Storage – Part 6
-
-Please note that we will present this topic in this article but will continue its description and usage on the next one (Part 7) due to vastness of the subject.
-
-### Creating and Modifying Partitions in RHEL 7 ###
-
-In RHEL 7, parted is the default utility to work with partitions, and will allow you to:
-
-- Display the current partition table
-- Manipulate (increase or decrease the size of) existing partitions
-- Create partitions using free space or additional physical storage devices
-
-It is recommended that before attempting the creation of a new partition or the modification of an existing one, you should ensure that none of the partitions on the device are in use (`umount /dev/partition`), and if you’re using part of the device as swap you need to disable it (`swapoff -v /dev/partition`) during the process.
-
-The easiest way to do this is to boot RHEL in rescue mode using an installation media such as a RHEL 7 installation DVD or USB (Troubleshooting → Rescue a Red Hat Enterprise Linux system) and Select Skip when you’re prompted to choose an option to mount the existing Linux installation, and you will be presented with a command prompt where you can start typing the same commands as shown as follows during the creation of an ordinary partition in a physical device that is not being used.
-
-
-
-RHEL 7 Rescue Mode
-
-To start parted, simply type.
-
- # parted /dev/sdb
-
-Where `/dev/sdb` is the device where you will create the new partition; next, type print to display the current drive’s partition table:
-
-
-
-Creat New Partition
-
-As you can see, in this example we are using a virtual drive of 5 GB. We will now proceed to create a 4 GB primary partition and then format it with the xfs filesystem, which is the default in RHEL 7.
-
-You can choose from a variety of file systems. You will need to manually create the partition with mkpart and then format it with mkfs.fstype as usual because mkpart does not support many modern filesystems out-of-the-box.
-
-In the following example we will set a label for the device and then create a primary partition `(p)` on `/dev/sdb`, which starts at the 0% percentage of the device and ends at 4000 MB (4 GB):
-
-
-
-Label Partition Name
-
-Next, we will format the partition as xfs and print the partition table again to verify that changes were applied:
-
- # mkfs.xfs /dev/sdb1
- # parted /dev/sdb print
-
-
-
-Format Partition as XFS Filesystem
-
-For older filesystems, you could use the resize command in parted to resize a partition. Unfortunately, this only applies to ext2, fat16, fat32, hfs, linux-swap, and reiserfs (if libreiserfs is installed).
-
-Thus, the only way to resize a partition is by deleting it and creating it again (so make sure you have a good backup of your data!). No wonder the default partitioning scheme in RHEL 7 is based on LVM.
-
-To remove a partition with parted:
-
- # parted /dev/sdb print
- # parted /dev/sdb rm 1
-
-
-
-Remove or Delete Partition
-
-### The Logical Volume Manager (LVM) ###
-
-Once a disk has been partitioned, it can be difficult or risky to change the partition sizes. For that reason, if we plan on resizing the partitions on our system, we should consider the possibility of using LVM instead of the classic partitioning system, where several physical devices can form a volume group that will host a defined number of logical volumes, which can be expanded or reduced without any hassle.
-
-In simple terms, you may find the following diagram useful to remember the basic architecture of LVM.
-
-
-
-Basic Architecture of LVM
-
-#### Creating Physical Volumes, Volume Group and Logical Volumes ####
-
-Follow these steps in order to set up LVM using classic volume management tools. Since you can expand this topic reading the [LVM series on this site][1], I will only outline the basic steps to set up LVM, and then compare them to implementing the same functionality with SSM.
-
-**Note**: That we will use the whole disks `/dev/sdb` and `/dev/sdc` as PVs (Physical Volumes) but it’s entirely up to you if you want to do the same.
-
-**1. Create partitions `/dev/sdb1` and `/dev/sdc1` using 100% of the available disk space in /dev/sdb and /dev/sdc:**
-
- # parted /dev/sdb print
- # parted /dev/sdc print
-
-
-
-Create New Partitions
-
-**2. Create 2 physical volumes on top of /dev/sdb1 and /dev/sdc1, respectively.**
-
- # pvcreate /dev/sdb1
- # pvcreate /dev/sdc1
-
-
-
-Create Two Physical Volumes
-
-Remember that you can use pvdisplay /dev/sd{b,c}1 to show information about the newly created PVs.
-
-**3. Create a VG on top of the PV that you created in the previous step:**
-
- # vgcreate tecmint_vg /dev/sd{b,c}1
-
-
-
-Create Volume Group
-
-Remember that you can use vgdisplay tecmint_vg to show information about the newly created VG.
-
-**4. Create three logical volumes on top of VG tecmint_vg, as follows:**
-
- # lvcreate -L 3G -n vol01_docs tecmint_vg [vol01_docs → 3 GB]
- # lvcreate -L 1G -n vol02_logs tecmint_vg [vol02_logs → 1 GB]
- # lvcreate -l 100%FREE -n vol03_homes tecmint_vg [vol03_homes → 6 GB]
-
-
-
-Create Logical Volumes
-
-Remember that you can use lvdisplay tecmint_vg to show information about the newly created LVs on top of VG tecmint_vg.
-
-**5. Format each of the logical volumes with xfs (do NOT use xfs if you’re planning on shrinking volumes later!):**
-
- # mkfs.xfs /dev/tecmint_vg/vol01_docs
- # mkfs.xfs /dev/tecmint_vg/vol02_logs
- # mkfs.xfs /dev/tecmint_vg/vol03_homes
-
-**6. Finally, mount them:**
-
- # mount /dev/tecmint_vg/vol01_docs /mnt/docs
- # mount /dev/tecmint_vg/vol02_logs /mnt/logs
- # mount /dev/tecmint_vg/vol03_homes /mnt/homes
-
-#### Removing Logical Volumes, Volume Group and Physical Volumes ####
-
-**7. Now we will reverse the LVM implementation and remove the LVs, the VG, and the PVs:**
-
- # lvremove /dev/tecmint_vg/vol01_docs
- # lvremove /dev/tecmint_vg/vol02_logs
- # lvremove /dev/tecmint_vg/vol03_homes
- # vgremove /dev/tecmint_vg
- # pvremove /dev/sd{b,c}1
-
-**8. Now let’s install SSM and we will see how to perform the above in ONLY 1 STEP!**
-
- # yum update && yum install system-storage-manager
-
-We will use the same names and sizes as before:
-
- # ssm create -s 3G -n vol01_docs -p tecmint_vg --fstype ext4 /mnt/docs /dev/sd{b,c}1
- # ssm create -s 1G -n vol02_logs -p tecmint_vg --fstype ext4 /mnt/logs /dev/sd{b,c}1
- # ssm create -n vol03_homes -p tecmint_vg --fstype ext4 /mnt/homes /dev/sd{b,c}1
-
-Yes! SSM will let you:
-
-- initialize block devices as physical volumes
-- create a volume group
-- create logical volumes
-- format LVs, and
-- mount them using only one command
-
-**9. We can now display the information about PVs, VGs, or LVs, respectively, as follows:**
-
- # ssm list dev
- # ssm list pool
- # ssm list vol
-
-
-
-Check Information of PVs, VGs, or LVs
-
-**10. As we already know, one of the distinguishing features of LVM is the possibility to resize (expand or decrease) logical volumes without downtime.**
-
-Say we are running out of space in vol02_logs but have plenty of space in vol03_homes. We will resize vol03_homes to 4 GB and expand vol02_logs to use the remaining space:
-
- # ssm resize -s 4G /dev/tecmint_vg/vol03_homes
-
-Run ssm list pool again and take note of the free space in tecmint_vg:
-
-
-
-Check Volume Size
-
-Then do:
-
- # ssm resize -s+1.99 /dev/tecmint_vg/vol02_logs
-
-**Note**: that the plus sign after the -s flag indicates that the specified value should be added to the present value.
-
-**11. Removing logical volumes and volume groups is much easier with ssm as well. A simple,**
-
- # ssm remove tecmint_vg
-
-will return a prompt asking you to confirm the deletion of the VG and the LVs it contains:
-
-
-
-Remove Logical Volume and Volume Group
-
-### Managing Encrypted Volumes ###
-
-SSM also provides system administrators with the capability of managing encryption for new or existing volumes. You will need the cryptsetup package installed first:
-
- # yum update && yum install cryptsetup
-
-Then issue the following command to create an encrypted volume. You will be prompted to enter a passphrase to maximize security:
-
- # ssm create -s 3G -n vol01_docs -p tecmint_vg --fstype ext4 --encrypt luks /mnt/docs /dev/sd{b,c}1
- # ssm create -s 1G -n vol02_logs -p tecmint_vg --fstype ext4 --encrypt luks /mnt/logs /dev/sd{b,c}1
- # ssm create -n vol03_homes -p tecmint_vg --fstype ext4 --encrypt luks /mnt/homes /dev/sd{b,c}1
-
-Our next task consists in adding the corresponding entries in /etc/fstab in order for those logical volumes to be available on boot. Rather than using the device identifier (/dev/something).
-
-We will use each LV’s UUID (so that our devices will still be uniquely identified should we add other logical volumes or devices), which we can find out with the blkid utility:
-
- # blkid -o value UUID /dev/tecmint_vg/vol01_docs
- # blkid -o value UUID /dev/tecmint_vg/vol02_logs
- # blkid -o value UUID /dev/tecmint_vg/vol03_homes
-
-In our case:
-
-
-
-Find Logical Volume UUID
-
-Next, create the /etc/crypttab file with the following contents (change the UUIDs for the ones that apply to your setup):
-
- docs UUID=ba77d113-f849-4ddf-8048-13860399fca8 none
- logs UUID=58f89c5a-f694-4443-83d6-2e83878e30e4 none
- homes UUID=92245af6-3f38-4e07-8dd8-787f4690d7ac none
-
-And insert the following entries in /etc/fstab. Note that device_name (/dev/mapper/device_name) is the mapper identifier that appears in the first column of /etc/crypttab.
-
- # Logical volume vol01_docs:
- /dev/mapper/docs /mnt/docs ext4 defaults 0 2
- # Logical volume vol02_logs
- /dev/mapper/logs /mnt/logs ext4 defaults 0 2
- # Logical volume vol03_homes
- /dev/mapper/homes /mnt/homes ext4 defaults 0 2
-
-Now reboot (systemctl reboot) and you will be prompted to enter the passphrase for each LV. Afterwards you can confirm that the mount operation was successful by checking the corresponding mount points:
-
-
-
-Verify Logical Volume Mount Points
-
-### Conclusion ###
-
-In this tutorial we have started to explore how to set up and configure system storage using classic volume management tools and SSM, which also integrates filesystem and encryption capabilities in one package. This makes SSM an invaluable tool for any sysadmin.
-
-Let us know if you have any questions or comments – feel free to use the form below to get in touch with us!
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/rhcsa-exam-create-format-resize-delete-and-encrypt-partitions-in-linux/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:http://www.tecmint.com/create-lvm-storage-in-linux/
\ No newline at end of file
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md b/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md
deleted file mode 100644
index d4801d9923..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md
+++ /dev/null
@@ -1,212 +0,0 @@
-RHCSA Series: Using ACLs (Access Control Lists) and Mounting Samba / NFS Shares – Part 7
-================================================================================
-In the last article ([RHCSA series Part 6][1]) we started explaining how to set up and configure local system storage using parted and ssm.
-
-
-
-RHCSA Series:: Configure ACL’s and Mounting NFS / Samba Shares – Part 7
-
-We also discussed how to create and mount encrypted volumes with a password during system boot. In addition, we warned you to avoid performing critical storage management operations on mounted filesystems. With that in mind we will now review the most used file system formats in Red Hat Enterprise Linux 7 and then proceed to cover the topics of mounting, using, and unmounting both manually and automatically network filesystems (CIFS and NFS), along with the implementation of access control lists for your system.
-
-#### Prerequisites ####
-
-Before proceeding further, please make sure you have a Samba server and a NFS server available (note that NFSv2 is no longer supported in RHEL 7).
-
-During this guide we will use a machine with IP 192.168.0.10 with both services running in it as server, and a RHEL 7 box as client with IP address 192.168.0.18. Later in the article we will tell you which packages you need to install on the client.
-
-### File System Formats in RHEL 7 ###
-
-Beginning with RHEL 7, XFS has been introduced as the default file system for all architectures due to its high performance and scalability. It currently supports a maximum filesystem size of 500 TB as per the latest tests performed by Red Hat and its partners for mainstream hardware.
-
-Also, XFS enables user_xattr (extended user attributes) and acl (POSIX access control lists) as default mount options, unlike ext3 or ext4 (ext2 is considered deprecated as of RHEL 7), which means that you don’t need to specify those options explicitly either on the command line or in /etc/fstab when mounting a XFS filesystem (if you want to disable such options in this last case, you have to explicitly use no_acl and no_user_xattr).
-
-Keep in mind that the extended user attributes can be assigned to files and directories for storing arbitrary additional information such as the mime type, character set or encoding of a file, whereas the access permissions for user attributes are defined by the regular file permission bits.
-
-#### Access Control Lists ####
-
-As every system administrator, either beginner or expert, is well acquainted with regular access permissions on files and directories, which specify certain privileges (read, write, and execute) for the owner, the group, and “the world” (all others). However, feel free to refer to [Part 3 of the RHCSA series][2] if you need to refresh your memory a little bit.
-
-However, since the standard ugo/rwx set does not allow to configure different permissions for different users, ACLs were introduced in order to define more detailed access rights for files and directories than those specified by regular permissions.
-
-In fact, ACL-defined permissions are a superset of the permissions specified by the file permission bits. Let’s see how all of this translates is applied in the real world.
-
-1. There are two types of ACLs: access ACLs, which can be applied to either a specific file or a directory), and default ACLs, which can only be applied to a directory. If files contained therein do not have a ACL set, they inherit the default ACL of their parent directory.
-
-2. To begin, ACLs can be configured per user, per group, or per an user not in the owning group of a file.
-
-3. ACLs are set (and removed) using setfacl, with either the -m or -x options, respectively.
-
-For example, let us create a group named tecmint and add users johndoe and davenull to it:
-
- # groupadd tecmint
- # useradd johndoe
- # useradd davenull
- # usermod -a -G tecmint johndoe
- # usermod -a -G tecmint davenull
-
-And let’s verify that both users belong to supplementary group tecmint:
-
- # id johndoe
- # id davenull
-
-
-
-Verify Users
-
-Let’s now create a directory called playground within /mnt, and a file named testfile.txt inside. We will set the group owner to tecmint and change its default ugo/rwx permissions to 770 (read, write, and execute permissions granted to both the owner and the group owner of the file):
-
- # mkdir /mnt/playground
- # touch /mnt/playground/testfile.txt
- # chmod 770 /mnt/playground/testfile.txt
-
-Then switch user to johndoe and davenull, in that order, and write to the file:
-
- echo "My name is John Doe" > /mnt/playground/testfile.txt
- echo "My name is Dave Null" >> /mnt/playground/testfile.txt
-
-So far so good. Now let’s have user gacanepa write to the file – and the write operation will, which was to be expected.
-
-But what if we actually need user gacanepa (who is not a member of group tecmint) to have write permissions on /mnt/playground/testfile.txt? The first thing that may come to your mind is adding that user account to group tecmint. But that will give him write permissions on ALL files were the write bit is set for the group, and we don’t want that. We only want him to be able to write to /mnt/playground/testfile.txt.
-
- # touch /mnt/playground/testfile.txt
- # chown :tecmint /mnt/playground/testfile.txt
- # chmod 777 /mnt/playground/testfile.txt
- # su johndoe
- $ echo "My name is John Doe" > /mnt/playground/testfile.txt
- $ su davenull
- $ echo "My name is Dave Null" >> /mnt/playground/testfile.txt
- $ su gacanepa
- $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt
-
-
-
-Manage User Permissions
-
-Let’s give user gacanepa read and write access to /mnt/playground/testfile.txt.
-
-Run as root,
-
- # setfacl -R -m u:gacanepa:rwx /mnt/playground
-
-and you’ll have successfully added an ACL that allows gacanepa to write to the test file. Then switch to user gacanepa and try to write to the file again:
-
- $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt
-
-To view the ACLs for a specific file or directory, use getfacl:
-
- # getfacl /mnt/playground/testfile.txt
-
-
-
-Check ACLs of Files
-
-To set a default ACL to a directory (which its contents will inherit unless overwritten otherwise), add d: before the rule and specify a directory instead of a file name:
-
- # setfacl -m d:o:r /mnt/playground
-
-The ACL above will allow users not in the owner group to have read access to the future contents of the /mnt/playground directory. Note the difference in the output of getfacl /mnt/playground before and after the change:
-
-
-
-Set Default ACL in Linux
-
-[Chapter 20 in the official RHEL 7 Storage Administration Guide][3] provides more ACL examples, and I highly recommend you take a look at it and have it handy as reference.
-
-#### Mounting NFS Network Shares ####
-
-To show the list of NFS shares available in your server, you can use the showmount command with the -e option, followed by the machine name or its IP address. This tool is included in the nfs-utils package:
-
- # yum update && yum install nfs-utils
-
-Then do:
-
- # showmount -e 192.168.0.10
-
-and you will get a list of the available NFS shares on 192.168.0.10:
-
-
-
-Check Available NFS Shares
-
-To mount NFS network shares on the local client using the command line on demand, use the following syntax:
-
- # mount -t nfs -o [options] remote_host:/remote/directory /local/directory
-
-which, in our case, translates to:
-
- # mount -t nfs 192.168.0.10:/NFS-SHARE /mnt/nfs
-
-If you get the following error message: “Job for rpc-statd.service failed. See “systemctl status rpc-statd.service” and “journalctl -xn” for details.”, make sure the rpcbind service is enabled and started in your system first:
-
- # systemctl enable rpcbind.socket
- # systemctl restart rpcbind.service
-
-and then reboot. That should do the trick and you will be able to mount your NFS share as explained earlier. If you need to mount the NFS share automatically on system boot, add a valid entry to the /etc/fstab file:
-
- remote_host:/remote/directory /local/directory nfs options 0 0
-
-The variables remote_host, /remote/directory, /local/directory, and options (which is optional) are the same ones used when manually mounting an NFS share from the command line. As per our previous example:
-
- 192.168.0.10:/NFS-SHARE /mnt/nfs nfs defaults 0 0
-
-#### Mounting CIFS (Samba) Network Shares ####
-
-Samba represents the tool of choice to make a network share available in a network with *nix and Windows machines. To show the Samba shares that are available, use the smbclient command with the -L flag, followed by the machine name or its IP address. This tool is included in the samba-client package:
-
-You will be prompted for root’s password in the remote host:
-
- # smbclient -L 192.168.0.10
-
-
-
-Check Samba Shares
-
-To mount Samba network shares on the local client you will need to install first the cifs-utils package:
-
- # yum update && yum install cifs-utils
-
-Then use the following syntax on the command line:
-
- # mount -t cifs -o credentials=/path/to/credentials/file //remote_host/samba_share /local/directory
-
-which, in our case, translates to:
-
- # mount -t cifs -o credentials=~/.smbcredentials //192.168.0.10/gacanepa /mnt/samba
-
-where smbcredentials:
-
- username=gacanepa
- password=XXXXXX
-
-is a hidden file inside root’s home (/root/) with permissions set to 600, so that no one else but the owner of the file can read or write to it.
-
-Please note that the samba_share is the name of the Samba share as returned by smbclient -L remote_host as shown above.
-
-Now, if you need the Samba share to be available automatically on system boot, add a valid entry to the /etc/fstab file as follows:
-
- //remote_host:/samba_share /local/directory cifs options 0 0
-
-The variables remote_host, /samba_share, /local/directory, and options (which is optional) are the same ones used when manually mounting a Samba share from the command line. Following the definitions given in our previous example:
-
- //192.168.0.10/gacanepa /mnt/samba cifs credentials=/root/smbcredentials,defaults 0 0
-
-### Conclusion ###
-
-In this article we have explained how to set up ACLs in Linux, and discussed how to mount CIFS and NFS network shares in a RHEL 7 client.
-
-I recommend you to practice these concepts and even mix them (go ahead and try to set ACLs in mounted network shares) until you feel comfortable. If you have questions or comments feel free to use the form below to contact us anytime. Also, feel free to share this article through your social networks.
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:http://www.tecmint.com/rhcsa-exam-create-format-resize-delete-and-encrypt-partitions-in-linux/
-[2]:http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/
-[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch-acls.html
\ No newline at end of file
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md b/sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md
deleted file mode 100644
index a381b1c94a..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md
+++ /dev/null
@@ -1,215 +0,0 @@
-RHCSA Series: Securing SSH, Setting Hostname and Enabling Network Services – Part 8
-================================================================================
-As a system administrator you will often have to log on to remote systems to perform a variety of administration tasks using a terminal emulator. You will rarely sit in front of a real (physical) terminal, so you need to set up a way to log on remotely to the machines that you will be asked to manage.
-
-In fact, that may be the last thing that you will have to do in front of a physical terminal. For security reasons, using Telnet for this purpose is not a good idea, as all traffic goes through the wire in unencrypted, plain text.
-
-In addition, in this article we will also review how to configure network services to start automatically at boot and learn how to set up network and hostname resolution statically or dynamically.
-
-
-
-RHCSA: Secure SSH and Enable Network Services – Part 8
-
-### Installing and Securing SSH Communication ###
-
-For you to be able to log on remotely to a RHEL 7 box using SSH, you will have to install the openssh, openssh-clients and openssh-servers packages. The following command not only will install the remote login program, but also the secure file transfer tool, as well as the remote file copy utility:
-
- # yum update && yum install openssh openssh-clients openssh-servers
-
-Note that it’s a good idea to install the server counterparts as you may want to use the same machine as both client and server at some point or another.
-
-After installation, there is a couple of basic things that you need to take into account if you want to secure remote access to your SSH server. The following settings should be present in the `/etc/ssh/sshd_config` file.
-
-1. Change the port where the sshd daemon will listen on from 22 (the default value) to a high port (2000 or greater), but first make sure the chosen port is not being used.
-
-For example, let’s suppose you choose port 2500. Use [netstat][1] in order to check whether the chosen port is being used or not:
-
- # netstat -npltu | grep 2500
-
-If netstat does not return anything, you can safely use port 2500 for sshd, and you should change the Port setting in the configuration file as follows:
-
- Port 2500
-
-2. Only allow protocol 2:
-
-Protocol 2
-
-3. Configure the authentication timeout to 2 minutes, do not allow root logins, and restrict to a minimum the list of users which are allowed to login via ssh:
-
- LoginGraceTime 2m
- PermitRootLogin no
- AllowUsers gacanepa
-
-4. If possible, use key-based instead of password authentication:
-
- PasswordAuthentication no
- RSAAuthentication yes
- PubkeyAuthentication yes
-
-This assumes that you have already created a key pair with your user name on your client machine and copied it to your server as explained here.
-
-- [Enable SSH Passwordless Login][2]
-
-### Configuring Networking and Name Resolution ###
-
-1. Every system administrator should be well acquainted with the following system-wide configuration files:
-
-- /etc/hosts is used to resolve names <---> IPs in small networks.
-
-Every line in the `/etc/hosts` file has the following structure:
-
- IP address - Hostname - FQDN
-
-For example,
-
- 192.168.0.10 laptop laptop.gabrielcanepa.com.ar
-
-2. `/etc/resolv.conf` specifies the IP addresses of DNS servers and the search domain, which is used for completing a given query name to a fully qualified domain name when no domain suffix is supplied.
-
-Under normal circumstances, you don’t need to edit this file as it is managed by the system. However, should you want to change DNS servers, be advised that you need to stick to the following structure in each line:
-
- nameserver - IP address
-
-For example,
-
- nameserver 8.8.8.8
-
-3. 3. `/etc/host.conf` specifies the methods and the order by which hostnames are resolved within a network. In other words, tells the name resolver which services to use, and in what order.
-
-Although this file has several options, the most common and basic setup includes a line as follows:
-
- order bind,hosts
-
-Which indicates that the resolver should first look in the nameservers specified in `resolv.conf` and then to the `/etc/hosts` file for name resolution.
-
-4. `/etc/sysconfig/network` contains routing and global host information for all network interfaces. The following values may be used:
-
- NETWORKING=yes|no
- HOSTNAME=value
-
-Where value should be the Fully Qualified Domain Name (FQDN).
-
- GATEWAY=XXX.XXX.XXX.XXX
-
-Where XXX.XXX.XXX.XXX is the IP address of the network’s gateway.
-
- GATEWAYDEV=value
-
-In a machine with multiple NICs, value is the gateway device, such as enp0s3.
-
-5. Files inside `/etc/sysconfig/network-scripts` (network adapters configuration files).
-
-Inside the directory mentioned previously, you will find several plain text files named.
-
- ifcfg-name
-
-Where name is the name of the NIC as returned by ip link show:
-
-
-
-Check Network Link Status
-
-For example:
-
-
-
-Network Files
-
-Other than for the loopback interface, you can expect a similar configuration for your NICs. Note that some variables, if set, will override those present in `/etc/sysconfig/network` for this particular interface. Each line is commented for clarification in this article but in the actual file you should avoid comments:
-
- HWADDR=08:00:27:4E:59:37 # The MAC address of the NIC
- TYPE=Ethernet # Type of connection
- BOOTPROTO=static # This indicates that this NIC has been assigned a static IP. If this variable was set to dhcp, the NIC will be assigned an IP address by a DHCP server and thus the next two lines should not be present in that case.
- IPADDR=192.168.0.18
- NETMASK=255.255.255.0
- GATEWAY=192.168.0.1
- NM_CONTROLLED=no # Should be added to the Ethernet interface to prevent NetworkManager from changing the file.
- NAME=enp0s3
- UUID=14033805-98ef-4049-bc7b-d4bea76ed2eb
- ONBOOT=yes # The operating system should bring up this NIC during boot
-
-### Setting Hostnames ###
-
-In Red Hat Enterprise Linux 7, the hostnamectl command is used to both query and set the system’s hostname.
-
-To display the current hostname, type:
-
- # hostnamectl status
-
-
-
-Check System Hostname
-
-To change the hostname, use
-
- # hostnamectl set-hostname [new hostname]
-
-For example,
-
- # hostnamectl set-hostname cinderella
-
-For the changes to take effect you will need to restart the hostnamed daemon (that way you will not have to log off and on again in order to apply the change):
-
- # systemctl restart systemd-hostnamed
-
-
-
-Set System Hostname
-
-In addition, RHEL 7 also includes the nmcli utility that can be used for the same purpose. To display the hostname, run:
-
- # nmcli general hostname
-
-and to change it:
-
- # nmcli general hostname [new hostname]
-
-For example,
-
- # nmcli general hostname rhel7
-
-
-
-Set Hostname Using nmcli Command
-
-### Starting Network Services on Boot ###
-
-To wrap up, let us see how we can ensure that network services are started automatically on boot. In simple terms, this is done by creating symlinks to certain files specified in the [Install] section of the service configuration files.
-
-In the case of firewalld (/usr/lib/systemd/system/firewalld.service):
-
- [Install]
- WantedBy=basic.target
- Alias=dbus-org.fedoraproject.FirewallD1.service
-
-To enable the service:
-
- # systemctl enable firewalld
-
-On the other hand, disabling firewalld entitles removing the symlinks:
-
- # systemctl disable firewalld
-
-
-
-Enable Service at System Boot
-
-### Conclusion ###
-
-In this article we have summarized how to install and secure connections via SSH to a RHEL server, how to change its name, and finally how to ensure that network services are started on boot. If you notice that a certain service has failed to start properly, you can use systemctl status -l [service] and journalctl -xn to troubleshoot it.
-
-Feel free to let us know what you think about this article using the comment form below. Questions are also welcome. We look forward to hearing from you!
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/rhcsa-series-secure-ssh-set-hostname-enable-network-services-in-rhel-7/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:http://www.tecmint.com/20-netstat-commands-for-linux-network-management/
-[2]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/
\ No newline at end of file
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md b/sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md
deleted file mode 100644
index 6a1e544de3..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md
+++ /dev/null
@@ -1,176 +0,0 @@
-RHCSA Series: Installing, Configuring and Securing a Web and FTP Server – Part 9
-================================================================================
-A web server (also known as a HTTP server) is a service that handles content (most commonly web pages, but other types of documents as well) over to a client in a network.
-
-A FTP server is one of the oldest and most commonly used resources (even to this day) to make files available to clients on a network in cases where no authentication is necessary since FTP uses username and password without encryption.
-
-The web server available in RHEL 7 is version 2.4 of the Apache HTTP Server. As for the FTP server, we will use the Very Secure Ftp Daemon (aka vsftpd) to establish connections secured by TLS.
-
-
-
-RHCSA: Installing, Configuring and Securing Apache and FTP – Part 9
-
-In this article we will explain how to install, configure, and secure a web server and a FTP server in RHEL 7.
-
-### Installing Apache and FTP Server ###
-
-In this guide we will use a RHEL 7 server with a static IP address of 192.168.0.18/24. To install Apache and VSFTPD, run the following command:
-
- # yum update && yum install httpd vsftpd
-
-When the installation completes, both services will be disabled initially, so we need to start them manually for the time being and enable them to start automatically beginning with the next boot:
-
- # systemctl start httpd
- # systemctl enable httpd
- # systemctl start vsftpd
- # systemctl enable vsftpd
-
-In addition, we have to open ports 80 and 21, where the web and ftp daemons are listening, respectively, in order to allow access to those services from the outside:
-
- # firewall-cmd --zone=public --add-port=80/tcp --permanent
- # firewall-cmd --zone=public --add-service=ftp --permanent
- # firewall-cmd --reload
-
-To confirm that the web server is working properly, fire up your browser and enter the IP of the server. You should see the test page:
-
-
-
-Confirm Apache Web Server
-
-As for the ftp server, we will have to configure it further, which we will do in a minute, before confirming that it’s working as expected.
-
-### Configuring and Securing Apache Web Server ###
-
-The main configuration file for Apache is located in `/etc/httpd/conf/httpd.conf`, but it may rely on other files present inside `/etc/httpd/conf.d`.
-
-Although the default configuration should be sufficient for most cases, it’s a good idea to become familiar with all the available options as described in the [official documentation][1].
-
-As always, make a backup copy of the main configuration file before editing it:
-
- # cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.$(date +%Y%m%d)
-
-Then open it with your preferred text editor and look for the following variables:
-
-- ServerRoot: the directory where the server’s configuration, error, and log files are kept.
-- Listen: instructs Apache to listen on specific IP address and / or ports.
-- Include: allows the inclusion of other configuration files, which must exist. Otherwise, the server will fail, as opposed to the IncludeOptional directive, which is silently ignored if the specified configuration files do not exist.
-- User and Group: the name of the user/group to run the httpd service as.
-- DocumentRoot: The directory out of which Apache will serve your documents. By default, all requests are taken from this directory, but symbolic links and aliases may be used to point to other locations.
-- ServerName: this directive sets the hostname (or IP address) and port that the server uses to identify itself.
-
-The first security measure will consist of creating a dedicated user and group (i.e. tecmint/tecmint) to run the web server as and changing the default port to a higher one (9000 in this case):
-
- ServerRoot "/etc/httpd"
- Listen 192.168.0.18:9000
- User tecmint
- Group tecmint
- DocumentRoot "/var/www/html"
- ServerName 192.168.0.18:9000
-
-You can test the configuration file with.
-
- # apachectl configtest
-
-and if everything is OK, then restart the web server.
-
- # systemctl restart httpd
-
-and don’t forget to enable the new port (and disable the old one) in the firewall:
-
- # firewall-cmd --zone=public --remove-port=80/tcp --permanent
- # firewall-cmd --zone=public --add-port=9000/tcp --permanent
- # firewall-cmd --reload
-
-Note that, due to SELinux policies, you can only use the ports returned by
-
- # semanage port -l | grep -w '^http_port_t'
-
-for the web server.
-
-If you want to use another port (i.e. TCP port 8100), you will have to add it to SELinux port context for the httpd service:
-
-# semanage port -a -t http_port_t -p tcp 8100
-
-
-
-Add Apache Port to SELinux Policies
-
-To further secure your Apache installation, follow these steps:
-
-1. The user Apache is running as should not have access to a shell:
-
- # usermod -s /sbin/nologin tecmint
-
-2. Disable directory listing in order to prevent the browser from displaying the contents of a directory if there is no index.html present in that directory.
-
-Edit `/etc/httpd/conf/httpd.conf` (and the configuration files for virtual hosts, if any) and make sure that the Options directive, both at the top and at Directory block levels, is set to None:
-
- Options None
-
-3. Hide information about the web server and the operating system in HTTP responses. Edit /etc/httpd/conf/httpd.conf as follows:
-
- ServerTokens Prod
- ServerSignature Off
-
-Now you are ready to start serving content from your /var/www/html directory.
-
-### Configuring and Securing FTP Server ###
-
-As in the case of Apache, the main configuration file for Vsftpd `(/etc/vsftpd/vsftpd.conf)` is well commented and while the default configuration should suffice for most applications, you should become acquainted with the documentation and the man page `(man vsftpd.conf)` in order to operate the ftp server more efficiently (I can’t emphasize that enough!).
-
-In our case, these are the directives used:
-
- anonymous_enable=NO
- local_enable=YES
- write_enable=YES
- local_umask=022
- dirmessage_enable=YES
- xferlog_enable=YES
- connect_from_port_20=YES
- xferlog_std_format=YES
- chroot_local_user=YES
- allow_writeable_chroot=YES
- listen=NO
- listen_ipv6=YES
- pam_service_name=vsftpd
- userlist_enable=YES
- tcp_wrappers=YES
-
-By using `chroot_local_user=YES`, local users will be (by default) placed in a chroot’ed jail in their home directory right after login. This means that local users will not be able to access any files outside their corresponding home directories.
-
-Finally, to allow ftp to read files in the user’s home directory, set the following SELinux boolean:
-
- # setsebool -P ftp_home_dir on
-
-You can now connect to the ftp server using a client such as Filezilla:
-
-
-
-Check FTP Connection
-
-Note that the `/var/log/xferlo`g log records downloads and uploads, which concur with the above directory listing:
-
-
-
-Monitor FTP Download and Upload
-
-Read Also: [Limit FTP Network Bandwidth Used by Applications in a Linux System with Trickle][2]
-
-### Summary ###
-
-In this tutorial we have explained how to set up a web and a ftp server. Due to the vastness of the subject, it is not possible to cover all the aspects of these topics (i.e. virtual web hosts). Thus, I recommend you also check other excellent articles in this website about [Apache][3].
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/rhcsa-series-install-and-secure-apache-web-server-and-ftp-in-rhel/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:http://httpd.apache.org/docs/2.4/
-[2]:http://www.tecmint.com/manage-and-limit-downloadupload-bandwidth-with-trickle-in-linux/
-[3]:http://www.google.com/cse?cx=partner-pub-2601749019656699:2173448976&ie=UTF-8&q=virtual+hosts&sa=Search&gws_rd=cr&ei=Dy9EVbb0IdHisASnroG4Bw#gsc.tab=0&gsc.q=apache
\ No newline at end of file
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md b/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md
deleted file mode 100644
index 04c7d7a29e..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md
+++ /dev/null
@@ -1,197 +0,0 @@
-RHCSA Series: Yum Package Management, Automating Tasks with Cron and Monitoring System Logs – Part 10
-================================================================================
-In this article we will review how to install, update, and remove packages in Red Hat Enterprise Linux 7. We will also cover how to automate tasks using cron, and will finish this guide explaining how to locate and interpret system logs files with the focus of teaching you why all of these are essential skills for every system administrator.
-
-
-
-RHCSA: Yum Package Management, Cron Job Scheduling and Log Monitoring – Part 10
-
-### Managing Packages Via Yum ###
-
-To install a package along with all its dependencies that are not already installed, you will use:
-
- # yum -y install package_name(s)
-
-Where package_name(s) represent at least one real package name.
-
-For example, to install httpd and mlocate (in that order), type.
-
- # yum -y install httpd mlocate
-
-**Note**: That the letter y in the example above bypasses the confirmation prompts that yum presents before performing the actual download and installation of the requested programs. You can leave it out if you want.
-
-By default, yum will install the package with the architecture that matches the OS architecture, unless overridden by appending the package architecture to its name.
-
-For example, on a 64 bit system, yum install package will install the x86_64 version of package, whereas yum install package.x86 (if available) will install the 32-bit one.
-
-There will be times when you want to install a package but don’t know its exact name. The search all or search options can search the currently enabled repositories for a certain keyword in the package name and/or in its description as well, respectively.
-
-For example,
-
- # yum search log
-
-will search the installed repositories for packages with the word log in their names and summaries, whereas
-
- # yum search all log
-
-will look for the same keyword in the package description and url fields as well.
-
-Once the search returns a package listing, you may want to display further information about some of them before installing. That is when the info option will come in handy:
-
- # yum info logwatch
-
-
-
-Search Package Information
-
-You can regularly check for updates with the following command:
-
- # yum check-update
-
-The above command will return all the installed packages for which an update is available. In the example shown in the image below, only rhel-7-server-rpms has an update available:
-
-
-
-Check For Package Updates
-
-You can then update that package alone with,
-
- # yum update rhel-7-server-rpms
-
-If there are several packages that can be updated, yum update will update all of them at once.
-
-Now what happens when you know the name of an executable, such as ps2pdf, but don’t know which package provides it? You can find out with `yum whatprovides “*/[executable]”`:
-
- # yum whatprovides “*/ps2pdf”
-
-
-
-Find Package Belongs to Which Package
-
-Now, when it comes to removing a package, you can do so with yum remove package. Easy, huh? This goes to show that yum is a complete and powerful package manager.
-
- # yum remove httpd
-
-Read Also: [20 Yum Commands to Manage RHEL 7 Package Management][1]
-
-### Good Old Plain RPM ###
-
-RPM (aka RPM Package Manager, or originally RedHat Package Manager) can also be used to install or update packages when they come in form of standalone `.rpm` packages.
-
-It is often utilized with the `-Uvh` flags to indicate that it should install the package if it’s not already present or attempt to update it if it’s installed `(-U)`, producing a verbose output `(-v)` and a progress bar with hash marks `(-h)` while the operation is being performed. For example,
-
- # rpm -Uvh package.rpm
-
-Another typical use of rpm is to produce a list of currently installed packages with code>rpm -qa (short for query all):
-
- # rpm -qa
-
-
-
-Query All RPM Packages
-
-Read Also: [20 RPM Commands to Install Packages in RHEL 7][2]
-
-### Scheduling Tasks using Cron ###
-
-Linux and other Unix-like operating systems include a tool called cron that allows you to schedule tasks (i.e. commands or shell scripts) to run on a periodic basis. Cron checks every minute the /var/spool/cron directory for files which are named after accounts in /etc/passwd.
-
-When executing commands, any output is mailed to the owner of the crontab (or to the user specified in the MAILTO environment variable in the /etc/crontab, if it exists).
-
-Crontab files (which are created by typing crontab -e and pressing Enter) have the following format:
-
-
-
-Crontab Entries
-
-Thus, if we want to update the local file database (which is used by locate to find files by name or pattern) every second day of the month at 2:15 am, we need to add the following crontab entry:
-
- 15 02 2 * * /bin/updatedb
-
-The above crontab entry reads, “Run /bin/updatedb on the second day of the month, every month of the year, regardless of the day of the week, at 2:15 am”. As I’m sure you already guessed, the star symbol is used as a wildcard character.
-
-After adding a cron job, you can see that a file named root was added inside /var/spool/cron, as we mentioned earlier. That file lists all the tasks that the crond daemon should run:
-
- # ls -l /var/spool/cron
-
-
-
-Check All Cron Jobs
-
-In the above image, the current user’s crontab can be displayed either using cat /var/spool/cron/root or,
-
- # crontab -l
-
-If you need to run a task on a more fine-grained basis (for example, twice a day or three times each month), cron can also help you to do that.
-
-For example, to run /my/script on the 1st and 15th of each month and send any output to /dev/null, you can add two crontab entries as follows:
-
- 01 00 1 * * /myscript > /dev/null 2>&1
- 01 00 15 * * /my/script > /dev/null 2>&1
-
-But in order for the task to be easier to maintain, you can combine both entries into one:
-
- 01 00 1,15 * * /my/script > /dev/null 2>&1
-
-Following the previous example, we can run /my/other/script at 1:30 am on the first day of the month every three months:
-
- 30 01 1 1,4,7,10 * /my/other/script > /dev/null 2>&1
-
-But when you have to repeat a certain task every “x” minutes, hours, days, or months, you can divide the right position by the desired frequency. The following crontab entry has the exact same meaning as the previous one:
-
- 30 01 1 */3 * /my/other/script > /dev/null 2>&1
-
-Or perhaps you need to run a certain job on a fixed frequency or after the system boots, for example. You can use one of the following string instead of the five fields to indicate the exact time when you want your job to run:
-
- @reboot Run when the system boots.
- @yearly Run once a year, same as 00 00 1 1 *.
- @monthly Run once a month, same as 00 00 1 * *.
- @weekly Run once a week, same as 00 00 * * 0.
- @daily Run once a day, same as 00 00 * * *.
- @hourly Run once an hour, same as 00 * * * *.
-
-Read Also: [11 Commands to Schedule Cron Jobs in RHEL 7][3]
-
-### Locating and Checking Logs ###
-
-System logs are located (and rotated) inside the /var/log directory. According to the Linux Filesystem Hierarchy Standard, this directory contains miscellaneous log files, which are written to it or an appropriate subdirectory (such as audit, httpd, or samba in the image below) by the corresponding daemons during system operation:
-
- # ls /var/log
-
-
-
-Linux Log Files Location
-
-Other interesting logs are [dmesg][4] (contains all messages from kernel ring buffer), secure (logs connection attempts that require user authentication), messages (system-wide messages) and wtmp (records of all user logins and logouts).
-
-Logs are very important in that they allow you to have a glimpse of what is going on at all times in your system, and what has happened in the past. They represent a priceless tool to troubleshoot and monitor a Linux server, and thus are often used with the `tail -f command` to display events, in real time, as they happen and are recorded in a log.
-
-For example, if you want to display kernel-related events, type the following command:
-
- # tail -f /var/log/dmesg
-
-Same if you want to view access to your web server:
-
- # tail -f /var/log/httpd/access.log
-
-### Summary ###
-
-If you know how to efficiently manage packages, schedule tasks, and where to look for information about the current and past operation of your system you can rest assure that you will not run into surprises very often. I hope this article has helped you learn or refresh your knowledge about these basic skills.
-
-Don’t hesitate to drop us a line using the contact form below if you have any questions or comments.
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/yum-package-management-cron-job-scheduling-monitoring-linux-logs/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/
-[2]:http://www.tecmint.com/20-practical-examples-of-rpm-commands-in-linux/
-[3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/
-[4]:http://www.tecmint.com/dmesg-commands/
\ No newline at end of file
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md b/sources/tech/RHCSA Series/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md
deleted file mode 100644
index fd27f4c6fc..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md
+++ /dev/null
@@ -1,191 +0,0 @@
-RHCSA Series: Firewall Essentials and Network Traffic Control Using FirewallD and Iptables – Part 11
-================================================================================
-In simple words, a firewall is a security system that controls the incoming and outgoing traffic in a network based on a set of predefined rules (such as the packet destination / source or type of traffic, for example).
-
-
-
-RHCSA: Control Network Traffic with FirewallD and Iptables – Part 11
-
-In this article we will review the basics of firewalld, the default dynamic firewall daemon in Red Hat Enterprise Linux 7, and iptables service, the legacy firewall service for Linux, with which most system and network administrators are well acquainted, and which is also available in RHEL 7.
-
-### A Comparison Between FirewallD and Iptables ###
-
-Under the hood, both firewalld and the iptables service talk to the netfilter framework in the kernel through the same interface, not surprisingly, the iptables command. However, as opposed to the iptables service, firewalld can change the settings during normal system operation without existing connections being lost.
-
-Firewalld should be installed by default in your RHEL system, though it may not be running. You can verify with the following commands (firewall-config is the user interface configuration tool):
-
- # yum info firewalld firewall-config
-
-
-
-Check FirewallD Information
-
-and,
-
- # systemctl status -l firewalld.service
-
-
-
-Check FirewallD Status
-
-On the other hand, the iptables service is not included by default, but can be installed through.
-
- # yum update && yum install iptables-services
-
-Both daemons can be started and enabled to start on boot with the usual systemd commands:
-
- # systemctl start firewalld.service | iptables-service.service
- # systemctl enable firewalld.service | iptables-service.service
-
-Read Also: [Useful Commands to Manage Systemd Services][1]
-
-As for the configuration files, the iptables service uses `/etc/sysconfig/iptables` (which will not exist if the package is not installed in your system). On a RHEL 7 box used as a cluster node, this file looks as follows:
-
-
-
-Iptables Firewall Configuration
-
-Whereas firewalld store its configuration across two directories, `/usr/lib/firewalld` and `/etc/firewalld`:
-
- # ls /usr/lib/firewalld /etc/firewalld
-
-
-
-FirewallD Configuration
-
-We will examine these configuration files further later in this article, after we add a few rules here and there. By now it will suffice to remind you that you can always find more information about both tools with.
-
- # man firewalld.conf
- # man firewall-cmd
- # man iptables
-
-Other than that, remember to take a look at [Reviewing Essential Commands & System Documentation – Part 1][2] of the current series, where I described several sources where you can get information about the packages installed on your RHEL 7 system.
-
-### Using Iptables to Control Network Traffic ###
-
-You may want to refer to [Configure Iptables Firewall – Part 8][3] of the Linux Foundation Certified Engineer (LFCE) series to refresh your memory about iptables internals before proceeding further. Thus, we will be able to jump in right into the examples.
-
-**Example 1: Allowing both incoming and outgoing web traffic**
-
-TCP ports 80 and 443 are the default ports used by the Apache web server to handle normal (HTTP) and secure (HTTPS) web traffic. You can allow incoming and outgoing web traffic through both ports on the enp0s3 interface as follows:
-
- # iptables -A INPUT -i enp0s3 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
- # iptables -A OUTPUT -o enp0s3 -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT
- # iptables -A INPUT -i enp0s3 -p tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT
- # iptables -A OUTPUT -o enp0s3 -p tcp --sport 443 -m state --state ESTABLISHED -j ACCEPT
-
-**Example 2: Block all (or some) incoming connections from a specific network**
-
-There may be times when you need to block all (or some) type of traffic originating from a specific network, say 192.168.1.0/24 for example:
-
- # iptables -I INPUT -s 192.168.1.0/24 -j DROP
-
-will drop all packages coming from the 192.168.1.0/24 network, whereas,
-
- # iptables -A INPUT -s 192.168.1.0/24 --dport 22 -j ACCEPT
-
-will only allow incoming traffic through port 22.
-
-**Example 3: Redirect incoming traffic to another destination**
-
-If you use your RHEL 7 box not only as a software firewall, but also as the actual hardware-based one, so that it sits between two distinct networks, IP forwarding must have been already enabled in your system. If not, you need to edit `/etc/sysctl.conf` and set the value of net.ipv4.ip_forward to 1, as follows:
-
- net.ipv4.ip_forward = 1
-
-then save the change, close your text editor and finally run the following command to apply the change:
-
- # sysctl -p /etc/sysctl.conf
-
-For example, you may have a printer installed at an internal box with IP 192.168.0.10, with the CUPS service listening on port 631 (both on the print server and on your firewall). In order to forward print requests from clients on the other side of the firewall, you should add the following iptables rule:
-
- # iptables -t nat -A PREROUTING -i enp0s3 -p tcp --dport 631 -j DNAT --to 192.168.0.10:631
-
-Please keep in mind that iptables reads its rules sequentially, so make sure the default policies or later rules do not override those outlined in the examples above.
-
-### Getting Started with FirewallD ###
-
-One of the changes introduced with firewalld are zones. This concept allows to separate networks into different zones level of trust the user has decided to place on the devices and traffic within that network.
-
-To list the active zones:
-
- # firewall-cmd --get-active-zones
-
-In the example below, the public zone is active, and the enp0s3 interface has been assigned to it automatically. To view all the information about a particular zone:
-
- # firewall-cmd --zone=public --list-all
-
-
-
-List all FirewallD Zones
-
-Since you can read more about zones in the [RHEL 7 Security guide][4], we will only list some specific examples here.
-
-**Example 4: Allowing services through the firewall**
-
-To get a list of the supported services, use.
-
- # firewall-cmd --get-services
-
-
-
-List All Supported Services
-
-To allow http and https web traffic through the firewall, effective immediately and on subsequent boots:
-
- # firewall-cmd --zone=MyZone --add-service=http
- # firewall-cmd --zone=MyZone --permanent --add-service=http
- # firewall-cmd --zone=MyZone --add-service=https
- # firewall-cmd --zone=MyZone --permanent --add-service=https
- # firewall-cmd --reload
-
-If code>–zone is omitted, the default zone (you can check with firewall-cmd –get-default-zone) is used.
-
-To remove the rule, replace the word add with remove in the above commands.
-
-**Example 5: IP / Port forwarding**
-
-First off, you need to find out if masquerading is enabled for the desired zone:
-
- # firewall-cmd --zone=MyZone --query-masquerade
-
-In the image below, we can see that masquerading is enabled for the external zone, but not for public:
-
-
-
-Check Masquerading Status
-
-You can either enable masquerading for public:
-
- # firewall-cmd --zone=public --add-masquerade
-
-or use masquerading in external. Here’s what we would do to replicate Example 3 with firewalld:
-
- # firewall-cmd --zone=external --add-forward-port=port=631:proto=tcp:toport=631:toaddr=192.168.0.10
-
-And don’t forget to reload the firewall.
-
-You can find further examples on [Part 9][5] of the RHCSA series, where we explained how to allow or disable the ports that are usually used by a web server and a ftp server, and how to change the corresponding rule when the default port for those services are changed. In addition, you may want to refer to the firewalld wiki for further examples.
-
-Read Also: [Useful FirewallD Examples to Configure Firewall in RHEL 7][6]
-
-### Conclusion ###
-
-In this article we have explained what a firewall is, what are the available services to implement one in RHEL 7, and provided a few examples that can help you get started with this task. If you have any comments, suggestions, or questions, feel free to let us know using the form below. Thank you in advance!
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/firewalld-vs-iptables-and-control-network-traffic-in-firewall/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/
-[2]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/
-[3]:http://www.tecmint.com/configure-iptables-firewall/
-[4]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Using_Firewalls.html
-[5]:http://www.tecmint.com/rhcsa-series-install-and-secure-apache-web-server-and-ftp-in-rhel/
-[6]:http://www.tecmint.com/firewalld-rules-for-centos-7/
\ No newline at end of file
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md b/sources/tech/RHCSA Series/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md
deleted file mode 100644
index a4365e311e..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md
+++ /dev/null
@@ -1,142 +0,0 @@
-RHCSA Series: Automate RHEL 7 Installations Using ‘Kickstart’ – Part 12
-================================================================================
-Linux servers are rarely standalone boxes. Whether it is in a datacenter or in a lab environment, chances are that you have had to install several machines that will interact one with another in some way. If you multiply the time that it takes to install Red Hat Enterprise Linux 7 manually on a single server by the number of boxes that you need to set up, this can lead to a rather lengthy effort that can be avoided through the use of an unattended installation tool known as kickstart.
-
-In this article we will show what you need to use kickstart utility so that you can forget about babysitting servers during the installation process.
-
-
-
-RHCSA: Automatic Kickstart Installation of RHEL 7
-
-#### Introducing Kickstart and Automated Installations ####
-
-Kickstart is an automated installation method used primarily by Red Hat Enterprise Linux (and other Fedora spin-offs, such as CentOS, Oracle Linux, etc.) to execute unattended operating system installation and configuration. Thus, kickstart installations allow system administrators to have identical systems, as far as installed package groups and system configuration are concerned, while sparing them the hassle of having to manually install each of them.
-
-### Preparing for a Kickstart Installation ###
-
-To perform a kickstart installation, we need to follow these steps:
-
-1. Create a Kickstart file, a plain text file with several predefined configuration options.
-
-2. Make the Kickstart file available on removable media, a hard drive or a network location. The client will use the rhel-server-7.0-x86_64-boot.iso file, whereas you will need to make the full ISO image (rhel-server-7.0-x86_64-dvd.iso) available from a network resource, such as a HTTP of FTP server (in our present case, we will use another RHEL 7 box with IP 192.168.0.18).
-
-3. Start the Kickstart installation
-
-To create a kickstart file, login to your Red Hat Customer Portal account, and use the [Kickstart configuration tool][1] to choose the desired installation options. Read each one of them carefully before scrolling down, and choose what best fits your needs:
-
-
-
-Kickstart Configuration Tool
-
-If you specify that the installation should be performed either through HTTP, FTP, or NFS, make sure the firewall on the server allows those services.
-
-Although you can use the Red Hat online tool to create a kickstart file, you can also create it manually using the following lines as reference. You will notice, for example, that the installation process will be in English, using the latin american keyboard layout and the America/Argentina/San_Luis time zone:
-
- lang en_US
- keyboard la-latin1
- timezone America/Argentina/San_Luis --isUtc
- rootpw $1$5sOtDvRo$In4KTmX7OmcOW9HUvWtfn0 --iscrypted
- #platform x86, AMD64, or Intel EM64T
- text
- url --url=http://192.168.0.18//kickstart/media
- bootloader --location=mbr --append="rhgb quiet crashkernel=auto"
- zerombr
- clearpart --all --initlabel
- autopart
- auth --passalgo=sha512 --useshadow
- selinux --enforcing
- firewall --enabled
- firstboot --disable
- %packages
- @base
- @backup-server
- @print-server
- %end
-
-In the online configuration tool, use 192.168.0.18 for HTTP Server and `/kickstart/tecmint.bin` for HTTP Directory in the Installation section after selecting HTTP as installation source. Finally, click the Download button at the right top corner to download the kickstart file.
-
-In the kickstart sample file above, you need to pay careful attention to.
-
- url --url=http://192.168.0.18//kickstart/media
-
-That directory is where you need to extract the contents of the DVD or ISO installation media. Before doing that, we will mount the ISO installation file in /media/rhel as a loop device:
-
- # mount -o loop /var/www/html/kickstart/rhel-server-7.0-x86_64-dvd.iso /media/rhel
-
-
-
-Mount RHEL ISO Image
-
-Next, copy all the contents of /media/rhel to /var/www/html/kickstart/media:
-
- # cp -R /media/rhel /var/www/html/kickstart/media
-
-When you’re done, the directory listing and disk usage of /var/www/html/kickstart/media should look as follows:
-
-
-
-Kickstart Media Files
-
-Now we’re ready to kick off the kickstart installation.
-
-Regardless of how you choose to create the kickstart file, it’s always a good idea to check its syntax before proceeding with the installation. To do that, install the pykickstart package.
-
- # yum update && yum install pykickstart
-
-And then use the ksvalidator utility to check the file:
-
- # ksvalidator /var/www/html/kickstart/tecmint.bin
-
-If the syntax is correct, you will not get any output, whereas if there’s an error in the file, you will get a warning notice indicating the line where the syntax is not correct or unknown.
-
-### Performing a Kickstart Installation ###
-
-To start, boot your client using the rhel-server-7.0-x86_64-boot.iso file. When the initial screen appears, select Install Red Hat Enterprise Linux 7.0 and press the Tab key to append the following stanza and press Enter:
-
- # inst.ks=http://192.168.0.18/kickstart/tecmint.bin
-
-
-
-RHEL Kickstart Installation
-
-Where tecmint.bin is the kickstart file created earlier.
-
-When you press Enter, the automated installation will begin, and you will see the list of packages that are being installed (the number and the names will differ depending on your choice of programs and package groups):
-
-
-
-Automatic Kickstart Installation of RHEL 7
-
-When the automated process ends, you will be prompted to remove the installation media and then you will be able to boot into your newly installed system:
-
-
-
-RHEL 7 Boot Screen
-
-Although you can create your kickstart files manually as we mentioned earlier, you should consider using the recommended approach whenever possible. You can either use the online configuration tool, or the anaconda-ks.cfg file that is created by the installation process in root’s home directory.
-
-This file actually is a kickstart file, so you may want to install the first box manually with all the desired options (maybe modify the logical volumes layout or the file system on top of each one) and then use the resulting anaconda-ks.cfg file to automate the installation of the rest.
-
-In addition, using the online configuration tool or the anaconda-ks.cfg file to guide future installations will allow you to perform them using an encrypted root password out-of-the-box.
-
-### Conclusion ###
-
-Now that you know how to create kickstart files and how to use them to automate the installation of Red Hat Enterprise Linux 7 servers, you can forget about babysitting the installation process. This will give you time to do other things, or perhaps some leisure time if you’re lucky.
-
-Either way, let us know what you think about this article using the form below. Questions are also welcome!
-
-Read Also: [Automated Installations of Multiple RHEL/CentOS 7 Distributions using PXE and Kickstart][2]
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/automatic-rhel-installations-using-kickstart/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:https://access.redhat.com/labs/kickstartconfig/
-[2]:http://www.tecmint.com/multiple-centos-installations-using-kickstart/
\ No newline at end of file
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md b/sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md
deleted file mode 100644
index 1a0d08df8f..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md
+++ /dev/null
@@ -1,176 +0,0 @@
-RHCSA Series: Mandatory Access Control Essentials with SELinux in RHEL 7 – Part 13
-================================================================================
-During this series we have explored in detail at least two access control methods: standard ugo/rwx permissions ([Manage Users and Groups – Part 3][1]) and access control lists ([Configure ACL’s on File Systems – Part 7][2]).
-
-
-
-RHCSA Exam: SELinux Essentials and Control FileSystem Access
-
-Although necessary as first level permissions and access control mechanisms, they have some limitations that are addressed by Security Enhanced Linux (aka SELinux for short).
-
-One of such limitations is that a user can expose a file or directory to a security breach through a poorly elaborated chmod command and thus cause an unexpected propagation of access rights. As a result, any process started by that user can do as it pleases with the files owned by the user, where finally a malicious or otherwise compromised software can achieve root-level access to the entire system.
-
-With those limitations in mind, the United States National Security Agency (NSA) first devised SELinux, a flexible mandatory access control method, to restrict the ability of processes to access or perform other operations on system objects (such as files, directories, network ports, etc) to the least permission model, which can be modified later as needed. In few words, each element of the system is given only the access required to function.
-
-In RHEL 7, SELinux is incorporated into the kernel itself and is enabled in Enforcing mode by default. In this article we will explain briefly the basic concepts associated with SELinux and its operation.
-
-### SELinux Modes ###
-
-SELinux can operate in three different ways:
-
-- Enforcing: SELinux denies access based on SELinux policy rules, a set of guidelines that control the security engine.
-- Permissive: SELinux does not deny access, but denials are logged for actions that would have been denied if running in enforcing mode.
-- Disabled (self-explanatory).
-
-The `getenforce` command displays the current mode of SELinux, whereas `setenforce` (followed by a 1 or a 0) is used to change the mode to Enforcing or Permissive, respectively, during the current session only.
-
-In order to achieve persistence across logouts and reboots, you will need to edit the `/etc/selinux/config` file and set the SELINUX variable to either enforcing, permissive, or disabled:
-
- # getenforce
- # setenforce 0
- # getenforce
- # setenforce 1
- # getenforce
- # cat /etc/selinux/config
-
-
-
-Set SELinux Mode
-
-Typically you will use setenforce to toggle between SELinux modes (enforcing to permissive and back) as a first troubleshooting step. If SELinux is currently set to enforcing while you’re experiencing a certain problem, and the same goes away when you set it to permissive, you can be confident you’re looking at a SELinux permissions issue.
-
-### SELinux Contexts ###
-
-A SELinux context consists of an access control environment where decisions are made based on SELinux user, role, and type (and optionally a level):
-
-- A SELinux user complements a regular Linux user account by mapping it to a SELinux user account, which in turn is used in the SELinux context for processes in that session, in order to explicitly define their allowed roles and levels.
-- The concept of role acts as an intermediary between domains and SELinux users in that it defines which process domains and file types can be accessed. This will shield your system against vulnerability to privilege escalation attacks.
-- A type defines an SELinux file type or an SELinux process domain. Under normal circumstances, processes are prevented from accessing files that other processes use, and and from accessing other processes, thus access is only allowed if a specific SELinux policy rule exists that allows it.
-
-Let’s see how all of that works through the following examples.
-
-**EXAMPLE 1: Changing the default port for the sshd daemon**
-
-In [Securing SSH – Part 8][3] we explained that changing the default port where sshd listens on is one of the first security measures to secure your server against external attacks. Let’s edit the `/etc/ssh/sshd_config` file and set the port to 9999:
-
- Port 9999
-
-Save the changes, and restart sshd:
-
- # systemctl restart sshd
- # systemctl status sshd
-
-
-
-Restart SSH Service
-
-As you can see, sshd has failed to start. But what happened?
-
-A quick inspection of `/var/log/audit/audit.log` indicates that sshd has been denied permissions to start on port 9999 (SELinux log messages include the word “AVC” so that they might be easily identified from other messages) because that is a reserved port for the JBoss Management service:
-
- # cat /var/log/audit/audit.log | grep AVC | tail -1
-
-
-
-Inspect SSH Logs
-
-At this point you could disable SELinux (but don’t!) as explained earlier and try to start sshd again, and it should work. However, the semanage utility can tell us what we need to change in order for us to be able to start sshd in whatever port we choose without issues.
-
-Run,
-
- # semanage port -l | grep ssh
-
-to get a list of the ports where SELinux allows sshd to listen on.
-
-
-
-Semanage Tool
-
-So let’s change the port in /etc/ssh/sshd_config to Port 9998, add the port to the ssh_port_t context, and then restart the service:
-
- # semanage port -a -t ssh_port_t -p tcp 9998
- # systemctl restart sshd
- # systemctl is-active sshd
-
-
-
-Semanage Add Port
-
-As you can see, the service was started successfully this time. This example illustrates the fact that SELinux controls the TCP port number to its own port type internal definitions.
-
-**EXAMPLE 2: Allowing httpd to send access sendmail**
-
-This is an example of SELinux managing a process accessing another process. If you were to implement mod_security and mod_evasive along with Apache in your RHEL 7 server, you need to allow httpd to access sendmail in order to send a mail notification in the wake of a (D)DoS attack. In the following command, omit the -P flag if you do not want the change to be persistent across reboots.
-
- # semanage boolean -1 | grep httpd_can_sendmail
- # setsebool -P httpd_can_sendmail 1
- # semanage boolean -1 | grep httpd_can_sendmail
-
-
-
-Allow Apache to Send Mails
-
-As you can tell from the above example, SELinux boolean settings (or just booleans) are true / false rules embedded into SELinux policies. You can list all the booleans with `semanage boolean -l`, and alternatively pipe it to grep in order to filter the output.
-
-**EXAMPLE 3: Serving a static site from a directory other than the default one**
-
-Suppose you are serving a static website using a different directory than the default one (`/var/www/html`), say /websites (this could be the case if you’re storing your web files in a shared network drive, for example, and need to mount it at /websites).
-
-a). Create an index.html file inside /websites with the following contents:
-
-
- SELinux test
-
-
-If you do,
-
- # ls -lZ /websites/index.html
-
-you will see that the index.html file has been labeled with the default_t SELinux type, which Apache can’t access:
-
-
-
-Check SELinux File Permission
-
-b). Change the DocumentRoot directive in `/etc/httpd/conf/httpd.conf` to /websites and don’t forget to update the corresponding Directory block. Then, restart Apache.
-
-c). Browse to `http://`, and you should get a 503 Forbidden HTTP response.
-
-d). Next, change the label of /websites, recursively, to the httpd_sys_content_t type in order to grant Apache read-only access to that directory and its contents:
-
- # semanage fcontext -a -t httpd_sys_content_t "/websites(/.*)?"
-
-e). Finally, apply the SELinux policy created in d):
-
- # restorecon -R -v /websites
-
-Now restart Apache and browse to `http://` again and you will see the html file displayed correctly:
-
-
-
-Verify Apache Page
-
-### Summary ###
-
-In this article we have gone through the basics of SELinux. Note that due to the vastness of the subject, a full detailed explanation is not possible in a single article, but we believe that the principles outlined in this guide will help you to move on to more advanced topics should you wish to do so.
-
-If I may, let me recommend two essential resources to start with: the [NSA SELinux page][4] and the [RHEL 7 SELinux User’s and Administrator’s][5] guide.
-
-Don’t hesitate to let us know if you have any questions or comments.
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:http://www.tecmint.com/rhcsa-exam-manage-users-and-groups
-[2]:http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares/
-[3]:http://www.tecmint.com/rhcsa-series-secure-ssh-set-hostname-enable-network-services-in-rhel-7/
-[4]:https://www.nsa.gov/research/selinux/index.shtml
-[5]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/SELinux_Users_and_Administrators_Guide/part_I-SELinux.html
\ No newline at end of file
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md b/sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md
deleted file mode 100644
index 36bf319b19..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md
+++ /dev/null
@@ -1,275 +0,0 @@
-RHCSA Series: Setting Up LDAP-based Authentication in RHEL 7 – Part 14
-================================================================================
-We will begin this article by outlining some LDAP basics (what it is, where it is used and why) and show how to set up a LDAP server and configure a client to authenticate against it using Red Hat Enterprise Linux 7 systems.
-
-
-
-RHCSA Series: Setup LDAP Server and Client Authentication – Part 14
-
-As we will see, there are several other possible application scenarios, but in this guide we will focus entirely on LDAP-based authentication. In addition, please keep in mind that due to the vastness of the subject, we will only cover its basics here, but you can refer to the documentation outlined in the summary for more in-depth details.
-
-For the same reason, you will note that I have decided to leave out several references to man pages of LDAP tools for the sake of brevity, but the corresponding explanations are at a fingertip’s distance (man ldapadd, for example).
-
-That said, let’s get started.
-
-**Our Testing Environment**
-
-Our test environment consists of two RHEL 7 boxes:
-
- Server: 192.168.0.18. FQDN: rhel7.mydomain.com
- Client: 192.168.0.20. FQDN: ldapclient.mydomain.com
-
-If you want, you can use the machine installed in [Part 12: Automate RHEL 7 installations][1] using Kickstart as client.
-
-#### What is LDAP? ####
-
-LDAP stands for Lightweight Directory Access Protocol and consists in a set of protocols that allows a client to access, over a network, centrally stored information (such as a directory of login shells, absolute paths to home directories, and other typical system user information, for example) that should be accessible from different places or available to a large number of end users (another example would be a directory of home addresses and phone numbers of all employees in a company).
-
-Keeping such (and more) information centrally means it can be more easily maintained and accessed by everyone who has been granted permissions to use it.
-
-The following diagram offers a simplified diagram of LDAP, and is described below in greater detail:
-
-
-
-LDAP Diagram
-
-Explanation of above diagram in detail.
-
-- An entry in a LDAP directory represents a single unit or information and is uniquely identified by what is called a Distinguished Name.
-- An attribute is a piece of information associated with an entry (for example, addresses, available contact phone numbers, and email addresses).
-- Each attribute is assigned one or more values consisting in a space-separated list. A value that is unique per entry is called a Relative Distinguished Name.
-
-That being said, let’s proceed with the server and client installations.
-
-### Installing and Configuring a LDAP Server and Client ###
-
-In RHEL 7, LDAP is implemented by OpenLDAP. To install the server and client, use the following commands, respectively:
-
- # yum update && yum install openldap openldap-clients openldap-servers
- # yum update && yum install openldap openldap-clients nss-pam-ldapd
-
-Once the installation is complete, there are some things we look at. The following steps should be performed on the server alone, unless explicitly noted:
-
-**1. Make sure SELinux does not get in the way by enabling the following booleans persistently, both on the server and the client:**
-
- # setsebool -P allow_ypbind=0 authlogin_nsswitch_use_ldap=0
-
-Where allow_ypbind is required for LDAP-based authentication, and authlogin_nsswitch_use_ldap may be needed by some applications.
-
-**2. Enable and start the service:**
-
- # systemctl enable slapd.service
- # systemctl start slapd.service
-
-Keep in mind that you can also disable, restart, or stop the service with [systemctl][2] as well:
-
- # systemctl disable slapd.service
- # systemctl restart slapd.service
- # systemctl stop slapd.service
-
-**3. Since the slapd service runs as the ldap user (which you can verify with ps -e -o pid,uname,comm | grep slapd), such user should own the /var/lib/ldap directory in order for the server to be able to modify entries created by administrative tools that can only be run as root (more on this in a minute).**
-
-Before changing the ownership of this directory recursively, copy the sample database configuration file for slapd into it:
-
- # cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG
- # chown -R ldap:ldap /var/lib/ldap
-
-**4. Set up an OpenLDAP administrative user and assign a password:**
-
- # slappasswd
-
-as shown in the next image:
-
-
-
-Set LDAP Admin Password
-
-and create an LDIF file (ldaprootpasswd.ldif) with the following contents:
-
- dn: olcDatabase={0}config,cn=config
- changetype: modify
- add: olcRootPW
- olcRootPW: {SSHA}PASSWORD
-
-where:
-
-- PASSWORD is the hashed string obtained earlier.
-- cn=config indicates global config options.
-- olcDatabase indicates a specific database instance name and can be typically found inside /etc/openldap/slapd.d/cn=config.
-
-Referring to the theoretical background provided earlier, the `ldaprootpasswd.ldif` file will add an entry to the LDAP directory. In that entry, each line represents an attribute: value pair (where dn, changetype, add, and olcRootPW are the attributes and the strings to the right of each colon are their corresponding values).
-
-You may want to keep this in mind as we proceed further, and please note that we are using the same Common Names `(cn=)` throughout the rest of this article, where each step depends on the previous one.
-
-**5. Now, add the corresponding LDAP entry by specifying the URI referring to the ldap server, where only the protocol/host/port fields are allowed.**
-
- # ldapadd -H ldapi:/// -f ldaprootpasswd.ldif
-
-The output should be similar to:
-
-
-
-LDAP Configuration
-
-and import some basic LDAP definitions from the `/etc/openldap/schema` directory:
-
- # for def in cosine.ldif nis.ldif inetorgperson.ldif; do ldapadd -H ldapi:/// -f /etc/openldap/schema/$def; done
-
-
-
-LDAP Definitions
-
-**6. Have LDAP use your domain in its database.**
-
-Create another LDIF file, which we will call `ldapdomain.ldif`, with the following contents, replacing your domain (in the Domain Component dc=) and password as appropriate:
-
- dn: olcDatabase={1}monitor,cn=config
- changetype: modify
- replace: olcAccess
- olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth"
- read by dn.base="cn=Manager,dc=mydomain,dc=com" read by * none
-
- dn: olcDatabase={2}hdb,cn=config
- changetype: modify
- replace: olcSuffix
- olcSuffix: dc=mydomain,dc=com
-
- dn: olcDatabase={2}hdb,cn=config
- changetype: modify
- replace: olcRootDN
- olcRootDN: cn=Manager,dc=mydomain,dc=com
-
- dn: olcDatabase={2}hdb,cn=config
- changetype: modify
- add: olcRootPW
- olcRootPW: {SSHA}PASSWORD
-
- dn: olcDatabase={2}hdb,cn=config
- changetype: modify
- add: olcAccess
- olcAccess: {0}to attrs=userPassword,shadowLastChange by
- dn="cn=Manager,dc=mydomain,dc=com" write by anonymous auth by self write by * none
- olcAccess: {1}to dn.base="" by * read
- olcAccess: {2}to * by dn="cn=Manager,dc=mydomain,dc=com" write by * read
-
-Then load it as follows:
-
- # ldapmodify -H ldapi:/// -f ldapdomain.ldif
-
-
-
-LDAP Domain Configuration
-
-**7. Now it’s time to add some entries to our LDAP directory. Attributes and values are separated by a colon `(:)` in the following file, which we’ll name `baseldapdomain.ldif`:**
-
- dn: dc=mydomain,dc=com
- objectClass: top
- objectClass: dcObject
- objectclass: organization
- o: mydomain com
- dc: mydomain
-
- dn: cn=Manager,dc=mydomain,dc=com
- objectClass: organizationalRole
- cn: Manager
- description: Directory Manager
-
- dn: ou=People,dc=mydomain,dc=com
- objectClass: organizationalUnit
- ou: People
-
- dn: ou=Group,dc=mydomain,dc=com
- objectClass: organizationalUnit
- ou: Group
-
-Add the entries to the LDAP directory:
-
- # ldapadd -x -D cn=Manager,dc=mydomain,dc=com -W -f baseldapdomain.ldif
-
-
-
-Add LDAP Domain Attributes and Values
-
-**8. Create a LDAP user called ldapuser (adduser ldapuser), then create the definitions for a LDAP group in `ldapgroup.ldif`.**
-
- # adduser ldapuser
- # vi ldapgroup.ldif
-
-Add following content.
-
- dn: cn=Manager,ou=Group,dc=mydomain,dc=com
- objectClass: top
- objectClass: posixGroup
- gidNumber: 1004
-
-where gidNumber is the GID in /etc/group for ldapuser) and load it:
-
- # ldapadd -x -W -D "cn=Manager,dc=mydomain,dc=com" -f ldapgroup.ldif
-
-**9. Add a LDIF file with the definitions for user ldapuser (`ldapuser.ldif`):**
-
- dn: uid=ldapuser,ou=People,dc=mydomain,dc=com
- objectClass: top
- objectClass: account
- objectClass: posixAccount
- objectClass: shadowAccount
- cn: ldapuser
- uid: ldapuser
- uidNumber: 1004
- gidNumber: 1004
- homeDirectory: /home/ldapuser
- userPassword: {SSHA}fiN0YqzbDuDI0Fpqq9UudWmjZQY28S3M
- loginShell: /bin/bash
- gecos: ldapuser
- shadowLastChange: 0
- shadowMax: 0
- shadowWarning: 0
-
-and load it:
-
- # ldapadd -x -D cn=Manager,dc=mydomain,dc=com -W -f ldapuser.ldif
-
-
-
-LDAP User Configuration
-
-Likewise, you can delete the user entry you just created:
-
- # ldapdelete -x -W -D cn=Manager,dc=mydomain,dc=com "uid=ldapuser,ou=People,dc=mydomain,dc=com"
-
-**10. Allow communication through the firewall:**
-
- # firewall-cmd --add-service=ldap
-
-**11. Last, but not least, enable the client to authenticate using LDAP.**
-
-To help us in this final step, we will use the authconfig utility (an interface for configuring system authentication resources).
-
-Using the following command, the home directory for the requested user is created if it doesn’t exist after the authentication against the LDAP server succeeds:
-
- # authconfig --enableldap --enableldapauth --ldapserver=rhel7.mydomain.com --ldapbasedn="dc=mydomain,dc=com" --enablemkhomedir --update
-
-
-
-LDAP Client Configuration
-
-### Summary ###
-
-In this article we have explained how to set up basic authentication against a LDAP server. To further configure the setup described in the present guide, please refer to [Chapter 13 – LDAP Configuration][3] in the RHEL 7 System administrator’s guide, paying special attention to the security settings using TLS.
-
-Feel free to leave any questions you may have using the comment form below.
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/setup-ldap-server-and-configure-client-authentication/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:http://www.tecmint.com/automatic-rhel-installations-using-kickstart/
-[2]:http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/
-[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Directory_Servers.html
\ No newline at end of file
diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md b/sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md
deleted file mode 100644
index d9e06bd876..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md
+++ /dev/null
@@ -1,188 +0,0 @@
-RHCSA Series: Essentials of Virtualization and Guest Administration with KVM – Part 15
-================================================================================
-If you look up the word virtualize in a dictionary, you will find that it means “to create a virtual (rather than actual) version of something”. In computing, the term virtualization refers to the possibility of running multiple operating systems simultaneously and isolated one from another, on top of the same physical (hardware) system, known in the virtualization schema as host.
-
-
-
-RHCSA Series: Essentials of Virtualization and Guest Administration with KVM – Part 15
-
-Through the use of the virtual machine monitor (also known as hypervisor), virtual machines (referred to as guests) are provided virtual resources (i.e. CPU, RAM, storage, network interfaces, to name a few) from the underlying hardware.
-
-With that in mind, it is plain to see that one of the main advantages of virtualization is cost savings (in equipment and network infrastructure and in terms of maintenance effort) and a substantial reduction in the physical space required to accommodate all the necessary hardware.
-
-Since this brief how-to cannot cover all virtualization methods, I encourage you to refer to the documentation listed in the summary for further details on the subject.
-
-Please keep in mind that the present article is intended to be a starting point to learn the basics of virtualization in RHEL 7 using [KVM][1] (Kernel-based Virtual Machine) with command-line utilities, and not an in-depth discussion of the topic.
-
-### Verifying Hardware Requirements and Installing Packages ###
-
-In order to set up virtualization, your CPU must support it. You can verify whether your system meets the requirements with the following command:
-
- # grep -E 'svm|vmx' /proc/cpuinfo
-
-In the following screenshot we can see that the current system (with an AMD microprocessor) supports virtualization, as indicated by svm. If we had an Intel-based processor, we would see vmx instead in the results of the above command.
-
-
-
-Check KVM Support
-
-In addition, you will need to have virtualization capabilities enabled in the firmware of your host (BIOS or UEFI).
-
-Now install the necessary packages:
-
-- qemu-kvm is an open source virtualizer that provides hardware emulation for the KVM hypervisor whereas qemu-img provides a command line tool for manipulating disk images.
-- libvirt includes the tools to interact with the virtualization capabilities of the operating system.
-- libvirt-python contains a module that permits applications written in Python to use the interface supplied by libvirt.
-- libguestfs-tools: miscellaneous system administrator command line tools for virtual machines.
-- virt-install: other command-line utilities for virtual machine administration.
-
- # yum update && yum install qemu-kvm qemu-img libvirt libvirt-python libguestfs-tools virt-install
-
-Once the installation completes, make sure you start and enable the libvirtd service:
-
- # systemctl start libvirtd.service
- # systemctl enable libvirtd.service
-
-By default, each virtual machine will only be able to communicate with the rest in the same physical server and with the host itself. To allow the guests to reach other machines inside our LAN and also the Internet, we need to set up a bridge interface in our host (say br0, for example) by,
-
-1. adding the following line to our main NIC configuration (most likely `/etc/sysconfig/network-scripts/ifcfg-enp0s3`):
-
- BRIDGE=br0
-
-2. creating the configuration file for br0 (/etc/sysconfig/network-scripts/ifcfg-br0) with these contents (note that you may have to change the IP address, gateway address, and DNS information):
-
- DEVICE=br0
- TYPE=Bridge
- BOOTPROTO=static
- IPADDR=192.168.0.18
- NETMASK=255.255.255.0
- GATEWAY=192.168.0.1
- NM_CONTROLLED=no
- DEFROUTE=yes
- PEERDNS=yes
- PEERROUTES=yes
- IPV4_FAILURE_FATAL=no
- IPV6INIT=yes
- IPV6_AUTOCONF=yes
- IPV6_DEFROUTE=yes
- IPV6_PEERDNS=yes
- IPV6_PEERROUTES=yes
- IPV6_FAILURE_FATAL=no
- NAME=br0
- ONBOOT=yes
- DNS1=8.8.8.8
- DNS2=8.8.4.4
-
-3. finally, enabling packet forwarding by making, in `/etc/sysctl.conf`,
-
- net.ipv4.ip_forward = 1
-
-and loading the changes to the current kernel configuration:
-
- # sysctl -p
-
-Note that you may also need to tell firewalld that this kind of traffic should be allowed. Remember that you can refer to the article on that topic in this same series ([Part 11: Network Traffic Control Using FirewallD and Iptables][2]) if you need help to do that.
-
-### Creating VM Images ###
-
-By default, VM images will be created to `/var/lib/libvirt/images` and you are strongly advised to not change this unless you really need to, know what you’re doing, and want to handle SELinux settings yourself (such topic is out of the scope of this tutorial but you can refer to Part 13 of the RHCSA series: [Mandatory Access Control Essentials with SELinux][3] if you want to refresh your memory).
-
-This means that you need to make sure that you have allocated the necessary space in that filesystem to accommodate your virtual machines.
-
-The following command will create a virtual machine named `tecmint-virt01` with 1 virtual CPU, 1 GB (=1024 MB) of RAM, and 20 GB of disk space (represented by `/var/lib/libvirt/images/tecmint-virt01.img`) using the rhel-server-7.0-x86_64-dvd.iso image located inside /home/gacanepa/ISOs as installation media and the br0 as network bridge:
-
- # virt-install \
- --network bridge=br0
- --name tecmint-virt01 \
- --ram=1024 \
- --vcpus=1 \
- --disk path=/var/lib/libvirt/images/tecmint-virt01.img,size=20 \
- --graphics none \
- --cdrom /home/gacanepa/ISOs/rhel-server-7.0-x86_64-dvd.iso
- --extra-args="console=tty0 console=ttyS0,115200"
-
-If the installation file was located in a HTTP server instead of an image stored in your disk, you will have to replace the –cdrom flag with –location and indicate the address of the online repository.
-
-As for the –graphics none option, it tells the installer to perform the installation in text-mode exclusively. You can omit that flag if you are using a GUI interface and a VNC window to access the main VM console. Finally, with –extra-args we are passing kernel boot parameters to the installer that set up a serial VM console.
-
-The installation should now proceed as a regular (real) server now. If not, please review the steps listed above.
-
-### Managing Virtual Machines ###
-
-These are some typical administration tasks that you, as a system administrator, will need to perform on your virtual machines. Note that all of the following commands need to be run from your host:
-
-**1. List all VMs:**
-
- # virsh list --all
-
-From the output of the above command you will have to note the Id for the virtual machine (although it will also return its name and current status) because you will need it for most administration tasks related to a particular VM.
-
-**2. Display information about a guest:**
-
- # virsh dominfo [VM Id]
-
-**3. Start, restart, or stop a guest operating system:**
-
- # virsh start | reboot | shutdown [VM Id]
-
-**4. Access a VM’s serial console if networking is not available and no X server is running on the host:**
-
- # virsh console [VM Id]
-
-**Note** that this will require that you add the serial console configuration information to the `/etc/grub.conf` file (refer to the argument passed to the –extra-args option when the VM was created).
-
-**5. Modify assigned memory or virtual CPUs:**
-
-First, shutdown the guest:
-
- # virsh shutdown [VM Id]
-
-Edit the VM configuration for RAM:
-
- # virsh edit [VM Id]
-
-Then modify
-
- [Memory size here without brackets]
-
-Restart the VM with the new settings:
-
- # virsh create /etc/libvirt/qemu/tecmint-virt01.xml
-
-Finally, change the memory dynamically:
-
- # virsh setmem [VM Id] [Memory size here without brackets]
-
-For CPU:
-
- # virsh edit [VM Id]
-
-Then modify
-
- [Number of CPUs here without brackets]
-
-For further commands and details, please refer to table 26.1 in Chapter 26 of the RHEL 5 Virtualization guide (that guide, though a bit old, includes an exhaustive list of virsh commands used for guest administration).
-
-### SUMMARY ###
-
-In this article we have covered some basic aspects of virtualization with KVM in RHEL 7, which is both a vast and a fascinating topic, and I hope it will be helpful as a starting guide for you to later explore more advanced subjects found in the official [RHEL virtualization][4] getting started and [deployment / administration guides][5].
-
-In addition, you can refer to the preceding articles in [this KVM series][6] in order to clarify or expand some of the concepts explained here.
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/kvm-virtualization-basics-and-guest-administration/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:http://www.linux-kvm.org/page/Main_Page
-[2]:http://www.tecmint.com/firewalld-vs-iptables-and-control-network-traffic-in-firewall/
-[3]:http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/
-[4]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Getting_Started_Guide/index.html
-[5]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/index.html
-[6]:http://www.tecmint.com/install-and-configure-kvm-in-linux/
\ No newline at end of file
diff --git a/sources/tech/[翻译中]20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md b/sources/tech/[翻译中]20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md
deleted file mode 100644
index cd502ac0a9..0000000000
--- a/sources/tech/[翻译中]20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md
+++ /dev/null
@@ -1,184 +0,0 @@
-[translating by KevinSJ]
-Linux_Logo – A Command Line Tool to Print Color ANSI Logos of Linux Distributions
-================================================================================
-linuxlogo or linux_logo is a Linux command line utility that generates a color ANSI picture of Distribution logo with a few system information.
-
-
-
-Linux_Logo – Prints Color ANSI Logs of Linux Distro
-
-This utility obtains System Information from /proc Filesystem. linuxlogo is capable of showing color ANSI image of various logos other than the host distribution logo.
-
-The System information associated with logo includes – Linux Kernel Version, Time when Kernel was last Compiled, Number/core of processor, Speed, Manufacturer and processor Generation. It also show information about total physical RAM.
-
-It is worth mentioning here that screenfetch is another tool of similar kind, which shows distribution logo and a more detailed and formatted system inform http://www.tecmint.com/screenfetch-system-information-generator-for-linux/ation. We have already covered screenfetch long ago, which you may refer at:
-
-- [ScreenFetch – Generates Linux System Information][15]
-
-linux_logo and Screenfetch should not be compared to each other. While the output of screenfetch is more formatted and detailed, where linux_logo produce maximum number of color ANSI diagram, and option to format the output.
-
-linux_logo is written primarily in C programming Language, which displays linux logo in an X Window System and hence User Interface X11 aka X Window System should be installed. The software is released under GNU General Public License Version 2.0.
-
-For the purpose of this article, we’re using following testing environment to test the linux_logo utility.
-
- Operating System : Debian Jessie
- Processor : i3 / x86_64
-
-### Installing Linux Logo Utility in Linux ###
-
-**1. The linuxlogo package (stable version 5.11) is available to install from default package repository under all Linux distributions using apt, yum or dnf package manager as shown below.**
-
- # apt-get install linux_logo [On APT based Systems]
- # yum install linux_logo [On Yum based Systems]
- # dnf install linux_logo [On DNF based Systems]
- OR
- # dnf install linux_logo.x86_64 [For 64-bit architecture]
-
-**2. Once linuxlogo package has been installed, you can run the command `linuxlogo` to get the default logo for the distribution you are using..**
-
- # linux_logo
- OR
- # linuxlogo
-
-
-
-Get Default OS Logo
-
-**3. Use the option `[-a]`, not to print any fancy color. Useful if viewing linux_logo over black and white terminal.**
-
- # linux_logo -a
-
-
-
-Black and White Linux Logo
-
-**4. Use option `[-l]` to print LOGO only and exclude all other System Information.**
-
-# linux_logo -l
-
-
-
-Print Distribution Logo
-
-**5. The `[-u]` switch will display system uptime.**
-
- # linux_logo -u
-
-
-
-Print System Uptime
-
-**6. If you are interested in Load Average, use option `[-y]`. You may use more than one option at a time.**
-
- # linux_logo -y
-
-
-
-Print System Load Average
-
-For more options and help on them, you may like to run.
-
- # linux_logo -h
-
-
-
-Linuxlogo Options and Help
-
-**7. There are a lots of built-in Logos for various Linux distributions. You may see all those logos using option `-L list` switch.**
-
- # linux_logo -L list
-
-
-
-List of Linux Logos
-
-Now you want to print any of the logo from the list, you may use `-L NUM` or `-L NAME` to display selected logo.
-
-- -L NUM – will print logo with number NUM (deprecated).
-- -L NAME – will print the logo with name NAME.
-
-For example, to display AIX Logo, you may use command as:
-
- # linux_logo -L 1
- OR
- # linux_logo -L aix
-
-
-
-Print AIX Logo
-
-**Notice**: The `-L 1` in the command where 1 is the number at which AIX logo appears in the list, where `-L aix` is the name at which AIX logo appears in the list.
-
-Similarly, you may print any logo using these options, few examples to see..
-
- # linux_logo -L 27
- # linux_logo -L 21
-
-
-
-Various Linux Logos
-
-This way, you can use any of the logos just by using the number or name, that is against it.
-
-### Some Useful Tricks of Linux_logo ###
-
-**8. You may like to print your Linux distribution logo at login. To print default logo at login you may add the below line at the end of `~/.bashrc` file.**
-
- if [ -f /usr/bin/linux_logo ]; then linux_logo; fi
-
-**Notice**: If there isn’t any` ~/.bashrc` file, you may need to create one under user home directory.
-
-**9. After adding above line, just logout and re-login again to see the default logo of your Linux distribution.**
-
-
-
-Print Logo on User Login
-
-Also note, that you may print any logo, after login, simply by adding the below line.
-
- if [ -f /usr/bin/linux_logo ]; then linux_logo -L num; fi
-
-**Important**: Don’t forget to replace num with the number that is against the logo, you want to use.
-
-**10. You can also print your own logo by simply specifying the location of the logo as shown below.**
-
- # linux_logo -D /path/to/ASCII/logo
-
-**11. Print logo on Network Login.**
-
- # /usr/local/bin/linux_logo > /etc/issue.net
-
-You may like to use ASCII logo if there is no support for color filled ANSI Logo as:
-
- # /usr/local/bin/linux_logo -a > /etc/issue.net
-
-**12. Create a Penguin port – A set of port to answer connection. To create Penguin port Add the below line to file /etc/services file.**
-
- penguin 4444/tcp penguin
-
-Here ‘4444‘ is the port number which is currently free and not used by any resource. You may use a different port.
-
-Also add the below line to file /etc/inetd.conf file.
-
- penguin stream tcp nowait root /usr/local/bin/linux_logo
-
-Restart the service inetd as:
-
- # killall -HUP inetd
-
-Moreover linux_logo can be used in bootup script to fool the attacker as well as you can play a prank with your friend. This is a nice tool and I might use it in some of my scripts to get output as per distribution basis.
-
-Try it once and you won’t regret. Let us know what you think of this utility and how it can be useful for you. Keep Connected! Keep Commenting. Like and share us and help us get spread.
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/linux_logo-tool-to-print-color-ansi-logos-of-linux/
-
-作者:[Avishek Kumar][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/avishek/
-[1]:http://www.tecmint.com/screenfetch-system-information-generator-for-linux/
diff --git a/translated/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md b/translated/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md
deleted file mode 100644
index 059f07b195..0000000000
--- a/translated/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md
+++ /dev/null
@@ -1,65 +0,0 @@
-δԼLinuxа
-================================================================================
-ǷԼLinuxа棿ÿLinuxûʹLinuxĹжһԼķа棬һΡҲ⣬ΪһLinuxҲǹһԼLinuxа档һLinuxа汻Linux From Scratch (LFS)
-
-ڿʼ֮ǰܽһЩLFSݣ£
-
-### 1. ЩҪԼLinuxаӦ˽һLinuxа棨ζŴͷʼһеLinuxаIJͬ ###
-
-ֻĻʾƵ¼Լӵиõʹ顣ѡκһLinuxа沢ҰϲýиԻá⣬ù߿
-
-бļboot-loadersںˣѡʲôñȻԼһжôҪLinux From Scratch (LFS)
-
-**ע**ֻҪLinuxϵͳ飬ָϲʺһLinuxа棬˽ôʼԼһЩϢôָΪд
-
-### 2. һLinuxа棨LFSĺô ###
-
-- ˽Linuxϵͳڲ
-- һӦϵͳ
-- ϵͳLFSdzգΪԸð/ðʲôӵоԵƿ
-- ϵͳLFSڰȫϻ
-
-### 3. һLinuxа棨LFSĻ ###
-
-һLinuxϵͳζŽҪĶһұ֮Ҫġĺʱ䡣ҪһõLinuxϵͳ㹻Ĵ̿ռLinuxϵͳ
-
-### 4. ȤǣGentoo/GNU LinuxijӽLFSGentooLFSȫԴĶƵLinuxϵͳ ###
-
-### 5. ӦһоLinuxûԱ൱˽⣬Ǹshellűרҡ˽һűԣCãʹЩһֻ֣ҪһѧϰߣԺ֪ܿʶҲԿʼҪDzҪLFSжʧ顣 ###
-
-ᶨ»LFSеһʱ
-
-### 6. ҪһһָһLinuxLFSǴLinuxĹٷָϡǵĴվtradepubҲΪǵĶLFSָϣͬѵġ ###
-
-ԴLinux From Scratch鼮
-
-[][1]
-
-: [Linux From Scratch][1]
-
-### ڣLinux From Scratch ###
-
-ⱾLFSĿͷGerard BeekmansģMatthew BurgessBruse Dubbs༭˶LFSĿ쵼ˡⱾݺܹ㷺338ҳ
-
-ݰLFSLinuxLFSűʹLFS¼к֪LFSĿж
-
-Ȿ黹˱һԤʱ䡣ԤʱԱһʱΪοеĶķʽ֣˵
-
-гԣʱ䲢ԹԼLinuxаȤôԲ飨أĻᡣҪģⱾһLinuxϵͳκLinuxа棬㹻Ĵ̿ռ伴ɣпʼԼLinuxϵͳʱ顣
-
-LinuxʹԣԼֹһԼLinuxа棬ֽӦ֪ȫˣϢԲοӵеݡ
-
-˽Ķ/ʹⱾľⱾ꾡LFSָϵʹǷ㹻ѾһLFSǵĶһЩ飬ӭԺͷ
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/create-custom-linux-distribution-from-scratch/
-
-ߣ[Avishek Kumar][a]
-ߣ[wwy-hust](https://github.com/wwy-hust)
-Уԣ[УID](https://github.com/УID)
-
- [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ
-
-[a]:http://www.tecmint.com/author/avishek/
-[1]:http://tecmint.tradepub.com/free/w_linu01/prgm.cgi
diff --git a/translated/share/20150824 Great Open Source Collaborative Editing Tools.md b/translated/share/20150824 Great Open Source Collaborative Editing Tools.md
new file mode 100644
index 0000000000..bc0a841477
--- /dev/null
+++ b/translated/share/20150824 Great Open Source Collaborative Editing Tools.md
@@ -0,0 +1,228 @@
+优秀的开源合作编辑工具
+================================================================================
+一句话,合作编著就是多个人进行编著。合作有好处也有风险。好处包括更加全面/协调的方式,更好的利用现有资源和一个更加有力的、团结的声音。对于我来说,最大的好处是极大的透明度。那是当我需要采纳同事的观点。同事之间来来回回地传文件效率非常低,导致不必要的延误还让人(比如,我)对整个合作这件事都感到不满意。有个好的合作软件,我就能实时地或异步地分享笔记,数据和文件,并用评论来分享自己的想法。这样在文档、图片、视频、演示文稿上合作就不会那么的琐碎而无聊。
+
+有很多种方式能在线进行合作,简直不能更简便了。这篇文章表明了我最喜欢的开源实时文档合作编辑工具。
+
+Google Docs 是个非常好的高效应用,有着大部分我所需要的功能。它可以作为一个实时地合作编辑文档的工具提供服务。文档可以被分享、打开并被多位用户同时编辑,用户还能看见其他合作者一个字母一个字母的编辑过程。虽然 Google Docs 对个人是免费的,但并不开源。
+
+下面是我带来的最棒的开源合作编辑器,它们能帮你不被打扰的集中精力进行写作,而且是和其他人协同完成。
+
+----------
+
+### Hackpad ###
+
+
+
+Hackpad 是个开源的基于网页的实时 wiki,基于开源 EtherPad 合作文档编辑器。
+
+Hackpad 允许用户实时分享你的文档,它还用彩色编码显示各个作者分别贡献了哪部分。它还允许插入图片、清单,由于提供了语法高亮功能,它还能用来写代码。
+
+当2014年4月 Dropbox 获得了 Hackpad 后,这款软件就以开源的形式在本月发行。让我们经历的等待非常值得。
+
+特性:
+
+- 有类似 wiki 所提供的,一套非常完善的功能
+- 实时或者异步地记合作笔记,共享数据和文件,或用评论分享你们的想法
+- 细致的隐私许可让你可以邀请单个朋友,一个十几人的团队或者上千的 Twitter 粉丝
+- 智能执行
+- 直接从流行的视频分享网站上插入视频
+- 表格
+- 可对使用广泛的包括 C, C#, CSS, CoffeeScript, Java, 以及 HTML 在内的编程语言进行语法高亮
+
+- 网站:[hackpad.com][1]
+- 源代码:[github.com/dropbox/hackpad][2]
+- 开发者:[Contributors][3]
+- 许可:Apache License, Version 2.0
+- 版本号: -
+
+----------
+
+### Etherpad ###
+
+
+
+Etherpad 是个基于网页的开源实时合作编辑器,允许多个作者同时编辑一个文本文档,写评论,并与其他作者用群聊方式进行交流。
+
+Etherpad 是用 JavaScript 运行的,在 AppJet 平台的顶端,通过 Comet 流实现实时的功能。
+
+特性:
+
+- 尽心设计的斯巴达界面
+- 简单的格式化文本功能
+- “滑动时间轴”——浏览一个工程历史版本
+- 可以下载纯文本、 PDF、微软的 Word 文档、Open Document 和 HTML 格式的文档
+- 每隔一段很短的时间就会自动保存
+- 可个性化程度高
+- 有客户端插件可以扩展编辑的功能
+- 几百个支持 Etherpad 的扩展包括支持 email 提醒,pad 管理,授权
+- 可访问性开启
+- 可从 Node 里或通过 CLI(命令行界面)和 Pad 目录实时交互
+
+- 网站: [etherpad.org][4]
+- 源代码:[github.com/ether/etherpad-lite][5]
+- 开发者:David Greenspan, Aaron Iba, J.D. Zamfiresc, Daniel Clemens, David Cole
+- 许可:Apache License, Version 2.0
+- 版本号: 1.5.7
+
+----------
+
+### Firepad ###
+
+
+
+Firepad 是个开源的合作文本编辑器。它的设计目的是被嵌入到更大的网页应用中对几天内新加入的代码进行批注。
+
+Firepad 是个全功能的文本编辑器,有解决冲突,光标同步,用户属性,用户在线状态检测功能。它使用 Firebase 作为后台,而且不需要任何服务器端的代码。他可以被加入到任何网页应用中。Firepad 可以使用 CodeMirror 编辑器或者 Ace 编辑器提交文本,它的操作转换代码是从 ot.js 上借鉴的。
+
+如果你想要通过添加简单的文档和代码编辑器来扩展你的网页应用能力,Firepad 最适合不过了。
+
+Firepad 已被多个编辑器使用,包括Atlassian Stash Realtime Editor、Nitrous.IO、LiveMinutes 和 Koding。
+
+特性:
+
+- 纯正的合作编辑
+- 基于 OT 的智能合并及解决冲突
+- 支持多种格式的文本和代码的编辑
+- 光标位置同步
+- 撤销/重做
+- 文本高亮
+- 用户属性
+- 在线检测
+- 版本检查点
+- 图片
+- 通过它的 API 拓展 Firepad
+- 支持所有现代浏览器:Chrome、Safari、Opera 11+、IE8+、Firefox 3.6+
+
+- 网站: [www.firepad.io][6]
+- 源代码:[github.com/firebase/firepad][7]
+- 开发者:Michael Lehenbauer and the team at Firebase
+- 许可:MIT
+- 版本号:1.1.1
+
+----------
+
+### OwnCloud Documents ###
+
+
+
+ownCloud Documents 是个可以单独并/或合作进行办公室文档编辑 ownCloud 应用。它允许最多5个人同时在网页浏览器上合作进行编辑 .odt 和 .doc 文件。
+
+ownCloud 是个自托管文件同步和分享服务器。他通过网页界面,同步客户端或 WebDAV 提供你数据的使用权,同时提供一个容易在设备间进行浏览、同步和分享的平台。
+
+特性:
+
+- 合作编辑,多个用户同时进行文件编辑
+- 在 ownCloud 里创建文档
+- 上传文档
+- 在浏览器里分享和编辑文件,然后在 ownCloud 内部或通过公共链接进行分享这些文件
+- 有类似 ownCloud 的功能,如版本管理、本地同步、加密、恢复被删文件
+- 通过透明转换文件格式的方式无缝支持微软 Word 文档
+
+- 网站:[owncloud.org][8]
+- 源代码: [github.com/owncloud/documents][9]
+- 开发者:OwnCloud Inc.
+- 许可:AGPLv3
+- 版本号:8.1.1
+
+----------
+
+### Gobby ###
+
+
+
+Gobby 是个支持在一个会话内进行多个用户聊天并打开多个文档的合作编辑器。所有的用户都能同时在文件上进行工作,无需锁定。不同用户编写的部分用不同颜色高亮显示,它还支持多个编程和标记语言的语法高亮。
+
+Gobby 允许多个用户在互联网上实时共同编辑同一个文档。他很好的整合了 GNOME 环境。它拥有一个客户端-服务端结构,这让它能支持一个会话开多个文档,文档同步请求,密码保护和 IRC 式的聊天方式可以在多个频道进行交流。用户可以选择一个颜色对他们在文档中编写的文本进行高亮。
+
+还供有一个叫做 infinoted 的专用服务器。
+
+特性:
+
+- 成熟的文本编辑能力包括使用 GtkSourceView 的语法高亮功能
+- 实时、无需锁定、通过加密(包括PFS)连接的合作文本编辑
+- 整合了群聊
+- 本地组撤销:撤销不会影响远程用户的修改
+- 显示远程用户的光标和选择区域
+- 用不同颜色高亮不同用户编写的文本
+- 适用于大多数编程语言的语法高亮,自动缩进,可配置 tab 宽度
+- 零冲突
+- 加密数据传输包括完美的正向加密(PFS)
+- 会话可被密码保护
+- 通过 Access Control Lists (ACLs) 进行精密的权限保护
+- 高度个性化的专用服务器
+- 自动保存文档
+- 先进的查找和替换功能
+- 国际化
+- 完整的 Unicode 支持
+
+- 网站:[gobby.github.io][10]
+- 源代码: [github.com/gobby][11]
+- 开发者: Armin Burgmeier, Philipp Kern and contributors
+- 许可: GNU GPLv2+ and ISC
+- 版本号:0.5.0
+
+----------
+
+### OnlyOffice ###
+
+
+
+ONLYOFFICE(从前叫 Teamlab Office)是个多功能云端在线办公套件,整合了 CRM(客户关系管理)系统、文档和项目管理工具箱、甘特图以及邮件整合器
+
+它能让你整理商业任务和时间表,保存并分享你的合作或个人文档,使用网络社交工具如博客和论坛,还可以和你的队员通过团队的即时聊天工具进行交流。
+
+能在同一个地方管理文档、项目、团队和顾客关系。OnlyOffice 结合了文本,电子表格和电子幻灯片编辑器,他们的功能跟微软桌面应用(Word、Excel 和 PowerPoint)的功能相同。但是他允许实时进行合作编辑、评论和聊天。
+
+OnlyOffice 是用 ASP.NET 编写的,基于 HTML5 Canvas 元素,并且被翻译成21种语言。
+
+特性:
+
+- 当在大文档里工作、翻页和缩放时,它能与桌面应用一样强大
+- 文档可以在浏览/编辑模式下分享
+- 文档嵌入
+- 电子表格和电子幻灯片编辑器
+- 合作编辑
+- 评论
+- 群聊
+- 移动应用
+- 甘特图
+- 时间管理
+- 权限管理
+- Invoicing 系统
+- 日历
+- 整合了文件保存系统:Google Drive、Box、OneDrive、Dropbox、OwnCloud
+- 整合了 CRM、电子邮件整合器和工程管理模块
+- 邮件服务器
+- 邮件整合器
+- 可以编辑流行格式的文档、电子表格和电子幻灯片:DOC、DOCX、ODT、RTF、TXT、XLS、XLSX、ODS、CSV、PPTX、PPT、ODP
+
+- 网站:[www.onlyoffice.com][12]
+- 源代码:[github.com/ONLYOFFICE/DocumentServer][13]
+- 开发者:Ascensio System SIA
+- 许可:GNU GPL v3
+- 版本号:7.7
+
+--------------------------------------------------------------------------------
+
+via: http://www.linuxlinks.com/article/20150823085112605/CollaborativeEditing.html
+
+作者:Frazer Kline
+译者:[H-mudcup](https://github.com/H-mudcup)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[1]:https://hackpad.com/
+[2]:https://github.com/dropbox/hackpad
+[3]:https://github.com/dropbox/hackpad/blob/master/CONTRIBUTORS
+[4]:http://etherpad.org/
+[5]:https://github.com/ether/etherpad-lite
+[6]:http://www.firepad.io/
+[7]:https://github.com/firebase/firepad
+[8]:https://owncloud.org/
+[9]:http://github.com/owncloud/documents/
+[10]:https://gobby.github.io/
+[11]:https://github.com/gobby
+[12]:https://www.onlyoffice.com/free-edition.aspx
+[13]:https://github.com/ONLYOFFICE/DocumentServer
diff --git a/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md b/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md
new file mode 100644
index 0000000000..7c16ca9fc8
--- /dev/null
+++ b/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md
@@ -0,0 +1,604 @@
+
+为 Linux 系统管理员准备的80个监控工具
+================================================================================
+
+
+随着行业的不断发展,有许多比你想象中更棒的工具。这里列着网上最全的(工具)。拥有超过80种方式来管理你的机器。在本文中,我们主要讲述以下方面:
+
+- 命令行工具
+- 与网络相关的
+- 系统相关的监控工具
+- 日志监控工具
+- 基础设施监控工具
+
+监控和调试性能问题非常困难,但用对了正确的工具有时也是很容易的。下面是一些你可能听说过的工具,当你使用它们时可能存在一些问题:
+
+### 十大系统监控工具 ###
+
+#### 1. Top ####
+
+
+
+这是一个被预安装在许多 UNIX 系统中的小工具。当你想要查看在系统中运行的进程或线程时:top 是一个很好的工具。你可以对这些进程以不同的标准进行排序,默认是以 CPU 进行排序的。
+
+#### 2. [htop][1] ####
+
+
+
+HTOP 实质上是 top 的增强版本。它更容易对进程排序。它在视觉上更容易理解并且已经内建了许多通用的命令。它也是完全交互的。
+
+#### 3. [atop][2] ####
+
+Atop 和 top,htop 非常相似,它也能监控所有进程,但不同于 top 和 htop 的是,它会记录进程的日志供以后分析。它也能显示所有进程的资源消耗。它还会高亮显示已经达到临界负载的资源。
+
+#### 4. [apachetop][3] ####
+
+Apachetop 会监视 apache 网络服务器的整体性能。它主要是基于 mytop。它会显示当前 reads, writes 的数量以及 requests 进程的总数。
+
+#### 5. [ftptop][4] ####
+
+ftptop 给你提供了当前所有连接到 ftp 服务器的基本信息,如会话总数,正在上传和下载的客户端数量以及客户端信息。
+
+#### 6. [mytop][5] ####
+
+
+
+mytop 是一个很方便的工具,用于监控线程和 mysql 的性能。它给了你一个实时的数据库查询处理结果。
+
+#### 7. [powertop][6] ####
+
+
+
+powertop 可以帮助你诊断与电量消耗和电源管理相关的问题。它也可以帮你进行电源管理设置,以实现对你服务器最有效的配置。你可以使用 tab 键进行选项切换。
+
+#### 8. [iotop][7] ####
+
+
+
+iotop 用于检查 I/O 的使用情况,并为你提供了一个类似 top 的界面来显示。它每列显示读和写的速率,每行代表一个进程。当出现等待 I/O 交换时,它也显示进程消耗时间的百分比。
+
+### 与网络相关的监控 ###
+
+#### 9. [ntopng][8] ####
+
+
+
+ntopng 是 ntop 的升级版,它提供了一个能使用浏览器进行网络监控的图形用户界面。它还有其他用途,如:定位主机,显示网络流量和 ip 流量分布并能进行分析。
+
+#### 10. [iftop][9] ####
+
+
+
+iftop 类似于 top,但它主要不是检查 cpu 的使用率而是监听网卡的流量,并以表格的形式显示当前的使用量。像“为什么我的网速这么慢呢?!”这样的问题它可以直接回答。
+
+#### 11. [jnettop][10] ####
+
+
+
+jnettop 以相同的方式来监测网络流量但比 iftop 更形象。它还支持自定义的文本输出并能以友好的交互方式来快速分析日志。
+
+#### 12. [bandwidthd][11] ####
+
+
+
+bandwidthd 可以跟踪 TCP/IP 网络子网的使用情况并能在浏览器中通过 png 图片形象化的构建一个 HTML 页面。它有一个数据库驱动系统,支持搜索,过滤,多传感器和自定义报表。
+
+#### 13. [EtherApe][12] ####
+
+EtherApe 以图形化显示网络流量,可以支持更多的节点。它可以捕获实时流量信息,也可以从 tcpdump 进行读取。也可以使用具有 pcap 语法的网络过滤显示特定信息。
+
+#### 14. [ethtool][13] ####
+
+
+
+ethtool 用于显示和修改网络接口控制器的一些参数。它也可以用来诊断以太网设备,并获得更多的统计数据。
+
+#### 15. [NetHogs][14] ####
+
+
+
+NetHogs 打破了网络流量按协议或子网进行统计的原理。它以进程组来计算。所以,当网络流量猛增时,你可以使用 NetHogs 查看是由哪个进程造成的。
+
+#### 16. [iptraf][15] ####
+
+
+
+iptraf 收集的各种指标,如 TCP 连接数据包和字节数,接口界面和活动指标,TCP/UDP 通信故障,站内数据包和字节数。
+
+#### 17. [ngrep][16] ####
+
+
+
+ngrep 就是 grep 但是相对于网络层的。pcap 意识到后允许其指定扩展规则或十六进制表达式来匹配数据包。
+
+#### 18. [MRTG][17] ####
+
+
+
+MRTG 最初被开发来监控路由器的流量,但现在它也能够监控网络相关的东西。它每五分钟收集一次,然后产生一个 HTML 页面。它还具有发送邮件报警的能力。
+
+#### 19. [bmon][18] ####
+
+
+
+Bmon 能监控并帮助你调试网络。它能捕获网络相关的统计数据,并以友好的方式进行展示。你还可以与 bmon 通过脚本进行交互。
+
+#### 20. traceroute ####
+
+
+
+Traceroute 一个内置工具,能测试路由和数据包在网络中的延迟。
+
+#### 21. [IPTState][19] ####
+
+IPTState 可以让你跨越 iptables 来监控流量,并通过你指定的条件来进行排序。该工具还允许你从表中删除状态信息。
+
+#### 22. [darkstat][20] ####
+
+
+
+Darkstat 能捕获网络流量并计算统计的数据。该报告需要在浏览器中进行查看,它为你提供了一个非常棒的图形用户界面。
+
+#### 23. [vnStat][21] ####
+
+
+
+vnStat 是一个网络流量监控工具,它的数据统计是由内核进行提供的,其消耗的系统资源非常少。系统重新启动后,它收集的数据仍然存在。它具有颜色选项供系统管理员使用。
+
+#### 24. netstat ####
+
+
+
+netstat 是一个内置的工具,它能显示 TCP 网络连接,路由表和网络接口数量,被用来在网络中查找问题。
+
+#### 25. ss ####
+
+并非 netstat,最好使用 ss。ss 命令能够显示的信息比 netstat 更多,也更快。如果你想查看统计结果的总信息,你可以使用命令 `ss -s`。
+
+#### 26. [nmap][22] ####
+
+
+
+Nmap 可以扫描你服务器开放的端口并且可以检测正在使用哪个操作系统。但你也可以使用 SQL 注入漏洞,网络发现和渗透测试相关的其他手段。
+
+#### 27. [MTR][23] ####
+
+
+
+MTR 结合了 traceroute 和 ping 的功能到一个网络诊断工具上。当使用该工具时,它会限制单个数据包的跳数,同时也监视它们的到期时间。然后每秒进行重复。
+
+#### 28. [Tcpdump][24] ####
+
+
+
+Tcpdump 将输出一个你在命令中匹配并捕获到的数据包的信息。你还可以将此数据保存并进一步分析。
+
+#### 29. [Justniffer][25] ####
+
+
+
+Justniffer 是 tcp 数据包嗅探器。使用此嗅探器你可以选择收集低级别的数据还是高级别的数据。它也可以让你以自定义方式生成日志。比如模仿 Apache 的访问日志。
+
+### 与系统有关的监控 ###
+
+#### 30. [nmon][26] ####
+
+
+
+nmon 将数据输出到屏幕上的,或将其保存在一个以逗号分隔的文件中。你可以查看 CPU,内存,网络,文件系统,top 进程。数据也可以被添加到 RRD 数据库中用于进一步分析。
+
+#### 31. [conky][27] ####
+
+
+
+Conky 能监视不同操作系统并统计数据。它支持 IMAP 和 POP3, 甚至许多流行的音乐播放器!出于方便不同的人,你可以使用自己的 Lua 脚本或程序来进行扩展。
+
+#### 32. [Glances][28] ####
+
+
+
+使用 Glances 监控你的系统,其旨在使用最小的空间为你呈现最多的信息。它可以在客户端/服务器端模式下运行,也有远程监控的能力。它也有一个 Web 界面。
+
+#### 33. [saidar][29] ####
+
+
+
+Saidar 是一个非常小的工具,为你提供有关系统资源的基础信息。它将系统资源在全屏进行显示。重点是 saidar 会尽可能的简化。
+
+#### 34. [RRDtool][30] ####
+
+
+
+RRDtool 是用来处理 RRD 数据库的工具。RRDtool 旨在处理时间序列数据,如 CPU 负载,温度等。该工具提供了一种方法来提取 RRD 数据并以图形界面显示。
+
+#### 35. [monit][31] ####
+
+
+
+如果出现故障时,monit 有发送警报以及重新启动服务的功能。它可以对任何类型进行检查,你可以为 monit 写一个脚本,它有一个 Web 用户界面来分担你眼睛的压力。
+
+#### 36. [Linux process explorer][32] ####
+
+
+
+Linux process explorer 是类似 OSX 或 Windows 的在线监视器。它比 top 或 ps 的使用范围更广。你可以查看每个进程的内存消耗以及 CPU 的使用情况。
+
+#### 37. df ####
+
+
+
+df 是 disk free 的缩写,它是所有 UNIX 系统预装的程序,用来显示用户有访问权限的文件系统的可用磁盘空间。
+
+#### 38. [discus][33] ####
+
+
+
+Discus 类似于 df,它的目的是通过使用更吸引人的特性,如颜色,图形和数字来对 df 进行改进。
+
+#### 39. [xosview][34] ####
+
+
+
+xosview 是一款经典的系统监控工具,它给你提供包括 IRQ 的各个不同部分的总览。
+
+#### 40. [Dstat][35] ####
+
+
+
+Dstat 旨在替代 vmstat,iostat,netstat 和 ifstat。它可以让你查实时查看所有的系统资源。这些数据可以导出为 CSV。最重要的是 dstat 允许使用插件,因此其可以扩展到更多领域。
+
+#### 41. [Net-SNMP][36] ####
+
+SNMP 是“简单网络管理协议”,Net-SNMP 工具套件使用该协议可帮助你收集服务器的准确信息。
+
+#### 42. [incron][37] ####
+
+Incron 允许你监控一个目录树,然后对这些变化采取措施。如果你想将目录‘a’中的新文件复制到目录‘b’,这正是 incron 能做的。
+
+#### 43. [monitorix][38] ####
+
+Monitorix 是轻量级的系统监控工具。它可以帮助你监控一台机器,并为你提供丰富的指标。它也有一个内置的 HTTP 服务器,来查看图表和所有指标的报告。
+
+#### 44. vmstat ####
+
+
+
+vmstat(virtual memory statistics)是一个小的内置工具,能监控和显示机器的内存。
+
+#### 45. uptime ####
+
+这个小程序能快速显示你机器运行了多久,目前有多少用户登录和系统过去1分钟,5分钟和15分钟的平均负载。
+
+#### 46. mpstat ####
+
+
+
+mpstat 是一个内置的工具,能监视 cpu 的使用情况。最常见的使用方法是 `mpstat -P ALL`,它给你提供 cpu 的使用情况。你也可以间隔更新 cpu 的使用情况。
+
+#### 47. pmap ####
+
+
+
+pmap 是一个内置的工具,报告一个进程的内存映射。你可以使用这个命令来找出内存瓶颈的原因。
+
+#### 48. ps ####
+
+
+
+该命令将给你当前所有进程的概述。你可以使用 `ps -A` 命令查看所有进程。
+
+#### 49. [sar][39] ####
+
+
+
+sar 是 sysstat 包的一部分,可以帮助你收集,报告和保存不同系统的指标。使用不同的参数,它会给你提供 CPU, 内存 和 I/O 使用情况及其他东西。
+
+#### 50. [collectl][40] ####
+
+
+
+类似于 sar,collectl 收集你机器的性能指标。默认情况下,显示 cpu,网络和磁盘统计数据,但它实际收集了很多信息。与 sar 不同的是,collectl 能够处理比秒更小的单位,它可以被直接送入绘图工具并且 collectl 的监控过程更广泛。
+
+#### 51. [iostat][41] ####
+
+
+
+iostat 也是 sysstat 包的一部分。此命令用于监控系统的输入/输出。其报告可以用来进行系统调优,以更好地调节你机器上硬盘的输入/输出负载。
+
+#### 52. free ####
+
+
+
+这是一个内置的命令用于显示你机器上可用的内存大小以及已使用的内存大小。它还可以显示某时刻内核所使用的缓冲区大小。
+
+#### 53. /Proc 文件系统 ####
+
+
+
+proc 文件系统可以让你查看内核的统计信息。从这些统计数据可以得到你机器上不同硬件设备的详细信息。看看这个 [ proc文件统计的完整列表 ][42]。
+
+#### 54. [GKrellM][43] ####
+
+GKrellm 是一个图形应用程序来监控你硬件的状态信息,像CPU,内存,硬盘,网络接口以及其他的。它也可以监视并启动你所选择的邮件阅读器。
+
+#### 55. [Gnome 系统监控器][44] ####
+
+
+
+Gnome 系统监控器是一个基本的系统监控工具,其能通过一个树状结构来查看进程的依赖关系,能杀死及调整进程优先级,还能以图表形式显示所有服务器的指标。
+
+### 日志监控工具 ###
+
+#### 56. [GoAccess][45] ####
+
+
+
+GoAccess 是一个实时的网络日志分析器,它能分析 apache, nginx 和 amazon cloudfront 的访问日志。它也可以将数据输出成 HTML,JSON 或 CSV 格式。它会给你一个基本的统计信息,访问量,404页面,访客位置和其他东西。
+
+#### 57. [Logwatch][46] ####
+
+Logwatch 是一个日志分析系统。它通过分析系统的日志,并为你所指定的区域创建一个分析报告。它每天给你一个报告可以让你花费更少的时间来分析日志。
+
+#### 58. [Swatch][47] ####
+
+
+
+像 Logwatch 一样,Swatch 也监控你的日志,但不是给你一个报告,它会匹配你定义的正则表达式,当匹配到后会通过邮件或控制台通知你。它可用于检测入侵者。
+
+#### 59. [MultiTail][48] ####
+
+
+
+MultiTail 可帮助你在多窗口下监控日志文件。你可以将这些日志文件合并成一个。它也像正则表达式一样使用不同的颜色来显示日志文件以方便你阅读。
+
+#### 系统工具 ####
+
+#### 60. [acct or psacct][49] ####
+
+acct 也称 psacct(取决于如果你使用 apt-get 还是 yum)可以监控所有用户执行的命令,包括 CPU 和内存在系统内所使用的时间。一旦安装完成后你可以使用命令 ‘sa’ 来查看。
+
+#### 61. [whowatch][50] ####
+
+类似 acct,这个工具监控系统上所有的用户,并允许你实时查看他们正在执行的命令及运行的进程。它将所有进程以树状结构输出,这样你就可以清楚地看到到底发生了什么。
+
+#### 62. [strace][51] ####
+
+
+
+strace 被用于诊断,调试和监控程序之间的相互调用过程。最常见的做法是用 strace 打印系统调用的程序列表,其可以看出程序是否像预期那样被执行了。
+
+#### 63. [DTrace][52] ####
+
+
+
+DTrace 可以说是 strace 的大哥。它动态地跟踪与检测代码实时运行的指令。它允许你深入分析其性能和诊断故障。但是,它并不简单,大约有1200本书中提到过它。
+
+#### 64. [webmin][53] ####
+
+
+
+Webmin 是一个基于 Web 的系统管理工具。它不需要手动编辑 UNIX 配置文件,并允许你远程管理系统。它有一对监控模块用于连接它。
+
+#### 65. stat ####
+
+
+
+Stat 是一个内置的工具,用于显示文件和文件系统的状态信息。它会显示文件被修改,访问或更改的信息。
+
+#### 66. ifconfig ####
+
+
+
+ifconfig 是一个内置的工具用于配置网络接口。大多数网络监控工具背后都使用 ifconfig 将其设置成混乱模式来捕获所有的数据包。你可以手动执行 `ifconfig eth0 promisc` 并使用 `ifconfig eth0 -promisc` 返回正常模式。
+
+#### 67. [ulimit][54] ####
+
+
+
+ulimit 是一个内置的工具,可监控系统资源,并可以限制任何监控资源不得超标。比如做一个 fork 炸弹,如果使用 ulimit 正确配置了将完全不受影响。
+
+#### 68. [cpulimit][55] ####
+
+CPULimit 是一个小工具用于监控并限制进程对 CPU 的使用率。其特别有用,能限制批处理作业对 CPU 的使用率保持在一定范围。
+
+#### 69. lshw ####
+
+
+
+lshw 是一个小的内置工具能提取关于本机硬件配置的详细信息。它可以输出 CPU 版本和主板配置。
+
+#### 70. w ####
+
+w 是一个内置命令用于显示当前登录用户的信息及他们所运行的进程。
+
+#### 71. lsof ####
+
+
+
+lsof 是一个内置的工具可让你列出所有打开的文件和网络连接。从那里你可以看到文件是由哪个进程打开的,基于进程名,可通过一个特定的用户来杀死属于某个用户的所有进程。
+
+### 基础架构监控工具 ###
+
+#### 72. Server Density ####
+
+
+
+我们的 [服务器监控工具][56]!它有一个 web 界面,使你可以进行报警设置并可以通过图表来查看所有系统的网络指标。你还可以设置监控的网站,无论是否在线。Server Density 允许你设置用户的权限,你可以根据我们的插件或 api 来扩展你的监控。该服务已经支持 Nagios 的插件了。
+
+#### 73. [OpenNMS][57] ####
+
+
+
+OpenNMS 主要有四个功能区:事件管理和通知;发现和配置;服务监控和数据收集。其设计可被在多种网络环境中定制。
+
+#### 74. [SysUsage][58] ####
+
+
+
+SysUsage 通过 Sar 和其他系统命令持续监控你的系统。一旦达到阈值它也可以进行报警通知。SysUsage 本身也可以收集所有的统计信息并存储在一个地方。它有一个 Web 界面可以让你查看所有的统计数据。
+
+#### 75. [brainypdm][59] ####
+
+
+
+brainypdm 是一个数据管理和监控工具,它能收集来自 nagios 或其它公共资源的数据并以图表显示。它是跨平台的,其基于 Web 并可自定义图形。
+
+#### 76. [PCP][60] ####
+
+
+
+PCP 可以收集来自多个主机的指标,并且效率很高。它也有一个插件框架,所以你可以把它收集的对你很重要的指标使用插件来管理。你可以通过任何一个 Web 界面或 GUI 访问图形数据。它比较适合大型监控系统。
+
+#### 77. [KDE 系统保护][61] ####
+
+
+
+这个工具既是一个系统监控器也是一个任务管理器。你可以通过工作表来查看多台机器的服务指标,如果一个进程需要被杀死或者你需要启动一个进程,它可以在 KDE 系统保护中来完成。
+
+#### 78. [Munin][62] ####
+
+
+
+Munin 既是一个网络也是系统监控工具,当一个指标超出给定的阈值时它会提供报警机制。它运用 RRDtool 创建图表,并且它也有 Web 界面来显示这些图表。它更强调的是即插即用的功能并且有许多可用的插件。
+
+#### 79. [Nagios][63] ####
+
+
+
+Nagios 是系统和网络监控工具,可帮助你监控多台服务器。当发生错误时它也有报警功能。它的平台也有很多的插件。
+
+#### 80. [Zenoss][64] ####
+
+
+
+Zenoss 提供了一个 Web 界面,使你可以监控所有的系统和网络指标。此外,它能自动发现网络资源和修改网络配置。并且会提醒你采取行动,它也支持 Nagios 的插件。
+
+#### 81. [Cacti][65] ####
+
+
+
+(和上一个一样!) Cacti 是一个网络图形解决方案,其使用 RRDtool 进行数据存储。它允许用户在预定的时间间隔进行投票服务并将结果以图形显示。Cacti 可以通过 shell 脚本扩展来监控你所选择的来源。
+
+#### 82. [Zabbix][66] ####
+
+
+
+Zabbix 是一个开源的基础设施监控解决方案。它使用了许多数据库来存放监控统计信息。其核心是用 C 语言编写,并在前端中使用 PHP。如果你不喜欢安装代理,Zabbix 可能是一个最好选择。
+
+### 附加部分: ###
+
+感谢您的建议。这是我们的一个附加部分,由于我们需要重新编排所有的标题,鉴于此,这是在最后的一个简短部分,根据您的建议添加的一些 Linux 监控工具:
+
+#### 83. [collectd][67] ####
+
+Collectd 是一个 Unix 守护进程来收集所有的监控数据。它采用了模块化设计并使用插件来填补一些缺陷。这样能使 collectd 保持轻量级并可进行定制。
+
+#### 84. [Observium][68] ####
+
+Observium 是一个自动发现网络的监控平台,支持普通的硬件平台和操作系统。Observium 专注于提供一个优美,功能强大,简单直观的界面来显示网络的健康和状态。
+
+#### 85. Nload ####
+
+这是一个命令行工具来监控网络的吞吐量。它很整洁,因为它使用两个图表和其他一些有用的数据类似传输的数据总量来对进出站流量进行可视化。你可以使用如下方法安装它:
+
+ yum install nload
+
+或者
+
+ sudo apt-get install nload
+
+#### 86. [SmokePing][69] ####
+
+SmokePing 可以跟踪你网络延迟,并对他们进行可视化。SmokePing 有一个流行的延迟测量插件。如果图形用户界面对你来说非常重要,现在有一个正在开发中的插件来实现此功能。
+
+#### 87. [MobaXterm][70] ####
+
+如果你整天在 windows 环境下工作。你可能会觉得 Windows 下受终端窗口的限制。MobaXterm 正是由此而来的,它允许你使用多个在 Linux 中相似的终端。这将会极大地帮助你在监控方面的需求!
+
+#### 88. [Shinken monitoring][71] ####
+
+Shinken 是一个监控框架,其是由 python 对 Nagios 进行完全重写的。它的目的是增强灵活性和管理更大环境。但仍保持所有的 nagios 配置和插件。
+
+--------------------------------------------------------------------------------
+
+via: https://blog.serverdensity.com/80-linux-monitoring-tools-know/
+
+作者:[Jonathan Sundqvist][a]
+译者:[strugglingyouth](https://github.com/strugglingyouth)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+
+[a]:https://www.serverdensity.com/
+[1]:http://hisham.hm/htop/
+[2]:http://www.atoptool.nl/
+[3]:https://github.com/JeremyJones/Apachetop
+[4]:http://www.proftpd.org/docs/howto/Scoreboard.html
+[5]:http://jeremy.zawodny.com/mysql/mytop/
+[6]:https://01.org/powertop
+[7]:http://guichaz.free.fr/iotop/
+[8]:http://www.ntop.org/products/ntop/
+[9]:http://www.ex-parrot.com/pdw/iftop/
+[10]:http://jnettop.kubs.info/wiki/
+[11]:http://bandwidthd.sourceforge.net/
+[12]:http://etherape.sourceforge.net/
+[13]:https://www.kernel.org/pub/software/network/ethtool/
+[14]:http://nethogs.sourceforge.net/
+[15]:http://iptraf.seul.org/
+[16]:http://ngrep.sourceforge.net/
+[17]:http://oss.oetiker.ch/mrtg/
+[18]:https://github.com/tgraf/bmon/
+[19]:http://www.phildev.net/iptstate/index.shtml
+[20]:https://unix4lyfe.org/darkstat/
+[21]:http://humdi.net/vnstat/
+[22]:http://nmap.org/
+[23]:http://www.bitwizard.nl/mtr/
+[24]:http://www.tcpdump.org/
+[25]:http://justniffer.sourceforge.net/
+[26]:http://nmon.sourceforge.net/pmwiki.php
+[27]:http://conky.sourceforge.net/
+[28]:https://github.com/nicolargo/glances
+[29]:https://packages.debian.org/sid/utils/saidar
+[30]:http://oss.oetiker.ch/rrdtool/
+[31]:http://mmonit.com/monit
+[32]:http://sourceforge.net/projects/procexp/
+[33]:http://packages.ubuntu.com/lucid/utils/discus
+[34]:http://www.pogo.org.uk/~mark/xosview/
+[35]:http://dag.wiee.rs/home-made/dstat/
+[36]:http://www.net-snmp.org/
+[37]:http://inotify.aiken.cz/?section=incron&page=about&lang=en
+[38]:http://www.monitorix.org/
+[39]:http://sebastien.godard.pagesperso-orange.fr/
+[40]:http://collectl.sourceforge.net/
+[41]:http://sebastien.godard.pagesperso-orange.fr/
+[42]:http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html
+[43]:http://members.dslextreme.com/users/billw/gkrellm/gkrellm.html
+[44]:http://freecode.com/projects/gnome-system-monitor
+[45]:http://goaccess.io/
+[46]:http://sourceforge.net/projects/logwatch/
+[47]:http://sourceforge.net/projects/swatch/
+[48]:http://www.vanheusden.com/multitail/
+[49]:http://www.gnu.org/software/acct/
+[50]:http://whowatch.sourceforge.net/
+[51]:http://sourceforge.net/projects/strace/
+[52]:http://dtrace.org/blogs/about/
+[53]:http://www.webmin.com/
+[54]:http://ss64.com/bash/ulimit.html
+[55]:https://github.com/opsengine/cpulimit
+[56]:https://www.serverdensity.com/server-monitoring/
+[57]:http://www.opennms.org/
+[58]:http://sysusage.darold.net/
+[59]:http://sourceforge.net/projects/brainypdm/
+[60]:http://www.pcp.io/
+[61]:https://userbase.kde.org/KSysGuard
+[62]:http://munin-monitoring.org/
+[63]:http://www.nagios.org/
+[64]:http://www.zenoss.com/
+[65]:http://www.cacti.net/
+[66]:http://www.zabbix.com/
+[67]:https://collectd.org/
+[68]:http://www.observium.org/
+[69]:http://oss.oetiker.ch/smokeping/
+[70]:http://mobaxterm.mobatek.net/
+[71]:http://www.shinken-monitoring.org/
diff --git a/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md b/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md
new file mode 100644
index 0000000000..623886b896
--- /dev/null
+++ b/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md
@@ -0,0 +1,69 @@
+黑客利用Wi-Fi侵犯你隐私的七种方法
+================================================================================
+
+
+### 黑客利用Wi-Fi侵犯你隐私的七种方法 ###
+
+Wi-Fi — 既然方便又危险的东西!这里给大家介绍一下通过Wi-Fi连接泄露身份信息的七种方法和预防措施。
+
+
+
+### 利用免费热点 ###
+
+它们似乎无处不在,而且它们的数量会在[下一个四年里增加四倍][1]。但是它们当中很多都是不值得信任的,从你的登录凭证、email甚至更加敏感的账户,都能被黑客用一款名叫“sniffers”的软件截获 — 这款软件能截获到任何你通过该连接提交的信息。防止被黑客盯上的最好办法就是使用VPN(virtual private network),它能保护你的数据隐私它会加密你所输入的信息。
+
+
+
+### 网上银行 ###
+
+你可能认为没有人需要自己被提醒不要使用免费Wi-Fi来操作网上银行, 但网络安全厂商卡巴斯基实验室表示[全球超过100家银行因为网络黑客而损失9亿美元][2],由此可见还是有很多人因此受害。如果你真的想要在一家咖吧里使用免费真实的Wi-Fi,那么你应该向服务员确认网络名称。[在店里用路由器设置一个开放的无线连接][3]并将它的网络名称设置成店名是一件相当简单的事。
+
+
+
+### 始终开着Wi-Fi开关 ###
+
+如果你手机的Wi-Fi开关一直开着的,你会自动被连接到一个不安全的网络中去,你甚至都没有意识到。你可以利用你手机的[基于位置的Wi-Fi功能][4],如果它是可用的,那它会在你离开你所保存的网络范围后自动关闭你的Wi-Fi开关并在你回去之后再次开启。
+
+
+
+### 不使用防火墙 ###
+
+防火墙是你的第一道抵御恶意入侵的防线,它能有效地让你的电脑网络通畅并阻挡黑客和恶意软件。你应该时刻开启它除非你的杀毒软件有它自己的防火墙。
+
+
+
+### 浏览非加密网页 ###
+
+说起来很难过,[世界上排名前100万个网站中55%是不加密的][5],一个未加密的网站则会让传输的数据暴露在黑客的眼下。如果一个网页是安全的,你的浏览器则会有标明(比如说火狐浏览器是一把绿色的挂锁、Chrome蓝旗则是个绿色的图标)。但是一个安全的网站不能让你免于被劫持的风险,它能通过公共网络从你访问过的网站上窃取cookies,无论是不是正当网站与否。
+
+
+
+### 不更新你的安全防护软件 ###
+
+如果你想要确保你自己的网络是受保护的,就更新的路由器固件。你要做的就是进入你的路由器管理页面去检查,通常你能在厂商的官方网页上下载到最新的固件版本。
+
+
+
+### 不保护你的家用Wi-Fi ###
+
+不用说,设置一个复杂的密码和更改无线连接的默认名都是非常重要的。你还可以过滤你的MAC地址来让你的路由器只承认那些确认过的设备。
+
+**Josh Althuser**是一个开源支持者、网络架构师和科技企业家。在过去12年里,他花了很多时间去倡导使用开源软件来管理团队和项目,同时为网络应用程序提供企业级咨询并帮助它们走向市场。你可以联系[他的推特][6].
+
+--------------------------------------------------------------------------------
+
+via: http://www.networkworld.com/article/3003170/mobile-security/7-ways-hackers-can-use-wi-fi-against-you.html
+
+作者:[Josh Althuser][a]
+译者:[ZTinoZ](https://github.com/ZTinoZ)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:https://twitter.com/JoshAlthuser
+[1]:http://www.pcworld.com/article/243464/number_of_wifi_hotspots_to_quadruple_by_2015_says_study.html
+[2]:http://www.nytimes.com/2015/02/15/world/bank-hackers-steal-millions-via-malware.html?hp&action=click&pgtype=Homepage&module=first-column-region%C2%AEion=top-news&WT.nav=top-news&_r=3
+[3]:http://news.yahoo.com/blogs/upgrade-your-life/banking-online-not-hacked-182159934.html
+[4]:http://pocketnow.com/2014/10/15/should-you-leave-your-smartphones-wifi-on-or-turn-it-off
+[5]:http://www.cnet.com/news/chrome-becoming-tool-in-googles-push-for-encrypted-web/
+[6]:https://twitter.com/JoshAlthuser
diff --git a/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md b/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md
new file mode 100644
index 0000000000..271866ff47
--- /dev/null
+++ b/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md
@@ -0,0 +1,64 @@
+eSpeak: Linux文本转语音工具
+================================================================================
+
+
+[eSpeak][1]是Linux的命令行工具,能把文本转变成语音。这是一款用C语言写就的精致的语音合成器,提供英语和其它多种语言支持。
+
+eSpeak从标准输入或者输入文件中读取文本。虽然语音输出与真人声音相去甚远,但是,在你项目有用得到的地方,eSpeak仍不失为一个精致快捷的工具。
+
+eSpeak部分主要特性如下:
+
+- 为Linux和Windows准备的命令行工具
+- 从文件或者标准输入中把文本读出来
+- 提供给其它程序使用的共享库版本
+- 为Windows提供SAPI5版本,在screen-readers或者其它支持Windows SAPI5接口程序的支持下,eSpeak仍然能正常使用
+- 可移植到其它平台,包括安卓,OSX等
+- 多种特色声音提供选择
+- 语音输出可保存为[.WAV][2]格式的文件
+- 部分SSML([Speech Synthesis Markup Language][3])能为HTML所支持
+- 体积小巧,整个程序包括语言支持等占用不足2MB
+- 可以实现文本到音素编码的转化,能被其它语音合成引擎吸纳为前端工具
+- 可作为生成和调制音素数据的开发工具
+
+### 安装eSpeak ###
+
+基于Ubuntu的系统中,在终端运行以下命令安装eSpeak:
+
+ sudo apt-get install espeak
+
+eSpeak is an old tool and I presume that it should be available in the repositories of other Linux distributions such as Arch Linux, Fedora etc. You can install eSpeak easily using dnf, pacman etc.eSpeak是一个古老的工具,我推测它应该能在其它众多Linux发行版如Arch,Fedora中运行。使用dnf,pacman等命令就能轻易安装。
+
+eSpeak用法如下:输入espeak按enter键运行程序。输入字符按enter转换为语音输出(译补)。使用Ctrl+C来关闭运行中的程序。
+
+
+
+还有其它可以的选项,可以通过程序帮助进行查看。
+
+### GUI版本:Gespeaker ###
+
+如果你更倾向于使用GUI版本,可以安装Gespeaker,它为eSpeak提供了GTK界面。
+
+使用以下命令来安装Gespeaker:
+
+ sudo apt-get install gespeaker
+
+操作接口简明易用,你完全可以自行探索。
+
+
+
+虽然这个工具不能为大部分计算所用,但是当你的项目需要把文本转换成语音,espeak还是挺方便使用的。需则用之吧~
+
+--------------------------------------------------------------------------------
+
+via: http://itsfoss.com/espeak-text-speech-linux/
+
+作者:[Abhishek][a]
+译者:[译者ID](https://github.com/soooogreen)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://itsfoss.com/author/abhishek/
+[1]:http://espeak.sourceforge.net/
+[2]:http://en.wikipedia.org/wiki/WAV
+[3]:http://en.wikipedia.org/wiki/Speech_Synthesis_Markup_Language
diff --git a/translated/talk/20101020 19 Years of KDE History--Step by Step.md b/translated/talk/20101020 19 Years of KDE History--Step by Step.md
new file mode 100644
index 0000000000..ef90acd91f
--- /dev/null
+++ b/translated/talk/20101020 19 Years of KDE History--Step by Step.md
@@ -0,0 +1,209 @@
+# 19年KDE进化历程
+注:youtube 视频
+
+
+## 概述
+KDE – 史上功能最强大的桌面环境之一; 开源且免费。19年前,1996年10月14日,德国程序员 Matthias Ettrich 开始了编写这个美观的桌面环境。KDE提供了诸如shell以及其他很多日常使用的程序。今日,KDE被成千上万人在 Unix 和 Windows 上使用。19年----一个对软件项目而言极为漫长的年岁。现在是时候让我们回到最初,看看这一切从哪里开始了。
+
+K Desktop Environment(KDE)有很多创新之处:新设计,美观,连贯性,易于使用,对普通用户和专业用户都足够强大的应用库。"KDE"这个名字是对单词"通用桌面环境"(Common Desktop Environment)玩的一个简单谐音游戏,"K"----"Cool"。 第一代KDE在双证书授权下使用了有专利的 Trolltech's Qt 框架 (现Qt的前身),这两个许可证分别是 open source QPL(Q public license) 和 商业专利许可证(proprietary commercial license)。在2000年 Trolltech 让一部分 Qt 软件库开始发布在 GPL 证书下; Qt 4.5 发布在了 LGPL 2.1 许可证下。自2009起 KDE 桌面环境由三部分构成:Plasma Workspaces (作Shell),KDE 应用,作为 KDE Software 编译的 KDE Platform.
+
+## 各发布版本
+### Pre-Release – 1996年10月14日
+
+
+当时名称为 Kool Desktop Environment;"Kool"这个单词在很快就被弃用了。最初,所有KDE的组件都是被单独发布在开发社区里的,他们之间没有任何环绕大项目的组装配合。开发组邮件列表中的第一封通信是发往kde@fiwi02.wiwi.uni-Tubingen.de 的邮件。
+
+### KDE 1.0 – 1998年7月12日
+
+
+这个版本受到了颇有争议的反馈。很多人反对使用Qt框架----当时的 FreeQt 许可证和自由软件许可证并不兼容----并建议开发组使用 Motif 或者 LessTif 替代。尽管有着这些反对声,KDE 仍然被很多用户所青睐,并且成功作为第一个Linux发行版的环境被集成了进去。(made its way into the first Linux distributions)
+
+
+
+1999年1月28日
+
+一次升级,**K Desktop Environment 1.1**,更快,更稳定的同时加入了很多小升级。这个版本同时也加入了很多新的图标,背景,外观文理。和这些全面翻新同时出现的还有 Torsten Rahn 绘制的全新KDE图标----齿轮前的3个K字母;这个图标的修改版也一直沿用至今。
+
+### KDE 2.0 – 2000年10月23日
+
+
+重大更新:_ DCOP (Desktop COmmunication Protocol),一个端到端的通信协议 _ KIO,一个应用程序I/O库 _ KParts,组件对象模板 _ KHTML,一个符合 HTML 4.0 标准的图像绘制引擎。
+
+
+
+2001年2月26日
+
+**K Desktop Environment 2.1** 首次发布了媒体播放器 noatun,noatun使用了先进的模组-插件设计。为了便利开发者,K Desktop Environment 2.1 打包了 KDevelop
+
+
+
+2001年8月15日
+
+**KDE 2.2**版本在GNU/Linux上加快了50%的应用启动速度,同时提高了稳定性和 HTML、JavaScript的解析性能,同时还增加了一些 KMail 的功能。
+
+### KDE 3.0 – 2002年4月3日
+
+
+K Desktop Environment 3.0 加入了更好的限制使用功能,这个功能在网咖,企业公用电脑上被广泛需求。
+
+
+
+2003年1月28日
+
+**K Desktop Environment 3.1** 加入了新的默认窗口(Keramik)和图标样式(Crystal)和其他一些改进。
+
+
+
+2004年2月3日
+
+**K Desktop Environment 3.2** 加入了诸如网页表格,书写邮件中拼写检查的新功能;补强了邮件和日历功能。完善了Konqueror 中的标签机制和对 Microsoft Windows 桌面共享协议的支持。
+
+
+
+2004年8月19日
+
+**K Desktop Environment 3.3** 侧重于组合不同的桌面组件。Kontact 被放进了群件应用Kolab 并与 Kpilot 结合。Konqueror 的加入让KDE有了更好的 IM 交流功能,比如支持发送文件,以及其他 IM 协议(如IRC)的支持。
+
+
+
+2005年3月16日
+
+**K Desktop Environment 3.4** 侧重于提高易用性。这次更新为Konqueror,Kate,KPDF加入了文字-语音转换功能;也在桌面系统中加入了独立的 KSayIt 文字-语音转换软件。
+
+
+
+2005年11月29日
+
+**The K Desktop Environment 3.5** 发布加入了 SuperKaramba,为桌面环境提供了易于安装的插件机制。 desktop. Konqueror 加入了广告屏蔽功能并成为了有史以来第二个通过Acid2 CSS 测试的浏览器。
+
+### KDE SC 4.0 – 2008年1月11日
+
+
+大部分开组投身于把最新的技术和开发框架整合进 KDE 4 当中。Plasma 和 Oxygen 是两次最大的用户界面风格变更。同时,Dolphin 替代 Konqueror 成为默认文件管理器,Okular 成为了默认文档浏览器。
+
+
+
+2008年7月29日
+
+**KDE 4.1** 引入了一个在 PIM 和 Kopete 中使用的表情主题系统;引入了可以让用户便利地从互联网上一键下载数据的DXS。同时引入了 GStreamer,QuickTime,和 DirectShow 9 Phonon 后台。加入了新应用如:_ Dragon Player _ Kontact _ Skanlite – 扫描仪软件,_ Step – 物理模拟软件 * 新游戏: Kdiamond,Kollision,KBreakout 和更多......
+
+
+
+2009年1月27日
+
+**KDE 4.2** 被认为是在已经极佳的 KDE 4.1 基础上的又一次全面超越,同时也成为了大多数用户替换旧 3.5 版本的完美选择。
+
+
+
+2009年8月4日
+
+**KDE 4.3** 修复了超过10,000个 bugs,同时加入了让近2,000个被用户需求的功能。整合一些新的技术例如:PolicyKit,NetworkManage & Geolocation services 等也是这个版本的一大重点。
+
+
+
+2010年2月9日
+
+**KDE SC 4.4** 基础 Qt 4 开框架的 4.6 版本,新的应用 KAddressBook 被加入,同时也是is based on version 4.6 of the Qt 4 toolkit. New application – KAddressBook,Kopete首次发布。
+
+
+
+2010年8月10日
+
+**KDE SC 4.5** 增加了一些新特性:整合了 WebKit 库----一个开源的浏览器引擎库,现在也被在 Apple Safari 和 Google Chrome 中广泛使用。KPackageKit 替换了 Kpackage。
+
+
+
+2011年1月26日
+
+**KDE SC 4.6** 加强了 OpenGl 的性能,同时照常更新了无数bug和小改进。
+
+
+
+2011年7月27日
+
+**KDE SC 4.7** 升级 KWin 以兼容 OpenGL ES 2.0 ,更新了 Qt Quick,Plasma Desktop 中在应用里普遍使用的新特性 1.2万个bug被修复。
+
+
+
+2012年1月25日
+
+**KDE SC 4.8**: 更好的 KWin 性能与 Wayland 支持,更新了 Doplhin 的外观设计。
+
+
+
+2012年8月1日
+
+**KDE SC 4.9**: 向 Dolphin 文件管理器增加了一些更新,比如加入了实时文件重命名,鼠标辅助按钮支持,更好的位置标签和更多文件分类管理功能。
+
+
+
+2013年2月6日
+
+**KDE SC 4.10**: 很多 Plasma 插件使用 QML 重写; Nepomuk,Kontact 和 Okular 得到了很大程度的性能和功能提升。
+
+
+
+2013年8月14日
+
+**KDE SC 4.11**: Kontact 和 Nepomuk 有了很大的优化。 第一代 Plasma Workspaces 进入了仅有维护而没有新生开发的软件周期。
+
+
+
+2013年12月18日
+
+**KDE SC 4.12**: Kontact 得到了极大的提升。
+
+
+
+2014年4月16日
+
+**KDE SC 4.13**: Nepomuk 语义搜索功能替代了桌面上的原有的Baloo搜索。 KDE SC 4.13 发布了53个语言版本。
+
+
+
+2014年8月20日
+
+**KDE SC 4.14**: 这个发布版本侧重于稳定性提升:大量的bug修复和小更新。这是最后一个 KDE SC 4 发布版本。
+
+### KDE Plasma 5.0 – 2014年7月15日
+
+
+KDE Plasma 5 – 第五代 KDE。大幅改进了设计和系统,新的默认主题 ---- Breeze,完全迁移到了 QML,更好的 OpenGL 性能,更完美的 HiDPI (高分辨率)显示支持。
+
+
+
+2014年11月11日
+
+**KDE Plasma 5.1**:加入了Plasma 4里原先没有补完的功能。
+
+
+
+2015年1月27日
+
+**KDE Plasma 5.2**:新组件:BlueDevil,KSSHAskPass,Muon,SDDM 主题设置,KScreen,GTK+ 样式设置 和 KDecoration.
+
+
+
+2015年4月28日
+
+**KDE Plasma 5.3**:Plasma Media Center 技术预览。新的蓝牙和触摸板小程序;改良了电源管理。
+
+
+
+2015年8月25日
+
+**KDE Plasma 5.4**:Wayland 登场,新的基于 QML 的音频管理程序,交替式全屏程序显示。
+
+万分感谢 [KDE][1] 开发者和社区及Wikipedia 为书写 [概述][2] 带来的帮助,同时,感谢所有读者。希望大家保持自由精神(be free)并继续支持如同 KDE 一样的开源的自由软件发展。
+
+--------------------------------------------------------------------------------
+
+via: [https://tlhp.cf/kde-history/](https://tlhp.cf/kde-history/)
+
+作者:[Pavlo RudyiCategories][a] 译者:[jerryling315](https://github.com/jerryling315) 校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[1]: https://www.kde.org/
+[2]: https://en.wikipedia.org/wiki/KDE_Plasma_5
+[a]: https://tlhp.cf/author/paul/
diff --git a/translated/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md b/translated/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md
deleted file mode 100644
index 76368e1033..0000000000
--- a/translated/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md
+++ /dev/null
@@ -1,98 +0,0 @@
-ԱȽϵķʽLinuxûFreeBSD
-================================================================================
-
-
-### ###
-
-BSDUNIX̳жĿǰUnixϵͳǻBSDġFreeBSDʹ㷺ĿԴа棨BSDа棩˼һһѿԴUnixϵͳǹƽ̨FreeBSDԴͨԿɵBSD֤LinuxкܶƵĵطǵóںܶвͬ
-
-ĵಿ֯£FreeBSDڵһ֣FreeBSDLinuxƵڵڶ֣ǵڵۣǹܵۺܽһڡ
-
-### FreeBSD ###
-
-#### ʷ ####
-
-- FreeBSDĵһ汾1993꣬ĵһCD-ROMFreeBSD1.0Ҳ1993ꡣFreeBSD 2.1.01995귢һûʵIT˾ʹFreeBSDҺ⣬ǿгеһЩIBMNokiaNetAppJuniper Network
-
-#### ֤ ####
-
-- ֤FreeBSDԶֿԴ֤зµΪKernelĴBSD֤˷ʹú·FreeBSDľɡĴBSD֤зЩGPLCDDL֤ġ
-
-#### û ####
-
-- FreeBSDҪص֮һûʵϣFreeBSDΪʼWeb ServerFTPԼ·ȣֻҪзصɡFreeBSD֧ARMPowerPCMIPSx86x86-64ܹ
-
-### FreeBSDLinuxƴ ###
-
-FreeBSDLinuxѿԴʵϣǵûԺļ鲢Դ룬ûӵоԵɡңFreeBSDLinuxUnixϵͳǵںˡڲʹôʷϵAT&T Unix̳е㷨FreeBSDӸϸUnixϵͳLinuxΪѵUnixϵͳġӦöFreeBSDLinuxҵʵϣǼͬĹܡ
-
-⣬FreeBSDܹдLinuxӦáװһLinuxļݲ㣬ݲڱFreeBSDʱAAC Compact LinuxõͨѱLinuxݲFreeBSDϵͳлݳaac_linux.koͬFreeBSDǣLinuxFreeBSD
-
-עȻͬĿ꣬һЩ֮ͬһг
-
-### FreeBSDLinux ###
-
-Ŀǰڴû˵ûһѡFreeBSDLinuxΪźܶͬӦóΪǶUnixϵͳ
-
-һ£ǽгϵͳһЩҪIJ֮ͬ
-
-#### ֤ ####
-
-- ϵͳǵ֤LinuxGPL֤УΪûṩĶкԴɣGPL֤ûжơFreeBSDBSD֤BSD֤GPLݣΪҪԸ֤ζκûܹʹáĴ룬ҲҪά֮ǰ֤
-- ֤ѡһ֡BSD֤ûʵϣ֤ʹûڱ֤ԴķԵͬʱԸ֤˵˵GPLҪÿʹԸ֤ûע⡣
-- Բ֤ͬѡҪ˽ǸԵ֤ԼǿеķۣӶ˽ԵѡʺԼġ
-
-#### ####
-
-- FreeBSDLinuxԲ֤ͬģLinus TorvaldsLinuxںˣFreeBSDȴLinuxͬδơҸ˸ʹFreeBSDLinuxΪFreeBSDǾɵûκοɵĴڡLinuxFreeBSDIJ֮ͬҽȲѡȶ걾ĺѡ
-
-#### ϵͳ ####
-
-- Linux۽ںϵͳFreeBSDͬFreeBSDϵͳάšFreeBSDں˺һFreeBSDŶӿΪһάʵϣFreeBSDԱܹԶҸЧĹIJϵͳ
-- Linux棬ڹϵͳһЩѡڲͬɲͬԴάLinuxҪǻ㼯ܴﵽͬĹܡ
-- FreeBSDLinuxûĿѡͷа棬ǹķʽͬFreeBSDͳһĹʽLinuxҪֱά
-
-#### Ӳ֧ ####
-
-- ˵Ӳ֧֣LinuxFreeBSDĸáⲻζFreeBSDûLinux֧ӲֻڹķʽͬͨˣѰµĽFreeBSDӦѰһĻʹLinux
-
-#### ԭFreeBSD Vs ԭLinux ####
-
-- ߵԭϵͳв֮ͬǰ˵ģLinuxһUnixϵͳLinux Torvaldsдϵ༫һЭʵֵġLinuxһִϵͳҪȫܣڴ桢⡢̬ءڴȡGPL֤
-- FreeBSDҲ̳UnixҪԡFreeBSDΪڼݴѧBSDһַа档BSDҪԭһԴϵͳAT&TϵͳӶûAT&T֤ʹõ
-- ֤ǿĵ⡣ͼṩһ¡UnixĿԴϵͳӰûѡFreeBSDLinuxʹBSD֤зɡ
-
-#### ֵ֧ ####
-
-- ûĽǶһ߲ͬĵطԼԴ밲װĿԺ֧֡LinuxֻṩԤĶưFreeBSDͬṩԤİһṩԴͰװĹϵͳֲFreeBSDѡʹԤĬϣڱʱ
-- ЩѡFreeBSDеңǵĹDzλģ/usr/portsҵԴļĵַԼһЩȷʹFreeBSDĵ
-- ЩᵽĿѡ˲ͬ汾ĿԡFreeBSDͨԴ빹ԼԤLinuxһֻԤʹְװʽϵͳ
-
-#### FreeBSD Linux ù߱Ƚ ####
-
-- дijùFreeBSDϿãȤFreeBSDŶӵС෴ģLinuxGNUΪʲôʹһЩơ
-- ʵFreeBSDõBSD֤dzáˣάIJϵͳЩӦóĿһЩǵ - BSDUnixĹߣͬGNUGNUֻСݡ
-
-#### Shell ####
-
-- FreeBSDĬʹtcshcsh棬FreeBSDBSD֤У˲ʹGNU bash shellbashtcshtcshĽűܡʵϣǸƼFreeBSDʹsh shellΪӿɿԱһЩʹtcshcshʱֵĽű⡣
-
-#### һӲλļϵͳ ####
-
-- ֮ǰᵽһʹFreeBSDʱϵͳԼѡԱһЩǵıLinux£/bin/sbin/usr/bin/usr/sbinǴſִļĿ¼FreeBSDͬһЩӵĶ֯Ĺ淶ϵͳ/usr/local/bin/usr/local/sbinĿ¼¡ַֻϵͳͿѡ
-
-### ###
-
-FreeBSDLinuxҿԴϵͳƵҲвͬ㡣гݲ˵ĸϵͳһáʵϣFreeBSDLinuxԼصͼʹϵͳôʲôأѾʹеijϵͳôΪǵĻķǷĻڶǵôԴĹ۵㡣
-
---------------------------------------------------------------------------------
-
-via: https://www.unixmen.com/comparative-introduction-freebsd-linux-users/
-
-ߣ[anismaj][a]
-ߣ[wwy-hust](https://github.com/wwy-hust)
-Уԣ[УID](https://github.com/УID)
-
- [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ
-
-[a]:https://www.unixmen.com/author/anis/
\ No newline at end of file
diff --git a/translated/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md b/translated/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md
deleted file mode 100644
index 667a951f39..0000000000
--- a/translated/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md
+++ /dev/null
@@ -1,57 +0,0 @@
-Linux比Mac OS X更好吗?历史中的GNU,开源和Apple
-==============================================================================
-> 自由软件/开源社区与Apple之间的争论可以回溯到上世纪80年代,当时Linux的创始人称Mac OS X的核心就是"一个废物",还有其他一些软件历史上的轶事。
-
-
-
-开源拥护者们与微软之间有着很长,而且摇摆的关系。每个人都知道这个。但是,在许多方面,自由或者开源软件的支持者们与Apple之间的紧张关系则更加突出——尽管这很少受到媒体的关注。
-
-需要说明的是,并不是所有的开源拥护者都厌恶苹果。Anecdotally(待译),我已经见过很多Linux的黑客玩弄iPhones和iPads。实际上,许多Linux用户是十分喜欢Apple的OS X系统的,以至于他们[创造了很多Linux的发行版][1],都设计得看起来像OS X。(顺便说下,[北朝鲜政府][2]就这样做了。)
-
-但是Mac的信徒与企鹅——即Linux社区(未提及自由与开源软件世界的小众群体)的信徒之间的关系,并不一直是完全的和谐。并且这绝不是一个新的现象,在我研究Linux历史和开源基金会的时候就发现了。
-
-### GNU vs. Apple ###
-
-这场战争将回溯到至少上世界80年代后期。1988年6月,Richard Stallman发起了[GNU][3]项目,希望建立一个完全自由的类Unix操作系统,其源代码讲会免费共享,[[强烈指责][4]Apple对[Hewlett-Packard][5](HPQ)和[Microsoft][6](MSFT)的诉讼,称Apple的声明中,说别人对Macintosh操作系统的界面和体验的抄袭是不正确。如果Apple流行,GNU警告到,这家公司“将会借助大众的新力量终结掉自由软件,而自由软件可以成为商业软件的替代品。”
-
-那个时候,GNU对抗Apple的诉讼(这意味着,十分讽刺的是,GNU正在支持Microsoft,尽管当时的情况不一样),通过发布["让你的律师远离我的电脑”按钮][7]。同时呼吁GNU的支持者们抵制Apple,警告如果Macintoshes看起来是不错的计算机,但Apple一旦赢得了诉讼就会给市场带来垄断,这会极大地提高计算机的售价。
-
-Apple最终[输掉了诉讼][8],但是直到1994年之后,GNU才[撤销对Apple的抵制][9]。这期间,GNU一直不断指责Apple。在上世纪90年代早期甚至之后,GNU开始发展GNU软件项目,可以在其他个人电脑平台包括MS-DOS上使用。[GNU 宣称][10],除非Apple停止在计算机领域垄断的野心,让用户界面可以模仿Macintosh的一些东西,否则“我们不会提供任何对Apple机器的支持。”(因此讽刺的是一大堆软件都开发了OS X和类Unix系统的版本,于是Apple在90年代后期介绍这些软件来自GNU。但是那是另外的故事了。)
-
-### Trovalds on Jobs ###
-
-除去他对大多数发行版比较自由放任的态度,Liuns Trovalds,Linux内核的创造者,相较于Stallman和GNU过去对Apple的态度没有多一点仁慈。在他2001年出版的书"Just For Fun: The Story of an Accidental Revolutionary"中,Trovalds描述到与Steve Jobs的一个会面,大约是1997年收到后者的邀请去讨论Mac OS X,Apple正在开发,但还没有公开发布。
-
-"基本上,Jobs一开始就试图告诉我在桌面上的玩家就两个,Microsoft和Apple,而且他认为我能为Linux做的最好的事,就是从了Apple,努力让开源用户站到Mac OS X后面去"Trovalds写道。
-
-这次谈判显然让Trovalds很不爽。争吵的一点集中在Trovalds对Mach技术上的藐视,对于Apple正在用于构建新的OS X操作系统的内核,Trovalds称其“一推废物。它包含了所有你能做到的设计错误,并且甚至打算只弥补一小部分。”
-
-但是更令人不快的是,显然是Jobs在开发OS X时入侵开源的方式(OS X的核心里上有很多开源程序):“他有点贬低了结构的瑕疵:谁在乎基础操作系统,真正的low-core东西是不是开源,如果你有Mac层在最上面,这不是开源?”
-
-一切的一切,Trovalds总结到,Jobs“并没有使用太多争论。他仅仅很简单地说着,胸有成竹地认为我会对与Apple合作感兴趣”。“他没有任何线索,不能去想像还会有人并不关心Mac市场份额的增长。我认为他真的感到惊讶了,当我表现出对Mac的市场有多大,或者Microsoft市场有多大的可怜的关心时。”
-
-当然,Trovalds并没有对所有Linux用户说起。他对于OS X和Apple的看法从2001年开始就渐渐软化了。但实际上,早在2000年,Linux社区的领导角色表现出对Apple和其高层的傲慢的深深的鄙视,可以看出一些重要的东西,关于Apple和开源/自由软件世界的矛盾是多么的根深蒂固。
-
-从以上两则历史上的花边新闻中,可以看到关于Apple产品价值的重大争议,即是否该公司致力于提升软硬件的质量,或者仅仅是借市场的小聪明获利,后者会让Apple产品卖出更多的钱,**********(该处不知如何翻译)。但是不管怎样,我会暂时置身讨论之外。
-
---------------------------------------------------------------------------------
-
-via: http://thevarguy.com/open-source-application-software-companies/051815/linux-better-os-x-gnu-open-source-and-apple-
-
-作者:[Christopher Tozzi][a]
-译者:[wi-cuckoo](https://github.com/wi-cuckoo)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://thevarguy.com/author/christopher-tozzi
-[1]:https://www.linux.com/news/software/applications/773516-the-mac-ifying-of-the-linux-desktop/
-[2]:http://thevarguy.com/open-source-application-software-companies/010615/north-koreas-red-star-linux-os-made-apples-image
-[3]:http://gnu.org/
-[4]:https://www.gnu.org/bulletins/bull5.html
-[5]:http://www.hp.com/
-[6]:http://www.microsoft.com/
-[7]:http://www.duntemann.com/AppleSnakeButton.jpg
-[8]:http://www.freibrun.com/articles/articl12.htm
-[9]:https://www.gnu.org/bulletins/bull18.html#SEC6
-[10]:https://www.gnu.org/bulletins/bull12.html
diff --git a/translated/talk/20150820 Why did you start using Linux.md b/translated/talk/20150820 Why did you start using Linux.md
new file mode 100644
index 0000000000..aa48db697c
--- /dev/null
+++ b/translated/talk/20150820 Why did you start using Linux.md
@@ -0,0 +1,144 @@
+年轻人,你为啥使用 linux
+================================================================================
+> 今天的开源综述:是什么带你进入 linux 的世界?号外:IBM 基于 Linux 的大型机。以及,你应该抛弃 win10 选择 Linux 的原因。
+
+### 当初你为何使用 Linux? ###
+
+Linux 越来越流行,很多 OS X 或 Windows 用户都转移到 Linux 阵营了。但是你知道是什么让他们开始使用 Linux 的吗?一个 Reddit 用户在网站上问了这个问题,并且得到了很多有趣的回答。
+
+一个名为 SilverKnight 的用户在 Reddit 的 Linux 板块上问了如下问题:
+
+> 我知道这个问题肯定被问过了,但我还是想听听年轻一代使用 Linux 的原因,以及是什么让他们坚定地成为 Linux 用户。
+>
+> 我无意阻止大家讲出你们那些精彩的 Linux 故事,但是我还是对那些没有经历过什么精彩故事的新人的想法比较感兴趣。
+>
+> 我27岁,半吊子 Linux 用户,这些年装过不少发行版,但没有投入全部精力去玩 Linux。我正在找更多的、能让我全身心投入到 Linux 潮流的理由,或者说激励。
+>
+> [详见 Reddit][1]
+
+以下是网站上的回复:
+
+> **DoublePlusGood**:我12岁开始使用 Backtrack(现在改名为 Kali),因为我想成为一名黑客(LCTT 译注:原文1337 haxor,1337 是 leet 的火星文写法,意为'火星文',haxor 为 hackor 的火星文写法,意为'黑客',另一种写法是 1377 h4x0r,满满的火星文文化)。我现在一直使用 ArchLinux,因为它给我无限自由,让我对我的电脑可以为所欲为。
+>
+> **Zack**:我记得是12、3岁的时候使用 Linux,现在15岁了。
+>
+> 我11岁的时候就对 Windows XP 感到不耐烦,一个简单的功能,比如关机,TMD 都要让我耐心等着它慢慢完成。
+>
+> 在那之前几个月,我在 freenode IRC 聊天室参与讨论了一个游戏,它是一个开源项目,大多数用户使用 Linux。
+>
+> 我不断听到 Linux 但当时对它还没有兴趣。然而由于这些聊天频道(大部分在 freenode 上)谈论了很多编程话题,我就开始学习 python 了。
+>
+> 一年后我尝试着安装 GNU/Linux (主要是 ubuntu)到我的新电脑(其实不新,但它是作为我的生日礼物被我得到的)。不幸的是它总是不能正常工作,原因未知,也许硬盘坏了,也许灰尘太多了。
+>
+> 那时我放弃自己解决这个问题,然后缠着老爸给我的电脑装上 Ubuntu,他也无能为力,原因同上。
+>
+> 在追求 Linux 一段时间后,我打算抛弃 Windows,使用 Linux Mint 代替 Ubuntu,本来没抱什么希望,但 Linux Mint 竟然能跑起来!
+>
+> 于是这个系统我用了6个月。
+>
+> 那段时间我的一个朋友给了我一台虚拟机,跑 Ubuntu 的,我用了一年,直到我爸给了我一台服务器。
+>
+> 6个月后我得到一台新 PC(现在还在用)。于是起想折腾点不一样的东西。
+>
+> 我打算装 openSUSE。
+>
+> 我很喜欢这个系统。然后在圣诞节的时候我得到树莓派,上面只能跑 Debian,还不能支持其它发行版。
+>
+> **Cqz**:我9岁的时候有一次玩 Windows 98,结果这货当机了,原因未知。我没有 Windows 安装盘,但我爸的一本介绍编程的杂志上有一张随书附赠的光盘,这张光盘上刚好有 Mandrake Linux 的安装软件,于是我瞬间就成为了 Linux 用户。我当时还不知道自己在玩什么,但是玩得很嗨皮。这些年我虽然在电脑上装了多种 Windows 版本,但是 FLOSS 世界才是我的家。现在我只把 Windows 装在虚拟机上,用来玩游戏。
+>
+> **Tosmarcel**:15岁那年对'编程'这个概念很好奇,然后我开始了哈佛课程'CS50',这个课程要我们安装 Linux 虚拟机用来执行一些命令。当时我问自己为什么 Windows 没有这些命令?于是我 Google 了 Linux,搜索结果出现了 Ubuntu,在安装 Ubuntu。的时候不小心把 Windows 分区给删了。。。当时对 Linux 毫无所知,适应这个系统非常困难。我现在16岁,用 ArchLinux,不想用回 Windows,我爱 ArchLinux。
+>
+> **Micioonthet**:第一次听说 Linux 是在我5年级的时候,当时去我一朋友家,他的笔记本装的就是 MEPIS(Debian的一个比较老的衍生版),而不是 XP。
+>
+> 原来是他爸爸是个美国的社会学家,而他全家都不信任微软。我对这些东西完全陌生,这系统完全没有我熟悉的软件,我很疑惑他怎么能使用。
+>
+> 我13岁那年还没有自己的笔记本电脑,而我另一位朋友总是抱怨他的电脑有多慢,所以我打算把它买下来并修好它。我花了20美元买下了这台装着 Windows Vista 系统、跑满病毒、完全无法使用的惠普笔记本。我不想重装讨厌的 Windows 系统,记得 Linux 是免费的,所以我刻了一张 Ubuntu 14.04 光盘,马上把它装起来,然后我被它的高性能给震精了。
+>
+> 我的世界(由于它允运行在 JAVA 上,所以当时它是 Linux 下为数不多的几个游戏之一)在 Vista 上只能跑5帧每秒,而在 Ubuntu 上能跑到25帧。
+>
+> 我到现在还会偶尔使用一下那台笔记本,Linux 可不会在乎你的硬件设备有多老。
+>
+> 之后我把我爸也拉入 Linux 行列,我们会以很低的价格买老电脑,装上 Linux Mint 或其他轻量级发行版,这省了好多钱。
+>
+> **Webtm**:我爹每台电脑都会装多个发行版,有几台是 opensuse 和 Debian,他的个人电脑装的是 Slackware。所以我记得很小的时候一直在玩 debian,但没有投入很多精力,我用了几年的 Windows,然后我爹问我有没有兴趣试试 debian。这是个有趣的经历,在那之后我一直使用 debian。而现在我不用 Linux,转投 freeBSD,5个月了,用得很开心。
+>
+> 完全控制自己的系统是个很奇妙的体验。开源届有好多酷酷的软件,我认为在自己解决一些问题并且利用这些工具解决其他事情的过程是最有趣的。当然稳定和高效也是吸引我的地方。更不用说它的保密级别了。
+>
+> **Wyronaut**:我今年18,第一次玩 Linux 是13岁,当时玩的 Ubuntu,为啥要碰 Linux?因为我想搭一个'我的世界'的服务器来和小伙伴玩游戏,当时'我的世界'可是个新鲜玩意儿。而搭个私服需要用 Linux 系统。
+>
+> 当时我还是个新手,对着 Linux 的命令行有些傻眼,因为很多东西都要我自己处理。还是多亏了 Google 和维基,我成功地在多台老 PC 上部署了一些简单的服务器,那些早已无人问津的老古董机器又能发挥余热了。
+>
+> 跑过游戏服务器后,我又开始跑 web 服务器,先是跑了几年 HTML,CSS 和 PHP,之后受 TheNewBoston 视频的误导转到了 JAVA。
+>
+> 一周后放弃 JAVA 改用 Python,当时学习 Python 用的书名叫《Learn Python The Hard Way》,作者是 Zed A. Shaw。我花了两周学完 Python,然后开始看《C++ Primer》,因为我想做游戏开发。看到一半(大概500页)的时候我放弃了。那个时候我有点讨厌玩电脑了。
+>
+> 这样中断了一段时间之后,我决定学习 JavaScript,读了2本书,试了4个平台,然后又不玩了。
+>
+> 现在到了不得不找一所学校并决定毕业后找什么样工作的糟糕时刻。我不想玩图形界面编程,所以我不会进游戏行业。我也不喜欢画画和建模。然后我发现了一个涉及网络安全的专业,于是我立刻爱上它了。我挑了很多 C 语言的书来度过这个假期,并且复习了一下数学来迎接新的校园生活。
+>
+> 目前我玩 archlinux,不同 PC 上跑着不同任务,它们运行很稳定。
+>
+> 可以说 Linux 带我进入编程的世界,而反过来,我最终在学校要学的就是 Linux。我估计会终生感谢 Linux。
+>
+> **Linuxllc**:你们可以学学像我这样的老头。
+>
+> 扔掉 Windows!扔掉 Windows!扔掉 Windows!给自己一个坚持使用 Linux 的理由,那就是完全,彻底,远离,Windows。
+>
+> 我在 2003 年放弃 Windows,只用了5天就把所有电脑跑成 Linux,包括所有的外围设备(LCTT 译注:比如打印机?)。我不玩 Windows 里的游戏,只玩 Linux 里的。
+>
+> **Highclass**:我28岁,不知道还是不是你要找的年轻人类型。
+>
+> 老实说我对电脑挺感兴趣的,当我还没接触'自由软件哲学'的时候,我认为 free 是免费的意思。我也不认为命令行界面很让人难以接受,因为我小时候就接触过 DOS 系统。
+>
+> 我第一个发行版是 Mandrake,在我11岁还是12岁那年我把家里的电脑弄得乱七八糟,然后我一直折腾那台电脑,试着让我技的技能提升一个台阶。现在我在一家公司全职使用 Linux。(请允许我耸个肩)。
+>
+> **Matto**:我的电脑是旧货市场淘回来的,装 XP,跑得慢,于是我想换个系统。Google 了一下,发现 Ubuntu。当年我15、6岁,现在23了,就职的公司内部使用 Linux。
+>
+> [更多评论移步 Reddit][2]
+
+### IBM 的 Linux 大型机 ###
+
+IBM 很久前就用 Linux 了。现在这家公司退推出一款机器专门使用 Ubuntu,机器名叫 LinuxOne。
+
+Ron Miller 在 TecchCrunch 博客上说:
+
+> 新的大型机包括两款机型,都是以企鹅名称命名的(Linux 的吉祥物就是一只企鹅,懂18摸的命名用意了没?)第一款叫帝企鹅,使用 IBM z13 机型,我们早在1月份就介绍过了。另一款稍微小一点,名叫跳岩企鹅,供入门级买家使用。
+>
+> 也许你会以为大型机就像恐龙一样早就灭绝了,但世界上许多大型机构中都还在使用它们,它们还健在。作为发展云技术战略的一部分,数据分析与安全有望于提升 Ubuntu 大型机的市场,这种大型机能提供一系列开源的企业级软件,比如 Apache Spark,Node.js,MongoDB,MariaDB,PostgreSQL 和 Chef。
+>
+> 大型机还会存在于客户预置的数据中心中,但是市场的大小取决于会有多少客户使用这种类似于云服务的系统。Mauri 解释道,IBM 正在寻求增加大型机销量的途径,与 Canonical 公司合作,鼓励使用开源工具,都能为大型机打开一个小的,却能赚钱的市场。
+>
+>
+> [详情移步 TechCrunch][3]
+
+### 你为什么要放弃 Windows10 而选择 Linux ###
+
+自从 Windows10 出来以后,各种媒体都报道过它的隐藏间谍功能。ZDNet 列出了一些放弃 Windows10 的理由。
+
+SJVN 在 ZDNet 的报告:
+
+> 你试试关掉 Windows10 的数据分享功能,坏消息来了:window10 会继续把你的数据分享给微软公司。请选择 Linux 吧。
+>
+> 你可以有很多方法不让 Windows10 泄露你的秘密,但你不能阻止它交谈。Cortana,win10 小娜,语音助手,就算你把她关了,她也会把数据发给微软公司。这些数据包括你的电脑 ID,微软用它来识别你的 PC 机。
+>
+> 所以如果这些泄密给你带来了烦恼,你可以使用老版本 Windows7,或者换到 Linux。然而,当 Windows7 不再提供技术支持的那天到来,如果你还想保留隐私,最终你还是只能选择 Linux。
+>
+> 这里还有些小众的桌面系统能保护你的隐私,比如 BSD 家族的 FreeBSD,PCBSD,NetBSD,eComStation,OS/2。但是,最好的选择还是 Linux,它提供最低的学习曲线。
+>
+> [详情移步 ZDNet][4]
+
+--------------------------------------------------------------------------------
+
+via: http://www.itworld.com/article/2972587/linux/why-did-you-start-using-linux.html
+
+作者:[Jim Lynch][a]
+译者:[bazz2](https://github.com/bazz2)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.itworld.com/author/Jim-Lynch/
+[1]:https://www.reddit.com/r/linux/comments/3hb2sr/question_for_younger_users_why_did_you_start/
+[2]:https://www.reddit.com/r/linux/comments/3hb2sr/question_for_younger_users_why_did_you_start/
+[3]:http://techcrunch.com/2015/08/16/ibm-teams-with-canonical-on-linux-mainframe/
+[4]:http://www.zdnet.com/article/sick-of-windows-spying-on-you-go-linux/
diff --git a/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md b/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md
new file mode 100644
index 0000000000..b49ba9e40a
--- /dev/null
+++ b/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md
@@ -0,0 +1,299 @@
+点评:Linux编程中五款内存调试器
+================================================================================
+
+Credit: [Moini][1]
+
+作为一个程序员,我知道我总在犯错误——事实是,怎么可能会不犯错的!程序员也是人啊。有的错误能在编码过程中及时发现,而有些却得等到软件测试才显露出来。然而,有一类错误并不能在这两个时期被排除,从而导致软件不能正常运行,甚至是提前中止。
+
+想到了吗?我说的就是内存相关的错误。手动调试这些错误不仅耗时,而且很难发现并纠正。值得一提的是,这种错误非常地常见,特别是在一些软件里,这些软件是用C/C++这类允许[手动管理内存][2]的语言编写的。
+
+幸运的是,现行有一些编程工具能够帮你找到软件程序中这些内存相关的错误。在这些工具集中,我评定了五款Linux可用的,流行、免费并且开源的内存调试器:Dmalloc、Electric Fence、 Memcheck、 Memwatch以及Mtrace。日常编码过程中我已经把这五个调试器用了个遍,所以这些点评是建立在我的实际体验之上的。
+
+### [Dmalloc][3] ###
+
+**开发者**:Gray Watson
+
+**点评版本**:5.5.2
+
+**Linux支持**:所有种类
+
+**许可**:知识共享署名-相同方式共享许可证3.0
+
+Dmalloc是Gray Watson开发的一款内存调试工具。它实现成库,封装了标准内存管理函数如**malloc(), calloc(), free()**等,使得程序员得以检测出有问题的代码。
+
+
+Dmalloc
+
+如同工具的网页所列,这个调试器提供的特性包括内存泄漏跟踪、[重复释放(double free)][4]错误跟踪、以及[越界写入(fence-post write)][5]检测。其它特性包括文件/行号报告、普通统计记录。
+
+#### 更新内容 ####
+
+5.5.2版本是一个[bug修复发行版][6],同时修复了构建和安装的问题。
+
+#### 有何优点 ####
+
+Dmalloc最大的优点是可以进行任意配置。比如说,你可以配置以支持C++程序和多线程应用。Dmalloc还提供一个有用的功能:运行时可配置,这表示在Dmalloc执行时,可以轻易地使能或者禁能它提供的特性。
+
+你还可以配合[GNU Project Debugger (GDB)][7]来使用Dmalloc,只需要将dmalloc.gdb文件(位于Dmalloc源码包中的contrib子目录里)的内容添加到你的主目录中的.gdbinit文件里即可。
+
+另外一个优点让我对Dmalloc爱不释手的是它有大量的资料文献。前往官网的[Documentation标签][8],可以获取任何内容,有关于如何下载、安装、运行,怎样使用库,和Dmalloc所提供特性的细节描述,及其输入文件的解释。里面还有一个章节介绍了一般问题的解决方法。
+
+#### 注意事项 ####
+
+跟Mtrace一样,Dmalloc需要程序员改动他们的源代码。比如说你可以(必须的)添加头文件**dmalloc.h**,工具就能汇报产生问题的调用的文件或行号。这个功能非常有用,因为它节省了调试的时间。
+
+除此之外,还需要在编译你的程序时,把Dmalloc库(编译源码包时产生的)链接进去。
+
+然而,还有点更麻烦的事,需要设置一个环境变量,命名为**DMALLOC_OPTION**,以供工具在运行时配置内存调试特性,以及输出文件的路径。可以手动为该环境变量分配一个值,不过初学者可能会觉得这个过程有点困难,因为你想使能的Dmalloc特性是存在于这个值之中的——表示为各自的十六进制值的累加。[这里][9]有详细介绍。
+
+一个比较简单方法设置这个环境变量是使用[Dmalloc实用指令][10],这是专为这个目的设计的方法。
+
+#### 总结 ####
+
+Dmalloc真正的优势在于它的可配置选项。而且高度可移植,曾经成功移植到多种操作系统如AIX、BSD/OS、DG/UX、Free/Net/OpenBSD、GNU/Hurd、HPUX、Irix、Linux、MS-DOG、NeXT、OSF、SCO、Solaris、SunOS、Ultrix、Unixware甚至Unicos(运行在Cray T3E主机上)。虽然Dmalloc有很多东西需要学习,但是它所提供的特性值得为之付出。
+
+### [Electric Fence][15] ###
+
+**开发者**:Bruce Perens
+
+**点评版本**:2.2.3
+
+**Linux支持**:所有种类
+
+**许可**:GNU 通用公共许可证 (第二版)
+
+Electric Fence是Bruce Perens开发的一款内存调试工具,它以库的形式实现,你的程序需要链接它。Electric Fence能检测出[栈][11]内存溢出和访问已经释放的内存。
+
+
+Electric Fence
+
+顾名思义,Electric Fence在每个申请的缓存边界建立了fence(防护),任何非法内存访问都会导致[段错误][12]。这个调试工具同时支持C和C++编程。
+
+
+#### 更新内容 ####
+
+2.2.3版本修复了工具的构建系统,使得-fno-builtin-malloc选项能真正传给[GNU Compiler Collection (GCC)][13]。
+
+#### 有何优点 ####
+
+我喜欢Electric Fence首要的一点是(Memwatch、Dmalloc和Mtrace所不具有的),这个调试工具不需要你的源码做任何的改动,你只需要在编译的时候把它的库链接进你的程序即可。
+
+其次,Electric Fence实现一个方法,确认导致越界访问(a bounds violation)的第一个指令就是引起段错误的原因。这比在后面再发现问题要好多了。
+
+不管是否有检测出错误,Electric Fence经常会在输出产生版权信息。这一点非常有用,由此可以确定你所运行的程序已经启用了Electric Fence。
+
+#### 注意事项 ####
+
+另一方面,我对Electric Fence真正念念不忘的是它检测内存泄漏的能力。内存泄漏是C/C++软件最常见也是最难隐秘的问题之一。不过,Electric Fence不能检测出堆内存溢出,而且也不是线程安全的。
+
+基于Electric Fence会在用户分配内存区的前后分配禁止访问的虚拟内存页,如果你过多的进行动态内存分配,将会导致你的程序消耗大量的额外内存。
+
+Electric Fence还有一个局限是不能明确指出错误代码所在的行号。它所能做只是在监测到内存相关错误时产生段错误。想要定位行号,需要借助[The Gnu Project Debugger (GDB)][14]这样的调试工具来调试你启用了Electric Fence的程序。
+
+最后一点,Electric Fence虽然能检测出大部分的缓冲区溢出,有一个例外是,如果所申请的缓冲区大小不是系统字长的倍数,这时候溢出(即使只有几个字节)就不能被检测出来。
+
+#### 总结 ####
+
+尽管有那么多的局限,但是Electric Fence的优点却在于它的易用性。程序只要链接工具一次,Electric Fence就可以在监测出内存相关问题的时候报警。不过,如同前面所说,Electric Fence需要配合像GDB这样的源码调试器使用。
+
+
+### [Memcheck][16] ###
+
+**开发者**:[Valgrind开发团队][17]
+
+**点评版本**:3.10.1
+
+**Linux支持**:所有种类
+
+**许可**:通用公共许可证
+
+[Valgrind][18]是一个提供好几款调试和Linux程序性能分析工具的套件。虽然Valgrind和编写语言各不相同(有Java、Perl、Python、Assembly code、ortran、Ada等等)的程序配合工作,但是它所提供的工具大部分都意在支持C/C++所编写的程序。
+
+Memcheck作为内存错误检测器,是一款最受欢迎的Memcheck工具。它能够检测出诸多问题诸如内存泄漏、无效的内存访问、未定义变量的使用以及栈内存分配和释放相关的问题等。
+
+#### 更新内容 ####
+
+工具套件(3.10.1)的[发行版][19]是一个副版本,主要修复了3.10.0版本发现的bug。除此之外,从主版本backport一些包,修复了缺失的AArch64 ARMv8指令和系统调用。
+
+#### 有何优点 ####
+
+同其它所有Valgrind工具一样,Memcheck也是基本的命令行实用程序。它的操作非常简单:通常我们会使用诸如prog arg1 arg2格式的命令来运行程序,而Memcheck只要求你多加几个值即可,就像valgrind --leak-check=full prog arg1 arg2。
+
+
+Memcheck
+
+(注意:因为Memcheck是Valgrind的默认工具所以无需提及Memcheck。但是,需要在编译程序之初带上-g参数选项,这一步会添加调试信息,使得Memcheck的错误信息会包含正确的行号。)
+
+我真正倾心于Memcheck的是它提供了很多命令行选项(如上所述的--leak-check选项),如此不仅能控制工具运转还可以控制它的输出。
+
+举个例子,可以开启--track-origins选项,以查看程序源码中未初始化的数据。可以开启--show-mismatched-frees选项让Memcheck匹配内存的分配和释放技术。对于C语言所写的代码,Memcheck会确保只能使用free()函数来释放内存,malloc()函数来申请内存。而对C++所写的源码,Memcheck会检查是否使用了delete或delete[]操作符来释放内存,以及new或者new[]来申请内存。
+
+Memcheck最好的特点,尤其是对于初学者来说的,是它会给用户建议使用那个命令行选项能让输出更加有意义。比如说,如果你不使用基本的--leak-check选项,Memcheck会在输出时建议“使用--leak-check=full重新运行,查看更多泄漏内存细节”。如果程序有未初始化的变量,Memcheck会产生信息“使用--track-origins=yes,查看未初始化变量的定位”。
+
+Memcheck另外一个有用的特性是它可以[创建抑制文件(suppression files)][20],由此可以忽略特定不能修正的错误,这样Memcheck运行时就不会每次都报警了。值得一提的是,Memcheck会去读取默认抑制文件来忽略系统库(比如C库)中的报错,这些错误在系统创建之前就已经存在了。可以选择创建一个新的抑制文件,或是编辑现有的(通常是/usr/lib/valgrind/default.supp)。
+
+Memcheck还有高级功能,比如可以使用[定制内存分配器][22]来[检测内存错误][21]。除此之外,Memcheck提供[监控命令][23],当用到Valgrind的内置gdbserver,以及[客户端请求][24]机制(不仅能把程序的行为告知Memcheck,还可以进行查询)时可以使用。
+
+#### 注意事项 ####
+
+毫无疑问,Memcheck可以节省很多调试时间以及省去很多麻烦。但是它使用了很多内存,导致程序执行变慢([由资料可知][25],大概花上20至30倍时间)。
+
+除此之外,Memcheck还有其它局限。根据用户评论,Memcheck明显不是[线程安全][26]的;它不能检测出 [静态缓冲区溢出][27];还有就是,一些Linux程序如[GNU Emacs][28],目前还不能使用Memcheck。
+
+如果有兴趣,可以在[这里][29]查看Valgrind详尽的局限性说明。
+
+#### 总结 ####
+
+无论是对于初学者还是那些需要高级特性的人来说,Memcheck都是一款便捷的内存调试工具。如果你仅需要基本调试和错误核查,Memcheck会非常容易上手。而当你想要使用像抑制文件或者监控指令这样的特性,就需要花一些功夫学习了。
+
+虽然罗列了大量的局限性,但是Valgrind(包括Memcheck)在它的网站上声称全球有[成千上万程序员][30]使用了此工具。开发团队称收到来自超过30个国家的用户反馈,而这些用户的工程代码有的高达2.5千万行。
+
+### [Memwatch][31] ###
+
+**开发者**:Johan Lindh
+
+**点评版本**:2.71
+
+**Linux支持**:所有种类
+
+**许可**:GNU通用公共许可证
+
+Memwatch是由Johan Lindh开发的内存调试工具,虽然它主要扮演内存泄漏检测器的角色,但是它也具有检测其它如[重复释放跟踪和内存错误释放][32]、缓冲区溢出和下溢、[野指针][33]写入等等内存相关问题的能力(根据网页介绍所知)。
+
+Memwatch支持用C语言所编写的程序。可以在C++程序中使用它,但是这种做法并不提倡(由Memwatch源码包随附的Q&A文件中可知)。
+
+#### 更新内容 ####
+
+这个版本添加了ULONG_LONG_MAX以区分32位和64位程序。
+
+#### 有何优点 ####
+
+跟Dmalloc一样,Memwatch也有优秀的文献资料。参考USING文件,可以学习如何使用Memwatch,可以了解Memwatch是如何初始化、如何清理以及如何进行I/O操作的,等等不一而足。还有一个FAQ文件,旨在帮助用户解决使用过程遇到的一般问题。最后还有一个test.c文件提供工作案例参考。
+
+
+Memwatch
+
+不同于Mtrace,Memwatch的输出产生的日志文件(通常是memwatch.log)是人类可阅读格式。而且,Memwatch每次运行时总会拼接内存调试输出到此文件末尾,而不是进行覆盖(译改)。如此便可在需要之时,轻松查看之前的输出信息。
+
+同样值得一提的是当你执行了启用Memwatch的程序,Memwatch会在[标准输出][34]中产生一个单行输出,告知发现了错误,然后你可以在日志文件中查看输出细节。如果没有产生错误信息,就可以确保日志文件不会写入任何错误,多次运行的话能实际节省时间。
+
+另一个我喜欢的优点是Memwatch同样在源码中提供一个方法,你可以据此获取Memwatch的输出信息,然后任由你进行处理(参考Memwatch源码中的mwSetOutFunc()函数获取更多有关的信息)。
+
+#### 注意事项 ####
+
+跟Mtrace和Dmalloc一样,Memwatch也需要你往你的源文件里增加代码:你需要把memwatch.h这个头文件包含进你的代码。而且,编译程序的时候,你需要连同memwatch.c一块编译;或者你可以把已经编译好的目标模块包含起来,然后在命令行定义MEMWATCH和MW_STDIO变量。不用说,想要在输出中定位行号,-g编译器选项也少不了。
+
+还有一些没有具备的特性。比如Memwatch不能检测出往一块已经被释放的内存写入操作,或是在分配的内存块之外的读取操作。而且,Memwatch也不是线程安全的。还有一点,正如我在开始时指出,在C++程序上运行Memwatch的结果是不能预料的。
+
+#### 总结 ####
+
+Memcheck可以检测很多内存相关的问题,在处理C程序时是非常便捷的调试工具。因为源码小巧,所以可以从中了解Memcheck如何运转,有需要的话可以调试它,甚至可以根据自身需求扩展升级它的功能。
+
+### [Mtrace][35] ###
+
+**开发者**: Roland McGrath and Ulrich Drepper
+
+**点评版本**: 2.21
+
+**Linux支持**:所有种类
+
+**许可**:GNU通用公共许可证
+
+Mtrace是[GNU C库][36]中的一款内存调试工具,同时支持Linux C和C++程序,检测由malloc()和free()函数的不对等调用所引起的内存泄漏问题。
+
+
+Mtrace
+
+Mtrace实现为对mtrace()函数的调用,跟踪程序中所有malloc/free调用,在用户指定的文件中记录相关信息。文件以一种机器可读的格式记录数据,所以有一个Perl脚本(同样命名为mtrace)用来把文件转换并展示为人类可读格式。
+
+#### 更新内容 ####
+
+[Mtrace源码][37]和[Perl文件][38]同GNU C库(2.21版本)一起释出,除了更新版权日期,其它别无改动。
+
+#### 有何优点 ####
+
+Mtrace最优秀的特点是非常简单易学。你只需要了解在你的源码中如何以及何处添加mtrace()及其对立的muntrace()函数,还有如何使用Mtrace的Perl脚本。后者非常简单,只需要运行指令mtrace (例子见开头截图最后一条指令)。
+
+Mtrace另外一个优点是它的可收缩性,体现在,不仅可以使用它来调试完整的程序,还可以使用它来检测程序中独立模块的内存泄漏。只需在每个模块里调用mtrace()和muntrace()即可。
+
+最后一点,因为Mtrace会在mtace()(在源码中添加的函数)执行时被触发,因此可以很灵活地[使用信号][39]动态地(在程序执行周期内)使能Mtrace。
+
+#### 注意事项 ####
+
+因为mtrace()和mauntrace()函数(在mcheck.h文件中声明,所以必须在源码中包含此头文件)的调用是Mtrace运行(mauntrace()函数并非[总是必要][40])的根本,因此Mtrace要求程序员至少改动源码一次。
+
+了解需要在编译程序的时候带上-g选项([GCC][41]和[G++][42]编译器均由提供),才能使调试工具在输出展示正确的行号。除此之外,有些程序(取决于源码体积有多大)可能会花很长时间进行编译。最后,带-g选项编译会增加了可执行文件的内存(因为提供了额外的调试信息),因此记得程序需要在测试结束,不带-g选项重新进行编译。
+
+使用Mtrace,你需要掌握Linux环境变量的基本知识,因为在程序执行之前,需要把用户指定文件(mtrace()函数用以记载全部信息)的路径设置为环境变量MALLOC_TRACE的值。
+
+Mtrace在检测内存泄漏和尝试释放未经过分配的内存方面存在局限。它不能检测其它内存相关问题如非法内存访问、使用未初始化内存。而且,[有人抱怨][43]Mtrace不是[线程安全][44]的。
+
+### 总结 ###
+
+不言自明,我在此讨论的每款内存调试器都有其优点和局限。所以,哪一款适合你取决于你所需要的特性,虽然有时候容易安装和使用也是一个决定因素。
+
+要想捕获软件程序中的内存泄漏,Mtrace最适合不过了。它还可以节省时间。由于Linux系统已经预装了此工具,对于不能联网或者不可以下载第三方调试调试工具的情况,Mtrace也是极有助益的。
+
+另一方面,相比Mtrace,,Dmalloc不仅能检测更多错误类型,还你呢个提供更多特性,比如运行时可配置、GDB集成。而且,Dmalloc不像这里所说的其它工具,它是线程安全的。更不用说它的详细资料了,这让Dmalloc成为初学者的理想选择。
+
+虽然Memwatch的资料比Dmalloc的更加丰富,而且还能检测更多的错误种类,但是你只能在C语言写就的软件程序上使用它。一个让Memwatch脱颖而出的特性是它允许在你的程序源码中处理它的输出,这对于想要定制输出格式来说是非常有用的。
+
+如果改动程序源码非你所愿,那么使用Electric Fence吧。不过,请记住,Electric Fence只能检测两种错误类型,而此二者均非内存泄漏。还有就是,需要了解GDB基础以最大程序发挥这款内存调试工具的作用。
+
+Memcheck可能是这当中综合性最好的了。相比这里所说其它工具,它检测更多的错误类型,提供更多的特性,而且不需要你的源码做任何改动。但请注意,基本功能并不难上手,但是想要使用它的高级特性,就必须学习相关的专业知识了。
+
+--------------------------------------------------------------------------------
+
+via: http://www.computerworld.com/article/3003957/linux/review-5-memory-debuggers-for-linux-coding.html
+
+作者:[Himanshu Arora][a]
+译者:[译者ID](https://github.com/soooogreen)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.computerworld.com/author/Himanshu-Arora/
+[1]:https://openclipart.org/detail/132427/penguin-admin
+[2]:https://en.wikipedia.org/wiki/Manual_memory_management
+[3]:http://dmalloc.com/
+[4]:https://www.owasp.org/index.php/Double_Free
+[5]:https://stuff.mit.edu/afs/sipb/project/gnucash-test/src/dmalloc-4.8.2/dmalloc.html#Fence-Post%20Overruns
+[6]:http://dmalloc.com/releases/notes/dmalloc-5.5.2.html
+[7]:http://www.gnu.org/software/gdb/
+[8]:http://dmalloc.com/docs/
+[9]:http://dmalloc.com/docs/latest/online/dmalloc_26.html#SEC32
+[10]:http://dmalloc.com/docs/latest/online/dmalloc_23.html#SEC29
+[11]:https://en.wikipedia.org/wiki/Memory_management#Dynamic_memory_allocation
+[12]:https://en.wikipedia.org/wiki/Segmentation_fault
+[13]:https://en.wikipedia.org/wiki/GNU_Compiler_Collection
+[14]:http://www.gnu.org/software/gdb/
+[15]:https://launchpad.net/ubuntu/+source/electric-fence/2.2.3
+[16]:http://valgrind.org/docs/manual/mc-manual.html
+[17]:http://valgrind.org/info/developers.html
+[18]:http://valgrind.org/
+[19]:http://valgrind.org/docs/manual/dist.news.html
+[20]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.suppfiles
+[21]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.mempools
+[22]:http://stackoverflow.com/questions/4642671/c-memory-allocators
+[23]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.monitor-commands
+[24]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.clientreqs
+[25]:http://valgrind.org/docs/manual/valgrind_manual.pdf
+[26]:http://sourceforge.net/p/valgrind/mailman/message/30292453/
+[27]:https://msdn.microsoft.com/en-us/library/ee798431%28v=cs.20%29.aspx
+[28]:http://www.computerworld.com/article/2484425/linux/5-free-linux-text-editors-for-programming-and-word-processing.html?nsdr=true&page=2
+[29]:http://valgrind.org/docs/manual/manual-core.html#manual-core.limits
+[30]:http://valgrind.org/info/
+[31]:http://www.linkdata.se/sourcecode/memwatch/
+[32]:http://www.cecalc.ula.ve/documentacion/tutoriales/WorkshopDebugger/007-2579-007/sgi_html/ch09.html
+[33]:http://c2.com/cgi/wiki?WildPointer
+[34]:https://en.wikipedia.org/wiki/Standard_streams#Standard_output_.28stdout.29
+[35]:http://www.gnu.org/software/libc/manual/html_node/Tracing-malloc.html
+[36]:https://www.gnu.org/software/libc/
+[37]:https://sourceware.org/git/?p=glibc.git;a=history;f=malloc/mtrace.c;h=df10128b872b4adc4086cf74e5d965c1c11d35d2;hb=HEAD
+[38]:https://sourceware.org/git/?p=glibc.git;a=history;f=malloc/mtrace.pl;h=0737890510e9837f26ebee2ba36c9058affb0bf1;hb=HEAD
+[39]:http://webcache.googleusercontent.com/search?q=cache:s6ywlLtkSqQJ:www.gnu.org/s/libc/manual/html_node/Tips-for-the-Memory-Debugger.html+&cd=1&hl=en&ct=clnk&gl=in&client=Ubuntu
+[40]:http://www.gnu.org/software/libc/manual/html_node/Using-the-Memory-Debugger.html#Using-the-Memory-Debugger
+[41]:http://linux.die.net/man/1/gcc
+[42]:http://linux.die.net/man/1/g++
+[43]:https://sourceware.org/ml/libc-help/2014-05/msg00008.html
+[44]:https://en.wikipedia.org/wiki/Thread_safety
diff --git a/translated/talk/The history of Android/15 - The history of Android.md b/translated/talk/The history of Android/15 - The history of Android.md
new file mode 100644
index 0000000000..2bde6052a6
--- /dev/null
+++ b/translated/talk/The history of Android/15 - The history of Android.md
@@ -0,0 +1,86 @@
+安卓编年史
+================================================================================
+
+姜饼的新键盘,文本选择,边界回弹效果以及新复选框。
+Ron Amadeo 供图
+
+安卓2.3最重要的新增功能就是系统全局文本选择界面,你可以在左侧截图的谷歌搜索栏看到它。长按一个词能使其变为橙色高亮,并且出现可拖拽的小标签,长按高亮部分会弹出剪切,复制和粘贴选项。之前的方法使用的是依赖于十字方向键的控制,但现在有了触摸文本选择,Nexus S 不再需要额外的硬件控件。
+
+左侧截图右半边展示的是新的复选框设计和边界回弹效果。冻酸奶(2.2)的复选框像个灯泡——选中时显示一个绿色的勾,未选中的时候显示灰色的勾。姜饼在选项关闭的时候显示一个空的选框——这显得更有意义。姜饼是第一个拥有滚动到底发光效果的版本。当到达列表底部的时候会有一道橙色的光晕,你越往上拉光晕越明显。列表上拉滚动反弹也许最直观,但那是苹果的专利。
+
+
+新拨号界面和对话框设计。
+Ron Amadeo 供图
+
+姜饼里的拨号受到了稍微多点的照顾。它变得更暗了,并且谷歌终于解决了原本的直角,圆角以及圆形的结合问题。现在所有的边角都是直角了。所有的拨号按键被替换成了带有奇怪下划线的样式,像是用边角料拼凑的。你永远无法确定是否看到了一个按钮——我们的大脑得想象出按钮形状的剩余部分。
+
+图中的无线网络对话框可以看作是剩下的系统全局改动的样本。所有的对话框标题从灰色变为黑色,对话框,下拉框以及按钮边缘都变成了直角,各部分色调都变暗了一点。所有的这些全局变化使得姜饼看起来不像原来那样活泼,而是更加地成熟。“到处都是黑色”的外观必然不是最受欢迎的,但它无疑看起来比安卓之前的灰色和米色的配色方案好多了。
+
+
+新市场,添加了大块的绿色页面顶栏。
+Ron Amadeo 供图
+
+新版系统带来了“安卓市场 2.0”,虽然它不是姜饼独占的。主要的列表设计和原来一致,但谷歌将屏幕上部三分之一覆盖上了大块的绿色横幅,用来展示热门应用以及导航。这里主要的设计灵感也许是绿色的安卓吉祥物——它们的颜色完美匹配。在系统设计偏向暗色系的时候,霓虹灯般的绿色横幅和白色列表让市场明快得多。
+
+但是,相同的绿色背景图片被用在了不同的手机上,这意味着在低分辨率设备上,绿色横幅看起来更加的大。不少用户抱怨这浪费了屏幕空间,于是随后的更新使得绿色横幅跟随内容向上滚动。在那时,横屏模式更加糟糕——绿色横幅会填满剩下的半个屏幕。
+
+
+市场的一个带有可折叠描述的应用详情页面,“我的应用”界面,以及 Google Books 界面截图。
+Ron Amadeo供图
+
+应用详情页面经过重新设计有了可折叠部分。文本描述只截取前几行展示,向下滑动页面不用再穿过数千行的描述。简短的描述后有一个“更多”按钮可供点击来显示完整的描述。这让用户可以轻松地滑动过列表找到像是截图和“联系开发者”部分,这些部分通常在页面偏下部分。
+
+安卓主屏的其它部分明智地淡化了绿色机器人元素。市场应用的剩余部分绝大多数仅仅只是旧版市场加上新的绿色导航元素。旧有的标签界面升级成了可滑动切换标签。在姜饼右侧截图中,从右向左滑动将会从“热门付费”切换至“热门免费”,这使得导航变得更加方便。
+
+姜饼带来了将会成为 Google Play 内容商店第一位成员的应用:Google Books。这个应用是个基础的电子书阅读器,会将书籍以简单的预览图平铺展示。屏幕顶部的“获取 eBooks”链接会打开浏览器,然后加载一个你可以在上面购买电子书的移动网站。
+
+Google Books 以及市场的“我的应用”页面都是 Action Bar 的原型。就像现在的指南中写的,页面有一个带应用图标的固定置顶栏,应用内页面的名称,以及一些控件。这两个应用的布局实际上看起来十分现代,和现在的界面相似。
+
+
+新版谷歌地图。
+Ron Amadeo供图
+
+谷歌地图(再重复一次,这时候的谷歌地图是在安卓市场中的,并且不是这个安卓版本独占的)拥有了另一个操作栏原型,是一个顶部对齐的控件栏。这个早期版本的操作栏拥有许多试验性功能。功能栏主要被一个搜索框所占据,但是你永远无法向其输入内容。点击搜索框会打开安卓 1.x 版本以来的旧搜索界面,它带有完全不同的操作栏设计和活泼的按钮。2.3 版本的顶栏仅仅只是个大号的搜索按钮而已。
+
+
+从黑变白的新 business 页面。
+Ron Amadeo 供图
+
+应用抽屉里和地点一起到来的热门商家重新设计了界面。不像姜饼的其它部分,它从黑色转换成了白色。谷歌还给它保留了圆角的旧按钮。这个新版本的地图能显示商家的营业时间,并且提供高级搜索选项,比如正在营业或是通过评分或价格限定搜索范围。点评被调整到了商家详情页面,用户可以更容易地对当前商家有个直观感受。而且现在还可以从搜索结果中给某个地点加星,保存起来以后使用。
+
+
+新 YouTube 设计,神奇的是有点像旧版地图的商家页面的设计。
+Ron Amadeo供图
+
+YouTube 应用似乎完全与安卓的其它部分分离开来,就像是设计它的人完全不知道姜饼最终会是什么样子一样。高亮是红色和灰色方案,而不是绿色和橙色,而且不像扁平黑色风格的姜饼,Youtube 有着气泡状的,带有圆角并且大幅使用渐变效果的按钮,标签以及操作栏。尽管如此,新应用还是有一些正确的地方。所有的标签可以水平滑动切换,而且应用终于提供了竖屏观看视频模式。安卓在那个阶段似乎工作不是很一致。就像是有人告诉 Youtube 团队“把它做成黑色的”,然后这就是全部的指导方向一样。唯一一个与其相似的安卓实体就是旧版谷歌地图的商家页面的设计。
+
+尽管有些奇怪的设计,Youtube 应用有着最接近操作栏的顶栏设计。除了顶部操作栏的应用图标和一些按钮,最右侧还有个标着“更多”字样的按钮,点击它可以打开因为过多而无法装进操作栏的选项。在今天,这被称作“更多操作”按钮,它是个标准界面控件。
+
+
+新 Google Talk,支持语音和视频通话,以及新语音命令界面。
+Ron Amadeo供图
+
+姜饼的最后一个更新是安卓 2.3.4,它带来了新版 Google Talk。不像 Nexus One,Nexus S 带有前置摄像头——重新设计的 Google Talk 拥有语音和视频通话功能。好友列表右侧的彩色指示不仅指明在线状态,还显示了语音和视频的可用性。一个点表示仅文本信息,一个麦克风表示文本信息或语音,一个摄像机表示支持文本信息,语音以及视频。如果可用的话,点击语音或视频图标会立即向好友发起通话。
+
+姜饼是谷歌仍然提供支持的最老的安卓版本。激活一部姜饼设备并放置一会儿会收到大量更新。姜饼会拉取 Google Play 服务,它会带来许多新的 API 支持,并且会升级到最新版本的 Play 商店。打开 Play 商店并点击更新按钮,几乎每个独立谷歌应用都会被替换为更加现代的版本。我们尝试着保持这篇文章讲述的是姜饼发布时的样子,但时至今日还停留在姜饼的用户会被认为有点跟不上时代了。
+
+姜饼如今仍然能够得到支持,因为有数量可观的用户仍然在使用这个有点过时的系统。姜饼仍然存在的能量来自于它极低的系统要求,使得它成为了低端廉价设备的最佳选择。下个版本的安卓对硬件的要求变得更高了。举个例子,安卓 3.0 蜂巢不是开源的,这意味着它只能在谷歌的协助之下移植到一个设备上。同时它还是只为平板设计的,这让姜饼作为最新的手机安卓版本存在了很长一段时间。4.0 冰淇淋三明治是下一个手机版本,但它显著地提高了安卓系统要求,抛弃了低端市场。谷歌现在希望借 4.4 KitKat(奇巧巧克力)重回廉价手机市场,它的系统要求降回了 512MB 内存。时间的推移同样有所帮助——如今,就算是廉价的系统级芯片都能满足安卓 4.0 时代的系统要求。
+
+----------
+
+
+
+[Ron Amadeo][a] / Ron是Ars Technica的评论编缉,专注于安卓系统和谷歌产品。他总是在追寻新鲜事物,还喜欢拆解事物看看它们到底是怎么运作的。
+
+[@RonAmadeo][t]
+
+--------------------------------------------------------------------------------
+
+via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/15/
+
+译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
+
+[a]:http://arstechnica.com/author/ronamadeo
+[t]:https://twitter.com/RonAmadeo
diff --git a/translated/talk/The history of Android/16 - The history of Android.md b/translated/talk/The history of Android/16 - The history of Android.md
new file mode 100644
index 0000000000..53c603c7bf
--- /dev/null
+++ b/translated/talk/The history of Android/16 - The history of Android.md
@@ -0,0 +1,66 @@
+安卓编年史
+================================================================================
+### 安卓 3.0 蜂巢—平板和设计复兴 ###
+
+尽管姜饼中做了许多改变,安卓仍然是移动世界里的丑小鸭。相比于 iPhone,它的优雅程度和设计完全抬不起头。另一方面来说,为数不多的能与 iOS 的美学智慧相当的操作系统之一是 Palm 的 WebOS。WebOS 有着优秀的整体设计,创新的功能,而且被寄予期望能够从和 iPhone 的长期竞争中拯救公司。
+
+尽管如此,一年之后,Palm 资金链断裂。Palm 公司从未看到 iPhone 的到来,到 WebOS 就绪的时候已经太晚了。2010年4月,惠普花费10亿美元收购了 Palm。尽管惠普收购了一个拥有优秀用户界面的产品,界面的首席设计师,Matias Duarte,并没有加入惠普公司。2010年5月,就在惠普接手 Palm 之前,Duarte 加入了谷歌。惠普买下了面包,但谷歌雇佣了它的烘培师。
+
+
+第一部蜂巢设备,摩托罗拉 Xoom 10英寸平板。
+
+在谷歌,Duarte 被任命为安卓用户体验主管。这是第一次有人公开掌管安卓的外观。尽管 Matias 在安卓 2.2 发布时就来到了谷歌,第一个真正受他影响的安卓版本是 3.0 蜂巢,它在2011年2月发布。
+
+按谷歌自己的说法,蜂巢是匆忙问世的。10个月前,苹果发布了 iPad,让平板变得更加现代,谷歌希望能够尽快做出回应。蜂巢就是那个回应,一个运行在10英寸触摸屏上的安卓版本。悲伤的是,将这个系统推向市场是如此优先的事项,以至于边边角角都被砍去了以节省时间。
+
+新系统只用于平板——手机不能升级到蜂巢,这加大了谷歌让系统运行在差异巨大的不同尺寸屏幕上的难度。但是,仅支持平板而不支持手机使得蜂巢源码没有泄露。之前的安卓版本是开源的,这使得黑客社区能够将其最新版本移植到所有的不同设备之上。谷歌不希望应用开发者在支持不完美的蜂巢手机移植版本时感到压力,所以谷歌将源码留在自己手中,并且严格控制能够拥有蜂巢的设备。匆忙的开发还导致了软件问题。在发布时,蜂巢不是特别稳定,SD卡不能工作,Adobe Flash——安卓最大的特色之一——还不被支持。
+
+[摩托罗拉 Xoom][1]是为数不多的拥有蜂巢的设备之一,它是这个新系统的旗舰产品。Xoom 是一个10英寸,16:9 的平板,拥有 1GB 内存和 1GHz Tegra 2 双核处理器。尽管是由谷歌直接控制更新的新版安卓发布设备,它并没有被叫做“Nexus”。对此最可能的原因是谷歌对它没有足够的信心称其为旗舰。
+
+尽管如此,蜂巢是安卓的一个里程碑。在一个体验设计师的主管之下,整个安卓用户界面被重构,绝大多数奇怪的应用设计都得到改进。安卓的默认应用终于看起来像整体的一部分,不同的界面有着相似的布局和主题。然而重新设计安卓会是一个跨版本的项目——蜂巢只是将安卓塑造成型的开始。这第一份草稿为安卓未来版本的样子做了基础设计,但它也用了过多的科幻主题,谷歌将花费接下来的数个版本来淡化它。
+
+
+蜂巢和姜饼的主屏幕。
+Ron Amadeo供图
+
+姜饼只是在它的量子壁纸上试验了科幻外观,蜂巢整个系统的以电子为灵感的主题让它充满科幻意味。所有东西都是黑色的,如果你需要对比色,你可以从一些不同色调的蓝色中挑选。所有蓝色的东西还有“光晕”效果,让整个系统看起来像是外星科技创造的。默认背景是个六边形的全息方阵(一个蜂巢!明白了吗?),看起来像是一艘飞船上的传送阵的地板。
+
+蜂巢最重要的变化是增加了系统栏。摩托罗拉 Xoom 除了电源和音量键之外没有配备实体按键,所以蜂巢添加了一个大黑色底栏到屏幕底部,用于放置导航按键。这意味着默认安卓界面不再需要特别的实体按键。在这之前,安卓没有实体的返回,菜单和 Home 键就不能正常工作。现在,软件提供了所有必需的按钮,任何带有触摸屏的设备都能够运行安卓。
+
+新软件按键带来的最大的好处是灵活性。新的应用指南表明应用应不再要求实体菜单按键,需要用到的时候,蜂巢会自动检测并添加四个按钮到系统栏让应用正常工作。另一个软件按键的灵活属性是它们可以改变设备的屏幕方向。除了电源和音量键之外,Xoom 的方向实际上不是那么重要。从用户的角度来看,系统栏始终处于设备的“底部”。代价是系统栏明显占据了一些屏幕空间。为了在10英寸平板上节省空间,状态栏被合并到了系统栏中。所有的常用状态指示放在了右侧——有电源,连接状态,时间还有通知图标。
+
+主屏幕的整个布局都改变了,用户界面部件放在了设备的四个角落。屏幕底部左侧放置着之前讨论过的导航按键,右侧用于状态指示和通知,顶部左侧显示的是文本搜索和语音搜索,右侧有应用抽屉和添加小部件的按钮。
+
+
+新锁屏界面和最近应用界面。
+Ron Amadeo供图
+
+(因为 Xoom 是一部 [较重] 的10英寸,16:9平板设备,这意味着它主要是横屏使用。虽然大部分应用还支持竖屏模式,但是到目前为止,由于我们的版式限制,我们大部分使用的是竖屏模式的截图。请记住蜂巢的截图来自于10英寸的平板,而姜饼的截图来自3.7英寸的手机。二者所展现的信息密度是不能直接比较的。)
+
+解锁界面——从菜单按钮到旋转式拨号盘再到滑动解锁——移除了解锁步骤的任何精度要求,它采用了一个环状解锁盘。从中间向任意方向向外滑动就能解锁设备。就像旋转式解锁,这种解锁方式更加符合人体工程学,而不用强迫你的手指完美地遵循一条笔直的解锁路径。
+
+第二张图中略缩图条带是由新增的“最近应用”按钮打开的界面,现在处在返回和 Home 键旁边。不像姜饼中长按 Home 键显示一组最近应用的图标,蜂巢在屏幕上显示应用图标和略缩图,使得在任务间切换变得更加方便。最近应用的灵感明显来自于 Duarte 在 WebOS 中的“卡片式”多任务管理,其使用全屏略缩图来切换任务。这个设计提供和 WebOS 的任务切换一样的易识别体验,但更小的略缩图允许更多的应用一次性显示在屏幕上。
+
+尽管最近应用的实现看起来和你现在的设备很像,这个版本实际上是非常早期的。这个列表不能滚动,这意味着竖屏下只能显示七个应用,横屏下只能显示五个。任何超出范围的应用会从列表中去除。而且你也不能通过滑动略缩图来关闭应用——这只是个静态的列表。
+
+这里我们看到电子灵感影响的完整主题效果:略缩图的周围有蓝色的轮廓以及神秘的光晕。这张截图还展示软件按键的好处——上下文。返回按钮可以关闭略缩图列表,所以这里的箭头指向下方,而不是通常的样子。
+
+----------
+
+
+
+[Ron Amadeo][a] / Ron是Ars Technica的评论编缉,专注于安卓系统和谷歌产品。他总是在追寻新鲜事物,还喜欢拆解事物看看它们到底是怎么运作的。
+
+[@RonAmadeo][t]
+
+--------------------------------------------------------------------------------
+
+via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/16/
+
+译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
+
+[1]:http://arstechnica.com/gadgets/2011/03/ars-reviews-the-motorola-xoom/
+[a]:http://arstechnica.com/author/ronamadeo
+[t]:https://twitter.com/RonAmadeo
diff --git a/translated/talk/The history of Android/17 - The history of Android.md b/translated/talk/The history of Android/17 - The history of Android.md
new file mode 100644
index 0000000000..bf86735b7c
--- /dev/null
+++ b/translated/talk/The history of Android/17 - The history of Android.md
@@ -0,0 +1,86 @@
+安卓编年史
+================================================================================
+
+蜂巢的应用列表少了很多应用。上图还展示了通知中心和新的快速设置。
+Ron Amadeo 供图
+
+默认的应用图标从32个减少到了25个,其中还有两个是第三方的游戏。因为蜂巢不是为手机设计的,而且谷歌希望默认应用都是为平板优化的,很多应用因此没有成为默认应用。被去掉的应用有亚马逊 MP3 商店,Car Home,Facebook,Google Goggles,信息,新闻与天气,电话,Twitter,谷歌语音,以及语音拨号。谷歌正在悄悄打造的音乐服务将于不久后面世,所以亚马逊 MP3 商店需要为它让路。Car Home,信息以及电话对一部不是手机的设备来说没有多大意义,Facebook 和 Twitter还没有平板版应用,Goggles,新闻与天气以及语音拨号几乎没什么人注意,就算移除了大多数人也不会想念它们的。
+
+几乎每个应用图标都是全新设计的。就像是从 G1 切换到摩托罗拉 Droid,变化的最大动力是分辨率的提高。Nexus S 有一块800×480分辨率的显示屏,姜饼重新设计了图标等资源来适应它。Xoom 巨大的1280×800 10英寸显示屏意味着几乎所有设计都要重做。但是再说一次,这次是有真正的设计师在负责,所有东西看起来更有整体性了。蜂巢的应用列表从纵向滚动变为了横向分页式。这个变化对横屏设备有意义,而对手机来说,查找一个应用还是纵向滚动列表比较快。
+
+第二张蜂巢截图展示的是新通知中心。姜饼中的灰色和黑色设计已经被抛弃了,现在是黑色面板带蓝色光晕。上面一块显示着日期时间,连接状态,电量和打开快速设置的按钮,下面是实际的通知。非持续性通知现在可以通过通知右侧的“X”来关闭。蜂巢是第一个支持通知内控制的版本。第一个(也是蜂巢发布时唯一一个)利用了此特性的应用是新的谷歌音乐,在它的通知上有上一曲,播放/暂停,下一曲按钮。这些控制可以在任何应用中访问到,这让控制音乐播放变成了一件轻而易举的事情。
+
+
+“添加到主屏幕”的缩小视图更易于组织布局。搜索界面将自动搜索建议和通用搜索分为两个面板显示。
+Ron Amadeo 供图
+
+点击主屏幕右上角的加号或长按背景空白处就会打开新的主屏幕设置界面。蜂巢会在屏幕上半部分显示所有主屏的缩小视图,下半部分分页显示的是小部件和快捷方式。小部件或快捷方式可以从下半部分的抽屉中拖动到五个主屏幕中的任意一个上。姜饼只会显示一个文本列表,而蜂巢会显示小部件完整的略缩图预览。这让你更清楚一个小部件是什么样子的,而不是像原来的“日历”一样只是一个只有应用名称的描述。
+
+摩托罗拉 Xoom 更大的屏幕让键盘的布局更加接近 PC 风格,退格,回车,shift 以及 tab 都在传统的位置上。键盘带有浅蓝色,并且键与键之间的空间更大了。谷歌还添加了一个专门的笑脸按钮。 :-)
+
+
+打开菜单的 Gmail 在蜂巢和姜饼上的效果。按钮布置在首屏更容易被发现。
+Ron Amadeo 供图
+
+Gmail 示范了蜂巢所有的用户界面概念。安卓 3.0不再把所有控制都隐藏在菜单按钮之后。屏幕的顶部现在有一条带有图标的条带,叫做 Action Bar(操作栏),它将许多常用的控制选项提升到了主屏幕上,用户直接就能看到它们。Gmail 的操作栏显示着搜索,新邮件,刷新按钮,不常用的选项比如设置,帮助,以及反馈放在了“更多”按钮中。点击复选框或选中文本的时候时整个操作栏的图标会变成和操作相关的——举个例子,选择文本会出现复制,粘贴和全选按钮。
+
+应用左上角显示的图标同时也作为称作“上一级”的导航按钮。“后退”的作用类似浏览器的后退按钮,导航到之前访问的页面,“上一级”则会导航至应用的上一层次。举例来说,如果你在安卓市场,点击“给开发者发邮件”,会打开 Gmail,“后退”会让你返回安卓市场,但是“上一级”会带你到 Gmail 的收件箱。“后退”可能会关闭当前应用,而“上一级”永远不会。应用可以控制“后退”按钮,它们往往重新定义它为“上一级”的功能。事实上,这两个按钮之间几乎没什么不同。
+
+蜂巢还引入了 “Fragments” API,允许开发者开发同时适用于平板和手机的应用。一个 “Fragments”(格子) 是一个用户界面的面板。在上图的 Gmail 中,左边的文件夹列表是一个格子,收件箱是另一个格子。手机每屏显示一个格子,而平板则可以并列显示两个。开发者可以自行定义单独每个格子的外观,安卓会根据当前的设备决定如何显示它们。
+
+
+计算器使用了常规的安卓按钮,但日历看起来像是被谁打翻了蓝墨水。
+Ron Amadeo 供图
+
+这是安卓历史上第一次计算器换上了没有特别定制的按钮,所以它看起来确实是系统的一部分。更大的屏幕有了更多空间容纳按钮,足够将计算器基本功能容纳在一个屏幕上。日历极大地受益于额外的显示空间,有了更多的空间显示事件文本和控制选项。顶部的操作栏有切换视图的按钮,显示当前时间跨度,以及常规按钮。事件块变成了白色背景,日历标识只在左上角显示。在底部(或横屏模式的侧边)显示的是月历和显示的日历列表。
+
+日历的比例同样可以调整。通过两指缩放手势,纵向的周和日视图能够在一屏内显示五到十九小时的事件。日历的背景由不均匀的蓝色斑点组成,看起来不是特别棒,在随后的版本里就被抛弃了。
+
+
+新相机界面,取景器显示的是“负片”效果。
+Ron Amadeo 供图
+
+巨大的10英寸 Xoom 平板有个摄像头,这意味着它同样有个相机应用。电子风格的重新设计终于甩掉了谷歌从安卓 1.6 以来使用的仿皮革外观。控制选项以环形排布在快门键周围,让人想起真正的相机上的圆形控制转盘。Cooliris 衍生的弹出对话气泡变成了带光晕的半透明黑色选框。蜂巢的截图显示的是新的“颜色效果”功能,它能给取景器实时加上滤镜效果。不像姜饼的相机应用,它不支持竖屏模式——它被限制在横屏状态。用10英寸的平板拍摄纵向照片没多大意义,但拍摄横向照片也没多大意义。
+
+
+时钟应用相比其它地方没受到多少关照。谷歌把它扔进一个小盒子里然后就收工了。
+Ron Amadeo 供图
+
+无数功能已经成形了,现在是时候来重制一下时钟了。整个“桌面时钟”概念被踢出门外,取而代之的是在纯黑背景上显示的简单又巨大的时间数字。打开其它应用查看天气的功能不见了,随之而去的还有显示你的壁纸的功能。当要设计平板尺寸的界面时,有时候谷歌就放弃了,就像这里,就只是把时钟界面扔到了一个小小的,居中的对话框里。
+
+
+音乐应用终于得到了一直以来都需要的完全重新设计。
+Ron Amadeo 供图
+
+尽管音乐应用之前有得到一些小的加强,但这是自安卓 0.9 以来它第一次受到正视。重新设计的亮点是一个“别叫它封面流滚动 3D 专辑封面视图”,称作“最新和最近”。导航由操作栏的下拉框解决,取代了安卓 2.1 引入的标签页导航。尽管“最新和最近”有个 3D 滚动专辑封面,“专辑”使用的是专辑略缩图的平面方阵。另一个部分也有个完全不同的设计。“歌曲”使用了垂直滚动的文本列表,“播放列表”,“年代”和“艺术家”用的是堆砌专辑显示。
+
+在几乎每个视图中,每个单独的项目有它自己单独的菜单,通常在每项的右下角有个小箭头。眼下这里只会显示“播放”和“添加到播放列表”,但这个版本的谷歌音乐是为未来搭建的。谷歌不久后就要发布音乐服务,这些独立菜单在像是在音乐商店里浏览该艺术家的其它内容,或是管理云存储和本地存储时将会是不可或缺的。
+
+正如安卓 2.1 中的 Cooliris 风格的相册,谷歌音乐会将略缩图放大作为背景图片。底部的“正在播放”栏现在显示着专辑封面,播放控制,以及播放进度条。
+
+
+新谷歌地图的一些地方真的很棒,一些却是从安卓 1.5 来的。
+Ron Amadeo 供图
+
+谷歌地图也为大屏幕进行了重新设计。这个设计将会持续一段时间,它对所有的控制选项用了一个半透明的黑色操作栏。搜索再次成为主要功能,占据了操作栏显要位置,但这回可是真的搜索栏,你可以在里面输入关键字,不像以前那个搜索栏形状的按钮会打开完全不同的界面。谷歌最终还是放弃了给缩放控件留屏幕空间,仅仅依靠手势来控制地图显示。尽管 3D 建筑轮廓这个特性已经被移植到了旧版本的地图中,蜂巢依然是拥有这个特性的第一个版本。双指在地图上向下拖放会“倾斜”地图的视角,展示建筑的侧面。你可以随意旋转,建筑同样会跟着进行调整。
+
+并不是所有部分都进行了重新设计。导航自姜饼以来就没动过,还有些界面的核心部分,像是路线,直接从安卓 1.6 的设计拿出来,放到一个小盒子里居中放置,仅此而已。
+
+----------
+
+
+
+[Ron Amadeo][a] / Ron是Ars Technica的评论编缉,专注于安卓系统和谷歌产品。他总是在追寻新鲜事物,还喜欢拆解事物看看它们到底是怎么运作的。
+
+[@RonAmadeo][t]
+
+--------------------------------------------------------------------------------
+
+via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/17/
+
+译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
+
+[a]:http://arstechnica.com/author/ronamadeo
+[t]:https://twitter.com/RonAmadeo
diff --git a/translated/talk/The history of Android/18 - The history of Android.md b/translated/talk/The history of Android/18 - The history of Android.md
new file mode 100644
index 0000000000..f4781cc621
--- /dev/null
+++ b/translated/talk/The history of Android/18 - The history of Android.md
@@ -0,0 +1,83 @@
+安卓编年史
+================================================================================
+
+安卓市场的新设计试水“卡片式”界面,这将成为谷歌的主要风格。
+Ron Amadeo 供图
+
+安卓推向市场已经有两年半时间了,安卓市场放出了它的第四版设计。这个新设计十分重要,因为它已经很接近谷歌的“卡片式”界面了。通过在小方块中显示应用或其他内容,谷歌可以使其设计在不同尺寸屏幕下无缝过渡而不受影响。内容可以像一个相册应用里的照片一样显示——给布局渲染填充一个内容块列表,加上屏幕包装,就完成了。更大的屏幕一次可以看到更多的内容块,小点的屏幕一次看到的内容就少。内容用了不一样的方式显示,谷歌还在右边新增了一个“分类”板块,顶部还有个巨大的热门应用滚动显示。
+
+虽然设计上为更容易配置界面准备好准备好了,但功能上还没有。最初发布的市场版本锁定为横屏模式,而且还是蜂巢独占的。
+
+
+应用详情页和“我的应用”界面。
+Ron Amadeo 供图
+
+新的市场不仅出售应用,还加入了书籍和电影租借。谷歌从2010年开始出售图书;之前只通过网站出售。新的市场将谷歌所有的内容销售聚合到了一处,进一步向苹果 iTunes 的主宰展开较量。虽然在“安卓市场”出售这些东西有点品牌混乱,因为大部分内容都不依赖于安卓才能使用。
+
+
+浏览器看起来非常像 Chrome,联系人使用了双面板界面。
+Ron Amadeo 供图
+
+新浏览器界面顶部添加了标签页栏。尽管这个浏览器并不是 Chrome ,它模仿了许多 Chrome 的设计和特性。除了这个探索性的顶部标签页界面,浏览器还加入了隐身标签,在浏览网页时不保存历史记录和自动补全记录。它还有个选项可以让你拥有一个 Chrome 风格的新标签页,页面上包含你最经常访问的网页略缩图。
+
+新浏览器甚至还能和 Chrome 同步。在浏览器登录后,它会下载你的 Chrome 书签并且自动登录你的谷歌账户。收藏一个页面只需点击地址栏的星形标志即可,和谷歌地图一样,浏览器抛弃了缩放按钮,完全改用手势控制。
+
+联系人应用最终从电话应用中移除,并且独立为一个应用。之前的联系人/拨号混合式设计相对于人们使用现代智能手机的方式来说,过于以电话为中心了。联系人中存有电子邮件,IM,短信,地址,生日,以及社交网络等信息,所以将它们捆绑在电话应用里的意义和将它们放进谷歌地图里差不多。抛开了电话通讯功能,联系人能够简化成没有标签页的联系人列表。蜂巢采用了双面板视图,在左侧显示完整的联系人列表,右侧是联系人详情。应用利用了 Fragments API,通过它应用可以在同一屏显示多个面板界面。
+
+蜂巢版本的联系人应用是第一个拥有快速滚动功能的版本。当按住左侧滚动条的时候,你可以快速上下拖动,应用会显示列表当前位置的首字母预览。
+
+
+新 Youtube 应用看起来像是来自黑客帝国。
+Ron Amadeo 供图
+
+谢天谢地 Youtube 终于抛弃了自安卓 2.3 以来的谷歌给予这个视频服务的“独特”设计,新界面设计与系统更加一体化。主界面是一个水平滚动的曲面墙,上面显示着最热门或者(登录之后)个人关注的视频。虽然谷歌从来没有将这个设计带到手机上,但它可以被认为是一个易于重新配置的卡片界面。操作栏在这里是个可配置的工具栏。没有登录时,操作栏由一个搜索栏填满。当你登录后,搜索缩小为一个按钮,“首页”,“浏览”和“你的频道”标签将会显示出来。
+
+
+蜂巢用一个蓝色框架的电脑界面来驱动主屏。电影工作室完全采用橙色电子风格主题。
+Ron Amadeo 供图
+
+蜂巢新增的应用“电影工作室”,这不是一个不言自明的应用,而且没有任何的解释或说明。就我们所知,你可以导入视频,剪切它们,添加文本和场景过渡。编辑视频——电脑上你可以做的最耗时,困难,以及处理器密集型任务之一——在平板上完成感觉有点野心过大了,谷歌在之后的版本里将其完全移除了。电影工作室里我们最喜欢的部分是它完全的电子风格主题。虽然系统的其它部分使用蓝色高亮,在这里是橙色的。(电影工作室是个邪恶的程序!)
+
+
+小部件!
+Ron Amadeo 供图
+
+蜂巢带来了新的部件框架,允许部件滚动,Gmail,Email 以及日历部件都升级了以支持改功能。Youtube 和书籍使用了新的部件,内容卡片可以自动滚动切换。在小部件上轻轻向上或向下滑动可以切换卡片。我们不确定你的书籍中哪些书会被显示出来,但如果你想要的话它就在那儿。尽管所有的这些小部件在10英寸屏幕上运行良好,谷歌从未将它们重新设计给手机,这让它们在安卓最流行的规格上几乎毫无用处。所有的小部件有个大块的标识标题栏,而且通常占据大半屏幕只显示很少的内容。
+
+
+安卓3.1中可滚动的最近应用以及可自定义大小的小部件。
+Ron Amadeo 供图
+
+蜂巢后续的版本修复了3.0早期的一些问题。安卓3.1在蜂巢的第一个版本之后三个月放出,并带来了一些改进。小部件自定义大小是添加的最大特性之一。长按小部件之后,一个带有拖拽按钮的蓝色外框会显示出来,拖动按钮可以改变小部件尺寸。最近应用界面现在可以垂直滚动并且承载更多应用。这个版本唯一缺失的功能是滑动关闭应用。
+
+在今天,一个0.1版本的升级是个主要更新,但是在蜂巢,那只是个小更新。除了一些界面调整,3.1添加了对游戏手柄,键盘,鼠标以及其它USB和蓝牙输入设备的支持。它还提供了更多的开发者API。
+
+
+安卓3.2的兼容性缩放和一个安卓平板上典型的展开视图应用。
+Ron Amadeo 供图
+
+安卓3.2在3.1发布后两个月放出,添加了七到八英寸的小尺寸平板支持。3.2终于启用了SD卡支持,Xoom 在生命最初的五个月像是抱着个不完整的肢体一样。
+
+蜂巢匆匆问世是为了成为一个生态系统建设者。如果应用没有平板版本,没人会想要一个安卓平板的,所以谷歌知道需要尽快将东西送到开发者手中。在这个安卓平板生态的早期阶段,应用还没有到齐。这是拥有 Xoom 的人们所面临的最大的问题。
+
+3.2添加了“兼容缩放”,给了用户一个新选项,可以将应用拉伸适应屏幕(如右侧图片显示的那样)或缩放成正常的应用布局来适应屏幕。这些选项都不是很理想,没有应用生态来支持平板,蜂巢设备销售状况惨淡。但谷歌的平板决策最终还是会得到回报。今天,安卓平板已经[取代 iOS 占据了最大的市场份额][1]。
+
+----------
+
+
+
+[Ron Amadeo][a] / Ron是Ars Technica的评论编缉,专注于安卓系统和谷歌产品。他总是在追寻新鲜事物,还喜欢拆解事物看看它们到底是怎么运作的。
+
+[@RonAmadeo][t]
+
+--------------------------------------------------------------------------------
+
+via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/18/
+
+译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
+
+[1]:http://techcrunch.com/2014/03/03/gartner-195m-tablets-sold-in-2013-android-grabs-top-spot-from-ipad-with-62-share/
+[a]:http://arstechnica.com/author/ronamadeo
+[t]:https://twitter.com/RonAmadeo
diff --git a/translated/talk/The history of Android/19 - The history of Android.md b/translated/talk/The history of Android/19 - The history of Android.md
new file mode 100644
index 0000000000..2ea47bc778
--- /dev/null
+++ b/translated/talk/The history of Android/19 - The history of Android.md
@@ -0,0 +1,71 @@
+安卓编年史
+================================================================================
+
+姜饼上的 Google Music Beta。
+Ron Amadeo 供图
+
+### Google Music Beta —— 取代内容商店的云存储 ###
+
+尽管蜂巢改进了 Google Music 的界面,但是音乐应用的设计并没有从蜂巢直接进化到冰淇淋三明治。2011年5月,谷歌发布了“[Google Music Beta][1]”,和新的 Google Music 应用一同到来的在线音乐存储。
+
+新 Google Music 为安卓2.2及以上版本设计,借鉴了 Cooliris 相册的设计语言,但也有改变之处,背景使用了模糊处理的图片。几乎所有东西都是透明的:弹出菜单,顶部标签页,还有底部的正在播放栏。可以下载单独的歌曲或整个播放列表到设备上离线播放,这让 Google Music 成为一个让音乐同步到你所有设备的好途径。除了移动应用外,Google Music 还有一个 Web 应用,让它可以在任何一台桌面电脑上使用。
+
+谷歌和唱片公司关于内容的合约还没有谈妥,音乐商店还没准备好,所以它的权宜之计是允许用户存储音乐到线上并下载到设备上。如今谷歌除了音乐存储服务外,还有单曲购买和订阅模式。
+
+### Android 4.0, 冰淇淋三明治 —— 摩登时代 ###
+
+
+三星 Galaxy Nexus,安卓4.0的首发设备。
+
+安卓4.0,冰淇淋三明治,在2011年10月发布,系统发布回到正轨,带来定期发布的手机和平板,并且安卓再次开源。这是自姜饼以来手机设备的第一个更新,意味着最主要的安卓用户群体近乎一年没有见到更新了。4.0随处可见缩小版的蜂巢设计,还将虚拟按键,操作栏(Action Bar),全新的设计语言带到了手机上。
+
+冰淇淋三明治在三星 Galaxy Nexus 上首次亮相,也是最早带有720p显示屏的安卓手机之一。随着分辨率的提高,Galaxy Nexus 使用了更大的4.65英寸显示屏——几乎比最初的 Nexus One 大了一整英寸。这被许多批评者认为“太大了”,但如今的安卓设备甚至更大。(5英寸现在是“正常”的。)冰淇淋三明治比姜饼的性能要求更高,Galaxy Nexus 配备了一颗双核,1.2Ghz 德州仪器 OMAP 处理器和1GB的内存。
+
+在美国,Galaxy Nexus 在 Verizon 首发并且支持 LTE。不像之前的 Nexus 设备,最流行的型号——Verizon版——是在运营商的控制之下,谷歌的软件和更新在手机得到更新之前要经过 Verizon 的核准。这导致了更新的延迟以及 Verizon 不喜欢的应用被移除,即便是 Google Wallet 也不例外。
+
+多亏了冰淇淋三明治的软件改进,谷歌终于达成了移除手机上按钮的目标。有了虚拟导航键,实体电容按钮就可以移除了,最终 Galaxy Nexus 仅有电源和音量是实体按键。
+
+
+安卓4.0将很多蜂巢的设计缩小了。
+Ron Amadeo 供图
+
+电子质感的审美在蜂巢中显得有点多。于是在冰淇淋三明治中,谷歌开始减少科幻风的设计。科幻风的时钟字体从半透明折叠风格转变成纤细,优雅,看起来更加正常的字体。解锁环的水面波纹效果被去除了,蜂巢中的外星风格时钟小部件也被极简设计所取代。系统按钮也经过了重新设计,原先的蓝色轮廓,偶尔的厚边框变成了细的,设置带有白色轮廓。默认壁纸从蜂巢的蓝色太空船内部变成条纹状,破碎的彩虹,给默认布局增添了不少迟来的色彩。
+
+蜂巢的系统栏在手机上一分为二。在顶上是传统的状态栏,底部是新的系统栏,放着三个系统按钮:后退,主屏幕,最近应用。一个固定的搜索栏放置在了主屏幕顶部。该栏以和底栏一样的方式固定在屏幕上,所以在五个主屏上,它总共占据了20个图标大小的位置。在蜂巢的锁屏上,内部的小圆圈可以向大圆圈外的任意位置滑动来解锁设备。在冰淇淋三明治,你得把小圆圈移动到解锁图标上。这个新准确度要求允许谷歌向锁屏添加新的选项:一个相机快捷方式。将小圆圈拖向相机图标会直接启动相机,跳过了主屏幕。
+
+
+一个手机系统意味着更多的应用,通知面板重新回到了全屏界面。
+Ron Amadeo 供图
+
+应用抽屉还是标签页式的,但是蜂巢中的“我的应用”标签被“部件”标签页替代,这是个简单的2×3部件略缩图视图。像蜂巢里的那样,这个应用抽屉是分页的,需要水平滑动换页。(如今安卓仍在使用这个应用抽屉设计。)应用抽屉里新增的是 Google+ 应用,后来独立存在。还有一个“Messenger”快捷方式,是 Google+ 的私密信息服务。(不要混淆 “Messenger” 和已有的 “Messaging” 短信应用。)
+
+因为我们现在回到了手机上,所以短信,新闻和天气,电话,以及语音拨号都回来了,以及Cordy,一个平板的游戏,被移除了。尽管不是 Nexus 设备,我们的截图还是来自 Verizon 版的设备,可以从图上看到有像 “My Verizon Mobile” 和 “VZ Backup Assistant” 这样没用的应用。为了和冰淇淋三明治的去电子风格主题一致,日历和相机图标现在看起来更像是来自地球的东西而不是来自外星球。时钟,下载,电话,以及安卓市场同样得到了新图标,联系人“Contacts”获得了新图标,还有新名字“People”。
+
+通知面板进行了大改造,特别是和[之前姜饼中的设计][2]相比而言。面板头部有个日期,一个设置的快捷方式,以及“清除所有”按钮。虽然蜂巢的第一个版本就允许用户通过通知右边的“X”消除单个通知,但是冰淇淋三明治的实现更加优雅:只要从左向右滑动通知即可。蜂巢有着蓝色高亮,但是蓝色色调到处都是。冰淇淋三明治几乎把所有地方的蓝色统一成一个(如果你想知道确定的值,hex码是#33B5E5)。通知面板的背景是透明的,底部的“把手”变为一个简单的小蓝圈,带着不透明的黑色背景。
+
+
+安卓市场的主页背景变成了黑色。
+Ron Amadeo 供图
+
+市场获得了又一个新设计。它终于再次支持纵向模式,并且添加了音乐到商店中,你可以从中购买音乐。新的市场拓展了从蜂巢中引入的卡片概念,它还是第一个同时使用在手机和平板上的版本。主页上的卡片通常不是链接到应用的,而是指向特别的促销页面,像是“编辑精选”或季度促销。
+
+----------
+
+
+
+[Ron Amadeo][a] / Ron是Ars Technica的评论编缉,专注于安卓系统和谷歌产品。他总是在追寻新鲜事物,还喜欢拆解事物看看它们到底是怎么运作的。
+
+[@RonAmadeo][t]
+
+--------------------------------------------------------------------------------
+
+via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/19/
+
+译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
+
+[1]:http://arstechnica.com/gadgets/2011/05/hands-on-grooving-on-the-go-with-impressive-google-music-beta/
+[2]:http://cdn.arstechnica.net/wp-content/uploads/2014/02/32.png
+[a]:http://arstechnica.com/author/ronamadeo
+[t]:https://twitter.com/RonAmadeo
diff --git a/translated/talk/The history of Android/20 - The history of Android.md b/translated/talk/The history of Android/20 - The history of Android.md
new file mode 100644
index 0000000000..9ef34f1f63
--- /dev/null
+++ b/translated/talk/The history of Android/20 - The history of Android.md
@@ -0,0 +1,93 @@
+安卓编年史
+================================================================================
+
+和之前完全不同的市场设计。以上是分类,特色,热门应用以及应用详情页面。
+Ron Amadeo 供图
+
+这些截图给了我们冰淇淋三明治中新版操作栏的第一印象。几乎所有的应用顶部都有一条栏,带有应用图标,当前界面标题,一些功能按钮,右边还有一个菜单按钮。这个右对齐的菜单按钮被称为“更多操作”,因为里面存放着无法放置到主操作栏的项目。不过更多操作菜单并不是固定不变的,它给了操作栏节省了更多的屏幕空间——比如在横屏模式或在平板上时,更多操作菜单的项目会像通常的按钮一样显示在操作栏上。
+
+冰淇凌三明治中新增了“滑动标签页”设计,替换掉了谷歌之前推行的2×3方阵导航屏幕。一个标签页栏放置在了操作栏下方,位于中间的标签显示的是当前页面,左右侧的两个标签显示的是对应的当前页面的左右侧页面。向左右滑动可以切换标签页,或者你可以点击指定页面的标签跳转过去。
+
+应用详情页面有个很赞的设计,在应用截图后,会根据你关于那个应用的历史动态地重新布局页面。如果你从来没有安装过该应用,应用描述会优先显示。如果你曾安装过这个应用,第一部分将会是评价栏,它会邀请你评价该应用或者提醒你上次你安装该应用时的评价是什么。之前使用过的应用页面第二部分是“新特性”,因为一个老用户最关心的应该是应用有什么变化。
+
+
+最近应用和浏览器和蜂巢中的类似,但是是小号的。
+Ron Amadeo 供图
+
+最近应用的电子风格外观被移除了。略缩图周围的蓝色的轮廓线被去除了,同时去除的还有背景怪异的,不均匀的蓝色光晕。它现在看起来是个中立型的界面,在任何时候看起来都很舒适。
+
+浏览器尽了最大的努力把标签页体验带到手机上来。多标签浏览受到了关注,操作栏上引入的一个标签页按钮会打开一个类似最近应用的界面,显示你打开的标签页,而不是浪费宝贵的屏幕空间引入一个标签条。从功能上来说,这个和之前的浏览器中的“窗口”视图没什么差别。浏览器最佳的改进是菜单中的“请求桌面版站点”选项,这让你可以从默认的移动站点视图切换到正常站点。浏览器展示了谷歌的操作栏设计的灵活性,尽管这里没有左上角的应用图标,功能上来说和其他的顶栏设计相似。
+
+
+Gmail 和 Google Talk —— 它们和蜂巢中的相似,但是更小!
+Ron Amadeo 供图
+
+Gmail 和 Google Talk 看起来都像是之前蜂巢中的设计的缩小版,但是有些小调整让它们在小屏幕上表现更佳。Gmail 以双操作栏为特色——一个在屏幕顶部,一个在底部。顶部操作栏显示当前文件夹,账户,以及未读消息数目,点击顶栏可以打开一个导航菜单。底部操作栏有你期望出现在更多操作中的选项。使用双操作栏布局是为了在界面显示更多的按钮,但是在横屏模式下纵向空间有限,双操作栏就是合并成一个顶部操作栏。
+
+在邮件视图下,往下滚动屏幕时蓝色栏有“粘性”。它会固定在屏幕顶部,所以你一直可以看到该邮件是谁写的,回复它,或者给它加星标。一旦处于邮件消息界面,底部细长的,深灰色栏会显示你当前在收件箱(或你所在的某个列表)的位置,并且你可以向左或向右滑动来切换到其他邮件。
+
+Google Talk 允许你像在 Gmail 中那样左右滑动来切换聊天窗口,但是这里显示栏是在顶部。
+
+
+新的拨号和来电界面,都是姜饼以来我们还没见过的。
+Ron Amadeo 供图
+
+因为蜂巢只给平板使用,所以一些界面设计直接超前于姜饼。冰淇淋三明治的新拨号界面就是如此,黑色和蓝色相间,并且使用了可滑动切换的小标签。尽管冰淇淋三明治终于做了对的事情并将电话主体和联系人独立开来,但电话应用还是有它自己的联系人标签。现在有两个地方可以看到你的联系人列表——一个有着暗色主题,另一个有着亮色主题。由于实体搜索按钮不再是硬性要求,底部的按钮栏的语音信息快捷方式被替换为了搜索图标。
+
+谷歌几乎就是把来电界面做成了锁屏界面的镜像,这意味着冰淇淋三明治有着一个环状解锁设计。除了通常的接受和挂断选项,圆环的顶部还添加了一个按钮,让你可以挂断来电并给对方发送一条预先定义好的信息。向上滑动并选择一条信息如“现在无法接听,一会回电”,相比于一直响个不停的手机而言这样做的信息交流更加丰富。
+
+
+蜂巢没有文件夹和信息应用,所以这里是冰淇淋三明治和姜饼的对比。
+Ron Amadeo 供图
+
+现在创建文件夹更加方便了。在姜饼中,你得长按屏幕,选择“文件夹”选项,再点击“新文件夹”。在冰淇淋三明治中,你只要将一个图标拖拽到另一个图标上面,就会自动创建一个文件夹,并包含这两个图标。这简直不能更简单了,比寻找隐藏的长按命令容易多了。
+
+设计上也有很大的改进。姜饼使用了一个通用的米黄色文件夹图标,但冰淇淋三明治直接显示出了文件夹中的头三个应用,把它们的图标叠在一起,在外侧画一个圆圈,并将其设置为文件夹图标。打开文件夹容器将自动调整大小以适应文件夹中的应用图标数目,而不是显示一个全屏的,大部分都是空的对话框。这看起来好得多得多。
+
+
+Youtube 转换到一个更加现代的白色主题,使用了列表视图替换疯狂的 3D 滚动视图。
+Ron Amadeo 供图
+
+Youtube 经过了完全的重新设计,看起来没那么像是来自黑客帝国的产物,更像是,嗯,Youtube。它现在就是一个简单的垂直滚动的白色视频列表,就像网站的那样。在你手机上制作视频受到了重视,操作栏的第一个按钮专用于拍摄视频。奇怪的是,不同的界面左上角使用了不同的 Youtube 标志,在水平的 Youtube 标志和方形标志之间切换。
+
+Youtube 几乎在所有地方都使用了滑动标签页。它们被放置在主页面以在浏览和账户间切换,放置在视频页面以在评论,介绍和相关视频之间切换。4.0 版本的应用显示出 Google+ Youtube 集成的第一个信号,通常的评分按钮旁边放置了 “+1” 图标。最终 Google+ 会完全占据 Youtube,将评论和作者页面变成 Google+ 活动。
+
+
+冰淇淋三明治试着让事情对所有人都更加简单。这里是数据使用量追踪,打开许多数据的新开发者选项,以及使用向导。
+Ron Amadeo 供图
+
+数据使用量允许用户更轻松地追踪和控制他们的数据使用。主页面显示一个月度使用量图表,用户可以设置数据使用警告值或者硬性使用限制以避免超量使用产生费用。所有的这些只需简单地拖动橙色和红色水平限制线在图表上的位置即可。纵向的白色把手允许用户选择图表上的一段指定时间段。在页面底部,选定时间段内的数据使用量又细分到每个应用,所以用户可以选择一个数据使用高峰并轻松地查看哪个应用在消耗大量流量。当流量紧张的时候,更多操作按钮中有个限制所有后台流量的选项。设置之后只用在前台运行的程序有权连接互联网。
+
+开发者选项通常只有一点点设置选项,但是在冰淇淋三明治中,这部分有非常多选项。谷歌添加了所有类型的屏幕诊断显示浮层来帮助开发者理解他们的应用中发生了什么。你可以看到 CPU 使用率,触摸点位置,还有视图界面更新。还有些选项可以更改系统功能,比如控制动画速度,后台处理,以及 GPU 渲染。
+
+安卓和 iOS 之间最大的区别之一就是应用抽屉界面。在冰淇淋三明治对更加用户友好的追求下,设备第一次初始化启动会启动一个小教程,向用户展示应用抽屉的位置以及如何将应用图标从应用抽屉拖拽到主屏幕。随着实体菜单按键的移除和像这样的改变,安卓 4.0 做了很大的努力变得对新智能手机用户和转换过来的用户更有吸引力。
+
+
+“触摸分享”NFC 支持,Google Earth,以及应用信息,让你可以禁用垃圾软件。
+
+冰淇淋三明治内置对 [NFC][1] 的完整支持。尽管之前的设备,比如 Nexus S 也拥有 NFC,得到的支持是有限的并且系统并不能利用芯片做太多事情。4.0 添加了一个“Android Beam”功能,两台拥有 NFC 的安卓 4.0 设备可以借此在设备间来回传输数据。NFC 会传输关于此事屏幕显示的数据,因此在手机显示一个网页的时候使用该功能会将该页面传送给另一部手机。你还可以发送联系人信息,方向导航,以及 Youtube 链接。当两台手机放在一起时,屏幕显示会缩小,点击缩小的界面会发送相关信息。
+
+I在安卓中,用户不允许删除系统应用,以保证系统完整性。运营商和 OEM 利用该特性并开始将垃圾软件放入系统分区,经常有一些没用的应用存在系统中。安卓 4.0 允许用户禁用任何不能被卸载的应用,意味着该应用还存在于系统中但是不显示在应用抽屉里并且不能运行。如果用户愿意深究设置项,这给了他们一个简单的途径来拿回手机的控制权。
+
+安卓 4.0 可以看做是现代安卓时代的开始。大部分这时发布的谷歌应用只能在安卓 4.0 及以上版本运行。4.0 还有许多谷歌想要好好利用的新 API——至少最初想要——对 4.0 以下的版本的支持就有限了。在冰淇淋三明治和蜂巢之后,谷歌真的开始认真对待软件设计。在2012年1月,谷歌[最终发布了][2] *Android Design*,一个教安卓开发者如何创建符合安卓外观和感觉的应用的设计指南站点。这是 iOS 在有第三方应用支持开始就在做的事情,苹果还严肃地对待应用的设计,不符合指南的应用都被 App Store 拒之门外。安卓三年以来谷歌没有给出任何公共设计规范文档的事实,足以说明事情有多糟糕。但随着在 Duarte 掌控下的安卓设计革命,谷歌终于发布了基本设计需求。
+
+----------
+
+
+
+[Ron Amadeo][a] / Ron是Ars Technica的评论编缉,专注于安卓系统和谷歌产品。他总是在追寻新鲜事物,还喜欢拆解事物看看它们到底是怎么运作的。
+
+[@RonAmadeo][t]
+
+--------------------------------------------------------------------------------
+
+via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/20/
+
+译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
+
+[1]:http://arstechnica.com/gadgets/2011/02/near-field-communications-a-technology-primer/
+[2]:http://arstechnica.com/business/2012/01/google-launches-style-guide-for-android-developers/
+[a]:http://arstechnica.com/author/ronamadeo
+[t]:https://twitter.com/RonAmadeo
diff --git a/translated/talk/The history of Android/21 - The history of Android.md b/translated/talk/The history of Android/21 - The history of Android.md
new file mode 100644
index 0000000000..48cd8880be
--- /dev/null
+++ b/translated/talk/The history of Android/21 - The history of Android.md
@@ -0,0 +1,104 @@
+安卓编年史
+================================================================================
+
+Ron Amadeo 供图
+
+### Google Play 和直接面向消费者出售设备的回归 ###
+
+2012年3月6日,谷歌将旗下提供的所有内容统一到 “Google Play”。安卓市场变为了 Google Play 商店,Google Books 变为 Google Play Books,Google Music 变为 Google Play Music,还有 Android Market Movies 变为 Google Play Movies & TV。尽管应用界面的变化不是很大,这四个内容应用都获得了新的名称和图标。在 Play 商店购买的内容会下载到对应的应用中,Play 商店和 Play 内容应用一道给用户提供了易管理的内容体验。
+
+Google Play 更新是谷歌第一个大的更新周期外更新。四个自带应用都没有通过系统更新获得升级,它们都是直接通过安卓市场/ Play商店更新的。对单独的应用启用周期外更新是谷歌的重大关注点之一,而能够实现这样的更新,是自姜饼时代开始的工程努力的顶峰。谷歌一直致力于对应用从系统“解耦”,从而让它们能够通过安卓市场/ Play 商店进行分发。
+
+尽管一两个应用(主要是地图和 Gmail)之前就在安卓市场上,从这里开始你会看到许多更重大的更新,而其和系统发布无关。系统更新需要 OEM 厂商和运营商的合作,所以很难保证推送到每个用户手上。而 Play 商店更新则完全掌握在谷歌手上,给了谷歌一条直接到达用户设备的途径。因为 Google Play 的发布,安卓市场对自身升级到了 Google Play Store,在那之后,图书,音乐以及电影应用都下发了 Google Play 式的更新。
+
+Google Play 系列应用的设计仍然不尽相同。每个应用的外观和功能各有差异,但暂且来说,一个统一的品牌标识是个好的开始。从品牌标识中去除“安卓”字样是很有必要的,因为很多服务是在浏览器中提供的,不需要安卓设备也能使用。
+
+2012年4月,谷歌[再次开始通过 Play 商店销售设备][1],恢复在 Nexus One 发布时尝试的直接面向消费者销售的方式。尽管距 Nexus One 销售结束仅有两年,但往上购物现在更加寻常,在接触到物品之前就购买它并不像在2010年时听起来那么疯狂。
+
+谷歌也看到了价格敏感的用户在面对 Nexus One 530美元的价格时的反应。第一部销售的设备是无锁的,GSM 版本的 Galaxy Nexus,价格399美元。在那之后,价格变得更低。350美元成为了最近两台 Nexus 设备的入门价,7英寸 Nexus 平板的价格更是只有200美元到220美元。
+
+今天,Play 商店销售八款不同的安卓设备,四款 Chromebook,一款自动调温器,以及许多配件,设备商店已经是谷歌新产品发布的实际地点了。新产品发布总是如此受欢迎,站点往往无法承载如此大的流量,新 Nexus 手机也在几小时内售空。
+
+### 安卓 4.1,果冻豆——Google Now指明未来
+
+
+华硕制造的 Nexus 7,安卓 4.1 的首发设备。
+
+随着2012年7月安卓 4.1 果冻豆的发布,谷歌的安卓发布节奏进入每六个月一发布的轨道。平台已经成熟,三个月的发布周期就没那么必要了,更长的发布周期也给了 OEM 厂商足够的时间跟上谷歌的节奏。和蜂巢不同,小数点后的更新发布现在是主要更新,4.1 带来了主要的界面更新和框架变化。
+
+果冻豆最大的变化之一,并且你在截图中看不到的是“黄油计划”,谷歌工程师齐心努力让安卓的动画顺畅地跑在 30FPS 上。还有一些核心变化,像垂直同步和三重缓冲,每个动画都经过优化以流畅地绘制。动画和顺滑滚动一直是安卓和 iOS 相比之下的弱点。经过在核心动画框架和单独的应用上的努力,果冻豆让安卓的流畅度大幅接近 iOS。
+
+和果冻豆一起到来的还有 [Nexus][2] 7,由华硕生产的7英寸平板。不像之前主要是横屏模式的 Xoom,Nexus 7 主要以竖屏模式使用,像个大一号的手机。Nexus 7 展现了经过一年半的生态建设,谷歌已经准备好了给平板市场带来一部旗舰设备。和 Nexus One 和 GSM Galaxy Nexus 一样,Nexus 7 直接由谷歌在线销售。尽管那些早先的设备对习惯于运营商补贴的消费者来说拥有惊人的高价,Nexus 7 以仅仅 200 美元的价格推向大众市场。这个价格给你带来一部7英寸,1280x800 英寸显示屏,四核 1.2GHz Tegra 3 处理器,1GB 内存,8GB 内置存储的设备。Nexus 7 的性价比如此之高,许多人都想知道谷歌到底有没有在其旗舰平板上赚到钱。
+
+更小,更轻,7英寸,这些因素促成了谷歌巨大的成功,并且将谷歌带向了引领行业潮流的位置。一开始制造10英寸 iPad 的苹果,最终也不得不推出和 Nexus 7 相似的 iPad Mini 来应对。
+
+
+4.1 的新锁屏设计,壁纸,以及系统按钮新的点击高亮。
+Ron Amadeo 供图
+
+蜂巢引入的电子风格在冰淇淋三明治中有所减少,果冻豆在此之上走得更远。它开始从系统中大范围地移除蓝色。迹象就是系统按钮的点击高亮从蓝色变为了灰色。
+
+
+新应用阵容合成图以及新的消息可展开通知面板。
+Ron Amadeo 供图
+
+通知中心面板完全重制了,这个设计一直沿用到今天的奇巧巧克力(KitKat)。新面板扩展到了屏幕顶部,并且覆盖了状态栏图标,这意味着通知面板打开的时候不再能看到状态栏。时间突出显示在左上角,旁边是日期和设置按钮。清除所有通知按钮,冰淇淋三明治中显示为一个“X”按钮,现在变为阶梯状的按钮,象征着清除所有通知的时候消息交错滑动的动画效果。底部的面板把手从一个小圆换成了一条直线,和面板等宽。所有的排版都发生了变化——通知面板的所有项现在都使用了更大,更细的字体。通知面板是另一个从冰淇淋三明治和蜂巢中引入的蓝色元素被移除的屏幕。除了触摸高亮之外整个通知面板都是灰色的。
+
+通知面板也引入了新功能。相较于之前的两行设计,现在的通知消息可以展开以显示更多信息。通知消息可以显示最多8行文本,甚至还能在消息底部显示按钮。屏幕截图通知消息底部有个分享按钮,你也可以直接从未接来电通知拨号,或者将一个正在响铃的闹钟小睡,这些都可以在通知面板完成。新通知消息默认展开,但当它们堆叠到一起时会恢复原来的尺寸。在通知消息上双指向下滑动可以展开消息。
+
+
+新谷歌搜索应用,带有 Google Now 卡片,语音搜索,以及文字搜索。
+Ron Amadeo 供图
+
+果冻豆中不止对安卓而言,也是对谷歌来说最大的特性,是新版谷歌搜索应用。它带来了“Google Now”,一个预测性搜索功能。Google Now 在搜索框下面显示为几张卡片,它会提供谷歌认为你所关心的事物的搜索结果。就比如谷歌地图搜索你最近在桌面电脑查找的地点或日历的约会地点,天气,以及旅行时回家的时间。
+
+新版谷歌搜索应用自然可以从谷歌图标启动,但它还可以在任意屏幕从系统栏上滑访问。长按系统栏会唤出一个类似锁屏解锁的环。卡片部分纵向滚动,如果你不想看到它们,可以滑动消除它们。语音搜索是更新的一个大部分。提问不是无脑地输入进谷歌,如果谷歌知道答案,它还会用文本语音转换引擎回答你。传统的文字搜索当然也受支持。只需点击搜索栏然后开始输入即可。
+
+谷歌经常将 Google Now 称作“谷歌搜索的未来”。告诉谷歌你想要什么这还不够好。谷歌想要在你之前知道你想要什么。Google Now 用谷歌所有的数据挖掘关于你的知识为你服务,这也是谷歌对抗搜索引擎竞争对手,比如必应,最大的优势所在。智能手机比你拥有的其它设备更了解你,所以该服务在安卓上首次亮相。但谷歌慢慢也将 Google Now 加入 Chrome,最终似乎会到达 Google.com。
+
+尽管功能很重要,但同时 Google Now 是谷歌产品有史以来最重要的设计工作也是毋庸置疑的。谷歌搜索应用引入的白色卡片审美将会成为几乎所有谷歌产品设计的基础。今天,卡片风格被用在 Google Play 商店以及所有的 Play 内容应用,Youtube,谷歌地图,Drive,Keep,Gmail,Google+以及其它产品。同时也不限于安卓应用。不少谷歌的桌面站点和 iOS 应用也以此设计为灵感。设计是谷歌历史中的弱项之一,但 Google Now 开始谷歌最终在设计上采取了行动,带来一个统一的,全公司范围的设计语言。
+
+
+又一个 Youtube 的重新设计,信息密度有所下降。
+Ron Amadeo 供图
+
+又一个版本,又一个 Youtube 的重新设计。这次列表视图主要基于略缩图,大大的图片占据了屏幕的大部分。信息密度在新列表设计中有所下降。之前 Youtube 每屏大约能显示6个项目,现在只能显示3个。
+
+Youtube 是首批在应用左侧加入滑动抽屉的应用之一,该特性会成为谷歌应用的标准设计风格。抽屉中有你的账户的链接和订阅频道,这让谷歌可以去除页面顶部标签页设计。
+
+
+Google Play 服务的职责以及安卓的剩余部分职责。
+Ron Amadeo 供图
+
+### Google Play Services—fragmentation and making OS versions (nearly) obsolete ###
+### Google Play 服务——碎片化和让系统版本(几乎)过时 ###
+
+碎片化那时候看起来这并不是个大问题,但2012年12月,Google Play 服务 1.0 面向所有安卓2.2及以上版本的手机推出。它添加了一些 Google+ API 和对 OAuth 2.0 的支持。
+
+尽管这个升级听起来很无聊,但 Google Play 服务最终会成长为安卓整体的一部分。Google Play 服务扮演着正常应用和安卓系统的中间角色,使得谷歌可以升级或替换一些核心组件,并在不发布新安卓版本的前提下添加 API。
+
+有了 Play 服务,谷歌有了直接接触安卓手机核心部分的能力,而不用通过 OEM 更新一集运营商批准的过程。谷歌使用 Play 服务添加了全新的位置系统,恶意软件扫描,远程擦除功能,以及新的谷歌地图 API,所有的这一切都不用通过发布一个系统更新实现。正如我们在姜饼部分的结尾提到的,感谢 Play 服务里这些“可移植的”API 实现,姜饼仍然能够下载现代版本的 Play 商店和许多其他的谷歌应用。
+
+另一个巨大的益处是安卓用户基础的兼容性。最新版本的安卓系统要经过很长时间到达大多数用户手中,这意味着最新版本系统绑定的 API 在大多数用户升级之前对开发者来说没有任何意义。Google Play 服务兼容冻酸奶及以上版本,换句话说就是99%的活跃设备,并且更新可以直接通过 Play 商店直接推送到手机上。通过将 API 包含在 Google Play 服务中而不是安卓中,谷歌可以在一周内将新 API 推送到几乎所有用户手中。这对许多版本碎片化引起的问题来说是个[伟大的解决方案][3]。
+
+----------
+
+
+
+[Ron Amadeo][a] / Ron是Ars Technica的评论编缉,专注于安卓系统和谷歌产品。他总是在追寻新鲜事物,还喜欢拆解事物看看它们到底是怎么运作的。
+
+[@RonAmadeo][t]
+
+--------------------------------------------------------------------------------
+
+via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/21/
+
+译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
+
+[1]:http://arstechnica.com/gadgets/2012/04/unlocked-samsung-galaxy-nexus-can-now-be-purchased-from-google/
+[2]:http://arstechnica.com/gadgets/2012/07/divine-intervention-googles-nexus-7-is-a-fantastic-200-tablet/
+[3]:http://arstechnica.com/gadgets/2013/09/balky-carriers-and-slow-oems-step-aside-google-is-defragging-android/
+[a]:http://arstechnica.com/author/ronamadeo
+[t]:https://twitter.com/RonAmadeo
diff --git a/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md b/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md
new file mode 100644
index 0000000000..5dcea06611
--- /dev/null
+++ b/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md
@@ -0,0 +1,164 @@
+debian linux上安装配置 ISC DHCP Server
+================================================================================
+动态主机控制协议(DHCP)给网络管理员提供一种便捷的方式,为不断变化的网络主机或是动态网络提供网络层地址。其中最常用的DHCP服务工具是 ISC DHCP Server。DHCP服务的目的是给主机提供必要的网络信息以便能够和其他连接在网络中的主机互相通信。DHCP服务一般包括以下信息:DNS服务器信息,网络地址(IP),子网掩码,默认网关信息,主机名等等。
+
+本教程介绍4.2.4版的ISC-DHCP-Server如何在Debian7.7上管理多个虚拟局域网(VLAN),它也可以非常容易的配置的用于单一网络。
+
+测试用的网络是通过思科路由器使用传统的方式来管理DHCP租约地址的,目前有12个VLANs需要通过路由器的集中式服务器来管理。把DHCP的任务转移到一个专用的服务器上面,路由器可以收回相应的资源,把资源用到更重要的任务上,比如路由寻址,访问控制列表,流量监测以及网络地址转换等。
+
+另一个将DHCP服务转移到专用服务器的好处,以后会讲到,它可以建立动态域名服务器(DDNS)这样当主机从服务器请求DHCP地址的时候,新主机的主机名将被添加到DNS系统里面。
+
+### 安装和配置ISC DHCP Server###
+
+1. 使用apt工具用来安装Debian软件仓库中的ISC软件,来创建这个多宿主服务器。与其他教程一样需要使用root或者sudo访问权限。请适当的修改,以便使用下面的命令。(译者注:下面中括号里面是注释,使用的时候请删除,#表示使用的root权限)
+
+
+ # apt-get install isc-dhcp-server [安装 the ISC DHCP Server 软件]
+ # dpkg --get-selections isc-dhcp-server [确认软件已经成功安装]
+ # dpkg -s isc-dhcp-server [用另一种方式确认成功安装]
+
+
+
+2. 确认服务软件已经安装完成,现在需要一些网络的需求来配置服务器,这样服务器才能够根据我们的需要来分发网络信息。作为管理员最起码需要了解的DHCP信息如下:
+- 网络地址
+- 子网掩码
+- 动态分配的地址范围
+
+其他一些服务器动态分配的有用信息包括:
+- 默认网关
+- DNS服务器IP地址
+- 域名
+- 主机名
+- 网络广播地址
+
+
+这只是能让ISC DHCP server处理的选项中非常少的一部分。如果你想查看所有选项及其描述需要在安装好软件后输入以下命令:
+ # man dhcpd.conf
+
+3. 一旦管理员已经确定了这台服务器需要分发的需求信息,那么是时候配置服务器并且分配必要的地址池了。在配置任何地址池或服务器配置之前,DHCP服务必须配置好,来侦听这台服务器上面的一个接口。
+
+在这台特定的服务器上,设置好网卡后,DHCP会侦听名称名为`'bond0'`的接口。请适根据你的实际情况来更改服务器以及网络环境。下面的配置都是针对本教程的。
+
+
+
+这行指定的是DHCP服务侦听接口(一个或多个)上的DHCP流量。修改主要的配置文件分配适合的DHCP地址池到所需要的网络上。配置文件所在置/etc/dhcp/dhcpd.conf。用文本编辑器打开这个文件
+ # nano /etc/dhcp/dhcpd.conf
+
+这个配置文件可以配置我们所需要的地址池/主机。文件顶部有‘ddns-update-style‘这样一句,在本教程中它设置为‘none‘。在以后的教程中动态DNS,ISC-DHCP-Server 将被整合到 BIND9,它能够使主机名更新到IP地址。
+
+4. 接下来的部分是管理员配置全局网络设置,如DNS域名,默认的租约时间,IP地址,子网的掩码,以及更多的区域。如果你想了解所有的选项,请阅读man手册中的dhcpd.conf文件,命令如下:
+
+ # man dhcpd.conf
+
+
+对于这台服务器,我们需要在顶部配置一些全局网络设置,这样就不用到每个地址池中去单独设置了。
+
+
+
+
+我们花一点时间来解释一下这些选项,在本教程中虽然它们是一些全局设置,但是也可以为单独的为某一个地址池进行配置。
+
+- option domain-name “comptech.local”; – 所有使用这台DHCP服务器的主机,都将成为DNS域名为“comptech.local”的一员
+
+- option domain-name-servers 172.27.10.6; DHCP向所有配置这台DHCP服务器的的网络主机分发DNS服务器地址为172.27.10.6
+
+- option subnet-mask 255.255.255.0; – 分派子网掩码到每一个网络设备 255.255.255.0 或a /24
+
+- default-lease-time 3600; – 默认有效的地址租约时间(单位是秒)。如果租约时间耗尽,那么主机可以重新申请租约。如果租约完成,那么相应的地址也将被尽快回收。
+
+- max-lease-time 86400; – 这是一台主机最大的租约时间(单位为秒)。
+
+- ping-check true; – 这是一个额外的测试,以确保服务器分发出的网络地址不是当前网络中另一台主机已使用的网络地址。
+
+- ping-timeout; – 如果地址以前没有使用过,可以用这个选项来检测2个ping返回值之间的时间长度。
+
+- ignore client-updates; 现在这个选项是可以忽略的,因为DDNS在前面已在配置文件中已经被禁用,但是当DDNS运行时,这个选项会忽略更新其DNS主机名的请求。
+
+5. 文件中下面一行是权威DHCP所在行。这行的意义是如果服务器是为文件中所配置的网络分发地址的服务器,那么取消注释权威字节(authoritative stanza)来实现。
+
+通过去掉关键字authoritative 前面的‘#’,取消注释全局权威字节。这台服务器将是它所管理网络里面的唯一权威。
+
+
+开启 ISC Authoritative
+
+默认情况下服务器被假定为不是网络上的权威。之所以这样做是出于安全考虑。如果有人因为不了解DHCP服务的配置,导致配置不当或配置到一个不该出现的网络里面,这都将带来非常严重的重连接问题。这行还可用在每个网络中单独配置使用。也就是说如果这台服务器不是整个网络的DHCP服务器,authoritative行可以用在每个单独的网络中,而不是像上面截图中那样的全局配置。
+
+6. 这一步是配置服务器将要管理的所有DHCP地址池/网络。简短起见,本教程只配置了地址池。作为管理员需要收集一些必要的网络信息(比如域名,网络地址,有多少地址能够被分发等等)
+
+以下这个地址池所用到的信息都是管理员收集整理的:网络id 172.27.60.0, 子网掩码 255.255.255.0 or a /24, 默认子网网关172.27.60.1,广播地址 172.27.60.255.0
+
+以上这些信息用于构建hcpd.conf文件中新的网络非常重要。使用文本编辑器修改配置文件添加新的网络进去,这里我们需要使用root或sudo访问权限。网络非常重要。使用文本编辑器修改配置文件添加新的网络进去,这里我们需要使用root或sudo访问权限。
+
+ # nano /etc/dhcp/dhcpd.conf
+
+
+配置DHCP的地址池和网络
+
+当前这个例子是给用VMWare创建的虚拟服务器分配IP地址。第一行显示是该网络的子网掩码。括号里面的内容是DHCP服务器应该提供给网络上面主机的所有选项。
+
+第一节, range 172.27.60.50 172.27.60.254;这一行显示的是,DHCP服务在这个网络上能够给主机动态分发的地址范围。
+
+第二节,option routers 172.27.60.1;这里显示的是网络里面所有的主机分发默认网关地址。
+
+最后一节, option broadcast-address 172.27.60.255;,显示当前网络的广播地址。这个地址不能被包含在要分发放的地址范围内,因为广播地址不能分配到一个主机上面。
+
+必须要强调的是每行的结尾必须要用(;)来结束,所有创建的网络必须要在{}里面。
+
+7. 如果是创建多个网络,连续的创建完它们的相应选项后保存文本文件即可。配置完成以后如果有更改,ISC-DHCP-Server进程需要重启来使新的更改生效。重启进程可以通过下面的命令来完成:
+ # service isc-dhcp-server restart
+
+这条命令将重启DHCP服务,管理员能够使用几种不同的方式来检查服务器是否已经可以处理dhcp请求。最简单的方法是通过lsof命令[1]来查看服务器是否在侦听67端口,命令如下:
+
+ # lsof -i :67
+
+
+检查DHCP侦听端口
+
+这里输出的结果表明DHCPD(DHCP服务守护进程)正在运行并且侦听67端口。由于/etc/services文件中67端口是端口映射,所以输出中的67端口实际上被转换成了“bootps”。
+
+在大多数的系统中这是非常常见的,现在服务器应该已经为网络连接做好准备,我们可以将一台主机接入网络请求DHCP地址来验证服务是否正常。
+
+### 测试客户端连接 ###
+
+8. 现在许多系统使用网络管理器来维护网络连接状态,因此这个设备应该预先配置好的,只要对应的接口处于活跃状态就能够获取DHCP。
+
+然而当一台设备无法使用网络管理器时,它可能需要手动获取DHCP地址。下面的几步将演示怎样手动获取以及如何查看服务器是否已经按需要分发地址。
+
+ ‘[ifconfig][2]‘工具能够用来检查接口的配置。这台被用来测试的DHCP服务器的设备,它只有一个网络适配器(网卡),这块网卡被命名为‘eth0‘。
+
+ # ifconfig eth0
+
+
+检查网络接口IP地址
+
+从输出结果上看,这台设备目前没IPv4地址,这样很好便于测试。我们把这台设备连接到DHCP服务器并发出一个请求。这台设备上已经安装了一个名为‘dhclient‘ 的DHCP客户端工具。因为操作系统各不相同,所以这个客户端软件也是互不一样的。
+ # dhclient eth0
+
+
+从DHCP请求IP地址
+
+当前 `'inet addr:'` 字段中显示了属于172.27.60.0网络地址范围内的IPv4地址。值得欣慰的是当前网络还配置了正确的子网掩码并且分发了广播地址。
+
+到这里看起来还都不错,让我们来测试一下,看看这台设备收到新IP地址是不是由服务器发出的。这里我们参照服务器的日志文件来完成这个任务。虽然这个日志的内容有几十万条,但是里面只有几条是用来确定服务器是否正常工作的。这里我们使用一个工具‘tail’,它只显示日志文件的最后几行,这样我们就可以不用拿一个文本编辑器去查看所有的日志文件了。命令如下:
+
+ # tail /var/log/syslog
+
+
+检查DHCP日志文件
+
+OK!服务器记录表明它分发了一个地址给这台主机(HRTDEBXENSRV)。服务器按预期运行,给它充当权威的网络分发适合的网络地址。至此DHCP服务器搭建成功并且运行。如果有需要你可以继续配置其他的网络,排查故障,确保安全。
+
+在以后的Debian教程中我会讲一些新的 ISC-DHCP-Server 功能。有时间的话我将写一篇关于Bind9和DDNS的教程,融入到这篇文章里面。
+--------------------------------------------------------------------------------
+
+via: http://www.tecmint.com/install-and-configure-multihomed-isc-dhcp-server-on-debian-linux/
+
+作者:[Rob Turner][a]
+译者:[ivo-wang](https://github.com/ivo-wang)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
+
+[a]:http://www.tecmint.com/author/robturner/
+[1]:http://www.tecmint.com/10-lsof-command-examples-in-linux/
+[2]:http://www.tecmint.com/ifconfig-command-examples/
diff --git a/translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md b/translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md
deleted file mode 100644
index 1d476d0f18..0000000000
--- a/translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md
+++ /dev/null
@@ -1,205 +0,0 @@
-Nishita Agarwal分享它关于Linux防火墙'iptables'的面试经验
-================================================================================
-Nishita Agarwal是Tecmint的用户,她将分享关于她刚刚经历的一家公司(私人公司Pune,印度)的面试经验。在面试中她被问及许多不同的问题,但她是iptables方面的专家,因此她想分享这些关于iptables的问题和相应的答案给那些以后可能会进行相关面试的人。
-
-
-
-所有的问题和相应的答案都基于Nishita Agarwal的记忆并经过了重写。
-
-> “嗨,朋友!我叫**Nishita Agarwal**。我已经取得了理学学士学位,我的专业集中在UNIX和它的变种(BSD,Linux)。它们一直深深的吸引着我。我在存储方面有1年多的经验。我正在寻求职业上的变化,并将供职于印度的Pune公司。”
-
-下面是我在面试中被问到的问题的集合。我已经把我记忆中有关iptables的问题和它们的答案记录了下来。希望这会对您未来的面试有所帮助。
-
-### 1. 你听说过Linux下面的iptables和Firewalld么?知不知道它们是什么,是用来干什么的? ###
-
-> **答案** : iptables和Firewalld我都知道,并且我已经使用iptables好一段时间了。iptables主要由C语言写成,并且以GNU GPL许可证发布。它是从系统管理员的角度写的,最新的稳定版是iptables 1.4.21。iptables通常被认为是类UNIX系统中的防火墙,更准确的说,可以称为iptables/netfilter。管理员通过终端/GUI工具与iptables打交道,来添加和定义防火墙规则到预定义的表中。Netfilter是内核中的一个模块,它执行过滤的任务。
->
-> Firewalld是RHEL/CentOS 7(也许还有其他发行版,但我不太清楚)中最新的过滤规则的实现。它已经取代了iptables接口,并与netfilter相连接。
-
-### 2. 你用过一些iptables的GUI或命令行工具么? ###
-
-> **答案** : 虽然我既用过GUI工具,比如与[Webmin][1]结合的Shorewall;以及直接通过终端访问iptables。但我必须承认通过Linux终端直接访问iptables能给予用户更高级的灵活性、以及对其背后工作更好的理解的能力。GUI适合初级管理员而终端适合有经验的管理员。
-
-### 3. 那么iptables和firewalld的基本区别是什么呢? ###
-
-> **答案** : iptables和firewalld都有着同样的目的(包过滤),但它们使用不同的方式。iptables与firewalld不同,在每次发生更改时都刷新整个规则集。通常iptables配置文件位于‘/etc/sysconfig/iptables‘,而firewalld的配置文件位于‘/etc/firewalld/‘。firewalld的配置文件是一组XML文件。以XML为基础进行配置的firewalld比iptables的配置更加容易,但是两者都可以完成同样的任务。例如,firewalld可以在自己的命令行界面以及基于XML的配置文件下使用iptables。
-
-### 4. 如果有机会的话,你会在你所有的服务器上用firewalld替换iptables么? ###
-
-> **答案** : 我对iptables很熟悉,它也工作的很好。如果没有任何需求需要firewalld的动态特性,那么没有理由把所有的配置都从iptables移动到firewalld。通常情况下,目前为止,我还没有看到iptables造成什么麻烦。IT技术的通用准则也说道“为什么要修一件没有坏的东西呢?”。上面是我自己的想法,但如果组织愿意用firewalld替换iptables的话,我不介意。
-
-### 5. 你看上去对iptables很有信心,巧的是,我们的服务器也在使用iptables。 ###
-
-iptables使用的表有哪些?请简要的描述iptables使用的表以及它们所支持的链。
-
-> **答案** : 谢谢您的赞赏。至于您问的问题,iptables使用的表有四个,它们是:
->
-> Nat 表
-> Mangle 表
-> Filter 表
-> Raw 表
->
-> Nat表 : Nat表主要用于网络地址转换。根据表中的每一条规则修改网络包的IP地址。流中的包仅遍历一遍Nat表。例如,如果一个通过某个接口的包被修饰(修改了IP地址),该流中其余的包将不再遍历这个表。通常不建议在这个表中进行过滤,由NAT表支持的链称为PREROUTING Chain,POSTROUTING Chain和OUTPUT Chain。
->
-> Mangle表 : 正如它的名字一样,这个表用于校正网络包。它用来对特殊的包进行修改。它能够修改不同包的头部和内容。Mangle表不能用于地址伪装。支持的链包括PREROUTING Chain,OUTPUT Chain,Forward Chain,InputChain和POSTROUTING Chain。
->
-> Filter表 : Filter表是iptables中使用的默认表,它用来过滤网络包。如果没有定义任何规则,Filter表则被当作默认的表,并且基于它来过滤。支持的链有INPUT Chain,OUTPUT Chain,FORWARD Chain。
->
-> Raw表 : Raw表在我们想要配置之前被豁免的包时被使用。它支持PREROUTING Chain 和OUTPUT Chain。
-
-### 6. 简要谈谈什么是iptables中的目标值(能被指定为目标),他们有什么用 ###
-
-> **答案** : 下面是在iptables中可以指定为目标的值:
->
-> ACCEPT : 接受包
-> QUEUE : 将包传递到用户空间 (应用程序和驱动所在的地方)
-> DROP : 丢弃包
-> RETURN : 将控制权交回调用的链并且为当前链中的包停止执行下一调规则
-
-### 7. 让我们来谈谈iptables技术方面的东西,我的意思是说实际使用方面 ###
-
-你怎么检测在CentOS中安装iptables时需要的iptables的rpm?
-
-> **答案** : iptables已经被默认安装在CentOS中,我们不需要单独安装它。但可以这样检测rpm:
->
-> # rpm -qa iptables
->
-> iptables-1.4.21-13.el7.x86_64
->
-> 如果您需要安装它,您可以用yum来安装。
->
-> # yum install iptables-services
-
-### 8. 怎样检测并且确保iptables服务正在运行? ###
-
-> **答案** : 您可以在终端中运行下面的命令来检测iptables的状态。
->
-> # service status iptables [On CentOS 6/5]
-> # systemctl status iptables [On CentOS 7]
->
-> 如果iptables没有在运行,可以使用下面的语句
->
-> ---------------- 在CentOS 6/5下 ----------------
-> # chkconfig --level 35 iptables on
-> # service iptables start
->
-> ---------------- 在CentOS 7下 ----------------
-> # systemctl enable iptables
-> # systemctl start iptables
->
-> 我们还可以检测iptables的模块是否被加载:
->
-> # lsmod | grep ip_tables
-
-### 9. 你怎么检查iptables中当前定义的规则呢? ###
-
-> **答案** : 当前的规则可以简单的用下面的命令查看:
->
-> # iptables -L
->
-> 示例输出
->
-> Chain INPUT (policy ACCEPT)
-> target prot opt source destination
-> ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
-> ACCEPT icmp -- anywhere anywhere
-> ACCEPT all -- anywhere anywhere
-> ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
-> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
->
-> Chain FORWARD (policy ACCEPT)
-> target prot opt source destination
-> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
->
-> Chain OUTPUT (policy ACCEPT)
-> target prot opt source destination
-
-### 10. 你怎样刷新所有的iptables规则或者特定的链呢? ###
-
-> **答案** : 您可以使用下面的命令来刷新一个特定的链。
->
-> # iptables --flush OUTPUT
->
-> 要刷新所有的规则,可以用:
->
-> # iptables --flush
-
-### 11. 请在iptables中添加一条规则,接受所有从一个信任的IP地址(例如,192.168.0.7)过来的包。 ###
-
-> **答案** : 上面的场景可以通过运行下面的命令来完成。
->
-> # iptables -A INPUT -s 192.168.0.7 -j ACCEPT
->
-> 我们还可以在源IP中使用标准的斜线和子网掩码:
->
-> # iptables -A INPUT -s 192.168.0.7/24 -j ACCEPT
-> # iptables -A INPUT -s 192.168.0.7/255.255.255.0 -j ACCEPT
-
-### 12. 怎样在iptables中添加规则以ACCEPT,REJECT,DENY和DROP ssh的服务? ###
-
-> **答案** : 但愿ssh运行在22端口,那也是ssh的默认端口,我们可以在iptables中添加规则来ACCEPT ssh的tcp包(在22号端口上)。
->
-> # iptables -A INPUT -s -p tcp --dport 22 -j ACCEPT
->
-> REJECT ssh服务(22号端口)的tcp包。
->
-> # iptables -A INPUT -s -p tcp --dport 22 -j REJECT
->
-> DENY ssh服务(22号端口)的tcp包。
->
->
-> # iptables -A INPUT -s -p tcp --dport 22 -j DENY
->
-> DROP ssh服务(22号端口)的tcp包。
->
->
-> # iptables -A INPUT -s -p tcp --dport 22 -j DROP
-
-### 13. 让我给你另一个场景,假如有一台电脑的本地IP地址是192.168.0.6。你需要封锁在21、22、23和80号端口上的连接,你会怎么做? ###
-
-> **答案** : 这时,我所需要的就是在iptables中使用‘multiport‘选项,并将要封锁的端口号跟在它后面。上面的场景可以用下面的一条语句搞定:
->
-> # iptables -A INPUT -s 192.168.0.6 -p tcp -m multiport --dport 22,23,80,8080 -j DROP
->
-> 可以用下面的语句查看写入的规则。
->
-> # iptables -L
->
-> Chain INPUT (policy ACCEPT)
-> target prot opt source destination
-> ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
-> ACCEPT icmp -- anywhere anywhere
-> ACCEPT all -- anywhere anywhere
-> ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
-> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
-> DROP tcp -- 192.168.0.6 anywhere multiport dports ssh,telnet,http,webcache
->
-> Chain FORWARD (policy ACCEPT)
-> target prot opt source destination
-> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
->
-> Chain OUTPUT (policy ACCEPT)
-> target prot opt source destination
-
-**面试官** : 好了,我问的就是这些。你是一个很有价值的雇员,我们不会错过你的。我将会向HR推荐你的名字。如果你有什么问题,请问我。
-
-作为一个候选人我不愿不断的问将来要做的项目的事以及公司里其他的事,这样会打断愉快的对话。更不用说HR轮会不会比较难,总之,我获得了机会。
-
-同时我要感谢Avishek和Ravi(我的朋友)花时间帮我整理我的面试。
-
-朋友!如果您有过类似的面试,并且愿意与数百万Tecmint读者一起分享您的面试经历,请将您的问题和答案发送到admin@tecmint.com。
-
-谢谢!保持联系。如果我能更好的回答我上面的问题的话,请记得告诉我。
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/linux-firewall-iptables-interview-questions-and-answers/
-
-作者:[Avishek Kumar][a]
-译者:[wwy-hust](https://github.com/wwy-hust)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/avishek/
-[1]:http://www.tecmint.com/install-webmin-web-based-system-administration-tool-for-rhel-centos-fedora/
diff --git a/translated/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md b/translated/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md
deleted file mode 100644
index 5057c2e416..0000000000
--- a/translated/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md
+++ /dev/null
@@ -1,239 +0,0 @@
-在RHEL/CentOS 7.0中安装LAMP(Linux、 Apache、 MariaDB、 PHP/PhpMyAdmin)
-================================================================================
-跳过LAMP的介绍因为我认为你们大多数已经知道了。这个教程会集中在如何在升级到Apache 2.4的 Red Hat Enterprise Linux 7.0 和 CentOS 7.0中安装和配置LAMP-Linux Apache、 MariaDB、 PHP、PhpMyAdmin。
-
-
-
-在RHEL/CentOS 7.0中安装LAMP
-
-#### 要求 ####
-
-根据使用的发行版,RHEL 或者 CentOS 7.0使用下面的链接来执行最小的系统安装,网络使用静态ip
-
-**对于RHEL 7.0**
-
-- [RHEL 7.0安装过程][1]
-- [在RHEL 7.0中注册和启用订阅仓库][2]
-
-**对于 CentOS 7.0**
-
-- [CentOS 7.0 安装过程][3]
-
-### 第一步: 使用基本配置安装apache ###
-
-**1. 在执行最小系统安装并配置[在RHEL/CentOS 7.0中配置静态ip][4]**就可以从使用下面的命令从官方仓库安装最新的Apache 2.4 httpd服务。
-
- # yum install httpd
-
-
-
-安装apache服务
-
-**2. 安装安城后,使用下面的命令来管理apache守护进程,因为RHEL and CentOS 7.0都将init脚本从SysV升级到了systemd - 你也可以同事使用SysV和Apache脚本来管理服务。**
-
- # systemctl status|start|stop|restart|reload httpd
-
- 或者
-
- # service httpd status|start|stop|restart|reload
-
- 或者
-
- # apachectl configtest| graceful
-
-
-
-启动apache服务
-
-**3. 下一步使用systemd初始化脚本来启动apache服务并用firewall-cmd打开RHEL/CentOS 7.0防火墙规则, 这是通过firewalld守护进程管理iptables的默认命令。**
-
- # firewall-cmd --add-service=http
-
-**注意**:上面的命令会在系统重启或者firewalld服务重启后失效,因为它是即时的规则,它不会永久生效。要使iptables规则在fiewwall中持久化,使用-permanent选项并重启firewalld服务来生效。
-
- # firewall-cmd --permanent --add-service=http
- # systemctl restart firewalld
-
-
-
-在CentOS 7中启用Firewall
-
-下面是firewalld其他的重要选项:
-
- # firewall-cmd --state
- # firewall-cmd --list-all
- # firewall-cmd --list-interfaces
- # firewall-cmd --get-service
- # firewall-cmd --query-service service_name
- # firewall-cmd --add-port=8080/tcp
-
-**4. 要验证apache的功能,打开一个远程浏览器并使用http协议输入你服务器的ip地址(http://server_IP), 应该会显示下图中的默认页面。**
-
-
-
-Apache默认页
-
-**5. 现在apache的根地址在/var/www/html,该目录中没有提供任何index文件。如果你想要看见根目录下的文件夹列表,打开apache欢迎配置文件并设置 下Indexes前的状态从-到+,下面的截图就是一个例子。**
-
- # nano /etc/httpd/conf.d/welcome.conf
-
-
-
-Apache目录列出
-
-**6. 关闭文件,重启apache服务来使设置生效,重载页面来看最终效果。**
-
- # systemctl restart httpd
-
-
-
-Apache Index 文件
-
-### 第二步: 为Apache安装php5支持 ###
-
-
-**7. 在为apache安装php支持之前,使用下面的命令的得到所有可用的php模块和扩展。**
-
- # yum search php
-
-
-
-在
-
-**8. Depending on what type of applications you want to use, install the required PHP modules from the above list, but for a basic MariaDB support in PHP and PhpMyAdmin you need to install the following modules.**
-
- # yum install php php-mysql php-pdo php-gd php-mbstring
-
-
-
-Install PHP Modules
-
-
-
-Install PHP mbstring Module
-
-**9. To get a full information list on PHP from your browser, create a info.php file on Apache Document Root using the following command from root account, restart httpd service and direct your browser to the http://server_IP/info.php address.**
-
- # echo "" > /var/www/html/info.php
- # systemctl restart httpd
-
-
-
-Check PHP Info in CentOS 7
-
-**10. If you get an error on PHP Date and Timezone, open php.ini configuration file, search and uncomment date.timezone statement, append your physical location and restart Apache daemon.**
-
- # nano /etc/php.ini
-
-Locate and change date.timezone line to look like this, using [PHP Supported Timezones list][5].
-
- date.timezone = Continent/City
-
-
-
-Set Timezone in PHP
-
-### Step 3: Install and Configure MariaDB Database ###
-
-**11. Red Hat Enterprise Linux/CentOS 7.0 switched from MySQL to MariaDB for its default database management system. To install MariaDB database use the following command.**
-
- # yum install mariadb-server mariadb
-
-
-
-在CentOS 7中安装PHP
-
-***12. 安装MariaDB后,开启数据库守护进程并使用mysql_secure_installation脚本来保护数据库(设置root密码、禁止远程root登录、移除测试数据库、移除匿名用户)**
-
- # systemctl start mariadb
- # mysql_secure_installation
-
-
-
-启动MariaDB数据库
-
-
-
-MySQL安全设置
-
-**13. 要测试数据库功能,使用root账户登录MariaDB并用quit退出。**
-
- mysql -u root -p
- MariaDB > SHOW VARIABLES;
- MariaDB > quit
-
-
-
-连接MySQL数据库
-
-### 第四步: 安装PhpMyAdmin ###
-
-**14. RHEL 7.0 或者 CentOS 7.0仓库默认没有提供PhpMyAdmin二进制安装包。如果你不适应使用MySQL命令行来管理你的数据库,你可以通过下面的命令启用CentOS 7.0 rpmforge仓库来安装PhpMyAdmin。**
-
- # yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
-
-启用rpmforge仓库后,下面安装PhpMyAdmin。
-
- # yum install phpmyadmin
-
-
-
-启用RPMForge仓库
-
-**15. 下面配置PhpMyAdmin的phpmyadmin.conf来允许远程连接,它位于Apache conf.d目录下,并注释掉下面的行。**
-
- # nano /etc/httpd/conf.d/phpmyadmin.conf
-
-使用#来注释掉行。
-
- # Order Deny,Allow
- # Deny from all
- # Allow from 127.0.0.1
-
-
-
-允许远程PhpMyAdmin访问
-
-**16. 要使用cookie验证来登录PhpMyAdmin,像下面的截图那样使用[生成字符串][6]添加一个blowfish字符串到config.inc.php文件下,重启apache服务并打开URL:http://server_IP/phpmyadmin/。**
-
- # nano /etc/httpd/conf.d/phpmyadmin.conf
- # systemctl restart httpd
-
-
-
-在PhpMyAdmin中添加Blowfish
-
-
-
-PhpMyAdmin面板
-
-### 第五步: 系统范围启用LAMP ###
-
-**17. 如果你需要在重启后自动运行MariaDB和Apache服务,你需要系统级地启用它们。**
-
- # systemctl enable mariadb
- # systemctl enable httpd
-
-
-
-系统级启用服务
-
-这就是在Red Hat Enterprise 7.0或者CentOS 7.0中安装LAMP的过程。CentOS/RHEL 7.0上关于LAMP洗系列文章将会讨论在Apache中创建虚拟主机,生成SSL证书、密钥和添加SSL事物支持。
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/install-lamp-in-centos-7/
-
-作者:[Matei Cezar][a]
-译者:[geekpi](https://github.com/geekpi)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/cezarmatei/
-[1]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/
-[2]:http://www.tecmint.com/enable-redhat-subscription-reposiories-and-updates-for-rhel-7/
-[3]:http://www.tecmint.com/centos-7-installation/
-[4]:http://www.tecmint.com/configure-network-interface-in-rhel-centos-7-0/
-[5]:http://php.net/manual/en/timezones.php
-[6]:http://www.question-defense.com/tools/phpmyadmin-blowfish-secret-generator
diff --git a/translated/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md b/translated/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md
deleted file mode 100644
index fac7fa2e1b..0000000000
--- a/translated/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md
+++ /dev/null
@@ -1,177 +0,0 @@
-LINUX 101: 让你的 SHELL 更强大
-================================================================================
-> 在我们的有关 shell 基础的指导下, 得到一个更灵活,功能更强大且多彩的命令行界面
-
-**为何要这样做?**
-
-- 使得在 shell 提示符下过得更轻松,高效
-- 在失去连接后恢复先前的会话
-- Stop pushing around that fiddly rodent! (注: 我不知道这句该如何翻译)
-
-
-
-Here’s our souped-up prompt on steroids.(注: 我不知道该如何翻译这句)对于这个细小的终端窗口来说,这或许有些长.但你可以根据你的喜好来调整它的大小.
-
-作为一个 Linux 用户, 对 shell (又名为命令行),你可能会熟悉. 或许你需要时不时的打开终端来完成那些不能在 GUI 下处理的必要任务,抑或是因为你处在一个平铺窗口管理器的环境中, 而 shell 是你与你的 linux 机器交互的主要方式.
-
-在上面的任一情况下,你可能正在使用你所使用的发行版本自带的 Bash 配置. 尽管对于大多数的任务而言,它足够强大,但它可以更加强大. 在本教程中,我们将向你展示如何使得你的 shell 更具信息性,更加实用且更适于在其中工作. 我们将对提示符进行自定义,让它比默认情况下提供更好的反馈,并向你展示如何使用炫酷的 `tmux` 工具来管理会话并同时运行多个程序. 并且,为了让眼睛舒服一点,我们还将关注配色方案. 接着,就让我们向前吧!
-
-### 让提示符 "唱歌" ###
-
-大多数的发行版本配置有一个非常简单的提示符 – 它们大多向你展示了一些基本信息, 但提示符可以为你提供更多的内容.例如,在 Debian 7 下,默认的提示符是这样的:
-
- mike@somebox:~$
-
-上面的提示符展示出了用户,主机名,当前目录和账户类型符号(假如你切换到 root 账户, **$** 会变为 # ). 那这些信息是在哪里存储的呢? 答案是:在 **PS1** 环境变量中. 假如你键入 **echo $PS1**, 你将会在这个命令的输出字符串的最后有如下的字符:
-
- \u@\h:\w$ (注:这里没有加上斜杠 \,应该是没有转义 ,下面的有些命令也一样,我把 \ 都加上了,发表的时候也得注意一下)
-
-这看起来有一些丑陋,并在瞥见它的第一眼时,你可能会开始尖叫,认为它是令人恐惧的正则表达式,但我们不打算用这些复杂的字符来煎熬我们的大脑. 这不是正则表达式, 这里的斜杠是转义序列,它告诉提示符进行一些特别的处理. 例如,上面的 **u** 部分,告诉提示符展示用户名, 而 w 则展示工作路径.
-
-下面是一些你可以在提示符中用到的字符的列表:
-
-- d 当前的日期.
-- h 主机名.
-- n 代表新的一行的字符.
-- A 当前的时间 (HH:MM).
-- u 当前的用户.
-- w (小写) 整个工作路径的全称.
-- W (大写) 工作路径的简短名称.
-- $ 一个提示符号,对于 root 用户为 # 号.
-- ! 当前命令在 shell 历史记录中的序号.
-
-下面解释 **w** 和 **W** 选项的区别: 对于前者,你将看到你所在的工作路径的完整地址,(例如 **/usr/local/bin**), 而对于后者, 它则只显示 **bin** 这一部分.
-
-现在, 我们该怎样改变提示符呢? 你需要更改 **PS1** 环境变量的内容, 试试下面这个:
-
- export PS1=”I am \u and it is \A $”
-
-现在, 你的提示符将会像下面这样:
-
- I am mike and it is 11:26 $
-
-从这个例子出发, 你就可以按照你的想法来试验一下上面列出的其他转义序列. 但稍等片刻 – 当你登出后,你的这些努力都将消失,因为在你每次打开终端时, **PS1** 环境变量的值都会被重置. 解决这个问题的最简单方式是打开 **.bashrc** 配置文件(在你的家目录下) 并在这个文件的最下方添加上完整的 `export` 命令.在每次你启动一个新的 shell 会话时,这个 **.bashrc** 会被 `Bash` 读取, 所以你的被加强了的提示符就可以一直出现.你还可以使用额外的颜色来装扮提示符.刚开始,这将有点棘手,因为你必须使用一些相当奇怪的转义序列,但结果是非常漂亮的. 将下面的字符添加到你的 **PS1**字符串中的某个位置,最终这将把文本变为红色:
-
- \[\e[31m\]
-
-你可以将这里的 31 更改为其他的数字来获得不同的颜色:
-
-- 30 黑色
-- 32 绿色
-- 33 黄色
-- 34 蓝色
-- 35 洋红色
-- 36 青色
-- 37 白色
-
-所以,让我们使用先前看到的转义序列和颜色来创造一个提示符,以此来结束这一小节的内容. 深吸一口气,弯曲你的手指,然后键入下面这只"野兽":
-
- export PS1="(\!) \[\e[31m\] \[\A\] \[\e[32m\]\u@\h \[\e[34m\]\w \[\e[30m\]$"
-
-上面的命令提供了一个 Bash 命令历史序号, 当前的时间,用户或主机名与颜色之间的组合,以及工作路径.假如你"野心勃勃",利用一些惊人的组合,你还可以更改提示符的背景色和前景色.先前实用的 Arch wiki 有一个关于颜色代码的完整列表:[http://tinyurl.com/3gvz4ec][1].
-
-> ### Shell 精要 ###
->
-> 假如你是一个彻底的 Linux 新手并第一次阅读这份杂志,或许你会发觉阅读这些教程有些吃力. 所以这里有一些基础知识来让你熟悉一些 shell. 通常在你的菜单中, shell 指的是 Terminal, XTerm 或 Konsole, 但你启动它后, 最为实用的命令有这些:
->
-> **ls** (列出文件名); **cp one.txt two.txt** (复制文件); **rm file.txt** (移除文件); **mv old.txt new.txt** (移动或重命名文件);
->
-> **cd /some/directory** (改变目录); **cd ..** (回到上级目录); **./program** (在当前目录下运行一个程序); **ls > list.txt** (重定向输出到一个文件).
->
-> 几乎每个命令都有一个手册页用来解释其选项(例如 **man ls** – 按 Q 来退出).在那里,你可以知晓命令的选项,这样你就知道 **ls -la** 展示一个详细的列表,其中也列出了隐藏文件, 并且在键入一个文件或目录的名字的一部分后, 可以使用 Tab 键来自动补全.
-
-### Tmux: 针对 shell 的窗口管理器 ###
-
-在文本模式的环境中使用一个窗口管理器 – 这听起来有点不可思议, 是吧? 然而,你应该记得当 Web 浏览器第一次实现分页浏览的时候吧? 在当时, 这是在可用性上的一个重大进步,它减少了桌面任务栏的杂乱无章和繁多的窗口列表. 对于你的浏览器来说,你只需要一个按钮便可以在浏览器中切换到你打开的每个单独网站, 而不是针对每个网站都有一个任务栏或导航图标. 这个功能非常有意义.
-
-若有时你同时运行着几个虚拟终端,你便会遇到相似的情况; 在这些终端之间跳转,或每次在任务栏或窗口列表中找到你所需要的那一个终端,都可能会让你觉得麻烦. 拥有一个文本模式的窗口管理器不仅可以让你像在同一个终端窗口中运行多个 shell 会话,而且你甚至还可以将这些窗口排列在一起.
-
-另外,这样还有另一个好处:可以将这些窗口进行分离和重新连接.想要看看这是如何运行的最好方式是自己尝试一下. 在一个终端窗口中,输入 **screen** (在大多数发行版本中,它被默认安装了或者可以在软件包仓库中找到). 某些欢迎的文字将会出现 – 只需敲击 Enter 键这些文字就会消失. 现在运行一个交互式的文本模式的程序,例如 **nano**, 并关闭这个终端窗口.
-
-在一个正常的 shell 对话中, 关闭窗口将会终止所有在该终端中运行的进程 – 所以刚才的 Nano 编辑对话也就被终止了, 但对于 screen 来说,并不是这样的. 打开一个新的终端并输入如下命令:
-
- screen -r
-
-瞧, 你刚开打开的 Nano 会话又回来了!
-
-当刚才你运行 **screen** 时, 它会创建了一个新的独立的 shell 会话, 它不与某个特定的终端窗口绑定在一起,所以可以在后面被分离并重新连接( 即 **-r** 选项).
-
-当你正使用 SSH 去连接另一台机器并做着某些工作, 但并不想因为一个单独的连接而毁掉你的所有进程时,这个方法尤其有用.假如你在一个 **screen** 会话中做着某些工作,并且你的连接突然中断了(或者你的笔记本没电了,又或者你的电脑报废了),你只需重新连接一个新的电脑或给电脑充电或重新买一台电脑,接着运行 **screen -r** 来重新连接到远程的电脑,并在刚才掉线的地方接着开始.
-
-现在,我们都一直在讨论 GNU 的 **screen**,但这个小节的标题提到的是 tmux. 实质上, **tmux** (terminal multiplexer) 就像是 **screen** 的一个进阶版本,带有许多有用的额外功能,所以现在我们开始关注 tmux. 某些发行版本默认包含了 **tmux**; 在其他的发行版本上,通常只需要一个 **apt-get, yum install** 或 **pacman -S** 命令便可以安装它.
-
-一旦你安装了它过后,键入 **tmux** 来启动它.接着你将注意到,在终端窗口的底部有一条绿色的信息栏,它非常像传统的窗口管理器中的任务栏: 上面显示着一个运行着的程序的列表,机器的主机名,当前时间和日期. 现在运行一个程序,又以 Nano 为例, 敲击 Ctrl+B 后接着按 C 键, 这将在 tmux 会话中创建一个新的窗口,你便可以在终端的底部的任务栏中看到如下的信息:
-
- 0:nano- 1:bash*
-
-每一个窗口都有一个数字,当前呈现的程序被一个星号所标记. Ctrl+B 是与 tmux 交互的标准方式, 所以若你敲击这个按键组合并带上一个窗口序号, 那么就会切换到对应的那个窗口.你也可以使用 Ctrl+B 再加上 N 或 P 来分别切换到下一个或上一个窗口 – 或者使用 Ctrl+B 加上 L 来在最近使用的两个窗口之间来进行切换(有点类似于桌面中的经典的 Alt+Tab 组合键的效果). 若需要知道窗口列表,使用 Ctrl+B 再加上 W.
-
-目前为止,一切都还好:现在你可以在一个单独的终端窗口中运行多个程序,避免混乱(尤其是当你经常与同一个远程主机保持多个 SSH 连接时.). 当想同时看两个程序又该怎么办呢?
-
-针对这种情况, 可以使用 tmux 中的窗格. 敲击 Ctrl+B 再加上 % , 则当前窗口将分为两个部分,一个在左一个在右.你可以使用 Ctrl+B 再加上 O 来在这两个部分之间切换. 这尤其在你想同时看两个东西时非常实用, – 例如一个窗格看指导手册,另一个窗格里用编辑器看一个配置文件.
-
-有时,你想对一个单独的窗格进行缩放,而这需要一定的技巧. 首先你需要敲击 Ctrl+B 再加上一个 :(分号),这将使得位于底部的 tmux 栏变为深橙色. 现在,你进入了命令模式,在这里你可以输入命令来操作 tmux. 输入 **resize-pane -R** 来使当前窗格向右移动一个字符的间距, 或使用 **-L** 来向左移动. 对于一个简单的操作,这些命令似乎有些长,但请注意,在 tmux 的命令模式(以前面提到的一个分号开始的模式)下,可以使用 Tab 键来补全命令. 另外需要提及的是, **tmux** 同样也有一个命令历史记录,所以若你想重复刚才的缩放操作,可以先敲击 Ctrl+B 再跟上一个分号并使用向上的箭头来取回刚才输入的命令.
-
-最后,让我们看一下分离和重新连接 - 即我们刚才介绍的 screen 的特色功能. 在 tmux 中,敲击 Ctrl+B 再加上 D 来从当前的终端窗口中分离当前的 tmux 会话, 这使得这个会话的一切工作都在后台中运行.使用 **tmux a** 可以再重新连接到刚才的会话. 但若你同时有多个 tmux 会话在运行时,又该怎么办呢? 我们可以使用下面的命令来列出它们:
-
- tmux ls
-
-这个命令将为每个会话分配一个序号; 假如你想重新连接到会话 1, 可以使用 `tmux a -t 1`. tmux 是可以高度定制的,你可以自定义按键绑定并更改配色方案, 所以一旦你适应了它的主要功能,请钻研指导手册以了解更多的内容.
-
-tmux: 一个针对 shell 的窗口管理器
-
-
-
-上图中, tmux 开启了两个窗格: 左边是 Vim 正在编辑一个配置文件,而右边则展示着指导手册页.
-
-> ### Zsh: 另一个 shell ###
->
-> 选择是好的,但标准同样重要. 你要知道几乎每个主流的 Linux 发行版本都默认使用 Bash shell – 尽管还存在其他的 shell. Bash 为你提供了一个 shell 能够给你提供的几乎任何功能,包括命令历史记录,文件名补全和许多脚本编程的能力.它成熟,可靠并文档丰富 – 但它不是你唯一的选择.
->
-> 许多高级用户热衷于 Zsh, 即 Z shell. 这是 Bash 的一个替代品并提供了 Bash 的几乎所有功能,令外还提供了一些额外的功能. 例如, 在 Zsh 中,你输入 **ls** - 并敲击 Tab 键可以得到 **ls** 可用的各种不同选项的一个大致描述. 而不需要再打开 man page 了!
->
-> Zsh 还支持其他强大的自动补全功能: 例如,输入 **cd /u/lo/bi** 再敲击 Tab 键, 则完整的路径名 **/usr/local/bin** 就会出现(这里假设没有其他的路径包含 **u**, **lo** 和 **bi** 等字符.). 或者只输入 **cd** 再跟上 Tab 键,则你将看到着色后的路径名的列表 – 这比 Bash 给出的简单的结果好看得多.
->
-> Zsh 在大多数的主要发行版本上都可以得到; 安装它后并输入 **zsh** 便可启动它. 要将你的默认 shell 从 Bash 改为 Zsh, 可以使用 **chsh** 命令. 若需了解更多的信息,请访问 [www.zsh.org][2].
-
-### "未来" 的终端 ###
-
-你或许会好奇为什么包含你的命令行提示符的应用被叫做终端. 这需要追溯到 Unix 的早期, 那时人们一般工作在一个多用户的机器上,这个巨大的电脑主机将占据一座建筑中的一个房间, 人们在某些线路的配合下,使用屏幕和键盘来连接到这个主机, 这些终端机通常被称为 "哑终端", 因为它们不能靠自己做任何重要的执行任务 – 它们只展示通过线路从主机传来的信息,并输送回从键盘的敲击中得到的输入信息.
-
-今天,几乎所有的我们在自己的机器上执行实际的操作,所以我们的电脑不是传统意义下的终端, 这就是为什么诸如 **XTerm**, Gnome Terminal, Konsole 等程序被称为 "终端模拟器" 的原因 – 他们提供了同昔日的物理终端一样的功能.事实上,在许多方面它们并没有改变多少.诚然,现在我们有了反锯齿字体,更好的颜色和点击网址的能力,但总的来说,几十年来我们一直以同样的方式在工作.
-
-所以某些程序员正尝试改变这个状况. **Terminology** ([http://tinyurl.com/osopjv9][3]), 它来自于超级时髦的 Enlightenment 窗口管理器背后的团队,旨在将终端引入 21 世纪,例如带有在线媒体显示功能.你可以在一个充满图片的目录里输入 **ls** 命令,便可以看到它们的缩略图,或甚至可以直接在你的终端里播放视频. 这使得一个终端有点类似于一个文件管理器,意味着你可以快速地检查媒体文件的内容而不必用另一个应用来打开它们.
-
-接着还有 Xiki ([www.xiki.org][4]),它自身的描述为 "命令的革新".它就像是一个传统的 shell, 一个 GUI 和一个 wiki 之间的过渡; 你可以在任何地方输入命令,并在后面将它们的输出存储为笔记以作为参考,并可以创建非常强大的自定义命令.用几句话是很能描述它的,所以作者们已经创作了一个视频来展示它的潜力是多么的巨大(请看 **Xiki** 网站的截屏视频部分).
-
-并且 Xiki 绝不是那种在几个月之内就消亡的昙花一现的项目,作者们成功地进行了一次 Kickstarter 众筹,在七月底已募集到超过 $84,000. 是的,你没有看错 – $84K 来支持一个终端模拟器.这可能是最不寻常的集资活动,因为某些疯狂的家伙已经决定开始创办它们自己的 Linux 杂志 ......
-
-### 下一代终端 ###
-
-许多命令行和基于文本的程序在功能上与它们的 GUI 程序是相同的,并且常常更加快速和高效. 我们的推荐有:
-**Irssi** (IRC 客户端); **Mutt** (mail 客户端); **rTorrent** (BitTorrent); **Ranger** (文件管理器); **htop** (进程监视器). 若给定在终端的限制下来进行 Web 浏览, Elinks 确实做的很好,并且对于阅读那些以文字为主的网站例如 Wikipedia 来说,它非常实用.
-
-> ### 微调配色方案 ###
->
-> 在 Linux Voice 中,我们并不迷恋养眼的东西,但当你每天花费几个小时盯着屏幕看东西时,我们确实认识到美学的重要性.我们中的许多人都喜欢调整我们的桌面和窗口管理器来达到完美的效果,调整阴影效果,摆弄不同的配色方案,直到我们 100% 的满意.(然后出于习惯,摆弄更多的东西.)
->
-> 但我们倾向于忽视终端窗口,它理应也获得我们的喜爱, 并且在 [http://ciembor.github.io/4bit][5] 你将看到一个极其棒的配色方案设计器,对于所有受欢迎的终端模拟器(**XTerm, Gnome Terminal, Konsole and Xfce4 Terminal are among the apps supported.**),它可以色设定.移动滑动条直到你看到配色方案 norvana, 然后点击位于该页面右上角的 `得到方案` 按钮.
->
-> 相似的,假如你在一个文本编辑器,如 Vim 或 Emacs 上花费很多的时间,使用一个精心设计的调色板也是非常值得的. **Solarized at** [http://ethanschoonover.com/solarized][6] 是一个卓越的方案,它不仅漂亮,而且因追求最大的可用性而设计,在其背后有着大量的研究和测试.
---------------------------------------------------------------------------------
-
-via: http://www.linuxvoice.com/linux-101-power-up-your-shell-8/
-
-作者:[Ben Everard][a]
-译者:[FSSlc](https://github.com/FSSlc)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.linuxvoice.com/author/ben_everard/
-[1]:http://tinyurl.com/3gvz4ec
-[2]:http://www.zsh.org/
-[3]:http://tinyurl.com/osopjv9
-[4]:http://www.xiki.org/
-[5]:http://ciembor.github.io/4bit
-[6]:http://ethanschoonover.com/solarized
\ No newline at end of file
diff --git a/translated/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md b/translated/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md
new file mode 100644
index 0000000000..f8d78c88f9
--- /dev/null
+++ b/translated/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md
@@ -0,0 +1,296 @@
+如何在 FreeBSD 10.2 上安装使用 Nginx 的 Ghost
+================================================================================
+Node.js 是用于开发服务器端应用程序的开源运行时环境。Node.js 应用使用 JavaScript 编写,能在任何有 Node.js 运行时的服务器上运行。它跨平台支持 Linux、Windows、OSX、IBM AIX,也包括 FreeBSD。Node.js 是 Ryan Dahl 以及在 Joyent 工作的其他开发者于 2009 年创建的。它的设计目标就是构建可扩展的网络应用程序。
+
+Ghost 是使用 Node.js 编写的博客平台。它不仅开源,而且有很漂亮的界面设计、对用户友好并且免费。它允许你快速地在网络上发布内容,或者创建你的混合网站。
+
+在这篇指南中我们会在 FreeBSD 上安装使用 Nginx 作为 web 服务器的 Ghost。我们会在 FreeBSD 10.2 上安装 Node.js、Npm、nginx 和 sqlite3。
+
+### 第一步 - 安装 Node.js npm 和 Sqlite3 ###
+
+如果你想在你的服务器上运行 ghost,你必须安装 node.js。在这一部分,我们会从 freebsd 移植软件库中安装 node.js,请进入库目录 "/usr/ports/www/node" 并通过运行命令 "**make**" 安装。
+
+ cd /usr/ports/www/node
+ make install clean
+
+如果你已经安装了 node.js,那就进入到 npm 目录并安装它。**npm** 是用于安装、发布和管理 node 程序的软件包管理器。
+
+ cd /usr/ports/www/npm/
+ make install clean
+
+下一步,安装 sqlite3。默认情况下 ghost 使用 sqlite3 作为数据库系统,但它也支持 mysql/mariadb 和 postgresql。我们会使用 sqlite3 作为默认数据库。
+
+ cd /usr/ports/databases/sqlite3/
+ make install clean
+
+如果安装完了所有软件,还有检查 node.js 和 npm 的版本:
+
+ node --version
+ v0.12.6
+
+ npm --version
+ 2.11.3
+
+ sqlite3 --version
+ 3.8.10.2
+
+
+
+### 第二步 - 添加 Ghost 用户 ###
+
+我们会以普通用户 "**ghost**" 身份安装和运行 ghost。用 "adduser" 命令添加新用户:
+
+ adduser ghost
+ FILL With Your INFO
+
+
+
+### 第三步 - 安装 Ghost ###
+
+我们会把 ghost 安装到 "**/var/www/**" 目录,首先新建目录然后进入到安装目录:
+
+ mkdir -p /var/www/
+ cd /var/www/
+
+用 wget 命令下载最新版本的 ghost:
+
+ wget --no-check-certificate https://ghost.org/zip/ghost-latest.zip
+
+把它解压到 "**ghost**" 目录:
+
+ unzip -d ghost ghost-latest.zip
+
+下一步,更改属主为 "**ghost**",我们会以这个用户安装和运行它。
+
+ chown -R ghost:ghost ghost/
+
+都做完了的话,通过输入以下命令切换到 "**ghost**" 用户:
+
+ su - ghost
+
+然后进入到安装目录"/var/www/ghost/":
+
+ cd /var/www/ghost/
+
+在安装 ghost 之前,我们需要为 node.js 安装 sqlite3 模块,用 npm 命令安装:
+
+ setenv CXX c++ ; npm install sqlite3 --sqlite=/usr/local
+
+**注意: 以 “ghost” 用户运行,而不是 root 用户。**
+
+现在,我们准备好安装 ghost 了,用 npm 命令安装:
+
+ npm install --production
+
+下一步,复制配置文件 "config.example.js" 为 "**config.js**",用 nano 编辑器编辑:
+
+ cp config.example.js config.js
+ nano -c config.js
+
+更改 server 模块的第 25 行:
+
+ host: '0.0.0.0',
+
+保存并退出。
+
+现在用下面的命令运行 ghost:
+
+ npm start --production
+
+通过访问服务器 ip 和 2368 号端口验证。
+
+
+
+以 “ghost” 用户在 "/var/www/ghost" 目录安装了 ghost。
+
+### 第四步 - 作为 FreeBSD 服务运行 Ghost ###
+
+要在 freebsd 上以服务形式运行应用,你需要在 rc.d 目录添加脚本。我们会在 "**/usr/local/etc/rc.d/**" 目录为 ghost 创建新的服务脚本。
+
+在创建服务脚本之前,为了以服务形式运行 ghost,我们需要安装一个 node.js 模块,用 npm 命令以 **sudo/root** 权限安装 forever 模块:
+
+ npm install forever -g
+
+现在进入到 rc.d 目录并创建名为 ghost 的新文件:
+
+ cd /usr/local/etc/rc.d/
+ nano -c ghost
+
+粘贴下面的服务脚本:
+
+ #!/bin/sh
+
+ # PROVIDE: ghost
+ # KEYWORD: shutdown
+ PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
+
+ . /etc/rc.subr
+
+ name="ghost"
+ rcvar="ghost_enable"
+ extra_commands="status"
+
+ load_rc_config ghost
+ : ${ghost_enable:="NO"}
+
+ status_cmd="ghost_status"
+ start_cmd="ghost_start"
+ stop_cmd="ghost_stop"
+ restart_cmd="ghost_restart"
+
+ ghost="/var/www/ghost"
+ log="/var/log/ghost/ghost.log"
+ ghost_start() {
+ sudo -u ghost sh -c "cd $ghost && NODE_ENV=production forever start -al $log index.js"
+ }
+
+ ghost_stop() {
+ sudo -u ghost sh -c "cd $ghost && NODE_ENV=production forever stop index.js"
+ }
+
+ ghost_status() {
+ sudo -u ghost sh -c "NODE_ENV=production forever list"
+ }
+
+ ghost_restart() {
+ ghost_stop;
+ ghost_start;
+ }
+
+ run_rc_command "$1"
+
+保存并退出。
+
+下一步,给 ghost 服务脚本添加可执行权限:
+
+ chmod +x ghost
+
+为 ghost 日志创建新的目录和文件,并把属主修改为 ghost 用户:
+
+ mkdir -p /var/www/ghost/
+ touch /var/www/ghost/ghost.log
+ chown -R /var/www/ghost/
+
+最后,如果你想运行 ghost 服务,你需要用 sysrc 命令添加 ghost 服务到开机启动应用程序:
+
+ sysrc ghost_enable=yes
+
+用以下命令启动 ghost:
+
+ service ghost start
+
+其它命令:
+
+ service ghost stop
+ service ghost status
+ service ghost restart
+
+
+
+### 第五步 - 为 Ghost 安装和配置 Nginx ###
+
+默认情况下,ghost 会以单机模式运行,你可以不用 Nginx、apache 或 IIS web 服务器直接运行它。但在这篇指南中我们会安装和配置 nginx 和 ghost 一起使用。
+
+用 pkg 命令从 freebsd 库中安装 nginx:
+
+ pkg install nginx
+
+下一步,进入 nginx 配置目录并为 virtualhost 配置创建新的目录。
+
+ cd /usr/local/etc/nginx/
+ mkdir virtualhost/
+
+进入 virtualhost 目录,用 nano 编辑器创建名为 ghost.conf 的新文件:
+
+ cd virtualhost/
+ nano -c ghost.conf
+
+粘贴下面的 virtualhost 配置:
+
+ server {
+ listen 80;
+
+ #Your Domain
+ server_name ghost.me;
+
+ location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|woff)$ {
+ access_log off;
+ expires 30d;
+ add_header Pragma public;
+ add_header Cache-Control "public, mustrevalidate, proxy-revalidate";
+ proxy_pass http://127.0.0.1:2368;
+ }
+
+ location / {
+ add_header X-XSS-Protection "1; mode=block";
+ add_header Cache-Control "public, max-age=0";
+ add_header Content-Security-Policy "script-src 'self' ; font-src 'self' ; connect-src 'self' ; block-all-mixed-content; reflected-xss block; referrer no-referrer";
+ add_header X-Content-Type-Options nosniff;
+ add_header X-Frame-Options DENY;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_pass http://127.0.0.1:2368;
+ }
+
+ location = /robots.txt { access_log off; log_not_found off; }
+ location = /favicon.ico { access_log off; log_not_found off; }
+
+ location ~ /\.ht {
+ deny all;
+ }
+
+ }
+
+保存并退出。
+
+要启用 virtualhost 配置,你需要把那个文件添加到 **nginx.conf**。进入 nginx 配置目录并编辑 nginx.conf 文件:
+
+ cd /usr/local/etc/nginx/
+ nano -c nginx.conf
+
+在最后一行的前面,包含 virtualhost 配置目录:
+
+ [......]
+
+ include virtualhost/*.conf;
+
+ }
+
+保存并退出。
+
+用命令 "**nginx -t**" 测试 nginx 配置,如果没有错误,用 sysrc 添加 nginx 到开机启动:
+
+ sysrc nginx_enable=yes
+
+并启动 nginx:
+
+ service nginx start
+
+现在测试所有 nginx 和 virtualhost 配置。请打开你的浏览器并输入: ghost.me
+
+
+
+Ghost.me 正在成功运行。
+
+如果你想要检查 nginx 服务器,可以使用 "**curl**" 命令。
+
+
+
+Ghost 正在 nginx 上运行。
+
+### 总结 ###
+
+Node.js 是 Ryan Dahl 为创建和开发可扩展服务器端应用程序创建的运行时环境。Ghost 是使用 node.js 编写的开源博客平台,它有漂亮的外观设计并且易于使用。默认情况下,ghost 是可以单独运行的 web 应用程序,并不需要类似 apache、nginx 或 IIS 之类的 web 服务器,但我们也可以和 web 服务器集成(在这篇指南中使用 Nginx)。Sqlite 是 ghost 默认使用的数据库,它还支持 msql/mariadb 和 postgresql。Ghost 能快速部署并且易于使用和配置。
+
+--------------------------------------------------------------------------------
+
+via: http://linoxide.com/linux-how-to/install-ghost-nginx-freebsd-10-2/
+
+作者:[Arul][a]
+译者:[ictlyh](http://mutouxiaogui.cn/blog/)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://linoxide.com/author/arulm/
\ No newline at end of file
diff --git a/translated/tech/20151028 10 Tips for 10x Application Performance.md b/translated/tech/20151028 10 Tips for 10x Application Performance.md
new file mode 100644
index 0000000000..55cd24bd9a
--- /dev/null
+++ b/translated/tech/20151028 10 Tips for 10x Application Performance.md
@@ -0,0 +1,279 @@
+10 Tips for 10x Application Performance
+
+将程序性能提高十倍的10条建议
+================================================================================
+
+提高web 应用的性能从来没有比现在更关键过。网络经济的比重一直在增长;全球经济超过5% 的价值是在因特网上产生的(数据参见下面的资料)。我们的永远在线、超级连接的世界意味着用户的期望值也处于历史上的最高点。如果你的网站不能及时的响应,或者你的app 不能无延时的工作,用户会很快的投奔到你的竞争对手那里。
+
+举一个例子,一份亚马逊十年前做过的研究可以证明,甚至在那个时候,网页加载时间每减少100毫秒,收入就会增加1%。另一个最近的研究特别强调一个事实,即超过一半的网站拥有着在调查中说他们会因为应用程序性能的问题流失用户。
+
+网站到底需要多块呢?对于页面加载,每增加1秒钟就有4%的用户放弃使用。顶级的电子商务站点的页面在第一次交互时可以做到1秒到3秒加载时间,而这是提供最高舒适度的速度。很明显这种利害关系对于web 应用来说很高,而且在不断的增加。
+
+想要提高效率很简单,但是看到实际结果很难。要在旅途上帮助你,这篇blog 会给你提供10条最高可以10倍的提升网站性能的建议。这是系列介绍提高应用程序性能的第一篇文章,包括测试充分的优化技术和一点NGIX 的帮助。这个系列给出了潜在的提高安全性的帮助。
+
+### Tip #1: 通过反向代理来提高性能和增加安全性 ###
+
+如果你的web 应用运行在单个机器上,那么这个办法会明显的提升性能:只需要添加一个更快的机器,更好的处理器,更多的内存,更快的磁盘阵列,等等。然后新机器就可以更快的运行你的WordPress 服务器, Node.js 程序, Java 程序,以及其它程序。(如果你的程序要访问数据库服务器,那么这个办法还是很简单:添加两个更快的机器,以及在两台电脑之间使用一个更快的链路。)
+
+问题是,机器速度可能并不是问题。web 程序运行慢经常是因为计算机一直在不同的任务之间切换:和用户的成千上万的连接,从磁盘访问文件,运行代码,等等。应用服务器可能会抖动-内存不足,将内存数据写会磁盘,以及多个请求等待一个任务完成,如磁盘I/O。
+
+你可以采取一个完全不同的方案来替代升级硬件:添加一个反向代理服务器来分担部分任务。[反向代理服务器][1] 位于运行应用的机器的前端,是用来处理网络流量的。只有反向代理服务器是直接连接到互联网的;和程序的通讯都是通过一个快速的内部网络完成的。
+
+使用反向代理服务器可以将应用服务器从等待用户与web 程序交互解放出来,这样应用服务器就可以专注于为反向代理服务器构建网页,让其能够传输到互联网上。而应用服务器就不需要在能带客户端的响应,可以运行与接近优化过的性能水平。
+
+添加方向代理服务器还可以给你的web 服务器安装带来灵活性。比如,一个已知类型的服务器已经超载了,那么就可以轻松的添加另一个相同的服务器;如果某个机器宕机了,也可以很容易的被替代。
+
+因为反向代理带来的灵活性,所以方向代理也是一些性能加速功能的必要前提,比如:
+
+- **负载均衡** (参见 [Tip #2][2]) – 负载均衡运行在方向代理服务器上,用来将流量均衡分配给一批应用。有了合适的负载均衡,你就可以在不改变程序的前提下添加应用服务器。
+- **缓存静态文件** (参见 [Tip #3][3]) – 直接读取的文件,比如图像或者代码,可以保存在方向代理服务器,然后直接发给客户端,这样就可以提高速度、分担应用服务器的负载,可以让应用运行的更快
+- **网站安全** – 反响代理服务器可以提高网站安全性,以及快速的发现和响应攻击,保证应用服务器处于被保护状态。
+
+NGINX 软件是一个专门设计的反响代理服务器,也包含了上述的多种功能。NGINX 使用事件驱动的方式处理问题,着回避传统的服务器更加有效率。NGINX plus 天价了更多高级的反向代理特性,比如程序[健康度检查][4],专门用来处理request 路由,高级缓冲和相关支持。
+
+
+
+### Tip #2: 添加负载平衡 ###
+
+添加一个[负载均衡服务器][5] 是一个相当简单的用来提高性能和网站安全性的的方法。使用负载均衡讲流量分配到多个服务器,是用来替代只使用一个巨大且高性能web 服务器的方案。即使程序写的不好,或者在扩容方面有困难,只使用负载均衡服务器就可以很好的提高用户体验。
+
+负载均衡服务器首先是一个反响代理服务器(参见[Tip #1][6])——它接收来自互联网的流量,然后转发请求给另一个服务器。小戏法是负载均衡服务器支持两个或多个应用服务器,使用[分配算法][7]将请求转发给不同服务器。最简单的负载均衡方法是轮转法,只需要将新的请求发给列表里的下一个服务器。其它的方法包括将请求发给负载最小的活动连接。NGINX plus 拥有将特定用户的会话分配给同一个服务器的[能力][8].
+
+负载均衡可以很好的提高性能是因为它可以避免某个服务器过载而另一些服务器却没有流量来处理。它也可以简单的扩展服务器规模,因为你可以添加多个价格相对便宜的服务器并且保证它们被充分利用了。
+
+可以进行负载均衡的协议包括HTTP, HTTPS, SPDY, HTTP/2, WebSocket,[FastCGI][9],SCGI,uwsgi, memcached,以及集中其它的应用类型,包括采用TCP 第4层协议的程序。分析你的web 应用来决定那些你要使用以及那些地方的性能不足。
+
+相同的服务器或服务器群可以被用来进行负载均衡,也可以用来处理其它的任务,如SSL 终止,提供对客户端使用的HTTP/1/x 和 HTTP/2 ,以及缓存静态文件。
+
+NGINX 经常被用来进行负载均衡;要想了解更多的情况可以访问我们的[overview blog post][10], [configuration blog post][11], [ebook][12] 以及相关网站 [webinar][13], 和 [documentation][14]。我们的商业版本 [NGINX Plus][15] 支持更多优化了的负载均衡特性,如基于服务器响应时间的加载路由和Microsoft’s NTLM 协议上的负载均衡。
+
+### Tip #3: 缓存静态和动态的内容 ###
+
+缓存通过加速内容的传输速度来提高web 应用的性能。它可以采用一下集中策略:当需要的时候预处理要传输的内容,保存数据到速度更快的设备,把数据存储在距离客户端更近的位置,或者结合起来使用。
+
+下面要考虑两种不同类型数据的缓冲:
+
+- **静态内容缓存**。不经常变化的文件,比如图像(JPEG,PNG) 和代码(CSS,JavaScript),可以保存在边缘服务器,这样就可以快速的从内存和磁盘上提取。
+- **动态内容缓存**。很多web 应用回针对每个网页请求生成不同的HTML 页面。在短时间内简单的缓存每个生成HTML 内容,就可以很好的减少要生成的内容的数量,这完全可以达到你的要求。
+
+举个例子,如果一个页面每秒会被浏览10次,你将它缓存1 秒,99%请求的页面都会直接从缓存提取。如果你将将数据分成静态内容,甚至新生成的页面可能都是由这些缓存构成的。
+
+下面由是web 应用发明的三种主要的缓存技术:
+
+- **缩短数据与用户的距离**。把一份内容的拷贝放的离用户更近点来减少传输时间。
+- **提高内容服务器的速度**。内容可以保存在一个更快的服务器上来减少提取文件的时间。
+- **从过载服务器拿走数据**。机器经常因为要完成某些其它的任务而造成某个任务的执行速度比测试结果要差。将数据缓存在不同的机器上可以提高缓存资源和非缓存资源的效率,而这知识因为主机没有被过度使用。
+
+对web 应用的缓存机制可以web 应用服务器内部实现。第一,缓存动态内容是用来减少应用服务器加载动态内容的时间。然后,缓存静态内容(包括动态内容的临时拷贝)是为了更进一步的分担应用服务器的负载。而且缓存之后会从应用服务器转移到对用户而言更快、更近的机器,从而减少应用服务器的压力,减少提取数据和传输数据的时间。
+
+改进过的缓存方案可以极大的提高应用的速度。对于大多数网页来说,静态数据,比如大图像文件,构成了超过一半的内容。如果没有缓存,那么这可能会花费几秒的时间来提取和传输这类数据,但是采用了缓存之后不到1秒就可以完成。
+
+举一个在实际中缓存是如何使用的例子, NGINX 和NGINX Plus使用了两条指令来[设置缓存机制][16]:proxy_cache_path 和 proxy_cache。你可以指定缓存的位置和大小,文件在缓存中保存的最长时间和其他一些参数。使用第三条(而且是相当受欢迎的一条)指令,proxy_cache_use_stale,如果服务器提供新鲜内容是忙或者挂掉之类的信息,你甚至可以让缓存提供旧的内容,这样客户端就不会一无所得。从用户的角度来看这可以很好的提高你的网站或者应用的上线时间。
+
+NGINX plus 拥有[高级缓存特性][17],包括对[缓存清除][18]的支持和在[仪表盘][19]上显示缓存状态信息。
+
+要想获得更多关于NGINX 的缓存机制的信息可以浏览NGINX Plus 管理员指南中的 [reference documentation][20] 和 [NGINX Content Caching][21] 。
+
+**注意**:缓存机制分布于应用开发者、投资决策者以及实际的系统运维人员之间。本文提到的一些复杂的缓存机制从[DevOps 的角度][23]来看很具有价值,即对集应用开发者、架构师以及运维操作人员的功能为一体的工程师来说可以满足他们对站点功能性、响应时间、安全性和商业结果,如完成的交易数。
+
+### Tip #4: 压缩数据 ###
+
+压缩是一个具有很大潜力的提高性能的加速方法。现在已经有一些针对照片(JPEG 和PNG)、视频(MPEG-4)和音乐(MP3)等各类文件精心设计和高压缩率的标准。每一个标准都或多或少的减少了文件的大小。
+
+文本数据 —— 包括HTML(包含了纯文本和HTL 标签),CSS和代码,比如Javascript —— 经常是未经压缩就传输的。压缩这类数据会在对应用程序性能的感觉上,特别是处于慢速或受限的移动网络的客户端,产生不成比例的影响。
+
+这是因为文本数据经常是用户与网页交互的有效数据,而多媒体数据可能更多的是起提供支持或者装饰的作用。聪明的内容压缩可以减少HTML,Javascript,CSS和其他文本内容对贷款的要求,通常可以减少30% 甚至更多的带宽和相应的页面加载时间。
+
+如果你是用SSL,压缩可以减少需要进行SSL 编码的的数据量,而这些编码操作会占用一些CPU时间而抵消了压缩数据减少的时间。
+
+压缩文本数据的方法很多,举个例子,在定义小说文本压缩模式的[HTTP/2 部分]就专门为适应头数据。另一个例子是可以在NGINX 里打开使用GZIP 压缩文本。你在你的服务里[预压缩文本数据][25]之后,你就可以直接使用gzip_static 指令来处理压缩过的.gz 版本。
+
+### Tip #5: 优化 SSL/TLS ###
+
+安全套接字([SSL][26]) 协议和它的继承者,传输层安全(TLS)协议正在被越来越多的网站采用。SSL/TLS 对从原始服务器发往用户的数据进行加密提高了网站的安全性。影响这个趋势的部分原因是Google 正在使用SSL/TLS,这在搜索引擎排名上是一个正面的影响因素。
+
+尽管SSL/TLS 越来越流行,但是使用加密对速度的影响也让很多网站望而却步。SSL/TLS 之所以让网站变的更慢,原因有二:
+
+1. 任何一个连接第一次连接时的握手过程都需要传递密钥。而采用HTTP/1.x 协议的浏览器在建立多个连接时会对每个连接重复上述操作。
+2. 数据在传输过程中需要不断的在服务器加密、在客户端解密。
+
+要鼓励使用SSL/TLS,HTTP/2 和SPDY(在[下一章][27]会描述)的作者设计新的协议来让浏览器只需要对一个浏览器会话使用一个连接。这会大大的减少上述两个原因中的一个浪费的时间。然而现在可以用来提高应用程序使用SSL/TLS 传输数据的性能的方法不止这些。
+
+web 服务器有对应的机制优化SSL/TLS 传输。举个例子,NGINX 使用[OpenSSL][28]运行在普通的硬件上提供接近专用硬件的传输性能。NGINX [SSL 性能][29] 有详细的文档,而且把对SSL/TLS 数据进行加解密的时间和CPU 占用率降低了很多。
+
+更进一步,在这篇[blog][30]有详细的说明如何提高SSL/TLS 性能,可以总结为一下几点:
+
+- **会话缓冲**。使用指令[ssl_session_cache][31]可以缓存每个新的SSL/TLS 连接使用的参数。
+- **会话票据或者ID**。把SSL/TLS 的信息保存在一个票据或者ID 里可以流畅的复用而不需要重新握手。
+- **OCSP 分割**。通过缓存SSL/TLS 证书信息来减少握手时间。
+
+NGINX 和NGINX Plus 可以被用作SSL/TLS 终结——处理客户端流量的加密和解密,而同时和其他服务器进行明文通信。使用[这几步][32] 来设置NGINX 和NGINX Plus 处理SSL/TLS 终止。同时,这里还有一些NGINX Plus 和接收TCP 连接的服务器一起使用时的[特有的步骤][33]
+
+### Tip #6: 使用 HTTP/2 或 SPDY ###
+
+对于已经使用了SSL/TLS 的站点,HTTP/2 和SPDY 可以很好的提高性能,因为每个连接只需要一次握手。而对于没有使用SSL/TLS 的站点来说,HTTP/2 和SPDY会在响应速度上有些影响(通常会将度效率)。
+
+Google 在2012年开始把SPDY 作为一个比HTTP/1.x 更快速的协议来推荐。HTTP/2 是目前IETF 标准,他也基于SPDY。SPDY 已经被广泛的支持了,但是很快就会被HTTP/2 替代。
+
+SPDY 和HTTP/2 的关键是用单连接来替代多路连接。单个连接是被复用的,所以它可以同时携带多个请求和响应的分片。
+
+通过使用一个连接这些协议可以避免过多的设置和管理多个连接,就像浏览器实现了HTTP/1.x 一样。单连接在对SSL 特别有效,这是因为它可以最小化SSL/TLS 建立安全链接时的握手时间。
+
+SPDY 协议需要使用SSL/TLS, 而HTTP/2 官方并不需要,但是目前所有支持HTTP/2的浏览器只有在使能了SSL/TLS 的情况下才会使用它。这就意味着支持HTTP/2 的浏览器只有在网站使用了SSL 并且服务器接收HTTP/2 流量的情况下才会启用HTTP/2。否则的话浏览器就会使用HTTP/1.x 协议。
+
+当你实现SPDY 或者HTTP/2时,你不再需要通常的HTTP 性能优化方案,比如域分隔资源聚合,以及图像登记。这些改变可以让你的代码和部署变得更简单和更易于管理。要了解HTTP/2 带来的这些变化可以浏览我们的[白皮书][34]。
+
+
+
+作为支持这些协议的一个样例,NGINX 已经从一开始就支持了SPDY,而且[大部分使用SPDY 协议的网站][35]都运行的是NGINX。NGINX 同时也[很早][36]对HTTP/2 的提供了支持,从2015 年9月开始开源NGINX 和NGINX Plus 就[支持][37]它了。
+
+经过一段时间,我们NGINX 希望更多的站点完全是能SSL 并且向HTTP/2 迁移。这将会提高安全性,同时新的优化手段也会被发现和实现,更简单的代码表现的更加优异。
+
+### Tip #7: 升级软件版本 ###
+
+一个提高应用性能的简单办法是根据软件的稳定性和性能的评价来选在你的软件栈。进一步说,因为高性能组件的开发者更愿意追求更高的性能和解决bug ,所以值得使用最新版本的软件。新版本往往更受开发者和用户社区的关注。更新的版本往往会利用到新的编译器优化,包括对新硬件的调优。
+
+稳定的新版本通常比旧版本具有更好的兼容性和更高的性能。一直进行软件更新,可以非常简单的保持软件保持最佳的优化,解决掉bug,以及安全性的提高。
+
+一直使用旧版软件也会组织你利用新的特性。比如上面说到的HTTP/2,目前要求OpenSSL 1.0.1.在2016 年中期开始将会要求1.0.2 ,而这是在2015年1月才发布的。
+
+NGINX 用户可以开始迁移到[NGINX 最新的开源软件][38] 或者[NGINX Plus][39];他们都包含了罪行的能力,如socket分区和线程池(见下文),这些都已经为性能优化过了。然后好好看看的你软件栈,把他们升级到你能能升级道德最新版本吧。
+
+### Tip #8: linux 系统性能调优 ###
+
+linux 是大多数web 服务器使用操作系统,而且作为你的架构的基础,Linux 表现出明显可以提高性能的机会。默认情况下,很多linux 系统都被设置为使用很少的资源,匹配典型的桌面应用负载。这就意味着web 应用需要最少一些等级的调优才能达到最大效能。
+
+Linux 优化是转变们针对web 服务器方面的。以NGINX 为例,这里有一些在加速linux 时需要强调的变化:
+
+- **缓冲队列**。如果你有挂起的连接,那么你应该考虑增加net.core.somaxconn 的值,它代表了可以缓存的连接的最大数量。如果连接线直太小,那么你将会看到错误信息,而你可以逐渐的增加这个参数知道错误信息停止出现。
+- **文件描述符**。NGINX 对一个连接使用最多2个文件描述符。如果你的系统有很多连接,你可能就需要提高sys.fs.file_max ,增加系统对文件描述符数量整体的限制,这样子才能支持不断增加的负载需求。
+- **临时端口**。当使用代理时,NGINX 会为每个上游服务器创建临时端口。你可以设置net.ipv4.ip_local_port_range 来提高这些端口的范围,增加可用的端口。你也可以减少非活动的端口的超时判断来重复使用端口,这可以通过net.ipv4.tcp_fin_timeout 来设置,这可以快速的提高流量。
+
+对于NGINX 来说,可以查阅[NGINX 性能调优指南][40]来学习如果优化你的Linux 系统,这样子它就可以很好的适应大规模网络流量而不会超过工作极限。
+
+### Tip #9: web 服务器性能调优 ###
+
+无论你是用哪种web 服务器,你都需要对它进行优化来提高性能。下面的推荐手段可以用于任何web 服务器,但是一些设置是针对NGINX的。关键的优化手段包括:
+
+- **f访问日志**。不要把每个请求的日志都直接写回磁盘,你可以在内存将日志缓存起来然后一批写回磁盘。对于NGINX 来说添加给指令*access_log* 添加参数 *buffer=size* 可以让系统在缓存满了的情况下才把日志写到此哦按。如果你添加了参数**flush=time** ,那么缓存内容会每隔一段时间再写回磁盘。
+- **缓存**。缓存掌握了内存中的部分资源知道满了位置,这可以让与客户端的通信更加高效。与内存中缓存不匹配的响应会写回磁盘,而这就会降低效能。当NGINX [启用][42]了缓存机制后,你可以使用指令*proxy_buffer_size* 和 *proxy_buffers* 来管理缓存。
+- **客户端保活**。保活连接可以减少开销,特别是使用SSL/TLS时。对于NGINX 来说,你可以增加*keepalive_requests* 的值,从默认值100 开始修改,这样一个客户端就可以转交一个指定的连接,而且你也可以通过增加*keepalive_timeout* 的值来允许保活连接存活更长时间,结果就是让后来的请求处理的更快速。
+- **上游保活**。上游的连接——即连接到应用服务器、数据库服务器等机器的连接——同样也会收益于连接保活。对于上游连接老说,你可以增加*保活时间*,即每个工人进程的空闲保活连接个数。这就可以提高连接的复用次数,减少需要重新打开全新的连接次数。更多关于保活连接的信息可以参见[blog][41].
+- **限制**。限制客户端使用的资源可以提高性能和安全性。对于NGINX 来说指令*limit_conn* 和 *limit_conn_zone* 限制了每个源的连接数量,而*limit_rate* 限制了带宽。这些限制都可以阻止合法用户*攫取* 资源,同时夜避免了攻击。指令*limit_req* 和 *limit_req_zone* 限制了客户端请求。对于上游服务器来说,可以在上游服务器的配置块里使用max_conns 可以限制连接到上游服务器的连接。 这样可以避免服务器过载。关联的队列指令会创建一个队列来在连接数抵达*max_conn* 限制时在指定的长度的时间内保存特定数量的请求。
+- **工人进程**。工人进程负责处理请求。NGINX 采用事件驱动模型和依赖操作系统的机制来有效的讲请求分发给不同的工人进程。这条建议推荐设置每个CPU 的参数*worker_processes* 。如果需要的话,工人连接的最大数(默认512)可以安全在大部分系统增加,是指找到最适合你的系统的值。
+- **套接字分割**。通常一个套接字监听器会把新连接分配给所有工人进程。套接字分割会未每个工人进程创建一个套接字监听器,这样一来以内核分配连接给套接字就成为可能了。折可以减少锁竞争,并且提高多核系统的性能,要使能[套接字分隔][43]需要在监听指令里面加上复用端口参数。
+- **线程池**。一个计算机进程可以处理一个缓慢的操作。对于web 服务器软件来说磁盘访问会影响很多更快的操作,比如计算或者在内存中拷贝。使用了线程池之后慢操作可以分配到不同的任务集,而主进程可以一直运行快速操作。当磁盘操作完成后结果会返回给主进程的循环。在NGINX理有两个操作——read()系统调用和sendfile() ——被分配到了[线程池][44]
+
+
+
+**技巧**。当改变任务操作系统或支持服务的设置时,一次只改变一个参数然后测试性能。如果修改引起问题了,或者不能让你的系统更快那么就改回去。
+
+在[blog][45]可以看到更详细的NGINX 调优方法。
+
+### Tip #10: 监视系统活动来解决问题和瓶颈 ###
+
+在应用开发中要使得系统变得非常高效的关键是监视你的系统在现实世界运行的性能。你必须能通过特定的设备和你的web 基础设施上监控程序活动。
+
+监视活动是最积极的——他会告诉你发生了什么,把问题留给你发现和最终解决掉。
+
+监视可以发现集中不同的问题。它们包括:
+
+- 服务器宕机。
+- 服务器出问题一直在丢失连接。
+- 服务器出现大量的缓存未命中。
+- 服务器没有发送正确的内容。
+
+应用的总体性能监控工具,比如New Relic 和Dynatrace,可以帮助你监控到从远处加载网页的时间,二NGINX 可以帮助你监控到应用发送的时 间。当你需要考虑为基础设施添加容量以满足流量需求时,应用性能数据可以告诉你你的优化措施的确起作用了。
+
+为了帮助开发者快速的发现、解决问题,NGINX Plus 增加了[应用感知健康度检查][46] ——对重复出现的常规事件进行综合分析并在问题出现时向你发出警告。NGINX Plus 同时提供[会话过滤][47] 功能,折可以组织当前任务未完成之前不接受新的连接,另一个功能是慢启动,允许一个从错误恢复过来的服务器追赶上负载均衡服务器群的速度。当有使用得当时,健康度检查可以让你在问题变得严重到影响用户体验前就发现它,而会话过滤和慢启动可以让你替换服务器,并且这个过程不会对性能和正常运行时间产生负面影响。这个表格就展示了NGINX Plus 内建模块在web 基础设施[监视活活动][48]的仪表盘,包括了服务器群,TCP 连接和缓存等信息。
+
+
+
+### 总结: 看看10倍性能提升的效果 ###
+
+这些性能提升方案对任何一个web 应用都可用并且效果都很好,而实际效果取决于你的预算,如你能花费的时间,目前实现方案的差距。所以你该如何对你自己的应用实现10倍性能提升?
+
+为了指导你了解每种优化手段的潜在影响,这里是是上面详述的每个优化方法的关键点,虽然你的里程肯定大不相同:
+
+- **反向代理服务器和负载均衡**。没有负载均衡或者负载均衡很差都会造成间断的极低性能。增加一个反向代理,比如NGINX可以避免web应用程序在内存和磁盘之间抖动。负载均衡可以将过载服务器的任务转移到空闲的服务器,还可以轻松的进行扩容。这些改变都可以产生巨大的性能提升,很容易就可以比你现在的实现方案的最差性能提高10倍,对于总体性能来说可能提高的不多,但是也是有实质性的提升。
+- **缓存动态和静态数据**。如果你又一个web 服务器负担过重,那么毫无疑问肯定是你的应用服务器,只通过缓存动态数据就可以在峰值时间提高10倍的性能。缓存静态文件可以提高个位数倍的性能。
+- **压缩数据**。使用媒体文件压缩格式,比如图像格式JPEG,图形格式PNG,视频格式MPEG-4,音乐文件格式MP3可以极大的提高性能。一旦这些都用上了,然后压缩文件数据可以提高初始页面加载速度提高两倍。
+- **优化SSL/TLS**。安全握手会对性能产生巨大的影响,对他们的优化可能会对初始响应特别是重文本站点产生2倍的提升。优化SSL/TLS 下媒体文件只会产生很小的性能提升。
+- **使用HTTP/2 和SPDY*。当你使用了SSL/TLS,这些协议就可以提高整个站点的性能。
+- **对linux 和web 服务器软件进行调优**。比如优化缓存机制,使用保活连接,分配时间敏感型任务到不同的线程池可以明显的提高性能;举个例子,线程池可以加速对磁盘敏感的任务[近一个数量级][49].
+
+我们希望你亲自尝试这些技术。我们希望这些提高应用性能的手段可以被你实现。请在下面评论栏分享你的结果 或者在标签#NGINX 和#webperf 下tweet 你的故事。
+### 网上资源 ###
+
+[Statista.com – Share of the internet economy in the gross domestic product in G-20 countries in 2016][50]
+
+[Load Impact – How Bad Performance Impacts Ecommerce Sales][51]
+
+[Kissmetrics – How Loading Time Affects Your Bottom Line (infographic)][52]
+
+[Econsultancy – Site speed: case studies, tips and tools for improving your conversion rate][53]
+
+--------------------------------------------------------------------------------
+
+via: https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io
+
+作者:[Floyd Smith][a]
+译者:[Ezio]](https://github.com/oska874)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:https://www.nginx.com/blog/author/floyd/
+[1]:https://www.nginx.com/resources/glossary/reverse-proxy-server
+[2]:https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io#tip2
+[3]:https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io#tip3
+[4]:https://www.nginx.com/products/application-health-checks/
+[5]:https://www.nginx.com/solutions/load-balancing/
+[6]:https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io#tip1
+[7]:https://www.nginx.com/resources/admin-guide/load-balancer/
+[8]:https://www.nginx.com/blog/load-balancing-with-nginx-plus/
+[9]:https://www.digitalocean.com/community/tutorials/understanding-and-implementing-fastcgi-proxying-in-nginx
+[10]:https://www.nginx.com/blog/five-reasons-use-software-load-balancer/
+[11]:https://www.nginx.com/blog/load-balancing-with-nginx-plus/
+[12]:https://www.nginx.com/resources/ebook/five-reasons-choose-software-load-balancer/
+[13]:https://www.nginx.com/resources/webinars/choose-software-based-load-balancer-45-min/
+[14]:https://www.nginx.com/resources/admin-guide/load-balancer/
+[15]:https://www.nginx.com/products/
+[16]:https://www.nginx.com/blog/nginx-caching-guide/
+[17]:https://www.nginx.com/products/content-caching-nginx-plus/
+[18]:http://nginx.org/en/docs/http/ngx_http_proxy_module.html?&_ga=1.95342300.1348073562.1438712874#proxy_cache_purge
+[19]:https://www.nginx.com/products/live-activity-monitoring/
+[20]:http://nginx.org/en/docs/http/ngx_http_proxy_module.html?&&&_ga=1.61156076.1348073562.1438712874#proxy_cache
+[21]:https://www.nginx.com/resources/admin-guide/content-caching
+[22]:https://www.nginx.com/blog/network-vs-devops-how-to-manage-your-control-issues/
+[23]:https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io#tip6
+[24]:https://www.nginx.com/resources/admin-guide/compression-and-decompression/
+[25]:http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html
+[26]:https://www.digicert.com/ssl.htm
+[27]:https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io#tip6
+[28]:http://openssl.org/
+[29]:https://www.nginx.com/blog/nginx-ssl-performance/
+[30]:https://www.nginx.com/blog/improve-seo-https-nginx/
+[31]:http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_cache
+[32]:https://www.nginx.com/resources/admin-guide/nginx-ssl-termination/
+[33]:https://www.nginx.com/resources/admin-guide/nginx-tcp-ssl-termination/
+[34]:https://www.nginx.com/resources/datasheet/datasheet-nginx-http2-whitepaper/
+[35]:http://w3techs.com/blog/entry/25_percent_of_the_web_runs_nginx_including_46_6_percent_of_the_top_10000_sites
+[36]:https://www.nginx.com/blog/how-nginx-plans-to-support-http2/
+[37]:https://www.nginx.com/blog/nginx-plus-r7-released/
+[38]:http://nginx.org/en/download.html
+[39]:https://www.nginx.com/products/
+[40]:https://www.nginx.com/blog/tuning-nginx/
+[41]:https://www.nginx.com/blog/http-keepalives-and-web-performance/
+[42]:http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering
+[43]:https://www.nginx.com/blog/socket-sharding-nginx-release-1-9-1/
+[44]:https://www.nginx.com/blog/thread-pools-boost-performance-9x/
+[45]:https://www.nginx.com/blog/tuning-nginx/
+[46]:https://www.nginx.com/products/application-health-checks/
+[47]:https://www.nginx.com/products/session-persistence/#session-draining
+[48]:https://www.nginx.com/products/live-activity-monitoring/
+[49]:https://www.nginx.com/blog/thread-pools-boost-performance-9x/
+[50]:http://www.statista.com/statistics/250703/forecast-of-internet-economy-as-percentage-of-gdp-in-g-20-countries/
+[51]:http://blog.loadimpact.com/blog/how-bad-performance-impacts-ecommerce-sales-part-i/
+[52]:https://blog.kissmetrics.com/loading-time/?wide=1
+[53]:https://econsultancy.com/blog/10936-site-speed-case-studies-tips-and-tools-for-improving-your-conversion-rate/
diff --git a/translated/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md b/translated/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md
new file mode 100644
index 0000000000..b79dc3657e
--- /dev/null
+++ b/translated/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md
@@ -0,0 +1,121 @@
+如何在Ubuntu 15.04 上安装带JSON 支持的SQLite 3.9.1
+================================================================================
+欢迎阅读我们关于SQLite 的文章,SQLite 是当今时间上使用最广泛的SQL 数据库引擎,它他基本不需要配置,不需要安装或者管理就可以运行。SQLite 是一个是开放领域的软件,是关系数据库的管理系统,或者说RDBMS,用来在大表存储用户定义的记录。对于数据存储和管理来说,数据库引擎要处理复杂的查询命令,这些命令可能会从多个表获取数据然后生成报告的数据总结。
+
+SQLite 是一个非常小、轻量级,不需要分离的服务进程或系统。他可以运行在UNIX,Linux,Mac OS-X,Android,iOS 和Windows 上,已经被大量的软件程序使用,如Opera, Ruby On Rails, Adobe System, Mozilla Firefox, Google Chrome 和 Skype。
+
+### 1) 基本需求: ###
+
+在几乎全部支持SQLite 的平台上安装SQLite 基本上没有复杂的要求。
+
+所以让我们在CLI 或者Secure Shell 上使用sudo 或者root 权限登录Ubuntu 服务器。然后更新系统,这样子就可以让操作系统的软件更新到新版本。
+
+在Ubuntu 上,下面的命令是用来更新系统的软件源的。
+
+ # apt-get update
+
+如果你要在新安装的Ubuntu 上部署SQLite,那么你需要安装一些基础的系统管理工具,如wget, make, unzip, gcc。
+
+要安装wget,可以使用下面的命令,然后输入Y 如果系统提示的话:
+
+ # apt-get install wget make gcc
+
+### 2) 下载 SQLite ###
+
+要下载SQLite 最好是在[SQLite 官网][1]下载,如下所示
+
+
+
+你也可以直接复制资源的连接然后再命令行使用wget 下载,如下所示:
+
+ # wget https://www.sqlite.org/2015/sqlite-autoconf-3090100.tar.gz
+
+
+
+下载完成之后,解压缩安装包,切换工作目录到解压缩后的SQLite 目录,使用下面的命令。
+
+ # tar -zxvf sqlite-autoconf-3090100.tar.gz
+
+### 3) 安装 SQLite ###
+
+现在我们要开始安装、配置刚才下载的SQLite。所以在Ubuntu 上编译、安装SQLite,运行配置脚本。
+
+ root@ubuntu-15:~/sqlite-autoconf-3090100# ./configure –prefix=/usr/local
+
+
+
+配置要上面的prefix 之后,运行下面的命令编译安装包。
+
+ root@ubuntu-15:~/sqlite-autoconf-3090100# make
+source='sqlite3.c' object='sqlite3.lo' libtool=yes \
+DEPDIR=.deps depmode=none /bin/bash ./depcomp \
+/bin/bash ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.9.1\" -DPACKAGE_STRING=\"sqlite\ 3.9.1\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.9.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_POSIX_FALLOCATE=1 -I. -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -c -o sqlite3.lo sqlite3.c
+
+运行完上面的命令之后,要在Ubuntu 上完成SQLite 的安装得运行下面的命令。
+
+ # make install
+
+
+
+### 4) 测试 SQLite 安装 ###
+
+要保证SQLite 3.9 安装成功了,运行下面的命令。
+
+ # sqlite3
+
+SQLite 的版本会显示在命令行。
+
+
+
+### 5) 使用 SQLite ###
+
+SQLite 很容易上手。要获得详细的使用方法,在SQLite 控制台里输入下面的命令。
+
+ sqlite> .help
+
+这里会显示全部可用的命令和详细说明。
+
+
+
+现在开始最后一部分,使用一点SQLite 命令创建数据库。
+
+要创建一个新的数据库需要运行下面的命令。
+
+ # sqlite3 test.db
+
+然后创建一张新表。
+
+ sqlite> create table memos(text, priority INTEGER);
+
+接着使用下面的命令插入数据。
+
+ sqlite> insert into memos values('deliver project description', 15);
+ sqlite> insert into memos values('writing new artilces', 100);
+
+要查看插入的数据可以运行下面的命令。
+
+ sqlite> select * from memos;
+ deliver project description|15
+ writing new artilces|100
+
+或者使用下面的命令离开。
+
+ sqlite> .exit
+
+
+### 结论 ###
+
+通过本文你可以了解如果安装支持JSON1 的最新版的SQLite,SQLite 从3.9.0 开始支持JSON1。这是一个非常棒的库,可以用来获取内嵌到应用程序,利用它可以很有效而且很轻量的管理资源。我们希望你能觉得本文有所帮助,请自由的像我们反馈你遇到的问题和困难。
+
+--------------------------------------------------------------------------------
+
+via: http://linoxide.com/ubuntu-how-to/install-sqlite-json-ubuntu-15-04/
+
+作者:[Kashif Siddique][a]
+译者:[译者ID](https://github.com/oska874)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://linoxide.com/author/kashifs/
+[1]:https://www.sqlite.org/download.html
diff --git a/translated/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md b/translated/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md
new file mode 100644
index 0000000000..524fc1e2c1
--- /dev/null
+++ b/translated/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md
@@ -0,0 +1,178 @@
+如何在 Ubuntu / Fedora / Debian 中安装 GitLab
+================================================================================
+在 Git 问世之前,分布式版本控制从来都不是一件简单的事。Git 是一个免费、开源的软件,旨在轻松且快速地对从小规模到非常巨大的项目进行管理。Git 最开始由 Linus Torvalds 开发,他同时也是著名的 Linux 内核的创建者。在 git 和分布式版本控制系统领域中,[GitLab][1] 是一个极棒的新产品。它是一个基于 web 的 Git 仓库管理应用,包含代码审查、wiki、问题跟踪等诸多功能。使用 GitLab 可以很方便、快速地创建、审查、部署及托管代码。与 Github 类似,尽管它也提供在其官方的服务器托管免费的代码仓库,但它也可以运行在我们自己的服务器上。GitLab 有两个不同的版本:社区版(Community Edition)和企业版(Enterprise Edition)。社区本完全免费且开源,遵循 MIT 协议;而企业版则遵循一个专有的协议,包含一些社区版中没有的功能。下面介绍的是有关如何在我们自己的运行着 Ubuntu、Fedora 或 Debian 操作系统的机子上安装 GitLab 社区版的简单步骤。
+
+### 1. 安装先决条件 ###
+
+首先,我们需要安装 GitLab 所依赖的软件包。我们将安装 `curl`,用以下载我们所需的文件;安装`openssh-server` ,以此来通过 ssh 协议登陆到我们的机子上;安装`ca-certificates`,用它来添加 CA 认证;以及 `postfix`,把它作为一个 MTA(Mail Transfer Agent,邮件传输代理)。
+
+注: 若要安装 GitLab 社区版,我们需要一个至少包含 2 GB 内存和 2 核 CPU 的 linux 机子。
+
+#### 在 Ubuntu 14 .04/Debian 8.x 中 ####
+
+鉴于这些依赖包都可以在 Ubuntu 14.04 和 Debian 8.x 的官方软件仓库中获取到,我们只需通过使用 `apt-get` 包管理器来安装它们。为此,我们需要在一个终端或控制台中执行下面的命令:
+
+ # apt-get install curl openssh-server ca-certificates postfix
+
+
+
+#### 在 Fedora 22 中 ####
+
+在 Fedora 22 中,由于 `yum` 已经被弃用了,所以默认的包管理器是 `dnf`。为了安装上面那些需要的软件包,我们只需运行下面的 dnf 命令:
+
+ # dnf install curl openssh-server postfix
+
+
+
+### 2. 打开并开启服务 ###
+
+现在,我们将使用我们默认的 init 系统来打开 sshd 和 postfix 服务。并且我们将使得它们在每次系统启动时被自动开启。
+
+#### 在 Ubuntu 14.04 中 ####
+
+由于 SysVinit 在 Ubuntu 14.04 中作为 init 系统被安装,我们将使用 service 命令来开启 sshd 和 postfix 守护进程:
+
+ # service sshd start
+ # service postfix start
+
+现在,为了使得它们在每次开机启动时被自动开启,我们需要运行下面的 update-rc.d 命令:
+
+ # update-rc.d sshd enable
+ # update-rc.d postfix enable
+
+#### 在 Fedora 22/Debian 8.x 中 ####
+
+鉴于 Fedora 22 和 Debi 8.x 已经用 Systemd 代替了 SysVinit 来作为默认的 init 系统,我们只需运行下面的命令来开启 sshd 和 postfix 服务:
+
+ # systemctl start sshd postfix
+
+现在,为了使得它们在每次开机启动时被自动地开启,我们需要运行下面的 systemctl 命令:
+
+ # systemctl enable sshd postfix
+
+ 从 /etc/systemd/system/multi-user.target.wants/sshd.service 建立软链接到 /usr/lib/systemd/system/sshd.service.
+ 从 /etc/systemd/system/multi-user.target.wants/postfix.service 建立软链接到 /usr/lib/systemd/system/postfix.service.
+
+### 3. 下载 GitLab ###
+
+现在,我们将使用 curl 从官方的 GitLab 社区版仓库下载二进制安装文件。首先,为了得到所需文件的下载链接,我们需要浏览到该软件仓库的页面。为此,我们需要在运行着相应操作系统的 linux 机子上运行下面的命令。
+
+#### 在 Ubuntu 14.04 中 ####
+
+由于 Ubuntu 和 Debian 使用相同格式的 debian 文件,我们需要在 [https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs][2] 下搜索所需版本的 GitLab,然后点击有着 ubuntu/trusty 标签的链接,这是因为我们运作着 Ubuntu 14.04。接着一个新的页面将会出现,我们将看到一个下载按钮,然后我们在它的上面右击,得到文件的链接,然后像下面这样使用 curl 来下载它。
+
+ # curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/trusty/gitlab-ce_8.1.2-ce.0_amd64.deb
+
+
+
+#### 在 Debian 8.x 中 ####
+
+与 Ubuntu 类似,我们需要在 [https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs][3] 页面中搜索所需版本的 GitLab,然后点击带有 debian/jessie 标签的链接,这是因为我们运行的是 Debian 8.x。接着,一个新的页面将会出现,然后我们在下载按钮上右击,得到文件的下载链接。最后我们像下面这样使用 curl 来下载该文件。
+
+ # curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/jessie/gitlab-ce_8.1.2-ce.0_amd64.deb/download
+
+
+
+#### 在 Fedora 22 中####
+
+由于 Fedora 使用 rpm 文件来作为软件包,我们将在 [https://packages.gitlab.com/gitlab/gitlab-ce?filter=rpms][4] 页面下搜索所需版本的 GitLab,然后点击所需发行包的链接,这里由于我们运行的是 Fedora 22,所以我们将选择带有 el/7 标签的发行包。一个新的页面将会出现,在其中我们可以看到一个下载按钮,我们将右击它,得到所需文件的链接,然后像下面这样使用 curl 来下载它。
+
+ # curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-8.1.2-ce.0.el7.x86_64.rpm/download
+
+
+
+### 4. 安装 GitLab ###
+
+在相应的软件源被添加到我们的 linux 机子上之后,现在我们将使用相应 linux 发行版本中的默认包管理器来安装 GitLab 社区版。
+
+#### 在 Ubuntu 14.04/Debian 8.x 中 ####
+
+要在运行着 Ubuntu 14.04 或 Debian 8.x linux 发行版本的机子上安装 GitLab 社区版,我们只需运行如下的命令:
+
+ # dpkg -i gitlab-ce_8.1.2-ce.0_amd64.deb
+
+
+
+#### 在 Fedora 22 中 ####
+
+我们只需执行下面的 dnf 命令来在我们的 Fedora 22 机子上安装 GitLab。
+
+ # dnf install gitlab-ce-8.1.2-ce.0.el7.x86_64.rpm
+
+
+
+### 5. 配置和开启 GitLab ###
+
+由于 GitLab 社区版已经成功地安装在我们的 linux 系统中了,接下来我们将要配置和开启它了。为此,我们需要运行下面的命令,这在 Ubuntu、Debian 和 Fedora 发行版本上都一样:
+
+ # gitlab-ctl reconfigure
+
+
+
+### 6. 允许通过防火墙 ###
+
+假如在我们的 linux 机子中已经启用了防火墙程序,为了使得 GitLab 社区版的 web 界面可以通过网络进行访问,我们需要允许 80 端口通过防火墙,这个端口是 GitLab 社区版的默认端口。为此,我们需要运行下面的命令。
+
+#### 在 Iptables 中 ####
+
+Ubuntu 14.04 默认安装和使用 Iptables。所以,我们将运行下面的 iptables 命令来打开 80 端口:
+
+ # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
+
+ # /etc/init.d/iptables save
+
+#### 在 Firewalld 中 ####
+
+由于 Fedora 22 和 Debian 8.x 默认安装了 systemd,它包含了作为防火墙程序的 firewalld。为了使得 80 端口(http 服务) 能够通过 firewalld,我们需要执行下面的命令。
+
+ # firewall-cmd --permanent --add-service=http
+
+ success
+
+ # firewall-cmd --reload
+
+ success
+
+### 7. 访问 GitLab Web 界面 ###
+
+最后,我们将访问 GitLab 社区版的 web 界面。为此,我们需要将我们的 web 浏览器指向 GitLab 服务器的网址,根据我们的配置,可能是 http://ip-address/ 或 http://domain.com/ 的格式。在我们成功指向该网址后,我们将会看到下面的页面。
+
+
+
+现在,为了登陆进面板,我们需要点击登陆按钮,它将询问我们的用户名和密码。然后我们将输入默认的用户名和密码,即 **root** 和 **5iveL!fe** 。在登陆进控制面板后,我们将被强制要求为我们的 GitLab root 用户输入新的密码。
+
+
+
+### 8. 创建仓库 ###
+
+在我们成功地更改密码并登陆到我们的控制面板之后,现在,我们将为我们的新项目创建一个新的仓库。为此,我们需要来到项目栏,然后点击 **新项目** 绿色按钮。
+
+
+
+接着,我们将被询问给我们的项目输入所需的信息和设定,正如下面展示的那样。我们甚至可以从其他的 git 仓库提供商和仓库中导入我们的项目。
+
+
+
+做完这些后,我们将能够使用任何包含基本 git 命令行的 Git 客户端来访问我们的 Git 仓库。我们可以看到在仓库中进行的任何活动,例如创建一个里程碑,管理 issue,合并请求,管理成员,便签,Wiki 等。
+
+
+
+### 总结 ###
+
+GitLab 是一个用来管理 git 仓库的很棒的开源 web 应用。它有着漂亮,响应式的带有诸多酷炫功能的界面。它还打包有许多酷炫功能,例如管理群组,分发密钥,连续集成,查看日志,广播消息,钩子,系统 OAuth 应用,模板等。(注:OAuth 是一个开放标准,允许用户让第三方应用访问该用户在某一网站上存储的私密的资源(如照片,视频,联系人列表),而无需将用户名和密码提供给第三方应用。--- 摘取自 [维基百科上的 OAuth 词条](https://zh.wikipedia.org/wiki/OAuth)) 它还可以和大量的工具进行交互如 Slack,Hipchat,LDAP,JIRA,Jenkins,很多类型的钩子和一个完整的 API。它至少需要 2 GB 的内存和 2 核 CPU 来流畅运行,支持多达 500 个用户,但它也可以被扩展到多个活动的服务器上。假如你有任何的问题,建议,回馈,请将它们写在下面的评论框中,以便我们可以提升或更新我们的内容。谢谢!
+
+--------------------------------------------------------------------------------
+
+via: http://linoxide.com/linux-how-to/install-gitlab-on-ubuntu-fedora-debian/
+
+作者:[Arun Pyasi][a]
+译者:[FSSlc](https://github.com/FSSlc)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://linoxide.com/author/arunp/
+[1]:https://about.gitlab.com/
+[2]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs
+[3]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs
+[4]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=rpms
\ No newline at end of file
diff --git a/translated/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md b/translated/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md
new file mode 100644
index 0000000000..8ccca22632
--- /dev/null
+++ b/translated/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md
@@ -0,0 +1,92 @@
+Linux 有问必答 - 如何在 Linux 上安装 Node.js
+================================================================================
+> **问题**: 如何在你的 Linux 发行版上安装 Node.js?
+
+[Node.js][1] 是建立在谷歌的 V8 JavaScript 引擎服务器端的软件平台上。在构建高性能的服务器端应用程序上,Node.js 在 JavaScript 中已是首选方案。是什么让使用 Node.js 库和应用程序的 [庞大生态系统][2] 来开发服务器后台变得如此流行。Node.js 自带一个被称为 npm 的命令行工具可以让你轻松地安装它,进行版本控制并使用 npm 的在线仓库来管理 Node.js 库和应用程序的依赖关系。
+
+在本教程中,我将介绍 **如何在主流 Linux 发行版上安装 Node.js,包括Debian,Ubuntu,Fedora 和 CentOS** 。
+
+Node.js 在一些发行版上作为预构建的程序包(如,Fedora 或 Ubuntu),而在其他发行版上你需要源码安装。由于 Node.js 发展比较快,建议从源码安装最新版而不是安装一个过时的预构建的程序包。最新的 Node.js 自带 npm(Node.js 的包管理器),让你可以轻松的安装 Node.js 的外部模块。
+
+### 在 Debian 上安装 Node.js on ###
+
+从 Debian 8 (Jessie)开始,Node.js 已被纳入官方软件仓库。因此,你可以使用如下方式安装它:
+
+ $ sudo apt-get install npm
+
+在 Debian 7 (Wheezy) 以前的版本中,你需要使用下面的方式来源码安装:
+
+ $ sudo apt-get install python g++ make
+ $ wget http://nodejs.org/dist/node-latest.tar.gz
+ $ tar xvfvz node-latest.tar.gz
+ $ cd node-v0.10.21 (replace a version with your own)
+ $ ./configure
+ $ make
+ $ sudo make install
+
+### 在 Ubuntu 或 Linux Mint 中安装 Node.js ###
+
+Node.js 被包含在 Ubuntu(13.04 及更高版本)。因此,安装非常简单。以下方式将安装 Node.js 和 npm。
+
+ $ sudo apt-get install npm
+ $ sudo ln -s /usr/bin/nodejs /usr/bin/node
+
+而 Ubuntu 中的 Node.js 可能版本比较老,你可以从 [其 PPA][3] 中安装最新的版本。
+
+ $ sudo apt-get install python-software-properties python g++ make
+ $ sudo add-apt-repository -y ppa:chris-lea/node.js
+ $ sudo apt-get update
+ $ sudo apt-get install npm
+
+### 在 Fedora 中安装 Node.js ###
+
+Node.js 被包含在 Fedora 的 base 仓库中。因此,你可以在 Fedora 中用 yum 安装 Node.js。
+
+ $ sudo yum install npm
+
+如果你想安装 Node.js 的最新版本,可以按照以下步骤使用源码来安装。
+
+ $ sudo yum groupinstall 'Development Tools'
+ $ wget http://nodejs.org/dist/node-latest.tar.gz
+ $ tar xvfvz node-latest.tar.gz
+ $ cd node-v0.10.21 (replace a version with your own)
+ $ ./configure
+ $ make
+ $ sudo make install
+
+### 在 CentOS 或 RHEL 中安装 Node.js ###
+
+在 CentOS 使用 yum 包管理器来安装 Node.js,首先启用 EPEL 软件库,然后运行:
+
+ $ sudo yum install npm
+
+如果你想在 CentOS 中安装最新版的 Node.js,其安装步骤和在 Fedora 中的相同。
+
+### 在 Arch Linux 上安装 Node.js ###
+
+Node.js is available in the Arch Linux community repository. Thus installation is as simple as running:
+
+Node.js 在 Arch Linux 的社区库中可以找到。所以安装很简单,只要运行:
+
+ $ sudo pacman -S nodejs npm
+
+### 检查 Node.js 的版本 ###
+
+一旦你已经安装了 Node.js,你可以使用如下所示的方法检查 Node.js 的版本。
+
+ $ node --version
+
+--------------------------------------------------------------------------------
+
+via: http://ask.xmodulo.com/install-node-js-linux.html
+
+作者:[Dan Nanni][a]
+译者:[strugglingyou](https://github.com/strugglingyou)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://ask.xmodulo.com/author/nanni
+[1]:http://nodejs.org/
+[2]:https://www.npmjs.com/
+[3]:https://launchpad.net/~chris-lea/+archive/node.js
diff --git a/translated/tech/20151117 Linux 101--Get the most out of Systemd.md b/translated/tech/20151117 Linux 101--Get the most out of Systemd.md
new file mode 100644
index 0000000000..1a382479ec
--- /dev/null
+++ b/translated/tech/20151117 Linux 101--Get the most out of Systemd.md
@@ -0,0 +1,171 @@
+Linux 101:最有效地使用 Systemd
+================================================================================
+干嘛要这么做?
+
+- 理解现代 Linux 发行版中的显著变化;
+- 看看 Systemd 是如何取代 SysVinit 的;
+- 处理好*单元* (unit)和新的 journal 日志。
+
+吐槽邮件,人身攻击,死亡威胁——Lennart Poettering,Systemd 的作者,对收到这些东西早就习以为常了。这位 Red Hat 公司的员工最近在 Google+ 上怒斥 FOSS 社区([http://tinyurl.com/poorlennart][1])的本质,悲痛且失望地表示:“那真是个令人恶心的地方”。他着重指出 Linus Torvalds 在邮件列表上言辞刻薄的帖子,并谴责这位内核的领导者为在线讨论定下基调,并使得人身攻击及贬抑之辞成为常态。
+
+但为何 Poettering 会遭受如此多的憎恨?为何就这么个搞搞开源软件的人要忍受这等愤怒?答案就在于他的软件的重要性。如今大多数发行版中,Systemd 是 Linux 内核发起的第一个程序,并且它还扮演多种角色。它会启动系统服务,处理用户登陆,每隔特定的时间执行一些任务,还有很多很多。它在不断地成长,并逐渐成为 Linux 的某种“基础系统”——提供系统启动和发行版维护所需的所有工具。
+
+如今,在以下几点上 Systemd 颇具争议:它逃避了一些确立好的 Unix 传统,例如纯文本的日志文件;它被看成是个“大一统”的项目,试图接管一切;它还是我们这个操作系统的支柱的重要革新。然而大多数主流发行版已经接受了(或即将接受)它,因此它就保留了下来。而且它确实是有好处的:更快地启动,更简单地管理那些有依赖的服务程序,提供强大且安全的日志系统等。
+
+因此在这篇教程中,我们将探索 Systemd 的特性,并向您展示如何最有效地利用这些特性。即便您此刻并不是这款软件的粉丝,读完本文后您至少可以更加了解和适应它。
+
+
+
+**这部没正经的动画片来自[http://tinyurl.com/m2e7mv8][2],它把 Systemd 塑造成一只狂暴的动物,吞噬它路过的一切。大多数批评者的言辞可不像这只公仔一样柔软。**
+
+### 启动及服务 ###
+
+大多数主流发行版要么已经采用 Systemd,要么即将在下个发布中采用(如 Debian 和 Ubuntu)。在本教程中,我们使用 Fedora 21——该发行版已经是 Systemd 的优秀实验场地——的一个预览版进行演示,但不论您用哪个发行版,要用到的命令和注意事项都应该是一样的。这是 Systemd 的一个加分点:它消除了不同发行版之间许多细微且琐碎的区别。
+
+在终端中输入 **ps ax | grep systemd**,看到第一行,其中的数字 **1** 表示它的进程号是1,也就是说它是 Linux 内核发起的第一个程序。因此,内核一旦检测完硬件并组织好了内存,就会运行 **/usr/lib/systemd/systemd** 可执行程序,这个程序会按顺序依次发起其他程序。(在还没有 Systemd 的日子里,内核会去运行 **/sbin/init**,随后这个程序会在名为 SysVinit 的系统中运行其余的各种启动脚本。)
+
+Systemd 的核心是一个叫*单元* (unit)的概念,它是一些存有关于服务(在运行在后台的程序),设备,挂载点,和操作系统其他方面信息的配置文件。Systemd 的其中一个目标就是简化这些事物之间的相互作用,因此如果你有程序需要在某个挂载点被创建或某个设备被接入后开始运行,Systemd 可以让这一切正常运作起来变得相当容易。(在没有 Systemd 的日子里,要使用脚本来把这些事情调配好,那可是相当丑陋的。)要列出您 Linux 系统上的所有单元,输入以下命令:
+
+ systemctl list-unit-files
+
+现在,**systemctl** 是与 Systemd 交互的主要工具,它有不少选项。在单元列表中,您会注意到这儿有一些格式:被使能的单元显示为绿色,被禁用的显示为红色。标记为“static”的单元不能直接启用,它们是其他单元所依赖的对象。若要限制输出列表只包含服务,使用以下命令:
+
+ systemctl list-unit-files --type=service
+
+注意,一个单元显示为“enabled”,并不等于对应的服务正在运行,而只能说明它可以被开启。要获得某个特定服务的信息,以 GDM (the Gnome Display Manager) 为例,输入以下命令:
+
+ systemctl status gdm.service
+
+这条命令提供了许多有用的信息:一段人类可读的服务描述,单元配置文件的位置,启动的时间,进程号,以及它所从属的 CGroups (用以限制各组进程的资源开销)。
+
+如果您去查看位于 **/usr/lib/systemd/system/gdm.service** 的单元配置文件,您可以看到多种选项,包括要被运行的二进制文件(“ExecStart”那一行),相冲突的其他单元(即不能同时进入运行的单元),以及需要在本单元执行前进入运行的单元(“After”那一行)。一些单元有附加的依赖选项,例如“Requires”(必要的依赖)和“Wants”(可选的依赖)。
+
+此处另一个有趣的选项是:
+
+ Alias=display-manager.service
+
+当您启动 **gdm.service** 后,您将可以通过 **systemctl status display-manager.service** 来查看它的状态。当您知道有*显示管理程序* (display manager)在运行并想对它做点什么,但您不关心那究竟是 GDM,KDM,XDM 还是什么别的显示管理程序时,这个选项会非常有用。
+
+
+
+**使用 systemctl status 命令后面跟一个单元名,来查看对应的服务有什么情况。**
+
+### “目标”锁定 ###
+
+如果您在 **/usr/lib/systemd/system** 目录中输入 **ls** 命令,您将看到各种以 **.target** 结尾的文件。一个*启动目标* (target)是一种将多个单元聚合在一起以致于将它们同时启动的方式。例如,对大多数类 Unix 操作系统而言有一种“多用户”状态,意思是系统已被成功启动,后台服务正在运行,并且已准备好让一个或多个用户登陆并工作——至少在文本模式下。(其他状态包括用于进行管理工作的单用户状态,以及用于机器关机的重启状态。)
+
+如果您打开 **multi-user.target** 文件一探究竟,您可能期待看到的是一个要被启动的单元列表。但您会发现这个文件内部几乎空空如也——其实,一个服务会通过 **WantedBy** 选项让自己成为启动目标的依赖。因此如果您去打开 **avahi-daemon.service**, **NetworkManager.service** 及其他 **.service** 文件看看,您将在 Install 段看到这一行:
+
+ WantedBy=multi-user.target
+
+因此,切换到多用户启动目标会使能那些包含上述语句的单元。还有其他一些启动目标可用(例如 **emergency.target** 用于一个紧急情况使用的 shell,以及 **halt.target** 用于机器关机),您可以用以下方式轻松地在它们之间切换:
+
+ systemctl isolate emergency.target
+
+在许多方面,这些都很像 SysVinit 中的*运行级* (runlevel),如文本模式的 **multi-user.target** 类似于第3运行级,**graphical.target** 类似于第5运行级,**reboot.target** 类似于第6运行级,诸如此类。
+
+
+
+**与传统的脚本相比,单元配置文件也许看起来很陌生,但并不难以理解。**
+
+### 开启与停止 ###
+
+现在您也许陷入了沉思:我们已经看了这么多,但仍没看到如何停止和开启服务!这其实是有原因的。从外部看,Systemd 也许很复杂,像野兽一般难以驾驭。因此在您开始摆弄它之间,有必要从宏观的角度看看它是如何工作的。实际用来管理服务的命令非常简单:
+
+ systemctl stop cups.service
+ systemctl start cups.service
+
+(若某个单元被禁用了,您可以先通过 **systemctl enable** 加该单元名的方式将其使能。这种做法会为该单元创建一个符号链接,并将其放置在当前启动目标的 .wants 目录下,这些 .wants 目录在**/etc/systemd/system** 文件夹中。)
+
+还有两个有用的命令是 **systemctl restart** 和 **systemctl reload**,后面接单元名。后者要求单元重新加载它的配置文件。Systemd 的绝大部分都有良好的文档,因此您可以查看手册 (**man systemctl**) 了解每条命令的细节。
+
+> ### 定时器单元:取代 Cron ###
+>
+> 除了系统初始化和服务管理,Systemd 还染指其他方面。在很大程度上,它能够完成 **cron** 的工作,而且可以说是以更灵活的方式(并带有更易读的语法)。**cron** 是一个以规定时间间隔执行任务的程序——例如清楚临时文件,刷新缓存等。
+>
+> 如果您再次进入 **/usr/lib/systemd/system** 目录,您会看到那儿有多个 **.timer** 文件。用 **less** 来查看这些文件,您会发现它们与 **.service** 和 **.target** 文件有着相似的结构,而区别在于 **[Timer]** 段。举个例子:
+>
+> [Timer]
+> OnBootSec=1h
+> OnUnitActiveSec=1w
+>
+> **OnBootSec** 选项告诉 Systemd 在系统启动一小时后启动这个单元。第二个选项的意思是:自那以后每周启动这个单元一次。关于定时器有大量选项您可以设置——输入 **man systemd.time** 查看完整列表。
+>
+> Systemd 的时间精度默认为一分钟。也就是说,它会在设定时刻的一分钟内运行单元,但不一定精确到那一秒。这么做是基于电源管理方面的原因,但如果您需要一个没有任何延时且精确到毫秒的定时器,您可以添加以下一行:
+>
+> AccuracySec=1us
+>
+> 另外, **WakeSystem** 选项(可以被设置为 true 或 false)决定了定时器是否可以唤醒处于休眠状态的机器。
+
+
+
+**存在一个 Systemd 的图形界面程序,即便它已有多年未被积极维护。**
+
+### 日志文件:向 journald 问声好 ###
+
+Systemd 的第二个主要部分是 journal 。这是个日志系统,类似于 syslog 但也有些显著区别。如果您是个 Unix 日志管理模式的 粉丝,准备好热血沸腾吧:这是个二进制日志,因此您不能使用常规的命令行文本处理工具来解析它。这个设计决定不出意料地在网上引起了激烈的争论,但它的确有些优点。例如,日志可以被更系统地组织,带有更多元数据,因此可以更容易地根据可执行文件名和进程号等过滤出信息。
+
+要查看整个 journal,输入以下命令:
+
+ journalctl
+
+像许多其他的 Systemd 命令一样,该命令将输出通过管道的方式引向 **less** 程序,因此您可以使用空格键向下滚动,“/”(斜杠)键查找,以及其他熟悉的快捷键。您也能在此看到少许颜色,像红色的警告及错误信息。
+
+以上命令会输出很多信息。为了限制其只输出当前启动的消息,使用如下命令:
+
+ journalctl -b
+
+这就是 Systemd 大放异彩的地方!您想查看自上次启动以来的全部消息吗?试试 **journalctl -b -1** 吧。再上一次的?用 **-2** 替换 **-1** 吧。那自某个具体时间,例如2014年10月24日16:38以来的呢?
+
+ journalctl -b --since=”2014-10-24 16:38”
+
+即便您对二进制日志感到遗憾,那依然是个有用的特性,并且对许多系统管理员来说,构建类似的过滤器比起写正则表达式而言容易多了。
+
+我们已经可以根据特定的时间来准确查找日志了,那可以根据特定程序吗?对单元而言,试试这个:
+
+ journalctl -u gdm.service
+
+(注意:这是个查看 X server 产生的日志的好办法。)那根据特定的进程号?
+
+ journalctl _PID=890
+
+您甚至可以请求只看某个可执行文件产生的消息:
+
+ journalctl /usr/bin/pulseaudio
+
+若您想将输出的消息限制在某个优先级,可以使用 **-p** 选项。该选项参数为 0 的话只会显示紧急消息(也就是说,是时候向 **\$DEITY** 祈求保佑了),为 7 的话会显示所有消息,包括调试消息。请查看手册 (**man journalctl**) 获取更多关于优先级的信息。
+
+值得指出的是,您也可以将多个选项结合在一起,若想查看在当前启动中由 GDM 服务输出的优先级数小于等于 3 的消息,请使用下述命令:
+
+ journalctl -u gdm.service -p 3 -b
+
+最后,如果您仅仅想打开一个随 journal 持续更新的终端窗口,就像在没有 Systemd 时使用 tail 命令实现的那样,输入 **journalctl -f** 就好了。
+
+
+
+**二进制日志并不流行,但 journal 的确有它的优点,如非常方便的信息查找及过滤。**
+
+> ### 没有 Systemd 的生活?###
+>
+> 如果您就是完全不能接收 Systemd,您仍然有一些主流发现版中的选择。尤其是 Slackware,作为历史最为悠久的发行版,目前还没有做出改变,但它的主要开发者并没有将其从未来规划中移除。一些不出名的发行版也在坚持使用 SysVinit 。
+>
+> 但这又将持续多久呢?Gnome 正越来越依赖于 Systemd,其他的主流桌面环境也会步其后尘。这也是引起 BSD 社区一阵恐慌的原因:Systemd 与 Linux 内核紧密相连,导致在某种程度上,桌面环境正变得越来越不可移植。一种折中的解决方案也许会以 Uselessd ([http://uselessd.darknedgy.net][3]) 的形式到来:一种裁剪版的 Systemd,纯粹专注于启动和监控进程,而不消耗整个基础系统。
+>
+> 
+>
+> 若您不喜欢 Systemd,可以尝试一下 Gentoo 发行版,它将 Systemd 作为初始化工具的一种选择,但并不强制用户使用 Systemd。
+
+--------------------------------------------------------------------------------
+
+via: http://www.linuxvoice.com/linux-101-get-the-most-out-of-systemd/
+
+作者:[Mike Saunders][a]
+译者:[Ricky-Gong](https://github.com/Ricky-Gong)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.linuxvoice.com/author/mike/
+[1]:http://tinyurl.com/poorlennart
+[2]:http://tinyurl.com/m2e7mv8
+[3]:http://uselessd.darknedgy.net/
diff --git a/translated/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md b/translated/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md
new file mode 100644
index 0000000000..c42b278787
--- /dev/null
+++ b/translated/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md
@@ -0,0 +1,334 @@
+要超越Hello World 容器是件困难的事情
+================================================================================
+
+在[我的上一篇文章里][1], 我介绍了Linux 容器背后的技术的概念。我写了我知道的一切。容器对我来说也是比较新的概念。我写这篇文章的目的就是鼓励我真正的来学习这些东西。
+
+我打算在使用中学习。首先实践,然后上手并记录下我是怎么走过来的。我假设这里肯定有很多想"Hello World" 这种类型的知识帮助我快速的掌握基础。然后我能够更进一步,构建一个微服务容器或者其它东西。
+
+我的意思是还会比着更难吗,对吧?
+
+错了。
+
+可能对某些人来说这很简单,因为他们会耗费大量的时间专注在操作工作上。但是对我来说实际上是很困难的,可以从我在Facebook 上的状态展示出来的挫折感就可以看出了。
+
+但是还有一个好消息:我最终让它工作了。而且他工作的还不错。所以我准备分享向你分享我如何制作我的第一个微服务容器。我的痛苦可能会节省你不少时间呢。
+
+如果你曾经发现或者从来都没有发现自己处在这种境地:像我这样的人在这里解决一些你不需要解决的问题。
+
+让我们开始吧。
+
+
+### 一个缩略图微服务 ###
+
+我设计的微服务在理论上很简单。以JPG 或者PNG 格式在HTTP 终端发布一张数字照片,然后获得一个100像素宽的缩略图。
+
+下面是它实际的效果:
+
+
+
+我决定使用NodeJS 作为我的开发语言,使用[ImageMagick][2] 来转换缩略图。
+
+我的服务的第一版的逻辑如下所示:
+
+
+
+我下载了[Docker Toolbox][3],用它安装了Docker 的快速启动终端。Docker 快速启动终端使得创建容器更简单了。终端会启动一个装好了Docker 的Linux 虚拟机,它允许你在一个终端里运行Docker 命令。
+
+虽然在我的例子里,我的操作系统是Mac OS X。但是Windows 下也有相同的工具。
+
+我准备使用Docker 快速启动终端里为我的微服务创建一个容器镜像,然后从这个镜像运行容器。
+
+Docker 快速启动终端就运行在你使用的普通终端里,就像这样:
+
+
+
+### 第一个小问题和第一个大问题###
+
+所以我用NodeJS 和ImageMagick 瞎搞了一通然后让我的服务在本地运行起来了。
+
+然后我创建了Dockerfile,这是Docker 用来构建容器的配置脚本。(我会在后面深入介绍构建和Dockerfile)
+
+这是我运行Docker 快速启动终端的命令:
+
+ $ docker build -t thumbnailer:0.1
+
+获得如下回应:
+
+ docker: "build" requires 1 argument.
+
+呃。
+
+我估摸着过了15分钟:我忘记了在末尾参数输入一个点`.`。
+
+正确的指令应该是这样的:
+
+ $ docker build -t thumbnailer:0.1 .
+
+
+但是这不是我最后一个问题。
+
+我让这个镜像构建好了,然后我Docker 快速启动终端输入了[`run` 命令][4]来启动容器,名字叫`thumbnailer:0.1`:
+
+ $ docker run -d -p 3001:3000 thumbnailer:0.1
+
+参数`-p 3001:3000` 让NodeJS 微服务在Docker 内运行在端口3000,而在主机上则是3001。
+
+到目前卡起来都很好,对吧?
+
+错了。事情要马上变糟了。
+
+我指定了在Docker 快速启动中端里用命令`docker-machine` 运行的Docker 虚拟机的ip地址:
+
+ $ docker-machine ip default
+
+这句话返回了默认虚拟机的IP地址,即运行docker 的虚拟机。对于我来说,这个ip 地址是192.168.99.100。
+
+我浏览网页http://192.168.99.100:3001/ ,然后找到了我创建的上传图片的网页:
+
+
+
+我选择了一个文件,然后点击上传图片的按钮。
+
+但是它并没有工作。
+
+终端告诉我他无法找到我的微服务需要的`/upload` 目录。
+
+现在开始记住,我已经在此耗费了将近一天的时间-从浪费时间到研究问题。我此时感到了一些挫折感。
+
+然后灵光一闪。某人记起来微服务不应该自己做任何数据持久化的工作!保存数据应该是另一个服务的工作。
+
+所以容器找不到目录`/upload` 的原因到底是什么?这个问题的根本就是我的微服务在基础设计上就有问题。
+
+让我们看看另一幅图:
+
+
+
+我为什么要把文件保存到磁盘?微服务按理来说是很快的。为什么不能让我的全部工作都在内存里完成?使用内存缓冲可以解决“找不到目录”这个问题,而且可以提高我的应用的性能。
+
+这就是我现在所做的。下面是我的计划:
+
+
+
+这是我用NodeJS 写的在内存工作、生成缩略图的代码:
+
+ // Bind to the packages
+ var express = require('express');
+ var router = express.Router();
+ var path = require('path'); // used for file path
+ var im = require("imagemagick");
+
+ // Simple get that allows you test that you can access the thumbnail process
+ router.get('/', function (req, res, next) {
+ res.status(200).send('Thumbnailer processor is up and running');
+ });
+
+ // This is the POST handler. It will take the uploaded file and make a thumbnail from the
+ // submitted byte array. I know, it's not rocket science, but it serves a purpose
+ router.post('/', function (req, res, next) {
+ req.pipe(req.busboy);
+ req.busboy.on('file', function (fieldname, file, filename) {
+ var ext = path.extname(filename)
+
+ // Make sure that only png and jpg is allowed
+ if(ext.toLowerCase() != '.jpg' && ext.toLowerCase() != '.png'){
+ res.status(406).send("Service accepts only jpg or png files");
+ }
+
+ var bytes = [];
+
+ // put the bytes from the request into a byte array
+ file.on('data', function(data) {
+ for (var i = 0; i < data.length; ++i) {
+ bytes.push(data[i]);
+ }
+ console.log('File [' + fieldname + '] got bytes ' + bytes.length + ' bytes');
+ });
+
+ // Once the request is finished pushing the file bytes into the array, put the bytes in
+ // a buffer and process that buffer with the imagemagick resize function
+ file.on('end', function() {
+ var buffer = new Buffer(bytes,'binary');
+ console.log('Bytes got ' + bytes.length + ' bytes');
+
+ //resize
+ im.resize({
+ srcData: buffer,
+ height: 100
+ }, function(err, stdout, stderr){
+ if (err){
+ throw err;
+ }
+ // get the extension without the period
+ var typ = path.extname(filename).replace('.','');
+ res.setHeader("content-type", "image/" + typ);
+ res.status(200);
+ // send the image back as a response
+ res.send(new Buffer(stdout,'binary'));
+ });
+ });
+ });
+ });
+
+ module.exports = router;
+
+好了,回到正轨,已经可以在我的本地机器正常工作了。我该去休息了。
+
+但是,在我测试把这个微服务当作一个普通的Node 应用运行在本地时...
+
+
+
+它工作的很好。现在我要做的就是让他在容器里面工作。
+
+第二天我起床后喝点咖啡,然后创建一个镜像——这次没有忘记那个"."!
+
+ $ docker build -t thumbnailer:01 .
+
+我从缩略图工程的根目录开始构建。构建命令使用了根目录下的Dockerfile。它是这样工作的:把Dockerfile 放到你想构建镜像的地方,然后系统就默认使用这个Dockerfile。
+
+下面是我使用的Dockerfile 的内容:
+
+ FROM ubuntu:latest
+ MAINTAINER bob@CogArtTech.com
+
+ RUN apt-get update
+ RUN apt-get install -y nodejs nodejs-legacy npm
+ RUN apt-get install imagemagick libmagickcore-dev libmagickwand-dev
+ RUN apt-get clean
+
+ COPY ./package.json src/
+
+ RUN cd src && npm install
+
+ COPY . /src
+
+ WORKDIR src/
+
+ CMD npm start
+
+这怎么可能出错呢?
+
+### 第二个大问题 ###
+
+我运行了`build` 命令,然后出了这个错:
+
+ Do you want to continue? [Y/n] Abort.
+
+ The command '/bin/sh -c apt-get install imagemagick libmagickcore-dev libmagickwand-dev' returned a non-zero code: 1
+
+我猜测微服务出错了。我回到本地机器,从本机启动微服务,然后试着上传文件。
+
+然后我从NodeJS 获得了这个错误:
+
+ Error: spawn convert ENOENT
+
+怎么回事?之前还是好好的啊!
+
+我搜索了我能想到的所有的错误原因。差不多4个小时后,我想:为什么不重启一下机器呢?
+
+重启了,你猜猜结果?错误消失了!(译注:万能的重启)
+
+继续。
+
+### 将精灵关进瓶子 ###
+
+跳回正题:我需要完成构建工作。
+
+我使用[`rm` 命令][5]删除了虚拟机里所有的容器。
+
+ $ docker rm -f $(docker ps -a -q)
+
+`-f` 在这里的用处是强制删除运行中的镜像。
+
+然后删除了全部Docker 镜像,用的是[命令`rmi`][6]:
+
+ $ docker rmi if $(docker images | tail -n +2 | awk '{print $3}')
+
+我重新执行了命令构建镜像,安装容器,运行微服务。然后过了一个充满自我怀疑和沮丧的一个小时,我告诉我自己:这个错误可能不是微服务的原因。
+
+所以我重新看到了这个错误:
+
+ Do you want to continue? [Y/n] Abort.
+
+ The command '/bin/sh -c apt-get install imagemagick libmagickcore-dev libmagickwand-dev' returned a non-zero code: 1
+
+这太打击我了:构建脚本好像需要有人从键盘输入Y! 但是,这是一个非交互的Dockerfile 脚本啊。这里并没有键盘。
+
+回到Dockerfile,脚本元来时这样的:
+
+ RUN apt-get update
+ RUN apt-get install -y nodejs nodejs-legacy npm
+ RUN apt-get install imagemagick libmagickcore-dev libmagickwand-dev
+ RUN apt-get clean
+
+The second `apt-get` command is missing the `-y` flag which causes "yes" to be given automatically where usually it would be prompted for.
+第二个`apt-get` 忘记了`-y` 标志,这才是错误的根本原因。
+
+I added the missing `-y` to the command:
+我在这条命令后面添加了`-y` :
+
+ RUN apt-get update
+ RUN apt-get install -y nodejs nodejs-legacy npm
+ RUN apt-get install -y imagemagick libmagickcore-dev libmagickwand-dev
+ RUN apt-get clean
+
+猜一猜结果:经过将近两天的尝试和痛苦,容器终于正常工作了!整整两天啊!
+
+我完成了构建工作:
+
+ $ docker build -t thumbnailer:0.1 .
+
+启动了容器:
+
+ $ docker run -d -p 3001:3000 thumbnailer:0.1
+
+Got the IP address of the Virtual Machine:
+获取了虚拟机的IP 地址:
+
+ $ docker-machine ip default
+
+在我的浏览器里面输入 http://192.168.99.100:3001/ :
+
+上传页面打开了。
+
+我选择了一个图片,然后得到了这个:
+
+
+
+工作了!
+
+在容器里面工作了,我的第一次啊!
+
+### 这意味着什么? ###
+
+很久以前,我接受了这样一个道理:当你刚开始尝试某项技术时,即使是最简单的事情也会变得很困难。因此,我压抑了要成为房间里最聪明的人的欲望。然而最近几天尝试容器的过程就是一个充满自我怀疑的旅程。
+
+但是你想知道一些其它的事情吗?这篇文章是我在凌晨2点完成的,而每一个折磨的小时都值得了。为什么?因为这段时间你将自己全身心投入了喜欢的工作里。这件事很难,对于所有人来说都不是很容易就获得结果的。但是不要忘记:你在学习技术,运行世界的技术。
+
+P.S. 了解一下Hello World 容器的两段视频,这里会有 [Raziel Tabib’s][7] 的精彩工作内容。
+
+注:youtube视频
+
+
+千万被忘记第二部分...
+
+注:youtube视频
+
+
+--------------------------------------------------------------------------------
+
+via: https://deis.com/blog/2015/beyond-hello-world-containers-hard-stuff
+
+作者:[Bob Reselman][a]
+译者:[Ezio](https://github.com/oska874)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:https://deis.com/blog
+[1]:http://deis.com/blog/2015/developer-journey-linux-containers
+[2]:https://github.com/rsms/node-imagemagick
+[3]:https://www.docker.com/toolbox
+[4]:https://docs.docker.com/reference/commandline/run/
+[5]:https://docs.docker.com/reference/commandline/rm/
+[6]:https://docs.docker.com/reference/commandline/rmi/
+[7]:http://twitter.com/RazielTabib
diff --git a/translated/tech/20151122 Doubly linked list in the Linux Kernel.md b/translated/tech/20151122 Doubly linked list in the Linux Kernel.md
new file mode 100644
index 0000000000..631d918813
--- /dev/null
+++ b/translated/tech/20151122 Doubly linked list in the Linux Kernel.md
@@ -0,0 +1,258 @@
+Linux 内核里的数据结构——双向链表
+================================================================================
+
+双向链表
+--------------------------------------------------------------------------------
+
+
+Linux 内核自己实现了双向链表,可以在[include/linux/list.h](https://github.com/torvalds/linux/blob/master/include/linux/list.h)找到定义。我们将会从双向链表数据结构开始`内核的数据结构`。为什么?因为它在内核里使用的很广泛,你只需要在[free-electrons.com](http://lxr.free-electrons.com/ident?i=list_head) 检索一下就知道了。
+
+首先让我们看一下在[include/linux/types.h](https://github.com/torvalds/linux/blob/master/include/linux/types.h) 里的主结构体:
+
+```C
+struct list_head {
+ struct list_head *next, *prev;
+};
+```
+
+你可能注意到这和你以前见过的双向链表的实现方法是不同的。举个例子来说,在[glib](http://www.gnu.org/software/libc/) 库里是这样实现的:
+
+```C
+struct GList {
+ gpointer data;
+ GList *next;
+ GList *prev;
+};
+```
+
+通常来说一个链表会包含一个指向某个项目的指针。但是内核的实现并没有这样做。所以问题来了:`链表在哪里保存数据呢?`。实际上内核里实现的链表实际上是`侵入式链表`。侵入式链表并不在节点内保存数据-节点仅仅包含指向前后节点的指针,然后把数据是附加到链表的。这就使得这个数据结构是通用的,使用起来就不需要考虑节点数据的类型了。
+
+比如:
+
+```C
+struct nmi_desc {
+ spinlock_t lock;
+ struct list_head head;
+};
+```
+
+让我们看几个例子来理解一下在内核里是如何使用`list_head` 的。如上所述,在内核里有实在很多不同的地方用到了链表。我们来看一个在杂项字符驱动里面的使用的例子。在 [drivers/char/misc.c](https://github.com/torvalds/linux/blob/master/drivers/char/misc.c) 的杂项字符驱动API 被用来编写处理小型硬件和虚拟设备的小驱动。这些驱动共享相同的主设备号:
+
+```C
+#define MISC_MAJOR 10
+```
+
+但是都有各自不同的次设备号。比如:
+
+```
+ls -l /dev | grep 10
+crw------- 1 root root 10, 235 Mar 21 12:01 autofs
+drwxr-xr-x 10 root root 200 Mar 21 12:01 cpu
+crw------- 1 root root 10, 62 Mar 21 12:01 cpu_dma_latency
+crw------- 1 root root 10, 203 Mar 21 12:01 cuse
+drwxr-xr-x 2 root root 100 Mar 21 12:01 dri
+crw-rw-rw- 1 root root 10, 229 Mar 21 12:01 fuse
+crw------- 1 root root 10, 228 Mar 21 12:01 hpet
+crw------- 1 root root 10, 183 Mar 21 12:01 hwrng
+crw-rw----+ 1 root kvm 10, 232 Mar 21 12:01 kvm
+crw-rw---- 1 root disk 10, 237 Mar 21 12:01 loop-control
+crw------- 1 root root 10, 227 Mar 21 12:01 mcelog
+crw------- 1 root root 10, 59 Mar 21 12:01 memory_bandwidth
+crw------- 1 root root 10, 61 Mar 21 12:01 network_latency
+crw------- 1 root root 10, 60 Mar 21 12:01 network_throughput
+crw-r----- 1 root kmem 10, 144 Mar 21 12:01 nvram
+brw-rw---- 1 root disk 1, 10 Mar 21 12:01 ram10
+crw--w---- 1 root tty 4, 10 Mar 21 12:01 tty10
+crw-rw---- 1 root dialout 4, 74 Mar 21 12:01 ttyS10
+crw------- 1 root root 10, 63 Mar 21 12:01 vga_arbiter
+crw------- 1 root root 10, 137 Mar 21 12:01 vhci
+```
+
+现在让我们看看它是如何使用链表的。首先看一下结构体`miscdevice`:
+
+```C
+struct miscdevice
+{
+ int minor;
+ const char *name;
+ const struct file_operations *fops;
+ struct list_head list;
+ struct device *parent;
+ struct device *this_device;
+ const char *nodename;
+ mode_t mode;
+};
+```
+
+可以看到结构体的第四个变量`list` 是所有注册过的设备的链表。在源代码文件的开始可以看到这个链表的定义:
+
+```C
+static LIST_HEAD(misc_list);
+```
+
+它实际上是对用`list_head` 类型定义的变量的扩展。
+
+```C
+#define LIST_HEAD(name) \
+ struct list_head name = LIST_HEAD_INIT(name)
+```
+
+然后使用宏`LIST_HEAD_INIT` 进行初始化,这会使用变量`name` 的地址来填充`prev`和`next` 结构体的两个变量。
+
+```C
+#define LIST_HEAD_INIT(name) { &(name), &(name) }
+```
+
+现在来看看注册杂项设备的函数`misc_register`。它在开始就用 `INIT_LIST_HEAD` 初始化了`miscdevice->list`。
+
+```C
+INIT_LIST_HEAD(&misc->list);
+```
+
+作用和宏`LIST_HEAD_INIT`一样。
+
+```C
+static inline void INIT_LIST_HEAD(struct list_head *list)
+{
+ list->next = list;
+ list->prev = list;
+}
+```
+
+在函数`device_create` 创建了设备后我们就用下面的语句将设备添加到设备链表:
+
+```
+list_add(&misc->list, &misc_list);
+```
+
+内核文件`list.h` 提供了项链表添加新项的API 接口。我们来看看它的实现:
+
+
+```C
+static inline void list_add(struct list_head *new, struct list_head *head)
+{
+ __list_add(new, head, head->next);
+}
+```
+
+实际上就是使用3个指定的参数来调用了内部函数`__list_add`:
+
+* new - 新项。
+* head - 新项将会被添加到`head`之前.
+* head->next - `head` 之后的项。
+
+`__list_add`的实现非常简单:
+
+```C
+static inline void __list_add(struct list_head *new,
+ struct list_head *prev,
+ struct list_head *next)
+{
+ next->prev = new;
+ new->next = next;
+ new->prev = prev;
+ prev->next = new;
+}
+```
+
+我们会在`prev`和`next` 之间添加一个新项。所以我们用宏`LIST_HEAD_INIT`定义的`misc` 链表会包含指向`miscdevice->list` 的向前指针和向后指针。
+
+这里有一个问题:如何得到列表的内容呢?这里有一个特殊的宏:
+
+```C
+#define list_entry(ptr, type, member) \
+ container_of(ptr, type, member)
+```
+
+使用了三个参数:
+
+* ptr - 指向链表头的指针;
+* type - 结构体类型;
+* member - 在结构体内类型为`list_head` 的变量的名字;
+
+比如说:
+
+```C
+const struct miscdevice *p = list_entry(v, struct miscdevice, list)
+```
+
+然后我们就可以使用`p->minor` 或者 `p->name`来访问`miscdevice`。让我们来看看`list_entry` 的实现:
+
+```C
+#define list_entry(ptr, type, member) \
+ container_of(ptr, type, member)
+```
+
+如我们所见,它仅仅使用相同的参数调用了宏`container_of`。初看这个宏挺奇怪的:
+
+```C
+#define container_of(ptr, type, member) ({ \
+ const typeof( ((type *)0)->member ) *__mptr = (ptr); \
+ (type *)( (char *)__mptr - offsetof(type,member) );})
+```
+
+首先你可以注意到花括号内包含两个表达式。编译器会执行花括号内的全部语句,然后返回最后的表达式的值。
+
+举个例子来说:
+
+```
+#include
+
+int main() {
+ int i = 0;
+ printf("i = %d\n", ({++i; ++i;}));
+ return 0;
+}
+```
+
+最终会打印`2`
+
+下一点就是`typeof`,它也很简单。就如你从名字所理解的,它仅仅返回了给定变量的类型。当我第一次看到宏`container_of`的实现时,让我觉得最奇怪的就是`container_of`中的0.实际上这个指针巧妙的计算了从结构体特定变量的偏移,这里的`0`刚好就是位宽里的零偏移。让我们看一个简单的例子:
+
+```C
+#include
+
+struct s {
+ int field1;
+ char field2;
+ char field3;
+};
+
+int main() {
+ printf("%p\n", &((struct s*)0)->field3);
+ return 0;
+}
+```
+
+结果显示`0x5`。
+
+下一个宏`offsetof` 会计算从结构体的某个变量的相对于结构体起始地址的偏移。它的实现和上面类似:
+
+```C
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+```
+
+现在我们来总结一下宏`container_of`。只需要知道结构体里面类型为`list_head` 的变量的名字和结构体容器的类型,它可以通过结构体的变量`list_head`获得结构体的起始地址。在宏定义的第一行,声明了一个指向结构体成员变量`ptr`的指针`__mptr`,并且把`ptr` 的地址赋给它。现在`ptr` 和`__mptr` 指向了同一个地址。从技术上讲我们并不需要这一行,但是它可以方便的进行类型检查。第一行保证了特定的结构体(参数`type`)包含成员变量`member`。第二行代码会用宏`offsetof`计算成员变量相对于结构体起始地址的偏移,然后从结构体的地址减去这个偏移,最后就得到了结构体。
+
+当然了`list_add` 和 `list_entry`不是``提供的唯一功能。双向链表的实现还提供了如下API:
+
+* list_add
+* list_add_tail
+* list_del
+* list_replace
+* list_move
+* list_is_last
+* list_empty
+* list_cut_position
+* list_splice
+* list_for_each
+* list_for_each_entry
+
+等等很多其它API。
+
+via: https://github.com/0xAX/linux-insides/edit/master/DataStructures/dlist.md
+
+译者:[Ezio](https://github.com/oska874)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
diff --git a/translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md b/translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md
new file mode 100644
index 0000000000..fd61e5a939
--- /dev/null
+++ b/translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md
@@ -0,0 +1,236 @@
+在 Ubuntu 15.10 上为单个网卡设置多个 IP 地址
+================================================================================
+有时候你可能想在你的网卡上使用多个 IP 地址。遇到这种情况你会怎么办呢?买一个新的网卡并分配一个新的 IP?不,这没有必要(至少在小网络中)。现在我们可以在 Ubuntu 系统中为一个网卡分配多个 IP 地址。想知道怎么做到的?跟着我往下看,其实并不难。
+
+这个方法也适用于 Debian 以及它的衍生版本。
+
+### 临时添加 IP 地址 ###
+
+首先,让我们找到网卡的 IP 地址。在我的 Ubuntu 15.10 服务器版中,我只使用了一个网卡。
+
+运行下面的命令找到 IP 地址:
+
+ sudo ip addr
+
+**事例输出:**
+
+ 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default
+ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
+ inet 127.0.0.1/8 scope host lo
+ valid_lft forever preferred_lft forever
+ inet6 ::1/128 scope host
+ valid_lft forever preferred_lft forever
+ 2: enp0s3: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
+ link/ether 08:00:27:2a:03:4b brd ff:ff:ff:ff:ff:ff
+ inet 192.168.1.103/24 brd 192.168.1.255 scope global enp0s3
+ valid_lft forever preferred_lft forever
+ inet6 fe80::a00:27ff:fe2a:34e/64 scope link
+ valid_lft forever preferred_lft forever
+
+或
+
+ sudo ifconfig
+
+**事例输出:**
+
+ enp0s3 Link encap:Ethernet HWaddr 08:00:27:2a:03:4b
+ inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0
+ inet6 addr: fe80::a00:27ff:fe2a:34e/64 Scope:Link
+ UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
+ RX packets:186 errors:0 dropped:0 overruns:0 frame:0
+ TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
+ collisions:0 txqueuelen:1000
+ RX bytes:21872 (21.8 KB) TX bytes:9666 (9.6 KB)
+ lo Link encap:Local Loopback
+ inet addr:127.0.0.1 Mask:255.0.0.0
+ inet6 addr: ::1/128 Scope:Host
+ UP LOOPBACK RUNNING MTU:65536 Metric:1
+ RX packets:217 errors:0 dropped:0 overruns:0 frame:0
+ TX packets:217 errors:0 dropped:0 overruns:0 carrier:0
+ collisions:0 txqueuelen:0
+ RX bytes:38793 (38.7 KB) TX bytes:38793 (38.7 KB)
+
+正如你在上面看到的,我的网卡名称是 **enp0s3**,它的 IP 地址是 **192.168.1.103**。
+
+现在让我们来为网卡添加一个新的 IP 地址,例如说 **192.168.1.104**。
+
+打开你的终端并运行下面的命令添加额外的 IP。
+
+ sudo ip addr add 192.168.1.104/24 dev enp0s3
+
+用命令检查是否启用了新的 IP:
+
+ sudo ip address show enp0s3
+
+**样例输出:**
+
+ 2: enp0s3: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
+ link/ether 08:00:27:2a:03:4e brd ff:ff:ff:ff:ff:ff
+ inet 192.168.1.103/24 brd 192.168.1.255 scope global enp0s3
+ valid_lft forever preferred_lft forever
+ inet 192.168.1.104/24 scope global secondary enp0s3
+ valid_lft forever preferred_lft forever
+ inet6 fe80::a00:27ff:fe2a:34e/64 scope link
+ valid_lft forever preferred_lft forever
+
+类似地,你可以添加想要的任意多的 IP 地址。
+
+让我们 ping 一下这个 IP 地址验证一下。
+
+ sudo ping 192.168.1.104
+
+**样例输出**
+
+ PING 192.168.1.104 (192.168.1.104) 56(84) bytes of data.
+ 64 bytes from 192.168.1.104: icmp_seq=1 ttl=64 time=0.901 ms
+ 64 bytes from 192.168.1.104: icmp_seq=2 ttl=64 time=0.571 ms
+ 64 bytes from 192.168.1.104: icmp_seq=3 ttl=64 time=0.521 ms
+ 64 bytes from 192.168.1.104: icmp_seq=4 ttl=64 time=0.524 ms
+
+好极了,它能工作!
+
+要删除 IP,只需要运行:
+
+ sudo ip addr del 192.168.1.104/24 dev enp0s3
+
+再检查一下是否删除了 IP。
+
+ sudo ip address show enp0s3
+
+**样例输出:**
+
+ 2: enp0s3: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
+ link/ether 08:00:27:2a:03:4e brd ff:ff:ff:ff:ff:ff
+ inet 192.168.1.103/24 brd 192.168.1.255 scope global enp0s3
+ valid_lft forever preferred_lft forever
+ inet6 fe80::a00:27ff:fe2a:34e/64 scope link
+ valid_lft forever preferred_lft forever
+
+可以看到已经没有了!!
+
+也许你已经知道,你重启系统后会丢失这些设置。那么怎么设置才能永久有效呢?这也很简单。
+
+### 添加永久 IP 地址 ###
+
+Ubuntu 系统的网卡配置文件是 **/etc/network/interfaces**。
+
+让我们来看看上面文件的具体内容。
+
+ sudo cat /etc/network/interfaces
+
+**输出样例:**
+
+ # This file describes the network interfaces available on your system
+ # and how to activate them. For more information, see interfaces(5).
+ source /etc/network/interfaces.d/*
+ # The loopback network interface
+ auto lo
+ iface lo inet loopback
+ # The primary network interface
+ auto enp0s3
+ iface enp0s3 inet dhcp
+
+正如你在上面输出中看到的,网卡启用了 DHCP。
+
+现在,让我们来分配一个额外的地址,例如 **192.168.1.104/24**。
+
+编辑 **/etc/network/interfaces**:
+
+ sudo nano /etc/network/interfaces
+
+按照黑色字体标注的添加额外的 IP 地址。
+
+ # This file describes the network interfaces available on your system
+ # and how to activate them. For more information, see interfaces(5).
+ source /etc/network/interfaces.d/*
+ # The loopback network interface
+ auto lo
+ iface lo inet loopback
+ # The primary network interface
+ auto enp0s3
+ iface enp0s3 inet dhcp
+ iface enp0s3 inet static
+ address 192.168.1.104/24
+
+保存并关闭文件。
+
+无需重启运行下面的命令使更改生效。
+
+ sudo ifdown enp0s3 && sudo ifup enp0s3
+
+**样例输出:**
+
+ Killed old client process
+ Internet Systems Consortium DHCP Client 4.3.1
+ Copyright 2004-2014 Internet Systems Consortium.
+ All rights reserved.
+ For info, please visit https://www.isc.org/software/dhcp/
+ Listening on LPF/enp0s3/08:00:27:2a:03:4e
+ Sending on LPF/enp0s3/08:00:27:2a:03:4e
+ Sending on Socket/fallback
+ DHCPRELEASE on enp0s3 to 192.168.1.1 port 67 (xid=0x225f35)
+ Internet Systems Consortium DHCP Client 4.3.1
+ Copyright 2004-2014 Internet Systems Consortium.
+ All rights reserved.
+ For info, please visit https://www.isc.org/software/dhcp/
+ Listening on LPF/enp0s3/08:00:27:2a:03:4e
+ Sending on LPF/enp0s3/08:00:27:2a:03:4e
+ Sending on Socket/fallback
+ DHCPDISCOVER on enp0s3 to 255.255.255.255 port 67 interval 3 (xid=0xdfb94764)
+ DHCPREQUEST of 192.168.1.103 on enp0s3 to 255.255.255.255 port 67 (xid=0x6447b9df)
+ DHCPOFFER of 192.168.1.103 from 192.168.1.1
+ DHCPACK of 192.168.1.103 from 192.168.1.1
+ bound to 192.168.1.103 -- renewal in 35146 seconds.
+
+**注意**:如果你从远程连接到服务器,把上面的两个命令放到**一行**中**非常重要**,因为第一个命令会断掉你的连接。而采用这种方式可以存活你的 ssh 会话。
+
+现在,让我们用下面的命令来检查一下是否添加了新的 IP:
+
+ sudo ip address show enp0s3
+
+**输出样例:**
+
+ 2: enp0s3: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
+ link/ether 08:00:27:2a:03:4e brd ff:ff:ff:ff:ff:ff
+ inet 192.168.1.103/24 brd 192.168.1.255 scope global enp0s3
+ valid_lft forever preferred_lft forever
+ inet 192.168.1.104/24 brd 192.168.1.255 scope global secondary enp0s3
+ valid_lft forever preferred_lft forever
+ inet6 fe80::a00:27ff:fe2a:34e/64 scope link
+ valid_lft forever preferred_lft forever
+
+很好!我们已经添加了额外的 IP。
+
+再次 ping IP 地址进行验证。
+
+ sudo ping 192.168.1.104
+
+**样例输出:**
+
+ PING 192.168.1.104 (192.168.1.104) 56(84) bytes of data.
+ 64 bytes from 192.168.1.104: icmp_seq=1 ttl=64 time=0.137 ms
+ 64 bytes from 192.168.1.104: icmp_seq=2 ttl=64 time=0.050 ms
+ 64 bytes from 192.168.1.104: icmp_seq=3 ttl=64 time=0.054 ms
+ 64 bytes from 192.168.1.104: icmp_seq=4 ttl=64 time=0.067 ms
+
+好极了!它能正常工作。就是这样。
+
+想知道怎么给 CentOS/RHEL/Scientific Linux/Fedora 系统添加额外的 IP 地址,可以点击下面的链接。
+
+注:此篇文章以前做过选题:20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md
+- [Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7][1]
+
+周末愉快!
+
+--------------------------------------------------------------------------------
+
+via: http://www.unixmen.com/assign-multiple-ip-addresses-to-one-interface-on-ubuntu-15-10/
+
+作者:[SK][a]
+译者:[ictlyh](http://mutouxiaogui.cn/blog/)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.unixmen.com/author/sk/
+[1]:http://www.unixmen.com/linux-basics-assign-multiple-ip-addresses-single-network-interface-card-centos-7/
\ No newline at end of file
diff --git a/translated/tech/20151123 How to access Dropbox from the command line in Linux.md b/translated/tech/20151123 How to access Dropbox from the command line in Linux.md
new file mode 100644
index 0000000000..6c5f73e596
--- /dev/null
+++ b/translated/tech/20151123 How to access Dropbox from the command line in Linux.md
@@ -0,0 +1,97 @@
+Linux 中如何从命令行访问 Dropbox
+================================================================================
+在当今这个多设备的环境下,云存储无处不在。无论身处何方,人们都想通过多种设备来从云存储中获取所需的内容。由于优雅的 UI 和完美的跨平台兼容性,Dropbox 已成为最为广泛使用的云存储服务。 Dropbox 的流行已引发了一系列官方或非官方 Dropbox 客户端的出现,它们支持不同的操作系统平台。
+
+当然 Linux 平台下也有着自己的 Dropbox 客户端: 既有命令行的,也有图形界面。[Dropbox Uploader][1] 是一个简单易用的 Dropbox 命令行客户端,它是用 BASH 脚本语言所编写的。在这篇教程中,我将描述 **在 Linux 中如何使用 Dropbox Uploader 通过命令行来访问 Dropbox**。
+
+### Linux 中安装和配置 Dropbox Uploader ###
+
+要使用 Dropbox Uploader,你需要下载该脚本并使其可被执行。
+
+ $ wget https://raw.github.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh
+ $ chmod +x dropbox_uploader.sh
+
+请确保你已经在系统中安装了 `curl`,因为 Dropbox Uploader 通过 curl 来运行 Dropbox 的 API。
+
+要配置 Dropbox Uploader,只需运行 dropbox_uploader.sh 即可。当你第一次运行这个脚本时,它将询问你,以使得它可以访问你的 Dropbox 账户。
+
+ $ ./dropbox_uploader.sh
+
+
+
+如上图所指示的那样,你需要通过浏览器访问 [https://www.dropbox.com/developers/apps][2] 页面,并创建一个新的 Dropbox app。接着像下图那样填入新 app 的相关信息,并输入 app 的名称,它与 Dropbox Uploader 所生成的 app 名称类似。
+
+
+
+在你创建好一个新的 app 之后,你将在下一个页面看到 app key 和 app secret。请记住它们。
+
+
+
+然后在正运行着 dropbox_uploader.sh 的终端窗口中输入 app key 和 app secret。然后 dropbox_uploader.sh 将产生一个 oAUTH 网址(例如,https://www.dropbox.com/1/oauth/authorize?oauth_token=XXXXXXXXXXXX)。
+
+
+
+接着通过浏览器访问那个 oAUTH 网址,并同意访问你的 Dropbox 账户。
+
+
+
+这便完成了 Dropbox Uploader 的配置。若要确认 Dropbox Uploader 是否真的被成功地认证了,可以运行下面的命令。
+
+ $ ./dropbox_uploader.sh info
+
+----------
+
+ Dropbox Uploader v0.12
+
+ > Getting info...
+
+ Name: Dan Nanni
+ UID: XXXXXXXXXX
+ Email: my@email_address
+ Quota: 2048 Mb
+ Used: 13 Mb
+ Free: 2034 Mb
+
+### Dropbox Uploader 示例 ###
+
+要显示根目录中的所有内容,运行:
+
+ $ ./dropbox_uploader.sh list
+
+要列出某个特定文件夹中的所有内容,运行:
+
+ $ ./dropbox_uploader.sh list Documents/manuals
+
+要上传一个本地文件到一个远程的 Dropbox 文件夹,使用:
+
+ $ ./dropbox_uploader.sh upload snort.pdf Documents/manuals
+
+要从 Dropbox 下载一个远程的文件到本地,使用:
+
+ $ ./dropbox_uploader.sh download Documents/manuals/mysql.pdf ./mysql.pdf
+
+要从 Dropbox 下载一个完整的远程文件夹到一个本地的文件夹,运行:
+
+ $ ./dropbox_uploader.sh download Documents/manuals ./manuals
+
+要在 Dropbox 上创建一个新的远程文件夹,使用:
+
+ $ ./dropbox_uploader.sh mkdir Documents/whitepapers
+
+要完全删除 Dropbox 中某个远程的文件夹(包括它所含的所有内容),运行:
+
+ $ ./dropbox_uploader.sh delete Documents/manuals
+
+--------------------------------------------------------------------------------
+
+via: http://xmodulo.com/access-dropbox-command-line-linux.html
+
+作者:[Dan Nanni][a]
+译者:[FSSlc](https://github.com/FSSlc)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://xmodulo.com/author/nanni
+[1]:http://www.andreafabrizi.it/?dropbox_uploader
+[2]:https://www.dropbox.com/developers/apps
diff --git a/translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md b/translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md
new file mode 100644
index 0000000000..11d2e9b5b4
--- /dev/null
+++ b/translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md
@@ -0,0 +1,139 @@
+如何在 Ubuntu 15.04 / CentOS 7 上安装 Android Studio
+================================================================================
+随着最近几年智能手机的进步,安卓成为了最大的手机平台之一,也有很多免费的用于开发安卓应用的工具。Android Studio 是基于 [IntelliJ IDEA][1] 用于开发安卓应用的集成开发环境。它是 Google 2014 年发布的免费开源软件,继 Eclipse 之后成为主要的 IDE。
+
+在这篇文章,我们一起来学习如何在 Ubuntu 15.04 和 CentOS 7 上安装 Android Studio。
+
+### 在 Ubuntu 15.04 上安装 ###
+
+我们可以用两种方式安装 Android Studio。第一种是配置必须的库然后再安装它;另一种是从 Android 官方网站下载然后再本地编译安装。在下面的例子中,我们会使用命令行设置库并安装它。在继续下一步之前,我们需要确保我们已经安装了 JDK 1.6 或者更新版本。
+
+这里,我打算安装 JDK 1.8。
+
+ $ sudo add-apt-repository ppa:webupd8team/java
+
+ $ sudo apt-get update
+
+ $ sudo apt-get install oracle-java8-installer oracle-java8-set-default
+
+验证 java 是否安装成功:
+
+ poornima@poornima-Lenovo:~$ java -version
+
+现在,设置安装 Android Studio 需要的库
+
+ $ sudo apt-add-repository ppa:paolorotolo/android-studio
+
+
+
+ $ sudo apt-get update
+
+ $ sudo apt-get install android-studio
+
+上面的安装命令会在 /opt 目录下面安装 Android Studio。
+
+现在,运行下面的命令启动安装窗口:
+
+ $ /opt/android-studio/bin/studio.sh
+
+这会激活安装窗口。下面的截图展示了安装 Android Studio 的过程。
+
+
+
+
+
+
+
+你点击了 Finish 按钮之后,就会显示同意协议页面。当你接受协议之后,它就开始下载需要的组件。
+
+
+
+这一步之后就完成了 Android Studio 的安装。当你重启 Android Studio 时,你会看到下面的欢迎界面,从这里你可以开始用 Android Studio 工作了。
+
+
+
+### 在 CentOS 7 上安装 ###
+
+现在再让我们来看看如何在 CentOS 7 上安装 Android Studio。这里你同样需要安装 JDK 1.6 或者更新版本。如果你不是 root 用户,记得在命令前面使用 ‘sudo’。你可以下载[最新版本][2]的 JDK。如果你已经安装了一个比较旧的版本,在安装新的版本之前你需要先卸载旧版本。在下面的例子中,我会通过下载需要的 rpm 包安装 JDK 1.8.0_65。
+
+ [root@li1260-39 ~]# rpm -ivh jdk-8u65-linux-x64.rpm
+ Preparing... ################################# [100%]
+ Updating / installing...
+ 1:jdk1.8.0_65-2000:1.8.0_65-fcs ################################# [100%]
+ Unpacking JAR files...
+ tools.jar...
+ plugin.jar...
+ javaws.jar...
+ deploy.jar...
+ rt.jar...
+ jsse.jar...
+ charsets.jar...
+ localedata.jar...
+ jfxrt.jar...
+
+如果没有正确设置 Java 路径,你会看到错误信息。因此,设置正确的路径:
+
+ export JAVA_HOME=/usr/java/jdk1.8.0_25/
+ export PATH=$PATH:$JAVA_HOME
+
+检查是否安装了正确的版本:
+
+ [root@li1260-39 ~]# java -version
+ java version "1.8.0_65"
+ Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
+ Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
+
+如果你安装 Android Studio 的时候看到任何类似 “unable-to-run-mksdcard-sdk-tool:” 的错误信息,你可能要在 CentOS 7 64 位系统中安装以下软件包:
+
+ glibc.i686
+
+ glibc-devel.i686
+
+ libstdc++.i686
+
+ zlib-devel.i686
+
+ ncurses-devel.i686
+
+ libX11-devel.i686
+
+ libXrender.i686
+
+ libXrandr.i686
+
+通过从 [Android 网站][3] 下载 IDE 文件然后解压安装 studio 也是一样的。
+
+ [root@li1260-39 tmp]# unzip android-studio-ide-141.2343393-linux.zip
+
+移动 android-studio 目录到 /opt 目录
+
+ [root@li1260-39 tmp]# mv /tmp/android-studio/ /opt/
+
+需要的话你可以创建一个到 studio 可执行文件的符号链接用于快速启动。
+
+ [root@li1260-39 tmp]# ln -s /opt/android-studio/bin/studio.sh /usr/local/bin/android-studio
+
+现在在终端中启动 studio:
+
+ [root@localhost ~]#studio
+
+之后用于完成安装的截图和前面 Ubuntu 安装过程中的是一样的。安装完成后,你就可以开始开发你自己的 Android 应用了。
+
+### 总结 ###
+
+虽然发布不到一年,但是 Android Studio 已经替代 Eclipse 成为了安装开发最主要的 IDE。它是唯一一个能支持之后 Google 提供的 Android SDKs 和其它 Android 特性的官方 IDE 工具。那么,你还在等什么呢?赶快安装 Android Studio 然后体验开发安装应用的乐趣吧。
+
+--------------------------------------------------------------------------------
+
+via: http://linoxide.com/tools/install-android-studio-ubuntu-15-04-centos-7/
+
+作者:[B N Poornima][a]
+译者:[ictlyh](http://mutouxiaogui.cn/blog/)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://linoxide.com/author/bnpoornima/
+[1]:https://www.jetbrains.com/idea/
+[2]:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
+[3]:http://developer.android.com/sdk/index.html
\ No newline at end of file
diff --git a/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md b/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md
new file mode 100644
index 0000000000..83877c8488
--- /dev/null
+++ b/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md
@@ -0,0 +1,327 @@
+
+如何在FreeBSD 10.2上安装Nginx作为Apache的反向代理
+================================================================================
+Nginx是一款免费的,开源的HTTP和反向代理服务器, 以及一个代理POP3/IMAP的邮件服务器. Nginx是一款高性能的web服务器,其特点是丰富的功能,简单的结构以及低内存的占用. 第一个版本由 Igor Sysoev在2002年发布,然而到现在为止很多大的科技公司都在使用,包括 Netflix, Github, Cloudflare, WordPress.com等等
+
+在这篇教程里我们会 "**在freebsd 10.2系统上,安装和配置Nginx网络服务器作为Apache的反向代理**". Apache 会用PHP在8080端口上运行,并且我们需要在80端口配置Nginx的运行,用来接收用户/访问者的请求.如果网页的用户请求来自于浏览器的80端口, 那么Nginx会用Apache网络服务器和PHP来通过这个请求,并运行在8080端口.
+
+#### 前提条件 ####
+
+- FreeBSD 10.2.
+- Root 权限.
+
+### 步骤 1 - 更新系统 ###
+
+使用SSH证书登录到你的FreeBSD服务器以及使用下面命令来更新你的系统 :
+
+ freebsd-update fetch
+ freebsd-update install
+
+### 步骤 2 - 安装 Apache ###
+
+Apache是现在使用范围最广的网络服务器以及开源的HTTP服务器.在FreeBSD里Apache是未被默认安装的, 但是我们可以直接从端口下载,或者解压包在"/usr/ports/www/apache24" 目录下,再或者直接从PKG命令的FreeBSD系统信息库安装。在本教程中,我们将使用PKG命令从FreeBSD的库中安装:
+
+ pkg install apache24
+
+### 步骤 3 - 安装 PHP ###
+
+一旦成功安装Apache, 接着将会安装PHP并由一个用户处理一个PHP的文件请求. 我们将会用到如下的PKG命令来安装PHP :
+
+ pkg install php56 mod_php56 php56-mysql php56-mysqli
+
+### 步骤 4 - 配置 Apache 和 PHP ###
+
+一旦所有都安装好了, 我们将会配置Apache在8080端口上运行, 并让PHP与Apache一同工作. 为了配置Apache,我们可以编辑 "httpd.conf"这个配置文件, 然而PHP我们只需要复制PHP的配置文件 php.ini 在 "/usr/local/etc/"目录下.
+
+进入到 "/usr/local/etc/" 目录 并且复制 php.ini-production 文件到 php.ini :
+
+ cd /usr/local/etc/
+ cp php.ini-production php.ini
+
+下一步, 在Apache目录下通过编辑 "httpd.conf"文件来配置Apache :
+
+ cd /usr/local/etc/apache24
+ nano -c httpd.conf
+
+端口配置在第 **52**行 :
+
+ Listen 8080
+
+服务器名称配置在第 **219** 行:
+
+ ServerName 127.0.0.1:8080
+
+在第 **277**行,如果目录需要,添加的DirectoryIndex文件,Apache将直接作用于它 :
+
+ DirectoryIndex index.php index.html
+
+在第 **287**行下,配置Apache通过添加脚本来支持PHP :
+
+
+ SetHandler application/x-httpd-php
+
+
+ SetHandler application/x-httpd-php-source
+
+
+保存然后退出.
+
+现在用sysrc命令,来添加Apache作为开机启动项目 :
+
+ sysrc apache24_enable=yes
+
+然后用下面的命令测试Apache的配置 :
+
+ apachectl configtest
+
+如果到这里都没有问题的话,那么就启动Apache吧 :
+
+ service apache24 start
+
+如果全部完毕, 在"/usr/local/www/apache24/data" 目录下,创建一个phpinfo文件是验证PHP在Apache下完美运行的好方法 :
+
+ cd /usr/local/www/apache24/data
+ echo "" > info.php
+
+现在就可以访问 freebsd 的服务器 IP : 192.168.1.123:8080/info.php.
+
+
+
+Apache 是使用 PHP 在 8080端口下运行的.
+
+### 步骤 5 - 安装 Nginx ###
+
+Nginx 以低内存的占用作为一款高性能的web服务器以及反向代理服务器.在这个步骤里,我们将会使用Nginx作为Apache的反向代理, 因此让我们用pkg命令来安装它吧 :
+
+ pkg install nginx
+
+### 步骤 6 - 配置 Nginx ###
+
+一旦 Nginx 安装完毕, 在 "**nginx.conf**" 文件里,我们需要做一个新的配置文件来替换掉原来的nginx文件. 更改到 "/usr/local/etc/nginx/"目录下 并且默认备份到 nginx.conf 文件:
+
+ cd /usr/local/etc/nginx/
+ mv nginx.conf nginx.conf.oroginal
+
+现在就可以创建一个新的 nginx 配置文件了 :
+
+ nano -c nginx.conf
+
+然后粘贴下面的配置:
+
+ user www;
+ worker_processes 1;
+ error_log /var/log/nginx/error.log;
+
+ events {
+ worker_connections 1024;
+ }
+
+ http {
+ include mime.types;
+ default_type application/octet-stream;
+
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
+ '$status $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+ access_log /var/log/nginx/access.log;
+
+ sendfile on;
+ keepalive_timeout 65;
+
+ # Nginx cache configuration
+ proxy_cache_path /var/nginx/cache levels=1:2 keys_zone=my-cache:8m max_size=1000m inactive=600m;
+ proxy_temp_path /var/nginx/cache/tmp;
+ proxy_cache_key "$scheme$host$request_uri";
+
+ gzip on;
+
+ server {
+ #listen 80;
+ server_name _;
+
+ location /nginx_status {
+
+ stub_status on;
+ access_log off;
+ }
+
+ # redirect server error pages to the static page /50x.html
+ #
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root /usr/local/www/nginx-dist;
+ }
+
+ # proxy the PHP scripts to Apache listening on 127.0.0.1:8080
+ #
+ location ~ \.php$ {
+ proxy_pass http://127.0.0.1:8080;
+ include /usr/local/etc/nginx/proxy.conf;
+ }
+ }
+
+ include /usr/local/etc/nginx/vhost/*;
+
+ }
+
+保存退出.
+
+下一步, 在nginx目录下面,创建一个 **proxy.conf** 文件,使其作为反向代理 :
+
+ cd /usr/local/etc/nginx/
+ nano -c proxy.conf
+
+粘贴如下配置 :
+
+ proxy_buffering on;
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ client_max_body_size 10m;
+ client_body_buffer_size 128k;
+ proxy_connect_timeout 90;
+ proxy_send_timeout 90;
+ proxy_read_timeout 90;
+ proxy_buffers 100 8k;
+ add_header X-Cache $upstream_cache_status;
+
+保存退出.
+
+最后一步, 为 nginx 的高速缓存创建一个 "/var/nginx/cache"的新目录 :
+
+ mkdir -p /var/nginx/cache
+
+### 步骤 7 - 配置 Nginx 的虚拟主机 ###
+
+在这个步骤里面,我们需要创建一个新的虚拟主机域 "saitama.me", 以跟文件 "/usr/local/www/saitama.me" 和日志文件一同放在 "/var/log/nginx" 目录下.
+
+我们必须做的第一件事情就是创建新的目录来存放虚拟主机文件, 在这里我们将用到一个"**vhost**"的新文件. 并创建它 :
+
+ cd /usr/local/etc/nginx/
+ mkdir vhost
+
+创建好vhost 目录, 那么我们就进入这个目录并创建一个新的虚拟主机文件. 这里我取名为 "**saitama.conf**" :
+
+ cd vhost/
+ nano -c saitama.conf
+
+粘贴如下虚拟主机的配置 :
+
+ server {
+ # Replace with your freebsd IP
+ listen 192.168.1.123:80;
+
+ # Document Root
+ root /usr/local/www/saitama.me;
+ index index.php index.html index.htm;
+
+ # Domain
+ server_name www.saitama.me saitama.me;
+
+ # Error and Access log file
+ error_log /var/log/nginx/saitama-error.log;
+ access_log /var/log/nginx/saitama-access.log main;
+
+ # Reverse Proxy Configuration
+ location ~ \.php$ {
+ proxy_pass http://127.0.0.1:8080;
+ include /usr/local/etc/nginx/proxy.conf;
+
+ # Cache configuration
+ proxy_cache my-cache;
+ proxy_cache_valid 10s;
+ proxy_no_cache $cookie_PHPSESSID;
+ proxy_cache_bypass $cookie_PHPSESSID;
+ proxy_cache_key "$scheme$host$request_uri";
+
+ }
+
+ # Disable Cache for the file type html, json
+ location ~* .(?:manifest|appcache|html?|xml|json)$ {
+ expires -1;
+ }
+
+ # Enable Cache the file 30 days
+ location ~* .(jpg|png|gif|jpeg|css|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx)$ {
+ proxy_cache_valid 200 120m;
+ expires 30d;
+ proxy_cache my-cache;
+ access_log off;
+ }
+
+ }
+
+保存退出.
+
+下一步, 为nginx和虚拟主机创建一个新的日志目录 "/var/log/" :
+
+ mkdir -p /var/log/nginx/
+
+如果一切顺利, 在文件的根目录下创建文件 saitama.me :
+
+ cd /usr/local/www/
+ mkdir saitama.me
+
+### 步骤 8 - 测试 ###
+
+在这个步骤里面,我们只是测试我们的nginx和虚拟主机的配置.
+
+用如下命令测试nginx的配置 :
+
+ nginx -t
+
+如果一切都没有问题, 用 sysrc 命令添加nginx为启动项,并且启动nginx和重启apache:
+
+ sysrc nginx_enable=yes
+ service nginx start
+ service apache24 restart
+
+一切完毕后, 在 saitama.me 目录下,添加一个新的phpinfo文件来验证php的正常运行 :
+
+ cd /usr/local/www/saitama.me
+ echo "" > info.php
+
+然后便访问这个文档 : **www.saitama.me/info.php**.
+
+
+
+Nginx 作为Apache的反向代理正在运行了,PHP也同样在进行工作了.
+
+这是另一种结果 :
+
+Test .html 文件无缓存.
+
+ curl -I www.saitama.me
+
+
+
+Test .css 文件只有三十天的缓存.
+
+ curl -I www.saitama.me/test.css
+
+
+
+Test .php 文件正常缓存 :
+
+ curl -I www.saitama.me/info.php
+
+
+
+全部完成.
+
+### 总结 ###
+
+Nginx 是最广泛的 HTTP 和反向代理的服务器. 拥有丰富的高性能和低内存/RAM的使用功能. Nginx使用了太多的缓存, 我们可以在网络上缓存静态文件使得网页加速, 并且在用户需要的时候再缓存php文件. 这样Nginx 的轻松配置和使用,可以让它用作HTTP服务器 或者 apache的反向代理.
+
+--------------------------------------------------------------------------------
+
+via: http://linoxide.com/linux-how-to/install-nginx-reverse-proxy-apache-freebsd-10-2/
+
+作者:[Arul][a]
+译者:[KnightJoker](https://github.com/KnightJoker)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://linoxide.com/author/arulm/
\ No newline at end of file
diff --git a/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md b/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md
new file mode 100644
index 0000000000..7e0ccc87c7
--- /dev/null
+++ b/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md
@@ -0,0 +1,39 @@
+# 使用SystemBack备份你的Ubuntu/Linux Mint(系统还原)
+
+系统还原对于任何一款允许用户还原电脑到之前状态(包括文件系统,安装的应用,以及系统设置)的操作系统来说,都是必备功能,可以处理系统故障以及其他的问题。有的时候安装一个程序或者驱动可能让你的系统黑屏。系统还原则让你电脑里面的系统文件(译者注:是系统文件,并非普通文件,详情请看**注意**部分)和程序恢复到之前工作正常时候的状态,进而让你远离那让人头痛的排障过程了。而且它也不会影响你的文件,照片或者其他数据。简单的系统备份还原工具[Systemback](https://launchpad.net/systemback)让你很容易地创建系统备份以及用户配置文件。如果遇到问题,你可以傻瓜式还原。它还有一些额外的特征包括系统复制,系统安装以及Live系统创建。
+
+截图
+
+
+
+
+
+
+
+
+
+**注意**:使用系统还原不会还原你的文件,音乐,电子邮件或者其他任何类型的私人文件。对不同用户来讲,这既是优点又是缺点。坏消息是它不会还原你意外删除的文件,不过你可以通过一个文件恢复程序来解决这个问题。如果你的计算机上没有系统还原点,那么系统还原工具就不会奏效了。(最后一句没有太理解)
+
+> > >适用于Ubuntu 15.10 Wily/16.04/15.04 Vivid/14.04 Trusty/Linux Mint 14.x/其他Ubuntu衍生版,打开终端,将下面这些命令复制过去:
+
+终端命令:
+
+```
+sudo add-apt-repository ppa:nemh/systemback
+sudo apt-get update
+sudo apt-get install systemback
+
+```
+
+大功告成。
+
+--------------------------------------------------------------------------------
+
+via: http://www.noobslab.com/2015/11/backup-system-restore-point-your.html
+
+译者:[DongShuaike](https://github.com/DongShuaike)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[1]:https://launchpad.net/systemback
diff --git a/translated/tech/20151201 How to use Mutt email client with encrypted passwords.md b/translated/tech/20151201 How to use Mutt email client with encrypted passwords.md
new file mode 100644
index 0000000000..1e8a032a04
--- /dev/null
+++ b/translated/tech/20151201 How to use Mutt email client with encrypted passwords.md
@@ -0,0 +1,138 @@
+如何使用加密过密码的Mutt邮件客户端
+================================================================================
+Mutt是一个开源的Linux/UNIX终端环境下的邮件客户端。连同[Alpine][1],Mutt有充分的理由在Linux命令行热衷者中有最忠诚的追随者。想一下你对邮件客户端的期待的事情,Mutt拥有:多协议支持(e.g., POP3, IMAP and SMTP),S/MIME和PGP/GPG集成,线程会话,颜色编码,可定制宏/快捷键,等等。另外,基于命令行的Mutt相比笨重的web浏览器(如:Gmail,Ymail)或可视化邮件客户端(如:Thunderbird,MS Outlook)是一个轻量访问电子邮件的选择。
+
+当你想使用Mutt通过公司的SMTP/IMAP服务器访问或发送邮件,或取代网页邮件服务,可能所关心的一个问题是如何保护您的邮件凭据(如:SMTP/IMAP密码)存储在一个纯文本Mutt配置文件(~/.muttrc)。
+
+对于一些人安全的担忧,确实有一个容易的方法来**加密Mutt配置文件***,防止这种风险。在这个教程中,我描述了如何加密Mutt敏感配置,比如SMTP/IMAP密码使用GnuPG(GPG),一个开源的OpenPGP实现。
+
+### 第一步 (可选):创建GPG密钥 ###
+
+因为我们将要使用GPG加密Mutt配置文件,如果你没有,第一步就是创建一个GPG密钥(公有/私有 密钥对)。如果有,忽略这步。
+
+创建一个新GPG密钥,输入下面的。
+
+ $ gpg --gen-key
+
+选择密钥类型(RSA),密钥长度(2048 bits),和过期时间(0,不过期)。当出现用户ID提示时,输入你的名字(Dan Nanni) 和邮箱地址(myemail@email.com)关联到私有/公有密钥对。最后,输入一个密码来保护你的私钥。
+
+
+
+生成一个GPG密钥需要大量的随机字节熵,所以在生成密钥期间确保在你的系统上执行一些随机行为(如:打键盘,移动鼠标或者读写磁盘)。根据密钥长度决定生成GPG密钥要花几分钟或更多时间。
+
+
+
+### 第二部:加密Mutt敏感配置 ###
+
+下一步,在~/.mutt目录创建一个新的文本文件,然后把一些你想隐藏的Mutt敏感配置放进去。这个例子里,我指定了SMTP/IMAP密码。
+
+ $ mkdir ~/.mutt
+ $ vi ~/.mutt/password
+
+----------
+
+ set smtp_pass="XXXXXXX"
+ set imap_pass="XXXXXXX"
+
+现在gpg用你的公钥加密这个文件如下。
+
+ $ gpg -r myemail@email.com -e ~/.mutt/password
+
+这将创建~/.mutt/password.gpg,这个是一个GPG加密原始版本文件。
+
+继续删除~/.mutt/password,只保留GPG加密版本。
+
+### 第三部:创建完整Mutt配置文件 ###
+
+由于你已经在一个单独的文件加密了Mutt敏感配置,你可以在~/.muttrc指定其余的Mutt配置。然后增加下面这行在~/.muttrc末尾。
+
+ source "gpg -d ~/.mutt/password.gpg |"
+
+当你使用Mutt,这行将解密~/.mutt/password.gpg,然后将解密内容应用到你的Mutt配置。
+
+下面展示一个完整Mutt配置例子,这允许你用Mutt访问Gmail,没有暴露你的SMTP/IMAP密码。取代你用Gmail ID登陆你的账户。
+
+ set from = "yourgmailaccount@gmail.com"
+ set realname = "Your Name"
+ set smtp_url = "smtp://yourgmailaccount@smtp.gmail.com:587/"
+ set imap_user = "yourgmailaccount@gmail.com"
+ set folder = "imaps://imap.gmail.com:993"
+ set spoolfile = "+INBOX"
+ set postponed = "+[Google Mail]/Drafts"
+ set trash = "+[Google Mail]/Trash"
+ set header_cache =~/.mutt/cache/headers
+ set message_cachedir =~/.mutt/cache/bodies
+ set certificate_file =~/.mutt/certificates
+ set move = no
+ set imap_keepalive = 900
+
+ # encrypted IMAP/SMTP passwords
+ source "gpg -d ~/.mutt/password.gpg |"
+
+### 第四部(可选):配置GPG代理 ###
+
+这时候,你将可以使用加密了IMAP/SMTP密码的Mutt。无论如何,每次你运行Mutt,你都要先被提示输入一个GPG密码来使用你的私钥解密IMAP/SMTP密码。
+
+
+
+如果你想避免这样的GPG密码提示,你可以部署gpg代理。运行一个后台程序,gpg代理安全的缓存你的GPG密码,无需手工干预gpg自动从gpg代理获得你的GPG密码。如果你正在使用Linux桌面,你可以使用桌面特定方式来配置一些东西等价于gpg代理,例如,GNOME桌面的gnome-keyring-daemon。
+
+你可以在基于Debian系统安装gpg代理:
+
+$ sudo apt-get install gpg-agent
+
+gpg代理是基于Red Hat系统预装的。
+
+现在增加下面这些道你的.bashrc文件。
+
+ envfile="$HOME/.gnupg/gpg-agent.env"
+ if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then
+ eval "$(cat "$envfile")"
+ else
+ eval "$(gpg-agent --daemon --allow-preset-passphrase --write-env-file "$envfile")"
+ fi
+ export GPG_AGENT_INFO
+
+重载.bashrc,或单纯的登出然后登陆回来。
+
+ $ source ~/.bashrc
+
+现在确认GPG_AGENT_INFO环境变量已经设置妥当。
+
+ $ echo $GPG_AGENT_INFO
+
+----------
+
+ /tmp/gpg-0SKJw8/S.gpg-agent:942:1
+
+并且,当你输入gpg-agent命令时,你应该看到下面的信息。
+
+ $ gpg-agent
+
+----------
+
+ gpg-agent: gpg-agent running and available
+
+一旦gpg-agent启动运行,它将会在第一次提示你输入密码时缓存你的GPG密码。随后你运行Mutt多次,你将不会被提示要GPG密码(gpg-agent一直开着,缓存就不会过期)。
+
+
+
+### 结论 ###
+
+在这个指导里,我提出一个方法加密Mutt敏感配置如SMTP/IMAP密码使用GnuPG。注意,如果你想在Mutt上使用GnuPG或者登陆你的邮件信息,你可以参考[官方指南][2]在使用GPG与Mutt结合。
+
+如果你知道任何使用Mutt的安全技巧,随时分享他。
+
+--------------------------------------------------------------------------------
+
+via: http://xmodulo.com/mutt-email-client-encrypted-passwords.html
+
+作者:[Dan Nanni][a]
+译者:[wyangsun](https://github.com/wyangsun)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://xmodulo.com/author/nanni
+[1]:http://xmodulo.com/gmail-command-line-linux-alpine.html
+[2]:http://dev.mutt.org/trac/wiki/MuttGuide/UseGPG
diff --git a/translated/tech/20151204 Linux or Unix--jobs Command Examples.md b/translated/tech/20151204 Linux or Unix--jobs Command Examples.md
new file mode 100644
index 0000000000..fbb52a2544
--- /dev/null
+++ b/translated/tech/20151204 Linux or Unix--jobs Command Examples.md
@@ -0,0 +1,197 @@
+
+Linux / Unix: jobs 命令示例
+================================================================================
+
+我是个新的 Linux 或 Unix 用户。如何在 Linux 或类 Unix 系统中使用 BASH/KSH/TCSH 或者基于 POSIX 的 shell 来查看当前正在进行的作业?在 Unix/Linux 上怎样显示当前作业的状态?
+
+作业控制的是什么,停止/暂停进程(命令)的执行并按你的要求继续/恢复它们的执行。这是根据你的操作系统和 shell 如,bash/ksh 或 POSIX shell 来执行的。
+
+shell 会将当前所执行的作业保存在一个表中,可以用 jobs 命令来显示。
+
+### 目的 ###
+
+> 在当前 shell 会话中显示作业的状态。
+
+### 语法 ###
+
+其基本语法如下:
+
+ jobs
+
+或
+
+ jobs jobID
+
+或者
+
+ jobs [options] jobID
+
+### 启动一些作业来进行示范 ###
+
+在开始使用 jobs 命令前,你需要在系统上先启动多个作业。执行以下命令来启动作业:
+
+ ## 启动 xeyes, calculator, 和 gedit 文本编辑器 ###
+ xeyes &
+ gnome-calculator &
+ gedit fetch-stock-prices.py &
+
+最后,在前台运行 ping 命令:
+
+ ping www.cyberciti.biz
+
+按 **Ctrl-Z** 键来暂停 ping 命令的作业。
+
+### jobs 命令示例 ###
+
+要在当前 shell 显示作业的状态,请输入:
+
+ $ jobs
+
+输出示例:
+
+ [1] 7895 Running gpass &
+ [2] 7906 Running gnome-calculator &
+ [3]- 7910 Running gedit fetch-stock-prices.py &
+ [4]+ 7946 Stopped ping cyberciti.biz
+
+要显示进程 ID 或作业名称请使用 “P” 选项,输入:
+
+ $ jobs -p %p
+
+或者
+
+ $ jobs %p
+
+输出示例:
+
+ [4]- Stopped ping cyberciti.biz
+
+字符 % 后加一个作业。在这个例子中,你需要使用作业的名称来暂停它,如 %ping。
+
+### 如何显示进程 ID 不包含其他正常的信息? ###
+
+通过 jobs 命令的 -l(小写的 L)选项列出每个作业的详细信息,运行:
+
+ $ jobs -l
+
+示例输出:
+
+
+Fig.01: 在 shell 中显示 jobs 的状态
+
+### 如何只列出最近一次状态改变的进程? ###
+
+首先,启动一个新的工作如下所示:
+
+ $ sleep 100 &
+
+现在,只显示作业最近一次的状态(停止或退出),输入:
+
+ $ jobs -n
+
+示例输出:
+
+ [5]- Running sleep 100 &
+
+### 仅显示进程 ID(PID) ###
+
+通过 jobs 命令的 -p 选项仅显示 PID:
+
+ $ jobs -p
+
+示例输出:
+
+ 7895
+ 7906
+ 7910
+ 7946
+ 7949
+
+### 怎样只显示正在运行的作业呢? ###
+
+通过 jobs 命令的 -r 选项只显示正在运行的作业,输入:
+
+ $ jobs -r
+
+示例输出:
+
+ [1] Running gpass &
+ [2] Running gnome-calculator &
+ [3]- Running gedit fetch-stock-prices.py &
+
+### 怎样只显示已经停止工作的作业? ###
+
+通过 jobs 命令的 -s 选项只显示停止工作的作业,输入:
+
+ $ jobs -s
+
+示例输出:
+
+ [4]+ Stopped ping cyberciti.biz
+
+要继续执行 ping cyberciti.biz 作业,输入以下 bg 命令:
+
+ $ bg %4
+
+### jobs 命令选项 ###
+
+摘自 [bash(1)][1] 命令 man 手册页:
+
+注:表格
+
+
+
+ | Option |
+ Description |
+
+
+ | -l |
+ Show process id's in addition to the normal information. |
+
+
+ | -p |
+ Show process id's only. |
+
+
+ | -n |
+ Show only processes that have changed status since the last notification are printed. |
+
+
+ | -r |
+ Restrict output to running jobs only. |
+
+
+ | -s |
+ Restrict output to stopped jobs only. |
+
+
+ | -x |
+ COMMAND is run after all job specifications that appear in ARGS have been replaced with the process ID of that job's process group leader./td> |
+
+
+
+
+### 关于 /usr/bin/jobs 和 shell 内建的说明 ###
+
+输入以下 type 命令找出是否 jobs 命令是 shell 的内建命令或是外部命令:
+
+ $ type -a jobs
+
+输出示例:
+
+ jobs is a shell builtin
+ jobs is /usr/bin/jobs
+
+在几乎所有情况下,jobs 命令都是作为 BASH/KSH/POSIX shell 内建命令被实现的。/usr/bin/jobs 命令不能被用在当前 shell 中。/usr/bin/jobs 命令工作在不同的环境中不共享父 bash/ksh 的 shells 来执行作业。
+
+--------------------------------------------------------------------------------
+
+via:
+
+作者:Vivek Gite
+译者:[strugglingyouth](https://github.com/strugglingyouth)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[1]:http://www.manpager.com/linux/man1/bash.1.html
diff --git a/translated/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md b/translated/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md
new file mode 100644
index 0000000000..a2ce4f1d1c
--- /dev/null
+++ b/translated/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md
@@ -0,0 +1,58 @@
+如何更新ISPConfig 3 SSL证书
+================================================================================
+本教程描述了如何再ISPConfig 3控制面板中更新SSL证书。有两个可选的方法:
+
+- 用OpenSSL创建一个新的OpenSSL证书和CSR。
+- 用ISPConfig updater更新SSL证书
+
+我将会用手工的方法更新ssl证书。
+
+### 1)用OpenSSL创建一个新的ISPConfig 3 SSL 证书 ###
+
+用root用户登录你的服务器。在创建一个新的SSL证书之前,备份现有的。SSL证书是安全敏感的,因此我将它存储在/root/目录下。
+
+ tar pcfz /root/ispconfig_ssl_backup.tar.gz /usr/local/ispconfig/interface/ssl
+ chmod 600 /root/ispconfig_ssl_backup.tar.gz
+
+> 现在创建一个新的SSL证书密钥,证书请求(csr)和自签发证书。
+
+ cd /usr/local/ispconfig/interface/ssl
+ openssl genrsa -des3 -out ispserver.key 4096
+ openssl req -new -key ispserver.key -out ispserver.csr
+ openssl x509 -req -days 3650 -in ispserver.csr \
+ -signkey ispserver.key -out ispserver.crt
+ openssl rsa -in ispserver.key -out ispserver.key.insecure
+ mv ispserver.key ispserver.key.secure
+ mv ispserver.key.insecure ispserver.key
+
+重启apache来加载新的SSL证书
+
+ service apache2 restart
+
+### 2)用ISPConfig安装器来更新SSL证书 ###
+
+另一个获取新的SSL证书的替代方案是使用ISPConfig更新脚本。下载ISPConfig到/tmp目录下,解压包并运行脚本。
+
+ cd /tmp
+ wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
+ tar xvfz ISPConfig-3-stable.tar.gz
+ cd ispconfig3_install/install
+ php -q update.php
+
+更新脚本会在更新时询问下面的额问题:
+
+ Create new ISPConfig SSL certificate (yes,no) [no]:
+
+这里回答“yes”,SSL证书创建对话框就会启动。
+
+--------------------------------------------------------------------------------
+
+via: http://www.faqforge.com/linux/how-to-renew-the-ispconfig-3-ssl-certificate/
+
+作者:[Till][a]
+译者:[geekpi](https://github.com/geekpi)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.faqforge.com/author/till/
diff --git a/translated/tech/20151210 Getting started with Docker by Dockerizing this Blog.md.md b/translated/tech/20151210 Getting started with Docker by Dockerizing this Blog.md.md
new file mode 100644
index 0000000000..a74af87b6f
--- /dev/null
+++ b/translated/tech/20151210 Getting started with Docker by Dockerizing this Blog.md.md
@@ -0,0 +1,464 @@
+通过Dockerize这篇博客来开启我们的Docker之旅
+===
+>这篇文章将包含Docker的基本概念,以及如何通过创建一个定制的Dockerfile来Dockerize一个应用
+>作者:Benjamin Cane,2015-12-01 10:00:00
+
+Docker是2年前从某个idea中孕育而生的有趣技术,世界各地的公司组织都积极使用它来部署应用。在今天的文章中,我将教你如何通过"Dockerize"一个现有的应用,来开始我们的Docker运用。问题中的应用指的就是这篇博客!
+
+## 什么是Docker?
+
+当我们开始学习Docker基本概念时,让我们先去搞清楚什么是Docker以及它为什么这么流行。Docker是一个操作系统容器管理工具,它通过将应用打包在操作系统容器中,来方便我们管理和部署应用。
+
+### 容器 vs. 虚拟机
+
+容器虽和虚拟机并不完全相似,但它也是一种提供**操作系统虚拟化**的方式。但是,它和标准的虚拟机还是有不同之处的。
+
+标准虚拟机一般会包括一个完整的操作系统,操作系统包,最后还有一至两个应用。这都得益于为虚拟机提供硬件虚拟化的管理程序。这样一来,一个单一的服务器就可以将许多独立的操作系统作为虚拟客户机运行了。
+
+容器和虚拟机很相似,它们都支持在单一的服务器上运行多个操作环境,只是,在容器中,这些环境并不是一个个完整的操作系统。容器一般只包含必要的操作系统包和一些应用。它们通常不会包含一个完整的操作系统或者硬件虚拟化程序。这也意味着容器比传统的虚拟机开销更少。
+
+容器和虚拟机常被误认为是两种抵触的技术。虚拟机采用同一个物理服务器,来提供全功能的操作环境,该环境会和其余虚拟机一起共享这些物理资源。容器一般用来隔离运行中的应用进程,运行进程将在单独的主机中运行,以保证隔离后的进程之间不能相互影响。事实上,容器和**BSD Jails**以及`chroot`进程的相似度,超过了和完整虚拟机的相似度。
+
+### Docker在容器的上层提供了什么
+
+Docker不是一个容器运行环境,事实上,只是一个容器技术,并不包含那些帮助Docker支持[Solaris Zones](https://blog.docker.com/2015/08/docker-oracle-solaris-zones/)和[BSD Jails](https://wiki.freebsd.org/Docker)的技术。Docker提供管理,打包和部署容器的方式。虽然一定程度上,虚拟机多多少少拥有这些类似的功能,但虚拟机并没有完整拥有绝大多数的容器功能,即使拥有,这些功能用起来都并没有Docker来的方便。
+
+现在,我们应该知道Docker是什么了,然后,我们将从安装Docker,并部署一个公共的预构建好的容器开始,学习Docker是如何工作的。
+
+## 从安装开始
+
+默认情况下,Docker并不会自动被安装在您的计算机中,所以,第一步就是安装Docker包;我们的教学机器系统是Ubuntu 14.0.4,所以,我们将使用Apt包管理器,来执行安装操作。
+
+```
+# apt-get install docker.io
+Reading package lists... Done
+Building dependency tree
+Reading state information... Done
+The following extra packages will be installed:
+ aufs-tools cgroup-lite git git-man liberror-perl
+Suggested packages:
+ btrfs-tools debootstrap lxc rinse git-daemon-run git-daemon-sysvinit git-doc
+ git-el git-email git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki
+ git-svn
+The following NEW packages will be installed:
+ aufs-tools cgroup-lite docker.io git git-man liberror-perl
+0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
+Need to get 7,553 kB of archives.
+After this operation, 46.6 MB of additional disk space will be used.
+Do you want to continue? [Y/n] y
+```
+
+为了检查当前是否有容器运行,我们可以执行`docker`命令,加上`ps`选项
+
+```
+# docker ps
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+```
+
+`docker`命令中的`ps`功能类似于Linux的`ps`命令。它将显示可找到的Docker容器以及各自的状态。由于我们并没有开启任何Docker容器,所以命令没有显示任何正在运行的容器。
+
+## 部署一个预构建好的nginx Docker容器
+
+我比较喜欢的Docker特性之一就是Docker部署预先构建好的容器的方式,就像`yum`和`apt-get`部署包一样。为了更好地解释,我们来部署一个运行着nginx web服务器的预构建容器。我们可以继续使用`docker`命令,这次选择`run`选项。
+
+```
+# docker run -d nginx
+Unable to find image 'nginx' locally
+Pulling repository nginx
+5c82215b03d1: Download complete
+e2a4fb18da48: Download complete
+58016a5acc80: Download complete
+657abfa43d82: Download complete
+dcb2fe003d16: Download complete
+c79a417d7c6f: Download complete
+abb90243122c: Download complete
+d6137c9e2964: Download complete
+85e566ddc7ef: Download complete
+69f100eb42b5: Download complete
+cd720b803060: Download complete
+7cc81e9a118a: Download complete
+```
+
+`docker`命令的`run`选项,用来通知Docker去寻找一个指定的Docker镜像,然后开启运行着该镜像的容器。默认情况下,Docker容器在前台运行,这意味着当你运行`docker run`命令的时候,你的shell会被绑定到容器的控制台以及运行在容器中的进程。为了能在后台运行该Docker容器,我们可以使用`-d` (**detach**)标志。
+
+再次运行`docker ps`命令,可以看到nginx容器正在运行。
+
+```
+# docker ps
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+f6d31ab01fc9 nginx:latest nginx -g 'daemon off 4 seconds ago Up 3 seconds 443/tcp, 80/tcp desperate_lalande
+```
+
+从上面的打印信息中,我们可以看到正在运行的名为`desperate_lalande`的容器,它是由`nginx:latest image`(译者注:nginx最新版本的镜像)构建而来得。
+
+### Docker镜像
+
+镜像是Docker的核心特征之一,类似于虚拟机镜像。和虚拟机镜像一样,Docker镜像是一个被保存并打包的容器。当然,Docker不只是创建镜像,它还可以通过Docker仓库发布这些镜像,Docker仓库和包仓库的概念差不多,它让Docker能够模仿`yum`部署包的方式来部署镜像。为了更好地理解这是怎么工作的,我们来回顾`docker run`执行后的输出。
+
+```
+# docker run -d nginx
+Unable to find image 'nginx' locally
+```
+
+我们可以看到第一条信息是,Docker不能在本地找到名叫nginx的镜像。这是因为当我们执行`docker run`命令时,告诉Docker运行一个基于nginx镜像的容器。既然Docker要启动一个基于特定镜像的容器,那么Docker首先需要知道那个指定镜像。在检查远程仓库之前,Docker首先检查本地是否存在指定名称的本地镜像。
+
+因为系统是崭新的,不存在nginx镜像,Docker将选择从Docker仓库下载之。
+
+```
+Pulling repository nginx
+5c82215b03d1: Download complete
+e2a4fb18da48: Download complete
+58016a5acc80: Download complete
+657abfa43d82: Download complete
+dcb2fe003d16: Download complete
+c79a417d7c6f: Download complete
+abb90243122c: Download complete
+d6137c9e2964: Download complete
+85e566ddc7ef: Download complete
+69f100eb42b5: Download complete
+cd720b803060: Download complete
+7cc81e9a118a: Download complete
+```
+
+这就是第二部分打印信息显示给我们的内容。默认,Docker会使用[Docker Hub](https://hub.docker.com/)仓库,该仓库由Docker公司维护。
+
+和Github一样,在Docker Hub创建公共仓库是免费的,私人仓库就需要缴纳费用了。当然,部署你自己的Docker仓库也是可以实现的,事实上只需要简单地运行`docker run registry`命令就行了。但在这篇文章中,我们的重点将不是讲解如何部署一个定制的注册服务。
+
+### 关闭并移除容器
+
+在我们继续构建定制容器之前,我们先清理Docker环境,我们将关闭先前的容器,并移除它。
+
+我们利用`docker`命令和`run`选项运行一个容器,所以,为了停止该相同的容器,我们简单地在执行`docker`命令时,使用`kill`选项,并指定容器名。
+
+```
+# docker kill desperate_lalande
+desperate_lalande
+```
+
+当我们再次执行`docker ps`,就不再有容器运行了
+
+```
+# docker ps
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+```
+
+但是,此时,我们这是停止了容器;虽然它不再运行,但仍然存在。默认情况下,`docker ps`只会显示正在运行的容器,如果我们附加`-a` (all) 标识,它会显示所有运行和未运行的容器。
+
+```
+# docker ps -a
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+f6d31ab01fc9 5c82215b03d1 nginx -g 'daemon off 4 weeks ago Exited (-1) About a minute ago desperate_lalande
+```
+
+为了能完整地移除容器,我们在用`docker`命令时,附加`rm`选项。
+
+```
+# docker rm desperate_lalande
+desperate_lalande
+```
+
+虽然容器被移除了;但是我们仍拥有可用的**nginx**镜像(译者注:镜像缓存)。如果我们重新运行`docker run -d nginx`,Docker就无需再次拉取nginx镜像,即可启动容器。这是因为我们本地系统中已经保存了一个副本。
+
+为了列出系统中所有的本地镜像,我们运行`docker`命令,附加`images`选项。
+
+```
+# docker images
+REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
+nginx latest 9fab4090484a 5 days ago 132.8 MB
+```
+
+## 构建我们自己的镜像
+
+截至目前,我们已经使用了一些基础的Docker命令来开启,停止和移除一个预构建好的普通镜像。为了"Dockerize"这篇博客,我们需要构建我们自己的镜像,也就是创建一个**Dockerfile**。
+
+在大多数虚拟机环境中,如果你想创建一个机器镜像,首先,你需要建立一个新的虚拟机,安装操作系统,安装应用,最后将其转换为一个模板或者镜像。但在Docker中,所有这些步骤都可以通过Dockerfile实现全自动。Dockerfile是向Docker提供构建指令去构建定制镜像的方式。在这一章节,我们将编写能用来部署这篇博客的定制Dockerfile。
+
+### 理解应用
+
+我们开始构建Dockerfile之前,第一步要搞明白,我们需要哪些东西来部署这篇博客。
+
+博客本质上是由静态站点生成器生成的静态HTML页面,这个静态站点是我编写的,名为**hamerkop**。这个生成器很简单,它所做的就是生成该博客站点。所有的博客源码都被我放在了一个公共的[Github仓库](https://github.com/madflojo/blog)。为了部署这篇博客,我们要先从Github仓库把博客内容拉取下来,然后安装**Python**和一些**Python**模块,最后执行`hamerkop`应用。我们还需要安装**nginx**,来运行生成后的内容。
+
+截止目前,这些还是一个简单的Dockerfile,但它却给我们展示了相当多的[Dockerfile语法]((https://docs.docker.com/v1.8/reference/builder/))。我们需要克隆Github仓库,然后使用你最喜欢的编辑器编写Dockerfile;我选择`vi`
+
+```
+# git clone https://github.com/madflojo/blog.git
+Cloning into 'blog'...
+remote: Counting objects: 622, done.
+remote: Total 622 (delta 0), reused 0 (delta 0), pack-reused 622
+Receiving objects: 100% (622/622), 14.80 MiB | 1.06 MiB/s, done.
+Resolving deltas: 100% (242/242), done.
+Checking connectivity... done.
+# cd blog/
+# vi Dockerfile
+```
+
+### FROM - 继承一个Docker镜像
+
+第一条Dockerfile指令是`FROM`指令。这将指定一个现存的镜像作为我们的基础镜像。这也从根本上给我们提供了继承其他Docker镜像的途径。在本例中,我们还是从刚刚我们使用的**nginx**开始,如果我们想重新开始,我们可以通过指定`ubuntu:latest`来使用**Ubuntu** Docker镜像。
+
+```
+## Dockerfile that generates an instance of http://bencane.com
+
+FROM nginx:latest
+MAINTAINER Benjamin Cane
+```
+
+除了`FROM`指令,我还使用了`MAINTAINER`,它用来显示Dockerfile的作者。
+
+Docker支持使用`#`作为注释,我将经常使用该语法,来解释Dockerfile的部分内容。
+
+### 运行一次测试构建
+
+因为我们继承了**nginx** Docker镜像,我们现在的Dockerfile也就包括了用来构建**nginx**镜像的[Dockerfile](https://github.com/nginxinc/docker-nginx/blob/08eeb0e3f0a5ee40cbc2bc01f0004c2aa5b78c15/Dockerfile)中所有指令。这意味着,此时我们可以从该Dockerfile中构建出一个Docker镜像,然后从该镜像中运行一个容器。虽然,最终的镜像和**nginx**镜像本质上是一样的,但是我们这次是通过构建Dockerfile的形式,然后我们将讲解Docker构建镜像的过程。
+
+想要从Dockerfile构建镜像,我们只需要在运行`docker`命令的时候,加上**build**选项。
+
+```
+# docker build -t blog /root/blog
+Sending build context to Docker daemon 23.6 MB
+Sending build context to Docker daemon
+Step 0 : FROM nginx:latest
+ ---> 9fab4090484a
+Step 1 : MAINTAINER Benjamin Cane
+ ---> Running in c97f36450343
+ ---> 60a44f78d194
+Removing intermediate container c97f36450343
+Successfully built 60a44f78d194
+```
+
+上面的例子,我们使用了`-t` (**tag**)标识给镜像添加"blog"的标签。本质上我们只是在给镜像命名,如果我们不指定标签,就只能通过Docker分配的**Image ID**来访问镜像了。本例中,从Docker构建成功的信息可以看出,**Image ID**值为`60a44f78d194`。
+
+除了`-t`标识外,我还指定了目录`/root/blog`。该目录被称作"构建目录",它将包含Dockerfile,以及其他需要构建该容器的文件。
+
+现在我们构建成功,下面我们开始定制该镜像。
+
+### 使用RUN来执行apt-get
+
+用来生成HTML页面的静态站点生成器是用**Python**语言编写的,所以,在Dockerfile中需要做的第一件定制任务是安装Python。我们将使用Apt包管理器来安装Python包,这意味着在Dockerfile中我们要指定运行`apt-get update`和`apt-get install python-dev`;为了完成这一点,我们可以使用`RUN`指令。
+
+```
+## Dockerfile that generates an instance of http://bencane.com
+
+FROM nginx:latest
+MAINTAINER Benjamin Cane
+
+## Install python and pip
+RUN apt-get update
+RUN apt-get install -y python-dev python-pip
+```
+
+如上所示,我们只是简单地告知Docker构建镜像的时候,要去执行指定的`apt-get`命令。比较有趣的是,这些命令只会在该容器的上下文中执行。这意味着,即使容器中安装了`python-dev`和`python-pip`,但主机本身并没有安装这些。说的更简单点,`pip`命令将只在容器中执行,出了容器,`pip`命令不存在。
+
+还有一点比较重要的是,Docker构建过程中不接受用户输入。这说明任何被`RUN`指令执行的命令必须在没有用户输入的时候完成。由于很多应用在安装的过程中需要用户的输入信息,所以这增加了一点难度。我们例子,`RUN`命令执行的命令都不需要用户输入。
+
+### 安装Python模块
+
+**Python**安装完毕后,我们现在需要安装Python模块。如果在Docker外做这些事,我们通常使用`pip`命令,然后参考博客Git仓库中名叫`requirements.txt`的文件。在之前的步骤中,我们已经使用`git`命令成功地将Github仓库"克隆"到了`/root/blog`目录;这个目录碰巧也是我们创建`Dockerfile`的目录。这很重要,因为这意味着Dokcer在构建过程中可以访问Git仓库中的内容。
+
+当我们执行构建后,Docker将构建的上下文环境设置为指定的"构建目录"。这意味着目录中的所有文件都可以在构建过程中被使用,目录之外的文件(构建环境之外)是不能访问的。
+
+为了能安装需要的Python模块,我们需要将`requirements.txt`从构建目录拷贝到容器中。我们可以在`Dockerfile`中使用`COPY`指令完成这一需求。
+
+```
+## Dockerfile that generates an instance of http://bencane.com
+
+FROM nginx:latest
+MAINTAINER Benjamin Cane
+
+## Install python and pip
+RUN apt-get update
+RUN apt-get install -y python-dev python-pip
+
+## Create a directory for required files
+RUN mkdir -p /build/
+
+## Add requirements file and run pip
+COPY requirements.txt /build/
+RUN pip install -r /build/requirements.txt
+```
+
+在`Dockerfile`中,我们增加了3条指令。第一条指令使用`RUN`在容器中创建了`/build/`目录。该目录用来拷贝生成静态HTML页面需要的一切应用文件。第二条指令是`COPY`指令,它将`requirements.txt`从"构建目录"(`/root/blog`)拷贝到容器中的`/build/`目录。第三条使用`RUN`指令来执行`pip`命令;安装`requirements.txt`文件中指定的所有模块。
+
+当构建定制镜像时,`COPY`是条重要的指令。如果在Dockerfile中不指定拷贝文件,Docker镜像将不会包含requirements.txt文件。在Docker容器中,所有东西都是隔离的,除非在Dockerfile中指定执行,否则容器中不会包括需要的依赖。
+
+### 重新运行构建
+
+现在,我们让Docker执行了一些定制任务,现在我们尝试另一次blog镜像的构建。
+
+```
+# docker build -t blog /root/blog
+Sending build context to Docker daemon 19.52 MB
+Sending build context to Docker daemon
+Step 0 : FROM nginx:latest
+ ---> 9fab4090484a
+Step 1 : MAINTAINER Benjamin Cane
+ ---> Using cache
+ ---> 8e0f1899d1eb
+Step 2 : RUN apt-get update
+ ---> Using cache
+ ---> 78b36ef1a1a2
+Step 3 : RUN apt-get install -y python-dev python-pip
+ ---> Using cache
+ ---> ef4f9382658a
+Step 4 : RUN mkdir -p /build/
+ ---> Running in bde05cf1e8fe
+ ---> f4b66e09fa61
+Removing intermediate container bde05cf1e8fe
+Step 5 : COPY requirements.txt /build/
+ ---> cef11c3fb97c
+Removing intermediate container 9aa8ff43f4b0
+Step 6 : RUN pip install -r /build/requirements.txt
+ ---> Running in c50b15ddd8b1
+Downloading/unpacking jinja2 (from -r /build/requirements.txt (line 1))
+Downloading/unpacking PyYaml (from -r /build/requirements.txt (line 2))
+
+Successfully installed jinja2 PyYaml mistune markdown MarkupSafe
+Cleaning up...
+ ---> abab55c20962
+Removing intermediate container c50b15ddd8b1
+Successfully built abab55c20962
+```
+
+上述输出所示,我们可以看到构建成功了,我们还可以看到另外一个有趣的信息` ---> Using cache`。这条信息告诉我们,Docker在构建该镜像时使用了它的构建缓存。
+
+### Docker构建缓存
+
+当Docker构建镜像时,它不仅仅构建一个单独的镜像;事实上,在构建过程中,它会构建许多镜像。从上面的输出信息可以看出,在每一"步"执行后,Docker都在创建新的镜像。
+
+```
+ Step 5 : COPY requirements.txt /build/
+ ---> cef11c3fb97c
+```
+
+上面片段的最后一行可以看出,Docker在告诉我们它在创建一个新镜像,因为它打印了**Image ID**;`cef11c3fb97c`。这种方式有用之处在于,Docker能在随后构建**blog**镜像时将这些镜像作为缓存使用。这很有用处,因为这样,Docker就能加速同一个容器中新构建任务的构建流程。从上面的例子中,我们可以看出,Docker没有重新安装`python-dev`和`python-pip`包,Docker则使用了缓存镜像。但是由于Docker并没有找到执行`mkdir`命令的构建缓存,随后的步骤就被一一执行了。
+
+Docker构建缓存一定程度上是福音,但有时也是噩梦。这是因为使用缓存或者重新运行指令的决定在一个很狭窄的范围内执行。比如,如果`requirements.txt`文件发生了修改,Docker会在构建时检测到该变化,然后Docker会重新执行该执行那个点往后的所有指令。这得益于Docker能查看`requirements.txt`的文件内容。但是,`apt-get`命令的执行就是另一回事了。如果提供Python包的**Apt** 仓库包含了一个更新的python-pip包;Docker不会检测到这个变化,转而去使用构建缓存。这会导致之前旧版本的包将被安装。虽然对`python-pip`来说,这不是主要的问题,但对使用了某个致命攻击缺陷的包缓存来说,这是个大问题。
+
+出于这个原因,抛弃Docker缓存,定期地重新构建镜像是有好处的。这时,当我们执行Docker构建时,我简单地指定`--no-cache=True`即可。
+
+## 部署博客的剩余部分
+
+Python包和模块安装后,接下来我们将拷贝需要用到的应用文件,然后运行`hamerkop`应用。我们只需要使用更多的`COPY` and `RUN`指令就可完成。
+
+```
+## Dockerfile that generates an instance of http://bencane.com
+
+FROM nginx:latest
+MAINTAINER Benjamin Cane
+
+## Install python and pip
+RUN apt-get update
+RUN apt-get install -y python-dev python-pip
+
+## Create a directory for required files
+RUN mkdir -p /build/
+
+## Add requirements file and run pip
+COPY requirements.txt /build/
+RUN pip install -r /build/requirements.txt
+
+## Add blog code nd required files
+COPY static /build/static
+COPY templates /build/templates
+COPY hamerkop /build/
+COPY config.yml /build/
+COPY articles /build/articles
+
+## Run Generator
+RUN /build/hamerkop -c /build/config.yml
+```
+
+现在我们已经写出了剩余的构建指令,我们再次运行另一次构建,并确保镜像构建成功。
+
+```
+# docker build -t blog /root/blog/
+Sending build context to Docker daemon 19.52 MB
+Sending build context to Docker daemon
+Step 0 : FROM nginx:latest
+ ---> 9fab4090484a
+Step 1 : MAINTAINER Benjamin Cane
+ ---> Using cache
+ ---> 8e0f1899d1eb
+Step 2 : RUN apt-get update
+ ---> Using cache
+ ---> 78b36ef1a1a2
+Step 3 : RUN apt-get install -y python-dev python-pip
+ ---> Using cache
+ ---> ef4f9382658a
+Step 4 : RUN mkdir -p /build/
+ ---> Using cache
+ ---> f4b66e09fa61
+Step 5 : COPY requirements.txt /build/
+ ---> Using cache
+ ---> cef11c3fb97c
+Step 6 : RUN pip install -r /build/requirements.txt
+ ---> Using cache
+ ---> abab55c20962
+Step 7 : COPY static /build/static
+ ---> 15cb91531038
+Removing intermediate container d478b42b7906
+Step 8 : COPY templates /build/templates
+ ---> ecded5d1a52e
+Removing intermediate container ac2390607e9f
+Step 9 : COPY hamerkop /build/
+ ---> 59efd1ca1771
+Removing intermediate container b5fbf7e817b7
+Step 10 : COPY config.yml /build/
+ ---> bfa3db6c05b7
+Removing intermediate container 1aebef300933
+Step 11 : COPY articles /build/articles
+ ---> 6b61cc9dde27
+Removing intermediate container be78d0eb1213
+Step 12 : RUN /build/hamerkop -c /build/config.yml
+ ---> Running in fbc0b5e574c5
+Successfully created file /usr/share/nginx/html//2011/06/25/checking-the-number-of-lwp-threads-in-linux
+Successfully created file /usr/share/nginx/html//2011/06/checking-the-number-of-lwp-threads-in-linux
+
+Successfully created file /usr/share/nginx/html//archive.html
+Successfully created file /usr/share/nginx/html//sitemap.xml
+ ---> 3b25263113e1
+Removing intermediate container fbc0b5e574c5
+Successfully built 3b25263113e1
+```
+
+### 运行定制的容器
+
+成功的一次构建后,我们现在就可以通过运行`docker`命令和`run`选项来运行我们定制的容器,和之前我们启动nginx容器一样。
+
+```
+# docker run -d -p 80:80 --name=blog blog
+5f6c7a2217dcdc0da8af05225c4d1294e3e6bb28a41ea898a1c63fb821989ba1
+```
+
+我们这次又使用了`-d` (**detach**)标识来让Docker在后台运行。但是,我们也可以看到两个新标识。第一个新标识是`--name`,这用来给容器指定一个用户名称。之前的例子,我们没有指定名称,因为Docker随机帮我们生成了一个。第二个新标识是`-p`,这个标识允许用户从主机映射一个端口到容器中的一个端口。
+
+之前我们使用的基础**nginx**镜像分配了80端口给HTTP服务。默认情况下,容器内的端口通道并没有绑定到主机系统。为了让外部系统能访问容器内部端口,我们必须使用`-p`标识将主机端口映射到容器内部端口。上面的命令,我们通过`-p 8080:80`语法将主机80端口映射到容器内部的80端口。
+
+经过上面的命令,我们的容器似乎成功启动了,我们可以通过执行`docker ps`核实。
+
+```
+# docker ps
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+d264c7ef92bd blog:latest nginx -g 'daemon off 3 seconds ago Up 3 seconds 443/tcp, 0.0.0.0:80->80/tcp blog
+```
+
+## 总结
+
+截止目前,我们拥有了正在运行的定制Docker容器。虽然在这篇文章中,我们只接触了一些Dockerfile指令用法,但是我们还是要讨论所有的指令。我们可以检查[Docker's reference page](https://docs.docker.com/v1.8/reference/builder/)来获取所有的Dockerfile指令用法,那里对指令的用法说明得很详细。
+
+另一个比较好的资源是[Dockerfile Best Practices page](https://docs.docker.com/engine/articles/dockerfile_best-practices/),它有许多构建定制Dockerfile的最佳练习。有些技巧非常有用,比如战略性地组织好Dockerfile中的命令。上面的例子中,我们将`articles`目录的`COPY`指令作为Dockerfile中最后的`COPY`指令。这是因为`articles`目录会经常变动。所以,将那些经常变化的指令尽可能地放在最后面的位置,来最优化那些可以被缓存的步骤。
+
+通过这篇文章,我们涉及了如何运行一个预构建的容器,以及如何构建,然后部署定制容器。虽然关于Docker你还有许多需要继续学习的地方,但我想这篇文章给了你如何继续开始的好建议。当然,如果你认为还有一些需要继续补充的内容,在下面评论即可。
+
+--------------------------------------
+via:http://bencane.com/2015/12/01/getting-started-with-docker-by-dockerizing-this-blog/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+bencane%2FSAUo+%28Benjamin+Cane%29
+
+作者:Benjamin Cane
+
+译者:[su-kaiyao](https://github.com/su-kaiyao)
+
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
+
diff --git a/translated/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md b/translated/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md
new file mode 100644
index 0000000000..dbbab5ef8c
--- /dev/null
+++ b/translated/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md
@@ -0,0 +1,84 @@
+Linux / Unix桌面之趣:终端上的圣诞树
+================================================================================
+给你的Linux或Unix控制台创造一棵圣诞树玩玩吧。在此之前,需要先安装一个Perl模块,命名为Acme::POE::Tree。这是一棵很喜庆的圣诞树,我已经在Linux、OSX和类Unix系统上验证过了。
+
+
+### 安装 Acme::POE::Tree ###
+
+安装perl模块最简单的办法就是使用cpan(Perl综合典藏网)。打开终端,把下面的指令敲进去便可安装Acme::POE::Tree。
+
+ ## 以root身份运行 ##
+ perl -MCPAN -e 'install Acme::POE::Tree'
+
+**案例输出:**
+
+ Installing /home/vivek/perl5/man/man3/POE::NFA.3pm
+ Installing /home/vivek/perl5/man/man3/POE::Kernel.3pm
+ Installing /home/vivek/perl5/man/man3/POE::Loop.3pm
+ Installing /home/vivek/perl5/man/man3/POE::Resource.3pm
+ Installing /home/vivek/perl5/man/man3/POE::Filter::Map.3pm
+ Installing /home/vivek/perl5/man/man3/POE::Resource::SIDs.3pm
+ Installing /home/vivek/perl5/man/man3/POE::Loop::IO_Poll.3pm
+ Installing /home/vivek/perl5/man/man3/POE::Pipe::TwoWay.3pm
+ Appending installation info to /home/vivek/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod
+ RCAPUTO/POE-1.367.tar.gz
+ /usr/bin/make install -- OK
+ RCAPUTO/Acme-POE-Tree-1.022.tar.gz
+ Has already been unwrapped into directory /home/vivek/.cpan/build/Acme-POE-Tree-1.022-uhlZUz
+ RCAPUTO/Acme-POE-Tree-1.022.tar.gz
+ Has already been prepared
+ Running make for R/RC/RCAPUTO/Acme-POE-Tree-1.022.tar.gz
+ cp lib/Acme/POE/Tree.pm blib/lib/Acme/POE/Tree.pm
+ Manifying 1 pod document
+ RCAPUTO/Acme-POE-Tree-1.022.tar.gz
+ /usr/bin/make -- OK
+ Running make test
+ PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
+ t/01_basic.t .. ok
+ All tests successful.
+ Files=1, Tests=2, 6 wallclock secs ( 0.09 usr 0.03 sys + 0.53 cusr 0.06 csys = 0.71 CPU)
+ Result: PASS
+ RCAPUTO/Acme-POE-Tree-1.022.tar.gz
+ Tests succeeded but one dependency not OK (Curses)
+ RCAPUTO/Acme-POE-Tree-1.022.tar.gz
+ [dependencies] -- NA
+
+### 在Shell中显示圣诞树 ###
+
+只需要在终端上运行以下命令:
+
+ perl -MAcme::POE::Tree -e 'Acme::POE::Tree->new()->run()'
+
+**案例输出**
+
+
+
+Gif 01: 一棵用Perl写的喜庆圣诞树
+
+### 树的定制 ###
+
+以下是我的脚本文件tree.pl的内容:
+
+ #!/usr/bin/perl
+
+ use Acme::POE::Tree;
+ my $tree = Acme::POE::Tree->new(
+ {
+ star_delay => 1.5, # shimmer star every 1.5 sec
+ light_delay => 2, # twinkle lights every 2 sec
+ run_for => 10, # automatically exit after 10 sec
+ }
+ );
+ $tree->run();
+
+这样就可以通过修改star_delay、run_for和light_delay参数的值来自定义你的树了。一棵提供消遣的终端圣诞树就此诞生。
+
+--------------------------------------------------------------------------------
+
+via: http://www.cyberciti.biz/open-source/command-line-hacks/linux-unix-desktop-fun-christmas-tree-for-your-terminal/
+
+作者:Vivek Gite
+译者:[soooogreen](https://github.com/soooogreen)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
diff --git a/translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md b/translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md
new file mode 100644
index 0000000000..79e26abd64
--- /dev/null
+++ b/translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md
@@ -0,0 +1,49 @@
+修复:无法与SFTP服务器建立FTP连接
+================================================================================
+### 问题 ###
+
+有一天我要连接到我的web服务器。我使用[FileZilla][1]连接到FTP服务器。当我输入主机名和密码后来连接服务器后,我得到了下面的错误。
+
+> Error: Cannot establish FTP connection to an SFTP server. Please select proper protocol.
+>
+> Error: Critical error: Could not connect to server
+
+
+
+### 原因 ###
+
+看见错误信息后我意识到了我的错误。我尝试与一台SFTP服务器建立一个[FTP][2]连接。很明显我没有使用一个正确的协议(应该是SFTP而不是FTP)。
+
+如你在上图所见,FileZilla默认使用的是FTP协议。
+
+### 解决“Cannot establish FTP connection to an SFTP server”的方案 ###
+
+解决方案很简单。使用SFTP协议而不是FTP。一个你或许要面对的问题是把协议修改成SFTP。这就是我要帮助你的。
+
+再FileZilla菜单中,进入 **文件->站点管理**.
+
+
+
+在站点管理中,进入通用选项并选择SFTP协议。同样填上主机、端口号、用户密码等。
+
+
+
+我希望你从这里可以开始处理。
+
+我希望本篇教程可以帮助你修复“Cannot establish FTP connection to an SFTP server. Please select proper protocol.”这个问题。在相关的文章中,你可以读[了解在Linux中如何设置FTP][4]。
+
+--------------------------------------------------------------------------------
+
+via: http://itsfoss.com/fix-establish-ftp-connection-sftp-server/
+
+作者:[Abhishek][a]
+译者:[geekpi](https://github.com/geekpi)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://itsfoss.com/author/abhishek/
+[1]:https://filezilla-project.org/
+[2]:https://en.wikipedia.org/wiki/File_Transfer_Protocol
+[3]:https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol
+[4]:http://itsfoss.com/set-ftp-server-linux/
diff --git a/translated/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md b/translated/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md
new file mode 100644
index 0000000000..c47ff21da0
--- /dev/null
+++ b/translated/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md
@@ -0,0 +1,75 @@
+Linux/Unix桌面趣事:让桌面下雪
+================================================================================
+在这个节日里感到孤独么?试一下Xsnow吧。它是一个可以在Unix/Linux桌面下下雪的app。圣诞老人和他的驯鹿会在屏幕中奔跑,伴随着雪片让你感受到节日的感觉。
+
+我第一次是再13、4年前安装的它。它最初是在1984年Macintosh系统中创造的。你可以用下面的方法来安装:
+
+### 安装 xsnow ###
+
+Debian/Ubuntu/Mint用户用下面的命令:
+
+ $ sudo apt-get install xsnow
+
+Freebsd用户输入下面的命令:
+
+ # cd /usr/ports/x11/xsnow/
+ # make install clean
+
+或者尝试添加包:
+
+ # pkg_add -r xsnow
+
+#### 其他发行版的方法 ####
+
+1. Fedora/RHEL/CentOS在[rpmfusion][1]仓库中找找。
+2. Gentoo用户试下Gentoo portage也就是[emerge -p xsnow][2]
+3. Opensuse用户使用yast搜索xsnow
+
+### 我该如何使用xsnow? ###
+
+打开终端(程序 > 附件 > 终端),输入下面的额命令启动xsnow:
+
+ $ xsnow
+
+示例输出:
+
+
+
+图01: 在Linux和Unix桌面中显示雪花
+
+你可以设置背景位蓝色,并让它下白雪,输入:
+
+ $ xsnow -bg blue -sc snow
+
+设置最大的雪片数量,并让它尽可能快地运行,输入:
+
+ $ xsnow -snowflakes 10000 -delay 0
+
+不要显示圣诞树和圣诞老人满屏幕地跑,输入:
+
+ $ xsnow -notrees -nosanta
+
+关于xsnow更多的信息和选项,在命令行下输入man xsnow查看手册:
+
+ $ man xsnow
+
+建议阅读
+
+- 官网[下载 Xsnow][1]
+- 注意[MS-Windows][2]和[Mac OS X version][3]有一次性的共享软件费用。
+
+--------------------------------------------------------------------------------
+
+via: http://www.cyberciti.biz/tips/linux-unix-xsnow.html
+
+作者:Vivek Gite
+译者:[geekpi](https://github.com/geekpi)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[1]:http://rpmfusion.org/Configuration
+[2]:http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
+[3]:http://dropmix.xs4all.nl/rick/Xsnow/
+[4]:http://dropmix.xs4all.nl/rick/WinSnow/
+[5]:http://dropmix.xs4all.nl/rick/MacOSXSnow/
diff --git a/translated/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md b/translated/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md
new file mode 100644
index 0000000000..d97f0f3c68
--- /dev/null
+++ b/translated/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md
@@ -0,0 +1,40 @@
+Linux/Unix 桌面趣事:蒸汽火车
+================================================================================
+一个[最常见的错误][1]是把ls输入成了sl。我已经设置了[一个alias][2],也就是alias sl=ls。但是你也许就错过了带汽笛的蒸汽小火车了。
+
+sl是一个玩笑软件或是一个Unix游戏。它会在你错误地把“ls”输入成“sl”(Steam Locomotive)后出现一辆蒸汽火车穿过你的屏幕。
+
+### 安装 sl ###
+
+在Debian/Ubuntu下输入下面的命令:
+
+ # apt-get install sl
+
+它同样也在Freebsd和其他类Unix的操作系统上存在。下面把ls输错成sl:
+
+ $ sl
+
+
+
+图01: 如果你把“ls”输入成“sl”蒸汽火车会穿过你的屏幕。
+
+It also supports the following options:
+它同样支持下面的选项:
+
+- **-a** : 似乎发生了意外。你会哭喊求助的人们感到难过。
+- **-l** : 显示小一点的火车
+- **-F** : 它飞走
+- **-e** : 允许被Ctrl+C终端
+
+--------------------------------------------------------------------------------
+
+via: http://www.cyberciti.biz/tips/displays-animations-when-accidentally-you-type-sl-instead-of-ls.html
+
+作者:Vivek Gite
+译者:[geekpi](https://github.com/geekpi)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[1]:http://www.cyberciti.biz/tips/my-10-unix-command-line-mistakes.html
+[2]:http://bash.cyberciti.biz/guide/Create_and_use_aliases
diff --git a/translated/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md b/translated/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md
new file mode 100644
index 0000000000..ed26f49783
--- /dev/null
+++ b/translated/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md
@@ -0,0 +1,65 @@
+Linux/Unix桌面趣事:终端ASCII水族箱
+================================================================================
+你可以在你的终端中使用ASCIIQuarium安全地欣赏海洋的神秘了。它是一个用perl写的ASCII艺术水族箱/海洋动画。
+
+### 安装 Term::Animation ###
+
+
+首先你需要安装名为Term-Animation的perl模块。打开终端(选择程序 > 附件 > 终端),并输入:
+
+ $ sudo apt-get install libcurses-perl
+ $ cd /tmp
+ $ wget http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz
+ $ tar -zxvf Term-Animation-2.4.tar.gz
+ $ cd Term-Animation-2.4/
+ $ perl Makefile.PL && make && make test
+ $ sudo make install
+
+### 下载安装ASCIIQuarium ###
+
+接着再终端中输入:
+
+ $ cd /tmp
+ $ wget http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz
+ $ tar -zxvf asciiquarium.tar.gz
+ $ cd asciiquarium_1.0/
+ $ sudo cp asciiquarium /usr/local/bin
+ $ sudo chmod 0755 /usr/local/bin/asciiquarium
+
+### 我怎么浏览ASCII水族箱? ###
+
+输入下面的命令:
+
+ $ /usr/local/bin/asciiquarium
+
+或者
+
+ $ perl /usr/local/bin/asciiquarium
+
+
+
+### 相关媒体 ###
+
+注:youtube 视频
+
+
+[视频01: ASCIIQuarium - Linux/Unix桌面上的海洋动画][1]
+
+### 下载:ASCII Aquarium的KDE和Mac OS X版本 ###
+
+[下载asciiquarium][2]。如果你运行的是Mac OS X,试下一个可以直接使用已经打包好的[版本][3]。对于KDE用户,试试基于Asciiquarium的[KDE屏幕保护程序][4]
+
+--------------------------------------------------------------------------------
+
+via: http://www.cyberciti.biz/tips/linux-unix-apple-osx-terminal-ascii-aquarium.html
+
+作者:Vivek Gite
+译者:[geekpi](https://github.com/geekpi)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[1]:http://youtu.be/MzatWgu67ok
+[2]:http://www.robobunny.com/projects/asciiquarium/html/
+[3]:http://habilis.net/macasciiquarium/
+[4]:http://kde-look.org/content/show.php?content=29207
diff --git a/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md
new file mode 100644
index 0000000000..79e263d7e0
--- /dev/null
+++ b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md
@@ -0,0 +1,220 @@
+Translating by Xuanwo
+
+LFCS系列第一讲:如何在Linux上使用GNU'sed'命令来创建、编辑和操作文件
+================================================================================
+Linux基金会宣布了一个全新的LFCS(Linux Foundation Certified Sysadmin,Linux基金会认证系统管理员)认证计划。这一计划旨在帮助遍布全世界的人们获得其在处理Linux系统管理任务上能力的认证。这些能力包括支持运行的系统服务,以及第一手的故障诊断和分析和为工程师团队在升级时提供智能决策。
+
+
+
+Linux基金会认证系统管理员——第一讲
+
+请观看下面关于Linux基金会认证计划的演示:
+
+
+
+该系列将命名为《LFCS系列第一讲》至《LFCS系列第十讲》并覆盖关于Ubuntu,CentOS以及openSUSE的下列话题。
+
+- 第一讲:如何在Linux上使用GNU'sed'命令来创建、编辑和操作文件
+- 第二讲:如何安装和使用vi/m全功能文字编辑器
+- 第三讲:归档文件/目录和在文件系统中寻找文件
+- 第四讲:为存储设备分区,格式化文件系统和配置交换分区
+- 第五讲:在Linux中挂载/卸载本地和网络(Samba & NFS)文件系统
+- 第六讲:组合分区作为RAID设备——创建&管理系统备份
+- 第七讲:管理系统启动进程和服务(使用SysVinit, Systemd 和 Upstart)
+- 第八讲:管理用户和组,文件权限和属性以及启用账户的sudo权限
+- 第九讲:Linux包管理与Yum,RPM,Apt,Dpkg,Aptitude,Zypper
+- 第十讲:学习简单的Shell脚本和文件系统故障排除
+
+本文是覆盖这个参加LFCS认证考试的所必需的范围和能力的十个教程的第一讲。话说了那么多,快打开你的终端,让我们开始吧!
+
+### 处理Linux中的文本流 ###
+
+Linux将程序中的输入和输出当成字符流或者字符序列。在开始理解重定向和管道之前,我们必须先了解三种最重要的I/O(Input and Output,输入和输出)流,事实上,它们都是特殊的文件(根据UNIX和Linux中的约定,数据流和外围设备或者设备文件也被视为普通文件)。
+
+> (重定向操作符) 和 | (管道操作符)之间的区别是:前者将命令与文件相连接,而后者将命令的输出和另一个命令相连接。
+
+ # command > file
+ # command1 | command2
+
+由于重定向操作符静默创建或覆盖文件,我们必须特别小心谨慎地使用它,并且永远不要把它和管道混淆起来。在Linux和UNIX系统上管道的优势是:第一个命令的输出不会写入一个文件而是直接被第二个命令读取。
+
+在下面的操作练习中,我们将会使用这首诗——《A happy child》(匿名作者)
+
+
+
+cat 命令样例
+
+#### 使用 sed ####
+
+sed是流编辑器(stream editor)的缩写。为那些不懂术语的人额外解释一下,流编辑器是用来在一个输入流(文件或者管道中的输入)执行基本的文本转换的工具。
+
+sed最基本的用法是字符替换。我们将通过把每个出现的小写y改写为大写Y并且将输出重定向到ahappychild2.txt开始。g标志表示sed应该替换文件每一行中所有应当替换的实例。如果这个标志省略了,sed将会只替换每一行中第一次出现的实例。
+
+**基本语法:**
+
+ # sed ‘s/term/replacement/flag’ file
+
+**我们的样例:**
+
+ # sed ‘s/y/Y/g’ ahappychild.txt > ahappychild2.txt
+
+
+
+sed 命令样例
+
+如果你要在替换文本中搜索或者替换特殊字符(如/,\,&),你需要使用反斜杠对它进行转义。
+
+例如,我们将会用一个符号来替换一个文字。与此同时,我们将把一行最开始出现的第一个I替换为You。
+
+ # sed 's/and/\&/g;s/^I/You/g' ahappychild.txt
+
+
+
+sed 替换字符串
+
+在上面的命令中,^(插入符号)是众所周知用来表示一行开头的正则表达式。
+
+正如你所看到的,我们可以通过使用分号分隔以及用括号包裹来把两个或者更多的替换命令(并在他们中使用正则表达式)链接起来。
+
+另一种sed的用法是显示或者删除文件中选中的一部分。在下面的样例中,将会显示/var/log/messages中从6月8日开始的头五行。
+
+ # sed -n '/^Jun 8/ p' /var/log/messages | sed -n 1,5p
+
+请注意,在默认的情况下,sed会打印每一行。我们可以使用-n选项来覆盖这一行为并且告诉sed只需要打印(用p来表示)文件(或管道)中匹配的部分(第一种情况下行开头的第一个6月8日以及第二种情况下的一到五行*此处翻译欠妥,需要修正*)。
+
+最后,可能有用的技巧是当检查脚本或者配置文件的时候可以保留文件本身并且删除注释。下面的单行sed命令删除(d)空行或者是开头为`#`的行(|字符返回两个正则表达式之间的布尔值)。
+
+ # sed '/^#\|^$/d' apache2.conf
+
+
+
+sed 匹配字符串
+
+#### uniq C命令 ####
+
+uniq命令允许我们返回或者删除文件中重复的行,默认写入标准输出。我们必须注意到,除非两个重复的行相邻,否则uniq命令不会删除他们。因此,uniq经常和前序排序(此处翻译欠妥)(一种用来对文本行进行排序的算法)搭配使用。默认情况下,排序使用第一个字段(用空格分隔)作为关键字段。要指定一个不同的关键字段,我们需要使用-k选项。
+
+**样例**
+
+du –sch /path/to/directory/* 命令将会以人类可读的格式返回在指定目录下每一个子文件夹和文件的磁盘空间使用情况(也会显示每个目录总体的情况),而且不是按照大小输出,而是按照子文件夹和文件的名称。我们可以使用下面的命令来让它通过大小排序。
+
+ # du -sch /var/* | sort –h
+
+
+
+sort 命令样例
+
+你可以通过使用下面的命令告诉uniq比较每一行的前6个字符(-w 6)(指定了不同的日期)来统计日志事件的个数,而且在每一行的开头输出出现的次数(-c)。
+
+
+ # cat /var/log/mail.log | uniq -c -w 6
+
+
+
+统计文件中数字
+
+最后,你可以组合使用sort和uniq命令(通常如此)。考虑下面文件中捐助者,捐助日期和金额的列表。假设我们想知道有多少个捐助者。我们可以使用下面的命令来分隔第一字段(字段由冒号分隔),按名称排序并且删除重复的行。
+
+ # cat sortuniq.txt | cut -d: -f1 | sort | uniq
+
+
+
+寻找文件中不重复的记录
+
+- 也可阅读: [13个“cat”命令样例][1]
+
+#### grep 命令 ####
+
+grep在文件(或命令输出)中搜索指定正则表达式并且在标准输出中输出匹配的行。
+
+**样例**
+
+显示文件/etc/passwd中用户gacanepa的信息,忽略大小写。
+
+ # grep -i gacanepa /etc/passwd
+
+
+
+grep 命令样例
+
+显示/etc文件夹下所有rc开头并跟随任意数字的内容。
+
+ # ls -l /etc | grep rc[0-9]
+
+
+
+使用grep列出内容
+
+- 也可阅读: [12个“grep”命令样例][2]
+
+#### tr 命令使用技巧 ####
+
+tr命令可以用来从标准输入中翻译(改变)或者删除字符并将结果写入到标准输出中。
+
+**样例**
+
+把sortuniq.txt文件中所有的小写改为大写。
+
+ # cat sortuniq.txt | tr [:lower:] [:upper:]
+
+
+
+排序文件中的字符串
+
+压缩`ls –l`输出中的定界符至一个空格。
+ # ls -l | tr -s ' '
+
+
+
+压缩分隔符
+
+#### cut 命令使用方法 ####
+
+cut命令可以基于字节数(-b选项),字符(-c)或者字段(-f)提取部分输入(从标准输入或者文件中)并且将结果输出到标准输出。在最后一种情况下(基于字段),默认的字段分隔符是一个tab,但不同的分隔符可以由-d选项来指定。
+
+**样例**
+
+从/etc/passwd中提取用户账户和他们被分配的默认shell(-d选项允许我们指定分界符,-f选项指定那些字段将被提取)。
+
+ # cat /etc/passwd | cut -d: -f1,7
+
+
+
+提取用户账户
+
+总结一下,我们将使用最后一个命令的输出中第一和第三个非空文件创建一个文本流。我们将使用grep作为第一过滤器来检查用户gacanepa的会话,然后将分隔符压缩至一个空格(tr -s ' ')。下一步,我们将使用cut来提取第一和第三个字段,最后使用第二个字段(本样例中,指的是IP地址)来排序之后再用uniq去重。
+
+ # last | grep gacanepa | tr -s ‘ ‘ | cut -d’ ‘ -f1,3 | sort -k2 | uniq
+
+
+
+last 命令样例
+
+上面的命令显示了如何将多个命令和管道结合起来以便根据我们的愿望得到过滤后的数据。你也可以逐步地使用它以帮助你理解输出是如何从一个命令传输到下一个命令的(顺便说一句,这是一个非常好的学习经验!)
+
+### 总结 ###
+
+尽管这个例子(以及在当前教程中的其他实例)第一眼看上去可能不是非常有用,但是他们是体验在Linux命令行中创建,编辑和操作文件的一个非常好的开始。请随时留下你的问题和意见——不胜感激!
+
+#### 参考链接 ####
+
+- [关于LFCS][3]
+- [为什么需要Linux基金会认证?][4]
+- [注册LFCS考试][5]
+
+--------------------------------------------------------------------------------
+
+via: http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/
+
+作者:[Gabriel Cánepa][a]
+译者:[Xuanwo](https://github.com/Xuanwo)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.tecmint.com/author/gacanepa/
+[1]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/
+[2]:http://www.tecmint.com/12-practical-examples-of-linux-grep-command/
+[3]:https://training.linuxfoundation.org/certification/LFCS
+[4]:https://training.linuxfoundation.org/certification/why-certify-with-us
+[5]:https://identity.linuxfoundation.org/user?destination=pid/1
\ No newline at end of file
diff --git a/translated/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md b/translated/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md
new file mode 100644
index 0000000000..2781dde63d
--- /dev/null
+++ b/translated/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md
@@ -0,0 +1,230 @@
+Flowsnow translating...
+LFCS系列第九讲: 使用Yum, RPM, Apt, Dpkg, Aptitude, Zypper进行Linux包管理
+================================================================================
+去年八月, Linux基金会宣布了一个全新的LFCS(Linux Foundation Certified Sysadmin,Linux基金会认证系统管理员)认证计划,这对广大系统管理员来说是一个很好的机会,管理员们可以通过绩效考试来表明自己可以成功支持Linux系统的整体运营。 当需要的时候一个Linux基金会认证的系统管理员有足够的专业知识来确保系统高效运行,提供第一手的故障诊断和监视,并且为工程师团队在问题升级时提供智能决策。
+
+
+
+Linux基金会认证系统管理员 – 第九讲
+
+请观看下面关于Linux基金会认证计划的演示。
+
+注:youtube 视频
+
+
+本文是本系列十套教程中的第九讲,今天在这篇文章中我们会引导你学习Linux包管理,这也是LFCS认证考试所需要的。
+
+### 包管理 ###
+
+简单的说,包管理是系统中安装和维护软件的一种方法,其中维护也包含更新和卸载。
+
+在Linux早期,程序只以源代码的方式发行,还带有所需的用户使用手册和必备的配置文件,甚至更多。现如今,大多数发行商使用默认的预装程序或者被称为包的程序集合。用户使用这些预装程序或者包来安装该发行版本。然而,Linux最伟大的一点是我们仍然能够获得程序的源代码用来学习、改进和编译。
+
+**包管理系统是如何工作的**
+
+如果某一个包需要一定的资源,如共享库,或者需要另一个包,据说就会存在依赖性问题。所有现在的包管理系统提供了一些解决依赖性的方法,以确保当安装一个包时,相关的依赖包也安装好了
+
+**打包系统**
+
+几乎所有安装在现代Linux系统上的软件都会在互联网上找到。它要么能够通过中央库(中央库能包含几千个包,每个包都已经构建、测试并且维护好了)发行商得到,要么能够直接得到可以下载和手动安装的源代码。
+
+由于不同的发行版使用不同的打包系统(Debian的*.deb文件/ CentOS的*.rpm文件/ openSUSE的专门为openSUSE构建的*.rpm文件),因此为一个发行版本开发的包会与其他发行版本不兼容。然而,大多数发行版本都可能是LFCS认证的三个发行版本之一。
+
+**高级和低级打包工具**
+
+为了有效地进行包管理的任务,你需要知道,你将有两种类型的实用工具:低级工具(能在后端实际安装,升级,卸载包文件),以及高级工具(负责确保能很好的执行依赖性解决和元数据检索的任务,元数据也称为关于数据的数据)。
+
+注:表格
+
+
+
+
+
+
+
+
+
+
+ | 发行版 |
+ 低级工具 |
+ 高级工具 |
+
+
+ | Debian版及其衍生版 |
+ dpkg |
+ apt-get / aptitude |
+
+
+ | CentOS版 |
+ rpm |
+ yum |
+
+
+ | openSUSE版 |
+ rpm |
+ zypper |
+
+
+
+
+让我们来看下低级工具和高级工具的描述。
+
+dpkg的是基于Debian系统中的一个低级包管理器。它可以安装,删除,提供有关资料,并建立*.deb包,但它不能自动下载并安装它们相应的依赖包。
+
+- 阅读更多: [15个dpkg命令实例][1]
+
+apt-get是Debian和衍生版的高级包管理器,并提供命令行方式从多个来源检索和安装软件包,其中包括解决依赖性。和dpkg不同的是,apt-get不是直接基于.deb文件工作,而是基于包的正确名称。
+
+- 阅读更多: [25个apt-get命令实力][2]
+
+Aptitude是基于Debian的系统的另一个高级包管理器,它可用于快速简便的执行管理任务(安装,升级和删除软件包,还可以自动处理解决依赖性)。与atp-get和额外的包管理器相比,它提供了相同的功能,例如提供对包的几个版本的访问。
+
+rpm是Linux标准基础(LSB)兼容发布版使用的一种包管理器,用来对包进行低级处理。就像dpkg,rpm可以查询,安装,检验,升级和卸载软件包,并能被基于Fedora的系统频繁地使用,比如RHEL和CentOS。
+
+- 阅读更多: [20个rpm命令实例][3]
+
+相对于基于RPM的系统,yum增加了系统自动更新的功能和带依赖性管理的包管理功能。作为一个高级工具,和apt-get或者aptitude相似,yum基于库工作。
+
+- 阅读更多: [20个yum命令实例][4]
+-
+### 低级工具的常见用法 ###
+
+你用低级工具处理最常见的任务如下。
+
+**1. 从已编译(*.deb或*.rpm)的文件安装一个包**
+
+这种安装方法的缺点是没有提供解决依赖性的方案。当你在发行版本库中无法获得某个包并且又不能通过高级工具下载安装时,你很可能会从一个已编译文件安装该包。因为低级工具不需要解决依赖性问题,所以当安装一个没有解决依赖性的包时会出现出错并且退出。
+
+ # dpkg -i file.deb [Debian版和衍生版]
+ # rpm -i file.rpm [CentOS版 / openSUSE版]
+
+**注意**: 不要试图在CentOS中安装一个为openSUSE构建的.rpm文件,反之亦然!
+
+**2. 从已编译文件中更新一个包**
+
+同样,当中央库中没有某安装包时,你只能手动升级该包。
+
+ # dpkg -i file.deb [Debian版和衍生版]
+ # rpm -U file.rpm [CentOS版 / openSUSE版]
+
+**3. 列举安装的包**
+
+当你第一次接触一个已经在工作中的系统时,很可能你会想知道安装了哪些包。
+
+ # dpkg -l [Debian版和衍生版]
+ # rpm -qa [CentOS版 / openSUSE版]
+
+如果你想知道一个特定的包安装在哪儿, 你可以使用管道命令从以上命令的输出中去搜索,这在这个系列的[操作Linux文件 – 第一讲][5] 中有介绍。假定我们需要验证mysql-common这个包是否安装在Ubuntu系统中。
+
+ # dpkg -l | grep mysql-common
+
+
+
+检查安装的包
+
+另外一种方式来判断一个包是否已安装。
+
+ # dpkg --status package_name [Debian版和衍生版]
+ # rpm -q package_name [CentOS版 / openSUSE版]
+
+例如,让我们找出sysdig包是否安装在我们的系统。
+
+ # rpm -qa | grep sysdig
+
+
+
+检查sysdig包
+
+**4. 查询一个文件是由那个包安装的**
+
+ # dpkg --search file_name
+ # rpm -qf file_name
+
+例如,pw_dict.hwm文件是由那个包安装的?
+
+ # rpm -qf /usr/share/cracklib/pw_dict.hwm
+
+
+
+Linux中查询文件
+
+### 高级工具的常见用法 ###
+
+你用高级工具处理最常见的任务如下。
+
+**1. 搜索包**
+
+aptitude更新将会更新可用的软件包列表,并且aptitude搜索会根据包名进行实际性的搜索。
+
+ # aptitude update && aptitude search package_name
+
+在搜索所有选项中,yum不仅可以通过包名还可以通过包的描述搜索程序包。
+
+ # yum search package_name
+ # yum search all package_name
+ # yum whatprovides “*/package_name”
+
+假定我们需要一个名为sysdig的包,要知道的是我们需要先安装然后才能运行。
+
+ # yum whatprovides “*/sysdig”
+
+
+
+检查包描述
+
+whatprovides告诉yum搜索一个含有能够匹配上述正则表达式的文件的包。
+
+ # zypper refresh && zypper search package_name [在openSUSE上]
+
+**2. 从仓库安装一个包**
+
+当安装一个包时,在包管理器解决了所有依赖性问题后,可能会提醒你确认安装。需要注意的是运行更新或刷新(根据所使用的软件包管理器)不是绝对必要,但是考虑到安全性和依赖性的原因,保持安装的软件包是最新的是一个好的系统管理员的做法。
+
+ # aptitude update && aptitude install package_name [Debian版和衍生版]
+ # yum update && yum install package_name [CentOS版]
+ # zypper refresh && zypper install package_name [openSUSE版]
+
+**3. 卸载包**
+
+按选项卸载将会卸载软件包,但把配置文件保留完好,然而清除包从系统中完全删去该程序。
+# aptitude remove / purge package_name
+# yum erase package_name
+
+ ---注意要卸载的openSUSE包前面的减号 ---
+
+ # zypper remove -package_name
+
+在默认情况下,大部分(如果不是全部)的包管理器会提示你,在你实际卸载之前你是否确定要继续卸载。所以,请仔细阅读屏幕上的信息,以避免陷入不必要的麻烦!
+
+**4. 显示包的信息**
+
+下面的命令将会显示birthday这个包的信息。
+
+ # aptitude show birthday
+ # yum info birthday
+ # zypper info birthday
+
+
+
+检查包信息
+
+### 总结 ###
+
+作为一个系统管理员,包管理器是你不能回避的东西。你应该立即准备使用本文中介绍的这些工具。希望你在准备LFCS考试和日常工作中会觉得这些工具好用。欢迎在下面留下您的意见或问题,我们将尽可能快的回复你。
+
+--------------------------------------------------------------------------------
+
+via: http://www.tecmint.com/linux-package-management/
+
+作者:[Gabriel Cánepa][a]
+译者:[Flowsnow](https://github.com/Flowsnow)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.tecmint.com/author/gacanepa/
+[1]:http://www.tecmint.com/dpkg-command-examples/
+[2]:http://www.tecmint.com/useful-basic-commands-of-apt-get-and-apt-cache-for-package-management/
+[3]:http://www.tecmint.com/20-practical-examples-of-rpm-commands-in-linux/
+[4]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/
+[5]:http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/
\ No newline at end of file
diff --git a/translated/tech/Learn with Linux/Learn with Linux--Learning Music.md b/translated/tech/Learn with Linux/Learn with Linux--Learning Music.md
new file mode 100644
index 0000000000..c732344a19
--- /dev/null
+++ b/translated/tech/Learn with Linux/Learn with Linux--Learning Music.md
@@ -0,0 +1,153 @@
+Linux 教学之教你玩音乐
+================================================================================
+
+
+[Linux 学习系列][1]的所有文章:
+
+- [Linux 教学之教你练打字][2]
+- [Linux 教学之物理模拟][3]
+- [Linux 教学之教你玩音乐][4]
+- [Linux 教学之两款地理软件][5]
+- [Linux 教学之掌握数学][6]
+
+引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。
+
+学习音乐是一个很好的消遣方式。训练你的耳朵能识别音阶与和弦、掌握一门乐器、控制自己的嗓音,这些都需要大量的练习,以及会遇到很多困难。音乐理论非常博大精深,有太多东西需要记忆,你需要非常勤奋才能讲这些东西变成你的“技术”。在你的音乐之路上,Linux 提供了杰出的软件来帮助你前行。它们不能让你立刻成为一个音乐家,但可以作为一个降低学习难度的好助手。
+
+### Gnu Solfège ###
+
+[Solfège][7] 是一个世界流行的音乐教学工具,适用于各个级别的音乐教育。很多流行的教学方法(比如著名的柯达伊教学法)就使用 Solfège 作为它们的基础。相比于学到音乐知识,Solfège 更关注于让用户不断练习音乐。它假想的用户是那些已经有一些音乐基础,并且想不断练习音乐技巧的学生。
+
+以下是 GNU 网站的开发者声明:
+
+> “当你在高校、学院、音乐学校中学习音乐,你一般要进行的一些听力训练,比如视唱,会比较简单,但是通常需要两个人配合,一个问,一个答。[...] GNU Solfège 尝试着解决这个问题,你可以在没有其他人的帮助下完成更多的简单机械式练习。只是别忘了这些练习只是整个音乐训练过程的一部分。”
+
+这款软件兑现了它的承诺,你可以在试听帮手的帮助下练习几乎所有音乐技巧。
+
+Debian 和 Ubuntu 的远端库上有这款软件,在终端运行下面命令安装软件:
+
+ sudo apt-get install solfege
+
+它开启的时候会出现一个简单的开始界面。
+
+
+
+这些选项几乎包含了所有种类,大多数链接里面都有子类,你可以从中选择独立的练习。
+
+
+
+
+
+软件提供多种练习和测试项目,都能通过外接的 MIDI 设备(LCTT 译注:MIDI,Musical Instrument Digital Interface,乐器数字接口)或者声卡来播放音乐。这些练习还配合音符播放,以及支持慢动作回放功能。
+
+很重要的一点是如果你在 Ubuntu 下使用 Solfège,默认情况下你可能没法听到声音(除非你有外接 MIDI 设备)。如果出现了这种情况,点击“File -> Prefernces -> Sound Setup”,选择合适的设备(一般情况下选 ALSA 都能解决问题)。
+
+
+
+Solfège 对你的日常练习非常有帮助,经常使用它,可以在你开始唱 do-re-mi 之前练好你的音乐听觉。
+
+### Tete (听力训练) ###
+
+[Tete][8] (这款听力训练软件)是一款简单但有效的 JAVA 软件,用于[训练听力][9]。它通过在不同背景下播放不同和弦以及不同 MIDI 声音来训练你分辨不同的音阶。[从 SourceForge 下载][10],然后解压它。
+
+ unzip Tete-*
+
+进入解压出来的目录:
+
+ cd Tete-*
+
+这里假设你的系统已经安装好了 JAVA,你可以使用下面的命令执行 Java 文件:
+
+ java -jar Tete-[版本号]
+
+(可以在输入“Tete-”后按 Tab 键进行自动补全。)
+
+Tete 只有一个简单的界面,所有内容都在这里了。
+
+
+
+你可以选择表演音阶(见上图),和弦(下图),
+
+
+
+或音程。
+
+
+
+你可以“精调”很多选项,包括 midi 乐器的声音、提升或降低音阶以及回放的快慢等等。SourceForge 网站上有关于 Tete 的非常有用的教程,介绍了这个软件的各个方面。
+
+### JalMus ###
+
+Jalmus 是用 JAVA 写的键盘音符阅读训练器。可以外接 MIDI 键盘,也可以使用虚拟键盘。它提供很多简单的课程练习来训练你的音符阅读能力。这个软件在2013年之后就不再更新了,但还是比较实用的。
+
+进入[sourceforge 页面][11]下载最后版本(v2.3)的 JAVA 安装器,或者在终端输入下面的命令下载:
+
+ wget http://garr.dl.sourceforge.net/project/jalmus/Jalmus-2.3/installjalmus23.jar
+
+下载完成后,加载安装器:
+
+ java -jar installjalmus23.jar
+
+跨平台的 JAVA 安装器会一步一步引导你完成安装的。
+
+Jalmus 的主界面非常朴素。
+
+
+
+你可以在“Lessons”菜单中找到各种不同难度的课程,从非常简单(一行音符从左边向右滑过,键盘上相应的按键会高亮显示),
+
+
+
+到非常困难(有多行音符从右向左滑过,你需要按顺序键入音符)。
+
+
+
+Jalmus 也包含一些训练,内容和课程相似,只是没有那些视觉上的提示了。当完成训练后,屏幕上会显示你的乐谱。它还提供不同难度的节拍训练,你能听到看到这些训练里面播放的旋律。在多行乐谱同时播放时,一个节拍器(能听见能看见)可以帮你理解
+
+
+
+和阅读乐谱。(LCTT 写给王老板的话:我特么实在编不下去了,这段你得帮我改改。)
+
+
+
+所有这些功能都是可配置的,你可以选择打开或者关闭它们。
+
+总的来说,Jalmus 可能是节奏训练软件中属于功能最强的,虽然它不是学音乐必备的软件,但在节奏训练这个特殊的领域,它做得很出色。
+
+### 号外 ###
+
+#### TuxGuitar ####
+
+对于吉他练习者,[TuxGuitar][12] 看起来很像 Windows 下面的 Guitar Pro 软件(它也可以读 Guitar Pro 格式的文件)。
+
+#### PianoBooster ####
+[Piano Booster][13] 可以练习钢琴技巧,它能播放 MIDI 文件,你可以使用外接键盘来弹钢琴,同时还能查看屏幕上滑过的乐谱。
+
+### 总结 ###
+
+Linux 提供很多优秀的工具供你学习,如果你对音乐感兴趣,你完全不用担心没有软件能帮你练习音乐技术。实际上,可供学习音乐的学生选择的优秀软件数量远比上面介绍的要多。如果你还知道其他的音乐训练软件,请在写下你的评论,让我们能够知道。
+
+--------------------------------------------------------------------------------
+
+via: https://www.maketecheasier.com/linux-learning-music/
+
+作者:[Attila Orosz][a]
+译者:[bazz2](https://github.com/bazz2)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:https://www.maketecheasier.com/author/attilaorosz/
+[1]:https://www.maketecheasier.com/series/learn-with-linux/
+[2]:https://www.maketecheasier.com/learn-to-type-in-linux/
+[3]:https://www.maketecheasier.com/linux-physics-simulation/
+[4]:https://www.maketecheasier.com/linux-learning-music/
+[5]:https://www.maketecheasier.com/linux-geography-apps/
+[6]:https://www.maketecheasier.com/learn-linux-maths/
+[7]:https://en.wikipedia.org/wiki/Solf%C3%A8ge
+[8]:http://tete.sourceforge.net/index.shtml
+[9]:https://en.wikipedia.org/wiki/Ear_training
+[10]:http://sourceforge.net/projects/tete/files/latest/download
+[11]:http://sourceforge.net/projects/jalmus/files/Jalmus-2.3/
+[12]:http://tuxguitar.herac.com.ar/
+[13]:http://www.linuxlinks.com/article/20090517041840856/PianoBooster.html
diff --git a/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md b/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md
new file mode 100644
index 0000000000..75694225aa
--- /dev/null
+++ b/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md
@@ -0,0 +1,119 @@
+Linux 教学之教你练打字
+================================================================================
+
+
+[Linux 学习系列][1]的所有文章:
+
+- [Linux 教学之教你练打字][2]
+- [Linux 教学之物理模拟][3]
+- [Linux 教学之教你玩音乐][4]
+- [Linux 教学之两款地理软件][5]
+- [Linux 教学之掌握数学][6]
+
+引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。
+
+很多人都要打字,操作键盘已经成为他们的第二天性。 但是这些人中有多少是依然使用两个手指头来快速地按键盘的?即使学校有教我们使用键盘的方法(LCTT 译注:呃。。。),我们也会慢慢地抛弃正确的打字姿势,养成只用两个大拇指玩键盘的习惯。
+
+下面要介绍的两款软件可以帮你掌控你的键盘,然后你就可以让你的手指跟上你的思维,然后你的思维就不会被打断了。当然,还有很多更炫更酷的软件可供选择,但本文所选的这两款是最简单、最容易上手的。
+
+### TuxType (或者叫 TuxTyping) ###
+
+TuxType 是给小孩子玩的。在一些有趣的游戏中,小学生们可以通过完成一些简单的练习来 get “10个手指打字”的新技能。
+
+Debian 及其衍生版本(包含所有 Ubuntu 衍生版本)的标准软件仓库都有 TuxType,使用下面的命令安装:
+
+ sudo apt-get install tuxtype
+
+软件开始时有一个简单的 Tux 界面和一段难听的 midi 音乐,幸运的是你可以通过右下角的喇叭按钮把声音调低了。(LCTT译注:Tux 就是那只 Linux 吉祥物,Linus 说它的表情被设计成刚喝完啤酒后的满足感,见《Just For Fun》。)
+
+
+
+最开始处的两个选项“Fish Cascade”和“Comet Zap”是打字游戏,当你开始游戏时,你需要很投入到这个课程。
+
+第3个选项为“Lession”,提供40多个简单的课程,每个课程会增加一个字母让你来练习,练习过程中会给出一些提示,比如应该用哪个手指按键盘上的字母。
+
+
+
+
+
+更高级点的,你可以练习输入句子。不知道为什么,句子练习被放在“Options”选项里。(LCTT 译注:句子练习第一句是“The quick brown fox jumps over the lazy dog”,包含了26个英文字母,可用于检测键盘是否坏键,也是练习英文打字的必备良药啊。)
+
+
+
+这个游戏让玩家打出单词来帮助 Tux 吃到小鱼或者干掉掉下来的流星,训练速度和精确度。
+
+
+
+
+
+除了练习有趣外,这些游戏还可以训练玩家的拼写、速度、手眼配合能力,因为你如果认真在玩的话,必须盯着屏幕,不看键盘打字。
+
+### GNU typist (gtype) ###
+
+对于成年人或有打字经验的人来说,GNU Typist 可能更合适,它是一个 GNU 项目,基于控制台操作。
+
+GNU Typist 也在大多数 Debian 衍生版本的软件库中,运行下面的命令来安装:
+
+ sudo apt-get install gtype
+
+你估计不能在应用菜单里找到它,只能在终端界面上执行下面的命令来启动:
+
+ gtype
+
+界面简单,没有废话,直接提供课程内容,玩家选择就是了。
+
+
+
+课程直截了当,内容详细。
+
+
+
+在交互练习的过程中,如果你输入错误,会将错误点高亮显示。不会像其他漂亮界面分散你的注意力,你可以专注于练习。每个课程的右下角都有一组统计数据来展示你的表现,如果你犯了很多错误,就可能无法通过关卡了。
+
+
+
+简单练习只需要你重复输入一些字符,而高阶练习需要你输入整个句子。
+
+
+
+下图的错误已经超过 3%,错误率太高了,你得降低些。
+
+
+
+一些训练用于完成特殊目标,比如“平衡键盘训练(LCTT 译注:感觉是用来练习手感的)”。
+
+
+
+下图是速度练习。
+
+
+
+下图是要你输入一段经典文章。
+
+
+
+如果你想练习其他语种,操作一下命令行参数就行。
+
+
+
+### 总结 ###
+
+如果你想练练自己的打字水平,Linux 上有很多软件给你用。本文介绍的两款软件界面简单但内容丰富,能满足绝大多数打字爱好者的需求。如果你正在使用、或者听说过其他的优秀打字练习软件,请在评论栏贴出来,让我们长长姿势。
+
+--------------------------------------------------------------------------------
+
+via: https://www.maketecheasier.com/learn-to-type-in-linux/
+
+作者:[Attila Orosz][a]
+译者:[bazz2](https://github.com/bazz2)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:https://www.maketecheasier.com/author/attilaorosz/
+[1]:https://www.maketecheasier.com/series/learn-with-linux/
+[2]:https://www.maketecheasier.com/learn-to-type-in-linux/
+[3]:https://www.maketecheasier.com/linux-physics-simulation/
+[4]:https://www.maketecheasier.com/linux-learning-music/
+[5]:https://www.maketecheasier.com/linux-geography-apps/
+[6]:https://www.maketecheasier.com/learn-linux-maths/
\ No newline at end of file
diff --git a/translated/tech/Learn with Linux/Learn with Linux--Physics Simulation.md b/translated/tech/Learn with Linux/Learn with Linux--Physics Simulation.md
new file mode 100644
index 0000000000..273ff72d5a
--- /dev/null
+++ b/translated/tech/Learn with Linux/Learn with Linux--Physics Simulation.md
@@ -0,0 +1,107 @@
+Linux 教学之物理模拟
+================================================================================
+
+
+[Linux 学习系列][1]的所有文章:
+
+- [Linux 教学之教你练打字][2]
+- [Linux 教学之物理模拟][3]
+- [Linux 教学之教你玩音乐][4]
+- [Linux 教学之两款地理软件][5]
+- [Linux 教学之掌握数学][6]
+
+引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。
+
+物理是一个有趣的课题,证据就是任何物理课程都可以用具体的图片演示给你看。能看到物理变化过程是一个很妙的体验,特别是你不需要到教室就能体验到。Linux 上有很多很好的科学软件来为你提供这种美妙感觉,本篇文章只着重介绍其中几种。
+
+### 1. Step ###
+
+[Step][7] 是一个交互型物理模拟器,KDEEdu[8](KDE 教育)项目的一部分。没人会比它的作者更了解它的作用。在项目官网主页上写着“[Step] 是这样玩的:你放点东西进来,添加一些力(地心引力或者弹簧),然后点击‘模拟’按钮,这款软件就会为你模拟这个物体在真实世界的物理定律影响下的运动状态。你可以改变物体或力的属性(允许在模拟过程中进行修改),然后观察不同属性下产生的现象。Step 可以让你从体验中学习物理!”
+
+Step 依赖 Qt 以及其他一些 KDE 所依赖的软件,正是由于像 KDEEdu 之类的项目存在,才使得 KDE 变得如此强大,当然,你可能需要忍受由此带来的庞大的桌面系统。
+
+Debian 的源中包含了 step 软件,终端下运行以下命令安装:
+
+ sudo apt-get install step
+
+在 KDE 环境下,它只需要很少的依赖,几秒钟就能安装完成。
+
+Step 有个简单的交互界面,你进去后直接可以进行模拟操作。
+
+
+
+你会发现所有物品在屏幕左边,包括不同的质点,空气,不同形状的物体,弹簧,以及不同的力(见1区域) 。如果你选中一个物体,屏幕右边会出现简短的描述信息(见2区域),以及你创造的世界的介绍(主要介绍这个世界中包含的物体)(见3区域),以及你当前选中的物体的属性(见4区域),以及你的操作历史(见5区域)。
+
+
+
+一旦你放好了所有物体,点击下“模拟”按钮,可以看到物体与物体之间的相互作用。
+
+
+
+
+
+
+
+想要更多了解 Step,按 F1 键,KDE 帮助中心会打印详细的软件操作手册。
+
+### 2. Lightspeed ###
+
+Lightspeed 是一个简单的基于 GTK+ 和 OpenGL 的模拟器,可以模拟一个高速移动的物体被观测到的现象。这个模拟器的理论基础是爱因斯坦的狭义相对论,在 Lightspeed 的 [srouceforge 页面][9]上,他们这样介绍:当一个物体被加速到几千公里每秒,它就会表现得扭曲和褪色;当物体被不断加速到接近光速(299,792,458 m/s)时,这个现象会越来越明显,并且在不同方向观察这个物体的扭曲方式,会得到完全不一样的结果。
+
+受到相对速度影响的现象如下(LCTT 译注:都可以从“光速不变”理论推导出来):
+
+- **洛伦兹收缩** —— 物体看起来变短了
+- **多普乐红移/蓝移** —— 物体的颜色变了
+- **前灯效应** —— 物体的明暗变化(LCTT 译注:当物体接近光速移动时,会在它前进的方向强烈地辐射光子,从这个角度看,物体会变得很亮,相反,从物体背后观察,会发现它很暗)
+- **光行差效应** —— 物体扭曲变形了
+
+Lightspeed 有 Debian 的源,执行下面的命令来安装:
+
+ sudo apt-get install lightspeed
+
+用户界面非常简单,里边有一个物体(你可以从 sourceforge 下载更多形状的物体)沿着 x 轴运动(按下 A 键或在菜单栏 object 项目的 Animation 选项设置,物体就会开始运动)。
+
+
+
+你可以滑动右边的滑动条来控制物体移动的速度。
+
+
+
+其他一些简单的控制器可以让你获得更多的视觉效果。
+
+
+
+点击界面并拖动鼠标可以改变物体视角,在 Camera 菜单下可以修改背景颜色或者物体的图形模式,以及其他效果。
+
+### 特别推荐: Physion ###
+
+Physion 是个非常有趣并且美观的物理模拟软件,比上面介绍的两款软件都好玩好看。可惜在写本文章的时候它的[官网][10]出现问题了,下载页面无法使用。
+
+从他们放在 Youtube 上的视频来看,Physion 还是值得我们下载下来玩玩的。在官网恢复之前,我们只能看看演示视频了。
+
+注:youtube 视频
+
+
+你有其他 Linux 下的好玩的物理模拟、演示、教学软件吗?如果有,请在评论处分享给我们。
+
+--------------------------------------------------------------------------------
+
+via: https://www.maketecheasier.com/linux-physics-simulation/
+
+作者:[Attila Orosz][a]
+译者:[bazz2](https://github.com/bazz2)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:https://www.maketecheasier.com/author/attilaorosz/
+[1]:https://www.maketecheasier.com/series/learn-with-linux/
+[2]:https://www.maketecheasier.com/learn-to-type-in-linux/
+[3]:https://www.maketecheasier.com/linux-physics-simulation/
+[4]:https://www.maketecheasier.com/linux-learning-music/
+[5]:https://www.maketecheasier.com/linux-geography-apps/
+[6]:https://www.maketecheasier.com/learn-linux-maths/
+[7]:https://edu.kde.org/applications/all/step
+[8]:https://edu.kde.org/
+[9]:http://lightspeed.sourceforge.net/
+[10]:http://www.physion.net/
diff --git a/translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md b/translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md
new file mode 100644
index 0000000000..8ce6b052af
--- /dev/null
+++ b/translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md
@@ -0,0 +1,99 @@
+Linux 教学之两款地理软件
+================================================================================
+
+
+[Linux 学习系列][1]的所有文章:
+
+- [Linux 教学之教你练打字][2]
+- [Linux 教学之物理模拟][3]
+- [Linux 教学之教你玩音乐][4]
+- [Linux 教学之两款地理软件][5]
+- [Linux 教学之掌握数学][6]
+
+引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。
+
+地理是一门有趣的学科,我们每天都能接触到,虽然可能没有意识到,但当你打开 GPS、SatNav 或谷歌地图时,你就已经在使用这些软件提供的地理数据了;当你在新闻中看到一个国家的消息或听到一些金融数据时,这些信息都可以归于地理学范畴。Linux 提供了很多学习地理学的软件,可用于教学,也可用于自学。
+
+### Kgeography ###
+
+在多数 Linux 发行版的软件库中,只有两个与地理有关的软件,两个都属于 KDE 阵营,或者说都属于 KDE 教育项目。Kgeopraphy 使用简单的彩色编码图来绘制被选中的国家。
+
+Ubuntu 及衍生版在终端执行下面命令安装软件:
+
+ sudo apt-get install kgeography
+
+界面很简单,给你一个选择界面,你可以选择不同的国家。
+
+
+
+点击地图上的某个区域,界面就会显示这个区域所在的国家和首都。
+
+
+
+以及给出不同的测试题来检测你的知识水平。
+
+
+
+这款软件以交互的方式测试你的地理知识,并且可以帮你为考试做好充足的准备。
+
+### Marble ###
+
+Marble 是一个稍微高级一点的软件,无需 3D 加速就能提供全球视角。
+
+
+
+在 Ubuntu 及衍生版的终端输入下面的命令来安装 Marble:
+
+ sudo apt-get install marble
+
+Marble 专注于地图绘制,它的主界面就是一张地图。
+
+
+
+你可以选择不同的投影方法,比如球状投影和麦卡托投影(LCTT 译注:把地球表面绘制在平面上的方法),在下拉菜单里你可以选择平面视角或外部视角,包括 Atlas 视角,OpenStreetMap 提供的成熟的离线地图,
+
+
+
+以及卫星视角(由 NASA 提供),
+
+
+
+以及政治上甚至是历史上的世界地图。
+
+
+
+除了有包含不同界面和大量数据的离线地图,Marble 还提供其他信息。你可以在菜单中打开或关闭不同的离线 info-boxes
+
+
+
+和在线的 online services。
+
+
+
+一个有趣的在线服务是维基百科,点击下 Wiki 图标,会弹出一个界面来展示你选中区域的详细信息。
+
+
+
+这款软件还提供定位追踪、路由规划、位置搜索和其他有用的功能。如果你喜欢地图学,Marble 可以让你长时间享受探索和学习的乐趣。
+
+### 总结 ###
+
+Linux 提供大量优秀的教育软件,当然也包括地理学科。本文介绍的两款软件可以帮你学到很多地理知识,并且你可以以一种好玩的人机交互方式来测试你的知识量。
+
+--------------------------------------------------------------------------------
+
+via: https://www.maketecheasier.com/linux-geography-apps/
+
+作者:[Attila Orosz][a]
+译者:[bazz2](https://github.com/bazz2)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:https://www.maketecheasier.com/author/attilaorosz/
+[1]:https://www.maketecheasier.com/series/learn-with-linux/
+[2]:https://www.maketecheasier.com/learn-to-type-in-linux/
+[3]:https://www.maketecheasier.com/linux-physics-simulation/
+[4]:https://www.maketecheasier.com/linux-learning-music/
+[5]:https://www.maketecheasier.com/linux-geography-apps/
+[6]:https://www.maketecheasier.com/learn-linux-maths/
\ No newline at end of file
diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md
new file mode 100644
index 0000000000..b539b9a4a8
--- /dev/null
+++ b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md
@@ -0,0 +1,143 @@
+grepƥַʸʽļļͨ˵grep ʾƥ䵽Уʹgrepһʽƥ䵽УֻʾʵУgrepΪLinuxUnixϵͳõ
+### ֪ ###
+grep֣ԴڱʾһƵΪgrepUnixLinuxı༭ǣ
+
+ g/re/p
+
+### grep ###
+
+ʾ:
+
+ grep 'word' filename
+ grep 'word' file1 file2 file3
+ grep 'string1 string2' filename
+ cat otherfile | grep 'something'
+ command | grep 'something'
+ command option1 | grep 'data'
+ grep --color 'data' fileName
+
+###ôʹgrepһļ###
+
+ /etc/passwd ļµbooû,:
+
+ $ grep boo /etc/passwd
+
+:
+
+ foo:x:1000:1000:foo,,,:/home/foo:/bin/ksh
+
+ʹgrepȥǿƺԴСд i.e ʹ-iƥ boo, Boo, BOO ѡ:
+
+ $ grep -i "boo" /etc/passwd
+
+### ݹʹgrep ###
+
+ʹgrepݹ i.e. ļĿ¼аַ192.168.1.5ļ
+
+ $ grep -r "192.168.1.5" /etc/
+
+ǣ
+
+ $ grep -R "192.168.1.5" /etc/
+
+ʾ:
+
+ /etc/ppp/options:# ms-wins 192.168.1.50
+ /etc/ppp/options:# ms-wins 192.168.1.51
+ /etc/NetworkManager/system-connections/Wired connection 1:addresses1=192.168.1.5;24;192.168.1.2;
+
+ῴҵ 192.168.1.5 ĽļΪʾڵ棬֮аļԼ-hѡֹ
+ $ grep -h -R "192.168.1.5" /etc/
+
+
+
+ $ grep -hR "192.168.1.5" /etc/
+
+ʾ:
+
+ # ms-wins 192.168.1.50
+ # ms-wins 192.168.1.51
+ addresses1=192.168.1.5;24;192.168.1.2;
+
+### ʹgrepȥı ###
+
+boogrepƥfoobooboo123, barfoo35 booַʹ-wѡȥǿѡЩǸʵС
+
+ $ grep -w "boo" file
+
+### ʹegrepȥȽϲͬ ###
+
+ʹegrep:
+
+ $ egrep -w 'word1|word2' /path/to/file
+
+### ıƥʱͳ ###
+
+grepͨ-cʾÿļƥ䵽Ĵ
+
+ $ grep -c 'word' /path/to/file
+
+-nѡȥʾǰƥ䵽ļ
+
+ $ grep -n 'root' /etc/passwd
+
+ʾ:
+
+ 1:root:x:0:0:root:/root:/bin/bash
+ 1042:rootdoor:x:0:0:rootdoor:/home/rootdoor:/bin/csh
+ 3319:initrootapp:x:0:0:initrootapp:/home/initroot:/bin/ksh
+
+### תƥ ###
+
+ʹ-vѡȥӡƥݣݽЩʵУɾbarʵУ
+
+ $ grep -v bar /path/to/file
+
+### UNIX / Linux ܵ grep ###
+
+grep ܵһʹãУʾӲ֣
+
+ # dmesg | egrep '(s|h)d[a-z]'
+
+ʾCPUģ
+
+ # cat /proc/cpuinfo | grep -i 'Model'
+
+Ȼ·ʹõͬʱʹùܵ:
+
+ # grep -i 'Model' /proc/cpuinfo
+
+ʾ:
+
+ model : 30
+ model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz
+ model : 30
+ model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz
+
+### νʾƥ䵽ݵļ? ###
+
+ʹ-lѡȥʾЩļаmainļ:
+
+ $ grep -l 'main' *.c
+
+ʹgrepɫʵʾ:
+
+ $ grep --color vivek /etc/passwd
+
+ʾ:
+
+
+
+
+--------------------------------------------------------------------------------
+
+via: http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/
+
+ߣVivek Gite
+ߣ[zky001](https://github.com/zky001)
+Уԣ[УID](https://github.com/УID)
+
+ [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ
+
+УID
+[1]:http://bash.cyberciti.biz/guide/Pipes
\ No newline at end of file
diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md
new file mode 100755
index 0000000000..8389f4c339
--- /dev/null
+++ b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md
@@ -0,0 +1,288 @@
+## grep 中的正则表达式
+================================================================================
+在 Linux 、类 Unix 系统中我该如何使用 Grep 命令的正则表达式呢?
+
+Linux 附带有 GNU grep 命令工具,它支持正则表达式,而且 GNU grep 在所有的 Linux 系统中都是默认有的。Grep 命令被用于搜索定位存储在您服务器或工作站的信息。
+
+### 正则表达式 ###
+
+正则表达式仅仅是对每个输入行的匹配的一种模式,即对字符序列的匹配模式。下面是范例:
+
+ ^w1
+ w1|w2
+ [^ ]
+
+#### grep 正则表达式示例 ####
+
+在 /etc/passswd 目录中搜索 'vivek'
+
+ grep vivek /etc/passwd
+
+输出例子:
+
+ vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash
+ vivekgite:x:1001:1001::/home/vivekgite:/bin/sh
+ gitevivek:x:1002:1002::/home/gitevivek:/bin/sh
+
+摸索任何情况下的 vivek(即不区分大小写的搜索)
+
+ grep -i -w vivek /etc/passwd
+
+摸索任何情况下的 vivek 或 raj
+
+ grep -E -i -w 'vivek|raj' /etc/passwd
+
+上面最后的例子显示的,就是一个正则表达式扩展的模式。
+
+### 锚 ###
+
+你可以分别使用 ^ 和 $ 符号来正则匹配输入行的开始或结尾。下面的例子搜索显示仅仅以 vivek 开始的输入行:
+
+ grep ^vivek /etc/passwd
+
+输出例子:
+
+ vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash
+ vivekgite:x:1001:1001::/home/vivekgite:/bin/sh
+
+你可以仅仅只搜索出以单词 vivek 开始的行,即不显示 vivekgit、vivekg 等
+
+ grep -w ^vivek /etc/passwd
+
+找出以单词 word 结尾的行:
+
+ grep 'foo$' 文件名
+
+匹配仅仅只包含 foo 的行:
+
+ grep '^foo$' 文件名
+
+如下所示的例子可以搜索空行:
+
+ grep '^$' 文件名
+
+### 字符类 ###
+
+匹配 Vivek 或 vivek:
+
+ grep '[vV]ivek' 文件名
+
+或者
+
+ grep '[vV][iI][Vv][Ee][kK]' 文件名
+
+也可以匹配数字 (即匹配 vivek1 或 Vivek2 等等):
+
+ grep -w '[vV]ivek[0-9]' 文件名
+
+可以匹配两个数字字符(即 foo11、foo12 等):
+
+ grep 'foo[0-9][0-9]' 文件名
+
+不仅仅局限于数字,也能匹配至少一个字母的:
+
+ grep '[A-Za-z]' 文件名
+
+显示含有"w" 或 "n" 字符的所有行:
+
+ grep [wn] 文件名
+
+在括号内的表达式,即包在"[:" 和 ":]" 之间的字符类的名字,它表示的是属于此类的所有字符列表。标准的字符类名称如下:
+
+- [:alnum:] - 字母数字字符.
+- [:alpha:] - 字母字符
+- [:blank:] - 空字符: 空格键符 和 制表符.
+- [:digit:] - 数字: '0 1 2 3 4 5 6 7 8 9'.
+- [:lower:] - 小写字母: 'a b c d e f g h i j k l m n o p q r s t u v w x y z'.
+- [:space:] - 空格字符: 制表符、换行符、垂直制表符、换页符、回车符和空格键符.
+- [:upper:] - 大写字母: 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'.
+
+例子所示的是匹配所有大写字母:
+
+ grep '[:upper:]' 文件名
+
+### 通配符 ###
+
+你可以使用 "." 来匹配单个字符。例子中匹配以"b"开头以"t"结尾的3个字符的单词:
+
+ grep '\' 文件名
+
+在这儿,
+
+- \< 匹配单词前面的空字符串
+- \> 匹配单词后面的空字符串
+
+打印出只有两个字符的所有行:
+
+ grep '^..$' 文件名
+
+显示以一个点和一个数字开头的行:
+
+ grep '^\.[0-9]' 文件名
+
+#### 点号转义 ####
+
+下面要匹配到 IP 地址为 192.168.1.254 的正则式是不会工作的:
+
+ egrep '192.168.1.254' /etc/hosts
+
+三个点符号都需要转义:
+
+ grep '192\.168\.1\.254' /etc/hosts
+
+下面的例子仅仅匹配出 IP 地址:
+
+ egrep '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' 文件名
+
+下面的例子会匹配任意大小写的 Linux 或 UNIX 这两个单词:
+
+ egrep -i '^(linux|unix)' 文件名
+
+### 怎么样搜索以 - 符号开头的匹配模式? ###
+
+要使用 -e 选项来搜索匹配 '--test--' 字符串,如果不使用 -e 选项,grep 命令会试图把 '--test--' 当作自己的选项参数来解析:
+
+ grep -e '--test--' 文件名
+
+### 怎么使用 grep 的 OR 匹配? ###
+
+使用如下的语法:
+
+ grep 'word1|word2' 文件名
+
+或者是
+
+ grep 'word1\|word2' 文件名
+
+### 怎么使用 grep 的 AND 匹配? ###
+
+使用下面的语法来显示既包含 'word1' 又包含 'word2' 的所有行
+
+ grep 'word1' 文件名 | grep 'word2'
+
+### 怎么样使用序列检测? ###
+
+使用如下的语法,您可以检测一个字符在序列中重复出现次数:
+
+ {N}
+ {N,}
+ {min,max}
+
+要匹配字符 “v" 出现两次:
+
+ egrep "v{2}" 文件名
+
+下面的命令能匹配到 "col" 和 "cool" :
+
+ egrep 'co{1,2}l' 文件名
+
+下面的命令将会匹配出至少有三个 'c' 字符的所有行。
+
+ egrep 'c{3,}' 文件名
+
+下面的例子会匹配 91-1234567890(即二个数字-十个数字) 这种格式的手机号。
+
+ grep "[[:digit:]]\{2\}[ -]\?[[:digit:]]\{10\}" 文件名
+
+### 怎么样使 grep 命令突出显示?###
+
+使用如下的语法:
+
+ grep --color regex 文件名
+
+### 怎么样仅仅只显示匹配出的字符,而不是匹配出的行? ###
+
+使用如下语法:
+
+ grep -o regex 文件名
+
+### 正则表达式限定符###
+
+注:表格
+
+
+ | 限定符 |
+ 描述 |
+
+
+ | . |
+ 匹配任意的一个字符. |
+
+
+ | ? |
+ 匹配前面的子表达式,最多一次。 |
+
+
+ | * |
+ 匹配前面的子表达式零次或多次。 |
+
+
+ | + |
+ 匹配前面的子表达式一次或多次。 |
+
+
+ | {N} |
+ 匹配前面的子表达式 N 次。 |
+
+
+ | {N,} |
+ 匹配前面的子表达式 N 次到多次。 |
+
+
+ | {N,M} |
+ 匹配前面的子表达式 N 到 M 次,至少 N 次至多 M 次。 |
+
+
+ | - |
+ 只要不是在序列开始、结尾或者序列的结束点上,表示序列范围 |
+
+
+ | ^ |
+ 匹配一行开始的空字符串;也表示字符不在要匹配的列表中。 |
+
+
+ | $ |
+ 匹配一行末尾的空字符串。 |
+
+
+ | \b |
+ 匹配一个单词前后的空字符串。 |
+
+
+ | \B |
+ 匹配一个单词中间的空字符串 |
+
+
+ | \< |
+ 匹配单词前面的空字符串。 |
+
+
+ | \> |
+ 匹配单词后面的空字符串。 |
+
+
+
+#### grep 和 egrep ####
+
+egrep 跟 **grep -E** 是一样的。他会以正则表达式的模式来解释。下面是 grep 的帮助页(man):
+
+ 基本的正则表达式元字符 ?、+、 {、 |、 ( 和 ) 已经失去了他们特殊的意义,要使用的话用反斜线的版本 \?、\+、\{、\|、\( 和 \) 来代替。
+ 传统的 egrep 不支持 { 元字符,一些 egrep 的实现是以 \{ 替代的,所以有 grep -E 的通用脚本应该避免使用 { 符号,要匹配字面的 { 应该使用 [}]。
+ GNU grep -E 试图支持传统的用法,如果 { 出在在无效的间隔规范字符串这前,它就会假定 { 不是特殊字符。
+ 例如,grep -E '{1' 命令搜索包含 {1 两个字符的串,而不会报出正则表达式语法错误。
+ POSIX.2 标准允许对这种操作的扩展,但在可移植脚本文件里应该避免这样使用。
+
+引用:
+
+- grep 和 regex 帮助手册页(7)
+- grep 的 info 页`
+
+--------------------------------------------------------------------------------
+
+via: http://www.cyberciti.biz/faq/grep-regular-expressions/
+
+作者:Vivek Gite
+译者:[runningwater](https://github.com/runningwater)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
\ No newline at end of file
diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md
new file mode 100644
index 0000000000..9af1afa163
--- /dev/null
+++ b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md
@@ -0,0 +1,41 @@
+使用 grep 命令来搜索多个单词/字符串模式
+================================================================================
+要使用 grep 命令来搜索多个字符串或单词,我们该怎么做?例如我想要查找 /path/to/file 文件中的 word1、word2、word3 等单词,我怎么样命令 grep 查找这些单词呢?
+
+[grep 命令支持正则表达式][1]匹配模式。要使用多单词搜索,请使用如下语法:
+
+ grep 'word1\|word2\|word3' /path/to/file
+
+下的例子中,要在一个名叫 /var/log/messages 的文本日志文件中查找 warning、error 和 critical 这几个单词,输入:
+
+ $ grep 'warning\|error\|critical' /var/log/messages
+
+仅仅只是要匹配单词的话,可以加上 -w 选项参数:
+
+ $ grep -w 'warning\|error\|critical' /var/log/messages
+
+egrep 命令可以跳过上面的语法格式,其使用的语法格式如下:
+
+ $ egrep -w 'warning|error|critical' /var/log/messages
+
+我建义您们加上 -i (忽略大小写) 和 --color 选项参数,如下示:
+
+ $ egrep -wi --color 'warning|error|critical' /var/log/messages
+
+输出示例:
+
+
+
+Fig.01: Linux / Unix egrep 命令查找多个单词输出例子
+
+--------------------------------------------------------------------------------
+
+via: http://www.cyberciti.biz/faq/searching-multiple-words-string-using-grep/
+
+作者:Vivek Gite
+译者:[runningwater](https://github.com/runningwater)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[1]:http://www.cyberciti.biz/faq/grep-regular-expressions/
\ No newline at end of file
diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md
new file mode 100644
index 0000000000..9de5e1d64d
--- /dev/null
+++ b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md
@@ -0,0 +1,152 @@
+Linux / UNIX 下只查看配置文件的有效配置行(配置文件中未被注释的命令行)
+=========================================================
+
+大多数的Linux和类Unix系统的配置文件中都有许多的注释行,但是有时候我只想看其中的有效配置行。那我怎么才能只看到quid.conf或httpd.conf这样的配置文件中的非注释命令行呢?怎么去掉这些注释或者空行呢?
+
+我们可以使用UNIX / BSD / OS X / Linux 这些操作系统自身提供的grep,sed,awk,perl或者其他文本处理工具来查看配置文件中的有效配置命令行。
+
+
+### grep 命令示例——去掉注释 ###
+
+可以按照如下示例使用grep命令:
+
+ $ grep -v "^#" /path/to/config/file
+ $ grep -v "^#" /etc/apache2/apache2.conf
+
+示例输出:
+
+ ServerRoot "/etc/apache2"
+
+ LockFile /var/lock/apache2/accept.lock
+
+ PidFile ${APACHE_PID_FILE}
+
+ Timeout 300
+
+ KeepAlive On
+
+ MaxKeepAliveRequests 100
+
+ KeepAliveTimeout 15
+
+
+
+ StartServers 5
+ MinSpareServers 5
+ MaxSpareServers 10
+ MaxClients 150
+ MaxRequestsPerChild 0
+
+
+
+ StartServers 2
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 150
+ MaxRequestsPerChild 0
+
+
+
+ StartServers 2
+ MaxClients 150
+ MinSpareThreads 25
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxRequestsPerChild 0
+
+
+ User ${APACHE_RUN_USER}
+ Group ${APACHE_RUN_GROUP}
+
+
+ AccessFileName .htaccess
+
+
+ Order allow,deny
+ Deny from all
+ Satisfy all
+
+
+ DefaultType text/plain
+
+
+ HostnameLookups Off
+
+ ErrorLog /var/log/apache2/error.log
+
+ LogLevel warn
+
+ Include /etc/apache2/mods-enabled/*.load
+ Include /etc/apache2/mods-enabled/*.conf
+
+ Include /etc/apache2/httpd.conf
+
+ Include /etc/apache2/ports.conf
+
+ LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
+ LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
+ LogFormat "%h %l %u %t \"%r\" %>s %O" common
+ LogFormat "%{Referer}i -> %U" referer
+ LogFormat "%{User-agent}i" agent
+
+ CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined
+
+
+
+ Include /etc/apache2/conf.d/
+
+ Include /etc/apache2/sites-enabled/
+
+想要跳过空行,可以使用 [egrep 命令][1], 示例:
+
+ egrep -v "^#|^$" /etc/apache2/apache2.conf
+ ## or pass it to the page such as more or less ##
+ egrep -v "^#|^$" /etc/apache2/apache2.conf | less
+
+ ## Bash function ######################################
+ ## or create function or alias and use it as follows ##
+ ## viewconfig /etc/squid/squid.conf ##
+ #######################################################
+ viewconfig(){
+ local f="$1"
+ [ -f "$1" ] && command egrep -v "^#|^$" "$f" || echo "Error $1 file not found."
+ }
+
+示例输出:
+
+
+
+Fig.01: Unix/Linux Egrep 除去注释行和空行
+
+### 理解 grep/egrep 命令行选项 ###
+
+-v 选项,选择出不匹配的命令行。该选项适用于所有基于posix的系统。正则表达式 ^$ 匹配出所有的非空行, ^#匹配出所有的不以“#”开头的非注释行。
+
+### sed 命令示例 ###
+
+可以按照如下示例使用 GNU / sed 命令:
+
+ $ sed '/ *#/d; /^ *$/d' /path/to/file
+ $ sed '/ *#/d; /^ *$/d' /etc/apache2/apache2.conf
+GNU or BSD sed 也可以修改配置文件。下面的语法是编辑文件,修改扩展名(比如 .bak)进行文件备份:
+
+ sed -i'.bak.2015.12.27' '/ *#/d; /^ *$/d' /etc/apache2/apache2.conf
+
+更多信息见参考手册 - [grep(1)][2], [sed(1)][3]
+
+--------------------------------------------------------------------------------
+
+via: http://www.cyberciti.biz/faq/shell-display-uncommented-lines-only/
+
+作者:Vivek Gite
+译者:[sonofelice](https://github.com/sonofelice)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[1]:http://www.cyberciti.biz/faq/grep-regular-expressions/
+[2]:http://www.manpager.com/linux/man1/grep.1.html
+[3]:http://www.manpager.com/linux/man1/sed.1.html
\ No newline at end of file