From 58f75899dcf46dbfbd44d64cf7d4314201757571 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 11 Feb 2015 17:10:23 +0800 Subject: [PATCH 001/163] =?UTF-8?q?20150211-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...t Known Linux Archive or Compress Tools.md | 229 ++++++++++++++++++ ...umble in Ubuntu an Opensource VoIP Apps.md | 78 ++++++ ...igration From MySQL To MariaDB On Linux.md | 169 +++++++++++++ 3 files changed, 476 insertions(+) create mode 100644 sources/tech/20150211 Best Known Linux Archive or Compress Tools.md create mode 100644 sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md create mode 100644 sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md diff --git a/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md b/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md new file mode 100644 index 0000000000..3d3960cf4d --- /dev/null +++ b/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md @@ -0,0 +1,229 @@ +Best Known Linux Archive / Compress Tools +================================================================================ +Sending and receiving large files and pictures over the internet is a headache many times. Compression and decompression tools are meant to address this problem. Lets take a quick overview of a few open source tools that are available to make our jobs simpler. + +Tar +gzip, gunzip +bzip2, bunzip2 +7-Zip + +### Tar ### + +Tar is derived from 'Tape archiver' as this was initially used for archiving and storing files on magnetic tapes. It is a GNU software. It can compress a set of files (archives), extract them and manipulate those which already exist. It is useful for storing, backing up and transporting files. Tar can preserve file and directory structure while creating the archives. Files archived using tar have '.tar' extensions. + +Basic Usage + +#### a) Creating an archive (c / --create) #### + + tar --create --verbose --file=archive.tar file1 file2 file3 + +OR + + tar cvf archive.tar file1 file2 file3 + +![tar cvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-cvf.png) + +creating an archive + +#### b) Listing an archive ( t / --list) #### + + tar --list archive.tar + +![tar tvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-tvf.png) + +Listing the contents + +#### c) Extracting an archive (x / --extract) #### + + tar xvf archive.tar + + tar xvf archive.tar --wildcards '*.c' - extracts files with only *.c extension from the archive. + +![tar xvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-xvf.png) + +Extracting files + +![tar xvf --wildcards](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-wildcard.png) + +Extract only the required files + +#### d) Updating an archive ( u / --update) #### + + tar uvf archive.tar newfile.c - updates the archive by adding newfile.c if its version is newer than the existing one. + +![tar uvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-uvf.png) + +Updating an archive + +#### e) Delete from an archive (--delete) #### + + tar--delete -f archive.tar file1.c - deletes 'file1.c' from the tar ball 'archive.tar' + +![tar --delete](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-delete.png) + +Deleting files + +Refer to [tar home page][1] for its detailed usage + +### Gzip / Gunzip ### + +Gzip stands for GNU zip. It is a compression utility that is commonly available in Linux operating system. Compressed files have an extension of '*.gz' + +**Basic Usage** + +#### a) Compressing files #### + + gzip file(s) + +Each file gets compressed individually + +![gzip](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip.png) + +Compress files + +This generally deletes the original files after compression. We can keep the original file by using the -c option. + + gzip -c file > file.gz + +![gzip-c](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip-c.png) + +Keep original files after compressing + +We can also compress a group of files into a single file + + cat file1 file2 file3 | gzip > archieve.gz + +![gz group](http://blog.linoxide.com/wp-content/uploads/2015/01/gz-group.png) + +Compressing a group of files + +#### b) Checking compression ratio #### + +Compression ratio of the compressed file(s) can be verified using the '-l' option. + + gzip -l archieve.gz + +![gzip -l](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip-l.png) + +Checking compression ratio + +#### c) Unzipping files #### + +Gunzip is used for unzipping files. Here also, original files are deleted after decompression. Use the -c option to retain original files. + + gunzip -c archieve.gz + +![gunzip -c](http://blog.linoxide.com/wp-content/uploads/2015/01/gunzip-c.png) + +Unzipping files + +Using '-d' option with gzip command has the same effect of gunzip on compressed files. + +More details can be obtained from [gzip home page][2] + +### Bzip2 / Bunzip2 ### + +[Bzip2][3] is also a compression tool like gzip but can compress files to smaller sizes than that is possible with other traditional tools. But the drawback is that it is slower than gzip. + +**Basic Usage** + +#### a) File Compression #### + +Generally, no options are used for compression and the files to be compressed are passed as arguments. Each file gets compressed individually and compressed files will have the extension 'bz2'. + + bzip2 file1 file2 file3 + +![bzip2](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2.png) + +File Compression + +Use '-k' option to keep the original files after compression / decompression. + +![bzip2 -k](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2-k.png) + +Retaining original files after compression + +'-d' option is used for forced decompression. + +![bzip2 -d](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2-d.png) + +Delete files using -d option + +#### b) Decompression #### + + bunzip2 filename + +![bunzip2](http://blog.linoxide.com/wp-content/uploads/2015/01/bunzip2.png) + +Decompressing files + +bunzip2 can decompress files with extensions bz2, bz, tbz2 and tbz. Files with tbz2 and tbz will end up with '.tar' extension after decompression. + + bzip2 -dc performs the function of decompressing files to the stdout + +### 7-zip ### + +[7-zip][4] is another open source file archiver. It uses 7z format which is a new compression format and provides high-compression ratio. Hence, it is considered to be better than the previously mentioned compression tools. It is available under Linux as p7zip package. The package includes three binaries – 7z, 7za and 7zr. Refer to the [p7zip wiki][5] for differences between these binaries. In this article, we will be using 7zr to explain the usage. Archived files will have '.7z' extension. + +**Basic usage** + +#### a) Creating an archive #### + + 7zr a archive-name.7z file-name(s) / directory-name(s) + +![7zr a](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-a.png) + +Creating an archive + +#### b) Listing an archive #### + + 7zr l archive-name.7z + +![7zr l](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-l.png) + +Listing an archive + +#### c) Extracting an archive #### + + 7zr e archive-name.7z + +![7zr e](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-e.png) + +Extracting an archive + +#### d) Updating an archive #### + + 7zr u archive-name.7z new-file + +![7zr u](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-u.png) + +Updating an archive + +#### e) Deleting files from an archive #### + + 7zr d archive-name.7z file-to-be-deleted + +![7zr d](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-d.png) + +Deleting files + +![7zr l](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-d-l.png) + +Verifying file deletion + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/linux-compress-decompress-tools/ + +作者:[B N Poornima][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/bnpoornima/ +[1]:http://www.gnu.org/software/tar/ +[2]:http://www.gzip.org/ +[3]:http://www.bzip.org/ +[4]:http://www.7-zip.org/ +[5]:https://wiki.archlinux.org/index.php/p7zip \ No newline at end of file diff --git a/sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md new file mode 100644 index 0000000000..fffe871da6 --- /dev/null +++ b/sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -0,0 +1,78 @@ +Install Mumble in Ubuntu an Opensource VoIP Apps +================================================================================ +Mumble is a free and open source voice over IP (VoIP) application, released under the new BSD license, primarily designed for use by gamers and it's similar to programs such as TeamSpeak and Ventrilo. It uses a server to witch people can connect with a client to talk to each other. + +It offers the following great features: + +- low latency, very important for gaming +- offers in-game overlay so you can see who is talking and positional audio to hear the players from where they are located +- has encrypted communications so you can stay private and secure +- it also offers a few nice configuration interface that are easy to use +- very stable and good on resource usage for your server + +### Install Mumble ### + +[Mumble][1] has become very popular and is now present in the software repositories of the major Linux distributions and this makes it easy to install and setup. In Ubuntu you can use the command line to install it with apt-get by running the following command: + + $ sudo apt-get install mumble-server + +![mumble install](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-install.jpg) + +This will install the server (also called Murmur) on your server. + +### Configuring Mumble ### + +To setup Mumble you will need to run the following command: + +$ sudo dpkg-reconfigure mumble-server + +The following questions will pop-up: + +![mumble q1](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q1.jpg) + +Pick Yes to have mumble start when your server boots, next it will ask if you wish to run it in a high-priority mode that will ensure lower latency, it's a good idea to have it run it like that for the best performance: + +![mumble q2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q2.jpg) + +It will then require you to introduce a password for the administrator user of the new mumble server, you will need to remember this password for when you will log-in. + +![mumble q3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q3.jpg) + +### Installing Mumble Client ### + +The client can be installed on most major platforms like Windows, Mac OS X and Linux. We will cover the installation and configuration on Ubuntu Linux, to install it you can use the Software Center or run the following command: + + $ sudo apt-get install mumble + +When you first run Mumble it will present you with a wizard to help you configure your audio input and output to make the best of the client. It will first ask you what sound device and microphone to use: + +![mumble client 1](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-1.jpg) + +Then it will help you calibrate the devices: + +![mumble client 2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-2.jpg) + +And since mumble encrypts all the communication it will ask you to also create a certificate: + +![mumble client 3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-3.jpg) + +After you finish with the wizard you can add your first server and connect to it the dialog will look like this: + +![mumble add server](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-add-server.jpg) + +First enter a label, this can be anything you wish to remember the server by, next add the address and port of the server, and finally use "SuperUser" as user and the password you used when you configured the mumble server. + +You can now connect to the server and enjoy all of the features while you play online or talk to your friends or partners. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/install-mumble-ubuntu/ + +作者:[Adrian Dinu][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/adriand/ +[1]:http://wiki.mumble.info/wiki/Main_Page \ No newline at end of file diff --git a/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md b/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md new file mode 100644 index 0000000000..1588c979a4 --- /dev/null +++ b/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md @@ -0,0 +1,169 @@ +Simple Steps Migration From MySQL To MariaDB On Linux +================================================================================ +Hi all, this tutorial is all gonna be about how to migrate from MySQL to MariaDB on Linux Server or PC. So, you may ask why should we really migrate from MySQL to MariaDB for our database management. Here, below are the reasons why you should really need to migrate your database management system from MySQL to MariaDB. + +### Why should I use MariaDB instead of MySQL? ### + +MariaDB is an enhanced drop-in replacement and community-developed fork of the MySQL database system. It was developed by MariaDB foundation, and is being led by original developers of MySQL. Working with MariaDB is entirely same as MySQL. After Oracle bought MySQL, it is not free and open source anymore, but **MariaDB is still free and open source**. Top Websites like Google, Wikipedia, Linkedin, Mozilla and many more migrated to MariaDB. Its features are + +- Backwards compatible with MySQL +- Forever open source +- Maintained by MySQL's creator +- More cutting edge features +- More storage engines +- Large websites have switched + +Now, lets migrate to MariaDB. + +**For the testing purpose**, let us create a sample database called **linoxidedb** . + +Log in to MySQL as root user using the following command: + + $ mysql -u root -p + +Enter the mysql root user password. You’ll be redirected to the **mysql prompt**. + +**Create test databases:** + +Enter the following commands from mysql prompt to create test databases. + + mysql> create database linoxidedb; + +To view the list of available databases, enter the following command: + + mysql> show databases; + +![creating test databases](http://blog.linoxide.com/wp-content/uploads/2015/01/creating-test-databases.png) + +As see above, we have totally 5 databases including the newly created database linoxidedb . + + mysql> quit + +Now, we'll migrate the created databases from MySQL to MariaDB. + +Note: This tutorial is not necessary for CentOS, fedora based distribution of Linux because MariaDB is automatically installed instead of MySQL which requires no need to backup the existing databases, you just need to update mysql which will give you mariadb. + +### 1. Backup existing databases ### + +Our first important step is to create a backup of existing databases. To do that, we'll enter the following command from the **Terminal (not from MySQL prompt)**. + + $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql + +Oops! We encountered an error. No worries, it can be fixed. + + $ mysqldump: Error: Binlogging on server not active + +![](http://blog.linoxide.com/wp-content/uploads/2015/01/mysqldump-error.png) +mysqldump error + +To fix this error, we have to do a small modification in **my.cnf** file. + +Edit my.cnf file: + + $ sudo nano /etc/mysql/my.cnf + +Under [mysqld] section, add the following parameter. + +**log-bin=mysql-bin** + +![configuring my.cnf](http://blog.linoxide.com/wp-content/uploads/2015/01/configuring-my.cnf_.png) + +Now, after done save and exit the file. Then, we'll need to restart mysql server. To do that please execute the below commands. + + $ sudo /etc/init.d/mysql restart + +Now, re-run the mysqldump command to backup all databases. + + $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql + +![](http://blog.linoxide.com/wp-content/uploads/2015/01/crearing-bakup-file.png) +dumping databases + +The above command will backup all databases, and stores them in **backupdatabase.sql** in the current directory. + +### 2. Uninstalling MySQL ### + +First of all, we'll want to **backup the my.cnf file to a safe location**. + +**Note**: The my.cnf file will not be deleted when uninstalling MySQL packages. We do it for the precaution. During MariaDB installation, the installer will ask us to keep the existing my.cnf(old backup) file or to use the package containers version (i.e new one). + +To backup the my.cnf file, please enter the following commands in a shell or terminal. + + $ sudo cp /etc/mysql/my.cnf my.cnf.bak + +To stop mysql service, enter the following command from your Terminal. + + $ sudo /etc/init.d/mysql stop + +Then, remove mysql packages. + + $ sudo apt-get remove mysql-server mysql-client + +![uninstalling mysql](http://blog.linoxide.com/wp-content/uploads/2015/01/uninstalling-mysql.png) + +### 3. Installing MariaDB ### + +Here are the commands to run to install MariaDB on your Ubuntu system: + + $ sudo apt-get install software-properties-common + $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db + # sudo add-apt-repository 'deb http://mirror.mephi.ru/mariadb/repo/5.5/ubuntu trusty main' + +![adding mariadb repo](http://blog.linoxide.com/wp-content/uploads/2015/01/adding-repo-mariadb.png) + +Once the key is imported and the repository added you can install MariaDB with: + + $ sudo apt-get update + $ sudo apt-get install mariadb-server + +![installing mariadb](http://blog.linoxide.com/wp-content/uploads/2015/01/installing-mariadb.png) + +![my.conf configuration prompt](http://blog.linoxide.com/wp-content/uploads/2015/01/my.conf-configuration-prompt.png) + +We should remember that during MariaDB installation, the installer will ask you either to use the existing my.cnf(old backup) file, or use the package containers version (i.e new one). You can either use the old my.cnf file or the package containers version. If you want to use the new my.cnf version, you can restore the contents of older my.cnf (We already have copied this file to safe location before) later ie my.cnf.bak . So, I will go for default which is N, we'll press N then. For other versions, please refer the [MariaDB official repositories page][2]. + +### 4. Restoring Config File ### + +To restore my.cnf from my.cnf.bak, enter the following command in Terminal. We have the old as my.cnf.bak file in our current directory, so we can simply copy the file using the following command: + + $ sudo cp my.cnf.bak /etc/mysql/my.cnf + +### 5. Importing Databases ### + +Finally, lets import the old databases that we created before. To do that, we'll need to run the following command. + + $ mysql -u root -p < backupdatabase.sql + +That’s it. We have successfully imported the old databases. + +Let us check if the databases are really imported. To do that, we'll wanna log in to mysql prompt using command: + + $ mysql -u root -p + +![importing database](http://blog.linoxide.com/wp-content/uploads/2015/01/importing-database.png) + +Now, to check whether the databases are migrated to MariaDB please run "**show databases**;" command inside the MarianDB prompt without quotes("") as + + mariaDB> show databases; + +![mysql to mariadb database migrated](http://blog.linoxide.com/wp-content/uploads/2015/01/maria-database-migrated.png) + +As you see in the above result all old databases including our very linoxidedb has been successfully migrated. + +### Conclusion ### + +Finally, we have successfully migrated our databases from MySQL to MariaDB Database Management System. MariaDB is far more better than MySQL. Though MySQL is still faster than MariaDB in performance but MariaDB is far more better because of its additional features and license. MariaDB is a Free and Open Source Software (FOSS) and will be FOSS forever but MySQL has many additional plugins, etc non-free and there is no proper public roadmap and won't be FOSS in future. If you have any questions, comments, feedback to us, please don't hesitate to write on the comment box below. Thank You ! And Enjoy MariaDB. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/migrate-mysql-mariadb-linux/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://mariadb.org/ +[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=mephi \ No newline at end of file From 497b4ce51495ae9100ffb8e41cf0bc2f62e0b138 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 11 Feb 2015 17:19:27 +0800 Subject: [PATCH 002/163] =?UTF-8?q?20150211-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Server Against the GHOST Vulnerability.md | 44 ++++++++++++ ...b Based Monitoring tool) on Ubntu 14.10.md | 70 +++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md create mode 100644 sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md diff --git a/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md b/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md new file mode 100644 index 0000000000..a78b786606 --- /dev/null +++ b/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md @@ -0,0 +1,44 @@ +How To Protect Ubuntu Server Against the GHOST Vulnerability +================================================================================ +On January 27, 2015, a GNU C Library (glibc) vulnerability, referred to as the GHOST vulnerability, was announced to the general public. In summary, the vulnerability allows remote attackers to take complete control of a system by exploiting a buffer overflow bug in glibc's GetHOST functions.Check more details from [here][1] + +The GHOST vulnerability can be exploited on Linux systems that use versions of the GNU C Library prior to glibc-2.18. That is, systems that use an unpatched version of glibc from versions 2.2 to 2.17 are at risk. + +### Check System Vulnerability ### + +You can use the following command to check the glib version + + ldd --version + +### Output ### + +ldd (Ubuntu GLIBC 2.19-10ubuntu2) **2.19** +Copyright (C) 2014 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +Written by Roland McGrath and Ulrich Drepper. + +The glib version should be above 2.17 and from the output we are running 2.19.If you are seeing glib version between 2.2 to 2.17 then you need to run the following commands + + sudo apt-get update + + sudo apt-get dist-upgrade + +After the installation you need to reboot the server using the following command + + sudo reboot + +After reboot use the same command again and check the glib version. + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/how-to-protect-ubuntu-server-against-the-ghost-vulnerability.html + +作者:[ruchi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix +[1]:http://chargen.matasano.com/chargen/2015/1/27/vulnerability-overview-ghost-cve-2015-0235.html \ No newline at end of file diff --git a/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md b/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md new file mode 100644 index 0000000000..67d9d550e5 --- /dev/null +++ b/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md @@ -0,0 +1,70 @@ +Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10 +================================================================================ +A low-overhead monitoring web dashboard for a GNU/Linux machine. Simply drop-in the app and go!.Linux Dash's interface provides a detailed overview of all vital aspects of your server, including RAM and disk usage, network, installed software, users, and running processes. All information is organized into sections, and you can jump to a specific section using the buttons in the main toolbar. Linux Dash is not the most advanced monitoring tool out there, but it might be a good fit for users looking for a slick, lightweight, and easy to deploy application. + +### Linux-Dash Features ### + +A beautiful web-based dashboard for monitoring server info + +Live, on-demand monitoring of RAM, Load, Uptime, Disk Allocation, Users and many more system stats + +Drop-in install for servers with Apache2/nginx + PHP + +Click and drag to re-arrange widgets + +Support for wide range of linux server flavors + +### List of Current Widgets ### + +- General info +- Load Average +- RAM +- Disk Usage +- Users +- Software +- IP +- Internet Speed +- Online +- Processes +- Logs + +### Install Linux-dash on ubuntu server 14.10 ### + +First you need to make sure you have [Ubuntu LAMP server 14.10][1] installed and Now you have to install the following package + + sudo apt-get install php5-json unzip + +After the installation this module will enable for apache2 so you need to restart the apache2 server using the following command + + sudo service apache2 restart + +Now you need to download the linux-dash package and install + + wget https://github.com/afaqurk/linux-dash/archive/master.zip + + unzip master.zip + + sudo mv linux-dash-master/ /var/www/html/linux-dash-master/ + +Now you need to change the permissions using the following command + + sudo chmod 755 /var/www/html/linux-dash-master/ + +Now you need to go to http://serverip/linux-dash-master/ you should see similar to the following output + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/02/1.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/02/2.png) + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/install-linux-dash-web-based-monitoring-tool-on-ubntu-14-10.html + +作者:[ruchi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix +[1]:http://www.ubuntugeek.com/step-by-step-ubuntu-14-10-utopic-unicorn-lamp-server-setup.html \ No newline at end of file From e6322d796083f3745a1ecfb681145daa291c6268 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 11 Feb 2015 17:52:27 +0800 Subject: [PATCH 003/163] Update 20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md --- ...esktop on Ubuntu 14.10 or Linux Mint 17.md | 73 ++++++++++--------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md b/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md index a1ae7919c3..f311e41565 100644 --- a/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md +++ b/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md @@ -1,90 +1,91 @@ -Translating by martin. - -Install the Gnome Flashback classical desktop on Ubuntu 14.10/Linux Mint 17 +在Ubuntu14.10/Mint7上安装Gnome Flashback classical桌面 ================================================================================ -The [Gnome Flashback][1] desktop environment is a simple and great way to get back the old style classical desktop if you do not like Unity desktop, like many. +如果你不喜欢现在的Unity桌面,[Gnome Flashback][1] 桌面环境是一个简单的并且很棒的选择,让你能找回曾经经典的桌面。 -Gnome Flashback is based on GTK 3 and provides a desktop interface visually similar to the old gnome desktop. +Gnome Flashback基于GTK3并提供与原先gnome桌面视觉上相似的界面。 -Another alternative to gnome flashback is the MATE desktop from linux mint and XFCE desktop, but both of them are based on gtk 2. +gnome flashback的另一个改变是采用了源自mint和xface的MATE桌面,但无论mint还是xface都是基于gtk2的。 -### Install Gnome Flashback ### +### 安装 Gnome Flashback ### -Install the following package on your Ubuntu system and you are done. +在你的ubuntu上安装以下包即可: $ sudo apt-get install gnome-session-flashback -Now logout and at the login screen press the settings button on the box that asks for password. There would be 2 options, Gnome Flashback (Metacity) and Gnome Flashback (Compiz). +然后注销到达登录界面,单击密码输入框右上角的徽标型按钮,即可选择桌面环境。可供选择的有Gnome Flashback (Metacity) 会话模式和Gnome Flashback (Compiz)会话模式。 -Metacity is lighter and faster, whereas Compiz gets you the more fancy desktop effects. Here is a screenshot of my gnome flashback desktop. +Metacity更轻更快,而Compiz则能带给你更棒的桌面效果。下面是我使用gnome flashback桌面的截图。 -It uses a wallpaper from elementary OS and also Plank dock with no bottom panel. This tutorial explains every bit of it. +桌面采用了elementary OS的壁纸和Plank dock并且移除了底部面板。这些都会在这篇教程中涉及到。 ![ubuntu gnome flashback](http://www.binarytides.com/blog/wp-content/uploads/2015/02/ubuntu-gnome-flashback.png) -After installing Gnome Flashback desktop you need to do a couple of more things to finetune it. +在安装好gnome flashback桌面以后也许你对效果还不满意,这样你可能需要执行接下来的一系列操作来对它进行微调。 -### 1. Install Gnome Tweak Tool ### +### 1. 安装 Gnome Tweak Tool ### -The Gnome Tweak Tool allows you to customize things like fonts, themes etc, that are otherwise difficult or impossible with the "unity-control-center" tool of Unity desktop. +Gnome Tweak Tool能够帮助你定制比如字体、主题等,那些在Unity桌面的控制中心十分困难或是不可能完成的任务。 $ sudo apt-get install gnome-tweak-tool -Find it in Applications > System Tools > Preferences > Tweak Tool +启动按步骤 应用程序 > 系统工具 > 首选项 > Tweak Tool -### 2. Add applets to panel ### +### 2. 在面板上添加小应用 ### -By default right clicking on the panels would not have any effect. Press the Alt+Super (windows) key on your keyboard while you right click on the panels and you would get the relevant options to customize the panel. +默认的右键点击面板是没有效果的。你可以尝试在右键点击面板的同时按住键盘上的Alt+Super (win)键,这样定制面板的相关选项将会出现。 -You can modify the panel, remove it and also add applets to it. In this example we shall remove the bottom panel and replace it with Plank dock. +你可以修改或删除面板并在上面添加些小应用。在这个例子中我们移除了底部面板,并用Plank dock来代替它的位置。 -Add a datetime applet on the top panel at the middle. Configure it to display the date time and weather conditions. +在顶部面板的中间添加一个显示时间的小应用。通过配置使它显示时间和天气。 -Also add a workspace switcher applet to the top panel and create as many workspaces as you need. +同样的添加一个工作空间切换器到顶部面板,并创建合适个数的工作空间。 -### 3. Take window title bar buttons to the right ### +### 3. 将窗口标题栏的按钮右置 ### -On Ubuntu the minimise, maximise and close buttons on the window title bar are on the left by default. It needs a small hack to get them to the right. +在ubuntu中,最小化、最大化和关闭按钮默认实在标题栏的左侧的。需要稍作手脚才能让他们乖乖回到右边去。 -To take the window buttons to the right use the following command, which I found at askubuntu. +想让窗口的按钮到右边可以使用下面的命令,这是我在askubuntu上找到的。 $ gsettings set org.gnome.desktop.wm.preferences button-layout 'menu:minimize,maximize,close' -### 4. Install Plank dock ### +### 4.安装 Plank dock ### -The plank dock sits at the bottom and holds launchers for applications and window launchers for running applications. It hides itself when not necessary and shows up again when needed. Its the same dock as used by elementary OS. +plank dock位于屏幕底部用于启动应用和切换打开的窗口。会在必要的时间隐藏自己,并在需要的时候出现。elementary OS使用的dock就是plank dock。 -Run the following commands +运行以下命令安装 $ sudo add-apt-repository ppa:ricotz/docky -y $ sudo apt-get update $ sudo apt-get install plank -y -Find it in Applications > Accessories > Plank. To configure it to start automatically with the system, go to System Tools > Preferences > Startup Applications and add the "plank" command to the list. +现在启动 应用程序 > 附件 > Plank。若想让它开机自动启动,找到 应用程序 > 系统工具 > 首选项 > 启动应用程序 并将“plank”的命令加到列表中。 -### 5. Install Conky system monitor ### +### 5. 安装 Conky 系统监视器 ### -Conky is a nice way to decorate your desktop with system statistics like cpu and memory usage. It is lightweight and works most of the time without any hassles. +Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰桌面。它不太占资源并且运行的大部分时间都不惹麻烦。 -Run the following commands - +运行如下命令安装 $ sudo apt-add-repository -y ppa:teejee2008/ppa $ sudo apt-get update $ sudo apt-get install conky-manager -Now launch Applications > Accessories > Conky Manager and select the widget you want to display on your desktop. Conky Manager also allows you to configure it to launch at system startup. +现在启动 应用程序 > 附件 > Conky Manager 选择你想在桌面上显示的部件。Conky Manager同样可以配置到启动项中。 -### 6. Install CompizConfig Settings Manager ### +### 6. 安装CCSM ### -If you wish to use Gnome Flashback (Compiz) session then it would be useful to use the compiz settings manager to configure desktop effects. Install it with the following command +如果你更愿意使用Gnome Flashback (Compiz),那么CCSM将是你配置桌面特效的得力助手。 + +运行以下命令安装 $ sudo apt-get install compizconfig-settings-manager -Now launch it from System Tools > Preferences > CompizConfig Settings Manager. +启动按步骤 应用程序 > 系统工具 > 首选项 > CompizConfig Settings Manager. -> It so happened inside Virtualbox that, in the compiz session window decorations went missing. To fix it, launch Compiz settings and enable the "Copy to texture" plugin and then logout and login back. It should be fixed. -However the Compiz session is slower than the Metacity session. +>在虚拟机中经常会发生compiz会话中装饰窗口消失。可以通过启动Compiz设置,在打开"Copy to texture",注销后重新登录即可。 + +不过值得一提的是Compiz 会话会比Metacity慢。 -------------------------------------------------------------------------------- From 40951b7dd249c6702bb948ed72ac1d62270e512c Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 11 Feb 2015 17:53:57 +0800 Subject: [PATCH 004/163] Update 20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md --- ...ck classical desktop on Ubuntu 14.10 or Linux Mint 17.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md b/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md index f311e41565..de5283e344 100644 --- a/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md +++ b/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md @@ -52,7 +52,7 @@ Gnome Tweak Tool能够帮助你定制比如字体、主题等,那些在Unity plank dock位于屏幕底部用于启动应用和切换打开的窗口。会在必要的时间隐藏自己,并在需要的时候出现。elementary OS使用的dock就是plank dock。 -运行以下命令安装 +运行以下命令安装: $ sudo add-apt-repository ppa:ricotz/docky -y $ sudo apt-get update @@ -64,7 +64,7 @@ plank dock位于屏幕底部用于启动应用和切换打开的窗口。会在 Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰桌面。它不太占资源并且运行的大部分时间都不惹麻烦。 -运行如下命令安装 +运行如下命令安装: $ sudo apt-add-repository -y ppa:teejee2008/ppa $ sudo apt-get update @@ -76,7 +76,7 @@ Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰 如果你更愿意使用Gnome Flashback (Compiz),那么CCSM将是你配置桌面特效的得力助手。 -运行以下命令安装 +运行以下命令安装: $ sudo apt-get install compizconfig-settings-manager From 81a6611755d97e5845bf7669e6ee5ac0fecfb196 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 11 Feb 2015 17:55:07 +0800 Subject: [PATCH 005/163] =?UTF-8?q?20150211-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ng Mod_Security and Mod_evasive Modules.md | 270 ++++++++++++++++++ 1 file changed, 270 insertions(+) create mode 100644 sources/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md diff --git a/sources/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md b/sources/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md new file mode 100644 index 0000000000..29bb770e5d --- /dev/null +++ b/sources/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md @@ -0,0 +1,270 @@ +Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules +================================================================================ +For those of you in the hosting business, or if you’re hosting your own servers and exposing them to the Internet, securing your systems against attackers must be a high priority. + +mod_security (an open source intrusion detection and prevention engine for web applications that integrates seamlessly with the web server) and mod_evasive are two very important tools that can be used to protect a web server against brute force or (D)DoS attacks. + +mod_evasive, as its name suggests, provides evasive capabilities while under attack, acting as an umbrella that shields web servers from such threats. + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Install-Mod_Security-Mod_evasive-in-CentOS.jpg) +Install Mod_Security and Mod_Evasive to Protect Apache + +In this article we will discuss how to install, configure, and put them into play along with Apache on RHEL/CentOS 6 and 7 as well as Fedora 21-15. In addition, we will simulate attacks in order to verify that the server reacts accordingly. + +This assumes that you have a LAMP server installed on your system. If not, please check this article before proceeding further. + +- [Install LAMP stack in RHEL/CentOS 7][1] + +You will also need to setup iptables as the default [firewall][2] front-end instead of firewalld if you’re running RHEL/CentOS 7 or Fedora 21. We do this in order to use the same tool in both RHEL/CentOS 7/6 and Fedora 21. + +### Step 1: Installing Iptables Firewall on RHEL/CentOS 7 and Fedora 21 ### + +To begin, stop and disable firewalld: + + # systemctl stop firewalld + # systemctl disable firewalld + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Disable-Firewalld-Service.png) +Disable Firewalld Service + +Then install the iptables-services package before enabling iptables: + + # yum update && yum install iptables-services + # systemctl enable iptables + # systemctl start iptables + # systemctl status iptables + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Install-Iptables-Firewall.png) +Install Iptables Firewall + +### Step 2: Installing Mod_Security and Mod_evasive ### + +In addition to having a LAMP setup already in place, you will also have to [enable the EPEL repository][3] in RHEL/CentOS 7/6 in order to install both packages. Fedora users don’t need to enable any repo, because epel is a already part of Fedora project. + + # yum update && yum install mod_security mod_evasive + +When the installation is complete, you will find the configuration files for both tools in /etc/httpd/conf.d. + + # ls -l /etc/httpd/conf.d + +![](http://www.tecmint.com/wp-content/uploads/2012/06/mod_security-mod_evasive-Configurations.png) +mod_security + mod_evasive Configurations + +Now, in order to integrate these two modules with Apache and have it load them when it starts, make sure the following lines appear in the top level section of mod_evasive.conf and mod_security.conf, respectively: + + LoadModule evasive20_module modules/mod_evasive24.so + LoadModule security2_module modules/mod_security2.so + +Note that modules/mod_security2.so and modules/mod_evasive24.so are the relative paths, from the /etc/httpd directory to the source file of the module. You can verify this (and change it, if needed) by listing the contents of the /etc/httpd/modules directory: + + # cd /etc/httpd/modules + # pwd + # ls -l | grep -Ei '(evasive|security)' + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Verify-mod_security-mod_evasive-Modules.png) +Verify mod_security + mod_evasive Modules + +Then restart Apache and verify that it loads mod_evasive and mod_security: + + # service httpd restart [On RHEL/CentOS 6 and Fedora 20-18] + # systemctl restart httpd [On RHEL/CentOS 7 and Fedora 21] + +---------- + + [Dump a list of loaded Static and Shared Modules] + + # httpd -M | grep -Ei '(evasive|security)' + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Check-mod_security-mod_evasive-Loaded.png) +Check mod_security + mod_evasive Modules Loaded + +### Step 3: Installing A Core Rule Set and Configuring Mod_Security ### + +In few words, a Core Rule Set (aka CRS) provides the web server with instructions on how to behave under certain conditions. The developer firm of mod_security provide a free CRS called OWASP ([Open Web Application Security Project][4]) ModSecurity CRS that can be downloaded and installed as follows. + +1. Download the OWASP CRS to a directory created for that purpose. + + # mkdir /etc/httpd/crs-tecmint + # cd /etc/httpd/crs-tecmint + # wget https://github.com/SpiderLabs/owasp-modsecurity-crs/tarball/master + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Download-mod_security-Core-Rules.png) +Download mod_security Core Rules + +2. Untar the CRS file and change the name of the directory for one of our convenience. + + # tar xzf master + # mv SpiderLabs-owasp-modsecurity-crs-ebe8790 owasp-modsecurity-crs + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Extract-mod_security-Core-Rules.png) +Extract mod_security Core Rules + +3. Now it’s time to configure mod_security. Copy the sample file with rules (owasp-modsecurity-crs/modsecurity_crs_10_setup.conf.example) into another file without the .example extension: + + # cp modsecurity_crs_10_setup.conf.example modsecurity_crs_10_setup.conf + +and tell Apache to use this file along with the module by inserting the following lines in the web server’s main configuration file /etc/httpd/conf/httpd.conf file. If you chose to unpack the tarball in another directory you will need to edit the paths following the Include directives: + + + Include crs-tecmint/owasp-modsecurity-crs/modsecurity_crs_10_setup.conf + Include crs-tecmint/owasp-modsecurity-crs/base_rules/*.conf + + +Finally, it is recommended that we create our own configuration file within the /etc/httpd/modsecurity.d directory where we will place our customized directives (we will name it tecmint.conf in the following example) instead of modifying the CRS files directly. Doing so will allow for easier upgrading the CRSs as new versions are released. + + + SecRuleEngine On + SecRequestBodyAccess On + SecResponseBodyAccess On + SecResponseBodyMimeType text/plain text/html text/xml application/octet-stream + SecDataDir /tmp + + +You can refer to the [SpiderLabs’ ModSecurity GitHub][5] repository for a complete explanatory guide of mod_security configuration directives. + +### Step 4: Configuring Mod_Evasive ### + +mod_evasive is configured using directives in /etc/httpd/conf.d/mod_evasive.conf. Since there are no rules to update during a package upgrade, we don’t need a separate file to add customized directives, as opposed to mod_security. + +The default mod_evasive.conf file has the following directives enabled (note that this file is heavily commented, so we have stripped out the comments to highlight the configuration directives below): + + + DOSHashTableSize 3097 + DOSPageCount 2 + DOSSiteCount 50 + DOSPageInterval 1 + DOSSiteInterval 1 + DOSBlockingPeriod 10 + + +Explanation of the directives: + +- DOSHashTableSize: This directive specifies the size of the hash table that is used to keep track of activity on a per-IP address basis. Increasing this number will provide a faster look up of the sites that the client has visited in the past, but may impact overall performance if it is set too high. +- DOSPageCount: Legitimate number of identical requests to a specific URI (for example, any file that is being served by Apache) that can be made by a visitor over the DOSPageInterval interval. +- DOSSiteCount: Similar to DOSPageCount, but refers to how many overall requests can be made to the entire site over the DOSSiteInterval interval. +- DOSBlockingPeriod: If a visitor exceeds the limits set by DOSSPageCount or DOSSiteCount, his source IP address will be blacklisted during the DOSBlockingPeriod amount of time. During DOSBlockingPeriod, any requests coming from that IP address will encounter a 403 Forbidden error. + +Feel free to experiment with these values so that your web server will be able to handle the required amount and type of traffic. + +**Only a small caveat**: if these values are not set properly, you run the risk of ending up blocking legitimate visitors. + +You may also want to consider other useful directives: + +#### DOSEmailNotify #### + +If you have a mail server up and running, you can send out warning messages via Apache. Note that you will need to grant the apache user SELinux permission to send emails if SELinux is set to enforcing. You can do so by running + + # setsebool -P httpd_can_sendmail 1 + +Next, add this directive in the mod_evasive.conf file with the rest of the other directives: + + DOSEmailNotify you@yourdomain.com + +If this value is set and your mail server is working properly, an email will be sent to the address specified whenever an IP address becomes blacklisted. + +#### DOSSystemCommand #### + +This needs a valid system command as argument, + + DOSSystemCommand + +This directive specifies a command to be executed whenever an IP address becomes blacklisted. It is often used in conjunction with a shell script that adds a firewall rule to block further connections coming from that IP address. + +**Write a shell script that handles IP blacklisting at the firewall level** + +When an IP address becomes blacklisted, we need to block future connections coming from it. We will use the following shell script that performs this job. Create a directory named scripts-tecmint (or whatever name of your choice) in /usr/local/bin and a file called ban_ip.sh in that directory. + + #!/bin/sh + # IP that will be blocked, as detected by mod_evasive + IP=$1 + # Full path to iptables + IPTABLES="/sbin/iptables" + # mod_evasive lock directory + MOD_EVASIVE_LOGDIR=/var/log/mod_evasive + # Add the following firewall rule (block all traffic coming from $IP) + $IPTABLES -I INPUT -s $IP -j DROP + # Remove lock file for future checks + rm -f "$MOD_EVASIVE_LOGDIR"/dos-"$IP" + +Our DOSSystemCommand directive should read as follows: + + DOSSystemCommand "sudo /usr/local/bin/scripts-tecmint/ban_ip.sh %s" + +In the line above, %s represents the offending IP as detected by mod_evasive. + +**Add the apache user to the sudoers file** + +Note that all of this just won’t work unless you to give permissions to user apache to run our script (and that script only!) without a terminal and password. As usual, you can just type visudo as root to access the /etc/sudoers file and then add the following 2 lines as shown in the image below: + + apache ALL=NOPASSWD: /usr/local/bin/scripts-tecmint/ban_ip.sh + Defaults:apache !requiretty + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Add-Apache-User-to-Sudoers.png) +Add Apache User to Sudoers + +**IMPORTANT**: As a default security policy, you can only run sudo in a terminal. Since in this case we need to use sudo without a tty, we have to comment out the line that is highlighted in the following image: + + #Defaults requiretty + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Disable-tty-for-Sudo.png) +Disable tty for Sudo + +Finally, restart the web server: + + # service httpd restart [On RHEL/CentOS 6 and Fedora 20-18] + # systemctl restart httpd [On RHEL/CentOS 7 and Fedora 21] + +### Step 4: Simulating an DDoS Attacks on Apache ### + +There are several tools that you can use to simulate an external attack on your server. You can just google for “tools for simulating ddos attacks” to find several of them. + +Note that you, and only you, will be held responsible for the results of your simulation. Do not even think of launching a simulated attack to a server that you’re not hosting within your own network. + +Should you want to do the same with a VPS that is hosted by someone else, you need to appropriately warn your hosting provider or ask permission for such a traffic flood to go through their networks. Tecmint.com is not, by any means, responsible for your acts! + +In addition, launching a simulated DoS attack from only one host does not represent a real life attack. To simulate such, you would need to target your server from several clients at the same time. + +Our test environment is composed of a CentOS 7 server [IP 192.168.0.17] and a Windows host from which we will launch the attack [IP 192.168.0.103]: + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Confirm-Host-IPAddress.png) +Confirm Host IPAddress + +Please play the video below and follow the steps outlined in the indicated order to simulate a simple DoS attack: + +注:youtube视频,发布的时候不行做个链接吧 + + +Then the offending IP is blocked by iptables: + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Blocked-Attacker-IP.png) +Blocked Attacker IP + +### Conclusion ### + +With mod_security and mod_evasive enabled, the simulated attack causes the CPU and RAM to experiment a temporary usage peak for only a couple of seconds before the source IPs are blacklisted and blocked by the firewall. Without these tools, the simulation will surely knock down the server very fast and render it unusable during the duration of the attack. + +We would love to hear if you’re planning on using (or have used in the past) these tools. We always look forward to hearing from you, so don’t hesitate to leave your comments and questions, if any, using the form below. + +### Reference Links ### + +- [https://www.modsecurity.org/][6] +- [http://www.zdziarski.com/blog/?page_id=442][7] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/protect-apache-using-mod_security-and-mod_evasive-on-rhel-centos-fedora/ + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:http://www.tecmint.com/install-lamp-in-centos-7/ +[2]:http://www.tecmint.com/configure-firewalld-in-centos-7/ +[3]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[4]:https://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project +[5]:https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#Configuration_Directives +[6]:https://www.modsecurity.org/ +[7]:http://www.zdziarski.com/blog/?page_id=442 \ No newline at end of file From c9a0a404e1a6f66dc39fea6c060ca8099abe8bbd Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 11 Feb 2015 20:39:14 +0800 Subject: [PATCH 006/163] Update 20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md --- ...shback classical desktop on Ubuntu 14.10 or Linux Mint 17.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md b/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md index de5283e344..ae7968afd0 100644 --- a/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md +++ b/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md @@ -1,6 +1,6 @@ 在Ubuntu14.10/Mint7上安装Gnome Flashback classical桌面 ================================================================================ -如果你不喜欢现在的Unity桌面,[Gnome Flashback][1] 桌面环境是一个简单的并且很棒的选择,让你能找回曾经经典的桌面。 +如果你不喜欢现在的Unity桌面,[Gnome Flashback][1]桌面环境是一个简单的并且很棒的选择,让你能找回曾经经典的桌面。 Gnome Flashback基于GTK3并提供与原先gnome桌面视觉上相似的界面。 From 4ebba3f7818bb583dad65e989fbb85a77d22a0ab Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 11 Feb 2015 21:20:26 +0800 Subject: [PATCH 007/163] translated --- ...esktop on Ubuntu 14.10 or Linux Mint 17.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 translated/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md diff --git a/translated/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md b/translated/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md new file mode 100644 index 0000000000..ae7968afd0 --- /dev/null +++ b/translated/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md @@ -0,0 +1,101 @@ +在Ubuntu14.10/Mint7上安装Gnome Flashback classical桌面 +================================================================================ +如果你不喜欢现在的Unity桌面,[Gnome Flashback][1]桌面环境是一个简单的并且很棒的选择,让你能找回曾经经典的桌面。 + +Gnome Flashback基于GTK3并提供与原先gnome桌面视觉上相似的界面。 + +gnome flashback的另一个改变是采用了源自mint和xface的MATE桌面,但无论mint还是xface都是基于gtk2的。 + +### 安装 Gnome Flashback ### + +在你的ubuntu上安装以下包即可: + + $ sudo apt-get install gnome-session-flashback + +然后注销到达登录界面,单击密码输入框右上角的徽标型按钮,即可选择桌面环境。可供选择的有Gnome Flashback (Metacity) 会话模式和Gnome Flashback (Compiz)会话模式。 + +Metacity更轻更快,而Compiz则能带给你更棒的桌面效果。下面是我使用gnome flashback桌面的截图。 + +桌面采用了elementary OS的壁纸和Plank dock并且移除了底部面板。这些都会在这篇教程中涉及到。 + +![ubuntu gnome flashback](http://www.binarytides.com/blog/wp-content/uploads/2015/02/ubuntu-gnome-flashback.png) + +在安装好gnome flashback桌面以后也许你对效果还不满意,这样你可能需要执行接下来的一系列操作来对它进行微调。 + +### 1. 安装 Gnome Tweak Tool ### + +Gnome Tweak Tool能够帮助你定制比如字体、主题等,那些在Unity桌面的控制中心十分困难或是不可能完成的任务。 + + $ sudo apt-get install gnome-tweak-tool + +启动按步骤 应用程序 > 系统工具 > 首选项 > Tweak Tool + +### 2. 在面板上添加小应用 ### + +默认的右键点击面板是没有效果的。你可以尝试在右键点击面板的同时按住键盘上的Alt+Super (win)键,这样定制面板的相关选项将会出现。 + +你可以修改或删除面板并在上面添加些小应用。在这个例子中我们移除了底部面板,并用Plank dock来代替它的位置。 + +在顶部面板的中间添加一个显示时间的小应用。通过配置使它显示时间和天气。 + +同样的添加一个工作空间切换器到顶部面板,并创建合适个数的工作空间。 + +### 3. 将窗口标题栏的按钮右置 ### + +在ubuntu中,最小化、最大化和关闭按钮默认实在标题栏的左侧的。需要稍作手脚才能让他们乖乖回到右边去。 + +想让窗口的按钮到右边可以使用下面的命令,这是我在askubuntu上找到的。 + + $ gsettings set org.gnome.desktop.wm.preferences button-layout 'menu:minimize,maximize,close' + +### 4.安装 Plank dock ### + +plank dock位于屏幕底部用于启动应用和切换打开的窗口。会在必要的时间隐藏自己,并在需要的时候出现。elementary OS使用的dock就是plank dock。 + +运行以下命令安装: + + $ sudo add-apt-repository ppa:ricotz/docky -y + $ sudo apt-get update + $ sudo apt-get install plank -y + +现在启动 应用程序 > 附件 > Plank。若想让它开机自动启动,找到 应用程序 > 系统工具 > 首选项 > 启动应用程序 并将“plank”的命令加到列表中。 + +### 5. 安装 Conky 系统监视器 ### + +Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰桌面。它不太占资源并且运行的大部分时间都不惹麻烦。 + +运行如下命令安装: + + $ sudo apt-add-repository -y ppa:teejee2008/ppa + $ sudo apt-get update + $ sudo apt-get install conky-manager + +现在启动 应用程序 > 附件 > Conky Manager 选择你想在桌面上显示的部件。Conky Manager同样可以配置到启动项中。 + +### 6. 安装CCSM ### + +如果你更愿意使用Gnome Flashback (Compiz),那么CCSM将是你配置桌面特效的得力助手。 + +运行以下命令安装: + + $ sudo apt-get install compizconfig-settings-manager + +启动按步骤 应用程序 > 系统工具 > 首选项 > CompizConfig Settings Manager. + + +>在虚拟机中经常会发生compiz会话中装饰窗口消失。可以通过启动Compiz设置,在打开"Copy to texture",注销后重新登录即可。 + +不过值得一提的是Compiz 会话会比Metacity慢。 + +-------------------------------------------------------------------------------- + +via: http://www.binarytides.com/install-gnome-flashback-ubuntu/ + +作者:[Silver Moon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117145272367995638274/posts +[1]:https://wiki.gnome.org/action/show/Projects/GnomeFlashback?action=show&redirect=GnomeFlashback From 65592541b10103ee69de37ef2c937e8a0cd5d150 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 11 Feb 2015 21:21:23 +0800 Subject: [PATCH 008/163] Delete 20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md --- ...esktop on Ubuntu 14.10 or Linux Mint 17.md | 101 ------------------ 1 file changed, 101 deletions(-) delete mode 100644 sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md diff --git a/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md b/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md deleted file mode 100644 index ae7968afd0..0000000000 --- a/sources/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md +++ /dev/null @@ -1,101 +0,0 @@ -在Ubuntu14.10/Mint7上安装Gnome Flashback classical桌面 -================================================================================ -如果你不喜欢现在的Unity桌面,[Gnome Flashback][1]桌面环境是一个简单的并且很棒的选择,让你能找回曾经经典的桌面。 - -Gnome Flashback基于GTK3并提供与原先gnome桌面视觉上相似的界面。 - -gnome flashback的另一个改变是采用了源自mint和xface的MATE桌面,但无论mint还是xface都是基于gtk2的。 - -### 安装 Gnome Flashback ### - -在你的ubuntu上安装以下包即可: - - $ sudo apt-get install gnome-session-flashback - -然后注销到达登录界面,单击密码输入框右上角的徽标型按钮,即可选择桌面环境。可供选择的有Gnome Flashback (Metacity) 会话模式和Gnome Flashback (Compiz)会话模式。 - -Metacity更轻更快,而Compiz则能带给你更棒的桌面效果。下面是我使用gnome flashback桌面的截图。 - -桌面采用了elementary OS的壁纸和Plank dock并且移除了底部面板。这些都会在这篇教程中涉及到。 - -![ubuntu gnome flashback](http://www.binarytides.com/blog/wp-content/uploads/2015/02/ubuntu-gnome-flashback.png) - -在安装好gnome flashback桌面以后也许你对效果还不满意,这样你可能需要执行接下来的一系列操作来对它进行微调。 - -### 1. 安装 Gnome Tweak Tool ### - -Gnome Tweak Tool能够帮助你定制比如字体、主题等,那些在Unity桌面的控制中心十分困难或是不可能完成的任务。 - - $ sudo apt-get install gnome-tweak-tool - -启动按步骤 应用程序 > 系统工具 > 首选项 > Tweak Tool - -### 2. 在面板上添加小应用 ### - -默认的右键点击面板是没有效果的。你可以尝试在右键点击面板的同时按住键盘上的Alt+Super (win)键,这样定制面板的相关选项将会出现。 - -你可以修改或删除面板并在上面添加些小应用。在这个例子中我们移除了底部面板,并用Plank dock来代替它的位置。 - -在顶部面板的中间添加一个显示时间的小应用。通过配置使它显示时间和天气。 - -同样的添加一个工作空间切换器到顶部面板,并创建合适个数的工作空间。 - -### 3. 将窗口标题栏的按钮右置 ### - -在ubuntu中,最小化、最大化和关闭按钮默认实在标题栏的左侧的。需要稍作手脚才能让他们乖乖回到右边去。 - -想让窗口的按钮到右边可以使用下面的命令,这是我在askubuntu上找到的。 - - $ gsettings set org.gnome.desktop.wm.preferences button-layout 'menu:minimize,maximize,close' - -### 4.安装 Plank dock ### - -plank dock位于屏幕底部用于启动应用和切换打开的窗口。会在必要的时间隐藏自己,并在需要的时候出现。elementary OS使用的dock就是plank dock。 - -运行以下命令安装: - - $ sudo add-apt-repository ppa:ricotz/docky -y - $ sudo apt-get update - $ sudo apt-get install plank -y - -现在启动 应用程序 > 附件 > Plank。若想让它开机自动启动,找到 应用程序 > 系统工具 > 首选项 > 启动应用程序 并将“plank”的命令加到列表中。 - -### 5. 安装 Conky 系统监视器 ### - -Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰桌面。它不太占资源并且运行的大部分时间都不惹麻烦。 - -运行如下命令安装: - - $ sudo apt-add-repository -y ppa:teejee2008/ppa - $ sudo apt-get update - $ sudo apt-get install conky-manager - -现在启动 应用程序 > 附件 > Conky Manager 选择你想在桌面上显示的部件。Conky Manager同样可以配置到启动项中。 - -### 6. 安装CCSM ### - -如果你更愿意使用Gnome Flashback (Compiz),那么CCSM将是你配置桌面特效的得力助手。 - -运行以下命令安装: - - $ sudo apt-get install compizconfig-settings-manager - -启动按步骤 应用程序 > 系统工具 > 首选项 > CompizConfig Settings Manager. - - ->在虚拟机中经常会发生compiz会话中装饰窗口消失。可以通过启动Compiz设置,在打开"Copy to texture",注销后重新登录即可。 - -不过值得一提的是Compiz 会话会比Metacity慢。 - --------------------------------------------------------------------------------- - -via: http://www.binarytides.com/install-gnome-flashback-ubuntu/ - -作者:[Silver Moon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117145272367995638274/posts -[1]:https://wiki.gnome.org/action/show/Projects/GnomeFlashback?action=show&redirect=GnomeFlashback From 72f11d30ceaf873bca5a0ddfc9a571e37fc5c862 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 11 Feb 2015 21:30:24 +0800 Subject: [PATCH 009/163] [translating] 20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md --- ...l Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md b/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md index 67d9d550e5..5d854aa539 100644 --- a/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md +++ b/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md @@ -1,3 +1,5 @@ +translating by martin. + Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10 ================================================================================ A low-overhead monitoring web dashboard for a GNU/Linux machine. Simply drop-in the app and go!.Linux Dash's interface provides a detailed overview of all vital aspects of your server, including RAM and disk usage, network, installed software, users, and running processes. All information is organized into sections, and you can jump to a specific section using the buttons in the main toolbar. Linux Dash is not the most advanced monitoring tool out there, but it might be a good fit for users looking for a slick, lightweight, and easy to deploy application. @@ -67,4 +69,4 @@ via: http://www.ubuntugeek.com/install-linux-dash-web-based-monitoring-tool-on-u 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.ubuntugeek.com/author/ubuntufix -[1]:http://www.ubuntugeek.com/step-by-step-ubuntu-14-10-utopic-unicorn-lamp-server-setup.html \ No newline at end of file +[1]:http://www.ubuntugeek.com/step-by-step-ubuntu-14-10-utopic-unicorn-lamp-server-setup.html From ecd29e979988b41b8cc66a96b01e997b43e6c6f6 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 11 Feb 2015 21:31:48 +0800 Subject: [PATCH 010/163] Update 20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md --- ...all Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md b/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md index 5d854aa539..fe2432f8b3 100644 --- a/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md +++ b/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md @@ -1,5 +1,3 @@ -translating by martin. - Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10 ================================================================================ A low-overhead monitoring web dashboard for a GNU/Linux machine. Simply drop-in the app and go!.Linux Dash's interface provides a detailed overview of all vital aspects of your server, including RAM and disk usage, network, installed software, users, and running processes. All information is organized into sections, and you can jump to a specific section using the buttons in the main toolbar. Linux Dash is not the most advanced monitoring tool out there, but it might be a good fit for users looking for a slick, lightweight, and easy to deploy application. From c94e0af8e00e7f2582e9bf3c666fe8aadb000bf8 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 11 Feb 2015 21:33:12 +0800 Subject: [PATCH 011/163] [translating]20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md --- ...150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md index fffe871da6..f49cc07c31 100644 --- a/sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md +++ b/sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -1,3 +1,5 @@ +translating by martin. + Install Mumble in Ubuntu an Opensource VoIP Apps ================================================================================ Mumble is a free and open source voice over IP (VoIP) application, released under the new BSD license, primarily designed for use by gamers and it's similar to programs such as TeamSpeak and Ventrilo. It uses a server to witch people can connect with a client to talk to each other. @@ -75,4 +77,4 @@ via: http://linoxide.com/ubuntu-how-to/install-mumble-ubuntu/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/adriand/ -[1]:http://wiki.mumble.info/wiki/Main_Page \ No newline at end of file +[1]:http://wiki.mumble.info/wiki/Main_Page From 4663e6560ab83e78bb2daff978516aa0b82cb3ac Mon Sep 17 00:00:00 2001 From: J L Date: Wed, 11 Feb 2015 23:19:00 +0800 Subject: [PATCH 012/163] Announce for 20150205 --- ...xQuestions Survey Results Surface Top Open Source Projects.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md b/sources/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md index c591faafcd..254684daaf 100644 --- a/sources/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md +++ b/sources/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md @@ -1,3 +1,4 @@ +[[jerryling315](https://github.com/jerryling315) 翻译中] LinuxQuestions Survey Results Surface Top Open Source Projects ================================================================================ ![](http://farm5.static.flickr.com/4099/4777335328_3cc363c419_m.jpg) From a55cab8befea49d61a905be2f053f0d81c0f6e97 Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Wed, 11 Feb 2015 23:29:56 +0800 Subject: [PATCH 013/163] Delete 20150126 Improve system performance by moving your log files to RAM Using Ramlog.md delete source --- ...ving your log files to RAM Using Ramlog.md | 113 ------------------ 1 file changed, 113 deletions(-) delete mode 100644 sources/tech/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md diff --git a/sources/tech/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md b/sources/tech/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md deleted file mode 100644 index 33aaf25554..0000000000 --- a/sources/tech/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md +++ /dev/null @@ -1,113 +0,0 @@ -translating by soooogreen -Improve system performance by moving your log files to RAM Using Ramlog -================================================================================ -Ramlog act as a system daemon. On startup it creates ramdisk, it copies files from /var/log into ramdisk and mounts ramdisk as /var/log. All logs after that will be updated on ramdisk. Logs on harddrive are kept in folder /var/log.hdd which is updated when ramlog is restarted or stopped. On shutdown it saves log files back to harddisk so logs are consistent. Ramlog 2.x is using tmpfs by default, ramfs and kernel ramdisk are suppored as well. Program rsync is used for log synchronization. - -Note: Logs not saved to harddrive are lost in case of power outage or kernel panic. - -Install ramlog if you have enough of free memory and you want to keep your logs on ramdisk. It is good for notebook users, for systems with UPS or for systems running from flash -- to save some write cycles. - -How it works and what it does: - -1.Ramlog starts among the first daemons (it depends on other daemons you have installed). - -2.Directory /var/log.hdd is created and hardlinked to /var/log. - -3.In case tmpfs (default) or ramfs is used, it is mounted over /var/log - -If kernel ramdisk is used, ramdisk created in /dev/ram9 and it is mounted to /var/log, by default ramlog takes all ramdisk memory specified by kernel argument "ramdisk_size". - -5.All other daemons are started and all logs are updated in ramdisk. Logrotate works on ramdisk as well. - -6.In case ramlog is restarted (by default it is one time per day), directory /var/log.hdd is synchronized with /var/log using rsync. Frequency of the automatic log saves can be controller via cron, by default, the ramlog file is placed into /etc/cron.daily - -7.On shutdown ramlog shuts among the last daemons. - -8. During ramlog stop phase files from /var/log.hdd are synchronized with /var/log -Then /var/log is unmounted, /var/log.hdd is unmounted as well and empty directory /var/log.hdd is deleted. - -**Note:- This article is for advanced users only** - -### Install Ramlog in Ubuntu ### - -First you need to download the .deb package from [here][1] using the following command - - wget http://www.tremende.com/ramlog/download/ramlog_2.0.0_all.deb - -Now you should be having ramlog_2.0.0_all.deb package install this package using the following command - - sudo dpkg -i ramlog_2.0.0_all.deb - -This will complete the installation now you need to run the following commands - - sudo update-rc.d ramlog start 2 2 3 4 5 . stop 99 0 1 6 . - -#Now update sysklogd in init levels, so it is stopped properly before ramlog is stopped: - - sudo update-rc.d -f sysklogd remove - - sudo update-rc.d sysklogd start 10 2 3 4 5 . stop 90 0 1 6 . - -Now you need to restart your system - - sudo reboot - -After rebooting you need to run ‘ramlog getlogsize' to determine the size of your actual /var/log.Add about 40% to that number to ensure your ramdisk has sufficient size -- this will be the ramdisk size - -Edit your boot manager config file such as /etc/grub.conf, /boot/grub/menu.lst or /etc/lilo.conf and add update the actual kernel by adding kernel paramter ‘ramdisk_size=xxx' where xxx is calculated ramdisk size - -### Configuring Ramlog ### - -Ramlog configuration file is located in /etc/default/ramlog on deb based systems and you can set there below variables: - -Variable (with default value): - -Description: - - RAMDISKTYPE=0 - # Values: - # 0 -- tmpfs (can be swapped) -- default - # 1 -- ramfs (no max size in older kernels, - # cannot be swapped, not SELinux friendly) - # 2 -- old kernel ramdisk - TMPFS_RAMFS_SIZE= - #Maximum size of memory to be used by tmpfs or ramfs. - # The value can be percentage of total RAM or size in megabytes -- for example: - # TMPFS_RAMFS_SIZE=40% - # TMPFS_RAMFS_SIZE=100m - # Empty value means default tmpfs/ramfs size which is 50% of total RAM. - # For more options please check ‘man mount', section ‘Mount options for tmpfs' - # (btw -- ramfs supports size limit in newer kernels - # as well despite man says there are no mount options) - # It has only effect if RAMDISKTYPE=0 or 1 - KERNEL_RAMDISK_SIZE=MAX - #Kernel ramdisk size in kilobytes or MAX to use entire ramdisk. - #It has only effect if RAMDISKTYPE=2 - LOGGING=1 - # 0=off, 1=on Logs can be found in /var/log/ramdisk - LOGNAME=ramlog - # name of the ramlog log file (makes sense if LOGGING=1) - VERBOSE=1 - # 0=off, 1=on (if 1, teststartstop puts detials - # to the logs and it is called after start or stop fails) - -### How to uninstall Ubuntu ### - -Open the terminal and run the following command - - sudo dpkg -P ramlog - -Note: If ramlog was running before you uninstalled it, you should reboot your box to finish uninstallation procedure. - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/improve-system-performance-by-moving-your-log-files-to-ram-using-ramlog.html - -作者:[ruchi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.ubuntugeek.com/author/ubuntufix -[1]:http://www.tremende.com/ramlog/download/ramlog_2.0.0_all.deb From d5c68cfcdec70e2cb611a858c7df5fdccccc4f14 Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Wed, 11 Feb 2015 23:31:29 +0800 Subject: [PATCH 014/163] Create 20150126 Improve system performance by moving your log files to RAM Using Ramlog.md --- ...ving your log files to RAM Using Ramlog.md | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 translated/tech/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md diff --git a/translated/tech/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md b/translated/tech/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md new file mode 100644 index 0000000000..66f5d72f87 --- /dev/null +++ b/translated/tech/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md @@ -0,0 +1,111 @@ +系统性能优化支招:使用Ramlog将日志文件转移到RAM +================================================================================ +Ramlog以系统守护进程的形式存在。它系统启动的时候创建了虚拟磁盘(ramdisk),将文件从目录/var/log复制到虚拟磁盘中,同时把虚拟磁盘挂载为/var/log。接着更新虚拟磁盘上所有的日志。硬盘上的日志会保留在目录/var/log中,直到ramlog重启或停止时被更新。而关机的时候,(ramdisk上的)日志文件会重新保存到硬盘上,以确保日志一致性。Ramlog 2.x默认使用tmpfs文件系统,同时也可以支持ramfs和内核ramdisk。使用rsync(译注:Linux数据镜像备份工具)这个工具来同步日志。 + +注意:没有保存进硬盘的日志将在断电或者内核混乱(kernel panic)的情况下丢失。 + +如果你拥有空间足够的可用内存,而又想把日志放进虚拟磁盘,就安装ramlog吧。它是笔记本用户、UPS系统或是直接在flash中运行的系统节省写周期的优良选择。 + +Ramlog的运行机制以及步骤: + +1.Ramlog在第一个守护进程(这取决于你所安装过的其它守护进程)的基础上启动。 + +2.然后创建目录/var/log.hdd并将其硬链至/var/log。 + +3.如果使用的是tmpfs(默认)或者ramfs之一的文件系统,将其挂载到/var/log上。 + +而如果使用的是内核ramdisk,ramdisk将在/dev/ram9中创建,并将挂载至/var/log。默认情况下ramlog会占用所有ramdisk的内存,其大小由内核参数"ramdisk_size"指定。 + +5.接着其它的守护进程被启动,并在ramdisk中更新日志。Logrotate(译注:Linux日志轮替工具)也是在ramdiks之上运行。 + +6.重启(默认一天一次)ramlog时,目录/var/log.hdd将借助rsync与/var/log保持同步。日志自动保存的频率可以通过cron(译注:Linux例行性工作调度)来控制。默认情况下,ramlog文件放置在目录/etc/cron.daily下。 + +7.系统关机时,ramlog在最后一个守护进程关闭之前关闭。 + +在ramlog关闭期间,/var/log.hdd中的文件将被同步至/var/log,接着/var/log和/var/log.hdd都被卸载,然后删除空目录/var/log.hdd。 + +**注意:- 此文仅面向高级用户** + +### 在Ubuntu中安装Ramlog ### + +首先需要用以下命令,从[这里][1]下载.deb安装包: + + wget http://www.tremende.com/ramlog/download/ramlog_2.0.0_all.deb + +下载ramlog_2.0.0_all.deb安装包完毕,使用以下命令进行安装: + + sudo dpkg -i ramlog_2.0.0_all.deb + +这一步会完成整个安装,现在你需要运行以下命令: + + sudo update-rc.d ramlog start 2 2 3 4 5 . stop 99 0 1 6 . + +#现在,在初始状态下升级sysklogd,使之能在ramlog停止运行前正确关闭: + + sudo update-rc.d -f sysklogd remove + + sudo update-rc.d sysklogd start 10 2 3 4 5 . stop 90 0 1 6 . + +然后重启系统: + + sudo reboot + +系统重启完毕,运行'ramlog getlogsize'获取/var/log的空间大小。在此基础之上多分配40%的空间,确保ramdisk有足够的空间(这整个都将作为ramdisk的空间大小)。 + +编辑引导配置文件,如/etc/grub.conf,、/boot/grub/menu.lst 或/etc/lilo.conf(译注:具体哪个配置文件视不同引导加载程序而定),kernel参数新增项'ramdisk_size=xxx'以更新当前内核,其中xxx是ramdisk的空间大小。 + +### 配置Ramlog ### + +基于deb的系统中,Ramlog的配置文件位于/etc/default/ramlog,你可以在该目录下设置以下变量: + +Variable (with default value): + +Description: + + RAMDISKTYPE=0 + # Values: + # 0 -- tmpfs (can be swapped) -- default + # 1 -- ramfs (no max size in older kernels, + # cannot be swapped, not SELinux friendly) + # 2 -- old kernel ramdisk + TMPFS_RAMFS_SIZE= + #Maximum size of memory to be used by tmpfs or ramfs. + # The value can be percentage of total RAM or size in megabytes -- for example: + # TMPFS_RAMFS_SIZE=40% + # TMPFS_RAMFS_SIZE=100m + # Empty value means default tmpfs/ramfs size which is 50% of total RAM. + # For more options please check ‘man mount', section ‘Mount options for tmpfs' + # (btw -- ramfs supports size limit in newer kernels + # as well despite man says there are no mount options) + # It has only effect if RAMDISKTYPE=0 or 1 + KERNEL_RAMDISK_SIZE=MAX + #Kernel ramdisk size in kilobytes or MAX to use entire ramdisk. + #It has only effect if RAMDISKTYPE=2 + LOGGING=1 + # 0=off, 1=on Logs can be found in /var/log/ramdisk + LOGNAME=ramlog + # name of the ramlog log file (makes sense if LOGGING=1) + VERBOSE=1 + # 0=off, 1=on (if 1, teststartstop puts detials + # to the logs and it is called after start or stop fails) + +### 在Ubuntu中卸载ramlog ### + +打开终端运行以下命令: + + sudo dpkg -P ramlog + +注意:如果ramlog卸载之前仍在运行,需要重启系统完成整个卸载工作。 + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/improve-system-performance-by-moving-your-log-files-to-ram-using-ramlog.html + +作者:[ruchi][a] +译者:[soooogreen](https://github.com/soooogreen) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix +[1]:http://www.tremende.com/ramlog/download/ramlog_2.0.0_all.deb From ab7f3b2951474f2ef198b87fbac1258fe29c7cff Mon Sep 17 00:00:00 2001 From: J L Date: Wed, 11 Feb 2015 23:39:30 +0800 Subject: [PATCH 015/163] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91=20?= =?UTF-8?q?20150205?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ns Survey Results Surface Top Open Source Projects.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) rename {sources => translated}/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md (57%) diff --git a/sources/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md b/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md similarity index 57% rename from sources/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md rename to translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md index 254684daaf..9dd834754b 100644 --- a/sources/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md +++ b/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md @@ -3,15 +3,16 @@ LinuxQuestions Survey Results Surface Top Open Source Projects ================================================================================ ![](http://farm5.static.flickr.com/4099/4777335328_3cc363c419_m.jpg) -Many people in the Linux community look forward to the always highly detailed and reliable results of the annual surveys from LinuxQuestions.org. As [Susan covered in detail in this post][1], this year's [results][2], focused on what readers at the site deem to be the best open source projects, are now available. Most of the people at LinuxQuestions are expert-level users who are on the site to answer questions from newer Linux users. +在Linux用户社区中, 很多人每年都会期待来自 LinuxQuestions.org 细致并可靠的年度问卷调查结果. 如同[Susan在她的报告][1]中指出的那样, 今年的[结果][2]着重于调查网站读者心中最棒的开源项目. 这份报告目前已经完成. 在LinuxQuestions的大多数人都是"专家级"的用户, 他们经常在网站上在线回答Linux新手们的提问. +在Susan所作的报告的附加内容里, 你可以看到由"专家"们对开源世界的关注点分布. In addition to the summary results that Susan provided in her post, below you'll find a graphical snapshot of what the experts took note of on the open source front. -You can get a very nice graphical summary of the findings from the LinuxQuestions survey [here][3]. Here is a snapshot of the site's determination of the best Linux distributions, where Mint and Slackware fare quite well: +你也可以在[这里][3]找到一份较为精美的调查问卷总结图.这里呈现了网站投票得出的最佳Linux发行版, 可以看到Mint和Slackwaer平分了半壁江山: ![](http://i1311.photobucket.com/albums/s669/webworkerdaily/lin_zps9ogvyrty.png) -And below is a snapshot of the site's determination of the best cloud projects. Notably, the LinuxQuestions crowd gives very high praise to ownCloud. Definiitely check into the full results of the survey at the site, see [Susan's summary][4] of winners, and check out all the good graphics [here][5]. +而下图则是网站票选出的得出的最佳云项目. 值得注意的是, LinuxQuestions的用户群体给予了ownCloud项目极高的评价. 你一定得亲自去看看调查结果的详情, 也看看 [Susan关于各项目"赢家"][4]的总结 , 还有[一堆精美的图表][5]. ![](http://i1311.photobucket.com/albums/s669/webworkerdaily/lin2_zps9nxf7yyi.png) @@ -20,7 +21,7 @@ And below is a snapshot of the site's determination of the best cloud projects. via: http://ostatic.com/blog/linuxquestions-survey-results-surface-top-open-source-projects 作者:[Sam Dean][a] -译者:[译者ID](https://github.com/译者ID) +译者:[jerryling315](https://github.com/jerryling315) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From fe6017ced8f9e1522f81398e1d1d63908bb20df9 Mon Sep 17 00:00:00 2001 From: J L Date: Wed, 11 Feb 2015 23:40:16 +0800 Subject: [PATCH 016/163] Delete Translating note --- ...xQuestions Survey Results Surface Top Open Source Projects.md | 1 - 1 file changed, 1 deletion(-) diff --git a/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md b/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md index 9dd834754b..0052aab380 100644 --- a/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md +++ b/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md @@ -1,4 +1,3 @@ -[[jerryling315](https://github.com/jerryling315) 翻译中] LinuxQuestions Survey Results Surface Top Open Source Projects ================================================================================ ![](http://farm5.static.flickr.com/4099/4777335328_3cc363c419_m.jpg) From 328b0c29ee30f71c0dd2352f81ac2aff7d0562c5 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 12 Feb 2015 11:15:51 +0800 Subject: [PATCH 017/163] translating --- ...o Protect Ubuntu Server Against the GHOST Vulnerability.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md b/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md index a78b786606..3ff863af55 100644 --- a/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md +++ b/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md @@ -1,3 +1,5 @@ +Translating---geekpi + How To Protect Ubuntu Server Against the GHOST Vulnerability ================================================================================ On January 27, 2015, a GNU C Library (glibc) vulnerability, referred to as the GHOST vulnerability, was announced to the general public. In summary, the vulnerability allows remote attackers to take complete control of a system by exploiting a buffer overflow bug in glibc's GetHOST functions.Check more details from [here][1] @@ -41,4 +43,4 @@ via: http://www.ubuntugeek.com/how-to-protect-ubuntu-server-against-the-ghost-vu 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.ubuntugeek.com/author/ubuntufix -[1]:http://chargen.matasano.com/chargen/2015/1/27/vulnerability-overview-ghost-cve-2015-0235.html \ No newline at end of file +[1]:http://chargen.matasano.com/chargen/2015/1/27/vulnerability-overview-ghost-cve-2015-0235.html From dacd5b1d1671cb7e8f837fc5e262f19cf811c3ac Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 12 Feb 2015 11:27:25 +0800 Subject: [PATCH 018/163] translated --- ... Server Against the GHOST Vulnerability.md | 46 ------------------- ... Server Against the GHOST Vulnerability.md | 44 ++++++++++++++++++ 2 files changed, 44 insertions(+), 46 deletions(-) delete mode 100644 sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md create mode 100644 translated/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md diff --git a/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md b/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md deleted file mode 100644 index 3ff863af55..0000000000 --- a/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md +++ /dev/null @@ -1,46 +0,0 @@ -Translating---geekpi - -How To Protect Ubuntu Server Against the GHOST Vulnerability -================================================================================ -On January 27, 2015, a GNU C Library (glibc) vulnerability, referred to as the GHOST vulnerability, was announced to the general public. In summary, the vulnerability allows remote attackers to take complete control of a system by exploiting a buffer overflow bug in glibc's GetHOST functions.Check more details from [here][1] - -The GHOST vulnerability can be exploited on Linux systems that use versions of the GNU C Library prior to glibc-2.18. That is, systems that use an unpatched version of glibc from versions 2.2 to 2.17 are at risk. - -### Check System Vulnerability ### - -You can use the following command to check the glib version - - ldd --version - -### Output ### - -ldd (Ubuntu GLIBC 2.19-10ubuntu2) **2.19** -Copyright (C) 2014 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -Written by Roland McGrath and Ulrich Drepper. - -The glib version should be above 2.17 and from the output we are running 2.19.If you are seeing glib version between 2.2 to 2.17 then you need to run the following commands - - sudo apt-get update - - sudo apt-get dist-upgrade - -After the installation you need to reboot the server using the following command - - sudo reboot - -After reboot use the same command again and check the glib version. - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/how-to-protect-ubuntu-server-against-the-ghost-vulnerability.html - -作者:[ruchi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.ubuntugeek.com/author/ubuntufix -[1]:http://chargen.matasano.com/chargen/2015/1/27/vulnerability-overview-ghost-cve-2015-0235.html diff --git a/translated/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md b/translated/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md new file mode 100644 index 0000000000..38b7c955d3 --- /dev/null +++ b/translated/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md @@ -0,0 +1,44 @@ +如何让Ubuntu服务器远离鬼影漏洞影响 +================================================================================ +2015年1月27日,GNU C库(glibc)的一个漏洞也称鬼影漏洞被公诸于众。总的来说,这个漏洞允许远程攻击者利用glibc中的GetHOST函数的缓冲区溢出漏洞来获得系统的完全控制。点击[这里][1]获得更多细节。 + +鬼影漏洞可在版本在glibc-2.18之前的Linux系统上被利用。也就是说没有打过补丁的版本2.2到2.17都是有风险的。 + +### 检查系统漏洞 ### + +你可以使用下面的命令来检查glib的版本 + + ldd --version + +### 输出 ### + +ldd (Ubuntu GLIBC 2.19-10ubuntu2) **2.19** +Copyright (C) 2014 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +Written by Roland McGrath and Ulrich Drepper. + +glib的版本应该高于2.17,我们的输出是2.19。如果你看到glib的版本在2.2到2.17之间。你应该运行下面的命令。 + + sudo apt-get update + + sudo apt-get dist-upgrade + +安装完之后,你应该用下面的命令重启系统。 + + sudo reboot + +重启完成之后,你可以用同样的命令来检查glib的版本。 + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/how-to-protect-ubuntu-server-against-the-ghost-vulnerability.html + +作者:[ruchi][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix +[1]:http://chargen.matasano.com/chargen/2015/1/27/vulnerability-overview-ghost-cve-2015-0235.html From 80a04dd35f2f41294267b4a7fb22c5ac7078ecef Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Thu, 12 Feb 2015 11:30:48 +0800 Subject: [PATCH 019/163] Update 20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md --- ...8 Meet Vivaldi--A New Web Browser Built for Power Users.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md b/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md index 78122cd7c8..77e9762b7f 100644 --- a/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md +++ b/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md @@ -4,13 +4,13 @@ **这一周一个为了满足高手级用户的需要而制造出来的全新网页浏览器已然来临——而且它已经可以在Linux上使用了。** -Vivaldi就是这个新浏览器的名字,而且它还面向64位Linux,Windows和Mac机的技术预览版(请读:无责任测试)发行。它是在 — 震惊 — 尝试且已测试过的Chromium开源框架,Blink和Google的开源V8 JavaScript引擎(以及其他项目)的基础上制造的。 +Vivaldi就是这个新浏览器的名字,而且它还面向64位Linux,Windows和Mac机发布了技术预览版(请读:无责任测试)。它是在 — 震惊 — 尝试且已测试过的Chromium开源框架,Blink和Google的开源V8 JavaScript引擎(以及其他项目)的基础上制造的。 这个世界真的想要再有一个浏览器吗?Vivaldi——出自Opera软件前首席执行官Jon S.von Tetzchner的想法——不怎么关注所要,更关注所需。 Vivaldi被制造成带有着偏向于键盘操作的tab键瘾君子所需的那种功能。并没有为那些认为Firefox复杂或是对Chrome的唯一批评是它改动了书签按钮的用户而进行修改。 -这也不是什么俗气的营销噱头。不去看它所戴的‘技术预览版’标签,Vivaldi已经有了明显偏向于高手级用户们的功能。 +这也并不是什么俗气的营销噱头。尽管它带有‘技术预览版’标签,Vivaldi已经有了明显偏向于高手级用户们的功能。 相当多的人觉得自己被其他软件公司所生产的简化的,配对后发行的产品遗弃了、糊弄了。Vivaldi——即使在这个过渡期的早期——看起来适逢其会以至于打败了其他产品。 From 6085276ada05eecaa8242feaaf5eb9ace9df063b Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 12 Feb 2015 12:25:00 +0800 Subject: [PATCH 020/163] Delete 20141203 Undelete Files on Linux Systems.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完毕,删除源文件。 --- ...0141203 Undelete Files on Linux Systems.md | 120 ------------------ 1 file changed, 120 deletions(-) delete mode 100644 sources/tech/20141203 Undelete Files on Linux Systems.md diff --git a/sources/tech/20141203 Undelete Files on Linux Systems.md b/sources/tech/20141203 Undelete Files on Linux Systems.md deleted file mode 100644 index 126501e225..0000000000 --- a/sources/tech/20141203 Undelete Files on Linux Systems.md +++ /dev/null @@ -1,120 +0,0 @@ -Translating by FSSlc - -Undelete Files on Linux Systems -================================================================================ -Often times, a computer user will delete a needed file accidentally and not have an easy way to regain or recreate the file. Thankfully, files can be undeleted. When a user deletes a file, it is not gone, only hidden for some time. Here is how it all works. On a filesystem, the system has what is called a file allocation list. This list keeps track of what files are where on the storage unit (hard-drive, MicroSD card, flash-drive, etc.). When a file is deleted, the filesystem will perform one of two tasks on the allocation table. The file's entry on the file allocation table marked as "free space" or the file's entry on the list is erased and then the space is marked as free. Now, if a file needs to be placed on the storage unit, the operating system will put the file in the space marked as empty. After the new file is written to the "empty space", the deleted file is now gone forever. When a deleted file is to be recovered, the user must not manipulate any files because if the "empty space" is used, then the file can never be retrieved. - -### How do undelete programs work? ### - -The majority of filesystems only mark the space as empty. With these filesystems, the undelete program looks at the file allocation list and copies the deleted file to another storage unit. If the files were copied to the same storage unit, then the user could lose other deleted files that are needed. - -Rarely do filesystems erase the allocation table entry. If a filesystem does, this is how an undelete program undeletes the file. The program searches the storage unit for file headers. All files have a specific string of code that is at the very beginning of the file. This is called a magic number. For example, the magic number of a compiled JAVA class is the hex number "CAFEBABE". So, an undelete program would find "CAFEBABE" and copy that file to another storage unit. Some undelete programs can look for a specific file type. The user may want a PDF, so the program searches for the hex magic number "25504446" which is the ASCII code for "%PDF". Other undelete programs search for all magic numbers. Then, the user can select which deleted files to recover. - -If a part of the file has been written over, then the whole file will be corrupted. The file can usually be recovered, but the contents will be useless. For instance, recovering a corrupted JPEG file will be pointless because the image viewer will not be able to generate an image from the file. So, the user has the file, but the file is useless. - -### Device Locations: ### - -Before we continue, here is some information that will aid in directing the undelete utilities to the correct storage unit. All devices are in the /dev/ folder. The name of each device (not the name that the admin gave each partition or device) that is given by the system follows a predictable scheme. The second partition on the first SATA hard-drive would be sda2. The first letter indicates the storage type, in this case SATA, but an "s" could also mean SCSI, FireWire, or USB. The second letter "d" means disk. The third letter indicates the device number, so an "a" would be the first SATA and a "b" would be the second. The number displays the partition. To name the whole device with all partitions type the letters without the number. For this example that would be sda. Other possible letters "h" as the first letter. This means PATA hard-drive (IDE). As some examples of this scheme, a user has a computer with one SATA hard-drive (sda). The drive has four partitions - sda1, sda2, sda3, and sda4. The user deletes the third one, but sda4 remains sda4 until sda4 is reformatted. The user then plugs in a usb memory card (sdb) with one partition - sdb1. The user then adds a IDE hard-drive with one partition - hda1. Next, the user adds a SCSI hard-drive - sdc1. Then, the user removes the USB memory card (sdb). Now, the SCSI remains sdc, but if the SCSI is removed and added back, it will be sdb. Even though other storage device existed, the IDE drive will have the "a" because it is the first IDE drive. IDE devices are numbered separately from SCSI, SATA, FireWire, and USB devices. - -### Recovery: ### - -Each undelete program has different abilities, features, and support for various filesystems. Below are some instructions for using TestDisk to recover files on a set of filesystems. - -**FAT16, FAT32, exFAT (FAT64), NTFS, and ext2/3/4:** - -TestDisk is an open-source, free program that works on Linux, *BSD, SunOS, Mac OS X, DOS, and Windows. TestDisk can be found here: [http://www.cgsecurity.org/wiki/TestDisk][1]. TestDisk can also be installed by typing "sudo apt-get install testdisk". TestDisk has many abilities, but this article is concerned with undeleting files. - -Open TestDisk in a terminal using root privileges by typing “sudo testdisk”. - -Now, the TestDisk command-line application will execute. The terminal appearance will change. TestDisk asks the user if it can keep logs. This is entirely up to the user. If the user is recovering files from the system storage, then do not keep a log. The choices are "Create", "Append", and "No Log". If the user wants a log, it is kept in that user's home folder. - -![](http://www.linux.org/attachments/screen1-jpg.342/) - -In the following screen, the storage devices are listed using the /dev/* method. For my system, the system's storage unit is /dev/sda. This means that my storage unit is a SATA hard-drive (sd) and it is the first hard-drive (a). The size of each storage unit is displayed in Gigabytes. Use the up and down arrows to select a storage device and hit enter. - -![](http://www.linux.org/attachments/screen2-jpg.343/) - -The next screen displays a list of partition table (also called partition map) types. Just as there is the file allocation table for files, there is a table for the partitions. Partitions are dividers on a storage device. For instance, on almost all Linux systems there is at least two partitions - EXT3/4 and Swap. Each partition table will be briefly described. TestDisk does not support all partition tables, so this is not a complete list. - -![](http://www.linux.org/attachments/screen3-jpg.344/) - -- **Intel** - This partition table is very common on Windows systems and many Linux systems. This table is also know as MBR. -- **EFI GPT** - This is usually used with Linux systems. This partition map is most recommended for Linux because the concept of logical/extended partitions does not apply to GPT (GUID Partition Table) tables. This means that a Linux user can multiboot many forms of Linux with one Linux OS on each partition. There are other advantages to using GPT, but that is beyond this article. -- **Humax** - Humax maps are used with device made by the South Korean company Humax. -- **Mac** - The Apple Partition Map (APM) is used by Apple devices. -- **None** - Some devices do not have a partition table. For instance, many Subor game consoles do not use a partition map. If a user tried to undelete a file on these devices thinking that the partition map was one of the other choices, the user will be confused by the fact that TestDisk does not find any filesystem or files. -- **Sun** - The Sun partition table is used by Sun systems. -- **Xbox** - The Xbox uses the Xbox partition map for its storage devices. - -If a user selects "Xbox" even though their system uses GPT, TestDisk will not be able to find a partition or filesystem. If it does, then it will guess incorrectly. (The image below displays the output when the incorrect partition type) - -![](http://www.linux.org/attachments/xbox-jpg.350/) - -Once the user picks the correct choice for their device, on the next screen, select "Advanced". - -![](http://www.linux.org/attachments/screen4-jpg.345/) - -Now, the user should see a list of all of their filesystems/partitions on the storage unit. If the user had chosen the wrong partition map, then here is where they will know if they made the incorrect selection. If there are no errors, highlight the partition that contains the deleted file by placing the text-based cursor on it. Use the left and right arrows to highlight "List" on the bottom of the terminal. Now, hit enter. - -![](http://www.linux.org/attachments/screen5-jpg.346/) - -A new screen is displayed with a list of files and folders. The whitish files are current files that are not deleted. The red files have been deleted. On the far right column is the files' names. The next column over to the left is the creation date of the file. One column over to the left again is the files' sizes in bytes. To the far left is a column with dashes, "d"s, "r"s, "w"s, and "x"s. These are the file permissions. A "d" indicates that the item is a directory. The rest of the permission syntax is irrelevant to this article. The item on the top of the file list titled "." means the current directory. The second object titled ".." means go up one directory, so a user can move up a directory by selecting this line. For an example, I will go into the directory "Xaiml_Dataset". The folder is nearly full of deleted files. I will undelete "computers.xaiml" by pressing "c" on the keyboard. I am now asked to select a destination directory. Of course, I will put it on another partition. I am in my home folder, and I press "c". It does not matter what folder is highlighted. The current folder is the destination directory. Now, I am back to the list of files. At the top of the screen is a message that says "Copy Done!". In my home folder is a folder called "Xaiml_Dataset", and inside is the Xaiml file. If I press "c" on more deleted files, they will be placed in the new folder without a****g me for a destination. - -![](http://www.linux.org/attachments/screen6-jpg.347/) - -![](http://www.linux.org/attachments/screen7-jpg.348/) - -![](http://www.linux.org/attachments/screen8-jpg.349/) - -When finished press "q" repeatedly until the normal terminal is seen. The folder "Xaiml_Dataset" can only be accessed by the root. To fix this, use root privileges to change the folder permissions and the contained files. After that, the files have been recovered and accessible to the user. - -### ReiserFS: ### - -To undelete a file from a ReiserFS filesystem, make a backup of all of the files on the partition because this method can cause the file to be lost if something goes wrong. Next, execute the following command where DEVICE is the device in the form sda2. Some files will be put in the lost+found directory and other will remain where they were before deletion. - - reiserfsck --rebuild-tree --scan-whole-partition /dev/DEVICE - -### Recover Deleted File that is Open in a Program: ### - -Assume a user accidentally deletes a file that a program has open. The file of the hard-drive was deleted, but the program is using a copy of the file that is on the RAM. Thankfully, there are two easy solutions. - -If the program has save capabilities like a text editor, the user can resave the file. Thus, the file editor will write the file to the hard-drive. - -Assume that this is an MP3 file in a music player. The music player cannot save the MP3 file. This task requires a little more time than the previous situation. Unfortunately, this method does not work on all systems and applications. To begin, type the following command. - - lsof -c smplayer | grep mp3 - -This command LiSts all of the Open Files used by Smplayer. This list is piped (given) to grep which searches for mp3. The output looks like the following. - - smplayer 10037 collier mp3 169r 8,1 676376 1704294 /usr/bin/smplayer - -Now, type the following command to recover the file directly from the RAM (on Linux systems, /proc/ is the RAM) and copy it to a folder of choice. The "cp" is the copy command. The 10037 number comes from the process number given in the output. The 169 is the file descriptor shown in the output. The "~/Music/" is the destination directory. Lastly, "music.mp3" is the file name that the user wants for the file. - - cp /proc/10037/fd/169 ~/Music/music.mp3 - -### Real Deletion: ### - -To make for sure that a file can never be recovered, use a command that "wipes" the hard-drive. Wiping the hard-drive means writing meaningless data to the disk. For example, many wiping programs write zeros, random letters, or random data to the hard-drive. No space is taken up or lost. The wiping program just overwrites the "empty space". If the storage unit is ever full of files with no free space remaining, then all of the previously deleted files will be gone. - -The purpose of wiping hard-drives is to make sure that private data is never seen. For illustration, a company may order new computers. The manager decides to sell the old computers. However, there is concern that the new owners may view company secrets or customer information like credit card numbers and addresses. Thankfully, a computer technician in the company can wipe the hard-drives before selling the old computers. - -To install secure-delete, a wiping program, type "sudo apt-get install secure-delete". This installs a set of four commands that make sure that deleted files are never recovered. - -- srm - permanently delete a file. Usage: srm -f ./secret_file.txt -- sfill - wipe the free space. Usage: sfill -f /mount/point/of/partition -- sswap - wipe swap space. Usage: sswap -f /dev/SWAP_DEVICE - -If computers were to truly delete a file selected for deletion, then more time would be required to perform the task. It is quick and easy to mark some space as free, but to make the file gone forever requires time. Wiping a storage unit, for instance, takes a few hours to complete (depending on storage size). Overall, the current system works well because even when a user empties the recycle bin, they still have another chance to change their mind. - --------------------------------------------------------------------------------- - -via: http://www.linux.org/threads/undelete-files-on-linux-systems.4316/ - -作者:[DevynCJohnson][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linux.org/members/devyncjohnson.4843/ -[1]:http://www.cgsecurity.org/wiki/TestDisk From d09ecfd9a8f017e08aa1bc690fd5481cbb4b680e Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 12 Feb 2015 12:27:45 +0800 Subject: [PATCH 021/163] =?UTF-8?q?=E3=80=90Translated=E3=80=9120141203=20?= =?UTF-8?q?Undelete=20Files=20on=20Linux=20Systems.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完毕。FSSlc --- ...0141203 Undelete Files on Linux Systems.md | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 translated/tech/20141203 Undelete Files on Linux Systems.md diff --git a/translated/tech/20141203 Undelete Files on Linux Systems.md b/translated/tech/20141203 Undelete Files on Linux Systems.md new file mode 100644 index 0000000000..c5c6d9409d --- /dev/null +++ b/translated/tech/20141203 Undelete Files on Linux Systems.md @@ -0,0 +1,118 @@ +怎样在 Linux 系统中恢复已删除文件 +================================================================================ +大多数情况下,一个电脑用户可能意外地删除了一个仍然需要的文件,但没有一个简便的方法来重新找回或重建这个文件。幸好,文件可以被恢复。当用户删除了一个文件,该文件并没有消失,只是被隐藏了一段时间。这里将解释它是如何工作的。在一个文件系统中,有一个叫做 `文件分配表` 的文件,这个表跟踪文件在存储单元(硬盘, MicroSD 卡,闪存驱动器 等等)中的位置。当一个文件被删除,文件系统将会在`文件分配表`中执行以下 两个任务中的一个:这个文件在`文件分配表`上的条目被标记为 “空白空间” 或 这个文件在`文件分配表`的条目被擦除,且相应的空间被标记为 空白空间 。现在,如果一个文件需要被放置在一个存储单元上,操作系统将会把这个文件放置到标记为 空白 的空间中。在新文件被写入到这个空白空间后,被删除的文件就彻底消失了。当需要恢复一个已经删除的文件时,用户绝对不能再对任何文件进行操作,因为假如 该文件对应的 空白空间 被占用,这个文件就永远也不能恢复了。 + +### 恢复软件是如何工作的? ### + +大多数的文件系统只是标记空间为空白,在这些文件系统下,恢复软件查看`文件分配表`这个文件,然后复制被删除的文件到另外的存储单元中。假如该文件被复制到原来所处的存储单元中,那么用户将有可能会失去那个所需的删除文件。 + +文件系统很少会擦除`文件配置表`中的条目。假如文件系统真的这样做了, 这便是恢复软件在恢复文件了。恢复软件在存储单元中扫描文件头,所有文件都拥有一个特殊的编码字符串,它们位于文件的最前面,也被叫做 `魔法数字`。例如,一个编译的 JAVA 类文件的魔法数字在十六进制中是“CAFEBABE”。所以,假如要恢复该类型的文件,恢复软件会查找 “CAFEBABE” 然后复制文件到另一个存储单元。一些恢复软件可以查找某种特殊的文件类型。若用户想恢复一个 PDF 文件,则恢复软件将会查找十六进制的魔法数字 “25504446”,这恰恰是 ASCII 编码中的 “%PDF”。其他的恢复软件将查找所有的魔法数字。然后,用户可以选择恢复哪个已删除的文件。 + +假如一个文件的部分被重写了,则整个文件就会被损坏。通常这个文件可以被恢复,但是其中的内容可能已经没有什么用处。例如,恢复一个已损坏的 JPEG 文件将会是无意义的,因为 图片查看器不能从这个损坏的文件产生一幅图片。因此,即使用户拥有了这个文件,该文件也将毫无用处。 + +### 设备的位置: ### + +在我们继续之前,下面的一些信息将会对 指引恢复软件找到正确的存储单元 起到一定的帮助。所有的设备均挂载在 `/dev/` 目录下。操作系统赋予每个设备的名称(并不是管理员给予每个分区或设备的名称) 遵循一定的命名规律。第一个 SATA 硬盘的第二个分区的名称将会是 sda2。名称的第一个字母暗示了存储类型,在这里指的是 SATA,但字母 “s” 也可能指的是 SCSI, FireWire(火线端口), 或 USB。第二个字母 “d” 指的是 disk(硬盘)。第三个字母指的是设备序数,即字母 “a” 指的是第一个 SATA 而 “b” 指的是第二个。最后的数字代表分区。一个带有所有分区的设备的命名将只有字母而没有数字。对于上面的例子,对应的名称为 sda 。作为命名的第一个字母还可能是 “h” ,这对应 PATA 硬盘(IDE)。以下为命名规律的一些例子。假如一个用户有一个 SATA 硬盘(sda),这个设备有 4 个分区- sda1, sda2, sda3, 和 sda4 。该用户删除了第三个分区,但直到格式化第四个分区之前,将第四个分区保留。然后该用户插入了一个带有一个分区 - 即sdb1- 的 usb 存储卡(sdb),又增加了一个 带有一个分区 -hda1- 的 IDE 硬盘 ,接着该用户又增加了一个 SCSI 硬盘 - sdc1 。接着用户移除了 USB 存储卡(sdb)。现在,SCSI 硬盘的名称仍然为 sdc,但如果这个 SCSI 被移除接着再被插入,则它的名称将变为 sdb。即使其他的存储设备仍然存在, 那个 IDE 硬盘的名称仍会有一个 “a”, 因为它是第一个 IDE 硬盘,IDE 设备的命名与 SCSI, SATA, FireWire, 和 USB 设备要分开计数。 + +### 恢复: ### + +每个恢复软件有其不同的功能,特征及支持的不同文件系统。下面是一些关于 使用 TestDisk 在一系列的文件系统中恢复文件的指南。 + +**FAT16, FAT32, exFAT (FAT64), NTFS, 以及 ext2/3/4:** + +TestDisk 是一个运行在 Linux, *BSD, SunOS, Mac OS X, DOS, 和 Windows 等操作系统下的开源,免费软件。 TestDisk 可以从下面的链接中找到 :[http://www.cgsecurity.org/wiki/TestDisk][1]。TestDisk 也可以通过键入 `sudo apt-get install testdisk` 来安装。TestDisk 有着许多的功能,但这篇文章将只关注 恢复文件 这个功能。 + +使用 root 权限从终端中打开 TestDisk 可以通过键入 `sudo testdisk` 命令。 + +现在, TestDisk 命令行应用将会被执行。终端的外观将会改变。TestDisk 询问用户 它是否可以保留日志,这完全由用户决定。假如一个用户正从系统存储中恢复文件,则 TestDisk 不会保留日志。可选择的选项有 "生成", "追加", 和 "无 log"。假如用户想保留日志,则日志将会保留在该用户的主目录。 + +![](http://www.linux.org/attachments/screen1-jpg.342/) + +在接着的屏幕中,存储设备以 `/dev/*`的方式被罗列出来。对于我的系统,系统的存储单元为 `/dev/sda`,这意味着我的存储单元为 一个 SATA硬盘(sd) 且它是第一个硬盘(a)。每个存储单元的容量以 Gigabyte(千兆字节)为单位显示的。使用上下键来选择一个存储设备然后点击进入。 + +![](http://www.linux.org/attachments/screen2-jpg.343/) + +下一屏显示出一个列有分区表(也叫做 分区映射表)的清单。正如文件有`文件配置表`,分区有着分区表。分区是存储设备上的划分部分。例如在几乎所有的 Linux 系统中,至少存在两种分区类型 - EXT3/4 和 Swap 。每一个分区表将会在下面被简要地描述。TestDisk 并不支持所有类型的分区表,所以下面的列表不是完整的。 + +![](http://www.linux.org/attachments/screen3-jpg.344/) + +- **Intel** - 这类分区表在 Windows 系统和许多的 Linux 系统中非常普遍,它也以 MBR 的名称为人们熟知。 +- **EFI GPT** - 这种类型的分区表通常用在 Linux 系统中。对于 Linux系统,这种分区表是最为推荐的, 因为逻辑分区或扩展分区的概念并不适用于 GPT (GUID Partition Table) 分区表。 这意味着,如果每个分区中有一个 Linux 系统,一个 Linux 用户可以从多种类型的 Linux 系统中进行多重启动。当然使用 GPT 分区表还有其他的优势,但那些已超出了本文的讨论范围。 +- **Humax** - Humax 分区映射表适用于韩国公司 Humax 生产的设备。 +- **Mac** - Apple 分区映射表 (APM) 适用于 Apple 的设备。 +- **None** - 某些设备并没有分区表。例如,许多 Subor 游戏控制台不使用分区映射表。如果一个用户试图从这类设备中恢复文件, 并且认为分区表不是其他的类型,则实际上 TestDisk 并不能找到任何的文件系统或者文件,这将给用户带来困扰。 +- **Sun** - Sun 分区表适用于 Sun 系统。 +- **Xbox** -Xbox 适用于使用 Xbox 分区映射表的自家存储设备。 + +假如用户选择了 “Xbox” ,尽管他的系统使用了 GPT 分区表, 那么 TestDisk 将不能找到任何分区或文件系统。假如 TestDisk 按照用户的选择执行,则它将不正确地进行猜测。(下面的图片显示的是当分区表类型错误时的输出) + +![](http://www.linux.org/attachments/xbox-jpg.350/) + +一旦用户为他们的设备选择了正确的选项,则在下一屏中,选择 “高级” 选项。 + +![](http://www.linux.org/attachments/screen4-jpg.345/) + +现在,用户将看到一个列有 在用户的存储设备中所有的文件系统或分区 的列表。假如用户选择了错误的分区映射表,则在这一步中用户就将会知道他们做出了错误的选择。假如没有错误,通过放置文字类型的光标来高亮含有被删除文件的分区。使用 左右键 来高亮位于终端底部的 “列表”。接着,点击确认。 + +![](http://www.linux.org/attachments/screen5-jpg.346/) + +新的一屏便会呈现出列有文件和目录的列表。那些发白的文件就是还没有被删除的文件,而红色的文件就是那些已经被删除了的文件。最右边的一列是文件的名称,从右到左方向的接着一列是文件的创建日期,再往左的一列是文件的大小(以 byte(比特) 为单位),最左边带有虚线, “d” ,“r”, “w” 和"x"的一列则代表的是文件的权限情况。“d” 表示该文件为一个目录,其他的权限术语与本文关系不大。在列表的最顶端以“.”代表的一项表示当前目录,第二行以".."代表的一项表示当前目录的上级目录,通过选择这一行,用户可以到达上级目录。举个例子,我想进入"Xaiml_Dataset" 目录,该目录基本上由被删除的文件组成。通过按键盘上的 "c"键,我将恢复文件 "computers.xaiml",接着我被询问选择一个目标目录,当然,我将放置该文件到另一个分区中。现在,我在我的家目录中,并按下了“c”键。哪个目录被高亮并没有什么影响。当前目录就是目标目录,在屏幕的上方,将会显示“复制完成”的消息。在我的家目录中便会有一个名为"Xaiml_Dataset"的目录,里面里有名为 Xaiml 的文件。 假如我在更多的 已删除文件上按“c” 键,则这些文件将会被放置到新的文件夹中而无需再向我询问目标目录。 + +![](http://www.linux.org/attachments/screen6-jpg.347/) + +![](http://www.linux.org/attachments/screen7-jpg.348/) + +![](http://www.linux.org/attachments/screen8-jpg.349/) + +当这些步骤完成后,重复按“q”键直到看到正常的终端模样。目录"Xaiml_Dataset" 只能被 root 用户访问。为了修复这个问题,使用 root 权限改变该目录及其子目录的权限。做完这些后,文件便被恢复了且用户可以访问它们。 + +### ReiserFS: ### + +为了从 ReiserFS 文件系统中恢复一个文件,首先需将分区中的所有文件做一个备份。因为如果发生某些错误, 这个方法可能会引起文件丢失。接着执行下面的命令,其中 `DEVICE`指的是那些以 sda2 形式命名的设备。一些文件将被放入 lost+found 目录而其他则会保存到原先被删除的位置。 + + reiserfsck --rebuild-tree --scan-whole-partition /dev/DEVICE + +### 恢复被某个程序打开的删除文件: ### + +假设用户意外地删除了一个文件,且该文件被某个程序打开。虽然在硬盘中该文件被删除了,但这个程序正使用着位于 RAM 中的该文件的副本。幸好,我们有两种简单的解决方法来恢复该文件。 + +假如这个软件有自动保存功能,如文本编辑器,则用户可以重新保存该文件,这样,文本编辑器可以将该文件写入硬盘中。 + +假设在音乐播放器中有一个 MP3 文件,而该音乐播放器并不能保存该 MP3 文件,则这种情形下需要比先前花更多的时间来恢复文件。不幸的是,这种方法并不能保证在所有的系统和应用中有效。首先,键入下面的命令。 + + lsof -c smplayer | grep mp3 + +上面的命令会列出所有由 smplayer 使用的文件,这个列表由 `grep` 命令通过管道搜索 mp3 。命令的输入类似于下面: + + smplayer 10037 collier mp3 169r 8,1 676376 1704294 /usr/bin/smplayer + +现在,键入下面的命令来直接从 RAM(在 Linux 系统中,`/proc/`代表 RAM) 中恢复文件,并复制该文件到选定的文件夹中。其中 `cp` 指的是复制命令,输出中的数字 10037 来自于进程数,输出中的数字 169 指的是文件描述符,"~/Music/"为目标目录,最后的 "music.mp3" 为用户想恢复的文件的名称。 + + cp /proc/10037/fd/169 ~/Music/music.mp3 + +### 真正的删除: ### + +为确保一个文件不能被恢复,可以使用一个命令来 “擦除” 硬盘。擦除硬盘意味着向硬盘中写入无意义的数据。例如,许多擦除程序向硬盘中写入零,随机字母或随机数据,没有空间将会被占用或丢失,擦除程序只是对空白空间进行重写覆盖。假如存储单元被文件占满而没有空余空间,则所有先前被删除的文件将会消失。 + +擦除硬盘的目的是确保隐私数据不被他人看见。举个例子,一个公司可能预订了一些新的电脑,总经理决定将旧的电脑卖掉,然而,新的电脑拥有者可能会看到公司的一些机密或诸如信用卡号码,地址等顾客信息。幸好,公司的电脑技术人员可以在卖掉这些旧电脑之前,擦除这些硬盘。 + +为了安装擦除程序 secure-delete,键入 `sudo apt-get install secure-delete`,这个命令将会安装一个包含 4 个程序的程序集,用以确保被删除的文件不能被恢复。 + +- srm - 永久删除一个文件。使用方法: `srm -f ./secret_file.txt` +- sfill - 擦除空白空间。使用方法: `sfill -f /mount/point/of/partition` +- sswap - 擦除 swap 空间。使用方法: `sswap -f /dev/SWAP_DEVICE` + +假如电脑真的要去删除打算删除的文件,那么需要花费更长的时间去执行删除任务。将某些空间标记为空白空间是快速且容易的,但使得文件永远消失需要花费一定的时间。例如,擦除一个存储单元,可能需要花费几个小时的时间(根据磁盘容量大小)。总之,当前的系统工作良好,因为即便用户清空了垃圾箱,他们仍然有另一次机会来改变他们当初的想法。 + +-------------------------------------------------------------------------------- + +via: http://www.linux.org/threads/undelete-files-on-linux-systems.4316/ + +作者:[DevynCJohnson][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linux.org/members/devyncjohnson.4843/ +[1]:http://www.cgsecurity.org/wiki/TestDisk From 05fe9ecaf54a2a8f2efa5bbe0c382f9dcf99c6ba Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 12 Feb 2015 16:38:19 +0800 Subject: [PATCH 022/163] Delete 20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md --- ...umble in Ubuntu an Opensource VoIP Apps.md | 80 ------------------- 1 file changed, 80 deletions(-) delete mode 100644 sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md diff --git a/sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md deleted file mode 100644 index f49cc07c31..0000000000 --- a/sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md +++ /dev/null @@ -1,80 +0,0 @@ -translating by martin. - -Install Mumble in Ubuntu an Opensource VoIP Apps -================================================================================ -Mumble is a free and open source voice over IP (VoIP) application, released under the new BSD license, primarily designed for use by gamers and it's similar to programs such as TeamSpeak and Ventrilo. It uses a server to witch people can connect with a client to talk to each other. - -It offers the following great features: - -- low latency, very important for gaming -- offers in-game overlay so you can see who is talking and positional audio to hear the players from where they are located -- has encrypted communications so you can stay private and secure -- it also offers a few nice configuration interface that are easy to use -- very stable and good on resource usage for your server - -### Install Mumble ### - -[Mumble][1] has become very popular and is now present in the software repositories of the major Linux distributions and this makes it easy to install and setup. In Ubuntu you can use the command line to install it with apt-get by running the following command: - - $ sudo apt-get install mumble-server - -![mumble install](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-install.jpg) - -This will install the server (also called Murmur) on your server. - -### Configuring Mumble ### - -To setup Mumble you will need to run the following command: - -$ sudo dpkg-reconfigure mumble-server - -The following questions will pop-up: - -![mumble q1](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q1.jpg) - -Pick Yes to have mumble start when your server boots, next it will ask if you wish to run it in a high-priority mode that will ensure lower latency, it's a good idea to have it run it like that for the best performance: - -![mumble q2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q2.jpg) - -It will then require you to introduce a password for the administrator user of the new mumble server, you will need to remember this password for when you will log-in. - -![mumble q3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q3.jpg) - -### Installing Mumble Client ### - -The client can be installed on most major platforms like Windows, Mac OS X and Linux. We will cover the installation and configuration on Ubuntu Linux, to install it you can use the Software Center or run the following command: - - $ sudo apt-get install mumble - -When you first run Mumble it will present you with a wizard to help you configure your audio input and output to make the best of the client. It will first ask you what sound device and microphone to use: - -![mumble client 1](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-1.jpg) - -Then it will help you calibrate the devices: - -![mumble client 2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-2.jpg) - -And since mumble encrypts all the communication it will ask you to also create a certificate: - -![mumble client 3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-3.jpg) - -After you finish with the wizard you can add your first server and connect to it the dialog will look like this: - -![mumble add server](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-add-server.jpg) - -First enter a label, this can be anything you wish to remember the server by, next add the address and port of the server, and finally use "SuperUser" as user and the password you used when you configured the mumble server. - -You can now connect to the server and enjoy all of the features while you play online or talk to your friends or partners. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/install-mumble-ubuntu/ - -作者:[Adrian Dinu][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/adriand/ -[1]:http://wiki.mumble.info/wiki/Main_Page From 96fd7daa9c9b2bba55ea585f7ada0faeb505f3d1 Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 12 Feb 2015 16:40:20 +0800 Subject: [PATCH 023/163] translated --- ...umble in Ubuntu an Opensource VoIP Apps.md | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md diff --git a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md new file mode 100644 index 0000000000..65607a059b --- /dev/null +++ b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -0,0 +1,79 @@ +Ubuntu安装Mumble一个开源VoIP应用 +================================================================================ +Mumble是一个免费开源的VoIP应用,遵守New BSD License,主要面向的用户群体是玩家。运行起来类似于TeamSpeak和Ventrilo,用户通过连接到同一个服务器来实现相互通讯。 + +Mumble提供了如下的一些特性: + +- 低延迟,这点对游戏相当重要 +- 提供游戏中的可视插件,通过它你可以知道是谁正在和你通话并定位他们的位置 +- 交谈内容经过加密的,能够保护你的隐私和安全 +- 界面简单易于上手 +- 稳定高效的使用你的服务器资源 + +### 安装 Mumble ### + +[Mumble][1]已经流行开来,进入了许多linux主流发行版的软件仓库,这使它安装起来更加的方便。若你使用的是Ubuntu那么使用apt-get就能安装,详细命令如下: + + $ sudo apt-get install mumble-server + +![mumble install](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-install.jpg) + +这条命令将会在你的服务器上安装服务端(亦称Murmur)。 + +### 配置 Mumble ### + +运行以下命令启动Mumble: + +$ sudo dpkg-reconfigure mumble-server + +会弹出以下一些问题: + +![mumble q1](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q1.jpg) + +选择“是”开机自动启动mumble,接着它会询问你是否运行高性能模式以保持低延迟,为了让它保持最佳性能这是个不错的主意。 + +![mumble q2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q2.jpg) + +接着为你刚安装好的mumble服务端设置最高权限用户的密码,记住密码会在登录时用到。 + +![mumble q3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q3.jpg) + +### 安装 Mumble 客户端 ### + +客户端可以安装到许多的主流操作系统中,例如windows,mac和linux。我们将涉及在Ubuntu linux上的安装和配置,你可以使用软件中心或以下的命令安装客户端: + + $ sudo apt-get install mumble + +第一次运行mumble时,导向将会帮助你配置音频的输入输出,使其能在客户端上保持最好的效果。第一次同样也会询问你要使用的是什么声音设备和麦克风: + +![mumble client 1](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-1.jpg) + +然后它将帮你校准设备: +Then it will help you calibrate the devices: + +![mumble client 2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-2.jpg) + +在mumble帮你加密通讯时会询问你是否创建证书: + +![mumble client 3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-3.jpg) + +完成导向后你就能添加第一个服务器,连接对话框如下图所示: + +![mumble add server](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-add-server.jpg) + +首先输入一个标签,名字任意因为那只不过是为了记住服务器的,然后输入服务器的地址和端口,最后使用“SuperUser”作为用户名而密码则是你配置mumble服务器端时输入的密码。 + +现在你可以连接到服务器了,在联网玩游戏或与你好友、队友聊天开黑时享受这些功能给你带来的乐趣吧! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/install-mumble-ubuntu/ + +作者:[Adrian Dinu][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/adriand/ +[1]:http://wiki.mumble.info/wiki/Main_Page From 3f0d9425f39e2116092c916a22ca4761d3cf3001 Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 12 Feb 2015 16:42:51 +0800 Subject: [PATCH 024/163] Update 20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md --- ...20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md index 65607a059b..51f3344ca9 100644 --- a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md +++ b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -24,7 +24,7 @@ Mumble提供了如下的一些特性: 运行以下命令启动Mumble: -$ sudo dpkg-reconfigure mumble-server + $ sudo dpkg-reconfigure mumble-server 会弹出以下一些问题: From 68c1bae04996369c6429482414d0f4cd3a60b85d Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 12 Feb 2015 16:53:02 +0800 Subject: [PATCH 025/163] Update 20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md --- ...20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md index 51f3344ca9..d471c4743f 100644 --- a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md +++ b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -1,4 +1,4 @@ -Ubuntu安装Mumble一个开源VoIP应用 +Ubuntu安装Mumble——一个开源VoIP应用 ================================================================================ Mumble是一个免费开源的VoIP应用,遵守New BSD License,主要面向的用户群体是玩家。运行起来类似于TeamSpeak和Ventrilo,用户通过连接到同一个服务器来实现相互通讯。 From 98cdc238b1e608678d52a2f0cc648f18babe8258 Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 12 Feb 2015 16:54:48 +0800 Subject: [PATCH 026/163] Update 20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md --- ...20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md index d471c4743f..e1911efe29 100644 --- a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md +++ b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -1,4 +1,4 @@ -Ubuntu安装Mumble——一个开源VoIP应用 +Ubuntu上的一个开源VoIP应用——Mumble ================================================================================ Mumble是一个免费开源的VoIP应用,遵守New BSD License,主要面向的用户群体是玩家。运行起来类似于TeamSpeak和Ventrilo,用户通过连接到同一个服务器来实现相互通讯。 From e8ffd880ac46003f3b81ab11623b6636559c5d9f Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 12 Feb 2015 16:56:21 +0800 Subject: [PATCH 027/163] Update 20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md --- ...211 Install Mumble in Ubuntu an Opensource VoIP Apps.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md index e1911efe29..254345f765 100644 --- a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md +++ b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -34,13 +34,13 @@ Mumble提供了如下的一些特性: ![mumble q2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q2.jpg) -接着为你刚安装好的mumble服务端设置最高权限用户的密码,记住密码会在登录时用到。 +接着为你刚安装好的mumble服务端设置最高权限用户的密码,记住密码它会在登录时用到。 ![mumble q3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q3.jpg) ### 安装 Mumble 客户端 ### -客户端可以安装到许多的主流操作系统中,例如windows,mac和linux。我们将涉及在Ubuntu linux上的安装和配置,你可以使用软件中心或以下的命令安装客户端: +客户端可以安装到许多的主流操作系统中,例如windows,mac和linux。我们将教你在Ubuntu linux上安装和配置,你可以使用软件中心也可以用命令安装客户端: $ sudo apt-get install mumble @@ -49,11 +49,10 @@ Mumble提供了如下的一些特性: ![mumble client 1](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-1.jpg) 然后它将帮你校准设备: -Then it will help you calibrate the devices: ![mumble client 2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-2.jpg) -在mumble帮你加密通讯时会询问你是否创建证书: +因为mumble帮你加密所有的通讯内容所以它会征询你创建证书: ![mumble client 3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-3.jpg) From b1a9efec421fd4813b682e1ae726e56ff7879509 Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 13 Feb 2015 10:30:08 +0800 Subject: [PATCH 028/163] [translating] 20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md --- ...1 Simple Steps Migration From MySQL To MariaDB On Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md b/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md index 1588c979a4..fc04e08a2f 100644 --- a/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md +++ b/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md @@ -1,3 +1,5 @@ +Translating by martin. + Simple Steps Migration From MySQL To MariaDB On Linux ================================================================================ Hi all, this tutorial is all gonna be about how to migrate from MySQL to MariaDB on Linux Server or PC. So, you may ask why should we really migrate from MySQL to MariaDB for our database management. Here, below are the reasons why you should really need to migrate your database management system from MySQL to MariaDB. @@ -166,4 +168,4 @@ via: http://linoxide.com/linux-how-to/migrate-mysql-mariadb-linux/ [a]:http://linoxide.com/author/arunp/ [1]:https://mariadb.org/ -[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=mephi \ No newline at end of file +[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=mephi From b3c9a61fb99fc112755c725ce0ccefcdf6edfbc0 Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Fri, 13 Feb 2015 10:44:32 +0800 Subject: [PATCH 029/163] [translated] 20150115 Get back your privacy and control.md --- ...50115 Get back your privacy and control.md | 1114 ----------------- ...50115 Get back your privacy and control.md | 1111 ++++++++++++++++ 2 files changed, 1111 insertions(+), 1114 deletions(-) delete mode 100644 sources/tech/20150115 Get back your privacy and control.md create mode 100644 translated/tech/20150115 Get back your privacy and control.md diff --git a/sources/tech/20150115 Get back your privacy and control.md b/sources/tech/20150115 Get back your privacy and control.md deleted file mode 100644 index 915e3b073e..0000000000 --- a/sources/tech/20150115 Get back your privacy and control.md +++ /dev/null @@ -1,1114 +0,0 @@ -zpl1025 -Get back your privacy and control over your data in just a few hours: build your own cloud for you and your friends -================================================================================ -40'000+ searches over 8 years! That's my Google Search history. How about yours? (you can find out for yourself [here][1]) With so many data points across such a long time, Google has a very precise idea of what you've been interested in, what's been on your mind, what you are worried about, and how that all changed over the years since you first got that Google account. - -### Some of the most personal pieces of your identity are stored on servers around the world beyond your control ### - -Let's say you've been a Gmail user between 2006 and 2013 like me, meaning you received 30'000+ emails and wrote about 5000 emails over that 7 year period. Some of the emails you sent or received are very personal, maybe so personal that you probably wouldn't like even some family members or close friends to go through them systematically. Maybe you also drafted a few emails that you never sent because you changed your mind at the last minute. But even if you never sent them, these emails are still stored somewhere on a server. As a result, it's fair to say that Google servers know more about your personal life than your closest friends or your family. - -Statistically, it's a safe bet to consider that you've got a smartphone. You can barely use the phone without using the contacts app which stores your contacts in Google Contact on Google servers by default. So not only does Google know about your emails, but also about your offline contacts: who you like to call, who calls you, whom you text, and what you text them about. You don't have to take my word for it, you can verify for yourself by taking a look at the permissions you gave apps such as the Google Play Service to read the list of people that called you and the SMS you got. Do you also use the calendar app that comes with your phone? Unless you explicitly opted out while setting up your calendar, this means that Google knows precisely what you're up to, at every time of the day, day after day, year after year. The same applies if you chose an iPhone over an Android phone, except Apple gets to know about your correspondance, contacts and schedule instead of Google. - -Do you also take great care to keep the contacts in your directory up-to-date, updating your friend's, colleagues's and and family's email addresses and phone numbers when they move to a new job or change carrier? That gives Google an extraordinarily accurate, up-to-date picture of your social network. And you love the GPS of your smartphone which you use a lot together with Google Maps. This means Google not only knows what you do from your calendar but also where you are, where you live, where you work. And by correlating GPS location data across users, Google can also tell with whom you may socializing with right now. - -### Your daily habit of handing out your most personal information will impact your life in a way that no one can even forsee ### - -To summarize, if you are an average internet user, Google has up-to-date, in-depth information about your interests, worries, passions, questions, over almost 10 years. It has a collection of some of your most personal messages (emails, SMS), an hour-by-hour detail of your daily activities and location, and a high-quality picture of your social network. Such an intimate knowledge of you likely goes beyond what your closest friends, family, or your sweetheart know of you. - -It wouldn't come to mind to give this mass of deeply personal information to complete strangers, for instance by putting it all on a USB key and leaving it on a table in a random cafe with a note saying 'Personal data of Olivier Martin, use as you please'. Who knows who might find it and what they would do with it? Yet, we have no problem handing in core pieces of your identity to strangers at IT companies with a strong interest in our data (that's how they make their bread) and [world-class experts in data analysis][2], perhaps just because it happens by default without us thinking about it when we hit that green 'Accept' button. - -With so much high-quality information, over the years, Google may well get to know you better than you can ever hope to know yourself: heck, crawling through my digital past right now, I can't remember having written half of the emails I sent five years ago. I am surprised and pleased to rediscover my interest in marxism back in 2005 and my joining [ATTAC][3] (an organization which strives to limit speculation and improve social justice by taxing financial transactions) the next year. And god knows why I was so much into dancing shoes back in 2007. These is pretty harmless information (you wouldn't have expected me to reveal something embarassing here, would you? ;-). But by connecting the dots between high-quality data over different aspects of your life (what, when, with whom, where, ...) over such time spans, one may extrapolate predictive statements about you. For instance, from the shopping habits of a 17-year-old girl, supermarkets can tell that she is pregnant before her dad even hears about it ([true story][4]). Who knows what will become possible with high-quality data the like Google has, which goes well beyond shopping habits? By connecting the dots, maybe one can predict how your tastes or political views will change in the coming years. Today, [companies you have never heard of claim to have 500 data points about you][5], including religion, sexual orientation and political views. Speaking of politics, what if you decide to go into politics in 10 years from now? Your life may change, your views too, and you may even forget, but Google won't. Will you have to worry that your opponent is in touch with someone who has access to your data at Google and can dig up something embarassing on you from those bottomless wells of personal data you gave away over the years? How long until Google or Facebook get hacked [just like Sony was recently hacked][6] and all your personal data end up in the public sphere forever? - -One of the reason most of us have entrusted our personal data to these companies is that they provide their services for free. But how free is it really? The value of the average Google account varies depending on the method used to estimate it: [1000 USD/year][7] accounts for the amount of time you invest in writing emails, while the value of your account for the advertisement industry is somewhere between [220 USD/year][8] and [500 USD/year][9]. So the service is not exactly free: you pay for it through advertisement and the yet unknown uses that our data may find in the future. - -I've been writing about Google mostly because that's the company I've entrusted most of my digital identify to so far and hence the one I know best. But I may well have written Apple or Facebook. These companies truly changed the world with their fantastic advances in design, engineering and services we love(d) to use, every day. But it doesn't mean we should stack up all our most personal data in their servers and entrust them with our digital lives: the potential for harm is just too large. - -### Claim back your privacy and that of people you care for in just 5h ### - -It does not have to be this way. You can live in the 21st century, have a smartphone, use email and GPS on daily basis, and still retain your privacy. All you need to do is get back control over your personal data: emails, calendar, contacts, files, etc.. The [Prism-Break.org][10] website lists software that help controlling the fate of your personal data. Beyond these options, the safest and most powerful way to get back control over your personal data is to host your cloud yourself, by building your own server. But you may just not have the time and energy to research how exactly to do that and make it work smoothly. - -That's where the present article fits in. In just 5 hours, we will set up a server to host your emails, contacts, calendars and files for you, your friends and your family. The server is designed to act as a hub or cloud for your personal data, so that you always retain full control over it. The data will automatically be synchronized between your PC/laptop, your phone and your tablet. Essentially, **we will set up a system that replaces Gmail, Google Drive / Dropbox, Google Contacts, Google Calendar and Picasa**. - -Just doing this for yourself will already be a big step. But then, a significant fraction of your personal information will still leak out and end up on some servers in the silicon valley, just because so many of the people you interact with every day use Gmail and have smartphones. So it's a good idea to have some of the people you are closest to join the adventure. - -We will build a system that - -- **supports an arbitrary number of domains and users**. This makes it easy to share your server with family and friends, so that they get control over their personal data too and can share the cost of the server with you. The people sharing your server can use their own domain name or share yours. -- **lets you send and receive your emails from any network** upon successfully logging in onto the server. This way, you can send your emails from any of your email addresses, from any device (PC, phone, tablet), and any network (at home, at work, from a public network, ...) -- **encrypts network traffic** when sending and receiving emails so people you don't trust won't fish out your password and won't be able to read your private emails. -- **offers state-of-the-art antispam**, combining black lists of known spammers, automatic greylisting, and adaptative spam filtering. Re-training the adaptative spam filter if an email is misclassified is simply done by moving spam in or out of the Junk/Spam folder. Also, the server will contribute to community-based spam fighting efforts. -- **requires just a few minutes of maintenance once in a while**, basically to install security updates and briefly check the server logs. Adding a new email address boils down to adding one record to a database. Apart from that, you can just forget about it and live your life. I set up the system described in this article 14 months ago and the thing has just been running smoothly since then. So I completely forgot about it, until I recently smiled at the thought that casually pressing the 'Check email' button of my phone caused electrons to travel all the way to Iceland (where my server sits) and back. - -To go through this article, you'll need a minimum of technical capabilities. If you know what is the difference between SMTP and IMAP, what is a DNS, and have a basic understanding of TCP/IP, you know enough to follow through. You will also need a basic working knowledge of Unix (working with files from the command line, basic system administration). And you'll need a total of 5 hours of time to set it up. - -Here's an overview what we will do: - -- [Get a Virtual Private Server, a domain name, and set them up][11] -- [Set up postfix and dovecot to send and receive email][12] -- [Prevent SPAM from reaching your INBOX][13] -- [Make sure the emails you send get through spam filters][14] -- [Host calendars, contacts, files with Owncloud and set up webmail][15] -- [Sync your devices to the cloud][16] - -### This article was inspired by and builds upon previous work ### - -This article draws heavily from two other articles, namely [Xavier Claude][17]'s and [Drew Crawford][18]'s introduction to email self-hosting. - -The article includes all the features of Xavier's and Draw's articles, except from three features that Drew had and which I didn't need, namely push support for email (I like to check email only when I decide to, otherwise I get distracted all the time), fulltext search in email (which I don't have a use for), and storing emails in an encrypted form (my emails and data are not critical to the point that I have to encrypt them locally on the server). If you need any of these features, feel free to just add them by following to the respective section of Drew's article, which is compatible with the present one. - -Compared to Xavier's and Drew's work, the present article improves on several aspects: - -- it fixes bugs and typos based on my experience with Drew's article and the numerous comments on his original article. I also went through the present article, setting up the server from scratch several times to replicate it and make sure it would work right out of the box. -- low maintenance: compared to Xavier's work, the present article adds support for multiple email domains on the server. It does so by requiring the minimum amount of server maintenance possible: basically, to add a domain or a user, just add one row to a mysql table and that's it (no need to add sieve scripts, ...). -- I added webmail. -- I added a section on setting up a cloud, to host not just your emails but also your files, your addressbook / contacts (emails, phone numbers, birthdays, ...), calendars and pictures for use across your devices. - -### Get a Virtual Private Server, a domain name, and set them up ### - -Let's start by setting the basic infrastructure: our virtual private server and our domain name. - -I've had an excellent experience with the Virtual Private Servers (VPS) of [1984.is][19] and [Linode][20]. In this article, we will use **Debian Wheezy**, for which both 1984 and Linode provide ready-made images to deploy on your VPS. I like 1984 because the servers are hosted in Iceland which run exclusively on renewable energy (geothermical and hydropower) and hence does not contribute to the climate change, unlike [the coal power plants on which most US-based datacenters currently run on][21]. Also, they put emphasis on [civil liberties, transparency, freedom][22] and [Free Software][23]. - -It could be a good idea to start a file to store the various passwords we will need to set on the server (user accounts, mail accounts, cloud accounts, database accounts). It's definitely a good idea to encrypt this file (maybe with [GnuPG][24]), so that it won't be too easy to attack your server even if the computer you use to set up your server gets stolen or compromised. - -For registering a domain name, I've been using the services of [gandi][25] for over 10 years now, also with satisfaction. For this article, we will set up a zone with the name **jhausse.net**. We then add a host named **cloud.jhausse.net** to it, set the MX record to that host. While you're at it, set short Time To Lives (TTL) to your records like 300 seconds so that you'll be able to make changes to your zone and test the result rapidly while you're setting up the server. - -Finally, set the PTR record (reverse DNS) so that the IP address of the host maps back to its name. If you don't understand the previous sentence, read [this article][26] to get the background. If you use Linode, you can set the PTR record in the control panel in the Remote Access section. With 1984, contact the tech support who will help you with it. - -On the server, we will start by adding a non-privledged user, so that we don't end up working as root all the time. Also, to log in as root will require an extra layer of security. - - adduser roudy - -Then, in **/etc/ssh/sshd_config**, we set - - PermitRootLogin no - -and reload the ssh server - - service ssh reload - -Then, we'll need to change the hostname of the server. Edit **/etc/hostname** so that it has just a single line with your hostname, in our case - - cloud - -Then, edit the ssh server's public key files **/etc/ssh/ssh_host_rsa_key.pub, /etc/ssh/ssh_host_dsa_key.pub, /etc/ssh/ssh_host_ecdsa_key.pub** so that the end of the file reflects your hostname, or instance **root@cloud**. Then restart the system to make sure the hostname is fixed wherever is should be - - reboot - -We will update the system and remove services we don't need to reduce the risk of remote attacks. - - apt-get update - apt-get dist-upgrade - service exim4 stop - apt-get remove exim4 rpcbind - apt-get autoremove - apt-get install vim - -I like to use vim for editing config files remotely. For this, it helps to automatically turn on syntax highlighting. We do so by adding - - syn on - -to **~/.vimrc**. - -### Set up postfix and dovecot to send and receive email ### - - apt-get install postfix postfix-mysql dovecot-core dovecot-imapd dovecot-mysql mysql-server dovecot-lmtpd postgrey - -In the [Postfix][27] configuration menu, we select **Internet Site**, and set the system mail name to **jhausse.net**. - -We will now set up a database to store the list of domains hosted on our server, the list of users for each of these domains (together with their password), and a list of mail aliases (to forward email from a given address to another one). - - mysqladmin -p create mailserver - mysql -p mailserver - mysql> GRANT SELECT ON mailserver.* TO 'mailuser'@'localhost' IDENTIFIED BY 'mailuserpass'; - mysql> FLUSH PRIVILEGES; - mysql> CREATE TABLE `virtual_domains` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(50) NOT NULL, - PRIMARY KEY (`id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - mysql> CREATE TABLE `virtual_users` ( - `id` int(11) NOT NULL auto_increment, - `domain_id` int(11) NOT NULL, - `password` varchar(106) NOT NULL, - `email` varchar(100) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `email` (`email`), - FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - mysql> CREATE TABLE `virtual_aliases` ( - `id` int(11) NOT NULL auto_increment, - `domain_id` int(11) NOT NULL, - `source` varchar(100) NOT NULL, - `destination` varchar(100) NOT NULL, - PRIMARY KEY (`id`), - FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -We will host the **jhausse.net** domain. If there are other domains you'd like to host, you can also add them. We also set up a postmaster address for each domain, which forwards to **roudy@jhausse.net**. - - mysql> INSERT INTO virtual_domains (`name`) VALUES ('jhausse.net'); - mysql> INSERT INTO virtual_domains (`name`) VALUES ('otherdomain.net'); - mysql> INSERT INTO virtual_aliases (`domain_id`, `source`, `destination`) VALUES ('1', 'postmaster', 'roudy@jhausse.net'); - mysql> INSERT INTO virtual_aliases (`domain_id`, `source`, `destination`) VALUES ('2', 'postmaster', 'roudy@jhausse.net'); - -We now add a locally hosted email account **roudy@jhausse.net**. First, we generate a password hash for it: - - doveadm pw -s SHA512-CRYPT - -and then add the hash to the database - - mysql> INSERT INTO `mailserver`.`virtual_users` (`domain_id`, `password`, `email`) VALUES ('1', '$6$YOURPASSWORDHASH', 'roudy@jhausse.net'); - -Now that our list of domains, aliases and users are in place, we will set up postfix (SMTP server, for outgoing mail). Replace the contents of **/etc/postfix/main.cf** with the following: - - myhostname = cloud.jhausse.net - myorigin = /etc/mailname - mydestination = localhost.localdomain, localhost - mynetworks_style = host - - # We disable relaying in the general case - smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination - # Requirements on servers that contact us: we verify the client is not a - # known spammer (reject_rbl_client) and use a graylist mechanism - # (postgrey) to help reducing spam (check_policy_service) - smtpd_client_restrictions = permit_mynetworks, reject_rbl_client zen.spamhaus.org, check_policy_service inet:127.0.0.1:10023 - disable_vrfy_command = yes - inet_interfaces = all - smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) - biff = no - append_dot_mydomain = no - readme_directory = no - - # TLS parameters - smtpd_tls_cert_file=/etc/ssl/certs/cloud.crt - smtpd_tls_key_file=/etc/ssl/private/cloud.key - smtpd_use_tls=yes - smtpd_tls_auth_only = yes - smtp_tls_security_level=may - smtp_tls_loglevel = 1 - smtpd_tls_loglevel = 1 - smtpd_tls_received_header = yes - smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache - smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache - - # Delivery - alias_maps = hash:/etc/aliases - alias_database = hash:/etc/aliases - message_size_limit = 50000000 - recipient_delimiter = + - - # The next lines are useful to set up a backup MX for myfriendsdomain.org - # relay_domains = myfriendsdomain.org - # relay_recipient_maps = - - # Virtual domains - virtual_transport = lmtp:unix:private/dovecot-lmtp - virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf - virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf - virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf - local_recipient_maps = $virtual_mailbox_maps - -Now we need to teach postfix to figure out which domains we would like him to accept emails for using the database we just set up. Create a new file **/etc/postfix/mysql-virtual-mailbox-domains.cf** and add the following: - - user = mailuser - password = mailuserpass - hosts = 127.0.0.1 - dbname = mailserver - query = SELECT 1 FROM virtual_domains WHERE name='%s' - -We teach postfix to find out whether a given email account exists by creating **/etc/postfix/mysql-virtual-mailbox-maps.cf** with the following content - - user = mailuser - password = mailuserpass - hosts = 127.0.0.1 - dbname = mailserver - query = SELECT 1 FROM virtual_users WHERE email='%s' - -Finally, postfix will use **/etc/postfix/mysql-virtual-alias-maps.cf** to look up mail aliases - - user = mailuser - password = mailuserpass - hosts = 127.0.0.1 - dbname = mailserver - query = SELECT virtual_aliases.destination as destination FROM virtual_aliases, virtual_domains WHERE virtual_aliases.source='%u' AND virtual_aliases.domain_id = virtual_domains.id AND virtual_domains.name='%d' - -With all this in place, it is now time to test if postfix can query our database properly. We can do this using **postmap**: - - postmap -q jhausse.net mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf - postmap -q roudy@jhausse.net mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf - postmap -q postmaster@jhausse.net mysql:/etc/postfix/mysql-virtual-alias-maps.cf - postmap -q bob@jhausse.net mysql:/etc/postfix/mysql-virtual-alias-maps.cf - -If you set up everything properly, the first two queries should return 1, the third query should return **roudy@jhausse.net** and the last one should return nothing at all. - -Now, let's set up dovecot (the IMAP server, to fetch incoming mail on the server from our devices). Edit **/etc/dovecot/dovecot.conf** to set the following parameters: - - # Enable installed protocol - # !include_try /usr/share/dovecot/protocols.d/*.protocol - protocols = imap lmtp - -which will only enable imap (to let us fetch emails) and lmtp (which postfix will use to pass incoming emails to dovecot). Edit **/etc/dovecot/conf.d/10-mail.conf** to set the following parameters: - - mail_location = maildir:/var/mail/%d/%n - [...] - mail_privileged_group = mail - [...] - first_valid_uid = 0 - -which will store emails in /var/mail/domainname/username. Note that these settings are spread at different locations in the file, and are sometimes already there for us to set: we just need to comment them out. The other settings which are already in the file, you can leave as is. We will have to do the same to update settings in many more files in the remaining of this article. In **/etc/dovecot/conf.d/10-auth.conf**, set the parameters: - - disable_plaintext_auth = yes - auth_mechanisms = plain - #!include auth-system.conf.ext - !include auth-sql.conf.ext - -In **/etc/dovecot/conf.d/auth-sql.conf.ext**, set the following parameters: - - passdb { - driver = sql - args = /etc/dovecot/dovecot-sql.conf.ext - } - userdb { - driver = static - args = uid=mail gid=mail home=/var/mail/%d/%n - } - -where we just taught dovecot that users have their emails in /var/mail/domainname/username and to look up passwords from the database we just created. Now we still need to teach dovecot how exactly to use the database. To do so, put the following into **/etc/dovecot/dovecot-sql.conf.ext**: - - driver = mysql - connect = host=localhost dbname=mailserver user=mailuser password=mailuserpass - default_pass_scheme = SHA512-CRYPT - password_query = SELECT email as user, password FROM virtual_users WHERE email='%u'; - -We now fix permissions on config files - - chown -R mail:dovecot /etc/dovecot - chmod -R o-rwx /etc/dovecot - -Almost there! We just need to edit a couple files more. In **/etc/dovecot/conf.d/10-master.conf**, set the following parameters: - - service imap-login { - inet_listener imap { - #port = 143 - port = 0 - } - inet_listener imaps { - port = 993 - ssl = yes - } - } - - service pop3-login { - inet_listener pop3 { - #port = 110 - port = 0 - } - inet_listener pop3s { - #port = 995 - #ssl = yes - port = 0 - } - } - - service lmtp { - unix_listener /var/spool/postfix/private/dovecot-lmtp { - mode = 0666 - group = postfix - user = postfix - } - user = mail - } - - service auth { - unix_listener auth-userdb { - mode = 0600 - user = mail - #group = - } - - # Postfix smtp-auth - unix_listener /var/spool/postfix/private/auth { - mode = 0666 - user = postfix - group = postfix - } - - # Auth process is run as this user. - #user = $default_internal_user - user = dovecot - } - - service auth-worker { - user = mail - } - -Note that we set ports for all services but imaps to 0, which effectively disables them. Then, in **/etc/dovecot/conf.d/15-lda.conf**, specify an email address for the postmaster: - - postmaster_address = postmaster@jhausse.net - -Last but not least, we need to generate a pair of public and private key for the server, which we will use both in dovecot and postfix: - - openssl req -new -newkey rsa:4096 -x509 -days 365 -nodes -out "/etc/ssl/certs/cloud.crt" -keyout "/etc/ssl/private/cloud.key" - -Make sure that you specify your the Fully Qualified Domain Name (FQDN) of the server, in our case: - - Common Name (e.g. server FQDN or YOUR name) []:cloud.jhausse.net - -If you don't, our clients may complain that the server name in the SSL certificate does not match the name of the server they are connecting to. We tell dovecot to use these keys by setting the following parameters in **/etc/dovecot/conf.d/10-ssl.conf**: - - ssl = required - ssl_cert = : Relay access denied - -That's good: had the server accepted the mail, it would have meant that we set up postfix as an open relay for all the spammers of the world and beyhond to use. Instead of the 'Relay access denied' message, you may instead get the message - - 554 5.7.1 Service unavailable; Client host [87.68.61.119] blocked using zen.spamhaus.org; http://www.spamhaus.org/query/bl?ip=87.68.61.119 - -This means that you are trying to contact the server from an IP address that is considered as a spammer's address. I got this message while trying to connect to the server through my regular Internet Service Provider (ISP). To fix this issue, you can try to connect from another host, maybe another server you have access to through SSH. Alternatively, you can reconfigure Postfix's **main.cf** not to use Spamhaus's RBL, reload postfix, and verify that the above test works. In both cases, it's important that you find a solution that works for you because we'll test other things in a minute. If you chose to reconfigure Postfix not to use RBLs, don't forget to put the RBLs back in and to reload postfix after finishing the article to avoid getting more spam than necessary. - -Now let's try to send a valid email by SMTP on port 25, which regular mail servers use to talk to each other: - - openssl s_client -connect cloud.jhausse.net:25 -starttls smtp - EHLO cloud.jhausse.net - MAIL FROM:youremail@domain.com - rcpt to:roudy@jhausse.net - -to which the server should respond - - Client host rejected: Greylisted, see http://postgrey.schweikert.ch/help/jhausse.net.html - -which shows that [postgrey][28] is working as it should. What postgrey does it to reject emails with a temporary error if the sender has never been seen before. The technical rules of email require email servers to try to deliver the email again. After five minutes, postgrey will accept the email. Legit email servers around the world will try repeatidly to redeliver the email to us, but most spammers won't. So, wait for 5 minutes, try to send the email again using the command above, and verify that postfix now accepts the email. - -Afterwards, we'll check that we can fetch the two emails that we just sent ourselves by talking IMAP to dovecot: - - openssl s_client -crlf -connect cloud.jhausse.net:993 - 1 login roudy@jhausse.net "mypassword" - 2 LIST "" "*" - 3 SELECT INBOX - 4 UID fetch 1:1 (UID RFC822.SIZE FLAGS BODY.PEEK[]) - 5 LOGOUT - -where you should replace mypassword with the password you set for this email account. If that works, we basically have a functional email server which can receive our incoming emails, and from which we get retreive these emails from our devices (PC/laptop, tablets, phones, ...). But we can't give it our emails to send unless we send them from the server itself. We'll now allow postfix to forward our emails, but only upon successful authentification, that is after it could make sure that the email comes from someone who has a valid account on the server. To do so, we'll open a special, SSL-only, SASL-authentified email submission service. Set the following parameters in **/etc/postfix/master.cf**: - - submission inet n - - - - smtpd - -o syslog_name=postfix/submission - -o smtpd_tls_security_level=encrypt - -o smtpd_sasl_auth_enable=yes - -o smtpd_client_restrictions=permit_sasl_authenticated,reject - -o smtpd_sasl_type=dovecot - -o smtpd_sasl_path=private/auth - -o smtpd_sasl_security_options=noanonymous - -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject_non_fqdn_recipient,reject_unauth_destination - -and reload postfix - - service postfix reload - -Now, let's try to use this service from a different machine than than the server, to verify postfix will now relay our emails and nobody else's: - - openssl s_client -connect cloud.jhausse.net:587 -starttls smtp - EHLO cloud.jhausse.net - -Notice the '250-AUTH PLAIN' capabilities advertized by server, which doesn't appear when we connect to port 25. - - MAIL FROM:asdf@jkl.net - rcpt to:bob@gmail.com - 554 5.7.1 : Relay access denied - QUIT - -That's good, postfix won't relay our emails if he doesn't know us. So let's authentify ourselves first. To do so, we first need to generate an authentification string: - - echo -ne '\000roudy@jhausse.net\000mypassword'|base64 - -and let's try to send emails through the server again: - - openssl s_client -connect cloud.jhausse.net:587 -starttls smtp - EHLO cloud.jhausse.net - AUTH PLAIN DGplYW5AMTk4NGNsb3VQLm5ldAA4bmFmNGNvNG5jOA== - MAIL FROM:asdf@jkl.net - rcpt to:bob@gmail.com - -which postfix should now accept. To complete the test, let's verify that our virtual aliases work by sending an email to postmaster@jhausse.net and making sure it goes to roudy@jhausse.net: - - telnet cloud.jhausse.net 25 - EHLO cloud.jhausse.net - MAIL FROM:youremail@domain.com - rcpt to:postmaster@jhausse.net - data - Subject: Virtual alias test - - Dear postmaster, - Long time no hear! I hope your MX is working smoothly and securely. - Yours sincerely, Roudy - . - QUIT - -Let's check the mail made it all the way to the right inbox: - - openssl s_client -crlf -connect cloud.jhausse.net:993 - 1 login roudy@jhausse.net "mypassword" - 2 LIST "" "*" - 3 SELECT INBOX - * 2 EXISTS - * 2 RECENT - 4 LOGOUT - -At this point, we have a functional email server, both for incoming and outgoing mails. We can set up our devices to use it. - -PS: did you remember to [try sending an email to an account hosted by the server through port 25][29] again, to verify that you are not longer blocked by postgrey? - -### Prevent SPAM from reaching your INBOX ### - -For the sake of SPAM filtering, we already have Realtime BlackLists (RBLs) and greylisting (postgrey) in place. We'll now take our spam fighting capabilities up a notch by adding adaptative spam filtering. This means we'll add artificial intelligence to our email server, so that it can learn from experience what is spam and what is not. We will use [dspam][30] for that. - - apt-get install dspam dovecot-antispam postfix-pcre dovecot-sieve - -dovecot-antispam is a package that allows dovecot to retrain the spam filter if we find an email that is misclassified by dspam. Basically, all we need to do is to move emails in or out of the Junk/Spam folder. dovecot-antispam will then take care of calling dspam to retrain the filter. As for postfix-pcre and dovecot-sieve, we will use them respectively to pass incoming emails through the spam filter and to automatically move spam to the user's Junk/Spam folder. - -In **/etc/dspam/dspam.conf**, set the following parameters to these values: - - TrustedDeliveryAgent "/usr/sbin/sendmail" - UntrustedDeliveryAgent "/usr/lib/dovecot/deliver -d %u" - Tokenizer osb - IgnoreHeader X-Spam-Status - IgnoreHeader X-Spam-Scanned - IgnoreHeader X-Virus-Scanner-Result - IgnoreHeader X-Virus-Scanned - IgnoreHeader X-DKIM - IgnoreHeader DKIM-Signature - IgnoreHeader DomainKey-Signature - IgnoreHeader X-Google-Dkim-Signature - ParseToHeaders on - ChangeModeOnParse off - ChangeUserOnParse full - ServerPID /var/run/dspam/dspam.pid - ServerDomainSocketPath "/var/run/dspam/dspam.sock" - ClientHost /var/run/dspam/dspam.sock - -Then, in **/etc/dspam/default.prefs**, change the following parameters to: - - spamAction=deliver # { quarantine | tag | deliver } -> default:quarantine - signatureLocation=headers # { message | headers } -> default:message - showFactors=on - -Now we need to connect dspam to postfix and dovecot by adding these two lines at the end of **/etc/postfix/master.cf**: - - dspam unix - n n - 10 pipe - flags=Ru user=dspam argv=/usr/bin/dspam --deliver=innocent,spam --user $recipient -i -f $sender -- $recipient - dovecot unix - n n - - pipe - flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient} - -Now we will tell postfix to filter every new email that gets submitted to the server on port 25 (normal SMTP traffic) through dspam, except if the email is submitted from the server itself (permit_mynetworks). Note that the emails we submit to postfix with SASL authentication won't be filtered through dspam either, as we set up a separate submission service for those in the previous section. Edit **/etc/postfix/main.cf** to change the **smtpd_client_restrictions** to the following: - - smtpd_client_restrictions = permit_mynetworks, reject_rbl_client zen.spamhaus.org, check_policy_service inet:127.0.0.1:10023, check_client_access pcre:/etc/postfix/dspam_filter_access - -At the end of the file, also also add: - - # For DSPAM, only scan one mail at a time - dspam_destination_recipient_limit = 1 - -We now need to specify the filter we defined. Basically, we will tell postfix to send all emails (/./) to dspam through a unix socket. Create a new file **/etc/postfix/dspam_filter_access** and put the following line into it: - - /./ FILTER dspam:unix:/run/dspam/dspam.sock - -That's it for the postfix part. Now let's set up dovecot for spam filtering. In **/etc/dovecot/conf.d/20-imap.conf**, edit the **imap mail_plugins** plugins parameter such that: - - mail_plugins = $mail_plugins antispam - -and add a section for lmtp: - - protocol lmtp { - # Space separated list of plugins to load (default is global mail_plugins). - mail_plugins = $mail_plugins sieve - } - -We now configure the dovecot-antispam plugin. Edit **/etc/dovecot/conf.d/90-plugin.conf** to add the following content to the plugin section: - - plugin { - ... - # Antispam (DSPAM) - antispam_backend = dspam - antispam_allow_append_to_spam = YES - antispam_spam = Junk;Spam - antispam_trash = Trash;trash - antispam_signature = X-DSPAM-Signature - antispam_signature_missing = error - antispam_dspam_binary = /usr/bin/dspam - antispam_dspam_args = --user;%u;--deliver=;--source=error - antispam_dspam_spam = --class=spam - antispam_dspam_notspam = --class=innocent - antispam_dspam_result_header = X-DSPAM-Result - } - -and in **/etc/dovecot/conf.d/90-sieve.conf**, specify a default sieve script which will apply to all users of the server: - - sieve_default = /etc/dovecot/default.sieve - -What is sieve and why do we need a default script for all users? Sieve lets us automatize tasks on the IMAP server. In our case, we won't all emails identified as spam to be put in the Junk folder instead of in the Inbox. We would like this to be the default behavior for all users on the server; that's why we just set this script as default script. Let's create this script now, by creating a new file **/etc/dovecot/default.sieve** with the following content: - - require ["regex", "fileinto", "imap4flags"]; - # Catch mail tagged as Spam, except Spam retrained and delivered to the mailbox - if allof (header :regex "X-DSPAM-Result" "^(Spam|Virus|Bl[ao]cklisted)$", - not header :contains "X-DSPAM-Reclassified" "Innocent") { - # Mark as read - # setflag "\\Seen"; - # Move into the Junk folder - fileinto "Junk"; - # Stop processing here - stop; - } - -Now we need to compile this script so that dovecot can run it. We also need to give it appropriate permissions. - - cd /etc/dovecot - sievec . - chown mail.dovecot default.siev* - chmod 0640 default.sieve - chmod 0750 default.svbin - -Finally, we need to fix permissions on two postfix config files that dspam needs to read from: - - chmod 0644 /etc/postfix/dynamicmaps.cf /etc/postfix/main.cf - -That's it! Let's restart dovecot and postfix - - service dovecot restart - service postfix restart - -and test the antispam, by contacting the server from a remote host (e.g. the computer we are using to set the server): - - openssl s_client -connect cloud.jhausse.net:25 -starttls smtp - EHLO cloud.jhausse.net - MAIL FROM:youremail@domain.com - rcpt to:roudy@jhausse.net - DATA - Subject: DSPAM test - - Hi Roudy, how'd you like to eat some ham tonight? Yours, J - . - QUIT - -Let's check if the mail arrived: - - openssl s_client -crlf -connect cloud.jhausse.net:993 - 1 login roudy@jhausse.net "mypassword" - 2 LIST "" "*" - 3 SELECT INBOX - 4 UID fetch 3:3 (UID RFC822.SIZE FLAGS BODY.PEEK[]) - -Which should return something the email with a collection of flag set by SPAM which look like this: - - X-DSPAM-Result: Innocent - X-DSPAM-Processed: Sun Oct 5 16:25:48 2014 - X-DSPAM-Confidence: 1.0000 - X-DSPAM-Probability: 0.0023 - X-DSPAM-Signature: 5431710c178911166011737 - X-DSPAM-Factors: 27, - Received*Postfix+with, 0.40000, - Received*with+#+id, 0.40000, - like+#+#+#+ham, 0.40000, - some+#+tonight, 0.40000, - Received*certificate+requested, 0.40000, - Received*client+certificate, 0.40000, - Received*for+roudy, 0.40000, - Received*Sun+#+#+#+16, 0.40000, - Received*Sun+#+Oct, 0.40000, - Received*roudy+#+#+#+Oct, 0.40000, - eat+some, 0.40000, - Received*5+#+#+16, 0.40000, - Received*cloud.jhausse.net+#+#+#+id, 0.40000, - Roudy+#+#+#+to, 0.40000, - Received*Oct+#+16, 0.40000, - to+#+#+ham, 0.40000, - Received*No+#+#+requested, 0.40000, - Received*jhausse.net+#+#+Oct, 0.40000, - Received*256+256, 0.40000, - like+#+#+some, 0.40000, - Received*ESMTPS+id, 0.40000, - how'd+#+#+to, 0.40000, - tonight+Yours, 0.40000, - Received*with+cipher, 0.40000 - 5 LOGOUT - -Good! You now have adaptive spam filtering set up for the users of your server. Of course, each user will need to train the filter in the first few weeks. To train a message as spam, just move it to a folder called "Spam" or "Junk" using any of your devices (PC, tablet, phone). Otherwise it'll be trained as ham. - -### Make sure the emails you send get through spam filters ### - -Our goal in this section will be to make our mail server appear as clean as possible to the world and to make it harder for spammers to send emails in our name. As a side-effect, this will help us get our emails through the spam filters of other mail servers. - -#### Sender Policy Framework #### - -Sender Policy Framework (SPF) is a record that your add to your zone which declares which mail servers on the whole internet can send emails for your domain name. Setting it up is very easy, use the SPF wizard at [microsoft.com][31] to generate your SPF record, and then add it to your zone as a TXT record. It will look like this: - - jhausse.net. 300 IN TXT v=spf1 mx mx:cloud.jhausse.net -all - -#### Reverse PTR #### - -We discussed this point [earlier][32] in this article, it's a good idea that you set up the reverse DNS for your server correctly, so that doing a reverse lookup on the IP address of your server returns the actual name of your server. - -#### OpenDKIM #### - -When we activate [OpenDKIM][33], postfix will sign every outgoing email using a cryptographic key. We will then deposit that key in our zone, on the DNS. That way, every mail server in the world will be able to verify if the email actually came from us, or if it was forged by a spammer. Let's install opendkim: - - apt-get install opendkim opendkim-tools - -And set it up by editing **/etc/opendkim.conf** so that it looks like this: - - ## - ## opendkim.conf -- configuration file for OpenDKIM filter - ## - Canonicalization relaxed/relaxed - ExternalIgnoreList refile:/etc/opendkim/TrustedHosts - InternalHosts refile:/etc/opendkim/TrustedHosts - KeyTable refile:/etc/opendkim/KeyTable - LogWhy Yes - MinimumKeyBits 1024 - Mode sv - PidFile /var/run/opendkim/opendkim.pid - SigningTable refile:/etc/opendkim/SigningTable - Socket inet:8891@localhost - Syslog Yes - SyslogSuccess Yes - TemporaryDirectory /var/tmp - UMask 022 - UserID opendkim:opendkim - -We'll need a couple of additional files which we will store in **/etc/opendkim**: - - mkdir -pv /etc/opendkim/ - cd /etc/opendkim/ - -Let's create a new file **/etc/opendkim/TrustedHosts** with the following content - - 127.0.0.1 - -and a new file called **/etc/opendkim/KeyTable** with the following content - - cloudkey jhausse.net:mail:/etc/opendkim/mail.private - -This tells OpenDKIM that we want to use an encryption key named 'cloudkey' whose contents can be found in /etc/opendkim/mail.private. We will create another file named **/etc/opendkim/SigningTable** and add the following line: - - *@jhausse.net cloudkey - -which tells OpenDKIM that every emails of the jhausse.net domain should be signed using the key 'cloudkey'. If we have other domains which we want to sign, we can add them here too. - -The next step is to generate that key and fix permissions on OpenDKIM's config files. - - opendkim-genkey -r -s mail [-t] - chown -Rv opendkim:opendkim /etc/opendkim - chmod 0600 /etc/opendkim/* - chmod 0700 /etc/opendkim - -At first, it's a good idea to use the -t which will signal to other mail servers that you are just in testing mode, and that they shouldn't discard emails based on your OpenDKIM signature (yet). You can get your OpenDKIM key from the mail.txt file: - - cat mail.txt - -and then add it to your zone file as TXT record, which should look like this - - mail._domainkey.cloud1984.net. 300 IN TXT v=DKIM1; k=rsa; p=MIGfMA0GCSqG... - -Finally, we need to tell postfix to sign outgoing emails. At the end of /etc/postfix/main.cf, add: - - # Now for OpenDKIM: we'll sign all outgoing emails - smtpd_milters = inet:127.0.0.1:8891 - non_smtpd_milters = $smtpd_milters - milter_default_action = accept - -And reload the corresponding services - - service postfix reload - service opendkim restart - -Now let's test if our OpenDKIM public key can be found and matches the private key: - - opendkim-testkey -d jhausse.net -s mail -k mail.private -vvv - -which should return - - opendkim-testkey: key OK - -For this, you may need to wait a bit until the name server has reloaded the zone (on Linode, this happens every 15min). You can use **dig** to check if the zone was reloaded yet. - -If this works, let's test if other servers can validate our OpenDKIM signatures and SPF record. To do this, we can use [Brandon Checkett's email test][34]. To send an email to a test address given to us on [Brandon's webpage][34], we can run the following command on the server - - mail -s CloudCheck ihAdmTBmUH@www.brandonchecketts.com - -On Brandon's webpage, you should then see **result = pass** in the 'DKIM Signature' section, and **Result: pass** in the 'SPF Information' section. If our emails pass this test, just regenerate an OpenDKIM key without the -t switch, upload the new key to the zone file, and retest to still if it still passes the tests. If so, congrats! You just successfully set up OpenDKIM and SPF on your server! - -### Host calendars, contacts, files with Owncloud and set up a webmail with Roundcube ### - -Now that we have a top-notch email server, let's add to it the possibility to store your contacts, calendars, and files in the cloud. These are services that the [Owncloud][35] provides out of the box. While we're at it, we'll also set up a webmail, so you can check email even if you're travelling without electronics, or in case your phone and laptop run out of battery. - -Installing Owncloud is straighforward and is well described [here][36]. On Debian, it boils down to adding the owncloud repository to your apt sources, downloading owncloud's release key and adding it to your apt keyring, and then installing owncloud itself using apt-get: - - echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/Debian_7.0/ /' >> /etc/apt/sources.list.d/owncloud.list - wget http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_6.0/Release.key - apt-key add - < Release.key - apt-get update - apt-get install apache2 owncloud roundcube - -When prompted for it, choose **dbconfig** and then say you want **roundcube** to use **mysql**. Then, provide the mysql root password and set a good password for the roundcube mysql user. Then, edit the roundcube config file **/etc/roundcube/main.inc.php** so that logging in on roundcube will default to using your IMAP server: - - $rcmail_config['default_host'] = 'ssl://localhost'; - $rcmail_config['default_port'] = 993; - -Now we will set up the apache2 webserver with SSL so that we can talk to Owncloud and Roundcube using encryption for our passwords and data. Let's turn on Apache's ssl module: - - a2enmod ssl - -and edit **/etc/apache2/ports.conf** to set the following parameters: - -NameVirtualHost *:80 -Listen 80 -ServerName www.jhausse.net - - - # If you add NameVirtualHost *:443 here, you will also have to change - # the VirtualHost statement in /etc/apache2/sites-available/default-ssl - # to - # Server Name Indication for SSL named virtual hosts is currently not - # supported by MSIE on Windows XP. - NameVirtualHost *:443 - Listen 443 - - - - Listen 443 - - -We'll set up a default website for encrypted connections to the webserver as **https://www.jhausse.net** under **/var/www**. Edit **/etc/apache2/sites-available/default-ssl**: - - - ServerAdmin webmaster@localhost - - DocumentRoot /var/www - ServerName www.jhausse.net - [...] - - Deny from all - - [...] - SSLCertificateFile /etc/ssl/certs/cloud.crt - SSLCertificateKeyFile /etc/ssl/private/cloud.key - [...] - - -and let's also set up a website for unencrypted connections to **http://www.jhausse.net** under **/var/www**. Edit **/etc/apache2/sites-available/default**: - - - DocumentRoot /var/www - ServerName www.jhausse.net - [...] - - Deny from all - - - -That way, we can serve pages for www.jhausse.net by putting them in /var/www. The 'Deny from all' directive prevents access to Owncloud through www.jhausse.net: we will set it up to access it through **https://cloud.jhausse.net** instead. - -We will now set up the webmail (roundcube) so that it will be accessed through **https://webmail.jhausse.net**. Edit **/etc/apache2/sites-available/roundcube** to have the following content: - - - - ServerAdmin webmaster@localhost - - DocumentRoot /var/lib/roundcube - # The host name under which you'd like to access the webmail - ServerName webmail.jhausse.net - - Options FollowSymLinks - AllowOverride None - - - ErrorLog ${APACHE_LOG_DIR}/error.log - - # Possible values include: debug, info, notice, warn, error, crit, - # alert, emerg. - LogLevel warn - - CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined - - # SSL Engine Switch: - # Enable/Disable SSL for this virtual host. - SSLEngine on - - # do not allow unsecured connections - # SSLRequireSSL - SSLCipherSuite HIGH:MEDIUM - - # A self-signed (snakeoil) certificate can be created by installing - # the ssl-cert package. See - # /usr/share/doc/apache2.2-common/README.Debian.gz for more info. - # If both key and certificate are stored in the same file, only the - # SSLCertificateFile directive is needed. - SSLCertificateFile /etc/ssl/certs/cloud.crt - SSLCertificateKeyFile /etc/ssl/private/cloud.key - - # Those aliases do not work properly with several hosts on your apache server - # Uncomment them to use it or adapt them to your configuration - Alias /program/js/tiny_mce/ /usr/share/tinymce/www/ - - # Access to tinymce files - - Options Indexes MultiViews FollowSymLinks - AllowOverride None - Order allow,deny - allow from all - - - - Options +FollowSymLinks - # This is needed to parse /var/lib/roundcube/.htaccess. See its - # content before setting AllowOverride to None. - AllowOverride All - order allow,deny - allow from all - - - # Protecting basic directories: - - Options -FollowSymLinks - AllowOverride None - - - - Options -FollowSymLinks - AllowOverride None - Order allow,deny - Deny from all - - - - Options -FollowSymLinks - AllowOverride None - Order allow,deny - Deny from all - - - - SSLOptions +StdEnvVars - - - SSLOptions +StdEnvVars - - # SSL Protocol Adjustments: - # The safe and default but still SSL/TLS standard compliant shutdown - # approach is that mod_ssl sends the close notify alert but doesn't wait for - # the close notify alert from client. When you need a different shutdown - # approach you can use one of the following variables: - # o ssl-unclean-shutdown: - # This forces an unclean shutdown when the connection is closed, i.e. no - # SSL close notify alert is send or allowed to received. This violates - # the SSL/TLS standard but is needed for some brain-dead browsers. Use - # this when you receive I/O errors because of the standard approach where - # mod_ssl sends the close notify alert. - # o ssl-accurate-shutdown: - # This forces an accurate shutdown when the connection is closed, i.e. a - # SSL close notify alert is send and mod_ssl waits for the close notify - # alert of the client. This is 100% SSL/TLS standard compliant, but in - # practice often causes hanging connections with brain-dead browsers. Use - # this only for browsers where you know that their SSL implementation - # works correctly. - # Notice: Most problems of broken clients are also related to the HTTP - # keep-alive facility, so you usually additionally want to disable - # keep-alive for those clients, too. Use variable "nokeepalive" for this. - # Similarly, one has to force some clients to use HTTP/1.0 to workaround - # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and - # "force-response-1.0" for this. - BrowserMatch "MSIE [2-6]" \ - nokeepalive ssl-unclean-shutdown \ - downgrade-1.0 force-response-1.0 - # MSIE 7 and newer should be able to use keepalive - BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown - - - -and declare the server in your DNS, for instance: - - webmail.jhausse.net. 300 IN CNAME cloud.jhausse.net. - -Now let's enable these three websites - - a2ensite default default-ssl roundcube - service apache2 restart - -and the webmail, accessible under **https://webmail.jhausse.net**, should basically work. Log in using the full email (e.g. roudy@jhausse.net) and the password you set in mailserver DB at the beginning of this article. The first time you connect, the browser will warn you that the certificate was not signed by a certification authority. That's fine, just add an exception. - -Last but not least, we will create a virtual host for owncloud by putting the following content in **/etc/apache2/sites-available/owncloud**: - - - - ServerAdmin webmaster@localhost - - DocumentRoot /var/www/owncloud - ServerName cloud.jhausse.net - - Options FollowSymLinks - AllowOverride None - - - Options Indexes FollowSymLinks MultiViews - AllowOverride All - Order allow,deny - allow from all - - - ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ - - AllowOverride None - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - Order allow,deny - Allow from all - - - ErrorLog ${APACHE_LOG_DIR}/error.log - - # Possible values include: debug, info, notice, warn, error, crit, - # alert, emerg. - LogLevel warn - - CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined - - # SSL Engine Switch: - # Enable/Disable SSL for this virtual host. - SSLEngine on - - # do not allow unsecured connections - # SSLRequireSSL - SSLCipherSuite HIGH:MEDIUM - SSLCertificateFile /etc/ssl/certs/cloud.crt - SSLCertificateKeyFile /etc/ssl/private/cloud.key - - - SSLOptions +StdEnvVars - - - SSLOptions +StdEnvVars - - - BrowserMatch "MSIE [2-6]" \ - nokeepalive ssl-unclean-shutdown \ - downgrade-1.0 force-response-1.0 - # MSIE 7 and newer should be able to use keepalive - BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown - - - -and activate owncloud by running - - a2ensite owncloud - service apache2 reload - -Then go ahead an configure owncloud by connecting to **https://cloud.jhausse.net/** in a web browswer. - -That's it! Now you've got your own Google Drive, Calendar, Contacts, Dropbox, and Gmail! Enjoy your freshly recovered privacy! :-) - -### Sync your devices to the cloud ### - -To sync your emails, you can just use your favorite email client: the standard email program on Android or iOS, [k9mail][37], or Thunderbird on your PC. Or you can also use the webmail we set up. - -How to sync your calendar and contacts with the cloud is described in the doc of owncloud. On Android, I'm using the CalDAV-Sync and CardDAV-Sync apps which act as bridges between the Android calendar and contacts apps of the phone and the owncloud server. - -For files, there is an Android app called Owncloud to access your files from your phone and automatically upload pictures and videos you take to your cloud. Accessing your files on the your Mac/PC is easy and [well described in the Owncloud documentation][38]. - -### Last tips ### - -During the first few weeks, it's a good idea to monitor **/var/log/syslog** and **/var/log/mail.log** on a daily basis and make sure everything everything is running smoothly. It's important to do so before you invite others (friends, family, ...) to be hosted on your server; you might loose their trust in self-hosting for good if they trust you with their data and the server suddently becomes unavailable. - -To add another email user, just add a row to the **virtual_users** table of the **mailserver** DB. - -To add a domain, just add a row to the **virtual_domains** table. Then update **/etc/opendkim/SigningTable** to get outgoing emails signed, upload the OpenDKIM key to the zone, and reload OpenDKIM. - -Owncloud has its own user DB which can be managed by logging in in Owncloud as administrator. - -Finally, it's important to think in advance of a solution in case your server becomes temporarily unavailable. For instance, where would your mails go until your server returns? One solution would be to find a friend who can act as your backup MX, while you act as his backup MX (see the **relay_domains** and **relay_recipient_maps** setting in Postfix's **main.cf** file). Similarly, what if your server is compromised and a malicious individual erases all your files there? For that, it's important to think of a regular backup system. Linode offers backups as an option. On 1984.is, I set up a basic but sufficient automatic backup system using on crontabs and scp. - --------------------------------------------------------------------------------- - -via: https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/ - -作者:[Roudy Jhausse ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:aboutlinux@free.fr -[1]:https://history.google.com/history/ -[2]:http://research.google.com/workatgoogle.html -[3]:http://www.attac.org/ -[4]:http://www.nytimes.com/2012/02/19/magazine/shopping-habits.html?pagewanted=all -[5]:http://vimeo.com/ondemand/termsandconditions -[6]:http://www.techtimes.com/articles/21670/20141208/sony-pictures-hack-nightmare-week-celebs-data-leak-and-threatening-emails-to-employees.htm -[7]:http://blog.backupify.com/2012/07/25/what-is-my-gmail-account-really-worth/ -[8]:http://adage.com/article/digital/worth-facebook-google/293042/ -[9]:http://vimeo.com/ondemand/termsandconditions -[10]:https://prism-break.org/en/ -[11]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#VPS -[12]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#mail -[13]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#dspam -[14]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#SPF -[15]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#owncloud -[16]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#sync -[17]:http://linuxfr.org/news/heberger-son-courriel -[18]:http://sealedabstract.com/code/nsa-proof-your-e-mail-in-2-hours/ -[19]:http://www.1984.is/ -[20]:http://www.linode.com/ -[21]:http://www.greenpeace.org/international/Global/international/publications/climate/2012/iCoal/HowCleanisYourCloud.pdf -[22]:http://www.1984.is/about/ -[23]:http://www.fsf.org/ -[24]:https://www.gnupg.org/ -[25]:http://www.gandi.net/ -[26]:http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html -[27]:http://www.postfix.org/ -[28]:http://postgrey.schweikert.ch/ -[29]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#testPort25 -[30]:http://dspam.sourceforge.net/ -[31]:http://www.microsoft.com/mscorp/safety/content/technologies/senderid/wizard/ -[32]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#PTR -[33]:http://opendkim.org/opendkim-README -[34]:http://www.brandonchecketts.com/emailtest.php -[35]:http://owncloud.org/ -[36]:http://owncloud.org/install/ -[37]:https://code.google.com/p/k9mail/ -[38]:http://doc.owncloud.org/server/7.0/user_manual/files/files.html diff --git a/translated/tech/20150115 Get back your privacy and control.md b/translated/tech/20150115 Get back your privacy and control.md new file mode 100644 index 0000000000..9695c1f3de --- /dev/null +++ b/translated/tech/20150115 Get back your privacy and control.md @@ -0,0 +1,1111 @@ +在短短几个小时里拿回自己数据的隐私和控制权:为自己和朋友们搭建私有云 +================================================================================ +8年里40'000多次搜索!这是我的Google搜索历史。你的呢?(可以在[这里][1]自己找一下)有经过这么长时间积累下来的这么多数据点,Google已经能非常精确的推测你对什么感兴趣,曾经的想法,担忧过的事情,以及从你第一次获得Google帐号后这些年里所有这些的变化。 + +### 很多非常私人的信息不受自己控制地存储在世界范围内的服务器上 ### + +比如说你也像我一样从2006年到2013年都是Gmail用户,意味着你收到了30'000+的电子邮件以及在这7年里写了差不多5000封电子邮件。这些发送或收到的电子邮件里有很多是非常私人的,私人到你甚至不希望自己的家人或好友能系统地查看。也许你还写过一些草稿邮件,因为最后一分钟改变主意而从没发出去。但是尽管你从未发出去,这些邮件仍然保存在服务器上的某个地方。结论是,说Google服务器比你最亲密的朋友或家人都更了解你的个人生活一点也不过分。 + +从统计数据来看,可以很安全地赌你拥有一部智能手机。如果不使用联系人应用的话手机将基本没法用,而它默认会将你的联系人信息保存到Google服务器上的Google联系人里。所以,现在Google不仅知道了你的电子邮件,还有了你的离线联系人:你喜欢打给谁,谁来过电话,你发过短信给谁,以及发了些什么。你也不需要听我的片面之词,可以自己检查一下,看看你开放给类似Google Play服务的一些应用的权限,用来读取来电信息以及收到的短信。你是否还会用到手机里自带的日历应用?除非你在设置日程的时候明确地去掉,那么Google将精确地知道你将要做什么,一天里的每个时段,每一天,每一年。用iPhone代替Android手机也是一样的,只是Apple会代替Google来掌握你的往来邮件,联系人和日程计划。 + +你是否还会非常小心地同步自己的联系人信息,在你朋友,同事或家人换工作或换服务商的时候更新他们的电子邮件地址和手机号?这给Google提供了一副你社交网络的非常精确的,最新的图片。还有你非常喜欢手机的GPS功能,经常配合Google地图使用。这意味着Google不仅能从日程里知道你在干什么,还知道你在哪儿,住在哪儿,在哪儿工作。然后再关联用户之间的GPS位置信息,GOogle还能知道你现在可能正在和哪些人来往。 + +### 这种泄漏自己私人信息的日常爱好会以一种甚至没人能够预测的方式影响你的生活 ### + +总结一下,如果你是一个普通的因特网用户,Google拥有过去差不多10年里你最新的,深度的信息,关于你的兴趣,忧虑,热情,疑问。它还收集了一些你很私人的信息(电子邮件,短信),精确到小时的你的日常活动和位置,一副你社交网络的高品质图片。关于你的如此私密的数据,很可能已经超越了你最亲密的朋友,家人或爱人对你的了解。 + +不敢想象把这些深度的个人信息交给完全陌生的人,就好像把这些信息拷到一个U盘里,然后随便放到某个咖啡厅的桌上,留张纸条说“Olivier Martin的个人数据,请随便”。谁知道什么人会拿到它以及用来干嘛?然而,我们毫不犹豫地把自己的主要信息交给那些对我们的数据很感兴趣的IT公司的陌生人(这是他们制造面包的材料)以及[世界级的数据分析专家][2]手里,也许只是因为我们在点击那个绿色的'接受'按钮时根本没有想这么多。 + +有这么多的高质量信息,这么多年里,Google可能会比你希望自我了解的更了解你自己:尼玛,回想我过去的数字生活,我已经不记得5年前发出的邮件里的一半了。我很高兴能重新发现早在2005年对马克思主义的兴趣以及第二年加入了[ATTAC][3](一个致力于通过征收金融交易税来限制投机和改善社会公平的组织)。天知道为什么我竟然在2007年这么喜欢跳舞。这些都是无关紧要的信息(你不要指望我能爆出什么猛料,不会吧?;-)。但是,连接起这些高质量数据点,关于你生活的方方面面(做什么,什么时候,和谁一起,在哪里,...),并跨越这么长时间间隔,应该能推测出你的未来状态。比如说,根据一个17岁女孩的购物习惯,超市甚至可以在他父亲听说之前断定这个女孩怀孕了([真实故事][4])。谁知道通过像Google所掌握的这些远远超出购物习惯的高质量数据能做些什么?连接起这些点,也许有人能预测你未来几年里口味或政治观点的变化。如今,[你从未听过的公司声称拥有你500项数据点][5],包括宗教信仰,性取向和政治观点。提到政治,如果说你决定今后10年内进入政坛会怎么样?你的生活会改变,你的观点也一样,甚至你有时候会有所遗忘,但是Google不会。那你会不会担心你的对手会接触一些可以从Google访问你数据的人并会从你过去这些年里积累的个人数据深渊里挖出一些猛料呢?[就像最近Sony被黑][6]一样,多久以后会轮到Google或Facebook,以致让你的个人信息最终永远暴露? + +我们大多数人把自己的个人数据托付给这些公司的一个原因就是它们提供免费服务。但是真的免费吗?一般的Google帐号的价值根据评估方式不同会有些差别:你花在写邮件上的时间占到[1000美元/年][7],你的帐号对于广告产业的价值差不多在[220美元/年][8]到[500美元/年][9]之间。所以这些服务并不是真的免费:会通过广告和我们的数据在未来的一些未知使用来间接付费。 + +我写的最多的是Google,这是因为这是我托付个人数字信息的,以及目前我所知道做的最好的公司。但是我也提到过Apple或Facebook。这些公司通过它们在设计,工程和我们(曾经)喜欢每天使用的服务方面的神奇进步实实在在地改变了世界。但是这并不是说我们应该把所有我们最私人的个人数据堆积到它们的服务器上并把我们的数字生活托付给它们:潜在的危害实在太大了。 + +### 只要5小时,拿回自己以及关心的人的隐私权 ### + +并不是一定要这样做。你可以生活在21世纪,拿着智能手机,每天都用电子邮件和GPS,却仍然可以保留自己的隐私。你所需要的就是拿回自己个人数据的控制权:邮件、日程、联系人、文件,等等。[Prism-Break.org][10]网站上列出了一些能帮你掌握个人数据命运的软件。除此以外,控制自己个人数据的最安全和最有效的方式是架设自己的服务器并搭建自己的云。不过你也许只是没有时间或精力去研究具体该怎么做以及如何让它能流畅工作。 + +这也是这篇文章的意义所在。仅仅5个小时内,我们将配置出一台服务器来支撑你的邮件、联系人、日程表和各种文件,为你、你的朋友和你的家人。这个服务器将设计成一个个人数据中心或云,所以你能时刻保留它的完整控制。数据将自动在你的台式机/笔记本、手机和平板之间同步。从根本上来说,**我们将建立一个系统来代替Gmail、Google文件/Dropbox、Google联系人、Google日历和Picasa**。 + +为自己做这件事情已经是迈出很大一步了。但是,你个人信息的很大一部分将仍然泄漏出去并保存到硅谷的一些主机上,只是因为和你日常来往的太多人在用Gmail和使用智能手机。所以最好是带上你一些比较亲近的人加入这次探险。 + +我们将构建的系统能够 + +- **支持任意数目的域名和用户**。这样就能轻易地和你的家人朋友共享这台服务器,所以他们也能掌控自己的个人数据,并且还能和你一起分摊服务费用。和你一起共享服务器的人可以使用他们自己的域名或者共享你的。 +- **允许你从任意网络发送和接收电子邮件**,需要成功登录服务器之后。这样,你可以通过任意的邮件地址,任意设备(台式机、手机、平板),任意网络(家里、公司、公共网络、...)来发送电子邮件。 +- **在发送和接收邮件的时候加密网络数据**,这样,你不信任的人不能钓出你的密码,也不能看到你的私人邮件。 +- **提供最先进的反垃圾邮件技术**,结合了已知垃圾邮件黑名单,自动灰名单,和自适应垃圾邮件过滤。如果邮件被误判了只需要简单地把它拖入或拖出垃圾目录就可以重新配置垃圾邮件过滤器。而且,服务器还会为基于社区的反垃圾邮件努力做出贡献。 +- **一段时间里只需要几分钟的维护**,基本上只是安装安全更新和简单地检查一下服务器日志。添加一个新的邮件地址只需要在数据库中插入一条记录。除此之外,你可以忘记它的存在过自己的生活。我在14个月之前搭建了本文描述的这个系统,从那以后就一直顺利运行。所以我完全把它给忘了,直到我最近觉得随便按下手机上的‘检查邮件’会导致电子一路跑到冰岛(我放置服务器的地方)再回来的想法有点好笑才想起来。 + +要完成这篇文章里的工作,你需要一点基本的技术能力。如果你知道SMTP和IMAP的区别,什么是DNS,以及对TCP/IP有基本了解的话,就够了。你还将需要一点基本的Unix知识(在命令行下和文件一起工作,基本的系统管理)。然后你需要花总共5小时时间来搭建。 + +下面是我们将要做的事情的概述。 + +- [申请一个虚拟私人服务器,一个域名,并把它们配置好][11] +- [设置postfix和dovecot来收发电子邮件][12] +- [阻止垃圾邮件进入你的收件箱][13] +- [确保你发出的邮件能通过垃圾邮件过滤器][14] +- [使用Owncloud提供日历,联系人,文件服务并配置webmail][15] +- [在云上同步你的设备][16] + +### 这篇文章是受之前工作的启发并以之为基础 ### + +本文很大程度参考了两篇文章,由[Xavier Claude][17]和[Drew Crawford][18]写的关于架设私有邮件服务器的介绍。 + +本文覆盖了Xavier和Drew的文章里所描述的所有功能,除了3个地方Drew有而我没有:邮件推送支持(我喜欢由我主动检查邮件,而其他时候都不会被打扰),邮件全文检索(我一直都没用过),以及使用加密方式存储邮件(我的邮件和数据还没那么重要到要把它们加密后再存到本地服务器上)。如果你需要这些功能,只需要按照Drew的文章里相应部分的说明做就好了,和本文的内容兼容。 + +和Xavier和Drew的成果比起来,本文有下面几个主要改进: + +- 根据我自己按Drew文章操作的经验以及原文的大量回复,修改了一些问题和文字错误。我也把本文所介绍的内容仔细检查了几遍,从头开始设定了几次服务器做重复验证以确保能正常工作。 +- 低维护:和Xavier的方式比起来,本文增加了在服务器上支持多个邮件域名。这样做是为了尽可能地减少服务器维护工作:基本上,要添加一个域名或用户,只需要往mysql数据库表里增加一行就好了(不需要增加过滤脚本,等等)。 +- 我增加了webmail。 +- 我增加了设定云服务器的部分,不仅能收发邮件还能管理文件,地址本/联系人(邮件地址,电话号码,生日,等等等),日程表和图片,供所有设备访问使用。 + +### 申请一个虚拟私人服务器,一个域名,并把它们配置好 ### + +让我们从设置基础设施开始:我们的虚拟私人主机和我们的域名。 + +我用过[1984.is][19]和[Linode][20]提供的虚拟私人主机(VPS),体验非常好。在本文中,我们将使用**Debian Wheezy**,这个在1984和Linode都提供了已经做好的映像文件可以直接布置到你的VPS上。我喜欢1984是因为它的服务器在冰岛,也是唯一使用可再生能源(地热和水力发电)的地方,目前还没有影响过气候变化,不像[大多数美国数据中心目前大多数依赖于烧煤的火力发电站][21]。而且,他们注重[民权,透明,自由][22]以及[免费软件][23]。 + +最好是在服务器上创建一个文件用来保存后面要用到的各种密码(用户账号,邮件账号,云帐号,数据库帐号)。当然最好是加密一下(可以用[GnuPG][24]),这样就算用来设定服务器的电脑被偷了或被入侵了,你的服务器就不会那么容易被攻击。 + +关于注册域名,我已经使用[grandi][25]的服务超过10年了,也很满意。在本文中,我们将开辟一个叫**jhausse.net**的域名。然后在上面增加一个叫**cloud.jhausse.net**的二级域名,并绑定MX纪录。在完成之后,设置比较短的纪录生存时间(TTL)比如300秒,这样你在设置服务器的时候,可以修改你的域并很快测试到结果。 + +最后,设置PTR纪录(反向DNS),这样IP地址可以反向映射回它的域名。如果你不理解前面这句话,看下[这篇文章][26]来获得相关背景知识。如果你使用Linode的服务,你可以在远程访问这一栏的控制面板里设置PTR纪录。如果是1984,联系一下技术支持来帮你搞定。 + +在服务器上,我们从添加一个普通用户开始,这样我们不用从头到尾一直用root账号。另外,用root登陆也需要额外多一层安全措施。 + + adduser roudy + +然后,在文件**/etc/ssh/sshd_config**中设置 + + PermitRootLogin no + +然后重启ssh服务 + + service ssh reload + +然后,我们要修改服务器的主机名。编辑文件**/etc/hostname**,只有一行就是自己的主机名,我们这个例子中是 + + cloud + +然后,编辑ssh服务的公钥文件**/etc/ssh/ssh_host_rsa_key.pub, /etc/ssh/ssh_host_dsa_key.pub, /etc/ssh/ssh_host_ecdsa_key.pub**,这样文件末尾可以反映你的主机名,比如**root@cloud**。然后重启系统保证主机名在系统的每个需要它的角落都生效了。 + + reboot + +我们将更新系统并移除不必要的服务以降低远程攻击的风险。 + + apt-get update + apt-get dist-upgrade + service exim4 stop + apt-get remove exim4 rpcbind + apt-get autoremove + apt-get install vim + +我喜欢使用vim远程编辑配置文件。打开自动语法高亮会很有帮助。添加下面这一行到**~/.vimrc**文件中。 + + syn on + +### 设置postfix和dovecot来收发电子邮件 ### + + apt-get install postfix postfix-mysql dovecot-core dovecot-imapd dovecot-mysql mysql-server dovecot-lmtpd postgrey + +在[Postfix][27]的配置菜单里,选择**因特网站点**,把系统邮件名设为**jhausse.net**。 + +现在开始添加一个数据库用于保存主机上管理的域名列表,和每个域名下的用户列表(同时也包括他们各自的密码),以及邮件别名列表(用于从一个地址往另一个地址转发邮件)。 + + mysqladmin -p create mailserver + mysql -p mailserver + mysql> GRANT SELECT ON mailserver.* TO 'mailuser'@'localhost' IDENTIFIED BY 'mailuserpass'; + mysql> FLUSH PRIVILEGES; + mysql> CREATE TABLE `virtual_domains` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(50) NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + mysql> CREATE TABLE `virtual_users` ( + `id` int(11) NOT NULL auto_increment, + `domain_id` int(11) NOT NULL, + `password` varchar(106) NOT NULL, + `email` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `email` (`email`), + FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + mysql> CREATE TABLE `virtual_aliases` ( + `id` int(11) NOT NULL auto_increment, + `domain_id` int(11) NOT NULL, + `source` varchar(100) NOT NULL, + `destination` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +我们将承载**jhausse.net**域名。如果还需要加入其他域名,也没问题。我们也会为每个域名设置一个邮件管理地址,转寄给**roudy@jhausse.net**。 + + mysql> INSERT INTO virtual_domains (`name`) VALUES ('jhausse.net'); + mysql> INSERT INTO virtual_domains (`name`) VALUES ('otherdomain.net'); + mysql> INSERT INTO virtual_aliases (`domain_id`, `source`, `destination`) VALUES ('1', 'postmaster', 'roudy@jhausse.net'); + mysql> INSERT INTO virtual_aliases (`domain_id`, `source`, `destination`) VALUES ('2', 'postmaster', 'roudy@jhausse.net'); + +现在已经添加了一个本地邮件账号**roudy@jhausse.net**。首先,为它生成一个哈希密码: + + doveadm pw -s SHA512-CRYPT + +然后把哈希值加入到数据库中 + + mysql> INSERT INTO `mailserver`.`virtual_users` (`domain_id`, `password`, `email`) VALUES ('1', '$6$YOURPASSWORDHASH', 'roudy@jhausse.net'); + +现在我们的域名,别名和用户列表都设置好了,然后开始设置postfix(SMTP服务器,用来发送邮件)。把文件**/etc/postfix/main.cf**替换为下面的内容: + + myhostname = cloud.jhausse.net + myorigin = /etc/mailname + mydestination = localhost.localdomain, localhost + mynetworks_style = host + + # We disable relaying in the general case + smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination + # Requirements on servers that contact us: we verify the client is not a + # known spammer (reject_rbl_client) and use a graylist mechanism + # (postgrey) to help reducing spam (check_policy_service) + smtpd_client_restrictions = permit_mynetworks, reject_rbl_client zen.spamhaus.org, check_policy_service inet:127.0.0.1:10023 + disable_vrfy_command = yes + inet_interfaces = all + smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) + biff = no + append_dot_mydomain = no + readme_directory = no + + # TLS parameters + smtpd_tls_cert_file=/etc/ssl/certs/cloud.crt + smtpd_tls_key_file=/etc/ssl/private/cloud.key + smtpd_use_tls=yes + smtpd_tls_auth_only = yes + smtp_tls_security_level=may + smtp_tls_loglevel = 1 + smtpd_tls_loglevel = 1 + smtpd_tls_received_header = yes + smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache + smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache + + # Delivery + alias_maps = hash:/etc/aliases + alias_database = hash:/etc/aliases + message_size_limit = 50000000 + recipient_delimiter = + + + # The next lines are useful to set up a backup MX for myfriendsdomain.org + # relay_domains = myfriendsdomain.org + # relay_recipient_maps = + + # Virtual domains + virtual_transport = lmtp:unix:private/dovecot-lmtp + virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf + virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf + virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf + local_recipient_maps = $virtual_mailbox_maps + +现在我们要让postfix知道如何从我们设定的数据库里找出需要接收邮件的域名。建立一个新文件**/etc/postfix/mysql-virtual-mailbox-domains.cf**并添加以下内容: + + user = mailuser + password = mailuserpass + hosts = 127.0.0.1 + dbname = mailserver + query = SELECT 1 FROM virtual_domains WHERE name='%s' + +我们可以让postfix判断给定的电子邮件账号是否存在,创建文件**/etc/postfix/mysql-virtual-mailbox-maps.cf**并写入以下内容: + + user = mailuser + password = mailuserpass + hosts = 127.0.0.1 + dbname = mailserver + query = SELECT 1 FROM virtual_users WHERE email='%s' + +最后,postfix会根据文件**/etc/postfix/mysql-virtual-alias-maps.cf**的内容来查找邮件别名 + + user = mailuser + password = mailuserpass + hosts = 127.0.0.1 + dbname = mailserver + query = SELECT virtual_aliases.destination as destination FROM virtual_aliases, virtual_domains WHERE virtual_aliases.source='%u' AND virtual_aliases.domain_id = virtual_domains.id AND virtual_domains.name='%d' + +在配置好这些后,现在要测试一下postfix是否能正常查询数据库。我们可以用**postmap**命令测试: + + postmap -q jhausse.net mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf + postmap -q roudy@jhausse.net mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf + postmap -q postmaster@jhausse.net mysql:/etc/postfix/mysql-virtual-alias-maps.cf + postmap -q bob@jhausse.net mysql:/etc/postfix/mysql-virtual-alias-maps.cf + +如果一切都正常配置了的话,头两个查询应该输出1,第3个查询应该输出**roudy@jhausse.net**,而最后一个应该什么都不输出。 + +现在,让我们设置一下dovecot(一个IMAP服务程序,用来在我们的设备上从服务器获取收件箱里的邮件)。编辑文件**/etc/dovecot/dovecot.conf**设置以下参数: + + # Enable installed protocol + # !include_try /usr/share/dovecot/protocols.d/*.protocol + protocols = imap lmtp + +这样将只打开imap(让我们可以获取邮件)和lmtp(postfix用来将收件箱里的邮件转给dovecot)。编辑**/etc/dovecot/conf.d/10-mail.conf**并设置以下参数: + + mail_location = maildir:/var/mail/%d/%n + [...] + mail_privileged_group = mail + [...] + first_valid_uid = 0 + +这样邮件将被保存到目录/var/mail/domainname/username下。注意下这几个选项散布在配置文件的不同位置,有时已经在那里写好了:我们只需要取消注释。文件里的其他设定选项,可以维持原样。在本文后面还有很多文件需要用同样的方式更新设置。在文件**/etc/dovecot/conf.d/10-auth.conf**里,设置以下参数: + + disable_plaintext_auth = yes + auth_mechanisms = plain + #!include auth-system.conf.ext + !include auth-sql.conf.ext + +在文件**/etc/dovecot/conf.d/auth-sql.conf.ext**里,设置以下参数: + + passdb { + driver = sql + args = /etc/dovecot/dovecot-sql.conf.ext + } + userdb { + driver = static + args = uid=mail gid=mail home=/var/mail/%d/%n + } + +这是告诉dovecot用户的邮件保存在目录/var/mail/domainname/username下,以及如何从我们刚建立的数据库里查找密码。现在我们还需要告诉dovecot具体如何使用数据库。这样需要把下面的内容加入**/etc/dovecot/dovecot-sql.conf.ext**文件: + + driver = mysql + connect = host=localhost dbname=mailserver user=mailuser password=mailuserpass + default_pass_scheme = SHA512-CRYPT + password_query = SELECT email as user, password FROM virtual_users WHERE email='%u'; + +我们现在修改一下配置文件的权限 + + chown -R mail:dovecot /etc/dovecot + chmod -R o-rwx /etc/dovecot + +基本差不多了!只是还需要再多编辑几个文件。在文件**/etc/dovecot/conf.d/10-master.conf**里,设置以下参数: + + service imap-login { + inet_listener imap { + #port = 143 + port = 0 + } + inet_listener imaps { + port = 993 + ssl = yes + } + } + + service pop3-login { + inet_listener pop3 { + #port = 110 + port = 0 + } + inet_listener pop3s { + #port = 995 + #ssl = yes + port = 0 + } + } + + service lmtp { + unix_listener /var/spool/postfix/private/dovecot-lmtp { + mode = 0666 + group = postfix + user = postfix + } + user = mail + } + + service auth { + unix_listener auth-userdb { + mode = 0600 + user = mail + #group = + } + + # Postfix smtp-auth + unix_listener /var/spool/postfix/private/auth { + mode = 0666 + user = postfix + group = postfix + } + + # Auth process is run as this user. + #user = $default_internal_user + user = dovecot + } + + service auth-worker { + user = mail + } + +注意下我们把除了imaps之外所有服务的端口都设置成了0,这样可以有效地禁止这些服务。然后,在文件**/etc/dovecot/conf.d/15-lda.conf**里,指定一个邮箱管理地址: + + postmaster_address = postmaster@jhausse.net + +最后但很重要的一点,我们为服务器需要生成一对公钥和私钥,可以同时用于dovecot和postfix: + + openssl req -new -newkey rsa:4096 -x509 -days 365 -nodes -out "/etc/ssl/certs/cloud.crt" -keyout "/etc/ssl/private/cloud.key" + +请确保你指定了服务器的完全限定域名(FQDN),在本文的例子里: + + Common Name (e.g. server FQDN or YOUR name) []:cloud.jhausse.net + +如果没有的话,我们的客户端会抱怨在SSL证书里的服务器名字和所连接的服务器名字不一致。我们将通过修改配置文件**/etc/dovecot/conf.d/10-ssl.conf**里的如下选项来告诉dovecot使用刚生成的密钥: + + ssl = required + ssl_cert = : Relay access denied + +这个没问题:如果服务器能接受这封邮件,那意味着我们架设的postfix是一个对全世界所有垃圾邮件都开放的中继,将完全没法使用。除了'Relay access denied'消息,你也可能会收到这样的响应: + + 554 5.7.1 Service unavailable; Client host [87.68.61.119] blocked using zen.spamhaus.org; http://www.spamhaus.org/query/bl?ip=87.68.61.119 + +意思是你正尝试从一个被标记成垃圾邮件发送者的IP地址连接服务器。我在通过普通的因特网服务提供商(ISP)连接服务器时曾收到过这样的消息。要解决这个问题,可以试着从另一个主机发起连接,比如另外一个你可以SSH登录的主机。另外一种方式是,你可以修改postfix的**main.cf**配置文件,不要使用Spamhous的RBL,重启postfix服务,然后再检查上面的测试是否正常。不管用哪种方式,最重要的是你要确定一个能工作的,因为我们后面马上要测试其他功能。如果你选择了重新配置postfix不使用RBL,别忘了在完成本文后重新开启RBL并重启postfix,以避免收到一些不必要的垃圾邮件。 + +现在,我们试一下往SMTP端口25发送一封有效的邮件,这是一般正常的邮件服务器用来彼此对话的方式: + + openssl s_client -connect cloud.jhausse.net:25 -starttls smtp + EHLO cloud.jhausse.net + MAIL FROM:youremail@domain.com + rcpt to:roudy@jhausse.net + +服务器应该有这样的响应 + + Client host rejected: Greylisted, see http://postgrey.schweikert.ch/help/jhausse.net.html + +这意味着[postgrey][28]工作正常。postgrey做的是用临时错误拒绝未知发送者的邮件。邮件的技术规则是要求邮件服务器尝试重新发送邮件。在5分钟后,postgrey就会接收这封邮件。一般世界范围内遵守规则的邮件服务器都会尝试为我们重复投递邮件,但大多数垃圾邮件发送者不会这样做。所以,等上5分钟,再次通过上面的命令发送一次,然后检查postfix应该正常接收了邮件。 + +之后,我们检查一下我们可以通过IMAP和dovecot对话获取刚才发送的两封邮件。 + + openssl s_client -crlf -connect cloud.jhausse.net:993 + 1 login roudy@jhausse.net "mypassword" + 2 LIST "" "*" + 3 SELECT INBOX + 4 UID fetch 1:1 (UID RFC822.SIZE FLAGS BODY.PEEK[]) + 5 LOGOUT + +这里,你应该把mypassword替换为你自己为这个邮件账号设定的密码。如果能正常工作,基本上我们已经拥有一个能接收邮件的邮件服务器了,通过它我们可以在各种设备(PC/笔记本,平板,手机,...)上收取邮件了。但是我们不能把邮件给它发送出去,除非我们自己从服务器发送。现在我们将让postfix为我们转发邮件,但是这个只有成功登录才可以,这是为了保证邮件是由服务器上的某个有效帐号发出来的。要做到这个,我们要打开一个特殊的,全程SSL连接的,SASL鉴权的邮件提交服务。在文件**/etc/postfix/master.cf**里设置下面的参数: + + submission inet n - - - - smtpd + -o syslog_name=postfix/submission + -o smtpd_tls_security_level=encrypt + -o smtpd_sasl_auth_enable=yes + -o smtpd_client_restrictions=permit_sasl_authenticated,reject + -o smtpd_sasl_type=dovecot + -o smtpd_sasl_path=private/auth + -o smtpd_sasl_security_options=noanonymous + -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject_non_fqdn_recipient,reject_unauth_destination + +然后重启postfix服务 + + service postfix reload + +现在,让我们试试从一台不同的机器连接这个服务,确定一下postfix现在能够正常中继我们自己的而不是其他任何人的邮件: + + openssl s_client -connect cloud.jhausse.net:587 -starttls smtp + EHLO cloud.jhausse.net + +注意一下服务器建议的'250-AUTH PLAIN'功能,在从端口25连接的时候不会生效。 + + MAIL FROM:asdf@jkl.net + rcpt to:bob@gmail.com + 554 5.7.1 : Relay access denied + QUIT + +这个没问题,postfix在不认识我们的时候是不会中继邮件的。所以,首先让我们先鉴定一下自己的身份。要这样做,我们首先需要生成一个鉴权字符串: + + echo -ne '\000roudy@jhausse.net\000mypassword'|base64 + +然后让我们尝试再次通过服务器发送邮件: + + openssl s_client -connect cloud.jhausse.net:587 -starttls smtp + EHLO cloud.jhausse.net + AUTH PLAIN DGplYW5AMTk4NGNsb3VQLm5ldAA4bmFmNGNvNG5jOA== + MAIL FROM:asdf@jkl.net + rcpt to:bob@gmail.com + +现在postfix应该能正常接收。最后完成这个测试,来检查一下我们的虚拟别名能正常工作,给postmaster@jhausse.net发送一封邮件然后确认一下它会被送到roudy@jhausse.net: + + telnet cloud.jhausse.net 25 + EHLO cloud.jhausse.net + MAIL FROM:youremail@domain.com + rcpt to:postmaster@jhausse.net + data + Subject: Virtual alias test + + Dear postmaster, + Long time no hear! I hope your MX is working smoothly and securely. + Yours sincerely, Roudy + . + QUIT + +让我们检查一下邮件是否被正常送到正确的收件箱了: + + openssl s_client -crlf -connect cloud.jhausse.net:993 + 1 login roudy@jhausse.net "mypassword" + 2 LIST "" "*" + 3 SELECT INBOX + * 2 EXISTS + * 2 RECENT + 4 LOGOUT + +到这里,我们已经拥有一个能正常工作的邮箱服务器了,能收发邮件。我们可以配置自己的设备来使用它。 + +PS:不要忘记再次[试试通过端口25往自己架设的服务器上的帐号发送邮件][29],来验证你已经没有被postgrey阻挡了。 + +### 阻止垃圾邮件进入你的收件箱 ### + +为了过滤垃圾邮件,我们已经使用了实时黑名单(RBLs)和灰名单(postgrey)。现在我们将增加自适应垃圾邮件过滤来让我们的垃圾邮件过滤能力提高一个等级。这意味着我们将为我们的邮件服务器增加人工智能,这样它就能从经验中学习哪些有件是垃圾哪些不是。我们将使用[dspam][30]来实现这个功能。 + + apt-get install dspam dovecot-antispam postfix-pcre dovecot-sieve + +dovecot-antispam是一个安装包,可以在我们发现有邮件被dspan误分类了之后让dovecot重新更新垃圾邮件过滤器。基本上,我们所需要做的就只是把邮件放进或拿出垃圾箱。dovecot-antispam将负责调用dspam来更新过滤器。至于postfix-pcre和dovecot-sieve,我们将分别用它们来把接收的邮件递给垃圾邮件过滤器以及自动把垃圾邮件放入用户的垃圾箱。 + +在配置文件**/etc/dspam/dspam.conf**里,为以下参数设置相应的值: + + TrustedDeliveryAgent "/usr/sbin/sendmail" + UntrustedDeliveryAgent "/usr/lib/dovecot/deliver -d %u" + Tokenizer osb + IgnoreHeader X-Spam-Status + IgnoreHeader X-Spam-Scanned + IgnoreHeader X-Virus-Scanner-Result + IgnoreHeader X-Virus-Scanned + IgnoreHeader X-DKIM + IgnoreHeader DKIM-Signature + IgnoreHeader DomainKey-Signature + IgnoreHeader X-Google-Dkim-Signature + ParseToHeaders on + ChangeModeOnParse off + ChangeUserOnParse full + ServerPID /var/run/dspam/dspam.pid + ServerDomainSocketPath "/var/run/dspam/dspam.sock" + ClientHost /var/run/dspam/dspam.sock + +然后,在配置文件**/etc/dspam/default.prefs**里,把以下参数改为: + + spamAction=deliver # { quarantine | tag | deliver } -> default:quarantine + signatureLocation=headers # { message | headers } -> default:message + showFactors=on + +现在我们需要把dspam连接到postfix和dovecot上,在配置文件**/etc/postfix/master.cf**最后添加这样两行: + + dspam unix - n n - 10 pipe + flags=Ru user=dspam argv=/usr/bin/dspam --deliver=innocent,spam --user $recipient -i -f $sender -- $recipient + dovecot unix - n n - - pipe + flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient} + +现在我们将告诉postfix通过dspam来过滤所有提交给服务器端口25(一般的SMTP通信)的新邮件,除非该邮件是从服务器本身发出(permit_mynetworks)。注意下我们通过SASL鉴权提交给postfix的邮件不会通过dspam过滤,因为我们在前面部分里为这种方式设定了独立的提交服务。编辑文件**/etc/postfix/main.cf**将选项**smtpd_client_restrictions**改为如下内容: + + smtpd_client_restrictions = permit_mynetworks, reject_rbl_client zen.spamhaus.org, check_policy_service inet:127.0.0.1:10023, check_client_access pcre:/etc/postfix/dspam_filter_access + +在文件末尾,还需要增加: + + # For DSPAM, only scan one mail at a time + dspam_destination_recipient_limit = 1 + +现在我们需要指定我们定义的过滤器。基本上,我们将告诉postfix把所有邮件(/./)通过unix套接字发给dspam。创建一个新文件**/etc/postfix/dspam_filter_access**并把下面一行写进去: + + /./ FILTER dspam:unix:/run/dspam/dspam.sock + +这是postfix部分的配置。现在让我们为dovecot设置垃圾过滤。在文件**/etc/dovecot/conf.d/20-imap.conf**里,修改**imap mail_plugin**插件参数为下面的方式: + + mail_plugins = $mail_plugins antispam + +并为lmtp增加一个部分: + + protocol lmtp { + # Space separated list of plugins to load (default is global mail_plugins). + mail_plugins = $mail_plugins sieve + } + +我们现在设置dovecot-antispam插件。编辑文件**/etc/dovecot/conf.d/90-plugin.conf**并把以下内容添加到插件部分: + + plugin { + ... + # Antispam (DSPAM) + antispam_backend = dspam + antispam_allow_append_to_spam = YES + antispam_spam = Junk;Spam + antispam_trash = Trash;trash + antispam_signature = X-DSPAM-Signature + antispam_signature_missing = error + antispam_dspam_binary = /usr/bin/dspam + antispam_dspam_args = --user;%u;--deliver=;--source=error + antispam_dspam_spam = --class=spam + antispam_dspam_notspam = --class=innocent + antispam_dspam_result_header = X-DSPAM-Result + } + +然后在文件**/etc/dovecot/conf.d/90-sieve.conf**里指定默认的sieve脚本,这个将对服务器上所有用户有效: + + sieve_default = /etc/dovecot/default.sieve + +什么是sieve以及为什么我们需要为所有用户设置一个默认脚本?sieve可以在IMAP服务器上为我们自动处理任务。在我们的例子里,我们想让所有被确定为垃圾的邮件会被移到垃圾箱而不是收件箱里。我们希望这是服务器上所有用户的默认行为;这是为什么我们把这个脚本设为默认脚本。现在让我们来创建这个脚本,建立一个新文件**/etc/dovecot/default.sieve**并写入以下内容: + + require ["regex", "fileinto", "imap4flags"]; + # Catch mail tagged as Spam, except Spam retrained and delivered to the mailbox + if allof (header :regex "X-DSPAM-Result" "^(Spam|Virus|Bl[ao]cklisted)$", + not header :contains "X-DSPAM-Reclassified" "Innocent") { + # Mark as read + # setflag "\\Seen"; + # Move into the Junk folder + fileinto "Junk"; + # Stop processing here + stop; + } + +现在我们需要编译这个脚本好让dovecot能运行它。我们也需要给它合适的权限。 + + cd /etc/dovecot + sievec . + chown mail.dovecot default.siev* + chmod 0640 default.sieve + chmod 0750 default.svbin + +最后,我们需要修改dspam要读取的两个postfix配置文件的权限: + + chmod 0644 /etc/postfix/dynamicmaps.cf /etc/postfix/main.cf + +就这些!让我们重启dovecot和postfix服务 + + service dovecot restart + service postfix restart + +然后通过从远程主机(比如我们用来设定服务器的电脑)连接服务器来测试一下反垃圾邮件: + + openssl s_client -connect cloud.jhausse.net:25 -starttls smtp + EHLO cloud.jhausse.net + MAIL FROM:youremail@domain.com + rcpt to:roudy@jhausse.net + DATA + Subject: DSPAM test + + Hi Roudy, how'd you like to eat some ham tonight? Yours, J + . + QUIT + +让我们检查一下邮件是否已经送到: + + openssl s_client -crlf -connect cloud.jhausse.net:993 + 1 login roudy@jhausse.net "mypassword" + 2 LIST "" "*" + 3 SELECT INBOX + 4 UID fetch 3:3 (UID RFC822.SIZE FLAGS BODY.PEEK[]) + +这个应该返回SPAM为邮件增加了一组标记的数据,看上去像这样: + + X-DSPAM-Result: Innocent + X-DSPAM-Processed: Sun Oct 5 16:25:48 2014 + X-DSPAM-Confidence: 1.0000 + X-DSPAM-Probability: 0.0023 + X-DSPAM-Signature: 5431710c178911166011737 + X-DSPAM-Factors: 27, + Received*Postfix+with, 0.40000, + Received*with+#+id, 0.40000, + like+#+#+#+ham, 0.40000, + some+#+tonight, 0.40000, + Received*certificate+requested, 0.40000, + Received*client+certificate, 0.40000, + Received*for+roudy, 0.40000, + Received*Sun+#+#+#+16, 0.40000, + Received*Sun+#+Oct, 0.40000, + Received*roudy+#+#+#+Oct, 0.40000, + eat+some, 0.40000, + Received*5+#+#+16, 0.40000, + Received*cloud.jhausse.net+#+#+#+id, 0.40000, + Roudy+#+#+#+to, 0.40000, + Received*Oct+#+16, 0.40000, + to+#+#+ham, 0.40000, + Received*No+#+#+requested, 0.40000, + Received*jhausse.net+#+#+Oct, 0.40000, + Received*256+256, 0.40000, + like+#+#+some, 0.40000, + Received*ESMTPS+id, 0.40000, + how'd+#+#+to, 0.40000, + tonight+Yours, 0.40000, + Received*with+cipher, 0.40000 + 5 LOGOUT + +很好!你现在已经为你服务器上的用户配置好自适应垃圾邮件过滤。当然,每个用户将需要在开始的几周里培训过滤器。要标记一则信息为垃圾,只需要在你的任意设备(电脑,平板,手机)上将它移动到叫“垃圾箱”或“废纸篓”的目录里。否则它将被标记为有用。 + +### 确保你发出的邮件能通过垃圾邮件过滤器 ### + +这个部分我们的目标是让我们的邮件服务器能尽量干净地出现在世界上,并让垃圾邮件发送者们更难以我们的名义发邮件。作为附加效果,这也有助于让我们的邮件能通过其他邮件服务器的垃圾邮件过滤器。 + +#### 发送者策略框架 #### + +发送者策略框架(SPF)是你添加到自己服务器区域里的一份记录,声明了整个因特网上哪些邮件服务器能以你的域名发邮件。设置非常简单,使用[microsoft.com][31]上的SPF向导来生成你的SPF记录,然后作为一个TXT记录添加到自己的服务器区域里。看上去像这样: + + jhausse.net. 300 IN TXT v=spf1 mx mx:cloud.jhausse.net -all + +#### 反向PTR #### + +我们[之前][32]在本文里讨论过这个问题,建议你为自己的服务器正确地设置反向DNS,这样对服务器IP地址的反向查询能返回你服务器的实际名字。 + +#### OpenDKIM #### + +当我们激活[OpenDKIM][33]后,postfix会用密钥为每封发出去的邮件签名。然后我们将把这个密钥存储在DNS域中。这样的话,世界上任意一个邮件服务器都能够检验邮件是否真的是我们发出的,或是由垃圾邮件发送者伪造的。让我们先安装opendkim: + + apt-get install opendkim opendkim-tools + +然后按如下方式编辑**/etc/opendkim.conf**文件的配置: + + ## + ## opendkim.conf -- configuration file for OpenDKIM filter + ## + Canonicalization relaxed/relaxed + ExternalIgnoreList refile:/etc/opendkim/TrustedHosts + InternalHosts refile:/etc/opendkim/TrustedHosts + KeyTable refile:/etc/opendkim/KeyTable + LogWhy Yes + MinimumKeyBits 1024 + Mode sv + PidFile /var/run/opendkim/opendkim.pid + SigningTable refile:/etc/opendkim/SigningTable + Socket inet:8891@localhost + Syslog Yes + SyslogSuccess Yes + TemporaryDirectory /var/tmp + UMask 022 + UserID opendkim:opendkim + +我们还需要几个额外的文件,将保存在目录**/etc/opendkim**里: + + mkdir -pv /etc/opendkim/ + cd /etc/opendkim/ + +让我们建立新文件**/etc/opendkim/TrustedHosts**并写入以下内容 + + 127.0.0.1 + +建立新文件**/etc/opendkim/KeyTable**并写入以下内容 + + cloudkey jhausse.net:mail:/etc/opendkim/mail.private + +这会告诉OpenDKIM我们希望使用一个名叫'cloudkey'的加密密钥,它的内容在文件/etc/opendkim/mail.private里。我们建立另一个名叫**/etc/opendkim/SigningTable**的文件然后写入下面这一行: + + *@jhausse.net cloudkey + +这会告诉OpenDKIM每封从jhausse.net域发出的邮件都应该用'cloudkey'密钥签名。如果我们还有其他域希望也能签名,我们也可以在这里添加。 + +下一步是生成密钥并修改OpenDKIM配置文件的权限。 + + opendkim-genkey -r -s mail [-t] + chown -Rv opendkim:opendkim /etc/opendkim + chmod 0600 /etc/opendkim/* + chmod 0700 /etc/opendkim + +一开始,最好使用-t开关,这样会通知其他邮件服务器你只是在测试模式下,这样他们就不会丢弃基于你的OpenDKIM签名的邮件(目前来说)。你可以从mail.txt文件里看到OpenDKIM密钥: + + cat mail.txt + +然后把它作为一个TXT记录添加到区域文件里,应该是这样的 + + mail._domainkey.cloud1984.net. 300 IN TXT v=DKIM1; k=rsa; p=MIGfMA0GCSqG... + +最后,我们需要告诉postfix来为发出的邮件签名。在文件/etc/postfix/main.cf末尾,添加: + + # Now for OpenDKIM: we'll sign all outgoing emails + smtpd_milters = inet:127.0.0.1:8891 + non_smtpd_milters = $smtpd_milters + milter_default_action = accept + +然后重启相关服务 + + service postfix reload + service opendkim restart + +现在让我们测试一下能找到我们的OpenDKIM公钥并和私钥匹配: + + opendkim-testkey -d jhausse.net -s mail -k mail.private -vvv + +这个应该返回 + + opendkim-testkey: key OK + +这个你可能需要等一会直到域名服务器重新加载该区域(对于Linode,每15分钟会更新一次)。你可以用**dig**来检查区域是否已经重新加载。 + +如果这个没问题,让我们测试一下其他服务器能验证我们的OpenDKIM签名和SPF记录。要做这个,我们可以用[Brandon Checkett的邮件测试][34]。发送一封邮件到[Brandon的网页][34]上提供的测试地址,我们可以在服务器上运行下面的命令 + + mail -s CloudCheck ihAdmTBmUH@www.brandonchecketts.com + +在Brandon的网页上,我们应该可以在'DKIM Signature'部分里看到**result = pass**的文字,以及在'SPF Information'部分看到**Result: pass**的文字。如果我们的邮件通过这个测试,只要不加-t开关重新生成OpenDKIM密钥,上传新的密钥到区域文件里,然后重新测试检查是否仍然可以通过这些测试。如果可以的话,恭喜!你已经在你的服务器上成功配置好OpenDKIM和SPF了! + +### 使用Owncloud提供日历,联系人,文件服务并通过Roundcube配置网页邮件 ### + +既然我们已经拥有了一流的邮件服务器,让我们再为它增加在云上保存通讯录,日程表和文件的能力。这些是[Owncloud][35]所提供的非常赞的服务。在这个弄好后,我们还会设置一个网页邮件,这样就算你没带任何电子设备出去旅行时,或者说在你的手机或笔记本没电的情况下,也可以检查邮件。 + +安装Owncloud非常直观,而且在[这里][36]有非常好的介绍。在Debian系统里,归根结底就是把owncloud的仓库添加到apt源里,下载Owncloud的发行密钥并安装到apt钥匙链中,然后通过apt-get安装Owncloud: + + echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/Debian_7.0/ /' >> /etc/apt/sources.list.d/owncloud.list + wget http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_6.0/Release.key + apt-key add - < Release.key + apt-get update + apt-get install apache2 owncloud roundcube + +在有提示的时候,选择**dbconfig**然后说你希望**roundcube**使用**mysql**。然后,提供一下mysql的root密码并为roundcube的mysql用户设置一个漂亮的密码。然后,按如下方式编辑roundcube的配置文件**/etc/roundcube/main.inc.php**,这样登录roundcube默认会使用你的IMAP服务器: + + $rcmail_config['default_host'] = 'ssl://localhost'; + $rcmail_config['default_port'] = 993; + +现在我们来配置一下apache2网页服务器增加SSL支持,这样我们可以和Owncloud和Roundcube对话时使用加密的方式传输我们的密码和数据。让我们打开Apache的ssl模块: + + a2enmod ssl + +然后编辑文件**/etc/apache2/ports.conf**并设定以下参数: + +NameVirtualHost *:80 +Listen 80 +ServerName www.jhausse.net + + + # If you add NameVirtualHost *:443 here, you will also have to change + # the VirtualHost statement in /etc/apache2/sites-available/default-ssl + # to + # Server Name Indication for SSL named virtual hosts is currently not + # supported by MSIE on Windows XP. + NameVirtualHost *:443 + Listen 443 + + + + Listen 443 + + +我们将在目录**/var/www**下为服务器加密连接**https://www.jhausse.net**设定一个默认网站。编辑文件**/etc/apache2/sites-available/default-ssl**: + + + ServerAdmin webmaster@localhost + + DocumentRoot /var/www + ServerName www.jhausse.net + [...] + + Deny from all + + [...] + SSLCertificateFile /etc/ssl/certs/cloud.crt + SSLCertificateKeyFile /etc/ssl/private/cloud.key + [...] + + +然后让我们同时也在目录**/var/www**下设定一个非加密连接**http://www.jhausse.net**的默认网站。编辑文件**/etc/apache2/sites-available/default**: + + + DocumentRoot /var/www + ServerName www.jhausse.net + [...] + + Deny from all + + + +这样的话,我们通过把文件放到/var/www目录下让www.jhausse.net使用它们提供网站服务。名叫'Deny from all'的指令可以阻止通过www.jhausse.net访问Owncloud:我们将设定通过**https://cloud.jhausse.net**来正常访问。 + +现在我们将设定网页邮件(roundcube),让它可以通过网址**https://webmail.jhausse.net**来访问。编辑文件**/etc/apache2/sites-available/roundcube**并写入以下内容: + + + + ServerAdmin webmaster@localhost + + DocumentRoot /var/lib/roundcube + # The host name under which you'd like to access the webmail + ServerName webmail.jhausse.net + + Options FollowSymLinks + AllowOverride None + + + ErrorLog ${APACHE_LOG_DIR}/error.log + + # Possible values include: debug, info, notice, warn, error, crit, + # alert, emerg. + LogLevel warn + + CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined + + # SSL Engine Switch: + # Enable/Disable SSL for this virtual host. + SSLEngine on + + # do not allow unsecured connections + # SSLRequireSSL + SSLCipherSuite HIGH:MEDIUM + + # A self-signed (snakeoil) certificate can be created by installing + # the ssl-cert package. See + # /usr/share/doc/apache2.2-common/README.Debian.gz for more info. + # If both key and certificate are stored in the same file, only the + # SSLCertificateFile directive is needed. + SSLCertificateFile /etc/ssl/certs/cloud.crt + SSLCertificateKeyFile /etc/ssl/private/cloud.key + + # Those aliases do not work properly with several hosts on your apache server + # Uncomment them to use it or adapt them to your configuration + Alias /program/js/tiny_mce/ /usr/share/tinymce/www/ + + # Access to tinymce files + + Options Indexes MultiViews FollowSymLinks + AllowOverride None + Order allow,deny + allow from all + + + + Options +FollowSymLinks + # This is needed to parse /var/lib/roundcube/.htaccess. See its + # content before setting AllowOverride to None. + AllowOverride All + order allow,deny + allow from all + + + # Protecting basic directories: + + Options -FollowSymLinks + AllowOverride None + + + + Options -FollowSymLinks + AllowOverride None + Order allow,deny + Deny from all + + + + Options -FollowSymLinks + AllowOverride None + Order allow,deny + Deny from all + + + + SSLOptions +StdEnvVars + + + SSLOptions +StdEnvVars + + # SSL Protocol Adjustments: + # The safe and default but still SSL/TLS standard compliant shutdown + # approach is that mod_ssl sends the close notify alert but doesn't wait for + # the close notify alert from client. When you need a different shutdown + # approach you can use one of the following variables: + # o ssl-unclean-shutdown: + # This forces an unclean shutdown when the connection is closed, i.e. no + # SSL close notify alert is send or allowed to received. This violates + # the SSL/TLS standard but is needed for some brain-dead browsers. Use + # this when you receive I/O errors because of the standard approach where + # mod_ssl sends the close notify alert. + # o ssl-accurate-shutdown: + # This forces an accurate shutdown when the connection is closed, i.e. a + # SSL close notify alert is send and mod_ssl waits for the close notify + # alert of the client. This is 100% SSL/TLS standard compliant, but in + # practice often causes hanging connections with brain-dead browsers. Use + # this only for browsers where you know that their SSL implementation + # works correctly. + # Notice: Most problems of broken clients are also related to the HTTP + # keep-alive facility, so you usually additionally want to disable + # keep-alive for those clients, too. Use variable "nokeepalive" for this. + # Similarly, one has to force some clients to use HTTP/1.0 to workaround + # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and + # "force-response-1.0" for this. + BrowserMatch "MSIE [2-6]" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 + # MSIE 7 and newer should be able to use keepalive + BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown + + + +然后在你的DNS服务商那里声明一下服务器,例如: + + webmail.jhausse.net. 300 IN CNAME cloud.jhausse.net. + +现在让我激活这三个网站 + + a2ensite default default-ssl roundcube + service apache2 restart + +关于网页邮件,可以通过网址**https://webmail.jhausse.net**来访问,基本上能工作。之后使用邮箱全名(例如roudy@jhausse.net)和在本文一开始在邮件服务器数据库里设定的密码登录。第一次连接成功,浏览器会警告说证书没有可靠机构的签名。这个没什么关系,只要添加一个例外。 + +最后但很重要的是,我们将通过把以下内容你哦个写入**/etc/apache2/sites-available/owncloud**来为Owncloud创建一个虚拟主机。 + + + + ServerAdmin webmaster@localhost + + DocumentRoot /var/www/owncloud + ServerName cloud.jhausse.net + + Options FollowSymLinks + AllowOverride None + + + Options Indexes FollowSymLinks MultiViews + AllowOverride All + Order allow,deny + allow from all + + + ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ + + AllowOverride None + Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch + Order allow,deny + Allow from all + + + ErrorLog ${APACHE_LOG_DIR}/error.log + + # Possible values include: debug, info, notice, warn, error, crit, + # alert, emerg. + LogLevel warn + + CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined + + # SSL Engine Switch: + # Enable/Disable SSL for this virtual host. + SSLEngine on + + # do not allow unsecured connections + # SSLRequireSSL + SSLCipherSuite HIGH:MEDIUM + SSLCertificateFile /etc/ssl/certs/cloud.crt + SSLCertificateKeyFile /etc/ssl/private/cloud.key + + + SSLOptions +StdEnvVars + + + SSLOptions +StdEnvVars + + + BrowserMatch "MSIE [2-6]" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 + # MSIE 7 and newer should be able to use keepalive + BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown + + + +然后通过执行以下命令激活Owncloud + + a2ensite owncloud + service apache2 reload + +之后通过在浏览器里打开链接**https://cloud.jhausse.net/**配置一下Owncloud。 + +就这些了!现在你已经拥有自己的Google Drive,日程表,联系人,Dropbox,以及Gmail!好好享受下新鲜恢复保护的隐私吧!:-) + +### 在云上同步你的设备 ### + +要同步你的邮件,你可以只是用你喜欢的邮件客户端:Android或iOS自带的默认邮件应用,[k9mail][37],或者电脑上的Thunderbird。或者你也可以使用我们设置好的网页邮件。 + +在Owncloud的文档里描述了如何与云端同步你的日程表和联系人。在Android系统中,我用的是CalDAV-Sync,CardDAV-Sync应用桥接了手机上Android自带日历以及联系人应用和Owncloud服务器。 + +对于文件,有一个叫Owncloud的Android应用可以访问你手机上的文件,然后自动把你拍的图片和视频上传到云中。在你的Mac/PC上访问云端文件也很容易,在[Owncloud文档里有很好的描述][38]。 + +### 最后一点提示 ### + +在上线后的前几个星期里,最好每天检查一下日志**/var/log/syslog**和**/var/log/mail.log**以保证一切都在顺利运行。在你邀请其他人(朋友,家人,等等)加入你的服务器之前这很重要。他们信任你能很好地架设个人服务器维护他们的数据,但是如果服务器突然崩溃会让他们很失望。 + +要添加另一个邮件用户,只要在数据库**mailserver**的**virtual_users**表中增加一行。 + +要添加一个域名,只要在**virtual_domains**表中增加一行。然后更新**/etc/opendkim/SigningTable**为发出的邮件签名,上传OpenDKIM密钥到服务器区域,然后吃哦更年期OpenDKIM服务。 + +Owncloud有自己的用户数据库,在用管理员帐号登录后可以修改。 + +最后,万一在服务器临时崩溃的时候想办法找解决方案很重要。比如说,在服务器恢复之前你的邮件应该送往哪儿?一种方式是找个能帮你做备份MX的朋友,同时你也可以当他的备份MX(看下postfix的配置文件**main.cf**里**relay_domains**和**relay_recipient_maps**里的设定)。与此类似,如果你的服务器被破解然后一个坏蛋把你所有文件删了怎么办?对于这个,考虑增加一个常规备份系统就很重要了。Linode提供了备份选项。在1984.is里,我用crontabs和scp做了一个基本但管用的自动备份系统。 + +-------------------------------------------------------------------------------- + +via: https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/ + +作者:[Roudy Jhausse ][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:aboutlinux@free.fr +[1]:https://history.google.com/history/ +[2]:http://research.google.com/workatgoogle.html +[3]:http://www.attac.org/ +[4]:http://www.nytimes.com/2012/02/19/magazine/shopping-habits.html?pagewanted=all +[5]:http://vimeo.com/ondemand/termsandconditions +[6]:http://www.techtimes.com/articles/21670/20141208/sony-pictures-hack-nightmare-week-celebs-data-leak-and-threatening-emails-to-employees.htm +[7]:http://blog.backupify.com/2012/07/25/what-is-my-gmail-account-really-worth/ +[8]:http://adage.com/article/digital/worth-facebook-google/293042/ +[9]:http://vimeo.com/ondemand/termsandconditions +[10]:https://prism-break.org/en/ +[11]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#VPS +[12]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#mail +[13]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#dspam +[14]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#SPF +[15]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#owncloud +[16]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#sync +[17]:http://linuxfr.org/news/heberger-son-courriel +[18]:http://sealedabstract.com/code/nsa-proof-your-e-mail-in-2-hours/ +[19]:http://www.1984.is/ +[20]:http://www.linode.com/ +[21]:http://www.greenpeace.org/international/Global/international/publications/climate/2012/iCoal/HowCleanisYourCloud.pdf +[22]:http://www.1984.is/about/ +[23]:http://www.fsf.org/ +[24]:https://www.gnupg.org/ +[25]:http://www.gandi.net/ +[26]:http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html +[27]:http://www.postfix.org/ +[28]:http://postgrey.schweikert.ch/ +[29]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#testPort25 +[30]:http://dspam.sourceforge.net/ +[31]:http://www.microsoft.com/mscorp/safety/content/technologies/senderid/wizard/ +[32]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#PTR +[33]:http://opendkim.org/opendkim-README +[34]:http://www.brandonchecketts.com/emailtest.php +[35]:http://owncloud.org/ +[36]:http://owncloud.org/install/ +[37]:https://code.google.com/p/k9mail/ +[38]:http://doc.owncloud.org/server/7.0/user_manual/files/files.html From 78b4961b8cda4027772fdc0af50d3520fb28f67c Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 13 Feb 2015 13:21:48 +0800 Subject: [PATCH 030/163] translating --- ...wers--How to get the process ID (PID) of a shell script.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md b/sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md index 999e3b4327..2fff492d6a 100644 --- a/sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md +++ b/sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md @@ -1,3 +1,5 @@ +Translating---geekpi + Linux FAQs with Answers--How to get the process ID (PID) of a shell script ================================================================================ > **Question**: I want to know the process ID (PID) of the subshell under which my shell script is running. How can I find a PID in a bash shell script? @@ -45,4 +47,4 @@ via: http://ask.xmodulo.com/process-id-pid-shell-script.html 译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 09f2ee0599e09b3e437b9a127d6791c85ec6d0c3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 13 Feb 2015 13:53:44 +0800 Subject: [PATCH 031/163] translated --- ... the process ID (PID) of a shell script.md | 50 ------------------- ... the process ID (PID) of a shell script.md | 48 ++++++++++++++++++ 2 files changed, 48 insertions(+), 50 deletions(-) delete mode 100644 sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md create mode 100644 translated/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md diff --git a/sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md b/sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md deleted file mode 100644 index 2fff492d6a..0000000000 --- a/sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md +++ /dev/null @@ -1,50 +0,0 @@ -Translating---geekpi - -Linux FAQs with Answers--How to get the process ID (PID) of a shell script -================================================================================ -> **Question**: I want to know the process ID (PID) of the subshell under which my shell script is running. How can I find a PID in a bash shell script? - -When you execute a shell script, it will launch a process known as a subshell. As a child process of the main shell, a subshell executes a list of commands in a shell script as a batch (so-called "batch processing"). - -In some cases, you may want to know the process ID (PID) of the subshell where your shell script is running. This PID information can be used under different circumstances. For example, you can create a unique temporary file in /tmp by naming it with the shell script PID. In case a script needs to examine all running processes, it can exclude its own subshell from the process list. - -In bash, the **PID of a shell script's subshell process** is stored in a special variable called '$$'. This variable is read-only, and you cannot modify it in a shell script. For example: - - #!/bin/bash - - echo "PID of this script: $$" - -The above script will show the following output. - - PID of this script: 6583 - -Besides $$, bash shell exports several other read-only variables. For example, PPID stores the process ID of the subshell's parent process (i.e., main shell). UID stores the user ID of the current user who is executing the script. For example: - - #!/bin/bash - - echo "PID of this script: $$" - echo "PPID of this script: $PPID" - echo "UID of this script: $UID" - -Its output will be: - - PID of this script: 6686 - PPID of this script: 4656 - UID of this script: 1000 - -In the above, PID will keep changing every time you invoke a script. That is because each invocation of a script will create a new subshell. On the other hand, PPID will remain the same as long as you run a script inside the same shell. - -![](https://farm8.staticflickr.com/7437/16274890369_e78ce16d42_b.jpg) - -For a complete list of built-in bash variables, refer to its man page. - - $ man bash - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/process-id-pid-shell-script.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md b/translated/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md new file mode 100644 index 0000000000..760757a712 --- /dev/null +++ b/translated/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md @@ -0,0 +1,48 @@ +Linux有问必答:如何在脚本中获取进程ID(PID) +================================================================================ +> **提问**: 我想要知道运行中脚本subshell的进程id。我该如何在shell脚本中得到PID。 + +当我在执行shell脚本时,它会启动一个叫subshell的进程。作为主shell的子进程,subshell将shell脚本中的命令作为批处理运行(因此称为“批处理进程”)。 + +在某些情况下,你也许想要知道运行中的subshell的PID。这个PID信息可以在不同的情况下使用。比如,你可以使用shell脚本的PID在/tmp下创建一个唯一的临时文件。有时侯脚本需要检测所有运行的进程,它可以从进程列表中排除自身的subshell。 + +在bash中,**subshell进程的PID**存储在一个特殊的变量‘$$’中。这个变量只读,你不可以在脚本中修改它。比如: + + #!/bin/bash + + echo "PID of this script: $$" + +上面的脚本会得到下面的输出: + + PID of this script: 6583 + +除了$$, bash shell还会导出其他的只读变量。比如,PPID存储subshell父进程的ID(也就是主shell)。UID存储了执行这个脚本的当前用户ID。比如: + + #!/bin/bash + + echo "PID of this script: $$" + echo "PPID of this script: $PPID" + echo "UID of this script: $UID" + +输出是: + + PID of this script: 6686 + PPID of this script: 4656 + UID of this script: 1000 + +上面输出中,PID每次执行都会变化。这个因为每次运行都会创建一个新的shell。另一方面,PPID每次都会一样只要你在同一个shell中运行。 + +![](https://farm8.staticflickr.com/7437/16274890369_e78ce16d42_b.jpg) + +对于所有bash内置变量列表,参考man页。 + + $ man bash + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/process-id-pid-shell-script.html + +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 4aa6493d879f26fe664dfe30eb5b4e92fa9ad6c6 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Fri, 13 Feb 2015 14:29:22 +0800 Subject: [PATCH 032/163] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...XBMC) In Ubuntu 14.04 and Linux Mint 17.md | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/translated/tech/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md b/translated/tech/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md index 20b6715d38..61202528a9 100644 --- a/translated/tech/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md +++ b/translated/tech/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md @@ -1,28 +1,28 @@ -Ubuntu14.04或Mint17如何安装Kodi14(XBMC) +如何在 Ubuntu 14.04 和 Linux Mint 17 中安装 Kodi14(XBMC) ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Kodi_Xmas.jpg) [Kodi][1],原名就是大名鼎鼎的XBMC,发布[最新版本14][2],命名为Helix。感谢官方XMBC提供的PPA,现在可以很简单地在Ubuntu14.04中安装了。 -Kodi是一个优秀的自由和开源的(GPL)媒体中心软件,支持所有平台,如Windows, Linux, Mac, Android等。此软件拥有全屏幕的媒体中心,可以管理所有音乐和视频,不单支持本地文件还支持网络播放,如Tube,[Netflix][3], Hulu, Amazon Prime和其他串流服务商。 +有些人可能还不了解Kodi,它是一个媒体中心软件,支持所有平台,如Windows、Linux、 Mac, Android等。此软件拥有全屏的媒体中心,可以管理所有音乐和视频,不单支持本地文件还支持网络播放,如Tube、[Netflix][3]、 Hulu, Amazon Prime和其他流媒体服务商。 -### Ubuntu 14.04, 14.10 和 Linux Mint 17 中安装XBMC 14 Kodi Helix ### +### 在 Ubuntu 14.04 和 Linux Mint 17 中安装 XBMC 14 Kodi Helix ### 再次感谢官方的PPA,让我们可以轻松安装Kodi 14。 -支持Ubuntu 14.04, Ubuntu 12.04, Linux Mint 17, Pinguy OS 14.04, Deepin 2014, LXLE 14.04, Linux Lite 2.0, Elementary OS and 其他基于Ubuntu的Linux 发行版。 +支持Ubuntu 14.04、Ubuntu 12.04、Linux Mint 17、Pinguy OS 14.04、Deepin 2014、LXLE 14.04、Linux Lite 2.0, Elementary OS 以及其他基于 Ubuntu 的 Linux 发行版。 打开终端(Ctrl+Alt+T)然后使用下列命令。 sudo add-apt-repository ppa:team-xbmc/ppa sudo apt-get update sudo apt-get install kodi -需要下载大约100MB,在我的观点这不是很大。若需安装解码插件,使用下列命令: +需要下载大约100MB,在我看来,这不是很大。若需安装解码插件,使用下列命令: sudo apt-get install kodi-audioencoder-* kodi-pvr-* -#### 从Ubuntu中移除Kodi 14 #### +#### 从 Ubuntu 中移除 Kodi 14 #### -从系统中移除Kodi 14 ,使用下列命令: +从系统中移除 Kodi 14,使用下列命令: sudo apt-get remove kodi @@ -30,10 +30,8 @@ Kodi是一个优秀的自由和开源的(GPL)媒体中心软件,支持所 sudo add-apt-repository --remove ppa:team-xbmc/ppa -我希望这个简单的文章可以帮助到你,在Ubuntu, Linux Mint 和其他 Linux版本中轻松安装Kodi 14。 -你怎么发现Kodi 14 Helix? -你有没有使用其他的什么媒体中心? -可以在下面的评论区分享你的观点。 +我希望这篇简单的文章可以帮助到你在Ubuntu、Linux Mint 和其他 Linux 版本中轻松安装 Kodi 14。你是怎么发现 Kodi 14 Helix 的? +你有没有使用其他的媒体中心来作为 XBMC 的替代?可以在下面的评论区分享你的观点。 -------------------------------------------------------------------------------- @@ -41,7 +39,7 @@ via: http://itsfoss.com/install-kodi-14-xbmc-in-ubuntu-14-04-linux-mint-17/ 作者:[Abhishek][a] 译者:[Vic020/VicYu](http://www.vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From df316cfec2c113041b0e7575ede7e043b83325c2 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Fri, 13 Feb 2015 14:59:32 +0800 Subject: [PATCH 033/163] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...5 How To Install Winusb In Ubuntu 14.04.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/translated/tech/20150105 How To Install Winusb In Ubuntu 14.04.md b/translated/tech/20150105 How To Install Winusb In Ubuntu 14.04.md index b9fe775752..a65ba04392 100644 --- a/translated/tech/20150105 How To Install Winusb In Ubuntu 14.04.md +++ b/translated/tech/20150105 How To Install Winusb In Ubuntu 14.04.md @@ -1,16 +1,16 @@ -如何在Ubuntu 14.04 中安装Winusb +如何在 Ubuntu 14.04 中安装 Winusb ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/WinUSB_Ubuntu_1404.jpeg) -[WinUSB][1]是一款简单的且有用的工具,可以让你从Windows ISO镜像或者DVD中创建USB安装盘。它结合了GUI和命令行,你可以根据你的喜好决定使用哪种。 +[WinUSB][1]是一款即简单又有用的工具,可以让你从 Windows ISO 镜像或者 DVD 中创建 USB 安装盘。它结合了 GUI 和命令行,你可以根据你的喜好决定使用哪种。 -在本篇中我们会展示**如何在Ubuntu 14.04、14.10 和 Linux Mint 17 中安装WinUSB**。 +在本文中我们会展示**如何在 Ubuntu 14.04、14.10 和 Linux Mint 17 中安装 WinUSB**。 -### 在Ubuntu 14.04、14.10 和 Linux Mint 17 中安装WinUSB ### +### 在 Ubuntu 14.04、14.10 和 Linux Mint 17 中安装 WinUSB ### -直到Ubuntu 13.10, WinUSBu一直都在积极开发,且在官方PPA中可以找到。这个PPA还没有为Ubuntu 14.04 和14.10更新,但是二进制文件仍旧可在更新版本的Ubuntu和Linux Mint中运行。基于[基于你使用的系统是32位还是64位的][2],使用下面的命令来下载二进制文件: +在 Ubuntu 13.10 之前, WinUSBu 一直都在积极开发,且在官方 PPA 中可以找到。这个 PPA 还没有为 Ubuntu 14.04 和 14.10 更新,但是二进制文件仍旧可在更新版本的 Ubuntu 和 Linux Mint 中运行。基于[你使用的系统是32位还是64位][2],使用下面的命令来下载二进制文件: -打开终端,并在32位的系统下使用下面的命令: +打开终端,32位的系统下使用下面的命令: wget https://launchpad.net/~colingille/+archive/freshlight/+files/winusb_1.0.11+saucy1_i386.deb @@ -22,15 +22,15 @@ sudo dpkg -i winusb* -不要担心在你安装WinUSB时看见错误。使用这条命令修复依赖: +不要担心在你安装WinUSB时看到错误。使用这条命令修复依赖错误: sudo apt-get -f install -之后,你就可以在Unity Dash中查找WinUSB并且用它在Ubuntu 14.04 中创建Windows的live USB了。 +之后,你就可以在 Unity Dash 中查找 WinUSB 并且用它在 Ubuntu 14.04 中创建 Windows 的 live USB 了。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/WinUSB_Ubuntu.png) -我希望这篇文章能够帮到你**在Ubuntu 14.04、14.10 和 Linux Mint 17 中安装WinUSB**。 +我希望这篇文章能够帮到你**在 Ubuntu 14.04、14.10 和 Linux Mint 17 中安装 WinUSB**。 -------------------------------------------------------------------------------- @@ -38,10 +38,10 @@ via: http://itsfoss.com/install-winusb-in-ubuntu-14-04/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://itsfoss.com/author/Abhishek/ [1]:http://en.congelli.eu/prog_info_winusb.html -[2]:http://itsfoss.com/how-to-know-ubuntu-unity-version/ \ No newline at end of file +[2]:http://itsfoss.com/how-to-know-ubuntu-unity-version/ From 91abf5dc4d9e335474f0111f11ab8ad852f61d1d Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 14 Feb 2015 07:43:44 +0800 Subject: [PATCH 034/163] Update 20150211 Best Known Linux Archive or Compress Tools.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- .../20150211 Best Known Linux Archive or Compress Tools.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md b/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md index 3d3960cf4d..86623a5c99 100644 --- a/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md +++ b/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md @@ -1,3 +1,5 @@ +Translating by FSSlc + Best Known Linux Archive / Compress Tools ================================================================================ Sending and receiving large files and pictures over the internet is a headache many times. Compression and decompression tools are meant to address this problem. Lets take a quick overview of a few open source tools that are available to make our jobs simpler. @@ -226,4 +228,4 @@ via: http://linoxide.com/tools/linux-compress-decompress-tools/ [2]:http://www.gzip.org/ [3]:http://www.bzip.org/ [4]:http://www.7-zip.org/ -[5]:https://wiki.archlinux.org/index.php/p7zip \ No newline at end of file +[5]:https://wiki.archlinux.org/index.php/p7zip From b9b12c00f376953e59a9dd18fd061b256261ae66 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 15 Feb 2015 10:27:40 +0800 Subject: [PATCH 035/163] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...A New Web Browser Built for Power Users.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md b/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md index 77e9762b7f..f82ca8965d 100644 --- a/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md +++ b/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md @@ -1,18 +1,18 @@ -有请Vivaldi——全新网页浏览器,为高手级用户而生 +认识Vivaldi——一款为高手级用户定制的全新网页浏览器 ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/Screen-Shot-2015-01-27-at-17.36.jpg) -**这一周一个为了满足高手级用户的需要而制造出来的全新网页浏览器已然来临——而且它已经可以在Linux上使用了。** +**这周一个为了满足高手级用户的需要而定制的全新网页浏览器已然来临——而且它已经可以在Linux上使用了。** -Vivaldi就是这个新浏览器的名字,而且它还面向64位Linux,Windows和Mac机发布了技术预览版(请读:无责任测试)。它是在 — 震惊 — 尝试且已测试过的Chromium开源框架,Blink和Google的开源V8 JavaScript引擎(以及其他项目)的基础上制造的。 +Vivaldi就是这个新浏览器的名字,而且它还面向64位Linux、Windows 和 Mac 机发布了技术预览版(注解:无责任测试版)。它是建立在已测试过的Chromium开源框架,Blink和Google的开源V8 JavaScript引擎(以及其他项目)的基础上。 -这个世界真的想要再有一个浏览器吗?Vivaldi——出自Opera软件前首席执行官Jon S.von Tetzchner的想法——不怎么关注所要,更关注所需。 +这个世界真的还需要一个浏览器吗?Opera软件前首席执行官Jon S.von Tetzchner的构想——Vivaldi不怎么关注所要,更关注所需。 -Vivaldi被制造成带有着偏向于键盘操作的tab键瘾君子所需的那种功能。并没有为那些认为Firefox复杂或是对Chrome的唯一批评是它改动了书签按钮的用户而进行修改。 +Vivaldi被制造成带有着偏向于键盘操作的tab键痴迷者所需的那种功能。并没有为那些认为Firefox复杂或是批评Chrome改动了书签按钮的用户而进行修改。 这也并不是什么俗气的营销噱头。尽管它带有‘技术预览版’标签,Vivaldi已经有了明显偏向于高手级用户们的功能。 -相当多的人觉得自己被其他软件公司所生产的简化的,配对后发行的产品遗弃了、糊弄了。Vivaldi——即使在这个过渡期的早期——看起来适逢其会以至于打败了其他产品。 +相当多的人觉得自己被其他软件公司所生产的简化的,配对后发行的产品遗弃了、糊弄了。Vivaldi——即使在这个过渡期的早期——看起来适逢其会,可以打败其他产品。 ### Vivaldi功能### @@ -20,13 +20,13 @@ Vivaldi被制造成带有着偏向于键盘操作的tab键瘾君子所需的那 ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/quick.jpg) -**快捷命令** (Ctrl + Q)是个内置的HUD应用,他可以让你快速的滤过设置,选项和功能,用它打开一个书签或是隐藏状态栏,只需用你的键盘。无需点击。 +**快捷命令** (Ctrl + Q)是个内置的HUD应用,它可以让你快速过滤设置、选项和功能,用它打开一个书签或是隐藏状态栏,只需用你的键盘,无需鼠标点击。 **标签堆** 让你可以通过把多个不同标签分到一组来清理你的工作区,然后可以通过键盘命令或者可预览标签选择器在标签组之间进行切换。 ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/tab-stacks.jpg) -一个可折叠的**侧边栏**藏有额外功能(就像旧Opera)包括一个(目前还不能工作的)邮箱客户端,链接,书签浏览器和可以让你截屏并做注释的笔记专区 +一个可折叠的**侧边栏**藏有额外功能(就像旧Opera)包括一个(目前还不能工作的)邮箱客户端,链接,书签浏览器和可以让你截屏并做注释的笔记专区。 还提供了一大堆其他的功能,包括设置键盘快捷键,一个可以被设置在浏览器任何一个边(或完全隐藏)的标签栏,隐私选项和一个快速打开文件夹的功能。 @@ -34,9 +34,9 @@ Vivaldi被制造成带有着偏向于键盘操作的tab键瘾君子所需的那 ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/vivaldi-settings-in-ubuntu-750x434.jpg) -把Vivaldi当作Opera post-Presto(Opera旧的拥有版权的引擎)的真正继承者并不是什么值得惊奇的事。当Opera(今天也推出了一个小更新)追求一个更轻、更好管理的一套功能时,已经剔除了它很多“高手级用户”功能。 +把Vivaldi当作Opera post-Presto(Opera拥有版权的旧引擎)的真正继承者并不是什么值得惊奇的事。当Opera(今天也推出了一个小更新)追求一个更轻、更好管理的一套功能时,已经剔除了它很多“高手级用户”功能。 -Vivaldi想要捡起Opera曾急于脱手的负担。虽然这么做没有帮他抓到什么预期的市场份额,但是它抓住了高手级用户的眼球。他们大多数无疑已经在使用Linux了。 +Vivaldi想要捡起Opera曾急于脱手的负担。虽然这么做没有帮它抓住什么预期的市场份额,但是它吸引了高手级用户的眼球。他们大多数无疑已经在使用Linux了。 ### 下载 ### @@ -52,7 +52,7 @@ via: http://www.omgubuntu.co.uk/2015/01/vivaldi-web-browser-linux-download-power 作者:[Joey-Elijah Sneddon][a] 译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 10abec198e23c141fc51b1c79457f0293a72f155 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Sun, 15 Feb 2015 11:31:07 +0800 Subject: [PATCH 036/163] translated --- ...Scripting interview Questions & Answers.md | 238 +++++++++--------- 1 file changed, 124 insertions(+), 114 deletions(-) diff --git a/sources/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md b/sources/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md index 11d5e6645a..9a131bee9d 100644 --- a/sources/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md +++ b/sources/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md @@ -1,68 +1,68 @@ - Vic -25 Linux Shell Scripting interview Questions & Answers +Linux Shell脚本 入门25问 ================================================================================ -### Q:1 What is Shell Script and why it is required ? ### +### Q:1 Shell脚本是什么、为什么它是必需的吗? ### -Ans: A Shell Script is a text file that contains one or more commands. As a system administrator we often need to issue number of commands to accomplish the task, we can add these all commands together in a text file (Shell Script) to complete daily routine task. +答:一个Shell脚本是一个文本文件,包含一个或多个命令。作为系统管理员,我们经常需要发出多个命令来完成一项任务,我们可以添加这些所有命令在一个文本文件(Shell脚本)来完成日常工作任务。 -### Q:2 What is the default login shell and how to change default login shell for a specific user ? ### +### Q:2 什么是默认登录shell,如何改变指定用户的登录shell ### -Ans: In Linux like Operating system “/bin/bash” is the default login shell which is assigned while user creation. We can change default shell using the “chsh” command . Example is shown below : +答:在Linux操作系统,“/ bin / bash”是默认登录shell,在用户创建时被分配的。使用chsh命令可以改变默认的shell。示例如下所示: # chsh -s # chsh linuxtechi -s /bin/sh -### Q:3 What are the different type of variables used in a shell Script ? ### +### Q:3 有什么不同的类型在shell脚本中使用? ### -Ans: In a shell script we can use two types of variables : +答:在shell脚本,我们可以使用两个类型变量: -- System defined variables -- User defined variables +- 系统定义变量 +- 用户定义变量 -System defined variables are defined or created by Operating System(Linux) itself. These variables are generally defined in Capital Letters and can be viewed by “**set**” command. -User defined variables are created or defined by system users and the values of variables can be viewed by using the command “`echo $`” +系统变量是由系统系统自己创建的。这些变量由大写字母组成,可以通过“**set**”命令查看。 -### Q:4 How to redirect both standard output and standard error to the same location ? ### +用户变量由系统用户来生成,变量的值可以通过命令“`echo $<变量名>`”查看 -Ans: There two method to redirect std output and std error to the same location: +### Q:4 如何同时重定向标准输出和错误输出到同一位置? ### -Method:1 2>&1 (# ls /usr/share/doc > out.txt 2>&1 ) +答:这里有两个方法来实现: -Method:2 &> (# ls /usr/share/doc &> out.txt ) +方法1:2>&1 (# ls /usr/share/doc > out.txt 2>&1 ) -### Q:5 What is the Syntax of “nested if statement” in shell scripting ? ### +方法二:&> (# ls /usr/share/doc &> out.txt ) -Ans : Basic Syntax is shown below : +### Q:5 shell脚本中“if”的语法 ? ### - if [ Condition ] +答:基础语法: + + if [ 条件 ] then - command1 - command2 + 命令1 + 命令2 ….. else - if [ condition ] + if [ 条件 ] then - command1 - command2 + 命令1 + 命令2 …. else - command1 - command2 + 命令1 + 命令2 ….. fi fi -### Q:6 What is the use of “$?” sign in shell script ? ### +### Q:6 shell脚本中“$?”标记的用途是什么? ? ### -Ans:While writing a shell script , if you want to check whether previous command is executed successfully or not , then we can use “$?” with if statement to check the exit status of previous command. Basic example is shown below : +答:在写一个shell脚本时,如果你想要检查前一命令是否执行成功,在if条件中使用“$?”可以来检查前一命令的结束状态。简单的例子如下: root@localhost:~# ls /usr/bin/shar /usr/bin/shar root@localhost:~# echo $? 0 -If exit status is 0 , then command is executed successfully +如果结束状态是0,说明前一个命令执行成功。 root@localhost:~# ls /usr/bin/share @@ -70,11 +70,11 @@ If exit status is 0 , then command is executed successfully root@localhost:~# echo $? 2 -If the exit status is other than 0, then we can say command is not executed successfully. +如果结束状态不是0,说明命令执行失败。 -### Q:7 How to compare numbers in Linux shell Scripting ? ### +### Q:7 在shell脚本中如何比较两个数 ? ### -Ans: test command is used to compare numbers in if-then statement. Example is shown below : +答:测试用例使用if-then来比较两个数,例子如下: #!/bin/bash x=10 @@ -87,77 +87,76 @@ Ans: test command is used to compare numbers in if-then statement. Example is sh echo “y is greater than x” fi -### Q:8 What is the use of break command ? ### +### Q:8 shell脚本中break命令的作用 ? ### -Ans: The break command is a simple way to escape out of a loop in progress. We can use the break command to exit out from any loop, including while and until loops. +答:break命令一个简单的用途是退出执行中的循环。我们可以在while 和until循环中使用break命令跳出循环。 -### Q:9 What is the use of continue command in shell scripting ? ### +### Q:9 shell脚本中continue命令的作用 ? ### -Ans The continue command is identical to break command except it causes the present iteration of the loop to exit, instead of the entire loop. Continue command is useful in some scenarios where error has occurred but we still want to execute the next commands of the loop. +答:continue命令不同于break命令,它只跳出当前循环的迭代,而不是整个循环。continue命令很多时候是很有用的,例如错误发生,但我们依然希望循环继续的时候。 -### Q:10 Tell me the Syntax of “Case statement” in Linux shell scripting ? ### +### Q:10 告诉我shell脚本中Case语句的语法 ? ### -Ans: The basic syntax is shown below : +答:基础语法如下: - case word in - value1) - command1 - command2 + case 变量 in + 值1) + 命令1 + 命令2 ….. - last_command - !! - value2) - command1 - command2 + 最后命令 + !! + 值2) + 命令1 + 命令2 …… - last_command + 最后命令 ;; esac -### Q:11 What is the basic syntax of while loop in shell scripting ? ### +### Q:11 shell脚本中while循环语法 ? ### -Ans: Like the for loop, the while loop repeats its block of commands a number of times. Unlike the for loop, however, the while loop iterates until its while condition is no longer true. The basic syntax is : +答:如同for循环,while循环重复自己所有命令只要条件成立,不同于for循环。基础语法: - while [ test_condition ] + while [ 条件 ] do - commands… + 命令… done -### Q:12 How to make a shell script executable ? ### +### Q:12 如何使脚本成为可执行状态 ? ### -Ans: Using the chmod command we can make a shell script executable. Example is shown below : +答:使用chmod命令来使脚本可执行。例子如下: # chmod a+x myscript.sh -### Q:13 What is the use of “#!/bin/bash” ? ### +### Q:13 “#!/bin/bash”的作用 ? ### -Ans: #!/bin/bash is the first of a shell script , known as shebang , where # symbol is called hash and ‘!’ is called as bang. It shows that command to be executed via /bin/bash. +答:#!/bin/bash是shell脚本的第一行,总所周知,#符号调用hash而!调用bang。它的意思是命令使用 /bin/bash来执行命令 -### Q:14 What is the syntax of for loop in shell script ? ### +### Q:14 shell脚本中for循环语法 ? ### -Ans: Basic Syntax of for loop is given below : +答:for循环基础语法: - for variables in list_of_items + for 变量 in 循环列表 do - command1 - command2 + 命令1 + 命令2 …. - last_command + 最后命令 done -### Q:15 How to debug a shell script ? ### +### Q:15 如何调试shell脚本 ? ### -Ans: A shell script can be debug if we execute the script with ‘-x’ option ( sh -x myscript.sh). Another way to debug a shell script is by using ‘-nv’ option ( sh -nv myscript.sh). +答:使用'-x'参数(sh -x myscript.sh)可以调试shell脚本。另一个种方法是使用‘-nv’参数( sh -nv myscript.sh) -### Q:16 How compare the strings in shell script ? ### +### Q:16 shell脚本如何比较字符串? ### -Ans: test command is used to compare the text strings. The test command compares text strings by comparing each character in each string. +答:test命令可以用来比较字符串。Test命令比较字符串通过比较每一个字符来比较。 -### Q:17 What are the Special Variables set by Bourne shell for command line arguments ? ### +### Q:17 Bourne shell(bash) 中有哪些特别变量 ? ### -Ans: The following table lists the special variables set by the Bourne shell for command line arguments . +答:下面的表列出了Bourne shell为命令行设置的特殊变量。 -注:表格部分 @@ -165,10 +164,10 @@ Ans: The following table lists the special variables set by the Bourne shell for @@ -176,7 +175,7 @@ Ans: The following table lists the special variables set by the Bourne shell for

$0

@@ -184,7 +183,7 @@ Ans: The following table lists the special variables set by the Bourne shell for

$1

@@ -192,7 +191,7 @@ Ans: The following table lists the special variables set by the Bourne shell for

$2

@@ -208,7 +207,7 @@ Ans: The following table lists the special variables set by the Bourne shell for

$9

@@ -216,7 +215,7 @@ Ans: The following table lists the special variables set by the Bourne shell for

$#

@@ -224,17 +223,17 @@ Ans: The following table lists the special variables set by the Bourne shell for

$*

-

Special Variables

+

内建变量

-

Holds

+

解释

-

Name of the Script from the command line

+

来自命令行脚本的名字

-

First Command-line argument

+

第一个命令行参数

-

Second Command-line argument

+

第二个命令行参数

-

Ninth Command line argument

+

第九个命令行参数

-

Number of Command line arguments

+

命令行参数的数量

-

All Command-line arguments, separated with spaces

+

所有命令行参数,以空格隔开

### Q:18 How to test files in a shell script ? ### +### Q:18 在shell脚本中,如何测试文件 ? ### -Ans: test command is used to perform different test on the files. Basic test are listed below : +答:test命令可以用来测试文件。基础用法如下表格: -注:表格部分 @@ -245,79 +244,79 @@ Ans: test command is used to perform different test on the files. Basic test are

Test

-

Usage

+

用法

-

-d file_name

+

-d 文件名

-

Returns true if the file exists and is a directory

+

返回true,如果文件存在并且是一个目录

-

-e file_name

+

-e 文件名

-

Returns true if the file exists

+

返回true,如果文件存在

-

-f file_name

+

-f 文件名

-

Returns true if the file exists and is a regular file

+

返回true,如果文件存在并且是普通文件

-

-r file_name

+

-r 文件名

-

Returns true if the file exists and have read permissions

+

返回true,如果文件存在并拥有读权限

-

-s file_name

+

-s 文件名

-

Returns true if the file exists and is not empty

+

返回true,如果文件存在并且不为空

-

-w file_name

+

-w 文件名

-

Returns true if the file exists and have write permissions

+

返回true,如果文件存在并拥有写权限

-

-x file_name

+

-x 文件名

-

Returns true if the file exists and have execute permissions

+

返回true,如果文件存在并拥有执行权限

-### Q:19 How to put comments in your shell script ? ### +### Q:19 在shell脚本中,如何写入注释 ? ### -Ans: Comments are the messages to yourself and for other users that describe what a script is supposed to do and how its works.To put comments in your script, start each comment line with a hash sign (#) . Example is shown below : +答:注释可以用来描述一个脚本可以做什么和它是如何工作的。每一个注释以#开头。例子如下: #!/bin/bash # This is a command echo “I am logged in as $USER” -### Q:20 How to get input from the terminal for shell script ? ### +### Q:20 如何得到来自终端的命令输入到shell脚本? ### -Ans: ‘read’ command reads in data from the terminal (using keyboard). The read command takes in whatever the user types and places the text into the variable you name. Example is shown below : +答:read命令可以读取来自终端(使用键盘)的数据。read命令接入用户的输入并置于变量中。例子如下: # vi /tmp/test.sh @@ -331,37 +330,48 @@ Ans: ‘read’ command reads in data from the terminal (using keyboard). The re LinuxTechi My Name is LinuxTechi -### Q:21 How to unset or de-assign variables ? ### +### Q:21 如何取消设置或取消变量 ? ### -Ans: ‘unset’ command is used to de-assign or unset a variable. Syntax is shown below : +答:“unset”命令用于去取消或取消设置一个变量。语法如下所示: - # unset + # unset <变量名> -### Q:22 How to perform arithmetic operation ? ### +### Q:22 如何执行算术运算 ? ### -Ans: There are two ways to perform arithmetic operations : +答:有两种方法来执行算术运算: -1. Using `expr` command (# expr 5 + 2 ) -2. using a dollar sign and square brackets ( `$[ operation ]` ) Example : test=$[16 + 4] ; test=$[16 + 4] +1.使用`expr`命令(# expr 5 + 2) +2.用一个美元符号和方括号(`$[ 表达式 ]`)例如:test=$[16 + 4] ; test=$[16 + 4] -### Q:23 Basic Syntax of do-while statement ? ### +### Q:23 do-while语句的基本格式 ? ### -Ans: The do-while statement is similar to the while statement but performs the statements before checking the condition statement. The following is the format for the do-while statement: +答:do-while语句类似于while语句,但检查条件语句之前先执行命令。下面是用do-while语句的语法 do { - statements - } while (condition) + 命令 + } while (条件) -### Q:24 How to define functions in shell scripting ? ### +### Q:24 在shell脚本如何定义函数呢 ? ### -Ans: A function is simply a block of of code with a name. When we give a name to a block of code, we can then call that name in our script, and that block will be executed. Example is shown below : +答:函数是拥有名字的代码块。当我们定义代码块,我们就可以在我们的脚本调用名字,该块就会被执行。示例如下所示: $ diskusage () { df -h ; } -### Q:25 How to use bc (bash calculator) in a shell script ? ### + 译注:下面是我给的shell函数语法,原文没有 -Ans: Use the below Syntax to use bc in shell script. + [ function ] 函数名 [()] + { + + 命令; + [return int;] + + } + + +### Q:25 如何在shell脚本中使用BC(bash计算器) ? ### + +答:使用下列格式,在shell脚本中使用bc variable=`echo “options; expression” | bc` @@ -370,7 +380,7 @@ Ans: Use the below Syntax to use bc in shell script. via: http://www.linuxtechi.com/linux-shell-scripting-interview-questions-answers/ 作者:[Pradeep Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[VicYu/Vic020](http://vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2b1d2d58ba17a13dc4d2e05ebd25262824fbd953 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Sun, 15 Feb 2015 11:31:42 +0800 Subject: [PATCH 037/163] moved --- ...0205 25 Linux Shell Scripting interview Questions & Answers.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md (100%) diff --git a/sources/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md b/translated/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md similarity index 100% rename from sources/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md rename to translated/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md From 2eadea9fd92d8706c1a3f3621b9a70f8773426cb Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 15 Feb 2015 12:09:08 +0800 Subject: [PATCH 038/163] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...est GNOME Shell Themes For Ubuntu 14.04.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/translated/share/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md b/translated/share/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md index 339ef5f836..1b414e71c0 100644 --- a/translated/share/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md +++ b/translated/share/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md @@ -2,7 +2,7 @@ Ubuntu 14.04 上 最好的 GNOME Shell 主题 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Best_Gnome_Shell_Themes.jpeg) -自定义主题是自定义你的 Linux 桌面的最好方式。假如你在 [Ubuntu 14.04 中安装 GNOME][1] 或 在 Ubuntu 14.10 中安装了 GNOME,你或许想改变默认的主题以呈现出不同的外观。在这里,为帮助你完成该任务,我已经编制好了一个 **Ubuntu 或其他已经安装了 GNOME shell 的 Linux 操作系统中,最好的 GNOME Shell 主题** 的清单 。但在我们揭晓这份清单之前, 让我们先了解如何在 GNOME shell 中安装和应用新的主题。 +最好的方式来自定义你的 Linux 桌面就是使用自定义主题。假如你在 [Ubuntu 14.04 中安装 GNOME][1] 或 在 Ubuntu 14.10 中安装了 GNOME,你或许想改变默认的主题以呈现出不同的外观。在这里,为了帮助你完成该任务,我已经编制好了一个列表—— **Ubuntu 或其他已经安装了 GNOME shell 的 Linux 操作系统中,最好的 GNOME Shell 主题** 。但在我们揭晓这份列表之前, 让我们先了解如何在 GNOME shell 中安装和应用新的主题。 ### 在 GNOME Shell 中安装主题 ### @@ -12,7 +12,7 @@ Ubuntu 14.04 上 最好的 GNOME Shell 主题 sudo apt-get install gnome-tweak-tool ``` -或者,你可以使用新主题通过把它们放置到 `~/.themes` 目录中。如果你需要,我已经写了一个关于 [如何安装和使用 GNOME shell][2]的具体教程。 +或者,你可以通过把主题放置到 `~/.themes` 目录中来使用。如果你需要,我已经写了一个关于 [如何安装和使用 GNOME shell][2]的具体教程。 ### 最好的 GNOME Shell 主题 ### @@ -22,7 +22,7 @@ sudo apt-get install gnome-tweak-tool ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/02/mockups_numix_5.jpeg) -任何没有提到 [Numix 主题][3] 的清单都是不完整的。这个主题是如此地受欢迎以至于 [Numix 团队开发出一个新的 Linux 操作系统, Ozon][4]。考虑到他们的设计作品 Numix 主题,称在不久的将来发行的 `Ozon` 为 [最美丽的 Linux 操作系统][5] 也不为过。 +任何没有提到 [Numix 主题][3] 的列表都是不完整的。这个主题是如此地受欢迎以至于 [Numix 团队开发出一个新的 Linux 操作系统, Ozon][4]。考虑到他们的设计作品 Numix 主题,把不久将发行的 `Ozon` 称为 [最美丽的 Linux 操作系统][5] 也不为过。 使用下面的命令,在基于 Ubuntu 的发行版本中安装 Numix 主题: @@ -36,7 +36,7 @@ sudo apt-get install numix-icon-theme-circle ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Elegance_Colors_Theme_GNOME_Shell.jpeg) -另一个来自 Numix 团队的成员之一的 Satyajit Sahoo 的美丽主题 。[Elegance Colors][6] 拥有自己的 PPA (译者注: 即 Personal Package Archive 的缩写) 使得你可以轻易地安装它: +另一个美丽主题来自 Numix 团队成员之一 Satyajit Sahoo。[Elegance Colors][6] 拥有自己的 PPA (译者注: 即 Personal Package Archive 的缩写) 使得你可以轻松安装它: ``` sudo add-apt-repository ppa:satyajit-happy/themes @@ -48,7 +48,7 @@ sudo apt-get install gnome-shell-theme-elegance-colors ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Moka_GNOME_Shell.jpeg) -[Moka][7] 是另一个迷人的主题,它总是位于美丽的主题的清单之中。它是由给我们带来 Unity Tweak Tool 的开发者所设计。 Moka 是你绝对要尝试的主题之一: +[Moka][7] 是另一个迷人的主题,它总是位于美丽的主题列表之中。它是由 Unity Tweak Tool 的开发者所设计。 Moka 是你一定要尝试的主题: ``` sudo add-apt-repository ppa:moka/stable @@ -68,7 +68,7 @@ sudo apt-get install moka-gnome-shell-theme ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Ciliora_Prima_Gnome_Shell.jpeg) -以前它以 Zukitwo Dark 的名字为人们熟知, Ciliora-Prima 是一个拥有方块图标的主题,可得到的三种版本之间相互略有不同。你可以从下面的链接中下载它们: +以前它以 Zukitwo Dark 的名字为人们熟知, Ciliora-Prima 是一个拥有方块图标的主题,可使用的三种版本之间彼此略有不同。你可以从下面的链接中下载它们: - [Download Ciliora-Prima GNOME Shell Theme][9] @@ -76,7 +76,7 @@ sudo apt-get install moka-gnome-shell-theme ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Faience_GNOME_Shell_Theme.jpeg) -Faience 作为一个受欢迎的主题已经有一段时间了。你可以通过下面的 PPA 为 GNOME 3.10 及更高版本 安装 Faience: +Faience 作为一个受欢迎的主题已经有一段时间了。你可以通过下面的 PPA 为 GNOME 3.10 及更高版本安装 Faience: ``` sudo add-apt-repository ppa:tiheum/equinox @@ -88,7 +88,7 @@ sudo apt-get install faience-theme ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Paper_GTK_Theme.jpeg) -自从 Google 提出 `Material Design`,人们一直为之疯狂。Paper GTK 主题受 Google Material design 启发, 作者为 Sam Hewitt( Moka 项目开发者之一); 它正处于开发中,这意味着当前你将不能对 Paper 拥有最好的体验。假如你和我一样,具有一点实验精神,你绝对可以试一试。 +自从 Google 提出 `Material Design`,人们一直为之疯狂。Paper GTK 主题受 Google Material design 启发,作者为 Sam Hewitt( Moka 项目开发者之一);它正处于开发中,这意味着当前你还不能拥有 Paper 的最好体验。假如你和我一样,具有一点实验精神,你绝对可以试一试。 ``` sudo add-apt-repository ppa:snwh/pulp @@ -96,9 +96,9 @@ sudo apt-get update sudo apt-get install paper-gtk-theme ``` -以上就是我的清单。假如你正试着给你的 Ubuntu 换一个不同的模样,你也应该试试这个清单: [Ubuntu 14.04 中最好的图标主题][10]。 +以上就是我的列表。如果你正试着给你的 Ubuntu 换一个不同的模样,你也应该试试这个列表: [Ubuntu 14.04 中最好的图标主题][10]。 -你是怎样找到这份 **最好的 GNOME shell 主题** 清单的呢?在上面列举的主题中,哪个是你最中意的呢? 如果它没有在这里列出,请一定让我们知道那个你心目中最好的 GNOME shell 主题 。 +你是怎样找到这份 **最好的 GNOME shell 主题** 列表的呢?在上面列举的主题中,哪个是你最中意的? 如果它没有在这里列出,请一定在评论中告诉我们哪个是你心目中最好的 GNOME shell 主题 。 -------------------------------------------------------------------------------- @@ -106,7 +106,7 @@ via: http://itsfoss.com/gnome-shell-themes-ubuntu-1404/ 作者:[Abhishek][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 76559ab6dc49ac982b1c0ff4a7aac642723ffd22 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 15 Feb 2015 12:51:15 +0800 Subject: [PATCH 039/163] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150112 Best GNOME Shell Themes For Ubuntu 14.04.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/share => published}/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md (100%) diff --git a/translated/share/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md b/published/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md similarity index 100% rename from translated/share/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md rename to published/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md From e06edfcc7de09e187b913c600ee9df79105a104a Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sun, 15 Feb 2015 14:41:18 +0800 Subject: [PATCH 040/163] =?UTF-8?q?20150215-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... web server logs interactively on Linux.md | 143 ++++++++++++++++++ ...ween computers over network with btsync.md | 136 +++++++++++++++++ ...150225 How to Hide PHP Version in Linux.md | 56 +++++++ 3 files changed, 335 insertions(+) create mode 100644 sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md create mode 100644 sources/tech/20150215 How to share files between computers over network with btsync.md create mode 100644 sources/tech/20150225 How to Hide PHP Version in Linux.md diff --git a/sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md b/sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md new file mode 100644 index 0000000000..f2f7a9a270 --- /dev/null +++ b/sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md @@ -0,0 +1,143 @@ +How to analyze and view Apache web server logs interactively on Linux +================================================================================ +Whether you are in the web hosting business, or run a few web sites on a VPS yourself, chances are you want to display visitor statistics such as top visitors, requested files (dynamic or static), used bandwidth, client browsers, and referring sites, and so forth. + +[GoAccess][1] is a command-line log analyzer and interactive viewer for Apache or Nginx web server. With this tool, you will not only be able to browse the data mentioned earlier, but also parse the web server logs to dig for further data as well - and **all of this within a terminal window in real time**. Since as of today [most web servers][2] use either a Debian derivative or a Red Hat based distribution as the underlying operating system, I will show you how to install and use GoAccess in Debian and CentOS. + +### Installing GoAccess on Linux ### + +In Debian, Ubuntu and derivatives, run the following command to install GoAccess: + + # aptitude install goaccess + +In CentOS, you'll need to enable the [EPEL repository][3] and then: + + # yum install goaccess + +In Fedora, simply use yum command: + + # yum install goaccess + +If you want to install GoAccess from the source to enable further options (such as GeoIP location), install [required dependencies][4] for your operating system, and then follow these steps: + + # wget http://tar.goaccess.io/goaccess-0.8.5.tar.gz + # tar -xzvf goaccess-0.8.5.tar.gz + # cd goaccess-0.8.5/ + # ./configure --enable-geoip + # make + # make install + +That will install version 0.8.5, but you can always verify what is the latest version in the [Downloads page][5] of the project's web site. + +Since GoAccess does not require any further configurations, once it's installed you are ready to go. + +### Running GoAccess ### + +To start using GoAccess, just run it against your Apache access log. + +For Debian and derivatives: + + # goaccess -f /var/log/apache2/access.log + +For Red Hat based distros: + + # goaccess -f /var/log/httpd/access_log + +When you first launch GoAccess, you will be presented with the following screen to choose the date and log format. As explained, you can toggle between options using the spacebar and proceed with F10. As for the date and log formats, you may want to refer to the [Apache documentation][6] if you need to refresh your memory. + +In this case, Choose Common Log Format (CLF): + +![](https://farm8.staticflickr.com/7422/15868350373_30c16d7c30.jpg) + +and then press F10. You will be presented with the statistics screen. For the sake of brevity, only the header, which shows the summary of the log file, is shown in the next image: + +![](https://farm9.staticflickr.com/8683/16486742901_7a35b5df69_b.jpg) + +### Browsing Web Server Statistics with GoAccess ### + +As you scroll down the page with the down arrow, you will find the following sections, sorted by requests. The order of the categories presented here may vary depending on your distribution or your preferred installation method (from repositories or from source): + +1. Unique visitors per day (HTTP requests having the same IP, same date and same agent are considered an unique visit) + +![](https://farm8.staticflickr.com/7308/16488483965_a439dbc5e2_b.jpg) + +2. Requested files (Pages-URL) + +![](https://farm9.staticflickr.com/8651/16488483975_66d05dce51_b.jpg) + +3. Requested static files (e.g., .png, .js, etc) + +4. Referrers URLs (the URLs where each request came from) + +5. HTTP 404 Not Found response code + +![](https://farm9.staticflickr.com/8669/16486742951_436539b0da_b.jpg) + +6. Operating Systems + +7. Browsers + +8. Hosts (client IPs) + +![](https://farm8.staticflickr.com/7392/16488483995_56e706d77c_z.jpg) + +9. HTTP status codes + +![](https://farm8.staticflickr.com/7282/16462493896_77b856f670_b.jpg) + +10. Top referring sites + +11. Top keyphrases used on Google's search engine + +If you also want to inspect the archived logs, you can pipe them to GoAccess as follows. + +For Debian and derivatives: + + # zcat -f /var/log/apache2/access.log* | goaccess + +For Red Hat based distributions: + + # cat /var/log/httpd/access* | goaccess + +Should you need a more detailed report of any of the above (1 through 11), press the desired section number and then O (uppercase o) to bring up what is called the Detailed View. The following image shows the output of 5-O (press 5, then press O): + +![](https://farm8.staticflickr.com/7382/16302213429_48d9233f40_b.jpg) + +To display GeoIP location information, open the Detail View in the Hosts section, as explained earlier, and you will see the location of the client IPs that performed requests to your web server: + +![](https://farm8.staticflickr.com/7393/16488484075_d778aa91a2_z.jpg) + +If your system has not been very busy lately, some of the above sections will not show a great deal of information, but that situation can change as more and more requests are made to your web server. + +### Saving Reports for Offline Analysis ### + +There will be times when you don't want to inspect your system's stats in real time, but save it to a file for offline analysis or printing. To generate an HTML report, simply redirect the output of the GoAccess commands mentioned earlier to an HTML file. Then just point your web browser to the file to open it. + + # zcat -f /var/log/apache2/access.log* | goaccess > /var/www/webserverstats.html + +Once the report is displayed, you will need to click on the Expand link to show the detail view on each category: + +![](https://farm9.staticflickr.com/8658/16486743041_bd8a80794d_o.png) + +注释:youtube视频 + + +As we have discussed throughout this article, GoAccess is an invaluable tool that will provide you, as a system administrator, with HTTP statistics in a visual report on the fly. Although GoAccess by default presents its results to the standard output, you can also save them to JSON, HTML, or CSV files. This converts GoAccess in an incredibly useful tool to monitor and display statistics of a web server. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/interactive-apache-web-server-log-analyzer-linux.html + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:http://goaccess.io/ +[2]:http://w3techs.com/technologies/details/os-linux/all/all +[3]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[4]:http://goaccess.io/download#dependencies +[5]:http://goaccess.io/download +[6]:http://httpd.apache.org/docs/2.4/logs.html \ No newline at end of file diff --git a/sources/tech/20150215 How to share files between computers over network with btsync.md b/sources/tech/20150215 How to share files between computers over network with btsync.md new file mode 100644 index 0000000000..3af649b886 --- /dev/null +++ b/sources/tech/20150215 How to share files between computers over network with btsync.md @@ -0,0 +1,136 @@ +How to share files between computers over network with btsync +================================================================================ +If you are the type of person who uses several devices to work online, I'm sure you must be using, or at least wishing to use, a method for syncing files and directories among those devices. + +BitTorrent Sync, also known as btsync for short, is a cross-platform sync tool (freeware) which is powered by BitTorrent, the famous protocol for peer-to-peer (P2P) file sharing. Unlike classic BitTorrent clients, however, btsync encrypts traffic and grants access to shared files based on auto-generated keys across different operating system and device types. + +More specifically, when you add files or folder to btsync as shareable, corresponding read/write keys (so-called secret codes) are created. These keys are then shared among different devices via HTTPS links, emails, QR codes, etc. Once two devices are paired via a key, the linked content can be synced directly between them. There is no file size limit, and transfer speeds are never throttled unless you explicitly say so. You will be able to create accounts inside btsync, under which you can create and manage keys and files to share via web interface. + +BitTorrent Sync is available on multiple operating systems including Linux, MacOS X, Windows, as well as [Android][1] and [iOS][2]. In this tutorial, I will show you how to use BitTorrent Sync to sync files between a Linux box (a home server), and a Windows machine (a work laptop). + +### Installing Btsync on Linux ### + +BitTorrent Sync is available for download from the [project's website][3]. I assume that the Windows version of BiTorrent Sync is installed on a Windows laptop, which can be done very easily. I will focus on installing and configuring it on the Linux server. + +In the download page, choose your architecture, right click on the corresponding link, choose Copy link location (or similar, depending on your browser), and paste the link to wget in your terminal, as follows: + +**For 64-bit Linux:** + + # wget http://download.getsyncapp.com/endpoint/btsync/os/linux-x64/track/stable + +**For 32-bit Linux:** + + # wget http://download.getsyncapp.com/endpoint/btsync/os/linux-i386/track/stable + +![](https://farm9.staticflickr.com/8635/15895277773_8acf317e3c_c.jpg) + +Once the download has completed, extract the contents of the tarball into a directory specially created for that purpose: + + # cd /usr/local/bin + # mkdir btsync + # tar xzf stable -C btsync + +![](https://farm8.staticflickr.com/7306/16329173869_7dc8b64a39_b.jpg) + +You can now either add /usr/local/bin/btsync to your PATH environment variable. + + export PATH=$PATH:/usr/local/bin/btsync + +or run the btsync binary right from that folder. We'll go with the first option as it requires less typing and is easier to remember. + +### Configuring Btsync ### + +Btsync comes with a built-in web server which is used as the management interface for BitTorrent Sync. To be able to access the web interface, you need to create a configuration file. You can do that with the following command: + + # btsync --dump-sample-config > btsync.config + +Then edit the btsync.config file (webui section) with your preferred text editor, as follows: + + "listen" : "0.0.0.0:8888", + "login" : "yourusername", + "password" : "yourpassword" + +You can choose any username and password. + +![](https://farm9.staticflickr.com/8599/15895277793_da63841433_b.jpg) + +![](Feel free to check the README file in /usr/local/bin/btsync directory if you want to tweak the configuration further, but this will do for now.) + +### Running Btsync for the First Time ### + +As system administrators we believe in logs! So before we launch btsync, we will create a log file for btsync. + + # touch /var/log/btsync.log + +Finally it's time to start btsync: + + # btsync --config /usr/local/bin/btsync/btsync.config --log /var/log/btsync.log + +![](https://farm8.staticflickr.com/7288/16327720298_ccf2cbedea_c.jpg) + +Now point your web browser to the IP address of the Linux server and the port where btsync is listening on (192.168.0.15:8888 in my case), and agree to the privacy policies, terms, and EULA: + +![](https://farm9.staticflickr.com/8597/16327720318_d52551fc44_b.jpg) + +and you will be taken to the home page of your btsync installation: + +![](https://farm8.staticflickr.com/7412/16329544687_9a174527d8_c.jpg) + +Click on Add a folder, and choose a directory in your file system that you want to share. In our example, we will use /btsync: + +![](https://farm8.staticflickr.com/7407/16515452485_e25ded559f_b.jpg) + +That's enough by now. Please install BitTorrent Sync on your Windows machine (or another Linux box, if you want) before proceeding. + +### Sharing Files with Btsync ### + +The following screencast shows how to sync an existing folder in a Windows 8 machine [192.168.0.106]. After adding the desired folder, get its key, and add it in your Linux installation via the "Enter a key or link" menu (as shown in the previous image), and the sync will start: + +注释:youtube视频 + + +Now repeat the process for other computers or devices; selecting a folder or files to share, and importing the corresponding key(s) in your "central" btsync installation via the web interface on your Linux server. + +### Auto-start Btsync as a Normal User ### + +You will notice that the synced files in the screencast were created in the /btsync directory belonging to user and group 'root'. That is because we launched BitTorrent Sync manually as the superuser. However, under normal circumstances, you will want to have BitTorrent Sync start on boot and running as a non-privileged user (www-data or other special account created for that purpose, btsync user for example). + +To do so, create a user called btsync, and add the following stanza to the /etc/rc.local file (before the exit 0 line): + + sudo -u btsync /usr/local/bin/btsync/btsync --config /usr/local/bin/btsync/btsync.config --log /var/log/btsync.log + +Finally, create the pid file: + + # touch /usr/local/bin/btsync/.sync//sync.pid + +and change the ownership of /usr/local/bin/btsync recursively: + + # chown -R btsync:root /usr/local/bin/btsync + +Now reboot and verify that btsync is running as the intended user: + +![](https://farm9.staticflickr.com/8647/16327988660_644f6d4505_c.jpg) + +Based on your chosen distribution, you may find other ways to enable btsync to start on boot. In this tutorial I chose the rc.local approach since it's distribution-agnostic. + +### Final Remarks ### + +As you can see, BitTorrent Sync is almost like server-less Dropbox for you. I said "almost" because of this: When you sync between devices on the same local network, sync happens directly between two devices. However, if you try to sync across different networks, and the devices to be paired are behind restrictive firewalls, there is a chance that the sync traffic goes through a third-party relay server operated by BitTorrent. While they claim that the traffic is [AES-encrypted][4], you may still not want this to happen. For your privacy, be sure to turn off relay/tracker server options in every folder that you are sharing. + +Hope it helps! Happy syncing! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/share-files-between-computers-over-network.html + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:https://play.google.com/store/apps/details?id=com.bittorrent.sync +[2]:https://itunes.apple.com/us/app/bittorrent-sync/id665156116 +[3]:http://www.getsync.com/ +[4]:http://www.getsync.com/tech-specs \ No newline at end of file diff --git a/sources/tech/20150225 How to Hide PHP Version in Linux.md b/sources/tech/20150225 How to Hide PHP Version in Linux.md new file mode 100644 index 0000000000..ddc219bac1 --- /dev/null +++ b/sources/tech/20150225 How to Hide PHP Version in Linux.md @@ -0,0 +1,56 @@ +How to Hide PHP Version in Linux +================================================================================ +In general, most of the web server software has been installed with default settings that will lead to information leakage. One of them is a PHP software. PHP (Hypertest Preprocessor) is one of the most popular server-side HTML embedded scripting language for the websites today. In the current challenging times, there are lots of attacker will try to discover the weaknesses in your your server system. Hence, i will describe the simple way to hide the PHP information in Linux server. + +By default **expose_php** is set to On. Turning off the “expose_php” parameter causes that PHP will hide it version details. + + [root@centos66 ~]# vi /etc/php.ini + +In your php.ini, locate the line containing expose_php On and set it to Off: + + expose_php = Off + +Before the changes, web server header will look like below : + + [root@centos66 ~]# curl -I http://www.ehowstuff.com/ + +---------- + + HTTP/1.1 200 OK + Server: nginx + Content-Type: text/html; charset=UTF-8 + Vary: Accept-Encoding + X-Powered-By: PHP/5.3.3 + X-Pingback: http://www.ehowstuff.com/xmlrpc.php + Date: Wed, 11 Feb 2015 14:10:43 GMT + X-Page-Speed: 1.9.32.2-4321 + Cache-Control: max-age=0, no-cache + +After the changes, PHP will no longer show the version to the web server header : + +[root@centos66 ~]# curl -I http://www.ehowstuff.com/ + +HTTP/1.1 200 OK +Server: nginx +Date: Wed, 11 Feb 2015 15:38:14 GMT +Content-Type: text/html; charset=UTF-8 +Vary: Accept-Encoding +X-Pingback: http://www.ehowstuff.com/xmlrpc.php +Date: Wed, 11 Feb 2015 14:10:43 GMT +X-Page-Speed: 1.9.32.2-4321 +Cache-Control: max-age=0, no-cache + +As always if you need any help you can reach us on twitter @ehowstuff or drop us a comment below. [Jumping through archives page to read more articles..][1] + +-------------------------------------------------------------------------------- + +via: http://www.ehowstuff.com/how-to-hide-php-version-in-linux/ + +作者:[skytech][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ehowstuff.com/author/mhstar/ +[1]:http://www.ehowstuff.com/archives/ \ No newline at end of file From 7c73b8be9d11601e73bf7a8266fa712ab0dd79e1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sun, 15 Feb 2015 15:50:07 +0800 Subject: [PATCH 041/163] =?UTF-8?q?20150215-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Icons From Dock In Elementary OS Freya.md | 55 +++++++++++++++++++ ...fault Instead of Ubuntu Software Center.md | 46 ++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md create mode 100644 sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md diff --git a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md new file mode 100644 index 0000000000..cccee5971a --- /dev/null +++ b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md @@ -0,0 +1,55 @@ +Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya [Quick Tip] +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) + +This quick tip shows you **how to get rid of two Google Chrome icons from the dock in Elementary OS Freya**. + +I hardly use the default Midori browser in [Elementary OS][1] Freya as Google Chrome is my main browser across all OSes. While [Midori][2] is kept in the dock by default, you’ll have to search for Google Chrome in Slingshot (applications) every time you want to open Google Chrome. To save time, I presume you have selected the “keep in dock” option for a quick access to Chrome. + +The problem here is that when you click on the Chrome icon in the dock, it creates another instance of Google Chrome. This leaves you with two Chrome icons in the docks and this is something that might be ignored by many but definitely an annoyance and against the design. If you share the same feeling, let’s see how can we remove the second Google Chrome icon. + +### Remove two Google Chrome icons from dock in Elementary OS Freya ### + +#### Step 1: #### + +Remove Google Chrome from the dock. + +#### Step 2: #### + +Open the terminal and use the following command: + + cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications + +#### Step 3: #### + +Next we need to edit the google-chrome.desktop file. Use the following commands: + + scratch-text-editor ~/.local/share/applications/google-chrome.desktop + +It will open the google-chrome.desktop file in Scratch for editing. Under the [Desktop Entry] section, add the following line: + + StartupWMClass=Google-chrome-stable + +It will look a bit like this: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/two_Google_Chrome_Elementary_Freya.png) + +#### Step 4: #### + +Go to Slingshot and open Google Chrome again. Do select “keep in dock” again. Close it and start it again to verify that it doesn’t open a new Chrome instance in the dock. No reboot of system is required here. + +I hope this quick tip helped you to remove multiple Google Chrome icons from dock in Elementary OS Freya. Feel free to ask your questions and drop your suggestions in the comment below. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://elementary.io/ +[2]:http://midori-browser.org/ \ No newline at end of file diff --git a/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md new file mode 100644 index 0000000000..9bcbbb967e --- /dev/null +++ b/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md @@ -0,0 +1,46 @@ +How To Make GDebi Default Instead of Ubuntu Software Center +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Make_GDebi_Default.jpeg) + +If you use Ubuntu or Ubuntu based Linux distribution such as Elementary OS Freya, you might be using Ubuntu Software Center to install .deb executable files. Ubuntu Software Center is a nice application for finding and installing apps but it is resource heavy and slow. This is why I prefer using [App Grid, a lighter alternative of Ubuntu Software Center][1]. + +Now, if you just trying to install a .deb file, I would not recommend either of Ubuntu Software Center or App Grid. I suggest GDebi, a dedicated program for installing Debian executable files. It is extremely lightweight and focused on installing .deb files. Best thing about GDebi is that it also shows the dependencies that will be installed along with the desired program. + +In this post we shall see **how to install GDebi and use it as the default installer instead of Ubuntu Software Center**. + +### Install GDebi in Ubuntu and other Linux distributions ### + +Open a terminal and use the following command: + + sudo apt-get install gdebi + +### Make GDebi default for .deb installation ### + +Once you have installed GDebi, it’s time to see how to make it the default application for installing .deb files. Please note that I am using Elementary OS Freya in this tutorial but the steps are applicable to all Ubuntu based distribution. Just the screenshots may look different. + +Download a .deb file first. Let’s say you have downloaded Google Chrome. Go to the download directory and right click on the .deb file. In here, go to **properties**. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default.jpeg) + +In the properties, you should see the option of **open with**. Click on it and change it to GDebi. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default_Ubuntu.jpeg) + +Next time you double click on a .deb file, it will automatically open GDebi to install the .deb file. Indeed using such light applications is a good way to [speed up Ubuntu][2] or other Linux systems. + +What do you say? You still prefer Ubuntu Software Center for application installation or GDebi? Or if you are old school, [Synaptic Package Manager][3] perhaps? Which one is your favorite? + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/gdebi-default-ubuntu-software-center/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/app-grid-lighter-alternative-ubuntu-software-center/ +[2]:http://itsfoss.com/speed-up-ubuntu-1310/ +[3]:http://www.nongnu.org/synaptic/ \ No newline at end of file From b9644b6f35a125a793cfb5e412438b24301bc610 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sun, 15 Feb 2015 16:23:09 +0800 Subject: [PATCH 042/163] =?UTF-8?q?20150215-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ux Games We Will See In 2015 And Beyond.md | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md diff --git a/sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md b/sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md new file mode 100644 index 0000000000..9f11f47573 --- /dev/null +++ b/sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md @@ -0,0 +1,136 @@ +A Look At What Linux Games We Will See In 2015 And Beyond +================================================================================ +Linux Gaming is dead they said, Linux Gaming is pointless they said...ah whatever. Here’s a look at what’s to come for us in 2015 and beyond. + +It's pretty hard to keep up with everything that's going on for us, but here's a quick look at what we could see soon. + +### Confirmed Games ### + +#### Adventure Games #### + +- [Firewatch][1] +- [Paradise Lost: First Contact][2] +- [SteamWorld Heist][3] + +#### Action Games #### + +- [Darksiders][4] +- [Darksiders II][5] +- [Ray's The Dead][6] +- [Skullgirls][7] + +#### FPS Games #### + +- [Bioshock Infinite][8] +- Half Life 3 /troll +- [Homefront: The Revolution][9] +- [Killing Floor 2][10] +- Serious Sam 4 (No official site for it yet) +- [Storm United][11] +- [SUPERHOT][12] + +#### Platformers #### + +- [Broforce][13] +- [Chasm][14] +- [Giana Sisters][15] +- [Heart Forth, Alicia][16] +- [Hot Tin Roof][17] +- [Infinifactory][18] +- [Mighty No. 9][19] +- [Night in the Woods][20] +- [Noct][21] +- [Oddworld: New 'N' Tasty][22] +- [Red Goddess][23] + +#### RPG Games #### + +- [Divinity: Original Sin][24] +- [Pillars Of Eternity][25] +- [Shadowrun: Hong Kong][26] +- [The Banner Saga][27] + +#### Strategy Games #### + +- [Age of Wonders III][28] +- [Banished][29] +- [Cities: Skylines][30] +- [Clockwork Empires][31] +- [Parkitect][32] +- [Scrolls][33] +- [Space Pirates And Zombies 2][34] + +#### Sandbox Games #### + +- [Terraria][35] +- [X Rebirth][36] + +#### Unconfirmed, but highly likely #### + +- [Company of Heroes 2][37] +- [Outlast][38] +- [Shadow Warrior][39] +- [Torchlight II][40] + +Then there’s the [two ports teased from Feral Interactive][41], we can’t let them be left out just because we don’t know what they are. + +We imagine Aspyr Media are also working on new bigger ports, but they have only just released their latest game, so it may be a few months until we see anything. + +**This isn't a complete list** of course, as we can easily forget with the sheer amount of games heading our way, and wow what a list! + +We have GDC next month, and we are expecting a few announcements too. While we don't have anything solid, with Valve's big presence with Steam Machines we are expecting at least some more Linux games, otherwise it we fear it may be a little lacklustre for Valve to only show off older existing games for Linux. + +What did we miss that you’re excited about for Linux? + +-------------------------------------------------------------------------------- + +via: http://www.gamingonlinux.com/articles/a-look-at-what-linux-games-we-will-see-in-2015-and-beyond.4963 + +作者:[liamdawe][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.gamingonlinux.com/profiles/1 +[1]:https://www.gamingonlinux.com/articles/category/17/articles/firewatch-a-first-person-mystery-game-finally-reveals-itself-in-a-trailer.4231 +[2]:http://www.asthreeworks.com/games/ +[3]:https://www.gamingonlinux.com/articles/category/17/articles/image-form-announces-steamworld-heist.4304 +[4]:https://www.gamingonlinux.com/articles/darksiders-linux-port-looks-like-it-is-still-happening.4893 +[5]:https://www.gamingonlinux.com/articles/darksiders-2-confirmed-for-linux.4154 +[6]:http://ragtagstudio.com/?page_id=457 +[7]:https://www.gamingonlinux.com/articles/editorial-skullgirls-on-linux-finally-shows-some-progress.4789 +[8]:https://www.gamingonlinux.com/articles/bioshock-infinite-looks-set-for-a-linux-release-confirmed.4668 +[9]:http://www.homefront-game.com/ +[10]:https://www.gamingonlinux.com/articles/category/17/articles/killing-floor-2-fps-has-a-new-trailer.4676 +[11]:https://www.gamingonlinux.com/articles/storm-united-online-fps-shows-first-real-gameplay-video-first-alpha-due-soon.4872 +[12]:http://superhotgame.com/ +[13]:http://steamcommunity.com/app/274190/discussions/0/540738051503306548/#c540738051518330743 +[14]:https://www.gamingonlinux.com/articles/category/17/articles/chasm-rpg-platformer-will-have-a-same-day-linux-release.4266 +[15]:https://www.gamingonlinux.com/articles/linux-port-of-platformer-giana-sisters-brought-inhouse-sequel-might-get-sameday-release.4913 +[16]:http://www.alonsomartin.mx/hfa/ +[17]:http://www.hottinroofgame.com/ +[18]:https://twitter.com/zachtronics/status/566016742825005057 +[19]:http://www.mightyno9.com/ +[20]:http://www.nightinthewoods.com/ +[21]:https://www.gamingonlinux.com/articles/category/17/articles/noct-a-fantastic-top-down-thermal-image-survival-horror-game.4783 +[22]:https://www.gamingonlinux.com/articles/puzzle-platformer-oddworld-new-n-tasty-will-release-for-linux-next-month.4836 +[23]:https://www.gamingonlinux.com/articles/new-trailer-for-platformer-red-goddesss-looks-really-good.4939 +[24]:https://www.gamingonlinux.com/articles/divinity-original-sin-is-pushing-ahead-for-the-linux-release.4938 +[25]:https://www.gamingonlinux.com/articles/pillars-of-eternity-the-rpg-aims-for-a-sameday-linux-release-on-march-26th.4834 +[26]:https://www.kickstarter.com/projects/webeharebrained/shadowrun-hong-kong +[27]:https://www.gamingonlinux.com/articles/the-banner-saga-rpg-looks-close-to-a-linux-version.4862 +[28]:https://www.gamingonlinux.com/articles/the-linux-port-of-age-of-wonders-iii-is-progressing-a-bit-too-explosive-right-now.4857 +[29]:https://www.gamingonlinux.com/articles/banished-survival-city-building-sim-is-being-ported-to-linux.4813 +[30]:https://www.gamingonlinux.com/articles/city-builder-game-cities-skylines-now-has-a-release-date.4954 +[31]:https://www.gamingonlinux.com/articles/clockwork-empires-still-pushing-towards-a-linux-version-suffering-delays.4734 +[32]:https://www.gamingonlinux.com/articles/category/17/articles/parkitect-what-roller-coaster-tycoon-should-have-grown-into.4528 +[33]:https://www.gamingonlinux.com/articles/mojangs-scrolls-now-has-an-experimental-linux-build.4450 +[34]:https://www.gamingonlinux.com/articles/space-pirates-and-zombies-2-reveals-the-zombies-in-a-brand-new-video.4759 +[35]:https://www.gamingonlinux.com/articles/terraria-officially-confirmed-to-be-in-development-for-linux-finally.4299 +[36]:https://www.gamingonlinux.com/articles/egosofts-x-rebirth-actively-being-ported-to-linux.4822 +[37]:https://www.gamingonlinux.com/articles/company-of-heroes-2-looks-like-it-is-heading-to-linux.4199 +[38]:https://www.gamingonlinux.com/articles/outlast-that-really-scary-game-looks-like-its-still-heading-to-linux.4896 +[39]:https://www.gamingonlinux.com/articles/shadow-warrior-looks-like-it-will-come-to-linux.4859 +[40]:https://www.gamingonlinux.com/articles/torchlight-ii-has-even-more-positive-signs-for-linux.4817 +[41]:http://www.gamingonlinux.com/articles/feralinteractive.com/en/upcoming/ \ No newline at end of file From 2a9fe89b45481064a4915562ed2cab708f73413a Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 15 Feb 2015 16:31:31 +0800 Subject: [PATCH 043/163] PUB:20141226 How to Download Music from Grooveshark with a Linux OS @Stevearzh --- ...ow to Download Music from Grooveshark with a Linux OS.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/share => published}/20141226 How to Download Music from Grooveshark with a Linux OS.md (86%) diff --git a/translated/share/20141226 How to Download Music from Grooveshark with a Linux OS.md b/published/20141226 How to Download Music from Grooveshark with a Linux OS.md similarity index 86% rename from translated/share/20141226 How to Download Music from Grooveshark with a Linux OS.md rename to published/20141226 How to Download Music from Grooveshark with a Linux OS.md index 0af3e996d3..b6ecc8acbd 100644 --- a/translated/share/20141226 How to Download Music from Grooveshark with a Linux OS.md +++ b/published/20141226 How to Download Music from Grooveshark with a Linux OS.md @@ -6,7 +6,7 @@ **Grooveshark 对于喜欢音乐的人来说是一个不错的在线平台,同时有多种从上面下载音乐的方法。Groovesquid 是众多允许用户从 Grooveshark 上下载音乐的应用之一,并且是支持多平台的。** -只要有在线流媒体服务,就一定有方法从获取你之前看过或听过的视频及音乐。即使下载接口关闭了,也不是什么大不了的事,因为还有很多种解决方法,无论你用的什么操作系统。比如,网络上就有许多种 YouTube 下载器,同样的道理,从 Grooveshark 上下载音乐也并非难事。 +只要有在线流媒体服务,就一定有方法将你看过或听过的视频及音乐保存到本地。即使下载接口关闭了,也不是什么大不了的事,因为还有很多种解决方法,无论你用的什么操作系统。比如,网络上就有许多种 YouTube 下载器,同样的道理,从 Grooveshark 上下载音乐也并非难事。 现在,得考虑合法性的问题。与许多其他应用一样,Groovesquid 并非是完全不合法的。如果有用户使用应用去做一些非法的事情,那责任应归咎于用户。同样的道理也适用于 utorrent 或者 Bittorrent。只要你不触及版权问题,那你就可以无所顾忌的使用 Groovesquid 了。 @@ -14,7 +14,7 @@ 你能够找到的 Groovesquid 的唯一缺点是,它是基于 Java 而编写的,这从来都不是一个好的兆头。虽然为了确保应用的可移植性这样做确实是一个好方法,但这样做的结果导致了其糟糕的界面。确实是非常糟糕的的界面,不过这一点并不会影响到用户的使用体验,特别是这款应用所完成的工作时如此的有用。 -有一点需要注意的地方。Groovesquid 是一款免费的应用,但为了将免费保持下去,它会在菜单栏的右侧显示一则广告。这对大多数人来说都应该不是问题,不过最好在打开应用后注意下菜单栏右侧。 +有一点需要注意的地方。Groovesquid 是一款免费的应用,但为了将免费保持下去,它会在菜单栏的右侧显示一则广告。这对大多数人来说都应该不是问题,不过最好在打开应用后注意下菜单栏右侧(那不是应用的一部分)。 从易用性的角度来看,这款应用非常简洁。用户可以通过在顶部地址栏里输入链接直接下载单曲,地址栏的位置可以通过其左侧的下拉菜单进行修改。在下拉菜单中,也可以修改为歌曲名称、流行度、专辑名称、播放列表以及艺术家。有些选项向你提供了诸如查看 Grooveshark 上最流行的音乐,或者下载整个播放列表等。 @@ -38,7 +38,7 @@ via: http://news.softpedia.com/news/How-to-Download-Music-from-Grooveshark-with- 作者:[Silviu Stahie][a] 译者:[Stevearzh](https://github.com/Stevearzh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 120d5e349aa0c04f2650b1d34743acc55655699e Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 15 Feb 2015 17:02:04 +0800 Subject: [PATCH 044/163] PUB:20140917 How to create a software RAID-1 array with mdadm on Linux @shipsw --- ...ftware RAID-1 array with mdadm on Linux.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20140917 How to create a software RAID-1 array with mdadm on Linux.md (83%) diff --git a/translated/tech/20140917 How to create a software RAID-1 array with mdadm on Linux.md b/published/20140917 How to create a software RAID-1 array with mdadm on Linux.md similarity index 83% rename from translated/tech/20140917 How to create a software RAID-1 array with mdadm on Linux.md rename to published/20140917 How to create a software RAID-1 array with mdadm on Linux.md index ddbdfc8689..4c183956d3 100644 --- a/translated/tech/20140917 How to create a software RAID-1 array with mdadm on Linux.md +++ b/published/20140917 How to create a software RAID-1 array with mdadm on Linux.md @@ -1,10 +1,10 @@ 如何使用linux程序mdadm创建软件RAID1软阵列 ================================================================================ -磁盘冗余阵列(RAID)是将多个物理磁盘结合成一个逻辑磁盘的技术,该技术可以提高磁盘容错性能,提高磁盘的读写速度。根据数据存储的排列(如 条带存储,镜像存储,奇偶或者他们的组合),定义了几个不同级别的RAID(RAID-0,RAID-1,RAID-5 等等)。磁盘阵列可以使用软件或者硬件方式实现。现代Linux操作系统中,基本的软件RAID功能是默认安装的。 +磁盘冗余阵列(RAID)是将多个物理磁盘结合成一个逻辑磁盘的技术,该技术可以提高磁盘容错性能,提高磁盘的读写速度。根据数据存储的排列(如:条带存储,镜像存储,奇偶或者他们的组合),定义了几个不同级别的RAID(RAID-0,RAID-1,RAID-5 等等)。磁盘阵列可以使用软件或者硬件方式实现。现代Linux操作系统中,基本的软件RAID功能是默认安装的。 本文中,我们将介绍软件方式构建RAID-1阵列(镜像阵列),RAID-1将相同的数据写到不同的设备中。虽然可以使用同一个磁盘的两个分区实现RAID-1,但是如果磁盘坏了的话数据就都丢了,所以没什么意义。实际上,这也是为什么大多数RAID级别都使用多个物理磁盘提供冗余。当单盘失效后不影响整个阵列的运行,并且可以在线更换磁盘,最重要的是数据不会丢失。尽管如此,阵列不能取代外部存储的定期备份。 -由于RAID-1阵列的大小是最小磁盘的大小,一般来说应该使用两个大小相同的磁盘来组建RAID-1。 +由于RAID-1阵列的大小是阵列中最小磁盘的大小,一般来说应该使用两个大小相同的磁盘来组建RAID-1。 ### 安装mdadm ### @@ -28,7 +28,7 @@ # aptitude install mdadm -Ubuntu系统中,会要求为电子邮件通知配置后缀MTA。你可以跳过去。 +Ubuntu系统中,会要求配置Postfix MTA 以发送电子邮件通知。你可以跳过去。 Debian系统中,安装程序会显示以下解释信息,用来帮助我们去判断是否将根目录安装到RAID阵列中。下面的所有操作都有赖于这一步,所以应该仔细阅读他。 @@ -38,13 +38,13 @@ Debian系统中,安装程序会显示以下解释信息,用来帮助我们 ![](https://farm6.staticflickr.com/5555/15198241896_29e08b977f.jpg) -提示是否开机启动阵列的时候,选择是。注意,这里需要往/etc/fstab 文件中添加一个条目使得系统启动的时候正确挂载阵列。 +提示是否开机启动阵列的时候,选择“是”。注意,这里需要往/etc/fstab 文件中添加一个条目使得系统启动的时候正确挂载阵列。 ![](https://farm4.staticflickr.com/3875/15220883342_2b1d689a0a_z.jpg) ### 硬盘分区 ### -现在开始准备建立阵列需要的硬盘。这里往插入两个8GB的usb磁盘,使用dmesg命令设备显示设备 /dev/sdb 和 /dev/sdc +现在开始准备建立阵列需要的硬盘。这里插入两个8GB的usb磁盘,使用dmesg命令设备显示设备 /dev/sdb 和 /dev/sdc # dmesg | less @@ -107,7 +107,7 @@ Debian系统中,安装程序会显示以下解释信息,用来帮助我们 ![](https://farm6.staticflickr.com/5583/15034683868_6c28564e5a_z.jpg) -'mdadm -D'命令提供的信息中,最重要就是阵列状态类。激活状态说明阵列正在进行读写操作。其他几个状态分别为 完成(读写完成)、降级(有一块磁盘失效或丢失)或者恢复中(一张新盘已插入,系统正在写入数据)。这几个状态涵盖类大多数情况。 +'mdadm -D'命令提供的信息中,最重要就是阵列状态类。激活状态说明阵列正在进行读写操作。其他几个状态分别为:完成(读写完成)、降级(有一块磁盘失效或丢失)或者恢复中(一张新盘已插入,系统正在写入数据)。这几个状态涵盖了大多数情况。 ### 格式化或加载磁盘阵列 ### @@ -128,7 +128,7 @@ Debian系统中,安装程序会显示以下解释信息,用来帮助我们 mdadm工具内置有磁盘阵列监控功能。当mdadm作为守护程序运行的时候(就像我们上文那样),会周期性的检测阵列运行状态,将检测到的信息通过电子邮件或者系统日志报告上来。当然,也可以配置其在发生致命性错误的时候调用紧急命令。 -mdadm默认会记录所有已知分区和阵列的事件,并将他们记录到 /var/log/syslog中。或者你可以在配置文件中(/etc/mdadm/mdadm.conf debian系统 /etc/mdadm.conf 红帽子系统)以以下格式指定监控设备或者阵列。如果mdadm.conf文件不存在,你可以创建一个。 +mdadm默认会记录所有已知分区和阵列的事件,并将他们记录到 /var/log/syslog中。或者你可以在配置文件中(debian系统:/etc/mdadm/mdadm.conf ,红帽子系统:/etc/mdadm.conf )用以下格式指定监控设备或者阵列。如果mdadm.conf文件不存在,你可以创建一个。 DEVICE /dev/sd[bcde]1 /dev/sd[ab]1 @@ -169,7 +169,7 @@ CentOS或者RHEL 6: ![](https://farm6.staticflickr.com/5563/15218183681_63a10da704_z.jpg) -现在我们的阵列已经可以访问类,拷贝文件/etc/passwd到/mnt中测试一下: +现在我们的阵列已经可以访问了,拷贝文件/etc/passwd到/mnt中测试一下: ![](https://farm6.staticflickr.com/5593/15034475219_a3476aec0a_o.png) @@ -179,7 +179,7 @@ Debian系统中,需要在/etc/default/mdadm 设置 AUTOSTART 变量为 true ### 模拟磁盘丢失故障 ### -我们将使用以下命令卸载磁盘来模拟磁盘故障。注意,在实际应用中,磁盘已经上故障状态了,不需要卸载。 +我们将使用以下命令卸载磁盘来模拟磁盘故障。注意,在实际应用中,磁盘如果已经是故障状态了,不需要卸载。 首先,卸载阵列: @@ -190,7 +190,7 @@ Debian系统中,需要在/etc/default/mdadm 设置 AUTOSTART 变量为 true # mdadm /dev/md0 --fail /dev/sdb1 #Marks /dev/sdb1 as faulty # mdadm --remove /dev/md0 /dev/sdb1 #Removes /dev/sdb1 from the array -然后,如果你有个备用盘的话,重新添加以下: +然后,如果你有个备用盘的话,重新添加一下: # mdadm /dev/md0 --add /dev/sdb1 @@ -208,7 +208,7 @@ Debian系统中,需要在/etc/default/mdadm 设置 AUTOSTART 变量为 true # mdadm /dev/md0 --add /dev/sdb1 # mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 -希望本文对你有所帮助 +希望本文对你有所帮助。 -------------------------------------------------------------------------------- @@ -216,7 +216,7 @@ via: http://xmodulo.com/2014/09/create-software-raid1-array-mdadm-linux.html 作者:[Gabriel Cánepa][a] 译者:[shipsw](https://github.com/shipsw) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 920bb55f3e8c471133ac9c4dc1f64636f3686167 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 16 Feb 2015 11:57:26 +0800 Subject: [PATCH 045/163] PUB:20141030 Test drive Linux with nothing but a flash drive @zpl1025 --- ...ve Linux with nothing but a flash drive.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20141030 Test drive Linux with nothing but a flash drive.md (83%) diff --git a/translated/tech/20141030 Test drive Linux with nothing but a flash drive.md b/published/20141030 Test drive Linux with nothing but a flash drive.md similarity index 83% rename from translated/tech/20141030 Test drive Linux with nothing but a flash drive.md rename to published/20141030 Test drive Linux with nothing but a flash drive.md index 9c1c8684d6..602c99eb18 100644 --- a/translated/tech/20141030 Test drive Linux with nothing but a flash drive.md +++ b/published/20141030 Test drive Linux with nothing but a flash drive.md @@ -1,7 +1,5 @@ 试试只用U盘加载Linux系统 ================================================================================ -![Penguins gathered together: Linux for the win](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/OSDC_Penguin_Image_520x292_12324207_0714_mm_v1a.png) -图片来源:Opensource.com 也许你听过Linux并对它有点好奇,终于想要实际体验一下,但可能不知道从哪儿开始。 @@ -9,25 +7,27 @@ 如果你手上正好有个U盘的话,那就可以试试做一个USB Linux启动盘。它是一个包含了整个操作系统并可以直接引导开机的U盘。创建它并不需要什么专业技术能力,让我们来看看怎么做,以及如何从USB引导进入Linux系统。 +![Penguins gathered together: Linux for the win](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/OSDC_Penguin_Image_520x292_12324207_0714_mm_v1a.png) + ### 你需要准备的 ### 除了一台台式机或笔记本电脑外,你还需要: - 一个空白的U盘-最好容量能有4GB或更多。 - 一个你想尝试的Linux发行版[ISO镜像][1](一种把所有磁盘内容打包起来的档案文件)。待会再详细介绍。 -- 一个叫[Unetbootin][2]的应用程序,它是一个开源的,跨平台的工具,用来创建USB启动盘。运行它并不需要启动Linux。在下面的教程中,我是在MacBook上运行的Unetbootiin。 +- 一个叫[Unetbootin][2]的应用程序,它是一个开源的,跨平台的工具,用来创建USB启动盘。运行它并不需要启动Linux。在下面的教程中,我是在MacBook上运行的Unetbootiin(LCTT 译注:它还有 Windows 和 Linux 版本)。 ### 开始干活 ### -把U盘插到你电脑的USB端口上,然后启动Unetbootin。然后会要求你输入电脑的登录密码。 +把U盘插到你电脑的USB端口上,然后启动Unetbootin。然后会要求你输入当前电脑的登录密码。 ![Unetbootin main window](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-main.png) -还记得之前提到的ISO镜像文件吗?有两种方式可以获得:要么自己从你想尝试的Linux发行版网站上下载,或者让Unetbootin帮你下载。还是选后者,在窗口顶部点击**选择发行版**,选择你想下载的发行版,然后点击**选择版本**来选择你希望尝试的发行版版本。 +还记得之前提到的ISO镜像文件吗?有两种方式可以获得:要么自己从你想尝试的Linux发行版网站上下载,或者让Unetbootin帮你下载。如果选后者,在窗口顶部点击**选择发行版**,选择你想下载的发行版,然后点击**选择版本**来选择你希望尝试的发行版版本。 ![Downloading a Linux distribution](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-download-distro.png) -或者,你也可以自己下载发行版。通常,我想尝试的Linux发行版都没有在列表中。如果选择另一个方向,点击**磁盘镜像**,然后点击按钮来选择你下载好的.iso文件。 +或者,你也可以自己下载发行版。通常,我想尝试的Linux发行版都没有在列表中。如果选择自己下载,那么点击**磁盘镜像**,然后点击按钮来选择你下载好的.iso文件。 注意到下面的选项**预留每次重新启动后保存文件的空间(仅Ubuntu有效)**吗?如果你尝试的是Ubuntu或它的任一个衍生版(比如Lubuntu或Xubuntu),你可以在U盘上留出几M空间用来保存文件,比如网页书签或你自己创建的文档。当用这个U盘下次启动Ubuntu的时候,你可以继续使用这些文件。 @@ -39,21 +39,21 @@ ### 检验USB启动盘 ### -这个时候,你需要拥抱一下自己内在的极客精神。不会太难,不过你将需要进入[BIOS][3]去偷看一下你电脑内部空间。你的电脑的BIOS会加载各种硬件,并控制电脑操作系统的引导或启动。 +这个时候,你需要拥抱一下自己内在的极客精神。这不会太难,不过你将需要进入[BIOS][3]去偷看一下你的电脑内部空间。你的电脑的BIOS会加载各种硬件,并控制电脑操作系统的引导或启动。 -BIOS通常会按这个顺序搜索操作系统(或者类似的顺序):硬盘,然后是CD/DVD光驱,然后是外部存储设备。你需要调整这个顺序,让外部存储设备(在这里,意味着你的U盘启动盘)成为BIOS第一个搜索的设备。 +BIOS通常会按这个顺序搜索操作系统(或者类似的顺序):硬盘,然后是CD/DVD光驱,然后是外部存储设备。你需要调整这个顺序,让外部存储设备(在这里,指的是你的U盘启动盘)成为BIOS第一个搜索的设备。 -要做到这个,把U盘插到电脑上再重启电脑。在看到提示信息**Press F2 to enter setup**之后,按它要求的做。在有的电脑上,这个键可能是F10。 +要做到这一点,请把U盘插到电脑上再重启电脑。在看到提示信息**Press F2 to enter setup**之后,按它要求的做。在有的电脑上,这个键可能是F10。 在BIOS里,用键盘上的向右方向键切换到**Boot**菜单。然后你将看到你电脑上的驱动器列表。使用键盘上的向下方向键选中名字为**USB HDD**的选项,然后按下**F6**移动这个选项到列表的顶部。 -完成后,按下**F10**来保存改动。然后你会从BIOS里被踢出来,然后电脑会自己启动。等一小会,你就会看到一个你正在尝试的Linux发行版的启动菜单。选择**Run without installing**(或者最接近的选项)。 +完成后,按下**F10**来保存改动。然后你会从BIOS里被踢出来,然后电脑会自己启动。等一小会,你就会看到一个你正在尝试的Linux发行版的启动菜单。选择**Run without installing**(或者最类似的选项)。 在进入桌面后,你可以连接上无线或有线网络,看看网页,试一试预装的软件。你还可以看看,比如说,你的打印机或扫描仪是否能在你试的这个发行版下正常工作。你要是真的想不开,也可以去摸一下命令行。 ### 能干什么 ### -根据你尝试的Linux发行版和你使用的U盘的速度,操作系统可能会需要更长的时间来加载,而且很可能比直接装到硬盘上会慢一点。 +根据你尝试的Linux发行版和你使用的U盘的速度,操作系统可能会需要较长的时间来加载,而且很可能比直接装到硬盘上会慢一点。 还有,你也只能运行Linux发行版里预装好的基本软件。通常会有网页浏览器,一个文字处理软件,一个文本编辑器,一个媒体播放器,一个相片浏览器,以及一套实用工具。这些应该足够给你使用Linux的感觉了。 @@ -65,7 +65,7 @@ via: https://opensource.com/life/14/10/test-drive-linux-nothing-flash-drive 作者:[Scott Nesbitt][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 3a79f4853cf05ae6ddc3ec6ea8e205f939014492 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 16 Feb 2015 14:40:17 +0800 Subject: [PATCH 046/163] translating --- sources/news/20150209 CrunchBang Linux Is Dead.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/news/20150209 CrunchBang Linux Is Dead.md b/sources/news/20150209 CrunchBang Linux Is Dead.md index 118baed41e..0f296e607e 100644 --- a/sources/news/20150209 CrunchBang Linux Is Dead.md +++ b/sources/news/20150209 CrunchBang Linux Is Dead.md @@ -1,4 +1,6 @@ -CrunchBang Linux Is Dead!!! +Translating----geekpi + +CrunchBang Linux 已死!!! ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Crunchbang_Linux_Dead.jpeg) @@ -29,4 +31,4 @@ via: http://itsfoss.com/crunchbang-linux-dead/ [a]:http://itsfoss.com/author/abhishek/ [1]:http://en.wikipedia.org/wiki/Openbox [2]:http://crunchbang.org/forums/viewtopic.php?id=38916 -[3]:http://itsfoss.com/pear-os-history/ \ No newline at end of file +[3]:http://itsfoss.com/pear-os-history/ From 1a5bb9aa805c5a0e77d3bd864b703f7e68cfcf52 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 16 Feb 2015 15:05:53 +0800 Subject: [PATCH 047/163] translated --- .../news/20150209 CrunchBang Linux Is Dead.md | 34 ------------------- .../news/20150209 CrunchBang Linux Is Dead.md | 32 +++++++++++++++++ 2 files changed, 32 insertions(+), 34 deletions(-) delete mode 100644 sources/news/20150209 CrunchBang Linux Is Dead.md create mode 100644 translated/news/20150209 CrunchBang Linux Is Dead.md diff --git a/sources/news/20150209 CrunchBang Linux Is Dead.md b/sources/news/20150209 CrunchBang Linux Is Dead.md deleted file mode 100644 index 0f296e607e..0000000000 --- a/sources/news/20150209 CrunchBang Linux Is Dead.md +++ /dev/null @@ -1,34 +0,0 @@ -Translating----geekpi - -CrunchBang Linux 已死!!! -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Crunchbang_Linux_Dead.jpeg) - -Yes! You read it correct. The minimalist Linux distribution **CrunchBang Linux has been discontinued**. - -CrunchBang Linux, popularly known for its abbreviated symbol #!, is based on Debian and comes with [Openbox][1] window manager. The dark themed Linux was/is a popular Linux choice for many experience Linux users. - -### CrunchBang discontinued for “it no longer holds any value” ### - -[Announcing][2] that CrunchBang will no longer be developed, head of the project Philip Newborough said that when he started the project, Linux world was different place. He mentioned that there was no ‘competition’ in the same ilk at that time but with the advancement of Linux distros like Lubuntu, Crunchbang doesn’t hold the same value. - -> For anyone who has been involved with Linux for the past ten years or so, I’m sure they’ll agree that things have moved on. Whilst some things have stayed exactly the same, others have changed beyond all recognition. It’s called progress, and for the most part, progress is a good thing. That said, when progress happens, some things get left behind, and for me, CrunchBang is something that I need to leave behind. I’m leaving it behind because I honestly believe that it no longer holds any value, and whilst I could hold on to it for sentimental reasons, I don’t believe that would be in the best interest of its users, who would benefit from using vanilla Debian. - -### What after CrunchBang demise? ### - -As happened in case of [Pear OS][3], CrunchBang forums will stay online. Downloads are available for now but will be removed in near future. Philip mentioned that he was excited about some of his incoming projects and his day job. I wish him luck in his future endeavors. It is sad to see the death of a nice Linux distribution like CrunchBang. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/crunchbang-linux-dead/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://en.wikipedia.org/wiki/Openbox -[2]:http://crunchbang.org/forums/viewtopic.php?id=38916 -[3]:http://itsfoss.com/pear-os-history/ diff --git a/translated/news/20150209 CrunchBang Linux Is Dead.md b/translated/news/20150209 CrunchBang Linux Is Dead.md new file mode 100644 index 0000000000..7d6cee2613 --- /dev/null +++ b/translated/news/20150209 CrunchBang Linux Is Dead.md @@ -0,0 +1,32 @@ +CrunchBang Linux 已死!!! +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Crunchbang_Linux_Dead.jpeg) + +是的,你没看错。最小的Linux发行版**CrunchBang Linux 已经消失了**。 + +CrunchBang Linux,大家都知道它的缩写符号 #!,基于的是Debian和[Openbox][1]窗口管理器。黑色主题的Linux是每一个有经验的Linux用户的选择。 + +### CrunchBang 因为 “不再有继续下去的价值” 而消失了 ### + +[公告][2]称CrunchBang将不在继续开发,项目的领头人Philip Newborough说他在开始这个项目的时候,Linux时间是一个不同的地方。他指出那时在相同的种类在同一时间段中没有‘竞争’,但是随着Linux发行版的进步如Lubuntu,Crunchbang不再有相同的价值了。 + +> 对于任何十年前使用Linux的人而言,我确定他们同意事物在发展。虽然一些事情一直保持不变,还有一些的变化超出了认知。这称之为进步,对于大部分事物而言,进步是一件好事。也就是说当进步发生时,一些事物落后了,对于我而言,CrunchBang就是我需要抛弃的东西。我抛弃它的原因是我真实地认为它不再具有任何价值了,虽然我还可以因为一些多愁善感的原因把它留下来,但是我不认为那些使用原生Debian用户的兴趣了。 + +### CrunchBang消失之后会怎么样? ### + +就像[Pear OS][3]那样,CrunchBang论坛仍将在线。现在仍可以下载但是不久的将来就会停止。Philip提到对他即将面对的新的项目和工作感到很激动。我希望他今后工作顺利。很难过见到一个像CrunchBang这样好的Linux发行版的消失。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/crunchbang-linux-dead/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://en.wikipedia.org/wiki/Openbox +[2]:http://crunchbang.org/forums/viewtopic.php?id=38916 +[3]:http://itsfoss.com/pear-os-history/ From 614ef1e612a5361511d8681ff626c94acd128835 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 17 Feb 2015 11:15:03 +0800 Subject: [PATCH 048/163] translating --- ...Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md b/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md index 552f98e3f2..fd9fab4e4e 100644 --- a/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md +++ b/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md @@ -1,3 +1,5 @@ +Translating---geekpi + OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10 ---- *Users have been advised to upgrade as soon as possible* @@ -30,4 +32,4 @@ via:http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-1 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://news.softpedia.com/editors/browse/silviu-stahie \ No newline at end of file +[a]:http://news.softpedia.com/editors/browse/silviu-stahie From 237e002be578123a69ad758f125291de847e1046 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 17 Feb 2015 11:33:56 +0800 Subject: [PATCH 049/163] translated --- ...Closed in Ubuntu 14.04 and Ubuntu 14.10.md | 35 ------------------- ...Closed in Ubuntu 14.04 and Ubuntu 14.10.md | 31 ++++++++++++++++ 2 files changed, 31 insertions(+), 35 deletions(-) delete mode 100644 sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md create mode 100644 translated/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md diff --git a/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md b/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md deleted file mode 100644 index fd9fab4e4e..0000000000 --- a/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md +++ /dev/null @@ -1,35 +0,0 @@ -Translating---geekpi - -OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10 ----- -*Users have been advised to upgrade as soon as possible* - -##Canonical published details about a new OpenJDK 7 version has been pushed to the Ubuntu 14.04 LTS and Ubuntu 14.10 repositories. This update fixes a number of problems and various vulnerabilities. - -The Ubuntu maintainers have upgraded the OpenJDK packages in the repositories and numerous fixes have been implemented. This is an important update and it covers a few libraries. - -"Several vulnerabilities were discovered in the OpenJDK JRE related to information disclosure, data integrity and availability. An attacker could -exploit these to cause a denial of service or expose sensitive data over the network,” reads the security notice. - -Also, "a vulnerability was discovered in the OpenJDK JRE related to information disclosure and integrity. An attacker could exploit this to -expose sensitive data over the network." - -These are just a couple of the vulnerabilities identified and corrected by the developer and implemented by the maintainers/., and for a more detailed description of the problems, you can see Canonical's security notification. Users have been advised to upgrade their systems as soon as possible. - -The flaws can be fixed if you upgrade your system to the latest openjdk-7-related packages specific to each distribution. To apply the patch, users will have to run the Update Manager application. In general, a standard system update will make all the necessary changes. All Java-related applications will have to be restarted. - --------------------------------------------------------------------------------- - -via:http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-14-04-and-Ubuntu-14-10-471605.shtml - -本文发布时间:29 Jan 2015, 16:53 GMT - -作者:[Silviu Stahie][a] - -译者:[译者ID](https://github.com/译者ID) - -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/silviu-stahie diff --git a/translated/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md b/translated/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md new file mode 100644 index 0000000000..1801580d00 --- /dev/null +++ b/translated/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md @@ -0,0 +1,31 @@ +OpenJDK 7的漏洞已经在Ubuntu 14.04 和Ubuntu 14.10中解决了 +---- +*建议用户尽快升级* + +## Canonical公布新的OpenJDK 7 的版本已经提交到Ubuntu 14.04 LTS和Ubuntu 14.10 的仓库中了。更新修复了大量的问题和漏洞。 + +Ubuntu维护者已经升级了仓库中的OpenJDK包,并且含有大量的修复。这是一个重要的更新切涵盖了少量的库。 + +安全公告中说“OpenJDK JRE中发现了一些信息泄露、数据完整性和可用性的漏洞。攻击者可以利用这些通过网络执行拒绝服务或者泄露信息。” + +同样,“OpenJDK JRE中发现了关于信息泄露和完整性的漏洞。攻击者可以利用这点通过网络泄露敏感信息。” + +这里有几个漏洞被开发者确认并修复,并有维护人员实现。关于问题的详细描述,你可以参考Canonical的安全通告。用户被建议尽快升级系统。 + +这个漏洞只要你升级到最新的openjdk 7相关的包就可以修复。要应用补丁,用户需要运行升级管理程序。通常上,一个标准系统更新就会运行必要的更新。所有java相关的程序需要重新启动。 + +-------------------------------------------------------------------------------- + +via:http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-14-04-and-Ubuntu-14-10-471605.shtml + +本文发布时间:29 Jan 2015, 16:53 GMT + +作者:[Silviu Stahie][a] + +译者:[geekpi](https://github.com/geekpi) + +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie From 761aec20665f70d0729f7522f90b8d41c1da9e53 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Feb 2015 13:08:33 +0800 Subject: [PATCH 050/163] =?UTF-8?q?=E9=80=89=E9=A2=98=EF=BC=88=E5=85=B3?= =?UTF-8?q?=E8=81=94=E6=96=87=E7=AB=A0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...from brute force attacks using fail2ban.md | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md diff --git a/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md b/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md new file mode 100644 index 0000000000..6397e82c7e --- /dev/null +++ b/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md @@ -0,0 +1,170 @@ +How to protect SSH server from brute force attacks using fail2ban +================ + +One common attack on SSH service is brute force attacks where a remote attacker indefinitely attempts to log in with different passwords. Of course there are arguments against password authentication for SSH, and alternative authentication mechanisms such as [public key authentication][1] or [two-factor authentication][2] exist to obsolete such attacks. Putting aside pros and cons of different authentication methods, let's consider the situation where password authentication is required. How would you protect your SSH server against brute-force attacks? + +[fail2ban][3] is a well-known open-source intrusion prevention framework on Linux that monitors various system log files (e.g., /var/log/auth.log or /var/log/secure) and automatically triggers various defensive actions upon detecting any suspicious activities. In fact, fail2ban can be quite useful to defend against brute force password guessing attacks on an SSH server. + +In this guide, I will demonstrate **how to install and configure fail2ban to protect an SSH server against brute force attacks from a remote IP address**. + +### Install Fail2ban on Linux + +To install fail2ban on CentOS or RHEL, first [set up EPEL repository][4], and then run the following command. + + $ sudo yum install fail2ban + +To install fail2ban on Fedora, simply run: + + $ sudo yum install fail2ban + +To install fail2ban on Ubuntu, Debian or Linux Mint: + + $ sudo apt-get install fail2ban + +### Configure Fail2ban for SSH Server + +Now you are ready to configure fail2ban to harden your SSH server. You need to edit the configuration file at /etc/fail2ban/jail.conf. The configuration file contains "DEFAULT" section where you define default parameters for all monitored services, and service-specific sections where you define any service-specific jails (e.g., SSH, Apache, etc) to overwrite default parameters. + +In the service-specific jail sections (somewhere after [DEFAULT] section), you need to define [ssh-iptables] section, where you define SSH-specific jail configurations. Actual IP address banning is done by iptables. + +The following is an example of /etc/fail2ban/jail.conf which contains "ssh-iptables" jail configuration. Of course there could be other application-specific jails depending on your needs. + + $ sudo vi /etc/fail2ban/jail.local + +``` +[DEFAULT] +# a space delimited list of IP addresses, CIDR prefixes, or DNS hostnames +# to bypass fail2ban protection +ignoreip = 127.0.0.1 172.31.0.0/24 10.10.0.0/24 192.168.0.0/24 + +# number of seconds during which a client host is blocked +bantime = 86400 + +# number of failures before a client host is blocked +maxretry = 5 + +# number of seconds within which "maxentry" failures result in banning +findtime = 600 + +mta = sendmail + +[ssh-iptables] +enabled = true +filter = sshd +action = iptables[name=SSH, port=ssh, protocol=tcp] +sendmail-whois[name=SSH, dest=your@email.com, sender=fail2ban@email.com] +# for Debian-based distros +logpath = /var/log/auth.log +# for Red Hat-based distros +logpath = /var/log/secure +# ssh-specific max-retry threshold +maxretry = 3 +``` + +According to the above configuration, fail2ban will automatically ban any remote IP address from which there have been at least 3 failed login attempts within the last 10 minutes. Once banned, the offending IP address will remain blocked for 24 hours. Such an event will be notified by sendemail to a recipient email address. + +Once the configuration file is ready, restart fail2ban service as follows. + +On Debian, Ubuntu or CentOS/RHEL 6: + + $ sudo service fail2ban restart + +On Fedora or CentOS/RHEL 7: + + $ sudo systemctl restart fail2ban + +To verify fail2ban is running successfully, run fail2ban-client command with "ping" argument. If fail2ban service is running okay, you should see "pong" as a response. + + $ sudo fail2ban-client ping + Server replied: pong + +### Test Protection against SSH Brute-Force Attacks with Fail2ban + +To test whether fail2ban works, try to SSH to the server using incorrect passwords to simulate a brute-force attack. In the mean time, monitor /var/log/fail2ban.log, which is logging any interesting events that are happening in fail2ban. + + $ sudo tail -f /var/log/fail2ban.log + +![](https://farm8.staticflickr.com/7550/15882084127_fccf9ca7b7_c.jpg) + +According to the log file above, fail2ban has banned an IP address 192.168.1.8, upon detecting multiple failed SSH login attempts from the IP address. + +### Check Fail2ban Status and Unban Blocked IP Addresses + +As fail2ban's "ssh-iptables" jail uses iptables to block offending IP addresses, you can easily verify the ban by checking current iptables rules as follows. + + $ sudo iptables --list -n + +``` +Chain INPUT (policy ACCEPT) +target prot opt source destination +fail2ban-SSH tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 + +Chain FORWARD (policy ACCEPT) +target prot opt source destination + +Chain OUTPUT (policy ACCEPT) +target prot opt source destination + +Chain fail2ban-SSH (1 references) +target prot opt source destination +DROP all -- 192.168.1.8 0.0.0.0/0 +RETURN all -- 0.0.0.0/0 0.0.0.0/0 +``` + +If you want to unblock the IP address from fail2ban, you can also use iptables command: + + $ sudo iptables -D fail2ban-SSH -s 192.168.1.8 -j DROP + +While you can check and manage fail2ban's IP blocklist manually with iptables command like above, a proper way is in fact to use fail2ban-client command-line tool. This tool allows you to manage not only "ssh-iptables" jail, but also any other types of fail2ban jails in a unified command-line interface. + +To check fail2ban status (which will show a list of currently active jails): + + $ sudo fail2ban-client status + +To check the status of a particular jail (e.g., ssh-iptables): + + $ sudo fail2ban-client status ssh-iptables + +The above command will show a list of banned IP addresses. + +![](https://farm8.staticflickr.com/7497/16067847655_021d23e320_b.jpg) + +To unban a particular IP address: + + $ sudo fail2ban-client set ssh-iptables unbanip 192.168.1.8 + +![](https://farm8.staticflickr.com/7465/16065915571_b215a8b344_b.jpg) + +Note that if you stop fail2ban, all blocked IP addresses will be unblocked. When you restart fail2ban, it will find a list of offending IP addresses from /var/log/secure (or /var/log/auth.log), and re-ban those IP addresses if the elapsed time of the offenses are still within ban time. + +### Set Fail2ban to Auto-start on Boot + +Once you haved tested fail2ban successfully, the last step is to enable fail2ban to launch automatically upon powering on your server. On Debian-based distributions, fail2ban auto-start is enabled by default. On Red Hat-based distributions, enable auto-start as follows. + +On CentOS/RHEL 6: + + $ sudo chkconfig fail2ban on + +On Fedora or CentOS/RHEL 7: + + $ sudo systemctl enable fail2ban + +### Summary + +In this tutorial, I demonstrated how to install and configure fail2ban to protect an SSH server. While fail2ban can mitigate brute-force password guessing attacks, please note that it cannot protect SSH servers against sophisticated distributed brute-force campaigns, where an attacker bypasses fail2ban by using many thousands of bot-controlled IP addresses. + +----------- + +via: http://linoxide.com/tools/linux-compress-decompress-tools/ + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-force-ssh-login-via-public-key-authentication.html +[2]:http://xmodulo.com/two-factor-authentication-ssh-login-linux.html +[3]:http://www.fail2ban.org/ +[4]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file From 2fc741d9e43755b8243b7fe9502ce28becf50e18 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Feb 2015 13:17:40 +0800 Subject: [PATCH 051/163] =?UTF-8?q?=E6=B8=85=E9=99=A4=E5=92=8C=E6=94=B6?= =?UTF-8?q?=E5=9B=9E=E8=BF=87=E6=9C=9F=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... as the Most Beautiful LibreOffice Ever.md | 38 ------ ...50202 The Pirate Bay Is Now Back Online.md | 38 ------ ...rth of Devuan GNU or Linux Distribution.md | 98 -------------- ... Ubuntu Edition, the First Ubuntu Phone.md | 45 ------- ...20141211 Open source all over the world.md | 3 - ... and the Integrated Open Source Company.md | 81 ----------- ...er the enterprise and other predictions.md | 2 - ...inus Tells Wired Leap Second Irrelevant.md | 29 ---- ...about diversity niceness in open source.md | 44 ------ ... Top 10 FOSS legal developments of 2014.md | 72 ---------- ...122 Top 10 open source projects of 2014.md | 126 ------------------ ...e a syslog server with rsyslog on Linux.md | 2 - ...l Repository in Ubuntu using APT-mirror.md | 1 - 13 files changed, 579 deletions(-) delete mode 100644 sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md delete mode 100644 sources/news/20150202 The Pirate Bay Is Now Back Online.md delete mode 100644 sources/news/20150205 Debian Forked over systemd--Birth of Devuan GNU or Linux Distribution.md delete mode 100644 sources/news/20150207 BQ and Canonical Officially Launch Aquaris E4.5 Ubuntu Edition, the First Ubuntu Phone.md delete mode 100644 sources/talk/20141217 Docker and the Integrated Open Source Company.md delete mode 100644 sources/talk/20150112 Linus Tells Wired Leap Second Irrelevant.md delete mode 100644 sources/talk/20150119 Linus Torvalds responds to Ars about diversity niceness in open source.md delete mode 100644 sources/talk/20150122 Top 10 FOSS legal developments of 2014.md delete mode 100644 sources/talk/20150122 Top 10 open source projects of 2014.md diff --git a/sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md b/sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md deleted file mode 100644 index 3718ee58a6..0000000000 --- a/sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md +++ /dev/null @@ -1,38 +0,0 @@ -LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever ----- -*The developer has made a lot of UI improvements* - -![LibreOffice 4.4](http://i1-news.softpedia-static.com/images/news2/LibreOffice-4-4-Releases-As-the-Most-Beautiful-LibreOffice-Ever-471575-2.jpg) - -The Document Foundation has just announced that a new major update has been released for LibreOffice and it brings important UI improvements, enough for them to call this the most beautiful version ever. - -The Document Foundation doesn't usually make the UI the main focus of an update, but now the developers are saying that this is the most beautiful release made so far and that says a lot. Fortunately, this version is not just about interface fixes and there are plenty of other major improvements that should really provide a very good reason to get LibreOffice 4.4. - -LibreOffice has been gaining quite a lot of fans and users, and the past couple of years have been very successful. The office suite is implemented by default in most of the important Linux distributions out there and it was adopted by numerous administrations and companies across the world. LibreOffice is proving to be a difficult adversary for Microsoft's Office and each new version makes it even better. -LibreOffice 4.4 brings a lot of new features - -If we move aside all the improvements made to the interface, we're still left with a ton of fixes and changes. The Document Foundation takes its job very seriously and all upgrades really improve the users' experience tremendously. - -"LibreOffice 4.4 has got a lot of UX and design love, and in my opinion is the most beautiful ever. We have completed the dialog conversion, redesigned menu bars, context menus, toolbars, status bars and rulers to make them much more useful. The Sifr monochrome icon theme is extended and now the default on OS X. We also developed a new Color Selector, improved the Sidebar to integrate more smoothly with menus, and reworked many user interface details to follow today’s UX trends," [says Jan "Kendy" Holesovsky](1), a member of the Membership Committee and the leader of the design team. - -Some of the other improvements include much better support for OOXML file formats, the source code has been "groomed" and cleaned after a Coverity Scan analysis, digital signatures for exported PDF files, improved import filters for Microsoft Visio, Microsoft Publisher and AbiWord files, and Microsoft Works spreadsheets, and much more. - -For now, the PPA doesn't have the latest version, but that should change soon. For the time being, you can download the [LibreOffice 4.4](2) source packages from Softpedia, if you want to compile them yourself. - --------------------------------------------------------------------------------- - -via:http://news.softpedia.com/news/LibreOffice-4-4-Releases-As-the-Most-Beautiful-LibreOffice-Ever-471575.shtml - -本文发布时间:29 Jan 2015, 14:16 GMT - -作者:[Silviu Stahie][a] - -译者:[译者ID](https://github.com/译者ID) - -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/silviu-stahie -[1]:http://blog.documentfoundation.org/2015/01/29/libreoffice-4-4-the-most-beautiful-libreoffice-ever/ -[2]:http://linux.softpedia.com/get/Office/Office-Suites/LibreOffice-60713.shtml \ No newline at end of file diff --git a/sources/news/20150202 The Pirate Bay Is Now Back Online.md b/sources/news/20150202 The Pirate Bay Is Now Back Online.md deleted file mode 100644 index acde800ad8..0000000000 --- a/sources/news/20150202 The Pirate Bay Is Now Back Online.md +++ /dev/null @@ -1,38 +0,0 @@ -The Pirate Bay Is Now Back Online ------- -*The website was closed for about seven weeks* -![The Pirate Bay](http://i1-news.softpedia-static.com/images/news2/The-Pirate-Bay-Is-Now-Back-Online-471802-2.jpg) -##After being [raided](1) by the police almost two months ago, (in)famous torrent website The Pirate Bay is now back online. Those who thought the website will never return will be either disappointed or happy given that The Pirate Bay seems to live once again. - -In order to celebrate its coming back, The Pirate Bay admins have posted a Phoenix bird on the front page, which signifies the fact that the website can't be killed only damaged. - -About two weeks after The Pirate Bay was raided the domain miraculously came back to life. Soon after a countdown appeared on the temporary homepage of The Pirate Bay indicating that the website is almost ready for a comeback. - -The countdown hinted to February 1, as the possible date for The Pirate Bay's comeback, but it looks like those who manage the website manage to pull it out one day earlier. - -Beginning today, those who have accounts on The Pirate Bay can start downloading the torrents they want. Other than the Phoenix on the front page there are no other messages that might point to the resurrection The Pirate Bay except for the fact that it's now operational. - -Admins of the website said a few weeks ago they will find ways to manage and optimize The Pirate Bay, so that there will be minimal chances for the website to be closed once again. Let's see how it lasts this time. - -##Another version of The Pirate Bay may be launched soon - -In related news, one of the members of the original staff was dissatisfied with the decisions made by the majority regarding some of the changes made in the way admins interact with the website. - -He told [Torrentfreak](2) earlier this week that he, along with a few others, will open his version of The Pirate Bay, which they claim will be the "real" one. - ------- -via:http://news.softpedia.com/news/The-Pirate-Bay-Is-Now-Back-Online-471802.shtml - -本文发布时间:31 Jan 2015, 22:49 GMT - -作者:[Cosmin Vasile][a] - -译者:[译者ID](https://github.com/译者ID) - -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/cosmin-vasile -[1]:http://news.softpedia.com/news/The-Pirate-Bay-Is-Down-December-9-2014-466987.shtml -[2]:http://torrentfreak.com/pirate-bay-back-online-150131/ \ No newline at end of file diff --git a/sources/news/20150205 Debian Forked over systemd--Birth of Devuan GNU or Linux Distribution.md b/sources/news/20150205 Debian Forked over systemd--Birth of Devuan GNU or Linux Distribution.md deleted file mode 100644 index 89299a55d5..0000000000 --- a/sources/news/20150205 Debian Forked over systemd--Birth of Devuan GNU or Linux Distribution.md +++ /dev/null @@ -1,98 +0,0 @@ -Debian Forked over systemd: Birth of Devuan GNU/Linux Distribution -================================================================================ -Debian GNU/Linux distribution is one of the oldest Linux distribution that is currently in working state. init used to be the default central management and configuration platform for Linux operating system before systemd emerged. Systemd from the date of its release has been very much controversial. - -Sooner or later it has replaced init on most of the Linux distribution. Debian remained no exception and Debian 8 codename JESSIE will be having systemd by default. The Debian adaptation of systemd in replacement of init caused polarization. This led to forking of Debian and hence Devuan GNU/Linux distribution born. - -Devuan project started with the primary goal to put back nit and remove controversial systemd. A lot of Linux Distribution are based on Debian or a derivative of Debian and one does not simply fork Debian. Debian will always attract developers. - -### What Devuan is all About? ### - -Devuan in Italian (pronounced Devone in English) suggests “Don’t panic and keep forking Debian”, for Init-Freedom lovers. Developers see Devuan as the beginning of a process which aims at base distribution and is able to protect the freedom of developers and community. - -![Devuan Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Devuan-Linux.jpg) - -Debian Forked over systemd: Birth of Devuan Linux - -Devuan project priority includes – interoperability, diversity and backward compatibility. It will derive its own installer and repos from Debian and modify where ever required. If everything works smooth by the mid of 2015 users can switch to Devuan from Debian 7 and start using devuan repos. - -The process of switching will fairly remain as simple as upgrading a Debian installation. The project will be as minimal as possible and completely in accordance of UNIX philosophy – “Doing one thing and doing it well”. The targeted users of Devuan will be System Admins, Developers and users having experience of Debian. - -The project started by italian developers has raised a fund of 4.5k€ (EUR) in the year 2014. They have moved distro infrastructure from GitHub to GitLab, progress on Loginkit (systemd Logind replaced), discussing Logo and other important aspects useful in long run. - -A few of the Logos are in discussion now are shown in the picture. - -![Devuan Logo Proposals](http://www.tecmint.com/wp-content/uploads/2015/02/Devuan-Logos.jpeg) - -Devuan Logo Proposals - -Have a look at them here at: [http://without-systemd.org/wiki/index.php/Category:Logo][1] - -The unrest over systemd that gave birth to Devuan is good or bad? Lets have a look. - -### Is Devuan fork a good thing? ### - -Well! difficult to answer that forking such a huge distro is really going to be of any good. A (group of) developer(s) who initially were working with Debian got unsatisfied with systemd and forked it. - -Now the actual number of developers working on Debian/Systemd decreased which is going to affect the productivity of both the projects. Now the same number of developers are working on two different projects. - -What you think would be the fate of Devuan as well as Debian project? Won’t it hinder the progress of either distro and Linux in the long run? - -Please give your [comments][2] about Devuan project. - -注:如果可以在发布文章的时候发布一个调查,就把下面这段发成一个调查,如果不行,就直接嵌入js代码 - - - -Do you think systemd for Debian is - -Good -Bad -Don't Know -Don't Care -Other: - -VoteView ResultsPolldaddy.com - - -**Do you really feel that Debian with systemd will have a bad fate as depicted below** - -![Strip SystmeD](http://www.tecmint.com/wp-content/uploads/2015/02/Strip-SystmeD.jpg) - -Strip SystmeD - -Time to wait for Devuan 1.0 and lets see what it could contain. - -### Conclusion ### - -All the major Linux Distributions Like Fedora, RedHat, openSUSE, SUSE Enterprise, Arch, Megia have already switched to Systemd, Ubuntu and Debian are in the way to replace init with systemd. Only Gentoo and Slack till date have shown no interest in systemd but who knows someday even Gentoo and slack too started moving in the same direction. - -The reputation of Debian as a Linux Distro is something very few have reached the mark. It is blessed by some hundreds of developers and millions of users. The actual question is what percentage of users and developers were not comfortable with systemd. If the percentage is really high then what led debian to switch to systemd. Had it moved against the wishes of its users and developers. If this is the case the chance of success of devuan is pretty fair. Well how many developers put long hours of code punching for the project. - -Hope the fate of this project will not be something like those distros which once was started with high degree of passion and enthusiasm and later the developers got uninterested. - -Post Script : Linus Torvalds do not mind systemd that much. - -**If you need Devuan, then join and support it now!** - -Development : [https://git.devuan.org][3] -Donations : [https://devuan.org/donate.html][4] -Discussions : [https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng][5] -Devuan Developers : onelove@devuan.org - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/debian-forked-over-systemd-birth-of-devuan-linux/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://without-systemd.org/wiki/index.php/Category:Logo -[2]:http://www.tecmint.com/debian-forked-over-systemd-birth-of-devuan-linux/#comments -[3]:https://git.devuan.org/ -[4]:https://devuan.org/donate.html -[5]:https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng \ No newline at end of file diff --git a/sources/news/20150207 BQ and Canonical Officially Launch Aquaris E4.5 Ubuntu Edition, the First Ubuntu Phone.md b/sources/news/20150207 BQ and Canonical Officially Launch Aquaris E4.5 Ubuntu Edition, the First Ubuntu Phone.md deleted file mode 100644 index 02b147abd9..0000000000 --- a/sources/news/20150207 BQ and Canonical Officially Launch Aquaris E4.5 Ubuntu Edition, the First Ubuntu Phone.md +++ /dev/null @@ -1,45 +0,0 @@ -BQ and Canonical Officially Launch Aquaris E4.5 Ubuntu Edition, the First Ubuntu Phone ------- -*Everything you need to know about Aquaris E4.5* - -##BQ and Canonical have officially announced the new Aquaris E4.5 Ubuntu Edition and the fact that the phone will be available in the coming weeks through a series of flash sales. - -Information about the imminent launch of BQ Ubuntu phone has been around for some time and now it the two companies seem to have decided to make it official. This is the first device powered by Ubuntu Touch and a lot of people will be paying very close attention to what is happening in the mobile world. - -Ubuntu Touch is the latest operating system from Canonical and it's a brand new experience that aims to be very different from what users can find right now on the market, and that includes systems like Jola or Firefox OS. The OS has been in the works for more than two years and it's a system designed to work on all kind of devices, across the hardware spectrum. - -##Who is BQ and why has Canonical chosen them? - -When Mark Shuttleworth announced the two partners for the launch of Ubuntu Touch, BQ and Meizu, most of the people watching asked the same question. Who? BQ is not a very big company, but it's a young company and it has already started to penetrate the European market with some interesting devices. In many ways, they are doing the same thing companies like Meizu or Xiaomi are trying and succeeded in China: to offer devices that are interesting and different from what everyone else is doing. - -Many Ubuntu fans have questioned Canonical’s decision of choosing small companies and not big ones, but they are trying to do the same thing as the just-mentioned hardware makers. They want to offer an operating system radically different from what everyone else is doing. It's easy to understand why the goals of Canonical and BQ are actually one and the same. - -##What is Ubuntu Touch? - -The new operating system developed by Canonical embraces the fact that people are now swiping a lot more than they are tapping. Smartphones are no longer something new and everyone can understand how to swipe and get things done on a phone. Ubuntu devs have taken this to a whole new level. The operating system has no buttons, with the exception of the regular power and volume buttons. Everything is done with swiped gestures, from all sides of the screen. - -Also, Ubuntu Touch brings a new concept to the market, that of scopes. There is no longer a home screen, just scopes defined by the user to expand the experience. For example, you can have a Music scope that aggregates all your music sources on a single screen. It's a different way of looking at your smartphone, but this is built for people who crave a new experience. Don't worry, regular apps still exist, but they are differently integrated. - -![Aquaris E4.5 Ubuntu Edition start screen](http://i1-news.softpedia-static.com/images/news2/BQ-and-Canonical-Officially-Launch-Aquaris-E4-5-Ubuntu-Edition-472397-5.jpg) - -"As any kind of content can be presented via Scopes - they provide developers an easy path for their creations to be integral to the device experience. It is simple to create new Scopes via an easy to use UI toolkit with much lower development and maintenance costs than traditional apps. Canonical and BQ have worked with a host of partners to ensure that there is a wealth of interesting, relevant and dynamic content available at launch, with more content partners to follow," said Cristian Parrino, VP Mobile at Canonical. - -##BQ’s Aquaris E4.5 Ubuntu Edition hardware specs - -First of all, it's important to know that Aquaris E4.5 Ubuntu Edition is a dual-sim phone and it comes unlocked so that everyone can use it with their network. It boasts a MediaTek Quad-Core Cortex A7 processor running at up to 1.3 GHz, a 4.5-inch screen, 1GB RAM, rear camera with high-quality BSI sensors, Largan lens, and autofocus with dual flash(8MP), and front camera with 5MP. - -It's also worth mentioning that several operators in Europe, including 3 Sweden, amena.com, giffgaff, and Portugal Telecom have decided to provide SIM bundles at purchase. The price is €169.90 ($191). - -So, are you ready to buy the Aquaris E4.5 Ubuntu Edition? - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/BQ-and-Canonical-Officially-Launch-Aquaris-E4-5-Ubuntu-Edition-472397.shtml - -作者:[Silviu Stahie][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/silviu-stahie \ No newline at end of file diff --git a/sources/talk/20141211 Open source all over the world.md b/sources/talk/20141211 Open source all over the world.md index 175d870cb7..bd306edd5a 100644 --- a/sources/talk/20141211 Open source all over the world.md +++ b/sources/talk/20141211 Open source all over the world.md @@ -1,6 +1,3 @@ -////translating by yupmoon - - Open source all over the world ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUS_OpenSourceExperience_520x292_cm.png) diff --git a/sources/talk/20141217 Docker and the Integrated Open Source Company.md b/sources/talk/20141217 Docker and the Integrated Open Source Company.md deleted file mode 100644 index 5a98324135..0000000000 --- a/sources/talk/20141217 Docker and the Integrated Open Source Company.md +++ /dev/null @@ -1,81 +0,0 @@ -Docker and the Integrated Open Source Company -================================================================================ -It’s been a long time since an open source project has gotten as much buzz and attention as Docker. The easiest way to explain the concept is, well, to look at the logo of the eponymous1 company that created and manages the project: - -![](http://2yj23r14cytosbxol4cavq337g.wpengine.netdna-cdn.com/wp-content/uploads/2014/12/docker.png) - -The reference in the logo is to shipping containers, one of the most important inventions of the 20th century. Actually, the word “invention” is not quite right: the idea of putting bulk goods into consistently-sized boxes goes back at least a few hundred years.[2][1] What changed the world was the standardization of containers by a trucking magnate named Malcom McLean and Keith Tantlinger, his head engineer. Tantlinger developed much of the technology undergirding the intermodal container, especially its corner casting and Twistlock mechanism that allowed the containers to be stacked on ships, transported by trucks, and moved by crane. More importantly, Tantlinger convinced McLean to release the patented design for anyone to copy without license, knowing that the technology would only be valuable if it were deployed in every port and on every transport ship in the world. Tantlinger, to put it in software terms, open-sourced the design. - -Shipping containers really are a perfect metaphor for what Docker is building: standardized containers for applications. - - -- Just as the idea of a container wasn’t invented by Tantlinger, Docker is building on a concept that has been around for quite a while. Companies like Oracle, HP, and IBM have used containers for many years, and Google especially has a very similar implementation to Docker that they use for internal projects. Docker, though, by being open source and [community-centric][2], offers the promise of standardization -- It doesn’t matter what is inside of a shipping container; the container itself will fit on any ship, truck, or crane in the world. Similarly, it doesn’t matter what app (and associated files, frameworks, dependencies, etc.) is inside of a docker container; the container will run on any Linux distribution and, more importantly, just about every cloud provider including AWS, Azure, Google Cloud Platform, Rackspace, etc. -- When you move abroad, you can literally have a container brought to your house, stick in your belongings, and then have the entire thing moved to a truck to a crane to a ship to your new country. Similarly, containers allow developers to build and test an application on their local machine and have confidence that the application will behave the exact same way when it is pushed out to a server. Because everything is self-contained, the developer does not need to worry about there being different frameworks, versions, and other dependencies in the various places the application might be run - -The implications of this are far-reaching: not only do containers make it easier to manage the lifecycle of an application, they also (theoretically) commoditize cloud services through the age-old hope of “write once run anywhere.” More importantly, at least for now, docker containers offer the potential of being far more efficient than virtual machines. Relative to a container, using virtual machines is like using a car transport ship to move cargo: each unique entity on the ship is self-powered, which means a lot of wasted resources (those car engines aren’t very useful while crossing the ocean). Similarly, each virtual machine has to deal with the overhead of its own OS; containers, on the other hand, all share the same OS resulting in huge efficiency gains.[3][4] - -In short, Docker is a really big deal from a technical perspective. What excites me, though, is that the company is also innovating when it comes to their business model. - ----------- - -The problem with monetizing open source is self-evident: if the software is freely available, what exactly is worth paying for? And, unlike media, you can’t exactly stick an advertisement next to some code! - -For many years the default answer has been to “be like Red Hat.” Red Hat is the creator and maintainer of the Red Hat Enterprise Linux (RHEL) distribution, which, like all Linux distributions, is freely available.[4][5] Red Hat, however, makes money by offering support, training, a certification program, etc. for enterprises looking to use their software. It is very much a traditional enterprise model – make money on support! – just minus the up-front license fees. - -This sort of business is certainly still viable; Hortonworks is [set to IPO][3] with a similar model based on Hadoop, albeit at a much lower valuation than it received during its last VC round. That doesn’t surprise me: I don’t think this is a particularly great model from a business perspective. - -To understand why it’s useful to think about there being three distinct parts of any company that is based on open source: the open source project itself, any value-added software built on top of that project, and the actual means of making money: - -![](http://2yj23r14cytosbxol4cavq337g.wpengine.netdna-cdn.com/wp-content/uploads/2014/12/opensourcepaper.jpg) - -*There are three parts of an open source business: the project itself, the value-added software on top of that project, and the means of monetization* - -The problem with the “Red Hat” model is the complete separation of all three of these parts: Red Hat doesn’t control the core project (Linux), and their value-added software (RHEL) is free, leaving their money-making support program to stand alone. To the company’s credit they have pulled this model off, but I think a big reason is because utilizing Linux was so much more of a challenge back in the 90s.[5][11] I highly doubt Red Hat could successfully build a similar business from scratch today. - -![](http://2yj23r14cytosbxol4cavq337g.wpengine.netdna-cdn.com/wp-content/uploads/2014/12/redhatpaper.jpg) - -*The three parts of Red Hat’s business are separate and more difficult for the company to control and monetize* - -GitHub, the repository hosting service, is exploring what is to my mind a more compelling model. GitHub’s value-added software is a hosting service based on Git, an open-source project designed by Linux creator Linus Torvalds. Crucially, GitHub is seeking to monetize that hosting service directly, both through a SaaS model and through an on-premise enterprise offering[6][6]. This means that, in comparison to Red Hat, there is one less place to disintermediate GitHub: you can’t get their value-added software (for private projects – public is free) unless you’re willing to pay. - -![](http://2yj23r14cytosbxol4cavq337g.wpengine.netdna-cdn.com/wp-content/uploads/2014/12/githubpaper.jpg) - -*While GitHub does not control Git, their value-added software and means of monetization are unified, making the latter much easier and more sustainable* - -Docker takes the GitHub model a step further: the company controls everything from the open source project itself to the value-added software (DockerHub) built on top of that, and, just last week, [announced a monetization model][7] that is very similar to GitHub’s enterprise offering. Presuming Docker continues its present momentum and finds success with this enterprise offering, they have the potential to be a fully integrated open source software company: project, value-added software, and monetization all rolled into one. - -![](http://2yj23r14cytosbxol4cavq337g.wpengine.netdna-cdn.com/wp-content/uploads/2014/12/dockerpaper.jpg) - -*Docker controls all the parts of their business: they are a fully integrated open source company.* - -This is exciting, and, to be honest, a little scary. What is exciting is that very few movements have had such a profound effect as open source software, and not just on the tech industry. Open source products are responsible for end user products like this blog; more importantly, open source technologies have enabled exponentially more startups to get off the ground with minimal investment, vastly accelerating the rate of innovation and iteration in tech.[7][8] The ongoing challenge for any open source project, though, is funding, and Docker’s business model is a potentially sustainable solution not just for Docker but for future open source technologies. - -That said, if Docker is successful, over the long run commercial incentives will steer the Docker open source project in a way that benefits Docker the company, which may not be what is best for the community broadly. That is what is scary about this: might open source in the long run be subtly corrupted by this business model? The makers of CoreOS, a stripped-down Linux distribution that is a perfect complement for Docker, [argued that was the case][9] last week: - -> We thought Docker would become a simple unit that we can all agree on. Unfortunately, a simple re-usable component is not how things are playing out. Docker now is building tools for launching cloud servers, systems for clustering, and a wide range of functions: building images, running images, uploading, downloading, and eventually even overlay networking, all compiled into one monolithic binary running primarily as root on your server. The standard container manifesto was removed. We should stop talking about Docker containers, and start talking about the Docker Platform. It is not becoming the simple composable building block we had envisioned. - -This, I suppose, is the beauty of open source: if you disagree, fork, which is essentially what CoreOS did, launching their own “Rocket” container.[8][10] It also shows that Docker’s business model – and any business model that contains open source – will never be completely defensible: there will always be a disintermediation point. I suspect, though, that Rocket will fail and Docker’s momentum will continue: the logic of there being one true container is inexorable, and Docker has already built up quite a bit of infrastructure and – just maybe – a business model to make it sustainable. - --------------------------------------------------------------------------------- - -via: http://stratechery.com/2014/docker-integrated-open-source-company/ - -作者:[Ben Thompson][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://stratechery.com/category/about/ -[1]:http://stratechery.com/2014/docker-integrated-open-source-company/#fn:1:1300 -[2]:https://github.com/docker/docker -[3]:http://blogs.wsj.com/digits/2014/12/01/ipo-bound-hortonworks-drops-out-of-billion-dollar-startup-club/ -[4]:http://stratechery.com/2014/docker-integrated-open-source-company/#fn:2:1300 -[5]:http://stratechery.com/2014/docker-integrated-open-source-company/#fn:3:1300 -[6]:http://stratechery.com/2014/docker-integrated-open-source-company/#fn:5:1300 -[7]:http://blog.docker.com/2014/12/docker-announces-docker-hub-enterprise/ -[8]:http://stratechery.com/2014/docker-integrated-open-source-company/#fn:6:1300 -[9]:https://coreos.com/blog/rocket/ -[10]:http://stratechery.com/2014/docker-integrated-open-source-company/#fn:7:1300 -[11]:http://stratechery.com/2014/docker-integrated-open-source-company/#fn:4:1300 \ No newline at end of file diff --git a/sources/talk/20141219 2015 will be the year Linux takes over the enterprise and other predictions.md b/sources/talk/20141219 2015 will be the year Linux takes over the enterprise and other predictions.md index 4718480b82..0d2b26cc98 100644 --- a/sources/talk/20141219 2015 will be the year Linux takes over the enterprise and other predictions.md +++ b/sources/talk/20141219 2015 will be the year Linux takes over the enterprise and other predictions.md @@ -1,5 +1,3 @@ -translating by barney-ro - 2015 will be the year Linux takes over the enterprise (and other predictions) ================================================================================ > Jack Wallen removes his rose-colored glasses and peers into the crystal ball to predict what 2015 has in store for Linux. diff --git a/sources/talk/20150112 Linus Tells Wired Leap Second Irrelevant.md b/sources/talk/20150112 Linus Tells Wired Leap Second Irrelevant.md deleted file mode 100644 index ee1516c474..0000000000 --- a/sources/talk/20150112 Linus Tells Wired Leap Second Irrelevant.md +++ /dev/null @@ -1,29 +0,0 @@ -Linus Tells Wired Leap Second Irrelevant -================================================================================ -![](https://farm4.staticflickr.com/3852/14863156322_a354770b14_o.jpg) - -Two larger publications today featured Linux and the effect of the upcoming leap second. The Register today said that the leap second effects of the past are no longer an issue. Coincidentally, Wired talked to Linus Torvalds about the same issue today as well. - -**Linus Torvalds** spoke with Wired's Robert McMillan about the approaching leap second due to be added in June. The Register said the last leap second in 2012 took out Mozilla, StumbleUpon, Yelp, FourSquare, Reddit and LinkedIn as well as several major airlines and travel reservation services that ran Linux. Torvalds told Wired today that the kernel is patched and he doesn't expect too many issues this time around. [He said][1], "Just take the leap second as an excuse to have a small nonsensical party for your closest friends. Wear silly hats, get a banner printed, and get silly drunk. That’s exactly how relevant it should be to most people." - -**However**, The Register said not everyone agrees with Torvalds' sentiments. They quote Daily Mail saying, "The year 2015 will have an extra second — which could wreak havoc on the infrastructure powering the Internet," then remind us of the Y2K scare that ended up being a non-event. The Register's Gavin [Clarke concluded][2]: - -> No reason the Penguins were caught sans pants. - -> Now they've gone belt and braces. - -The take-away is: move along, nothing to see here. - --------------------------------------------------------------------------------- - -via: http://ostatic.com/blog/linus-tells-wired-leap-second-irrelevant - -作者:[Susan Linton][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://ostatic.com/member/susan-linton -[1]:http://www.wired.com/2015/01/torvalds_leapsecond/ -[2]:http://www.theregister.co.uk/2015/01/09/leap_second_bug_linux_hysteria/ \ No newline at end of file diff --git a/sources/talk/20150119 Linus Torvalds responds to Ars about diversity niceness in open source.md b/sources/talk/20150119 Linus Torvalds responds to Ars about diversity niceness in open source.md deleted file mode 100644 index b98e27eacf..0000000000 --- a/sources/talk/20150119 Linus Torvalds responds to Ars about diversity niceness in open source.md +++ /dev/null @@ -1,44 +0,0 @@ -Linus Torvalds responds to Ars about diversity, niceness in open source -================================================================================ -> Acknowledges diversity factors, says "we're different in so many other ways." - -![See, sometimes Linus isn't flicking people off.](http://cdn.arstechnica.net/wp-content/uploads/2013/09/linus-torvalds.jpg) -See, sometimes Linus isn't flicking people off. - -Athanasios Kasampalis - -On Thursday, Linux legend Linus Torvalds sent a lengthy statement to Ars Technica responding to [statements he made in Auckland, New Zealand earlier that day about diversity and "niceness"][2] in the open source sector. - -"What I wanted to say [at the keynote]—and clearly must have done very badly—is that one of the great things about open source is exactly the fact that different people are so different," Torvalds wrote via e-mail. "I think people sometimes look at it as being just 'programmers,' which is not true. It's about all the people who are more oriented toward commercial things, too. It's about all those people who are interested in legal issues—and the social ones, too!" - -Torvalds spoke to what he thought was a larger concept of "diversity" than what has been mentioned a lot in recent stories on the topic, including economic disparity, language, and culture (even between neighboring European countries). "There's a lot of talk about gender and sexual preferences and race, but we're different in so many other ways, too," he wrote. - -"'Open source' as a term and as a movement hasn't been about 'you have to be a believer,'" Torvalds added. "It's not a religion. It's not an 'us vs them' thing. We've been able to work with all those 'evil commercial interests' and companies who also do proprietary software. And I think that was one of the things that the Linux community (and others—don't get me wrong, it's not unique to us) did and does well." - -Torvalds also talked about progress since the GPL vs. BSD "flame wars" from the '80s and early '90s, saying that the open source movement brought more technology and less "ideology" to the sector. "Which is not to say that a lot of people aren't around because they believe it's the 'ethical' thing to do (I do myself too)," Torvalds added, "but you don't have to believe that, and you can just do it because it's the most fun, or the most efficient way to do technology development." - -### “This ‘you have to be nice’ seems very popular in the US” ### - -He then sent a second e-mail to Ars about the topic of "niceness" that came up during the keynote. He said that his return to his Auckland hotel was delayed by "like three hours" because of hallway conversations about this very topic. - -"I don't know where you happen to be based, but this 'you have to be nice' seems to be very popular in the US," Torvalds continued, calling the concept an "ideology." - -"The same way we have developers and marketing people and legal people who speak different languages, I think we can have some developers who are used to—and prefer—a more confrontational style, and still **also** have people who don't," he wrote. - -He lambasted the "brainstorming" model of having a criticism-free bubble to bounce ideas off of. "Maybe it works for some people, but I happen to simply not believe in it," he said. "I'd rather be really confrontational, and bad ideas should be [taken] down aggressively. Even good ideas need to be vigorously defended." - -"Maybe it's just because I like arguing," Torvalds added. "I'm just not a huge believer in politeness and sensitivity being preferable over bluntly letting people know your feelings. But I also understand that other people are driven away by cursing and crass language when it all gets a bit too carried away." To that point, Torvalds said that the open source movement might simply need more "people who are good at mediating," as opposed to asking developers to calm their own tone or attitude. - --------------------------------------------------------------------------------- - -via: http://arstechnica.com/business/2015/01/linus-torvalds-responds-to-ars-about-diversity-niceness-in-open-source/ - -作者:[Sam Machkovech][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://arstechnica.com/author/samred/ -[1]:https://secure.flickr.com/photos/12693492@N04/1338136415/in/photolist-33fikv-3jXFce-3ALpLy-4m6Shj-4pADUg-4pHwcW-4rNTR7-4GMhKc-4HM2qp-4JSHKa-4PomQo-4SKxMo-58LBYf-5iVNX6-5tXbB8-5xi67A-5A8rRc-5C8fAT-5Ccxjw-5EcYvx-5UoNTc-5UoVJK-5Uti6q-5UuiX2-5UuE2B-5UyEJu-5UyHMf-5UyJ2G-5UFbXP-5UFg8Z-5UFhwV-5UKDkG-5UKDP9-5UTHGv-5XM2s2-5YFmLu-65N31L-6pSwh7-6trmfx-6H2uZP-6JVV4V-71qkot-71BBbk-72vuYo-73j9yB-79aQ2a-79bfqe-79EKPH-79EXvD-79PuG5-7a4BxF -[2]:http://arstechnica.com/business/2015/01/linus-torvalds-on-why-he-isnt-nice-i-dont-care-about-you/ \ No newline at end of file diff --git a/sources/talk/20150122 Top 10 FOSS legal developments of 2014.md b/sources/talk/20150122 Top 10 FOSS legal developments of 2014.md deleted file mode 100644 index a97e4910c6..0000000000 --- a/sources/talk/20150122 Top 10 FOSS legal developments of 2014.md +++ /dev/null @@ -1,72 +0,0 @@ -Top 10 FOSS legal developments of 2014 -================================================================================ -![](http://opensource.com/sites/default/files/styles/image-full-size/public/images/law/LAW_PatentSpotlight_520x292_cm.png.png?itok=N-O9b4FW) - -Image by : opensource.com - -The year 2014 continued the trend of the increasing importance of legal issues for the FOSS community. Continuing [the tradition of looking back][1] over the top ten legal developments in FOSS, my selection of the top ten issues for 2014 is as follows: - -### 1. Courts interpret General Public License version 2 (GPLv2) ### - -The GPLv2 continues to be the most widely used and most important license for free and open source software. Black Duck Software estimates that 16 billion lines of code are licensed under the GPLv2. Despite its importance, the GPLv2 has been the subject of very few court decisions, and virtually all of the most important terms of the GPLv2 have not been interpreted by courts. This lack of court decisions is about to change due to the five interrelated cases arising from an attempt by Versata Software, Inc. (Versata) to terminate its software license to Ameriprise Financial, Inc. Versata’s product included software licensed by Ximpleware, Inc. (Ximpleware) under the GPLv2, but Versata had not complied with the terms of the GPLv2. Ximpleware sued Versata and eight of its customers for both copyright and patent infringement. (For a more detailed description of the facts [read this article][2].) This dispute is important because Ximpleware is the first commercial enforcer of the GPLv2 in which the courts are likely to issue decisions and Ximpleware is seeking monetary damages rather than compliance. - -### 2. GPL guides ### - -Two of the most important organizations enforcing the GPL family of licenses recently provided [guidance on compliance][3]: On October 31, the Software Freedom Law Center published the second version of their Practical Guide to GPL Compliance. Several days later, the Software Conservancy and the Free Software Foundation published the first version of their guide, the Copyleft, and the GNU General Public License: [A Comprehensive Tutorial and Guide][4]. These guides are required reading for anyone managing FOSS. - -### 3. EU Commission (EC) to revise FOSS policy ### - -Governments are one of the most important users of software but have had a mixed record in using and contributing to FOSS (free and open source software). The EC recently announced that it intends to remove the barriers that may hinder code contributions to FOSS projects. In particular, the EC wants to clarify legal aspects, including intellectual property rights, copyright, and which author or authors to name when submitting code to the upstream repositories. Pierre Damas, Head of Sector at the Directorate General for IT, [hopes that such clarification][5] will motivate many of the EC’s software developers and functionaries to promote the use of FOSS at the EC. - -### 4. Validation of FOSS business model by Hortonworks IPO ### - -Hortonworks provides services and support for the Hadoop data analysis software managed by the Apache Software Foundation. Hortonworks is one of three venture backed companies based on the Hadoop software. Hortonworks went public this fall and immediately rose 65% in share price, valuing the company at over $1 billion. The market for Hadoop products, software, and services is projected to reach $50.2 billion in 2020, up from $1.5 billion in 2012. - -### 5. Core Infrastructure Initiative ### - -The Linux Foundation put together [a consortium of companies][6] to support the many smaller open source projects that are critical to software ecosystem, such as OpenSSL. This effort was a response to the Heartbleed problem with OpenSSL in 2013, which I described in last year’s summary. This consortium is a great example of the ability of the FOSS community to come together to solve community problems. - -### 6. Linux SCO case terminated again ### - -The lawsuit by Santa Cruz Operations, Inc. (SCO) against IBM claiming that Linux includes Unix code was once a potentially major challenge to FOSS. Despite losing its suit against Novell, the bankruptcy court allowed SCO to continue its suit against IBM. I thought this case [had been concluded in 2008][7], but Judge Nuffer appears to have put the case to rest on December 15, 2014. He dismissed the case against IBM based on the decisions in the Novell case (although SCO could still appeal once again): - -*It is further ORDERED that, with respect to all remaining claims and counterclaims, SCO is bound by, and may not here re-litigate, the rulings in the Novell Judgment that Novell (not SCO) owns the copyrights to the pre-1996 UNIX source code, and that Novell waived SCO’s contract claims against IBM for alleged breaches of the licensing agreements pursuant to which IBM licensed such source code.* - -### 7. FOSS trademark issues ### - -The use of trademarks in FOSS projects continues to raise issues. This year brought the settlement of the dispute over the “Python” mark between the Python Software Foundation and Veber, a small hosting company in the UK. Veber had decided to use "Python" in branding certain of its products and services. In addition, the OpenStack Foundation is working through the application of trademarks to the OpenStack project through its [DefCore committee][8]. - -### 8. Use of FOSS by commercial companies expands ### - -We have discussed in the past how many large companies are using FOSS as an explicit strategy to build their software. Jim Zemlin, Executive Director of the Linux Foundation, has described this strategic use of FOSS as external “research and development.” His conclusions are supported by Gartner who noted that “the top tech companies are still spending tens of billions of dollars on software research and development, the smart ones are leveraging open source for 80 percent of the code and spending their money on the remaining 20 percent, which represents their program’s ‘special sauce.’” The scope of this trend was emphasized by Microsoft’s announcement that it was “open sourcing” the .NET software framework (this software is used by millions of developers to build and operate websites and other large online applications). - -### 9. Rockstar Consortium threat evaporates ### - -The Rockstar Consortium was formed by Microsoft, Blackberry, Ericsson, Sony, and Apple to exploit the 6,000 patents from Nortel Networks. The Rockstar Consortium sued Google for infringement of the Android operating system. This litigation was aimed at fundamental functions of the Android operating system and could have had a significant effect on the Android ecosystem. The Rockstar Consortium settled its litigation with Google this year, but then sold 4,000 of its patents to RPX, the patent defense firm (financed by a number of companies as well as RPX). The remaining patents were distributed to the members of the Rockstar Consortium. - -### 10. Android litigation ### - -The litigation surrounding Android continued this year, with significant developments in the patent litigation between Apple Computer, Inc. (Apple) and Samsung Electronics, Inc. (Samsung) and the copyright litigation over the Java APIs between Oracle Corporation (Oracle) and Google, Inc. (Google). Apple and Samsung have agreed to end patent disputes in nine countries, but they will continue the litigation in the US. As I stated last year, the Rockstar Consortium was a wild card in this dispute. However, the Rockstar Consortium settled its litigation with Google this year and sold off its patents, so it will no longer be a risk to the Android ecosystem. - -The copyright litigation regarding the copyrightability of the Java APIs was brought back to life by the Court of Appeals for the Federal Circuit (CAFC) decision which overturned [the District Court decision][9]. The District Court had found that Google was not liable for copyright infringement for its admitted copying of the Java APIs: the court found that the Java APIs were either not copyrightable or their use by Google was protected by various defenses to copyright. The CAFC overturned both the decision and the analysis and remanded the case to the District Court for a review of the fair use defense raised by Google. Subsequently, Google filed an appeal to the Supreme Court. The impact of a finding that Google was liable for copyright infringement in this case would have a dramatic effect on Android and, depending on the reasoning, would have a ripple effect across the interpretation of the scope of the “copyleft” terms of the GPL family of licenses which use APIs. - --------------------------------------------------------------------------------- - -via: http://opensource.com/law/15/1/top-foss-legal-developments-2014 - -作者:[Mark Radcliffe][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://opensource.com/users/mradcliffe -[1]:http://lawandlifesiliconvalley.com/blog/?p=853 -[2]:http://opensource.com/law/14/12/gplv2-court-decisions-versata -[3]:http://www.softwarefreedom.org/resources/ -[4]:http://www.copyleft.org/guide/ -[5]:https://joinup.ec.europa.eu/community/osor/news/european-commission-update-its-open-source-policy -[6]:http://www.linuxfoundation.org/programs/core-infrastructure-initiative -[7]:http://lawandlifesiliconvalley.com/blog/?m=200812 -[8]:https://wiki.openstack.org/wiki/Governance/CoreDefinition -[9]:http://law.justia.com/cases/federal/appellate-courts/cafc/13-1021/13-1021-2014-05-09.html \ No newline at end of file diff --git a/sources/talk/20150122 Top 10 open source projects of 2014.md b/sources/talk/20150122 Top 10 open source projects of 2014.md deleted file mode 100644 index edc81938d6..0000000000 --- a/sources/talk/20150122 Top 10 open source projects of 2014.md +++ /dev/null @@ -1,126 +0,0 @@ -Top 10 open source projects of 2014 -================================================================================ -![](http://opensource.com/sites/default/files/styles/image-full-size/public/images/life/top10_projects_lead.jpg?itok=tMZo2sYi) - -Image credits : [CC0 Public Domain][1], modifications by Jen Wike Huger - -Every year we collect the best of the best open source projects covered on Opensource.com. [Last year's list of 10 projects][2] guided people working and interested in tech throughout 2014. Now, we're setting you up for 2015 with a brand new list of accomplished open source projects. - -Some faces are new. Some have been around and just keep rocking it. Let's dive in! - -## Top 10 open source projects in 2014 ## - -### Docker ### - -[application container platform][3] - -"In the same way that power management and virtualisation has allowed us to get maximum engineering benefit from our server utilisation, the problem of how to really solve first world problems in virtualisation has remained prevalent. Docker's open sourcing in 2013 can really align itself with these pivotal moments in the evolution of open source—providing the extensible building blocks allowing us as engineers and architects to extend distributed platforms like never before." —Richard Morrell, [Senior software engineer Petazzoni on the breathtaking growth of Docker][4]. - -**Interview**: VP of Services for Docker talks to Jodi Biddle in [Why is Docker the new craze in virtualization and cloud computing?][5] "I think it's the lightweight nature of Docker combined with the workflow. It's fast, easy to use and a developer-centric DevOps-ish tool. Its mission is basically: make it easy to package and ship code." —James Turnbull. - -### Kubernetes ### - -[orchestration system for containers][6] - -"One of the projects you're starting to hear a lot about in the orchestration space is [Kubernetes][7], which came out of Google's internal container work. It aims to provide features such as high availability and replication, service discovery, and service aggregation." —Gordon Haff, [Open source accelerating the pace of software][8]. - -### Taiga ### - -[project management platform][9] - -"It’s almost always the case that the project management tool doesn’t reflect the actual project scenario. One solution to this is using a tool that is intuitive and fits alongside the developer's normal workflow. Additionally, a tool that is quick to update and attracts users to use it. [Taiga][10] is an open source project management tool that aims to solve the basic problem of software usability." —Nitish Tiwari, [Taiga, a new open source project management tool with focus on usability][11]. - -### Apache Mesos ### - -[cluster manager][12] - -"[Apache Mesos][13] is a cluster manager that provides efficient resource isolation and sharing across distributed applications or frameworks. It sits between the application layer and the operating system and makes it easier to deploy and manage applications in large-scale clustered environments more efficiently. It can run many applications on a dynamically shared pool of nodes. Prominent users of Mesos include Twitter, Airbnb, MediaCrossing, Xogito and Categorize. —Sachin P Bappalige, [Open source datacenter computing with Apache Mesos][14]. - -Interview: Head of Open Source at Twitter talks to Jason Hibbets in [Scale like Twitter with Apache Mesos][15]. "As of today, Twitter has over 270 million active users which produces 500+ million tweets a day, up to 150k+ tweets per second, and more than 100TB+ of compressed data per day. Architecturally, Twitter is mostly composed of services, mostly written in the open source project [Finagle][16], representing the core nouns of the platform such as the user service, timeline service, and so on. Mesos allows theses services to scale to tens of thousands of bare-metal machines and leverage a shared pool of servers across data centers." —Chris Aniszczyk - -### OpenStack ### - -[cloud computing platform][17] - -"As OpenStack continues to mature and slowly make its way into production environments, the focus on the user is continuing to grow. And so, to better meet the needs of users, the community is working hard to get users to meet the next step of engagement by highlighting those users who are change agents both in their organization and within the OpenStack community at large: the superusers." —Jason Baker, [What is an OpenStack superuser][18]? - -**Interview**: Infrastructure manager at CERN talks to Jason Hibbets in [How OpenStack powers the research at CERN][19]. "At CERN, the European Organization for Nuclear Research physicists and engineers are probing the fundamental structure of the universe. In order to do this, we use some of the world's largest and most complex scientific instruments such as the Large Hadron Collider, a 27 KM ring 100m underground on the border between France and Switzerland. OpenStack provides the infrastructure cloud which is used to provide much of the compute resources for this processing." —Tim Bell. - -### Ansible ### - -[IT automation tool][20] - -"A lot of what I want to do is enable people to not only have more free time for beer, but to have more free time for their own projects, their own ideas, and to do new an interesting things." —[Michael DeHaan, Making your IT infrastructure boring with Ansible][21]. - -**Interview**: CTO of Ansible talks to Jen Krieger in [Behind the scenes with CTO Michael DeHaan of Ansible][22]. "I like to quote Star Trek 2 a lot. We definitely optimize for 'the needs of the many'. I know Spock dies after he says that, but he does get to come back." —Michael DeHaan - -### ownCloud ### - -[cloud storage tool][23] - -"I was looking for an easy way how to have all my online storage services, such as Google Drive and Dropbox, integrated with my Linux desktop without using some nasty hack, and I finally have a solution that works. I'm here to share it with you. This is not rocket science really, all I did was a little bit of documentation reading, and a couple of clicks." —Jiri Folta, [Using ownCloud to integrate Dropbox, Google Drive, and more in Gnome][24]. - -**Listed**: Top 5 open source alternatives: "ownCloud does most everything that the proprietary names do and it keeps control of your information in your hands." —Scott Nesbitt, [Five open source alternatives to popular web apps][25]. - -### Apache Hadoop ### - -[framework for big data][26] - -"Apache Hadoop is an open source software framework for storage and large scale processing of data-sets on clusters of commodity hardware. Hadoop is an Apache top-level project being built and used by a global community of contributors and users. It is licensed under the Apache License 2.0." —Sachin P Bappalige, [An introduction to Apache Hadoop for big data][27]. - -### Drupal ### - -[content management system (CMS)][28] - -"When it was released in 2011, Drupal 7 was the most accessible open source content management system (CMS) available. I expect that this will be true until the release of Drupal 8. Web accessibility requires constant vigilance and will be something that will always need attention in any piece of software striving to meet the Web Content Accessibility Guidelines (WCAG) 2.0 guidelines." —Mike Gifford, [Drupal 8's accessibility advantage][29]. - -### OpenDaylight ### - -[foundation for software defined networking][30] - -"We are seeing more and more that the networking functions traditionally done in the datacenter by dedicated, almost exclusively proprietary hardware and software combinations, are now being defined through software. Leading that charge within the open source community has been the [OpenDaylight Project][31], a collaborative project through the [Linux Foundation][32] working to define the needs which software defined networking may fill and coordinating the efforts of individuals and companies worldwide to create an open source solution to software defined networking (SDN)." —Jason Baker, [Define your network in software with OpenDaylight][33]. - --------------------------------------------------------------------------------- - -via: http://opensource.com/business/14/12/top-10-open-source-projects-2014 - -作者:[Jen Wike Huger][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://opensource.com/users/jen-wike -[1]:http://pixabay.com/en/lightbulb-lamp-light-hotspot-336193/ -[2]:http://opensource.com/life/13/12/top-open-source-projects-2013 -[3]:https://www.docker.com/ -[4]:http://opensource.com/business/14/7/interview-jerome-petazzoni-docker -[5]:https://opensource.com/business/14/7/why-docker-new-craze-virtualization-and-cloud-computing -[6]:http://kubernetes.io/ -[7]:https://cloud.google.com/compute/docs/containers -[8]:http://opensource.com/business/14/11/open-source-accelerating-pace-software -[9]:https://taiga.io/ -[10]:https://github.com/taigaio -[11]:https://opensource.com/business/14/10/taiga-open-source-project-management-tool -[12]:http://mesos.apache.org/ -[13]:http://mesos.apache.org/ -[14]:https://opensource.com/business/14/9/open-source-datacenter-computing-apache-mesos -[15]:https://opensource.com/business/14/8/interview-chris-aniszczyk-twitter-apache-mesos -[16]:https://twitter.github.io/finagle/ -[17]:http://www.openstack.org/ -[18]:https://opensource.com/business/14/5/what-is-openstack-superuser -[19]:https://opensource.com/business/14/10/interview-tim-bell-cern-it-operating-systems -[20]:http://www.ansible.com/home -[21]:https://opensource.com/business/14/12/ansible-it-infrastructure -[22]:https://opensource.com/business/14/10/interview-michael-dehaan-ansible -[23]:http://owncloud.org/ -[24]:https://opensource.com/life/14/12/using-owncloud-integrate-dropbox-google-drive-gnome -[25]:https://opensource.com/life/14/10/five-open-source-alternatives-popular-web-apps -[26]:http://hadoop.apache.org/ -[27]:http://opensource.com/life/14/8/intro-apache-hadoop-big-data -[28]:https://www.drupal.org/ -[29]:http://opensource.com/business/14/5/new-release-drupal-8-accessibility-advantage -[30]:http://www.opendaylight.org/ -[31]:http://www.opendaylight.org/ -[32]:http://www.linuxfoundation.org/ -[33]:http://opensource.com/business/14/5/defining-your-network-software-opendaylight diff --git a/sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md b/sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md index e55c028ecd..276e5a05fa 100644 --- a/sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md +++ b/sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md @@ -1,5 +1,3 @@ -translating by coloka... - How to configure a syslog server with rsyslog on Linux ================================================================================ A syslog server represents a central log monitoring point on a network, to which all kinds of devices including Linux or Windows servers, routers, switches or any other hosts can send their logs over network. By setting up a syslog server, you can filter and consolidate logs from different hosts and devices into a single location, so that you can view and archive important log messages more easily. diff --git a/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md b/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md index 121f496d6a..2cba8c739f 100644 --- a/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md +++ b/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md @@ -1,4 +1,3 @@ -ideas4u is translating! 4 Steps to Setup Local Repository in Ubuntu using APT-mirror ================================================================================ Today we will show you how to setup a local repository in your Ubuntu PC or Ubuntu Server straight from the official Ubuntu repository. There are a lot benefit of creating a local repository in your computer if you have a lot of computers to install software, security updates and fixes often in all systems, then having a local Ubuntu repository is an efficient way. Because all required packages are downloaded over the fast LAN connection from your local server, so that it will save your Internet bandwidth and reduces the annual cost of Internet.. From 554e7cf7bd5f859f9a0d8654929f7ae506f09e57 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Feb 2015 13:43:42 +0800 Subject: [PATCH 052/163] PUB:20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4 @geekpi --- ...tall SSL on Apache 2.4 in Ubuntu 14.0.4.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md (61%) diff --git a/translated/tech/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md b/published/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md similarity index 61% rename from translated/tech/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md rename to published/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md index 6f5a53fdee..638bb2f67f 100644 --- a/translated/tech/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md +++ b/published/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md @@ -1,15 +1,14 @@ -如何在Ubuntu 14.04 上为Apache 2.4 安装SSL +如何在Ubuntu 14.04 上为Apache 2.4 安装SSL支持 ================================================================================ -今天我会站如如何为你的个人网站或者博客安装**SSL 证书**,来保护你的访问者和网站之间通信的安全。 +今天我会讲述如何为你的个人网站或者博客安装**SSL 证书**,来保护你的访问者和网站之间通信的安全。 -安全套接字层或称SSL,是一种加密网站和浏览器之间连接的标准安全技术。这确保服务器和浏览器之间传输的数据保持隐私和安全。这被成千上万的人使用来保护他们与客户的通信。要启用SSL链接,web服务器需要安装SSL证书。 +安全套接字层或称SSL,是一种加密网站和浏览器之间连接的标准安全技术。这确保服务器和浏览器之间传输的数据保持隐私和安全。它被成千上万的人使用来保护他们与客户的通信。要启用SSL链接,Web服务器需要安装SSL证书。 -你可以创建你自己的SSL证书,但是这默认不会被浏览器信任,要修复这个问题,你需要从受信任的证书机构(CA)处购买证书,我们会向你展示如何 -或者证书并在apache中安装。 +你可以创建你自己的SSL证书,但是这默认不会被浏览器所信任,要解决这个问题,你需要从受信任的证书机构(CA)处购买证书,我们会向你展示如何获取证书并在apache中安装。 ### 生成一个证书签名请求 ### -证书机构(CA)会要求你在你的服务器上生成一个证书签名请求(CSR)。这是一个很简单的过程,只需要一会就行,你需要运行下面的命令并输入需要的信息: +证书机构(CA)会要求你在你的服务器上生成一个证书签名请求(CSR)。这是一个很简单的过程,只需要一会儿就行,你需要在你的服务器上运行下面的命令并输入需要的信息: # openssl req -new -newkey rsa:2048 -nodes -keyout yourdomainname.key -out yourdomainname.csr @@ -17,13 +16,13 @@ ![generate csr](http://blog.linoxide.com/wp-content/uploads/2015/01/generate-csr.jpg) -这一步会生成两个文件按:一个用于解密SSL证书的私钥文件,一个证书签名请求(CSR)文件(用于申请你的SSL证书)。 +这一步会生成两个文件:一个用于解密SSL证书的私钥文件,一个证书签名请求(CSR)文件(用于申请你的SSL证书)。 -根据你申请的机构,你会需要上传csr文件或者在网站表格中粘帖他的内容。 +根据你申请的机构,你会需要上传csr文件或者在网站表格中粘帖该文件内容。 ### 在Apache中安装实际的证书 ### -生成步骤完成之后,你会收到新的数字证书,本篇教程中我们使用[Comodo SSL][1]并在一个zip文件中收到了证书。要在apache中使用它,你首先需要用下面的命令为收到的证书创建一个组合的证书: +生成步骤完成之后,你会收到新的数字证书。本篇教程中我们使用[Comodo SSL][1],并在一个它发给我们的zip文件中收到了证书。要在apache中使用它,你首先需要用下面的命令用收到的证书创建一个组合的证书: # cat COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > bundle.crt @@ -48,12 +47,12 @@ 你现在应该可以用https://YOURDOMAIN/(注意使用‘https’而不是‘http’)来访问你的网站了,并可以看到SSL的进度条了(通常在你浏览器中用一把锁来表示)。 -**NOTE:** All the links must now point to https, if some of the content on the website (like images or css files) still point to http links you will get a warning in the browser, to fix this you have to make sure that every link points to https. -**注意:** 现在所有的链接都必须指向https,如果网站上的一些内容(像图片或者css文件等)仍旧指向http链接的话,你会在浏览器中得到一个警告,要修复这个问题,请确保每个链接都指向了https。 + +**注意:** 现在所有的内容链接都必须指向https,如果网站上的一些内容(像图片或者css文件等)仍旧指向http链接的话,你会在浏览器中得到一个警告,要修复这个问题,请确保每个链接都指向了https。 ### 在你的网站上重定向HTTP请求到HTTPS中 ### -如果你希望重定向常规的HTTP请求到HTTPS,添加下面的文本到你希望的虚拟主机或者如果希望给服务器上所有网站都添加的话就加入到apache.conf中: +如果你希望重定向常规的HTTP请求到HTTPS,添加下面的文本到你希望修改的虚拟主机,或者如果希望给服务器上所有网站都添加的话就加入到apache.conf中: RewriteEngine On RewriteCond %{HTTPS} off @@ -65,7 +64,7 @@ via: http://linoxide.com/ubuntu-how-to/install-ssl-apache-2-4-in-ubuntu/ 作者:[Adrian Dinu][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From f46f79cf0f9f2d816c399d1ed93455f83b13de14 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Feb 2015 14:31:31 +0800 Subject: [PATCH 053/163] PUB:20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7 @GOLinux --- ...ution Installations in RHEL or CentOS 7.md | 105 +++++++++++------- 1 file changed, 64 insertions(+), 41 deletions(-) rename {translated/tech => published}/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md (86%) diff --git a/translated/tech/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md b/published/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md similarity index 86% rename from translated/tech/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md rename to published/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md index db3cd3b706..046cee4f98 100644 --- a/translated/tech/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md +++ b/published/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md @@ -1,12 +1,13 @@ RHEL/CentOS 7中配置用于多版本Linux安装的“PXE网络启动服务器” ================================================================================ -**PXE服务器**——预启动执行环境——指示客户端计算机直接从网络接口启动、运行或安装操作系统,而不需要烧录CD/DVD或使用某个物理介质,它也可以减轻你网络中多台机器同时安装Linux发行版的工作。 +**PXE服务器**——预启动执行环境——指示客户端计算机直接从网络接口启动、运行或安装操作系统,而不需要烧录CD/DVD或使用某个物理介质,它可以减轻你网络中多台机器同时安装Linux发行版的工作。 ![Setting PXE Network Boot in RHEL/CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/10/Setting-PXE-Network-Boot-in-CentOS.png) -在RHEL/CentOS 7中设置PXE网络启动 -#### 需求 #### +*在RHEL/CentOS 7中设置PXE网络启动* + +#### 前置阅读 #### - [CentOS 7最小化安装步骤][1] - [RHEL 7最小化安装步骤][2] @@ -14,7 +15,7 @@ RHEL/CentOS 7中配置用于多版本Linux安装的“PXE网络启动服务器 - [移除RHEL/CentOS 7中不要的服务][4] - [安装NTP服务器以设置RHEL/CentOS 7的正确时间][5] -本文将介绍如何在配置有本地镜像安装仓库的**RHEL/CentOS 7** 64位上安装并配置一台**PXE服务器**,仓库源由CentOS 7 DVD ISO镜像提供,并由**DNSMASQ**服务器提供解析。 +本文将介绍如何在配置有本地镜像安装仓库的**RHEL/CentOS 7** 64位上安装并配置一台**PXE服务器**,仓库源由CentOS 7 DVD 的 ISO镜像提供,并由**DNSMASQ**服务器提供解析。 该机器提供了**DNS**和**DHCP**服务,用于网络启动引导的**Syslinux**包,**TFTP-Server**——提供了可通过网络使用**小文件传输协议**下载的可启动镜像,以及提供本地挂载DVD镜像的**VSFTPD**服务器——它将扮演官方RHEL/CentOS 7镜像安装仓库的角色,安装器将从这里提取所需的包。 @@ -27,11 +28,12 @@ RHEL/CentOS 7中配置用于多版本Linux安装的“PXE网络启动服务器 # yum install dnsmasq ![Install dnsmasq Package](http://www.tecmint.com/wp-content/uploads/2014/10/Install-dnsmasq-in-CentOS.jpg) -安装dnsmasq包 -**2.** DNSMASQ的默认主配置文件位于**/etc**目录中,虽然不需要任何说明就能看懂,但编辑起来确实相当困难的,即使有很详细的说明性注释。 +*安装dnsmasq包* -首先,确保你备份了该文件,以便你需要在以后对它进行恢复。然后使用你喜爱的文本编辑器创建一个新的空配置文件,命令如下。 +**2.** DNSMASQ的默认的主配置文件位于**/etc**目录中,虽然不需要任何说明就能看懂,但编辑起来确实相当困难的,即使有很详细的说明性注释。 + +首先,确保你备份了该文件,以便你需要在以后对它进行恢复。然后使用你爱用的文本编辑器创建一个新的空配置文件,命令如下。 # mv /etc/dnsmasq.conf /etc/dnsmasq.conf.backup # nano /etc/dnsmasq.conf @@ -61,7 +63,8 @@ RHEL/CentOS 7中配置用于多版本Linux安装的“PXE网络启动服务器 tftp-root=/var/lib/tftpboot ![Dnsmasq Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/dnsmasq-configuration.jpg) -Dnsmasq配置 + +*Dnsmasq配置* 你需要修改的声明有以下这些: @@ -89,14 +92,16 @@ Dnsmasq配置 # yum install syslinux ![Install Syslinux Bootloaders](http://www.tecmint.com/wp-content/uploads/2014/10/install-syslinux-bootloaders.jpg) -安装Syslinux启动加载器 + +*安装Syslinux启动加载器* **5.** PXE启动加载器文件位于**/usr/share/syslinux**系统绝对路径下,你可以通过列出该路径下的内容来查看。该步骤不是必须的,但你可能需要知道该路径,因为在下一步中,我们将拷贝该路径下的所有内容到**TFTP服务器**路径下。 # ls /usr/share/syslinux ![Syslinux Files](http://www.tecmint.com/wp-content/uploads/2014/10/syslinux-files.jpg) -Syslinux文件 + +*Syslinux文件* ### 步骤3: 安装TFTP-Server并加入SYSLINUX加载启动器 ### @@ -106,7 +111,8 @@ Syslinux文件 # cp -r /usr/share/syslinux/* /var/lib/tftpboot ![Install TFTP Server](http://www.tecmint.com/wp-content/uploads/2014/10/install-tftp-server.jpg) -安装TFTP服务器 + +*安装TFTP服务器* ### 步骤4: 设置PXE服务器配置文件 ### @@ -117,13 +123,13 @@ Syslinux文件 # mkdir /var/lib/tftpboot/pxelinux.cfg # touch /var/lib/tftpboot/pxelinux.cfg/default -**8.** 现在,该来编辑**PXE服务器**配置文件了,为它添加合法的Linux发行版安装选项。请注意,该文件中使用的所有路径必须是相对于**/var/lib/tftpboot**目录的。 +**8.** 现在,该来编辑**PXE服务器**配置文件了,为它添加合理的Linux发行版安装选项。请注意,该文件中使用的所有路径必须是相对于**/var/lib/tftpboot**目录的。 -下面,你可以看到配置文件的样例,你可以使用该模板,但请修改安装镜像(kernel和initrd文件)、协议(FTP、HTTP、HTTPS、NFS)以及映射你网络安装源仓库和路径的IP地址。 +下面,你可以看到配置文件的样例,你可以使用该模板,但请修改安装镜像(kernel和initrd文件)、协议(FTP、HTTP、HTTPS、NFS)以及映射你网络安装源仓库和路径的IP地址等参数。 # nano /var/lib/tftpboot/pxelinux.cfg/default -添加一下整个节录到文件中。 +添加以下整个节录到文件中。 default menu.c32 prompt 0 @@ -151,17 +157,18 @@ Syslinux文件 menu label ^4) Boot from local drive ![Configure PXE Server](http://www.tecmint.com/wp-content/uploads/2014/10/configure-pxe-server.jpg) -配置PXE服务器 + +*配置PXE服务器* 正如你所见,CentOS 7启动镜像(kernel和initrd)位于名为**centos7**的目录,该目录是**/var/lib/tftpboot**目录的相对路径(其系统绝对路径为**/var/lib/tftpboot/centos7**),而安装器仓库位于可通过FTP协议访问的**192.168.1.20/pub**网络位置中——在本例中,这些仓库位于本地,因为IP地址和PXE服务器地址相同。 同时,菜单**label 3**指定客户端安装应该通过**VNC**从一个远程位置实现(这里替换VNC密码为一个健壮的密码),如果你在一台没有输入输出的客户端上安装,菜单**label 2**指定了作为安装源的一个CentOS 7官方互联网镜像(这种情况要求客户端通过DHCP和NAT连接到互联网)。 -**重要**:正如你在上述配置中说看到的,我们使用了CentOS 7进行演示,但是你也可以定义RHEL 7镜像。而下面的完整说明和配置都只是基于CentOS 7的,所以在选在发行版时要当心。 +**重要**:正如你在上述配置中所看到的,我们使用了CentOS 7进行演示,但是你也可以定义一个 RHEL 7镜像。而下面的整个的说明和配置都只是基于CentOS 7的,所以在选发行版时要注意一下。 ### 步骤5: 添加CentOS 7启动镜像到PXE服务器 ### -**9.** 对于此步骤,需要用到CentOS的kernel和initrd文件。要获取这些文件,你需要**CentOS 7 DVD ISO**镜像。所以,去下载CentOS DVD镜像吧,然后把它放入你的DVD驱动器并挂载镜像到**/mnt**路径,命令见下面。 +**9.** 对于此步骤,需要用到CentOS的kernel和initrd文件。要获取这些文件,你需要**CentOS 7 DVD ISO**镜像。所以,去下载CentOS DVD镜像吧,然后把它(刻录成光盘)放入你的DVD驱动器并挂载镜像到**/mnt**路径,命令见下面。 使用DVD,而不是最小化CD镜像的原因在于,在后面我们将使用该DVD的内容为**FTP**源创建本地安装器仓库。 @@ -169,27 +176,29 @@ Syslinux文件 # ls /mnt ![Mount CentOS DVD](http://www.tecmint.com/wp-content/uploads/2014/10/mount-centos-dvd.jpg) -挂载CentOS DVD + +*挂载CentOS DVD* 如果你的机器没有DVD驱动器,你也可以使用**wget**或**curl**工具从[CentOS镜像站][7]下载**CentOS 7 DVD ISO**到本地并挂载。 # wget http://mirrors.xservers.ro/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso # mount -o loop /path/to/centos-dvd.iso /mnt -**10.** 在DVD内容可供使用后,创建**centos7**目录并将CentOS 7可启动kernel和initrd映像文件从DVD挂载位置拷贝到centos7文件夹。 +**10.** 在DVD内容可供使用后,创建**centos7**目录并将CentOS 7 的可启动的 kernel和initrd映像文件从DVD挂载位置拷贝到centos7文件夹。 # mkdir /var/lib/tftpboot/centos7 # cp /mnt/images/pxeboot/vmlinuz /var/lib/tftpboot/centos7 # cp /mnt/images/pxeboot/initrd.img /var/lib/tftpboot/centos7 ![Copy CentOS Bootable Files](http://www.tecmint.com/wp-content/uploads/2014/10/copy-centos-bootable-files.jpg) -拷贝CentOS可启动文件 + +*拷贝CentOS可启动文件* 使用该方法的原因在于,今后你可能会在**/var/lib/tftpboot**路径中创建新的独立的目录,并添加其它Linux发行版到PXE菜单中,你就不会将整个目录结构弄得一团糟了。 ### 步骤6: 创建CentOS 7本地镜像安装源 ### -**11.** 虽然你可以通过多种协议设置**安装源镜像**,如HTTP、HTTPS或NFS,但对于本指南,我选择使用**FTP**协议。因为通过**vsftpd**,你可以很便捷地配置,而且它也很稳定。 +**11.** 虽然你可以通过多种协议设置**安装源镜像**,如HTTP、HTTPS或NFS,但对于本指南,我选择了使用**FTP**协议。因为通过**vsftpd**,你可以很便捷地配置,而且它也很稳定。 接下里,安装vsftpd进程,然后复制所有DVD挂载目录中的内容到**vsftpd**默认服务器路径下(**/var/ftp/pub**)——这会花费一些时间,这取决于你的系统资源。然后为该路径设置可读权限,命令如下。 @@ -198,17 +207,20 @@ Syslinux文件 # chmod -R 755 /var/ftp/pub ![Install Vsftpd Server](http://www.tecmint.com/wp-content/uploads/2014/10/install-vsftpd-in-centos.jpg) -安装Vsftpd服务器 + +*安装Vsftpd服务器* ![Copy Files to FTP Path](http://www.tecmint.com/wp-content/uploads/2014/10/copy-files-to-ftp-path.jpg) -拷贝Files到FTP路径 + +*拷贝Files到FTP路径* ![Set Permissions on FTP Path](http://www.tecmint.com/wp-content/uploads/2014/10/set-permission-on-ftp-path.jpg) -设置FTP路径的权限 + +*设置FTP路径的权限* ### 步骤7: 在系统范围内启动并启用进程 ### -**12.** 既然PXE服务器配置已经完成,那么就来启动**DNSMASQ**和**VSFTPD**服务器吧。验证它们的状况并在系统范围内启用,以便让这些服务在每次系统重启后都能随系统启动,命令如下。 +**12.** 既然PXE服务器配置已经完成,那么就来启动**DNSMASQ**和**VSFTPD**服务器吧。验证它们的状况并在系统上启用,以便让这些服务在每次系统重启后都能随系统启动,命令如下。 # systemctl start dnsmasq # systemctl status dnsmasq @@ -218,10 +230,12 @@ Syslinux文件 # systemctl enable vsftpd ![Start Dnsmasq Service](http://www.tecmint.com/wp-content/uploads/2014/10/start-dnsmasq.jpg) -启动Dnsmasq服务 + +*启动Dnsmasq服务* ![Start Vsftpd Service](http://www.tecmint.com/wp-content/uploads/2014/10/start-vsftpd.jpg) -启动Vsftpd服务 + +*启动Vsftpd服务* ### 步骤8: 打开防火墙并测试FTP安装源 ### @@ -236,53 +250,62 @@ Syslinux文件 # firewall-cmd --reload ## Apply rules ![Check Listening Ports](http://www.tecmint.com/wp-content/uploads/2014/10/check-listening-ports.jpg) -检查监听端口 + +*检查监听端口* ![Open Ports in Firewall](http://www.tecmint.com/wp-content/uploads/2014/10/open-ports-on-firewall.jpg) -在防火墙上开启端口 + +*在防火墙上开启端口* **14.** 要测试FTP安装源网络路径,请在本地或另外一台计算机上打开浏览器([**lynx**][8]就可以做此事),然后输入你架设有FTP服务的PXE服务器的IP地址,并在填入的URL后面加上**/pub**网络位置,结果应该和截图中看到的一样。 ftp://192.168.1.20/pub ![Access FTP Files via Browser](http://www.tecmint.com/wp-content/uploads/2014/10/browse-ftp-files.jpg) -通过浏览器访问FTP文件 + +*通过浏览器访问FTP文件* **15.** 要解决PXE服务器最终的配置或其它信息产生的问题,请在live模式下诊断,命令如下: # tailf /var/log/messages ![Check PXE Logs for Errors](http://www.tecmint.com/wp-content/uploads/2014/10/check-pxe-errors.jpg) -检查PXE日志错误 -**16.** 最后,最后所需的步骤就是卸载CentOS 7 DVD,并移除物理介质。 +*检查PXE日志错误* + +**16.** 最后,最终所需的步骤就是卸载CentOS 7 DVD,并移除物理介质。 # umount /mnt ### 步骤9: 配置客户端从网络启动 ### -**17.** 现在,你的客户端可以通过它们的系统BIOS或在**BIOS开机自检**时按指定键来配置网络启动作为**首要启动设备**,具体方法见主板说明手册。 +**17.** 现在,你的客户端可以通过它们的系统BIOS或在**BIOS开机自检**时按指定键来配置网络启动作为**首选启动设备**,具体方法见主板说明手册。 为了选择网络启动,在第一次PXE提示符出现时,请按下**F8**键进入到PXE安装界面,然后敲**回车**键继续进入PXE菜单。 ![PXE Network Boot](http://www.tecmint.com/wp-content/uploads/2014/10/pxe-network-boot.jpg) -PXE网络启动 + +*PXE网络启动* ![PXE Network OS Boot](http://www.tecmint.com/wp-content/uploads/2014/10/pxe-network-os-boot.jpg) -PXE网络OS启动 + +*PXE网络OS启动* **18.** 一旦你进入PXE菜单,请选择你的CentOS 7安装类型,敲**回车**键继续安装过程,就像你使用本地启动介质安装一样。 -请记下这一点,使用菜单中的变体2需要激活目标客户端上的互联网连接。在下面的屏幕截图中,你可以通过VNC看到远程安装的实例。 +请记住这一点,使用菜单中的变体2需要激活目标客户端上的互联网连接。在下面的屏幕截图中,你可以通过VNC看到远程安装的实例。 ![PXE Menu](http://www.tecmint.com/wp-content/uploads/2014/10/pxe-menu.jpg) -PXE菜单 + +*PXE菜单* ![Remote Linux Installation via VNC](http://www.tecmint.com/wp-content/uploads/2014/10/os-installation-via-vnc.jpg) -通过VNC远程安装Linux + +*通过VNC远程安装Linux* ![Remote Installation of CentOS](http://www.tecmint.com/wp-content/uploads/2014/10/remote-centos-installation.jpg) -远程安装CentOS + +*远程安装CentOS* 以上是**CentOS 7**上配置最小化**PXE服务器**的所有内容。在我的本系列下一篇文章中,我将讨论其它PXE服务器配置过程中的其它问题,如怎样使用**Kickstart**文件来配置自动化安装**CentOS 7**,以及添加其它Linux发行版到PXE菜单——**Ubuntu Server**和**Debian 7**。 @@ -292,14 +315,14 @@ via: http://www.tecmint.com/install-pxe-network-boot-server-in-centos-7/ 作者:[Matei Cezar][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/cezarmatei/ [1]:http://www.tecmint.com/centos-7-installation/ [2]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ -[3]:http://www.tecmint.com/configure-network-interface-in-rhel-centos-7-0/ +[3]:http://linux.cn/article-3977-1.html [4]:http://www.tecmint.com/remove-unwanted-services-in-centos-7/ [5]:http://www.tecmint.com/install-ntp-server-in-centos/ [6]:http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html From 0bc12034fd138b8006aab8f3fcd25ed2beb9388b Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Feb 2015 14:43:58 +0800 Subject: [PATCH 054/163] PUB:20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7 @GOLinux --- ...t Environment Setup on RHEL or CentOS 7.md | 42 ++++++++++++------- 1 file changed, 27 insertions(+), 15 deletions(-) rename {translated/tech => published}/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md (91%) diff --git a/translated/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md b/published/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md similarity index 91% rename from translated/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md rename to published/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md index 35936459d3..e131acbbc7 100644 --- a/translated/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md +++ b/published/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md @@ -1,24 +1,26 @@ 添加Ubuntu 14.10,Ubuntu 14.04和Debian 7到RHEL/CentOS 7的PXE网络启动环境 ================================================================================ 本教程将指引你添加**Ubuntu 14.10 Server, Ubuntu 14.04 Server**和**Debian 7 Wheezy**发行版到**RHEL/CentOS 7**的PXE网络启动环境中。 + ![Add Ubuntu and Debian to PXE Network](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Ubuntu-and-Debian-to-PXE.png) -添加Ubuntu和Debian到PXE网络 + +*添加Ubuntu和Debian到PXE网络* 虽然对于本教程,我只会演示怎样来添加**64位**网络安装镜像,但对于Ubuntu或者Debian的**32位**系统,或者其它架构的镜像,操作步骤也基本相同。同时,就我而言,我会解释添加Ubuntu 32位源的方法,但不会演示配置。 从PXE服务器安装 **Ubuntu**或者**Debian**要求你的客户机必须激活网络连接,最好是使用**DHCP**通过**NAT**来进行动态分配地址。以便安装器拉取所需的包并完成安装过程。 -#### 需求 #### +#### 前置阅读 #### - [在RHEL/CentOS 7中为多种Linux发行版安装PXE网络启动服务器][1] ## 步骤 1: 添加Ubuntu 14.10和Ubuntu 14.04服务器到PXE菜单 ## -**1.** 为**Ubuntu 14.10**和**Ubuntu 14.04**添加网络安装源到PXE菜单可以通过两种方式实现:其一是通过下载Ubuntu CD ISO镜像并挂载到PXE服务器机器上以便可以读取Ubuntu网络启动文件,其二是通过直接下载Ubuntu网络启动归档包并将其解压缩到系统中。下面,我将进一步讨论这两种方法: +**1.** 要将**Ubuntu 14.10**和**Ubuntu 14.04**添加网络安装源到PXE菜单可以通过两种方式实现:其一是通过下载Ubuntu CD ISO镜像并挂载到PXE服务器机器上,以便可以读取Ubuntu网络启动文件,其二是通过直接下载Ubuntu网络启动归档包并将其解压缩到系统中。下面,我将进一步讨论这两种方法: ### 使用Ubuntu 14.10和Ubuntu 14.04 CD ISO镜像 ### -为了能使用此方法,你的PXE服务器需要有一台可工作的CD/DVD驱动器。在一台专有计算机上,转到[Ubuntu 14.10下载][2]和[Ubuntu 14.04 下载][3]页,获取64位**服务器安装镜像**,将它烧录到CD,并将CD镜像放到PXE服务器DVD/CD驱动器,然后使用以下命令挂载到系统。 +为了能使用此方法,你的PXE服务器需要有一台可工作的CD/DVD驱动器(LCTT 译注:也可以不用,参考下面内容)。在一台专用的计算机上,转到[Ubuntu 14.10下载][2]和[Ubuntu 14.04 下载][3]页,获取64位**服务器安装镜像**,将它烧录到CD,并将CD镜像放到PXE服务器DVD/CD驱动器,然后使用以下命令挂载到系统。 # mount /dev/cdrom /mnt @@ -160,16 +162,20 @@ 下面是**Ubuntu 14.04**PXE客户端安装测试的截图。 ![Select Ubuntu from PXE Menu](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-from-PXE-Menu.jpg) -从PXE菜单选择Ubuntu + +*从PXE菜单选择Ubuntu* ![Choose Ubuntu Installation Language](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-Installation-Language.jpg) -选择Ubuntu安装语言 + +*选择Ubuntu安装语言* ![Choose Ubuntu Rescue Mode](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-Rescue-Mode.jpg) -选择Ubuntu救援模式 + +*选择Ubuntu救援模式* ![Ubuntu Rescue Mode Shell](http://www.tecmint.com/wp-content/uploads/2014/11/Ubuntu-Rescue-Mode-Shell.jpg) -Ubuntu救援模式Shell + +*Ubuntu救援模式Shell* ## 步骤 2: 添加Debian 7 Wheezy到PXE菜单 ## @@ -184,7 +190,8 @@ Ubuntu救援模式Shell # wget http://ftp.nl.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/netboot.tar.gz ![Download Debain 7 Netboot](http://www.tecmint.com/wp-content/uploads/2014/11/Download-Debain-7-Netboot.jpg) -下载Debian 7网络启动包 + +*下载Debian 7网络启动包* **6.** 在**wget**下载完成**netboot.tar.gz**文件后,请将其解压缩并运行以下命令拷贝**debian-installer**目录到tftp服务器默认路径。 @@ -192,10 +199,12 @@ Ubuntu救援模式Shell # cp -rf debian-installer/ /var/lib/tftpboot/ ![Extract Debain 7 Netboot](http://www.tecmint.com/wp-content/uploads/2014/11/Extract-Debain-7-Netboot.jpg) -解压缩Debian 7网络启动包 + +*解压缩Debian 7网络启动包* ![Copy Debain 7 Netboot to FTP](http://www.tecmint.com/wp-content/uploads/2014/11/Copy-Debain-7-Netboot-to-FTP.jpg) -拷贝Debian 7网络启动文件到FTP + +*拷贝Debian 7网络启动文件到FTP* **7.** 要添加**Debian Wheezy**标签到**PXE菜单**,请用你最喜爱的文本编辑器打开PXE服务器默认配置文件并添加以下标签。 @@ -214,7 +223,8 @@ Debian Wheezy 64位的PXE标签菜单。 append auto=true priority=critical vga=788 initrd=debian-installer/amd64/initrd.gz -- quiet ![Add Debian to PXE Boot](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Debian-to-PXE-Boot.jpg) -添加Debian到PXE启动 + +*添加Debian到PXE启动* **注**:如果你想要添加其它Debian架构,请重复上述步骤,并相应替换PXE默认菜单配置文件中的标签号和**debian-installer/$architecture_name/**目录。 @@ -225,10 +235,12 @@ Debian Wheezy 64位的PXE标签菜单。 **9.** 然后通过网络启动一台客户机,选择从PXE菜单安装Debian,并像正常安装一样进一步下去。 ![Select Install Debian from PXE](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Install-Debian-from-PXE.jpg) -选择从PXE安装Debian + +*选择从PXE安装Debian* ![Select Debian Install Language](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Debian-Install-Language.jpg) -选择Debian安装语言 + +*选择Debian安装语言* 以上是要求添加并从RHEL/CentOS 7 PXE服务器安装**Ubuntu**或**Debian**到客户机上的全部步骤。在我的下一篇文章中,我将讨论一种更为复杂的方法,如何使用RHEL/CentOS 7 PXE网络启动服务器来安装**Windows 7**到客户机。 @@ -243,7 +255,7 @@ via: http://www.tecmint.com/add-ubuntu-to-pxe-network-boot/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/cezarmatei/ -[1]:http://www.tecmint.com/install-pxe-network-boot-server-in-centos-7/ +[1]:http://linux.cn/article-4902-1.html [2]:http://releases.ubuntu.com/14.10/ [3]:http://releases.ubuntu.com/14.04/ [4]:http://cdimage.ubuntu.com/netboot/14.10/ From 5fcce05c1d49e59276e4688c4fb057492635397f Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Feb 2015 21:06:28 +0800 Subject: [PATCH 055/163] PUB:20141219 How to block unwanted IP addresses on Linux efficiently @geekpi --- ...anted IP addresses on Linux efficiently.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) rename {translated/tech => published}/20141219 How to block unwanted IP addresses on Linux efficiently.md (75%) diff --git a/translated/tech/20141219 How to block unwanted IP addresses on Linux efficiently.md b/published/20141219 How to block unwanted IP addresses on Linux efficiently.md similarity index 75% rename from translated/tech/20141219 How to block unwanted IP addresses on Linux efficiently.md rename to published/20141219 How to block unwanted IP addresses on Linux efficiently.md index 5d45755066..feb53945b0 100644 --- a/translated/tech/20141219 How to block unwanted IP addresses on Linux efficiently.md +++ b/published/20141219 How to block unwanted IP addresses on Linux efficiently.md @@ -1,6 +1,7 @@ -如何在Linux有效地屏蔽不需要的IP +如何在 Linux 下大量屏蔽恶意 IP 地址 ================================================================================ -你可能需要在Linux的不同的环境下屏蔽IP地址。比如,作为一个终端用户,你可能想要免受间谍软件或者IP追踪的困扰。或者当你在运行P2P软件时。你可能想要过滤反P2P活动的网络链接。如果你是一名系统管理员,你可能想要禁止垃圾IP地址访问你们的生产邮件服务器。或者你因一些原因想要禁止某些国家访问web服务。在许多情况下,然而,你的IP地址屏蔽列表可能会很快地增长到几万的IP。该如何处理这个? + +很多情况下,你可能需要在Linux下屏蔽IP地址。比如,作为一个终端用户,你可能想要免受间谍软件或者IP追踪的困扰。或者当你在运行P2P软件时。你可能想要过滤反P2P活动的网络链接。如果你是一名系统管理员,你可能想要禁止垃圾IP地址访问你们的公司邮件服务器。或者你因一些原因想要禁止某些国家访问你的web服务。在许多情况下,然而,你的IP地址屏蔽列表可能会很快地增长到几万的IP。该如何处理这个? ### Netfilter/IPtables 的问题 ### @@ -8,11 +9,11 @@ $ sudo iptables -A INPUT -s 1.1.1.1 -p TCP -j DROP -如果你想要完全屏蔽一个IP地址,你可以用下面的命令很简单地做到: +如果你想要完全屏蔽一个IP地址段,你可以用下面的命令很简单地做到: $ sudo iptables -A INPUT -s 1.1.2.0/24 -p TCP -j DROP -然而,当你有1000个独立IP地址,且不带CIDR(无类别域间路由)前缀,你该怎么做?你要有1000条iptable规则!这显然无法扩展。 +然而,当你有1000个独立IP地址,且不带CIDR(无类别域间路由)前缀,你该怎么做?你要有1000条iptable规则!这显然这并不适于大规模屏蔽。 $ sudo iptables -A INPUT -s 1.1.1.1 -p TCP -j DROP $ sudo iptables -A INPUT -s 2.2.2.2 -p TCP -j DROP @@ -21,13 +22,13 @@ ### 什么是IP集? ### -这时候就是[IP集][1]登场了。IP集是一个内核特性,它允许多个(独立)IP地址、MAC地址或者甚至是端口号编码并有效地存储在位图/哈希内核数据结构中。一旦IP集创建之后,你可以创建一条iptable规则来匹配这个集合。 +这时候就是[IP集][1]登场了。IP集是一个内核特性,它允许多个(独立)IP地址、MAC地址或者甚至是端口号被编码和有效地存储在位图/哈希内核数据结构中。一旦IP集创建之后,你可以创建一条iptables规则来匹配这个集合。 -你应该马上看见IP集合的好处了,它可以让你用一条iptable规则匹配多个ip地址!你可以用多个IP地址和端口号的方式来构造IP集,并且可以动态地更新规则而没有请能影响。 +你马上就会看见IP集合的好处了,它可以让你用一条iptable规则匹配多个ip地址!你可以用多个IP地址和端口号的方式来构造IP集,并且可以动态地更新规则而没有性能影响。 ### 在Linux中安装IPset工具 ### -为了创建和管理IP集,你需要使用成为ipset的用户空间工具。 +为了创建和管理IP集,你需要使用称为ipset的用户空间工具。 要在Debian、Ubuntu或者Linux Mint上安装: @@ -45,7 +46,7 @@ Fedora或者CentOS/RHEL 7上安装: $ sudo ipset create banthis hash:net -第二个参数(hash:net)是必须的,代表的是集合的类型。IP集有[多个类型][2]。hash:net类型的IP集使用哈希来存储多个CIDR块。如果你想要在一个集合中存储独立的IP地址,你可以使用hash:ip类型。 +第二个参数(hash:net)是必须的,代表的是集合的类型。IP集有[多个类型][2]。hash:net类型的IP集使用哈希来存储多个CIDR块。如果你想要在一个集合中存储单独的IP地址,你可以使用hash:ip类型。 一旦创建了一个IP集之后,你可以用下面的命令来检查: @@ -70,25 +71,25 @@ Fedora或者CentOS/RHEL 7上安装: ![](https://farm8.staticflickr.com/7518/15380353474_4d6b9dbf63_z.jpg) -现在是时候去创建一个使用IP集的iptable规则了。这里的关键是使用"-m set --match-set "选项。 +现在是时候去创建一个使用IP集的iptables规则了。这里的关键是使用"-m set --match-set "选项。 现在让我们创建一条让之前那些IP块不能通过80端口访问web服务的iptable规则。可以通过下面的命令: $ sudo iptables -I INPUT -m set --match-set banthis src -p tcp --destination-port 80 -j DROP -如果你想,你可以保存特定的IP集到一个文件中,以后可以从文件中还原: +如果你愿意,你可以保存特定的IP集到一个文件中,以后可以从文件中还原: $ sudo ipset save banthis -f banthis.txt $ sudo ipset destroy banthis $ sudo ipset restore -f banthis.txt -上面的命令中,我使用了destory选项来删除一个已有的IP集来见证我可以还原它。 +上面的命令中,我使用了destory选项来删除一个已有的IP集来看看我是否可以还原它。 ### 自动IP地址禁用 ### -现在你应该看到了IP集合的强大了。维护IP黑名单是一件繁琐和费时的工作。实际上,有很多免费或者收费的服务可以来帮你完成这个。一个额外的好处是,让我们看看如何自动将IP黑名单家到IP集中。 +现在你应该看到了IP集合的强大了。维护IP黑名单是一件繁琐和费时的工作。实际上,有很多免费或者收费的服务可以来帮你完成这个。一个额外的好处是,让我们看看如何自动将IP黑名单加到IP集中。 -首先让我们从[iblocklist.com][3]抓取免费的黑名单,这个网站u有不同的免费和收费的名单。免费的版本是P2P格式。 +首先让我们从[iblocklist.com][3]得到免费的黑名单,这个网站有不同的免费和收费的名单。免费的版本是P2P格式。 接下来我要使用一个名为iblocklist2ipset的开源Python工具来将P2P格式的黑名单转化成IP集。 @@ -131,14 +132,13 @@ Fedora或者CentOS/RHEL 7上安装: $ sudo ipset list banthis - 在写这篇文章时候,“level1”类表包含了237,000个屏蔽的IP列表。你可以看到很多IP地址已经加入到IP集中了。 -最后,创建一条iptable命令来屏蔽它们! +最后,创建一条iptables命令来屏蔽这些坏蛋! ### 总结 ### -这篇文章中,我描述了你该如何用强大的ipset来·屏蔽不想要的IP地址。同时结合了第三方工具iblocklist2ipset,这样你就可以流畅地维护你的IP屏蔽列表了。对于那些对于ipset的速度提升好奇的人来说,下图显示了iptables在使用和不使用ipset的基准测试结果。 +这篇文章中,我描述了你该如何用强大的ipset来屏蔽不想要的IP地址。同时结合了第三方工具iblocklist2ipset,这样你就可以流畅地维护你的IP屏蔽列表了。那些对ipset的性能提升好奇的人,下图显示了iptables在使用和不使用ipset的基准测试结果。 ![](https://farm8.staticflickr.com/7575/15815220998_e1935c94c0_z.jpg) @@ -150,7 +150,7 @@ via: http://xmodulo.com/block-unwanted-ip-addresses-linux.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From c33a123fa4aeb41d73be960fbad70ca59b87ad94 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 18 Feb 2015 15:25:09 +0800 Subject: [PATCH 056/163] PUB:20141224 Linux FAQs with Answers--How to rename multiple files on Linux @geekpi --- ...rs--How to rename multiple files on Linux.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) rename {translated/tech => published}/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md (67%) diff --git a/translated/tech/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md b/published/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md similarity index 67% rename from translated/tech/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md rename to published/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md index 24120bd386..d804bd390e 100644 --- a/translated/tech/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md +++ b/published/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md @@ -1,21 +1,20 @@ -Linux有问必答-- 如何在Linux重命名多个文件 +Linux有问必答:如何在Linux下重命名多个文件 ================================================================================ > **提问**:我知道我可以用mv命令重命名文件。但是当我想重命名很多文件怎么办?如果为每个文件都这么做将会是很乏味的。有没有办法一次性重命名多个文件? -在Linux中,当你想要改变一个文件名,使用mv命令就好了。然而mv不能使用通配符重命名多个文件。可以用sed、awk或者与[xargs][1]结合使用来处理多个文件的情况。然而,这些命令行即繁琐u又不友好,并且如果不小心的话还很容易出错。你不会想要撤销1000个文件的错误名的。 +在Linux中,当你想要改变一个文件名,使用mv命令就好了。然而mv不能使用通配符重命名多个文件。可以用sed、awk或者与[xargs][1]结合使用来处理多个文件的情况。然而,这些命令行即繁琐又不友好,并且如果不小心的话还很容易出错。你不会想要撤销1000个文件的错误名吧! -When it comes to renaming multiple files, the rename utility is probably the easiest, the safest, and the most powerful command-line tool. The rename command is actually a Perl script, and comes pre-installed on all modern Linux distributions. -当你想要重命名多个文件的时候,重命名的工具或许是最简单、最安全和最强大的命令行工具。重命名命令实际上是一个Perl脚本,它预安装在所有的现在Linux发行班上 +当你想要重命名多个文件的时候,rename 工具或许是最简单、最安全和最强大的命令行工具。这个rename命令实际上是一个Perl脚本,它预安装在所有的现在Linux发行版上。 下面是重命名命令的基本语法。 rename [-v -n -f] - 是Perl兼容正则表达式,它表示的是要重命名的文件和该怎么做。正则表达式的形式是‘s/old-name/new-name/’。 +\ 是Perl兼容正则表达式,它表示的是要重命名的文件和该怎么做。正则表达式的形式是‘s/old-name/new-name/’。 ‘-v’选项会显示文件名改变的细节(比如:XXX重命名成YYY)。 -‘-n’选项告诉rename会在不实际改变名称的情况下显示文件将会重命名的情况。这个选项在你想要在不改变文件名的情况下模拟改变文件名的情况下很有用。 +‘-n’选项告诉rename命令在不实际改变名称的情况下显示文件将会重命名的情况。这个选项在你想要在不改变文件名的情况下模拟改变文件名的情况下很有用。 ‘-f’选项强制覆盖存在的文件。 @@ -43,7 +42,7 @@ When it comes to renaming multiple files, the rename utility is probably the eas ### 更改文件名模式 ### -现在让我们考虑包含子模式的更复杂的正则表达式。在PCRE中,子模式包含在圆括号中,$符后接上数字(比如$1,$2)。 +现在让我们考虑更复杂的包含子模式的正则表达式。在PCRE中,子模式包含在圆括号中,$符后接上数字(比如$1,$2)。 比如,下面的命令会将‘img_NNNN.jpeg’变成‘dan_NNNN.jpg’。 @@ -57,7 +56,7 @@ When it comes to renaming multiple files, the rename utility is probably the eas img_5420.jpeg renamed as dan_5420.jpg img_5421.jpeg renamed as dan_5421.jpg -比如,下面的命令会将‘img_000NNNN.jpeg’变成‘dan_NNNN.jpg’。 +比如,下面的命令会将‘img\_000NNNN.jpeg’变成‘dan\_NNNN.jpg’。 # rename -v 's/img_\d{3}(\d{4})\.jpeg$/dan_$1\.jpg/' *jpeg @@ -76,7 +75,7 @@ When it comes to renaming multiple files, the rename utility is probably the eas via: http://ask.xmodulo.com/rename-multiple-files-linux.html 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 71bf51d050f76070804488fcb7f9dc686456075a Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 18 Feb 2015 15:31:59 +0800 Subject: [PATCH 057/163] PUB:20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17 @Vic020 --- ...all Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename {translated/tech => published}/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md (92%) diff --git a/translated/tech/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md b/published/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md similarity index 92% rename from translated/tech/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md rename to published/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md index 61202528a9..64e065fa5b 100644 --- a/translated/tech/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md +++ b/published/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md @@ -2,14 +2,14 @@ ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Kodi_Xmas.jpg) -[Kodi][1],原名就是大名鼎鼎的XBMC,发布[最新版本14][2],命名为Helix。感谢官方XMBC提供的PPA,现在可以很简单地在Ubuntu14.04中安装了。 +[Kodi][1],原名就是大名鼎鼎的XBMC,发布了开发代号为Helix的[最新版本14][2]。感谢官方XMBC提供的PPA,现在可以很简单地在Ubuntu14.04中安装了。 有些人可能还不了解Kodi,它是一个媒体中心软件,支持所有平台,如Windows、Linux、 Mac, Android等。此软件拥有全屏的媒体中心,可以管理所有音乐和视频,不单支持本地文件还支持网络播放,如Tube、[Netflix][3]、 Hulu, Amazon Prime和其他流媒体服务商。 ### 在 Ubuntu 14.04 和 Linux Mint 17 中安装 XBMC 14 Kodi Helix ### -再次感谢官方的PPA,让我们可以轻松安装Kodi 14。 -支持Ubuntu 14.04、Ubuntu 12.04、Linux Mint 17、Pinguy OS 14.04、Deepin 2014、LXLE 14.04、Linux Lite 2.0, Elementary OS 以及其他基于 Ubuntu 的 Linux 发行版。 +再次感谢官方的PPA,让我们可以轻松安装Kodi 14。支持Ubuntu 14.04、Ubuntu 12.04、Linux Mint 17、Pinguy OS 14.04、Deepin 2014、LXLE 14.04、Linux Lite 2.0, Elementary OS 以及其他基于 Ubuntu 的 Linux 发行版。 + 打开终端(Ctrl+Alt+T)然后使用下列命令。 sudo add-apt-repository ppa:team-xbmc/ppa @@ -31,6 +31,7 @@ sudo add-apt-repository --remove ppa:team-xbmc/ppa 我希望这篇简单的文章可以帮助到你在Ubuntu、Linux Mint 和其他 Linux 版本中轻松安装 Kodi 14。你是怎么发现 Kodi 14 Helix 的? + 你有没有使用其他的媒体中心来作为 XBMC 的替代?可以在下面的评论区分享你的观点。 -------------------------------------------------------------------------------- From fbdce4f657062bfb0893bc305f7b1876b7f893df Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 18 Feb 2015 15:45:50 +0800 Subject: [PATCH 058/163] translating --- sources/share/20150209 Non-Linux FOSS--Homebrew.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150209 Non-Linux FOSS--Homebrew.md b/sources/share/20150209 Non-Linux FOSS--Homebrew.md index bb385737f3..23a59a2ff2 100644 --- a/sources/share/20150209 Non-Linux FOSS--Homebrew.md +++ b/sources/share/20150209 Non-Linux FOSS--Homebrew.md @@ -1,3 +1,5 @@ +Translating---geekpi + Non-Linux FOSS: Homebrew ================================================================================ I use OS X quite often during my day job. I'm able to tolerate it largely due to the terminal. If I couldn't do my work with green text on a black background, I think I'd go crazy (or crazier). Unfortunately, OS X doesn't come with all the command-line tools I need. That's where Homebrew comes in to save the day. @@ -21,4 +23,4 @@ via: http://www.linuxjournal.com/content/non-linux-foss-homebrew 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.linuxjournal.com/users/shawn-powers -[1]:http://brew.sh/ \ No newline at end of file +[1]:http://brew.sh/ From a511692fa569490e0b159408ae8b6cb16d5b76e2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 18 Feb 2015 16:01:00 +0800 Subject: [PATCH 059/163] translated --- .../20150209 Non-Linux FOSS--Homebrew.md | 26 ------------------- .../20150209 Non-Linux FOSS--Homebrew.md | 24 +++++++++++++++++ 2 files changed, 24 insertions(+), 26 deletions(-) delete mode 100644 sources/share/20150209 Non-Linux FOSS--Homebrew.md create mode 100644 translated/share/20150209 Non-Linux FOSS--Homebrew.md diff --git a/sources/share/20150209 Non-Linux FOSS--Homebrew.md b/sources/share/20150209 Non-Linux FOSS--Homebrew.md deleted file mode 100644 index 23a59a2ff2..0000000000 --- a/sources/share/20150209 Non-Linux FOSS--Homebrew.md +++ /dev/null @@ -1,26 +0,0 @@ -Translating---geekpi - -Non-Linux FOSS: Homebrew -================================================================================ -I use OS X quite often during my day job. I'm able to tolerate it largely due to the terminal. If I couldn't do my work with green text on a black background, I think I'd go crazy (or crazier). Unfortunately, OS X doesn't come with all the command-line tools I need. That's where Homebrew comes in to save the day. - -![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11811fossf1.png) - -Homebrew acts like the package management system OS X is lacking. Using commands very similar to apt-get, it allows the installation of hundreds of applications. A perfect example is the wget program. I was surprised to find that OS X doesn't include wget, but with Homebrew, it's a simple one-liner away. - -The best part is that Homebrew installs everything in the /usr/local file space. There's no reason to worry about Homebrew corrupting your system, because it doesn't touch anything outside of /usr/local. OS X system updates won't overwrite your programs, and because /usr/local/bin is already in the PATH, installed Homebrew apps just work! - -Homebrew uses Ruby to manage its packages and functions, but it doesn't require any programming knowledge to use. And the installation procedure is literally a copy/paste on the command line. If you use OS X, but you wish you could install packages as easily as in Linux, give Homebrew a try: [http://brew.sh][1]. - --------------------------------------------------------------------------------- - -via: http://www.linuxjournal.com/content/non-linux-foss-homebrew - -作者:[Shawn Powers][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linuxjournal.com/users/shawn-powers -[1]:http://brew.sh/ diff --git a/translated/share/20150209 Non-Linux FOSS--Homebrew.md b/translated/share/20150209 Non-Linux FOSS--Homebrew.md new file mode 100644 index 0000000000..a6f30ec50e --- /dev/null +++ b/translated/share/20150209 Non-Linux FOSS--Homebrew.md @@ -0,0 +1,24 @@ +非Linux的免费开源软件:Homebrew +================================================================================ +我日常工作中使用的是OS X。我能容忍它很大程序上是因为它的终端。如果我不能在黑色背景绿色文字的终端下工作,我想我会疯了。不幸的是,OS Xmei没有我需要的全部命令行工具。Homebrew的到来拯救了这。 + +![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11811fossf1.png) + +Homebrew扮演了OS X中缺乏的包管理器的角色。命令的使用很像apt-get,它能够安装无数的应用。一个最好的例子是wget。我很惊讶OS X中没有包含wget,但是homebrew中有,这是最简单的一套了 + +最棒的是homebrew在/usr/local文件夹下安装软件。你不必担心homebrew会破坏你的系统,因为它不会访问/usr/local之外的其他文件。OSX系统更新不会覆盖你的程序,并且/usr/local/bin已经在PATH中,使用homebrew安装的程序可以直接工作。 + +homebrew使用ruby管理它的包和功能,但是使用它不需要任何编程知识。并且安装过程只需要在命令行中复制粘贴就好了。如果你使用的是OS X,但是你希望像在Linux中那样方便地安装熬,就试一试homrbrew吧:[http://brew.sh][1]。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxjournal.com/content/non-linux-foss-homebrew + +作者:[Shawn Powers][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linuxjournal.com/users/shawn-powers +[1]:http://brew.sh/ From 53ff38ea21d4d3ede0227a4c83df875c1f1e941a Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 18 Feb 2015 16:08:44 +0800 Subject: [PATCH 060/163] PUB:20150104 Auditd--Tool for Security Auditing on Linux Server @shipsw --- ...l for Security Auditing on Linux Server.md | 79 +++++++++++-------- 1 file changed, 46 insertions(+), 33 deletions(-) rename {translated/tech => published}/20150104 Auditd--Tool for Security Auditing on Linux Server.md (73%) diff --git a/translated/tech/20150104 Auditd--Tool for Security Auditing on Linux Server.md b/published/20150104 Auditd--Tool for Security Auditing on Linux Server.md similarity index 73% rename from translated/tech/20150104 Auditd--Tool for Security Auditing on Linux Server.md rename to published/20150104 Auditd--Tool for Security Auditing on Linux Server.md index 1071e1521b..3e528fffa6 100644 --- a/translated/tech/20150104 Auditd--Tool for Security Auditing on Linux Server.md +++ b/published/20150104 Auditd--Tool for Security Auditing on Linux Server.md @@ -1,14 +1,14 @@ Auditd - Linux 服务器安全审计工具 ================================================================================ -首先,Linoxide组祝读者 **2015新年快乐万事如意!** 。下面开始这个新年版审计工具的介绍。 +首先,Linux中国祝贺读者 **2015羊年春节快乐,万事如意!** 。下面开始这个新年版审计工具的介绍。 -安全防护是首先要考虑的问题。为了避免别人盗取我们的数据,我们需要维护它。安全防护包括很多东西,审计是其中一个。 +安全防护是首先要考虑的问题。为了避免别人盗取我们的数据,我们需要时刻关注它。安全防护包括很多东西,审计是其中之一。 -我们知道Linux系统上有一个叫 **auditd** 的审计工具。这个工具在大多数Linux操作系统中是默认安装的。审计工具是什么?如何使用?下面我们开始介绍。 +我们知道Linux系统上有一个叫 **auditd** 的审计工具。这个工具在大多数Linux操作系统中是默认安装的。那么auditd 是什么?如何使用呢?下面我们开始介绍。 ### 什么是审计? ### -审计(或审计监控)是Linux审计系统中用户部分的一个组件,负责将审计记录写入磁盘。 +auditd(或 auditd 守护进程)是Linux审计系统中用户空间的一个组件,其负责将审计记录写入磁盘。 ![](http://blog.linoxide.com/wp-content/uploads/2014/12/what_is_auditd.png) @@ -20,16 +20,17 @@ Ubuntu系统中,我们可以使用 [wajig][1] 工具或者 **apt-get 工具** 按照下面的说明安装auditd,安装完毕后将自动安装以下auditd和相关的工具: -- **auditctl ;** 运行过程中控制守护进程的工具,比如如添加规则等等。 -- **/etc/audit/audit.rules ;** 记录审计规则的文件。 -- **aureport ;** 查看和生成审计报告的工具。 -- **ausearch ;** 查找审计事件的工具 -- **auditspd ;** 转发事件通知给其他应用程序,不写审计日志文件。 -- **autrace ;** 跟踪处理过程的命令。 -- **/etc/audit/auditd.conf ;** auditd工具的配置文件。 -- 首次安装 **auditd** 后, 审计规则是空的。 +- **auditctl :** 即时控制审计守护进程的行为的工具,比如如添加规则等等。 +- **/etc/audit/audit.rules :** 记录审计规则的文件。 +- **aureport :** 查看和生成审计报告的工具。 +- **ausearch :** 查找审计事件的工具 +- **auditspd :** 转发事件通知给其他应用程序,而不是写入到审计日志文件中。 +- **autrace :** 一个用于跟踪进程的命令。 +- **/etc/audit/auditd.conf :** auditd工具的配置文件。 -可以使用以下命令查看 +首次安装 **auditd** 后, 审计规则是空的。 + +可以使用以下命令查看: $ sudo auditctl -l @@ -41,7 +42,7 @@ Ubuntu系统中,我们可以使用 [wajig][1] 工具或者 **apt-get 工具** #### Audit 文件和目录访问审计 #### -我们使用审计工具的一个目的是监控文件和目录的更改。对于auditd工具,我们可使用命令来配置(注意,以下命令需要root权限)。 +我们使用审计工具的一个基本的需求是监控文件和目录的更改。使用auditd工具,我们可通过如下命令来配置(注意,以下命令需要root权限)。 **文件审计** @@ -51,9 +52,9 @@ Ubuntu系统中,我们可以使用 [wajig][1] 工具或者 **apt-get 工具** **选项 :** -- **-w path ;** 监控指定的路径,上面的命令指定监控路径 /etc/passwd -- **-p ; ** 指定触发审计的文件和目录的访问权限 -- **rwxa ;** 指定的触发条件,r 读取权限,w 写入权限,x 执行权限 +- **-w path :** 指定要监控的路径,上面的命令指定了监控的文件路径 /etc/passwd +- **-p :** 指定触发审计的文件/目录的访问权限 +- **rwxa :** 指定的触发条件,r 读取权限,w 写入权限,x 执行权限,a 属性(attr) #### 目录审计 #### @@ -79,31 +80,41 @@ Ubuntu系统中,我们可以使用 [wajig][1] 工具或者 **apt-get 工具** $ sudo ausearch -f /etc/passwd -- **-f** 设定ausearch审计/etc/passwd文件 -- 下面是输出 : +- **-f** 设定ausearch 调出 /etc/passwd文件的审计内容 + +下面是输出 : + > **time**->Mon Dec 22 09:39:16 2014 + > type=PATH msg=audit(1419215956.471:194): item=0 **name="/etc/passwd"** inode=142512 dev=08:01 mode=0100644 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL + > type=CWD msg=audit(1419215956.471:194): **cwd="/home/pungki"** + > type=SYSCALL msg=audit(1419215956.471:194): arch=40000003 **syscall=5** success=yes exit=3 a0=b779694b a1=80000 a2=1b6 a3=b8776aa8 items=1 ppid=2090 pid=2231 **auid=4294967295 uid=1000 gid=1000** euid=0 suid=0 fsuid=0 egid=1000 sgid=1000 fsgid=1000 tty=pts0 ses=4294967295 **comm="sudo" exe="/usr/bin/sudo"** key=(null) 下面开始解读输出结果。 -- **time ;** 审计时间。 -- **name ;** 审计对象 -- **cwd ;** 当前路径 -- **syscall ;** 相关的系统调用 -- **auid ;** 审计用户ID -- **uid and gid ;** 访问文件的用户ID和用户组ID -- **comm ;** 用户访问文件的命令 -- **exe ;** 上面命令的可执行文件路径 -- 以上审计日志显示文件未被改动。 +- **time :** 审计时间。 +- **name :** 审计对象 +- **cwd :** 当前路径 +- **syscall :** 相关的系统调用 +- **auid :** 审计用户ID +- **uid 和 gid :** 访问文件的用户ID和用户组ID +- **comm :** 用户访问文件的命令 +- **exe :** 上面命令的可执行文件路径 - 以下我们将要添加一个用户,看看auditd如何记录文件 /etc/passwd的改动的。 +以上审计日志显示文件未被改动。 + +以下我们将要添加一个用户,看看auditd如何记录文件 /etc/passwd的改动的。 > **time->**Mon Dec 22 11:25:23 2014 + > type=PATH msg=audit(1419222323.628:510): item=1 **name="/etc/passwd.lock"** inode=143992 dev=08:01 mode=0100600 ouid=0 ogid=0 rdev=00:00 nametype=DELETE + > type=PATH msg=audit(1419222323.628:510): item=0 **name="/etc/"** inode=131073 dev=08:01 mode=040755 ouid=0 ogid=0 rdev=00:00 nametype=PARENT + > type=CWD msg=audit(1419222323.628:510): **cwd="/root"** + > type=SYSCALL msg=audit(1419222323.628:510): arch=40000003 **syscall=10** success=yes exit=0 a0=bfc0ceec a1=0 a2=bfc0ceec a3=897764c items=2 ppid=2978 pid=2994 **auid=4294967295 uid=0 gid=0** euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=4294967295 **comm="chfn" exe="/usr/bin/chfn"** key=(null) 我们可以看到,在指定的时间,**/etc/passwd ** 被root用户(uid =0, gid=0)在/root目录下修改。/etc/passwd 文件是使用**/usr/bin/chfn** 访问的。 @@ -133,7 +144,7 @@ Ubuntu系统中,我们可以使用 [wajig][1] 工具或者 **apt-get 工具** 一旦定义审计规则后,它会自动运行。过一段时间后,我们可以看看auditd是如何帮我们跟踪审计的。 -Auditd提供了另一个工具叫 **aureport** 。从名字上可以猜到, **aureport** 是使用系统日志生成简要报告的工具。 +Auditd提供了另一个工具叫 **aureport** 。从名字上可以猜到, **aureport** 是使用系统审计日志生成简要报告的工具。 我们已经配置auditd去跟踪/etc/passwd文件。auditd参数设置后一段时间后,audit.log 文件就创建出来了。 @@ -155,7 +166,7 @@ Auditd提供了另一个工具叫 **aureport** 。从名字上可以猜到, * 从上图可以看出,由两个用户在特定的时间授权失败。 -如果我们想看所有相关账户修改的事件,可以使用-m参数。 +如果我们想看所有账户修改相关的事件,可以使用-m参数。 $ sudo aureport -m @@ -165,8 +176,10 @@ Auditd提供了另一个工具叫 **aureport** 。从名字上可以猜到, * 我们已经添加如下规则: +- $ sudo auditctl -w /etc/passwd -p rwxa - $ sudo auditctl -w /production/ -- 现在,如果确信这些规则正常,我们可以将其添加到**/etc/audit/audit.rules**中使得规则永久有效。以下介绍如何将他们添加到/etc/audit/audit.rules中去。 + +现在,如果确信这些规则可以正常工作,我们可以将其添加到**/etc/audit/audit.rules**中使得规则永久有效。以下介绍如何将他们添加到/etc/audit/audit.rules中去。 ![](http://blog.linoxide.com/wp-content/uploads/2014/12/audit_rules_file.png) @@ -192,7 +205,7 @@ via: http://linoxide.com/how-tos/auditd-tool-security-auditing/ 作者:[Pungki Arianto][a] 译者:[shipsw](https://github.com/shipsw) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9fdc9f9324b786499a0b5d1b9d5ff905a38fb8ac Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 19 Feb 2015 12:31:11 +0800 Subject: [PATCH 061/163] Update 20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇文章。 --- ...teps to Setup Local Repository in Ubuntu using APT-mirror.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md b/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md index 2cba8c739f..f3a5a451d6 100644 --- a/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md +++ b/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md @@ -1,3 +1,5 @@ +Translating by FSSlc + 4 Steps to Setup Local Repository in Ubuntu using APT-mirror ================================================================================ Today we will show you how to setup a local repository in your Ubuntu PC or Ubuntu Server straight from the official Ubuntu repository. There are a lot benefit of creating a local repository in your computer if you have a lot of computers to install software, security updates and fixes often in all systems, then having a local Ubuntu repository is an efficient way. Because all required packages are downloaded over the fast LAN connection from your local server, so that it will save your Internet bandwidth and reduces the annual cost of Internet.. From 00d1c52258a3bb3427ef2ede55d854dcc441df7e Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 19 Feb 2015 15:10:23 +0800 Subject: [PATCH 062/163] translating --- ...wo Google Chrome Icons From Dock In Elementary OS Freya.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md index cccee5971a..e8c39f25cf 100644 --- a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md +++ b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md @@ -1,3 +1,5 @@ +Translating---geekpi + Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya [Quick Tip] ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) @@ -52,4 +54,4 @@ via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ [a]:http://itsfoss.com/author/abhishek/ [1]:http://elementary.io/ -[2]:http://midori-browser.org/ \ No newline at end of file +[2]:http://midori-browser.org/ From 91ff15cfe0f15e2bb7f775ed75d08034e594415d Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 19 Feb 2015 15:27:52 +0800 Subject: [PATCH 063/163] translated --- ... Icons From Dock In Elementary OS Freya.md | 57 ------------------- ... Icons From Dock In Elementary OS Freya.md | 56 ++++++++++++++++++ 2 files changed, 56 insertions(+), 57 deletions(-) delete mode 100644 sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md create mode 100644 translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md diff --git a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md deleted file mode 100644 index e8c39f25cf..0000000000 --- a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md +++ /dev/null @@ -1,57 +0,0 @@ -Translating---geekpi - -Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya [Quick Tip] -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) - -This quick tip shows you **how to get rid of two Google Chrome icons from the dock in Elementary OS Freya**. - -I hardly use the default Midori browser in [Elementary OS][1] Freya as Google Chrome is my main browser across all OSes. While [Midori][2] is kept in the dock by default, you’ll have to search for Google Chrome in Slingshot (applications) every time you want to open Google Chrome. To save time, I presume you have selected the “keep in dock” option for a quick access to Chrome. - -The problem here is that when you click on the Chrome icon in the dock, it creates another instance of Google Chrome. This leaves you with two Chrome icons in the docks and this is something that might be ignored by many but definitely an annoyance and against the design. If you share the same feeling, let’s see how can we remove the second Google Chrome icon. - -### Remove two Google Chrome icons from dock in Elementary OS Freya ### - -#### Step 1: #### - -Remove Google Chrome from the dock. - -#### Step 2: #### - -Open the terminal and use the following command: - - cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications - -#### Step 3: #### - -Next we need to edit the google-chrome.desktop file. Use the following commands: - - scratch-text-editor ~/.local/share/applications/google-chrome.desktop - -It will open the google-chrome.desktop file in Scratch for editing. Under the [Desktop Entry] section, add the following line: - - StartupWMClass=Google-chrome-stable - -It will look a bit like this: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/two_Google_Chrome_Elementary_Freya.png) - -#### Step 4: #### - -Go to Slingshot and open Google Chrome again. Do select “keep in dock” again. Close it and start it again to verify that it doesn’t open a new Chrome instance in the dock. No reboot of system is required here. - -I hope this quick tip helped you to remove multiple Google Chrome icons from dock in Elementary OS Freya. Feel free to ask your questions and drop your suggestions in the comment below. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://elementary.io/ -[2]:http://midori-browser.org/ diff --git a/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md new file mode 100644 index 0000000000..19bb495231 --- /dev/null +++ b/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md @@ -0,0 +1,56 @@ +如何避免在ELemetary OS Freya中出现两个Google Chrome 图标[快速提示] +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) + +这篇文章会教你**如何避免在ELemetary OS Freya中出现两个Google Chrome 图标**。 + +Chrome才是我在所有系统中使用的主浏览器。而[Modori][2]默认在dock中,你不得不每次在使用Chrome时在Slingshot中搜索Google Chrome。为了节省时间,我假设你选择的是“保持在dock”中。 + +这里的问题是当你点击dock中的Chrome图标时,它会创建另外一个Google Chrome的实例。这就在dock中留下两个Chrome图标,这个或许可以被忽略但是很显然这是设计上的一个干扰。如果你有相同的感受,让我们看下如何移除这第二个Google Chrome图标。 + +### 在Elementary OS Freya的dock中删除第二个Google Chrome 图标 ### + +#### 第一步: #### + +从dock中删除Google Chrome。 + +#### 第二步: #### + +打开终端并使用下面的命令: + + cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications + +#### 第三步: #### + +接下来我们要编辑google-chrome.destop文件。使用下面的命令: + + scratch-text-editor ~/.local/share/applications/google-chrome.desktop + +这会用Scratch打开google-chrome.destop文件。在[Desktop Entry]段落下,加入下面的行: + + + StartupWMClass=Google-chrome-stable + +看上去像这样: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/two_Google_Chrome_Elementary_Freya.png) + +#### 第四步: #### + +进入Slingshot并且再次打开Google Chrome。再次选择“keep in dock”。关闭并重启来验证它是否在dock中打开了另外一个新的Chrome实例。这里不需要重启系统。 + +我希望这篇提示能够帮助你删除Elementary OS Freya中多出的Chrome图标。有任何问题或建议让我在评论区中知道。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://elementary.io/ +[2]:http://midori-browser.org/ From 7babd7fd76adf4482bca0b121bee07c0d821ec11 Mon Sep 17 00:00:00 2001 From: zheng Date: Thu, 19 Feb 2015 15:31:43 +0800 Subject: [PATCH 064/163] Revert "translated" This reverts commit 91ff15cfe0f15e2bb7f775ed75d08034e594415d. --- ... Icons From Dock In Elementary OS Freya.md | 57 +++++++++++++++++++ ... Icons From Dock In Elementary OS Freya.md | 56 ------------------ 2 files changed, 57 insertions(+), 56 deletions(-) create mode 100644 sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md delete mode 100644 translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md diff --git a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md new file mode 100644 index 0000000000..e8c39f25cf --- /dev/null +++ b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md @@ -0,0 +1,57 @@ +Translating---geekpi + +Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya [Quick Tip] +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) + +This quick tip shows you **how to get rid of two Google Chrome icons from the dock in Elementary OS Freya**. + +I hardly use the default Midori browser in [Elementary OS][1] Freya as Google Chrome is my main browser across all OSes. While [Midori][2] is kept in the dock by default, you’ll have to search for Google Chrome in Slingshot (applications) every time you want to open Google Chrome. To save time, I presume you have selected the “keep in dock” option for a quick access to Chrome. + +The problem here is that when you click on the Chrome icon in the dock, it creates another instance of Google Chrome. This leaves you with two Chrome icons in the docks and this is something that might be ignored by many but definitely an annoyance and against the design. If you share the same feeling, let’s see how can we remove the second Google Chrome icon. + +### Remove two Google Chrome icons from dock in Elementary OS Freya ### + +#### Step 1: #### + +Remove Google Chrome from the dock. + +#### Step 2: #### + +Open the terminal and use the following command: + + cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications + +#### Step 3: #### + +Next we need to edit the google-chrome.desktop file. Use the following commands: + + scratch-text-editor ~/.local/share/applications/google-chrome.desktop + +It will open the google-chrome.desktop file in Scratch for editing. Under the [Desktop Entry] section, add the following line: + + StartupWMClass=Google-chrome-stable + +It will look a bit like this: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/two_Google_Chrome_Elementary_Freya.png) + +#### Step 4: #### + +Go to Slingshot and open Google Chrome again. Do select “keep in dock” again. Close it and start it again to verify that it doesn’t open a new Chrome instance in the dock. No reboot of system is required here. + +I hope this quick tip helped you to remove multiple Google Chrome icons from dock in Elementary OS Freya. Feel free to ask your questions and drop your suggestions in the comment below. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://elementary.io/ +[2]:http://midori-browser.org/ diff --git a/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md deleted file mode 100644 index 19bb495231..0000000000 --- a/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md +++ /dev/null @@ -1,56 +0,0 @@ -如何避免在ELemetary OS Freya中出现两个Google Chrome 图标[快速提示] -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) - -这篇文章会教你**如何避免在ELemetary OS Freya中出现两个Google Chrome 图标**。 - -Chrome才是我在所有系统中使用的主浏览器。而[Modori][2]默认在dock中,你不得不每次在使用Chrome时在Slingshot中搜索Google Chrome。为了节省时间,我假设你选择的是“保持在dock”中。 - -这里的问题是当你点击dock中的Chrome图标时,它会创建另外一个Google Chrome的实例。这就在dock中留下两个Chrome图标,这个或许可以被忽略但是很显然这是设计上的一个干扰。如果你有相同的感受,让我们看下如何移除这第二个Google Chrome图标。 - -### 在Elementary OS Freya的dock中删除第二个Google Chrome 图标 ### - -#### 第一步: #### - -从dock中删除Google Chrome。 - -#### 第二步: #### - -打开终端并使用下面的命令: - - cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications - -#### 第三步: #### - -接下来我们要编辑google-chrome.destop文件。使用下面的命令: - - scratch-text-editor ~/.local/share/applications/google-chrome.desktop - -这会用Scratch打开google-chrome.destop文件。在[Desktop Entry]段落下,加入下面的行: - - - StartupWMClass=Google-chrome-stable - -看上去像这样: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/two_Google_Chrome_Elementary_Freya.png) - -#### 第四步: #### - -进入Slingshot并且再次打开Google Chrome。再次选择“keep in dock”。关闭并重启来验证它是否在dock中打开了另外一个新的Chrome实例。这里不需要重启系统。 - -我希望这篇提示能够帮助你删除Elementary OS Freya中多出的Chrome图标。有任何问题或建议让我在评论区中知道。 - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ - -作者:[Abhishek][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://elementary.io/ -[2]:http://midori-browser.org/ From 8e83ef1442c76cb0cc40bf52b6818ff9215dbb48 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 19 Feb 2015 15:39:20 +0800 Subject: [PATCH 065/163] translated --- ... Icons From Dock In Elementary OS Freya.md | 57 ------------------- ... Icons From Dock In Elementary OS Freya.md | 56 ++++++++++++++++++ 2 files changed, 56 insertions(+), 57 deletions(-) delete mode 100644 sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md create mode 100644 translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md diff --git a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md deleted file mode 100644 index e8c39f25cf..0000000000 --- a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md +++ /dev/null @@ -1,57 +0,0 @@ -Translating---geekpi - -Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya [Quick Tip] -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) - -This quick tip shows you **how to get rid of two Google Chrome icons from the dock in Elementary OS Freya**. - -I hardly use the default Midori browser in [Elementary OS][1] Freya as Google Chrome is my main browser across all OSes. While [Midori][2] is kept in the dock by default, you’ll have to search for Google Chrome in Slingshot (applications) every time you want to open Google Chrome. To save time, I presume you have selected the “keep in dock” option for a quick access to Chrome. - -The problem here is that when you click on the Chrome icon in the dock, it creates another instance of Google Chrome. This leaves you with two Chrome icons in the docks and this is something that might be ignored by many but definitely an annoyance and against the design. If you share the same feeling, let’s see how can we remove the second Google Chrome icon. - -### Remove two Google Chrome icons from dock in Elementary OS Freya ### - -#### Step 1: #### - -Remove Google Chrome from the dock. - -#### Step 2: #### - -Open the terminal and use the following command: - - cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications - -#### Step 3: #### - -Next we need to edit the google-chrome.desktop file. Use the following commands: - - scratch-text-editor ~/.local/share/applications/google-chrome.desktop - -It will open the google-chrome.desktop file in Scratch for editing. Under the [Desktop Entry] section, add the following line: - - StartupWMClass=Google-chrome-stable - -It will look a bit like this: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/two_Google_Chrome_Elementary_Freya.png) - -#### Step 4: #### - -Go to Slingshot and open Google Chrome again. Do select “keep in dock” again. Close it and start it again to verify that it doesn’t open a new Chrome instance in the dock. No reboot of system is required here. - -I hope this quick tip helped you to remove multiple Google Chrome icons from dock in Elementary OS Freya. Feel free to ask your questions and drop your suggestions in the comment below. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://elementary.io/ -[2]:http://midori-browser.org/ diff --git a/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md new file mode 100644 index 0000000000..19bb495231 --- /dev/null +++ b/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md @@ -0,0 +1,56 @@ +如何避免在ELemetary OS Freya中出现两个Google Chrome 图标[快速提示] +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) + +这篇文章会教你**如何避免在ELemetary OS Freya中出现两个Google Chrome 图标**。 + +Chrome才是我在所有系统中使用的主浏览器。而[Modori][2]默认在dock中,你不得不每次在使用Chrome时在Slingshot中搜索Google Chrome。为了节省时间,我假设你选择的是“保持在dock”中。 + +这里的问题是当你点击dock中的Chrome图标时,它会创建另外一个Google Chrome的实例。这就在dock中留下两个Chrome图标,这个或许可以被忽略但是很显然这是设计上的一个干扰。如果你有相同的感受,让我们看下如何移除这第二个Google Chrome图标。 + +### 在Elementary OS Freya的dock中删除第二个Google Chrome 图标 ### + +#### 第一步: #### + +从dock中删除Google Chrome。 + +#### 第二步: #### + +打开终端并使用下面的命令: + + cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications + +#### 第三步: #### + +接下来我们要编辑google-chrome.destop文件。使用下面的命令: + + scratch-text-editor ~/.local/share/applications/google-chrome.desktop + +这会用Scratch打开google-chrome.destop文件。在[Desktop Entry]段落下,加入下面的行: + + + StartupWMClass=Google-chrome-stable + +看上去像这样: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/two_Google_Chrome_Elementary_Freya.png) + +#### 第四步: #### + +进入Slingshot并且再次打开Google Chrome。再次选择“keep in dock”。关闭并重启来验证它是否在dock中打开了另外一个新的Chrome实例。这里不需要重启系统。 + +我希望这篇提示能够帮助你删除Elementary OS Freya中多出的Chrome图标。有任何问题或建议让我在评论区中知道。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://elementary.io/ +[2]:http://midori-browser.org/ From 651ba8285ee3bf889bbaab474b9c83b75e5564c3 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 19 Feb 2015 22:43:47 +0800 Subject: [PATCH 066/163] PUB:20150205 LinuxQuestions Survey Results Surface Top Open Source Projects @jerryling315 --- ...rvey Results Surface Top Open Source Projects.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) rename {translated/talk => published}/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md (54%) diff --git a/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md b/published/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md similarity index 54% rename from translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md rename to published/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md index 0052aab380..9430f11ada 100644 --- a/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md +++ b/published/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md @@ -1,17 +1,16 @@ -LinuxQuestions Survey Results Surface Top Open Source Projects +LinuxQuestions 问卷调查揭晓最佳开源项目 ================================================================================ ![](http://farm5.static.flickr.com/4099/4777335328_3cc363c419_m.jpg) -在Linux用户社区中, 很多人每年都会期待来自 LinuxQuestions.org 细致并可靠的年度问卷调查结果. 如同[Susan在她的报告][1]中指出的那样, 今年的[结果][2]着重于调查网站读者心中最棒的开源项目. 这份报告目前已经完成. 在LinuxQuestions的大多数人都是"专家级"的用户, 他们经常在网站上在线回答Linux新手们的提问. +在Linux用户社区中, 很多人每年都会期待来自 LinuxQuestions.org 细致可靠的年度问卷调查报告。如同[Susan在她的报告][1]中指出的那样, 今年的[结果][2]着重于调查网站读者心中最棒的开源项目。 这份报告目前已经完成。 在LinuxQuestions的大多数人都是“专家级”的用户, 他们经常在网站上在线回答Linux新手们的提问。 -在Susan所作的报告的附加内容里, 你可以看到由"专家"们对开源世界的关注点分布. -In addition to the summary results that Susan provided in her post, below you'll find a graphical snapshot of what the experts took note of on the open source front. +在Susan所作的报告的附加内容里, 你可以看到由“专家”们对开源世界的关注点分布。 -你也可以在[这里][3]找到一份较为精美的调查问卷总结图.这里呈现了网站投票得出的最佳Linux发行版, 可以看到Mint和Slackwaer平分了半壁江山: +你也可以在[这里][3]找到一份较为精美的调查问卷总结图.这里呈现了网站投票得出的最佳Linux发行版, 可以看到Mint和Slackwaer平分了半壁江山: ![](http://i1311.photobucket.com/albums/s669/webworkerdaily/lin_zps9ogvyrty.png) -而下图则是网站票选出的得出的最佳云项目. 值得注意的是, LinuxQuestions的用户群体给予了ownCloud项目极高的评价. 你一定得亲自去看看调查结果的详情, 也看看 [Susan关于各项目"赢家"][4]的总结 , 还有[一堆精美的图表][5]. +而下图则是网站票选出的得出的最佳云项目。值得注意的是, LinuxQuestions的用户群体给予了ownCloud项目极高的评价。 你一定得亲自去看看调查结果的详情, 也看看 [Susan 关于各项目“赢家”][4]的总结, 还有[一堆精美的图表][5]。 ![](http://i1311.photobucket.com/albums/s669/webworkerdaily/lin2_zps9nxf7yyi.png) @@ -21,7 +20,7 @@ via: http://ostatic.com/blog/linuxquestions-survey-results-surface-top-open-sour 作者:[Sam Dean][a] 译者:[jerryling315](https://github.com/jerryling315) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a12cc5dd8a681894f2516a367a4eeeb03419e9f9 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Feb 2015 00:00:52 +0800 Subject: [PATCH 067/163] PUB:20150121 If a 32-bit integer overflows @KayGuoWhu --- .../20150121 If a 32-bit integer overflows.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) rename {translated/talk => published}/20150121 If a 32-bit integer overflows.md (87%) diff --git a/translated/talk/20150121 If a 32-bit integer overflows.md b/published/20150121 If a 32-bit integer overflows.md similarity index 87% rename from translated/talk/20150121 If a 32-bit integer overflows.md rename to published/20150121 If a 32-bit integer overflows.md index 651e829189..30687f4bc8 100644 --- a/translated/talk/20150121 If a 32-bit integer overflows.md +++ b/published/20150121 If a 32-bit integer overflows.md @@ -1,16 +1,17 @@ 如果使用32位整型会溢出,那么是否可以使用一个40位结构体代替64位长整型? ---------- +====== + +###问题: -#问题: 假如说,使用32位的整型会溢出,在不考虑使用长整型的情况下,如果我们只需要表示2的40次方范围内的数,是否可以利用某些40位长的数据类型来表示呢?这样的话,每个整型数就可以节省24位的空间。 如果可以,该怎么做? 需求是:我现在必须处理数以亿计的数字,所以在存储空间上受到了很大的限制。 -#回答: +###回答: -##可以是可以,但是…… +可以是可以,但是…… 这种方法的确可行,但这么做通常没什么意义(因为几乎没有程序需要处理多达十亿的数字): @@ -22,14 +23,15 @@ struct bad_idea }; ``` -在这里,变量var占据40位大小,但是以生成代码时拥有非常低的运行效率来换取的(事实证明“非常”二字言过其实了——测试中程序开销仅仅增加了1%到2%,正如下面的测试时间所示),而且这么做通常没什么用。除非你还需要保存一个24位的值(或者是8位、16位的值),这样你皆可以它们放到同一个结构中。不然的话,因为对齐内存地址产生的开销会抵消这么做带来的好处。 +在这里,变量var占据40位大小,但是这是以生成代码时拥有非常低的运行效率来换取的(事实证明“非常”二字言过其实了——测试中程序开销仅仅增加了1%到2%,正如下面的测试时间所示),而且这么做通常没什么用。除非你还需要保存一个24位的值(或者是8位、16位的值),这样你皆可以它们放到同一个结构中。不然的话,因为对齐内存地址产生的开销会抵消这么做带来的好处。 在任何情况下,除非你是真的需要保存数以亿计的数字,否则这样做给内存消耗带来的好处是可以忽略不计的(但是为了处理这些位字段的额外代码量是不可忽略的!)。 ###说明: 在此期间,这个问题已经被更新了,是为了说明实际上确实有需要处理数以亿计数字的情况。假设,采取某些措施来防止因为结构体对齐和填充抵消好处(比如在后24位中存储其它的内容,或者使用多个8位来存储40位),那么这么做就变得有意义了。 -如果有十亿个数,每个数都节省三个字节的空间,那么这么做就非常有用了。因为使用更小的空间存储要求更少的内存页,也就会产生更少的cache和TLB不命中和内存缺页(单个缺页会产生数以千万计的指令(译者注:直译是这样,但语义说不通!))。 + +如果有十亿个数,每个数都节省三个字节的空间,那么这么做就非常有用了。因为使用更小的空间存储要求更少的内存页,也就会产生更少的cache和TLB不命中和内存缺页(单个缺页会产生数以千万计的指令 [译者注:直译是这样,但语义说不通!])。 尽管上面提到的情况不足以充分利用到剩余的24位(它仅仅使用了40位部分),如果确实在剩余位中放入了有用的数据,那么使用类似下面的方法会使得这种思路就管理内存而言显得非常有用。 @@ -43,9 +45,10 @@ struct using_gaps ``` 结构体大小和对齐长度等于64位整型的大小,所以只要使用得当就不会浪费空间,比如对一个保存10亿个数的数组使用这个结构(不考虑使用指定编译器的扩展)。如果你不会用到一个8位的值,那么你可以使用一个48位和16位的值(giving a bigger overflow margin)。 + 或者以牺牲可用性为代价,把8个64位的值放入这样的结构体中(或者使用40和64的组合使得其和满足320)。当然,在这种情况下,通过代码去访问数组结构体中的元素会变得非常麻烦(尽管一种方法是实现一个operator[]在功能上还原线性数组,隐藏结构体的复杂性)。 -更新: +###更新: 我写了一个快速测试工具,只是为了获得位字段的开销(以及伴随位字段引用的重载操作)。由于长度限制将代码发布在gcc.godbolt.org上,在本人64位Win7上的测试结果如下: @@ -85,7 +88,7 @@ via:[stackoverflow](http://stackoverflow.com/questions/27705409/if-a-32-bit-inte 作者:[Damon][a][Michael Kohne][b] 译者:[KayGuoWhu](https://github.com/KayGuoWhu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 20ae8ef474e5ea70b6effa189316ff84d72beafa Mon Sep 17 00:00:00 2001 From: FSSlc Date: Fri, 20 Feb 2015 09:39:23 +0800 Subject: [PATCH 068/163] Translated 20150211 Best Known Linux Archive or Compress Tools.md --- ...t Known Linux Archive or Compress Tools.md | 231 ------------------ ...t Known Linux Archive or Compress Tools.md | 229 +++++++++++++++++ 2 files changed, 229 insertions(+), 231 deletions(-) delete mode 100644 sources/tech/20150211 Best Known Linux Archive or Compress Tools.md create mode 100644 translated/tech/20150211 Best Known Linux Archive or Compress Tools.md diff --git a/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md b/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md deleted file mode 100644 index 86623a5c99..0000000000 --- a/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md +++ /dev/null @@ -1,231 +0,0 @@ -Translating by FSSlc - -Best Known Linux Archive / Compress Tools -================================================================================ -Sending and receiving large files and pictures over the internet is a headache many times. Compression and decompression tools are meant to address this problem. Lets take a quick overview of a few open source tools that are available to make our jobs simpler. - -Tar -gzip, gunzip -bzip2, bunzip2 -7-Zip - -### Tar ### - -Tar is derived from 'Tape archiver' as this was initially used for archiving and storing files on magnetic tapes. It is a GNU software. It can compress a set of files (archives), extract them and manipulate those which already exist. It is useful for storing, backing up and transporting files. Tar can preserve file and directory structure while creating the archives. Files archived using tar have '.tar' extensions. - -Basic Usage - -#### a) Creating an archive (c / --create) #### - - tar --create --verbose --file=archive.tar file1 file2 file3 - -OR - - tar cvf archive.tar file1 file2 file3 - -![tar cvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-cvf.png) - -creating an archive - -#### b) Listing an archive ( t / --list) #### - - tar --list archive.tar - -![tar tvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-tvf.png) - -Listing the contents - -#### c) Extracting an archive (x / --extract) #### - - tar xvf archive.tar - - tar xvf archive.tar --wildcards '*.c' - extracts files with only *.c extension from the archive. - -![tar xvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-xvf.png) - -Extracting files - -![tar xvf --wildcards](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-wildcard.png) - -Extract only the required files - -#### d) Updating an archive ( u / --update) #### - - tar uvf archive.tar newfile.c - updates the archive by adding newfile.c if its version is newer than the existing one. - -![tar uvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-uvf.png) - -Updating an archive - -#### e) Delete from an archive (--delete) #### - - tar--delete -f archive.tar file1.c - deletes 'file1.c' from the tar ball 'archive.tar' - -![tar --delete](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-delete.png) - -Deleting files - -Refer to [tar home page][1] for its detailed usage - -### Gzip / Gunzip ### - -Gzip stands for GNU zip. It is a compression utility that is commonly available in Linux operating system. Compressed files have an extension of '*.gz' - -**Basic Usage** - -#### a) Compressing files #### - - gzip file(s) - -Each file gets compressed individually - -![gzip](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip.png) - -Compress files - -This generally deletes the original files after compression. We can keep the original file by using the -c option. - - gzip -c file > file.gz - -![gzip-c](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip-c.png) - -Keep original files after compressing - -We can also compress a group of files into a single file - - cat file1 file2 file3 | gzip > archieve.gz - -![gz group](http://blog.linoxide.com/wp-content/uploads/2015/01/gz-group.png) - -Compressing a group of files - -#### b) Checking compression ratio #### - -Compression ratio of the compressed file(s) can be verified using the '-l' option. - - gzip -l archieve.gz - -![gzip -l](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip-l.png) - -Checking compression ratio - -#### c) Unzipping files #### - -Gunzip is used for unzipping files. Here also, original files are deleted after decompression. Use the -c option to retain original files. - - gunzip -c archieve.gz - -![gunzip -c](http://blog.linoxide.com/wp-content/uploads/2015/01/gunzip-c.png) - -Unzipping files - -Using '-d' option with gzip command has the same effect of gunzip on compressed files. - -More details can be obtained from [gzip home page][2] - -### Bzip2 / Bunzip2 ### - -[Bzip2][3] is also a compression tool like gzip but can compress files to smaller sizes than that is possible with other traditional tools. But the drawback is that it is slower than gzip. - -**Basic Usage** - -#### a) File Compression #### - -Generally, no options are used for compression and the files to be compressed are passed as arguments. Each file gets compressed individually and compressed files will have the extension 'bz2'. - - bzip2 file1 file2 file3 - -![bzip2](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2.png) - -File Compression - -Use '-k' option to keep the original files after compression / decompression. - -![bzip2 -k](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2-k.png) - -Retaining original files after compression - -'-d' option is used for forced decompression. - -![bzip2 -d](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2-d.png) - -Delete files using -d option - -#### b) Decompression #### - - bunzip2 filename - -![bunzip2](http://blog.linoxide.com/wp-content/uploads/2015/01/bunzip2.png) - -Decompressing files - -bunzip2 can decompress files with extensions bz2, bz, tbz2 and tbz. Files with tbz2 and tbz will end up with '.tar' extension after decompression. - - bzip2 -dc performs the function of decompressing files to the stdout - -### 7-zip ### - -[7-zip][4] is another open source file archiver. It uses 7z format which is a new compression format and provides high-compression ratio. Hence, it is considered to be better than the previously mentioned compression tools. It is available under Linux as p7zip package. The package includes three binaries – 7z, 7za and 7zr. Refer to the [p7zip wiki][5] for differences between these binaries. In this article, we will be using 7zr to explain the usage. Archived files will have '.7z' extension. - -**Basic usage** - -#### a) Creating an archive #### - - 7zr a archive-name.7z file-name(s) / directory-name(s) - -![7zr a](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-a.png) - -Creating an archive - -#### b) Listing an archive #### - - 7zr l archive-name.7z - -![7zr l](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-l.png) - -Listing an archive - -#### c) Extracting an archive #### - - 7zr e archive-name.7z - -![7zr e](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-e.png) - -Extracting an archive - -#### d) Updating an archive #### - - 7zr u archive-name.7z new-file - -![7zr u](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-u.png) - -Updating an archive - -#### e) Deleting files from an archive #### - - 7zr d archive-name.7z file-to-be-deleted - -![7zr d](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-d.png) - -Deleting files - -![7zr l](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-d-l.png) - -Verifying file deletion - --------------------------------------------------------------------------------- - -via: http://linoxide.com/tools/linux-compress-decompress-tools/ - -作者:[B N Poornima][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/bnpoornima/ -[1]:http://www.gnu.org/software/tar/ -[2]:http://www.gzip.org/ -[3]:http://www.bzip.org/ -[4]:http://www.7-zip.org/ -[5]:https://wiki.archlinux.org/index.php/p7zip diff --git a/translated/tech/20150211 Best Known Linux Archive or Compress Tools.md b/translated/tech/20150211 Best Known Linux Archive or Compress Tools.md new file mode 100644 index 0000000000..9938efd5a5 --- /dev/null +++ b/translated/tech/20150211 Best Known Linux Archive or Compress Tools.md @@ -0,0 +1,229 @@ +Linux 下最为人熟知的归档/压缩工具 +================================================================================ +很多时候,通过互联网发送或接收大文件和图片是一件令人头疼的事。压缩及解压缩工具正好可以应对这个问题。下面让我们快速浏览一些可以使得我们的工作更加轻松的开源工具。 + +Tar +gzip, gunzip +bzip2, bunzip2 +7-Zip + +### Tar ### + +Tar 由 'Tape archiver' 衍生而来,最初被用来在磁带上归档和存储文件。Tar 是一个 GNU 软件,它可以压缩一组文件(归档),或提取它们以及对已经存在的压缩文件进行相关操作。在存储、备份以及转移文件方面,它是很有帮助的。在创建归档文件时,Tar 可以保持原有文件和目录结构不变。通过 Tar 归档的文件的后缀名为 ‘.tar’。 + +基本用法 + +#### a) 创建归档 (c / --create) #### + + tar --create --verbose --file=archive.tar file1 file2 file3 + +或 + + tar cvf archive.tar file1 file2 file3 + +![tar cvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-cvf.png) + +创建一个归档 + +#### b) 列出归档文件内容 ( t / --list) #### + + tar --list archive.tar + +![tar tvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-tvf.png) + +列出归档中包含的文件 + +#### c) 提取归档 (x / --extract) #### + + tar xvf archive.tar + + tar xvf archive.tar --wildcards '*.c' - 从归档中提取后缀名为 *.c 的文件。 + +![tar xvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-xvf.png) + +提取文件 + +![tar xvf --wildcards](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-wildcard.png) + +只提取需要的文件 + +#### d) 对归档进行更新 ( u / --update) #### + + tar uvf archive.tar newfile.c - 假如归档的版本比先前存在的版本新,通过添加文件 newfile.c 来更新归档. + +![tar uvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-uvf.png) + +更新一个归档 + +#### e) 从归档中删除文件 (--delete) #### + + tar--delete -f archive.tar file1.c - 从压缩包'archive.tar' 中删除文件'file1.c' + +![tar --delete](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-delete.png) + +删除文件 + +更加具体的使用方法请参考[tar 主页][1]。 + +### Gzip / Gunzip ### + +Gzip 代表 GNU zip,它是一个被广泛用于 Linux 操作系统中的压缩应用,被其压缩的文件的后缀名为'*.gz' 。 + +** 基本用法 ** + +#### a) 压缩文件 #### + + gzip file(s) + +每个文件将被单独压缩。 + +![gzip](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip.png) + +压缩文件 + +通常在压缩完成后,它会将原来的文件删除。我们可以使用 `-c` 选项来保留原来的文件。 + + gzip -c file > file.gz + +![gzip-c](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip-c.png) + +压缩后保留原有文件 + +我们也可以将一组文件压缩到一个单独的文件中 + + cat file1 file2 file3 | gzip > archieve.gz + +![gz group](http://blog.linoxide.com/wp-content/uploads/2015/01/gz-group.png) + +压缩一组文件 + +#### b) 检查压缩比 #### + +被压缩文件的压缩比可以使用 ‘-l’ 选项来进行检验。 + + gzip -l archieve.gz + +![gzip -l](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip-l.png) + +检查压缩率 + +#### c) 解压文件 #### + +Gunzip 被用来解压文件,在这里,原有文件在被解压后同样会被删除。使用 `-c`选项来保留原始文件。 + + gunzip -c archieve.gz + +![gunzip -c](http://blog.linoxide.com/wp-content/uploads/2015/01/gunzip-c.png) + +解压文件 + +gzip 加上'-d'选项 和 gunzip 对压缩文件有同样的效果。 + +更多细节可以从 [gzip 主页][2] 得到。 + +### Bzip2 / Bunzip2 ### + +同 gzip 一样,[Bzip2][3] 也是一个压缩工具,与其他传统的工具相比,它可以将文件压缩到更小,但其缺点为:运行速度比 gzip 慢。 + +** 基本用法 ** + +#### a) 压缩文件 #### + +一般情况下,针对压缩而言,Bzip2 没有选项可供选择,将被压缩的文件被传递为它的参数。每个文件被单独压缩,且压缩文件以 'bz2' 为后缀名。 + + bzip2 file1 file2 file3 + +![bzip2](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2.png) + +文件压缩 + +使用 '-k' 选项可以使得 在压缩或解压缩之后保留原有的文件。 + +![bzip2 -k](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2-k.png) + +在压缩后保留原有文件。 + +'-d' 选项被用来强制解压缩。 + +![bzip2 -d](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2-d.png) + +使用 -d 选项删除文件 (!! 注:我(FSSlc)认为 这里的图片说明有误,可以参考 manpage或bzip 的官网来校对一下。) + +#### b) 解压 #### + + bunzip2 filename + +![bunzip2](http://blog.linoxide.com/wp-content/uploads/2015/01/bunzip2.png) + +解压文件 + +bunzip2 可以解压后缀名为 bz2, bz, tbz2 和 tbz 的文件。带有 tbz2 和 tbz 的文件在压缩后,后缀名将变为'.tar' 。 + + bzip2 -dc 执行解压文件到标准输出的功能。 + +### 7-zip ### + +[7-zip][4] 是另一个开源压缩软件。它使用 7z 这种新的压缩格式,并支持高压缩比。因此,它被认为是比先前提及的压缩工具更好的软件。在 Linux 下,可以通过 p7zip 软件包得到,该软件包里包含 3 个二进制文件 – 7z, 7za 和 7zr,读者可以参考 [p7zip wiki][5] 来了解这三个二进制文件之间的不同。在本篇中,我们将使用 7zr 来解释 7-zip 的用法。归档文件以 '.7z' 为后缀名。 + +** 基本用法 ** + +#### a) 创建归档 #### + + 7zr a archive-name.7z file-name(s) / directory-name(s) + +![7zr a](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-a.png) + +创建一个归档文件 + +#### b) 列出归档包含文件 #### + + 7zr l archive-name.7z + +![7zr l](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-l.png) + +列出归档中包含的文件 + +#### c) 提取归档文件 #### + + 7zr e archive-name.7z + +![7zr e](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-e.png) + +提取归档 + +#### d) 更新归档文件 #### + + 7zr u archive-name.7z new-file + +![7zr u](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-u.png) + +更新一个归档文件 + +#### e) 从归档文件中删除文件 #### + + 7zr d archive-name.7z file-to-be-deleted + +![7zr d](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-d.png) + +删除文件 + +![7zr l](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-d-l.png) + +确认文件删除 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/linux-compress-decompress-tools/ + +作者:[B N Poornima][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/bnpoornima/ +[1]:http://www.gnu.org/software/tar/ +[2]:http://www.gzip.org/ +[3]:http://www.bzip.org/ +[4]:http://www.7-zip.org/ +[5]:https://wiki.archlinux.org/index.php/p7zip \ No newline at end of file From 5600ef3e03590034c92d0f5babdc384656dc5e02 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Fri, 20 Feb 2015 09:43:18 +0800 Subject: [PATCH 069/163] Translated 20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md --- ...l Repository in Ubuntu using APT-mirror.md | 127 ------------------ ...l Repository in Ubuntu using APT-mirror.md | 125 +++++++++++++++++ 2 files changed, 125 insertions(+), 127 deletions(-) delete mode 100644 sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md create mode 100644 translated/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md diff --git a/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md b/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md deleted file mode 100644 index f3a5a451d6..0000000000 --- a/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md +++ /dev/null @@ -1,127 +0,0 @@ -Translating by FSSlc - -4 Steps to Setup Local Repository in Ubuntu using APT-mirror -================================================================================ -Today we will show you how to setup a local repository in your Ubuntu PC or Ubuntu Server straight from the official Ubuntu repository. There are a lot benefit of creating a local repository in your computer if you have a lot of computers to install software, security updates and fixes often in all systems, then having a local Ubuntu repository is an efficient way. Because all required packages are downloaded over the fast LAN connection from your local server, so that it will save your Internet bandwidth and reduces the annual cost of Internet.. - -You can setup a local repository of Ubuntu in your local PC or server using many tools, but we'll featuring about APT-Mirror in this tutorial. Here, we'll be mirroring packages from the default mirror to our Local Server or PC and we'll need at least **120 GB** or more free space in your local or external hard drive. It can be configured through a **HTTP** or **FTP** server to share its software packages with local system clients. - -We'll need to install Apache Web Server and APT-Mirror to get our stuffs working out of the box. Here are the steps below to configure a working local repository: - -### 1. Installing Required Packages ### - -First of all, we are going to pull whole packages from the public repository of Ubuntu package server and save them in our local Ubuntu server hard disk. - -We'll first install a web server to host our local repository. We'll install Apache web server but you can install any web server you wish, web server are necessary for the http protocol. You can additionally install FTP servers like proftpd, vsftpd,etc if you need to configure for ftp protocols and Rsync for rsync protocols. - - $ sudo apt-get install apache2 - -And then we'll need to install apt-mirror: - - $ sudo apt-get install apt-mirror - -![apt-mirror-installation](http://blog.linoxide.com/wp-content/uploads/2014/12/apt-mirror-install.png) - -**Note: As I have already mentioned that we'll need at least 120 GBs free space to get all the packages mirrored or download.** - -### 2. Configuring APT-Mirror ### - -Now create a directory on your harddisk to save all packages. For example, let us create a directory called “/linoxide”. We are going to save all packages in this directory: - - $ sudo mkdir /linoxide - -![repo-dir](http://blog.linoxide.com/wp-content/uploads/2014/12/mkdir-linoxide.png) - -Now, open the file **/etc/apt/mirror.list** file - - $ sudo nano /etc/apt/mirror.list - -![apt-mirror-edit](http://blog.linoxide.com/wp-content/uploads/2014/12/edit-mirror-list-300x7.png) - -Copy the below lines of configuration to mirror.list and edit as your requirements. - - ############# config ################## - # - set base_path /linoxide - # - # set mirror_path $base_path/mirror - # set skel_path $base_path/skel - # set var_path $base_path/var - # set cleanscript $var_path/clean.sh - # set defaultarch - # set postmirror_script $var_path/postmirror.sh - # set run_postmirror 0 - set nthreads 20 - set _tilde 0 - # - ############# end config ############## - - deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse - deb http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse - deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse - #deb http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse - #deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse - - deb-src http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse - deb-src http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse - deb-src http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse - #deb-src http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse - #deb-src http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse - - clean http://archive.ubuntu.com/ubuntu - -![mirror-list-config](http://blog.linoxide.com/wp-content/uploads/2014/12/mirror-list-config.png) - -**Note: You can replace the above official mirror server url by the nearest one, you can get your nearest server by visiting the page [Ubuntu Mirror Server][1]. If you are not in hurry and can wait for the mirroring, you can go with the default official one.** - -Here, we are going to mirror package repository of the latest and greatest LTS release of Ubuntu ie. Ubuntu 14.04 LTS (Trusty Tahr) so, we have configured trusty. If you need to mirror of Saucy or other version of Ubuntu, please edit it as its codename. - -Now, we'll have to run apt-mirror which will now get/mirror all the packages in the repository. - - sudo apt-mirror - -It will take time to download all the packages from the Ubuntu Server which depends upon the connection speed and performance with respect to you and the mirror server. I have interrupted the download as I have already done that... - -![downloading-packages](http://blog.linoxide.com/wp-content/uploads/2014/12/downloading-index.png) - -### 3.Configuring Web Server ### - -To be able to access the repo from other computers you need a webserver. You can also do it via ftp but I choose to use a webserver as I mentioned in above step 1. So, we are now gonna configure Apache Server: - -We will create a symlink from our local repo's directory to a directory ubuntu in the hosting directory of Apache ie /var/www/ubuntu - - $ sudo ln -s /linoxide /var/www/ubuntu - $ sudo service apache2 start - -![symlinks-apache2](http://blog.linoxide.com/wp-content/uploads/2014/12/symblink-apache2.png) - -The above command will allow us to browse our Mirrored Repo from our localhost ie http://127.0.0.1 by default. - -### 4. Configuring Client Side ### - -Finally, we need to add repository source in other computers which will fetch the packages and repository from our computer. To do that, we'll need to edit /etc/apt/sources.list and add the following lines. - - $ sudo nano /etc/apt/sources.list - -Add this line in /etc/apt/sources.list and save. - - deb http://192.168.0.100/ubuntu/ trusty main restricted universe - -**Note: here 192.168.0.100 is the LAN IP address of our server computer, you need to replace that with yours.** - - $ sudo apt-get update - -Finally, we are done. Now you can install the required packages using sudo apt-get install packagename from your local Ubuntu repository with high speed download and with low bandwidth. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/setup-local-repository-ubuntu/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://launchpad.net/ubuntu/+archivemirrors diff --git a/translated/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md b/translated/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md new file mode 100644 index 0000000000..c49b52c461 --- /dev/null +++ b/translated/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md @@ -0,0 +1,125 @@ +在 Ubuntu中使用 APT-mirror 简单四步配置本地软件仓库 +================================================================================ +今天,我们将向你展示如何在你的 Ubuntu 个人电脑 或 Ubuntu 服务器 中,直接通过 Ubuntu 官方软件仓库来配置本地软件仓库。在你的电脑中创建一个本地软件仓库有着许多的好处。假如你有许多电脑需要安装软件,安全升级和修复,那么配置一个本地软件仓库是一个高效的方法。因为,所有需要安装的软件包都可以通过快速局域网连接从你的本地服务器中下载,这样可以节省你的网络带宽,降低互联网的年度开支 ... + +你可以使用多种工具在你的本地个人电脑或服务器中配置一个 Ubuntu 的本地软件仓库,但在本教程中,我们将为你介绍 APT-Mirror。这里,我们将把默认的镜像包镜像到 我们本地的服务器或个人电脑中,并且在本地或外置硬盘中,我们至少需要 **120 GB** 或更多的可用空间。 上面的任务可以通过配置一个 **HTTP** 或 **FTP** 服务器来 与本地系统客户端共享软件包。 + +我们需要安装 Apache 网络服务器和 APT-Mirror 来使得我们的工作得以开始。下面是配置一个可工作的本地软件仓库的步骤: + +### 1. 安装需要的软件包 ### + +首先,我们需要从 Ubuntu 的公共软件包仓库中取得所有的软件包,然后在我们本地的 Ubuntu 服务器硬盘中保存它们。 + +首先我们安装一个网络服务器来承载我们的本地软件仓库。这里我们将安装 Apache 网络服务器,但你可以安装任何你中意的网络服务器,对于 http 协议,网络服务器是必须的。假如你需要配置 ftp 协议 及 rsync 协议,你还可以再分别额外安装 FTP 服务器,如 proftpd, vsftpd 等等 和 Rsync 。 + + $ sudo apt-get install apache2 + +然后我们需要安装 apt-mirror: + + $ sudo apt-get install apt-mirror + +![apt-mirror-installation](http://blog.linoxide.com/wp-content/uploads/2014/12/apt-mirror-install.png) + +**注: 正如我先前提到的,我们需要至少 120 GB 的可用空间来使得所有的软件包被镜像或下载。** + +### 2. 配置 APT-Mirror ### + +现在,在你的硬盘上创建一个目录来保存所有的软件包。例如,我们创建一个名为 `/linoxide`的目录,我们将在这个目录中保存所有的软件包: + + $ sudo mkdir /linoxide + +![repo-dir](http://blog.linoxide.com/wp-content/uploads/2014/12/mkdir-linoxide.png) + +现在,打开文件 **/etc/apt/mirror.list** : + + $ sudo nano /etc/apt/mirror.list + +![apt-mirror-edit](http://blog.linoxide.com/wp-content/uploads/2014/12/edit-mirror-list-300x7.png) + +复制下面的命令行配置到 `mirror.list`文件中并按照你的需求进行修改: + + ############# config ################## + # + set base_path /linoxide + # + # set mirror_path $base_path/mirror + # set skel_path $base_path/skel + # set var_path $base_path/var + # set cleanscript $var_path/clean.sh + # set defaultarch + # set postmirror_script $var_path/postmirror.sh + # set run_postmirror 0 + set nthreads 20 + set _tilde 0 + # + ############# end config ############## + + deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse + deb http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse + deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse + #deb http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse + #deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse + + deb-src http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse + deb-src http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse + deb-src http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse + #deb-src http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse + #deb-src http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse + + clean http://archive.ubuntu.com/ubuntu + +![mirror-list-config](http://blog.linoxide.com/wp-content/uploads/2014/12/mirror-list-config.png) + +**注: 你可以将上面的官方镜像服务器网址更改为离你最近的服务器的网址,而这可以访问 [Ubuntu Mirror Server][1]来得到。假如你并不着急并可以等待镜像的完成,你可以沿用默认的官方镜像服务器网址。** + +这里,我们将要镜像 最新和最大的 Ubuntu LTS 发行版 --- 即 Ubuntu 14.04 LTS (Trusty Tahr) --- 的软件包仓库,所以在上面的配置中发行版本号为 trusty 。假如我们需要镜像 Saucy 或其他的 Ubuntu 发行版本,请修改上面的 trusy 为相应的代号。 + +现在,我们必须运行 apt-mirror 来下载或镜像 官方仓库中的所有软件包。 + + sudo apt-mirror + +从 Ubuntu 服务器中下载所有的软件包所花费的时间取决于 你和镜像服务器之间的网络连接速率和性能。我已经中断了下载,因为我已经下载好了 ... + +![downloading-packages](http://blog.linoxide.com/wp-content/uploads/2014/12/downloading-index.png) + +### 3.配置网络服务器 ### + +为了使得其他的电脑能够取得这个软件仓库,你需要一个网络服务器。你也可以通过 ftp 来完成这件事,但我选择使用一个网络服务器因为在上面的步骤 1 中我提及到使用网络服务器。因此,我们现在要对 Apache 服务器进行配置: + +我们将为我们本地的软件仓库目录 建立一个到 Apache 托管目录 --- 即 `/var/www/ubuntu` --- 的符号链接。 + + $ sudo ln -s /linoxide /var/www/ubuntu + $ sudo service apache2 start + +![symlinks-apache2](http://blog.linoxide.com/wp-content/uploads/2014/12/symblink-apache2.png) + +上面的命令将允许我们从本地主机(localhost) --- 即 http://127.0.0.1(默认情况下) --- 浏览我们的镜像软件仓库。 + +### 4. 配置客户端 ### + +最后,我们需要在其他的电脑中添加软件源,来使得它们可以从我们的电脑中取得软件包或软件仓库。为达到此目的,我们需要编辑 `/etc/apt/sources.list` 文件并添加下面的命令: + + $ sudo nano /etc/apt/sources.list + +添加下面的一行到` /etc/apt/sources.list`中并保存。 + + deb http://192.168.0.100/ubuntu/ trusty main restricted universe + +**注: 这里的 192.168.0.100 是我们的服务器电脑的 局域网 IP 地址,你需要替换为你的服务器电脑的局域网 IP 地址** + + $ sudo apt-get update + +最终,我们完成了任务。现在,你可以使用`sudo apt-get install packagename` 命令来从你的本地 Ubuntu 软件仓库中安装所需的软件包,这将会是高速的且消耗很少的带宽。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/setup-local-repository-ubuntu/ + +作者:[Arun Pyasi][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://launchpad.net/ubuntu/+archivemirrors From 83d38fba2257a24bd189ab2cb4ef59af4d752981 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 20 Feb 2015 14:27:29 +0800 Subject: [PATCH 070/163] translating --- ...119 Cutegram--A Better Telegram Client For GNU or Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md b/sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md index 7a051be4fc..a04d4a5f5f 100644 --- a/sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md +++ b/sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md @@ -1,3 +1,5 @@ +Translating---geekpi + Cutegram: A Better Telegram Client For GNU/Linux ================================================================================ No need for a introduction to **Telegram**, right? Telegram is a popular free Instant messenger application that can be used to chat with your friends all over the world. Unlike Whatsapp, Telegram is free forever, no ads, no subscription fees. And, the Telegram client is open source too. Telegram is available for many different platforms, including Linux, Android, iOS, Windows Phone, Windows, and Mac OS X. The messages which are sending using telegram are highly encrypted and self-destructive. It is very secure, and there is no limit on the size of your media and chats. @@ -73,4 +75,4 @@ via: http://www.unixmen.com/cutegram-better-telegram-client-gnulinux/ [a]:http://www.unixmen.com/author/sk/ [1]:http://www.unixmen.com/install-telegram-desktop-via-ppa/ -[2]:http://aseman.co/en/products/cutegram/ \ No newline at end of file +[2]:http://aseman.co/en/products/cutegram/ From 123de83ceec08b53f53f4320f3d465767ab7c081 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 20 Feb 2015 14:51:37 +0800 Subject: [PATCH 071/163] translated --- ...Better Telegram Client For GNU or Linux.md | 78 ------------------- ...Better Telegram Client For GNU or Linux.md | 77 ++++++++++++++++++ 2 files changed, 77 insertions(+), 78 deletions(-) delete mode 100644 sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md create mode 100644 translated/tech/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md diff --git a/sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md b/sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md deleted file mode 100644 index a04d4a5f5f..0000000000 --- a/sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md +++ /dev/null @@ -1,78 +0,0 @@ -Translating---geekpi - -Cutegram: A Better Telegram Client For GNU/Linux -================================================================================ -No need for a introduction to **Telegram**, right? Telegram is a popular free Instant messenger application that can be used to chat with your friends all over the world. Unlike Whatsapp, Telegram is free forever, no ads, no subscription fees. And, the Telegram client is open source too. Telegram is available for many different platforms, including Linux, Android, iOS, Windows Phone, Windows, and Mac OS X. The messages which are sending using telegram are highly encrypted and self-destructive. It is very secure, and there is no limit on the size of your media and chats. - -You can install and use Telegram desktop on your Debian/Ubuntu systems as mentioned in [our previous tutorial][1]. However, a new telegram client called **Cutegram** is available now to make your chat experience more fun and easy. - -### What is Cutegram? ### - -Cutegram is a free and opensource telegram clients for GNU/Linux focusing on user friendly, compatibility with Linux desktop environments and easy to use. Cutegram using Qt5, QML, libqtelegram, libappindication, AsemanQtTools technologies and Faenza icons and Twitter emojies graphic sets. It’s free and released under GPLv3 license. - -### Install Cutegram ### - -Head over to the Cutegram homepage and download the latest version of your distribution’s choice. As I use Ubuntu 64 bit, I downloaded the .deb file. - - wget http://aseman.co/downloads/cutegram/cutegram_1.0.2-1-amd64.deb - -Now, Install Cutegram as shown below. - - sudo apt-get install gdebi - sudo gdebi cutegram_1.0.2-1-amd64.deb - -For other distributions, run the following commands. - -**64bit:** - - wget http://aseman.co/downloads/cutegram/cutegram-1.0.2-linux-x64-installer.run - -**32 bit:** - - wget http://aseman.co/downloads/cutegram/cutegram-1.0.2-linux-installer.run - -Set executable permission: - - chmod + cutegram-1.0.2-linux*.run - -And, install it as shown below. - - sudo ./cutegram-1.0.2-linux*.run - -### Usage ### - -Launch Cutegram either from Menu or Unity dash. From the login screen, select your country, and enter your mobile number, finally click **Login**. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_005.png) - -A code will be sent to your mobile number. Enter the code and click **Sign in**. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_002.png) - -There you go. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_003.png) - -Start Chatting! - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_004.png) - -And, you can set a profile picture, start new chat/group chat, or secret chat from using the buttons on the left pane. - -Stay happy! Cheers!! - -For more details, check the [Cutegram website][2]. - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/cutegram-better-telegram-client-gnulinux/ - -作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/sk/ -[1]:http://www.unixmen.com/install-telegram-desktop-via-ppa/ -[2]:http://aseman.co/en/products/cutegram/ diff --git a/translated/tech/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md b/translated/tech/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md new file mode 100644 index 0000000000..4f0a57ff52 --- /dev/null +++ b/translated/tech/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md @@ -0,0 +1,77 @@ +Cutegram: 一个GNU/Linux下更好的Telegram客户端 +================================================================================ +不需要再介绍**Telegram**了,对吧。Telegram是一款流行的免费即时通信工具,帮助在全球与你的朋友聊天。不像Whatsapp,Telegram是永久免费、没有广告、没有订阅费用。并且Telegram客户端也是开源的。Telegram在许多不同的平台中都有,包括Linux、Android、iOS、Windows Phone和Mac OS X。使用telegram发送的消失是高度加密且会自我毁灭。它很安全,并且没有对你媒体和聊天的大小作限制。 + +在[先前的教程][1]中我们已经提到你可以在Ubuntu/Debian中安装Telegram。然而,一个新的Telegram客户端叫**Cutegram**出现了,可以使你的聊天体验更加有趣和简单。 + +### Cutegram是什么? ### + +Cutegram是一款GNU/Linux中专注于用户友好、与LInux桌面环境兼容和易于使用的开源telegram客户端。Cutegram使用Qt5、QML、libqtelegram、libappindication、AsemanQtTools技术和Faenzatu图标和Twitter emojies图片集。它在GPLv3许可证下免费发布。 + +### 安装 Cutegram ### + +进入Cutegrm的首页病根据你的发行版版本选择最新的版本。我使用的是Ubuntu 64位版,所以我下载的是.deb文件。 + + wget http://aseman.co/downloads/cutegram/cutegram_1.0.2-1-amd64.deb + +现在,如下安装Cutegram: + + sudo apt-get install gdebi + sudo gdebi cutegram_1.0.2-1-amd64.deb + +对于其他发行版,运行下面的命令。 + +**64位:** + + wget http://aseman.co/downloads/cutegram/cutegram-1.0.2-linux-x64-installer.run + +**32位:** + + wget http://aseman.co/downloads/cutegram/cutegram-1.0.2-linux-installer.run + +设置执行权限: + + chmod + cutegram-1.0.2-linux*.run + +如下进行安装。 + + sudo ./cutegram-1.0.2-linux*.run + +### 使用 ### + +在菜单或者Unity dash中启动Cutegram。在登录界面,选择你的国家并输入电话号码,最好点击**Login** + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_005.png) + +A code will be sent to your mobile number. Enter the code and click **Sign in**. +一个验证码将会发送到你手机上。输入验证码病点击**** + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_002.png) + +你会看到 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_003.png) + +开始聊天吧! + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_004.png) + +接着,你可以设置头像,开始新的聊天/群聊,或者使用左边面板的按钮开始秘密聊天。 + +玩得开心!干杯!! + +更多细节,请关注[Cutegram 网站][2] + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/cutegram-better-telegram-client-gnulinux/ + +作者:[SK][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:http://www.unixmen.com/install-telegram-desktop-via-ppa/ +[2]:http://aseman.co/en/products/cutegram/ From b45234e2136a323171c5b14e482db40097da4e4e Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Feb 2015 21:08:29 +0800 Subject: [PATCH 072/163] PUB:20150209 CrunchBang Linux Is Dead @geekpi --- .../20150209 CrunchBang Linux Is Dead.md | 32 +++++++++++++++++++ .../news/20150209 CrunchBang Linux Is Dead.md | 32 ------------------- 2 files changed, 32 insertions(+), 32 deletions(-) create mode 100644 published/20150209 CrunchBang Linux Is Dead.md delete mode 100644 translated/news/20150209 CrunchBang Linux Is Dead.md diff --git a/published/20150209 CrunchBang Linux Is Dead.md b/published/20150209 CrunchBang Linux Is Dead.md new file mode 100644 index 0000000000..7adfa42887 --- /dev/null +++ b/published/20150209 CrunchBang Linux Is Dead.md @@ -0,0 +1,32 @@ +CrunchBang Linux 已死!!! +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Crunchbang_Linux_Dead.jpeg) + +是的,你没看错。最小的Linux发行版**CrunchBang Linux 已经消失了**。 + +CrunchBang Linux,被大家所熟知的缩写标志“#!”,其基于Debian和[Openbox][1]窗口管理器。这个黑色主题的 Linux 发行版是许多资深 Linux用户的选择。 + +### CrunchBang 因为 “不再有继续下去的价值” 而消失了 ### + +其[公告][2]称,CrunchBang将不在继续开发,项目的领头人Philip Newborough说他在开始这个项目的时候,Linux 世界和现在不同。他指出那时在这种发行版还没有‘竞争’,但是随着Linux发行版的进步,如Lubuntu,Crunchbang这样的发行版就不具备原来的价值了。 + +> 对于任何十年前使用Linux的人而言,我想他们都会看到事物在不断发展。虽然一些事情一直保持不变,还有一些的变化超出了认知。这称之为进步。对于大部分事物而言,进步是一件好事。也就是说当进步发生时,一些事物落后了。对于我而言,CrunchBang就是我需要抛弃的东西。我抛弃它的原因是我真的认为它不再具有任何价值了,虽然我还可以因为一些多愁善感的原因把它留下来,但是我不认为那些使用原生Debian用户还有兴趣了。 + +### CrunchBang消失之后会怎么样? ### + +就像[Pear OS][3]那样,CrunchBang论坛仍将在线。现在仍可以下载但是不久的将来就会停止。Philip对他即将面对的新的项目和工作感到很激动。我希望他今后工作顺利。很难过见到一个像CrunchBang这样好的Linux发行版的消失。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/crunchbang-linux-dead/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://en.wikipedia.org/wiki/Openbox +[2]:http://crunchbang.org/forums/viewtopic.php?id=38916 +[3]:http://itsfoss.com/pear-os-history/ diff --git a/translated/news/20150209 CrunchBang Linux Is Dead.md b/translated/news/20150209 CrunchBang Linux Is Dead.md deleted file mode 100644 index 7d6cee2613..0000000000 --- a/translated/news/20150209 CrunchBang Linux Is Dead.md +++ /dev/null @@ -1,32 +0,0 @@ -CrunchBang Linux 已死!!! -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Crunchbang_Linux_Dead.jpeg) - -是的,你没看错。最小的Linux发行版**CrunchBang Linux 已经消失了**。 - -CrunchBang Linux,大家都知道它的缩写符号 #!,基于的是Debian和[Openbox][1]窗口管理器。黑色主题的Linux是每一个有经验的Linux用户的选择。 - -### CrunchBang 因为 “不再有继续下去的价值” 而消失了 ### - -[公告][2]称CrunchBang将不在继续开发,项目的领头人Philip Newborough说他在开始这个项目的时候,Linux时间是一个不同的地方。他指出那时在相同的种类在同一时间段中没有‘竞争’,但是随着Linux发行版的进步如Lubuntu,Crunchbang不再有相同的价值了。 - -> 对于任何十年前使用Linux的人而言,我确定他们同意事物在发展。虽然一些事情一直保持不变,还有一些的变化超出了认知。这称之为进步,对于大部分事物而言,进步是一件好事。也就是说当进步发生时,一些事物落后了,对于我而言,CrunchBang就是我需要抛弃的东西。我抛弃它的原因是我真实地认为它不再具有任何价值了,虽然我还可以因为一些多愁善感的原因把它留下来,但是我不认为那些使用原生Debian用户的兴趣了。 - -### CrunchBang消失之后会怎么样? ### - -就像[Pear OS][3]那样,CrunchBang论坛仍将在线。现在仍可以下载但是不久的将来就会停止。Philip提到对他即将面对的新的项目和工作感到很激动。我希望他今后工作顺利。很难过见到一个像CrunchBang这样好的Linux发行版的消失。 - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/crunchbang-linux-dead/ - -作者:[Abhishek][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://en.wikipedia.org/wiki/Openbox -[2]:http://crunchbang.org/forums/viewtopic.php?id=38916 -[3]:http://itsfoss.com/pear-os-history/ From 37ab2123f3dd0e7c1f40f06d0bfb3e362feaca33 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Feb 2015 21:43:16 +0800 Subject: [PATCH 073/163] PUB:20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10 @geekpi --- ...ties Closed in Ubuntu 14.04 and Ubuntu 14.10.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) rename {translated/news => published}/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md (54%) diff --git a/translated/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md b/published/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md similarity index 54% rename from translated/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md rename to published/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md index 1801580d00..e49dd12654 100644 --- a/translated/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md +++ b/published/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md @@ -2,29 +2,27 @@ OpenJDK 7的漏洞已经在Ubuntu 14.04 和Ubuntu 14.10中解决了 ---- *建议用户尽快升级* -## Canonical公布新的OpenJDK 7 的版本已经提交到Ubuntu 14.04 LTS和Ubuntu 14.10 的仓库中了。更新修复了大量的问题和漏洞。 +**Canonical发布新 OpenJDK 7 的安全公告,它已经提交到Ubuntu 14.04 LTS和Ubuntu 14.10 的仓库中。该更新修复了大量的问题和漏洞。** -Ubuntu维护者已经升级了仓库中的OpenJDK包,并且含有大量的修复。这是一个重要的更新切涵盖了少量的库。 +Ubuntu维护者已经升级了仓库中的OpenJDK包,并且含有大量的修复。这是一个重要的更新,其涵盖了少量的库。 安全公告中说“OpenJDK JRE中发现了一些信息泄露、数据完整性和可用性的漏洞。攻击者可以利用这些通过网络执行拒绝服务或者泄露信息。” 同样,“OpenJDK JRE中发现了关于信息泄露和完整性的漏洞。攻击者可以利用这点通过网络泄露敏感信息。” -这里有几个漏洞被开发者确认并修复,并有维护人员实现。关于问题的详细描述,你可以参考Canonical的安全通告。用户被建议尽快升级系统。 +这里有几个漏洞被开发者确认,并且由维护人员解决。关于该问题的详细描述,你可以参考Canonical的安全通告。建议用户尽快升级系统。 -这个漏洞只要你升级到最新的openjdk 7相关的包就可以修复。要应用补丁,用户需要运行升级管理程序。通常上,一个标准系统更新就会运行必要的更新。所有java相关的程序需要重新启动。 +这个漏洞只要你升级到最新的openjdk 7相关的包就可以修复。要应用该补丁,用户需要运行升级管理程序。通常上,一个标准系统更新就会安装必要的更新。所有java相关的程序需要重新启动。 -------------------------------------------------------------------------------- -via:http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-14-04-and-Ubuntu-14-10-471605.shtml +via: http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-14-04-and-Ubuntu-14-10-471605.shtml 本文发布时间:29 Jan 2015, 16:53 GMT 作者:[Silviu Stahie][a] - 译者:[geekpi](https://github.com/geekpi) - -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 598ee2512c5ee6254ca794288acf3a4fe5312cc4 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Fri, 20 Feb 2015 22:01:55 +0800 Subject: [PATCH 074/163] Translating by FSSlc --- ...w To Make GDebi Default Instead of Ubuntu Software Center.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md index 9bcbbb967e..55bca268d1 100644 --- a/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md +++ b/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md @@ -1,3 +1,5 @@ +Translating by FSSlc + How To Make GDebi Default Instead of Ubuntu Software Center ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Make_GDebi_Default.jpeg) From 5219906b2dffb7d0a8bd3d714ec46b98f8d361fb Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Feb 2015 22:29:05 +0800 Subject: [PATCH 075/163] PUB:20140819 Top 4 Linux download managers @H-mudcup --- .../20140819 Top 4 Linux download managers.md | 60 ++++++++++--------- 1 file changed, 31 insertions(+), 29 deletions(-) rename {translated/share => published}/20140819 Top 4 Linux download managers.md (69%) diff --git a/translated/share/20140819 Top 4 Linux download managers.md b/published/20140819 Top 4 Linux download managers.md similarity index 69% rename from translated/share/20140819 Top 4 Linux download managers.md rename to published/20140819 Top 4 Linux download managers.md index 78c5b9ec12..5896665a80 100644 --- a/translated/share/20140819 Top 4 Linux download managers.md +++ b/published/20140819 Top 4 Linux download managers.md @@ -1,17 +1,16 @@ -Translated By H-mudcup - -Linux排名前四的下载管理器 +Linux下的四大下载管理器 ================================================================================ -**改善并更好的管理你的网页下载,不论是镜像、抓取数据包还是仅仅更好的掌控你的文件。** +**改善你的网页下载,以便更好的管理文件镜像、批量下载还是仅仅希望更好的管理你的文件。** -下载管理器现在似乎已经是旧闻了,但是他们仍然非常有用。我们来比较一下Linux上排名前四的下载管理器。 +下载管理器现在似乎已经不新鲜了,但是他们仍然非常有用。我们来比较一下Linux上排名前四的下载管理器。 ### [uGet][1] ### -如同很多其他的Linux应用一样uGet把体积轻巧和功能全面作为宣传亮点。它能处理有着过滤器的多线程数据流,还能与任何网络浏览器进行整合。它从当初的UrlGet开始,如今已经经过了十年。它还能在Windows上运行。 +如同很多其他的Linux应用一样,uGet把体积轻巧和功能全面作为宣传亮点。它能处理多线程下载,支持过滤器,还能与任何网络浏览器进行整合。它从当初的UrlGet开始,如今已经经过了十年。它还能在Windows上运行。 ![uGet is actually very full-featured, with a lot of the kind of functions that advanced torrent clients use](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/uget1.png) -uGet的功能其实非常全面,有很多先进的BT下载客户端所拥有的功能 + +*uGet的功能其实非常全面,有很多先进的BT下载客户端所拥有的功能* #### 界面 #### @@ -23,40 +22,41 @@ uGet让我们想起了许多BT下载客户端的界面:有着活跃、结束 #### 功能 #### -成熟的uGet完备了各种功能,包括按计划进行下载任务的启动和终止的高级功能,通过剪贴板批量下载,还能改变它在剪贴板里查找的文件的类型。虽然有插件选项,但不多。 +成熟的uGet完备了各种功能,包括按计划启动和终止下载任务的高级功能,通过剪贴板批量下载,还能改变它在剪贴板里查找的文件的类型。虽然有插件选项,但不多。 -#### 可得性 #### +#### 可获得性 #### -虽然在多数主要的发行版的软件库中都能得到它,但uGet网站上有着定期更新的适用于各种流行的发行版的二进制安装文件,还能轻易获得源代码。它的运行基于GTK 3+的图形库,所以它在某些桌面环境上的封装要比其他的小,然而我们得说,在KDE或其他Qt桌面上值得有这么一个额外的从属。 +虽然在多数主要的发行版的软件库中都能得到它,但uGet网站上有着定期更新的适用于各种流行的发行版的二进制安装文件,还能轻易获得源代码。它的运行基于GTK 3+的图形库,所以它在某些桌面环境上的封装要比其他的小,然而我们得说,在KDE或其他Qt桌面上值得为此添加额外的依赖库。 #### 总体评价 #### 8/10 -我们非常喜欢uGet——它种类繁多的功能和极高的人气,让它成为了能与Linux浏览器优雅结合的,万能的下载管理器。 +我们非常喜欢uGet——它种类繁多的功能和极高的人气,让它成为了能与Linux浏览器优雅结合的万能下载管理器。 ### [KGet][2] ### -KDE自家的下载管理器貌似原本是设计成与KDE的网页浏览器,Konqueror,一同工作的。它带来了我们这次测试中所期待的功能:多下载控制和对下载完成的文件计算校验和的能力。 +KDE自家的下载管理器貌似原本是设计成与KDE的网页浏览器 Konqueror 一同工作的。它带来了我们这次测试中所期待的功能:多下载控制和对下载完成的文件计算校验和的能力。 ![You need to manually activate the ability to keep an eye on the clipboard for links](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/kget1.png) -你需要手动激活查看剪贴板中下载链接的功能 + +*你需要手动激活查看剪贴板中下载链接的功能* #### 界面 #### -作为一个备受期待的KDE应用软件,KGet用一贯的图标和线条,与桌面环境的审美风格完美融合。它的设计也相当简洁,在主工具栏里只显示最必要的功能,当前下载也以最小界面显示。 +作为一个备受期待的KDE应用软件,KGet采用一贯的图标和线条,与桌面环境的审美风格完美融合。它的设计也相当简洁,在主工具栏里只显示最必要的功能,当前下载也以最小界面显示。 #### 集成 #### -KGet会集成到本地的KDE的Konqueror浏览器里,虽然它并不是最流行的浏览器。Firefox对KGet的支持是一如往常的是通过FlashGot完成的,但是在Chromium里并没有任何一种方法能真正的将它集成进去。你可以打开一个询问你是否想下载已复制的URL的功能,然而KGet对于剪贴板的分析并不是很好,有的时候会把文本下载下来。 +KGet会集成到本地的KDE的Konqueror浏览器里,虽然它并不是最流行的浏览器。Firefox对KGet的支持是一如既往的是通过FlashGot完成的,但是在Chromium里并没有任何一种方法能真正的将它集成进去。你可以打开一个“询问你是否想下载已复制好的URL”的功能,然而KGet对于剪贴板的分析并不是很好,有的时候会把文本下载下来。 #### 功能 #### -能够选择的功能并不多。没有计划任务,没有批量下载,而且通常情况下,下载功能的数量几乎是光秃秃的。剪贴板扫描功能,想法很不错就是有点问题。设置菜单看起来有点怪怪的,因为它看起来应该设计有更多的功能。 +能够选择的功能并不多。没有计划任务,没有批量下载,基本上没有什么特色的下载功能。剪贴板扫描功能,想法很不错就是有点问题。设置菜单看起来有点怪怪的,因为它看起来应该设计有更多的功能。 -#### 可得性 #### +#### 可获得性 #### -虽然它不会随着KDE默认安装,但可以在任何支持KDE的发行版里得到它。虽然它的运行需要几个KDE库,找到它的源代码也很困难。支持如此少的发行版,二进制安装文件也没什么可选的。 +虽然它不会随着KDE默认安装,但可以在任何支持KDE的发行版里得到它。虽然它的运行需要几个KDE库,找到它的源代码也很困难。除了少数几个发行版之外也没有什么二进制安装文件。 #### 总体评价 #### @@ -66,14 +66,15 @@ KGet并没有真正的给予用户比大多数主流浏览器内置下载管理 ### [DownThemAll!][3] ### -经由Firefox的附件进入Linux的DownThemAll某种程度上可以说是跨平台。这让它只能通过Firefox使用,然而作为世界上最流行的浏览器之一,它这更加紧凑的集成也许正是某些人对下载管理器所期望的。 +经由Firefox的附属组件进入Linux的DownThemAll从某种程度上可以说是跨平台。这让它只能通过Firefox使用,然而作为世界上最流行的浏览器之一,它这更加紧凑的集成也许正是某些人对下载管理器所期望的。 ![There are actually a whole lot of options available for DownThemAll! that make it very flexible](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/down1.png) -其实在DownThemALL!上有很多选项可以设置,这让它非常的灵活 + +*其实在DownThemALL!上有很多选项可以设置,这让它非常的灵活* #### 界面 #### -与Firefox的集成使得DownThemAll!的风格符合浏览器的审美标准,右键单击可以唤出普通下载和DownThemAll选项。额外的对话框菜单通常和Firefox使用相同的主题,然而主下载窗口则非常整洁并且是基于它本身的设计。 +与Firefox的集成使得DownThemAll!的风格符合浏览器的审美标准,右键单击可以唤出普通下载和DownThemAll选项。额外的对话框菜单通常和Firefox的主题风格一致,然而主下载窗口则非常整洁并采用了它自己的设计。 #### 集成 #### @@ -81,11 +82,11 @@ KGet并没有真正的给予用户比大多数主流浏览器内置下载管理 #### 功能 #### -拥有着能同时控制多个下载任务的能力,限制而不荒废带宽以及先进的自动或手动过滤功能,DownThemAll!有着一大堆有助于大规模下载的优秀功能。“一键”功能还让它能非常迅速的启动到预定的文件夹中的下载。这比普通下载功能快多了。 +拥有着能同时控制多个下载任务的能力,限制而不浪费带宽以及先进的自动或手动过滤功能,DownThemAll!有着一大堆有助于大规模下载的优秀功能。“一键”功能还让它能非常迅速的启动预定文件夹的下载。这比普通下载功能快多了。 -#### 可得性 #### +#### 可获得性 #### -Firefox几乎能在所有的发行版和Linux以外的操作系统中获得。这让DownThemAll!也和它一样多产。不幸的是,这是一把双刃剑,因为Firefox可能不是你喜欢的浏览器。它还给浏览器增加了一些负担,让它的启动不再那么轻松。 +Firefox几乎能在所有的发行版和Linux以外的操作系统中获得。这让DownThemAll!也和它一样多能。不幸的是,这是一把双刃剑,因为Firefox可能不是你喜欢的浏览器。它还给浏览器增加了一些负担,让它的启动不再那么轻松。 #### 总体评价 #### @@ -95,10 +96,11 @@ DownThemAll!是很优秀的,如果你使用Firefox你也许就不再需要用 ### [Steadyflow][4] ### -Steadyflow很容易在Ubuntu和一些基于Debian的发行版中获得,获取到它的方式可能受到了限制,但它在某些圈子里一直被认为是你能得到的任何发行版里最好的管理器。它能查找剪贴板里的URL,使用GNOME的预设代理,还有许多其他的功能。 +Steadyflow很容易在Ubuntu和一些基于Debian的发行版中获得,获取它的方式可能受到了一些制约,但它在某些圈子里一直被认为是你能得到的任何发行版里最好的管理器。它能查找剪贴板里的URL,使用GNOME的预设代理,还有许多其他的功能。 ![The settings in Steady flow are extremely limiting and somewhat difficult to access](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/steady1.png) -Steady flow里的设置非常受限,而且有点难以使用。 + +*Steady flow里的设置非常少,而且有点难以使用。* #### 界面 #### @@ -112,7 +114,7 @@ Steadyflow的形象相当简洁,令人愉悦的、干净的界面并没有让 极度缺少功能,选项菜单也受到很大限制。暂停和恢复功能看起来也不怎么好使——这是任何浏览器文件下载功能的最基本的部分。文件下载结束的通知和默认行为是可以设置的,还可以选择在文件下载完成之后运行脚本。 -#### 可得性 #### +#### 可获得性 #### 只能在Ubuntu上获取,还不容易得到这个应用的源代码。这意味着虽然在所有基于Ubuntu的发行版中都能很容易的得到它,但也仅限于这些发行版。由于它不是Linux上能得到的最好的下载管理器,所以也不用想太多。 @@ -126,7 +128,7 @@ Steadyflow的形象相当简洁,令人愉悦的、干净的界面并没有让 #### uGet #### -在此次测试中,我们已经证明了现代电脑中还是有下载管理器的一席之地的,即便它们中的佼佼者们从BT下载客户端中抄袭了某些功能,貌似侵犯了他们的权益。对于某些人来说BT下载可能是个更有效率的方式,随着ISP们对待BT流量越来越机智,一些人可能用一个好的下载管理器就得到更好的效果。大多数主流ISP不仅仅强加了数据转移标记,在高峰时段他们中的一些甚至开始减慢或封掉BT流量——甚至连发行版的ISO文件和其他免费软件的合法数据流都被限制了。 +在此次测试中,我们已经证明了现代电脑中还是有下载管理器的一席之地的,即便它们中的佼佼者们从BT下载客户端中抄袭了某些功能,貌似侵犯了他们的权益。对于某些人来说BT下载可能是个更有效率的方式,随着ISP们对待BT流量越来越机智,一些人可能用一个好的下载管理器就得到更好的效果。大多数主流ISP不仅仅强加了数据传输限额,在高峰时段他们中的一些甚至开始减慢或封掉BT流量——甚至连发行版的ISO文件和其他免费软件的合法数据流都被限制了。 对于这类问题Steadyflow看起来是非常受欢迎的解决方式,但我们的使用和测试显示出,它是一个未完成的简陋的产品。更加古老的uGet则是这场表演的明星,有着惊人数量的可选功能,这些功能既能在下载单一文件中有所帮助,还能在整个网页里过滤出相关元素进行抓取。DownThemAll!与之类似,优秀的Firefox有加分,但它也离不开Firefox,有着几乎同级别的功能,但集成效果更好。 @@ -140,7 +142,7 @@ via: http://www.linuxuser.co.uk/reviews/top-4-linux-download-managers 作者:Rob Zwetsloot 译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1a624a9c2a10a92b1218ca6ac3ea448093fd8c40 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 21 Feb 2015 01:38:18 +0800 Subject: [PATCH 076/163] [translated] 02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md --- ...igration From MySQL To MariaDB On Linux.md | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md diff --git a/translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md b/translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md new file mode 100644 index 0000000000..e21084faeb --- /dev/null +++ b/translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md @@ -0,0 +1,169 @@ +Linux上从MySQL迁移到MariaDB的简单步骤 +================================================================================ +大家好!这是一篇介绍如何在服务器或个人电脑上从MySQL迁移到MariaDB的教程。也许你会问为什么我们要将数据库管理从MySQL迁移到MariaDB。往下看我们告诉你为什么这样做。 + +### 为什么要用MariaDB来代替MySQL ### + +MariaDB是MySQL社区开发的分支,也是一个增强型的替代品。它由MySQL前开发者们带头组织的基金会开发,使用起来和MySQL完全一样。自从Oracle买下了MySQL,它就不再自由开源了,但是 **MariaDB仍然自由开源**。一些如谷歌、维基、LinkedIn、Mozilla等的顶级的网站已经迁移到MariaDB了。它的优势在哪里: + +- 向后兼容MySQL +- 永远开源 +- 由MySQL缔造者的维护 +- 更尖端的功能 +- 更多的存储引擎 +- 大型的网站已经转向MariaDB + +现在,让我们迁移到MariaDB吧! + +**以测试为目的**让我们创建一个叫**linoxidedb**的示例数据库。 + +使用以下命令用root账户登陆MySQL: + + $ mysql -u root -p + +输入mysql root用户的密码后,你将进入**mysql的命令行** + +**创建测试数据库:** + +在mysql命令行输入以下命令以创建测试数据库。 + + mysql> create database linoxidedb; + +查看可用的数据库,输入以下命令: + + mysql> show databases; + +![creating test databases](http://blog.linoxide.com/wp-content/uploads/2015/01/creating-test-databases.png) + +如你所见,算上刚刚新建的linoxidedb我们一共有5个数据库。 + + mysql> quit + +现在,我们就将刚创建的数据库从MySQL迁移到MariaDB。 + +注:使用CentOS这类基于fedora的linux发行版没有必要参考这篇教程,因为它们在安装MariaDB时会自动代替MySQL,无需备份现有的数据库,你只需要更新mysql就可以得到mariadb。 + +### 1. 备份现有的数据库 ### + +我们第一个重要的步骤就是备份现有的数据库。我们在**终端(不是MySQL命令行)**里输入如下命令来完成备份。 + + $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql + +哇哦!我们遇到了点麻烦。别担心我们可以搞定。 + + $ mysqldump: Error: Binlogging on server not active + +![](http://blog.linoxide.com/wp-content/uploads/2015/01/mysqldump-error.png) +mysqldump error + +为了修复这个错误,我们需要对**my.cnf**文件做一些小改动。 + +编辑my.cnf文件: + + $ sudo nano /etc/mysql/my.cnf + +在[mysqld]部分添加如下参数。 + +**log-bin=mysql-bin** + +![configuring my.cnf](http://blog.linoxide.com/wp-content/uploads/2015/01/configuring-my.cnf_.png) + +好了在保存并关闭文件后,我们需要重启一下mysql服务。运行以下命令重启: + + $ sudo /etc/init.d/mysql restart + +现在,重新运行mysqldump命令来备份所有的数据库。 + + $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql + +![](http://blog.linoxide.com/wp-content/uploads/2015/01/crearing-bakup-file.png) +dumping databases + +上面的命令将会备份所有的数据库,把它们存储在当前目录下的**backupdatabase.sql**文件中。 + +### 2. 卸载MySQL ### + +首先,我们得把**my.cnt文件挪到安全的地方去**。 + +**注**:my.cnf文件将不会在你卸载MySQL包的时候被删除,我们这样做只是以防万一。在MariaDB安装时,它会询问我们是保持现存的my.cnf文件,还是使用包中自带的版本(即新my.cnf文件)。 + +在shell或终端中输入如下命令来备份my.cnt文件: + + $ sudo cp /etc/mysql/my.cnf my.cnf.bak + +运行命令来终止mysql服务: + + $ sudo /etc/init.d/mysql stop + +然后移除mysql包: + + $ sudo apt-get remove mysql-server mysql-client + +![uninstalling mysql](http://blog.linoxide.com/wp-content/uploads/2015/01/uninstalling-mysql.png) + +### 3. 安装MariaDB ### + +这是在Ubuntu系统中安装MariaDB的命令: + + $ sudo apt-get install software-properties-common + $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db + # sudo add-apt-repository 'deb http://mirror.mephi.ru/mariadb/repo/5.5/ubuntu trusty main' + +![adding mariadb repo](http://blog.linoxide.com/wp-content/uploads/2015/01/adding-repo-mariadb.png) + +键值导入并且添加完仓库后你就可以用以下命令安装MariaDB了: + + $ sudo apt-get update + $ sudo apt-get install mariadb-server + +![installing mariadb](http://blog.linoxide.com/wp-content/uploads/2015/01/installing-mariadb.png) + +![my.conf configuration prompt](http://blog.linoxide.com/wp-content/uploads/2015/01/my.conf-configuration-prompt.png) + +我们应该还没忘记在MariaDB安装时,它会问你是使用现有的my.cnf文件,还是包中自带的版本。你可以使用以前的my.cnf也可以用包中自带的。即使你想直接使用新的my.cnf文件,你依然可以晚点将以前的备份内容还原进去(别忘了我们已经将它复制到安全的地方那个去了)。所以,我们直接选择了默认的选项“N”。如果需要安装其他版本,请参考[MariaDB官方仓库][2]。 + +### 4. 恢复配置文件 ### + +想要将my.cnf.bak中的内容恢复到my.cnf,在终端中输入以下命令。由于my.cnf.bak文件在当前目录下,所以我们只要简单的执行以下命令即可: + + $ sudo cp my.cnf.bak /etc/mysql/my.cnf + +### 5. 导入数据库 ### + +最后,让我们把我们之前创建的数据库导入吧!运行一下命令即可完成导入。 + + $ mysql -u root -p < backupdatabase.sql + +就这样,我们已成功将之前的数据库导入了进来。 + +来,让我们登陆一下mysql命令行,检查一下数据库是否真的已经导入了: + + $ mysql -u root -p + +![importing database](http://blog.linoxide.com/wp-content/uploads/2015/01/importing-database.png) + +为了检查数据库是否被迁移到MariaDB,请在MariaDB命令行中输入“**show databases**;”不用输入(“”),如下: + + mariaDB> show databases; + +![mysql to mariadb database migrated](http://blog.linoxide.com/wp-content/uploads/2015/01/maria-database-migrated.png) + +如你所见,linoxidedb及所有的数据库都已经成功的被迁移了。 + +### 总结 ### + +最后,我们已经成功地从MySQL迁移到了MariaDB数据库管理系统。MariaDB比MySQL好,虽然在性能方面MySQL还是比它更快,但是MariaDB的优点在于它额外的特性与支持的许可证。这能够确保它自由开源(FOSS),并永久自由开源,相比之下MySQL还有许多额外的插件,有些不能自由使用代码、有些没有公开的开发进程、有些在不久的将来会变的不再自由开源。如果你有任何的问题、评论、反馈给我们,不要犹豫直接在评论区留下你的看法。谢谢观看本教程,希望那你能喜欢MariaDB。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/migrate-mysql-mariadb-linux/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://mariadb.org/ +[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=mephi From 5b0d136f4944d76b29e63ee4dd923cb379e5bc9d Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 21 Feb 2015 01:40:00 +0800 Subject: [PATCH 077/163] [translated] 20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md --- ...igration From MySQL To MariaDB On Linux.md | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 translated/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md diff --git a/translated/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md b/translated/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md new file mode 100644 index 0000000000..e21084faeb --- /dev/null +++ b/translated/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md @@ -0,0 +1,169 @@ +Linux上从MySQL迁移到MariaDB的简单步骤 +================================================================================ +大家好!这是一篇介绍如何在服务器或个人电脑上从MySQL迁移到MariaDB的教程。也许你会问为什么我们要将数据库管理从MySQL迁移到MariaDB。往下看我们告诉你为什么这样做。 + +### 为什么要用MariaDB来代替MySQL ### + +MariaDB是MySQL社区开发的分支,也是一个增强型的替代品。它由MySQL前开发者们带头组织的基金会开发,使用起来和MySQL完全一样。自从Oracle买下了MySQL,它就不再自由开源了,但是 **MariaDB仍然自由开源**。一些如谷歌、维基、LinkedIn、Mozilla等的顶级的网站已经迁移到MariaDB了。它的优势在哪里: + +- 向后兼容MySQL +- 永远开源 +- 由MySQL缔造者的维护 +- 更尖端的功能 +- 更多的存储引擎 +- 大型的网站已经转向MariaDB + +现在,让我们迁移到MariaDB吧! + +**以测试为目的**让我们创建一个叫**linoxidedb**的示例数据库。 + +使用以下命令用root账户登陆MySQL: + + $ mysql -u root -p + +输入mysql root用户的密码后,你将进入**mysql的命令行** + +**创建测试数据库:** + +在mysql命令行输入以下命令以创建测试数据库。 + + mysql> create database linoxidedb; + +查看可用的数据库,输入以下命令: + + mysql> show databases; + +![creating test databases](http://blog.linoxide.com/wp-content/uploads/2015/01/creating-test-databases.png) + +如你所见,算上刚刚新建的linoxidedb我们一共有5个数据库。 + + mysql> quit + +现在,我们就将刚创建的数据库从MySQL迁移到MariaDB。 + +注:使用CentOS这类基于fedora的linux发行版没有必要参考这篇教程,因为它们在安装MariaDB时会自动代替MySQL,无需备份现有的数据库,你只需要更新mysql就可以得到mariadb。 + +### 1. 备份现有的数据库 ### + +我们第一个重要的步骤就是备份现有的数据库。我们在**终端(不是MySQL命令行)**里输入如下命令来完成备份。 + + $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql + +哇哦!我们遇到了点麻烦。别担心我们可以搞定。 + + $ mysqldump: Error: Binlogging on server not active + +![](http://blog.linoxide.com/wp-content/uploads/2015/01/mysqldump-error.png) +mysqldump error + +为了修复这个错误,我们需要对**my.cnf**文件做一些小改动。 + +编辑my.cnf文件: + + $ sudo nano /etc/mysql/my.cnf + +在[mysqld]部分添加如下参数。 + +**log-bin=mysql-bin** + +![configuring my.cnf](http://blog.linoxide.com/wp-content/uploads/2015/01/configuring-my.cnf_.png) + +好了在保存并关闭文件后,我们需要重启一下mysql服务。运行以下命令重启: + + $ sudo /etc/init.d/mysql restart + +现在,重新运行mysqldump命令来备份所有的数据库。 + + $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql + +![](http://blog.linoxide.com/wp-content/uploads/2015/01/crearing-bakup-file.png) +dumping databases + +上面的命令将会备份所有的数据库,把它们存储在当前目录下的**backupdatabase.sql**文件中。 + +### 2. 卸载MySQL ### + +首先,我们得把**my.cnt文件挪到安全的地方去**。 + +**注**:my.cnf文件将不会在你卸载MySQL包的时候被删除,我们这样做只是以防万一。在MariaDB安装时,它会询问我们是保持现存的my.cnf文件,还是使用包中自带的版本(即新my.cnf文件)。 + +在shell或终端中输入如下命令来备份my.cnt文件: + + $ sudo cp /etc/mysql/my.cnf my.cnf.bak + +运行命令来终止mysql服务: + + $ sudo /etc/init.d/mysql stop + +然后移除mysql包: + + $ sudo apt-get remove mysql-server mysql-client + +![uninstalling mysql](http://blog.linoxide.com/wp-content/uploads/2015/01/uninstalling-mysql.png) + +### 3. 安装MariaDB ### + +这是在Ubuntu系统中安装MariaDB的命令: + + $ sudo apt-get install software-properties-common + $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db + # sudo add-apt-repository 'deb http://mirror.mephi.ru/mariadb/repo/5.5/ubuntu trusty main' + +![adding mariadb repo](http://blog.linoxide.com/wp-content/uploads/2015/01/adding-repo-mariadb.png) + +键值导入并且添加完仓库后你就可以用以下命令安装MariaDB了: + + $ sudo apt-get update + $ sudo apt-get install mariadb-server + +![installing mariadb](http://blog.linoxide.com/wp-content/uploads/2015/01/installing-mariadb.png) + +![my.conf configuration prompt](http://blog.linoxide.com/wp-content/uploads/2015/01/my.conf-configuration-prompt.png) + +我们应该还没忘记在MariaDB安装时,它会问你是使用现有的my.cnf文件,还是包中自带的版本。你可以使用以前的my.cnf也可以用包中自带的。即使你想直接使用新的my.cnf文件,你依然可以晚点将以前的备份内容还原进去(别忘了我们已经将它复制到安全的地方那个去了)。所以,我们直接选择了默认的选项“N”。如果需要安装其他版本,请参考[MariaDB官方仓库][2]。 + +### 4. 恢复配置文件 ### + +想要将my.cnf.bak中的内容恢复到my.cnf,在终端中输入以下命令。由于my.cnf.bak文件在当前目录下,所以我们只要简单的执行以下命令即可: + + $ sudo cp my.cnf.bak /etc/mysql/my.cnf + +### 5. 导入数据库 ### + +最后,让我们把我们之前创建的数据库导入吧!运行一下命令即可完成导入。 + + $ mysql -u root -p < backupdatabase.sql + +就这样,我们已成功将之前的数据库导入了进来。 + +来,让我们登陆一下mysql命令行,检查一下数据库是否真的已经导入了: + + $ mysql -u root -p + +![importing database](http://blog.linoxide.com/wp-content/uploads/2015/01/importing-database.png) + +为了检查数据库是否被迁移到MariaDB,请在MariaDB命令行中输入“**show databases**;”不用输入(“”),如下: + + mariaDB> show databases; + +![mysql to mariadb database migrated](http://blog.linoxide.com/wp-content/uploads/2015/01/maria-database-migrated.png) + +如你所见,linoxidedb及所有的数据库都已经成功的被迁移了。 + +### 总结 ### + +最后,我们已经成功地从MySQL迁移到了MariaDB数据库管理系统。MariaDB比MySQL好,虽然在性能方面MySQL还是比它更快,但是MariaDB的优点在于它额外的特性与支持的许可证。这能够确保它自由开源(FOSS),并永久自由开源,相比之下MySQL还有许多额外的插件,有些不能自由使用代码、有些没有公开的开发进程、有些在不久的将来会变的不再自由开源。如果你有任何的问题、评论、反馈给我们,不要犹豫直接在评论区留下你的看法。谢谢观看本教程,希望那你能喜欢MariaDB。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/migrate-mysql-mariadb-linux/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://mariadb.org/ +[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=mephi From 2834e5efdb3397f6351fb908584f6e51515ea355 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 21 Feb 2015 01:41:06 +0800 Subject: [PATCH 078/163] Delete 02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md --- ...igration From MySQL To MariaDB On Linux.md | 169 ------------------ 1 file changed, 169 deletions(-) delete mode 100644 translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md diff --git a/translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md b/translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md deleted file mode 100644 index e21084faeb..0000000000 --- a/translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md +++ /dev/null @@ -1,169 +0,0 @@ -Linux上从MySQL迁移到MariaDB的简单步骤 -================================================================================ -大家好!这是一篇介绍如何在服务器或个人电脑上从MySQL迁移到MariaDB的教程。也许你会问为什么我们要将数据库管理从MySQL迁移到MariaDB。往下看我们告诉你为什么这样做。 - -### 为什么要用MariaDB来代替MySQL ### - -MariaDB是MySQL社区开发的分支,也是一个增强型的替代品。它由MySQL前开发者们带头组织的基金会开发,使用起来和MySQL完全一样。自从Oracle买下了MySQL,它就不再自由开源了,但是 **MariaDB仍然自由开源**。一些如谷歌、维基、LinkedIn、Mozilla等的顶级的网站已经迁移到MariaDB了。它的优势在哪里: - -- 向后兼容MySQL -- 永远开源 -- 由MySQL缔造者的维护 -- 更尖端的功能 -- 更多的存储引擎 -- 大型的网站已经转向MariaDB - -现在,让我们迁移到MariaDB吧! - -**以测试为目的**让我们创建一个叫**linoxidedb**的示例数据库。 - -使用以下命令用root账户登陆MySQL: - - $ mysql -u root -p - -输入mysql root用户的密码后,你将进入**mysql的命令行** - -**创建测试数据库:** - -在mysql命令行输入以下命令以创建测试数据库。 - - mysql> create database linoxidedb; - -查看可用的数据库,输入以下命令: - - mysql> show databases; - -![creating test databases](http://blog.linoxide.com/wp-content/uploads/2015/01/creating-test-databases.png) - -如你所见,算上刚刚新建的linoxidedb我们一共有5个数据库。 - - mysql> quit - -现在,我们就将刚创建的数据库从MySQL迁移到MariaDB。 - -注:使用CentOS这类基于fedora的linux发行版没有必要参考这篇教程,因为它们在安装MariaDB时会自动代替MySQL,无需备份现有的数据库,你只需要更新mysql就可以得到mariadb。 - -### 1. 备份现有的数据库 ### - -我们第一个重要的步骤就是备份现有的数据库。我们在**终端(不是MySQL命令行)**里输入如下命令来完成备份。 - - $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql - -哇哦!我们遇到了点麻烦。别担心我们可以搞定。 - - $ mysqldump: Error: Binlogging on server not active - -![](http://blog.linoxide.com/wp-content/uploads/2015/01/mysqldump-error.png) -mysqldump error - -为了修复这个错误,我们需要对**my.cnf**文件做一些小改动。 - -编辑my.cnf文件: - - $ sudo nano /etc/mysql/my.cnf - -在[mysqld]部分添加如下参数。 - -**log-bin=mysql-bin** - -![configuring my.cnf](http://blog.linoxide.com/wp-content/uploads/2015/01/configuring-my.cnf_.png) - -好了在保存并关闭文件后,我们需要重启一下mysql服务。运行以下命令重启: - - $ sudo /etc/init.d/mysql restart - -现在,重新运行mysqldump命令来备份所有的数据库。 - - $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql - -![](http://blog.linoxide.com/wp-content/uploads/2015/01/crearing-bakup-file.png) -dumping databases - -上面的命令将会备份所有的数据库,把它们存储在当前目录下的**backupdatabase.sql**文件中。 - -### 2. 卸载MySQL ### - -首先,我们得把**my.cnt文件挪到安全的地方去**。 - -**注**:my.cnf文件将不会在你卸载MySQL包的时候被删除,我们这样做只是以防万一。在MariaDB安装时,它会询问我们是保持现存的my.cnf文件,还是使用包中自带的版本(即新my.cnf文件)。 - -在shell或终端中输入如下命令来备份my.cnt文件: - - $ sudo cp /etc/mysql/my.cnf my.cnf.bak - -运行命令来终止mysql服务: - - $ sudo /etc/init.d/mysql stop - -然后移除mysql包: - - $ sudo apt-get remove mysql-server mysql-client - -![uninstalling mysql](http://blog.linoxide.com/wp-content/uploads/2015/01/uninstalling-mysql.png) - -### 3. 安装MariaDB ### - -这是在Ubuntu系统中安装MariaDB的命令: - - $ sudo apt-get install software-properties-common - $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db - # sudo add-apt-repository 'deb http://mirror.mephi.ru/mariadb/repo/5.5/ubuntu trusty main' - -![adding mariadb repo](http://blog.linoxide.com/wp-content/uploads/2015/01/adding-repo-mariadb.png) - -键值导入并且添加完仓库后你就可以用以下命令安装MariaDB了: - - $ sudo apt-get update - $ sudo apt-get install mariadb-server - -![installing mariadb](http://blog.linoxide.com/wp-content/uploads/2015/01/installing-mariadb.png) - -![my.conf configuration prompt](http://blog.linoxide.com/wp-content/uploads/2015/01/my.conf-configuration-prompt.png) - -我们应该还没忘记在MariaDB安装时,它会问你是使用现有的my.cnf文件,还是包中自带的版本。你可以使用以前的my.cnf也可以用包中自带的。即使你想直接使用新的my.cnf文件,你依然可以晚点将以前的备份内容还原进去(别忘了我们已经将它复制到安全的地方那个去了)。所以,我们直接选择了默认的选项“N”。如果需要安装其他版本,请参考[MariaDB官方仓库][2]。 - -### 4. 恢复配置文件 ### - -想要将my.cnf.bak中的内容恢复到my.cnf,在终端中输入以下命令。由于my.cnf.bak文件在当前目录下,所以我们只要简单的执行以下命令即可: - - $ sudo cp my.cnf.bak /etc/mysql/my.cnf - -### 5. 导入数据库 ### - -最后,让我们把我们之前创建的数据库导入吧!运行一下命令即可完成导入。 - - $ mysql -u root -p < backupdatabase.sql - -就这样,我们已成功将之前的数据库导入了进来。 - -来,让我们登陆一下mysql命令行,检查一下数据库是否真的已经导入了: - - $ mysql -u root -p - -![importing database](http://blog.linoxide.com/wp-content/uploads/2015/01/importing-database.png) - -为了检查数据库是否被迁移到MariaDB,请在MariaDB命令行中输入“**show databases**;”不用输入(“”),如下: - - mariaDB> show databases; - -![mysql to mariadb database migrated](http://blog.linoxide.com/wp-content/uploads/2015/01/maria-database-migrated.png) - -如你所见,linoxidedb及所有的数据库都已经成功的被迁移了。 - -### 总结 ### - -最后,我们已经成功地从MySQL迁移到了MariaDB数据库管理系统。MariaDB比MySQL好,虽然在性能方面MySQL还是比它更快,但是MariaDB的优点在于它额外的特性与支持的许可证。这能够确保它自由开源(FOSS),并永久自由开源,相比之下MySQL还有许多额外的插件,有些不能自由使用代码、有些没有公开的开发进程、有些在不久的将来会变的不再自由开源。如果你有任何的问题、评论、反馈给我们,不要犹豫直接在评论区留下你的看法。谢谢观看本教程,希望那你能喜欢MariaDB。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/migrate-mysql-mariadb-linux/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://mariadb.org/ -[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=mephi From 3654c31a6eb6ad8f1a24bd6f303fa2017029248a Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 21 Feb 2015 01:42:52 +0800 Subject: [PATCH 079/163] Delete 20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md --- ...igration From MySQL To MariaDB On Linux.md | 171 ------------------ 1 file changed, 171 deletions(-) delete mode 100644 sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md diff --git a/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md b/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md deleted file mode 100644 index fc04e08a2f..0000000000 --- a/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md +++ /dev/null @@ -1,171 +0,0 @@ -Translating by martin. - -Simple Steps Migration From MySQL To MariaDB On Linux -================================================================================ -Hi all, this tutorial is all gonna be about how to migrate from MySQL to MariaDB on Linux Server or PC. So, you may ask why should we really migrate from MySQL to MariaDB for our database management. Here, below are the reasons why you should really need to migrate your database management system from MySQL to MariaDB. - -### Why should I use MariaDB instead of MySQL? ### - -MariaDB is an enhanced drop-in replacement and community-developed fork of the MySQL database system. It was developed by MariaDB foundation, and is being led by original developers of MySQL. Working with MariaDB is entirely same as MySQL. After Oracle bought MySQL, it is not free and open source anymore, but **MariaDB is still free and open source**. Top Websites like Google, Wikipedia, Linkedin, Mozilla and many more migrated to MariaDB. Its features are - -- Backwards compatible with MySQL -- Forever open source -- Maintained by MySQL's creator -- More cutting edge features -- More storage engines -- Large websites have switched - -Now, lets migrate to MariaDB. - -**For the testing purpose**, let us create a sample database called **linoxidedb** . - -Log in to MySQL as root user using the following command: - - $ mysql -u root -p - -Enter the mysql root user password. You’ll be redirected to the **mysql prompt**. - -**Create test databases:** - -Enter the following commands from mysql prompt to create test databases. - - mysql> create database linoxidedb; - -To view the list of available databases, enter the following command: - - mysql> show databases; - -![creating test databases](http://blog.linoxide.com/wp-content/uploads/2015/01/creating-test-databases.png) - -As see above, we have totally 5 databases including the newly created database linoxidedb . - - mysql> quit - -Now, we'll migrate the created databases from MySQL to MariaDB. - -Note: This tutorial is not necessary for CentOS, fedora based distribution of Linux because MariaDB is automatically installed instead of MySQL which requires no need to backup the existing databases, you just need to update mysql which will give you mariadb. - -### 1. Backup existing databases ### - -Our first important step is to create a backup of existing databases. To do that, we'll enter the following command from the **Terminal (not from MySQL prompt)**. - - $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql - -Oops! We encountered an error. No worries, it can be fixed. - - $ mysqldump: Error: Binlogging on server not active - -![](http://blog.linoxide.com/wp-content/uploads/2015/01/mysqldump-error.png) -mysqldump error - -To fix this error, we have to do a small modification in **my.cnf** file. - -Edit my.cnf file: - - $ sudo nano /etc/mysql/my.cnf - -Under [mysqld] section, add the following parameter. - -**log-bin=mysql-bin** - -![configuring my.cnf](http://blog.linoxide.com/wp-content/uploads/2015/01/configuring-my.cnf_.png) - -Now, after done save and exit the file. Then, we'll need to restart mysql server. To do that please execute the below commands. - - $ sudo /etc/init.d/mysql restart - -Now, re-run the mysqldump command to backup all databases. - - $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql - -![](http://blog.linoxide.com/wp-content/uploads/2015/01/crearing-bakup-file.png) -dumping databases - -The above command will backup all databases, and stores them in **backupdatabase.sql** in the current directory. - -### 2. Uninstalling MySQL ### - -First of all, we'll want to **backup the my.cnf file to a safe location**. - -**Note**: The my.cnf file will not be deleted when uninstalling MySQL packages. We do it for the precaution. During MariaDB installation, the installer will ask us to keep the existing my.cnf(old backup) file or to use the package containers version (i.e new one). - -To backup the my.cnf file, please enter the following commands in a shell or terminal. - - $ sudo cp /etc/mysql/my.cnf my.cnf.bak - -To stop mysql service, enter the following command from your Terminal. - - $ sudo /etc/init.d/mysql stop - -Then, remove mysql packages. - - $ sudo apt-get remove mysql-server mysql-client - -![uninstalling mysql](http://blog.linoxide.com/wp-content/uploads/2015/01/uninstalling-mysql.png) - -### 3. Installing MariaDB ### - -Here are the commands to run to install MariaDB on your Ubuntu system: - - $ sudo apt-get install software-properties-common - $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db - # sudo add-apt-repository 'deb http://mirror.mephi.ru/mariadb/repo/5.5/ubuntu trusty main' - -![adding mariadb repo](http://blog.linoxide.com/wp-content/uploads/2015/01/adding-repo-mariadb.png) - -Once the key is imported and the repository added you can install MariaDB with: - - $ sudo apt-get update - $ sudo apt-get install mariadb-server - -![installing mariadb](http://blog.linoxide.com/wp-content/uploads/2015/01/installing-mariadb.png) - -![my.conf configuration prompt](http://blog.linoxide.com/wp-content/uploads/2015/01/my.conf-configuration-prompt.png) - -We should remember that during MariaDB installation, the installer will ask you either to use the existing my.cnf(old backup) file, or use the package containers version (i.e new one). You can either use the old my.cnf file or the package containers version. If you want to use the new my.cnf version, you can restore the contents of older my.cnf (We already have copied this file to safe location before) later ie my.cnf.bak . So, I will go for default which is N, we'll press N then. For other versions, please refer the [MariaDB official repositories page][2]. - -### 4. Restoring Config File ### - -To restore my.cnf from my.cnf.bak, enter the following command in Terminal. We have the old as my.cnf.bak file in our current directory, so we can simply copy the file using the following command: - - $ sudo cp my.cnf.bak /etc/mysql/my.cnf - -### 5. Importing Databases ### - -Finally, lets import the old databases that we created before. To do that, we'll need to run the following command. - - $ mysql -u root -p < backupdatabase.sql - -That’s it. We have successfully imported the old databases. - -Let us check if the databases are really imported. To do that, we'll wanna log in to mysql prompt using command: - - $ mysql -u root -p - -![importing database](http://blog.linoxide.com/wp-content/uploads/2015/01/importing-database.png) - -Now, to check whether the databases are migrated to MariaDB please run "**show databases**;" command inside the MarianDB prompt without quotes("") as - - mariaDB> show databases; - -![mysql to mariadb database migrated](http://blog.linoxide.com/wp-content/uploads/2015/01/maria-database-migrated.png) - -As you see in the above result all old databases including our very linoxidedb has been successfully migrated. - -### Conclusion ### - -Finally, we have successfully migrated our databases from MySQL to MariaDB Database Management System. MariaDB is far more better than MySQL. Though MySQL is still faster than MariaDB in performance but MariaDB is far more better because of its additional features and license. MariaDB is a Free and Open Source Software (FOSS) and will be FOSS forever but MySQL has many additional plugins, etc non-free and there is no proper public roadmap and won't be FOSS in future. If you have any questions, comments, feedback to us, please don't hesitate to write on the comment box below. Thank You ! And Enjoy MariaDB. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/migrate-mysql-mariadb-linux/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://mariadb.org/ -[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=mephi From 2f19219d128c9a4bbd91837378647b947210227e Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 21 Feb 2015 01:51:08 +0800 Subject: [PATCH 080/163] Update 20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改一个翻译错误 --- ...20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md index 254345f765..762e363beb 100644 --- a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md +++ b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -1,6 +1,6 @@ Ubuntu上的一个开源VoIP应用——Mumble ================================================================================ -Mumble是一个免费开源的VoIP应用,遵守New BSD License,主要面向的用户群体是玩家。运行起来类似于TeamSpeak和Ventrilo,用户通过连接到同一个服务器来实现相互通讯。 +Mumble是一个自由开源的VoIP应用,遵守New BSD License,主要面向的用户群体是玩家。运行起来类似于TeamSpeak和Ventrilo,用户通过连接到同一个服务器来实现相互通讯。 Mumble提供了如下的一些特性: From 0fcd0d498b8d0467f35d660477429ffb15341083 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 21 Feb 2015 01:57:41 +0800 Subject: [PATCH 081/163] Update 20150215 How to share files between computers over network with btsync.md --- ... share files between computers over network with btsync.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150215 How to share files between computers over network with btsync.md b/sources/tech/20150215 How to share files between computers over network with btsync.md index 3af649b886..e892f2bb55 100644 --- a/sources/tech/20150215 How to share files between computers over network with btsync.md +++ b/sources/tech/20150215 How to share files between computers over network with btsync.md @@ -1,3 +1,5 @@ +translating by martin. + How to share files between computers over network with btsync ================================================================================ If you are the type of person who uses several devices to work online, I'm sure you must be using, or at least wishing to use, a method for syncing files and directories among those devices. @@ -133,4 +135,4 @@ via: http://xmodulo.com/share-files-between-computers-over-network.html [1]:https://play.google.com/store/apps/details?id=com.bittorrent.sync [2]:https://itunes.apple.com/us/app/bittorrent-sync/id665156116 [3]:http://www.getsync.com/ -[4]:http://www.getsync.com/tech-specs \ No newline at end of file +[4]:http://www.getsync.com/tech-specs From dbd9be1217475d4a3b0070983675bf04b837b68a Mon Sep 17 00:00:00 2001 From: coloka Date: Sat, 21 Feb 2015 10:43:25 +0800 Subject: [PATCH 082/163] [Translating]20150121 How to apply image effects to pictures on Raspberry Pi --- ...121 How to apply image effects to pictures on Raspberry Pi.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md b/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md index 920f542832..6f97f3454e 100644 --- a/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md +++ b/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md @@ -1,3 +1,4 @@ +Translating by coloka How to apply image effects to pictures on Raspberry Pi ================================================================================ Like a common pocket camera which has a built-in function to add various effects on captured photos, [Raspberry Pi camera board][1] ("raspi cam") can actually do the same. With the help of raspistill camera control options, we can add the image effects function like we have in a pocket camera. From 0615c77f20047b51976a660a928887c31b1d572d Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 21 Feb 2015 22:40:26 +0800 Subject: [PATCH 083/163] PUB:20150105 How To Install Winusb In Ubuntu 14.04 @geekpi --- .../20150105 How To Install Winusb In Ubuntu 14.04.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150105 How To Install Winusb In Ubuntu 14.04.md (69%) diff --git a/translated/tech/20150105 How To Install Winusb In Ubuntu 14.04.md b/published/20150105 How To Install Winusb In Ubuntu 14.04.md similarity index 69% rename from translated/tech/20150105 How To Install Winusb In Ubuntu 14.04.md rename to published/20150105 How To Install Winusb In Ubuntu 14.04.md index a65ba04392..8fb636c6d2 100644 --- a/translated/tech/20150105 How To Install Winusb In Ubuntu 14.04.md +++ b/published/20150105 How To Install Winusb In Ubuntu 14.04.md @@ -2,13 +2,13 @@ ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/WinUSB_Ubuntu_1404.jpeg) -[WinUSB][1]是一款即简单又有用的工具,可以让你从 Windows ISO 镜像或者 DVD 中创建 USB 安装盘。它结合了 GUI 和命令行,你可以根据你的喜好决定使用哪种。 +[WinUSB][1]是一款即简单又有用的工具,可以让你从 Windows ISO 镜像或者 DVD 中创建 USB 安装盘(LCTT译注:支持将 Windows Vista/7/8/PE 制作成 USB 安装盘)。它支持 GUI 和命令行,你可以根据你的喜好决定使用哪种。 在本文中我们会展示**如何在 Ubuntu 14.04、14.10 和 Linux Mint 17 中安装 WinUSB**。 ### 在 Ubuntu 14.04、14.10 和 Linux Mint 17 中安装 WinUSB ### -在 Ubuntu 13.10 之前, WinUSBu 一直都在积极开发,且在官方 PPA 中可以找到。这个 PPA 还没有为 Ubuntu 14.04 和 14.10 更新,但是二进制文件仍旧可在更新版本的 Ubuntu 和 Linux Mint 中运行。基于[你使用的系统是32位还是64位][2],使用下面的命令来下载二进制文件: +在 Ubuntu 13.10 之前, WinUSB 一直都在积极开发,且在官方 PPA 中可以找到。但这个 PPA 还没有为 Ubuntu 14.04 和 14.10 更新,不过其二进制文件仍旧可在更新版本的 Ubuntu 和 Linux Mint 中运行。基于[你使用的系统是32位还是64位][2],使用下面的命令来下载二进制文件: 打开终端,32位的系统下使用下面的命令: @@ -18,11 +18,11 @@ wget https://launchpad.net/~colingille/+archive/freshlight/+files/winusb_1.0.11+saucy1_amd64.deb -一旦你下载了正确的二进制包,你可以用下面的命令安装WinUSB: +当你下载了正确的二进制包,你可以用下面的命令安装WinUSB: sudo dpkg -i winusb* -不要担心在你安装WinUSB时看到错误。使用这条命令修复依赖错误: +不要担心在你安装WinUSB时看到的错误。使用这条命令修复依赖错误: sudo apt-get -f install From f1669fc0c4defed30d3c4ff32533a57048a1469d Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 21 Feb 2015 23:07:03 +0800 Subject: [PATCH 084/163] PUB:20150106 How to deduplicate files on Linux with dupeGuru @geekpi --- ...eduplicate files on Linux with dupeGuru.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150106 How to deduplicate files on Linux with dupeGuru.md (51%) diff --git a/translated/tech/20150106 How to deduplicate files on Linux with dupeGuru.md b/published/20150106 How to deduplicate files on Linux with dupeGuru.md similarity index 51% rename from translated/tech/20150106 How to deduplicate files on Linux with dupeGuru.md rename to published/20150106 How to deduplicate files on Linux with dupeGuru.md index b8ffbd37e8..143e786e09 100644 --- a/translated/tech/20150106 How to deduplicate files on Linux with dupeGuru.md +++ b/published/20150106 How to deduplicate files on Linux with dupeGuru.md @@ -1,10 +1,10 @@ -如何在Linux上使用dupeGuru删除重复文件 +删除重复文件的神器:dupeGuru ================================================================================ -最近,我被要求清理我父亲的文件和文件夹。有一个难题是,里面存在很多不正确的名字的重复文件。有移动硬盘的备份,同时还为同一个文件编辑了多个版本,甚至改变的目录结构,同一个文件被复制了好几次,改变名字,改变位置等,这些挤满了磁盘空间。追踪每一个文件成了一个最大的问题。万幸的是,有一个小巧的软件可以帮助你省下很多时间来找到删除你系统中重复的文件:[dupeGuru][1]。它用Python写成,这个去重软件几个小时钱前切换到了GPLv3许可证。因此是时候用它来清理你的文件了! +最近,我需要清理我父亲的文件和文件夹。有一个难题是,里面存在很多不正确的名字的重复文件。有移动硬盘的备份,同时还为同一个文件编辑了多个版本,甚至改变的目录结构,同一个文件被复制了好几次,名字改变,位置改变等,这些文件挤满了磁盘空间。追踪每一个文件成了一个最大的问题。万幸的是,有一个小巧的软件可以帮助你省下很多时间来找到删除你系统中重复的文件:[dupeGuru][1]。它用Python写成,这个去重软件几个小时前切换到了GPLv3许可证。因此是时候用它来清理你的文件了! ### dupeGuru的安装 ### -在Ubuntu上, 你可以加入Hardcoded的软件PPA: +在Ubuntu上, 你可以加入如下硬编码的软件PPA: $ sudo apt-add-repository ppa:hsoft/ppa $ sudo apt-get update @@ -33,29 +33,29 @@ DupeGuru的构想是既快又安全。这意味着程序不会在你的系统上 ![](https://farm9.staticflickr.com/8600/16016041367_5ab2834efb_z.jpg) -注意的是默认上dupeGuru基于文件的内容匹配,而不是他们的名字。为了防止意外地删除了重要的文件,匹配那列列出了使用的匹配算法。在这里,你可以选择你想要删除的匹配文件,并按下“Action” 按钮来看到可用的操作。 +注意的是默认上dupeGuru基于文件的内容匹配,而不是他们的名字。为了防止意外地删除了重要的文件,匹配列列出了其使用的匹配算法。在这里,你可以选择你想要删除的匹配文件,并按下“Action” 按钮来看到可用的操作。 ![](https://farm8.staticflickr.com/7516/16199976361_c8f919b06e_b.jpg) -可用的选项是相当广泛的。简而言之,你可以删除重复、移动到另外的位置、忽略它们、打开它们、重命名它们甚至用自定义命令运行它们。如果你选择删除重复文件,你可能会像我一样非常意外竟然还有删除选项。 +可用的选项相当广泛。简而言之,你可以删除重复、移动到另外的位置、忽略它们、打开它们、重命名它们甚至用自定义命令运行它们。如果你希望删除重复文件,你可能会像我一样非常意外竟然有这么多种删除方式。 ![](https://farm8.staticflickr.com/7503/16014366568_54f70e3140.jpg) -你不及可以将删除文件移到垃圾箱或者永久删除,还可以选择留下指向原文件的链接(软链接或者硬链接)。也就是说,重复文件按将会删除但是会保留下指向原文件的链接。这将会省下大量的磁盘空间。如果你将这些文件导入到工作空间或者它们有一些依赖时很有用。 +你不仅可以将删除的文件移到垃圾箱或者永久删除,还可以选择留下指向原文件的链接(软链接或者硬链接)。也就是说,重复文件将会删除文件存储,但是会保留下一个指向原文件的链接。这将会省下大量的磁盘空间。如果你将这些文件导入到工作空间或者它们有一些依赖时很有用。 -还有一个奇特的选项:你可以用HTML或者CSV文件导出结果。不确定你会不会这么做,但是我假设你想追踪重复文件而不是想让dupeGuru处理它们时会有用。 +还有一个奇特的选项:你可以用HTML或者CSV文件导出结果。我不确定你会不会需要这么做,但是我假设你想追踪重复文件而不是想让dupeGuru处理它们时会有用。 -最后但并不是最不重要的是,偏好菜单可以让你对去重的想法成真。 +最后但并不是最不重要的是,偏好菜单可以让你按照你的想法来操作去重这件事。 ![](https://farm8.staticflickr.com/7493/16015755749_a9f343b943_z.jpg) -这里你可以选择扫描的标准,基于内容还是基于文字,并且有一个阈值来控制结果的数量。这里同样可以定义自定义在执行中可以选择的命令。在无数其他小的选项中,要注意的是dupeGuru默认忽略小于10KB的文件。 +这里你可以选择扫描的标准,基于内容还是基于名字,并且有一个阈值来控制结果的数量。这里同样可以定义自定义在执行中可以选择的命令。混在其他那些小的选项中,要注意的是dupeGuru默认忽略小于10KB的文件。 -要了解更多的信息,我建议你到[official website][4]官方网站看下,这里有很多文档、论坛支持和其他好东西。 +要了解更多的信息,我建议你到[官方网站][4]看下,这里有很多文档、论坛支持和其他好东西。 -总结一下,dupeGuru是我无论何时准备备份或者释放空间时想到的软件。我发现这对高级用户而言也足够强大了,对新人而言也很直观。锦上添花的是:dupeGuru是跨平台的额,这意味着你可以在Mac或者在Windows PC上都可以使用。如果你有特定的需求,想要清理音乐或者图片。这里有两个变种:[dupeguru-me][5]和 [dupeguru-pe][6], 相应地可以清理音频和图片文件。与常规版本的不同是它不仅比较文件格式还比较特定的媒体数据像质量和码率。 +总结一下,dupeGuru是我无论何时准备备份或者释放空间时所想到的软件。我发现这对高级用户而言也足够强大了,对新人而言也很直观。锦上添花的是:dupeGuru是跨平台的,这意味着你可以在Mac或者在Windows PC上都可以使用。如果你有特定的需求,想要清理音乐或者图片。这里有两个变种:[dupeguru-me][5]和 [dupeguru-pe][6], 相应地可以清理音频和图片文件。与常规版本的不同是它不仅比较文件格式还比较特定的媒体数据像质量和码率。 -你dupeGuru怎么样?你会考虑使用它么?或者你有任何可以替代的软件的建议么?让我在评论区知道你们的想法。 +你觉得dupeGuru怎么样?你会考虑使用它么?或者你有任何可以替代的软件的建议么?让我在评论区知道你们的想法。 -------------------------------------------------------------------------------- @@ -63,7 +63,7 @@ via: http://xmodulo.com/dupeguru-deduplicate-files-linux.html 作者:[Adrien Brochard][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 249a70a7c90bc0f886701ff32e4040b8091fff84 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 21 Feb 2015 23:45:05 +0800 Subject: [PATCH 085/163] PUB:20150106 Managing Linux server configs with the SaltStack @GOLinux --- ...Linux server configs with the SaltStack.md | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) rename {translated/tech => published}/20150106 Managing Linux server configs with the SaltStack.md (90%) diff --git a/translated/tech/20150106 Managing Linux server configs with the SaltStack.md b/published/20150106 Managing Linux server configs with the SaltStack.md similarity index 90% rename from translated/tech/20150106 Managing Linux server configs with the SaltStack.md rename to published/20150106 Managing Linux server configs with the SaltStack.md index 1acf7c2434..44c980dddc 100644 --- a/translated/tech/20150106 Managing Linux server configs with the SaltStack.md +++ b/published/20150106 Managing Linux server configs with the SaltStack.md @@ -1,20 +1,21 @@ -SaltStack:Linux服务器配置管理神器 +通过 SaltStack 管理服务器配置 ================================================================================ ![](http://techarena51.com/wp-content/uploads/2015/01/SaltStack+logo+-+black+on+white.png) 我在搜索[Puppet][1]的替代品时,偶然间碰到了Salt。我喜欢puppet,但是我又爱上Salt了:)。我发现Salt在配置和使用上都要比Puppet简单,当然这只是一家之言,你大可不必介怀。另外一个爱上Salt的理由是,它可以让你从命令行管理服务器配置,比如: -要通过Salt来更新所有服务器,你只需运行以下命令 +要通过Salt来更新所有服务器,你只需运行以下命令即可 - salt ‘*’ pkg.upgrade + salt '*' pkg.upgrade -**安装SaltStack到Linux上。** -如果你是在CentOS 6/7上安装的话,那么Salt可以通过EPEL仓库获取到。而对于Pi和Ubuntu Linux用户,你可以从[这里][2]添加Salt仓库。Salt是基于python的,所以你也可以使用‘pip’来安装,但是你得用yum-utils或是其它包管理器来自己处理它的依赖关系哦。 +##安装SaltStack到Linux上## -Salt遵循服务器-客户端模式,服务器端称为领主,而客户端则称为下属。 +如果你是在CentOS 6/7上安装的话,那么Salt可以通过EPEL仓库获取到。而对于Pi和Ubuntu Linux用户,你可以从[这里][2]添加Salt仓库。Salt是基于python的,所以你也可以使用‘pip’来安装,但是你得用yum-utils或是其它包管理器来自己处理它的依赖关系。 -**安装并配置Salt领主** +Salt采用服务器-客户端模式,服务器端称为领主,而客户端则称为下属。 + +###安装并配置Salt领主### [root@salt-master~]# yum install salt-master @@ -27,7 +28,7 @@ Salt配置文件位于/etc/salt和/srv/salt。Salt虽然可以开箱即用,但 [root@salt-master ~]# systemctl start salt-master -**安装并配置Salt下属** +###安装并配置Salt下属### [root@salt-minion~]#yum install salt-minion @@ -39,7 +40,7 @@ Salt配置文件位于/etc/salt和/srv/salt。Salt虽然可以开箱即用,但 在启动时,下属客户机会生成一个密钥和一个id。然后,它会连接到Salt领主服务器并验证自己的身份。Salt领主服务器在允许下属客户机下载配置之前,必须接受下属的密钥。 -**在Salt领主服务器上列出并接受密钥** +###在Salt领主服务器上列出并接受密钥### # 列出所有密钥 [root@salt-master~] salt-key -L @@ -59,7 +60,7 @@ Salt配置文件位于/etc/salt和/srv/salt。Salt虽然可以开箱即用,但 在接受下属客户机的密钥后,你可以使用‘salt’命令来立即获取信息。 -**Salt命令行实例** +##Salt命令行实例## # 检查下属是否启动并运行 [root@salt-master~] salt 'minion.com' test.ping @@ -75,15 +76,15 @@ Salt配置文件位于/etc/salt和/srv/salt。Salt虽然可以开箱即用,但 # 安装/更新所有服务器上的软件 [root@salt-master ~]# salt '*' pkg.install git -salt命令需要一些组件来发送信息,其中之一是mimion id,而另一个是下属客户机上要调用的函数。 +salt命令需要一些组件来发送信息,其中之一是下属客户机的id,而另一个是下属客户机上要调用的函数。 在第一个实例中,我使用‘test’模块的‘ping’函数来检查系统是否启动。该函数并不是真的实施一次ping,它仅仅是在下属客户机作出回应时返回‘真’。 ‘cmd.run’用于执行远程命令,而‘pkg’模块包含了包管理的函数。本文结尾提供了全部内建模块的列表。 -**颗粒实例** +###颗粒实例### -Salt使用一个名为**颗粒**的界面来获取系统信息。你可以使用颗粒在指定属性的系统上运行命令。 +Salt使用一个名为**颗粒(Grains)**的界面来获取系统信息。你可以使用颗粒在指定属性的系统上运行命令。 [root@vps4544 ~]# salt -G 'os:Centos' test.ping minion: @@ -91,11 +92,11 @@ Salt使用一个名为**颗粒**的界面来获取系统信息。你可以使用 更多颗粒实例,请访问http://docs.saltstack.com/en/latest/topics/targeting/grains.html -**通过状态文件系统进行包管理。** +##通过状态文件系统进行包管理## -为了是软件配置自动化,你需要使用状态系统,并创建状态文件。这些文件使用YAML格式和python字典、列表、字符串以及编号来构成数据结构。将这些文件从头到尾研读一遍,这将有助于你更好地理解它的配置。 +为了使软件配置自动化,你需要使用状态系统,并创建状态文件。这些文件使用YAML格式和python字典、列表、字符串以及编号来构成数据结构。将这些文件从头到尾研读一遍,这将有助于你更好地理解它的配置。 -**VIM状态文件实例** +###VIM状态文件实例### [root@salt-master~]# vim /srv/salt/vim.sls vim-enhanced: @@ -107,7 +108,7 @@ Salt使用一个名为**颗粒**的界面来获取系统信息。你可以使用 - group: root - mode: 644 -该文件的第一和第三行成为状态id,它们必须包含有需要管理的包或文件的确切名称或路径。在状态id之后是状态和函数声明,‘pkg’和‘file’是状态声明,而‘installed’和‘managed’是函数声明。函数接受参数,用户、组、模式和源都是函数‘managed’的参数。 +该文件的第一和第三行称为状态id,它们必须包含有需要管理的包或文件的确切名称或路径。在状态id之后是状态和函数声明,‘pkg’和‘file’是状态声明,而‘installed’和‘managed’是函数声明。函数接受参数,用户、组、模式和源都是函数‘managed’的参数。 要将该配置应用到下属客户端,请移动你的‘vimrc’文件到‘/src/salt’,然后运行以下命令。 @@ -253,7 +254,7 @@ Salt使用一个名为**颗粒**的界面来获取系统信息。你可以使用 [root@vps4544 ssh]# cp /etc/ssh/sshd_config /srv/salt/ssh/ [root@vps4544 ssh]# salt 'minion.com' state.sls ssh -**Top文件和环境。** +###Top文件和环境### top文件(top.sls)是用来定义你的环境的文件,它允许你映射下属客户机到包,默认环境是‘base’。你需要定义在基本环境下,哪个包会被安装到哪台服务器。 @@ -268,7 +269,7 @@ top文件(top.sls)是用来定义你的环境的文件,它允许你映射 dev: - /srv/salt/dev -现在,添加一个top.sls文件到/src/salt +现在,添加一个top.sls文件到/src/salt。 [root@salt-master ~]# vim /srv/salt/top.sls base: @@ -299,7 +300,9 @@ top文件(top.sls)是用来定义你的环境的文件,它允许你映射 下属客户机将下载top文件并搜索用于它的配置,领主服务器也会将配置应用到所有下属客户机。 -这仅仅是一个Salt的简明教程,如果你想要深入学习并理解,你可以访问以下链接。如果你已经在使用Salt,那么请告诉我你的建议和意见吧。 +--- + +这仅仅是一个Salt的简明教程,如果你想要深入学习并理解,你可以访问下面的链接。如果你已经在使用Salt,那么请告诉我你的建议和意见吧。 更新: [Foreman][3] 已经通过[插件][4]支持salt。 @@ -329,7 +332,7 @@ via: http://techarena51.com/index.php/getting-started-with-saltstack/ 作者:[Leo G][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From f49604a794e8a35c90b2dcf1cba330d931232196 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 21 Feb 2015 23:51:54 +0800 Subject: [PATCH 086/163] PUB:20150115 Configure Mate Desktop With Mate Tweak @geekpi --- .../20150115 Configure Mate Desktop With Mate Tweak.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20150115 Configure Mate Desktop With Mate Tweak.md (92%) diff --git a/translated/tech/20150115 Configure Mate Desktop With Mate Tweak.md b/published/20150115 Configure Mate Desktop With Mate Tweak.md similarity index 92% rename from translated/tech/20150115 Configure Mate Desktop With Mate Tweak.md rename to published/20150115 Configure Mate Desktop With Mate Tweak.md index 7ae68abaae..3b2f1c972b 100644 --- a/translated/tech/20150115 Configure Mate Desktop With Mate Tweak.md +++ b/published/20150115 Configure Mate Desktop With Mate Tweak.md @@ -4,7 +4,7 @@ [在Ubuntu中安装Mate桌面][1]是一码事但是你或许想要知道如何**配置Mate桌面**? 大多数桌面环境都有它们自己的调整工具。比如Unity有Unity Tweak,Gnome有Gnome Tweak,Elementary OS有 Elementary OS Teweak。好消息是Mate桌面也有它自己的调整工具,叫Mate Tweak][2]。 -Mate Tweak是[mintDesktop][3]的克隆分支,一款Linux Mint的配置工具。 +Mate Tweak是[mintDesktop][3]的克隆分支,那是一款Linux Mint的配置工具。 ### 安装Mate Tweak来配置Mate桌面 ### @@ -22,7 +22,7 @@ via: http://itsfoss.com/configure-mate-desktop-mate-tweak/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 48a3204c132d03dd78941f3be1ca3e82bdd372d7 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Sun, 22 Feb 2015 07:52:38 +0800 Subject: [PATCH 087/163] Translated --- ...fault Instead of Ubuntu Software Center.md | 48 ------------------- ...fault Instead of Ubuntu Software Center.md | 46 ++++++++++++++++++ 2 files changed, 46 insertions(+), 48 deletions(-) delete mode 100644 sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md create mode 100644 translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md diff --git a/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md deleted file mode 100644 index 55bca268d1..0000000000 --- a/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md +++ /dev/null @@ -1,48 +0,0 @@ -Translating by FSSlc - -How To Make GDebi Default Instead of Ubuntu Software Center -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Make_GDebi_Default.jpeg) - -If you use Ubuntu or Ubuntu based Linux distribution such as Elementary OS Freya, you might be using Ubuntu Software Center to install .deb executable files. Ubuntu Software Center is a nice application for finding and installing apps but it is resource heavy and slow. This is why I prefer using [App Grid, a lighter alternative of Ubuntu Software Center][1]. - -Now, if you just trying to install a .deb file, I would not recommend either of Ubuntu Software Center or App Grid. I suggest GDebi, a dedicated program for installing Debian executable files. It is extremely lightweight and focused on installing .deb files. Best thing about GDebi is that it also shows the dependencies that will be installed along with the desired program. - -In this post we shall see **how to install GDebi and use it as the default installer instead of Ubuntu Software Center**. - -### Install GDebi in Ubuntu and other Linux distributions ### - -Open a terminal and use the following command: - - sudo apt-get install gdebi - -### Make GDebi default for .deb installation ### - -Once you have installed GDebi, it’s time to see how to make it the default application for installing .deb files. Please note that I am using Elementary OS Freya in this tutorial but the steps are applicable to all Ubuntu based distribution. Just the screenshots may look different. - -Download a .deb file first. Let’s say you have downloaded Google Chrome. Go to the download directory and right click on the .deb file. In here, go to **properties**. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default.jpeg) - -In the properties, you should see the option of **open with**. Click on it and change it to GDebi. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default_Ubuntu.jpeg) - -Next time you double click on a .deb file, it will automatically open GDebi to install the .deb file. Indeed using such light applications is a good way to [speed up Ubuntu][2] or other Linux systems. - -What do you say? You still prefer Ubuntu Software Center for application installation or GDebi? Or if you are old school, [Synaptic Package Manager][3] perhaps? Which one is your favorite? - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/gdebi-default-ubuntu-software-center/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/app-grid-lighter-alternative-ubuntu-software-center/ -[2]:http://itsfoss.com/speed-up-ubuntu-1310/ -[3]:http://www.nongnu.org/synaptic/ \ No newline at end of file diff --git a/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md new file mode 100644 index 0000000000..603c20cfce --- /dev/null +++ b/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md @@ -0,0 +1,46 @@ +如何是 GDebi 代替 Ubuntu Software Center 成为默认的 deb 包安装器 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Make_GDebi_Default.jpeg) + +假如你使用 Ubuntu 或像 Elementary OS Freya 一样的基于 Ubuntu 的 Linux 发行版本,也许你使用 Ubuntu 软件中心 来安装 `.deb` 可执行文件。对于查找和安装应用, Ubuntu 软件中心 是一个很好的应用,但它会消耗很多资源且运行速度缓慢。这就是为什么我更偏爱使用 [App Grid,一个 Ubuntu 软件中心 的轻量替代品][1]。 + +现在,假如你只是尝试安装一个 `.deb` 文件, 我不会向你推荐 Ubuntu 软件中心 或 App Grid ,我的建议为 GDebi,一个安装 Debian 可执行文件的专用程序。它极其轻量,且专注于安装 `.deb` 文件。关于 GDebi 最好的功能是它也可以为你展示出将要安装的程序的依赖。 + +在这篇文章中,我们将见证 ** 如何安装 GDebi 和使用它代替 Ubuntu 软件中心 作为默认的安装器**。 + +### 在 Ubuntu 和其他 Linux 发行版本中安装 GDebi ### + +打开终端并使用下面的命令: + + sudo apt-get install gdebi + +### 使得 GDebi成为默认的 `.deb`包安装器 ### + +一旦你安装了 GDebi,就该是看看如何使它成为安装 `.deb` 文件的默认应用的时间了。请读者注意在这篇教程中 我使用的是 Elementary OS Freya ,但是下面的步骤对于所有基于 Ubuntu 的发行版本都是适用的。 + +首先下载一个 `.deb`文件。例如你已经下载了一个 Google Chrome 的 `.deb`包。进入下载目录并右击该 `.deb`文件。这里,接着选择 **属性**选项。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default.jpeg) + +在属性中,你应该可以看到 **打开方式** 选项。点击它并选择为 GDebi。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default_Ubuntu.jpeg) + +下次你双击一个 `.deb` 文件,将自动打开 GDebi 来安装`.deb` 文件。使用这样轻量的应用的确是一个[加速 Ubuntu][2] 或其他 Linux 系统的好方法。 + +你有什么意见呢?对于安装应用,你仍然偏爱于 Ubuntu 软件中心还是 GDebi 呢?抑或,假如你是一个守旧派,也许你更喜欢[[新立得软件包管理器(Synaptic Package Manager)][3]? 哪一个是你的最爱呢? + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/gdebi-default-ubuntu-software-center/ + +作者:[Abhishek][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/app-grid-lighter-alternative-ubuntu-software-center/ +[2]:http://itsfoss.com/speed-up-ubuntu-1310/ +[3]:http://www.nongnu.org/synaptic/ \ No newline at end of file From 2f309610bfe286651c9966a14f12f932f31408f9 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 22 Feb 2015 08:02:27 +0800 Subject: [PATCH 088/163] Update 20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 最后修改,确认翻译。 --- ...efault Instead of Ubuntu Software Center.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md index 603c20cfce..a8032e03ca 100644 --- a/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md +++ b/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md @@ -1,10 +1,10 @@ -如何是 GDebi 代替 Ubuntu Software Center 成为默认的 deb 包安装器 +如何使 GDebi 代替 Ubuntu Software Center 作为默认的 deb 包安装器 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Make_GDebi_Default.jpeg) -假如你使用 Ubuntu 或像 Elementary OS Freya 一样的基于 Ubuntu 的 Linux 发行版本,也许你使用 Ubuntu 软件中心 来安装 `.deb` 可执行文件。对于查找和安装应用, Ubuntu 软件中心 是一个很好的应用,但它会消耗很多资源且运行速度缓慢。这就是为什么我更偏爱使用 [App Grid,一个 Ubuntu 软件中心 的轻量替代品][1]。 +假如你使用 Ubuntu 或像 Elementary OS Freya 一样的基于 Ubuntu 的 Linux 发行版本,也许你使用 Ubuntu 软件中心 来安装 `.deb` 可执行文件。对于查找和安装应用, Ubuntu 软件中心 是一个很好的应用,但它会消耗很多资源且运行速度缓慢。这就是为什么我更偏爱使用 [App Grid,一个 Ubuntu 软件中心 的轻量替代品][1] 的原因。 -现在,假如你只是尝试安装一个 `.deb` 文件, 我不会向你推荐 Ubuntu 软件中心 或 App Grid ,我的建议为 GDebi,一个安装 Debian 可执行文件的专用程序。它极其轻量,且专注于安装 `.deb` 文件。关于 GDebi 最好的功能是它也可以为你展示出将要安装的程序的依赖。 +现在,假如你只是尝试安装一个 `.deb` 文件, 我不会向你推荐 Ubuntu 软件中心 或 App Grid ,我的建议为 GDebi,一个安装 Debian 可执行文件的专用程序。它极其轻量,且专注于安装 `.deb` 文件。关于 GDebi 最有用的功能是它也可以为你展示出将要安装的程序的依赖。 在这篇文章中,我们将见证 ** 如何安装 GDebi 和使用它代替 Ubuntu 软件中心 作为默认的安装器**。 @@ -14,11 +14,11 @@ sudo apt-get install gdebi -### 使得 GDebi成为默认的 `.deb`包安装器 ### +### 使得 GDebi 成为默认的 `.deb`包安装器 ### -一旦你安装了 GDebi,就该是看看如何使它成为安装 `.deb` 文件的默认应用的时间了。请读者注意在这篇教程中 我使用的是 Elementary OS Freya ,但是下面的步骤对于所有基于 Ubuntu 的发行版本都是适用的。 +一旦你安装了 GDebi,就该是看看如何使它成为安装 `.deb` 文件的默认应用的时刻了。请读者注意在这篇教程中 我使用的是 Elementary OS Freya ,但下面的步骤对于所有基于 Ubuntu 的发行版本都是适用的。 -首先下载一个 `.deb`文件。例如你已经下载了一个 Google Chrome 的 `.deb`包。进入下载目录并右击该 `.deb`文件。这里,接着选择 **属性**选项。 +首先下载一个 `.deb`文件。例如你已经下载了一个 Google Chrome 的 `.deb`包。进入下载目录并右击该 `.deb`文件。在这里,接着选择 **属性**选项。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default.jpeg) @@ -26,9 +26,9 @@ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default_Ubuntu.jpeg) -下次你双击一个 `.deb` 文件,将自动打开 GDebi 来安装`.deb` 文件。使用这样轻量的应用的确是一个[加速 Ubuntu][2] 或其他 Linux 系统的好方法。 +这样下次你双击一个 `.deb` 文件,便会自动打开 GDebi 来安装这个`.deb` 文件。使用这样轻量的应用的确是一个[加速 Ubuntu][2] 或其他 Linux 系统的好方法。 -你有什么意见呢?对于安装应用,你仍然偏爱于 Ubuntu 软件中心还是 GDebi 呢?抑或,假如你是一个守旧派,也许你更喜欢[[新立得软件包管理器(Synaptic Package Manager)][3]? 哪一个是你的最爱呢? +你有什么意见呢?对于安装应用,你仍然偏爱于 Ubuntu 软件中心 还是 GDebi 呢?抑或,假如你是一个守旧派,也许你更喜欢 [新立得软件包管理器(Synaptic Package Manager)][3]? 哪一个是你的最爱呢? -------------------------------------------------------------------------------- @@ -43,4 +43,4 @@ via: http://itsfoss.com/gdebi-default-ubuntu-software-center/ [a]:http://itsfoss.com/author/abhishek/ [1]:http://itsfoss.com/app-grid-lighter-alternative-ubuntu-software-center/ [2]:http://itsfoss.com/speed-up-ubuntu-1310/ -[3]:http://www.nongnu.org/synaptic/ \ No newline at end of file +[3]:http://www.nongnu.org/synaptic/ From 2d0ca99ca21473467fa83eafc723e20a5771bb88 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Sun, 22 Feb 2015 08:18:30 +0800 Subject: [PATCH 089/163] [Translating] 20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md --- ...11 Useful Utilities To Supercharge Your Ubuntu Experience.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md b/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md index e947762b7c..928778fc4b 100644 --- a/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md +++ b/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md @@ -1,3 +1,5 @@ +Translating by FSSlc + 11 Useful Utilities To Supercharge Your Ubuntu Experience ================================================================================ **Whether you’re a relative novice or a seasoned pro, we all want to get the most from our operating system. Ubuntu, like most modern OSes, has more to offer than what is presented at first blush.** From 81b5755ebd49efdeeb5b63b53669ed63c8c02747 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 22 Feb 2015 14:01:32 +0800 Subject: [PATCH 090/163] translating --- sources/tech/20150225 How to Hide PHP Version in Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150225 How to Hide PHP Version in Linux.md b/sources/tech/20150225 How to Hide PHP Version in Linux.md index ddc219bac1..edd042e8f2 100644 --- a/sources/tech/20150225 How to Hide PHP Version in Linux.md +++ b/sources/tech/20150225 How to Hide PHP Version in Linux.md @@ -1,3 +1,5 @@ +Translating----geekpi + How to Hide PHP Version in Linux ================================================================================ In general, most of the web server software has been installed with default settings that will lead to information leakage. One of them is a PHP software. PHP (Hypertest Preprocessor) is one of the most popular server-side HTML embedded scripting language for the websites today. In the current challenging times, there are lots of attacker will try to discover the weaknesses in your your server system. Hence, i will describe the simple way to hide the PHP information in Linux server. @@ -53,4 +55,4 @@ via: http://www.ehowstuff.com/how-to-hide-php-version-in-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.ehowstuff.com/author/mhstar/ -[1]:http://www.ehowstuff.com/archives/ \ No newline at end of file +[1]:http://www.ehowstuff.com/archives/ From 972a0dcc68cd2ebf3c195141f3911adc8cebb91f Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 22 Feb 2015 14:18:51 +0800 Subject: [PATCH 091/163] translated --- ...0150225 How to Hide PHP Version in Linux.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) rename {sources => translated}/tech/20150225 How to Hide PHP Version in Linux.md (53%) diff --git a/sources/tech/20150225 How to Hide PHP Version in Linux.md b/translated/tech/20150225 How to Hide PHP Version in Linux.md similarity index 53% rename from sources/tech/20150225 How to Hide PHP Version in Linux.md rename to translated/tech/20150225 How to Hide PHP Version in Linux.md index edd042e8f2..1634ff2af2 100644 --- a/sources/tech/20150225 How to Hide PHP Version in Linux.md +++ b/translated/tech/20150225 How to Hide PHP Version in Linux.md @@ -1,18 +1,16 @@ -Translating----geekpi - -How to Hide PHP Version in Linux +如何在Linux中隐藏PHP版本 ================================================================================ -In general, most of the web server software has been installed with default settings that will lead to information leakage. One of them is a PHP software. PHP (Hypertest Preprocessor) is one of the most popular server-side HTML embedded scripting language for the websites today. In the current challenging times, there are lots of attacker will try to discover the weaknesses in your your server system. Hence, i will describe the simple way to hide the PHP information in Linux server. +通常上,大多数默认设置安装的web服务器存在信息泄露。这其中之一是PHP。PHP(超文本预处理器)是如今流行的服务端html嵌入式语言。在如今这个充满挑战的时代,有许多攻击者会尝试发现你服务端的漏洞。因此,我会简单描述如何在Linux服务器中隐藏PHP信息。 -By default **expose_php** is set to On. Turning off the “expose_php” parameter causes that PHP will hide it version details. +默认上**exposr_php**默认是开的。关闭“expose_php”参数可以使php隐藏它的版本信息。 [root@centos66 ~]# vi /etc/php.ini -In your php.ini, locate the line containing expose_php On and set it to Off: +在你的php.ini, 定位到含有expose_php的那行把On设成Off: expose_php = Off -Before the changes, web server header will look like below : +在此之前,web服务器头看上去就像这样: [root@centos66 ~]# curl -I http://www.ehowstuff.com/ @@ -28,7 +26,7 @@ Before the changes, web server header will look like below : X-Page-Speed: 1.9.32.2-4321 Cache-Control: max-age=0, no-cache -After the changes, PHP will no longer show the version to the web server header : +更改之后,php就不会在web服务头中显示版本了: [root@centos66 ~]# curl -I http://www.ehowstuff.com/ @@ -42,14 +40,14 @@ Date: Wed, 11 Feb 2015 14:10:43 GMT X-Page-Speed: 1.9.32.2-4321 Cache-Control: max-age=0, no-cache -As always if you need any help you can reach us on twitter @ehowstuff or drop us a comment below. [Jumping through archives page to read more articles..][1] +有任何需要帮助的请到twiiter @ehowstuff,或在下面留下你的评论。[点此获取更多历史文章][1] -------------------------------------------------------------------------------- via: http://www.ehowstuff.com/how-to-hide-php-version-in-linux/ 作者:[skytech][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9587a9d871f240274f53b3c8285ca512d230662e Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Feb 2015 21:25:44 +0800 Subject: [PATCH 092/163] PUB:20150122 Linux FAQs with Answers--How to add a cron job on Linux @geekpi --- ...s with Answers--How to add a cron job on Linux.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md (81%) diff --git a/translated/tech/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md b/published/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md similarity index 81% rename from translated/tech/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md rename to published/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md index 6f0a5effe3..70326e249f 100644 --- a/translated/tech/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md +++ b/published/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md @@ -2,7 +2,7 @@ Linux 有问必答: 如何在Linux中加入cron任务 ================================================================================ > **提问**: 我想在我的Linux中安排一个计划任务,该任务在固定时间周期性地运行。我该如何在Linux中添加一个cron任务? -cron是Linux中默认的计划任务。使用cron,你可以安排一个计划(比如:命令或者shell脚本)周期性地运行或者在指定的小时、天、周、月等特定时间运行。cron在你安排不同的常规维护任务时是很有用的,比如周期性地备份、日志循环、检查文件系统、监测磁盘空间等等。 +cron是Linux中默认的计划任务。使用cron,你可以安排一个计划(比如:命令或者shell脚本)周期性地运行或者在指定的分钟、小时、天、周、月等特定时间运行。cron在你安排不同的常规维护任务时是很有用的,比如周期性地备份、日志循环、检查文件系统、监测磁盘空间等等。 ### 从命令行中添加cron任务 ### @@ -22,7 +22,7 @@ cron是Linux中默认的计划任务。使用cron,你可以安排一个计划 每个cron任务的格式如下。 - + <分钟> <小时> <日> <月> <星期> <命令> 前5个元素定义了任务的计划,最后一个元素是命令或者脚本的完整路径。 @@ -30,13 +30,13 @@ cron是Linux中默认的计划任务。使用cron,你可以安排一个计划 下面是一些cron任务示例。 -- *** * * * * /home/dan/bin/script.sh**: 每分钟运行。 +- **\* * * * * /home/dan/bin/script.sh**: 每分钟运行。 - **0 * * * * /home/dan/bin/script.sh**: 每小时运行。 -- **0 0 * * * /home/dan/bin/script.sh**: 每12小时运行。 +- **0 0 * * * /home/dan/bin/script.sh**: 每天零点运行。 - **0 9,18 * * * /home/dan/bin/script.sh**: 在每天的9AM和6PM运行。 - **0 9-18 * * * /home/dan/bin/script.sh**: 在9AM到6PM的每个小时运行。 - **0 9-18 * * 1-5 /home/dan/bin/script.sh**: 周一到周五的9AM到6PM每小时运行。 -- ***/10 * * * * /home/dan/bin/script.sh**: 每10分钟运行。 +- **\*/10 * * * * /home/dan/bin/script.sh**: 每10分钟运行。 一旦完成上面的设置步骤后,按下Ctrl+X来保存并退出编辑器。此时,新增的计划任务应该已经激活了。 @@ -61,6 +61,6 @@ cron是Linux中默认的计划任务。使用cron,你可以安排一个计划 via: http://ask.xmodulo.com/add-cron-job-linux.html 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file From b9a3c78bc580d3b2de80dc4a885e1504be8d4553 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Feb 2015 22:03:48 +0800 Subject: [PATCH 093/163] PUB:20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x @geekpi --- ...sing nmcli Tool in RedHat or CentOS 7.x.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md (73%) diff --git a/translated/tech/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md b/published/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md similarity index 73% rename from translated/tech/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md rename to published/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md index 10c19b2d92..62bb475206 100644 --- a/translated/tech/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md +++ b/published/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md @@ -10,7 +10,7 @@ nmcli的通常语法是: # nmcli [ OPTIONS ] OBJECT { COMMAND | help } -一件很酷的事情是你可以使用tab键来补全操作,这样你在何时忘记了语法你都可以用tab来看到可用的选项了。 +一件很酷的事情是你可以使用tab键来补全操作,这样你在何时忘记了语法你都可以按下tab来看到可用的选项了。 ![nmcli tab](http://blog.linoxide.com/wp-content/uploads/2014/12/nmcli-tab.jpg) @@ -46,33 +46,33 @@ nmcli通常用法的一些例子: # nmcli device connect eno16777736 -### 使用静态IP添加一个以太网连接 ### +### 添加一个使用静态IP的以太网连接 ### 要用静态IP添加一个以太网连接可以使用下面的命令: - # nmcli connection add type ethernet con-name NAME_OF_CONNECTION ifname interface-name ip4 IP_ADDRESS gw4 GW_ADDRESS + # nmcli connection add type ethernet con-name NAME_OF_CONNECTION ifname INTERFACE-NAME ip4 IP_ADDRESS gw4 GW_ADDRESS -将NAME_OF_CONNECTION替换成新的连接名,IP_ADDRESS替换成你要的IP地址,GW_ADDRESS替换成你使用的网关地址(如果你并不使用网关,你可以忽略这部分)。 +将NAME_OF_CONNECTION替换成新的连接名(LCTT 译注:这个名字以后可以用来对其操作,可以使用任何简单明了的名称),INTERFACE-NAME 替换成你的接口名,IP_ADDRESS替换成你要的IP地址,GW_ADDRESS替换成你使用的网关地址(如果你并不使用网关,你可以忽略这部分)。 - # nmcli connection add type ethernet con-name NEW ifname eno16777736 ip4 192.168.1.141 gw4 192.168.1.1 + # nmcli connection add type ethernet con-name NEW_STATIC ifname eno16777736 ip4 192.168.1.141 gw4 192.168.1.1 -=要设置这个连接的DNS服务器使用下面的命令: +要设置这个连接所使用的DNS服务器使用下面的命令: - # nmcli connection modify NEW ipv4.dns "8.8.8.8 8.8.4.4" + # nmcli connection modify NEW_STATIC ipv4.dns "8.8.8.8 8.8.4.4" 要启用新的以太网连接,使用下面的命令: - # nmcli connection up NEW ifname eno16777736 + # nmcli connection up NEW_STATIC ifname eno16777736 要查看新配置连接的详细信息,使用下面的命令: - # nmcli -p connection show NEW + # nmcli -p connection show NEW_STATIC ![nmcli add static](http://blog.linoxide.com/wp-content/uploads/2014/12/nmcli-add-static.jpg) ### 添加一个使用DHCP的连接 ### -如果你想要添加一个使用DHCP来配置接口IP地址、网关地址和dns服务器地址的新的连接,你要做的就是忽略命令中的ip/gw部分,NetworkManager会自动使用DHCP来获取配置细节。 +如果你想要添加一个使用DHCP来配置接口IP地址、网关地址和dns服务器地址的新的连接,你要做的就是忽略上述命令中的ip/gw部分,NetworkManager会自动使用DHCP来获取配置细节。 比如,要创建一个新的叫NEW_DHCP的DHCP连接,在设备eno16777736上你可以使用下面的命令: @@ -84,7 +84,7 @@ via: http://linoxide.com/linux-command/nmcli-tool-red-hat-centos-7/ 作者:[Adrian Dinu][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7055871c69fc31e8bbc3cb69a5eeb3c43b2e64ab Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Feb 2015 22:49:54 +0800 Subject: [PATCH 094/163] PUB:20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror @FSSlc --- ...l Repository in Ubuntu using APT-mirror.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md (65%) diff --git a/translated/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md b/published/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md similarity index 65% rename from translated/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md rename to published/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md index c49b52c461..dc9d72ef77 100644 --- a/translated/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md +++ b/published/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md @@ -1,16 +1,16 @@ -在 Ubuntu中使用 APT-mirror 简单四步配置本地软件仓库 +使用 APT-mirror 四步配置 Ubuntu 本地软件仓库 ================================================================================ -今天,我们将向你展示如何在你的 Ubuntu 个人电脑 或 Ubuntu 服务器 中,直接通过 Ubuntu 官方软件仓库来配置本地软件仓库。在你的电脑中创建一个本地软件仓库有着许多的好处。假如你有许多电脑需要安装软件,安全升级和修复,那么配置一个本地软件仓库是一个高效的方法。因为,所有需要安装的软件包都可以通过快速局域网连接从你的本地服务器中下载,这样可以节省你的网络带宽,降低互联网的年度开支 ... +今天,我们将向你展示如何在你的 Ubuntu 个人电脑或 Ubuntu 服务器中,直接通过 Ubuntu 官方软件仓库来配置本地软件仓库。在你的电脑中创建一个本地软件仓库有着许多的好处。假如你有许多电脑需要安装软件 、安全升级和修复补丁,那么配置一个本地软件仓库是一个做这些事情的高效方法。因为,所有需要安装的软件包都可以通过快速的局域网连接从你的本地服务器中下载,这样可以节省你的网络带宽,降低互联网接入的年度开支 ... -你可以使用多种工具在你的本地个人电脑或服务器中配置一个 Ubuntu 的本地软件仓库,但在本教程中,我们将为你介绍 APT-Mirror。这里,我们将把默认的镜像包镜像到 我们本地的服务器或个人电脑中,并且在本地或外置硬盘中,我们至少需要 **120 GB** 或更多的可用空间。 上面的任务可以通过配置一个 **HTTP** 或 **FTP** 服务器来 与本地系统客户端共享软件包。 +你可以使用多种工具在你的本地个人电脑或服务器中配置一个 Ubuntu 的本地软件仓库,但在本教程中,我们将为你介绍 APT-Mirror。这里,我们将把默认的镜像包镜像到我们本地的服务器或个人电脑中,并且在你的本地或外置硬盘中,我们至少需要 **120 GB** 或更多的可用空间才行。 我们可以通过配置一个 **HTTP** 或 **FTP** 服务器来与本地系统客户端共享这个软件仓库。 我们需要安装 Apache 网络服务器和 APT-Mirror 来使得我们的工作得以开始。下面是配置一个可工作的本地软件仓库的步骤: ### 1. 安装需要的软件包 ### -首先,我们需要从 Ubuntu 的公共软件包仓库中取得所有的软件包,然后在我们本地的 Ubuntu 服务器硬盘中保存它们。 +我们需要从 Ubuntu 的公共软件包仓库中取得所有的软件包,然后在我们本地的 Ubuntu 服务器硬盘中保存它们。 -首先我们安装一个网络服务器来承载我们的本地软件仓库。这里我们将安装 Apache 网络服务器,但你可以安装任何你中意的网络服务器,对于 http 协议,网络服务器是必须的。假如你需要配置 ftp 协议 及 rsync 协议,你还可以再分别额外安装 FTP 服务器,如 proftpd, vsftpd 等等 和 Rsync 。 +首先我们安装一个Web 服务器来承载我们的本地软件仓库。这里我们将安装 Apache Web 服务器,但你可以安装任何你中意的 Web 服务器。对于 http 协议,Web 服务器是必须的。假如你需要配置 ftp 协议 及 rsync 协议,你还可以再分别额外安装 FTP 服务器,如 proftpd, vsftpd 等等 和 Rsync 。 $ sudo apt-get install apache2 @@ -70,21 +70,21 @@ ![mirror-list-config](http://blog.linoxide.com/wp-content/uploads/2014/12/mirror-list-config.png) -**注: 你可以将上面的官方镜像服务器网址更改为离你最近的服务器的网址,而这可以访问 [Ubuntu Mirror Server][1]来得到。假如你并不着急并可以等待镜像的完成,你可以沿用默认的官方镜像服务器网址。** +**注: 你可以将上面的官方镜像服务器网址更改为离你最近的服务器的网址,可以通过访问 [Ubuntu Mirror Server][1]来找到这些服务器地址。假如你并不太在意镜像完成的时间,你可以沿用默认的官方镜像服务器网址。** -这里,我们将要镜像 最新和最大的 Ubuntu LTS 发行版 --- 即 Ubuntu 14.04 LTS (Trusty Tahr) --- 的软件包仓库,所以在上面的配置中发行版本号为 trusty 。假如我们需要镜像 Saucy 或其他的 Ubuntu 发行版本,请修改上面的 trusy 为相应的代号。 +这里,我们将要镜像最新和最大的 Ubuntu LTS 发行版 --- 即 Ubuntu 14.04 LTS (Trusty Tahr) --- 的软件包仓库,所以在上面的配置中发行版本号为 trusty 。假如我们需要镜像 Saucy 或其他的 Ubuntu 发行版本,请修改上面的 trusy 为相应的代号。 -现在,我们必须运行 apt-mirror 来下载或镜像 官方仓库中的所有软件包。 +现在,我们必须运行 apt-mirror 来下载或镜像官方仓库中的所有软件包。 sudo apt-mirror -从 Ubuntu 服务器中下载所有的软件包所花费的时间取决于 你和镜像服务器之间的网络连接速率和性能。我已经中断了下载,因为我已经下载好了 ... +从 Ubuntu 服务器中下载所有的软件包所花费的时间取决于你和镜像服务器之间的网络连接速率和性能。这里我中断了下载,因为我已经下载好了 ... ![downloading-packages](http://blog.linoxide.com/wp-content/uploads/2014/12/downloading-index.png) ### 3.配置网络服务器 ### -为了使得其他的电脑能够取得这个软件仓库,你需要一个网络服务器。你也可以通过 ftp 来完成这件事,但我选择使用一个网络服务器因为在上面的步骤 1 中我提及到使用网络服务器。因此,我们现在要对 Apache 服务器进行配置: +为了使得其他的电脑能够访问这个软件仓库,你需要一个Web服务器。你也可以通过 ftp 来完成这件事,但我选择使用一个Web服务器因为在上面的步骤 1 中我提及到使用Web服务器。因此,我们现在要对 Apache 服务器进行配置: 我们将为我们本地的软件仓库目录 建立一个到 Apache 托管目录 --- 即 `/var/www/ubuntu` --- 的符号链接。 @@ -105,7 +105,7 @@ deb http://192.168.0.100/ubuntu/ trusty main restricted universe -**注: 这里的 192.168.0.100 是我们的服务器电脑的 局域网 IP 地址,你需要替换为你的服务器电脑的局域网 IP 地址** +**注: 这里的 192.168.0.100 是我们的服务器电脑的局域网 IP 地址,你需要替换为你的服务器电脑的局域网 IP 地址** $ sudo apt-get update @@ -117,7 +117,7 @@ via: http://linoxide.com/ubuntu-how-to/setup-local-repository-ubuntu/ 作者:[Arun Pyasi][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From c51591e9a20e3bcbc3fd51fb03f9a3156771aa03 Mon Sep 17 00:00:00 2001 From: coloka Date: Mon, 23 Feb 2015 08:31:19 +0800 Subject: [PATCH 095/163] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E3=80=9120150121=20How=20to=20apply=20image=20effects?= =?UTF-8?q?=20to=20pictures=20on=20Raspberry=20Pi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...age effects to pictures on Raspberry Pi.md | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md b/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md index 6f97f3454e..f767522855 100644 --- a/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md +++ b/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md @@ -1,13 +1,12 @@ -Translating by coloka -How to apply image effects to pictures on Raspberry Pi +如何在树莓派上使用图片特效 ================================================================================ -Like a common pocket camera which has a built-in function to add various effects on captured photos, [Raspberry Pi camera board][1] ("raspi cam") can actually do the same. With the help of raspistill camera control options, we can add the image effects function like we have in a pocket camera. +现在使用[树莓派摄像头模组][1]("raspi cam"),也可以像使用卡片相机那样,给拍摄的照片增加各种各样的图片特效。 raspistill命令行工具,为您的树莓派提供了丰富的图片特效选项,来美化处理你的图片。 -There are [three comman-line applications][2] which can be utilized for [taking videos or pictures][3] with raspi cam, and one of them is the raspistill application. The raspistill tool offers various camera control options such as sharpness, contrast, brightness, saturation, ISO, exposure, automatic white balance (AWB), image effects. +你可以用[这3个命令行工具][2]来[抓取raspicam拍摄的照片或者视频][3],在这文章中将重点介绍其中的raspstill工具。raspstill工具提供了丰富的控制选项来处理图片,比如说:锐度(sharpness)、对比度(contrast)、亮度(brightness)、饱和度(saturation)、ISO、自动白平衡(AWB)、以及图片特效(image effect)等。 -In this article I will show how to apply exposure, AWB, and other image effects with raspistill while capturing pictures using raspi cam. To automate the process, I wrote a simple Python script which takes pictures and automatically applies a series of image effects to the pictures. The raspi cam documentation describes available types of the exposure, AWB, and image effects. In total, the raspi cam offers 16 types of image effects, 12 types of exposure, and 10 types of AWB values. +在这篇文章中,将介绍如何使用raspstill工具以及raspicam摄像头模组来控制照片的曝光、AWB以及其他的图片效果。我写了一个简单的python脚本来自动拍摄照片并在这些照片上自动应用各种图片特效。raspicam的帮助文档中介绍了该摄像头模组所支持的曝光模式、AWB和图片特效。总的来说,raspicam一共支持16种图片特效、12种曝光模式以及10种AWB选项。 -The simple Python script looks like the following. +Python脚本很简单,如下所示 。 #!/usb/bin/python import os @@ -30,32 +29,34 @@ The simple Python script looks like the following. The Python script operates as follows. First, create three array/list variable for the exposure, AWB and image effects. In the example, we use 2 types of exposure, 3 types of AWB, and 13 types of image effects values. Then make nested loops for applying the value of the three variables that we have. Inside the nested loop, execute the raspistill application. We specify (1) the output filename; (2) exposure value; (3) AWB value; (4) image effect value; (5) the time to take a photo, which is set to 1 second; and (6) the size of the photo, which is set to 640x480px. This Python script will create 78 different versions of a captured photo with a combination of 2 types of exposure, 3 types of AWB, and 13 types of image effects. -To execute the Python script, simply type: +这个脚本完成了以下几个工作。首先,脚本中定义了3个列表,分别用于枚举曝光模式、AWB模式以及图片特效。在这个实例中,我们将使用到2种曝光模式、3种AWB模式以及13种图片特效。脚本会遍历上述3种选项的各种组合,并使用这些参数组合来运行raspistill工具。传入的参数共6个,分别为:(1)输出文件名;(2)曝光模式;(3)AWB模式;(4)图片特效模式;(5)拍照时间,设为1秒;(6)图片尺寸,设为640x480。脚本会自动拍摄78张照片,每张照片会应用不同的特效参数。 + +执行这个脚本也很简单,只需键入下面的命令行: $ python name_of_this_script.py -Here is the first round of the sample result. +下面是抓取到一些样张。 ![](https://farm8.staticflickr.com/7483/16134215939_c93291158a_c.jpg) -### Bonus ### +### 小福利 ### -For those who are more interested, there is another way to access and control the raspi cam besides raspistill. [Picamera][4] a pure Python interface which provides APIs for accessing and controlling raspi cam, so that one can build a complex program for utilizing raspi cam according to their needs. If you are skilled at Python, picamera is a good feature-complete interface for implementing your raspi cam project. The picamera interface is included by default in the recent image of Raspbian. If your [Raspberry Pi][5] operating system is not new or not Raspbian, you can install it on your system as follows. +除了使用raspistill命令行工具来操控raspicam摄像模组以外,还有其他的方法可以用哦。[Picamera][4]是一个python库,它提供了操控raspicam摄像模组的的API接口,这样就可以便捷地构建更加复杂的应用程序。如果你精通python,那么picamera一定是你项目的好伙伴。picamera已经被默认集成到Raspbian最新版本的的镜像中。当然,如果你用的不是最新的Raspbian或者是使用其他的操作系统版本,你可以通过下面的方法来进行手动安装。 -First, install pip on your system by following [this guideline][6]. +首先,先在你的系统上安装pip,详见[指导][6]。 -Then, install picamera as follows. +然后,就可以按下面的方法安装picamera。 $ sudo pip install picamera -Refer to the [official documentation][7] on how to use picamera. +picamera的使用说明可以查阅[官方文档][7]。 -------------------------------------------------------------------------------- via: http://xmodulo.com/apply-image-effects-pictures-raspberrypi.html 作者:[Kristophorus Hadiono][a] -译者:[译者ID](https://github.com/译者ID) +译者:[coloka](https://github.com/coloka) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a160ee09c0f6db64360b0d26dd59afa24a39b5a4 Mon Sep 17 00:00:00 2001 From: coloka Date: Mon, 23 Feb 2015 08:36:00 +0800 Subject: [PATCH 096/163] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=EF=BC=8Csource=20->=20translated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0121 How to apply image effects to pictures on Raspberry Pi.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md (100%) diff --git a/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md b/translated/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md similarity index 100% rename from sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md rename to translated/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md From 1a033c8cd8091ea6209ce14dfb8e0e53b6515e82 Mon Sep 17 00:00:00 2001 From: coloka Date: Mon, 23 Feb 2015 08:51:22 +0800 Subject: [PATCH 097/163] [translating]20150112 What are useful command-line network monitors on Linux.md --- ...112 What are useful command-line network monitors on Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150112 What are useful command-line network monitors on Linux.md b/sources/tech/20150112 What are useful command-line network monitors on Linux.md index f17e45cbf4..eeda3f0542 100644 --- a/sources/tech/20150112 What are useful command-line network monitors on Linux.md +++ b/sources/tech/20150112 What are useful command-line network monitors on Linux.md @@ -1,3 +1,4 @@ +translating by coloka What are useful command-line network monitors on Linux ================================================================================ Network monitoring is a critical IT function for businesses of all sizes. The goal of network monitoring can vary. For example, the monitoring activity can be part of long-term network provisioning, security protection, performance troubleshooting, network usage accounting, and so on. Depending on its goal, network monitoring is done in many different ways, such as performing packet-level sniffing, collecting flow-level statistics, actively injecting probes into the network, parsing server logs, etc. From 91abf8ba733b044a0636c5fbeb973f1c417e7315 Mon Sep 17 00:00:00 2001 From: martin qi Date: Tue, 24 Feb 2015 15:04:08 +0800 Subject: [PATCH 098/163] Update and rename translated/tech to translated/tech/20150215 How to share files between computers over network with btsync.md --- ...ween computers over network with btsync.md | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 translated/tech/20150215 How to share files between computers over network with btsync.md diff --git a/translated/tech/20150215 How to share files between computers over network with btsync.md b/translated/tech/20150215 How to share files between computers over network with btsync.md new file mode 100644 index 0000000000..7155f789bf --- /dev/null +++ b/translated/tech/20150215 How to share files between computers over network with btsync.md @@ -0,0 +1,137 @@ +如何使用btsync通过网络实现电脑间文件共享 +================================================================================ +如果你是使用各式设备在网上工作的这类人,我相信你肯定需要一个在不同设备间同步文件及目录的方法,至少是非常渴望有这种功能。 + +BitTorrent Sync简称btsync,是一个基于BitTorrent(著名P2P文件分享协议)的免费跨平台同步工具。与传统BitTorrent客户端不同的是btsync用于传输加密和访问授权的是不同操作系统及设备中自动生成的键。 + +更具体点,当你想要通过btsync共享一些文件或文件夹,相应的读/写键(所谓的秘密编码)已经创建。这些键将会通过不同的途径例如HTTPS链接,电子邮件,二维码等被分享。一旦两台设备通过一个键配对成功,链接内容将会直接在其间同步。如果没有事先设置,传输将不会有文件大小和速度的限制。你可以在btsync中创建账号,以此来创建和管理通过网络分享的键和文件。 + +BitTorrent Sync可以在许多的操作系统上运行,包括Linux,MacOS X,Windows,在 [Android][1]和[iOS][2]上也可以使用。在这里,我们将教你在Linux环境(一台家用服务器)与Windows环境(一台笔记本电脑)之间如何使用BitTorrent Sync来同步文件。 + +### Linux下安装btsync ### + +BitTorrent Sync可以在[项目主页][3]直接下载。由于Windows版本的BitTorrent Syn安装起来十分简单,所以我们假设笔记本上已经安装了。我们把焦点放到Linux服务器上的安装和配置。 + +在下载页面中选择你的系统架构,右键相应链接,选择复制连接地址(或者简单的依靠浏览器判断),将链接粘贴到在终端中用wget下载,如下: + +**64位Linux:** + + # wget http://download.getsyncapp.com/endpoint/btsync/os/linux-x64/track/stable + +**32位Linux:** + + # wget http://download.getsyncapp.com/endpoint/btsync/os/linux-i386/track/stable + +![](https://farm9.staticflickr.com/8635/15895277773_8acf317e3c_c.jpg) + +下载完成后,把包中内容解压到你专门创建的目录中,为了完成这些: + + # cd /usr/local/bin + # mkdir btsync + # tar xzf stable -C btsync + +![](https://farm8.staticflickr.com/7306/16329173869_7dc8b64a39_b.jpg) + +现在你可以选择将/usr/local/bin/btsync添加到环境变量PATH中去。 + + export PATH=$PATH:/usr/local/bin/btsync + +或者在在该文件夹中运行btsync的二进制文件。我们推荐使用第一种方式,虽需要少量的输入但更容易记忆。 + +### 配置Btsync ### + +Btsync带有一个内置的网络服务器被用作其管理接口。想要使用这个接口你需要创建一个配置文件。你可以使用以下命令来创建: + + # btsync --dump-sample-config > btsync.config + +然后使用你最常用的编辑器对btsync.config文件的(webui部分)作以下修改 + + "listen" : "0.0.0.0:8888", + "login" : "yourusername", + "password" : "yourpassword" + +你可以选择任何用户名和密码。 + +![](https://farm9.staticflickr.com/8599/15895277793_da63841433_b.jpg) + +![](Feel free to check the README file in /usr/local/bin/btsync directory if you want to tweak the configuration further, but this will do for now.) + +### 第一次运行btsync ### + +作为一个系统的最高执行者我们需要依赖日志文件!所以在我们启动btsync之前,我们将先为btsync创建一个日志文件。 + + # touch /var/log/btsync.log + +最后,让我们开启btsync: + + # btsync --config /usr/local/bin/btsync/btsync.config --log /var/log/btsync.log + +![](https://farm8.staticflickr.com/7288/16327720298_ccf2cbedea_c.jpg) + +现在在你的浏览器中输入正在运行btsync监听的服务器IP地址和端口(我这是192.168.0.15:8888),同意隐私政策,条款和最终用户许可协议: + +![](https://farm9.staticflickr.com/8597/16327720318_d52551fc44_b.jpg) + +这样页面就会转到你安装的btsync主页: + +![](https://farm8.staticflickr.com/7412/16329544687_9a174527d8_c.jpg) + +点击添加文件夹并在你的文件系统中选择一个你想要分享的目录,在我们的例子中,我们使用的是/btsync: + +![](https://farm8.staticflickr.com/7407/16515452485_e25ded559f_b.jpg) + +现在这样就够了。在运行接下来的步骤之前,请先在Windows主机(或你想使用的其他Linux设备)上安装BitTorrent Sync。 + +### Btsync分享文件 ### + +下方的视频将会展示如何在安装Windows8的电脑[192.168.0.106]上分享现有的文件夹。在添加好想要同步的文件夹后,你会得到它的键,通过“Enter a key or link”菜单(上面的图已经展示过了)添加到你安装到的Linux机器上,并开始同步: + +注释:youtube视频 + + +现在用别的设备试试吧;找一个想要分享的文件夹或是一些文件,并通过Linux服务器的网络接口将键导入到你安装的“核心”btsync中。 + +### 使用常规用户开机自动运行btsync ### + +你们可能注意到了,视频中在同步文件时是使用'root'组的用户创建/btsync目录的。那是因为我们使用超级用户手动启动BitTorrent Sync的原因。在通常情况下,你会希望它开机自动使用无权限用户(www_data或是专门为此创建的账户,例如btsync)启动。 + +所以,我们创建了一个叫做btsync的用户,并在/etc/rc.local文件(exit 0行前)添加如下字段: + + sudo -u btsync /usr/local/bin/btsync/btsync --config /usr/local/bin/btsync/btsync.config --log /var/log/btsync.log + +最后,创建pid文件: + + # touch /usr/local/bin/btsync/.sync//sync.pid + +并递归更改/usr/local/bin/btsync的所属用户: + + # chown -R btsync:root /usr/local/bin/btsync + +现在重启试试,看看btsync是否正在由预期中的用户运行: +Now reboot and verify that btsync is running as the intended user: + +![](https://farm9.staticflickr.com/8647/16327988660_644f6d4505_c.jpg) + +基于你选择的发行版不同,你可能找到不同的方式来开机自启动btsync。在本教程中,我选择rc.local的方式是因为它在不同发行版中都可使用。 + +### 尾注 ### + +如你所见,BitTorrent Sync对你几乎就像一个无服务器的Dropbox。我说“几乎”的原因是:当你在局域网内同步数据时,同步在两个设备之间直接进行。然而如果你想要跨网段同步数据,并且你的设备可能要穿过防火墙的限制来配对,那就只能通过一个提供BitTorrent的第三方中继服务器来完成同步传输。虽然声称传输经过 [AES加密][4],你还是可能遇到不想放生的状况。为了你的隐私着想,务必在你共享的每个文件夹中关掉中继/跟踪选项。 + +希望这些对你有用!分享愉快! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/share-files-between-computers-over-network.html + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:https://play.google.com/store/apps/details?id=com.bittorrent.sync +[2]:https://itunes.apple.com/us/app/bittorrent-sync/id665156116 +[3]:http://www.getsync.com/ +[4]:http://www.getsync.com/tech-specs From 0ed13ca5b50fbf5836b62679220400763c97a418 Mon Sep 17 00:00:00 2001 From: martin qi Date: Tue, 24 Feb 2015 15:07:19 +0800 Subject: [PATCH 099/163] Delete 20150215 How to share files between computers over network with btsync.md --- ...ween computers over network with btsync.md | 138 ------------------ 1 file changed, 138 deletions(-) delete mode 100644 sources/tech/20150215 How to share files between computers over network with btsync.md diff --git a/sources/tech/20150215 How to share files between computers over network with btsync.md b/sources/tech/20150215 How to share files between computers over network with btsync.md deleted file mode 100644 index e892f2bb55..0000000000 --- a/sources/tech/20150215 How to share files between computers over network with btsync.md +++ /dev/null @@ -1,138 +0,0 @@ -translating by martin. - -How to share files between computers over network with btsync -================================================================================ -If you are the type of person who uses several devices to work online, I'm sure you must be using, or at least wishing to use, a method for syncing files and directories among those devices. - -BitTorrent Sync, also known as btsync for short, is a cross-platform sync tool (freeware) which is powered by BitTorrent, the famous protocol for peer-to-peer (P2P) file sharing. Unlike classic BitTorrent clients, however, btsync encrypts traffic and grants access to shared files based on auto-generated keys across different operating system and device types. - -More specifically, when you add files or folder to btsync as shareable, corresponding read/write keys (so-called secret codes) are created. These keys are then shared among different devices via HTTPS links, emails, QR codes, etc. Once two devices are paired via a key, the linked content can be synced directly between them. There is no file size limit, and transfer speeds are never throttled unless you explicitly say so. You will be able to create accounts inside btsync, under which you can create and manage keys and files to share via web interface. - -BitTorrent Sync is available on multiple operating systems including Linux, MacOS X, Windows, as well as [Android][1] and [iOS][2]. In this tutorial, I will show you how to use BitTorrent Sync to sync files between a Linux box (a home server), and a Windows machine (a work laptop). - -### Installing Btsync on Linux ### - -BitTorrent Sync is available for download from the [project's website][3]. I assume that the Windows version of BiTorrent Sync is installed on a Windows laptop, which can be done very easily. I will focus on installing and configuring it on the Linux server. - -In the download page, choose your architecture, right click on the corresponding link, choose Copy link location (or similar, depending on your browser), and paste the link to wget in your terminal, as follows: - -**For 64-bit Linux:** - - # wget http://download.getsyncapp.com/endpoint/btsync/os/linux-x64/track/stable - -**For 32-bit Linux:** - - # wget http://download.getsyncapp.com/endpoint/btsync/os/linux-i386/track/stable - -![](https://farm9.staticflickr.com/8635/15895277773_8acf317e3c_c.jpg) - -Once the download has completed, extract the contents of the tarball into a directory specially created for that purpose: - - # cd /usr/local/bin - # mkdir btsync - # tar xzf stable -C btsync - -![](https://farm8.staticflickr.com/7306/16329173869_7dc8b64a39_b.jpg) - -You can now either add /usr/local/bin/btsync to your PATH environment variable. - - export PATH=$PATH:/usr/local/bin/btsync - -or run the btsync binary right from that folder. We'll go with the first option as it requires less typing and is easier to remember. - -### Configuring Btsync ### - -Btsync comes with a built-in web server which is used as the management interface for BitTorrent Sync. To be able to access the web interface, you need to create a configuration file. You can do that with the following command: - - # btsync --dump-sample-config > btsync.config - -Then edit the btsync.config file (webui section) with your preferred text editor, as follows: - - "listen" : "0.0.0.0:8888", - "login" : "yourusername", - "password" : "yourpassword" - -You can choose any username and password. - -![](https://farm9.staticflickr.com/8599/15895277793_da63841433_b.jpg) - -![](Feel free to check the README file in /usr/local/bin/btsync directory if you want to tweak the configuration further, but this will do for now.) - -### Running Btsync for the First Time ### - -As system administrators we believe in logs! So before we launch btsync, we will create a log file for btsync. - - # touch /var/log/btsync.log - -Finally it's time to start btsync: - - # btsync --config /usr/local/bin/btsync/btsync.config --log /var/log/btsync.log - -![](https://farm8.staticflickr.com/7288/16327720298_ccf2cbedea_c.jpg) - -Now point your web browser to the IP address of the Linux server and the port where btsync is listening on (192.168.0.15:8888 in my case), and agree to the privacy policies, terms, and EULA: - -![](https://farm9.staticflickr.com/8597/16327720318_d52551fc44_b.jpg) - -and you will be taken to the home page of your btsync installation: - -![](https://farm8.staticflickr.com/7412/16329544687_9a174527d8_c.jpg) - -Click on Add a folder, and choose a directory in your file system that you want to share. In our example, we will use /btsync: - -![](https://farm8.staticflickr.com/7407/16515452485_e25ded559f_b.jpg) - -That's enough by now. Please install BitTorrent Sync on your Windows machine (or another Linux box, if you want) before proceeding. - -### Sharing Files with Btsync ### - -The following screencast shows how to sync an existing folder in a Windows 8 machine [192.168.0.106]. After adding the desired folder, get its key, and add it in your Linux installation via the "Enter a key or link" menu (as shown in the previous image), and the sync will start: - -注释:youtube视频 - - -Now repeat the process for other computers or devices; selecting a folder or files to share, and importing the corresponding key(s) in your "central" btsync installation via the web interface on your Linux server. - -### Auto-start Btsync as a Normal User ### - -You will notice that the synced files in the screencast were created in the /btsync directory belonging to user and group 'root'. That is because we launched BitTorrent Sync manually as the superuser. However, under normal circumstances, you will want to have BitTorrent Sync start on boot and running as a non-privileged user (www-data or other special account created for that purpose, btsync user for example). - -To do so, create a user called btsync, and add the following stanza to the /etc/rc.local file (before the exit 0 line): - - sudo -u btsync /usr/local/bin/btsync/btsync --config /usr/local/bin/btsync/btsync.config --log /var/log/btsync.log - -Finally, create the pid file: - - # touch /usr/local/bin/btsync/.sync//sync.pid - -and change the ownership of /usr/local/bin/btsync recursively: - - # chown -R btsync:root /usr/local/bin/btsync - -Now reboot and verify that btsync is running as the intended user: - -![](https://farm9.staticflickr.com/8647/16327988660_644f6d4505_c.jpg) - -Based on your chosen distribution, you may find other ways to enable btsync to start on boot. In this tutorial I chose the rc.local approach since it's distribution-agnostic. - -### Final Remarks ### - -As you can see, BitTorrent Sync is almost like server-less Dropbox for you. I said "almost" because of this: When you sync between devices on the same local network, sync happens directly between two devices. However, if you try to sync across different networks, and the devices to be paired are behind restrictive firewalls, there is a chance that the sync traffic goes through a third-party relay server operated by BitTorrent. While they claim that the traffic is [AES-encrypted][4], you may still not want this to happen. For your privacy, be sure to turn off relay/tracker server options in every folder that you are sharing. - -Hope it helps! Happy syncing! - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/share-files-between-computers-over-network.html - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/gabriel -[1]:https://play.google.com/store/apps/details?id=com.bittorrent.sync -[2]:https://itunes.apple.com/us/app/bittorrent-sync/id665156116 -[3]:http://www.getsync.com/ -[4]:http://www.getsync.com/tech-specs From 9253cce7079a609ed7366a41501b3bdb65d6200b Mon Sep 17 00:00:00 2001 From: martin qi Date: Tue, 24 Feb 2015 15:09:02 +0800 Subject: [PATCH 100/163] translated --- ...to share files between computers over network with btsync.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/translated/tech/20150215 How to share files between computers over network with btsync.md b/translated/tech/20150215 How to share files between computers over network with btsync.md index 7155f789bf..c6cd7051c4 100644 --- a/translated/tech/20150215 How to share files between computers over network with btsync.md +++ b/translated/tech/20150215 How to share files between computers over network with btsync.md @@ -54,8 +54,6 @@ Btsync带有一个内置的网络服务器被用作其管理接口。想要使 ![](https://farm9.staticflickr.com/8599/15895277793_da63841433_b.jpg) -![](Feel free to check the README file in /usr/local/bin/btsync directory if you want to tweak the configuration further, but this will do for now.) - ### 第一次运行btsync ### 作为一个系统的最高执行者我们需要依赖日志文件!所以在我们启动btsync之前,我们将先为btsync创建一个日志文件。 From 6c741a8f1ff7a1420723d2025e830b0bb6b79649 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Feb 2015 21:47:07 +0800 Subject: [PATCH 101/163] PUB:20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty) @geekpi --- ...o Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md (84%) diff --git a/translated/tech/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md b/published/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md similarity index 84% rename from translated/tech/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md rename to published/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md index 95dca20588..ccbee5e704 100644 --- a/translated/tech/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md +++ b/published/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md @@ -2,7 +2,7 @@ ================================================================================ 今天我们将会在Ubuntu Server 14.04 LTS (Trusty)上安装一个博客平台Ghost。 -Ghost是一款设计优美的发布平台,很容易使用且对任何人都免费。它是免费的开源软件(FOSS),它的源码在Github上。截至2014年1月,它的界面很简单还有分析面板。编辑使用的是分屏显示。 +Ghost是一款设计优美的发布平台,很容易使用且对任何人都免费。它是免费的开源软件(FOSS),它的源码在Github上。截至2015年1月(LCTT 译注:原文为2014,应为2015),它的界面很简单还有分析面板。编辑使用的是很便利的分屏显示。 因此有了这篇步骤明确的在Ubuntu Server上安装Ghost的教程: @@ -52,12 +52,12 @@ Ghost是一款设计优美的发布平台,很容易使用且对任何人都免 sudo adduser --shell /bin/bash --gecos 'Ghost application' ghost sudo chown -R ghost:ghost /var/www/ghost/ -现在启动Ghost,你需要以“ghsot”用户登录。 +现在启动Ghost,你需要以“ghost”用户登录。 su - ghost cd /var/www/ghost/ -现在,你已经以“ghsot”用户登录,并可启动Ghost: +现在,你已经以“ghost”用户登录,并可启动Ghost: npm start --production @@ -67,7 +67,7 @@ via: http://linoxide.com/ubuntu-how-to/install-ghost-ubuntu-server-14-04/ 作者:[Arun Pyasi][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 246f615ecfb12220daf150f4e9875a7fabcc8e07 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Feb 2015 22:05:33 +0800 Subject: [PATCH 102/163] PUB:20150105 Ubuntu apt-get and apt-cache commands with practical examples @geekpi --- ...-cache commands with practical examples.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md (90%) diff --git a/translated/tech/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md b/published/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md similarity index 90% rename from translated/tech/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md rename to published/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md index 7574a065f8..0b581084a5 100644 --- a/translated/tech/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md +++ b/published/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md @@ -1,6 +1,6 @@ -实例展示Ubuntu中apt-get和apt-cache命令的使用 +apt-get 和 apt-cache 命令实例展示 ================================================================================ -apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具。 apt-get的GUI版本是Synaptic包管理器,本篇中我们会讨论apt-get和apt-cache命令的不同。 +apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具。 apt-get的GUI版本是Synaptic包管理器。本篇中我们会展示apt-get和apt-cache命令的15个不同例子。 ### 示例:1 列出所有可用包 ### @@ -16,7 +16,7 @@ apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具 ### 示例:2 用关键字搜索包 ### -这个命令在你不确定包名时很有用,只要在apt-cache(这里原文是apt-get,应为笔误)后面输入与包相关的关键字即可/ +这个命令在你不确定包名时很有用,只要在apt-cache(LCTT 译注:这里原文是apt-get,应为笔误)后面输入与包相关的关键字即可。 linuxtechi@localhost:~$ apt-cache search "web server" apache2 - Apache HTTP Server @@ -37,7 +37,7 @@ apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具 pnp4nagios-bin: /etc/pnp4nagios/nagios.cfg pnp4nagios-bin: /usr/share/doc/pnp4nagios/examples/nagios.cfg -### 示例:3 显示特定包的基本信息 ### +### 示例:3 显示特定包的基本信息 ### linuxtechi@localhost:~$ apt-cache show postfix Package: postfix @@ -92,7 +92,7 @@ apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具 ### 示例:6 使用 “apt-get update” 更新仓库 ### -使用命令“apt-get update”, 我们可以重新从源仓库中同步文件索引。包的索引从“/etc/apt/sources.list”中检索 +使用命令“apt-get update”, 我们可以重新从源仓库中同步文件索引。包的索引从“/etc/apt/sources.list”中检索。 linuxtechi@localhost:~$ sudo apt-get update Ign http://extras.ubuntu.com utopic InRelease @@ -106,7 +106,7 @@ apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具 Ign http://in.archive.ubuntu.com utopic-backports InRelease ................................................................ -### 示例:7 使用apt-get安装包 ### +### 示例:7 使用apt-get安装包 ### linuxtechi@localhost:~$ sudo apt-get install icinga @@ -140,15 +140,15 @@ apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具 Get:1 http://in.archive.ubuntu.com/ubuntu/ utopic/universe icinga amd64 1.11.6-1build1 [1,474 B] Fetched 1,474 B in 1s (1,363 B/s) -上面的目录会从你当前的目录下载icinga包。 +上面的目录会把icinga包下载到你的当前工作目录。 ### 示例:12 清理本地包占用的磁盘空间 ### linuxtechi@localhost:~$ sudo apt-get clean -上面的命令会清零apt-get在下载包时占用的磁盘空间。 +上面的命令会清空apt-get所下载的包占用的磁盘空间。 -我们也可以使用“**autoclean**”选项来代替“**clean**“,两者之间主要的区别是autoclean清理不再使用且没用的下载。 +我们也可以使用“**autoclean**”选项来代替“**clean**”,两者之间主要的区别是autoclean清理不再使用且没用的下载。 linuxtechi@localhost:~$ sudo apt-get autoclean Reading package lists... Done @@ -167,9 +167,9 @@ apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具 Get:1 Changelog for apache2 (http://changelogs.ubuntu.com/changelogs/pool/main/a/apache2/apache2_2.4.10-1ubuntu1/changelog) [195 kB] Fetched 195 kB in 3s (60.9 kB/s) -上面的命令会下载apache2的更新日志,并在你屏幕上显示。 +上面的命令会下载apache2的更新日志,并在你屏幕上分页显示。 -### 示例15 使用 “check” 选项显示损坏的依赖 ### +### 示例:15 使用 “check” 选项显示损坏的依赖关系 ### linuxtechi@localhost:~$ sudo apt-get check Reading package lists... Done @@ -182,7 +182,7 @@ via: http://www.linuxtechi.com/ubuntu-apt-get-apt-cache-commands-examples/ 作者:[Pradeep Kumar][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a328d57091f085ac37685abe9b67cd8f3638e117 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Feb 2015 22:38:29 +0800 Subject: [PATCH 103/163] PUB:20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7 @geekpi --- ...ling Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md (97%) diff --git a/translated/tech/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md b/published/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md similarity index 97% rename from translated/tech/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md rename to published/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md index 901ce4380f..0777cc4d0d 100644 --- a/translated/tech/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md +++ b/published/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md @@ -65,7 +65,7 @@ vi /etc/sysconfig/iptables -加入红色显示的行: +加入如下行“-A INPUT -p tcp -m state --state NEW --dport 23 -j ACCEPT”: # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. @@ -151,7 +151,7 @@ via: http://www.unixmen.com/installing-telnet-centosrhelscientific-linux-6-7/ 作者:[SK][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d05288ffb48b4221320c58ac65dea202e0cc9577 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Feb 2015 22:48:10 +0800 Subject: [PATCH 104/163] PUB:20150119 How To Disable IPv6 In CentOS 7 @geekpi --- .../20150119 How To Disable IPv6 In CentOS 7.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) rename {translated/tech => published}/20150119 How To Disable IPv6 In CentOS 7.md (88%) diff --git a/translated/tech/20150119 How To Disable IPv6 In CentOS 7.md b/published/20150119 How To Disable IPv6 In CentOS 7.md similarity index 88% rename from translated/tech/20150119 How To Disable IPv6 In CentOS 7.md rename to published/20150119 How To Disable IPv6 In CentOS 7.md index 080799f17c..a148053251 100644 --- a/translated/tech/20150119 How To Disable IPv6 In CentOS 7.md +++ b/published/20150119 How To Disable IPv6 In CentOS 7.md @@ -1,6 +1,6 @@ 如何在CentOS 7中禁止IPv6 ================================================================================ -最近,我的一位朋友问我该如何禁止IPv6。在搜索了一番之后,我找到了下面的方案。下面就是我在CentOS 7迷你版中禁止IPv6的方法。 +最近,我的一位朋友问我该如何禁止IPv6。在搜索了一番之后,我找到了下面的方案。下面就是在我的CentOS 7 迷你服务器禁止IPv6的方法。 你可以用两个方法做到这个。 @@ -41,7 +41,6 @@ ### 我在禁止IPv6后遇到问题怎么办 ### -You may get problems after disabling IPv6. 你可能在禁止IPv6后遇到一些问题 #### 问题1: #### @@ -60,9 +59,7 @@ vi /etc/ssh/sshd_config AddressFamily inet -或者, - -在这行的前面去掉注释**(#)**: +或者,在这行的前面去掉注释**(#)**: #ListenAddress 0.0.0.0 @@ -89,7 +86,7 @@ via: http://www.unixmen.com/disable-ipv6-centos-7/ 作者:[SK][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d0bbcb1237342da8fe5da14b6c064dfa6a266fd9 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Feb 2015 23:07:29 +0800 Subject: [PATCH 105/163] PUB:20150114 How to Configure Chroot Environment in Ubuntu 14.04 @bazz2 --- ...4 How to Configure Chroot Environment in Ubuntu 14.04.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md (93%) diff --git a/translated/tech/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md b/published/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md similarity index 93% rename from translated/tech/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md rename to published/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md index 789cb8a7fe..250b223b2a 100644 --- a/translated/tech/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md +++ b/published/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md @@ -2,7 +2,7 @@ ================================================================================ 你可能会有很多理由想要把一个应用、一个用户或者一个环境与你的 linux 系统隔离开来。不同的操作系统有不同的实现方式,而在 linux 中,一个典型的方式就是 chroot 环境。 -在这份教程中,我会一步一步指导你怎么使用 chroot 命令去配置一个与真实系统分离出来的独立环境。这个功能主要可以用于测试项目,这些步骤都在 **Ubuntu 14.04** 虚拟专用服务器(VPS)上执行。 +在这份教程中,我会一步一步指导你怎么使用 chroot 命令去配置一个与真实系统分离出来的独立环境。这个功能主要可以用于测试项目,以下这些步骤都在 **Ubuntu 14.04** 虚拟专用服务器(VPS)上执行。 学会快速搭建一个简单的 chroot 环境是一项非常实用的技能,绝大多数系统管理员都能从中受益。 @@ -22,7 +22,7 @@ 举个例子,你可以在 chroot 环境中编译、安装、测试软件,而不去动真实的系统。你也可以**在64位环境下使用 chroot 创建一个32位环境,然后运行一个32位的程序**(LCTT泽注:如果你的真实环境是32位的,那就不能 chroot 一个64位的环境了)。 -但是 为了安全考虑,chroot 环境为非特权用户设立了非常严格的限制,而不是提供完整的安全策略。如果你需要的是有完善的安全策略的隔离方案,可以考虑下 LXC、Docker、vservers等等。 +但是为了安全考虑,chroot 环境为非特权用户设立了非常严格的限制,而不是提供完整的安全策略。如果你需要的是有完善的安全策略的隔离方案,可以考虑下 LXC、Docker、vservers等等。 ### Debootstrap 和 Schroot ### @@ -138,7 +138,7 @@ via: http://linoxide.com/ubuntu-how-to/configure-chroot-environment-ubuntu-14-04 作者:[Arun Pyasi][a] 译者:[bazz2](https://github.com/bazz2) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 55d4582e200a0727161bfcbfc0b0035a0987a266 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 25 Feb 2015 10:55:40 +0800 Subject: [PATCH 106/163] PUB:20141203 Undelete Files on Linux Systems @FSSlc --- ...0141203 Undelete Files on Linux Systems.md | 127 ++++++++++++++++++ ...0141203 Undelete Files on Linux Systems.md | 118 ---------------- 2 files changed, 127 insertions(+), 118 deletions(-) create mode 100644 published/20141203 Undelete Files on Linux Systems.md delete mode 100644 translated/tech/20141203 Undelete Files on Linux Systems.md diff --git a/published/20141203 Undelete Files on Linux Systems.md b/published/20141203 Undelete Files on Linux Systems.md new file mode 100644 index 0000000000..59367ed918 --- /dev/null +++ b/published/20141203 Undelete Files on Linux Systems.md @@ -0,0 +1,127 @@ +怎样在 Linux 系统中恢复已删除文件 +================================================================================ + +当用户意外地删除了一个仍然需要的文件时,大多数情况下,是没有简便的方法可以重新找回或重建这个文件。不过,幸运的是文件是可以通过一些方法恢复的。当用户删除了一个文件,该文件并没有消失,只是被隐藏了一段时间。 + +这里将解释它是如何工作的。在一个文件系统中,有一个叫做 `文件分配表` 的东西,这个表跟踪文件在存储单元(如硬盘, MicroSD 卡,闪存驱动器等等)中的位置。当一个文件被删除,文件系统将会在`文件分配表`中执行以下两个任务之一:这个文件在`文件分配表`上的条目被标记为 “自由空间” 或删除`文件分配表`里这个文件的条目,且将相应的空间被标记为自由空间 。现在,如果有一个新的文件需要被放置在一个存储单元上,操作系统将会把这个文件放置到标记为空位的地方。在新文件被写入到这个空位后,被删除的文件就彻底消失了。当需要恢复一个已经删除的文件时,用户绝对不能再对任何文件进行操作,因为假如该文件对应的“空位”被占用,这个文件就永远也不能恢复了。 + +### 恢复软件是如何工作的? ### + +大多数的文件系统(在删除文件时)只是标记空间为空白。在这些文件系统下,恢复软件查看`文件分配表`这个文件,然后复制被删除的文件到另外的存储单元中。假如该文件被复制到其它需要恢复的被删除的存储单元中,那么用户将有可能会失去那个所需的删除文件。 + +文件系统很少会擦除`文件分配表`中的条目。假如文件系统真的这样做了, 这便是恢复软件在恢复文件了。恢复软件在存储单元中扫描文件头,所有文件都拥有一个特殊的编码字符串,它们位于文件的最前面,也被叫做 `魔法数字`。例如,一个编译的 JAVA 类文件的魔法数字在十六进制中是“CAFEBABE”。所以,假如要恢复该类型的文件,恢复软件会查找 “CAFEBABE” 然后复制文件到另一个存储单元。一些恢复软件可以查找某种特殊的文件类型。若用户想恢复一个 PDF 文件,则恢复软件将会查找十六进制的魔法数字 “25504446”,这恰恰是 ASCII 编码中的 “%PDF”。恢复软件将会查找所有的魔法数字,然后用户可以选择恢复哪个已删除的文件。 + +假如一个文件的部分被覆写了,则整个文件就会被损坏。通常这个文件可以被恢复,但是其中的内容可能已经没有什么用处。例如,恢复一个已损坏的 JPEG 文件将会是无意义的,因为图片查看器不能从这个损坏的文件产生一幅图片。因此,即使用户拥有了这个文件,该文件也将毫无用处。 + +### 设备的位置:### + +在我们继续之前,下面的一些信息将会对指引恢复软件找到正确的存储单元起到一定的帮助。所有的设备均挂载在 `/dev/` 目录下。操作系统赋予每个设备的名称(并不是管理员给予每个分区或设备的名称)遵循一定的命名规律。 + +第一个 SATA 硬盘的第二个分区的名称将会是 sda2。名称的第一个字母暗示了存储类型,在这里指的是 SATA,但字母 “s” 也可能指的是 SCSI、 FireWire(火线端口)或 USB。第二个字母 “d” 指的是 disk(硬盘)。第三个字母指的是设备序数,即字母 “a” 指的是第一个 SATA 而 “b” 指的是第二个。最后的数字代表分区。没有分区数字的设备名代表该设置的所有分区。对于上面的例子,对应的名称为 sda 。作为命名的第一个字母还可能是 “h” ,这对应 PATA 硬盘(IDE)。 + +以下为命名规律的一些例子。假如一个用户有一个 SATA 硬盘(sda),这个设备有 4 个分区- sda1、 sda2、 sda3 和 sda4 。该用户删除了第三个分区,但直到格式化第四个分区之前,第四个分区名 sda4 都将保留不变。然后该用户插入了一个带有一个分区 - 即sdb1- 的 usb 存储卡(sdb),又增加了一个带有一个分区 -hda1- 的 IDE 硬盘 ,接着该用户又增加了一个 SCSI 硬盘 - sdc1 。接着用户移除了 USB 存储卡(sdb)。现在,SCSI 硬盘的名称仍然为 sdc,但如果这个 SCSI 被移除接着再被插入,则它的名称将变为 sdb。虽然还有其他的存储设备存在, 那个 IDE 硬盘的名称仍会有一个 “a”, 因为它是第一个 IDE 硬盘,IDE 设备的命名与 SCSI、 SATA、 FireWire 和 USB 设备要分开计数。 + +### 使用 TestDisk 进行恢复:### + +每个恢复软件有其不同的功能,特征及支持的不同文件系统。下面是一些关于 使用 TestDisk 在各种文件系统中恢复文件的指南。 + +####FAT16、 FAT32、 exFAT (FAT64)、 NTFS 以及 ext2/3/4:#### + +TestDisk 是一个运行在 Linux、 *BSD、 SunOS、 Mac OS X、 DOS 和 Windows 等操作系统下的开源的自由软件。 TestDisk 可以从下面的链接中找到 :[http://www.cgsecurity.org/wiki/TestDisk][1]。TestDisk 也可以通过键入 `sudo apt-get install testdisk` 来安装。TestDisk 有着许多的功能,但这篇文章将只关注恢复文件这个功能。 + +使用 root 权限从终端中打开 TestDisk 可以通过键入 `sudo testdisk` 命令。 + +现在, TestDisk 命令行应用将会被执行。终端的显示将会改变。TestDisk 询问用户它是否可以保留日志,这完全由用户决定。假如一个用户正从系统存储中恢复文件,则不必保留日志。可选择的选项有“生成”、 “追加” 和 “无日志”。假如用户想保留日志,则日志将会保留在该用户的主目录。 + +![](http://www.linux.org/attachments/screen1-jpg.342/?.jpg) + +在接着的屏幕中,存储设备以 `/dev/*`的方式被罗列出来。对于我的系统,系统的存储单元为 `/dev/sda`,这意味着我的存储单元为 一个 SATA硬盘(sd)且它是第一个硬盘(a)。每个存储单元的容量以 Gigabyte(千兆字节)为单位显示的。使用上下键来选择一个存储设备然后点击进入。 + +![](http://www.linux.org/attachments/screen2-jpg.343/?.jpg) + +下一屏显示出一个列有分区表(也叫做分区映射表)的清单。正如文件有`文件配置表`,分区有着分区表。分区是存储设备上的分段。例如在几乎所有的 Linux 系统中,至少存在两种分区类型 - EXT3/4 和 Swap 。每一个分区表将会在下面被简要地描述。TestDisk 并不支持所有类型的分区表,所以这并不是完整的列表。 + +![](http://www.linux.org/attachments/screen3-jpg.344/?.jpg) + +- **Intel** - 这类分区表在 Windows 系统和许多的 Linux 系统中非常普遍,它也常常称作 MBR 分区表。 +- **EFI GPT** - 这种类型的分区表通常用在 Linux 系统中。对于 Linux 系统,这种分区表是最为推荐的, 因为逻辑分区或扩展分区的概念并不适用于 GPT (GUID Partition Table) 分区表。 这意味着,如果每个分区中有一个 Linux 系统,一个 Linux 用户可以从多种类型的 Linux 系统中进行多重启动。当然使用 GPT 分区表还有其他的优势,但那些已超出了本文的讨论范围。 +- **Humax** - Humax 分区映射表适用于韩国公司 Humax 生产的设备。 +- **Mac** - Apple 分区映射表 (APM) 适用于 Apple 的设备。 +- **None** - 某些设备并没有分区表。例如,许多 Subor 游戏控制台不使用分区映射表。如果一个用户试图以其它分区表类型从这类设备中恢复文件,用户就会困扰 TestDisk 为何找卟到任何的文件系统或者文件。 +- **Sun** - Sun 分区表适用于 Sun 系统。 +- **Xbox** -Xbox 适用于使用 Xbox 分区映射表的存储设备。 + +假如用户选择了 “Xbox” ,尽管他的系统使用了 GPT 分区表, 那么 TestDisk 将不能找到任何分区或文件系统。假如 TestDisk 按照用户的选择执行,则它可能猜测错误。(下面的图片显示的是当分区表类型错误时的输出) + +![](http://www.linux.org/attachments/xbox-jpg.350/?.jpg) + +当用户为他们的设备选择了正确的选项,则在下一屏中,选择 “高级” 选项。 + +![](http://www.linux.org/attachments/screen4-jpg.345/?.jpg) + +现在,用户将看到一个列有用户存储设备中所有的文件系统或分区的列表。假如用户选择了错误的分区映射表,则在这一步中用户就将会知道他们做出了错误的选择。假如没有错误,通过移动文字光标来高亮选择含有被删除文件的分区。使用 左右键来高亮位于终端底部的 “列表”。接着,按下回车确认。 + +![](http://www.linux.org/attachments/screen5-jpg.346/?.jpg) + +新的一屏便会呈现出列有文件和目录的列表。那些白色的文件名就是未被删除的文件,而红色的文件名是那些已被删除的文件。最右边的一列是文件的名称,从右到左方向的接着一列是文件的创建日期,再往左的一列是文件的大小(以 byte/ 比特为单位),最左边带有“-”,“d” ,“r”, “w” 和"x"的一列则代表的是文件的权限情况。“d” 表示该文件为一个目录,其他的权限术语与本文关系不大。在列表的最顶端以“.”代表的一项表示当前目录,第二行以".."代表的一项表示当前目录的上级目录,所以用户可以通过选择目录所在行到达该目录。 + +![](http://www.linux.org/attachments/screen6-jpg.347/?.jpg) + +举个例子,我想进入"Xaiml\_Dataset" 目录,该目录基本上由被删除的文件组成。通过按键盘上的 "c"键,我将恢复文件 "computers.xaiml",接着我被询问选择一个目标目录,当然,我应该放置该文件到另一个分区中。现在,当我在我的家目录时,按下了“c”键。(选择目标目录时)哪个目录被高亮并没有什么影响,当前目录就是目标目录,在屏幕的上方,将会显示“复制完成”的消息。在我的家目录中便会有一个名为"Xaiml_Dataset"的目录,里面里有一个 Xaiml 文件。 假如我在更多的已删除文件上按“c” 键,则这些文件将会被放置到新的文件夹中而无需再向我询问目标目录。 + +![](http://www.linux.org/attachments/screen7-jpg.348/?.jpg) + +![](http://www.linux.org/attachments/screen8-jpg.349/?.jpg) + +当这些步骤完成后,重复按“q”键直到看到正常的终端模样。目录"Xaiml_Dataset" 只能被 root 用户访问。为了解决这个问题,使用 root 权限改变该目录及其子目录的权限。做完这些后,文件便被恢复了且用户可以访问它们。 + +### 特别的 ReiserFS:### + +为了从 ReiserFS 文件系统中恢复一个文件,首先需将分区中的所有文件做一个备份。因为如果发生某些错误, 这个方法可能会引起文件丢失。接着执行下面的命令,其中 `DEVICE`指的是那些以 sda2 形式命名的设备。一些文件将被放入 lost+found 目录而其他则会保存到原先被删除的位置。 + + reiserfsck --rebuild-tree --scan-whole-partition /dev/DEVICE + +### 恢复被某个程序打开的删除文件: ### + +假设用户意外地删除了一个文件,且该文件被某个程序打开。虽然在硬盘中该文件被删除了,但这个程序正使用着位于 RAM 中的该文件的副本。幸好,我们有两种简单的解决方法来恢复该文件。 + +假如这个软件有保存功能,如文本编辑器,则用户可以重新保存该文件,这样,文本编辑器可以将该文件写入硬盘中。 + +假设在音乐播放器中有一个 MP3 文件,而该音乐播放器并不能保存该 MP3 文件,则这种情形下需要比先前花更多的时间来恢复文件。不幸的是,这种方法并不能保证在所有的系统和应用中有效。首先,键入下面的命令。 + + lsof -c smplayer | grep mp3 + +上面的命令会列出所有由 smplayer 使用的文件,这个列表由 `grep` 命令通过管道搜索 mp3 。命令的输入类似于下面: + + smplayer 10037 collier mp3 169r 8,1 676376 1704294 /usr/bin/smplayer + +现在,键入下面的命令来直接从 RAM(在 Linux 系统中,`/proc/`映射到 RAM)中恢复文件,并复制该文件到选定的文件夹中。其中 `cp` 指的是复制命令,输出中的数字 10037 来自于进程数,输出中的数字 169 指的是文件描述符,"~/Music/"为目标目录,最后的 "music.mp3" 为用户想恢复的文件的名称。 + + cp /proc/10037/fd/169 ~/Music/music.mp3 + +### 真正的删除: ### + +为确保一个文件不能被恢复,可以使用一个命令来 “擦除” 硬盘。擦除硬盘实际上是向硬盘中写入无意义的数据。例如,许多擦除程序向硬盘中写入零,随机字母或随机数据。不会有空间被占用或丢失,擦除程序只是对空位进行重写覆盖。假如存储单元被文件占满而没有空余空间,则所有先前被删除的文件将会消失而不能恢复。 + +擦除硬盘的目的是确保隐私数据不被他人看见。举个例子,一个公司可能预订了一些新的电脑,总经理决定将旧的电脑卖掉,然而,新的电脑拥有者可能会看到公司的一些机密或诸如信用卡号码,地址等顾客信息。幸好,公司的电脑技术人员可以在卖掉这些旧电脑之前,擦除这些硬盘。 + +为了安装擦除程序 secure-delete,键入 `sudo apt-get install secure-delete`,这个命令将会安装一个包含 4 个程序的程序集,用以确保被删除的文件不能被恢复。 + +- srm - 永久删除一个文件。使用方法: `srm -f ./secret_file.txt` +- sfill - 擦除空白空间。使用方法: `sfill -f /mount/point/of/partition` +- sswap - 擦除 swap 空间。使用方法: `sswap -f /dev/SWAP_DEVICE` + +假如电脑实际去清除那些删除的文件,那么就需要花费更长的时间去执行删除任务。将某些空间标记为空位是快速且容易的,但使得文件永远消失需要花费一定的时间。例如,擦除一个存储单元,可能需要花费几个小时的时间(根据磁盘容量大小)。总之,现在的系统工作的就挺好,因为即便用户清空了垃圾箱,他们仍然有另一次机会来改变他们当初的想法(或错误)。 + +-------------------------------------------------------------------------------- + +via: http://www.linux.org/threads/undelete-files-on-linux-systems.4316/ + +作者:[DevynCJohnson][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linux.org/members/devyncjohnson.4843/ +[1]:http://www.cgsecurity.org/wiki/TestDisk diff --git a/translated/tech/20141203 Undelete Files on Linux Systems.md b/translated/tech/20141203 Undelete Files on Linux Systems.md deleted file mode 100644 index c5c6d9409d..0000000000 --- a/translated/tech/20141203 Undelete Files on Linux Systems.md +++ /dev/null @@ -1,118 +0,0 @@ -怎样在 Linux 系统中恢复已删除文件 -================================================================================ -大多数情况下,一个电脑用户可能意外地删除了一个仍然需要的文件,但没有一个简便的方法来重新找回或重建这个文件。幸好,文件可以被恢复。当用户删除了一个文件,该文件并没有消失,只是被隐藏了一段时间。这里将解释它是如何工作的。在一个文件系统中,有一个叫做 `文件分配表` 的文件,这个表跟踪文件在存储单元(硬盘, MicroSD 卡,闪存驱动器 等等)中的位置。当一个文件被删除,文件系统将会在`文件分配表`中执行以下 两个任务中的一个:这个文件在`文件分配表`上的条目被标记为 “空白空间” 或 这个文件在`文件分配表`的条目被擦除,且相应的空间被标记为 空白空间 。现在,如果一个文件需要被放置在一个存储单元上,操作系统将会把这个文件放置到标记为 空白 的空间中。在新文件被写入到这个空白空间后,被删除的文件就彻底消失了。当需要恢复一个已经删除的文件时,用户绝对不能再对任何文件进行操作,因为假如 该文件对应的 空白空间 被占用,这个文件就永远也不能恢复了。 - -### 恢复软件是如何工作的? ### - -大多数的文件系统只是标记空间为空白,在这些文件系统下,恢复软件查看`文件分配表`这个文件,然后复制被删除的文件到另外的存储单元中。假如该文件被复制到原来所处的存储单元中,那么用户将有可能会失去那个所需的删除文件。 - -文件系统很少会擦除`文件配置表`中的条目。假如文件系统真的这样做了, 这便是恢复软件在恢复文件了。恢复软件在存储单元中扫描文件头,所有文件都拥有一个特殊的编码字符串,它们位于文件的最前面,也被叫做 `魔法数字`。例如,一个编译的 JAVA 类文件的魔法数字在十六进制中是“CAFEBABE”。所以,假如要恢复该类型的文件,恢复软件会查找 “CAFEBABE” 然后复制文件到另一个存储单元。一些恢复软件可以查找某种特殊的文件类型。若用户想恢复一个 PDF 文件,则恢复软件将会查找十六进制的魔法数字 “25504446”,这恰恰是 ASCII 编码中的 “%PDF”。其他的恢复软件将查找所有的魔法数字。然后,用户可以选择恢复哪个已删除的文件。 - -假如一个文件的部分被重写了,则整个文件就会被损坏。通常这个文件可以被恢复,但是其中的内容可能已经没有什么用处。例如,恢复一个已损坏的 JPEG 文件将会是无意义的,因为 图片查看器不能从这个损坏的文件产生一幅图片。因此,即使用户拥有了这个文件,该文件也将毫无用处。 - -### 设备的位置: ### - -在我们继续之前,下面的一些信息将会对 指引恢复软件找到正确的存储单元 起到一定的帮助。所有的设备均挂载在 `/dev/` 目录下。操作系统赋予每个设备的名称(并不是管理员给予每个分区或设备的名称) 遵循一定的命名规律。第一个 SATA 硬盘的第二个分区的名称将会是 sda2。名称的第一个字母暗示了存储类型,在这里指的是 SATA,但字母 “s” 也可能指的是 SCSI, FireWire(火线端口), 或 USB。第二个字母 “d” 指的是 disk(硬盘)。第三个字母指的是设备序数,即字母 “a” 指的是第一个 SATA 而 “b” 指的是第二个。最后的数字代表分区。一个带有所有分区的设备的命名将只有字母而没有数字。对于上面的例子,对应的名称为 sda 。作为命名的第一个字母还可能是 “h” ,这对应 PATA 硬盘(IDE)。以下为命名规律的一些例子。假如一个用户有一个 SATA 硬盘(sda),这个设备有 4 个分区- sda1, sda2, sda3, 和 sda4 。该用户删除了第三个分区,但直到格式化第四个分区之前,将第四个分区保留。然后该用户插入了一个带有一个分区 - 即sdb1- 的 usb 存储卡(sdb),又增加了一个 带有一个分区 -hda1- 的 IDE 硬盘 ,接着该用户又增加了一个 SCSI 硬盘 - sdc1 。接着用户移除了 USB 存储卡(sdb)。现在,SCSI 硬盘的名称仍然为 sdc,但如果这个 SCSI 被移除接着再被插入,则它的名称将变为 sdb。即使其他的存储设备仍然存在, 那个 IDE 硬盘的名称仍会有一个 “a”, 因为它是第一个 IDE 硬盘,IDE 设备的命名与 SCSI, SATA, FireWire, 和 USB 设备要分开计数。 - -### 恢复: ### - -每个恢复软件有其不同的功能,特征及支持的不同文件系统。下面是一些关于 使用 TestDisk 在一系列的文件系统中恢复文件的指南。 - -**FAT16, FAT32, exFAT (FAT64), NTFS, 以及 ext2/3/4:** - -TestDisk 是一个运行在 Linux, *BSD, SunOS, Mac OS X, DOS, 和 Windows 等操作系统下的开源,免费软件。 TestDisk 可以从下面的链接中找到 :[http://www.cgsecurity.org/wiki/TestDisk][1]。TestDisk 也可以通过键入 `sudo apt-get install testdisk` 来安装。TestDisk 有着许多的功能,但这篇文章将只关注 恢复文件 这个功能。 - -使用 root 权限从终端中打开 TestDisk 可以通过键入 `sudo testdisk` 命令。 - -现在, TestDisk 命令行应用将会被执行。终端的外观将会改变。TestDisk 询问用户 它是否可以保留日志,这完全由用户决定。假如一个用户正从系统存储中恢复文件,则 TestDisk 不会保留日志。可选择的选项有 "生成", "追加", 和 "无 log"。假如用户想保留日志,则日志将会保留在该用户的主目录。 - -![](http://www.linux.org/attachments/screen1-jpg.342/) - -在接着的屏幕中,存储设备以 `/dev/*`的方式被罗列出来。对于我的系统,系统的存储单元为 `/dev/sda`,这意味着我的存储单元为 一个 SATA硬盘(sd) 且它是第一个硬盘(a)。每个存储单元的容量以 Gigabyte(千兆字节)为单位显示的。使用上下键来选择一个存储设备然后点击进入。 - -![](http://www.linux.org/attachments/screen2-jpg.343/) - -下一屏显示出一个列有分区表(也叫做 分区映射表)的清单。正如文件有`文件配置表`,分区有着分区表。分区是存储设备上的划分部分。例如在几乎所有的 Linux 系统中,至少存在两种分区类型 - EXT3/4 和 Swap 。每一个分区表将会在下面被简要地描述。TestDisk 并不支持所有类型的分区表,所以下面的列表不是完整的。 - -![](http://www.linux.org/attachments/screen3-jpg.344/) - -- **Intel** - 这类分区表在 Windows 系统和许多的 Linux 系统中非常普遍,它也以 MBR 的名称为人们熟知。 -- **EFI GPT** - 这种类型的分区表通常用在 Linux 系统中。对于 Linux系统,这种分区表是最为推荐的, 因为逻辑分区或扩展分区的概念并不适用于 GPT (GUID Partition Table) 分区表。 这意味着,如果每个分区中有一个 Linux 系统,一个 Linux 用户可以从多种类型的 Linux 系统中进行多重启动。当然使用 GPT 分区表还有其他的优势,但那些已超出了本文的讨论范围。 -- **Humax** - Humax 分区映射表适用于韩国公司 Humax 生产的设备。 -- **Mac** - Apple 分区映射表 (APM) 适用于 Apple 的设备。 -- **None** - 某些设备并没有分区表。例如,许多 Subor 游戏控制台不使用分区映射表。如果一个用户试图从这类设备中恢复文件, 并且认为分区表不是其他的类型,则实际上 TestDisk 并不能找到任何的文件系统或者文件,这将给用户带来困扰。 -- **Sun** - Sun 分区表适用于 Sun 系统。 -- **Xbox** -Xbox 适用于使用 Xbox 分区映射表的自家存储设备。 - -假如用户选择了 “Xbox” ,尽管他的系统使用了 GPT 分区表, 那么 TestDisk 将不能找到任何分区或文件系统。假如 TestDisk 按照用户的选择执行,则它将不正确地进行猜测。(下面的图片显示的是当分区表类型错误时的输出) - -![](http://www.linux.org/attachments/xbox-jpg.350/) - -一旦用户为他们的设备选择了正确的选项,则在下一屏中,选择 “高级” 选项。 - -![](http://www.linux.org/attachments/screen4-jpg.345/) - -现在,用户将看到一个列有 在用户的存储设备中所有的文件系统或分区 的列表。假如用户选择了错误的分区映射表,则在这一步中用户就将会知道他们做出了错误的选择。假如没有错误,通过放置文字类型的光标来高亮含有被删除文件的分区。使用 左右键 来高亮位于终端底部的 “列表”。接着,点击确认。 - -![](http://www.linux.org/attachments/screen5-jpg.346/) - -新的一屏便会呈现出列有文件和目录的列表。那些发白的文件就是还没有被删除的文件,而红色的文件就是那些已经被删除了的文件。最右边的一列是文件的名称,从右到左方向的接着一列是文件的创建日期,再往左的一列是文件的大小(以 byte(比特) 为单位),最左边带有虚线, “d” ,“r”, “w” 和"x"的一列则代表的是文件的权限情况。“d” 表示该文件为一个目录,其他的权限术语与本文关系不大。在列表的最顶端以“.”代表的一项表示当前目录,第二行以".."代表的一项表示当前目录的上级目录,通过选择这一行,用户可以到达上级目录。举个例子,我想进入"Xaiml_Dataset" 目录,该目录基本上由被删除的文件组成。通过按键盘上的 "c"键,我将恢复文件 "computers.xaiml",接着我被询问选择一个目标目录,当然,我将放置该文件到另一个分区中。现在,我在我的家目录中,并按下了“c”键。哪个目录被高亮并没有什么影响。当前目录就是目标目录,在屏幕的上方,将会显示“复制完成”的消息。在我的家目录中便会有一个名为"Xaiml_Dataset"的目录,里面里有名为 Xaiml 的文件。 假如我在更多的 已删除文件上按“c” 键,则这些文件将会被放置到新的文件夹中而无需再向我询问目标目录。 - -![](http://www.linux.org/attachments/screen6-jpg.347/) - -![](http://www.linux.org/attachments/screen7-jpg.348/) - -![](http://www.linux.org/attachments/screen8-jpg.349/) - -当这些步骤完成后,重复按“q”键直到看到正常的终端模样。目录"Xaiml_Dataset" 只能被 root 用户访问。为了修复这个问题,使用 root 权限改变该目录及其子目录的权限。做完这些后,文件便被恢复了且用户可以访问它们。 - -### ReiserFS: ### - -为了从 ReiserFS 文件系统中恢复一个文件,首先需将分区中的所有文件做一个备份。因为如果发生某些错误, 这个方法可能会引起文件丢失。接着执行下面的命令,其中 `DEVICE`指的是那些以 sda2 形式命名的设备。一些文件将被放入 lost+found 目录而其他则会保存到原先被删除的位置。 - - reiserfsck --rebuild-tree --scan-whole-partition /dev/DEVICE - -### 恢复被某个程序打开的删除文件: ### - -假设用户意外地删除了一个文件,且该文件被某个程序打开。虽然在硬盘中该文件被删除了,但这个程序正使用着位于 RAM 中的该文件的副本。幸好,我们有两种简单的解决方法来恢复该文件。 - -假如这个软件有自动保存功能,如文本编辑器,则用户可以重新保存该文件,这样,文本编辑器可以将该文件写入硬盘中。 - -假设在音乐播放器中有一个 MP3 文件,而该音乐播放器并不能保存该 MP3 文件,则这种情形下需要比先前花更多的时间来恢复文件。不幸的是,这种方法并不能保证在所有的系统和应用中有效。首先,键入下面的命令。 - - lsof -c smplayer | grep mp3 - -上面的命令会列出所有由 smplayer 使用的文件,这个列表由 `grep` 命令通过管道搜索 mp3 。命令的输入类似于下面: - - smplayer 10037 collier mp3 169r 8,1 676376 1704294 /usr/bin/smplayer - -现在,键入下面的命令来直接从 RAM(在 Linux 系统中,`/proc/`代表 RAM) 中恢复文件,并复制该文件到选定的文件夹中。其中 `cp` 指的是复制命令,输出中的数字 10037 来自于进程数,输出中的数字 169 指的是文件描述符,"~/Music/"为目标目录,最后的 "music.mp3" 为用户想恢复的文件的名称。 - - cp /proc/10037/fd/169 ~/Music/music.mp3 - -### 真正的删除: ### - -为确保一个文件不能被恢复,可以使用一个命令来 “擦除” 硬盘。擦除硬盘意味着向硬盘中写入无意义的数据。例如,许多擦除程序向硬盘中写入零,随机字母或随机数据,没有空间将会被占用或丢失,擦除程序只是对空白空间进行重写覆盖。假如存储单元被文件占满而没有空余空间,则所有先前被删除的文件将会消失。 - -擦除硬盘的目的是确保隐私数据不被他人看见。举个例子,一个公司可能预订了一些新的电脑,总经理决定将旧的电脑卖掉,然而,新的电脑拥有者可能会看到公司的一些机密或诸如信用卡号码,地址等顾客信息。幸好,公司的电脑技术人员可以在卖掉这些旧电脑之前,擦除这些硬盘。 - -为了安装擦除程序 secure-delete,键入 `sudo apt-get install secure-delete`,这个命令将会安装一个包含 4 个程序的程序集,用以确保被删除的文件不能被恢复。 - -- srm - 永久删除一个文件。使用方法: `srm -f ./secret_file.txt` -- sfill - 擦除空白空间。使用方法: `sfill -f /mount/point/of/partition` -- sswap - 擦除 swap 空间。使用方法: `sswap -f /dev/SWAP_DEVICE` - -假如电脑真的要去删除打算删除的文件,那么需要花费更长的时间去执行删除任务。将某些空间标记为空白空间是快速且容易的,但使得文件永远消失需要花费一定的时间。例如,擦除一个存储单元,可能需要花费几个小时的时间(根据磁盘容量大小)。总之,当前的系统工作良好,因为即便用户清空了垃圾箱,他们仍然有另一次机会来改变他们当初的想法。 - --------------------------------------------------------------------------------- - -via: http://www.linux.org/threads/undelete-files-on-linux-systems.4316/ - -作者:[DevynCJohnson][a] -译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linux.org/members/devyncjohnson.4843/ -[1]:http://www.cgsecurity.org/wiki/TestDisk From 020bf9a346a8d2049948f54a99362f5ce2b8b9ea Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 25 Feb 2015 13:05:41 +0800 Subject: [PATCH 107/163] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...50128 Meet Vivaldi--A New Web Browser Built for Power Users.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/share => published}/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md (100%) diff --git a/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md b/published/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md similarity index 100% rename from translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md rename to published/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md From 70f8dc0a24c74bea1c2eb95fca9172a7127fd0d2 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 25 Feb 2015 14:17:06 +0800 Subject: [PATCH 108/163] =?UTF-8?q?20150225-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...kup of LUKS-encrypted disk or partition.md | 80 ++++++ ...ring and filtering in Quagga BGP router.md | 258 ++++++++++++++++++ 2 files changed, 338 insertions(+) create mode 100644 sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md create mode 100644 sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md diff --git a/sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md b/sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md new file mode 100644 index 0000000000..64e872c4b7 --- /dev/null +++ b/sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md @@ -0,0 +1,80 @@ +How to make remote incremental backup of LUKS-encrypted disk/partition +================================================================================ +Some of us have our hard drives at home or on a [VPS][1] encrypted by [Linux Unified Key Setup (LUKS)][2] for security reasons, and these drives can quickly grow to tens or hundreds of GBs in size. So while we enjoy the security of our LUKS device, we may start to think about a possible remote backup solution. For secure off-site backup, we will need something that operates at the block level of the encrypted LUKS device, and not at the un-encrypted file system level. So in the end we find ourselves in a situation where we will need to transfer the entire LUKS device (let's say 200GB for example) each time we want to make a backup. Clearly not feasible. How can we deal with this problem? + +### A Solution: Bdsync ### + +This is when a brilliant open-source tool called [Bdsync][3] (thanks to Rolf Fokkens) comes to our rescue. As the name implies, Bdsync can synchronize "block devices" over network. For fast synchronization, Bdsync generates and compares MD5 checksums of blocks in the local/remote block devices, and sync only the differences. What rsync can do at the file system level, Bdsync can do it at the block device level. Naturally, it works with encrypted LUKS devices as well. Pretty neat! + +Using Bdsync, the first-time backup will copy the entire LUKS block device to a remote host, so it will take a lot of time to finish. However, after that initial backup, if we make some new files on the LUKS device, the second backup will be finished quickly because we will need to copy only that blocks which have been changed. Classic incremental backup at play! + +### Install Bdsync on Linux ### + +Bdsync is not included in the standard repositories of [Linux][4] distributions. Thus you need to build it from the source. Use the following distro-specific instructions to install Bdsync and its man page on your system. + +#### Debian, Ubuntu or Linux Mint #### + + $ sudo apt-get install git gcc libssl-dev + $ git clone https://github.com/TargetHolding/bdsync.git + $ cd bdsync + $ make + $ sudo cp bdsync /usr/local/sbin + $ sudo mkdir -p /usr/local/man/man1 + $ sudo sh -c 'gzip -c bdsync.1 > /usr/local/man/man1/bdsync.1.gz' + +#### Fedora or CentOS/RHEL #### + + $ sudo yum install git gcc openssl-devel + $ git clone https://github.com/TargetHolding/bdsync.git + $ cd bdsync + $ make + $ sudo cp bdsync /usr/local/sbin + $ sudo mkdir -p /usr/local/man/man1 + $ sudo sh -c 'gzip -c bdsync.1 > /usr/local/man/man1/bdsync.1.gz' + +### Perform Off-site Incremental Backup of LUKS-Encrypted Device ### + +I assume that you have already provisioned a LUKS-encrypted block device as a backup source (e.g., /dev/LOCDEV). I also assume that you have a remote host where the source device will be backed up (e.g., as /dev/REMDEV). + +You need to access the root account on both systems, and set up [password-less SSH access][5] from the local host to a remote host. Finally, you need to install Bdsync on both hosts. + +To initiate a remote backup process on the local host, we execute the following command as the root: + + # bdsync "ssh root@remote_host bdsync --server" /dev/LOCDEV /dev/REMDEV | gzip > /some_local_path/DEV.bdsync.gz + +Some explanations are needed here. Bdsync client will open an SSH connection to the remote host as the root, and execute Bdsync client with --server option. As clarified, /dev/LOCDEV is our source LUKS block device on the local host, and /dev/REMDEV is the target block device on the remote host. They could be /dev/sda (for an entire disk) or /dev/sda2 (for a single partition). The output of the local Bdsync client is then piped to gzip, which creates DEV.bdsync.gz (so-called binary patch file) in the local host. + +The first time you run the above command, it will take very long time, depending on your Internet/LAN speed and the size of /dev/LOCDEV. Remember that you must have two block devices (/dev/LOCDEV and /dev/REMDEV) with the same size. + +The next step is to copy the generated patch file from the local host to the remote host. Using scp is one possibility: + + # scp /some_local_path/DEV.bdsync.gz root@remote_host:/remote_path + +The final step is to execute the following command on the remote host, which will apply the patch file to /dev/REMDEV: + + # gzip -d < /remote_path/DEV.bdsync.gz | bdsync --patch=/dev/DSTDEV + +I recommend doing some tests with small partitions (without any important data) before deploying Bdsync with real data. After you fully understand how the entire setup works, you can start backing up real data. + +### Conclusion ### + +In conclusion, we showed how to use Bdsync to perform incremental backups for LUKS devices. Like rsync, only a fraction of data, not the entire LUKS device, is needed to be pushed to an off-site backup site at each backup, which saves bandwidth and backup time. Rest assured that all the data transfer is secured by SSH or SCP, on top of the fact that the device itself is encrypted by LUKS. It is also possible to improve this setup by using a dedicated user (instead of the root) who can run bdsync. We can also use bdsync for ANY block device, such as LVM volumes or RAID disks, and can easily set up Bdsync to back up local disks on to USB drives as well. As you can see, its possibility is limitless! + +Feel free to share your thought. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/remote-incremental-backup-luks-encrypted-disk-partition.html + +作者:[Iulian Murgulet][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/iulian +[1]:http://xmodulo.com/go/digitalocean +[2]:http://xmodulo.com/how-to-create-encrypted-disk-partition-on-linux.html +[3]:http://bdsync.rolf-fokkens.nl/ +[4]:http://xmodulo.com/recommend/linuxbook +[5]:http://xmodulo.com/how-to-enable-ssh-login-without.html \ No newline at end of file diff --git a/sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md b/sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md new file mode 100644 index 0000000000..cae05670ba --- /dev/null +++ b/sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md @@ -0,0 +1,258 @@ +How to set up IPv6 BGP peering and filtering in Quagga BGP router +================================================================================ +In the previous tutorials, we demonstrated how we can set up a [full-fledged BGP router][1] and configure [prefix filtering][2] with Quagga. In this tutorial, we are going to show you how we can set up IPv6 BGP peering and advertise IPv6 prefixes through BGP. We will also demonstrate how we can filter IPv6 prefixes advertised or received by using prefix-list and route-map features. + +### Topology ### + +For this tutorial, we will be considering the following topology. + +![](https://farm9.staticflickr.com/8599/15944659374_1c65852df2_c.jpg) + +Service providers A and B want to establish an IPv6 BGP peering between them. Their IPv6 and AS information is as follows. + +- Peering IP block: 2001:DB8:3::/64 +- Service provider A: AS 100, 2001:DB8:1::/48 +- Service provider B: AS 200, 2001:DB8:2::/48 + +### Installing Quagga on CentOS/RHEL ### + +If Quagga has not already been installed, we can install it using yum. + + # yum install quagga + +On CentOS/RHEL 7, the default SELinux policy, which prevents /usr/sbin/zebra from writing to its configuration directory, can interfere with the setup procedure we are going to describe. Thus we want to disable this policy as follows. Skip this step if you are using CentOS/RHEL 6. + + # setsebool -P zebra_write_config 1 + +### Creating Configuration Files ### + +After installation, we start the configuration process by creating the zebra/bgpd configuration files. + + # cp /usr/share/doc/quagga-XXXXX/zebra.conf.sample /etc/quagga/zebra.conf + # cp /usr/share/doc/quagga-XXXXX/bgpd.conf.sample /etc/quagga/bgpd.conf + +Next, enable auto-start of these services. + +**On CentOS/RHEL 6:** + + # service zebra start; service bgpd start + # chkconfig zebra on; chkconfig bgpd on + +**On CentOS/RHEL 7:** + + # systemctl start zebra; systemctl start bgpd + # systemctl enable zebra; systmectl enable bgpd + +Quagga provides a built-in shell called vtysh, whose interface is similar to those of major router vendors such as Cisco or Juniper. Launch vtysh command shell: + + # vtysh + +The prompt will be changed to: + + router-a# + +or + + router-b# + +In the rest of the tutorials, these prompts indicate that you are inside vtysh shell of either router. + +### Specifying Log File for Zebra ### + +Let's configure the log file for Zebra, which will be helpful for debugging. + +First, enter the global configuration mode by typing: + + router-a# configure terminal + +The prompt will be changed to: + + router-a(config)# + +Now specify log file location. Then exit the configuration mode: + + router-a(config)# log file /var/log/quagga/quagga.log + router-a(config)# exit + +Save configuration permanently by: + + router-a# write + +### Configuring Interface IP Addresses ### + +Let's now configure the IP addresses for Quagga's physical interfaces. + +First, we check the available interfaces from inside vtysh. + + router-a# show interfaces + +---------- + + Interface eth0 is up, line protocol detection is disabled + ## OUTPUT TRUNCATED ### + Interface eth1 is up, line protocol detection is disabled + ## OUTPUT TRUNCATED ## + +Now we assign necessary IPv6 addresses. + + router-a# conf terminal + router-a(config)# interface eth0 + router-a(config-if)# ipv6 address 2001:db8:3::1/64 + router-a(config-if)# interface eth1 + router-a(config-if)# ipv6 address 2001:db8:1::1/64 + +We use the same method to assign IPv6 addresses to router-B. I am summarizing the configuration below. + + router-b# show running-config + +---------- + + interface eth0 + ipv6 address 2001:db8:3::2/64 + + interface eth1 + ipv6 address 2001:db8:2::1/64 + +Since the eth0 interface of both routers are in the same subnet, i.e., 2001:DB8:3::/64, you should be able to ping from one router to another. Make sure that you can ping successfully before moving on to the next step. + + router-a# ping ipv6 2001:db8:3::2 + +---------- + + PING 2001:db8:3::2(2001:db8:3::2) 56 data bytes + 64 bytes from 2001:db8:3::2: icmp_seq=1 ttl=64 time=3.20 ms + 64 bytes from 2001:db8:3::2: icmp_seq=2 ttl=64 time=1.05 ms + +### Phase 1: IPv6 BGP Peering ### + +In this section, we will configure IPv6 BGP between the two routers. We start by specifying BGP neighbors in router-A. + + router-a# conf t + router-a(config)# router bgp 100 + router-a(config-router)# no auto-summary + router-a(config-router)# no synchronization + router-a(config-router)# neighbor 2001:DB8:3::2 remote-as 200 + +Next, we define the address family for IPv6. Within the address family section, we will define the network to be advertised, and activate the neighbors as well. + + router-a(config-router)# address-family ipv6 + router-a(config-router-af)# network 2001:DB8:1::/48 + router-a(config-router-af)# neighbor 2001:DB8:3::2 activate + +We will go through the same configuration for router-B. I'm providing the summary of the configuration. + + router-b# conf t + router-b(config)# router bgp 200 + router-b(config-router)# no auto-summary + router-b(config-router)# no synchronization + router-b(config-router)# neighbor 2001:DB8:3::1 remote-as 100 + router-b(config-router)# address-family ipv6 + router-b(config-router-af)# network 2001:DB8:2::/48 + router-b(config-router-af)# neighbor 2001:DB8:3::1 activate + +If all goes well, an IPv6 BGP session should be up between the two routers. If not already done, please make sure that necessary ports (TCP 179) are [open in your firewall][3]. + +We can check IPv6 BGP session information using the following commands. + +**For BGP summary:** + + router-a# show bgp ipv6 unicast summary + +**For BGP advertised routes:** + + router-a# show bgp ipv6 neighbors advertised-routes + +**For BGP received routes:** + + router-a# show bgp ipv6 neighbors routes + +![](https://farm8.staticflickr.com/7317/16379555088_6e29cb6884_b.jpg) + +### Phase 2: Filtering IPv6 Prefixes ### + +As we can see from the above output, the routers are advertising their full /48 IPv6 prefix. For demonstration purposes, we will consider the following requirements. + +- Router-B will advertise one /64 prefix, one /56 prefix, as well as one full /48 prefix. +- Router-A will accept any IPv6 prefix owned by service provider B, which has a netmask length between /56 and /64. + +We are going to filter the prefix as required, using prefix-list and route-map in router-A. + +![](https://farm8.staticflickr.com/7367/16381297417_6549218289_c.jpg) + +#### Modifying prefix advertisement for Router-B #### + +Currently, router-B is advertising only one /48 prefix. We will modify router-B's BGP configuration so that it advertises additional /56 and /64 prefixes as well. + + router-b# conf t + router-b(config)# router bgp 200 + router-b(config-router)# address-family ipv6 + router-b(config-router-af)# network 2001:DB8:2::/56 + router-b(config-router-af)# network 2001:DB8:2::/64 + +We will verify that all prefixes are received at router-A. + +![](https://farm9.staticflickr.com/8598/16379761980_7c083ae977_b.jpg) + +Great! As we are receiving all prefixes in router-A, we will move forward and create prefix-list and route-map entries to filter these prefixes. + +#### Creating Prefix-List #### + +As described in the [previous tutorial][4], prefix-list is a mechanism that is used to match an IP address prefix with a subnet length. Once a matched prefix is found, we can apply filtering or other actions to the matched prefix. To meet our requirements, we will go ahead and create a necessary prefix-list entry in router-A. + + router-a# conf t + router-a(config)# ipv6 prefix-list FILTER-IPV6-PRFX permit 2001:DB8:2::/56 le 64 + +The above commands will create a prefix-list entry named 'FILTER-IPV6-PRFX' which will match any prefix in the 2001:DB8:2:: pool with a netmask between 56 and 64. + +#### Creating and Applying Route-Map #### + +Now that the prefix-list entry is created, we will create a corresponding route-map rule which uses the prefix-list entry. + + router-a# conf t + router-a(config)# route-map FILTER-IPV6-RMAP permit 10 + router-a(config-route-map)# match ipv6 address prefix-list FILTER-IPV6-PRFX + +The above commands will create a route-map rule named 'FILTER-IPV6-RMAP'. This rule will permit IPv6 addresses matched by the prefix-list 'FILTER-IPV6-PRFX' that we have created earlier. + +Remember that a route-map rule is only effective when it is applied to a neighbor or an interface in a certain direction. We will apply the route-map in the BGP neighbor configuration. As the filter is meant for inbound prefixes, we apply the route-map in the inbound direction. + + router-a# conf t + router-a(config)# router bgp 100 + router-a(config-router)# address-family ipv6 + router-a(config-router-af)# neighbor 2001:DB8:3::2 route-map FILTER-IPV6-RMAP in + +Now when we check the routes received at router-A, we should see only two prefixes that are allowed. + +![](https://farm8.staticflickr.com/7337/16379762020_ec2dc39b31_c.jpg) + +**Note**: You may need to reset the BGP session for the route-map to take effect. + +All IPv6 BGP sessions can be restarted using the following command: + + router-a# clear bgp ipv6 * + +I am summarizing the configuration of both routers so you get a clear picture at a glance. + +![](https://farm9.staticflickr.com/8672/16567240165_eee4398dc8_c.jpg) + +### Summary ### + +To sum up, this tutorial focused on how to set up BGP peering and filtering using IPv6. We showed how to advertise IPv6 prefixes to a neighboring BGP router, and how to filter the prefixes advertised or received are advertised. Note that the process described in this tutorial may affect production networks of a service provider, so please use caution. + +Hope this helps. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/ipv6-bgp-peering-filtering-quagga-bgp-router.html + +作者:[Sarmed Rahman][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/sarmed +[1]:http://xmodulo.com/centos-bgp-router-quagga.html +[2]:http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html +[3]:http://ask.xmodulo.com/open-port-firewall-centos-rhel.html +[4]:http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html \ No newline at end of file From 70106e5d2b9ea58da29e2ac60a39869e91974fdc Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 25 Feb 2015 14:35:46 +0800 Subject: [PATCH 109/163] =?UTF-8?q?20150225-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ilia-Romagna Is Switching To OpenOffice.md | 40 ++++ ...pired GTK And Icon Theme Paper in Linux.md | 67 +++++++ ... to create or extract archives in Linux.md | 187 ++++++++++++++++++ 3 files changed, 294 insertions(+) create mode 100644 sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md create mode 100644 sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md create mode 100644 sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md diff --git a/sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md b/sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md new file mode 100644 index 0000000000..59df5a0b2d --- /dev/null +++ b/sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md @@ -0,0 +1,40 @@ +Italian Region Emilia-Romagna Is Switching To OpenOffice +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Turin_Open_Source.jpg) + +Italy seems to be winning the race to Open Source adoption, it seems. We have learned about how various Italian cities like [Udine][1], [Turin][2], [Todi and Turni][3] opted for [open source alternatives of Microsoft office][4] in the past. Now the news comes that [Emilia-Romagna][5] region in northern Italy is about to complete its switch to [Apache OpenOffice][6] next month. + +### Switching to OpenOffice ### + +The migration to OpenOffice will be complete by next month and will cover 4200 workstations, across 10 departments and 5 agencies. In addition, Open Document Format (ODF) will be the default document format. The initiative to switch to OpenOffice was approved in late 2013 and was originally planned to be completed by end of 2014. The move to OpenOffice from proprietary office product is believed to [save around 2 million euro][8] in licensing fee. + +To ease this migration and improve interoperability, several custom tools and plugins are also being developed by the team in charge of the migration. + +Head of the project, Giovanni Grazia is enthusiastic about the migration but he is prepared for the brickbats as well. + +> “Changing office suite is hard work, and we use the occasion to advocate for free and open source software. Some of the region’s civil servants are keen to switch, and some are very annoyed, as they have been using the proprietary alternative for 20 years. To deal with any issues during the transition, a team of five support staffers is backed up by three IT specialists. Department by department, one at a time, we’re completing the switch. Step by step, change is coming.” + +#### Best wishes #### + +I wish good luck to Grazia and hope that other administrative regions in Italy will follow the suit. I also hope that neighboring countries like [France will also speed up the open source adoption process][8]. + + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/emiliaromagna-completes-switch-openoffice/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/udine-open-source/ +[2]:http://itsfoss.com/italian-city-turin-open-source/ +[3]:http://itsfoss.com/italian-cities-switch-libreoffice/ +[4]:http://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ +[5]:http://en.wikipedia.org/wiki/Emilia-Romagna +[6]:https://www.openoffice.org/ +[7]:http://www.slwoods.co.uk/?p=2886 +[8]:http://itsfoss.com/french-city-toulouse-saved-1-million-euro-libreoffice/ \ No newline at end of file diff --git a/sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md b/sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md new file mode 100644 index 0000000000..33aa731843 --- /dev/null +++ b/sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md @@ -0,0 +1,67 @@ +Install Google’s Material Design Inspired GTK And Icon Theme Paper in Linux +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Paper_theme_Material_Design.jpg) + +[Paper][1] is a new upcoming GTK and icon theme inspired by Google’s [Material design][2] guidelines. It is developed by Sam Hewitt, the man behind [Moka Project][3]. Moka has always been in the list of [best themes for Ubuntu][4] and looking at Paper, I can say that once it is developed completely, it will surely be listed as one of the [best GTK themes][5]. + +Yes, you heard it right. The theme is still under development. Therefore I suggest that if you want to install Paper theme in Ubuntu or any other Linux distributions, do it only for experimentation purpose. You may see some broken icons here and there but the over all experience is nice. + +### Install Paper theme in Ubuntu based distributions via PPA ### + +Sam has a dedicated PPA for Ubuntu based distributions. I recommend that you use this PPA instead of downloading the theme because you’ll be getting the updates on the themes regularly. This PPA is available for Ubuntu 15.04, Ubuntu 14.10, Ubuntu 14.04, Elementary OS Freya, Elementary OS Luna, Linux Mint 17, Linux Mint 16 and other Linux distributions based on Ubuntu. + +Open a terminal and use the following commands: + + sudo add-apt-repository ppa:snwh/pulp + sudo apt-get update + sudo apt-get install paper-gtk-theme paper-icon-theme + +### Download Paper GTK and icon theme ### + +If you do not want to use the PPA, you can download the themes and icons manually. As I said previously, you won’t get the updates automatically this way. + +- [Download Paper icon themes][6] +- [Download Paper GTK themes][7] + +#### Using Paper themes and icons #### + +I hope that you know how to change or install themes in your respective Linux distributions. If you are not unaware of it, below are few tutorials that could help you to install new themes: + +- [How to change themes in Ubuntu Unity][8] +- [How to change themes in GNOME Shell][9] +- [How to change themes in Linux Mint][10] +- [How to change theme in Elementary OS Freya][11] + +#### Here is what Paper theme looks like #### + +Since I am using [Elementary OS Freya][12] these days, here are some of the screenshots of how Paper theme and icons look like in Elementary OS Freya. I have used a wallpaper with Material design look so that it blends well with the icon and themes. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Material_Design_Paper_Theme_Elementary_OS_Freya_1.jpeg) + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Material_Design_Paper_Theme_Elementary_OS_Freya.jpeg) + +How do you find this Material design inspired theme? If you did use it, do share the screenshot of your desktop with rest of us here. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-paper-theme-linux/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://snwh.org/paper/ +[2]:http://www.google.fr/design/spec/material-design/introduction.html +[3]:http://mokaproject.com/moka-icon-theme/ +[4]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ +[5]:http://itsfoss.com/gnome-shell-themes-ubuntu-1404/ +[6]:https://github.com/snwh/paper-icon-theme +[7]:https://github.com/snwh/paper-gtk-theme +[8]:http://itsfoss.com/how-to-install-themes-in-ubuntu-13-10/ +[9]:http://itsfoss.com/install-switch-themes-gnome-shell/ +[10]:http://itsfoss.com/install-icon-linux-mint/ +[11]:http://itsfoss.com/install-themes-icons-elementary-os-freya/ +[12]:http://itsfoss.com/tag/elementary-os-freya/ \ No newline at end of file diff --git a/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md b/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md new file mode 100644 index 0000000000..0a39b7f476 --- /dev/null +++ b/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md @@ -0,0 +1,187 @@ +10 quick tar command examples to create/extract archives in Linux +================================================================================ +### Tar command on Linux ### + +The tar (tape archive) command is a frequently used command on linux that allows you to store files into an archive. + +The commonly seen file extensions are .tar.gz and .tar.bz2 which is a tar archive further compressed using gzip or bzip algorithms respectively. + +In this tutorial we shall take a look at simple examples of using the tar command to do daily jobs of creating and extracting archives on linux desktops or servers. + +### Using the tar command ### + +The tar command is available by default on most linux systems and you do not need to install it separately. + +> With tar there are 2 compression formats, gzip and bzip. The "z" option specifies gzip and "j" option specifies bzip. It is also possible to create uncompressed archives. + +#### 1. Extract a tar.gz archive #### + +Well, the more common use is to extract tar archives. The following command shall extract the files out a tar.gz archive + + $ tar -xvzf tarfile.tar.gz + +Here is a quick explanation of the parameters used - + +> x - Extract files +> +> v - verbose, print the file names as they are extracted one by one +> +> z - The file is a "gzipped" file +> +> f - Use the following tar archive for the operation + +Those are some of the important options to memorise + +**Extract tar.bz2/bzip archives** + +Files with extension bz2 are compressed with the bzip algorithm and tar command can deal with them as well. Use the j option instead of the z option. + + $ tar -xvjf archivefile.tar.bz2 + +#### 2. Extract files to a specific directory or path #### + +To extract out the files to a specific directory, specify the path using the "-C" option. Note that its a capital C. + + $ tar -xvzf abc.tar.gz -C /opt/folder/ + +However first make sure that the destination directory exists, since tar is not going to create the directory for you and will fail if it does not exist. + +#### 3. Extract a single file #### + +To extract a single file out of an archive just add the file name after the command like this + + $ tar -xz -f abc.tar.gz "./new/abc.txt" + +More than once file can be specified in the above command like this + + $ tar -xv -f abc.tar.gz "./new/cde.txt" "./new/abc.txt" + +#### 4. Extract multiple files using wildcards #### + +Wildcards can be used to extract out a bunch of files matching the given wildcards. For example all files with ".txt" extension. + + $ tar -xv -f abc.tar.gz --wildcards "*.txt" + +#### 5. List and search contents of the tar archive #### + +If you want to just list out the contents of the tar archive and not extract them, use the "-t" option. The following command prints the contents of a gzipped tar archive, + + $ tar -tz -f abc.tar.gz + ./new/ + ./new/cde.txt + ./new/subdir/ + ./new/subdir/in.txt + ./new/abc.txt + ... + +Pipe the output to grep to search a file or less command to browse the list. Using the "v" verbose option shall print additional details about each file. + +For tar.bz2/bzip files use the "j" option + +Use the above command in combination with the grep command to search the archive. Simple! + + $ tar -tvz -f abc.tar.gz | grep abc.txt + -rw-rw-r-- enlightened/enlightened 0 2015-01-13 11:40 ./new/abc.txt + +#### 6. Create a tar/tar.gz archive #### + +Now that we have learnt how to extract existing tar archives, its time to start creating new ones. The tar command can be told to put selected files in an archive or an entire directory. Here are some examples. + +The following command creates a tar archive using a directory, adding all files in it and sub directories as well. + + $ tar -cvf abc.tar ./new/ + ./new/ + ./new/cde.txt + ./new/abc.txt + +The above example does not create a compressed archive. Just a plain archive, that puts multiple files together without any real compression. + +In order to compress, use the "z" or "j" option for gzip or bzip respectively. + + $ tar -cvzf abc.tar.gz ./new/ + +> The extension of the file name does not really matter. "tar.gz" and tgz are common extensions for files compressed with gzip. ".tar.bz2" and ".tbz" are commonly used extensions for bzip compressed files. + +#### 7. Ask confirmation before adding files #### + +A useful option is "w" which makes tar ask for confirmation for every file before adding it to the archive. This can be sometimes useful. + +Only those files would be added which are given a yes answer. If you do not enter anything, the default answer would be a "No". + + # Add specific files + + $ tar -czw -f abc.tar.gz ./new/* + add ‘./new/abc.txt’?y + add ‘./new/cde.txt’?y + add ‘./new/newfile.txt’?n + add ‘./new/subdir’?y + add ‘./new/subdir/in.txt’?n + + # Now list the files added + $ tar -t -f abc.tar.gz + ./new/abc.txt + ./new/cde.txt + ./new/subdir/ + +#### 8. Add files to existing archives #### + +The r option can be used to add files to existing archives, without having to create new ones. Here is a quick example + + $ tar -rv -f abc.tar abc.txt + +> Files cannot be added to compressed archives (gz or bzip). Files can only be added to plain tar archives. + +#### 9. Add files to compressed archives (tar.gz/tar.bz2) #### + +Its already mentioned that its not possible to add files to compressed archives. However it can still be done with a simple trick. Use the gunzip command to uncompress the archive, add file to archive and compress it again. + + $ gunzip archive.tar.gz + $ tar -rf archive.tar ./path/to/file + $ gzip archive.tar + +For bzip files use the bzip2 and bunzip2 commands respectively. + +#### 10. Backup with tar #### + +A real scenario is to backup directories at regular intervals. The tar command can be scheduled to take such backups via cron. Here is an example - + + $ tar -cvz -f archive-$(date +%Y%m%d).tar.gz ./new/ + +Run the above command via cron and it would keep creating backup files with names like - +'archive-20150218.tar.gz'. + +Ofcourse make sure that the disk space is not overflown with larger and larger archives. + +#### 11. Verify archive files while creation #### + +The "W" option can be used to verify the files after creating archives. Here is a quick example. + + $ tar -cvW -f abc.tar ./new/ + ./new/ + ./new/cde.txt + ./new/subdir/ + ./new/subdir/in.txt + ./new/newfile.txt + ./new/abc.txt + Verify ./new/ + Verify ./new/cde.txt + Verify ./new/subdir/ + Verify ./new/subdir/in.txt + Verify ./new/newfile.txt + Verify ./new/abc.txt + +Note that the verification cannot be done on compressed archives. It works only with uncompressed tar archives. + +Thats all for now. For more check out the man page for tar command, with "man tar". + +-------------------------------------------------------------------------------- + +via: http://www.binarytides.com/linux-tar-command/ + +作者:[Silver Moon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117145272367995638274/posts \ No newline at end of file From 7e43bae6ac52bb2c1ff79a4d34a367db1c089b56 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 25 Feb 2015 15:23:29 +0800 Subject: [PATCH 110/163] =?UTF-8?q?20150225-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...g kernel code get hired really quickly'.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md diff --git a/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md b/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md new file mode 100644 index 0000000000..6d7e64f616 --- /dev/null +++ b/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md @@ -0,0 +1,31 @@ +Torvalds: 'People who start writing kernel code get hired really quickly' +================================================================================ +Now more than ever, the development of the Linux kernel is a matter for the professionals, as unpaid volunteer contributions to the project reached their lowest recorded levels in the latest "Who Writes Linux" report, which was released today. + +According to the report, which is compiled by the Linux Foundation, just 11.8 percent of kernel development last year was done by unpaid volunteers -- a 19 percent downturn from the 2012 figure of 14.6 percent. The foundation says that the downward trend in volunteer contributions has been present for years. + +![](http://images.techhive.com/images/article/2015/02/screen-shot-2015-02-17-at-5.25.43-pm-100568680-medium.idge.png) + +Even so, unpaid contributors were still the single biggest source of commits in the latest Who Writes Linux, at 11,968 total changes -- good for 12.4 percent of the whole. However, corporate contributors collectively account for much, much more. The Linux Foundation said that more than 80 percent of all work on the kernel is done by paid professional developers. + +According to Linus Torvalds, the shift towards paid developers hasn't changed much about kernel development on its own. + +"I think one reason it hasn't changed things all that much is that it's not so much 'unpaid volunteers are going away' as 'people who start writing kernel code get hired really quickly,'" he told Network World. + +Torvalds said that, while Linux development has changed for plenty of other reasons -- and that, naturally, new contributors pop up all the time -- many of the original developers, with decades of experience, have simply been snapped up by companies with an interest in Linux. + +"We may have started as volunteers, but we're happily employed doing Linux these days," he said. + +Torvalds' own role in development has become increasingly hands-off, according to the report -- he has personally signed off on 329 patches since version 3.10 of kernel was released, or 0.4 percent. Increasingly, subsystem maintainers do their own reviews and merges of code. + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2885339/application-development/torvalds-people-who-start-writing-kernel-code-get-hired-really-quickly.html + +作者:[Jon Gold][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Jon-Gold/ \ No newline at end of file From 77ff06ab90be38b311def439b6aca8c120e67437 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 25 Feb 2015 15:57:22 +0800 Subject: [PATCH 111/163] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... not be opened correctly' on Google Chrome.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/translated/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md b/translated/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md index 0a10253031..faf724786c 100644 --- a/translated/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md +++ b/translated/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md @@ -1,8 +1,8 @@ -Linux有问必答--如果修复Google Chrome 的 ‘Your profile could not be opened correctly’错误 +Linux有问必答——如何修复Google Chrome 的“Your profile could not be opened correctly”错误 ================================================================================ > **提问**:当我在linux打开Google Chrome 浏览器时,我已经几次收到弹出窗口,提示我的档案文件没有被正确打开(Your profile could not be opened correctly.)。每次我打开Chrome都要弹出来,我应该如何修复这个问题? -当你在你的Chrome上看见"Your profile could not be opened correctly"错误信息时,那是因为你的Chrome档案数据已经损坏。这个问题经常发生在手动升级Google Chrome时候。 +当你在你的Chrome上看见"Your profile could not be opened correctly"错误信息时,从某种程度上讲,那是因为你的Chrome配置文件数据已经损坏。这个问题经常发生在手动升级Google Chrome的时候。 ![](https://farm8.staticflickr.com/7428/16238502737_27bdda6685_o.png) @@ -10,7 +10,7 @@ Linux有问必答--如果修复Google Chrome 的 ‘Your profile could not be op ### 方法一 ### -关掉所有Chrome窗口和子窗口。 +关掉所有Chrome窗口和标签页。 进入~/.config/google-chrome/Default,移除或者重命名"Web Data"文件。 @@ -21,9 +21,9 @@ Linux有问必答--如果修复Google Chrome 的 ‘Your profile could not be op ### 方法二 ### -关掉所有Chrome窗口和子窗口。 +关掉所有Chrome窗口和标签页。 -进入~/.config/google-chrome/"Profile 1", 并重命名"History"文件。 +进入~/.config/google-chrome/"Profile 1",并重命名"History"文件。 $ cd ~/.config/google-chrome/"Profile 1" $ mv History History.bak @@ -32,9 +32,9 @@ Linux有问必答--如果修复Google Chrome 的 ‘Your profile could not be op ### 方法三 ### -如果依然没有解决,你可以试试移除所有默认档案文件夹(~/.config/google-chrome/Default)。注意:如果这样做,你将会遗失所有之前打开的Google子窗口,导入的书签,浏览记录和登录数据等。 +如果依然没有解决,你可以试试移除所有默认配置文件夹(~/.config/google-chrome/Default)。注意:如果这样做,你将会遗失所有之前打开的Google标签、导入的书签,浏览记录和登录数据等。 -在移除之前,先关掉所有Chrome窗口和子窗口 +在移除之前,先关掉所有Chrome窗口和标签页 $ rm -rf ~/.config/google-chrome/Default @@ -45,6 +45,6 @@ Linux有问必答--如果修复Google Chrome 的 ‘Your profile could not be op via: http://ask.xmodulo.com/your-profile-could-not-be-opened-correctly-google-chrome.html 译者:[VicYu/Vic020](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d27fb2ce44e1dc30ec4ce87b0dd7efa191bb319b Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 25 Feb 2015 16:08:41 +0800 Subject: [PATCH 112/163] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...our profile could not be opened correctly' on Google Chrome.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md (100%) diff --git a/translated/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md b/published/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md similarity index 100% rename from translated/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md rename to published/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md From e8c24536a2f69179afa5ddf1c675ad218a4f9481 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 25 Feb 2015 16:31:26 +0800 Subject: [PATCH 113/163] =?UTF-8?q?20150225-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...h Answers--How to disable IPv6 on Linux.md | 148 ++++++++++++++++++ ....h--No such file or directory' on Linux.md | 97 ++++++++++++ ...to install a USB webcam in Raspberry Pi.md | 63 ++++++++ ... full kernel source on Debian or Ubuntu.md | 58 +++++++ 4 files changed, 366 insertions(+) create mode 100644 sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md create mode 100644 sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md create mode 100644 sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md create mode 100644 sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md new file mode 100644 index 0000000000..c6f0cde895 --- /dev/null +++ b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md @@ -0,0 +1,148 @@ +Linux FAQs with Answers--How to disable IPv6 on Linux +================================================================================ +> **Question**: I notice that one of my applications is trying to establish a connection over IPv6. But since our local network is not able to route IPv6 traffic, the IPv6 connection times out, and the application falls back to IPv4, which causes unnecessary delay. As I don't have any need for IPv6 at the moment, I would like to disable IPv6 on my Linux box. What is a proper way to turn off IPv6 on Linux? + +IPv6 has been introduced as a replacement of IPv4, the traditional 32-bit address space used in the Internet, to solve the imminent exhaustion of available IPv4 address space. However, since IPv4 has been used by every host or device connected to the Internet, it is practically impossible to switch every one of them to IPv6 overnight. Numerous IPv4 to IPv6 transition mechanisms (e.g., dual IP stack, tunneling, proxying) have been proposed to facilitate the adoption of IPv6, and many applications are being rewritten, as we speak, to add support for IPv6. One thing for sure is that IPv4 and IPv6 will inevitably coexist for the forseeable future. + +Ideally the [ongoing IPv6 transition process][1] should not be visible to end users, but the mixed IPv4/IPv6 environment might sometimes cause you to encounter various hiccups originating from unintended interaction between IPv4 and IPv6. For example, you may experience timeouts from applications such as apt-get or ssh trying to unsuccessfully connecting via IPv6, DNS server accidentally dropping AAAA DNS records for IPv6, or your IPv6-capable device not compatible with your ISP's legacy IPv4 network, etc. + +Of course this doesn't mean that you should blindly disable IPv6 on you Linux box. With all the benefits promised by IPv6, we as a society want to fully embrace it eventually, but as part of troubleshooting process for end-user experienced hiccups, you may try turning off IPv6 to see if indeed IPv6 is a culprit. + +Here are a few techniques allowing you to disable IPv6 partially (e.g., for a certain network interface) or completely on Linux. These tips should be applicable to all major Linux distributions including Ubuntu, Debian, Linux Mint, CentOS, Fedora, RHEL, and Arch Linux. + +### Check if IPv6 is Enabled on Linux ### + +All modern Linux distributions have IPv6 automatically enabled by default. To see IPv6 is activated on your Linux, use ifconfig or ip commands. If you see "inet6" in the output of these commands, this means your Linux has IPv6 enabled. + + $ ifconfig + +![](https://farm8.staticflickr.com/7282/16415082398_5fb0920506_b.jpg) + + $ ip addr + +![](https://farm8.staticflickr.com/7290/16415082248_c4e075548b_c.jpg) + +### Disable IPv6 Temporarily ### + +If you want to turn off IPv6 temporarily on your Linux system, you can use /proc file system. By "temporarily", we mean that the change we make to disable IPv6 will not be preserved across reboots. IPv6 will be enabled back again after you reboot your Linux box. + +To disable IPv6 for a particular network interface, use the following command. + + $ sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf//disable_ipv6' + +For example, to disable IPv6 for eth0 interface: + + $ sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/eth0/disable_ipv6' + +![](https://farm8.staticflickr.com/7288/15982511863_0c1feafe7f_b.jpg) + +To enable IPv6 back on eth0 interface: + + $ sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/eth0/disable_ipv6' + +If you want to disable IPv6 system-wide for all interfaces including loopback interface, use this command: + + $ sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6' + +### Disable IPv6 Permanently across Reboots ### + +The above method does not permanently disable IPv6 across reboots. IPv6 will be activated again once you reboot your system. If you want to turn off IPv6 for good, there are several ways you can do it. + +#### Method One #### + +The first method is to apply the above /proc changes persistently in /etc/sysctl.conf file. + +That is, open /etc/sysctl.conf with a text editor, and add the following lines. + + # to disable IPv6 on all interfaces system wide + net.ipv6.conf.all.disable_ipv6 = 1 + + # to disable IPv6 on a specific interface (e.g., eth0, lo) + net.ipv6.conf.lo.disable_ipv6 = 1 + net.ipv6.conf.eth0.disable_ipv6 = 1 + +To activate these changes in /etc/sysctl.conf, run: + + $ sudo sysctl -p /etc/sysctl.conf + +or simply reboot. + +#### Method Two #### + +An alternative way to disable IPv6 permanently is to pass a necessary kernel parameter via GRUB/GRUB2 during boot time. + +Open /etc/default/grub with a text editor, and add "ipv6.disable=1" to GRUB_CMDLINE_LINUX variable. + + $ sudo vi /etc/default/grub + +---------- + + GRUB_CMDLINE_LINUX="xxxxx ipv6.disable=1" + +In the above, "xxxxx" denotes any existing kernel parameter(s). Add "ipv6.disable=1" after them. + +![](https://farm8.staticflickr.com/7286/15982512103_ec5d940e58_b.jpg) + +Finally, don't forget to apply the modified GRUB/GRUB2 settings by running: + +On Debian, Ubuntu or Linux Mint: + + $ sudo update-grub + +On Fedora, CentOS/RHEL: + + $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg + +Now IPv6 will be completely disabled once you reboot your Linux system. + +### Other Optional Steps after Disabling IPv6 ### + +Here are a few optional steps you can consider after disabling IPv6. This is because while you disable IPv6 in the kernel, other programs may still try to use IPv6. In most cases, such application behaviors will not break things, but you want to disable IPv6 for them for efficiency or safety reason. + +#### /etc/hosts #### + +Depending on your setup, /etc/hosts may contain one or more IPv6 hosts and their addresses. Open /etc/hosts with a text editor, and comment out all lines which contain IPv6 hosts. + + $ sudo vi /etc/hosts + +---------- + + # comment these IPv6 hosts + # ::1 ip6-localhost ip6-loopback + # fe00::0 ip6-localnet + # ff00::0 ip6-mcastprefix + # ff02::1 ip6-allnodes + # ff02::2 ip6-allrouters + +#### Network Manager #### + +If you are using NetworkManager to manage your network settings, you can disable IPv6 on NetworkManager as follows. Open the wired connection on NetworkManager, click on "IPv6 Settings" tab, and choose "Ignore" in "Method" field. Save the change and exit. + +![](https://farm8.staticflickr.com/7293/16394993017_21917f027b_o.png) + +#### SSH server #### + +By default, OpenSSH server (sshd) tries to bind on both IPv4 and IPv6 addresses. + +To force sshd to bind only on IPv4 address, open /etc/ssh/sshd_config with a text editor, and add the following line. inet is for IPv4 only, and inet6 is for IPv6 only. + + $ sudo vi /etc/ssh/sshd_config + +---------- + + AddressFamily inet + +and restart sshd server. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/disable-ipv6-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://www.google.com/intl/en/ipv6/statistics.html \ No newline at end of file diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md new file mode 100644 index 0000000000..8a2ae9cdcc --- /dev/null +++ b/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md @@ -0,0 +1,97 @@ +Linux FAQs with Answers--How to fix “fatal error: lame/lame.h: No such file or directory” on Linux +================================================================================ +> **Question**: I am trying to compile video encoder software on Linux, but the compilation fails with a message saying "fatal error: lame/lame.h: No such file or directory." How can I fix this error? + +The following compilation error suggests that your Linux system does not have LAME library and its development files installed. + + fatal error: lame/lame.h: No such file or directory + +[LAME][1] (short for "LAME Ain't an MP3 Encoder") is a popular MP3 encoding codec licensed with LGPL. Many video encoding/ripping tools use or support LAME. Among them are [FFmpeg][2], VLC, [Audacity][3], K3b, RipperX, and many more. + +To fix the compilation error, you need to install LAME library and its development files, as shown in the following. + +### Install LAME Library and its Development Files on Debian, Ubuntu or Linux Mint ### + +Debian and its derivative systems offer LAME library in their base repositories, so it is easy to install LAME with apt-get. + + $ sudo apt-get install libmp3lame-dev + +### Install LAME Library and its Development Files on Fedora, CentOS/RHEL ### + +On Red Hat based distributions, the LAME encoder library is available via the RPM Fusion's free repository. Thus you first need to set up [RPM Fusion (free) repository][4] before proceeding. + +Once RPM Fusion is set up, install LAME development files as follows. + + $ sudo yum --enablerepo=rpmfusion-free-updates install lame-devel + +As of February, 2015, RPM Fusion repository is not yet available for CentOS/RHEL 7. So this method will not be applicable on CentOS/RHEL 7. In that case, you can install LAME library by building it from the source (which is described below). + +### Compile LAME Library from the Source on Debian, Ubuntu or Linux Mint ### + +If you want to install customized LAME library with different compilation options, you need to build it yourself. Here is how you can compile and install LAME library (along with its header files) on your Debian-based system. + + $ sudo apt-get install gcc git + $ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz + $ tar -xzf lame-3.99.5.tar.gz + $ cd lame-3.99.5 + $ ./configure --enable-static --enable-shared + $ make + $ sudo make install + +Note that when you run configure in the above steps, you can enable or disable various options based on your needs. Run the following command to see all available compilation options. + + $ ./configure --help + +The shared/static LAME libraries are installed in /usr/local/lib by default. To make the shared library accessible to other applications, complete this last step: + +Open /etc/ld.so.conf with your favorite text editor, and append the following line. + + /usr/local/lib + +and then run the command below. This will add shared libraries in /usr/local/lib to the dynamic loader cache, thereby making shared LAME library accessible to other applications. + + $ sudo ldconfig + +### Compile LAME Library from the Source on Fedora or CentOS/RHEL ### + +If your distribution (e.g., CentOS 7) does not offer a pre-built LAME library package, or you want to customize LAME library in any way, you need to build it from the source yourself. Here is how to compile and install LAME library and its development files on a Red Hat based system. + + $ sudo yum install gcc git + $ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz + $ tar -xzf lame-3.99.5.tar.gz + $ cd lame-3.99.5 + $ ./configure --enable-static --enable-shared + $ make + $ sudo make install + +Before running make, feel free to customize compilation options by running configure with appropriate options. You can check available options with: + + $ ./configure --help + +Finally, you need to complete the last step because the shared LAME library installed in /usr/local/lib may not be visible to other applications. + +Append the following line in /etc/ld.so.conf: + + /usr/local/lib + +and then run the command below. This will add shared libraries (including LAME) in /usr/local/lib to the dynamic loader cache, making them visible to other applications. + + $ sudo ldconfig + +![](https://farm8.staticflickr.com/7340/16534478445_abc97cb65a_c.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/fatal-error-lame-no-such-file-or-directory.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://lame.sourceforge.net/ +[2]:http://ask.xmodulo.com/compile-ffmpeg-ubuntu-debian.html +[3]:http://xmodulo.com/how-to-cut-split-or-edit-mp3-file-on-linux.html +[4]:http://xmodulo.com/how-to-install-rpm-fusion-on-fedora.html \ No newline at end of file diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md b/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md new file mode 100644 index 0000000000..443c9c0ad8 --- /dev/null +++ b/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md @@ -0,0 +1,63 @@ +Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi +================================================================================ +> **Question**: Can I use a standard USB-based webcam on Raspberry Pi? How can I check if my USB webcam is compatible with Raspberry Pi, and how can I install it on Raspberry Pi? + +If you want to take pictures or record videos using Raspberry Pi board, you can install [Raspberry Pi camera board][1]. If you do not want to shell out money just for the camera board module, there is yet another way, which is to utilize a commonly found [USB web camera][2]. You may already have one for your PC. + +In this tutorial, we show how to set up a USB web camera on Raspberry Pi board. We assume that you are using Raspbian operation system. + +Before we start, it is better to check if your USB web camera is [one of those][3] which are known to be compatible with Raspberry Pi. If your USB webcam is not found in the compatibility list, don't be discouraged, as there is still a chance that your USB web camera may be detected by Raspberry Pi. + +### Check if a USB Webcam is Compatible with Raspberry Pi ### + +To check whether your USB web camera is detected on Raspberry Pi or not, plug it into the USB port of your Raspberry Pi, and type lsusb command in the terminal. + + $ lsusb + +If the output of the command does not list your webcam, there is a possibility that this is because your Raspberry Pi doesn't supply enough power needed for your USB web camera. In this case, you can try using a separate power line for the USB web camera, such as [USB power hub][4], and then repeat the lsusb command. If the USB webcam is still not recognized, we can only suggest you buy another USB web camera which is supported by Raspberry Pi. + +![](https://farm8.staticflickr.com/7408/16576646025_898f17f36e_o.png) + +In the above screenshot, the USB web camera is detected as "1e4e:0102", but it doesn't show the maker or the name of the web camera. When we try it with Fedora 20 in a laptop, it is successfully detected as "1e4e:0102 Cubeternet GL-UPC822 UVC WebCam." + +Another way to check if your USB web camera is supported by Raspberry Pi is by checking the /dev directory. If there is /dev/video0, this implies that your USB webcam is recognized by Raspberry Pi. + +### Take a Picture with USB Webcam ### + +After your USB webcam is successfully hooked up with Raspberry Pi, the next thing to do is to take some pictures to verify its functionality. + +For this, you can install fswebcam, which is a small webcam application. You can install fswebcam directly from the Raspbian repository as follows. + + $ sudo apt-get install fswebcam + +Once fswebcam is installed, run the following command in a terminal to capture a picture from the USB webcam: + + $ fswebcam --no-banner -r 640x480 image.jpg + +This command will capture a picture with 640x480 resolution, and save it as image.jpg. It will not put any banner in the bottom part of the picture. + +![](https://farm8.staticflickr.com/7417/16576645965_302046d230_o.png) + +Here is the result from the fswebcam command with 640x480 resolution. + +![](https://farm8.staticflickr.com/7345/16575497512_8d77f1b34c_o.jpg) + +The next example picture is captured without defining the resolution. The picture color is blueish, and the default resolution is only 358x288. + +![](https://farm8.staticflickr.com/7390/15954067124_760fbcdd9c_o.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-usb-webcam-raspberry-pi.html + +作者:[Kristophorus Hadiono][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/kristophorus +[1]:http://xmodulo.com/install-raspberry-pi-camera-board.html +[2]:http://xmodulo.com/go/usb_webcam +[3]:http://elinux.org/RPi_USB_Webcams +[4]:http://xmodulo.com/go/usb_powerhub \ No newline at end of file diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md b/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md new file mode 100644 index 0000000000..fdab7af325 --- /dev/null +++ b/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md @@ -0,0 +1,58 @@ +Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu +================================================================================ +> **Question**: I need to download and install a full kernel source tree to compile a custom kernel for my Debian or Ubuntu system. What is a proper way to download full kernel source on Debian or Ubuntu? + +Before installing full kernel source on your Linux system, ask yourself whether you really need the full kernel source. If you are trying to compile a kernel module or a custom driver for your kernel, you do not need the full kernel source. You only need to install [matching kernel header files][1], and that's it. + +You need the full kernel source tree only if you want to build a custom kernel after modifying the kernel code in any way and/or tweaking default kernel options. + +Here is how to **download and install full kernel source tree from Debian or Ubuntu repositories**. While you can download the official kernel source code from [https://www.kernel.org/pub/linux/kernel/][2], using distro's repositories allows you to download a kernel source with the maintainer's patches applied to it. + +### Install Full Kernel Source on Debian ### + +Before downloading kernel source, install dpkg-dev, which contains a suite of development tools needed to build Debian source packages. Among other things, dpkg-dev contains dpgk-source tool which can extract a Debian source package and automatically apply patches. + + $ sudo apt-get install dpkg-dev + +Next, run the following command to download full kernel source. + + $ apt-get source linux-image-$(uname -r) + +Along with the full kernel source (linux_X.X.XX.orig.tar.xz), any available kernel patches (linux_X.X.X+XXX.debian.tar.xz) and source control file (linux_XXXX.dsc) will also be downloaded and stored in the current directory. The .dsc file instructs how the patches are applied to the kernel sources. + +Upon the completion of download, the above command will automatically invoke dpkg-source tool, which will unpack the downloaded kernel source in the current directory, and apply downloaded patches according to .dsc file. + +The final full kernel source tree will be available in the current directory as "linux-X.X.XX". + +![](https://farm9.staticflickr.com/8676/16341110300_b4f059eeb0_b.jpg) + +### Install Full Kernel Source on Ubuntu ### + +If you want to install full kernel source, the Debian way described above should work on Ubuntu as well. + +There is another way to download full kernel source on Ubuntu. You can actually check out the kernel source tree maintained by Canonical for different Ubuntu releases. + +$ sudo apt-get install git +$ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-$(lsb_release --codename | cut -f2).git + +For example, if you are using Ubuntu 14.04, the above command will check out code from "ubuntu-trusty" Git repository. + +![](https://farm9.staticflickr.com/8642/16526856391_de636ff9b8_c.jpg) + +Once you check out the Git repository, use the following command to install necessary development packages to meet the build dependencies for the kernel source tree. + + $ sudo apt-get build-dep linux-image-$(uname -r) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-full-kernel-source-debian-ubuntu.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/install-kernel-headers-linux.html +[2]:https://www.kernel.org/pub/linux/kernel/ \ No newline at end of file From 60fe04463754f2bbfc9c768244f891fb089a663b Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 25 Feb 2015 17:41:18 +0800 Subject: [PATCH 114/163] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... And Persistent Xubuntu Linux USB Drive.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/translated/share/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md b/translated/share/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md index 8025e91aa1..df7266a7a1 100644 --- a/translated/share/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md +++ b/translated/share/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md @@ -1,4 +1,4 @@ -3种创建轻量、持久化的Xubuntu Linux USB系统盘的方法 +3种方法来创建轻量、持久化的Xubuntu Linux USB系统盘 ================================================================================ ### 使用Universal USB Install创建持久化USB Xubuntu系统盘 ### @@ -9,13 +9,13 @@ > 译者注:持久化Linux USB系统盘(Persistent Linux USB drive),安装在优盘的Linux系统,允许用户保存数据到优盘而不是仅仅将这些修改留在内存中。这些数据可以在重启后恢复并且重新使用,甚至是在其他的机器上面启动也没有关系。一般情况下,持久化系统盘会安装一个压缩过的Linux操作系统。 -为什么你需要做这些事情呢,这里有5个很好的理由: +为什么要这样做呢,这里有5个很好的理由: -1. 你想要在你的电脑上安装一个轻量的并且功能完善的Linux版本。 +1. 你想要在你的电脑上安装一个轻量并且功能完善的Linux版本。 2. 你的电脑没有硬盘,那么一个Linux USB系统盘就可以让这台电脑摆脱被扔到垃圾堆的命运。 3. 你想体验一下Linux,但是你却不想花太多的时间去准备。 4. 你想创建一个USB系统恢复盘,并且在优盘上安装一些特定的应用程序。 -5. 你想要一个可以装在屁股口袋或者可以挂在钥匙圈上面的可定制的Linux版本。 +5. 你想要一个可定制的Linux版本,能装在后兜或者挂在钥匙圈上。 现在,我们有了充足的理由,那么开始做一些准备工作吧。 @@ -51,7 +51,7 @@ 14.04版是一个长期维护的版本,维护周期会持续3年。14.10是最新版本,但是只提供9个月的维护。 -你选择了下载站点以后,会提示你选择32位版本或者64位版本。如果你的电脑是32位,就选32位版本,同样,如果你的电脑是64位选64位版本就行了。 +你选择了下载站点以后,会提示你选择32位版本或者64位版本。如果你的电脑是32位,就选32位版本,同样,如果你的电脑是64位,那就选64位版本。 [点击这里,有一个教程来教你辨别你的电脑是32位还是64位][5]。 @@ -105,7 +105,7 @@ Universal USB Installer主界面出现以后,从下拉列表中选择你想要 Startup Disk Creator使用起来很简单。 -界面被划分成两个部分。在上面部分指定下载的系统盘路径,在下面指定安装的优盘。 +界面被划分成两个部分。上部分指定下载的系统盘路径,下部分指定安装的优盘。 首先,点击“Other”按钮,第二步,选择你所下载的Xubuntu ISO文件。 @@ -119,7 +119,7 @@ Startup Disk Creator使用起来很简单。 你创建的过程中,你可能需要输入几次你的系统密码,USB系统盘创建完成以后,你就可以使用它启动到Xubuntu了。 -### 使用UNetbootin创建持久化Xubuntu系统盘 ### +### 使用UNetbootin创建持久化的Xubuntu系统盘 ### ![](http://f.tqn.com/y/linux/1/S/I/J/1/unetbootin1.png) @@ -127,7 +127,7 @@ Startup Disk Creator使用起来很简单。 个人来说,在Windows系统上面我喜欢用Universal USB Installer,但Linux的话,UNetbootin更合适一些。 -> 注:UNetbootin并不是100%完美的,它并不支持所有的Linux发行版。 +> 注:UNetbootin并不是100%完美的,不是所有的Linux发行版都支持。 Windows平台可以点击[这里][8]下载UNetbootin。 @@ -141,11 +141,11 @@ Linux平台可以使用package manager安装UNetbootin。 > sudo unetbootin -UNetbootin的界面分为两个部分。你可以在上面的部分选择一个Linux发行版,然后下载它,如果已经下载了某个发行版,可以在下半部分选择已经下载的系统盘。 +UNetbootin的界面分为两个部分。你可以在上半部分选择一个Linux发行版,然后下载它,如果已经下载了某个发行版,可以在下半部分选择已经下载的系统盘。 点击“Diskimage”单选框,然后点击三个点的按钮。找到已经下载的Xubuntu ISO文件。路径会显示到按钮旁边的文本框里面。 -修改“Space used to preserve files across reboots”的值,来指定你想要用来存储“持久化”数据的空间大小。 +设置“Space used to preserve files across reboots”的值,来指定你想要用来存储“持久化”数据的空间大小。 类型选择USB drive,然后选择优盘的盘符。 @@ -159,7 +159,7 @@ via : http://linux.about.com/od/howtos/ss/How-To-Create-A-Persistent-Bootable-Xu 作者:[Gary Newell][a] 译者:[zhouj-sh](https://github.com/Zhouj-sh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -171,4 +171,4 @@ via : http://linux.about.com/od/howtos/ss/How-To-Create-A-Persistent-Bootable-Xu [5]:http://pcsupport.about.com/od/fixtheproblem/f/32-bit-64-bit-windows.htm [6]:http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/ [7]:http://linux.about.com/od/howtos/fl/Learn-Ubuntu-The-Unity-Dash.htm -[8]:http://linux.about.com/od/howtos/ss/How-To-Create-A-UEFI-Bootable-Ubuntu-USB-Drive-Using-Windows.htm \ No newline at end of file +[8]:http://linux.about.com/od/howtos/ss/How-To-Create-A-UEFI-Bootable-Ubuntu-USB-Drive-Using-Windows.htm From 3438c76734e75297dda40151723eb4c7f78d7c2c Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 26 Feb 2015 03:49:20 +0800 Subject: [PATCH 115/163] Update 20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md --- ...--How to install full kernel source on Debian or Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md b/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md index fdab7af325..65b3a08c48 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md @@ -1,3 +1,5 @@ +translating by martin. + Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu ================================================================================ > **Question**: I need to download and install a full kernel source tree to compile a custom kernel for my Debian or Ubuntu system. What is a proper way to download full kernel source on Debian or Ubuntu? @@ -55,4 +57,4 @@ via: http://ask.xmodulo.com/install-full-kernel-source-debian-ubuntu.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://ask.xmodulo.com/install-kernel-headers-linux.html -[2]:https://www.kernel.org/pub/linux/kernel/ \ No newline at end of file +[2]:https://www.kernel.org/pub/linux/kernel/ From cd55dcb403f32cc6bb90d5fb09f865d2f042c257 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 26 Feb 2015 10:10:39 +0800 Subject: [PATCH 116/163] PUB:20140821 What is a good EPUB reader on Linux @shipsw --- ...140821 What is a good EPUB reader on Linux.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/share => published}/20140821 What is a good EPUB reader on Linux.md (65%) diff --git a/translated/share/20140821 What is a good EPUB reader on Linux.md b/published/20140821 What is a good EPUB reader on Linux.md similarity index 65% rename from translated/share/20140821 What is a good EPUB reader on Linux.md rename to published/20140821 What is a good EPUB reader on Linux.md index 2b919ee6bb..7c3c4ea287 100644 --- a/translated/share/20140821 What is a good EPUB reader on Linux.md +++ b/published/20140821 What is a good EPUB reader on Linux.md @@ -1,25 +1,25 @@ Linux版EPUB阅读器 ================================================================================ -如果说用平板电脑看书尚属主流的话,那么在电脑上读书就非常少见了。专注阅读16世纪的书是非常困难的了,没人希望后台蹦出Facebook聊天窗口。但是如果你非要在电脑上打开电子书的话,那么你需要一个电子书阅读软件。大多数编辑支持使用EPUB格式来存放电子书(电子出版物)。幸运的书,linux上从不缺乏此类软件。以下书一些Linux上比较好的EPUB阅读软件。 +如果说用平板电脑看书尚属主流的话,那么在电脑上读书就非常少见了。专注阅读16世纪的书是非常困难的了,没人希望后台蹦出QQ聊天窗口。但是如果你非要在电脑上打开电子书的话,那么你需要一个电子书阅读软件。大多数出版物支持使用EPUB格式的电子书(电子出版物)。幸运的是,linux上从不缺乏EPUB阅读器类的软件。以下是一些Linux上不错的EPUB阅读软件。 ### 1. Calibre ### ![](https://farm6.staticflickr.com/5577/14975176155_0989766bb3_z.jpg) -先从列表中最有名的软件开始: [Calibre][1]。Calibre 不仅仅是个阅读器,他还是个电子图书馆。软件支持几乎所有的格式,集成了阅读器,管理器,一个可以从互联网下载书籍封面的元数据编辑器,一个EPUB编辑器,新闻阅读器和一个用来下载电子书的搜索引擎。可喜的是,界面丝毫不逊色专业的阅读软件。唯一的缺点书如果你只想要一个EPUB阅读器的话,这个软件还是太大了。 +先从列表中最有名的软件开始: [Calibre][1]。Calibre 不仅仅是个阅读器,它还是个电子图书馆。软件支持几乎所有的格式,集成了阅读器、管理器、一个可以从互联网下载书籍封面的元数据编辑器、一个EPUB编辑器、新闻阅读器和一个用来下载电子书的搜索引擎。可喜的是,界面丝毫不逊色专业的阅读软件。唯一的缺点是如果你只想要一个EPUB阅读器的话,这个软件还是太大了。 ### 2. FBReader ### ![](https://farm4.staticflickr.com/3900/14975176165_f2e4afd2fa_o.jpg) -[FBReader][2] 也是一个图书馆管理软件,但是比Calibre小。界面简洁分为两个部分:左边书文件管理、元数据编辑、和下载新书等功能;右边书阅读区。如果你喜欢简洁,这个软件挺不错。我个人非常喜欢这类直观标记书籍和分类的做法。 +[FBReader][2] 也是一个图书馆管理软件,但是比Calibre小。界面简洁分为两个部分:左边是文件管理、元数据编辑和下载新书等功能;右边是阅读区。如果你喜欢简洁,这个软件挺不错。我个人非常喜欢这类直观标记书籍和分类的做法。 ### 3. Cool Reader ### ![](https://farm6.staticflickr.com/5594/14975176195_ac46952150.jpg) -对于那些只想想看EPUB书内容的用户,我推荐 [Cool Reader][5]。遵循Linux应用程序的规则,Cool Reader 做了优化,每次只打开一个EPUB文件,可以使用简单的快捷键进行阅读和导航。由于程序书基于Qt开发的,所以他也遵循Qt的规则,需要大量的设置项。 +对于那些只想想看EPUB书内容的用户,我推荐 [Cool Reader][5]。遵循Linux应用程序的文化,Cool Reader 做了优化,每次只打开一个EPUB文件,可以使用简单的快捷键进行阅读和导航。由于程序书基于Qt开发的,所以他也遵循Qt的风格,需要大量的设置项。 ### 4. Okular ### @@ -31,19 +31,19 @@ Linux版EPUB阅读器 ![](https://farm4.staticflickr.com/3835/14788504789_e7c742fa20_z.jpg) -[pPub][4]是个老项目,Github上可以找到这个项目,他最后的更新已经是在两年前了。尽管如此,这个软件还是值得使用的,pPub是用Python编写的,基于GTK3和WebKit,是个简单轻量的软件。界面可能需要一些更新,不够简洁,但是内部却非常好。软件支持JavaScript。所以,谁来捡起这个项目呢? +[pPub][4]是个老项目,Github上可以找到这个项目,它最后的更新已经是在两年前了。尽管如此,这个软件还是值得使用的,pPub是用Python编写的,基于GTK3和WebKit,是个简单轻量的软件。界面可能需要一些更新,不够简洁,但是内部却非常好。软件支持JavaScript。所以,谁来捡起这个项目呢? ### 6. epub ### ![](https://farm4.staticflickr.com/3871/14788844378_16fb51a1b9_z.jpg) -如果你只是想快速简单的查看EPUB文件的内容,不关心任何图形化界面功能的话,最好使用命令行模式打开EPUB。[epub][6] 是一个用Python编写的阅读器,可以在终端环境读取EPUB文件的内容。软件可以在章节、页面见切换,没有其他的功能。这是最简洁的EPUB阅读器了。 +如果你只是想快速简单的查看EPUB文件的内容,不关心任何图形化界面功能的话,最好使用命令行模式打开EPUB。[epub][6] 是一个用Python编写的阅读器,可以在终端环境读取EPUB文件的内容。软件可以在章节、页面间切换,没有其他的功能。这是最简洁的EPUB阅读器了。 ### 7. Sigil ### ![](https://farm4.staticflickr.com/3921/14788640417_7940627871_z.jpg) -最后介绍的这个实际上不是个EPUB阅读器,应该是个独立的编辑器。[Sigil][7] 可以提取EPUB文件的内容并转换成其他格式:xhtml文本,图像,格式,还有其他的内容,比如音频等。界面比基本的阅读器复杂,但是功能还是比较丰富的。我很喜欢他的标签体系,如果你对网页比较熟悉的话,这个软件书很好使用的。 +最后介绍的这个实际上不是个EPUB阅读器,应该是个独立的编辑器。[Sigil][7] 可以提取EPUB文件的内容并将其分离成其他格式:xhtml文本、图像、css,及其他的内容比如音频等。界面比基本的阅读器复杂,但是功能还是比较丰富的。我很喜它的标签体系,如果你对网页比较熟悉的话,这个软件是很好使用的。 总结,有很多的开源的EPUB阅读器,有一些只有最基本的功能, 另外一些功能却太多了。一般来说,我建议你选择一个最合适的使用。如果你有更好的EPUB阅读器,请在评论里告诉我们! @@ -53,7 +53,7 @@ via: http://xmodulo.com/2014/08/good-epub-reader-linux.html 作者:[Adrien Brochard][a] 译者:[shipsw](https://github.com/shipsw) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 96d2a1f51ce516d0d2789398a1ba4de0305facfc Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 26 Feb 2015 10:22:32 +0800 Subject: [PATCH 117/163] translating --- ...or--lame or lame.h--No such file or directory' on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md index 8a2ae9cdcc..0ee6b607c8 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md @@ -1,3 +1,5 @@ +Translating----geekpi + Linux FAQs with Answers--How to fix “fatal error: lame/lame.h: No such file or directory” on Linux ================================================================================ > **Question**: I am trying to compile video encoder software on Linux, but the compilation fails with a message saying "fatal error: lame/lame.h: No such file or directory." How can I fix this error? @@ -94,4 +96,4 @@ via: http://ask.xmodulo.com/fatal-error-lame-no-such-file-or-directory.html [1]:http://lame.sourceforge.net/ [2]:http://ask.xmodulo.com/compile-ffmpeg-ubuntu-debian.html [3]:http://xmodulo.com/how-to-cut-split-or-edit-mp3-file-on-linux.html -[4]:http://xmodulo.com/how-to-install-rpm-fusion-on-fedora.html \ No newline at end of file +[4]:http://xmodulo.com/how-to-install-rpm-fusion-on-fedora.html From 73d713daa9214e4665973c813b2010f8b299e64c Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 26 Feb 2015 10:32:51 +0800 Subject: [PATCH 118/163] PUB:20150209 Non-Linux FOSS--Homebrew @geekpi --- .../20150209 Non-Linux FOSS--Homebrew.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/share => published}/20150209 Non-Linux FOSS--Homebrew.md (71%) diff --git a/translated/share/20150209 Non-Linux FOSS--Homebrew.md b/published/20150209 Non-Linux FOSS--Homebrew.md similarity index 71% rename from translated/share/20150209 Non-Linux FOSS--Homebrew.md rename to published/20150209 Non-Linux FOSS--Homebrew.md index a6f30ec50e..d132d55555 100644 --- a/translated/share/20150209 Non-Linux FOSS--Homebrew.md +++ b/published/20150209 Non-Linux FOSS--Homebrew.md @@ -1,14 +1,14 @@ -非Linux的免费开源软件:Homebrew +非Linux的自由开源软件:Homebrew ================================================================================ -我日常工作中使用的是OS X。我能容忍它很大程序上是因为它的终端。如果我不能在黑色背景绿色文字的终端下工作,我想我会疯了。不幸的是,OS Xmei没有我需要的全部命令行工具。Homebrew的到来拯救了这。 +我日常工作中使用的是OS X。我能容忍它很大程序上是因为它的终端。如果我不能在黑色背景绿色文字的终端下工作,我想我会疯了。不幸的是,OS X 没有我需要的全部命令行工具。Homebrew的到来拯救了我。 ![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11811fossf1.png) -Homebrew扮演了OS X中缺乏的包管理器的角色。命令的使用很像apt-get,它能够安装无数的应用。一个最好的例子是wget。我很惊讶OS X中没有包含wget,但是homebrew中有,这是最简单的一套了 +Homebrew扮演了OS X中所缺乏的包管理器的角色。命令的使用很像apt-get,它能够安装无数的应用。一个最好的例子是wget。我很惊讶OS X中没有包含wget,但是homebrew中有,很简单就安装上了。 最棒的是homebrew在/usr/local文件夹下安装软件。你不必担心homebrew会破坏你的系统,因为它不会访问/usr/local之外的其他文件。OSX系统更新不会覆盖你的程序,并且/usr/local/bin已经在PATH中,使用homebrew安装的程序可以直接工作。 -homebrew使用ruby管理它的包和功能,但是使用它不需要任何编程知识。并且安装过程只需要在命令行中复制粘贴就好了。如果你使用的是OS X,但是你希望像在Linux中那样方便地安装熬,就试一试homrbrew吧:[http://brew.sh][1]。 +homebrew使用ruby管理它的包和功能,但是使用它不需要任何编程知识。并且安装过程只需要在命令行中复制粘贴就好了。如果你使用的是OS X,但是你希望像在Linux中那样方便地安装,就试一试homrbrew吧:[http://brew.sh][1]。 -------------------------------------------------------------------------------- @@ -16,7 +16,7 @@ via: http://www.linuxjournal.com/content/non-linux-foss-homebrew 作者:[Shawn Powers][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 94a00e2594b7e49bd232f13ec8ec7a3ef7b81330 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 26 Feb 2015 10:53:05 +0800 Subject: [PATCH 119/163] translated --- ....h--No such file or directory' on Linux.md | 99 ------------------- ....h--No such file or directory' on Linux.md | 98 ++++++++++++++++++ 2 files changed, 98 insertions(+), 99 deletions(-) delete mode 100644 sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md create mode 100644 translated/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md deleted file mode 100644 index 0ee6b607c8..0000000000 --- a/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md +++ /dev/null @@ -1,99 +0,0 @@ -Translating----geekpi - -Linux FAQs with Answers--How to fix “fatal error: lame/lame.h: No such file or directory” on Linux -================================================================================ -> **Question**: I am trying to compile video encoder software on Linux, but the compilation fails with a message saying "fatal error: lame/lame.h: No such file or directory." How can I fix this error? - -The following compilation error suggests that your Linux system does not have LAME library and its development files installed. - - fatal error: lame/lame.h: No such file or directory - -[LAME][1] (short for "LAME Ain't an MP3 Encoder") is a popular MP3 encoding codec licensed with LGPL. Many video encoding/ripping tools use or support LAME. Among them are [FFmpeg][2], VLC, [Audacity][3], K3b, RipperX, and many more. - -To fix the compilation error, you need to install LAME library and its development files, as shown in the following. - -### Install LAME Library and its Development Files on Debian, Ubuntu or Linux Mint ### - -Debian and its derivative systems offer LAME library in their base repositories, so it is easy to install LAME with apt-get. - - $ sudo apt-get install libmp3lame-dev - -### Install LAME Library and its Development Files on Fedora, CentOS/RHEL ### - -On Red Hat based distributions, the LAME encoder library is available via the RPM Fusion's free repository. Thus you first need to set up [RPM Fusion (free) repository][4] before proceeding. - -Once RPM Fusion is set up, install LAME development files as follows. - - $ sudo yum --enablerepo=rpmfusion-free-updates install lame-devel - -As of February, 2015, RPM Fusion repository is not yet available for CentOS/RHEL 7. So this method will not be applicable on CentOS/RHEL 7. In that case, you can install LAME library by building it from the source (which is described below). - -### Compile LAME Library from the Source on Debian, Ubuntu or Linux Mint ### - -If you want to install customized LAME library with different compilation options, you need to build it yourself. Here is how you can compile and install LAME library (along with its header files) on your Debian-based system. - - $ sudo apt-get install gcc git - $ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz - $ tar -xzf lame-3.99.5.tar.gz - $ cd lame-3.99.5 - $ ./configure --enable-static --enable-shared - $ make - $ sudo make install - -Note that when you run configure in the above steps, you can enable or disable various options based on your needs. Run the following command to see all available compilation options. - - $ ./configure --help - -The shared/static LAME libraries are installed in /usr/local/lib by default. To make the shared library accessible to other applications, complete this last step: - -Open /etc/ld.so.conf with your favorite text editor, and append the following line. - - /usr/local/lib - -and then run the command below. This will add shared libraries in /usr/local/lib to the dynamic loader cache, thereby making shared LAME library accessible to other applications. - - $ sudo ldconfig - -### Compile LAME Library from the Source on Fedora or CentOS/RHEL ### - -If your distribution (e.g., CentOS 7) does not offer a pre-built LAME library package, or you want to customize LAME library in any way, you need to build it from the source yourself. Here is how to compile and install LAME library and its development files on a Red Hat based system. - - $ sudo yum install gcc git - $ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz - $ tar -xzf lame-3.99.5.tar.gz - $ cd lame-3.99.5 - $ ./configure --enable-static --enable-shared - $ make - $ sudo make install - -Before running make, feel free to customize compilation options by running configure with appropriate options. You can check available options with: - - $ ./configure --help - -Finally, you need to complete the last step because the shared LAME library installed in /usr/local/lib may not be visible to other applications. - -Append the following line in /etc/ld.so.conf: - - /usr/local/lib - -and then run the command below. This will add shared libraries (including LAME) in /usr/local/lib to the dynamic loader cache, making them visible to other applications. - - $ sudo ldconfig - -![](https://farm8.staticflickr.com/7340/16534478445_abc97cb65a_c.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/fatal-error-lame-no-such-file-or-directory.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://ask.xmodulo.com/author/nanni -[1]:http://lame.sourceforge.net/ -[2]:http://ask.xmodulo.com/compile-ffmpeg-ubuntu-debian.html -[3]:http://xmodulo.com/how-to-cut-split-or-edit-mp3-file-on-linux.html -[4]:http://xmodulo.com/how-to-install-rpm-fusion-on-fedora.html diff --git a/translated/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md b/translated/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md new file mode 100644 index 0000000000..685e637072 --- /dev/null +++ b/translated/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md @@ -0,0 +1,98 @@ +Linux 有问必答:如何在Linux中修复“fatal error: lame/lame.h: No such file or directory” +================================================================================ +> **提问**: 我尝试着在Linux中编译视频编码器,但是编译提示出错:“fatal error: lame/lame.h: No such file or directory”, 我该如何修复这个错误? + +下面的编译错误说明你的系统没有安装LAME库和它的开发文件。 + + fatal error: lame/lame.h: No such file or directory + +[LAME][1]("LAME Ain't an MP3 Encoder")是一个流行的LPGL授权的MP3编码器。许多视频编码工具使用或者支持LAME。这其中有[FFmpeg][2]、 VLC、 [Audacity][3]、 K3b、 RipperX等。 + +要修复这个编译错误,你需要安装LAME库和开发文件,按照下面的来。 + +### 在Debian、Ubuntu或者Linux Mint上安装LAME库和安装文件 ### + +Debian和它的衍生版在基础库中已经提供了LAME库,因此可以用apt-get直接安装。 + + $ sudo apt-get install libmp3lame-dev + +### 在Fedora、CentOS/RHEL上安装LAME库和安装文件 ### + +在基于RED HAT的版本中,LAME在RPM Fusion的免费仓库中就有,那么你需要先设置[RPM Fusion (免费)仓库][4]。 + +RPM Fusion设置完成后,如下安装LAME开发文件。 + + $ sudo yum --enablerepo=rpmfusion-free-updates install lame-devel + +在2015年1月,RPM Fusion仓库已经不可以在CentOS/RHEL 7中可用了。因此,这个方法不能用在CentOS/RHEL 7 中。这时你就要从源码安装LAME库了(下面会描述)。 + +### 在Debian、Ubuntu或者Linux Mint中从源码编译LAME库 ### + +如果你希望用不同的编译选项安装自定义的LAME库,你需要自己编译。下面是怎样在基于Debian的系统中编译和安装LAME库(和它的头文件)。 + + $ sudo apt-get install gcc git + $ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz + $ tar -xzf lame-3.99.5.tar.gz + $ cd lame-3.99.5 + $ ./configure --enable-static --enable-shared + $ make + $ sudo make install + +注意当你运行上面的配置步骤时,你可以根据你的需求启用会禁止不同的选项。运行下面的命令查看不同的编译选项。 + + $ ./configure --help + +共享/静态LAME默认安装在 /usr/local/lib。要让共享库可以被其他程序使用,完成最后一步: + +用编辑器打开 /etc/ld.so.conf,加入下面这行。 + + /usr/local/lib + +接着运行下面的命令,这会将/usr/local/lib中的共享库添加到动态加载缓存中,因此LAME库就可以被其他程序调用了。 + + $ sudo ldconfig + +### 在Fedora或者CentOS/RHEL中从源码编译LAME库 ### + +如果你的发行版(比如 CentOS 7)没有提供预编译的LAME库,或者你想要自定义LAME库,你需要从源码自己编译。下面是在基于Red Hat的系统中编译安装LAME库的方法。 + + + $ sudo yum install gcc git + $ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz + $ tar -xzf lame-3.99.5.tar.gz + $ cd lame-3.99.5 + $ ./configure --enable-static --enable-shared + $ make + $ sudo make install + +运行make之前,你可以在configure中带上合适的选项自定义编译选项。你可以用下面的命令检查可用的选项: + + $ ./configure --help + +最后你需要完成最后一步,因为安装在/usr/local/lib的LAME共享库可能在其他程序中不可用。 + +在/etc/ld.so.conf中添加下面这行: + + /usr/local/lib + +接着运行下面的命令。这会添加 /usr/local/lib中的共享库(包括LAME)到动态加载缓存中,让其他程序可以访问到。 + + $ sudo ldconfig + +![](https://farm8.staticflickr.com/7340/16534478445_abc97cb65a_c.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/fatal-error-lame-no-such-file-or-directory.html + +作者:[Dan Nanni][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://lame.sourceforge.net/ +[2]:http://ask.xmodulo.com/compile-ffmpeg-ubuntu-debian.html +[3]:http://xmodulo.com/how-to-cut-split-or-edit-mp3-file-on-linux.html +[4]:http://xmodulo.com/how-to-install-rpm-fusion-on-fedora.html From ceb65922fa430335b090705fa1013365267f6abd Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 26 Feb 2015 14:10:47 +0800 Subject: [PATCH 120/163] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Create A Lightweight And Persistent Xubuntu Linux USB Drive.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/share => published}/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md (100%) diff --git a/translated/share/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md b/published/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md similarity index 100% rename from translated/share/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md rename to published/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md From 42db52ade961c8f9ad60e9bc2886919d46ef4cb5 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 27 Feb 2015 19:26:37 +0800 Subject: [PATCH 121/163] =?UTF-8?q?20150227-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share/20150227 Chess in a Few Bytes.md | 114 +++++ ...Bunch of Best Known Linux Network Tools.md | 444 ++++++++++++++++++ ...oid Apps on Ubuntu using ARChon Runtime.md | 114 +++++ ...diting is supported GRUB Error In Linux.md | 86 ++++ ...pdate cannot be used to add new CD-ROMs.md | 72 +++ ...eight Budgie v8 Desktop in Ubuntu 14.04.md | 98 ++++ 6 files changed, 928 insertions(+) create mode 100644 sources/share/20150227 Chess in a Few Bytes.md create mode 100644 sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md create mode 100644 sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md create mode 100644 sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md create mode 100644 sources/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md create mode 100644 sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md diff --git a/sources/share/20150227 Chess in a Few Bytes.md b/sources/share/20150227 Chess in a Few Bytes.md new file mode 100644 index 0000000000..26ef9d523d --- /dev/null +++ b/sources/share/20150227 Chess in a Few Bytes.md @@ -0,0 +1,114 @@ +Chess in a Few Bytes +================================================================================ +I am showing my age by mentioning that my introduction to computing was a ZX81, a home computer produced by a UK developer (Sinclair Research) which had a whopping 1KB of RAM. The 1KB is not a typographical error, the home computer really shipped with a mere 1KB of onboard memory. But this memory limitation did not prevent enthusiasts producing a huge variety of software. In fact the machine sparked a generation of programming wizards who were forced to get to grips with its workings. The machine was upgradable with a 16KB RAM pack which offered so many more coding possibilities. But the unexpanded 1KB machine still inspired programmers to release remarkable software. + +![1K ZX Chess ](http://www.linuxlinks.com/portal/content2/reviews/Games2/1KZXChess.jpg) + +My favourite ZX81 games were Flight Simulation, 3D Monster Maze, Galaxians, and above all 1K ZX Chess. Only the latter was written for the unexpanded ZX81. In fact, David Horne's 1K ZX Chess was coded in a mere 672 bytes of RAM. However, the game managed to implement most chess rules, and offer a computer opponent. While some important rules were omitted (castling, pawn promotion, and en passant capture), it was still amazing to be able to play against artificial intelligence. The game took up a fair chunk of my misspent youth. + +1K ZX Chess remained the smallest implementation of chess on any computer for 33 years until the record was broken by BootChess this year, and subsequently by Toledo AtomChess. These three games do not implement all of the chess rules, so for completeness I have included my favourite small implementation of chess that implements a complete set of chess rules. + +Linux has a good range of extremely strong chess engines such as Stockfish, Critter, Togo II, Crafty, GNU Chess, and Komodo. The chess engines featured in this article offer no match to a good chess engine, but they show how much can be achieved with a minuscule codebase. + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/ToledoAtomchess.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Toledo.png) + +You may have seen a considerable amount of press coverage about BootChess, a chess program written in 487 bytes of code, smashing the record of the then smallest chess program, 1K ZX Chess. Óscar Toledo Gutiérrez took up the mantle and decided to code an even more compact chess game. Toledo Atomchess is a mere 481 bytes of x86 assembly code which fits in a boot sector. The engine plays a reasonable game of chess given the limitations of its incredibly small codebase. + +Features include: + +- Basic chess movements +- ASCII text representation of chess board +- Moves are entered in algebraic form +- Search depth of 3-ply + +Obviously, to fit the chess of game into 481 bytes, the author had to make some sacrifices. These limitations include: + +- No promotion of pawns +- No castling +- No en passant +- No move validation + +The author has also written chess programs in C, JavaScript and Java; each are very small implementations of chess. + +- Website: [nanochess.org/chess6.html][1] +- Developer: Óscar Toledo Gutiérrez +- License: Free for non-commercial use +- Version Number: - + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/BootChess.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-BootChess.png) + +BootChess is an extremely small computer implementation of chess. The game is crammed into a mere 487 bytes and runs on Windows, Mac OS X and Linux operating systems. The board and pieces of BootChess are represented by text alone, with P representing pawns, Q used for the queens and full stops entered for empty squares. + +Features include: + +- Graphic text representation of chess board and use input +- Bootsector sized (512 bytes) with a playable chess game +- x86 bios hardware only bootstrap (no software dependencies) +- All main legal moves including double square pawn start +- Pawn promotion to queen (contrary to 1k ZX Chess) +- CPU artificial intelligence called taxiMax > minMax half-ply +- Hard-coded Spanish white pieces opening + +Again, there are some important limitations. Omissions include: + +- Under-promotion +- En passant pawn capture +- No castling +- 3-repetition rule +- 50 move draw rule +- No opening or closing books +- One or more minMax/negaMax full plies for artificial intelligence + +- Website: [www.pouet.net/prod.php?which=64962][2] +- Developer: Olivier "Baudsurfer/RSi" Poudade +- License: WTFPL v2 +- Version Number: .02 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/Micro-Max.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Micro-Max.png) + +Micro-Max is a 133-line chess source which is written in C + +The author has implemented a (hash) transposition table, the engine checks the legality of the input moves, and full FIDE rules except for for under-promotions. + +Features include: + +- Recursive negamax search +- Quiescence search with recaptures +- Recapture extensions +- Iterative deepening +- Best-move-first 'sorting' +- Hash table storing score and best move +- Full FIDE rules (except under promotion) and move-legality checking + +There is also a stripped-down 1433-character version, but allowing you to play under-promotions for full FIDE-rule compliance. + +- Website: [home.hccnet.nl/h.g.muller/max-src2.html][3] +- Developer: Harm Geert Muller +- License: The MIT License +- Version Number: 3.2 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150222033906262/ChessBytes.html + +作者:Frazer Kline +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://nanochess.org/chess6.html +[2]:http://www.pouet.net/prod.php?which=64962 +[3]:http://home.hccnet.nl/h.g.muller/max-src2.html \ No newline at end of file diff --git a/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md b/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md new file mode 100644 index 0000000000..207abb0530 --- /dev/null +++ b/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md @@ -0,0 +1,444 @@ +Bringing a Bunch of Best Known Linux Network Tools +================================================================================ +It is very useful to use command line tools to monitor the network on your system and there are a tons of them out there available for the linux user such as nethogs, ntopng, nload, iftop, iptraf, bmon, slurm, tcptrack, cbm, netwatch, collectl, trafshow, cacti, etherape, ipband, jnettop, netspeed and speedometer. + +Since there are many linux gurus and developers out there it is obvious that other network monitoring tools exist but I am not going to cover all of them in this tutorial. + +Each one of the above tools has its own specifics but at the end all they do is monitor network traffic and there is not really only one way to do the job. For example nethogs can be used to show bandwidth per process in case you want to know the application which is consuming your entire network resources, iftop can be used to show bandwidth per socket connection and tools like nload help to get information about the overall bandwidth. + +### 1) nethogs ### + +nethogs is a free tool that is very handy when it comes to find out which PID is causing the trouble with your network traffic as it groups bandwidth by process instead of breaking the traffic down per protocol or per subnet, like most tools do. It is feature rich, supports both IPv4 and IPv6 and in my opinion is the best utility when you want to identify programs that are consuming all your bandwidth on your linux machine. + +A linux user can use **nethogs** to show TCP download and upload-speed per process, monitor a specific device by using the command **nethogs eth0** where eth0 is the name of the device you want to get information from and also get information on the speed at which the data is currently being transferred. + +To me nethogs is very easy to use, maybe because I like it so much that I use it all the time to monitor network bandwidth on my Ubuntu 12.04 LTS machine. + +For example to sniff in promiscious the option -p is used like shown in the following command. + + nethogs -p wlan0 + +If you like to learn more about nethogs and explore it in a very deep way than don't hesitate to read our full tutorial on this network bandwidth monitoring tool. + +### 2) nload ### + +nload is a console application which can be used to monitor network traffic and bandwidth usage in real time and it also visualizes the traffic by providing two easy to understand graphs. This cool network monitoring tool can also be used to switch between devices while monitoring and this can be done by pressing the left and right arrow keys. + +![network monitoring tools in linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload8.png) + +As you can see from the above screenshot graphs provided by the nload tool are very easy to understand, provide useful information and also display additional info like total amount of transferred data and min/max network usage. + +And what is even cooler is the fact that you can run the tool nload with the help of the following command which seems to be very short and easy to remember. + + nload + +I am very sure that our detailed tutorial on how to use nload will help new linux users and even experienced ones that are looking for more information on it. + +### 3) slurm ### + +slurm is another network load monitoring tool for linux which shows results in a nice ascii grap and it also supports many keys for interaction such as c to switch to classic mode, s to switch to split graph mode, **r** to redraw the screen, **L** to enable TX/RX led, **m** to switch between classic split and large view, and **q** to quit slurm. + +![linux network load monitoring tools](http://blog.linoxide.com/wp-content/uploads/2013/12/slurm2.png) + +There are also some other keys available in the network load monitoring tool slurm and you can easily study them in the manual page by using the following command. + + man slurm + +slurm is available in the official repos of Ubuntu and Debian so users of these distros can easy download it by using the apt-get install command like shown below. + + sudo apt-get install slurm + +We have covered slurm usage on a tutorial so please visit it and do not forget to share the knowledge with other linux friends. + +### 4) iftop ### + +iftop is a very useful tool when you want to display bandwidth usage on an interface by host. According to the manual page **iftop** listens to network traffic on a named interface, or on the first +interface it can find which looks like an external interface if none is specified, and displays a table of current bandwidth usage by pairs of hosts. + +Ubuntu and Debian users can easily install iftop on their machines by using the following command on a terminal. + + sudo apt-get install iftop + +Use the following command to install iftop on your machine using yum + + yum -y install iftop + +### 5) collectl ### + +collectl can be used to collect data that describes the current system status and it supports the following modes: + +- Record Mode +- Playback Mode + +**Record Mode** allows to take data from a live system and either display it on a terminal or writte to one or more files or a socket. + +**Playback Mode** + +According to the manual pages in this mode data is read from one or more data files that were generated in Record Mode. + +Ubuntu and Debian users can use their default package manager to install collectl on their machines. The following command will do the job for them. + + sudo apt-get install collectl + +Use the following command because these distros have collectl in their official repos too. + + yum install collectl + +### 6) Netstat ### + +Netstat is a command line tool for **monitoring incoming** and **outgoing network packets statistics** as well as interface statistics. It displays network connections for the Transmission Control Protocol (both incoming and outgoing),routing tables, and a number of network interface (network interface controller or software-defined network interface) and network protocol statistics. + +Ubuntu and Debian users can use the default package manager to install netstat on their box. Netstat software includes inside the package net-tools. And can be installed by running the below commands in a shell or terminal: + + sudo apt-get install net-tools + +CentOS, Fedora, RHEL users can use the default package manager to install netstat on their box. Netstat software includes inside the package net-tools. And can be installed by running the below commands in a shell or terminal: + + yum install net-tools + +Simply, run the following to monitor the network packet statistic with Netstat: + + netstat + +![Netstat](http://blog.linoxide.com/wp-content/uploads/2015/02/netstat.png) + +For more information or manual about netstat, we can simply type man netstat in a shell or terminal: + + man netstat + +![man netstat](http://blog.linoxide.com/wp-content/uploads/2015/02/man-netstat.png) + +### 7) Netload ### + +The netload command just displays a small report on the current traffic load, and the total number of bytes transferred since the program start. No more features are there. Its part of the netdiag. + +We can install Netload using yum in fedora as it is in the default repository. But if you're running CentOS or RHEL, we'll need to install [rpmforge repository][1] . + + # yum install netdiag + +Netload is available in the default repository as a part of netdiag so, we can easily install **netdiag** using **apt** manager using the command below. + + $ sudo install netdiag + +To run netload, we must make sure to choose a working network interface name like eth0, eh1, wlan0, mon0, etc. And run the following command accordingly in a shell or a terminal. + + $ netload wlan2 + +Note: Please replace wlan2 with the network interface name you wanna use. If you wanna scan for your network interface name run ip link show in a terminal or shell. + +### 8) Nagios ### + +Nagios is a leading open source powerful monitoring system that enables network/system administrators to identify and resolve server related problems before they affect major business processes. With the Nagios system, administrators can able to monitor remote Linux, Windows, Switches, Routers and Printers on a single window. It shows critical warnings and indicates if something went wrong in your network/server which indirectly helps you to begin remediation processes before they occur. + +Nagios has a web interface in which there is a graphical monitor of activities. One can login to the web interface by browsing to the url http://localhost/nagios/ or http://localhost/nagios3/ . Please replace localhost with your IP-address if on remote machine. Then enter the username and pass then, we'll get to see the information like shown below. + +![Nagios3 on Chromium](http://blog.linoxide.com/wp-content/uploads/2015/02/nagios3-ubuntu.png) + +### 9) EtherApe ### + +EtherApe is a graphical network monitor for Unix modeled after etherman. Featuring link layer, IP and TCP modes and support interfaces Ethernet, FDDI, Token Ring, ISDN, PPP, SLIP and WLAN devices, plus several encapsulation formats. Hosts and links change in size with traffic and color coded protocols display. It can filter traffic to be shown, and can read packets from a file as well as live from the network. + +It is easy to install etherape in CentOS, Fedora, RHEL distributions of Linux cause they are available default on their official repository. We can use yum manager to install it with the command shown below: + + yum install etherape + +We can install EtherApe on Ubuntu, Debian and their derivatives using **apt** manager with the below command. + + sudo apt-get install etherape + +After EtherApe is installed on the system, we'll need to run etherape in root permission as: + + sudo etherape + +Then, the **GUI** of **etherape** will be executed. Then, up in the menu we can select the **Mode** (IP, Link Layer, TCP) and **Interface** under **Capture**. After everything are set, we'll need to click **Start** button. Then, we'll gonna see something like this. + +![EtherApe](http://blog.linoxide.com/wp-content/uploads/2015/02/etherape.png) + +### 10) tcpflow ### + +tcpflow is a command line utility that captures data transmitted as part of TCP connections (flows), and stores the data in a way that is convenient for protocol analysis or debugging. It reconstructs the actual data streams and stores each flow in a separate file for later analysis. It understands TCP sequence numbers and will correctly reconstruct data streams regardless of retransmissions or out-of-order delivery . + +Installing tcpflow in Ubuntu, Debian system is easy via **apt** manager as it is available by default in the official repository. + + $ sudo apt-get install tcpflow + +We can install tcpflow in Fedora, CentOS, RHEL and their derivatives from repository using **yum** manager as shown below. + + # yum install tcpflow + +If it is not available in the repository or can't be installed via yum manager, we need to install manually from **http://pkgs.repoforge.org/tcpflow/** as shown below. + +If you are running 64 bit PC: + + # yum install --nogpgcheck http://pkgs.repoforge.org/tcpflow/tcpflow-0.21-1.2.el6.rf.x86_64.rpm + +If you are running 32 bit PC: + + # yum install --nogpgcheck http://pkgs.repoforge.org/tcpflow/tcpflow-0.21-1.2.el6.rf.i686.rpm + +We can use tcpflow to capture all/some tcp traffic and put it in an easy to read file. The below command does what we want but we'll need to run that command in an empty directory as it creates files of the format x.x.x.x.y-a.a.a.a.z and after done, just press Control-C that command to stop it. + + $ sudo tcpflow -i eth0 port 8000 + +Note: Please replace eth0 with the interface of the card you are trying to capture. + +### 11) IPTraf ### + +[IPTraf][2] is a console-based network statistics utility for Linux. It gathers a variety of figures such as TCP connection packet and byte counts, interface statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN station packet and byte counts. + +IPTraf is available in the default repository so, we can easily install IPTraf using **apt** manager using the command below. + + $ sudo apt-get install iptraf + +IPTraf is available in the default repository so, we can easily install IPTraf using yum manager using the command below. + + # yum install iptraf + +We need to run TPTraf in administration permission with a valid network interface name. Here, we have wlan2 so, we'll be using wlan2 as interface name. + + $ sudo iptraf + +![IPTraf](http://blog.linoxide.com/wp-content/uploads/2015/02/iptraf.png) + +To start the general interface statistics, enter: + + # iptraf -g + +To see the detailed statistics facility on an interface called eth0 + + # iptraf -d wlan2 + +To see the TCP and UDP monitor on an interface called eth0 + + # iptraf -z wlan2 + +To displays the packet size counts on an interface called eth0 + + # iptraf -z wlan2 + +Note: Please replace wlan2 with your interface name. You can check your interface by running command ip link show . + +### 12) Speedometer ### + +Speedometer is a small and simple tool that just draws out good looking graphs of incoming and outgoing traffic through a given interface. + +Speedometer is available in the default repository so, we can easily install Speedometer using yum manager using the command below. + + # yum install speedometer + +Speedometer is available in the default repository so, we can easily install Speedometer using apt manager using the command below. + + $ sudo apt-get install speedometer + +Speedometer can simply be run by executing the following command in a shell or a terminal. + + $ speedometer -r wlan2 -t wlan2 + +![Speedometer](http://blog.linoxide.com/wp-content/uploads/2015/02/Speedometer.png) + +Note: Please replace wlan2 with the network interface name you would like to use. + +### 13) Netwatch ### + +Netwatch is part of the netdiag collection of tools, and it too displays the connections between local host and other remote hosts, and the speed at which data is transferring on each connection. + +We can install Netwatch using yum in fedora as it is in the default repository. But if you're running CentOS or RHEL, we'll need to install [rpmforge repository][3] . + + # yum install netwatch + +Netwatch is available in the default repository as a part of netdiag so, we can easily install **netdiag** using **apt** manager using the command below. + + $ sudo install netdiag + +To run netwatch, we'll need to execute the following command in a terminal or shell. + + $ sudo netwatch -e wlan2 -nt + +![Netwatch](http://blog.linoxide.com/wp-content/uploads/2015/02/netwatch.png) + +Note: Please replace wlan2 with the network interface name you wanna use. If you wanna scan for your network interface name run ip link show in a terminal or shell. + +### 14) Trafshow ### + +Trafshow reports the current active connections like netwatch and pktstat, trafshow, their protocol and the data transfer speed on each connection. It can filter out connections using pcap type filters. + +We can install Netwatch using yum in fedora as it is in the default repository. But if you're running CentOS or RHEL, we'll need to install [rpmforge repository][4] . + +# yum install trafshow + +Trafshow is available in the default repository so, we can easily install it using **apt** manager using the command below. + + $ sudo install trafshow + +To monitor using trafshow, we'll need to run the following command in a shell or terminal. + + $ sudo trafshow -i wlan2 + +![Trafshow](http://blog.linoxide.com/wp-content/uploads/2015/02/trafshow-all.png) + +To monitor specifically tcp connections add tcp as shown below. + + $ sudo trafshow -i wlan2 tcp + +![Trafshow tcp](http://blog.linoxide.com/wp-content/uploads/2015/02/trafshow-tcp.png) + +Note: Please replace wlan2 with the network interface name you wanna use. If you wanna scan for your network interface name run ip link show in a terminal or shell. + +### 15) Vnstat ### + +Vnstat is bit different from most of the other tools. It actually runs a background service/daemon and keeps recording the size of data transfer all the time. Next it can be used to generate a report of the history of network usage. + +We'll need to turn on EPEL Repository then run **yum** manager to install vnstat. + + # yum install vnstat + +Vnstat is available in the default repository. So, we can run **apt** manager to install it using the following command. + + $ sudo apt-get install vnstat + +Running vnstat without any options would simply show the total amount of data transfer that took place since the date the daemon is running. + + $ vnstat + +![vnstat](http://blog.linoxide.com/wp-content/uploads/2015/02/vnstat.png) + +To monitor the bandwidth usage in realtime, use the '-l' option (live mode). It would then show the total bandwidth used by incoming and outgoing data, but in a very precise manner without any internal details about host connections or processes. + + $ vnstat -l + +![Vnstat live mode](http://blog.linoxide.com/wp-content/uploads/2015/02/vnstat-live.png) + +After done, press Ctrl-C to stop which will result the following type of output + +![Vnstat Live Result](http://blog.linoxide.com/wp-content/uploads/2015/02/vnstat-live-result.png) + +### 16) tcptrack ### + +[tcptrack][5] displays the status of TCP connections that it sees on a given network interface. tcptrack monitors their state and displays information such as state, source/destination addresses and bandwidth usage in a sorted, updated list very much like the **top** command. + +As tcptrack is in the repository , we can simply install tcptrack in Debian, Ubuntu from their repository using apt manager. To do so, we'll need to execute the following command in a shell or terminal: + + $ sudo apt-get install tcptrack + +We can install it using yum in fedora as it is in the default repository. But if you're running CentOS or RHEL, we'll need to install [rpmforge repository][6] . To do so, we'll need to run the following commands. + + # wget http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm + + # rpm -Uvh rpmforge-release*rpm + + # yum install tcptrack + +Note: Here, we have downloaded current latest version of rpmforge-release ie 0.5.3-1 . You can always get the latest version from rpmforge repository and do replace with that you downloaded in the above command. + +**tcptrack** needs to be run in root permission or superuser. We'll need to execute tcptrack with the network interface name we wanna monitor the TCP connections of. Here, we've wlan2 so will be using that as: + + sudo tcptrack -i wlan2 + +![tcptrack](http://blog.linoxide.com/wp-content/uploads/2015/02/tcptrack.png) + +If you wanna monitor of specific ports then: + + # tcptrack -i wlan2 port 80 + +![tcptrack port 80](http://blog.linoxide.com/wp-content/uploads/2015/02/tcptrack-port-80.png) + +Please replace 80 with the port number you wanna monitor .Note: Please replace wlan2 with the network interface name you wanna use. If you wanna scan for your network interface name run ip link show in a terminal or shell. + +### 17) CBM ### + +The CBM or Color Bandwidth Meter displays current traffic of all network device. This program is so simple that is should be self-explanatory. Source code and newer versions of CBM are available at [http://www.isotton.com/utils/cbm/][7] . + +As CBM is in the repository , we can simply install CBM in Debian, Ubuntu from their repository using **apt** manager. To do so, we'll need to execute the following command in a shell or terminal: + + $ sudo apt-get install cbm + +We simply need to run cbm in a shell or terminal as shown below: + + $ cbm + +![Color Bandwidth Meter](http://blog.linoxide.com/wp-content/uploads/2015/02/cbm.png) + +### 18) bmon ### + +[Bmon][8] or Bandwidth Monitoring is a tool that intended for debugging and monitor bandwidth in real-time access. This tool is capable to retrieving statistics from various input modules. It provides various output methods including a curses based interface,lightweight HTML output but also formatable ASCII output. + +bmon is available in the repository, so we can install it in Debian, Ubuntu from their repository using apt manager. To do so, we'll need to run the following command in a shell or terminal. + + $ sudo apt-get install bmon + +We can run bmon and monitor our bandwidth status using the command below. + + $ bmon + +![bmon](http://blog.linoxide.com/wp-content/uploads/2015/02/bmon.png) + +### 19) tcpdump ### + +[TCPDump][9] is a tool for network monitoring and data acquisition. It can save lots of time and can be used for debugging network or server related problems. It prints out a description of the contents of packets on a network interface that match the boolean expression. + +tcpdump is available in the default repository of Debian, Ubuntu so, we can simply use apt manager to install it under sudo privilege . To do so, we'll need to run the following command in a shell or terminal. + + $ sudo apt -get install tcpdump + +tcpdump is also available in the repository of Fedora, CentOS, RHEL so, we can install it via yum manager as: + + # yum install tcpdump + +tcpdump needs to be run in root permission or superuser. We'll need to execute tcpdump with the network interface name we wanna monitor the TCP connections of. Here, we've wlan2 so will be using it as: + + $ sudo tcpdump -i wlan2 + +![tcpdump](http://blog.linoxide.com/wp-content/uploads/2015/02/tcpdump.png) + +If you want to monitor to a specific port only, then can run the command as follows. Here is the example for port 80 (webserver). + + $ sudo tcpdump -i wlan2 'port 80' + +![tcpdump port](http://blog.linoxide.com/wp-content/uploads/2015/02/tcpdump-port.png) + +### 20) ntopng ### + +[ntopng][20] is the next generation version of the original ntop. It is a network probe that shows network usage in a way similar to what top does for processes. ntopng is based on libpcap and it has been written in a portable way in order to virtually run on every Unix platform, MacOSX and on Win32 as well. + +To install ntopng in Debian, Ubuntu system, we'll first need to install the required **dependencies packages to compile ntopng**. You can install them all by running the below command in a shell or a terminal. + + $ sudo apt-get install libpcap-dev libglib2.0-dev libgeoip-dev redis-server wget libxml2-dev build-essential checkinstall + +Now, we'll need to manually compile ntopng for our system as: + + $ sudo wget http://sourceforge.net/projects/ntop/files/ntopng/ntopng-1.1_6932.tgz/download + $ sudo tar zxfv ntopng-1.1_6932.tgz + $ sudo cd ntopng-1.1_6932 + $ sudo ./configure + $ sudo make + $ sudo make install + +Now, you should have your ntopng installed in your Debian or Ubuntu system. + +We have already covered tutorial on ntopng usages. It is available in both command line and web interface. We can go ahead to get knowledge on it. + +### Conclusion ### + +In this first part we covered some network load monitoring tools for linux that are very helpful to a sysadmin and even a novice user. Each one of the tools covered in this article has its own specifics, different options but at the end they all help you to monitor your network traffic. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/monitoring-2/network-monitoring-tools-linux/ + +作者:[Bobbin Zachariah][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/bobbin/ +[1]:http://pkgs.org/centos-7/repoforge-x86_64/netwatch-1.0c-1.el7.rf.x86_64.rpm.html +[2]:http://iptraf.seul.org/ +[3]:http://pkgs.org/centos-7/repoforge-x86_64/netwatch-1.0c-1.el7.rf.x86_64.rpm.html +[4]:http://pkgs.org/centos-6/epel-x86_64/trafshow-5.2.3-6.el6.x86_64.rpm.html +[5]:http://linux.die.net/man/1/tcptrack +[6]:http://pkgs.org/centos-6/repoforge-x86_64/tcptrack-1.4.0-1.el6.rf.x86_64.rpm.html +[7]:http://www.isotton.com/utils/cbm/ +[8]:https://github.com/tgraf/bmon/ +[9]:http://www.tcpdump.org/ +[10]:http://www.ntop.org/ \ No newline at end of file diff --git a/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md b/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md new file mode 100644 index 0000000000..f85b2cf725 --- /dev/null +++ b/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md @@ -0,0 +1,114 @@ +Enjoy Android Apps on Ubuntu using ARChon Runtime +================================================================================ +Before, we gave try to many android app emulating tools like Genymotion, Virtualbox, Android SDK, etc to try to run android apps on it. But, with this new Chrome Android Runtime, we are able to run Android Apps on our Chrome Browser. So, here are the steps we'll need to follow to install Android Apps on Ubuntu using ARChon Runtime. + +Google had [announced the first set of Android apps is ready to run natively on Chrome OS][1], a feature made possible using a new ‘**Android Runtime**’ extension. Now, a developer named Vlad Filippov has figured out a way to bring Android Apps to Chrome on the desktop. His chromeos-apk script and ARChon Android Runtime extension work hand-in-hand to bring Android apps to Chrome browser on the Windows, Mac and Linux desktop. + +Performance of this apps through the runtime is not pretty good. Similarly, as its both an unofficial repackaging of the official runtime and running outside of Google's Chrome OS, system integration like webcam, speakers, etc. may be patchy or non-existent. + +### Installing Chrome ### + +First of all, we'll need Chrome installed in our machine, Chrome version 37 or higher is required. We can download them from the [download page of Chrome Browser][2]. + +If you wanna install a Dev Channel version you'll need to follow below procedure. + +We'll need to add repository source list for Google Chrome which can be done my using the following command. + + $ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - + $ sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' + +![Adding google source list](http://blog.linoxide.com/wp-content/uploads/2015/02/adding-google-source-list.png) + +After adding the repository source list, we'll need to update the local repository index by the command below. + + $ sudo apt-get update + +Now, we'll gonna install google chrome unstable which is dev version. + + $ sudo apt-get install google-chrome-unstable + +![Installing Google chrome unstable](http://blog.linoxide.com/wp-content/uploads/2015/02/installing-google-chrome-unstable.png) + +### Installing Archon Runtime ### + +Next we'll need to download the custom-made ergo officially not endorsed by Google or Chromium Android Runtime created by Vlad Filippov. This differs from the official version in a number of ways, the chief being it can be used on desktop versions of the browser. Here below is the runtime we need to download, please select anyone of the following according to your bit of Ubuntu installed. + +For **32-bit** Ubuntu Distributions: + +- [Download Archron for 32-bit Ubuntu][3] + +For **64-bit** Ubuntu Distributions: + +- [Download Archron for 64-bit Ubuntu][4] + +Once the runtime has fully downloaded you will need to extract the contents from the .zip files and move the resulting directory to Home. Here is the gist commands for this steps to download and extract the contents. + + $ wget https://github.com/vladikoff/chromeos-apk/releases/download/v3.0.0/ARChon-v1.1-x86_32.zip + +![Downloading ARChon](http://blog.linoxide.com/wp-content/uploads/2015/02/download-archon.png) + + $ unzip ARChon-v1.1-x86_32.zip ~/ + +Now to install the runtime, we'll gonna Open our latest Google Chrome and goto the url **chrome://extensions/** then, we'll need to check ‘**Enable developer mode**’. Finally, we'll gonna click on the ‘**load unpacked extension**’ button and select the folder which was placed into **~/Home**. + +### Installing ChromeOS-APK ### + +To convert APKs manually is something you really don’t need to do any more if you use one of the apps mentioned above — you will need to install the ‘[chromeos-apk][5]’ command line JavaScript utility. This is available to install through the Node Packaged Modules (npm) manager. To install nmp and chromeos-apk, we'll need to run the following command in a shell or terminal. + + $ sudo apt-get install npm nodejs nodejs-legacy + +**If you are running 64 bit OS**, you should grab the following library, to do so run the below commands in a shell or terminal. + + $ sudo apt-get install lib32stdc++6 + +Now run the command to install the the latest chromeos-apk is: + + $ npm install -g chromeos-apk@latest + +![chromeos apk installation](http://blog.linoxide.com/wp-content/uploads/2015/02/chomeos-apk-installation.png) + +Depending on your system configuration you may need to need to run this latter command as sudo. + +Now, we'll gonna for Google to find an APK of an app to give it a try, bearing in mind **not all Android apps will work**, and those that do may be unstable or lack features. Most of the messenger out of the box are not working. + +### Converting APK ### + +Place your **Android APK in ~/Home**, then return to **Terminal** to convert it using the following command: + + $ chromeos-apk myapp.apk --archon + +If you want the app in fullscreen mode then run the following instead: + + $ chromeos-apk myapp.apk --archon --tablet + +Note: Please replace myapp.apk to the Android APK app filename you want to convert. + +For our ease, we can also use [Twerk][6] for the conversion process if we want to skip this step. + +### Running Android Apk ### + +Finally, we'll need to open our chrome browser and then goto chrome://extensions page and enable developer mode then tap the ‘load unpacked extension’ button and select the folder the script above created. + +Now, we can Open the Chrome App Launcher to run it. + +### Conclusion ### + +Hurray! We have successfully installed Android Apk App in our favorite desktop browser ie Chrome Browser. This article is all about the popular Chrome Android Runtime called Archon created by Vlad Filippov. This runtime allows us to run converted Apk files in our Chrome browser. It has not yet supported messaging apps like Whatsapp, etc. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy Archon :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/android-apps-ubuntu-archon-runtime/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://chrome.blogspot.com/2014/09/first-set-of-android-apps-coming-to.html +[2]:https://www.google.com/chrome/browser +[3]:https://github.com/vladikoff/chromeos-apk/releases/download/v3.0.0/ARChon-v1.1-x86_32.zip +[4]:https://github.com/vladikoff/chromeos-apk/releases/download/v3.0.0/ARChon-v1.1-x86_64.zip +[5]:https://github.com/vladikoff/chromeos-apk/blob/master/README.md +[6]:https://chrome.google.com/webstore/detail/twerk/jhdnjmjhmfihbfjdgmnappnoaehnhiaf \ No newline at end of file diff --git a/sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md b/sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md new file mode 100644 index 0000000000..88b742d4f9 --- /dev/null +++ b/sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md @@ -0,0 +1,86 @@ +Fix Minimal BASH like line editing is supported GRUB Error In Linux +================================================================================ +The other day when I [installed Elementary OS in dual boot with Windows][1], I encountered a Grub error at the reboot time. I was presented with command line with error message: + +**Minimal BASH like line editing is supported. For the first word, TAB lists possible command completions. anywhere else TAB lists possible device or file completions.** + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_Linux_1.jpeg) + +Indeed this is not an error specific to Elementary OS. It is a common [Grub][2] error that could occur with any Linux OS be it Ubuntu, Fedora, Linux Mint etc. + +In this post we shall see **how to fix this “minimal BASH like line editing is supported” Grub error in Ubuntu** based Linux systems. + +> You can read this tutorial to fix similar and more frequent issue, [error: no such partition grub rescue in Linux][3]. + +### Prerequisites ### + +To fix this issue, you would need the followings: + +- A live USB or disk of the same OS and same version +- A working internet connection in the live session + +Once you make sure that you have the prerequisites, let’s see how to fix the black screen of death for Linux (if I can call it that ;)). + +### How to fix this “minimal BASH like line editing is supported” Grub error in Ubuntu based Linux ### + +I know that you might point out that this Grub error is not exclusive to Ubuntu or Ubuntu based Linux distributions, then why am I putting emphasis on the world Ubuntu? The reason is, here we will take an easy way out and use a tool called **Boot Repair** to fix our problem. I am not sure if this tool is available for other distributions like Fedora. Without wasting anymore time, let’s see how to solve minimal BASH like line editing is supported Grub error. + +### Step 1: Boot in lives session ### + +Plug in the live USB and boot in to the live session. + +### Step 2: Install Boot Repair ### + +Once you are in the lives session, open the terminal and use the following commands to install Boot Repair: + + sudo add-apt-repository ppa:yannubuntu/boot-repair + sudo apt-get update + sudo apt-get install boot-repair + +Note: Follow this tutorial to [fix failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs error][4], if you encounter it while running the above command. + +### Step 3: Repair boot with Boot Repair ### + +Once you installed Boot Repair, run it from the command line using the following command: + + boot-repair & + +Actually things are pretty straight forward from here. You just need to follow the instructions provided by Boot Repair tool. First, click on **Recommended repair** option in the Boot Repair. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu.png) + +It will take couple of minutes for Boot Repair to analyze the problem with boot and Grub. Afterwards, it will provide you some commands to use in the command line. Copy the commands one by one in terminal. For me it showed me a screen like this: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_1.png) + +It will do some processes after you enter these commands: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_2.png) + +Once the process finishes, it will provide you a URL which consists of the logs of the boot repair. If your boot issue is not fixed even now, you can go to the forum or mail to the dev team and provide them the URL as a reference. Cool, isn’t it? + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Final_Ubuntu.png) + +After the boot repair finishes successfully, shutdown your computer, remove the USB and boot again. For me it booted successfully but added two additional lines in the Grub screen. Something which was not of importance to me as I was happy to see the system booting normally again. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_Linux_2.jpeg) + +### Did it work for you? ### + +So this is how I fixed **minimal BASH like line editing is supported Grub error in Elementary OS Freya**. How about you? Did it work for you? Feel free to ask a question or drop a suggestion in the comment box below. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-minimal-bash-line-editing-supported-grub-error-linux/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/guide-install-elementary-os-luna/ +[2]:http://www.gnu.org/software/grub/ +[3]:http://itsfoss.com/solve-error-partition-grub-rescue-ubuntu-linux/ +[4]:http://itsfoss.com/fix-failed-fetch-cdrom-aptget-update-add-cdroms/ \ No newline at end of file diff --git a/sources/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md b/sources/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md new file mode 100644 index 0000000000..2815330506 --- /dev/null +++ b/sources/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md @@ -0,0 +1,72 @@ +How To Fix: Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/12/elementary_OS_Freya.jpg) + +These days I am experimenting with Elementary OS Freya and during this, I encountered a very common updater error: **Failed to fetch cdrom Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs**. The complete error looked like this after running the apt-get update command: + +> W: Failed to fetch cdrom://elementary OS 0.3 _Freya_ – Daily amd64 (20150208)/dists/trusty/main/binary-amd64/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs +> +> W: Failed to fetch cdrom://elementary OS 0.3 _Freya_ – Daily amd64 (20150208)/dists/trusty/restricted/binary-amd64/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs +> +> E: Some index files failed to download. They have been ignored, or old ones used instead. + +In this post, we shall see how to fix this error. + +### Fix Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs error ### + +The reason for this error is that cdrom has been included as one of the the sources here. And to fix this issue, we need to remove this from the list of software sources. + +In Ubuntu, look for Software & Updates: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Software_Update_Ubuntu.jpeg) + +In the first tab Ubuntu Software, look for the cdrom, if it’s checked, uncheck it. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/CDROM_Error_Update_Software_Sources.jpeg) + +Close the Software Sources and run the update again. It should work fine now. + +### Further troubleshoot: ### + +The method described above should have fixed this **apt-get update cannot be used to add new CD-ROMs** error. But this was not the case for me because the option of cdrom was already grayed out as I was using live session. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/CDROM_Update_Error.png) + +Now to fix our error, we shall take the command line route. Open a terminal and use the following line to see what is included in sources list: + + cat /etc/apt/sources.list + +The output for me was as following: + + deb cdrom:[elementary OS 0.3 _Freya_ – Daily amd64 (20150208)]/ trusty main restricted + deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse + deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse + deb http://security.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse + deb-src http://security.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse + deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse + deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse + +Look at the first line in the above list. It includes cdrom. We need to comment out this line by adding # in front of it to make it look like this: + + #deb cdrom:[elementary OS 0.3 _Freya_ – Daily amd64 (20150208)]/ trusty main restricted + +To do that use the command below: + + sudo gedit /etc/apt/sources.list + +Once you have edited the sources.list, run the apt-get update once again. The error apt-get update cannot be used to add new CD-ROMs should have been fixed. If you are facing any other update issue, do look at this article which is a collection of most [common Ubuntu update error fixes][1]. + +I hope you found this tutorial helpful. If you have any questions or suggestions, feel free to drop a comment. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-failed-fetch-cdrom-aptget-update-add-cdroms/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/fix-update-errors-ubuntu-1404/ \ No newline at end of file diff --git a/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md b/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md new file mode 100644 index 0000000000..417e333e31 --- /dev/null +++ b/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md @@ -0,0 +1,98 @@ +How to Install Lightweight Budgie ( v8) Desktop in Ubuntu 14.04 +================================================================================ +Budgie is the flagship desktop of the Evolve OS Linux Distribution, and is an Evolve OS project. Designed with the modern user in mind, it focuses on simplicity and elegance. A huge advantage for the Budgie desktop is that it is not a fork of another project, but rather one written from scratch with integration in mind. + +The [Budgie Desktop][1] tightly integrates with the GNOME stack, employing underlying technologies to offer an alternative desktop experience. In the spirit of open source, the project is compatible with and available for other Linux distributions. + +Also note that Budgie can now emulate the look and feel of the GNOME 2 desktop, optionally, via a setting in the panel preferences. + +### Features in the 0.8 release ### + +- IconTasklist: Add pinning support +- IconTasklist: Use .desktop files for quicklists +- IconTasklist: Use .desktop files for icon resolution +- IconTasklist: Support “attention” hint (blue blink) +- Panel: Support dark theme (used by default) +- Add Menubar applet +- Panel: Initial autohide support (manual, not automatic) +- Panel: Support shadow onall screen edges +- Panel: Dynamic support for gnome panel theming +- RunDialog: Complete visual refresh (bootiful) +- BudgieMenu: Add compact mode, use by default +- BudgieMenu: Sort items by usage +- BudgieMenu: Remove old power option +- Editor: Add all menu options to UI +- Support from GNOME 3.10 up to 3.16 (unreleased, git) +- wm: Kill workspace animation (resolve after v8) +- wm: Better animations for changing of wallpapers + +### Important information ### + +- Budgie [released version 0.8][2] so it is still in development and a beta. +- No nnative network management; can be fixed by using Ubuntu's applet. +- Budgie is intended for the Evolve OS so even with this PPA it might be buggy. +- GNOME themes work better than the native Ubuntu themes. +- Ubuntu’s overlay scrollbars are not working. +- If you want to read more visit the Evolve OS website. + +### Installation ### + +Now, we'll install our Lightweight Budgie Desktop in our Ubuntu 14.04 LTS "Trusty" distribution of Linux Operating System. First of all, we'll need to add ppa repository to our Ubuntu PC. To do so, we'll need to execute the below command in a shell or terminal. + + $ sudo add-apt-repository ppa:evolve-os/ppa + +![Add Budgie Desktop PPA Repo](http://blog.linoxide.com/wp-content/uploads/2015/01/budgie-desktop-ppa.png) + +Now, after we finish adding PPA to our Ubuntu Computer, we'll need to update the local repository index in it. It can be done by running the following command in the same terminal or shell after above is done. + + $ sudo apt-get update + +Then, finally, we'll install the one and only Budgie Desktop Environment in our Ubuntu machine running the latest version 14.04 LTS. + + $ sudo apt-get install budgie-desktop + +![Install Budgie Desktop](http://blog.linoxide.com/wp-content/uploads/2015/02/install-budgie-desktop.png) + +**Notes** + +It is in active development and features remain missing, including, but not limited to: no network management support, no volume control applet (keyboard keys will work fine), no notification system and no way to ‘pin’ apps to the task bar. + +As a workaround you can disable overlay scrollbars, set a different default theme and quit a session from the terminal using the following command: + + $ gnome-session-quit + +![Quitting Gnome Session](http://blog.linoxide.com/wp-content/uploads/2015/02/gnome-seesion-quit.png) + +### Log into the Budgie Session ### + +After installation is completed, we’ll be able to select ‘Budgie’ from the session selector of the Unity Greeter. For that, we'll need to logout the current user and get back to the login screen. Then, we'll be able to switch to Budgie Desktop Environment. + +![Select Desktop Session](http://blog.linoxide.com/wp-content/uploads/2015/02/session-select.png) + +### Budgie Desktop Environment ### + +![Budgie Desktop Environment](http://blog.linoxide.com/wp-content/uploads/2015/02/budgie-desktop.png) + +### Logging Out ### + +You can simply execute **budgie-session --logout** in a shell or terminal to logout it. + + $ budgie-sessioon --logout + +### Conclusion ### + +Hurray! We have successfully installed our Lightweight Budgie Desktop Environment in our Ubuntu 14.04 LTS "Trusty" box. As we know, Budgie Desktop is still underdevelopment which makes it a lot of stuffs missing. Though it’s based on Gnome’s GTK3, it’s not a fork. The desktop is written completely from scratch, and the design is elegant and well thought out. If you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy Budgie Desktop 0.8 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/install-lightweight-budgie-v8-desktop-ubuntu/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://evolve-os.com/budgie/ +[2]:https://evolve-os.com/2014/11/16/courageous-budgie-v8-released/ \ No newline at end of file From 26f6231a537a10f3d59245ee6f0dead374ed2a21 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 27 Feb 2015 22:42:15 +0800 Subject: [PATCH 122/163] PUB:20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya @geekpi --- ...le Chrome Icons From Dock In Elementary OS Freya.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md (75%) diff --git a/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/published/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md similarity index 75% rename from translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md rename to published/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md index 19bb495231..fb593dbf68 100644 --- a/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md +++ b/published/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md @@ -1,12 +1,12 @@ -如何避免在ELemetary OS Freya中出现两个Google Chrome 图标[快速提示] +如何避免在ELemetary OS Freya中出现两个Google Chrome 图标 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) 这篇文章会教你**如何避免在ELemetary OS Freya中出现两个Google Chrome 图标**。 -Chrome才是我在所有系统中使用的主浏览器。而[Modori][2]默认在dock中,你不得不每次在使用Chrome时在Slingshot中搜索Google Chrome。为了节省时间,我假设你选择的是“保持在dock”中。 +Chrome才是我在所有系统中使用的主浏览器。[Modori][2] 是默认放在dock中的浏览器,所以你每次使用Chrome时都需要在Slingshot中搜索Google Chrome,而为了节省时间,我通常会将它“保持在dock”中。 -这里的问题是当你点击dock中的Chrome图标时,它会创建另外一个Google Chrome的实例。这就在dock中留下两个Chrome图标,这个或许可以被忽略但是很显然这是设计上的一个干扰。如果你有相同的感受,让我们看下如何移除这第二个Google Chrome图标。 +这里的问题是当你点击dock中的Chrome图标时,它会创建另外一个Google Chrome的实例。这就在dock中留下两个Chrome图标,这或许你可以不在意,但是很显然处女座不能忍!如果你有相同的感受,让我们看下如何移除这第二个Google Chrome图标。 ### 在Elementary OS Freya的dock中删除第二个Google Chrome 图标 ### @@ -37,7 +37,7 @@ Chrome才是我在所有系统中使用的主浏览器。而[Modori][2]默认在 #### 第四步: #### -进入Slingshot并且再次打开Google Chrome。再次选择“keep in dock”。关闭并重启来验证它是否在dock中打开了另外一个新的Chrome实例。这里不需要重启系统。 +进入Slingshot并且再次打开Google Chrome。再次选择“keep in dock”。关闭并重新打开它来验证它是否在dock中打开了另外一个新的Chrome图标。这里不需要重启系统。 我希望这篇提示能够帮助你删除Elementary OS Freya中多出的Chrome图标。有任何问题或建议让我在评论区中知道。 @@ -47,7 +47,7 @@ via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 75c422423dd901c00755e34b44be6945bb203fd9 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 27 Feb 2015 22:47:58 +0800 Subject: [PATCH 123/163] PUB:20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl @mr-ping --- ...s with Answers--How to set a custom HTTP header in curl.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md (94%) diff --git a/translated/tech/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md b/published/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md similarity index 94% rename from translated/tech/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md rename to published/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md index 7c382558eb..145ef9168e 100644 --- a/translated/tech/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md +++ b/published/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md @@ -6,7 +6,7 @@ curl是一个强大的命令行工具,它可以通过网络将信息传递给 ![](https://farm8.staticflickr.com/7568/16225032086_fb8f1c508a_b.jpg) -在一些个例中,或许你想要在一个HTTP请求中覆盖掉默认的HTTP头或者添加一个新的自定义头部字段。例如,你或许想要重写“HOST”字段来测试一个[负载均衡][1],或者通过重写"User-Agent"字符串来欺骗特定浏览器以解决其访问限制的问题。 +在一些个例中,或许你想要在一个HTTP请求中覆盖掉默认的HTTP头或者添加一个新的自定义头部字段。例如,你或许想要重写“HOST”字段来测试一个[负载均衡][1],或者通过重写"User-Agent"字符串来假冒特定浏览器以解决一些访问限制的问题。 为了解决所有这些问题,curl提供了一个简单的方法来完全控制传出HTTP请求的HTTP头。你需要的这个参数是“-H” 或者 “--header”。 @@ -36,7 +36,7 @@ wget是另外一个类似于curl,可以用来获取URL的命令行工具。并 via: http://ask.xmodulo.com/custom-http-header-curl.html 译者:[Ping](http://mr-ping.com) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From e96b68530f2912197995cfd3c04b57e8faa17657 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 27 Feb 2015 22:57:02 +0800 Subject: [PATCH 124/163] PUB:20150119 Quick Tip--How To Restart Cinnamon After Crash @geekpi --- ...0119 Quick Tip--How To Restart Cinnamon After Crash.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150119 Quick Tip--How To Restart Cinnamon After Crash.md (83%) diff --git a/translated/tech/20150119 Quick Tip--How To Restart Cinnamon After Crash.md b/published/20150119 Quick Tip--How To Restart Cinnamon After Crash.md similarity index 83% rename from translated/tech/20150119 Quick Tip--How To Restart Cinnamon After Crash.md rename to published/20150119 Quick Tip--How To Restart Cinnamon After Crash.md index eee9d41d0c..e5b6cbae5a 100644 --- a/translated/tech/20150119 Quick Tip--How To Restart Cinnamon After Crash.md +++ b/published/20150119 Quick Tip--How To Restart Cinnamon After Crash.md @@ -1,6 +1,6 @@ 如何在崩溃后重启Cinnamon ================================================================================ -Cinnamon是一个提供了高级创新特性和传统用户体验的Linux桌面环境。桌面布局和Gnome 2相似。底层的技术与Gnome Shell相似。它的重点是让用户有宾至如归的感觉并提供一个简单和舒适的桌面体验。 +Cinnamon是一个提供了高级创新特性和传统用户体验的Linux桌面环境。桌面布局和Gnome 2相似。底层的技术与Gnome Shell相似。它的重点是让用户以熟悉的方式得到简单和舒适的桌面体验。 本篇中我们会展示一个快速的方法来重启Cinnamon而不用在崩溃后登出或者重启。 @@ -18,15 +18,15 @@ Cinnamon应该会重新在面板和菜单中显示图标和文本了。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/linux_mint_cinnamon_menu.png) -享受吧! +试试吧! -------------------------------------------------------------------------------- via: http://www.unixmen.com/quick-tip-restart-cinnamon-crash/ 作者:[Enock Seth Nyamador][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d9157955cf9831dd7962ee1c6ed90e942f501cb7 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sat, 28 Feb 2015 11:43:36 +0800 Subject: [PATCH 125/163] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Step Guide To Installing Xubuntu Linux.md | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/translated/share/20150116 A Step By Step Guide To Installing Xubuntu Linux.md b/translated/share/20150116 A Step By Step Guide To Installing Xubuntu Linux.md index 3fc83ba9ef..ed6c31e46e 100644 --- a/translated/share/20150116 A Step By Step Guide To Installing Xubuntu Linux.md +++ b/translated/share/20150116 A Step By Step Guide To Installing Xubuntu Linux.md @@ -5,17 +5,17 @@ ![Xubuntu](http://f.tqn.com/y/linux/1/S/J/J/1/fulldesktop.png) -这个教程会一步一步的教你如何安装Xubuntu Linux。 +这个教程会一步步教你如何安装Xubuntu Linux。 为什么你会想要安装Xubuntu呢?这里有三个原因: 1. 你有一台安装Windows XP的计算机,但是微软已经不再对Windows XP提供支持 -2. 你的[电脑运行很慢][1],并且你想要一个轻量级并且跟得上时代潮流的操作系统 -3. 你想要增加一些DIY经验 +2. 你的[电脑运行很慢][1],你想要一个轻量级并且跟得上时代潮流的操作系统 +3. 你想要自定义你的电脑使用体验 -首先,你需要[下载Xubuntu,并且创建一个启动优盘][2]。 +首先,你需要[下载Xubuntu,并且创建一个可启动的USB驱动器][2]。 -完成以后,用优盘启动到Xubuntu,然后点击安装Xubuntu图标。 +完成以后,用优盘启动到当前版本的Xubuntu,然后点击安装Xubuntu图标。 ### 选择你的安装语言 ### @@ -29,9 +29,9 @@ ![选择无线网络](http://f.tqn.com/y/linux/1/S/L/J/1/xubuntuinstall2.png) -第二步,需要你来选择你的网络链接。这个步骤不是必须的。 +第二步,需要你来选择你的网络链接。这个步骤不是必须的,你在这个阶段可能会选择不设置网络链接是有原因的。 -如果你[网络状况十分糟糕][3],直接跳过是一个明智的选择,因为安装程序会在安装过程中从网络上下载一些更新包。那么可想而知,你的安装过程就会花费很长的时间。 +如果你的[网络状况十分糟糕][3],不选无线网络是一个明智的选择,因为安装程序会在安装过程中从网络上下载一些更新包。那么可想而知,你的安装过程就会花费很长的时间。 当然,如果你的[网速很快][4],选择一个无线网,然后输入密码就行了。 @@ -51,17 +51,19 @@ 安装过程中,如果电池电量耗完的话,你才必须要链接到到电源。 +请注意,如果你连网了,这里有一个关闭安装过程中下载更新包的复选框。 + 这里还有一个复选框,提示你是否安装用于[播放MP3][5]或者[Flash视频][6]的第三方软件,当然,这些内容也可以在安装完成以后进行。 ### 选择安装类型 ### ![选择安装类型](http://f.tqn.com/y/linux/1/S/N/J/1/xubuntuinstall4.png) -接下来的步骤是选择安装类型。显示那些选项,取决于之前电脑上安装了什么系统。 +接下来的步骤是选择安装类型。显示哪些选项,取决于之前电脑上安装了什么系统。 -在我的示例中,我已经安装了[Ubuntu MATE][7],所以,我的选项是重装Ubuntu、删除并且重装、Xubuntu和Ubuntu双系统、以及其他。 +在我的示例中,我已经安装了[Ubuntu MATE][7],所以,我的选项是重装Ubuntu、删除并且重装、安装Xubuntu和Ubuntu双系统,或者其它。 -如果你的计算机上安装了Windows,那么你得到的选项就是,安装双系统、使用Xubuntu替换Windows以及其他。 +如果你的计算机上安装了Windows,那么你得到的选项就是,安装双系统,使用Xubuntu替换Windows或者其他。 这个教程只是用来说明如何在计算机上安装Xubuntu,而不是怎么安装双系统,那将是一个完全不同的教程。 @@ -73,11 +75,11 @@ ![清除磁盘并且安装Xubuntu](http://f.tqn.com/y/linux/1/S/O/J/1/xubuntuinstall5.png) -选择你要在那个磁盘上安装的Xubuntu。 +选择你要安装Xubuntu的磁盘。 点击“Install Now”。 -这时候会弹出一个警告窗口,会提示你,选择的磁盘驱动器会被完全清除,然后会显示一个新创建的分区列表。 +这时候会弹出一个警告窗口,会提示你选择的磁盘驱动器会被完全清除,然后会显示一个新创建的分区列表。 > 备注:这是你改变主意的最后一个机会,如果你点击继续,磁盘就会被完全清除,然后开始安装Xubuntu。 @@ -103,7 +105,7 @@ 如果你需要确认键盘布局是否正确,可以在“Type here to test your keyboard”输入字符。你需要特别注意fn键和一些符号,例如英镑和美元符号。 -如果在安装过程中没有设对也没关系,安装完成以后在Xubuntu系统设置中也可以进行调整。 +如果在安装过程中没有设置正确也没关系,安装完成以后在Xubuntu系统设置中也可以进行调整。 ### 新增用户 ### @@ -115,9 +117,9 @@ 为用户选择一个用户名并且[创建一个密码][8]。为了保证你的密码输入正确,你需要输入两遍。 -如果你想要系统自动登入,而不是在每次启动的时候输入密码,选择“Log in automatically”。尽管对于我来说,我肯定不会选择这个选项。 +如果你想要系统自动登入,而不是在每次启动的时候输入密码,选择“Log in automatically”。对于我来说,我肯定不会选择这个选项。 -更好的选项是“Require my password to log in”,并且如果你想要更高的安全等级,勾选“Encrypt my home fodler”选项。 +更好的选项是“Require my password to log in”,并且如果你想要更高的安全等级,勾选“Encrypt my home folder”选项。 点击“Continue”然后继续。 @@ -125,9 +127,9 @@ ![等待安装完成](http://f.tqn.com/y/linux/1/S/S/J/1/xubuntuinstall10.png) -这个步骤中,将会会拷贝文件到你的电脑,并且安装Xubuntu。 +这个步骤中,将会拷贝文件到你的电脑,并且安装Xubuntu。 -在这个过程中,你会看到一个简短的幻灯片。在这个时候你可以去[泡一杯咖啡][9]或者放松一下什么的。 +在这个过程中,你会看到一个简短的幻灯片。在这个时候你可以去[泡一杯咖啡][9]或者放松一下。 安装完成以后,会弹出提示告诉你是否重新启动,并且开始体验一下新安装的Xubuntu系统。 @@ -139,7 +141,7 @@ via : http://linux.about.com/od/howtos/ss/A-Step-By-Step-Guide-To-Installing-Xu 作者:[Gary Newell][a] 译者:[zhouj-sh](https://github.com/zhouj-sh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -152,4 +154,4 @@ via : http://linux.about.com/od/howtos/ss/A-Step-By-Step-Guide-To-Installing-Xu [6]:http://animation.about.com/od/2danimationtutorials/ss/2d_fla_lesson1.htm [7]:http://www.everydaylinuxuser.com/2014/11/ubuntu-mate-vs-lubuntu-on-old-netbook.html [8]:http://netsecurity.about.com/cs/generalsecurity/a/aa112103b.htm -[9]:http://coffeetea.about.com/od/preparationandrecipes/ \ No newline at end of file +[9]:http://coffeetea.about.com/od/preparationandrecipes/ From c6eb6a54567f51abd85099467f6f09165e9d47eb Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sat, 28 Feb 2015 15:02:04 +0800 Subject: [PATCH 126/163] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150116 A Step By Step Guide To Installing Xubuntu Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/share => published}/20150116 A Step By Step Guide To Installing Xubuntu Linux.md (100%) diff --git a/translated/share/20150116 A Step By Step Guide To Installing Xubuntu Linux.md b/published/20150116 A Step By Step Guide To Installing Xubuntu Linux.md similarity index 100% rename from translated/share/20150116 A Step By Step Guide To Installing Xubuntu Linux.md rename to published/20150116 A Step By Step Guide To Installing Xubuntu Linux.md From 0586b77be812fd40d261f22baf2842b04c97e52c Mon Sep 17 00:00:00 2001 From: johnhoow Date: Sat, 28 Feb 2015 16:24:05 +0800 Subject: [PATCH 127/163] johnhoow translating --- ...to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md b/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md index 417e333e31..60155b9f68 100644 --- a/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md +++ b/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md @@ -1,3 +1,4 @@ +johnhoow translating... How to Install Lightweight Budgie ( v8) Desktop in Ubuntu 14.04 ================================================================================ Budgie is the flagship desktop of the Evolve OS Linux Distribution, and is an Evolve OS project. Designed with the modern user in mind, it focuses on simplicity and elegance. A huge advantage for the Budgie desktop is that it is not a fork of another project, but rather one written from scratch with integration in mind. @@ -95,4 +96,4 @@ via: http://linoxide.com/ubuntu-how-to/install-lightweight-budgie-v8-desktop-ubu [a]:http://linoxide.com/author/arunp/ [1]:https://evolve-os.com/budgie/ -[2]:https://evolve-os.com/2014/11/16/courageous-budgie-v8-released/ \ No newline at end of file +[2]:https://evolve-os.com/2014/11/16/courageous-budgie-v8-released/ From 11da060bd09336dd961021ee7e60eee225afde95 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 28 Feb 2015 20:31:36 +0800 Subject: [PATCH 128/163] PUB:20141229 How to Create Btrfs Filesystem in Linux and its Features @GOLinux --- ...o Create Btrfs Filesystem in Linux and its Features.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20141229 How to Create Btrfs Filesystem in Linux and its Features.md (91%) diff --git a/translated/tech/20141229 How to Create Btrfs Filesystem in Linux and its Features.md b/published/20141229 How to Create Btrfs Filesystem in Linux and its Features.md similarity index 91% rename from translated/tech/20141229 How to Create Btrfs Filesystem in Linux and its Features.md rename to published/20141229 How to Create Btrfs Filesystem in Linux and its Features.md index 8ab85e81dc..9439ace204 100644 --- a/translated/tech/20141229 How to Create Btrfs Filesystem in Linux and its Features.md +++ b/published/20141229 How to Create Btrfs Filesystem in Linux and its Features.md @@ -28,7 +28,7 @@ Btrfs文件系统在Linux中的创建及其特性 ### 转换到Btrfs ### -**警告:在尝试转换文件系统前,请务必备份数据。虽然此操作很稳定,也很安全,但它仍然可能导致数据丢失,而防止此情况发生的唯一途径就是进行数据备份。** +**警告:在尝试转换文件系统前,请务必备份数据!虽然此操作很稳定,也很安全,但它仍然可能导致数据丢失,而防止此情况发生的唯一途径就是进行数据备份。** 将现存的ext4文件系统转换到btrfs是相当简单而易懂的。你首先需要使用fsck来检查你现存分区上是否存在错误,然后使用btrfs-convert命令进行转换。如果你想要对/dev/sda3分区进行转换,你可以进行以下操作: @@ -41,7 +41,7 @@ Btrfs文件系统在Linux中的创建及其特性 ### 转换根分区 ### -如果你想要对你系统上的根分区进行转换,你首先需要使用Live CD启动。对于Ubuntu,你可以使用Ubuntu安装CD来完成此操作,在启动后第一个屏幕选择“尝试Ubuntu”。对于其它系统,你同样可以使用Live CD镜像,操作类似。 +如果你想要对你系统上的根分区进行转换,你首先需要使用Live CD启动。对于Ubuntu,你可以使用Ubuntu安装盘来完成此操作,在启动后第一个屏幕选择“尝试Ubuntu”。对于其它系统,你同样可以使用Live CD镜像,操作类似。 在启动后,打开终端,使用下面的命令来转换文件系统。 @@ -57,7 +57,7 @@ Btrfs文件系统在Linux中的创建及其特性 ![btrfs-root-convert](http://blog.linoxide.com/wp-content/uploads/2014/11/btrfs-root-convert.jpg) -现在来编辑fstab,并根据blkid输出的结果来修改当前/文件系统的UUID,并将它的文件系统类型修改为btrfs,修改后的行如下: +现在来编辑fstab,并根据blkid输出的结果来修改当前“/”文件系统的UUID,并将它的文件系统类型修改为btrfs,修改后的行如下: UUID=8e7e80aa-337e-4179-966d-d60128bd3714 / btrfs defaults 0 1 @@ -74,7 +74,7 @@ via: http://linoxide.com/file-system/create-btrfs-features/ 作者:[Adrian Dinu][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 0d52296a88ba8bbf15cf662ca99d6c4521fefc39 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 28 Feb 2015 20:55:19 +0800 Subject: [PATCH 129/163] PUB:20141114 How To Use Emoji Anywhere With Twitter's Open Source Library @FSSlc --- ...here With Twitter's Open Source Library.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) rename {translated/tech => published}/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md (63%) diff --git a/translated/tech/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md b/published/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md similarity index 63% rename from translated/tech/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md rename to published/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md index 6f1e2b5b56..ab8046d43e 100644 --- a/translated/tech/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md +++ b/published/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md @@ -1,36 +1,36 @@ - 怎样通过 Twitter 的开源库来随处使用 Emoji 表情符号 +怎样通过 Twitter 的开源库来随处使用 Emoji 表情符号 ================================================================================ > 通过 GitHub 将它们嵌入到网页和其他项目中。 ![](http://a3.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2OTIyNTI3MjcxNTU1.png) -Emoji, 来自日本的小巧符号,通过图像表达感情,已经征服了手机文字信息的世界。 +Emoji, 来自日本的小巧符号,通过图像表达感情,已经征服了移动互联网的信息世界。 现在,你可以在虚拟世界中随处使用它们了。 Twitter 最近[开源了][1]他们的 emoji 符号库,使得你可以在你自己的网站,应用,和项目中使用它们。 -但这需要一点体力活。 Unicode 已经识别甚至标准化了 emoji 字母表, 然而 emoji 仍然[不能完全与所有的网络浏览器相兼容][2],这意味着大多数情况下,它们将呈现为 “豆腐块”或 空白盒子。当 Twitter 想使得 emoji 可用时,社交网络联合一家名为[Icon Factory][3]的公司共同渲染浏览器以模仿 文本信息符号的效果。结果,Twiter 说道 人们对他们的 emoji 库有很大的需求。 +但这需要一点体力活。 Unicode 已经识别甚至标准化了 emoji 字母表, 然而 emoji 仍然[不能完全与所有的网络浏览器相兼容][2],这意味着大多数情况下,它们将呈现为 “豆腐块”或“空白盒子”。当 Twitter 想使得 emoji 到处可用时,这家社交网络联合了一家名为[Icon Factory][3]的公司来渲染浏览器以模仿文本信息符号的效果。Twiter 认为人们对他们的 emoji 库有很大的需求。 现在, 你可以从 [GitHub][4] 上克隆 Twitter 的整个库,从而在你的开发项目中使用它们。 下面将为你介绍如何达到上面的目的以及如何使得 emoji 更容易被使用。 ### 为 Emoji 得到 Unicode 支持 ### -Unicode 是国际编码标准,它为任意的符号,字母或人们想在网络上使用的数字配置了一串符号。换句话说,它是 你如何在计算机上阅读文本 与 计算机如何读取文本 之间的缺失环节。例如,对于你正看到的位于这些句子中的`空白`,计算机读取为 “&mbsp”。 +Unicode 是国际编码标准,它为任意的符号、字母或人们想在网络上使用的数字配置了一串编码。换句话说,它是你如何在计算机上阅读文本与计算机如何读取文本之间的缺失环节。例如,对于你正看到的位于这些句子中的`空格`(LCTT 译注:英文分词中间的空格),计算机读取为 “ ”。 -Unicode 甚至拥有其自己的 [原始 emoji][5],它们可以 在没有你的任何努力的情况下在浏览器中被阅读。例如,当你看到了 一个 ❤ 符号,你的计算机正在解码字符串 “2665” 。 +Unicode 甚至拥有其自己的[原始 emoji][5],它们可以在没有你的任何努力的情况下在浏览器中被阅读。例如,当你看到了 一个 ❤ 符号,你的计算机正在解码字符串 “2665” 。 要在大多数情况下使用 Twitter 的 emoji 库,你只需在你的 HTML 网页中的 ``块中添加如下脚本: -这样就使得你的项目可以访问 包含有已经在 Twitter 中可使用的数以百计的 Emoji 符号的 JavaScript 库。然而,创建一个仅仅包含这个脚本的文档并不能使得在你的网站中呈现出 emoji 符号,实际上,你仍需要嵌入一些 emoji 符号! +这样就使得你的项目可以访问包含有已经在 Twitter 中可使用的数以百计的 Emoji 符号的 JavaScript 库。然而,创建一个仅仅包含这个脚本的文档并不能使得在你的网站中呈现出 emoji 符号,实际上,你仍需要嵌入这些 emoji 符号! -在 ``块中,粘贴一些可以在 Twitter 的[preview.html 文件源代码][6] 中找到的 emoji 字符串。我使用了 🎹 和 🏁,当然我并不知道在浏览器窗口中它们的样子。是的,你必须粘贴并猜测它们。你已经看出了问题,我们将在 第二小节中予以解决。 +在 ``块中,粘贴一些可以在 Twitter 的[preview.html 文件源代码][6] 中找到的 emoji 字符串。我使用了 🎹 和 🏁,当然我并不知道在浏览器窗口中它们的样子。是的,你必须粘贴并猜测它们。你已经看出了问题,我们将在第二小节中予以解决。 无论如何,通过一些尝试,你可以将一个如下图的原始 HTML 文件--- ![](http://a4.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2ODQyNTMzNTQ1OTk0.png) ----转变成如下图的网页: +---显示为如下图的网页: ![](http://a1.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2ODExNjYzNDU1NTA2.png) @@ -52,11 +52,11 @@ Unicode 甚至拥有其自己的 [原始 emoji][5],它们可以 在没有你 - 一旦你将上面的代码添加了进去,你便可以删除先前添加的 Twitter 的脚本链接。 +一旦你将上面的代码添加了进去,你便可以删除先前添加的 Twitter 的脚本链接。 - 现在,找到 `body` 块部分的代码,然后添加一些 emoji 符号。我使用了 ``, ``, `` 和 ``。 +现在,找到 `body` 块部分的代码,然后添加一些 emoji 符号。我使用了 ``, ``, `` 和 ``。 - 最终,你将得到如下的代码: +最终,你将得到如下的代码: ![](http://a2.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2ODcyMDYxNDU2MzU0.png) @@ -64,9 +64,9 @@ Unicode 甚至拥有其自己的 [原始 emoji][5],它们可以 在没有你 ![](http://a1.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2ODExOTMxODkwOTYy.png) -当当!这样你不仅得到了一个可以在浏览器中支持 emoji 符号的基本网页,而且还知道了如何简单地实现它。你可以随意的在[我的 GitHub][9] 中查看这个教程,并且可以克隆这些实际的文件而不只是看看这些截图。 +Duang!这样你不仅得到了一个可以在浏览器中支持 emoji 符号的基本网页,而且还知道了如何简单地实现它。你可以随意的在[我的 GitHub][9] 中查看这个教程,并且可以克隆这些实际的文件而不只是看看这些截图。 -来自于[得到 Emoji][10]的引导图像; Lauren Orsini 截图。 +题图来自于[得到 Emoji][10]; Lauren Orsini 截图。 -------------------------------------------------------------------------------- @@ -74,7 +74,7 @@ via: http://readwrite.com/2014/11/12/how-to-use-emoji-in-the-browser-window 作者:[Lauren Orsini][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7edb0d612567915d22a949e106ea02fc61c878da Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 28 Feb 2015 21:35:12 +0800 Subject: [PATCH 130/163] Update and rename translated/tech to translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md --- ... full kernel source on Debian or Ubuntu.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md diff --git a/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md b/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md new file mode 100644 index 0000000000..1296b0f975 --- /dev/null +++ b/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md @@ -0,0 +1,58 @@ +Linux有问必答:如何在Debian或Ubuntu上安装完整的内核源码 +================================================================================ +> **问题**:我需要为我的Debian或Ubuntu下载并安装完整树结构的内核源码以供编译一个定制的内核。那么在Debian或Ubuntu上有什么可行的方法来下载完整的内核源码呢? + +在给你的Linux安装完整内核源码之前,先问问自己是否真的需要这样做。如果你仅仅是尝试去编译一个内核模块或是为内核定制驱动,你并不需要完整的内核源码树。你只需要安装[一些与内核对应的头文件][1],这样就足够了。 + +只有在你需要生成一个定制的内核,而且内核源码中的一些内核默认设置要被你调整了的情况下,你才需要完整的内核源码树。 + +这里将会解答如何**在Debian或Ubuntu的库中下载并安装完整树结构的内核源码**。虽然你可以在这个网站[https://www.kernel.org/pub/linux/kernel/][2]下载官方的内核源码,但是发行版软件仓库可以允许你下载包含补丁的内核源码。 + +### 在Debian上安装完整的内核源码 ### + +在下载内核源码之前,先安装dpkg-dev,其中包含你在Debian上生成源代码时需要的开发工具套件。不仅如此,dpkg-dev中还包含在用来解压Debian源码包并自动打补丁的工具dpgk-source。 + + $ sudo apt-get install dpkg-dev + +然后,运行以下命令下载完整的内核源码。 + + $ apt-get source linux-image-$(uname -r) + +伴随着完整内核源码(linux_X.X.XX.orig.tar.xz)的还有一些可用的内核补丁(linux_X.X.X+XXX.debian.tar.xz)和源码控制文件(linux_XXXX.dsc),这些都将被下载并存储到当前目录。在.dsc文件中会指出如何给内核源码打补丁。 + +当下载完成,以上的命令将会自动调用工具dpkg-source将下载的内核源码解压到当前的目录中,与此同时更具.dsc文件来下补丁。 + +最终完整的内核源码树将会以"linux-X.X.XX"的形式呈现在当前目录中。 + +![](https://farm9.staticflickr.com/8676/16341110300_b4f059eeb0_b.jpg) + +### 在Ubuntu上安装完整内核源码 ### + +如果你想安装完整内核源码的话,以上在Debian上的那一套做法在Ubuntu上仍然奏效。 + +在Ubuntu上还有另一套方法安装完整内核源码。事实上,你可以查一下由Canonical为Ubuntu不同发行版维护的内核源码树。 + + $ sudo apt-get install git + $ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-$(lsb_release --codename | cut -f2).git + +举个例子,如果你使用的是Ubuntu14.04,以上的命令将会查看Git的"ubuntu-trusty"仓库中的代码。 + +![](https://farm9.staticflickr.com/8642/16526856391_de636ff9b8_c.jpg) + +一旦在你对Git仓库的查询结束后,使用以下的命令来安装用来访问生成内核源码树所需依赖的重要开发包。 + + $ sudo apt-get build-dep linux-image-$(uname -r) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-full-kernel-source-debian-ubuntu.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/install-kernel-headers-linux.html +[2]:https://www.kernel.org/pub/linux/kernel/ From d9246bbbdea839879993958ec5a8c55600cd026e Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 28 Feb 2015 21:39:32 +0800 Subject: [PATCH 131/163] Delete 20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md --- ... full kernel source on Debian or Ubuntu.md | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md b/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md deleted file mode 100644 index 65b3a08c48..0000000000 --- a/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md +++ /dev/null @@ -1,60 +0,0 @@ -translating by martin. - -Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu -================================================================================ -> **Question**: I need to download and install a full kernel source tree to compile a custom kernel for my Debian or Ubuntu system. What is a proper way to download full kernel source on Debian or Ubuntu? - -Before installing full kernel source on your Linux system, ask yourself whether you really need the full kernel source. If you are trying to compile a kernel module or a custom driver for your kernel, you do not need the full kernel source. You only need to install [matching kernel header files][1], and that's it. - -You need the full kernel source tree only if you want to build a custom kernel after modifying the kernel code in any way and/or tweaking default kernel options. - -Here is how to **download and install full kernel source tree from Debian or Ubuntu repositories**. While you can download the official kernel source code from [https://www.kernel.org/pub/linux/kernel/][2], using distro's repositories allows you to download a kernel source with the maintainer's patches applied to it. - -### Install Full Kernel Source on Debian ### - -Before downloading kernel source, install dpkg-dev, which contains a suite of development tools needed to build Debian source packages. Among other things, dpkg-dev contains dpgk-source tool which can extract a Debian source package and automatically apply patches. - - $ sudo apt-get install dpkg-dev - -Next, run the following command to download full kernel source. - - $ apt-get source linux-image-$(uname -r) - -Along with the full kernel source (linux_X.X.XX.orig.tar.xz), any available kernel patches (linux_X.X.X+XXX.debian.tar.xz) and source control file (linux_XXXX.dsc) will also be downloaded and stored in the current directory. The .dsc file instructs how the patches are applied to the kernel sources. - -Upon the completion of download, the above command will automatically invoke dpkg-source tool, which will unpack the downloaded kernel source in the current directory, and apply downloaded patches according to .dsc file. - -The final full kernel source tree will be available in the current directory as "linux-X.X.XX". - -![](https://farm9.staticflickr.com/8676/16341110300_b4f059eeb0_b.jpg) - -### Install Full Kernel Source on Ubuntu ### - -If you want to install full kernel source, the Debian way described above should work on Ubuntu as well. - -There is another way to download full kernel source on Ubuntu. You can actually check out the kernel source tree maintained by Canonical for different Ubuntu releases. - -$ sudo apt-get install git -$ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-$(lsb_release --codename | cut -f2).git - -For example, if you are using Ubuntu 14.04, the above command will check out code from "ubuntu-trusty" Git repository. - -![](https://farm9.staticflickr.com/8642/16526856391_de636ff9b8_c.jpg) - -Once you check out the Git repository, use the following command to install necessary development packages to meet the build dependencies for the kernel source tree. - - $ sudo apt-get build-dep linux-image-$(uname -r) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/install-full-kernel-source-debian-ubuntu.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://ask.xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/install-kernel-headers-linux.html -[2]:https://www.kernel.org/pub/linux/kernel/ From 184a516a7716a23f2d3455315cfdf094e5340b9e Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 28 Feb 2015 21:41:56 +0800 Subject: [PATCH 132/163] PUB:20141120 How to install Xen hypervisor on unused old hardware @liaoishere --- ...l Xen hypervisor on unused old hardware.md | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) rename {translated/tech => published}/20141120 How to install Xen hypervisor on unused old hardware.md (82%) diff --git a/translated/tech/20141120 How to install Xen hypervisor on unused old hardware.md b/published/20141120 How to install Xen hypervisor on unused old hardware.md similarity index 82% rename from translated/tech/20141120 How to install Xen hypervisor on unused old hardware.md rename to published/20141120 How to install Xen hypervisor on unused old hardware.md index 87a28c57fc..f26d753e00 100644 --- a/translated/tech/20141120 How to install Xen hypervisor on unused old hardware.md +++ b/published/20141120 How to install Xen hypervisor on unused old hardware.md @@ -1,11 +1,11 @@ - 怎样在废旧的硬件上安装 Xen 虚拟机监视器 ================================================================================ -Xen 是一个直接运行在硬件上的虚拟机监视器,这意味着你必须准备一个裸机来安装和运行 Xen。KVM 和 Xen 有一些不同 —— 你可以把它安装在任何已经正在运行 Linux 的机器上。本教程描述了如何在废旧的硬件上安装和配置 Xen 虚拟机监视器。 +Xen 是一个直接运行在硬件上的虚拟机监视器,这意味着你必须准备一个裸机来安装和运行 Xen。而 KVM 则和 Xen 有一些不同 —— 你可以把它添加到任何已经正在运行 Linux 的机器上。本教程描述了如何在废旧的硬件上安装和配置 Xen 虚拟机监视器。 整个安装过程使用 Debian Jessie(Debian 的测试发行版)作为宿主机操作系统(也称作 [Dom0][1])。Jessie 并不是唯一的选择 —— Xen 的支持是内建在 Linux 内核中的,[许多 Linux 发行版][2] 都包含支持 Xen 的内核。 ### 找点废旧的硬件 ### + 首先,找一个可以格式化的合适的工作站,比如一台旧的笔记本或者台式机。旧的硬件可能不适合玩游戏,但是足够安装一个宿主机和一些客户机了。一个满足下面这些要求的 PC 机就可以了。 - 一个双核 CPU(64 位) @@ -14,7 +14,7 @@ Xen 是一个直接运行在硬件上的虚拟机监视器,这意味着你必 - 能够从 CD,DVD 或者 USB 引导启动 - 一块网卡 -注意 CPU 必须是 64 位的,因为 Debian 已经不再支持 32 位的 Xen 安装包。如果你没有空余的硬件,你可以花点钱投资一台旧机器。2010 年值 $1000 的旗舰级笔记本现在只需要 $100。从 eBay 买台二手笔记本并升级下内存也可以满足需求。 +注意 **CPU 必须是 64 位的,因为 Debian 已经不再支持 32 位的 Xen 安装包**。如果你没有空余的硬件,你可以花点钱买一台旧机器。2010 年值 $1000 的旗舰级笔记本现在只需要 $100。从 eBay 买台二手笔记本并升级下内存也可以满足需求。 ### 刻录一个引导 CD/USB ### @@ -41,19 +41,19 @@ Xen 是一个直接运行在硬件上的虚拟机监视器,这意味着你必 这里的设置使用了四个分区。自动安装时通常会创建一个包含逻辑分区的扩展分区。像下面这样给硬盘分四个区。 - sda1 挂载至 /boot,200MB -- sda2 /, 20GB, Ubuntu 占用 4GB -- sda3 swap, 6GB (4GB x 1.5 = 6) +- sda2 做为 /, 20GB, Ubuntu 占用 4GB +- sda3 做为 swap, 6GB (4GB x 1.5 = 6) - sda4 保留用作 LVM, 不挂载,大小为剩余的硬盘大小 ### 安装基本的系统 ### -这里尽可能的让系统的安装更简单快速一些。一个基本的工作用系统可以稍后再添加。Debian 的 APT(Advanced Package Tool)使得添加软件非常的简单。在一个工作站上安装 Deibian 可能会有一些很浪费时间的问题。可能显卡驱动与内核不监控或者可能老旧的 CD-ROM 驱动器只能间歇性的工作。 +这里尽可能的让系统的安装更简单快速一些。一个基本的工作用系统可以稍后再添加。Debian 的 APT(Advanced Package Tool)使得添加软件非常的简单。在机器上安装 Debian 可能会有一些很浪费时间的问题。可能显卡驱动与内核不监控或者可能老旧的 CD-ROM 驱动器只能间歇性的工作。 当选择安装软件时,选择安装一个 SSH 服务器,不要安装桌面环境如 Gnome。 ![](https://farm9.staticflickr.com/8541/15176520633_5d31beda9c_z.jpg) -安装一个图形桌面需要安装成百上千的包 —— 这些额外的工作可以稍后再进行。如果你遇到问题了,等到图形桌面的安装会浪费很多事件。同时,没有桌面组件,系统的启动可以更快一些 —— 只需要几十秒而不是几分钟。整个安装过程会需要重启几次,因此这样做可以节省不少时间。 +安装一个图形桌面需要安装成百上千的包 —— 这些额外的工作可以稍后再进行。如果你遇到问题了,等待图形桌面的安装会浪费很多时间。同时,没有桌面组件,系统的启动可以更快一些 —— 只需要几十秒而不是几分钟。整个安装过程会需要重启几次,因此这样做可以节省不少时间。 一个 SSH 服务器可以让你从另一台电脑来配置这台工作站。这可以避免一些旧硬件的问题 —— 可能旧机器的键盘少了几个键,LCD 屏幕有坏点或者触摸板没有反应等等。 @@ -79,9 +79,9 @@ Xen 是一个直接运行在硬件上的虚拟机监视器,这意味着你必 检查 LVM 状态。 - # pvs (to view information about physical volumes) - # vgs (to view information about volume groups) - # lvs (to view information about logical volumes) + # pvs (查看物理卷的信息) + # vgs (查看卷组的信息) + # lvs (查看逻辑卷的信息) ### 添加一个 Linux 网桥 ### @@ -92,7 +92,6 @@ Xen 是一个直接运行在硬件上的虚拟机监视器,这意味着你必 # apt-get install bridge-utils 查看在哪块网卡配置桥接。 -See what interfaces are configured. # ip addr @@ -156,13 +155,13 @@ See what interfaces are configured. ![](https://farm8.staticflickr.com/7535/15794086091_bf1bce6b4b_z.jpg) -第一个选项会在 5 秒钟内自动启动(在 /etc/default/grub 的 GRUB_TIMEOUT 这行设置),因此这点时间还来不及喝咖啡的。 +第一个选项会在 5 秒钟内自动启动(在 /etc/default/grub 的 GRUB_TIMEOUT 这行设置),因此这点时间可来不及喝咖啡。 按下方向键选择 "Debian GNU/Linux, with Xen hypervisor" 这个选项,然后按回车。这时屏幕会出现很多行信息,接着是正常的登录界面。 ### 检查 Xen 工作是否正常 ### -Xen 虚拟机监视器嗲有一个管理 Xen 的命令行工序叫做 xl,可以用来创建和管理 Xen 虚拟机。使用 xl 命令来检查 Xen 是否成功安装了。 +Xen 虚拟机监视器带有一个管理 Xen 的命令行程序叫做 xl,可以用来创建和管理 Xen 虚拟机。使用 xl 命令来检查 Xen 是否成功安装了。 以 root 用户登录,执行: @@ -206,9 +205,11 @@ Xen 虚拟机监视器嗲有一个管理 Xen 的命令行工序叫做 xl,可 ### 最后 ### -如果你使用这台主机作为你的工作站,可以安装一个图形桌面。Debian 包好几种[桌面环境][6]。如果你想要一个包含所有东西的图形桌面,那么安装 Gnome 吧。如果图形效果并不是你的菜,试试 Awesome 吧。 +如果你使用这台主机作为你的工作站,可以安装一个图形桌面。Debian 包括好几种[桌面环境][6]。如果你想要一个包含所有东西的图形桌面,那么安装 Gnome 吧。如果它的图形效果并不是你的菜,试试 Awesome 吧。 -注意 Debian 的默认 Gnome 环境有大量的额外应用程序包括办公套件 LibreOffice,Iceweasel 浏览器和 Rhythmbox 音乐播放器。安装命令 "apt-get install gnome" 会安装 1,000 多个包并需要将近 2GB 的硬盘空间。运行这个重量级的桌面环境需要占用 1GB 的内存。 +注意 Debian 的默认 Gnome 环境有大量的额外应用程序包括办公套件 LibreOffice,Iceweasel 浏览器和 Rhythmbox 音乐播放器。安装命令 "apt-get install gnome" 会安装 1,000 多个包并需要将近 2GB 的硬盘空间。运行这个重量级的桌面环境需要占用 1GB 的内存。 + +(LCTT 译注:本文没有涉及如何安装 guest 虚拟机,请关注后继文章) -------------------------------------------------------------------------------- @@ -216,7 +217,7 @@ via: http://xmodulo.com/install-xen-hypervisor.html 作者:[Nick Hardiman][a] 译者:[Liao](https://github.com/liaoishere) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a606951d16fa23112efc8526df089a0041dd8f0c Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 28 Feb 2015 21:42:39 +0800 Subject: [PATCH 133/163] translated From ed8f63cb1e20ba4a83770945200db2ef9e4ce78d Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 28 Feb 2015 22:32:33 +0800 Subject: [PATCH 134/163] PUB:20150119 Cutegram--A Better Telegram Client For GNU or Linux @geekpi --- ...Better Telegram Client For GNU or Linux.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md (54%) diff --git a/translated/tech/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md b/published/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md similarity index 54% rename from translated/tech/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md rename to published/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md index 4f0a57ff52..57511dd73c 100644 --- a/translated/tech/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md +++ b/published/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md @@ -1,12 +1,12 @@ -Cutegram: 一个GNU/Linux下更好的Telegram客户端 +Cutegram: 一个GNU/Linux下不错的Telegram客户端 ================================================================================ -不需要再介绍**Telegram**了,对吧。Telegram是一款流行的免费即时通信工具,帮助在全球与你的朋友聊天。不像Whatsapp,Telegram是永久免费、没有广告、没有订阅费用。并且Telegram客户端也是开源的。Telegram在许多不同的平台中都有,包括Linux、Android、iOS、Windows Phone和Mac OS X。使用telegram发送的消失是高度加密且会自我毁灭。它很安全,并且没有对你媒体和聊天的大小作限制。 +不需要再介绍**Telegram**了,对吧。Telegram是一款流行的免费即时通信工具,帮助你在全球与朋友聊天。不像Whatsapp,Telegram是永久免费、没有广告、没有订阅费用的。并且Telegram客户端也是开源的。Telegram在许多不同的平台中都有,包括Linux、Android、iOS、Windows Phone和Mac OS X。使用telegram发送的消息是高度加密且会自我销毁。它很安全,并且没有对你的多媒体和聊天的大小作限制。 -在[先前的教程][1]中我们已经提到你可以在Ubuntu/Debian中安装Telegram。然而,一个新的Telegram客户端叫**Cutegram**出现了,可以使你的聊天体验更加有趣和简单。 +在[先前的教程][1]中我们已经提到你可以在Ubuntu/Debian中安装Telegram。然而,有一个新的Telegram客户端叫**Cutegram**出现了,可以使你的聊天体验更加有趣和简单。 ### Cutegram是什么? ### -Cutegram是一款GNU/Linux中专注于用户友好、与LInux桌面环境兼容和易于使用的开源telegram客户端。Cutegram使用Qt5、QML、libqtelegram、libappindication、AsemanQtTools技术和Faenzatu图标和Twitter emojies图片集。它在GPLv3许可证下免费发布。 +Cutegram是一款专注于用户友好、与Linux桌面环境兼容和易于使用的开源 telegram 的 GNU/Linux客户端。Cutegram使用Qt5、QML、libqtelegram、libappindication、AsemanQtTools技术和Faenzatu图标和Twitter emojie图片集。它在GPLv3许可证下免费发布。 ### 安装 Cutegram ### @@ -31,7 +31,7 @@ Cutegram是一款GNU/Linux中专注于用户友好、与LInux桌面环境兼容 设置执行权限: - chmod + cutegram-1.0.2-linux*.run + chmod a+x cutegram-1.0.2-linux*.run 如下进行安装。 @@ -41,22 +41,21 @@ Cutegram是一款GNU/Linux中专注于用户友好、与LInux桌面环境兼容 在菜单或者Unity dash中启动Cutegram。在登录界面,选择你的国家并输入电话号码,最好点击**Login** -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_005.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/Cutegram_005.png) -A code will be sent to your mobile number. Enter the code and click **Sign in**. -一个验证码将会发送到你手机上。输入验证码病点击**** +一个验证码将会发送到你手机上。输入验证码并点击**Sign in** -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_002.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/Cutegram_002.png) 你会看到 -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_003.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/Cutegram_003.png) 开始聊天吧! -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_004.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/Cutegram_004.png) -接着,你可以设置头像,开始新的聊天/群聊,或者使用左边面板的按钮开始秘密聊天。 +接着,你可以设置头像,开始新的聊天/群聊,或者使用左边面板的按钮开始秘密聊天。 玩得开心!干杯!! @@ -68,7 +67,7 @@ via: http://www.unixmen.com/cutegram-better-telegram-client-gnulinux/ 作者:[SK][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 502429180bd3526a47a98a26881407bfe4283998 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Sun, 1 Mar 2015 00:58:28 +0800 Subject: [PATCH 135/163] Translated 20141127 11 Usefull Utilities To Supercharge Your Ubuntu Experience.md --- ...s To Supercharge Your Ubuntu Experience.md | 156 ------------------ ...s To Supercharge Your Ubuntu Experience.md | 155 +++++++++++++++++ 2 files changed, 155 insertions(+), 156 deletions(-) delete mode 100644 sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md create mode 100644 translated/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md diff --git a/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md b/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md deleted file mode 100644 index 928778fc4b..0000000000 --- a/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md +++ /dev/null @@ -1,156 +0,0 @@ -Translating by FSSlc - -11 Useful Utilities To Supercharge Your Ubuntu Experience -================================================================================ -**Whether you’re a relative novice or a seasoned pro, we all want to get the most from our operating system. Ubuntu, like most modern OSes, has more to offer than what is presented at first blush.** - -From tweaking and refining the look, behaviour and performance of the Unity desktop to performing system maintenance, there are a huge array of useful utilities and apps that can help **tune Ubuntu to meet your needs in no time**. - -Caveat time: Ubuntu has always shipped with ‘sane defaults’ — options that just work — out of the box. These defaults are well suited for the majority of people. They’re tested, accepted and recommended. - -But one size doesn’t fit all. For the tinkerers and experimenters among us the default experience is a starting point from which to tailor. - -So, without any more waffle, here is a set of 11 nifty utilities to help you supercharge your Ubuntu experience. - -### Unity Tweak Tool ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/unity-tweak-tool.jpg) - -I’ll kick off this list with the big one: **Unity Tweak** Tool. The kitchen sink of customisation, Unity Tweak Tool offers a comprehensive set of system tweaks tuned for Ubuntu and the Unity desktop. - -It’s stuffed full of switches, toggles and control, letting you configure everything from the way Unity looks to the way it behaves. Use it to **quickly and easily change the GTK theme and icon set**, set up hot corners, adjust launcher size, add or remove workspaces, and — notably — enable Unity’s elusive ‘minimise on click’ feature. - -Free and readily available from the Software Center, Unity Tweak Tool is one well worth keeping in your back pocket. - -### Unity Privacy Indicator ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/indicator-privacy-in-ubuntu.jpg) - -Privacy. A big, big issue and rightly so. But the topic is often shaded rather than binary; you may be happy to let some data or habits, say apps you frequently open, be logged locally, but not be ok with the searches you make in the Dash being ferried to a third-party server (however anonymous that data may be). - -[Privacy Indicator][1] is a useful tool to help you stay abreast of what files, folders and services are being accessed, logged and recce’d on the Ubuntu desktop. - -With a quick click on the ‘eye’ icon added to the desktop panel you can: - -- Toggle Online Search Results, Zeitgeist, HUD Logging & GeoIP -- Quick access to clean Zeitgeist, F2, Recent Files, etc. -- Options to show/hide desktop icons and name in the panel - -The latter two options may seem a little misplaced in this app but have less obvious privacy implications for those who take screenshots or screen share. - -- [Download Indicator Privacy (.deb)][2] - -### Unity Folders ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/unity-folders.jpg) - -**Android, iOS, OS X, Chrome OS, and GNOME Shell have app folders, and so can Unity with a nifty third-party app. ** - -“Unity Folders” allows you to organise apps on the Unity Launcher into handy folders — think ‘games’, ‘office’, ‘social‘, etc. You get quick access to your favourite apps without needing to open the Dash, which may suit your workflow. - -Each ‘folder’ is, actually, an application that opens up and positions itself near the origin point. But the overall effect is one that looks like an OS X style stack or an Android folder popover. - -Folder icons can be customised or auto-generated based on the applications tucked up inside. Existing folders can be edited, rearranged, rename and re-other stuff, too. - -- Create as many folders as you like -- Choose custom or auto-generated folder icon -- 3 folder layouts to choose from -- Set custom icons for apps added to folders -- Edit existing folders - -- Unity Folders Website - -### Caffeine ### - -A staple for many of us, and not just in our drinks, Caffeine offers a fast, silent way to stop your screensaver or lock-screen kicking in. The degree of usefulness will depend on your circumstances (read: quirks of your system), and though it’s not quite as user friendly as it once was, it’s still worth [checking out][3]. - -### System Monitor Indicator ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/multiload-indicator-in-ubuntu.jpg) - -If you’re a stat hound who likes to keep tabs on apps, processes and hardware status, Linux makes it easy. From Conky Configs to Terminal Commands — there’s no shortage of ways to monitor your CPU usage, network traffic or GPU temperature. - -But by far my favourite is System **Monitor Indicator** – also known as indicator-multiload — available from the Ubuntu Software Center. It has a host of configuration options, too. - -- [Click to Install ‘System Load Indicator’ on Ubuntu][4] - -### Power Saving Tools for Linux Laptops ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2012/08/front.jpg) - -**TLP** - -Linux distributions don’t have the best reputation when it comes to power efficiency on portable devices. - -If your own Linux laptop can barely get you from the sofa to the kitchen before needing a recharge, there are some tools you can try. - -TLP is one of the most popular automated background tool promising to prolong battery life of laptops running Linux. It does this by adjusting the settings and behaviour of system processes and hardware, such as enabling Wi-Fi power saving mode, runtime power management of PCI bus devices, and processor frequency scaling. - -It’s available to [install on Ubuntu 14.04 LTS and later using the dedicated TLP PPA][5] and comes with a ‘catch-all’ config to get you started. The more advanced users among you can dive in and manually adjust the settings to suit your own hardware, something that a [thorough guide on the TLP wiki][6] makes easy. - -**Laptop Mode Tools** - -If TLP sounds a little too complex — and there’s no shame if it does — there’s a simpler alternative: **Laptop Mode Tools**. This package is available to install from the Ubuntu Software Center and keeps the tweaks made to a set of sane defaults (Wi-Fi, Bluetooth, etc.). - -Laptop Mode Tools cannot be installed at the same time as TLP. - -- [Laptop Mode Tools in Ubuntu Software Center][7] - -### Intel Graphics Installer ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/intelgraphicsdriverinstaller.png) - -The Intel Graphics Installer tool is a must-have for those running Intel graphics hardware who want the best performance they can get. It makes finding and installing the latest Intel GPU drivers a painless, fuss-free affair — no PPAs or Terminal kung foo needed. - -- [Download Intel Graphics Installer for Linux 0.7][8] - -### Hardware Stats ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/02/Screen-Shot-2014-02-10-at-21.05.37.png) - -If you plan on upgrading your PC or replacing a worn-out part you’ll need to get some specific hardware details, such as RAM type, CPU socket set or what PCI slots are available. - -**I-Nex** makes unearthing this, and host of other detailed system stats, easy. Use it to find your motherboard model number, RAM stepping, S.M.A.R.T. status and…well, pretty much anything else you can think of! - -- [Learn More About I-Nex on Launchpad][9] - -### Disk Space Visualizer ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/disk-usage-visualizer-for-ubuntu.jpg) - -In this age of 1TB hard drives we might not need to be as prudent with disk space as we once were. But for those of using a smallish SSD, running multiple partitions or working in a virtual machine with a fixed-size virtual disk, there’ll be times when freeing up a bit of extra space is required. - -GNOME Disks, installed in Ubuntu by default, makes finding the biggest space-gobbling culprits easy. Ideal for locating hidden logs, caches, and media files. - -### BleachBit (Cruft Cleaner) ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/bleachbit.jpg) - -Windows users will be familiar with applications like CCleaner, which scan for and clean out junk files, empty folders, bloated caches, and obsolete packages. For a a similarly quick and effortless click n’ clean solution on Ubuntu try **BleachBit**. - -It is a powerful tool, so do pay attention to what you’re cleaning. Don’t aimlessly check every box; not everything that it can clean needs to be. Play it smart; when in doubt, leave it out. - -- [Install BleachBit from Ubuntu Software Center][10] - -Got a favourite system utility of your own? Let others know about it in the comments. --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2014/11/useful-tools-for-ubuntu-do-you-use-them - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.florian-diesch.de/software/indicator-privacy/index.html -[2]:http://www.florian-diesch.de/software/indicator-privacy/dist/indicator-privacy_0.04-1_all.deb -[3]:http://www.omgubuntu.co.uk/2014/05/stop-ubuntu-sleeping-caffeine -[4]:apt://indicator-mulitload -[5]:https://launchpad.net/~linrunner/+archive/ubuntu/tlp/+packages -[6]:http://linrunner.de/en/tlp/docs/tlp-configuration.html -[7]:https://apps.ubuntu.com/cat/applications/laptop-mode-tools/ -[8]:https://01.org/linuxgraphics/downloads/2014/intelr-graphics-installer-linux-1.0.7 -[9]:https://launchpad.net/i-nex -[10]:https://apps.ubuntu.com/cat/applications/bleachbit/ diff --git a/translated/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md b/translated/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md new file mode 100644 index 0000000000..5b60043bcd --- /dev/null +++ b/translated/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md @@ -0,0 +1,155 @@ +11 个 增强你的 Ubuntu 使用体验的实用工具 +================================================================================ +**无论你是一个相对的新手还是经验丰富的专家,我们都想从我们的操作系统中得到更多的东西。正如大多数现代的操作系统,相比于乍一看呈现出的内容,Ubuntu 有更多东西可以向我们提供。** + +从调整和优化 Unity 桌面的外观、行为、性能 到 执行系统维护,有着大量的实用工具和应用可以帮助你 **调整 Ubuntu 来无时不刻地满足你的需求**。 + +注意时刻: Ubuntu 一直都配备了‘合理的默认设置---即工作良好的选项---’,以达到开箱即用,这些默认设置适合大多数人,并且它们都是经过了测试,采用及推荐等过程的。 + +但一个尺寸并不适合所有。对于我们当中的能工巧匠和实验主义者来说,默认设置只是他们定制系统的起点。 + +所以,无需更多的唠叨, 这里有 11 个极好的实用工具来帮助你增强你的 Ubuntu 使用体验。 + +### Unity Tweak Tool ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/unity-tweak-tool.jpg) + +我将以这个列表中最重要的一个工具: **Unity Tweak Tool** 来开始这次的介绍。定制的厨房水槽(注:不知该如何翻译,感觉意思是:水槽之于厨房的重要性相当于该软件之于定制 Ubuntu 的重要性), Unity Tweak Tool 提供了一系列针对 Ubuntu 和 Unity 桌面的系统综合调整功能。 + +它被各种开关,切换和控制塞得满满的,使得你可以任意设置从 Unity 桌面的外观到 Unity 的行为之类的任何东西。你可以使用它 **快速简便地改变 GTK 主题和图标集**、设置热区、调整启动器图标尺寸、增加或移除工作区,以及 ---特别地---开启 Unity 桌面中被巧妙隐藏的“通过点击最小化”的特点。 + +免费并可直接从 Ubuntu 软件中心里找到, Unity Tweak Tool 是非常值得保留在你的口袋里的工具之一。 + +### Unity Privacy Indicator ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/indicator-privacy-in-ubuntu.jpg) + +隐私是一个非常,非常重要的事,事实也恰恰如此。但这个话题总是被隐藏在二进制之下(注:感觉这里翻译有误,不太确定)。让一些数据或习惯,比如说你经常打开的应用,在本地被记录下来,这或许会让你感到高兴,但对于 你在 Dash 中的搜索数据被发送带第三方服务机构(尽管这些数据或许是匿名的)这类事情,你就高兴不起来了。 + +[Privacy Indicator][1] 是一个帮助你时刻跟踪 Ubuntu桌面系统中哪些文件、目录和服务正被获取、记录及搜索的实用工具。 + +通过快速的点击被添加到桌面面板上的‘眼睛’图标,你可以: + +- 开启或关闭在线搜索结果,Zeitgeist(注:根据图片看,Zeitgeist 指的是 record activity), HUD 记录 和 GeoIP 服务 +- 快速的启用 清理 Zeitgeist,F2(注:根据图片看,F2 指的是 通过 Alt-F2 执行的命令),当前文件等等的记录数据 +- 展示或隐藏桌面图标以及它们在桌面面板上的名称 + +上面的最后两个选项在这个应用中似乎有点被放错了位置,但对于那些要分享截图或截屏的人来说,将会泄露更少的隐私。 + +- [从这里下载 Indicator Privacy (.deb)][2] + +### Unity Folders ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/unity-folders.jpg) + +**Android, iOS, OS X, Chrome OS, 和 GNOME Shell 都有应用橱窗, 借助一个极好的第三方应用,Unity 也可以实现类似功能。** + +“Unity Folders” 允许你组织位于 Unity 启动器中的应用到实用的橱窗中,--- 如 游戏,办公,社交等。不必打开 Dash,你就可以快速启动你喜爱的应用,这非常适合你的工作流。 + +每一个 ‘橱窗’其实一个打开 ,但总体效果看上去就像是一个 OS X 的风格栈 或 Android 的切换框(注:这里的翻译我拿不准)。 + +橱窗的图标可以自定义或根据橱窗内的应用来自动生成。已经存在的橱窗可以被编辑,重新组织,重命名以及如下的更多选择: + +- 根据你的喜好创建任意多的橱窗 +- 选择自定义或自动生成橱窗图标 +- 可选择 3 种橱窗样式 +- 为添加到橱窗中的应用设定自定义图标 +- 编辑现有橱窗 + +[Unity Folders 的网址](http://unity-folders.exceptionfound.com/) +(注:根据原文来看,这里应该有链接,转换为 md 文档时没有加上链接) + +### 咖啡因 ### + +对于我们中的许多人来说,咖啡因是主食,它并不只存在于饮料之中。咖啡因提供了一个快速,温和的方式来阻止你的屏保或锁屏起作用。有用的程度将取决于你的环境(即你系统的怪癖) (注:这一句我没有完全理解原文的意思),并且尽管它不像以前那样对用户友好,它仍然值得你[尝试一下][3]。 + +### 系统状态指示器 (System Monitor Indicator) ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/multiload-indicator-in-ubuntu.jpg) + +假如你是一个状态迷,即一个喜欢密切关注程序,进程和硬件的状态的人, Linux 很容易满足你的需求。从 Conky 的配置到终端命令,并不缺少监视你的 CPU 使用情况、网络流量或 GPU 温度的方法。 + +但至今为止,我最喜爱的应用是 系统**监视指示器**,---也被叫做多负载指示器---它可从 Ubuntu 软件中心获得。它也有着大量的配置选项。 + +- [点击这个链接,在 Ubuntu 中 下载 ‘System Load Indicator’][4] + +### 针对 Linux 笔记本电脑的省电工具 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2012/08/front.jpg) + +**TLP** + +当提到便携式设备上的电池使用效率时,Linux 发行版本并没有最好的声誉。 + +如果你自己的 Linux 笔记本可以勉强在再次充电之前,让你从沙发到厨房,那么这里有几个你可以试试的工具。 + +TLP 是最受欢迎的确保延长 Linux 笔记本的电池寿命的自动化后台工具之一,它是通过调整系统进程和硬件的设置及行为来达到此目的的,例如 启动 Wi-Fi 省电模式, PCI 总线设备的实时电量管理和处理器的频率缩放调整。 + +在 Ubuntu 14.04 LTS 以及后续发行版本中可以使用 TLP 专用的 PPA 来安装它。且它只带了‘包罗万象’的设置来使你踏上配置它的旅程。 在我们之中的高级用户可以潜心研究并根据你自己的硬件来调整设置,一个 [关于 TLP 的完整指导 wiki][6] 使得设置更加容易。 + +**Laptop Mode Tools** + +假如 TLP 听起来有一点复杂 --这也并没有什么可羞耻的--这里有一个更简单的替代品: **Laptop Mode Tools**。 这个软件包可从 Ubuntu 软件中心直接安装,且本身设置好了一系列合理的默认设置(Wi-Fi,蓝牙等等)。 + +Laptop Mode Tools 不能和 TLP 同时被安装在电脑中。 + +- [Ubuntu 软件中心里的 Laptop Mode Tools ][7] + +### Intel 显卡驱动安装工具 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/intelgraphicsdriverinstaller.png) + +对于那些运行 Intel 显卡硬件,并想使得这些硬件发挥出最佳性能的人来说,Intel 显卡安装工具是必须拥有的。 它使得 查找并安装最新的 Intel GPU 驱动变得不再是一件痛苦和大费周折的事 ---因为这无需 PPA 或任何的终端使用知识。 + +- [下载针对 Linux平台的 Intel 图形安装器 0.7 版本][8] + +### Hardware Stats ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/02/Screen-Shot-2014-02-10-at-21.05.37.png) + +假如你计划 升级你的 PC 或替换一个坏掉的零部件,你需要知道一些特定的硬件信息,例如 RAM 类型,CPU插座类型 或 查看那个PCI 槽是可用的等信息。 + +**I-Nex**可以使得 发掘出以上的信息以及其他的系统具体状态变得更加容易。使用它来查找你的主板型号、S.M.A.R.T.(注:为 Self-Monitoring, Analysis and Reporting Technology 的缩写,经常写为 SMART ) 状态,以及你想得出的很多东西! + +- [可从 Launchpad 了解到更多关于 I-Nex 的信息][9] + +### 磁盘空间可视化程序(Disk Space Visualizer) ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/disk-usage-visualizer-for-ubuntu.jpg) + +在这个硬盘以 1TB 计数的时代,我们或许不必同以前一样对硬盘空间的使用三思而后行。但对于那些使用小容量的 SSD,运行多个分区或在一个拥有固定虚拟磁盘大小的虚拟机上工作,总有感觉 释放一些额外空间是必要的 这种想法的时候。 + +GNOME Disks,在 Ubuntu 中被默认安装,使得查找占用最大磁盘空间的罪魁祸首变得容易。对于定位隐藏的日志、缓存和视频文件,它是非常完美的工具。 + +### BleachBit (Cruft Cleaner) ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/bleachbit.jpg) + +Windows 用户可能对像 CCleaner 之类的应用很熟悉,它可以扫描并清理垃圾文件、空白文件夹、臃肿的缓存以及陈旧的软件包。在 Ubuntu 上,一个相似的快速且毫不费力的一键式清理方法可以试试 **BleachBit** 。 + +它是一个强大的工具,所以一定要注意你正在清理什么。不要漫无目的地确认每个选项框;不是所有的东西它都可以清理。所以请合理地使用它,当你对某个选项有疑问时,就跳过它。 + +- [Install BleachBit from Ubuntu Software Center][10] + +你已经有了自己最喜欢的系统实用工具了吗?可以在下面的评论中让其他人知晓它。 +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/useful-tools-for-ubuntu-do-you-use-them + +作者:[Joey-Elijah Sneddon][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.florian-diesch.de/software/indicator-privacy/index.html +[2]:http://www.florian-diesch.de/software/indicator-privacy/dist/indicator-privacy_0.04-1_all.deb +[3]:http://www.omgubuntu.co.uk/2014/05/stop-ubuntu-sleeping-caffeine +[4]:apt://indicator-mulitload +[5]:https://launchpad.net/~linrunner/+archive/ubuntu/tlp/+packages +[6]:http://linrunner.de/en/tlp/docs/tlp-configuration.html +[7]:https://apps.ubuntu.com/cat/applications/laptop-mode-tools/ +[8]:https://01.org/linuxgraphics/downloads/2014/intelr-graphics-installer-linux-1.0.7 +[9]:https://launchpad.net/i-nex +[10]:https://apps.ubuntu.com/cat/applications/bleachbit/ From ae052da79bea48274ad1fbe4737ac4b4a6650318 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 1 Mar 2015 01:04:16 +0800 Subject: [PATCH 136/163] Update 20150104 How to set up a cross-platform backup server on Linux with BackupPC.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译。 --- ...p a cross-platform backup server on Linux with BackupPC.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md b/sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md index 48df08fa3b..41336f53f6 100644 --- a/sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md +++ b/sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md @@ -1,3 +1,5 @@ +FSSlc translating + How to set up a cross-platform backup server on Linux with BackupPC ================================================================================ Just in case you haven't been able to tell from my earlier posts on [backupninja][1] and [backup-manager][2], I am a big backup fan. When it comes to backup, I'd rather have too much than not enough, because if the need arises, you will be grateful that you took the time and effort to generate extra copies of your important data. @@ -131,4 +133,4 @@ via: http://xmodulo.com/backuppc-cross-platform-backup-server-linux.html [4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html [5]:http://ask.xmodulo.com/enable-nux-dextop-repository-centos-rhel.html [6]:http://xmodulo.com/recommend/linuxguide -[7]:http://xmodulo.com/how-to-enable-ssh-login-without.html \ No newline at end of file +[7]:http://xmodulo.com/how-to-enable-ssh-login-without.html From 26f1f6cba931d73c1d4944da5e14540516920107 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 28 Feb 2015 15:27:17 -0300 Subject: [PATCH 137/163] repair the reposit and translate --- ...e a syslog server with rsyslog on Linux.md | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 translated/tech/20141205 How to configure a syslog server with rsyslog on Linux.md diff --git a/translated/tech/20141205 How to configure a syslog server with rsyslog on Linux.md b/translated/tech/20141205 How to configure a syslog server with rsyslog on Linux.md new file mode 100644 index 0000000000..21d6e8993b --- /dev/null +++ b/translated/tech/20141205 How to configure a syslog server with rsyslog on Linux.md @@ -0,0 +1,166 @@ +如何在linux上通过rsyslog来配置一个syslog服务器 +======================================================================== +syslog服务器表示一个用来监控一个网络中的端点--所有能够通过网络来发送日志的设施(包含了Linux或Windows服务器,路由器,交换机以及其他主机)--的中央日志。 通过设置一个syslog服务器,可以将不同设施/主机发送的日志,过滤和合并到一个独立的位置,这样使得你更容易地查看和获取重要的日志消息。 + +**rsyslog** 被作为标准的syslog守护进程预装在了大多数的Linux发行版中。在客户端/服务器架构的配置下,**rsyslog**同时扮演了两种角色:1.作为一个syslog服务器,**rsyslog**可以收集来自其他设施的日志信息;2.作为一个syslog客户端,**rsyslog**可以将其内部的日志信息传输到远程的syslog服务器。 + + +在此,我们演示了在linux上如何通过**rsyslog**来配置一个中心化syslog服务器。 在进入详解之前,先温习一下syslog标准。 + +### syslog标准基础### + +当通过syslog机制来收集日志时,有3个必须要考虑到的重要事情: + +- **设施层级**: 监听何种类型的进程 +- **严重性 (优先) 级别**: 收集何种类型的日志消息 +- **目标**: 发送或记录日志消息到何处 + +现在我们更加深入地了解一下配置是如何定义的。 + + +设施层级定义了一种用来对内部系统进程进行分类的方法,linux中的一些常见的设施包括: + +- **auth**: 身份验证相关的消息(登录时) +- **cron**: 进程或应用调度相关的消息 +- **daemon**: 守护进程相关的消息(内部服务器) +- **kernel**: 内核相关的消息 +- **mail**: 内部邮件服务器相关的消息 +- **syslog**: syslog 守护进程本身相关的消息 +- **lpr**: 打印服务相关的消息 +- **local0 - local7**: 用户自定义的消息 (local7 通常被Cisco 和 Windows 服务器 使用) + +严重性(优先)级别是通过标准的缩写和赋予的数字来进行定义和标准化的,其中的数字7具有最高的级别,这些级别包含了: + +- emerg: Emergency(紧急)- 0 +- alert: Alerts (报警)- 1 +- crit: Critical (关键)- 2 +- err: Errors (错误)- 3 +- warn: Warnings (警告)- 4 +- notice: Notification (通知)- 5 +- info: Information (消息)- 6 +- debug: Debugging (调试)- 7 + +最后,目标语句迫使一个syslog客户端来执行以下3个任务中的一个:1.保存日志消息到一个本地文件;2. 通过TCP/UDP将消息路由到远程的syslog服务器中 +;3.将其发送到一个标准输出中,例如控制台。 + +在rsyslog, syslog配置是基于以下模式进行结构化的。 + + [facility-level].[severity-level] [destination] + +### Configure Rsyslog on Linux ### +### 在Linux中配置Rsyslog### + +在我们理解syslog之后,现在是时候来通过rsyslog来将一个Linux服务器配置为一个中心syslog服务器了,另外我们也将看到如何将基于Windows的系统配置为一个syslog客户端来发送内部日志到该syslog服务器中。 + +### 第1步: 初始化系统需求 ### + +为了将linux主机设置为一个中央日志服务器, 我们需要创建一个隔离的/var 分区,并分配足够大的磁盘空间或者创建一个特殊的LVM卷组。这样就会使得syslog服务器能够承担在日积月累收集日志所带来的潜在增长。 + + +### 第2步: 让rsyslog 后台进程生效 ### + +rsyslog守护进程来自于当前的linux发布版本的预装模块,但是默认并没有启动。为了能够让rsyslog守护进程能够接受外部的消息,需要编辑其配置文件/etc/rsyslog.conf. + +如果已经准备好打开文件进行编辑,查找到下面的两行所在的位置,通过删除其行首的#字符来取消其注释。 + + $ModLoad imudp + $UDPServerRun 514 + +这会使得rsysolog守护进程能够在UDP端口514上接受日志消息了---UDP是一种比TCP速度快,但是并不具有TCP一样的数据流程的可靠性。所以如果你需要使用可靠的传送机制,就可以通过取消以下行的注释。 + + $ModLoad imtcp + $InputTCPServerRun 514 + +需要注意的是,TCP和UDP可以被同时生效来监听TCP/UDP 连接。 + +### 第3步:创建日志接受模板### + +接下来的这步,需要我们来为远程消息创建模板,并告知rsyslog守护进程如何记录从其他客户端机器所接受到的消息。 + + +使用文本编辑器来打开 /etc/rsyslog.conf,然后在GLOBAL DIRECTIVE块前追加以下的模板。 + + $template RemoteLogs,"/var/log/%HOSTNAME%/%PROGRAMNAME%.log" * + *.* ?RemoteLogs + & ~ + +在此对该模板进行简单解释,$template RemoteLogs(“RemoteLogs” 字符串可以为任何其他的指令名称)指令强制rsyslog后台进程将日志消息写道/var/log下的分开的本地日志文件中,其中日志文件的名称是基于远程日志发送机器的主机名以及生成该日志的应用程序名进行定义的。其中第二行暗示了我们将RemoteLogs模板应用到所有接受到的日志上。 + + +符号"& ~"表示了一个重定向规则,被用来告知rsyslog守护进程停止对日志消息的进一步处理,并且不要在本地写入。如果该重定向规则没有使用,那么所有的远程消息都会在写入上述描述的日志文件之外同时被写入到本地日志文件,这就意味着日志消息实际上被写了两次。使用该规则的另外一个结果就是syslog服务器本身的日志消息只会被以该机器主机名命名的专有文件中。 + + +如果你想要的话,也可以使用下面的模式对特定的设备或严重性级别使用新的模板直接来记录日志消息。 + + + [facility-level].[severity-level] ?RemoteLogs + +例如: + +将所有内部的所有优先级别的用户验证消息指定为RemoteLogs模板: + + authpriv.* ?RemoteLogs + +将所有系统进程中除开mail,用户验证和cron消息之外的进程产生的消息级别的日志指定为RemoteLogs模板: + + + *.info,mail.none,authpriv.none,cron.none ?RemoteLogs + +如果我们想要将所有从远程客户端接受到的消息写入到一个以它们的IP地址命名的单个文件中,可以使用以下的模板。在此我们为该模板赋予了“IPTemplate”名称。 + + $template IpTemplate,"/var/log/%FROMHOST-IP%.log" + *.* ?IpTemplate + & ~ + +在我们生效rsyslog守护进程以及编辑其配置文件之后,需要重启该守护进程。 + +在 Debian,Ubuntu 或 CentOS/RHEL 6中: + + $ sudo service rsyslog restart + +在 Fedora 或 CentOS/RHEL 7中: + + $ sudo systemctl restart rsyslog + +我们可以通过netstat命令来验证rsyslog守护进程是否正常工作。 + + $ sudo netstat -tulpn | grep rsyslog + +在UDP监听端口下工作的rsyslog守护进程会有类似下面的输出。 + + udp 0 0 0.0.0.0:514 0.0.0.0:* 551/rsyslogd + udp6 0 0 :::514 :::* 551/rsyslogd + +如果rsyslog守护进程被设置在TCP连接端口,那么应该有类似下面所示的输出。 + + tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN 1891/rsyslogd + tcp6 0 0 :::514 :::* LISTEN 1891/rsyslogd + +### 发送Windows日志到一个远程的rsyslog服务器### + +为了将一个Windows客户端的日志消息转发到我们的rsyslog服务器,需要一个Windows syslog 代理。当然,有许多的syslog代理可以在windows上运行,在此我们可以使用一个自由软件程序 [Datagram SyslogAgent][1]. + + + +在下载安装该syslog代理后,需要将其配置为作为服务运行。指定使用何种协议来发送数据,以及远程rsyslog服务器的IP地址和端口,最后指定应该传输的事件日志类型,如下所示。 + +![](https://farm8.staticflickr.com/7509/15305930594_27b7f4440a_o.jpg) + +在我们完成所有的这些配置之后,我们就可以启动该服务并且在中央rsyslog服务器中使用命令行工具tailf来查看日志文件了。 + +### 总结### + +通过创建一个可以收集本地和远程主机的中央rsyslog服务器,我们可以更好地了解在这些系统内部究竟发生着什么,而且可以更加容易地调试他们的问题,是否在他们之间有任何缓慢或崩溃存在。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/configure-syslog-server-linux.html + +作者:[Caezsar M][a] +译者:[theo-l](https://github.com/theo-l) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/caezsar +[1]:http://www.syslogserver.com/download.html From 8164797ef82dbb74ef7ae14cce954d944663588e Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 28 Feb 2015 15:27:40 -0300 Subject: [PATCH 138/163] repair the reposit and translate --- ...e a syslog server with rsyslog on Linux.md | 154 ------------------ 1 file changed, 154 deletions(-) delete mode 100644 sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md diff --git a/sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md b/sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md deleted file mode 100644 index 276e5a05fa..0000000000 --- a/sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md +++ /dev/null @@ -1,154 +0,0 @@ -How to configure a syslog server with rsyslog on Linux -================================================================================ -A syslog server represents a central log monitoring point on a network, to which all kinds of devices including Linux or Windows servers, routers, switches or any other hosts can send their logs over network. By setting up a syslog server, you can filter and consolidate logs from different hosts and devices into a single location, so that you can view and archive important log messages more easily. - -On most Linux distributions, **rsyslog** is the standard syslog daemon that comes pre-installed. Configured in a client/server architecture, **rsyslog** can play both roles; as a syslog server **rsyslog** can gather logs from other devices, and as a syslog client, **rsyslog** can transmit its internal logs to a remote syslog server. - -In this tutorial, we cover how to configure a centralized syslog server using **rsyslog** on Linux. Before we go into the details, it is instructive to go over syslog standard first. - -### Basic of Syslog Standard ### - -When logs are collected with syslog mechanism, three important things must be taken into consideration: - -- **Facility level**: what type of processes to monitor -- **Severity (priority) level**: what type of log messages to collect -- **Destination**: where to send or record log messages - -Let's take a look at how the configuration is defined in more detail. - -The facility levels define a way to categorize internal system processes. Some of the common standard facilities in Linux are: - -- **auth**: messages related to authentication (login) -- **cron**: messages related to scheduled processes or applications -- **daemon**: messages related to daemons (internal servers) -- **kernel**: messages related to the kernel -- **mail**: messages related to internal mail servers -- **syslog**: messages related to the syslog daemon itself -- **lpr**: messages related to print servers -- **local0 - local7**: messages defined by user (local7 is usually used by Cisco and Windows servers) - -The severity (priority) levels are standardized, and defined by using standard abbreviation and an assigned number with number 7 being the highest level of all. These levels are: - -- emerg: Emergency - 0 -- alert: Alerts - 1 -- crit: Critical - 2 -- err: Errors - 3 -- warn: Warnings - 4 -- notice: Notification - 5 -- info: Information - 6 -- debug: Debugging - 7 - -Finally, the destination statement enforces a syslog client to perform one of three following tasks: (1) save log messages on a local file, (2) route them to a remote syslog server over TCP/UDP, or (3) send them to stdout such as a console. - -In rsyslog, syslog configuration is structured based on the following schema. - - [facility-level].[severity-level] [destination] - -### Configure Rsyslog on Linux ### - -Now that we understand syslog, it's time to configure a Linux server as a central syslog server using rsyslog. We will also see how to configure a Windows based system as a syslog client to send internal logs to the syslog server. - -#### Step One: Initial System Requirements #### - -To set up a Linux host as a central log server, we need to create a separate /var partition, and allocate a large enough disk size or create a LVM special volume group. That way, the syslog server will be able to sustain the exponential growth of collected logs over time. - -#### Step Two: Enable Rsyslog Daemon #### - -rsyslog daemon comes pre-installed on modern Linux distributions, but is not enabled by default. To enable rsyslog daemon to receive external messages, edit its configuration file located in /etc/rsyslog.conf. - -Once the file is opened for editing, search and uncomment the below two lines by removing the # sign from the beginning of lines. - - $ModLoad imudp - $UDPServerRun 514 - -This will enable rsyslog daemon to receive log messages on UDP port 514. UDP is way faster than TCP, but does not provide reliability on data flow the same way as TCP does. If you need to reliable delivery, you can enable TCP by uncommenting the following lines. - - $ModLoad imtcp - $InputTCPServerRun 514 - -Note that both TCP and UDP can be set on the server simultaneously to listen on TCP/UDP connections. - -#### Step Three: Create a Template for Log Receipt #### - -In the next step we need to create a template for remote messages, and tell rsyslog daemon how to record messages received from other client machines. - -Open /etc/rsyslog.conf with a text editor, and append the following template before the GLOBAL DIRECTIVES block: - - $template RemoteLogs,"/var/log/%HOSTNAME%/%PROGRAMNAME%.log" * - *.* ?RemoteLogs - & ~ - -This template needs a little explanation. The $template RemoteLogs directive ("RemoteLogs" string can be changed to any other descriptive name) forces rsyslog daemon to write log messages to separate local log files in /var/log/, where log file names are defined based on the hostname of the remote sending machine as well as the remote application that generated the logs. The second line ("*.* ?RemoteLogs") implies that we apply RemoteLogs template to all received logs. - -The "& ~" sign represents a redirect rule, and is used to tell rsyslog daemon to stop processing log messages further, and not write them locally. If this redirection is not used, all the remote messages would be also written on local log files besides the log files described above, which means they would practically be written twice. Another consequence of using this rule is that the syslog server's own log messages would only be written to dedicated files named after machine's hostname. - -If you want, you can direct log messages with a specific facility or severity level to this new template using the following schema. - - [facility-level].[severity-level] ?RemoteLogs - -For example: - -Direct all internal authentication messages of all priority levels to RemoteLogs template: - - authpriv.* ?RemoteLogs - -Direct informational messages generated by all system processes, except mail, authentication and cron messages to RemoteLogs template: - - *.info,mail.none,authpriv.none,cron.none ?RemoteLogs - -If we want all received messages from remote clients written to a single file named after their IP address, you can use the following template. We assign a new name "IpTemplate" to this template. - - $template IpTemplate,"/var/log/%FROMHOST-IP%.log" - *.* ?IpTemplate - & ~ - -After we have enabled rsyslog daemon and edited its configuration file, we need to restart the daemon. - -On Debian, Ubuntu or CentOS/RHEL 6: - - $ sudo service rsyslog restart - -On Fedora or CentOS/RHEL 7: - - $ sudo systemctl restart rsyslog - -We can verify that rsyslog daemon is functional by using netstat command. - - $ sudo netstat -tulpn | grep rsyslog - -The output should look like the following in case rsyslog daemon listens on UDP port. - - udp 0 0 0.0.0.0:514 0.0.0.0:* 551/rsyslogd - udp6 0 0 :::514 :::* 551/rsyslogd - -If rsyslog daemon is set up to listen on TCP connections, the output should look like this. - - tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN 1891/rsyslogd - tcp6 0 0 :::514 :::* LISTEN 1891/rsyslogd - -#### Send Windows Logs to a Remote Rsyslog Server #### - -To forward a Windows based client's log messages to our rsyslog server, we need a Windows syslog agent. While there are a multitude of syslog agents that can run on Windows, we can use [Datagram SyslogAgent][1], which is a freeware program. - -After downloading and installing the syslog agent, we need to configure it to run as a service. Specify the protocol though which it will send data, the IP address and port of a remote rsyslog server, and what type of event logs should be transmitted as follows. - -![](https://farm8.staticflickr.com/7509/15305930594_27b7f4440a_o.jpg) - -After we have set up all the configurations, we can start the service and watch the log files on the central rsyslog server using tailf command line utility. - -### Conclusion ### - -By creating a central rsyslog server that can collect log files of local or remote hosts, we can get a better idea on what is going on internally in their systems, and can debug their problems more easily should any of them become unresponsive or crash. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/configure-syslog-server-linux.html - -作者:[Caezsar M][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/caezsar -[1]:http://www.syslogserver.com/download.html \ No newline at end of file From 1455f404d0544fc8f07b7f9580ac181b760276f6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 1 Mar 2015 13:24:39 +0800 Subject: [PATCH 139/163] translating --- ...th Answers--How to install a USB webcam in Raspberry Pi.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md b/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md index 443c9c0ad8..1085abddc4 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md @@ -1,3 +1,5 @@ +Translating----geekpi + Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi ================================================================================ > **Question**: Can I use a standard USB-based webcam on Raspberry Pi? How can I check if my USB webcam is compatible with Raspberry Pi, and how can I install it on Raspberry Pi? @@ -60,4 +62,4 @@ via: http://ask.xmodulo.com/install-usb-webcam-raspberry-pi.html [1]:http://xmodulo.com/install-raspberry-pi-camera-board.html [2]:http://xmodulo.com/go/usb_webcam [3]:http://elinux.org/RPi_USB_Webcams -[4]:http://xmodulo.com/go/usb_powerhub \ No newline at end of file +[4]:http://xmodulo.com/go/usb_powerhub From f57d993216e478d424c82e2b911da7bb7db8c13f Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 1 Mar 2015 13:56:29 +0800 Subject: [PATCH 140/163] translated --- ...to install a USB webcam in Raspberry Pi.md | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md b/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md index 1085abddc4..805a0aaca4 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md @@ -1,50 +1,48 @@ -Translating----geekpi - -Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi +Linux有问必答 -- 如何在树莓派上安装USB网络摄像头 ================================================================================ -> **Question**: Can I use a standard USB-based webcam on Raspberry Pi? How can I check if my USB webcam is compatible with Raspberry Pi, and how can I install it on Raspberry Pi? +> **Question**: 我可以在树莓派上使用标准的USB网络摄像头么?我该如何检查USB网络摄像头与树莓派是否兼容?另外我该如何在树莓派上安装它? -If you want to take pictures or record videos using Raspberry Pi board, you can install [Raspberry Pi camera board][1]. If you do not want to shell out money just for the camera board module, there is yet another way, which is to utilize a commonly found [USB web camera][2]. You may already have one for your PC. +如果你想在树莓上拍照或者录影,你可以安装[树莓派的摄像头板][1]。如果你不想要为摄像头模块花费额外的金钱,那有另外一个方法,就是你常见的[USB 摄像头][2]。你可能已经在PC上安装了。 -In this tutorial, we show how to set up a USB web camera on Raspberry Pi board. We assume that you are using Raspbian operation system. +本教程中,我会展示如何在树莓派上设置摄像头。我们假设你使用的系统是Raspbian。 -Before we start, it is better to check if your USB web camera is [one of those][3] which are known to be compatible with Raspberry Pi. If your USB webcam is not found in the compatibility list, don't be discouraged, as there is still a chance that your USB web camera may be detected by Raspberry Pi. +在此之前,你最好检查一下你的摄像头是否在[这些][3]已知与树莓派兼容的摄像头之中。如果你的摄像头不在这个兼容列表中,不要丧气,仍然有可能你的摄像头被树莓派检测到。 -### Check if a USB Webcam is Compatible with Raspberry Pi ### +### 检查USB摄像头是否雨树莓派兼容 ### -To check whether your USB web camera is detected on Raspberry Pi or not, plug it into the USB port of your Raspberry Pi, and type lsusb command in the terminal. +要检查你的摄像头是否可以被树莓派检测到,将它插入到树莓派的USB口中,然后输入下面的命令。 $ lsusb -If the output of the command does not list your webcam, there is a possibility that this is because your Raspberry Pi doesn't supply enough power needed for your USB web camera. In this case, you can try using a separate power line for the USB web camera, such as [USB power hub][4], and then repeat the lsusb command. If the USB webcam is still not recognized, we can only suggest you buy another USB web camera which is supported by Raspberry Pi. +如果输出中没有你的摄像头,那么有可能你的树莓派的电源无法供应足够的电力给你的摄像头。这时你可以给你的摄像头用独立的电源线,比如[有源USB hub][4],并重新输入lsusb命令。如果摄像头还是不能被识别,我们只有建议你购买其他树莓派支持的摄像头了。 ![](https://farm8.staticflickr.com/7408/16576646025_898f17f36e_o.png) -In the above screenshot, the USB web camera is detected as "1e4e:0102", but it doesn't show the maker or the name of the web camera. When we try it with Fedora 20 in a laptop, it is successfully detected as "1e4e:0102 Cubeternet GL-UPC822 UVC WebCam." +在上面的截屏中,USB摄像头被识别为“1e4e:0102”,但是没有显示摄像头的制造商。当你在笔记本的Fedora 20中使用它时,它可以成功的检测到“1e4e:0102 Cubeternet GL-UPC822 UVC WebCam”。 -Another way to check if your USB web camera is supported by Raspberry Pi is by checking the /dev directory. If there is /dev/video0, this implies that your USB webcam is recognized by Raspberry Pi. +另外一个可以检查摄像头是否被树莓派支持的方法是检查/dev目录。如果有/dev/video0,那么这暗示树莓派支持你的摄像头。 -### Take a Picture with USB Webcam ### +### 用USB Webcam拍照片 ### -After your USB webcam is successfully hooked up with Raspberry Pi, the next thing to do is to take some pictures to verify its functionality. +当USB摄像头成功挂载到树莓派上之后,下一步就是拍一些照片来验证它的功能了。 -For this, you can install fswebcam, which is a small webcam application. You can install fswebcam directly from the Raspbian repository as follows. +要想拍摄照片,你要安装fswebcam,这是一款小型摄像头程序。你可以直接通过Raspbian的仓库来安装fswebcam。 $ sudo apt-get install fswebcam -Once fswebcam is installed, run the following command in a terminal to capture a picture from the USB webcam: +fswebcam安装完成后,在终端中运行下面的命令来抓去一张来自摄像头的照片: $ fswebcam --no-banner -r 640x480 image.jpg -This command will capture a picture with 640x480 resolution, and save it as image.jpg. It will not put any banner in the bottom part of the picture. +这条命令可以抓取一张640x480分辨率的照片,并且用jpg格式保存。它不会在照片的地步留下任何标志. ![](https://farm8.staticflickr.com/7417/16576645965_302046d230_o.png) -Here is the result from the fswebcam command with 640x480 resolution. +这就是fswebcam下640x480分辨率的结果。 ![](https://farm8.staticflickr.com/7345/16575497512_8d77f1b34c_o.jpg) -The next example picture is captured without defining the resolution. The picture color is blueish, and the default resolution is only 358x288. +下面的例子是没有定义分辨率的照片。图片是偏蓝的,并且默认的分辨率是358x288。 ![](https://farm8.staticflickr.com/7390/15954067124_760fbcdd9c_o.jpg) @@ -53,7 +51,7 @@ The next example picture is captured without defining the resolution. The pictur via: http://ask.xmodulo.com/install-usb-webcam-raspberry-pi.html 作者:[Kristophorus Hadiono][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From bd32f16d55979cf86f3b7ca766480df1c1923520 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 1 Mar 2015 13:57:38 +0800 Subject: [PATCH 141/163] translated --- ...s with Answers--How to install a USB webcam in Raspberry Pi.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md (100%) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md b/translated/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md similarity index 100% rename from sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md rename to translated/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md From e933a22f4877e9a7471af56fdfe3608605014766 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Sun, 1 Mar 2015 22:47:52 +0800 Subject: [PATCH 142/163] [Translated 20150104 How to set up a cross-platform backup server on Linux with BackupPC.md] --- ...rm backup server on Linux with BackupPC.md | 136 ------------------ ...rm backup server on Linux with BackupPC.md | 133 +++++++++++++++++ 2 files changed, 133 insertions(+), 136 deletions(-) delete mode 100644 sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md create mode 100644 translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md diff --git a/sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md b/sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md deleted file mode 100644 index 41336f53f6..0000000000 --- a/sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md +++ /dev/null @@ -1,136 +0,0 @@ -FSSlc translating - -How to set up a cross-platform backup server on Linux with BackupPC -================================================================================ -Just in case you haven't been able to tell from my earlier posts on [backupninja][1] and [backup-manager][2], I am a big backup fan. When it comes to backup, I'd rather have too much than not enough, because if the need arises, you will be grateful that you took the time and effort to generate extra copies of your important data. - -In this post, I will introduce you to [BackupPC][3], a cross-platform backup server software which can perform pull backup of Linux, Windows and MacOS client hosts over network. BackupPC adds a number of features that make managing backups an almost fun thing to do. - -### Features of BackupPC ### - -BackupPC comes with a robust web interface that allows you to collect and manage backups of other remote client hosts in a centralized fashion. Using the web interface, you can examine logs and configuration files, start/cancel/schedule backups of other remote hosts, and visualize current status of backup tasks. You can also browse through archived files and restore individual files or entire jobs from backup archives very easily. To restore individual single files, you can download them from any previous backup directly from the web interface. As if this weren't enough, no special client-side software is needed for client hosts. On Windows clients, the native SMB protocol is used, whereas on *nix clients, you will use `rsync` or tar over SSH, RSH or NFS. - -### Installing BackupPC ### - -On Debian, Ubuntu and their derivatives, run the following command. - - # aptitude install backuppc - -On Fedora, use `yum` command. Note the case sensitive package name. - -On CentOS/RHEL 6, first enable [EPEL repository][4]. On CentOS/RHEL 7, enable [Nux Dextop][5] repository instead. Then go ahead with `yum` command: - - # yum install BackupPC - -As usual, both package management systems will take care of dependency resolution automatically. In addition, as part of the installation process, you may be asked to configure, or reconfigure the web server that will be used for the graphical user interface. The following screenshot is from a Debian system: - -![](https://farm8.staticflickr.com/7573/16163781711_6218b620ef_c.jpg) - -Select your choice by pressing the space bar, and then move to Ok with the tab key and hit ENTER. - -You will then be presented with the following screen informing you that an administrative user account 'backuppc', along with its corresponding password (which can be changed later if desired), has been created to manage BackupPC. Note that both a HTTP user account and a regular Linux account of the same name 'backuppc' will be created with an identical password. The former is needed to access BackupPC's protected web interface, while the latter is needed to perform backup using rsync over SSH. - -![](https://farm8.staticflickr.com/7579/15979622809_25e734658d_c.jpg) - -You can change the default password for the HTTP user 'backuppc' with the following command: - - # htpasswd /path/to/hash/file backuppc - -As for a regular 'backuppc' [Linux][6] user account, use passwd command to change its default password. - - # passwd backuppc - -Note that the installation process creates the web and the program's configuration files automatically. - -### Launching BackupPC and Configuring Backups ### - -To start, open a browser window and point to http:///backuppc/. When prompted, enter the default HTTP user credentials that were supplied to you earlier. If the authentication succeeds, you will be taken to the main page of the web interface. - -![](https://farm9.staticflickr.com/8601/15543330314_f6fdaa235e_z.jpg) - -Most likely the first thing that you will want to do is add a new client host to back up. Go to "Edit Hosts" in the Task pane. We will add two client hosts: - -- Host #1: CentOS 7 [IP 192.168.0.17] -- Host #2: Windows 7 [IP 192.168.0.103] - -We will back up the CentOS host using rsync over SSH and the Windows host using SMB. Prior to performing the backup, we need to set up [key-based authentication][7] to our CentOS host and a shared folder in our Windows machine. - -Here are the instructions for setting up key-based authentication for a remote CentOS host. We create the 'backuppc' user's RSA key pair, and transfer its public key to the root account of the CentOS host. - - # usermod -s /bin/bash backuppc - # su - backuppc - # ssh-keygen -t rsa - # ssh-copy-id root@192.168.0.17 - -When prompted, type yes and enter root's password for 192.168.0.17. - -![](https://farm8.staticflickr.com/7496/16164929932_8fc817125d_b.jpg) - -You will need root access for a remote CentOS host to grant write access to all its file system in case of restoring a backup of files or directories owned by root. - -Once the CentOS and Windows hosts are ready, add them to BackupPC using the web interface: - -![](https://farm9.staticflickr.com/8586/15979622709_76c2dcf68c_z.jpg) - -The next step consists of modifying each host's backup settings: - -![](https://farm8.staticflickr.com/7461/16163781611_765c147f9f_z.jpg) - -The following image shows the configuration for the backup of the Windows machine: - -![](https://farm8.staticflickr.com/7480/16139884676_bddfafed75_z.jpg) - -And the following screenshot shows the settings for the backup of the CentOS box: - -![](https://farm8.staticflickr.com/7557/16139884666_34ff8fd858_z.jpg) - -### Starting a Backup ### - -To start each backup, go to each host's settings, and then click "Start Full Backup": - -![](https://farm8.staticflickr.com/7536/15978247428_458c023f4c.jpg) - -At any time, you can view the status of the process by clicking on the host's home as shown in the image above. If it fails for some reason, a link to a page with the error message(s) will appear in the host menu as well. When a backup completes successfully, a directory with the host's name or IP address is created under /var/lib/backuppc/pc in the server: - -![](https://farm8.staticflickr.com/7549/16165680115_196ee42a49_z.jpg) - -Feel free to browse those directories for the files from the command line, but there is an easier way to look for those files and restore them. - -### Restoring Backup ### - -To view the files that have been saved, go to "Browse backups" under each host's main menu. You can visualize the directories and files at a glance, and select those that you want to restore. Alternatively, you can click on files to open them with the default program, or right click and choose Save link as to download it to the machine where you're working at the time: - -![](https://farm8.staticflickr.com/7506/16165680105_bd5883e0da_c.jpg) - -If you want, you can download a zip or tar file containing the backup's contents: - -![](https://farm8.staticflickr.com/7507/15978247398_18e81667cd_z.jpg) - -or just restore the file(s): - -![](https://farm8.staticflickr.com/7545/15545911003_2aca8a36fc_z.jpg) - -### Conclusion ### - -There is a saying that goes, "the simpler, the better", and that is just what BackupPC has to offer. In BackupPC, you will not only find a backup tool but also a very versatile interface to manage your backups of several operating systems without needing any client-side application. I believe that's more than reason enough for you to give it at least a try. - -Feel free to leave your comments and questions, if you have any, using the form below. I am always happy to hear what readers have to say! - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/backuppc-cross-platform-backup-server-linux.html - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/gabriel -[1]:http://xmodulo.com/backup-debian-system-backupninja.html -[2]:http://xmodulo.com/linux-backup-manager.html -[3]:http://backuppc.sourceforge.net/ -[4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[5]:http://ask.xmodulo.com/enable-nux-dextop-repository-centos-rhel.html -[6]:http://xmodulo.com/recommend/linuxguide -[7]:http://xmodulo.com/how-to-enable-ssh-login-without.html diff --git a/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md b/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md new file mode 100644 index 0000000000..64310419c3 --- /dev/null +++ b/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md @@ -0,0 +1,133 @@ +如何在 Linux 上使用 BackupPC 来设置一个跨平台的备份服务器 +================================================================================ +为了防止你不能分辨这篇教程和我先前关于[backupninja][1] 和 [backup-manager][2] 的帖子,=== 我是一个积极的备份迷。当提到备份,我宁愿备份的太多而不希望备份不足,因为如果我们有需要的话,你将会感激你花费了时间和精力来为你的重要数据生成额外的拷贝。 + +在这篇帖子中,我将向你介绍[BackupPC][3],一个跨平台的备份服务器软件,它可以通过网络为 Linux,Window 和 MacOS 等系统上的客户端主机拉取备份。BackupPC 添加了一系列的特点使得管理备份变为一件快乐的事。 + +### BackupPC 的特点 ### + +BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收集和管理其他远程客户端主机上的备份。通过使用它的 Web 界面,你可以检查日志和配置文件、为其他远程主机启动/取消/安排备份任务以及可视化备份任务的当前状态。你也可以非常容易地浏览归档的文件以及从备份的归档中恢复个人文件或整个作业。为了恢复单一的个人文件,你可以直接通过 Web 界面来下载任何先前备份的文件。若如这还不够,针对客户端主机,没有特别的客户端软件需要安装。在 Windows 客户端上, 本机 SMB 协议将被使用,而对于 *nix 客户端,你将使用 `rsync` 或 通过 SSH, RSH 或 NFS 来使用 `tar` 。 + +### 安装 BackupPC ### + +在 Debian,Ubuntu 和它们的衍生版本上,运行下面的命令: + + # aptitude install backuppc + +在 Fedra, 使用 `yum` 命令。请注意软件包名字对大小写敏感。 + +在 CentOS/RHEL 6 上,首先要启用 [EPEL 软件仓库][4]。在 CentOS/RHEL 7 上,请替代启用 [Nux Dextop][5] 。然后接着使用 `yum` 命令: + + # yum install BackupPC + +同往常一样,这两种包管理系统都会自动地对依赖问题进行解决。另外,作为安装过程中的一部分,你可能会被要求去配置或重新配置用于图形用户界面的 Web 服务器。下面的截图来自于 Debian 系统: + +![](https://farm8.staticflickr.com/7573/16163781711_6218b620ef_c.jpg) + +通过空格键来确定你的选择,然后使用 tab 键移动到 Ok 选项并敲回车键。 + +接着类似于下面的截屏将会呈现在你眼前,通知你一个用来管理 BackupPC 的名为 ‘backuppc’的管理员用户以及相应的密码(这个密码可以在以后被更改,如果你希望的话)已经被创建。这里需要注意的是:同样名为 ‘backuppc’的一个 HTTP 账户和一个常规的 Linux 账户将会被创建,它们使用同一个密码。需要前者的目的是来访问受保护的 BackupPC 的 Web 界面,而后者则是为了通过 SSH 来使用 `rsync` 来执行备份任务。 + +![](https://farm8.staticflickr.com/7579/15979622809_25e734658d_c.jpg) + +你可以使用下面的命令来更改 HTTP 账户 ‘backuppc’ 的默认密码: + + # htpasswd /path/to/hash/file backuppc + +至于常规的 ‘backuppc’ [Linux][6]账户,可以使用 `passwd`命令来更改它的默认密码: + + # passwd backuppc + +需要提及的是:安装过程中会自动创建 Web 和程序的配置文件。 + +### 启动 BackupPC 并设置备份 ### + +首先,打开一个浏览器窗口并指向 http:///backuppc/ 。当弹出提示框时,输入先前向你提供的默认 HTTP 用户凭据(注:即用户名 backuppc 和相应的默认密码)。假如认证成功,你就会被带入到 Web 界面的主页: + +![](https://farm9.staticflickr.com/8601/15543330314_f6fdaa235e_z.jpg) + +你想做的第一件事最有可能是新增一个客户端主机来备份。进入任务窗格中的 “编辑主机”选项。我们将添加两个客户端主机: + +- Host #1: CentOS 7 [IP 192.168.0.17] +- Host #2: Windows 7 [IP 192.168.0.103] + +我们将通过 SSH 使用 `rsync`来备份 CentOS 主机,使用 SMB 来备份 Windows 主机。在执行备份之前,我们需要向我们的 CentOS 主机设置 [基于密码认证][7](注:这里我不知如何翻译,根据链接,感觉是无需密码来连接主机)以及在我们的 Windows 主机中设置一个共享目录。 + +下面是关于如何设置为一个远程 CentOS 主机设置 key-based authentication 的指导。我们创建 ‘backuppc’ 用户的 RSA 密钥对,并向 CentOS 主机上的 root 账户传递它的公共密钥。 + + # usermod -s /bin/bash backuppc + # su - backuppc + # ssh-keygen -t rsa + # ssh-copy-id root@192.168.0.17 + +当弹出提示框时,键入 yes 并为 192.168.0.17 键入 root 用户的密码: + +![](https://farm8.staticflickr.com/7496/16164929932_8fc817125d_b.jpg) + +你需要一个远程的 CentOS 主机的 root 权限来在该主机中的文件系统中发放写权限,以防恢复的备份文件或目录的所有者为 root 账户。 + +一旦 CentOS 和 Windows 主机都准备完毕,使用 Web 界面将它们添加到 BackupPC: + +![](https://farm9.staticflickr.com/8586/15979622709_76c2dcf68c_z.jpg) + +下一步的内容由更改每个主机的备份设置组成: + +![](https://farm8.staticflickr.com/7461/16163781611_765c147f9f_z.jpg) + +接下来的图片展示了 Windows 主机的备份设置: + +![](https://farm8.staticflickr.com/7480/16139884676_bddfafed75_z.jpg) + +而接着的截图展示了 CentOS 盒子的备份设置: + +![](https://farm8.staticflickr.com/7557/16139884666_34ff8fd858_z.jpg) + +### 开始一个备份任务 ### + +为了开始每个备份,到每个主机的设定选项,然后点击“开始全备份”: + +![](https://farm8.staticflickr.com/7536/15978247428_458c023f4c.jpg) + +在任何时候,你都可以通过点击如上图展示的每个主机的备份主页来查看备份任务的状态。假如因为某些原因备份失败,在主机菜单中将会出现一个指向包含错误信息的网页。当一个备份任务被成功地完成,一个名为主机名或 IP 地址的目录将会在服务器的 /var/lib/backuppc/pc 目录下被创建。 + +![](https://farm8.staticflickr.com/7549/16165680115_196ee42a49_z.jpg) + +我们也可以随意地在命令行中浏览这个目录中的文件,但存在一个更加简单的方式来查找和恢复这些文件。 + +### 恢复备份 ### + +为了浏览已经保存过的文件。进入每个主机的主菜单下的 “浏览备份”选项,你可以一目了然地看到目录和文件,并选择那些你想恢复的文件。另外,你还可以通过点击文件来使用默认程序打开文件或右击文件并选择“另存为”来下载该文件到你正工作的机器上: + +![](https://farm8.staticflickr.com/7506/16165680105_bd5883e0da_c.jpg) + +如若你想,你可以下载一个包含所有你想备份的内容的 zip 或 tar 文件: + +![](https://farm8.staticflickr.com/7507/15978247398_18e81667cd_z.jpg) + +或只是恢复文件: + +![](https://farm8.staticflickr.com/7545/15545911003_2aca8a36fc_z.jpg) + +### 总结 ### + +有句俗话说,"越简单,越好",而这正是 BackupPC 所提供。在 BackupPC 中,你将不仅找到了一个备份工具,而且还找到了一个无需任何客户端应用来在几个不同的操作系统中管理你的备份的方法。我相信这就有足够的理由让你去尝试一下。 + +欢迎使用下面的评论框来留下你的评论和问题,假如你有的话。我总是乐于听取读者想说的话! +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/backuppc-cross-platform-backup-server-linux.html + +作者:[Gabriel Cánepa][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:http://xmodulo.com/backup-debian-system-backupninja.html +[2]:http://xmodulo.com/linux-backup-manager.html +[3]:http://backuppc.sourceforge.net/ +[4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[5]:http://ask.xmodulo.com/enable-nux-dextop-repository-centos-rhel.html +[6]:http://xmodulo.com/recommend/linuxguide +[7]:http://xmodulo.com/how-to-enable-ssh-login-without.html From 139ae0df2ad8b09c553742baa68d898c4d83df8f Mon Sep 17 00:00:00 2001 From: FSSlc Date: Sun, 1 Mar 2015 23:06:07 +0800 Subject: [PATCH 143/163] =?UTF-8?q?=E5=AF=B9=E8=AF=91=E6=96=87=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=B8=80=E4=BA=9B=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rm backup server on Linux with BackupPC.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md b/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md index 64310419c3..9dd434a809 100644 --- a/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md +++ b/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md @@ -2,7 +2,7 @@ ================================================================================ 为了防止你不能分辨这篇教程和我先前关于[backupninja][1] 和 [backup-manager][2] 的帖子,=== 我是一个积极的备份迷。当提到备份,我宁愿备份的太多而不希望备份不足,因为如果我们有需要的话,你将会感激你花费了时间和精力来为你的重要数据生成额外的拷贝。 -在这篇帖子中,我将向你介绍[BackupPC][3],一个跨平台的备份服务器软件,它可以通过网络为 Linux,Window 和 MacOS 等系统上的客户端主机拉取备份。BackupPC 添加了一系列的特点使得管理备份变为一件快乐的事。 +在这篇帖子中,我将向你介绍 [BackupPC][3],一个跨平台的备份服务器软件,它可以通过网络为 Linux,Windows 和 MacOS 等系统上的客户端主机拉取备份。BackupPC 添加了一系列的特点使得管理备份变为一件快乐的事。 ### BackupPC 的特点 ### @@ -14,9 +14,9 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 # aptitude install backuppc -在 Fedra, 使用 `yum` 命令。请注意软件包名字对大小写敏感。 +在 Fedora上, 使用 `yum` 命令。请注意软件包名字对大小写敏感。 -在 CentOS/RHEL 6 上,首先要启用 [EPEL 软件仓库][4]。在 CentOS/RHEL 7 上,请替代启用 [Nux Dextop][5] 。然后接着使用 `yum` 命令: +在 CentOS/RHEL 6 上,首先要启用 [EPEL 软件仓库][4]。在 CentOS/RHEL 7 上,请替代启用 [Nux Dextop][5] 软件仓库。然后接着使用 `yum` 命令: # yum install BackupPC @@ -46,14 +46,14 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ![](https://farm9.staticflickr.com/8601/15543330314_f6fdaa235e_z.jpg) -你想做的第一件事最有可能是新增一个客户端主机来备份。进入任务窗格中的 “编辑主机”选项。我们将添加两个客户端主机: +你想做的第一件事最有可能是通过新增一个客户端主机来备份。进入任务窗格中的 “编辑主机”选项。我们将添加两个客户端主机: - Host #1: CentOS 7 [IP 192.168.0.17] - Host #2: Windows 7 [IP 192.168.0.103] 我们将通过 SSH 使用 `rsync`来备份 CentOS 主机,使用 SMB 来备份 Windows 主机。在执行备份之前,我们需要向我们的 CentOS 主机设置 [基于密码认证][7](注:这里我不知如何翻译,根据链接,感觉是无需密码来连接主机)以及在我们的 Windows 主机中设置一个共享目录。 -下面是关于如何设置为一个远程 CentOS 主机设置 key-based authentication 的指导。我们创建 ‘backuppc’ 用户的 RSA 密钥对,并向 CentOS 主机上的 root 账户传递它的公共密钥。 +下面是关于如何为一个远程 CentOS 主机设置 key-based authentication 的指导。我们创建 ‘backuppc’ 用户的 RSA 密钥对,并向 CentOS 主机上的 root 账户传递它的公共密钥。 # usermod -s /bin/bash backuppc # su - backuppc @@ -64,7 +64,7 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ![](https://farm8.staticflickr.com/7496/16164929932_8fc817125d_b.jpg) -你需要一个远程的 CentOS 主机的 root 权限来在该主机中的文件系统中发放写权限,以防恢复的备份文件或目录的所有者为 root 账户。 +你需要一个远程的 CentOS 主机的 root 权限来在该主机中的文件系统中发放写权限,以防要恢复的备份文件或目录的所有者为 root 账户。 一旦 CentOS 和 Windows 主机都准备完毕,使用 Web 界面将它们添加到 BackupPC: @@ -78,17 +78,17 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ![](https://farm8.staticflickr.com/7480/16139884676_bddfafed75_z.jpg) -而接着的截图展示了 CentOS 盒子的备份设置: +而接着的截图展示了 CentOS 主机的备份设置: ![](https://farm8.staticflickr.com/7557/16139884666_34ff8fd858_z.jpg) ### 开始一个备份任务 ### -为了开始每个备份,到每个主机的设定选项,然后点击“开始全备份”: +为了开始备份,到每个主机的设定选项,然后点击“开始全备份”: ![](https://farm8.staticflickr.com/7536/15978247428_458c023f4c.jpg) -在任何时候,你都可以通过点击如上图展示的每个主机的备份主页来查看备份任务的状态。假如因为某些原因备份失败,在主机菜单中将会出现一个指向包含错误信息的网页。当一个备份任务被成功地完成,一个名为主机名或 IP 地址的目录将会在服务器的 /var/lib/backuppc/pc 目录下被创建。 +在任何时候,你都可以通过点击如上图展示的每个主机的备份主页来查看备份任务的状态。假如因为某些原因备份失败,在主机菜单中将会出现一个指向包含错误信息的网页的链接。当一个备份任务被成功地完成,一个被命名为主机名或 IP 地址的目录将会在服务器的 /var/lib/backuppc/pc 目录下被创建。 ![](https://farm8.staticflickr.com/7549/16165680115_196ee42a49_z.jpg) @@ -96,7 +96,7 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ### 恢复备份 ### -为了浏览已经保存过的文件。进入每个主机的主菜单下的 “浏览备份”选项,你可以一目了然地看到目录和文件,并选择那些你想恢复的文件。另外,你还可以通过点击文件来使用默认程序打开文件或右击文件并选择“另存为”来下载该文件到你正工作的机器上: +为了浏览已经保存过的文件。进入每个主机的主菜单下的 “浏览备份”选项,你可以一目了然地看到目录和文件,并选择那些你想恢复的文件。另外,你还可以通过点击文件来使用默认程序打开文件或右击文件并选择“另存为”来下载该文件到你正在工作的机器上: ![](https://farm8.staticflickr.com/7506/16165680105_bd5883e0da_c.jpg) @@ -110,7 +110,7 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ### 总结 ### -有句俗话说,"越简单,越好",而这正是 BackupPC 所提供。在 BackupPC 中,你将不仅找到了一个备份工具,而且还找到了一个无需任何客户端应用来在几个不同的操作系统中管理你的备份的方法。我相信这就有足够的理由让你去尝试一下。 +有句俗话说,"越简单,越好",而这正是 BackupPC 所提供的东西。在 BackupPC 中,你将不仅找到了一个备份工具,而且还找到了一个无需任何客户端应用来在几个不同的操作系统中管理你的备份的方法。我相信这就有足够的理由让你去尝试一下。 欢迎使用下面的评论框来留下你的评论和问题,假如你有的话。我总是乐于听取读者想说的话! -------------------------------------------------------------------------------- From 59e874292600260e6c08f6a538332330eb3b6499 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 1 Mar 2015 23:23:50 +0800 Subject: [PATCH 144/163] Update 20150209 How to back up a Debian system using backupninja.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...150209 How to back up a Debian system using backupninja.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150209 How to back up a Debian system using backupninja.md b/sources/tech/20150209 How to back up a Debian system using backupninja.md index edfc6150f6..97e43f57bf 100644 --- a/sources/tech/20150209 How to back up a Debian system using backupninja.md +++ b/sources/tech/20150209 How to back up a Debian system using backupninja.md @@ -1,3 +1,5 @@ +FSSlc translating + How to back up a Debian system using backupninja ================================================================================ Prudence or experience by disaster can teach every [sysadmin][1] the importance of taking frequent system backups. You can do so by writing good old shell scripts, or using one (or more) of the many backup tools available for the job. Thus the more tools you become acquainted with, the better informed decisions you will make when implementing a backup solution. @@ -108,4 +110,4 @@ via: http://xmodulo.com/backup-debian-system-backupninja.html [a]:http://xmodulo.com/author/gabriel [1]:http://xmodulo.com/recommend/sysadminbook -[2]:https://labs.riseup.net/code/projects/backupninja \ No newline at end of file +[2]:https://labs.riseup.net/code/projects/backupninja From fe9ae45cec479a26fdc7ba12495eacfefa758213 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sun, 1 Mar 2015 19:02:36 -0300 Subject: [PATCH 145/163] translating --- ... command examples to create or extract archives in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md b/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md index 0a39b7f476..adef9acbf2 100644 --- a/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md +++ b/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md @@ -1,3 +1,4 @@ +theo-l translating 10 quick tar command examples to create/extract archives in Linux ================================================================================ ### Tar command on Linux ### @@ -184,4 +185,4 @@ via: http://www.binarytides.com/linux-tar-command/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:https://plus.google.com/117145272367995638274/posts \ No newline at end of file +[a]:https://plus.google.com/117145272367995638274/posts From 304716f11ac7dff3ca831add332d15abd418ea98 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sun, 1 Mar 2015 21:36:27 -0300 Subject: [PATCH 146/163] translated --- ... to create or extract archives in Linux.md | 188 ----------------- ... to create or extract archives in Linux.md | 191 ++++++++++++++++++ 2 files changed, 191 insertions(+), 188 deletions(-) delete mode 100644 sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md create mode 100644 translated/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md diff --git a/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md b/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md deleted file mode 100644 index adef9acbf2..0000000000 --- a/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md +++ /dev/null @@ -1,188 +0,0 @@ -theo-l translating -10 quick tar command examples to create/extract archives in Linux -================================================================================ -### Tar command on Linux ### - -The tar (tape archive) command is a frequently used command on linux that allows you to store files into an archive. - -The commonly seen file extensions are .tar.gz and .tar.bz2 which is a tar archive further compressed using gzip or bzip algorithms respectively. - -In this tutorial we shall take a look at simple examples of using the tar command to do daily jobs of creating and extracting archives on linux desktops or servers. - -### Using the tar command ### - -The tar command is available by default on most linux systems and you do not need to install it separately. - -> With tar there are 2 compression formats, gzip and bzip. The "z" option specifies gzip and "j" option specifies bzip. It is also possible to create uncompressed archives. - -#### 1. Extract a tar.gz archive #### - -Well, the more common use is to extract tar archives. The following command shall extract the files out a tar.gz archive - - $ tar -xvzf tarfile.tar.gz - -Here is a quick explanation of the parameters used - - -> x - Extract files -> -> v - verbose, print the file names as they are extracted one by one -> -> z - The file is a "gzipped" file -> -> f - Use the following tar archive for the operation - -Those are some of the important options to memorise - -**Extract tar.bz2/bzip archives** - -Files with extension bz2 are compressed with the bzip algorithm and tar command can deal with them as well. Use the j option instead of the z option. - - $ tar -xvjf archivefile.tar.bz2 - -#### 2. Extract files to a specific directory or path #### - -To extract out the files to a specific directory, specify the path using the "-C" option. Note that its a capital C. - - $ tar -xvzf abc.tar.gz -C /opt/folder/ - -However first make sure that the destination directory exists, since tar is not going to create the directory for you and will fail if it does not exist. - -#### 3. Extract a single file #### - -To extract a single file out of an archive just add the file name after the command like this - - $ tar -xz -f abc.tar.gz "./new/abc.txt" - -More than once file can be specified in the above command like this - - $ tar -xv -f abc.tar.gz "./new/cde.txt" "./new/abc.txt" - -#### 4. Extract multiple files using wildcards #### - -Wildcards can be used to extract out a bunch of files matching the given wildcards. For example all files with ".txt" extension. - - $ tar -xv -f abc.tar.gz --wildcards "*.txt" - -#### 5. List and search contents of the tar archive #### - -If you want to just list out the contents of the tar archive and not extract them, use the "-t" option. The following command prints the contents of a gzipped tar archive, - - $ tar -tz -f abc.tar.gz - ./new/ - ./new/cde.txt - ./new/subdir/ - ./new/subdir/in.txt - ./new/abc.txt - ... - -Pipe the output to grep to search a file or less command to browse the list. Using the "v" verbose option shall print additional details about each file. - -For tar.bz2/bzip files use the "j" option - -Use the above command in combination with the grep command to search the archive. Simple! - - $ tar -tvz -f abc.tar.gz | grep abc.txt - -rw-rw-r-- enlightened/enlightened 0 2015-01-13 11:40 ./new/abc.txt - -#### 6. Create a tar/tar.gz archive #### - -Now that we have learnt how to extract existing tar archives, its time to start creating new ones. The tar command can be told to put selected files in an archive or an entire directory. Here are some examples. - -The following command creates a tar archive using a directory, adding all files in it and sub directories as well. - - $ tar -cvf abc.tar ./new/ - ./new/ - ./new/cde.txt - ./new/abc.txt - -The above example does not create a compressed archive. Just a plain archive, that puts multiple files together without any real compression. - -In order to compress, use the "z" or "j" option for gzip or bzip respectively. - - $ tar -cvzf abc.tar.gz ./new/ - -> The extension of the file name does not really matter. "tar.gz" and tgz are common extensions for files compressed with gzip. ".tar.bz2" and ".tbz" are commonly used extensions for bzip compressed files. - -#### 7. Ask confirmation before adding files #### - -A useful option is "w" which makes tar ask for confirmation for every file before adding it to the archive. This can be sometimes useful. - -Only those files would be added which are given a yes answer. If you do not enter anything, the default answer would be a "No". - - # Add specific files - - $ tar -czw -f abc.tar.gz ./new/* - add ‘./new/abc.txt’?y - add ‘./new/cde.txt’?y - add ‘./new/newfile.txt’?n - add ‘./new/subdir’?y - add ‘./new/subdir/in.txt’?n - - # Now list the files added - $ tar -t -f abc.tar.gz - ./new/abc.txt - ./new/cde.txt - ./new/subdir/ - -#### 8. Add files to existing archives #### - -The r option can be used to add files to existing archives, without having to create new ones. Here is a quick example - - $ tar -rv -f abc.tar abc.txt - -> Files cannot be added to compressed archives (gz or bzip). Files can only be added to plain tar archives. - -#### 9. Add files to compressed archives (tar.gz/tar.bz2) #### - -Its already mentioned that its not possible to add files to compressed archives. However it can still be done with a simple trick. Use the gunzip command to uncompress the archive, add file to archive and compress it again. - - $ gunzip archive.tar.gz - $ tar -rf archive.tar ./path/to/file - $ gzip archive.tar - -For bzip files use the bzip2 and bunzip2 commands respectively. - -#### 10. Backup with tar #### - -A real scenario is to backup directories at regular intervals. The tar command can be scheduled to take such backups via cron. Here is an example - - - $ tar -cvz -f archive-$(date +%Y%m%d).tar.gz ./new/ - -Run the above command via cron and it would keep creating backup files with names like - -'archive-20150218.tar.gz'. - -Ofcourse make sure that the disk space is not overflown with larger and larger archives. - -#### 11. Verify archive files while creation #### - -The "W" option can be used to verify the files after creating archives. Here is a quick example. - - $ tar -cvW -f abc.tar ./new/ - ./new/ - ./new/cde.txt - ./new/subdir/ - ./new/subdir/in.txt - ./new/newfile.txt - ./new/abc.txt - Verify ./new/ - Verify ./new/cde.txt - Verify ./new/subdir/ - Verify ./new/subdir/in.txt - Verify ./new/newfile.txt - Verify ./new/abc.txt - -Note that the verification cannot be done on compressed archives. It works only with uncompressed tar archives. - -Thats all for now. For more check out the man page for tar command, with "man tar". - --------------------------------------------------------------------------------- - -via: http://www.binarytides.com/linux-tar-command/ - -作者:[Silver Moon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117145272367995638274/posts diff --git a/translated/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md b/translated/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md new file mode 100644 index 0000000000..75865f7713 --- /dev/null +++ b/translated/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md @@ -0,0 +1,191 @@ +linux中创建和解压文档的10个快速tar命令样例 +================================================================================ +### linux中的tar命令### + +tar(磁带归档)命令是linux系统中被经常用来将文件存入到一个归档文件中的命令。 + +常见的文件扩展包括:.tar.gz 和 .tar.bz2, 分别表示通过gzip或bzip算法进一步压缩的磁带归档文件扩展。 + + +在该教程中我们会窥探一下在linux桌面或服务器版本中使用tar命令来处理一些日常创建和解压归档文件的工作样例。 +### 使用tar命令### + +tar命令在大部分linux系统默认情况下都是可用的,所以你不用单独安装该软件。 + +> tar命令具有两个压缩格式,gzip和bzip,该命令的“z”选项用来指定gzip,“j”选项用来指定bzip。同时也可哟用来创建非压缩归档文件。 + +#### 1.解压一个tar.gz归档 #### + +一般常见的用法是用来解压归档文件,下面的命令将会把文件从一个tar.gz归档文件中解压出来。 + + + $ tar -xvzf tarfile.tar.gz + +这里对这些参数做一个简单解释- + +> x - 解压文件 + +> v - 繁琐,在解压每个文件时打印出文件的名称。 + +> z - 该文件是一个使用 gzip压缩的文件。 + +> f - 使用接下来的tar归档来进行操作。 + +这些就是一些需要记住的重要选项。 + +**解压 tar.bz2/bzip 归档文件 ** + +具有bz2扩展名的文件是使用bzip算法进行压缩的,但是tar命令也可以对其进行处理,但是是通过使用“j”选项来替换“z”选项。 + + $ tar -xvjf archivefile.tar.bz2 + +#### 2.将文件解压到一个指定的目录或路径 #### + +为了将文件解压到一个指定的目录中,使用“-C”选项来指定路径,此处的“C”是大写“C”。 + + $ tar -xvzf abc.tar.gz -C /opt/folder/ + +然后,首先需要确认目标目录是否存在,毕竟tar命令并不会为你创建目录,所以如果目标目录不存在的情况下该命令会失败。 + +####3. 解压出单个文件 #### + +为了从一个归档文件中解压出单个文件,只需要将文件名按照以下方式将其放置在命令后面。 + + $ tar -xz -f abc.tar.gz "./new/abc.txt" + +在上述命令中,可以按照以下方式来指定多个文件。 + + $ tar -xv -f abc.tar.gz "./new/cde.txt" "./new/abc.txt" + +#### 4.使用通配符来解压多个文件 #### + +通配符可以用来解压于给定通配符匹配的一批文件,例如所有以".txt"作为扩展名的文件。 + + $ tar -xv -f abc.tar.gz --wildcards "*.txt" + +#### 5. 列出并检索tar归档文件中的内容 #### + +如果你仅仅想要列出而不是解压tar归档文件的中的内容,使用“-t”选项, 下面的命令用来打印一个使用gzip压缩过的tar归档文件中的内容。 + + $ tar -tz -f abc.tar.gz + ./new/ + ./new/cde.txt + ./new/subdir/ + ./new/subdir/in.txt + ./new/abc.txt + ... + +将输出通过管道定向到grep来搜索一个文件或者定向到less命令来浏览内容列表。 使用"v"繁琐选项将会打印出每个文件的额外详细信息。 + +对于 tar.bz2/bzip文件,需要使用"j"选项。 + +结合上述的命令和grep命令来检索归档文件,如下所示。简单吧! + + $ tar -tvz -f abc.tar.gz | grep abc.txt + -rw-rw-r-- enlightened/enlightened 0 2015-01-13 11:40 ./new/abc.txt + +#### 6.创建一个tar/tar.gz归档文件 #### + +现在我们已经学过了如何解压一个tar归档文件,是时候开始创建一个新的tar归档文件了。tar命令可以用来将所选的文件或整个目录放入到一个归档文件中,以下是相应的样例。 + + +下面的命令使用一个目录来创建一个tar归档文件,它会将该目录中所有的文件和子目录都加入到归档文件中。 + + $ tar -cvf abc.tar ./new/ + ./new/ + ./new/cde.txt + ./new/abc.txt + +上述命令不会创建一个压缩的的归档文件,只是一个普通的归档文件,只是将多个文件放入到一个归档文件中并没有真正地压缩每个文件。 + +为了使用压缩,可以分别使用“z”或“j”选项进行gzip或bzip压缩算法。 + + $ tar -cvzf abc.tar.gz ./new/ + +> 文件的扩展名其实并不真正有什么影响。“tar.gz” 和tgz是gzip压缩算法压缩文件的常见扩展名。 “tar.bz2”和“tbz”是bzip压缩算法压缩文件的常见扩展名。 + + +#### 7. 在添加文件之前进行确认 #### + +一个有用的选项是“w”,该选项使得tar命令在添加每个文件到归档文件之前来让用户进行确认,有时候这会很有用。 + +使用该选项时,只有用户输入yes时的文件才会被加入到归档文件中,如果你输入任何东西,默认的回答是一个“No”。 + + # 添加指定文件 + + $ tar -czw -f abc.tar.gz ./new/* + add ‘./new/abc.txt’?y + add ‘./new/cde.txt’?y + add ‘./new/newfile.txt’?n + add ‘./new/subdir’?y + add ‘./new/subdir/in.txt’?n + + #现在列出所有被加入的文件 + + $ tar -t -f abc.tar.gz + ./new/abc.txt + ./new/cde.txt + ./new/subdir/ + +#### 8. 加入文件到存在的归档文件中 #### + +“r”选项可以被用来将文件加入到已存在的归档文件中,而不用创建一个新的归档文件,下面是一个简单的样例: + + $ tar -rv -f abc.tar abc.txt + +> 文件并不能加入到已压缩的归档文件中(gz 或 bzip)。文件只能被加入到普通的归档文件中。 + +#### 9. 将文件加入到压缩的归档文件中(tar.gz/tar.bz2) #### + +之前已经提到了不可能将文件加入到已压缩的归档文件中,然和依然可以通过简单的一些把戏来完成。使用gunzip命令来解压缩归档文件,然后将文件加入到归档文件中后重新进行压缩。 + + $ gunzip archive.tar.gz + $ tar -rf archive.tar ./path/to/file + $ gzip archive.tar + +对于bzip文件分别使用bzip2和bunzip2。 + +#### 10.通过tar来进行备份 #### + +一个真实的场景是在规则的间隔内来备份目录,tar命令可以通过cron调度来实现这样的一个备份,以下是一个样例 - + + $ tar -cvz -f archive-$(date +%Y%m%d).tar.gz ./new/ + +使用cron来运行上述的命令会保持创建类似以下名称的备份文件 - +'archive-20150218.tar.gz'. + +当然,需要确保日益增长的归档文件不会导致磁盘空间的溢出。 + +#### 11. 在创建归档文件是进行验证 #### + +"W"选项可以用来在创建归档文件之后进行验证,以下是一个简单例子。 + + $ tar -cvW -f abc.tar ./new/ + ./new/ + ./new/cde.txt + ./new/subdir/ + ./new/subdir/in.txt + ./new/newfile.txt + ./new/abc.txt + Verify ./new/ + Verify ./new/cde.txt + Verify ./new/subdir/ + Verify ./new/subdir/in.txt + Verify ./new/newfile.txt + Verify ./new/abc.txt + +需要注意的是验证动作不能呢该在压缩过的归档文件上进行,只能在非压缩的tar归档文件上执行。 + +现在就先到此为止,可以通过“man tar”命令来查看tar命令的的手册。 + +-------------------------------------------------------------------------------- + +via: http://www.binarytides.com/linux-tar-command/ + +作者:[Silver Moon][a] +译者:[theo-l](https://github.com/theo-l) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117145272367995638274/posts From fc13be47c573e77a5aefc0ccf40a89e12484df3b Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 2 Mar 2015 14:27:33 +0800 Subject: [PATCH 147/163] =?UTF-8?q?=E5=BD=92=E6=A1=A3201502?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- published/{ => 201502}/20140819 Top 4 Linux download managers.md | 0 .../{ => 201502}/20140821 What is a good EPUB reader on Linux.md | 0 ...7 How to create a software RAID-1 array with mdadm on Linux.md | 0 ...w to Install and Setup My Weather Indicator in Ubuntu 14.10.md | 0 .../20141030 Test drive Linux with nothing but a flash drive.md | 0 ...7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md | 0 ...ow To Use Emoji Anywhere With Twitter's Open Source Library.md | 0 ...141120 How to install Xen hypervisor on unused old hardware.md | 0 .../{ => 201502}/20141203 Undelete Files on Linux Systems.md | 0 ...The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md | 0 .../20141205 What is a good free control panel for VPS.md | 0 ...ow to configure rsyslog client for remote logging on CentOS.md | 0 ...1211 How to use matplotlib for scientific plotting on Linux.md | 0 ...219 How to block unwanted IP addresses on Linux efficiently.md | 0 ...o schedule appointments and to-do tasks in a Linux terminal.md | 0 .../20141223 20 Linux Commands Interview Questions & Answers.md | 0 ...ltiple Linux Distribution Installations in RHEL or CentOS 7.md | 0 ... FAQs with Answers--How to install Kingsoft Office on Linux.md | 0 ...ux FAQs with Answers--How to rename multiple files on Linux.md | 0 ...1226 How to Download Music from Grooveshark with a Linux OS.md | 0 ... Steps to Setup Local Repository in Ubuntu using APT-mirror.md | 0 ...29 How to Create Btrfs Filesystem in Linux and its Features.md | 0 ...20150104 Auditd--Tool for Security Auditing on Linux Server.md | 0 .../{ => 201502}/20150104 How To Install Websvn In CentOS 7.md | 0 ...To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md | 0 .../20150105 How To Install Winusb In Ubuntu 14.04.md | 0 ...untu apt-get and apt-cache commands with practical examples.md | 0 .../20150106 How to deduplicate files on Linux with dupeGuru.md | 0 .../20150106 Managing Linux server configs with the SaltStack.md | 0 .../20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md | 0 .../20150112 Best GNOME Shell Themes For Ubuntu 14.04.md | 0 ...0150114 How to Configure Chroot Environment in Ubuntu 14.04.md | 0 ...14 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md | 0 ... to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md | 0 ...stalling Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md | 0 .../{ => 201502}/20150114 Why Mac users don't switch to Linux.md | 0 .../20150115 Configure Mate Desktop With Mate Tweak.md | 0 ...es To a Different Directory on a Linux or Unix-like Systems.md | 0 ...5 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md | 0 .../20150116 A Step By Step Guide To Installing Xubuntu Linux.md | 0 ...Create A Lightweight And Persistent Xubuntu Linux USB Drive.md | 0 ...0150119 Cutegram--A Better Telegram Client For GNU or Linux.md | 0 .../{ => 201502}/20150119 How To Disable IPv6 In CentOS 7.md | 0 .../20150119 Quick Tip--How To Restart Cinnamon After Crash.md | 0 published/{ => 201502}/20150121 If a 32-bit integer overflows.md | 0 ...h Answers--How to check disk space on Linux with df command.md | 0 ...122 Linux FAQs with Answers--How to add a cron job on Linux.md | 0 ...Linux FAQs with Answers--How to check memory usage on Linux.md | 0 ... FAQs with Answers--How to set a custom HTTP header in curl.md | 0 .../20150125 4 Best Modern Open Source Code Editors For Linux.md | 0 ...126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md | 0 ...i-Fi Direct Android Implementation Causes Denial of Service.md | 0 .../{ => 201502}/20150127 Install Jetty Web Server On CentOS 7.md | 0 ...50128 Meet Vivaldi--A New Web Browser Built for Power Users.md | 0 ...K 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md | 0 ...eate and show a presentation from the command line on Linux.md | 0 ...our profile could not be opened correctly' on Google Chrome.md | 0 ...inux FAQs with Answers--How to install Go language on Linux.md | 0 ...uxQuestions Survey Results Surface Top Open Source Projects.md | 0 published/{ => 201502}/20150209 CrunchBang Linux Is Dead.md | 0 published/{ => 201502}/20150209 Non-Linux FOSS--Homebrew.md | 0 ...Of Two Google Chrome Icons From Dock In Elementary OS Freya.md | 0 62 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201502}/20140819 Top 4 Linux download managers.md (100%) rename published/{ => 201502}/20140821 What is a good EPUB reader on Linux.md (100%) rename published/{ => 201502}/20140917 How to create a software RAID-1 array with mdadm on Linux.md (100%) rename published/{ => 201502}/20141029 How to Install and Setup My Weather Indicator in Ubuntu 14.10.md (100%) rename published/{ => 201502}/20141030 Test drive Linux with nothing but a flash drive.md (100%) rename published/{ => 201502}/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md (100%) rename published/{ => 201502}/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md (100%) rename published/{ => 201502}/20141120 How to install Xen hypervisor on unused old hardware.md (100%) rename published/{ => 201502}/20141203 Undelete Files on Linux Systems.md (100%) rename published/{ => 201502}/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md (100%) rename published/{ => 201502}/20141205 What is a good free control panel for VPS.md (100%) rename published/{ => 201502}/20141210 How to configure rsyslog client for remote logging on CentOS.md (100%) rename published/{ => 201502}/20141211 How to use matplotlib for scientific plotting on Linux.md (100%) rename published/{ => 201502}/20141219 How to block unwanted IP addresses on Linux efficiently.md (100%) rename published/{ => 201502}/20141219 How to schedule appointments and to-do tasks in a Linux terminal.md (100%) rename published/{ => 201502}/20141223 20 Linux Commands Interview Questions & Answers.md (100%) rename published/{ => 201502}/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md (100%) rename published/{ => 201502}/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md (100%) rename published/{ => 201502}/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md (100%) rename published/{ => 201502}/20141226 How to Download Music from Grooveshark with a Linux OS.md (100%) rename published/{ => 201502}/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md (100%) rename published/{ => 201502}/20141229 How to Create Btrfs Filesystem in Linux and its Features.md (100%) rename published/{ => 201502}/20150104 Auditd--Tool for Security Auditing on Linux Server.md (100%) rename published/{ => 201502}/20150104 How To Install Websvn In CentOS 7.md (100%) rename published/{ => 201502}/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md (100%) rename published/{ => 201502}/20150105 How To Install Winusb In Ubuntu 14.04.md (100%) rename published/{ => 201502}/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md (100%) rename published/{ => 201502}/20150106 How to deduplicate files on Linux with dupeGuru.md (100%) rename published/{ => 201502}/20150106 Managing Linux server configs with the SaltStack.md (100%) rename published/{ => 201502}/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md (100%) rename published/{ => 201502}/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md (100%) rename published/{ => 201502}/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md (100%) rename published/{ => 201502}/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md (100%) rename published/{ => 201502}/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md (100%) rename published/{ => 201502}/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md (100%) rename published/{ => 201502}/20150114 Why Mac users don't switch to Linux.md (100%) rename published/{ => 201502}/20150115 Configure Mate Desktop With Mate Tweak.md (100%) rename published/{ => 201502}/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md (100%) rename published/{ => 201502}/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md (100%) rename published/{ => 201502}/20150116 A Step By Step Guide To Installing Xubuntu Linux.md (100%) rename published/{ => 201502}/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md (100%) rename published/{ => 201502}/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md (100%) rename published/{ => 201502}/20150119 How To Disable IPv6 In CentOS 7.md (100%) rename published/{ => 201502}/20150119 Quick Tip--How To Restart Cinnamon After Crash.md (100%) rename published/{ => 201502}/20150121 If a 32-bit integer overflows.md (100%) rename published/{ => 201502}/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md (100%) rename published/{ => 201502}/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md (100%) rename published/{ => 201502}/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md (100%) rename published/{ => 201502}/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md (100%) rename published/{ => 201502}/20150125 4 Best Modern Open Source Code Editors For Linux.md (100%) rename published/{ => 201502}/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md (100%) rename published/{ => 201502}/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md (100%) rename published/{ => 201502}/20150127 Install Jetty Web Server On CentOS 7.md (100%) rename published/{ => 201502}/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md (100%) rename published/{ => 201502}/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md (100%) rename published/{ => 201502}/20150202 How to create and show a presentation from the command line on Linux.md (100%) rename published/{ => 201502}/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md (100%) rename published/{ => 201502}/20150205 Linux FAQs with Answers--How to install Go language on Linux.md (100%) rename published/{ => 201502}/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md (100%) rename published/{ => 201502}/20150209 CrunchBang Linux Is Dead.md (100%) rename published/{ => 201502}/20150209 Non-Linux FOSS--Homebrew.md (100%) rename published/{ => 201502}/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md (100%) diff --git a/published/20140819 Top 4 Linux download managers.md b/published/201502/20140819 Top 4 Linux download managers.md similarity index 100% rename from published/20140819 Top 4 Linux download managers.md rename to published/201502/20140819 Top 4 Linux download managers.md diff --git a/published/20140821 What is a good EPUB reader on Linux.md b/published/201502/20140821 What is a good EPUB reader on Linux.md similarity index 100% rename from published/20140821 What is a good EPUB reader on Linux.md rename to published/201502/20140821 What is a good EPUB reader on Linux.md diff --git a/published/20140917 How to create a software RAID-1 array with mdadm on Linux.md b/published/201502/20140917 How to create a software RAID-1 array with mdadm on Linux.md similarity index 100% rename from published/20140917 How to create a software RAID-1 array with mdadm on Linux.md rename to published/201502/20140917 How to create a software RAID-1 array with mdadm on Linux.md diff --git a/published/20141029 How to Install and Setup My Weather Indicator in Ubuntu 14.10.md b/published/201502/20141029 How to Install and Setup My Weather Indicator in Ubuntu 14.10.md similarity index 100% rename from published/20141029 How to Install and Setup My Weather Indicator in Ubuntu 14.10.md rename to published/201502/20141029 How to Install and Setup My Weather Indicator in Ubuntu 14.10.md diff --git a/published/20141030 Test drive Linux with nothing but a flash drive.md b/published/201502/20141030 Test drive Linux with nothing but a flash drive.md similarity index 100% rename from published/20141030 Test drive Linux with nothing but a flash drive.md rename to published/201502/20141030 Test drive Linux with nothing but a flash drive.md diff --git a/published/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md b/published/201502/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md similarity index 100% rename from published/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md rename to published/201502/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md diff --git a/published/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md b/published/201502/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md similarity index 100% rename from published/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md rename to published/201502/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md diff --git a/published/20141120 How to install Xen hypervisor on unused old hardware.md b/published/201502/20141120 How to install Xen hypervisor on unused old hardware.md similarity index 100% rename from published/20141120 How to install Xen hypervisor on unused old hardware.md rename to published/201502/20141120 How to install Xen hypervisor on unused old hardware.md diff --git a/published/20141203 Undelete Files on Linux Systems.md b/published/201502/20141203 Undelete Files on Linux Systems.md similarity index 100% rename from published/20141203 Undelete Files on Linux Systems.md rename to published/201502/20141203 Undelete Files on Linux Systems.md diff --git a/published/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md b/published/201502/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md similarity index 100% rename from published/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md rename to published/201502/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md diff --git a/published/20141205 What is a good free control panel for VPS.md b/published/201502/20141205 What is a good free control panel for VPS.md similarity index 100% rename from published/20141205 What is a good free control panel for VPS.md rename to published/201502/20141205 What is a good free control panel for VPS.md diff --git a/published/20141210 How to configure rsyslog client for remote logging on CentOS.md b/published/201502/20141210 How to configure rsyslog client for remote logging on CentOS.md similarity index 100% rename from published/20141210 How to configure rsyslog client for remote logging on CentOS.md rename to published/201502/20141210 How to configure rsyslog client for remote logging on CentOS.md diff --git a/published/20141211 How to use matplotlib for scientific plotting on Linux.md b/published/201502/20141211 How to use matplotlib for scientific plotting on Linux.md similarity index 100% rename from published/20141211 How to use matplotlib for scientific plotting on Linux.md rename to published/201502/20141211 How to use matplotlib for scientific plotting on Linux.md diff --git a/published/20141219 How to block unwanted IP addresses on Linux efficiently.md b/published/201502/20141219 How to block unwanted IP addresses on Linux efficiently.md similarity index 100% rename from published/20141219 How to block unwanted IP addresses on Linux efficiently.md rename to published/201502/20141219 How to block unwanted IP addresses on Linux efficiently.md diff --git a/published/20141219 How to schedule appointments and to-do tasks in a Linux terminal.md b/published/201502/20141219 How to schedule appointments and to-do tasks in a Linux terminal.md similarity index 100% rename from published/20141219 How to schedule appointments and to-do tasks in a Linux terminal.md rename to published/201502/20141219 How to schedule appointments and to-do tasks in a Linux terminal.md diff --git a/published/20141223 20 Linux Commands Interview Questions & Answers.md b/published/201502/20141223 20 Linux Commands Interview Questions & Answers.md similarity index 100% rename from published/20141223 20 Linux Commands Interview Questions & Answers.md rename to published/201502/20141223 20 Linux Commands Interview Questions & Answers.md diff --git a/published/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md b/published/201502/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md similarity index 100% rename from published/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md rename to published/201502/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md diff --git a/published/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md b/published/201502/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md similarity index 100% rename from published/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md rename to published/201502/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md diff --git a/published/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md b/published/201502/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md similarity index 100% rename from published/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md rename to published/201502/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md diff --git a/published/20141226 How to Download Music from Grooveshark with a Linux OS.md b/published/201502/20141226 How to Download Music from Grooveshark with a Linux OS.md similarity index 100% rename from published/20141226 How to Download Music from Grooveshark with a Linux OS.md rename to published/201502/20141226 How to Download Music from Grooveshark with a Linux OS.md diff --git a/published/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md b/published/201502/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md similarity index 100% rename from published/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md rename to published/201502/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md diff --git a/published/20141229 How to Create Btrfs Filesystem in Linux and its Features.md b/published/201502/20141229 How to Create Btrfs Filesystem in Linux and its Features.md similarity index 100% rename from published/20141229 How to Create Btrfs Filesystem in Linux and its Features.md rename to published/201502/20141229 How to Create Btrfs Filesystem in Linux and its Features.md diff --git a/published/20150104 Auditd--Tool for Security Auditing on Linux Server.md b/published/201502/20150104 Auditd--Tool for Security Auditing on Linux Server.md similarity index 100% rename from published/20150104 Auditd--Tool for Security Auditing on Linux Server.md rename to published/201502/20150104 Auditd--Tool for Security Auditing on Linux Server.md diff --git a/published/20150104 How To Install Websvn In CentOS 7.md b/published/201502/20150104 How To Install Websvn In CentOS 7.md similarity index 100% rename from published/20150104 How To Install Websvn In CentOS 7.md rename to published/201502/20150104 How To Install Websvn In CentOS 7.md diff --git a/published/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md b/published/201502/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md similarity index 100% rename from published/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md rename to published/201502/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md diff --git a/published/20150105 How To Install Winusb In Ubuntu 14.04.md b/published/201502/20150105 How To Install Winusb In Ubuntu 14.04.md similarity index 100% rename from published/20150105 How To Install Winusb In Ubuntu 14.04.md rename to published/201502/20150105 How To Install Winusb In Ubuntu 14.04.md diff --git a/published/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md b/published/201502/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md similarity index 100% rename from published/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md rename to published/201502/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md diff --git a/published/20150106 How to deduplicate files on Linux with dupeGuru.md b/published/201502/20150106 How to deduplicate files on Linux with dupeGuru.md similarity index 100% rename from published/20150106 How to deduplicate files on Linux with dupeGuru.md rename to published/201502/20150106 How to deduplicate files on Linux with dupeGuru.md diff --git a/published/20150106 Managing Linux server configs with the SaltStack.md b/published/201502/20150106 Managing Linux server configs with the SaltStack.md similarity index 100% rename from published/20150106 Managing Linux server configs with the SaltStack.md rename to published/201502/20150106 Managing Linux server configs with the SaltStack.md diff --git a/published/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md b/published/201502/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md similarity index 100% rename from published/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md rename to published/201502/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md diff --git a/published/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md b/published/201502/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md similarity index 100% rename from published/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md rename to published/201502/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md diff --git a/published/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md b/published/201502/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md similarity index 100% rename from published/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md rename to published/201502/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md diff --git a/published/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md b/published/201502/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md similarity index 100% rename from published/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md rename to published/201502/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md diff --git a/published/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md b/published/201502/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md similarity index 100% rename from published/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md rename to published/201502/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md diff --git a/published/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md b/published/201502/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md similarity index 100% rename from published/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md rename to published/201502/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md diff --git a/published/20150114 Why Mac users don't switch to Linux.md b/published/201502/20150114 Why Mac users don't switch to Linux.md similarity index 100% rename from published/20150114 Why Mac users don't switch to Linux.md rename to published/201502/20150114 Why Mac users don't switch to Linux.md diff --git a/published/20150115 Configure Mate Desktop With Mate Tweak.md b/published/201502/20150115 Configure Mate Desktop With Mate Tweak.md similarity index 100% rename from published/20150115 Configure Mate Desktop With Mate Tweak.md rename to published/201502/20150115 Configure Mate Desktop With Mate Tweak.md diff --git a/published/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md b/published/201502/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md similarity index 100% rename from published/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md rename to published/201502/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md diff --git a/published/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md b/published/201502/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md similarity index 100% rename from published/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md rename to published/201502/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md diff --git a/published/20150116 A Step By Step Guide To Installing Xubuntu Linux.md b/published/201502/20150116 A Step By Step Guide To Installing Xubuntu Linux.md similarity index 100% rename from published/20150116 A Step By Step Guide To Installing Xubuntu Linux.md rename to published/201502/20150116 A Step By Step Guide To Installing Xubuntu Linux.md diff --git a/published/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md b/published/201502/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md similarity index 100% rename from published/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md rename to published/201502/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md diff --git a/published/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md b/published/201502/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md similarity index 100% rename from published/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md rename to published/201502/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md diff --git a/published/20150119 How To Disable IPv6 In CentOS 7.md b/published/201502/20150119 How To Disable IPv6 In CentOS 7.md similarity index 100% rename from published/20150119 How To Disable IPv6 In CentOS 7.md rename to published/201502/20150119 How To Disable IPv6 In CentOS 7.md diff --git a/published/20150119 Quick Tip--How To Restart Cinnamon After Crash.md b/published/201502/20150119 Quick Tip--How To Restart Cinnamon After Crash.md similarity index 100% rename from published/20150119 Quick Tip--How To Restart Cinnamon After Crash.md rename to published/201502/20150119 Quick Tip--How To Restart Cinnamon After Crash.md diff --git a/published/20150121 If a 32-bit integer overflows.md b/published/201502/20150121 If a 32-bit integer overflows.md similarity index 100% rename from published/20150121 If a 32-bit integer overflows.md rename to published/201502/20150121 If a 32-bit integer overflows.md diff --git a/published/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md b/published/201502/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md similarity index 100% rename from published/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md rename to published/201502/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md diff --git a/published/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md b/published/201502/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md similarity index 100% rename from published/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md rename to published/201502/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md diff --git a/published/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md b/published/201502/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md similarity index 100% rename from published/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md rename to published/201502/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md diff --git a/published/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md b/published/201502/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md similarity index 100% rename from published/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md rename to published/201502/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md diff --git a/published/20150125 4 Best Modern Open Source Code Editors For Linux.md b/published/201502/20150125 4 Best Modern Open Source Code Editors For Linux.md similarity index 100% rename from published/20150125 4 Best Modern Open Source Code Editors For Linux.md rename to published/201502/20150125 4 Best Modern Open Source Code Editors For Linux.md diff --git a/published/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md b/published/201502/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md similarity index 100% rename from published/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md rename to published/201502/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md diff --git a/published/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md b/published/201502/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md similarity index 100% rename from published/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md rename to published/201502/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md diff --git a/published/20150127 Install Jetty Web Server On CentOS 7.md b/published/201502/20150127 Install Jetty Web Server On CentOS 7.md similarity index 100% rename from published/20150127 Install Jetty Web Server On CentOS 7.md rename to published/201502/20150127 Install Jetty Web Server On CentOS 7.md diff --git a/published/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md b/published/201502/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md similarity index 100% rename from published/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md rename to published/201502/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md diff --git a/published/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md b/published/201502/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md similarity index 100% rename from published/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md rename to published/201502/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md diff --git a/published/20150202 How to create and show a presentation from the command line on Linux.md b/published/201502/20150202 How to create and show a presentation from the command line on Linux.md similarity index 100% rename from published/20150202 How to create and show a presentation from the command line on Linux.md rename to published/201502/20150202 How to create and show a presentation from the command line on Linux.md diff --git a/published/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md b/published/201502/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md similarity index 100% rename from published/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md rename to published/201502/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md diff --git a/published/20150205 Linux FAQs with Answers--How to install Go language on Linux.md b/published/201502/20150205 Linux FAQs with Answers--How to install Go language on Linux.md similarity index 100% rename from published/20150205 Linux FAQs with Answers--How to install Go language on Linux.md rename to published/201502/20150205 Linux FAQs with Answers--How to install Go language on Linux.md diff --git a/published/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md b/published/201502/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md similarity index 100% rename from published/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md rename to published/201502/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md diff --git a/published/20150209 CrunchBang Linux Is Dead.md b/published/201502/20150209 CrunchBang Linux Is Dead.md similarity index 100% rename from published/20150209 CrunchBang Linux Is Dead.md rename to published/201502/20150209 CrunchBang Linux Is Dead.md diff --git a/published/20150209 Non-Linux FOSS--Homebrew.md b/published/201502/20150209 Non-Linux FOSS--Homebrew.md similarity index 100% rename from published/20150209 Non-Linux FOSS--Homebrew.md rename to published/201502/20150209 Non-Linux FOSS--Homebrew.md diff --git a/published/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/published/201502/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md similarity index 100% rename from published/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md rename to published/201502/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md From ba7260c9d7143f44f5d5f9f297358a73af6623ec Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 2 Mar 2015 14:28:18 +0800 Subject: [PATCH 148/163] PUB:20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I @geekpi --- ...get on RHEL or CentOS or Fedora Part -I.md | 69 ++++++++++--------- 1 file changed, 35 insertions(+), 34 deletions(-) rename {translated/tech => published}/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md (67%) diff --git a/translated/tech/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md b/published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md similarity index 67% rename from translated/tech/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md rename to published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md index 8455aeb5cb..c425f2fe43 100644 --- a/translated/tech/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md +++ b/published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md @@ -1,46 +1,47 @@ -在RHEL/CentOS/Fedora上使用iSCSI Target创建集中式安全存储 - 第一部分 +使用iSCSI Target创建集中式安全存储(一) ================================================================================ -**iSCSI** 是一种就块级别协议,用于通过TCP/IP网络共享**原始存储设备**,可以用已经存在的IP和以太网如网卡、交换机、路由器等通过iSCSI协议共享和访问存储。iSCSI target是一种远程iSCSI服务器或者taget上的远程硬盘。 +**iSCSI** 是一种块级别的协议,用于通过TCP/IP网络共享**原始存储设备**,可以用已经存在的IP和以太网如网卡、交换机、路由器等通过iSCSI协议共享和访问存储。iSCSI target是一种由远程iSCSI服务器(target)提供的远程硬盘。 ![Install iSCSI Target in Linux](http://www.tecmint.com/wp-content/uploads/2014/07/Install-iSCSI-Target-in-Linux.jpg) -在Linux中安装iSCSI Target -我们不需要在客户端为了稳定的连接和性能而占用很大的资源。iSCSI服务器称为Target,它共享存储。iSCSI客户端称为Initiator,它访问Target服务器行的存储。市场中有用于大型存储服务如SAN的iSCSI适配器。 +*在Linux中安装iSCSI Target* + +我们不需要占用很大的资源就可以为客户端提供稳定的连接和性能。iSCSI服务器称为“Target(目标器)”,它提供服务器上的存储共享。iSCSI客户端称为“Initiator(发起程序)”,它访问Target服务器共享的存储。市场中有卖的用于大型存储服务如SAN的iSCSI适配器。 **我们为什么要在大型存储领域中使用iSCSI适配器** -以太网适配器(NIC)被设计用于在系统、服务器和存储设备如NAS间传输分组数据,它不适合在Internet中传输块级别数据。 +以太网适配器(NIC)被设计用于在系统、服务器和存储设备如NAS间传输分组数据,它不适合在Internet中传输块级数据。 ### iSCSI Target的功能 ### - 可以在一台机器上运行几个iSCSI target -- 一台机器的多个iSCSI target可以在iSCSI中访问 -- 一个target就是一块存储,并且可以通过网络被初始化器(客户端)访问 +- 一台机器可以提供多个iSCSI target用于iSCSI SAN访问 +- 一个target就是一块存储,并且可以通过网络被发起程序(客户端)访问 - 把这些存储汇聚在一起让它们在网络中可以访问的是iSCSI LUN(逻辑单元号) -- iSCSI支持在同一个会话中含有多个连接 -- iSCSI初始化器在网络中发现目标接着用LUN验证并登录,这样就可以本地访问远程存储。 -- 我们了一在本地挂载的LUN上安装任何操作系统,就像我们安装我们本地的操作系统一样。 +- iSCSI支持在同一个会话中使用多个连接 +- iSCSI发起程序在网络中发现目标接着用LUN验证并登录,这样就可以本地访问远程存储。 +- 我们可以在本地挂载的LUN上安装任何操作系统,就像我们安装我们本地的操作系统一样。 ### 为什么需要iSCSI? ### 在虚拟化中,我们需要存储拥有高度的冗余性、稳定性,iSCSI以低成本的方式提供了这些特性。与使用光纤通道的SAN比起来,我们可以使用已经存在的设备比如NIC、以太网交换机等建造一个低成本的SAN。 -现在我开始使用iSCSI Target安装并配置安全存储。本篇中,我们遵循下面的步骤 +现在我开始使用iSCSI Target安装并配置安全存储。本篇中,我们遵循下面的步骤: -- 我们需要隔离一个系统来设置iSCSI Target服务器和初始化器(客户端)。 -- 可以在大型存储环境中添加多个硬盘,但是我们除了基本的安装盘之外只使用一个额外的驱动器。 -- 现在我们只使用2块硬盘,一个用于基本的服务器安装,另外一个用于存储(LUN),这个我们会在这个系列的第二篇描述。 +- 我们需要隔离一个系统来设置iSCSI Target服务器和发起程序(客户端)。 +- 在大型存储环境中可以添加多个硬盘,但是这里我们除了基本的安装盘之外只使用了一个额外的驱动器。 +- 这里我们只使用了2块硬盘,一个用于基本的服务器安装,另外一个用于存储(LUN),这个我们会在这个系列的第二篇描述。 #### 主服务器设置 #### -- 操作系统 – CentOS release 6.5 (最终版) +- 操作系统 – CentOS 6.5 (Final) - iSCSI Target IP – 192.168.0.200 - 使用的端口 : TCP 860, 3260 - 配置文件 : /etc/tgt/targets.conf ## 安装 iSCSI Target ## -打开终端并使用yum命令来搜索我们需要在iscsi target上安装的包名。 +打开终端并使用yum命令来搜索需要在iscsi target上安装的包名。 # yum search iscsi @@ -52,21 +53,21 @@ lsscsi.x86_64 : List SCSI devices (or hosts) and associated information scsi-target-utils.x86_64 : The SCSI target daemon and utility programs -We got the search result as above, choose the **Target** package and install to play around. -你会的到上面的那些结果,选择**Target**包来安装 +你会的到上面的那些结果,选择**Target**包来安装。 # yum install scsi-target-utils -y ![Install iSCSI Utils](http://www.tecmint.com/wp-content/uploads/2014/07/Install-iSCSI-in-Linux.jpg) -安装iSCSI工具 -列出安装的包来了解默认的配置、服务和man页面的位置 +*安装iSCSI工具* + +列出安装的包里面的内容来了解默认的配置、服务和man页面的位置。 # rpm -ql scsi-target-utils.x86_64 ![List All iSCSI Files](http://www.tecmint.com/wp-content/uploads/2014/07/List-All-ISCSI-Files.jpg) -列出所有的iSCSI文件 +*列出所有的iSCSI包里面的文件* 让我们启动iSCSI服务,并检查服务运行的状态,iSCSI的服务名是**tgtd**。 @@ -75,7 +76,7 @@ We got the search result as above, choose the **Target** package and install to ![Start iSCSI Service](http://www.tecmint.com/wp-content/uploads/2014/07/Start-iSCSI-Service.jpg) -启动iSCSI服务 +*启动iSCSI服务* 现在我们需要配置开机自动启动。 @@ -87,27 +88,27 @@ We got the search result as above, choose the **Target** package and install to ![Enable iSCSI on Startup](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-iSCSI-on-Startup.jpg) -开机启动iSCSI +*开机启动iSCSI* 现在使用**tgtadm**来列出在我们的服务器上已经配置了哪些target和LUN。 # tgtadm --mode target --op show -**tgtd**已经安装并在运行了,但是上面的命令没有**输出**因为我们还没有在Target服务器上定义LUN。要查看手册,运行‘**man**‘命令。 +**tgtd**已经安装并在运行了,但是上面的命令没有**输出**因为我们还没有在Target服务器上定义LUN。要查看手册,可以运行‘**man**‘命令。 # man tgtadm ![iSCSI Man Pages](http://www.tecmint.com/wp-content/uploads/2014/07/iSCSI-Man-Pages.jpg) -iSCSI Man 页面 +*iSCSI Man 页面* -最终我们需要为iSCSI添加iptable规则,如果你的target服务器上存在iptable的话。首先使用netstat命令找出iscsi target的端口号,target总是监听TCP端口3260。 +如果你的target服务器上有iptable的话,那么我们需要为iSCSI添加iptable规则。首先使用netstat命令找出iscsi target的端口号,target总是监听TCP端口3260。 # netstat -tulnp | grep tgtd ![Find iSCSI Port](http://www.tecmint.com/wp-content/uploads/2014/07/Find-iSCSI-Port.jpg) -找出iSCSI端口 +*找出iSCSI端口* 下面加入如下规则让iptable允许广播iSCSI target发现包。 @@ -116,24 +117,24 @@ iSCSI Man 页面 ![Open iSCSI Ports](http://www.tecmint.com/wp-content/uploads/2014/07/Open-iSCSI-Ports.jpg) -打开iSCSI端口 +*打开iSCSI端口* ![Add iSCSI Ports to Iptables](http://www.tecmint.com/wp-content/uploads/2014/07/Add-iSCSI-Ports-to-Iptables.jpg) -添加iSCSI端口到iptable中 +*添加iSCSI端口到iptable中* -**注意**: 规则可能根据你的 **默认链策略**而不同。接着保存iptable并重启。 +**注意**: 规则可能根据你的 **默认链策略**而不同。接着保存iptable并重启该服务。 # iptables-save # /etc/init.d/iptables restart ![Restart iptables](http://www.tecmint.com/wp-content/uploads/2014/07/Restart-iptables.jpg) -重启iptable +*重启iptable* -现在我们已经部署了一个target服务器来共享LUN给通过TCP/IP认证的初始化器。这也适用于从小到大规模的生产环境。 +现在我们已经部署了一个target服务器来共享LUN给通过TCP/IP认证的发起程序。这也适用于从小到大规模的生产环境。 -在我的下篇文章中,我会展示如何[在Target服务器中使用LVM创建LUN][1],并且如何在客户端中共享LUN,在此之前请继续关注TecMint获取更多的更新,并且不要忘记留下有价值的评论。 +在我的下篇文章中,我会展示如何[在Target服务器中使用LVM创建LUN][1],并且如何在客户端中共享LUN,不要忘记留下有价值的评论。 -------------------------------------------------------------------------------- @@ -141,7 +142,7 @@ via: http://www.tecmint.com/create-centralized-secure-storage-using-iscsi-target 作者:[Babin Lonston][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ff12d39dd38bff82021bb1e58b670078363e211b Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 2 Mar 2015 15:09:16 +0800 Subject: [PATCH 149/163] PUB:20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II @geekpi --- ...get on RHEL or CentOS or Fedora Part -I.md | 26 +++--- ...r' on RHEL or CentOS or Fedora -Part II.md | 93 ++++++++++--------- 2 files changed, 60 insertions(+), 59 deletions(-) rename {translated/tech => published}/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md (65%) diff --git a/published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md b/published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md index c425f2fe43..34352ed08c 100644 --- a/published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md +++ b/published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md @@ -6,7 +6,7 @@ *在Linux中安装iSCSI Target* -我们不需要占用很大的资源就可以为客户端提供稳定的连接和性能。iSCSI服务器称为“Target(目标器)”,它提供服务器上的存储共享。iSCSI客户端称为“Initiator(发起程序)”,它访问Target服务器共享的存储。市场中有卖的用于大型存储服务如SAN的iSCSI适配器。 +我们不需要占用很大的资源就可以为客户端提供稳定的连接和性能。iSCSI服务器称为“Target(目标器)”,它提供服务器上的存储共享。iSCSI客户端称为“Initiator(发起程序)”,它访问目标器共享的存储。市场中有卖的用于大型存储服务如SAN的iSCSI适配器。 **我们为什么要在大型存储领域中使用iSCSI适配器** @@ -14,9 +14,9 @@ ### iSCSI Target的功能 ### -- 可以在一台机器上运行几个iSCSI target -- 一台机器可以提供多个iSCSI target用于iSCSI SAN访问 -- 一个target就是一块存储,并且可以通过网络被发起程序(客户端)访问 +- 可以在一台机器上运行几个iSCSI 目标器 +- 一台机器可以提供多个iSCSI 目标器用于iSCSI SAN访问 +- 一个目标器就是一块存储,并且可以通过网络被发起程序(客户端)访问 - 把这些存储汇聚在一起让它们在网络中可以访问的是iSCSI LUN(逻辑单元号) - iSCSI支持在同一个会话中使用多个连接 - iSCSI发起程序在网络中发现目标接着用LUN验证并登录,这样就可以本地访问远程存储。 @@ -26,7 +26,7 @@ 在虚拟化中,我们需要存储拥有高度的冗余性、稳定性,iSCSI以低成本的方式提供了这些特性。与使用光纤通道的SAN比起来,我们可以使用已经存在的设备比如NIC、以太网交换机等建造一个低成本的SAN。 -现在我开始使用iSCSI Target安装并配置安全存储。本篇中,我们遵循下面的步骤: +现在我开始使用iSCSI 目标器安装并配置安全存储。本篇中,我们遵循下面的步骤: - 我们需要隔离一个系统来设置iSCSI Target服务器和发起程序(客户端)。 - 在大型存储环境中可以添加多个硬盘,但是这里我们除了基本的安装盘之外只使用了一个额外的驱动器。 @@ -35,13 +35,13 @@ #### 主服务器设置 #### - 操作系统 – CentOS 6.5 (Final) -- iSCSI Target IP – 192.168.0.200 +- iSCSI 目标器 IP – 192.168.0.200 - 使用的端口 : TCP 860, 3260 - 配置文件 : /etc/tgt/targets.conf -## 安装 iSCSI Target ## +### 安装 iSCSI Target ### -打开终端并使用yum命令来搜索需要在iscsi target上安装的包名。 +打开终端并使用yum命令来搜索需要在iscsi 目标器上安装的包名。 # yum search iscsi @@ -90,11 +90,11 @@ *开机启动iSCSI* -现在使用**tgtadm**来列出在我们的服务器上已经配置了哪些target和LUN。 +现在使用**tgtadm**来列出在我们的服务器上已经配置了哪些目标器和LUN。 # tgtadm --mode target --op show -**tgtd**已经安装并在运行了,但是上面的命令没有**输出**因为我们还没有在Target服务器上定义LUN。要查看手册,可以运行‘**man**‘命令。 +**tgtd**已经安装并在运行了,但是上面的命令没有**输出**因为我们还没有在目标器上定义LUN。要查看手册,可以运行‘**man**‘命令。 # man tgtadm @@ -110,7 +110,7 @@ *找出iSCSI端口* -下面加入如下规则让iptable允许广播iSCSI target发现包。 +下面加入如下规则让iptable允许广播iSCSI 目标器发现包。 # iptables -A INPUT -i eth0 -p tcp --dport 860 -m state --state NEW,ESTABLISHED -j ACCEPT # iptables -A INPUT -i eth0 -p tcp --dport 3260 -m state --state NEW,ESTABLISHED -j ACCEPT @@ -132,9 +132,9 @@ *重启iptable* -现在我们已经部署了一个target服务器来共享LUN给通过TCP/IP认证的发起程序。这也适用于从小到大规模的生产环境。 +现在我们已经部署了一个目标器来共享LUN给通过TCP/IP认证的发起程序。这也适用于从小到大规模的生产环境。 -在我的下篇文章中,我会展示如何[在Target服务器中使用LVM创建LUN][1],并且如何在客户端中共享LUN,不要忘记留下有价值的评论。 +在我的下篇文章中,我会展示如何[在目标器中使用LVM创建LUN][1],并且如何在客户端中共享LUN,不要忘记留下有价值的评论。 -------------------------------------------------------------------------------- diff --git a/translated/tech/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md b/published/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md similarity index 65% rename from translated/tech/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md rename to published/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md index bac7aba27f..3c8f09a168 100644 --- a/translated/tech/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md +++ b/published/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md @@ -1,47 +1,47 @@ -如何在RHEL/CentOS/Fedora中使用LVM创建和设置LUN- 第二部分 +在 iSCSI Target 服务器中使用LVM创建和设置LUN(二) ================================================================================ -LUN是逻辑单元号,它与iSCSI存储服务器共享。物理iSCSI target服务器共享它的驱动器来初始化TCP/IP网络。驱动器的集合称作LUN来幸存一个大型存储也就是SAN(Storage Area Network)。在真实环境中LUN在LVM中定义,因此它可以按需扩展。 +LUN是逻辑单元号,它与iSCSI存储服务器共享。iSCSI 目标器通过TCP/IP网络共享它的物理驱动器给发起程序(initiator)。这些来自一个大型存储(SAN:Storage Area Network)的驱动器集合称作LUN。在真实环境中LUN是在LVM中定义的,因为它可以按需扩展。 ![Create LUNS using LVM in Target Server](http://www.tecmint.com/wp-content/uploads/2014/07/Create-LUNS-inLVM.png) -Create LUNS using LVM in Target Server + +*在目标器中使用 LVM 创建 LUN* ### 为什么使用LUN? ### -LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块物理驱动器组成。我们可以使用LUN作为系统物理驱动器来安装操作系统,LUN在集群、虚拟服务器、SAN中使用。在虚拟服务器中使用LUN的目的是作为系统存储。LUN的性能和可靠性根据在创建目标存储服务器时所使用的驱动器决定。 +LUN用于存储,SAN存储大多数由LUN的集群来组成存储池,LUN由目标器的几块物理驱动器组成。我们可以使用LUN作为系统物理驱动器来安装操作系统,LUN可以用在集群、虚拟服务器、SAN中。在虚拟服务器中使用LUN的主要用途是作为操作系统的存储。LUN的性能和可靠性根据在创建目标存储服务器时所使用的驱动器决定。 -### 需求 ### +### 前置阅读 ### -要了解创建iSCSI target服务器点击下面的链接。 +要了解创建iSCSI 目标器,点击下面的链接。 -- [使用iSCSI target创建爱你集中话安全存储][1] +- [使用iSCSI Target创建集中式安全存储(一)][1] #### 主服务器设置 #### -系统信息和网络设置部分与已经写的iSCSI Target服务相同 - 我们在相同的服务器上定义LUN。 +系统信息和网络设置部分与前文的iSCSI 目标器相同 - 我们在相同的服务器上定义LUN。 - -- 操作系统 – CentOS release 6.5 (最终版) -- iSCSI Target IP – 192.168.0.200 +- 操作系统 – CentOS 6.5 (Final) +- iSCSI 目标器 IP – 192.168.0.200 - 使用的端口 : TCP 860, 3260 - 配置文件 : /etc/tgt/targets.conf -## 在iSCSI Target Server使用LVM创建LUN ## +### 在iSCSI 目标器使用LVM创建LUN ### 首先,用**fdisk -l**命令找出驱动器的列表,这会列出系统中所有分区的列表。 # fdisk -l -上面的命令只会给出基本系统的驱动器信息。为了个到存储设备的信息,使用下面的命令来的到存储设备的列表。 +上面的命令只会给出基本系统的驱动器信息。为了得到存储设备的信息,使用下面的命令来得到存储设备的列表。 # fdisk -l /dev/vda && fdisk -l /dev/sda ![List Storage Drives](http://www.tecmint.com/wp-content/uploads/2014/07/1.jpg) -列出存储设备 +*列出存储设备* **注意**:这里**vda**是虚拟机硬盘,因为我使用的是虚拟机来用于演示,**/dev/sda** 是额外加入的存储。 -### 第一步: 创建用于LUN的LVM ### +### 第一步: 创建用于LUN的LVM驱动器 ### 我们使用**/dev/sda**驱动器来创建LVM。 @@ -49,14 +49,14 @@ LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块 ![List LVM Drive](http://www.tecmint.com/wp-content/uploads/2014/07/2.jpg) -列出LVM驱动器 +*列出LVM驱动器* -现在让我们如下使用fdisk命令列出驱动器分区。 +现在让我们使用如下fdisk命令列出驱动器分区。 # fdisk -cu /dev/sda -- The option ‘**-c**‘ 关闭DOS兼容模式。 -- The option ‘**-u**‘ 用于列出分区表,给出扇区而不是柱面的大小。 +- 选项 ‘**-c**’ 关闭DOS兼容模式。 +- 选项 ‘**-u**’ 用于列出分区表时给出扇区而不是柱面的大小。 使用**n**创建新的分区。 @@ -109,7 +109,7 @@ LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块 ![Create LVM Partition](http://www.tecmint.com/wp-content/uploads/2014/07/3.jpg) -创建LVM分区 +*创建LVM分区* 系统重启后,使用fdisk命令列出分区表。 @@ -117,7 +117,7 @@ LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块 ![Verify LVM Partition](http://www.tecmint.com/wp-content/uploads/2014/07/4.jpg) -验证LVM分区 +*验证LVM分区* ### 第二步: 为LUN创建逻辑卷 ### @@ -125,7 +125,7 @@ LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块 # pvcreate /dev/sda1 -用iSCSI的名字创建卷组来区分组。 +用iSCSI的名字创建卷组来区分这个卷组。 # vgcreate vg_iscsi /dev/sda1 @@ -148,17 +148,17 @@ LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块 ![Creating LVM Logical Volumes](http://www.tecmint.com/wp-content/uploads/2014/07/5.jpg) -创建LVM逻辑卷 +*创建LVM逻辑卷* ![Verify LVM Logical Volumes](http://www.tecmint.com/wp-content/uploads/2014/07/6.jpg) -验证LVM逻辑卷 +*验证LVM逻辑卷* -### 第三步: 在Target Server中定义LUN ### +### 第三步: 在目标器中定义LUN ### -我们已经创建了逻辑卷并准备使用LUN,现在我们在target配置中定义LUN,如果这样那么它只能用在客户机中(启动器)。 +我们已经创建了逻辑卷并准备使用LUN,现在我们在目标器配置中定义LUN,只有这样做它才能用在客户机中(发起程序)。 -用你选择的编辑器打开位于‘/etc/tgt/targets.conf’的target配置文件。 +用你选择的编辑器打开位于‘/etc/tgt/targets.conf’的目标器配置文件。 # vim /etc/tgt/targets.conf @@ -179,20 +179,22 @@ LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块 ![Configure LUNs in Target Server](http://www.tecmint.com/wp-content/uploads/2014/07/7.jpg) -在target中配置LUN +*在target中配置LUN* -- iSCSI 限定名 (iqn.2014-07.com.tecmint:tgt1). -- 随你怎么使用 -- 确定使用目标, 这台服务器中的第一个目标 -- 4. LVM共享特定的LUN。 +上图的解释: -接下来使用下面命令重载**tgd**服务配置。 +1. iSCSI 采取限定名 (iqn.2014-07.com.tecmint:tgt1). +2. 名称随便你 +3. 用于确定目标名, 这是这台服务器中的第一个目标 +4. LVM共享特定的LUN。 + +接下来使用下面的命令重载**tgd**服务配置。 # /etc/init.d/tgtd reload ![Reload Configuration](http://www.tecmint.com/wp-content/uploads/2014/07/8.jpg) -重载配置 +*重载配置* 接下来使用下面的命令验证可用的LUN。 @@ -200,23 +202,22 @@ LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块 ![List Available LUNs](http://www.tecmint.com/wp-content/uploads/2014/07/9.jpg) -列出可用LUN +*列出可用LUN* ![LUNs Information](http://www.tecmint.com/wp-content/uploads/2014/07/10.jpg) -LUN信息 +*LUN信息* -The above command will give long list of available LUNs with following information. 上面的命令会列出可用LUN的下面这些信息 -- iSCSI 限定名 -- iSCSI 准备使用 -- 默认LUN 0被控制器保留 -- LUN 1是我们定义的target服务器 -- 这里我为每个LUN都定义了4GB -- 在线: 是的,这就是可以使用的LUN +1. iSCSI 限定名 +2. iSCSI 已经准备好 +3. 默认LUN 0被控制器所保留 +4. LUN 1是我们定义的目标器 +5. 这里我为每个LUN都定义了4GB +6. 在线: 是的,这就是可以使用的LUN -现在我们已经使用LVM为target服务器定义了LUN,这可扩展并且支持很多特性,如快照。我们将会在第三部分了解如何用target服务器授权,并且本地挂载远程存储。 +现在我们已经使用LVM为目标器定义了LUN,这可扩展并且支持很多特性,如快照。我们将会在第三部分了解如何用目标器授权,并且本地挂载远程存储。 -------------------------------------------------------------------------------- @@ -224,9 +225,9 @@ via: http://www.tecmint.com/create-luns-using-lvm-in-iscsi-target/ 作者:[Babin Lonston][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/babinlonston/ -[1]:http://www.tecmint.com/create-centralized-secure-storage-using-iscsi-targetin-linux/ \ No newline at end of file +[1]:http://linux.cn/article-4971-1.html \ No newline at end of file From 15d74bcf653856a432cf0a9aa83d0bfbdf1cfa94 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 2 Mar 2015 15:46:48 +0800 Subject: [PATCH 150/163] PUB:20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III @geekpi --- ...p on RHEL or CentOS or Fedora -Part III.md | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) rename {translated/tech => published}/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md (68%) diff --git a/translated/tech/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md b/published/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md similarity index 68% rename from translated/tech/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md rename to published/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md index f4754a6bb8..482733a3a2 100644 --- a/translated/tech/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md +++ b/published/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md @@ -1,33 +1,33 @@ -中心化存储(iSCSI)- “初始器客户端” 在RHEL/CentOS/Fedora上的设置 - 第三部分 -================================================================================ -**iSCSI** 初始化器是一种用于与iSCSI target服务器认证并访问服务器上共享的的LUN的客户端。我们可以在本地挂载的硬盘上部署任何操作系统,只需要安装一个包来与target服务器验证。 +设置iSCSI的发起程序(客户端)(三) +============================ + +**iSCSI** 发起程序是一种用于同 iSCSI 目标器认证并访问服务器上共享的LUN的客户端。我们可以在本地挂载的硬盘上部署任何操作系统,只需要安装一个包来与目标器验证。 ![Client Initiator Setup](http://www.tecmint.com/wp-content/uploads/2014/07/Client-Initiator-Setup.jpg) -初始器客户端设置 +*初始器客户端设置* -#### 功能 #### +### 功能 ### - 可以处理本地挂载磁盘上的任意文件系统 -- 在使用fdisk命令后不需要重启系统 +- 在使用fdisk命令分区后不需要重启系统 -#### 要求 #### +### 前置阅读 ### -- [使用iSCSI Target创建集中化安全存储- 第一部分][1] -- [在Target服务器中使用LVM创建LUN - 第二部分][2] +- [使用iSCSI Target创建集中式安全存储(一)][1] +- [在 iSCSI Target 服务器中使用LVM创建和设置LUN(二)][2] #### 我的客户端设置 #### -- 操作系统 – CentOS release 6.5 (最终版) -- iSCSI Target IP – 192.168.0.50 +- 操作系统 – CentOS 6.5 (Final) +- iSCSI 目标器 IP – 192.168.0.50 - 使用的端口 : TCP 3260 -**Warning**: Never stop the service while LUNs Mounted in Client machines (Initiator). -**Warning**:永远不要在使用LUN的时候在客户端中(初始化器)停止服务。 +**警告**:永远不要在LUN还挂载在客户端(发起程序)时停止服务。 ### 客户端设置 ### -**1.** 在客户端,我们需要安装包‘**iSCSI-initiator-utils**‘,用下面的命令搜索包。 +**1.** 在客户端,我们需要安装包‘**iSCSI-initiator-utils**’,用下面的命令搜索包。 # yum search iscsi @@ -37,29 +37,29 @@ iscsi-initiator-utils.x86_64 : iSCSI daemon and utility programs iscsi-initiator-utils-devel.x86_64 : Development files for iscsi-initiator-utils -**2.** 一旦定位了包,就用下面的yum命令安装初始化包。 +**2.** 找到了包,就用下面的yum命令安装初始化包。 # yum install iscsi-initiator-utils.x86_64 -**3.** 安装完毕后,我们需要发现**Target 服务器**上的共享。客户端的命令有点难记,因此我们使用man来的到需要运行的命令列表 +**3.** 安装完毕后,我们需要发现**目标器**上的共享。客户端的命令有点难记,因此我们使用man找到需要运行的命令列表。 # man iscsiadm ![man iscsiadm](http://www.tecmint.com/wp-content/uploads/2014/07/man-iscsiadm.jpg) -man iscsiadm +*man iscsiadm* -**4.** 按下**SHIFT+G** 进入man页的底部并且稍微向上滚动来的到登录的示例命令。下面的发现命令中,需要用我们的**服务器IP地址**来替换。 +**4.** 按下**SHIFT+G** 进入man页的底部并且稍微向上滚动找到示例的登录命令。下面的发现命令中,需要用我们的**服务器IP地址**来替换。 # iscsiadm --mode discoverydb --type sendtargets --portal 192.168.0.200 --discover -**5.** 这里我们从下面的命令中得到了iSCSIi限定名(iqn)。 +**5.** 这里我们从下面的命令输出中找到了iSCSI的限定名(iqn)。 192.168.0.200:3260,1 iqn.2014-07.com.tecmint:tgt1 ![Discover Target](http://www.tecmint.com/wp-content/uploads/2014/07/Discover-Target.jpg) -发现服务器 +*发现服务器* **6.** 要登录就用下面的命令来连接一台LUN到我们本地系统中,这会与服务器验证并允许我们登录LUN。 @@ -67,7 +67,7 @@ man iscsiadm ![Login To Target Server](http://www.tecmint.com/wp-content/uploads/2014/07/Login-To-Target-Server.jpg) -登录到服务器 +*登录到服务器* **注意**:登出使用登录命令并在命令的最后使用logout来替换。 @@ -75,15 +75,15 @@ man iscsiadm ![Logout from Target Server](http://www.tecmint.com/wp-content/uploads/2014/07/Logout-from-Target-Server.jpg) -等出服务器 +*登出服务器* -**7.** 登录服务器后,使用下面的命令列出节点的记录。 +**7.** 登录服务器后,使用下面的命令列出节点的记录行。 # iscsiadm --mode node ![List Node](http://www.tecmint.com/wp-content/uploads/2014/07/List-Node.jpg) -列出节点 +*列出节点* **8.** 显示特定节点的所有数据 @@ -109,7 +109,7 @@ man iscsiadm iface.linklocal_autocfg = .... -**9.** 接着列出使用的磁盘,fdisk会列出所有的认证过的磁盘。 +**9.** 接着列出使用的磁盘,fdisk会列出所有的登录认证过的磁盘。 # fdisk -l /dev/sda @@ -123,7 +123,7 @@ man iscsiadm ![Create New Partition](http://www.tecmint.com/wp-content/uploads/2014/07/Create-New-Partition.jpg) -创建新分区 +*创建新分区* **注意**:在使用fdisk创建新分区之后,我们无需重启,就像使用我们本地的文件系统一样就行。因为这个将远程共享存储挂载到本地了。 @@ -133,7 +133,7 @@ man iscsiadm ![Format New Partition](http://www.tecmint.com/wp-content/uploads/2014/07/Format-New-Partition.jpg) -格式化新分区 +*格式化新分区* **12.** 创建一个目录来挂载新创建的分区 @@ -143,20 +143,20 @@ man iscsiadm ![Mount New Partition](http://www.tecmint.com/wp-content/uploads/2014/07/Mount-New-Partition.jpg) -挂载新分区 +*挂载新分区* **13.** 列出挂载点 # df -Th -- **-T** – Prints files system types. -- **-h** – Prints in human readable format eg : Megabyte or Gigabyte. +- **-T** – 输出文件系统类型 +- **-h** – 以易读的方式显示大小 ![List New Partition](http://www.tecmint.com/wp-content/uploads/2014/07/List-New-Partition.jpg) -列出新分区 +*列出新分区* -**14.** 如果需要永久挂在使用fdtab文件 +**14.** 如果需要永久挂载,使用fdtab文件 # vim /etc/fstab @@ -168,18 +168,18 @@ man iscsiadm ![Auto Mount Partition](http://www.tecmint.com/wp-content/uploads/2014/07/Auto-Mount-Partition.jpg) -自动挂载分区 +*自动挂载分区* **16.** 最后检查我们fstab文件是否有错误。 # mount -av - **-a** – 所有挂载点 -- **-v** – 繁琐模式 +- **-v** – 冗余模式 ![Verify fstab Entries](http://www.tecmint.com/wp-content/uploads/2014/07/Verify-fstab-Entries.jpg) -验证fstab文件 +*验证fstab文件* 我们已经成功完成了我们的客户端配置。现在让我们像本地磁盘一样使用它吧。 @@ -189,10 +189,10 @@ via: http://www.tecmint.com/iscsi-initiator-client-setup/ 作者:[Babin Lonston][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/babinlonston/ -[1]:http://www.tecmint.com/create-centralized-secure-storage-using-iscsi-targetin-linux/ -[2]:http://www.tecmint.com/create-luns-using-lvm-in-iscsi-target/ +[1]:http://linux.cn/article-4971-1.html +[2]:http://linux.cn/article-4972-1.html From 4ed37060b0afcd9f4af251e661da0f303d543124 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 2 Mar 2015 16:18:56 +0800 Subject: [PATCH 151/163] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Run Linux Applications From The Terminal In Background Mode.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/share => published}/20150115 How To Run Linux Applications From The Terminal In Background Mode.md (100%) diff --git a/translated/share/20150115 How To Run Linux Applications From The Terminal In Background Mode.md b/published/20150115 How To Run Linux Applications From The Terminal In Background Mode.md similarity index 100% rename from translated/share/20150115 How To Run Linux Applications From The Terminal In Background Mode.md rename to published/20150115 How To Run Linux Applications From The Terminal In Background Mode.md From 71ccaba7157eeb522de5319d254f777ef46c7952 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 2 Mar 2015 16:47:26 +0800 Subject: [PATCH 152/163] =?UTF-8?q?20150302-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ications in a Linux System with Trickle.md | 296 ++++++++++++++++++ ...onment using Commandline Tools in Linux.md | 152 +++++++++ ... Passwordless SSH Logon to Ubuntu 14.04.md | 85 +++++ 3 files changed, 533 insertions(+) create mode 100644 sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md create mode 100644 sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md create mode 100644 sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md diff --git a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md new file mode 100644 index 0000000000..18607f7f96 --- /dev/null +++ b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md @@ -0,0 +1,296 @@ +How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle +================================================================================ +Have you ever encountered situations where one application dominated you all network bandwidth? If you have ever been in a situation where one application ate all your traffic, then you will value the role of the trickle bandwidth shaper application. Either you are a system admin or just a Linux user, you need to learn how to control the upload and download speeds for applications to make sure that your network bandwidth is not burned by a single application. + +![Install Trickle Bandwidth Limit in Linux](http://www.tecmint.com/wp-content/uploads/2013/11/Bandwidth-limit-trickle.png) +Install Trickle Bandwidth Limit in Linux + +### What is Trickle? ### + +Trickle is a network bandwidth shaper tool that allows us to manage the upload and download speeds of applications in order to prevent any single one of them to hog all (or most) of the available bandwidth. In few words, trickle lets you control the network traffic rate on a per-application basis, as opposed to per-user control, which is the classic example of bandwidth shaping in a client-server environment, and is probably the setup we are more familiar with. + +### How Trickle Works? ### + +In addition, trickle can help us to define priorities on a per-application basis, so that when overall limits have been set for the entire system, priority apps will still get more bandwidth automatically. To accomplish this task, trickle sets traffic limits to the way in which data is sent to, and received from, sockets using TCP connections. We must note that, other than the data transfer rates, trickle does not modify in any way the behavior of the process it is shaping at any given moment. + +### What Can’t Trickle do? ### + +The only limitation, so to speak, is that trickle will not work with statically linked applications or binaries with the SUID or SGID bits set since it uses dynamic linking and loading to place itself between the shaped process and its associated network socket. Trickle then acts as a proxy between these two software components. + +Since trickle does not require superuser privileges in order to run, users can set their own traffic limits. Since this may not be desirable, we will explore how to set overall limits that system users cannot exceed. In other words, users will still be able to manage their traffic rates, but always within the boundaries set by the system administrator. + +In this article we will explain how to limit the network bandwidth used by applications in a Linux server with trickle. To generate the necessary traffic, we will use ncftpput and ncftpget (both tools are available by installing ncftp) on the client (CentOS 7 server – dev1: 192.168.0.17), and vsftpd on the server (Debian Wheezy 7.5 – dev2: 192.168.0.15) for demonstration purposes. The same instructions also works on RedHat, Fedora and Ubuntu based systems. + +#### Prerequisites #### + +1. For RHEL/CentOS 7/6, [enable the EPEL repository][1]. Extra Packages for Enterprise Linux (EPEL) is a repository of high-quality free and open-source software maintained by the Fedora project and is 100% compatible with its spinoffs, such as Red Hat Enterprise Linux and CentOS. Both trickle and ncftp are made available from this repository. + +2. Install ncftp as follows: + + # yum update && sudo yum install ncftp [On RedHat based systems] + # aptitude update && aptitude install ncftp [On Debian based systems] + +3. Set up a FTP server in a separate server. Please note that although FTP is inherently insecure, it is still widely used in cases when security in uploading or downloading files is not needed. We are using it in this article to illustrate the bounties of trickle and because it shows the transfer rates in stdout on the client, and we will leave the discussion of whether it should or should not be used for another date and time :). + + # yum update && yum install vsftpd [On RedHat based systems] + # aptitude update && aptitude install vsftpd [On Debian based systems] + +Now, edit the /etc/vsftpd/vsftpd.conf file on the FTP server as follows: + + anonymous_enable=NO + local_enable=YES + chroot_local_user=YES + allow_writeable_chroot=YES + +After that, make sure to start vsftpd for your current session and to enable it for automatic start on future boots: + + # systemctl start vsftpd [For systemd-based systems] + # systemctl enable vsftpd + # service vsftpd start [For init-based systems] + # chkconfig vsftpd on + +4. If you chose to set up the FTP server in a CentOS/RHEL 7 droplet with SSH keys for remote access, you will need a password-protected user account with the appropriate directory and file permissions for uploading and downloading the desired content OUTSIDE root’s home directory. + +You can then browse to your home directory by entering the following URL in your browser. A login window will pop up prompting you for a valid user account and password on the FTP server. + + ftp://192.168.0.15 + +If the authentication succeeds, you will see the contents of your home directory. Later in this tutorial you will be able to refresh that page to display the files that have been uploaded during previous steps. + +![FTP Directory Tree](http://www.tecmint.com/wp-content/uploads/2013/11/FTP-Directory-Tree.png) +FTP Directory Tree + +### How to Install Trickle in Linux ### + +1. Install trickle via yum or aptitude. + +To ensure a successful installation, it is considered good practice to make sure the currently installed packages are up-to-date (using yum update) before installing the tool itself. + + # yum -y update && yum install trickle [On RedHat based systems] + # aptitude -y update && aptitude install trickle [On Debian based systems] + +2. Verify whether trickle will work with the desired binary. + +As we explained earlier, trickle will only work with binaries using dynamic, or shared, libraries. To verify whether we can use this tool with a certain application, we can use the well-known ldd utility, where ldd stands for list dynamic dependencies. Specifically, we will look for the presence of glibc (the GNU C library) in the list of dynamic dependencies of any given program because it is precisely that library which defines the system calls involved in communication through sockets. + +Run the following command against a given binary to see if trickle can be used to shape its bandwidth: + + # ldd $(which [binary]) | grep libc.so + +For example, + + # ldd $(which ncftp) | grep libc.so + +whose output is: + + # libc.so.6 => /lib64/libc.so.6 (0x00007efff2e6c000) + +The string between brackets in the output may change from system to system and even between subsequent runs of the same command, since it represents the load address of the library in physical memory. + +If the above command does not return any results, it means that the binary it was run against does not use libc and thus trickle cannot be used as bandwidth shaper in that case. + +### Learn How to Use Trickle ### + +The most basic usage of trickle is in standalone mode. Using this approach, trickle is used to explicitly define the download and upload speeds of a given application. As we explained earlier, for the sake of brevity, we will use the same application for download and upload tests. + +#### Running Trickle in Standalone Mode #### + +We will compare the download and upload speeds with and without using trickle. The -d option indicates the download speed in KB/s, while the -u flag tells trickle to limit the upload speed by the same unit. In addition, we will use the -s flag, which specifies that trickle should run in standalone mode. + +The basic syntax to run trickle in standalone mode is as follows: + + # trickle -s -d [download rate in KB/s] -u [upload rate in KB/s] + +In order to perform the following examples on your own, make sure to have trickle and ncftp installed on the client machine (192.168.0.17 in my case). + +**Example 1: Uploading a 2.8 MB PDF file with and without trickle.** + +We are using the freely-distributable Linux Fundamentals PDF file (available from [here][2]) for the following tests. + +You can initially download this file to your current working directory with the following command: + + # wget http://linux-training.be/files/books/LinuxFun.pdf + +The syntax to upload a file to our FTP server without trickle is as follows: + + # ncftpput -u username -p password 192.168.0.15 /remote_directory local-filename + +Where /remote_directory is the path of the upload directory relative to username’s home, and local-filename is a file in your current working directory. + +Specifically, without trickle we get a peak upload speed of 52.02 MB/s (please note that this is not the real average upload speed, but an instant starting peak), and the file gets uploaded almost instantly: + + # ncftpput -u username -p password 192.168.0.15 /testdir LinuxFun.pdf + +Output: + + LinuxFun.pdf: 2.79 MB 52.02 MB/s + +With trickle, we will limit the upload transfer rate at 5 KB/s. Before uploading the file for the second time, we need to delete it from the destination directory; otherwise, ncftp will inform us that the file at the destination directory is the same that we are trying to upload, and will not perform the transfer: + + # rm /absolute/path/to/destination/directory/LinuxFun.pdf + +Then: + + # trickle -s -u 5 ncftpput -u username -p password 111.111.111.111 /testdir LinuxFun.pdf + +Output: + + LinuxFun.pdf: 2.79 MB 4.94 kB/s + +In the example above, we can see that the average upload speed dropped to ~5 KB/s. + +**Example 2: Downloading the same 2.8 MB PDF file with and without trickle** + +First, remember to delete the PDF from the original source directory: + + # rm /absolute/path/to/source/directory/LinuxFun.pdf + +Please note that the following cases will download the remote file to the current directory in the client machine. This fact is indicated by the period (‘.‘) that appears after the IP address of the FTP server. + +Without trickle: + + # ncftpget -u username -p password 111.111.111.111 . /testdir/LinuxFun.pdf + +Output: + + LinuxFun.pdf: 2.79 MB 260.53 MB/s + +With trickle, limiting the download speed at 20 KB/s: + + # trickle -s -d 30 ncftpget -u username -p password 111.111.111.111 . /testdir/LinuxFun.pdf + +Output: + + LinuxFun.pdf: 2.79 MB 17.76 kB/s + +### Running Trickle in Supervised [unmanaged] Mode ### + +Trickle can also run in unmanaged mode, following a series of parameters defined in /etc/trickled.conf. This file defines how trickled (the daemon) behaves and manages trickle. + +In addition, if we want to set global settings to be used, overall, by all applications, we will need to use the trickled command. This command runs the daemon and allows us to define download and upload limits that will be shared by all the applications run through trickle without us needing to specify limits each time. + +For example, running: + + # trickled -d 50 -u 10 + +Will cause that the download and upload speeds of any application run through trickle be limited to 30 KB/s and 10 KB/s, respectively. + +Please note that you can check at any time whether trickled is running and with what arguments: + + # ps -ef | grep trickled | grep -v grep + +Output: + + root 16475 1 0 Dec24 ? 00:00:04 trickled -d 50 -u 10 + +**Example 3: Uploading a 19 MB mp4 file to our FTP server using with and without trickle.** + +In this example we will use the freely-distributable “He is the gift” video, available for download from [this link][3]. + +We will initially download this file to your current working directory with the following command: + + # wget http://media2.ldscdn.org/assets/missionary/our-people-2014/2014-00-1460-he-is-the-gift-360p-eng.mp4 + +First off, we will start the trickled daemon with the command listed above: + + # trickled -d 30 -u 10 + +Without trickle: + + # ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 + +Output: + + 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 36.31 MB/s + +With trickle: + + # trickle ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 + +Output: + + 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 9.51 kB/s + +As we can see in the output above, the upload transfer rate dropped to ~10 KB/s. + +**Example 4: Downloading the same video with and without trickle** + +As in Example 2, we will be downloading the file to the current working directory. + +Without trickle: + + # ncftpget -u username -p password 192.168.0.15 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 + +Output: + + 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 108.34 MB/s + +With trickle: + + # trickle ncftpget -u username -p password 111.111.111.111 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 + +Output: + + 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 29.28 kB/s + +Which is in accordance with the download limit set earlier (30 KB/s). + +**Note:** That once the daemon has been started, there is no need to set individual limits for each application that uses trickle. + +As we mentioned earlier, one can further customize trickle’s bandwidth shaping through trickled.conf. A typical section in this file consists of the following: + + [service] + Priority = + Time-Smoothing = + Length-Smoothing = + +Where, + +- [service] indicates the name of the application whose bandwidth usage we intend to shape. +- Priority allows us to specify a service to have a higher priority relative to another, thus not allowing a single application to hog all the bandwidth which the daemon is managing. The lower the number, the more bandwidth that is assigned to [service]. +- Time-Smoothing [in seconds]: defines with what time intervals trickled will try to let the application transfer and / or receive data. Smaller values (something between the range of 0.1 – 1s) are ideal for interactive applications and will result in a more continuous (smooth) session while slightly larger values (1 – 10 s) are better for applications that need bulk transfer. If no value is specified, the default (5 s) is used. +- Length-Smoothing [in KB]: the idea is the same as in Time-Smoothing, but based on the length of an I/O operation. If no value is specified, the default (10 KB) is used. + +Changing the smoothing values will translate into the application specified by [service] using transfer rates within an interval instead of a fixed value. Unfortunately, there is no formula to calculate the lower and upper limits of this interval as it mainly depends of each specific case scenario. + +The following is a trickled.conf sample file in the CentOS 7 client (192.168.0.17): + + [ssh] + Priority = 1 + Time-Smoothing = 0.1 + Length-Smoothing = 2 + + [ftp] + Priority = 2 + Time-Smoothing = 1 + Length-Smoothing = 3 + +Using this setup, trickled will prioritize SSH connections over FTP transfers. Note that an interactive process, such as SSH, uses smaller time-smoothing values, whereas a service that performs bulk data transfers (FTP) uses a greater value. The smoothing values are responsible for the download and upload speeds in our previous example not matching the exact value specified by the trickled daemon but moving in an interval close to it. + +### Conclusion ### + +In this article we have explored how to limit the bandwidth used by applications using trickle on Fedora-based distributions and Debian / derivatives. Other possible use cases include, but are not limited to: + +- Limiting the download speed via a system utility such as [wget][4], or a torrent client, for example. +- Limiting the speed at which your system can be updated via `[yum][5]` (or `[aptitude][6]`, if you’re in a Debian-based system), the package management system. +- If your server happens to be behind a proxy or firewall (or is the proxy or firewall itself), you can use trickle to set limits on both the download and upload, or communication speed with the clients or the outside. + +Questions and comments are most welcome. Feel free to use the form below to send them our way. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-and-limit-downloadupload-bandwidth-with-trickle-in-linux/ + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[2]:http://linux-training.be/files/books/LinuxFun.pdf +[3]:http://media2.ldscdn.org/assets/missionary/our-people-2014/2014-00-1460-he-is-the-gift-360p-eng.mp4 +[4]:http://www.tecmint.com/10-wget-command-examples-in-linux/ +[5]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[6]:http://www.tecmint.com/dpkg-command-examples/ \ No newline at end of file diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md new file mode 100644 index 0000000000..dcd3fcf919 --- /dev/null +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -0,0 +1,152 @@ +How to Manage KVM Virtual Environment using Commandline Tools in Linux +================================================================================ +In this 4th part of our [KVM series][1], we are discussing KVM environment management using CLI. We use ‘virt-install’ CL tool to create and configure virtual machines, virsh CL tool to create and configure storage pools and qemu-img CL tool to create and manage disk images. + +![KVM Management in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/KVM-Management-in-Linux.jpg) +KVM Management in Linux + +There is nothing new concepts in this article, we just do the previous tasks using command line tools. There is no new prerequisite, just the same procedure, we have discussed in previous parts. + +### Step 1: Configure Storage Pool ### + +Virsh CLI tool is a management user interface for managing virsh guest domains. The virsh program can be used either to run one command by giving the command and its arguments on the shell command line. + +In this section, we will use it to create storage pool for our KVM environment. For more information about the tool, use the following command. + + # man virsh + +**1. Using the command pool-define-as with virsh to define new storage pool, you need also to specify name, type and type’s arguments.** + +In our case, name will be Spool1, type will be dir. By default you could provide five arguments for the type: + +- source-host +- source-path +- source-dev +- source-name +- target + +For (Dir) type, we need the last argumet “target” to specify the path of storage pool, for the other arguments we could use “-” to unspecific them. + + # virsh pool-define-as Spool1 dir - - - - "/mnt/personal-data/SPool1/" + +![Create New Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Create-New-Storage-Pool.png) +Create New Storage Pool + +**2. To check the all storage pools you have in the environment, use the following command.** + + # virsh pool-list --all + +![List All Storage Pools](http://www.tecmint.com/wp-content/uploads/2015/02/List-All-Storage-Pools.png) +List All Storage Pools + +**3. Now it’s time to build the storage pool, which we have defined above with the following command.** + + # virsh pool-build Spool1 + +![Build Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Build-Storage-Pool.png) +Build Storage Pool + +**4. Using the virsh command pool-start to active/enable the storage pool we have just created/built above.** + + # virsh pool-start Spool1 + +![Active Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Active-Storage-Pool.png) +Active Storage Pool + +**5. Check the status of environment storage pools using the following command.** + + # virsh pool-list --all + +![Check Storage Pool Status](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Pool-Status.png) +Check Storage Pool Status + +You will notice that the status of Spool1 converted to active. + +**6. Configure Spool1 to start by libvirtd service every time automaticlly.** + + # virsh pool-autostart Spool1 + +![Configure KVM Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Configure-Storage-Pool.png) +Configure KVM Storage Pool + +**7. Finally lets display information about our new storage pool.** + + # virsh pool-info Spool1 + +![Check KVM Storage Pool Information](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Pool-Information.png) +Check KVM Storage Pool Information + +Congratulations, Spool1 is ready to be used lets try to create storage volumes using it. + +### Step 2: Configure Storage Volumes/Disk Images ### + +Now it is disk image’s turn, using qemu-img to create new disk image from Spool1. For more details about qemy-img, use the man page. + + # man qemu-img + +**8. We should specify the qemu-img command “create, check,….etc”, disk image format, the path of disk image you want to create and the size.** + + # qemu-img create -f raw /mnt/personal-data/SPool1/SVol1.img 10G + +![Create Storage Volume](http://www.tecmint.com/wp-content/uploads/2015/02/Create-Storage-Volumes.png) +Create Storage Volume + +**9. By using qemu-img command info, you could get information about your new disk image.** + +![Check Storage Volume Information](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Volume-Information.png) +Check Storage Volume Information + +**Warning**: Never use qemu-img to modify images in use by a running virtual machine or any other process; this may destroy the image. + +Now its time to create virtual machines in the next step. + +### Step 3: Create Virtual Machines ### + +10. Now with the last and latest part, we will create virtual machines using virt-istall. The virt-install is a command line tool for creating new KVM virtual machines using the “libvirt” hypervisor management library. For more details about it, use: + + # man virt-install + +To create new KVM virtual machine, you need to use the following command with all the details like shown in the below. + +- Name: Virtual Machine’s name. +- Disk Location: Location of disk image. +- Graphics : How to connect to VM “Usually be SPICE”. +- vcpu : Number of virtual CPU’s. +- ram : Amount of allocated memory in megabytes. +- Location : Specify the installation source path. +- Network : Specify the virtual network “Usually be vibr00 bridge”. + + # virt-install --name=rhel7 --disk path=/mnt/personal-data/SPool1/SVol1.img --graphics spice --vcpu=1 --ram=1024 --location=/run/media/dos/9e6f605a-f502-4e98-826e-e6376caea288/rhel-server-7.0-x86_64-dvd.iso --network bridge=virbr0 + +![Create New Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Create-New-Virtual-Machines.png) +Create New Virtual Machine + +**11. You will find also a pop-up virt-vierwer window appears to communicate with virtual machine through it.** + +![Booting Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Booting-Virtual-Machine.jpeg) +Booting Virtual Machine + +![Installation of Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Installation-of-Virtual-Machine.jpeg) +Installation of Virtual Machine + +### Conclusion ### + +This is the latest part of our KVM tutorial, we haven’t covered everything of course. It a shot to scratch the KVM environment so its your turn to search and keep hands dirty using this nice resources. + +- [KVM Getting Started Guide][2] +- [KVM Virtualization Deployment and Administration Guide][3] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/kvm-management-tools-to-manage-virtual-machines/ + +作者:[Mohammad Dosoukey][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/dos2009/ +[1]:http://www.tecmint.com/install-and-configure-kvm-in-linux/ +[2]:https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Getting_Started_Guide/index.html +[3]:https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/index.html \ No newline at end of file diff --git a/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md b/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md new file mode 100644 index 0000000000..478cc10009 --- /dev/null +++ b/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md @@ -0,0 +1,85 @@ +How to Setup Passwordless SSH Logon to Ubuntu 14.04 +================================================================================ +Hi all, today we'll gonna learn how we can setup Passwordless SSH Logon to Ubuntu 14.04 "Trusty". Only the workstations having the correct matching key pair (private and public) will be allowed to logon to the SSH server, without the key paring, access will not be allowed. + +Usually, we need to enter username and password combination to connect to an SSH console. If the combination is correct to that of the system's then, we get access to the server else we are denied from the access. But, there is something more secure than Password logon, we have passwordless SSH logon using the encrypted keys. + +If you want to enable this secured option, we can simply disable password-logon and only allow logon using an encryption key. When using encryption keys option, the client computer generates a private and public key pair. The client then must upload the public key to the SSH server authorized_key file. Before access is granted, the server and client computer validate the key pair. If the public key on the server matches the private key submitted via the client then access will be granted else will be denied. + +This is a very secure way authenticating to a SSH server and it’s a recommended method if you wish to implement secure logon with single user SSH logon. Here's a quick step-wise process on how to enable Passwordless SSH logon. + +### 1. Installing Openssh Server ### + +First off all, we'll need to update our local repository index. To do so, we'll first need to run apt-get update as shown below. + + $ sudo apt-get update + +![Updating Repo Index](http://blog.linoxide.com/wp-content/uploads/2015/02/updating-repo-list.png) + +Now, we can install openssh-server by running following command. + + $ sudo apt-get install openssh-server + +![Installing openssh server](http://blog.linoxide.com/wp-content/uploads/2015/02/installing-openssh-server.png) + +### 2. Enabling Openssh Server ### + +Now, we'll want to enable OpenSSH server after we successfully installed it on our Ubuntu 14.04 Operating System. The command to enable/start the server is given as follows. + + $ sudo service ssh start + +OR + + $ sudo /etc/init.d/ssh start + +### 3. Configuring Key Pair ### + +After we have installed our OpenSSH Server and enabled it. We'll now finally wanna go for generating our Public and Private Key Pair. To do that, run the following command in a terminal or console. + + $ ssh-keygen -t rsa + +After running the above command, we'll be prompted to complete a series of tasks. The first will be where to save the keys, press Enter to choose the default location which is in a hidden .ssh folder in the home directory. The next prompt will be to enter the Paraphrase. I personally leave this blank (just press enter) to continue. It will then create the key pair and we’re done. + +![Generating Key Pair](http://blog.linoxide.com/wp-content/uploads/2015/02/generating-key-pair.png) + +After generation of the key pair, we will need to **copy the client’s public key to the SSH server** or host inorder to create trusted relationship with it. We'll need to run the commands below to copy the client public key to the server. + + $ ssh-copy-id user@ip_address + +After the public key is copied to the server, we can now go and disable password logon via SSH. To do that, we'll need to open **/etc/ssh/ssh_config** via a text editor by run the commands below. + + $ sudo nano /etc/ssh/sshd_config + +Now, we'll need to uncomment the lines and set the values as shown below. + +![Configuring sshd Config](http://blog.linoxide.com/wp-content/uploads/2015/02/configuring-sshd_config.png) + +### 4. Restarting the SSH Server ### + +Finally, after we are done configuring SSH Server, we'll want to restart our SSH Server so that all the changes will take affect. To restart one can run the following command in a terminal or the console. + + $ sudo service ssh restart + +OR + + $ sudo /etc/init.d/ssh restart + +![Restarting ssh](http://blog.linoxide.com/wp-content/uploads/2015/02/restarting-ssh.png) + +Finally, we can now ssh in to the server without a password and only from the client having the same key pair not the password. + +### Conclusion ### + +Hurray! We have successfully enabled Passwordless SSH logon. It is a lot secure to enable Encrypted Key Pair SSH logon . This is a very secure way authenticating to a SSH server and it’s a recommended method if you wish to implement secure logon with single user SSH logon. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy Encrypted Secure SSH Login :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/setup-passwordless-ssh-logon-ubuntu-14-04/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ \ No newline at end of file From 110bd128f7b39ba8bf40fadd094362ada9e50ac0 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Mon, 2 Mar 2015 17:19:25 +0800 Subject: [PATCH 153/163] [Translated]20150209 How to back up a Debian system using backupninja.md --- ...ck up a Debian system using backupninja.md | 77 +++++++++---------- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/sources/tech/20150209 How to back up a Debian system using backupninja.md b/sources/tech/20150209 How to back up a Debian system using backupninja.md index 97e43f57bf..b58baa3bdc 100644 --- a/sources/tech/20150209 How to back up a Debian system using backupninja.md +++ b/sources/tech/20150209 How to back up a Debian system using backupninja.md @@ -1,64 +1,62 @@ -FSSlc translating - -How to back up a Debian system using backupninja +如何使用 backupninja 来备份一个 Debian 系统 ================================================================================ -Prudence or experience by disaster can teach every [sysadmin][1] the importance of taking frequent system backups. You can do so by writing good old shell scripts, or using one (or more) of the many backup tools available for the job. Thus the more tools you become acquainted with, the better informed decisions you will make when implementing a backup solution. +面临灾难时的小心谨慎或体验可以教会每一个系统管理采取频繁的系统备份的重要性。你可以通过编写存在已久的管用的 shell 脚本,或使用一个(或多个) 适合这项工作的备份工具来完成备份任务。因此,当你要实施一个备份解决方案时,你了解的备份工具越多,你做出的决策就会越明智。 -In this article we will present [backupninja][2], a lightweight and easy-to-configure system backup tool. With the help of programs like **rdiff-backup**, **duplicity**, **mysqlhotcopy** and **mysqldump**, Backupninja offers common backup features such as remote, secure and incremental file system backups, encrypted backup, and MySQL/MariaDB database backup. You can selectively enable status email reports, and can back up general hardware and system information as well. One key strength of backupninja is a built-in console-based wizard (called **ninjahelper**) that allows you to easily create configuration files for various backup scenarios. +在这篇文章中,我们将为你介绍 [backupninja][2] ,一个轻量且易于配置的系统备份工具。在诸如 **rdiff-backup**, **duplicity**, **mysqlhotcopy** 和 **mysqldump** 等程序的帮助下, Backupninja 可以提供常用的备份功能,如执行远程的、安全的和增量式的文件系统备份,加密备份以及 MySQL/MariaDB 数据库备份。你可以选择性地开启使用 email 进行状态报告功能,也可以对一般的硬件和系统的信息进行备份。 backupninja 的一个关键功能是它拥有一个内建的基于控制台的向导程序(被称为 **ninjahelper**),而后者允许你为不同的备份情景轻松地创建配置文件。 -The downside, so to speak, is that backupninja requires other "helper" programs to be installed in order to take full advantage of all its features. While backupninja's RPM package is available for Red Hat-based distributions, backupninja's dependencies are optimized for Debian and its derivatives. Thus it is not recommended to try backupninja for Red Hat based systems. +如果非要说的话,backupninja 的缺点是:为了充分使用其所有的功能,它要求一些其他“助手”程序已经被安装在了计算机中。尽管 backupninja 有针对基于 Red Hat(红帽) 的发行版本的 RPM 安装包,但 backupninja 针对 Debian 和它的衍生发行版本的依赖进行了优化。所以不建议在基于 Red Hat 的系统上尝试 backupninja 。 -In this tutorial, we will cover the backupninja installation for Debian-based distributions. +在这篇教程中,我们将介绍如何在基于 Debian 的发行版本上安装 backupninja 。 -### Installing Backupninja ### - -Run the following command as root: +### 安装 Backupninja ### + +以 root 账户来运行下面的命令: # aptitude install backupninja -During installation, several files and directories will be created: +在安装的过程中,有几个文件和目录将被创建: -- **/usr/sbin/backupninja** is the main bash shell script. -- **/etc/cron.d/backupninja**, by default, instructs cron to run the main script once per hour. -- **/etc/logrotate.d/backupninja** rotates the logs created by the program. -- **/etc/backup.d/** is the directory where the configuration files for backup actions reside. -- **/etc/backupninja.conf** is the main configuration file that includes general options. It is well commented and explains each option in detail. -- **/usr/share/backupninja** is the directory where the scripts used by backupninja are located (aka "handlers"). These are the scripts which are in charge of doing the actual work. In this directory you will also find .helper files, which are used to configure and set up ninjahelper menus. -- **/usr/share/doc/backupninja/examples** contains templates for action configuration files (the kind of files that are created through ninjahelper). +- **/usr/sbin/backupninja** 是 bash shell 主脚本; +- **/etc/cron.d/backupninja**, 默认情况下,构建 cron 任务来每隔一个小时运行上面的主脚本; +- **/etc/logrotate.d/backupninja** 处理由 backupninja 程序产生的日志;(注:我不知道这里的 rotate 该如何翻译) +- **/etc/backup.d/** 是备份操作的配置文件驻留的目录; +- **/etc/backupninja.conf** 是包含一般选项的主配置文件。这个文件带有良好的注释且详细解释了每个选项的含义; +- **/usr/share/backupninja** 是那些被 backupninja 使用的脚本所处的目录。这些脚本文件负责执行实际的工作。在这个目录中,你还可以找到 `.helper` 文件,它们可以被用来配置和设定 ninjahelper 的菜单; +- **/usr/share/doc/backupninja/examples** 含有操作配置文件(即通过 ninjahelper 产生的文件)的模板。 -### Running Ninjahelper for the First Time ### +### 首次运行 Ninjahelper ### -When we try to launch ninjahelper, we can see that an internal dependency may be required. If prompted, enter "yes" and press the ENTER key to install dialog (a tool that displays user-friendly dialog boxes from shell scripts). +当我们尝试启动 ninjahelper 时,我们可以看到一个内部依赖可能会被需要。假如系统进行了提示,请输入 “yes” 并敲下回车键来安装 dialog(一个用于从 shell 脚本中显示友好对话框的工具)。 ![](https://farm8.staticflickr.com/7537/15700597667_6618fbc142_z.jpg) -When you press Enter after typing yes, backupninja will install dialog and present the following screen once it's done. +当你在键入 yes 后再敲回车键时,backupninja 将会安装 dialog,一旦安装完成,将呈现出下面的截屏: ![](https://farm8.staticflickr.com/7469/15884374871_29f1c9acf1_z.jpg) -#### Example 1: Back up Hardware and System Info #### +#### 案例 1: 备份硬件和系统信息 #### -After launching ninjahelper, we will create a new backup action: +在启动了 ninjahelper 之后,我们将创建一个新的备份操作: ![](https://farm9.staticflickr.com/8637/15885715132_eb3156678e_z.jpg) -If necessary helper programs are not installed, we will be presented with the following screens. Disregard this step if these packages have already been installed on your system. +如果必要的助手程序没有被安装,下面的截屏将会呈现在我们眼前。假如这些软件包已经在你的系统上安装了,请跳过这一步。 ![](https://farm8.staticflickr.com/7508/15700315139_4c6117ef32_z.jpg) -The next step consists of selecting the items that you want to be a part of this backup. The first four are selected by default, but you can deselect them by pressing the spacebar. +接下来的一步需要你选取相关条目来作为此次备份任务的一部分。前四个条目已经默认被选上了,但你可以通过按空格键来撤消选择。 ![](https://farm8.staticflickr.com/7507/15699051870_65abaf52e5_z.jpg) -Once you are done, press OK to continue. You will be able to choose whether you want to use the default configuration file for this backup action (/etc/backup.d/10.sys), or if you want to create a new one. In the latter case, a new file with the same contents as the default one will be created under the same directory but named 11.sys, and so on for future system backup actions. Note that you can edit the configuration file once it's created with your preferred text editor. +一旦你完成了上面的步骤,按 OK 选项来继续。接着你将能够选择 是愿意使用默认的配置文件(/etc/backup.d/10.sys)来完成这次备份操作,还是创建一个新的配置文件。若为后者,一个含有与默认配置文件内容相同的文件将会在相同的目录下被创建,但它被命名为 11.sys,后续的备份操作将会创建类似的文件(注:只不过命名的序号不同)。需要说明的是一旦这个新的配置文件被创建,你便可以使用你喜爱的文本编辑器来编辑该文件。 ![](https://farm9.staticflickr.com/8654/15885715072_1e6126e929_o.png) -#### Example 2: Incremental Rsync Pull Backup of a Remote Directory #### +#### 案例 2: 一个远程目录的增量式 Rsync 拉取备份 #### -As you most likely know, rsync is widely used to synchronize files and folders over a network. In the following example we will discuss an approach to take incremental pull backups of a remote directory with hardlinking to save historical data and store them in our local file server. This approach will help us save space and increase security on the server side. +正如你最有可能知道的那样, rsync 被广泛地用于通过网络同步文件或文件夹。在接下来的例子中,我们将讨论一个使用硬链接来为一个远程目录做增量式拉取备份的方法,它被用来保存历史数据以及在我们本地的文件服务器中恢复这些历史数据。这个方法将帮助我们节省空间并增强位于服务器端的安全性。 -**Step 1**: Write a custom script in the /etc/backup.d directory with the following contents and chmod it to 600. Note that this directory may contain, besides plain configuration files, scripts that you want to run when backupninja is executed, with the advantage of using variables present in the main configuration file. +**步骤 1**:编写一个位于 `/etc/backup.d`的带有如下内容的自定义脚本,并将它的权限设置为 600 。需要说明的是,除了一般的配置文件,这个目录可能还包含当 backupninja 被执行时你想运行的一些脚本文件,它们可以发挥出位于主配置文件中的变量的优势。 # REMOTE USER user=root @@ -74,36 +72,35 @@ As you most likely know, rsync is widely used to synchronize files and folders o # RSYNC rsync -av --delete --recursive --link-dest=$localdirold $user@$host:$remotedir $localdir -In the above configuration, the '--link-dest' option of rsync is use to hardlink unchanged files (in all attributes) from $localdir-old to the destination directory ($localdir). +在上面的配置中, rsync 的 ‘--link-dest’ 选项的作用是为位于 $localdir-old 目录中那些没有改变的文件(包含所有属性) 硬链接到目标目录 ($localdir)。 -**Step 2**: Before backupninja is run for the first time, the parent directory (/home/gacanepa in this case) is empty. The first time we execute: +**步骤 2**:在 backupninja 第一次运行之前,上层目录(这个例子中指的是 /home/gacanepa) 是空的。第一次我们执行下面的命令: # backupninja -n -the backup.0 directory is created, and later in the process its name is changed to backup.1. +backup.0 目录就被创建了,并在接下来的过程中,它的名称将会被更改为 backup.1。 -The second time we run backupninja, backup.0 is re-created and backup.1 is kept. +当我们第二次运行 backupninja 时, backup.0 将会被重新创建,而 backup.1 被保留。 ![](https://farm8.staticflickr.com/7581/15700597497_0e0cd89ab9.jpg) -**Step 3**: Verify that the contents of backup.1 are hard links to the files in backup.0 by comparing the respective inode numbers and directory sizes. +**步骤 3**: 确保 backup.1 里面的文件硬链接到 backup.0 里的文件,我们可以通过比较文件的 inode( i 节点) 数和目录的大小来达到此目的。 ![](https://farm9.staticflickr.com/8636/15700315029_e922ce771b.jpg) -### Conclusion ### +### 总结 ### -Backupninja is not only a classic backup tool, but also an easy-to-configure utility. You can write your own handlers to run backupninja as per the individual configuration files located in /etc/backup.d, and you can even write helpers for ninjahelper in order to include them in its main interface. +Backupninja 不仅是一个经典的备份工具,它也是一个易于配置的实用程序。你可以通过编写你自己的 handler(注:我不知道该如何翻译 handler 这个单词) 来运行 backupninja 并将它们作为位于 `/etc.backup.d` 的个人配置文件。甚至你还可以为 ninjahelper 编写助手程序,以达到将它们包括在 ninjahelper 的主界面上。 -For example, if you create a handler named xmodulo in /usr/share/backupninja, it will run by default every file with the .xmodulo extension in /etc/backup.d. If you decide you want to add your xmodulo handler to ninjahelper, you can write the corresponding helper as xmodulo.helper. In addition, if you want backupninja to run an arbitrary script, just add it to /etc/backup.d and you are good to go. - -Feel free to leave your comments, questions, or suggestions, using the form below. we will be more than glad to hear from you. +例如,假如你在 `/usr/share/backupninja`目录中创建了一个名为 modulo 的 handler,它将自动运行那些位于 `/etc/backup.d` 目录中以 .xmodulo 为后缀的每个文件。如果你决定添加你的 xmodulo handler 到 ninjahelper 中, 你可以编写相应的助手程序,即 xmodulo.helper 。另外,假如你想 让 backupninja 运行任意一个脚本,只需把它添加到 `/etc/backup.d` 目录中,这样你的目的便可以达到了。 +欢迎使用下面的评论框来留下你的评论、问题或建议。听到你的回应将会使我们很高兴。 -------------------------------------------------------------------------------- via: http://xmodulo.com/backup-debian-system-backupninja.html 作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) +译者:[FSSlc](https://github.com/FSSlc) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a084066cd833531045425b8ac80b76919df38b90 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Mon, 2 Mar 2015 17:21:36 +0800 Subject: [PATCH 154/163] =?UTF-8?q?=E5=B0=86=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E7=9A=84=E6=96=87=E7=AB=A0=E7=A7=BB=E5=8A=A8=E5=88=B0=20transl?= =?UTF-8?q?ated=20=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150209 How to back up a Debian system using backupninja.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150209 How to back up a Debian system using backupninja.md (100%) diff --git a/sources/tech/20150209 How to back up a Debian system using backupninja.md b/translated/tech/20150209 How to back up a Debian system using backupninja.md similarity index 100% rename from sources/tech/20150209 How to back up a Debian system using backupninja.md rename to translated/tech/20150209 How to back up a Debian system using backupninja.md From 403c84a7ff65720e24526e758c054ecb77fc5d2b Mon Sep 17 00:00:00 2001 From: martin qi Date: Mon, 2 Mar 2015 19:34:32 +0800 Subject: [PATCH 155/163] translating --- ...302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md b/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md index 478cc10009..58c6351003 100644 --- a/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md +++ b/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md @@ -1,3 +1,5 @@ +translating by martin. + How to Setup Passwordless SSH Logon to Ubuntu 14.04 ================================================================================ Hi all, today we'll gonna learn how we can setup Passwordless SSH Logon to Ubuntu 14.04 "Trusty". Only the workstations having the correct matching key pair (private and public) will be allowed to logon to the SSH server, without the key paring, access will not be allowed. @@ -82,4 +84,4 @@ via: http://linoxide.com/ubuntu-how-to/setup-passwordless-ssh-logon-ubuntu-14-04 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/arunp/ \ No newline at end of file +[a]:http://linoxide.com/author/arunp/ From 507f0091b2dc22735eabd39f9f6925631c7d569f Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Mon, 2 Mar 2015 22:34:55 +0800 Subject: [PATCH 156/163] Update 20150227 Bringing a Bunch of Best Known Linux Network Tools.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...0227 Bringing a Bunch of Best Known Linux Network Tools.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md b/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md index 207abb0530..b5f8f6273e 100644 --- a/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md +++ b/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md @@ -1,3 +1,5 @@ +FSSlc translating + Bringing a Bunch of Best Known Linux Network Tools ================================================================================ It is very useful to use command line tools to monitor the network on your system and there are a tons of them out there available for the linux user such as nethogs, ntopng, nload, iftop, iptraf, bmon, slurm, tcptrack, cbm, netwatch, collectl, trafshow, cacti, etherape, ipband, jnettop, netspeed and speedometer. @@ -441,4 +443,4 @@ via: http://linoxide.com/monitoring-2/network-monitoring-tools-linux/ [7]:http://www.isotton.com/utils/cbm/ [8]:https://github.com/tgraf/bmon/ [9]:http://www.tcpdump.org/ -[10]:http://www.ntop.org/ \ No newline at end of file +[10]:http://www.ntop.org/ From 3670e03bf68864a3153e5523924865d3dbb458f9 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 3 Mar 2015 13:40:39 +0800 Subject: [PATCH 157/163] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Default Instead of Ubuntu Software Center.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md index a8032e03ca..9e6499eb2b 100644 --- a/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md +++ b/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md @@ -1,12 +1,12 @@ -如何使 GDebi 代替 Ubuntu Software Center 作为默认的 deb 包安装器 +如何使 GDebi 默认代替 Ubuntu 软件中心 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Make_GDebi_Default.jpeg) -假如你使用 Ubuntu 或像 Elementary OS Freya 一样的基于 Ubuntu 的 Linux 发行版本,也许你使用 Ubuntu 软件中心 来安装 `.deb` 可执行文件。对于查找和安装应用, Ubuntu 软件中心 是一个很好的应用,但它会消耗很多资源且运行速度缓慢。这就是为什么我更偏爱使用 [App Grid,一个 Ubuntu 软件中心 的轻量替代品][1] 的原因。 +如果你使用 Ubuntu 或基于 Ubuntu 的 Linux 发行版本,比如Elementary OS Freya,也许你使用 Ubuntu 软件中心来安装 `.deb` 可执行文件。对于查找和安装应用,Ubuntu 软件中心是一个很好的应用,但它会消耗很多资源且运行速度缓慢。这就是为什么我更偏爱使用 [一个 Ubuntu 软件中心的轻量级替代品——App Grid][1] 的原因。 -现在,假如你只是尝试安装一个 `.deb` 文件, 我不会向你推荐 Ubuntu 软件中心 或 App Grid ,我的建议为 GDebi,一个安装 Debian 可执行文件的专用程序。它极其轻量,且专注于安装 `.deb` 文件。关于 GDebi 最有用的功能是它也可以为你展示出将要安装的程序的依赖。 +现在,假如你只是尝试安装一个 `.deb` 文件,我不会向你推荐 Ubuntu 软件中心或 App Grid ,我的建议为 GDebi,一个安装 Debian 可执行文件的专用程序。它极其轻量,且专注于安装 `.deb` 文件。GDebi 最有用的功能是它也可以为你展示出将要安装的程序的依赖。 -在这篇文章中,我们将见证 ** 如何安装 GDebi 和使用它代替 Ubuntu 软件中心 作为默认的安装器**。 +在这篇文章中,我们将看一看 **如何安装 GDebi 以及使用它代替 Ubuntu 软件中心作为默认的安装器**。 ### 在 Ubuntu 和其他 Linux 发行版本中安装 GDebi ### @@ -16,7 +16,7 @@ ### 使得 GDebi 成为默认的 `.deb`包安装器 ### -一旦你安装了 GDebi,就该是看看如何使它成为安装 `.deb` 文件的默认应用的时刻了。请读者注意在这篇教程中 我使用的是 Elementary OS Freya ,但下面的步骤对于所有基于 Ubuntu 的发行版本都是适用的。 +一旦你安装了 GDebi,就是时候来看看如何使它成为安装 `.deb` 文件的默认应用了。请读者注意在这篇教程中我使用的是 Elementary OS Freya ,但下面的步骤对于所有基于 Ubuntu 的发行版本都是适用的。可能截屏显示会有点不同。 首先下载一个 `.deb`文件。例如你已经下载了一个 Google Chrome 的 `.deb`包。进入下载目录并右击该 `.deb`文件。在这里,接着选择 **属性**选项。 @@ -26,9 +26,9 @@ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default_Ubuntu.jpeg) -这样下次你双击一个 `.deb` 文件,便会自动打开 GDebi 来安装这个`.deb` 文件。使用这样轻量的应用的确是一个[加速 Ubuntu][2] 或其他 Linux 系统的好方法。 +这样下次你双击一个 `.deb` 文件,便会自动打开 GDebi 来安装这个`.deb` 文件。使用这样轻量级的应用的确是一个[加速 Ubuntu][2] 或其他 Linux 系统的好方法。 -你有什么意见呢?对于安装应用,你仍然偏爱于 Ubuntu 软件中心 还是 GDebi 呢?抑或,假如你是一个守旧派,也许你更喜欢 [新立得软件包管理器(Synaptic Package Manager)][3]? 哪一个是你的最爱呢? +你怎么看呢?对于安装应用,你仍然偏爱 Ubuntu 软件中心还是 GDebi 呢?如果你是一个守旧派,也许你更喜欢 [新立得软件包管理器(Synaptic Package Manager)][3]?那么,哪一个是你的最爱? -------------------------------------------------------------------------------- @@ -36,7 +36,7 @@ via: http://itsfoss.com/gdebi-default-ubuntu-software-center/ 作者:[Abhishek][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 5c41ea0a2a13013dc5a047b15d3735d533345e4b Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 3 Mar 2015 13:55:41 +0800 Subject: [PATCH 158/163] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...How To Make GDebi Default Instead of Ubuntu Software Center.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md (100%) diff --git a/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/published/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md similarity index 100% rename from translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md rename to published/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md From 711098662457046a3ed63da6be55adabd575244b Mon Sep 17 00:00:00 2001 From: theo-l Date: Tue, 3 Mar 2015 10:48:11 -0300 Subject: [PATCH 159/163] theo-l translating --- ...0150121 How to Monitor Network Usage with nload in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md b/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md index afbfa4eab6..511b15fd64 100644 --- a/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md +++ b/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md @@ -1,3 +1,4 @@ +theo-l translating How to Monitor Network Usage with nload in Linux ================================================================================ nload is a free linux utility that can help the linux user or sysadmin to monitor network traffic and bandwidth usage in real time by providing two simple graphs: one per incoming traffic and one for outgoing traffic. @@ -203,4 +204,4 @@ via: http://linoxide.com/monitoring-2/monitor-network-usage-nload/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/oltjano/ -[1]:http://www.roland-riegel.de/nload/nload-0.7.4.tar.gz \ No newline at end of file +[1]:http://www.roland-riegel.de/nload/nload-0.7.4.tar.gz From c5ab4078938c6a6e45e5446f33a1e286bd1b5161 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Wed, 4 Mar 2015 10:04:42 +0800 Subject: [PATCH 160/163] [translating] 20150211 25 Tips for Intermediate Git Users --- sources/tech/20150211 25 Tips for Intermediate Git Users.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150211 25 Tips for Intermediate Git Users.md b/sources/tech/20150211 25 Tips for Intermediate Git Users.md index a4dcb2b546..71ead3ad6a 100644 --- a/sources/tech/20150211 25 Tips for Intermediate Git Users.md +++ b/sources/tech/20150211 25 Tips for Intermediate Git Users.md @@ -1,3 +1,4 @@ +zpl1025 25 Tips for Intermediate Git Users ================================================================================ I’ve been using git for about 18 months now and thought I knew it pretty well. Then we had [Scott Chacon][1] from GitHub over to do some training at [LVS, a supplier/developer of betting/gaming software][2] (where contracted until 2013) and I learnt a ton in the first day. @@ -466,4 +467,4 @@ via: https://www.andyjeffries.co.uk/25-tips-for-intermediate-git-users/ [a]:https://www.andyjeffries.co.uk/author/andy-jeffries/ [1]:http://gitcasts.com/about -[2]:http://www.lvs.co.uk/ \ No newline at end of file +[2]:http://www.lvs.co.uk/ From da22e2769a2ce6f8c5df7c412352a734a5ea4f92 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 4 Mar 2015 13:17:38 +0800 Subject: [PATCH 161/163] =?UTF-8?q?20150304-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nd Maximum Supported RAM By Your System.md | 696 ++++++++++++++++++ ...returned error exit status 1' In Ubuntu.md | 45 ++ ...Your Network And Servers With Observium.md | 174 +++++ 3 files changed, 915 insertions(+) create mode 100644 sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md create mode 100644 sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md create mode 100644 sources/tech/20150304 Monitoring Your Network And Servers With Observium.md diff --git a/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md b/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md new file mode 100644 index 0000000000..2fed06677b --- /dev/null +++ b/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md @@ -0,0 +1,696 @@ +Linux Basics: How To Find Maximum Supported RAM By Your System +================================================================================ +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/RAM-790x527.jpg) + +Mostly, you will find maximum supported RAM by your system from the BIOS, Product catalog, or manuals. Here is the simple, yet useful trick, to find out maximum supported RAM using Dmidecode without opening the system chassis or referring the BIOS, product catalogs. + +### What is Dmidecode? ### + +As you may know, **Dmidecode** is a tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Using Dmidecode, you can retrieve this information without having to probe for the actual hardware. + +### Find out the maximum RAM supported by your system ### + +Make sure you have installed dmidecode on your system. I think it will be automatically installed while installing your OS, but I am not sure though. + +**On Deb based system:** + + sudo apt-get install dmidecode + +**On RPM based system:** + + sudo yum install dmidecode + +**On SUSE/openSUSE:** + + sudo zypper in dmidecode + +Well, we installed dmidecode. Let us find out the maximum RAM supported. To do that, enter the following command: + + sudo dmidecode -t 16 + +**Sample output:** + + # dmidecode 2.12 + SMBIOS 2.6 present. + + Handle 0x0014, DMI type 16, 15 bytes + Physical Memory Array + Location: System Board Or Motherboard + Use: System Memory + Error Correction Type: None + Maximum Capacity: 16 GB + Error Information Handle: Not Provided + Number Of Devices: 2 + +As you see in the above output, my system will support RAM upto 16GB, and it has two RAM slots. Pretty easy, isn’t it? + +Well, let us find out the currently installed RAM details. + + sudo dmidecode -t 17 + +**Sample output:** + + # dmidecode 2.12 + SMBIOS 2.6 present. + + Handle 0x0017, DMI type 17, 28 bytes + Memory Device + Array Handle: 0x0014 + Error Information Handle: 0x0000 + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM_B + Bank Locator: BANK 2 + Type: Unknown + Type Detail: None + Speed: Unknown + Manufacturer: Not Specified + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + Rank: Unknown + + Handle 0x0015, DMI type 17, 28 bytes + Memory Device + Array Handle: 0x0014 + Error Information Handle: 0x0000 + Total Width: 64 bits + Data Width: 64 bits + Size: 4096 MB + Form Factor: SODIMM + Set: None + Locator: DIMM_A + Bank Locator: BANK 0 + Type: DDR3 + Type Detail: Synchronous + Speed: 1067 MHz + Manufacturer: 014F + Serial Number: 00092AF2 + Asset Tag: 54114000 + Part Number: JM1066KSN-4G + Rank: Unknown + +As per the above output, I have installed one RAM in DIMM slot 1. The RAM size is **4GB**, and it’s type and speed is **DDR3** and **1067 MHz** respectively. + +Also, we can have the complete RAM details using the following commands. + + sudo dmidecode -t memory + sudo dmidecode -t memory | less + sudo dmidecode -t memory | more + +**Sample output:** + + # dmidecode 2.12 + SMBIOS 2.6 present. + + Handle 0x0014, DMI type 16, 15 bytes + Physical Memory Array + Location: System Board Or Motherboard + Use: System Memory + Error Correction Type: None + Maximum Capacity: 16 GB + Error Information Handle: Not Provided + Number Of Devices: 2 + + Handle 0x0017, DMI type 17, 28 bytes + Memory Device + Array Handle: 0x0014 + Error Information Handle: 0x0000 + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM_B + Bank Locator: BANK 2 + Type: Unknown + Type Detail: None + Speed: Unknown + Manufacturer: Not Specified + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + Rank: Unknown + + Handle 0x0015, DMI type 17, 28 bytes + Memory Device + Array Handle: 0x0014 + Error Information Handle: 0x0000 + Total Width: 64 bits + Data Width: 64 bits + Size: 4096 MB + Form Factor: SODIMM + Set: None + Locator: DIMM_A + Bank Locator: BANK 0 + Type: DDR3 + Type Detail: Synchronous + Speed: 1067 MHz + Manufacturer: 014F + Serial Number: 00092AF2 + Asset Tag: 54114000 + Part Number: JM1066KSN-4G + Rank: Unknown + +Curious to know the complete system details such as Motherboard, Memory, Bios etc? Well, enter the following command to get all details. + + sudo dmidecode + +**Sample output:** + + # dmidecode 2.12 + SMBIOS 2.6 present. + 48 structures occupying 2173 bytes. + Table at 0x000EB840. + + Handle 0xDA00, DMI type 218, 251 bytes + OEM-specific Type + Header and Data: + DA FB 00 DA B2 00 0D 5F 0F 37 40 7D 00 00 00 00 + 00 7E 00 01 00 00 00 DC 01 00 80 02 00 DD 01 00 + 80 03 00 75 01 01 80 01 00 76 01 02 80 01 00 2D + 01 03 80 01 00 2E 01 03 80 00 00 81 01 07 80 00 + 00 82 01 07 80 01 00 83 01 08 80 00 00 84 01 08 + 80 01 00 85 01 06 80 00 00 86 01 06 80 01 00 58 + 02 05 80 00 00 57 02 05 80 01 00 9C 00 02 00 01 + 00 9B 00 02 00 00 00 8A 01 03 00 01 00 89 01 03 + 00 00 00 7F 01 04 00 00 00 80 01 04 00 01 00 53 + 01 05 00 00 00 52 01 05 00 01 00 7B 01 06 00 00 + 00 7C 01 06 00 01 00 94 01 07 00 00 00 93 01 07 + 00 01 00 7D 00 08 00 00 00 2D 00 09 00 01 00 2E + 00 09 00 00 00 6E 00 0A 00 00 00 95 00 0B 00 01 + 00 96 00 0B 00 00 00 2F 02 0C 00 01 00 30 02 0C + 00 00 00 50 02 0D 00 00 00 51 02 0D 00 01 00 52 + 02 0D 00 02 00 FF FF 00 00 00 00 + + Handle 0xDA01, DMI type 218, 59 bytes + OEM-specific Type + Header and Data: + DA 3B 01 DA B2 00 0D 5F 0F 37 40 53 02 0D 00 03 + 00 54 02 0D 00 04 00 56 02 0D 00 05 00 4B 01 0E + 00 01 00 4A 01 0E 00 00 00 EA 00 0F 00 01 00 EB + 00 0F 00 00 00 FF FF 00 00 00 00 + + Handle 0x0004, DMI type 4, 42 bytes + Processor Information + Socket Designation: CPU 1 + Type: Central Processor + Family: Core i3 + Manufacturer: Intel + ID: A7 06 03 01 FF FB AB BE + Signature: Type 0, Family 6, Model 42, Stepping 7 + Flags: + FPU (Floating-point unit on-chip) + VME (Virtual mode extension) + DE (Debugging extension) + PSE (Page size extension) + TSC (Time stamp counter) + MSR (Model specific registers) + PAE (Physical address extension) + MCE (Machine check exception) + CX8 (CMPXCHG8 instruction supported) + APIC (On-chip APIC hardware supported) + SEP (Fast system call) + MTRR (Memory type range registers) + PGE (Page global enable) + MCA (Machine check architecture) + CMOV (Conditional move instruction supported) + PAT (Page attribute table) + PSE-36 (36-bit page size extension) + CLFSH (CLFLUSH instruction supported) + DS (Debug store) + ACPI (ACPI supported) + MMX (MMX technology supported) + FXSR (FXSAVE and FXSTOR instructions supported) + SSE (Streaming SIMD extensions) + SSE2 (Streaming SIMD extensions 2) + SS (Self-snoop) + HTT (Multi-threading) + TM (Thermal monitor supported) + PBE (Pending break enabled) + Version: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz + Voltage: 1.1 V + External Clock: 100 MHz + Max Speed: 2300 MHz + Current Speed: 2300 MHz + Status: Populated, Enabled + Upgrade: Other + L1 Cache Handle: 0x0005 + L2 Cache Handle: 0x0006 + L3 Cache Handle: 0x0007 + Serial Number: To Be Filled By O.E.M. + Asset Tag: To Be Filled By O.E.M. + Part Number: To Be Filled By O.E.M. + Core Count: 2 + Core Enabled: 1 + Thread Count: 2 + Characteristics: + 64-bit capable + + Handle 0x0005, DMI type 7, 19 bytes + Cache Information + Socket Designation: L1-Cache + Configuration: Enabled, Not Socketed, Level 1 + Operational Mode: Write Back + Location: Internal + Installed Size: 64 kB + Maximum Size: 64 kB + Supported SRAM Types: + Other + Installed SRAM Type: Other + Speed: Unknown + Error Correction Type: None + System Type: Unified + Associativity: 8-way Set-associative + + Handle 0x0006, DMI type 7, 19 bytes + Cache Information + Socket Designation: L2-Cache + Configuration: Enabled, Not Socketed, Level 2 + Operational Mode: Varies With Memory Address + Location: Internal + Installed Size: 512 kB + Maximum Size: 512 kB + Supported SRAM Types: + Other + Installed SRAM Type: Other + Speed: Unknown + Error Correction Type: None + System Type: Unified + Associativity: 8-way Set-associative + + Handle 0x0007, DMI type 7, 19 bytes + Cache Information + Socket Designation: L3-Cache + Configuration: Enabled, Not Socketed, Level 3 + Operational Mode: Varies With Memory Address + Location: Internal + Installed Size: 3072 kB + Maximum Size: 3072 kB + Supported SRAM Types: + Other + Installed SRAM Type: Other + Speed: Unknown + Error Correction Type: None + System Type: Unified + Associativity: Other + + Handle 0x0008, DMI type 8, 9 bytes + Port Connector Information + Internal Reference Designator: J1A1 + Internal Connector Type: None + External Reference Designator: PS2Mouse + External Connector Type: PS/2 + Port Type: Mouse Port + + Handle 0x0009, DMI type 8, 9 bytes + Port Connector Information + Internal Reference Designator: J1A1 + Internal Connector Type: None + External Reference Designator: Keyboard + External Connector Type: PS/2 + Port Type: Keyboard Port + + Handle 0x000A, DMI type 8, 9 bytes + Port Connector Information + Internal Reference Designator: J2A2B + Internal Connector Type: None + External Reference Designator: Video + External Connector Type: DB-15 female + Port Type: Video Port + + Handle 0x000B, DMI type 8, 9 bytes + Port Connector Information + Internal Reference Designator: J3A1 + Internal Connector Type: None + External Reference Designator: USB1 + External Connector Type: Access Bus (USB) + Port Type: USB + + Handle 0x000C, DMI type 8, 9 bytes + Port Connector Information + Internal Reference Designator: J3A1 + Internal Connector Type: None + External Reference Designator: USB2 + External Connector Type: Access Bus (USB) + Port Type: USB + + Handle 0x000D, DMI type 8, 9 bytes + Port Connector Information + Internal Reference Designator: J3A1 + Internal Connector Type: None + External Reference Designator: USB3 + External Connector Type: Access Bus (USB) + Port Type: USB + + Handle 0x000E, DMI type 8, 9 bytes + Port Connector Information + Internal Reference Designator: J5A1 + Internal Connector Type: None + External Reference Designator: LAN + External Connector Type: RJ-45 + Port Type: Network Port + + Handle 0x000F, DMI type 9, 17 bytes + System Slot Information + Designation: J6B2 + Type: x16 PCI Express + Current Usage: In Use + Length: Long + ID: 0 + Characteristics: + 3.3 V is provided + Opening is shared + PME signal is supported + Bus Address: 0000:00:01.0 + + Handle 0x0010, DMI type 9, 17 bytes + System Slot Information + Designation: J6B1 + Type: x1 PCI Express + Current Usage: In Use + Length: Short + ID: 1 + Characteristics: + 3.3 V is provided + Opening is shared + PME signal is supported + Bus Address: 0000:00:1c.3 + + Handle 0x0012, DMI type 11, 5 bytes + OEM Strings + String 1: Dell System + String 2: 5[0003] + String 3: 13[P18F] + + Handle 0x0013, DMI type 12, 5 bytes + System Configuration Options + Option 1: To Be Filled By O.E.M. + + Handle 0x001C, DMI type 21, 7 bytes + Built-in Pointing Device + Type: Touch Pad + Interface: Bus Mouse + Buttons: 2 + + Handle 0x001D, DMI type 22, 26 bytes + Portable Battery + Location: Sys. Battery Bay + Manufacturer: Sanyo + Serial Number: 5390 + Name: DELL 4YRJH22 + Chemistry: Lithium Ion + Design Capacity: 45000 mWh + Design Voltage: 10800 mV + SBDS Version: 1.0 + Maximum Error: 2% + SBDS Manufacture Date: 2012-02-28 + OEM-specific Information: 0x00000001 + + Handle 0x001E, DMI type 32, 20 bytes + System Boot Information + Status: No errors detected + + Handle 0x0020, DMI type 27, 12 bytes + Cooling Device + Type: Fan + Status: OK + OEM-specific Information: 0x00000000 + + Handle 0x0021, DMI type 28, 20 bytes + Temperature Probe + Description: CPU Internal Temperature + Location: Processor + Status: OK + Maximum Value: 127.0 deg C + Minimum Value: 0.0 deg C + Resolution: 1.000 deg C + Tolerance: 0.5 deg C + Accuracy: Unknown + OEM-specific Information: 0x00000000 + + Handle 0xB000, DMI type 176, 5 bytes + OEM-specific Type + Header and Data: + B0 05 00 B0 00 + + Handle 0xB100, DMI type 177, 12 bytes + OEM-specific Type + Header and Data: + B1 0C 00 B1 1A 0E 00 00 00 00 00 00 + + Handle 0x0025, DMI type 209, 12 bytes + OEM-specific Type + Header and Data: + D1 0C 25 00 00 00 00 03 05 01 00 03 + + Handle 0x0026, DMI type 210, 12 bytes + OEM-specific Type + Header and Data: + D2 0C 26 00 00 00 00 03 05 20 01 03 + + Handle 0x0027, DMI type 211, 13 bytes + OEM-specific Type + Header and Data: + D3 0D 27 00 01 00 00 00 00 02 03 04 04 + Strings: + Front + + Handle 0x0028, DMI type 212, 57 bytes + OEM-specific Type + Header and Data: + D4 39 28 00 70 00 71 00 01 49 50 48 9C 00 49 FC + 01 9B 00 49 FC 00 7F 01 4A FB 04 80 01 4A FB 00 + 53 01 4A F7 08 52 01 4A F7 08 7B 01 4A EF 10 7C + 01 4A EF 10 FF FF 00 00 00 + + Handle 0x002A, DMI type 217, 8 bytes + OEM-specific Type + Header and Data: + D9 08 2A 00 01 02 00 00 + Strings: + + Handle 0x002B, DMI type 219, 11 bytes + OEM-specific Type + Header and Data: + DB 0B 2B 00 00 01 02 03 00 04 05 + Strings: + + Handle 0x002C, DMI type 220, 22 bytes + OEM-specific Type + Header and Data: + DC 16 2C 00 01 F0 00 00 02 F0 00 00 00 00 03 F0 + 04 F0 00 00 00 00 + + Handle 0x002D, DMI type 221, 19 bytes + OEM-specific Type + Header and Data: + DD 13 2D 00 00 00 00 00 00 03 00 00 00 00 00 00 + 00 00 00 + + Handle 0x002E, DMI type 222, 16 bytes + OEM-specific Type + Header and Data: + DE 10 2E 00 01 08 FF FF 00 00 00 00 00 00 00 00 + + Handle 0x0014, DMI type 16, 15 bytes + Physical Memory Array + Location: System Board Or Motherboard + Use: System Memory + Error Correction Type: None + Maximum Capacity: 16 GB + Error Information Handle: Not Provided + Number Of Devices: 2 + + Handle 0x0016, DMI type 20, 19 bytes + Memory Device Mapped Address + Starting Address: 0x00000000000 + Ending Address: 0x000FFFFFFFF + Range Size: 4 GB + Physical Device Handle: 0x0015 + Memory Array Mapped Address Handle: 0x0018 + Partition Row Position: 1 + Interleave Position: 1 + Interleaved Data Depth: 1 + + Handle 0x0017, DMI type 17, 28 bytes + Memory Device + Array Handle: 0x0014 + Error Information Handle: 0x0000 + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM_B + Bank Locator: BANK 2 + Type: Unknown + Type Detail: None + Speed: Unknown + Manufacturer: Not Specified + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + Rank: Unknown + + Handle 0x0018, DMI type 19, 15 bytes + Memory Array Mapped Address + Starting Address: 0x00000000000 + Ending Address: 0x000FFFFFFFF + Range Size: 4 GB + Physical Array Handle: 0x0014 + Partition Width: 2 + + Handle 0x002F, DMI type 13, 22 bytes + BIOS Language Information + Language Description Format: Abbreviated + Installable Languages: 1 + eng + Currently Installed Language: eng + + Handle 0x0030, DMI type 131, 64 bytes + OEM-specific Type + Header and Data: + 83 40 30 00 31 00 00 00 00 00 00 00 00 00 00 00 + F8 00 4B 1C FF FF FF FF 01 00 00 00 00 00 07 00 + AD 04 04 00 00 00 00 00 C8 00 FF FF 00 00 00 00 + 00 00 00 00 32 00 00 00 76 50 72 6F 00 00 00 00 + + Handle 0x0029, DMI type 216, 9 bytes + OEM-specific Type + Header and Data: + D8 09 29 00 01 02 01 00 00 + Strings: + INTEL + 0000 + + Handle 0x0000, DMI type 0, 24 bytes + BIOS Information + Vendor: Dell Inc. + Version: A05 + Release Date: 08/03/2012 + Address: 0xF0000 + Runtime Size: 64 kB + ROM Size: 2048 kB + Characteristics: + MCA is supported + PCI is supported + BIOS is upgradeable + BIOS shadowing is allowed + ESCD support is available + Boot from CD is supported + Selectable boot is supported + BIOS ROM is socketed + EDD is supported + 5.25"/1.2 MB floppy services are supported (int 13h) + 3.5"/720 kB floppy services are supported (int 13h) + 3.5"/2.88 MB floppy services are supported (int 13h) + Print screen service is supported (int 5h) + 8042 keyboard services are supported (int 9h) + Serial services are supported (int 14h) + Printer services are supported (int 17h) + CGA/mono video services are supported (int 10h) + ACPI is supported + USB legacy is supported + ATAPI Zip drive boot is supported + BIOS boot specification is supported + Targeted content distribution is supported + BIOS Revision: 0.5 + Firmware Revision: 0.5 + + Handle 0x0002, DMI type 2, 15 bytes + Base Board Information + Manufacturer: Dell Inc. + Product Name: 01HXXJ + Version: A05 + Serial Number: .JSQ7PA1.CN7117623M00J2. + Asset Tag: Not Specified + Features: + Board is a hosting board + Board is replaceable + Location In Chassis: To Be Filled By O.E.M. + Chassis Handle: 0x0003 + Type: Motherboard + Contained Object Handles: 0 + + Handle 0x0003, DMI type 3, 21 bytes + Chassis Information + Manufacturer: Dell Inc. + Type: Portable + Lock: Not Present + Version: Not Specified + Serial Number: JSR1 + Asset Tag: Not Specified + Boot-up State: Safe + Power Supply State: Safe + Thermal State: Safe + Security Status: None + OEM Information: 0x00000000 + Height: Unspecified + Number Of Power Cords: 1 + Contained Elements: 0 + + Handle 0x0001, DMI type 1, 27 bytes + System Information + Manufacturer: Dell Inc. + Product Name: Inspiron N5050 + Version: Not Specified + Serial Number: JSR1 + UUID: 4C4C4544-0053-5110-8029-CAC05241 + Wake-up Type: Power Switch + SKU Number: To be filled by O.E.M. + Family: + + Handle 0x0024, DMI type 208, 12 bytes + OEM-specific Type + Header and Data: + D0 0C 24 00 02 05 FE 00 04 05 01 02 + Strings: + 20120323 + 20120323 + + Handle 0x0011, DMI type 10, 6 bytes + On Board Device Information + Type: Video + Status: Enabled + Description: Mobile Intel SandyBridge HD Graphics + + Handle 0x0015, DMI type 17, 28 bytes + Memory Device + Array Handle: 0x0014 + Error Information Handle: 0x0000 + Total Width: 64 bits + Data Width: 64 bits + Size: 4096 MB + Form Factor: SODIMM + Set: None + Locator: DIMM_A + Bank Locator: BANK 0 + Type: DDR3 + Type Detail: Synchronous + Speed: 1067 MHz + Manufacturer: 014F + Serial Number: 0009F2 + Asset Tag: 54114000 + Part Number: JM1066-4G + Rank: Unknown + + Handle 0x0031, DMI type 127, 4 bytes + End Of Table + +That’s it. Happy weekend. Stay happy! + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/linux-basics-how-to-find-maximum-supported-ram-by-your-system/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.unixmen.com/author/sk/ \ No newline at end of file diff --git a/sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md b/sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md new file mode 100644 index 0000000000..f3f262dfbc --- /dev/null +++ b/sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md @@ -0,0 +1,45 @@ +Linux Basics: How To Fix “E: /var/cache/apt/archives/ subprocess new pre-removal script returned error exit status 1″ In Ubuntu +================================================================================ +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/04/ubuntu-790x558.png) + +Today, I got a problem while updating VirtualBox to the latest version. + +> E: /var/cache/apt/archives/ subprocess new pre-removal script returned error exit status 1 + +![](https://www.unixmen.com/wp-content/uploads/2015/03/Update-Manager_0011.png) + +### Solution: ### + +I googled a bit and found the solution. Here is what I did to solve the problem. + + sudo apt-get clean + sudo apt-get update && sudo apt-get upgrade + +This will almost fix the problem. + +If you still end up with the same error, then try the following commands: + + sudo dpkg --configure -a + sudo apt-get -f install + +Or, you can manually download the latest version from [Oracle VirtualBox][1] site and install it as shown below. + + sudo apt-get update + sudo dpkg -i virtualbox-4.3_4.3.24-98716~Ubuntu~raring_amd64.deb + sudo apt-get -f install + sudo apt-get autoclean && sudo apt-get autoremove + +Cheers! + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/linux-basics-how-to-fix-e-varcacheaptarchives-subprocess-new-pre-removal-script-returned-error-exit-status-1-in-ubuntu/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.unixmen.com/author/sk/ +[1]:https://www.virtualbox.org/wiki/Downloads \ No newline at end of file diff --git a/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md b/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md new file mode 100644 index 0000000000..4eae05d99d --- /dev/null +++ b/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md @@ -0,0 +1,174 @@ +Monitoring Your Network And Servers With Observium +================================================================================ +### Introduction ### + +You have a problem while monitoring your servers, switches or physical machines. **Observium** fits your need. As a free monitoring system, it helps you to monitor your servers remotely. It is an auto-discovering SNMP based network monitoring platform written in PHP which includes support for a wide range of network hardware and operating systems including Cisco, Windows, Linux, HP, NetApp and many other. I will give you the steps to follow while setting up an **Observium** server on Ubuntu 12.04. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture1.png) + +Currently there are two different versions of **observium**. + +- The observium Community is a free tool and licensed under the QPL Open Source license. This version is the best solution for small deployments. It gets security updates each 6 months. +- While the second version, the Observium Professional is distributed under SVN based release mechanism. And it gets daily security updates. This tool is the best for Service Provider and enterprises deployments. + +For more information you can visit the offcial [website of Observium][1]. + +### System Requirements ### + +In order to install **Observium** , it’s necessary to have a server with a fresh installation. The development of **Observium** takes place on Ubuntu LTS and Debian systems, so it’s recommended to install **Observium** on Ubuntu or Debian because may be issues with other platforms. + +This article will guide you on how to install **Observium** on Ubuntu 12.04. For a small **Observium** installation is recommended to use 256MB for the memory and dual core for the process. + +### Installing Prerequisites ### + +Before installing **Observium** you need to make sure to install all dependencies. + +First step is to update your server + + sudo apt-get update + +Then you need to install all packages required to run Observium. + +Observuim need this list of software the run correctly: + +- LAMP server +- fping +- Net-SNMP 5.4+ +- RRDtool 1.3+ +- Graphviz + +Requirements for optional features: + +- Ipmitool – Only if you want to poll IPMI baseboard controllers on servers +- Libvirt-bin – Only if you want to monitor remote VM hosts using libvirt + + sudo apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-mcrypt php5-json php-pear snmp fping mysql-server mysql-client python-mysqldb rrdtool subversion whois mtr-tiny ipmitool graphviz imagemagick libvirt ipmitool + +### Creation MySQL Database and User for Observium ### + +Now you need to log into MySQL and create database for **Observuim**: + + mysql -u root -p + +After successful authenticated, you need to create the database. + + CREATE DATABASE observium; + +The database Name is **Observium**. You will need this information later. + +Now, you should create the database administrator. + + CREATE USER observiumadmin@localhost IDENTIFIED BY 'observiumpassword'; + +Next, you need to give this user permissions to administer the database you created. + + GRANT ALL PRIVILEGES ON observium.* TO observiumadmin@localhost; + +You need to flush the privilege information to disk to activate the new MySQL user: + + FLUSH PRIVILEGES; + exit + +### Downloading and Installing Observium ### + +Now that our system is ready, we can start the installation of Observium. + +First step to do is, creating the directory Observium is going to operate out of: + + mkdir -p /opt/observium && cd /opt + +For the purpose of this tutorial, we’re going to be using the Community/Open Source Edition of Observium. Download and unpack it. + + wget http://www.observium.org/observium-community-latest.tar.gz + tar zxvf observium-community-latest.tar.gz + +Now go under Observium directory + + cd observium + +Copy the default configuration file ‘**config.php.default**‘ to ‘**config.php**‘ and fill out the database config options: + + cp config.php.default config.php + nano config.php + +---------- + + / Database config + $config['db_host'] = 'localhost'; + $config['db_user'] = 'observiumadmin'; + $config['db_pass'] = 'observiumpassword'; + $config['db_name'] = 'observium'; + +Let’s setup the default schema for the MySQL Database: + + php includes/update/update.php + +Now you need to create directory to store rrd file and change permission to let apache write into the file . + + mkdir rrd + chown apache:apache rrd + +To help you troubleshooting on case of problem, you need to create logs file. + + mkdir -p /var/log/observium + chown apache:apache /var/log/observium + +Now you have to create the virtual host configuration for Observium + + + DocumentRoot /opt/observium/html/ + ServerName observium.domain.com + CustomLog /var/log/observium/access_log combined + ErrorLog /var/log/observium/error_log + + AllowOverride All + Options FollowSymLinks MultiViews + + + +Next, you need to enable rewrite functionality for your Apache server. + +To enable `mod_rewrite` modules, type this command: + + sudo a2enmod rewrite + +This module will be enable the next after reboot of Apache service. + + sudo service apache2 restart + +### Configuring Observium ### + +Before log into the web interface, you need to create administrator account (level 10) to Observium + + # cd /opt/observium + # ./adduser.php admin adminpassword 10 + User admin added successfully. + +Next set a cron jobs for the discovery and the poller jobs, create a new file ‘**/etc/cron.d/observium**‘ and add the following contents. + + 33 */6 * * * root /opt/observium/discovery.php -h all >> /dev/null 2>&1 + */5 * * * * root /opt/observium/discovery.php -h new >> /dev/null 2>&1 + */5 * * * * root /opt/observium/poller-wrapper.py 1 >> /dev/null 2>&1 + +Reload cron process to take new entries. + + # /etc/init.d/cron reload + +You’ve installed Observium Server! Log into Observium using your browser **http://** and be on your way. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture.png) + +Enjoy! + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/monitoring-network-servers-observium/ + +作者:[anismaj][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.unixmen.com/author/anis/ +[1]:http://www.observium.org/ \ No newline at end of file From f34e78bfa033bcfe34eaa78cfc6dc9fa9bf25e48 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 4 Mar 2015 15:17:01 +0800 Subject: [PATCH 162/163] =?UTF-8?q?20150304-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4 ​No reboot patching comes to Linux 4.0.md | 58 ++++++ ...ough Free Disk Space On boot' In Ubuntu.md | 63 +++++++ ... How To Fix Windows Updates Stuck At 0%.md | 53 ++++++ ...ocal Network Between Ubuntu And Windows.md | 177 ++++++++++++++++++ 4 files changed, 351 insertions(+) create mode 100644 sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md create mode 100644 sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md create mode 100644 sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md create mode 100644 sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md diff --git a/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md b/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md new file mode 100644 index 0000000000..6333fea9a7 --- /dev/null +++ b/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md @@ -0,0 +1,58 @@ +​No reboot patching comes to Linux 4.0 +================================================================================ +> **Summary**:With the new Linux 4.0 kernel, you'll need to reboot Linux less often than ever. + +With [Linux 4.0][1], you may never need to reboot your operating system again. + +![Using Linux means never having to reboot. -- SUSE ](http://zdnet4.cbsistatic.com/hub/i/r/2015/03/02/5e766833-454b-45b5-a8f7-a55d21e9d26a/resize/270x270/4d0774552c342a1507784ef802619b71/livepatching.jpg) +Using Linux means never having to reboot. -- SUSE + +One reason to love Linux on your servers or in your data-center is that you so seldom needed to reboot it. True, critical patches require a reboot, but you could go months without rebooting. Now, with the latest changes to the Linux kernel you may be able to go years between reboots. + +This is actually a feature that was available in Linux in 2009 thanks to a program called [Ksplice][2]. This program compares the original and patched kernels and then uses a customized kernel module to patch the new code into the running kernel. Each Ksplice-enabled kernel comes with a special set of flags for each function that will be patched. The [Ksplice process][3] then watches for a moment when the code for the function being patched isn't in use, and ta-da, the patch is made and your server runs on. + +[Oracle acquired Ksplice][4] in 2011, and kept it just for its own [Oracle Linux][5], a [Red Hat Enterprise Linux (RHEL)][6] clone, and as a RHEL subscription service. That left all the other enterprise and server Linux back where they started. + +Then [KernelCare released a service that could provide bootless patches][7] for most enterprise Linux distros. This program use proprietary software and is only available as a service with a monthly fee. That was a long way from satisfying many Linux system administrators. + +So, [Red Hat][8] and [SUSE][9] both started working on their own purely open-source means of giving Linux the ability to keep running even while critical patches were being installed. Red Hat's program was named [kpatch][10], while SUSE' is named [kGraft][11]. + +The two companies took different approaches. Kpatch issues a stop_machine() command. After that it looks at the stack of existing processes using [ftrace][12] and, if the patch can be made safely, it redirects the running code to the patched functions and then removes the now outdated code. + +Kgraft also uses ftrace, but it works on the thread level. When an old function is called it makes sure the thread reaches a point that it can switch to the new function. + +While the end result is the same, the operating system keeps running while patches are made, there are significant differences in performance. Kpatch takes from one to forty milliseconds, while kGraft might take several minutes but there's never even a millisecond of down time. + +At the Linux Plumbers Conference in October 2014, the two groups got together and started work on a way to [patch Linux without rebooting that combines the best of both programs][13]. Essentially, what they ended up doing was putting both kpatch and kGraft in the 4.0 Linux kernel. + +Jiri Kosina, a SUSE software engineer and Linux kernel developer, explained, that live-patching in the Linux kernel will "provides a basic infrastructure for function "live patching" (i.e. code redirection), including API [application programming interface] for kernel modules containing the actual patches, and API/ABI [application binary interface] for userspace to be able to operate on the patches. This is "relatively simple and minimalistic, as it's making use of existing kernel infrastructure (namely ftrace) as much as possible. It's also self-contained, in a sense that it doesn't hook itself in any other kernel subsystem (it doesn't even touch any other code)." + +The release candidate for Linux 4.0 is now out. Kosina stated that "It's now implemented for x86 only as a reference architecture, but support for powerpc, s390 and arm is already in the works." And, indeed, the source code for these architectures is already in the [Live Patching Git code][14]. + +Simply having the code in there is just the start. Your Linux distribution will have to support it with patches that can make use of it. With both Red Hat and SUSE behind it, live patching will soon be the default in all serious business Linux distributions. + +-------------------------------------------------------------------------------- + +via: http://www.zdnet.com/article/no-reboot-patching-comes-to-linux-4-0/#ftag=RSSbaffb68 + +作者:[Steven J. Vaughan-Nichols][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.zdnet.com/meet-the-team/us/sjvn/ +[1]:http://www.zdnet.com/article/linux-kernel-turns-over-release-odometer-to-4-0/ +[2]:http://www.computerworld.com/article/2466389/open-source-tools/never-reboot-again-with-linux-and-ksplice.html +[3]:http://www.ksplice.com/ +[4]:http://www.zdnet.com/article/oracle-acquires-zero-downtime-linux-upgrade-software/ +[5]:http://www.oracle.com/us/technologies/linux/overview/index.html +[6]:http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux +[7]:http://www.zdnet.com/article/kernelcare-new-no-reboot-linux-patching-system/ +[8]:http://www.redhat.com/ +[9]:http://www.suse.com/ +[10]:http://rhelblog.redhat.com/2014/02/26/kpatch/ +[11]:http://www.zdnet.com/article/suse-gets-live-patching/ +[12]:http://elinux.org/Ftrace +[13]:http://linuxplumbersconf.org/2014/wp-content/uploads/2014/10/LPC2014_LivePatching.txt +[14]:https://kernel.googlesource.com/pub/scm/linux/kernel/git/jikos/livepatching/+/9ec0de0ee0c9f0ffe4f72da9158194121cc22807 \ No newline at end of file diff --git a/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md b/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md new file mode 100644 index 0000000000..3d20014215 --- /dev/null +++ b/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md @@ -0,0 +1,63 @@ +How To Fix “Not Enough Free Disk Space On /boot” In Ubuntu +================================================================================ +### Question: How To Fix “Not Enough Free Disk Space On /boot” In Ubuntu? ### + +Today, I got the following error, but a simple one, when try to update my Lubuntu 14.04 desktop. + +> “Not Enough Free Disk Space On /boot” + +![](https://www.unixmen.com/wp-content/uploads/2015/02/Software-Updater_002.png) + +This is because my /boot partition has caught up with unwanted old kernels, packages etc. + +### Answer: ### + +I heard about **Computer Janitor** feature which will remove unwanted old junk files in Ubuntu Tweak tool. Using the Computer Janitor, you can clean up your system like a freshly installed system. Janitor will remove; + +- Apps cache(Firefox/Chrome cache, Software center cache); +- Thumbnail cache; +- Apt cache; +- Old kernels; +- Package configs; +- And unneeded packages. + +If you haven’t install this tool, look at the following link. + +- **[How To Install And Use Ubuntu Tweak On Ubuntu][1]** + +To remove unwanted junk files, open Ubuntu Tweak, and click on the **Janitor** option. + +![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_006.png) + +Select the check the boxes to remove unwanted junk from your system, and click **Clean** button. + +![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_007.png) + +Janitor will now start to clean up your system + +![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_003.png) + +Cool! The system is clean now. + +![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_008.png) + +Again I re-launched the software updater. This time it went smoothly without any issues. + +![](https://www.unixmen.com/wp-content/uploads/2015/02/Software-Updater_009.png) + +That’s all. Enjoy. There are others ways also available to clean up the system. But, this seems very easy to follow. We can do system clean up in few mouse clicks. + +Cheers! + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/how-to-fix-not-enough-free-disk-space-on-boot-in-ubuntu/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.unixmen.com/author/sk/ +[1]:http://www.unixmen.com/after-a-fresh-install-of-ubuntu-1010-maverick-meerkat-configuration-made-easy-with-ubuntu-tweak/ \ No newline at end of file diff --git a/sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md b/sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md new file mode 100644 index 0000000000..c74df29f1e --- /dev/null +++ b/sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md @@ -0,0 +1,53 @@ +How To Fix Windows Updates Stuck At 0% +================================================================================ +How do you feel when you log in to Windows after a month, find there are updates to install, you select to install these updates and those **Windows updates stuck at zero percent**? + +Why am I talking about Windows updates on a blog dedicated to Linux and Open Source? Because I prefer to [dual boot Windows with Linux][1]. While I use Linux as my main desktop, once in a while I do log in to Windows. The most annoying thing after logging in Windows is the Windows updates. It has happened to me on several occasions that I found **Windows update not working**. I choose to install the updates and Windows updates get stuck at 0 KB and 0%, like this: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_Updates_stuck_at_zero.jpeg) + +In this tutorial, we shall see how to make Windows update work again. The tutorial should be applicable for Windows 7, Windows 8 and Windows 8.1. + +### Fix Windows updates stuck at zero percent ### + +Please mind that Windows updates can be stuck at any percent and the trick which we are going to use would require you to install those updates again. I hope you do not find that too inconvenient. If you are ready, let’s see how to fix this Windows update issue. + +#### Step 1: #### + +Press Windows+R. This will prompt run dialogue box. In here, type services.msc: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Updates_3.png) + +#### Step 2: #### + +Now it brings us to all the services installed in Windows. These services are listed in alphabetical order. Scroll down and look for **Windows Update Service**. Right click on it and stop it. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_Updates_stuck_1.jpeg) + +#### Step 3: #### + +Now go in **C:\Windows\SoftwareDistribution and delete all of its contents**. Actually, this is the folder where downloaded installation files were stored. But since Windows update suck, they somehow have problem with partially downloaded update files. + +#### Step 4: #### + +Go back to services again (as mentioned in Step 1) and this time start the Windows Update Service, by right clicking on it. Try to update Windows again. It should be working this time. + +So once you have got the updates working, perhaps you will find plenty of updates to install at next reboot. And that moment calls for a meme: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_update_suck.jpg) + +Jokes apart, I hope this tip helps you to get rid of Windows updates hanged at 0%. I wish that Linux like updates are also included in the list of [Windows 10 features copied from Linux][2]. I wish. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-windows-updates-stuck-0/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ +[2]:http://itsfoss.com/windows-10-inspired-linux/ \ No newline at end of file diff --git a/sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md b/sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md new file mode 100644 index 0000000000..d0f6d9f1df --- /dev/null +++ b/sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md @@ -0,0 +1,177 @@ +Share Folders On Local Network Between Ubuntu And Windows +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_windows.jpeg) + +This is a complete tutorial to show you **how to share folders over local network in Ubuntu**. + +Do you have multiple devices in your home? Do you have to use Flash Drive or SD card to transfer data from Ubuntu to another computer? Do you find it annoying? We know you do. Because we don’t want you to waste your precious time while you can transfer your files, documents and other large stuff quickly and easily, over the local network. It’s one time setup and then with some clicks you will be able to **share files between Ubuntu and Windows** or any other Linux system. And don’t worry it’s easy and takes only little time. + +One more thing to add, while we performed this tutorial on Ubuntu, this tutorial should be valid for any other Linux OS. + +#### Share folder on local network in Ubuntu #### + +If you are using Ubuntu 14.04, 14.10 or 12.04, there are two ways you can share your local files over the local network to access it from Windows or other Linux computers. + +- Share it for everyone’s access on local network, without password +- Password protect the folders for restricted access + +We’ll see both methods in this post and will let you decide which one you would prefer to use. + +### 1. Share folders on local network without password ### + +#### Step 1: #### + +To share a folder on local network in Ubuntu, right click on the desired folder and select Local Network Share: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Share_Folder_Ubuntu.jpeg) + +**Possible troubleshoot**: If do not see the option of Local Network Share in right click menu, open a terminal and use the following command to install nautlius-share: + + sudo apt-get install nautilus-share + +You’ll need to restart Nautilus. Either log out and log in back or use the command below: + + nautilus -q + +#### Step 2: #### + +When you click on Local Network Share, you will see the option of sharing the folder. Just check the option of Share this folder: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_1.jpeg) + +Possible troubleshoot: If you are prompted about Sharing service not being installed, like in the screenshot below, just click on Install service and follow the instructions. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_2.jpeg) + +#### Step 3: #### + +When you check the option of Share this folder, you’ll see option of Create Share available for you. You can also allow other users to edit the files in the shared folder. Option for guest access can be checked as well. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_folder_Ubuntu_3.png) + +You’ll see that the folder icon have been changed to show that it has been shared. To stop sharing a folder, just uncheck the Share this folder option. + +Now this was the easy way out. This provides access to anyone on your local network to access these files. In normal condition, you should prefer this. I mean, devices on your home network should be generally know devices. But this could not be the case always. What if you want only certain people to access it? This is where Samba server comes in picture. We’ll see that in the second part of the tutorial. + +### 2. Share the folders on local network in Ubuntu with password protection ### + +To do this, we need to configure Samba server. Actually, we did use Samba in the previous part of this tutorial. We just did not emphasize on it. Before we go on seeing how to set up Samba server for local network sharing in Ubuntu, let’s first have a quick look on what actually is [Samba][1]. + +#### What is Samba? #### + +Samba is the software package that allows you to share files, documents and printers across a network, irrespective of whether you are using Linux, Windows and Mac. It’s available for all major platforms and can work tremendously nice in all of them. Quoting from Wikipedia: + +> Samba a free software re-implementation of the SMB/CIFS networking protocol, and was originally developed by Andrew Tridgell. As of version 3, Samba provides file and print services for various Windows Clients and can integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a domain member. It can also be part an Active Directory domain. + +#### Install Samba server on Ubuntu #### + +You can easily install Samba on you Ubuntu box. Before installing update your system so that you can install any available updates. + + sudo apt-get update && apt-get upgrade + +Now install Samba serer and few other required stuffs with the following command: + + sudo apt-get install samba samba-common system-config-samba python-glade2 gksu + +Once you’ve installed Samba server, it’s time to configure Samba from the graphical interface window to share files. + +#### Configure Samba server on Ubuntu #### + +Open Samba Configuration tool from the dash: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Setup-Samba.png) + +Go to **Preference->Server Settings**. Although the default settings are good and may be same you need. But you may need to make change to it in some cases. + +Now in Server Settings you’ve two tabs, ‘Basic’ and ‘Security’. Under Basic tab you’ve the following options that mean: + +- Workgroup – This is the name of the Workgroup of the computer you want to connect to. For example, if you want to connect to a Windows computer so you will enter the workgroup name of Windows computer, and in Windows you already have the same workgroup name as is set by default in Samba Server Settings. But if you have a different workgroup name on Windows then you will enter that workgroup name in this field. (In Windows 7 to get the workgroup name, right-click Computer icon and go to Properties, there you’ll see Windows Workgroup name.) +- Description – This is the name of your computer as seen by others. Don’t use spaces or non-internet friendly characters. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/samba-server-settings.png) + +setting up samba serverAllowing ‘Guests’ is not advisable so there is no reason to change security settings. Keep as it is. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Samba-Security-Settings-compressed.jpg) + +Samba Security security settingsIt is all done! You’ve setup Samba Server. We are not far from sharing our first folder on network. + +#### Create a system user for network file sharing #### + +We will now create a system user for sharing file on network. This is how simple it is. + +- Go to **System Settings**. +- Under Systems Settings Click **User Accounts**. +- Click **unlock** to Enable + (**plus**) icon. +- Click + (plus) icon to create a new system user. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/create-system-user1.jpg) + +Now as you can see the above image, you can enter ‘Full name’. As you enter ‘Full name’ Username will be taken as Full name automatically. Because we are creating this user to share files so we will assign Account Type to ‘**Standard**‘. + +Done above steps? Click add. You have created a system user. The user is not yet activated so we will activate it by setting up password for this account. Make sure Users accounts panel is unlocked. Click Account disabled and type a new password, then confirm password and click Change. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/activate-system-user.jpg) + +Yipee… Upto now we have installed and configured Samba and We have created a System user to share files on network from the account and we have activated our newly created account, too. Now We will move to Samba for the last step of configuring everything, then we will share a folder. + +#### Add new Samba user #### + +Open Samba and click Samba Users under Preference. Fill up the the simple dialogue. Here are couple of details about the fields: + +**Unix Username** – In this case I am selecting the user that I just created. + +**Windows Username** – You will enter this username when you are accessing from Windows Machine. + +**Samba Password** – You will enter this password when you are accessing from Windows Machine. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/samba-user-setting.jpg) + +Once you’ve done click OK. Now take a deep breath. You have successfully created a network with the help of Samba. Now restart the network or Samba services and ready to share files with other machines. + + sudo restart smbd && sudo restart nmbd + +#### Share folders or files over the network #### + +To share files with Samba it’s simple with graphical user interface. Click the Plus icon in Samba and you will get dialogue like this: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/share-files-and-folders.jpg) + +share files and folders over network with sambaComplete the fields. In ‘Directory‘ browse the folder you want to share. Here are the details about the fields you will see here: + +- **Share name** is the name of the folder that other would see. +- **Description** is simply about the content you are sharing on network. +- **Writable** You shared folders are ‘read only’ by default. You can set them to writable if you want others on network to change them. +- **Visible** As the name suggests when you click Visible, the shared folder will be visible to the people on network. + +Now you can set permissions for the folder you are sharing. To do this click ‘Access’ tab and check the users you want to share the folder with. When you select Allow access to everyone, the folder will be accessible to everyone on the network. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Screenshot-from-2015-02-28-202031.png) + +Finally click OK to complete the sharing. Now the folder is shared with the people you want. You have completed sharing file on network. Is there everything left? Yes! How to remove the folders from the network? + +#### Remove shared folders #### + +We will also need to remove some of the folders after sometime from network. It is very simple and here is how we can do that. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/remove-shared-folder-from-network.jpg) + +This is all done! We can also share files over network using terminal but that would not be as easy as this one. If you request for command line sharing then I will write a tutorial on how to share files over network with command line in Linux. + +So, how do you find this tutorial to share files on local network in Ubuntu? I hope with this tutorial you can **easily share files between Ubuntu and Windows**. If you have questions or suggestions, feel free to ask it in the comment box below. + +This tutorial was requested by Kalc. If you would like, you can [request your own tutorial][2]. We would be happy to help you out along with other readers facing the same issue. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/share-folders-local-network-ubuntu-windows/ + +作者:[Mohd Sohail][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/sohail/ +[1]:http://en.wikipedia.org/wiki/Samba_%28software%29 +[2]:http://itsfoss.com/request-tutorial/ \ No newline at end of file From eb1a540d5a70d9fbe6558ae7dd21c8cbc8ecf086 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 4 Mar 2015 17:12:04 +0800 Subject: [PATCH 163/163] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...plicate Files Instantly From Hard Drive.md | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/translated/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md b/translated/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md index 17da6a9508..1910310f2d 100644 --- a/translated/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md +++ b/translated/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md @@ -3,17 +3,17 @@ dupeGuru - 直接从硬盘中查找并移除重复文件 ### 简介 ### -对我们来说,磁盘被装满是一个较大的困扰。无论我们如何小心谨慎,我们总可能将相同的文件复制到多个不同的地方,或者在不知情的情况下,重复下载了同一个文件。因此,迟早你会看到“磁盘已满”的错误提示,若此时我们确实需要一些磁盘空间来存储重要数据,以上情形无疑是最糟糕的。假如你确信自己的系统中有重复文件,那么 **dupeGuru** 可能会帮助到你。 +对我们来说,磁盘被装满是棘手问题之一。无论我们如何小心谨慎,我们总可能将相同的文件复制到多个不同的地方,或者在不知情的情况下,重复下载了同一个文件。因此,迟早你会看到“磁盘已满”的错误提示,若此时我们确实需要一些磁盘空间来存储重要数据,以上情形无疑是最糟糕的。假如你确信自己的系统中有重复文件,那么 **dupeGuru** 可能会帮助到你。 dupeGuru 团队也开发了名为 **dupeGuru 音乐版** 的应用来移除重复的音乐文件,和名为 **dupeGuru 图片版** 的应用来移除重复的图片文件。 ### 1. dupeGuru (标准版) ### -对于那些不熟悉 [dupeGuru][1] 的人来说,它是一个免费,开源,跨平台的应用,其用途是在系统中查找和移除重复文件。它可以在 Linux, Windows, 和 Mac OS X 等平台下使用。通过使用一个快速的模糊匹配算法,它可以在几分钟内找到重复文件。同时,你还可以调整 dupeGuru 使它去精确查找特定文件类型的重复文件,以及从你想删除的文件中,消除特定的某些文件。它支持英语、 法语、 德语、 中文 (简体)、 捷克语、 意大利语、亚美尼亚语、 俄语、乌克兰语、巴西语和越南语。 +需要告诉那些不熟悉 [dupeGuru][1] 的人,它是一个免费、开源、跨平台的应用,其用途是在系统中查找和移除重复文件。它可以在 Linux, Windows, 和 Mac OS X 等平台下使用。通过使用一个快速的模糊匹配算法,它可以在几分钟内找到重复文件。同时,你还可以调整 dupeGuru 使它去精确查找特定文件类型的重复文件,以及从你想删除的文件中,清除某种文件。它支持英语、 法语、 德语、 中文 (简体)、 捷克语、 意大利语、亚美尼亚语、俄语、乌克兰语、巴西语和越南语。 #### 在 Ubuntu 14.10/14.04/13.10/13.04/12.04 中安装 dupeGuru #### -dupeGuru 开发者已经构建了一个 Ubuntu PPA (Personal Package Archives)来简化安装过程。为了安装 dupeGuru,依次在终端中键入以下命令: +dupeGuru 开发者已经构建了一个 Ubuntu PPA (Personal Package Archives)来简化安装过程。想要安装 dupeGuru,依次在终端中键入以下命令: ``` sudo apt-add-repository ppa:hsoft/ppa @@ -23,31 +23,31 @@ sudo apt-get install dupeguru-se ### 使用 ### -使用非常简单,可从 Unity 面板或菜单中启动 dupeGuru 。 +使用非常简单,可从 Unity 面板或菜单中启动 dupeGuru。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru_007.png) +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/11/dupeGuru_007.png) 点击位于底部的 `+` 按钮来添加你想扫描的文件目录。点击 `扫描` 按钮开始查找重复文件。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru_008.png) +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/11/dupeGuru_008.png) -一旦所选目录中含有重复文件,则它将在窗口中展示重复文件。正如你所看到的,在下面的截图中,我的下载目录中有一个重复文件。 +一旦所选目录中含有重复文件,那么它将在窗口中展示重复文件。正如你所看到的,在下面的截图中,我的下载目录中有一个重复文件。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Results_009.png) +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/11/dupeGuru-Results_009.png) -现在,你可以决定下一步如何操作。你可以删除这个重复的文件,或者对它进行重命名,抑或是 复制/移动 这个文件到另一个位置。为此,选定该重复文件,或 在菜单栏中选定写有“**仅显示重复**”选项 ,如果你选择了“**仅显示重复**”选项,则只有重复文件在窗口中可见,这样你便可以轻易地选择并删除这些文件。点击“操作”下拉菜单,最后选择你将执行的操作。在这里,我只想删除重复文件,所以我选择了“移动标记文件到垃圾箱”这个选项。 +现在,你可以决定下一步如何操作。你可以删除这个重复的文件,或者对它进行重命名,抑或是 复制/移动 到另一个位置。为此,选定该重复文件,或在菜单栏中选定写有“**仅显示重复**”选项 ,如果你选择了“**仅显示重复**”选项,则只有重复文件在窗口中可见,这样你便可以轻松选择并删除这些文件。点击“操作”下拉菜单,最后选择你将执行的操作。在这里,我只想删除重复文件,所以我选择了“移动标记文件到垃圾箱”这个选项。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Menu_010.png) +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/11/Menu_010.png) 接着,点击“继续”选项来移除重复文件。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Deletion-Options_011.png) +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/11/Deletion-Options_011.png) ### 2. dupeGuru 音乐版 ### -[dupeGuru 音乐版][2] 或 简称 dupeGuru ME ,它的功能与 dupeGuru 类似。它拥有 dupeGuru 的所有功能,但它包含更多的信息列 (如比特率,持续时间,标签等)和更多的扫描类型(如带有字段的文件名,标签以及音频内容)。同 dupeGuru 一样, dupeGuru ME 也运行在 Linux, Windows, 和 Mac OS X 中。 +[dupeGuru 音乐版][2] 或简称 dupeGuru ME,它的功能与 dupeGuru 类似。它拥有 dupeGuru 的所有功能,但它包含更多的信息列 (如比特率,持续时间,标签等)和更多的扫描类型(如带有字段的文件名,标签以及音频内容)。和 dupeGuru 一样,dupeGuru ME 也运行在 Linux、Windows 和 Mac OS X 中。 -它支持众多的格式,诸如 MP3, WMA, AAC (iTunes 格式), OGG, FLAC, 即失真率较少的 AAC 和 WMA 格式等。 +它支持众多的格式,诸如 MP3、WMA、AAC (iTunes 格式)、OGG、FLAC,以及失真率较少的 AAC 和 WMA 格式等。 #### 在 Ubuntu 14.10/14.04/13.10/13.04/12.04 中安装 dupeGuru ME #### @@ -59,19 +59,19 @@ sudo apt-get install dupeguru-me ### 使用 ### -你可以从 Unity 面板或菜单中启动它。dupeGuru ME 的使用方法,操作界面和外观与正常的 dupeGuru 类似。添加你想扫描的目录并选择你想执行的操作。重复的音乐文件就会被删除。 +你可以从 Unity 面板或菜单中启动它。dupeGuru ME 的使用方法、操作界面以及外观和正常的 dupeGuru 类似。添加你想扫描的目录并选择你想执行的操作。重复的音乐文件就会被删除。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Music-Edition-Results_012.png) +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/11/dupeGuru-Music-Edition-Results_012.png) ### 3. dupeGuru 图片版 ### -[dupeGuru 图片版][3],或简称为 duepGuru PE,是一个在你的电脑中查找重复图片的工具。它与 dupeGuru 类似,但独具匹配重复图片的功能。dupeGuru PE 可运行在 Linux, Windows, 和 Mac OS X 中。 +[dupeGuru 图片版][3],或简称为 duepGuru PE,是一个在你的电脑中查找重复图片的工具。它和 dupeGuru 类似,但独具匹配重复图片的功能。dupeGuru PE 可运行在 Linux、Windows 和 Mac OS X 中。 -dupeGuru PE 支持 JPG, PNG, TIFF, GIF 和 BMP 等图片格式。所有的这些格式可以被同时比较。Mac OS X 版的 dupeGuru PE 还支持 PSD 和 RAW (CR2 和 NEF) 格式。 +dupeGuru PE 支持 JPG、PNG、TIFF、GIF 和 BMP 等图片格式。所有的这些格式可以被同时比较。Mac OS X 版的 dupeGuru PE 还支持 PSD 和 RAW (CR2 和 NEF) 格式。 #### 在 Ubuntu 14.10/14.04/13.10/13.04/12.04 中安装 dupeGuru PE #### -由于我们已经添加了 PPA, 我们也不必为 dupeGuru PE 添加 PPA。只需运行如下命令来安装它。 +由于我们已经添加了 PPA,我们也不必为 dupeGuru PE 再次添加。只需运行如下命令来安装它。 ``` sudo apt-get install dupeguru-pe @@ -79,13 +79,13 @@ sudo apt-get install dupeguru-pe #### 使用 #### -就使用方法,操作界面和外观而言,它与 dupeGuru ,dupeGuru ME 类似。我就纳闷为什么开发者为不同的类别开发了不同的版本。我想如果开发一个结合以上三个版本功能的应用,或许会更好。 +就使用方法,操作界面和外观而言,它与 dupeGuru,dupeGuru ME 类似。我就纳闷为什么开发者为不同的类别开发了不同的版本。我想如果开发一个结合以上三个版本功能的应用,或许会更好。 -启动它,添加你想扫描的目录,并选择你想执行的操作。就这样,你的重复文件将消失。 +启动它,添加你想扫描的目录,并选择你想执行的操作。就这样,你的重复文件将被清除。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Picture-Edition-Results_014.png) +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/11/dupeGuru-Picture-Edition-Results_014.png) -如若因为任何的安全问题而不能移除某些重复文件,请记下这些文件的位置,通过终端或文件管理器来手动删除它们。 +如果因为任何的安全问题而不能移除某些重复文件,请记下这些文件的位置,通过终端或文件管理器来手动删除它们。 欢呼吧! @@ -95,7 +95,7 @@ via: http://www.unixmen.com/dupeguru-find-remove-duplicate-files-instantly-hard- 作者:[SK][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出