From 3f41b72c0b15534b0b24baf6fe0102e8cdde84b0 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 16 Apr 2015 10:09:18 +0800 Subject: [PATCH 001/154] Translating by ZTinoZ --- ...Qs with Answers--How to disable IPv6 on Linux.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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 index 2c783bf5c0..aae9b99477 100644 --- 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 @@ -1,7 +1,6 @@ -Translating by ZTinoZ -Linux FAQs with Answers--How to disable IPv6 on Linux +Linux有问必答时间--如何在Linux下禁用IPv6 ================================================================================ -> **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建立连接,但是由于我们本地网络不允许分配IPv6的流量,IPv6连接会超时,应用程序的连接会退回到IPv4,这样就会造成不必要的延迟。由于我目前对IPv6没有任何需求,所以我想在我的Linux主机上禁用IPv6。有什么比较合适的方法呢? 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. @@ -121,9 +120,9 @@ If you are using NetworkManager to manage your network settings, you can disable ![](https://farm8.staticflickr.com/7293/16394993017_21917f027b_o.png) -#### SSH server #### +#### SSH服务 #### -By default, OpenSSH server (sshd) tries to bind on both IPv4 and IPv6 addresses. +默认情况下,OpenSSH服务(sshd)会去尝试捆绑IPv4和IPv6的地址。 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. @@ -133,14 +132,14 @@ To force sshd to bind only on IPv4 address, open /etc/ssh/sshd_config with a tex AddressFamily inet -and restart sshd server. +然后重启sshd服务。 -------------------------------------------------------------------------------- via: http://ask.xmodulo.com/disable-ipv6-linux.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 379ae36a2c4156c28ff18741bcd07b1b6905c5d0 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Fri, 17 Apr 2015 11:29:24 +0800 Subject: [PATCH 002/154] translated wi-cuckoo --- ...creenshots - Download and Install Guide.md | 145 ------------------ ...creenshots - Download and Install Guide.md | 144 +++++++++++++++++ 2 files changed, 144 insertions(+), 145 deletions(-) delete mode 100644 sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md create mode 100644 translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md diff --git a/sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md b/sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md deleted file mode 100644 index 75db79f66f..0000000000 --- a/sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md +++ /dev/null @@ -1,145 +0,0 @@ -translating wi-cuckoo -Elementary OS 0.3 Freya Screenshots - Download and Install Guide -================================================================================ -Elementary OS is a light weight Ubuntu based operating system which is getting wide spread popularity. It has three versions released to date whereas fourth version is decided to be developed based on upcoming Ubuntu 16.04. - -- **Jupiter (0.1)**: It was the first stable version of Elementary OS based on Ubuntu 10.10 and released on March 2011. -- **Luna (0.2)**: Second stable version of Elementary OS based on Ubuntu 12.04 and released on November 2012. -- **Freya (0.3)**: Third stable version of Elementary OS based on Ubuntu 14.04 and released on 8th February 2015. -- **Loki (0.4)**: Fourth upcoming version of Elementary OS is planned to be based on Ubuntu 16.04 it will get updates till 2021. - -Freya is the latest version (0.3) of Elementary OS available now, initially it was given the name ISIS but it was later changed to avoid any sort of association with a terrorist group named alike. Freya has some very nice preloaded applications. - -### Salient Features ### - -Here are some but not all of the features of Elementary OS 0.3. - -- Better interactive notifications along with notification setting pane including a system-wide “Do Not Disturb” mode -- Latest version of Elementary OS provides a better emoji support & drop-in replacements for Microsoft Core fonts for the web applications -- Privacy Mode is a new firewall tool which is easy to use and helps protect the computer from harmful scripts and applications -- Unified login and lock screens -- Applications menu with and improved look and functionality including quicklist actions, drag-and-drop from search, and support for quick math calculations -- Multitasking view is redesigned to provide more app-focused utility -- Updated software stack (Linux 3.16, Gtk 3.14, and Vala 0.26) for better support and enhanced functionality of latest developed applications -- Unified extensible firmware interface (UEFI) support -- WiFi connectivity made easier through new captive portal assistant - -### Download 64 bit & 32 bit Version ### - -- [Elementary OS Freya 64 bit][1] -- [Elementary OS Freya 32 bit][2] - -### Installing Elementary OS 0.3 (Freya) ### - -Download the ISO file of Elementary OS 0.3 and flash it on a bootable USB drive or to a DVD/CD. Source is available for both 32-bit and 64-bit architectures. Once the computer is booted with the Elementary OS ISO file, there are two options available, either to try without installing or install Elementary OS on the computer, choose the second option. Elementary OS can also be installed along with an already installed operating system, turning it into a dual boot machine. - -![Install Freya](http://blog.linoxide.com/wp-content/uploads/2015/04/Install-Freya.png) - -System requirements and available resources are checked before proceeding further. Click continue if your system has enough resources. - -![Installation Requirements](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Requirements.png) - -Installation wizard then provides various installation types. Opt for the option best suits you, normally, first option is chosen by most i.e. “Erase disk and install Elementary”. With this option make sure that your data is backed up properly because the disk (partition) will be erased and all data will be lost. - -![Installation Types](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Types.png) - -A dialog box shows the list of disk partitions being formatted and used by the Elementary OS, after ensuring data integrity click continue. - -![Format Warning](http://blog.linoxide.com/wp-content/uploads/2015/04/Format-Warning.png) - -Choose your location for time zone selection and click continue. - -![Location](http://blog.linoxide.com/wp-content/uploads/2015/04/Location.png) - -Choose your language and click continue. - -![Language](http://blog.linoxide.com/wp-content/uploads/2015/04/Language.png) - -Fill in your information and choose a strong root/administrator password and click continue. - -![whoareyou](http://blog.linoxide.com/wp-content/uploads/2015/04/whoareyou.png) - -Core installation process starts once the personal information is provided, details of components being installed will be flashing on a little dialogue box along with the progress bar. - -![Installation progress](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-progress.png) - -Congratulation! Installation is complete for your latest Elementary OS 0.3 (Freya). A restart is required to update and finalize registries and configurations. - -![Installation Complet](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Complet.png) - -At start up the Elementary OS logo shows its elegance and then password protected administrator login and guest session options will appear. Guest section has pretty limited features and has no installation privileges. - -![Login](http://blog.linoxide.com/wp-content/uploads/2015/04/Login.png) - -Here is the first look of the newly installed Elementary OS 0.3. - -![first look](http://blog.linoxide.com/wp-content/uploads/2015/04/first-look.png) - -### Customizing Desktop ### - -While Elementary OS 0.3 is best known for their light weight and better looks, everybody has a unique esthetic sense and computer usage habits. Desktop reflects a personalized view of any computer user. Like other operating systems Elementary OS 0.3 also provides various options to customize our desktop through wallpapers, font sizes, themes etc. - -For basic customization, click on Applications > System Settings > Desktop - -We can change wallpapers, dock and make use of hot corners of the desktop. - -Very few wallpapers are provided by default, more can be downloaded from the internet or transferred to your own camera. - -![Desktop Wallpaper](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Wallpaper4.png) - -The real beauty of Elementary OS lies in its elegant Dock panel. With no icons allowed at desktop, a set of application icons at the dock panel enhance the look and provide a quick way to lunch frequently used applications. - -![Desktop Dock](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Dock1.png) - -Users can use the corners of the desktop for customary purposes. - -![Hot Corners](http://blog.linoxide.com/wp-content/uploads/2015/04/Hot-Corners.png) - -Advanced customization can be achieved through the installation of elementary tweaks. - -Add stable Personal Package Archive (PPA) to Advanced Package Tool (APT) repository using the following command. - - sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily - -![ppa](http://blog.linoxide.com/wp-content/uploads/2015/04/elementary-tweaks-ppa.png) - -Once the package has been added to the repository we need to update the repository using following command - - sudo apt-get update - -![update repository](http://blog.linoxide.com/wp-content/uploads/2015/04/update-repository.png) - -After updating the repository we are ready to install inkscape which is accomplished using the following command - - sudo apt-get install elementary-tweaks - -![install elementary tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/install-elementary-tweaks.png) - -We can see an addition of Tweaks option under Applications > System Settings under the Personal section. It now provides us more options to customize our desktop view. - -![tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/tweaks.png) - -For further customizations we also install gnome tweak tool for example unlocking the desktop. - - sudo apt-get install gnome-tweak-tool - -![gnome](http://blog.linoxide.com/wp-content/uploads/2015/04/gnome.png) - -### Summary ### - -Elementary OS is closely related to Ubuntu distro of Linux and its pros and cons are pretty much similar too. Elementary OS is lightweight, elegant in look and feel, rapidly maturing. It is potentially an alternative for both Windows and OS X operating systems. The latest available Elementary OS 0.3 (Freya) is getting very popular with a better feature base. For further reading, latest updates and downloads please visit the official [website][1]. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/elementary-os-0-3-freya-install-guide/ - -作者:[Aun Raza][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/arunrz/ -[1]:http://sourceforge.net/projects/elementaryos/files/stable/elementaryos-freya-amd64.20150411.iso/download -[2]:http://sourceforge.net/projects/elementaryos/files/stable/elementaryos-freya-i386.20150411.iso/download -[3]:http://elementary.io/ diff --git a/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md b/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md new file mode 100644 index 0000000000..6deb2611b9 --- /dev/null +++ b/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md @@ -0,0 +1,144 @@ +Elementart OS 0.3 Freya快照 - 下载和安装指南 +=========================================================================== +Elementary OS是一个以Ubuntu为基础的轻量级操作系统,广受欢迎。目前已经发行了上个版本,而第四个版本将会以即将到来的Ubuntu16.04为基础开发。 + +- **Jupiter (0.1)**: 第一个基于Ubuntu10.10的Elementary OS稳定发行版,在2011年三月发布。 +- **(Luna (0.2)**: 基于Ubuntu12.04的Elementary OS第二个稳定发行版,于2012年11月发布。 +- **(Freya (0.3)**: 基于Ubuntu 14.04的Elementary OS第三个稳定发行版,2015年二月8号发布。 +- **(Loki (0.4)**: 未来Elementary OS第四版,计划以Ubuntu16.04为基础,并且提供更新服务直到2021年。 + +Freya是目前最新的Elementary OS版本(0.3)。最初是被命名为ISIS,但是后来改了,是为了避免与同名的恐怖组织产生任何的联系。Freya有一些非常不错的预装应用。 + +### 突出的特性 ### + +这里列举了一些特性,但并非Elementary OS 0.3的所有特性。 + +- 根据通知设定面板提供更好的交互性消息通知,包括一个系统级别的“Do Not Disturb”模式。 +- 最新版Elementary OS为网页应用中微软核心字体提供更好的emoji表情支持和替换。 +- Privacy模式是一个新的防火墙工具,很容易使用,可以帮助保护电脑免遭恶意脚本和应用的攻击。 +- 统一了登入和锁定界面 +- 拥有应用中心菜单,提升了界面效果和功能,包括快速列表动作,从搜索中拉取,和支持快速数学计算。 +- 重新设计多任务视图,提供更多的应用专注工具。 +- 更新了软件栈(Linux 3.16, Gtk 3.14 和Vala 0.26),为了对最新开发应用更好的支持和加强功能。 +- 统一了扩展固件接口(UEFI)支持 +- 通过新的捕捉入口协助,WiFi连接变得更容易。 + +### 下载64位&32位版本 ### + +- [Elementary OS Freya 64 bit][1] +- [Elementary OS Freya 32 bit][2] + +### 安装Elementary OS 0.3 (Freya) ### + +下载Elementary OS 0.3的ISO文件,并且写入一个USB启动盘或者DVD/CD。32位和64位的结构都是可以的。当计算机从Elementary OS ISO文件启动后,有两个选项可用,或试用而不安装,或直接安装到计算机里,选择第二项。Elmentary OS也可以安装与已有操作系统并存,构成双重启动。 + +![Install Freya](http://blog.linoxide.com/wp-content/uploads/2015/04/Install-Freya.png) + +在更进一步之前会检查系统要求和资源有效性。如果你的系统有足够的资源,点击继续。 + +![Installation Requirements](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Requirements.png) + +安装向导提供许多安装形式。选取最适合你的选项,通常地,第一个选项被大多数选用 i.e. “擦除磁盘以安装Elementary”。选择这个选项,必须保证你的数据都已经被合理的备份了,因为磁盘(分区)将会被擦除,所有数据将会丢失。 + +![Installation Types](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Types.png) + +一个对话框显示了被Elementary OS使用和格式化的磁盘分区列表,确保数据完整后点击继续。 + +![Format Warning](http://blog.linoxide.com/wp-content/uploads/2015/04/Format-Warning.png) + +选择你的位置,确定时区,点击继续。 + +![Location](http://blog.linoxide.com/wp-content/uploads/2015/04/Location.png) + +选择你的语言,点击继续。 + +![Language](http://blog.linoxide.com/wp-content/uploads/2015/04/Language.png) + +填入你的信息,选择一个强度高的超级用户/管理员密码,点击继续。 + +![whoareyou](http://blog.linoxide.com/wp-content/uploads/2015/04/whoareyou.png) + +当你的信息提供后,核心安装进程就会启动,正在安装组件的详细信息会在一个小对话框里随进度条一闪而过。 + +![Installation progress](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-progress.png) + +恭喜你!最新的Elementary OS 0.3 (Freya)已经安装完成了。此时需要重启来更新和完整注册,恭喜。 + +![Installation Complet](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Complet.png) + +启动时,Elementary OS的标志显得十分优雅,然后密码保护的管理员登入和游客访问选项会出现。游客访问有相当多的限制功能,而且没有安装的特权。 + +![Login](http://blog.linoxide.com/wp-content/uploads/2015/04/Login.png) + +下图是新安装的Elementary OS 0.3的画面。 + +![first look](http://blog.linoxide.com/wp-content/uploads/2015/04/first-look.png) + +### 个性化桌面 ### + +Elementary OS 0.3以其轻巧和美观而为我们熟知,每个人有自己独特的审美观念和计算机使用习惯。桌面反映出每一个计算机使用者个性化的观点。如其他操作系统一样,Elementary OS 0.3也提供了许多选项来个性化配置桌面,包括壁纸,字体大小,主题等等。 + +基本的个性化配置,点击Applications > System Settings > Desktop + +我们可以改变壁纸,泊位和启用桌面热角。 + +默认提供了很少的壁纸,更多的可以从网上下载或者从你的相机传输。 + +![Desktop Wallpaper](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Wallpaper4.png) + +Elementary OS真正的美丽在于优雅的Dock面板。桌面上没有任何图标,一些应用图标停靠在dock面板上加强了显示效果,提供了快速访问常用应用的捷径。 + +![Desktop Dock](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Dock1.png) + +用户可以使用桌面的四个角定制要显示什么。 + +![Hot Corners](http://blog.linoxide.com/wp-content/uploads/2015/04/Hot-Corners.png) + +通过elementary tweaks工具的安装,可以达到更高级的个性化定制。 + +使用如下命令,添加稳定的个人软件包档案(PPA)到高级软件包管理工具(APT)仓库。 + + sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily + +![ppa](http://blog.linoxide.com/wp-content/uploads/2015/04/elementary-tweaks-ppa.png) + +一旦软件包添加到仓库后,我们需要用以下命令更新仓库 + + sudo apt-get update + +![update repository](http://blog.linoxide.com/wp-content/uploads/2015/04/update-repository.png) + +更新仓库后,我们就可以安装inkscape(不知是什么),用以下命令完成 + + sudo apt-get install elementary-tweaks + +![install elementary tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/install-elementary-tweaks.png) + +我们可以在个人区域的Application > System Settings下看到Tweaks选项的一个添加项。目前它提供给我们更多的选项,个性化定制我们的桌面。 + +![tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/tweaks.png) + +为了进一步定制,我们也安装了gnome桌面系统的tweak工具,演示解锁桌面。 + + sudo apt-get install gnome-tweak-tool + +![gnome](http://blog.linoxide.com/wp-content/uploads/2015/04/gnome.png) + +### 总结 ### + +Elementary OS十分接近Linux的发行版Ubuntu,它的正反两方面也都十分相似。Elementary OS在外观和体验上都十分轻巧和优雅,并且正在快速地走向成熟。它有潜力成为Windows和OS X操作系统之外的第三选择。最新的Elementary OS 0.3 (Freya)正凭借更好功能基础,在迅速的流行。想了解更多信息,最近的更新和下载,请访问官方[网站][1]。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/elementary-os-0-3-freya-install-guide/ + +作者:[Aun Raza][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ +[1]:http://sourceforge.net/projects/elementaryos/files/stable/elementaryos-freya-amd64.20150411.iso/download +[2]:http://sourceforge.net/projects/elementaryos/files/stable/elementaryos-freya-i386.20150411.iso/download +[3]:http://elementary.io/ From 7874268d0720e7e223b545638a4ae25a7af70ecc Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Fri, 17 Apr 2015 11:31:17 +0800 Subject: [PATCH 003/154] translated wi-cucoo llap --- ...ary OS 0.3 Freya Screenshots - Download and Install Guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md b/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md index 6deb2611b9..23db1ace55 100644 --- a/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md +++ b/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md @@ -80,7 +80,7 @@ Elementary OS 0.3以其轻巧和美观而为我们熟知,每个人有自己独 基本的个性化配置,点击Applications > System Settings > Desktop -我们可以改变壁纸,泊位和启用桌面热角。 +我们可以改变壁纸,泊板和启用桌面热角。 默认提供了很少的壁纸,更多的可以从网上下载或者从你的相机传输。 From c7ccfa88a2be49523d352486cbd723f3cd6ff237 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Fri, 17 Apr 2015 14:03:23 +0800 Subject: [PATCH 004/154] Delete 20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md --- ...ys Relaxing Sounds to Keep You Creative.md | 56 ------------------- 1 file changed, 56 deletions(-) delete mode 100644 sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md diff --git a/sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md b/sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md deleted file mode 100644 index f5ff129249..0000000000 --- a/sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md +++ /dev/null @@ -1,56 +0,0 @@ -Translating by H-mudcup -Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative -================================================================================ -![Rain is a soothing sound for some](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/raining-1600x900-wallpaper_www.wallpapermay.com_84-1.jpg) -Rain is a soothing sound for some - -**If I plan on being productive I can’t listen to ‘regular’ music. It distracts me. I start singing along or get reminded of a different track, so end up poking around my library and… Well, that’s that.** - -But by the same token I can’t work in silence (living with 6 cats means that’s not a possibility, though) but the inconsistency jars and sudden clatters and meows interrupt. - -My solution that is to **listen to ambient noise**. - -I find it helps nullify the misdirection my brain craves, land provide a soundscape that wraps the noise of kitty play time. - -Ambient noise is the noise that play out in the background of daily lives; the rain drumming on a window, the intelligible hum of coffee shop chatter, the gossiping of birds on the wind, and so on. - -Listening to these sounds can force a racing mind to slow down, rebase and refocus on what matters. - -### Ambient Noise App for Ubuntu ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/ambient-noise-player-750x365.jpg) - -Google Play and Apple app stores are packed full of ambient and white noise apps. Now a similar tool is available natively on Ubuntu. - -‘[Ambient Noise][1]‘ — as the name might suggest — is an audio player designed specifically for playing these sounds. It even integrates with the Ubuntu Sound Menu for a neat ‘pick, click and relax’ experience. - -The app, which is also known as ‘ANoise Player’ and is made by Marcos Costales, comes with a set of **8 high-quality sounds**. - -These 8 presets cover various ambient atmospheres, ranging from the rhythmic sound of rain, to the tranquil tones of nature at night, and back to the buzz of a bustling coffee shop in the afternoon. - -### Install ANoise Player in Ubuntu ### - -Ambient Noise player for Ubuntu is a free application and is available to install from its own dedicated PPA. - -To do this open a new Terminal window and run: - - sudo add-apt-repository ppa:costales/anoise - - sudo apt-get update && sudo apt-get install anoise - -Once installed simply open it from the Unity Dash (or your DE’s equivalent), pick your preferred noise using Sound Menu and then …relax! The app even remembers which sound you used last. - -Even so, give it a try out and see if it suits your needs. I would say let me know what you think, but I will be too focused to hear — and so might you! - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/04/ambient-noise-player-app-for-ubuntu-linux - -作者:[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://anoise.tuxfamily.org/ From dcc9a383640e89f997059b4b963ae1d7bfd7c5d5 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Fri, 17 Apr 2015 14:04:37 +0800 Subject: [PATCH 005/154] Create 20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md --- ...ys Relaxing Sounds to Keep You Creative.md | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 translated/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md diff --git a/translated/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md b/translated/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md new file mode 100644 index 0000000000..f468b24754 --- /dev/null +++ b/translated/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md @@ -0,0 +1,57 @@ +Translated by H-mudcup + +适用于Ubuntu的环境音播放器播放让人放松的声音保持你的创造力 +================================================================================ +![Rain is a soothing sound for some](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/raining-1600x900-wallpaper_www.wallpapermay.com_84-1.jpg) +对于某些人来说雨声是个令人安心的声音 + +**如果我想变得非常有效率,我不能听‘正常’的音乐。它会使我分心,我会开始跟着唱或者让我想起另一首歌,结局就是我在自己的音乐库里到处戳并且……反正,你懂的。** + +同样我也不能在寂静的环境中工作(虽然和6只猫生活在一起意味着这不太可能)但是无规律的刺耳声音和突然地咔哒声以及猫叫声会打破寂静。 + +我的解决办法是听**环境音**。 + +我发现它能帮助我消除大脑的里的胡思乱想,提供了一个声景覆盖了猫咪玩耍的声音。 + +环境音就是日常生活中的背景噪音;雨滴在窗户上敲打的声音,咖啡店里人们聊天的嗡嗡声,风中鸟儿们闲聊的声音,等等。 + +倾听这些声音会强迫一个疯狂运行的大脑减速,重新沉静下来重新把精力聚集到重要的事情上。 + +### 适用于Ubuntu的环境音应用 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/ambient-noise-player-750x365.jpg) + +Google Play和苹果应用商店充满了环境音和白噪声的应用。现在,在Ubuntu里有同样的应用了。 + +‘[Ambient Noise][1]‘ ‘[环境音][1]’——人如其名——是一个专门被设计成播放这种声音的音频播放器。他甚至可以同Ubuntu声音菜单整合到一起,给你‘选择,点击即放松’的体验。 + +这个应用(又被称为‘ANoise播放器’,由Marcos Costales制作)带有**8个高品质声道**。 + +这8个预设声道涵盖了多种环境,从下雨时有节奏的声音,到夜晚大自然静谧的旋律,还有下午熙熙攘攘的咖啡店的嗡嗡声。 + +### 在Ubuntu上安装ANoise播放器 ### + +适用于Ubuntu的环境音播放器是个免费的应用而且可以从它专用的PPA里安装。 + +要这样安装请先打开一个新的终端窗口运行: + + sudo add-apt-repository ppa:costales/anoise + + sudo apt-get update && sudo apt-get install anoise + +安装好以后只需从Unity Dash(或DE里等价的地方)里打开它,通过声音菜单选择你喜欢的环境音然后……放松吧!这个应用甚至记得你上次用的环境音。 + +Even so, give it a try out and see if it suits your needs. I would say let me know what you think, but I will be too focused to hear — and so might you!即便如此,你还是要试一试看它是否能满足你的需要。我要说的是让我直到你是怎么想的,但是我将会专心致志到听不到你的声音——你可能也会这样! + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/ambient-noise-player-app-for-ubuntu-linux + +作者:[Joey-Elijah Sneddon][a] +译者:[H-mudcup](https://github.com/H-mudcup) +校对:[校对者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://anoise.tuxfamily.org/ From e1aef6af71ae181e73e09acdcf0c8fa39d9a66b1 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 17 Apr 2015 18:01:30 +0800 Subject: [PATCH 006/154] Translating by ZTinoZ --- ...225 Linux FAQs with Answers--How to disable IPv6 on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index aae9b99477..99e7d0b6bc 100644 --- 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 @@ -2,7 +2,7 @@ Linux有问必答时间--如何在Linux下禁用IPv6 ================================================================================ > **问题**:我发现我的一个应用程序在尝试通过IPv6建立连接,但是由于我们本地网络不允许分配IPv6的流量,IPv6连接会超时,应用程序的连接会退回到IPv4,这样就会造成不必要的延迟。由于我目前对IPv6没有任何需求,所以我想在我的Linux主机上禁用IPv6。有什么比较合适的方法呢? -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. +IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品,它为了解决现有IPv4地址空间即将耗尽的问题。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. From b46603288476c95a5c35fbefb5ab746a5c85bd46 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Fri, 17 Apr 2015 18:04:40 +0800 Subject: [PATCH 007/154] translating wi-cuckoo --- ...ol can alert you about evil twin access points in the area.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/share/20150410 This tool can alert you about evil twin access points in the area.md b/sources/share/20150410 This tool can alert you about evil twin access points in the area.md index f2a2165191..b698c5df3b 100644 --- a/sources/share/20150410 This tool can alert you about evil twin access points in the area.md +++ b/sources/share/20150410 This tool can alert you about evil twin access points in the area.md @@ -1,3 +1,4 @@ +translating wi-cuckoo This tool can alert you about evil twin access points in the area ================================================================================ **EvilAP_Defender can even attack rogue Wi-Fi access points for you, the developer says** From a62a8ab81584a607b7e4745740c19acb21681990 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Fri, 17 Apr 2015 19:26:29 +0800 Subject: [PATCH 008/154] =?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 --- ...kills in Demand That Will Get You Hired.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md b/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md index 89afa0f6f4..286572f959 100644 --- a/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md +++ b/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md @@ -1,40 +1,40 @@ -10 个正需的IT技能,会帮你职场成功 +10个所需的IT技能,助你职场成功 =========================================================================== -接我们上次的文章[[十大有需的操作系统][1]],这篇文章得到了Tecmint社区很高的评价,在本篇中,我们将指点顶尖的IT技能,这会帮助你找到你理想的工作。 +接我们上次的文章[[十大所需的操作系统][1]],这篇文章得到了Tecmint社区很高的评价,在本篇中,我们将指点顶尖的IT技能,这会帮助你找到理想的工作。 -如第一篇文章提到的那样,这些资料和统计结果是会伴随市场和需求的变化而变化的。我们将会尽可能地更新列表,无论何时只要有任何主要的变化。所有的统计数据基于最近的,全球一些IT公司的招聘信息和需求。 +如第一篇文章提到的那样,这些资料和统计结果是会伴随市场和需求的变化而变化的。只要有任何主要的变化,我们会尽可能地更新列表。所有的统计数据基于最近的,全球一些IT公司的招聘信息和需求。 ### 1. VMware ### -VMware公司设计的虚拟化和云计算软件高居榜首。VMware首次宣布商业支持x86架构的虚拟化。VMware的需求在上个季度已经增长自16%。 +VMware公司设计的虚拟化和云计算软件高居榜首。VMware首次宣布商业支持x86架构的虚拟化。VMware的需求在上个季度已经增长至16%。 最新稳定发行版: 11.0 ### 2. MySQL ### -这款开源的关系型数据库管理系统屈尊第二。直到2013年,MySQL都还是第二大使用广泛的RDBMS(注:Relational Database Management System)。上季度MySQL的需求已经达到了11%。继甲骨文公司之后,著名的MarialDB也已经被分出MySQL了。去掌握它。 +这款开源的关系型数据库管理系统憾居第二。直到2013年,MySQL都还是第二大使用广泛的RDBMS(注:Relational Database Management System)。上季度MySQL的需求已经达到了11%。继甲骨文公司之后,著名的MarialDB也已经被分出MySQL了,值得去拥有。 最新稳定发行版: 5.6.23 ### 3. Apache ### -这个跨平台的开源网页(HTTP)服务器占据了第三的位置。Apache的需求已经超过了13%截至上个季度。 +这个跨平台的开源网页(HTTP)服务器位居第三。截至上个季度,Apache的需求已经超过了13%。 最新稳定发行版: 2.4.12 ### 4. AWS ### -亚马逊网页服务器是亚马逊网站提供的所有远程计算服务的集合。AWS排在第四。上个季度,AWS的需求已经表现出将近14%的增长。 +亚马逊网页服务器是亚马逊网站提供的所有远程计算服务的集合,AWS排在第四位。上个季度,AWS的需求已经呈现出将近14%的增长。 ### 5. Puppet ### -Puppet作为配置管理系统被应用在设置IT基础架构,列在第五。它用Ruby语言编写,属于客户端-服务器型的结构。上个季度puppet的需求已经增长超过9% +Puppet作为配置管理系统被应用在设置IT基础架构,它排在第五位。它用Ruby语言编写,属于客户端-服务器型的结构。上个季度puppet的需求已经增长超过9%。 最新稳定发行版: 3.7.3 ### 6. Hadoop ### -Hadoop是用Java写的一款开源软件框架,用于处理大数据。列表中Hadoop位列第六。对Hadoop的需求在上个季度已经下降了0.2个百分点。 +Hadoop是用Java编写的一款开源软件框架,用于处理大数据。列表中Hadoop位列第六。对Hadoop的需求在上个季度已经下降了0.2个百分点。 最新稳定发行版: 2.6.0 @@ -46,7 +46,7 @@ Linux Torvalds最初编写的著名版本控制系统Git排在了第七。Git的 ### 8. Oracle PL/SQL ### -Oracle公司开发的SQL扩展版,占据第八的位置。PL/SQL从Oracle 7后就包含在Oracle数据库中。它在上个季度已经出现将近8%的衰退。 +Oracle公司开发的SQL扩展版,占据第八的位置。PL/SQL从Oracle 7后就包含在Oracle数据库中。它在上个季度已经呈现将近8%的衰退。 ### 9. Tomcat ### @@ -122,7 +122,7 @@ Oracle公司开发的SQL扩展版,占据第八的位置。PL/SQL从Oracle 7后 -就这么多了。我会积极跟进这个系列的下个部分。保持发声,保持联系,保持评论。不要忘了给我们提供你的反馈。喜欢和分享我们,帮助我们传播开去。 +这篇文章就到这里,我会积极跟进这个系列的下一部分。敬请期待,保持联系,积极评论。不要忘了给我们提供你的反馈。喜欢的话就分享吧,让更多人认识我们。 --------------------------------------------------------------------------- @@ -130,7 +130,7 @@ via: http://www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/ 作者:[Avishek Kumar][a] 译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ec7ecd6603a21ce60d6b589e21f6f847e6a2af71 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 17 Apr 2015 20:03:52 +0800 Subject: [PATCH 009/154] [Translated] tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples --- ...ox from Bash Shell Script with Examples.md | 175 ------------------ ...ox from Bash Shell Script with Examples.md | 174 +++++++++++++++++ 2 files changed, 174 insertions(+), 175 deletions(-) delete mode 100644 sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md create mode 100644 translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md diff --git a/sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md b/sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md deleted file mode 100644 index a870c0f6a8..0000000000 --- a/sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md +++ /dev/null @@ -1,175 +0,0 @@ -Translating by ictlyh -How to Show Dialog Box from Bash Shell Script with Examples -================================================================================ -This tutorial will give couple of examples on how to use utilities like zenity and whiptail in your Bash shell script to provide message / dialog box . With these utilities your script will be able to inform user about the current state of execution, or give an ability to interact. Difference between these two utilities is the way they are displaying message box or dialog. Zenity uses GTK toolkit for creating graphical user interfaces, while whiptail creates message boxes inside terminal window. - -### Zenity Tool ### - -To install zenity on Ubuntu run: - - sudo apt-get install zenity - -Since commands for creating message boxes or dialogs with zenity are pretty self explanatory, we will provide you with couple of examples. - -### Creating information box ### - -zenity --info --title "Information Box" --text "This should be information" --width=300 --height=200 - -![Screenshot-Information Box](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Information-Box.png) - -Creating Yes/No dialog - - zenity --question --text "Do you want this?" --ok-label "Yeah" --cancel-label="Nope" - -![Screenshot-Question](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Question.png) - -Creating entry box and storing value in variable - - a=$(zenity --entry --title "Entry box" --text "Please enter the value" --width=300 --height=200) - echo $a - -![Screenshot-Entry box](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Entry-box.png) - -After entering it, value will be stored in $a variable. - -Here is the working example which takes user's first name, last name and age and displays it. - - #!/bin/bash - # - # This script will ask for couple of parameters - # and then continue to work depending on entered values - # - - # Giving the option to user - zenity --question --text "Do you want to continue?" - - # Checking if user wants to proceed - [ $? -eq 0 ] || exit 1 - - # Letting user input some values - FIRSTNAME=$(zenity --entry --title "Entry box" --text "Please, enter your first name." --width=300 --height=150) - LASTNAME=$(zenity --entry --title "Entry box" --text "Please, enter your last name." --width=300 --height=150) - AGE=$(zenity --entry --title "Entry box" --text "Please, enter your age." --width=300 --height=150) - - # Displaying entered values in information box - zenity --info --title "Information" --text "You are ${FIRSTNAME} ${LASTNAME} and you are ${AGE}(s) old." --width=300 --height=100 - -Here are the screenshots of previous script. - -![Example1-Question-1](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Question-1.png) - -First box - -![Example1-Entry box-1](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-1.png) - -Entry box - -![Example1-Entry box-2](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-2.png) - -Entry box - -![Example1-Entry box-3](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-3.png) - -Entry box - -![Example1-Information](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Information.png) - -Information box - -Don't forget refer some of the useful [zenity options][1] that might help you. - -### Whiptail Tool ### - -To install whiptail on Ubuntu run - - sudo apt-get install whiptail - -Commands for creating message box/dialog with whiptail are also self explanatory, so we will provide you with just couple of basic examples. - -### Creating message box ### - - whiptail --msgbox "This is a message" 10 40 - -![Screenshot-whiptail-msgbox](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-msgbox.png) - -### Creating Yes/No dialog ### - - whiptail --yes-button "Yeah" --no-button "Nope" --title "Choose the answer" --yesno "Will you choose yes?" 10 30 - -![Screenshot-whiptail-yesno](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-yesno.png) - -### Creating entry box with default value ### - - whiptail --inputbox "Enter your number please." 10 30 "10" - -![Screenshot-whiptail-entry](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-entry.png) - -One thing to be aware of when trying to use entered value is that whiptail uses stdout for displaying dialog, and stderr for value output. That way, if you use var=$(...) you wont see dialog box at all, and wont get the entered value. Solution is to switch stdout and stderr. To do that just add **3>&1 1>&2 2>&3** at the end of the whiptail command. Same would be with any whiptail command which you want to use to get some entered value. - -### Creating menu dialog ### - - whiptail --menu "This is a menu. Choose an option:" 20 50 10 1 "first" 2 "second" 3 "third" - -![Screenshot-whiptail-menu](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-menu.png) - -Here is a **shell script** that asks user to enter a path to a folder and then outputs it's size. - - #!/bin/bash - # - # - - # Since whiptail has to use stdout to display dialog, entered value will - # be stored in stderr. To switch them and get the value to stdout you must - # use 3>&1 1>&2 2>&3 - FOLDER_PATH=$(whiptail --title "Get the size of folder" \ - --inputbox "Enter folder path:" \ - 10 30 \ - "/home" \ - 3>&1 1>&2 2>&3) - - if [ -d $FOLDER_PATH ] - then - size=$(du -hs "$FOLDER_PATH" | awk '{print $1}') - whiptail --title "Information" \ - --msgbox "Size of ${FOLDER_PATH} is ${size}" \ - 10 40 - elif [ -f $FOLDER_PATH ] - then - whiptail --title "Warning!!!" \ - --msgbox "The path you entered is a path to a file not a folder!" \ - 10 40 - else - whiptail --title "Error!!!" - --msgbox "Path you entered is not recognized. Please try again" \ - 10 40 - fi - -Here are the screenshots from previous example: - -![Example2-Entry-box](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Entry-box.png) - -Entry box - -![Example2-Information](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Information.png\) - -Information box - -If you are working in terminal , [manual pages][2] are always available. - -### Conclusion ### - -Choosing the right tool for displaying dialogs will depend on whether you expect your script to be run on desktop machine or server machine. Desktop machine users mostly use window environment and will possibly be able to run the script and interact with appearing windows. However, if you are expecting that the user is someone on server machine, you might want to play it safe and use whiptail or any other utility that will display dialogs in plain terminal window. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-shell-script/bash-shell-script-show-dialog-box/ - -作者:[Ilija Lazarevic][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/ilijala/ -[1]:https://help.gnome.org/users/zenity/stable/ -[2]:http://linux.die.net/man/1/whiptail \ No newline at end of file diff --git a/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md b/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md new file mode 100644 index 0000000000..4aa05d2134 --- /dev/null +++ b/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md @@ -0,0 +1,174 @@ +如何在Bash Shell脚本中显示对话框以及事例 +================================================================================ +这个教程给出几个如何使用类似zenity和whiptail的工具在Bash Shell 脚本中提供消息/对话框的例子。使用这些工具,你的脚本能够告知用户当前程序运行的状态以及有与其交互的能力。这两个工具的不同之处在于显示消息框或者对话框的方式。Zenity用GTK工具包创建图形用户界面,而whiptail在终端内部创建消息框。 + +### Zenity 工具 ### + +在Ubuntu中安装zenity,运行: + + sudo apt-get install zenity + +由于用zenity创建消息框或者对话框的命令是相当自解释的,我们会给你提供一些例子。 + +### 创建消息框 ### + +zenity --info --title "Information Box" --text "This should be information" --width=300 --height=200 + +![消息框截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Information-Box.png) + +创建 Yes/No 对话框 + + zenity --question --text "Do you want this?" --ok-label "Yeah" --cancel-label="Nope" + +![问题截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Question.png) + +创建输入框并在变量中保存值 + + a=$(zenity --entry --title "Entry box" --text "Please enter the value" --width=300 --height=200) + echo $a + +![输入框截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Entry-box.png) + +输入后,值会保存在变量 $a 中。 + +这是一个获取用户姓名并显示的实际事例。 + + #!/bin/bash + # + # This script will ask for couple of parameters + # and then continue to work depending on entered values + # + + # Giving the option to user + zenity --question --text "Do you want to continue?" + + # Checking if user wants to proceed + [ $? -eq 0 ] || exit 1 + + # Letting user input some values + FIRSTNAME=$(zenity --entry --title "Entry box" --text "Please, enter your first name." --width=300 --height=150) + LASTNAME=$(zenity --entry --title "Entry box" --text "Please, enter your last name." --width=300 --height=150) + AGE=$(zenity --entry --title "Entry box" --text "Please, enter your age." --width=300 --height=150) + + # Displaying entered values in information box + zenity --info --title "Information" --text "You are ${FIRSTNAME} ${LASTNAME} and you are ${AGE}(s) old." --width=300 --height=100 + +这些是运行前面脚本的截图。 + +![例1-问题-1](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Question-1.png) + +框1 + +![例1-输入框-1](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-1.png) + +输入框 + +![例1-输入框-2](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-2.png) + +输入框 + +![例1-输入框-3](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-3.png) + +输入框 + +![例1-信息](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Information.png) + +信息框 + +别忘了查看也许能帮助到你的有用的[zenity 选项][1] + +### Whiptail 工具 ### + +在Ubuntu上安装whiptail,运行 + + sudo apt-get install whiptail + +用whiptail创建消息框或者对话框的命令也是相当自解释的,我们会给你提供一些基本例子。 + +### 创建消息框 ### + + whiptail --msgbox "This is a message" 10 40 + +![whiptail消息框截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-msgbox.png) + +### 创建 Yes/No 对话框 ### + + whiptail --yes-button "Yeah" --no-button "Nope" --title "Choose the answer" --yesno "Will you choose yes?" 10 30 + +![whiptail对话框截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-yesno.png) + +### 创建有缺省值的输入框 ### + + whiptail --inputbox "Enter your number please." 10 30 "10" + +![whiptail输入框截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-entry.png) + +尝试使用输入值要注意的一点是whiptail用stdout显示对话框,用stderr输出值。那样的话,如果你用 var=$(...),你不会看到对话框,也不能获得输入的值。解决方法是选择stdout和stderr。在whiptail命令后面添加 **3>&1 1>&2 2>&3** 就可以做到。你想获取输入值的任何whiptail命令也是如此。 + +### 创建菜单对话框 ### + + whiptail --menu "This is a menu. Choose an option:" 20 50 10 1 "first" 2 "second" 3 "third" + +![whiptail菜单截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-menu.png) + +这是一个请求用户输入一个文件夹的路径并输出它的大小的 **shell 脚本**。 + + #!/bin/bash + # + # + + # Since whiptail has to use stdout to display dialog, entered value will + # be stored in stderr. To switch them and get the value to stdout you must + # use 3>&1 1>&2 2>&3 + FOLDER_PATH=$(whiptail --title "Get the size of folder" \ + --inputbox "Enter folder path:" \ + 10 30 \ + "/home" \ + 3>&1 1>&2 2>&3) + + if [ -d $FOLDER_PATH ] + then + size=$(du -hs "$FOLDER_PATH" | awk '{print $1}') + whiptail --title "Information" \ + --msgbox "Size of ${FOLDER_PATH} is ${size}" \ + 10 40 + elif [ -f $FOLDER_PATH ] + then + whiptail --title "Warning!!!" \ + --msgbox "The path you entered is a path to a file not a folder!" \ + 10 40 + else + whiptail --title "Error!!!" + --msgbox "Path you entered is not recognized. Please try again" \ + 10 40 + fi + +这是之前例子的一些截图: + +![例2-输入框](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Entry-box.png) + +输入框 + +![例2-消息框](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Information.png\) + +消息框 + +如果你在终端下工作,[帮助手册][2]总是有用的。 + +### 结论 ### + +选择合适的工具显示对话框取决于你期望在桌面机器还是服务器上运行你的脚本。桌面机器用户通常使用窗口环境,更可能用显示的窗口运行脚本和交互。然而,如果你期望用户是在服务器上工作的,你也许会希望安全地显示,并使用whiptail或者任何其它在纯终端窗口显示对话框的工具。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-shell-script/bash-shell-script-show-dialog-box/ + +作者:[Ilija Lazarevic][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/ilijala/ +[1]:https://help.gnome.org/users/zenity/stable/ +[2]:http://linux.die.net/man/1/whiptail \ No newline at end of file From d7820347d726566c5dcbf80d213d54cf6d560971 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 17 Apr 2015 20:09:47 +0800 Subject: [PATCH 010/154] [Translated] tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples --- ...to Show Dialog Box from Bash Shell Script with Examples.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md b/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md index 4aa05d2134..e115f85772 100644 --- a/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md +++ b/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md @@ -103,7 +103,7 @@ zenity --info --title "Information Box" --text "This should be information" --wi ![whiptail输入框截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-entry.png) -尝试使用输入值要注意的一点是whiptail用stdout显示对话框,用stderr输出值。那样的话,如果你用 var=$(...),你不会看到对话框,也不能获得输入的值。解决方法是选择stdout和stderr。在whiptail命令后面添加 **3>&1 1>&2 2>&3** 就可以做到。你想获取输入值的任何whiptail命令也是如此。 +尝试使用输入值要注意的一点是whiptail用stdout显示对话框,用stderr输出值。那样的话,如果你用 var=$(...),你不会看到对话框,也不能获得输入的值。解决方法是交换stdout和stderr。在whiptail命令后面添加 **3>&1 1>&2 2>&3** 就可以做到。你想获取输入值的任何whiptail命令也是如此。 ### 创建菜单对话框 ### @@ -149,7 +149,7 @@ zenity --info --title "Information Box" --text "This should be information" --wi 输入框 -![例2-消息框](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Information.png\) +![例2-消息框](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Information.png) 消息框 From 1bbc89530694cb8aeb119106d10e5426528334d6 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 17 Apr 2015 20:23:25 +0800 Subject: [PATCH 011/154] =?UTF-8?q?[Translating]=E4=BB=8ELove-xuan?= =?UTF-8?q?=E6=8E=A5=E6=89=8B=E7=BF=BB=E8=AF=91share/20140804=20Group=20Te?= =?UTF-8?q?st--Linux=20Text=20Editors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/share/20140804 Group Test--Linux Text Editors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/share/20140804 Group Test--Linux Text Editors.md b/sources/share/20140804 Group Test--Linux Text Editors.md index 02c1b2b586..40ef1e6f51 100644 --- a/sources/share/20140804 Group Test--Linux Text Editors.md +++ b/sources/share/20140804 Group Test--Linux Text Editors.md @@ -1,4 +1,4 @@ -Love-xuan Translating +Translating by ictlyh Group Test: Linux Text Editors ================================================================================ > Mayank Sharma tests five supercharged text editors that can crunch more than just words. From f3919cc3385f86c27c045f5e4a476d61eeaec92a Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 17 Apr 2015 22:26:42 +0800 Subject: [PATCH 012/154] [Translating 1/3] share/20140804 Group Test--Linux Text Editors --- ...20140804 Group Test--Linux Text Editors.md | 318 ++++++++++++++++++ 1 file changed, 318 insertions(+) create mode 100644 translated/share/20140804 Group Test--Linux Text Editors.md diff --git a/translated/share/20140804 Group Test--Linux Text Editors.md b/translated/share/20140804 Group Test--Linux Text Editors.md new file mode 100644 index 0000000000..aae721a30f --- /dev/null +++ b/translated/share/20140804 Group Test--Linux Text Editors.md @@ -0,0 +1,318 @@ +组测试: Linux 文本编辑器 +================================================================================ +> Mayank Sharma 测试了5款不仅仅是能处理字的超级文本编辑器。 + +如果你使用Linux已经有很长一段时间,你知道,不管是编辑一款app的配置文件,一起用shell脚本骇客,或者编写/查看代码,类似LobreOffice的工具并不能满足。尽管字面上看起来意思一样,你不需要一个字处理器来完成这些任务;你需要一个文本编辑器。 + +在这个组测试中,我们将着眼于5款不仅仅是能胜任繁重文本任务的简陋的文本编辑器。他们能高亮语法,像拼写检查一样轻松处理代码缩进。你可以像你复制/粘贴文本那样容易地使用他们记录宏以及管理代码片段。 + +得益于能向它们注入足以抗衡其它类型的以文本为中心的应用程序能力的插件,一些简单的文本编辑器甚至超过了它们的设计目标。它们能胜任一个源代码编辑器的任务,甚至是一个集成开发环境。 + +Emacs和Vim是两款最流行和强大的纯文本编辑器。但是,由于一些原因,我们在这个组测试中并没有包括它们。首先,如果你使用它们中的任何一个,那么恭喜你:你不需要更换了。其次,它们都有陡峭的学习曲线,尤其是对于那些对有面向图形用户界面的桌面系统的替代能力更有兴趣的用户。 + +### 目录: ### + +#### Gedit #### + +- URL:http://projects.gnome.org/gedit/ +- 版本: 3.10 +- 许可证: GPL +- Gnome的默认文本编辑器准备好挑战了? + +#### Kate #### + +- URL: www.kate-editor.org +- 版本: 3.11 +- 许可证: LGPL/GPL +- Kate会挑战命运吗? + +#### Sublime Text #### + +- URL: www.sublimetext.com +- 版本: 2.0.2 +- 许可证: Proprietary +- 在自由与黄金心脏土地上的私有软件。 + +#### UltraEdit #### + +- URL: www.ultraedit.com +- 版本: 4.1.0.4 +- 许可证: Proprietary +- 它做的足够多去证明它的价值了吗? + +#### jEdit #### + +- URL: www.jedit.org +- 版本: 5.1.0 +- 许可证: GPL +- 基于Java的编辑器是否会扰乱其他编辑器的世界? + +![在展示一个有功能的应用程序和将它们所有的东西曝光给用户之间有一个很好的平衡。Geddit隐藏了它的大部分功能。](http://www.linuxvoice.com/wp-content/uploads/2014/07/gedit-web.png) +在展示一个有功能的应用程序和将它们所有的东西曝光给用户之间有一个很好的平衡。Geddit隐藏了它的大部分功能。 + +### 关键标准 ### + +除了Gedit和jEdit以外的所有工具,都是通过推荐的安装方法安装在Fedora和Ubuntu上。前者已经兼容默认的Gnome桌面,后者仍然固执地反对安装在Fedora上。由于这些是相对简单的应用程序,他们没有复杂的依赖,唯一例外的是jEdit,它要求要有Oracle Java。 + +得益于Gnome和KDE持续的努力,不论他们运行的桌面环境,所有编辑器看起来很好,功能也很正常。这不仅是作为环境评价的标准,也意味着你不再受制于要找到和你的桌面环境兼容的工具。 + +除了它们老派的功能,我们也对所有候选者测试了通用文本编辑功能。然而,它们并没有被设计为模仿现代字处理器的所有功能,我们也不以此评判。 + +![Kate能搭建为功能丰富的集成开发环境](http://www.linuxvoice.com/wp-content/uploads/2014/08/kate-web.png) + +Kate能搭建为功能丰富的集成开发环境。 + +### 编程语言支持 ### + +UltraEdit 能进行语法高亮,代码折叠以及拥有项目管理的能力。这也有一个罗列源文件中所有功能的功能列表,但并不适用于我们任何的测试代码文件。UltraEdit也支持HTML5,有能添加常用HTML标记的HTML工具栏。 + +即使Gnome的默认文本编辑器Gedit,也有几个面向编码的功能特性,例如括号匹配,自动缩进以及为包括C, C++, Java, HTML, XML, Python, Perl, 以及许多其它编程语言进行语法高亮。 + +如果你需要更多的编程辅助,看一下Sublime和Kate。Sublime支持多种编程语言并且(正如流行的那些)能为C#, D, Dylan, Erlang, Groovy, Haskell, Lisp, Lua, MATLAB, OCaml, R, 甚至 SQL 进行语法高亮。如果这还不够,你可以下载插件以支持更多的语言。 + +另外,它的语法高亮功能提供了多个可定制选项。这个应用程序也会进行括号匹配,确保代码段都正确,Sublime的自动补全功能也支持用户创建的变量。 + +正如Komodo IDE,Sublime也可滚动浏览显示完整的代码,这对于长代码文件导航和在文件中的不同部分跳转很方便。 + +Sublime最好的功能之一就是能在编辑器内部为特定语言,例如C++, Python, Ruby等运行代码,当然假设在你的电脑上安装有编译器以及其它系统工具。 + +你也可以用插件在Kate中开启构建系统功能。另外,你可以为GDB调试器添加一个简单的前端。Kate能和Git,Subversion以及Mercurial版本控制系统一起工作,也提供了一些项目管理的功能。 + +除了能为超过180中语言进行语法高亮,它支持所有的这些辅助功能,例如括号匹配,自动补全和自动缩进。它也支持代码折叠,甚至在一个程序中包括有错误的函数。 + +jEdit是唯一的遗憾,它声称自己是一个程序员的文本编辑器,但它缺少其他的基本功能,例如代码折叠,它甚至不支持补全功能。 + +**Verdict:** + +- Gedit:3/5 +- Kate:5/5 +- Sublime:5/5 +- UltraEdit3/5 +- jEdit:1/5 + +![如果你不喜欢Sublime的Charcoal外观,你可以选择它包含的其它22中主题。](http://www.linuxvoice.com/wp-content/uploads/2014/08/sublime-web.png) + +如果你不喜欢Sublime的Charcoal外观,你可以选择它包含的其它22中主题。 + +### 键盘控制 ### + +高级文本编辑器用户希望能完全通过键盘控制和操作,一些应用程序甚至运行他们的用户自定义快捷方式的键盘绑定。 + +你可以轻松的使用Gedit的扩展键盘快捷键。这里有编辑文件,为普通任务,例如对一个文档进行拼写检查,唤起工具的快捷键。你可以获取应用程序内部的一系列默认快捷键,但并没有图形化的方式去自定义它们。相似的,在Sublime中自定义键绑定,你需要修改他的XML键映射文件。Sublime由于缺少定义键盘快捷键的图形化界面而饱受批评,但长期使用的用户已经支持当前的基于文件的机制,这给他们更多的控制能力。 + +UltraEdit为它"一切都可自定义"的座右铭感到自豪,这也包括键盘快捷键。你可以自定义菜单导航的热键,以及定义你自己的访问大量函数的多键键映射。 + +除了完全可自定义的键盘快捷键以外,jEdit也有为Emacs预定义的键映射。Kate在这方面尤其令人映像深刻。它有简单可访问的自定义键绑定窗口。你可以更改默认的键,或者定义替代的键。另外,Kate也有一个能使用户使用Vi键操作Kate的Vi模式。 + +**Verdict:** + +- Gedit:2/5 +- Kate:5/5 +- Sublime:3/5 +- UltraEdit:4/5 +- jEdit:5/5 + +### 片段和宏 ### + +Macros help you cut down the time spent on editing and organising data by automating repetitive steps, while Snippets of code extend a similar functionality to programmers by creating reusable chunks of source code. Both have the ability to save you time. + +The vanilla Gedit installation doesn’t have either of these functionalities, but you can enable them via separate plugins. While the Snippets plugin ships with Gedit, you’ll have to manually download and install the macro plugin (it’s called gedit-macropy and is hosted on GitHub) before you can enable it from within Gedit. + +Kate takes the same plugins route to enable the snippets feature. Once added, the plugin also adds a repository of snippets for PHP, Bash and Java. You can display the list of snippets in the sidebar for easier access. Right-click on a snippet to edit its contents as well as its shortcut key combination. However, very surprisingly, it doesn’t support macros – despite repeated hails from users since 2002! + +jEdit too has a plugin for enabling snippets. But it can record macros from user actions and you can also write them in the BeanShell scripting language (BeanShell supports scripted objects as simple method closures like those in Perl and JavaScript). jEdit also has a plugin that will download several macros from jEdit’s website. + +Sublime ships with inbuilt ability to create both snippets and macros, and ships with several snippets of frequently used functions for most popular programming languages. + +Snippets in UltraEdit are called Smart Templates and just like with Sublime you can insert them based upon the kind of source file you’re editing. To complement the Macro recording function, UltraEdit also has an integrated javascript-based scripting language to automate tasks. You can also download user-submitted macros and scripts from the editor’s website. + +**Verdict:** + +- Gedit:3/5 +- Kate:1/5 +- Sublime:5/5 +- UltraEdit:5/5 +- jEdit:5/5 + +![UltraEdit’s UI is highly configurable — you can customise the layout of the toolbars and menus just as easily as you can change many other aspects.](http://www.linuxvoice.com/wp-content/uploads/2014/08/ultraedit-web.png) + +UltraEdit’s UI is highly configurable — you can customise the layout of the toolbars and menus just as easily as you can change many other aspects. + +### Ease of use ### + +Unlike a bare-bones text editor, the text editors in this feature are brimming with features to accommodate a wide range of users — from document writers to programmers. Instead of stripping features from the apps, their developers are looking for avenues to add more functionality. + +Although at first glance most apps in this group test have a very similar layout, upon closer inspection, you’ll notice several usability differences. We have a weak spot for apps that expose their functionality and features by making judicious use of the user interface, instead of just overwhelming the user. + +### Gedit: 4/5 ### + +Gedit wears a very vanilla look. It has an easy interface with minimal menus and buttons. This is a two-edged sword though, as some users might fail to realise its true potential. + +The app can open multiple files in tabs that can be rearranged and moved between windows. Users can optionally enable panels on the side and bottom for displaying a file browser and the output of a tool enabled by a plugin. The app will detect when an open file is modified by another application and offers to reload that file. + +The UI has been given a major overhaul in the latest version of the app yet to make its way into Gnome. However it isn’t yet stable, and while it maintains all features, several plugins that interact with the menu will need to be updated. + +### Kate: 5/5 ### + +Although a major part of its user interface resembles Gedit, Kate tucks in tabs at either side and its menus are much fuller. The app is approachable and invites users to explore other features. + +Kate can transparently open and save files over all protocols supported by KDE’s KIO including HTTP, FTP, SSH, SMB and WebDAV. You can use the app to work with multiple files at the same time. But unlike the traditional horizontal tab switching bar in most app, Kate has tabs on either side of the screen. The left sidebar will display an index of open files. Programmers who need to see different parts of the same file at the same time will also appreciate its ability to split the interface horizontally as well as vertically. + +### Sublime: 5/5 ### + +Sublime lets you view up to four files at the same time in various arrangements. There’s also a full-screen distraction free mode that just displays the file and the menu, for when you’re in the zone. + +The editor also has a minimap on the right, which is useful for navigating long files. The app ships with several snippets for popular functions in several programming languages, which makes it very usable for developers. Another neat editing feature, whether you are working with text documents or code, is the ability to swap and shuffle selections. + +### UltraEdit: 3/5 ### + +UltraEdit’s interface is loaded with several toolbars at the top and bottom of the interface. Along with the tabs to switch between documents, panes on either side and the gutter area, these leave little room for the editor window. + +Web developers working with HTML files have lots of assistance at their fingertips. You can also access remote files via FTP and SFTP. Advanced features such as recording a macro and comparing files are also easily accessible. + +Using the app’s Preferences window you can tweak various aspects of the app, including the colour scheme and other features like syntax highlighting. + +### jEdit: 3/5 ### + +In terms of usability, one of the first red-flags was jEdit’s inability to install on RPM-based distros. Navigating the editor takes some getting used to, since its menus aren’t in the same order as in other popular apps and some have names that won’t be familiar to the average desktop user. However, the app include detailed inbuilt help, which will help ease the learning curve. + +jEdit highlights the current line you are on and enables you to split windows in multiple viewing modes. You can easily install and manage plugins from within the app, and in addition to full macros, jEdit also lets you record quick temporary ones. + +![Thanks to its Java underpinnings, jEdit doesn’t really feel at home on any desktop environment](http://www.linuxvoice.com/wp-content/uploads/2014/08/jedit-web.png) + +Thanks to its Java underpinnings, jEdit doesn’t really feel at home on any desktop environment + +### Availability and support ### + +There are several similarities between Gedit and Kate. Both apps take advantage of their respective parent project, Gnome and KDE, and are bundled with several mainstream distros. Yet both projects are cross-platform and have Windows and Mac OS X ports as well as native Linux versions. + +Gedit is hosted on Gnome’s web infrastructure and has a brief user guide, information about the various plugins, and the usual channels of getting in touch including a mailing list and IRC channel. You’ll also find usage information on the websites of other Gnome-based distros such as Ubuntu. Similarly, Kate gets the benefit of KDE’s resources and hosts detailed user information as well as a mailing list and IRC channel. You can access their respective user guides offline from within the app as well. + +UltraEdit is also available for Windows and Mac OS X besides Linux, and has detailed user guides on getting started, though there’s none included within the app. To assist users, UltraEdit hosts a database of frequently asked questions, a bunch of power tips that have detailed information about several specific features, and users can engage with one another other on forum boards. Additionally, paid users can also seek support from the developers via email. + +Sublime supports the same number of platforms, however you don’t need to buy a separate licence for each platform. The developer keeps users abreast with ongoing development via a blog and also participates actively in the hosted forums. The highlight of the project’s support infrastructure is the freely available detailed tutorial and video course. Sublime is lovely. + +Because it’s written in Java, jEdit is available on several platforms. On its website you’ll find a detailed user guide and links to documentation of some plugins. However, there are no avenues for users to engage with other users or the developer. + +**Verdict:** + +- Gedit: 4/5 +- Kate: 4/5 +- Sublime: 5/5 +- UltraEdit: 3/5 +- jEdit: 2/5 + +### Add-on and plugins ### + +Different users have different requirements, and a single lightweight app can only do as much. This is where plugins come into the picture. The apps rely on these small pluggable widgets to extend their feature set and be of use to even more number of users. + +The one exception is UltraEdit. The app has no third-party plugins, but its developers do point out that third-party tools such as HtmlTidy are already installed with UltraEdit. + +Gedit ships with a number of plugins installed, and you can download more with the gedit-plugins package. The project’s website also points to several third-party plugins based on their compatibility with the Gedit versions. + +Three useful plugins for programmers are Code Comment, Terminal Plugin, which adds a terminal in the bottom panel, and the Session Saver. The Session Saver is really useful when you’re working on a project with multiple files. You can open all the files in tabs, save your session and when you restore it with a single click it’ll open all the files in the same tab order as you saved them. + +Similarly, you can extend Kate by adding plugins using its built-in plugin manager. In addition to the impressive projects plugins, some others that will be of use to developers include an embedded terminal, ability to compile and debug code and execute SQL queries on databases. + +Plugins for Sublime are written in Python, and the text editor includes a tool called Package Control, which is a little bit like apt-get in that it enables the user to find, install, upgrade and remove plugin packages. With plugins, you can bring the Git version control to Sublime, as well as the JSLint tool to improve JavaScript. The Sublime Linter plugin is a must have for coders and will point out any errors in your code. + +jEdit boasts the most impressive plugin infrastructure. The app has over 200 plugins, which can be browsed in the dedicated site of their own. The website lists plugins under various categories such as File Management, Version Control, Text, etc. You’ll find lots of plugins housed under each category. + +Some of the best plugins are the Android plugin, which provides utilities to work on Android projects; the TomcatSwitch plugin, using which you can create and control an external Jakarta Tomcat server process; and the Vimulator plugin, for Vi-like capabilities. You can install these plugins using jEdit’s using its plugin manager. + +**Verdict** + +- Gedit: 3/5 +- Kate: 4/5 +- Sublime: 4/5 +- UltraEdit: 1/5 +- jEdit: 5/5 + +### Plain ol’ text editing ### + +Despite all their powerful extra-curricular activities that might even displace full-blown apps across several genres, there will be times when you just need to use these text editing behemoths to read, write, or edit plain and simple text. While you can use all of them to enter text, we are evaluating them for access to common text-editing conveniences. + +Gedit which is Gnome’s default text editor, supports an undo and redo mechanism as well as search and replace. It can spellcheck documents in multiple languages and can also access and edit remote files using Gnome GVFS libraries. + +You can spellcheck documents with Kate as well, which also lets you perform a Google search on any highlighted text. It’s also got a line modification system which visually alerts users of lines which have modified and unsaved changes in a file. In addition, it enables users to set bookmarks within a file to ease navigation of lengthy documents. + +Sublime has a wide selection of editing commands, such as indenting text and formatting paragraphs. Its auto-save feature helps prevent users from losing their work. Advanced users will appreciate the regex-based recursive find and replace feature, as well as the ability to select multiple non-contiguous spans of text and act on them collectively. + +UltraEdit also enables the use of regular expressions for its search and replace feature and can edit remote files via FTP. One unique feature of jEdit is its support for an unlimited number of clipboard which it calls registers. You can copy snippets of text to these registers which are available across editing sessions. + +**Verdict:** + +- Gedit: 4/5 +- Kate: 5/5 +- Sublime: 5/5 +- UltraEdit: 4/5 +- jEdit: 4/5 + +### Our verdict ### + +All the editors in this feature are good enough to replace your existing text editor for editing text files and tweaking configuration files. In fact, chances are they’ll even double up as your IDE. These apps are chock full of bells and whistles, and their developers aren’t thinking of stripping features, but adding more and more and more. + +At the tail end of this test we have jEdit. Not only does it insist on using the proprietary Oracle Java Runtime Environment, it failed to install on our Fedora machine, and the developer doesn’t actively engage with its users. + +UltraEdit does little better. This commercial proprietary tool focuses on web developers, and doesn’t offer anything to non-developer power users that makes it worth recommending over free software alternatives. + +On the third podium position we have Gedit. There’s nothing inherently wrong with Gnome’s default editor, but despite all its positive aspects, it’s simply outclassed by Sublime and Kate. Out of the box, Kate is a more versatile editor than Gedit, and outscores Gnome’s default editor even after taking their respective plugin systems into consideration. + +Both Sublime and Kate are equally good. They performed equally well in most of our tests. Whatever ground it lost to Sublime for not supporting macros, it gained for its keyboard friendliness and its ease of use in defining custom keybindings. + +Kate’s success can be drawn from the fact that it offers the maximum number of features with minimal learning curve. Just fire it up and use it as a simple text editor, or easily edit configuration file with syntax highlighting, or even use it to collaborate and work on a complex programming project thanks to its project management capabilities. + +We aren’t pitching Kate to replace a full-blown integrated development environment such as [insert your favourite specialised tool here]. But it’s an ideal all-rounder and a perfect stepping stone to a specialised tool. + +Kate is designed for moments when you need something that’s quick to respond, doesn’t overwhelm you with its interface and is just as useful as something that might otherwise be overkill. + +### 1st Kate ### + +- Licence LGPL/GPL Version 3.11 +- www.kate-editor.org +- The ultimate mild-mannered text editor with super powers. +- Kate is one of the best apps to come out of the KDE project. + +### 2nd Sublime Text ### + +- Licence Proprietary Version 2.0.2 +- www.sublimetext.com +- A professionally done text editor that’s worth every penny – easy to use, full of features and it looks great. + +### 3rd Gedit ### + +- Licence GPL Version 3.10 +- http://projects.gnome.org/gedit +- Gets it done from Gnome. It’s a wonderful text editor and does an admirable job, but the competition here is too great. + +### 4th UltraEdit ### + +- Licence Proprietary Version 4.1.0.4 +- www.ultraedit.com +- Focuses on bundling conveniences for web developers without offering anything special for general users. + +### 5th jEdit ### + +- Licence GPL Version 5.1.0 +- www.jedit.org +- A lack of support, lack of working on Fedora and a lack of looking nice relegate jEdit to the bottom slot. + +### You may also wish to try… ### + +The default text editor that ships with your distro will also be able to assist you with some advanced tasks. There’s KDE’s KWrite and Raspbian’s Nano, for instance. KWrite inherits some of Kate’s features thanks to KDE’s katepart component, and Nano has sprung back into limelight thanks to its availability for Raspberry Pi. + +If you wish to follow the steps of Linux gurus, you could always try the revered text editors Emacs and Vim. First time users who want to get a taste for the power of Vim might want to consider gVim, which exposes Vim’s power via a graphical interface. + +Besides jEdit and Kate, there are other editors that mimic the usability of veteran advanced editors like Emacs and Vim, such as the JED editor and Joe’s Own Editor, both of which have an emulation mode for Emacs. On the other hand, if you are looking for lightweight code editors check out Bluefish and Geany. They exist to fill the niche between text editors and full-fledged integrated development platforms. + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/text-editors/ + +作者:[Ben Everard][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/ben_everard/ From 3120fe462bcd14a0052165697cc8d9a34e3d4434 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 18 Apr 2015 10:03:46 +0800 Subject: [PATCH 013/154] translating --- ...50417 sshuttle--A transparent proxy-based VPN using ssh.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md b/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md index ae5c129bee..51dc8889b8 100644 --- a/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md +++ b/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md @@ -1,3 +1,5 @@ +Translating---geekpi + sshuttle – A transparent proxy-based VPN using ssh ================================================================================ sshuttle allows you to create a VPN connection from your machine to any remote server that you can connect to via ssh, as long as that server has python 2.3 or higher.To work, you must have root access on the local machine, but you can have a normal account on the server. @@ -90,4 +92,4 @@ via: http://www.ubuntugeek.com/sshuttle-a-transparent-proxy-based-vpn-using-ssh. 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file +[a]:http://www.ubuntugeek.com/author/ubuntufix From 57bf4c323957b3fff1b46ab9f23d7825f27389f9 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 18 Apr 2015 10:31:07 +0800 Subject: [PATCH 014/154] translated --- ...A transparent proxy-based VPN using ssh.md | 38 ++++---- ...A transparent proxy-based VPN using ssh.md | 93 +++++++++++++++++++ 2 files changed, 111 insertions(+), 20 deletions(-) create mode 100644 translated/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md diff --git a/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md b/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md index 51dc8889b8..297f411840 100644 --- a/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md +++ b/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md @@ -1,42 +1,41 @@ -Translating---geekpi - -sshuttle – A transparent proxy-based VPN using ssh +sshuttle - 一个使用ssh的基于VPN的透明代理 ================================================================================ -sshuttle allows you to create a VPN connection from your machine to any remote server that you can connect to via ssh, as long as that server has python 2.3 or higher.To work, you must have root access on the local machine, but you can have a normal account on the server. +sshuttle允许你通过ssh创建一条从你电脑连接到任何远程服务器的VPN连接,只要你的服务器支持python2.3 或则更高的版本, 你必须有本机的root权限,但是你可以在服务端有普通账户即可。 -It's valid to run sshuttle more than once simultaneously on a single client machine, connecting to a different server every time, so you can be on more than one VPN at once.If run on a router, sshuttle can forward traffic for your entire subnet to the VPN. +你可以在一台机器上同时运行多次sshuttle来连接到不同的服务器上,这样你就可以一次使用多个VPN, sshuttle可以转发你子网所有流量到VPN中。 -### Install sshuttle on ubuntu ### -Open the terminal and run the following command +### 在Ubuntu中安装sshuttle ### + +在终端中输入下面的命令 sudo apt-get install sshuttle -### Using sshuttle ### +### 使用 sshuttle ### -#### sshuttle Syntax #### +#### sshuttle 语法 #### sshuttle [options...] [-r [username@]sshserver[:port]] [subnets] -#### Option details #### +#### Option 细节 #### -r, —remote=[username@]sshserver[:port] -the remote hostname and optional username and ssh port number to use for connecting to the remote server. For example,example.com, testuser@example.com, testuser@example.com:2222, or example.com:2244. +远程主机名和可选的用户名,用于连接远程服务器的ssh端口号。比如example.com、testuser@example.com、testuser@example.com:2222或者example.com:2244。 -#### sshuttle Examples #### +#### sshuttle 例子 #### -From the machine use the following command +在机器中使用下面的命令: sudo sshuttle -r username@sshserver 0.0.0.0/0 -vv -When it starts, sshuttle creates an ssh session to the server specified by the -r option. If -r is omitted, it will start both its client and server locally, which is sometimes useful for testing. +当开始后,sshuttle会创建一个ssh会话到通过-r指定的服务器。如果-r被忽略了,它会在本地运行客户端和服务端,这个有时会在测试时有用。 -After connecting to the remote server, sshuttle uploads its (python) source code to the remote end and executes it there. Thus, you don't need to install sshuttle on the remote server, and there are never sshuttle version conflicts between client and server. +连接到远程服务器后,sshuttle会上传它的(python)源码到远程服务器并执行。那么,你就不需要在远程服务器上安装sshuttle,并且客户端和服务器端间不会存在sshuttle版本冲突。 -#### More Examples From Man page #### +#### 手册中的更多例子 #### -Test locally by proxying all local connections, without using ssh: +代理所有的本地连接用于本地测试,没有使用ssh: $ sudo sshuttle -v 0/0 @@ -59,8 +58,7 @@ Test locally by proxying all local connections, without using ssh: c : SW#8:192.168.42.121:47523: deleting c : SW#6:192.168.42.106:50035: deleting -Test connection to a remote server, with automatic hostname and subnet -guessing: +测试到远程服务器上的连接,自动猜测主机名和子网: $ sudo sshuttle -vNHr example.org @@ -87,7 +85,7 @@ guessing: via: http://www.ubuntugeek.com/sshuttle-a-transparent-proxy-based-vpn-using-ssh.html 作者:[ruchi][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/) 荣誉推出 diff --git a/translated/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md b/translated/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md new file mode 100644 index 0000000000..297f411840 --- /dev/null +++ b/translated/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md @@ -0,0 +1,93 @@ +sshuttle - 一个使用ssh的基于VPN的透明代理 +================================================================================ +sshuttle允许你通过ssh创建一条从你电脑连接到任何远程服务器的VPN连接,只要你的服务器支持python2.3 或则更高的版本, 你必须有本机的root权限,但是你可以在服务端有普通账户即可。 + +你可以在一台机器上同时运行多次sshuttle来连接到不同的服务器上,这样你就可以一次使用多个VPN, sshuttle可以转发你子网所有流量到VPN中。 + + +### 在Ubuntu中安装sshuttle ### + +在终端中输入下面的命令 + + sudo apt-get install sshuttle + +### 使用 sshuttle ### + +#### sshuttle 语法 #### + + sshuttle [options...] [-r [username@]sshserver[:port]] [subnets] + +#### Option 细节 #### + +-r, —remote=[username@]sshserver[:port] + +远程主机名和可选的用户名,用于连接远程服务器的ssh端口号。比如example.com、testuser@example.com、testuser@example.com:2222或者example.com:2244。 + +#### sshuttle 例子 #### + +在机器中使用下面的命令: + + sudo sshuttle -r username@sshserver 0.0.0.0/0 -vv + +当开始后,sshuttle会创建一个ssh会话到通过-r指定的服务器。如果-r被忽略了,它会在本地运行客户端和服务端,这个有时会在测试时有用。 + +连接到远程服务器后,sshuttle会上传它的(python)源码到远程服务器并执行。那么,你就不需要在远程服务器上安装sshuttle,并且客户端和服务器端间不会存在sshuttle版本冲突。 + +#### 手册中的更多例子 #### + +代理所有的本地连接用于本地测试,没有使用ssh: + + $ sudo sshuttle -v 0/0 + + Starting sshuttle proxy. + Listening on (‘0.0.0.0′, 12300). + [local sudo] Password: + firewall manager ready. + c : connecting to server... + s: available routes: + s: 192.168.42.0/24 + c : connected. + firewall manager: starting transproxy. + c : Accept: ‘192.168.42.106':50035 -> ‘192.168.42.121':139. + c : Accept: ‘192.168.42.121':47523 -> ‘77.141.99.22':443. + ...etc... + ^C + firewall manager: undoing changes. + KeyboardInterrupt + c : Keyboard interrupt: exiting. + c : SW#8:192.168.42.121:47523: deleting + c : SW#6:192.168.42.106:50035: deleting + +测试到远程服务器上的连接,自动猜测主机名和子网: + + $ sudo sshuttle -vNHr example.org + + Starting sshuttle proxy. + Listening on (‘0.0.0.0′, 12300). + firewall manager ready. + c : connecting to server... + s: available routes: + s: 77.141.99.0/24 + c : connected. + c : seed_hosts: [] + firewall manager: starting transproxy. + hostwatch: Found: testbox1: 1.2.3.4 + hostwatch: Found: mytest2: 5.6.7.8 + hostwatch: Found: domaincontroller: 99.1.2.3 + c : Accept: ‘192.168.42.121':60554 -> ‘77.141.99.22':22. + ^C + firewall manager: undoing changes. + c : Keyboard interrupt: exiting. + c : SW#6:192.168.42.121:60554: deleting + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/sshuttle-a-transparent-proxy-based-vpn-using-ssh.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 From c1c6052bc11d6fff4854e8d141acb7d766a67669 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 18 Apr 2015 20:56:04 +0800 Subject: [PATCH 015/154] [Translating 2/3] share/20140804 Group Test--Linux Text Editors --- ...20140804 Group Test--Linux Text Editors.md | 90 ++++++++++--------- 1 file changed, 47 insertions(+), 43 deletions(-) diff --git a/translated/share/20140804 Group Test--Linux Text Editors.md b/translated/share/20140804 Group Test--Linux Text Editors.md index aae721a30f..2809fbe129 100644 --- a/translated/share/20140804 Group Test--Linux Text Editors.md +++ b/translated/share/20140804 Group Test--Linux Text Editors.md @@ -114,17 +114,17 @@ UltraEdit为它"一切都可自定义"的座右铭感到自豪,这也包括键 ### 片段和宏 ### -Macros help you cut down the time spent on editing and organising data by automating repetitive steps, while Snippets of code extend a similar functionality to programmers by creating reusable chunks of source code. Both have the ability to save you time. +宏通过自动化重复的步骤帮助你降低花费在编辑和组织数据上的时间,而代码片段通过创建可重用的源代码块为程序员扩展类似的功能。这两者都能节省你的时间。 -The vanilla Gedit installation doesn’t have either of these functionalities, but you can enable them via separate plugins. While the Snippets plugin ships with Gedit, you’ll have to manually download and install the macro plugin (it’s called gedit-macropy and is hosted on GitHub) before you can enable it from within Gedit. +标准的Gedit安装没有这两种功能中的任何一种,但是你可以通过独立的插件启用这些功能。片段插件随Gedit一起发布,但在Gedit内部启用宏插件之前你需要手动下载和安装(被称为gedit-macropy,托管在GitHub上)。 -Kate takes the same plugins route to enable the snippets feature. Once added, the plugin also adds a repository of snippets for PHP, Bash and Java. You can display the list of snippets in the sidebar for easier access. Right-click on a snippet to edit its contents as well as its shortcut key combination. However, very surprisingly, it doesn’t support macros – despite repeated hails from users since 2002! +Kate也同样通过插件的形式启用片段功能。一旦加入,插件也增加了片段的PHP,Bash和Java库。你可以在侧边栏中显示片段列表以便于访问。可以通过右击片段或者快捷键组合方式编辑它的内容。然而,令人惊讶的是,它不支持宏-尽管用户从2002年开始重复要求! -jEdit too has a plugin for enabling snippets. But it can record macros from user actions and you can also write them in the BeanShell scripting language (BeanShell supports scripted objects as simple method closures like those in Perl and JavaScript). jEdit also has a plugin that will download several macros from jEdit’s website. +jEdit也有一个启用片段的插件。但是它可以从用户行为中记录宏或者你也可以在BeanShell 脚本语言(BeanShell支持像Perl和JavaScript那样将脚本对象封锁为简单的方法)中写宏。jEdit也有一个可以从jEdit的网站中下载多种宏的插件。 -Sublime ships with inbuilt ability to create both snippets and macros, and ships with several snippets of frequently used functions for most popular programming languages. +Sublime有创建片段和宏的内建功能,也有为大多数编程语言经常使用的函数多种片段。 -Snippets in UltraEdit are called Smart Templates and just like with Sublime you can insert them based upon the kind of source file you’re editing. To complement the Macro recording function, UltraEdit also has an integrated javascript-based scripting language to automate tasks. You can also download user-submitted macros and scripts from the editor’s website. +在UltraEdit中片段被称为智能模板,正如Sublime你可以根据正在编辑的源代码文件类型插入片段。要完成宏记录功能,UltraEdit还有一个基于JavaScript的集成脚本语言来完成自动任务。你也可以从编辑器的网站中下载用户提交的宏和脚本。 **Verdict:** @@ -134,67 +134,69 @@ Snippets in UltraEdit are called Smart Templates and just like with Sublime you - UltraEdit:5/5 - jEdit:5/5 -![UltraEdit’s UI is highly configurable — you can customise the layout of the toolbars and menus just as easily as you can change many other aspects.](http://www.linuxvoice.com/wp-content/uploads/2014/08/ultraedit-web.png) +![UltraEdit的用户界面是高度可配置的 — 你可以正如改变其它许多方面那样简单的自定义工具栏和菜单的布局。](http://www.linuxvoice.com/wp-content/uploads/2014/08/ultraedit-web.png) -UltraEdit’s UI is highly configurable — you can customise the layout of the toolbars and menus just as easily as you can change many other aspects. +UltraEdit的用户界面是高度可配置的 — 你可以正如改变其它许多方面那样简单的自定义工具栏和菜单的布局。] -### Ease of use ### +### 易用性 ### -Unlike a bare-bones text editor, the text editors in this feature are brimming with features to accommodate a wide range of users — from document writers to programmers. Instead of stripping features from the apps, their developers are looking for avenues to add more functionality. +不像一个准系统文本编辑器,文本编辑器的这个功能洋溢着适应大范围用户的功能 - 从文档写作者到程序员。从应用程序剥离相反,他们的开发者在寻找添加更多功能的途径。 -Although at first glance most apps in this group test have a very similar layout, upon closer inspection, you’ll notice several usability differences. We have a weak spot for apps that expose their functionality and features by making judicious use of the user interface, instead of just overwhelming the user. +尽管第一眼看上去这次组测试中的大部分应用有一个很相似的布局,经过仔细的检查,你会发现一些可用性差异。我们通过用户界面的合理使用来介绍它们的功能和特性,而不是铺天盖地地告诉读者。 ### Gedit: 4/5 ### -Gedit wears a very vanilla look. It has an easy interface with minimal menus and buttons. This is a two-edged sword though, as some users might fail to realise its true potential. +Gedit有很普通的外观。通过最小化菜单和按钮有一个简单的界面。但这也是一种双刃剑,因为有些用户可能不会发现它真正的潜能。 -The app can open multiple files in tabs that can be rearranged and moved between windows. Users can optionally enable panels on the side and bottom for displaying a file browser and the output of a tool enabled by a plugin. The app will detect when an open file is modified by another application and offers to reload that file. +应用程序可以通过在窗口中能重排和移动的选项卡打开多个文件。用户可以通过使用一个插件选择性地启用旁边或者底部用来显示文件浏览和工具输出的面板。这个应用程序会检测到被其它应用程序更改的文件并可以重新加载这个文件。 -The UI has been given a major overhaul in the latest version of the app yet to make its way into Gnome. However it isn’t yet stable, and while it maintains all features, several plugins that interact with the menu will need to be updated. +为了适配Gnome,在应用程序的最后一个版本中考虑了大量的用户界面。然而它还并不稳定,尽管包括了所有的功能,和菜单交互的一些插件还需要升级。 ### Kate: 5/5 ### -Although a major part of its user interface resembles Gedit, Kate tucks in tabs at either side and its menus are much fuller. The app is approachable and invites users to explore other features. +尽管用户界面的主要部分和Gedit的相似,Kate可以在两边显示选项卡并且它的菜单更加丰富。该应用程序平易近人,让用户可以挖掘其它功能。 -Kate can transparently open and save files over all protocols supported by KDE’s KIO including HTTP, FTP, SSH, SMB and WebDAV. You can use the app to work with multiple files at the same time. But unlike the traditional horizontal tab switching bar in most app, Kate has tabs on either side of the screen. The left sidebar will display an index of open files. Programmers who need to see different parts of the same file at the same time will also appreciate its ability to split the interface horizontally as well as vertically. +Kate可以在KDE的KIO支持的所有协议上透明地打开和保存文件,包括HTTP, FTP, SSH, SMB 和 WebDAV。你可以用这个应用同时处理多个文件。但不同于大部分应用程序传统的水平选项卡选择栏,Kate在屏幕的两个方向都有选项卡。左侧的侧边栏显示打开文件的索引。需要同时查看一个文件不同部分的程序员也会感激它可以水平或者竖直分隔界面的能力。 ### Sublime: 5/5 ### -Sublime lets you view up to four files at the same time in various arrangements. There’s also a full-screen distraction free mode that just displays the file and the menu, for when you’re in the zone. -The editor also has a minimap on the right, which is useful for navigating long files. The app ships with several snippets for popular functions in several programming languages, which makes it very usable for developers. Another neat editing feature, whether you are working with text documents or code, is the ability to swap and shuffle selections. +Sublime支持你在不同方式同时查看多达四个文件。当你在zone下,这里也有一个只显示文件和菜单的全屏模式。 + +这个编辑器还在右边有个小地图,这在长文件中导航非常有用。应用程序为多种编程语言提供多种流行功能的片段,这使得它对于开发者非常有用。另一个精巧的功能是,无论你使用都是文本文档或者代码,都可以交换和随机选择。 ### UltraEdit: 3/5 ### -UltraEdit’s interface is loaded with several toolbars at the top and bottom of the interface. Along with the tabs to switch between documents, panes on either side and the gutter area, these leave little room for the editor window. -Web developers working with HTML files have lots of assistance at their fingertips. You can also access remote files via FTP and SFTP. Advanced features such as recording a macro and comparing files are also easily accessible. +UltraEdit在界面的顶部和底部加载了多种工具栏。由于有在文档中跳转的选项卡,两边的面板,以及复杂区别,使得只剩下一点空间给编辑窗口。 -Using the app’s Preferences window you can tweak various aspects of the app, including the colour scheme and other features like syntax highlighting. +使用HTML的网络开发者有很多唾手可得的帮助。你可以通过FTP和SFTP访问远程文件。高级功能,例如记录一个宏以及比较文件,也简单易用。 + +使用应用程序的Preference窗口,你可以调整应用程序的多个方面,包括颜色主题和类似语法高亮的其它功能。 ### jEdit: 3/5 ### -In terms of usability, one of the first red-flags was jEdit’s inability to install on RPM-based distros. Navigating the editor takes some getting used to, since its menus aren’t in the same order as in other popular apps and some have names that won’t be familiar to the average desktop user. However, the app include detailed inbuilt help, which will help ease the learning curve. +在可用性方面,首先一个不好就是jEdit不能在基于RPM的发行版上安装。导航编辑器需要一些时间来适应,因为它的菜单和其它流行的应用程序顺序不同,而且有些普通桌面用户不熟悉的名字。但是,该应用程序有详细的内部帮助,这有利于缓解学习曲线。 -jEdit highlights the current line you are on and enables you to split windows in multiple viewing modes. You can easily install and manage plugins from within the app, and in addition to full macros, jEdit also lets you record quick temporary ones. +jEdit高亮你所在的当前行,并使你能一多种查看方式分隔窗口。你可以简单地从应用程序中安装和管理插件,除了全宏,jEdit也支持你记录快速临时的宏。 -![Thanks to its Java underpinnings, jEdit doesn’t really feel at home on any desktop environment](http://www.linuxvoice.com/wp-content/uploads/2014/08/jedit-web.png) +![由于它的Java基础,jEdit在任何桌面环境中都不能给人宾至如归的感觉](http://www.linuxvoice.com/wp-content/uploads/2014/08/jedit-web.png) -Thanks to its Java underpinnings, jEdit doesn’t really feel at home on any desktop environment +由于它的Java基础,jEdit在任何桌面环境中都不能给人宾至如归的感觉 -### Availability and support ### +### 可用性和支持 ### -There are several similarities between Gedit and Kate. Both apps take advantage of their respective parent project, Gnome and KDE, and are bundled with several mainstream distros. Yet both projects are cross-platform and have Windows and Mac OS X ports as well as native Linux versions. +在Gedit和Kate之间有很多相似性。两个应用程序都得益于他们各自的父项目,Gnome和KDE,并绑定在各种主流的发行版中。另外两个项目都是交叉平台的,有Windows和Mac OS X版本以及本来的Linux版本。 -Gedit is hosted on Gnome’s web infrastructure and has a brief user guide, information about the various plugins, and the usual channels of getting in touch including a mailing list and IRC channel. You’ll also find usage information on the websites of other Gnome-based distros such as Ubuntu. Similarly, Kate gets the benefit of KDE’s resources and hosts detailed user information as well as a mailing list and IRC channel. You can access their respective user guides offline from within the app as well. +Gedit托管在Gnome的网络设施上并有一个简单的用户指南,关于多种插件的信息,以及包括邮件列表和IRC通道的常用保持联系方式。你也可以在其它基于Gnome的发行版,例如Ubuntu中找到使用信息。相似地,Kate得益于KDE的资源,并包括详细的用户信息以及邮件列表和IRC通道。你也可以从应用程序中获取相应的离线用户指南。 -UltraEdit is also available for Windows and Mac OS X besides Linux, and has detailed user guides on getting started, though there’s none included within the app. To assist users, UltraEdit hosts a database of frequently asked questions, a bunch of power tips that have detailed information about several specific features, and users can engage with one another other on forum boards. Additionally, paid users can also seek support from the developers via email. +除了Linux,UltraEdit在Windows和Mac OS X中也可用,虽然在应用程序中并没有包括,但在启动时也有详细的用户指南。为了辅助用户,UltraEdit保存了一个常见问题的数据库,一系列关于多种特定功能的详细信息的有用提示,用户还可以在论坛版块彼此帮助。另外,付费用户也可以通过邮件从开发者中获取支持。 -Sublime supports the same number of platforms, however you don’t need to buy a separate licence for each platform. The developer keeps users abreast with ongoing development via a blog and also participates actively in the hosted forums. The highlight of the project’s support infrastructure is the freely available detailed tutorial and video course. Sublime is lovely. +Sublime支持相同数目的平台,但是你需要单独为每种平台购买许可证。开发者通过博客使用户了解正在进行的开发,并积极参加了主持论坛。这个项目支持设施的亮点是提供免费的详细教程和视频课程。Sublime非常可爱。 -Because it’s written in Java, jEdit is available on several platforms. On its website you’ll find a detailed user guide and links to documentation of some plugins. However, there are no avenues for users to engage with other users or the developer. +由于是用java编写的,jEdit在多种平台中都可用。在它的网站上你可以找到一个详细的用户指南以及一些插件帮助文档的链接。然而,这里没有能使用户和其他用户或者开发者交流的途径。 -**Verdict:** +**判定:** - Gedit: 4/5 - Kate: 4/5 @@ -202,25 +204,25 @@ Because it’s written in Java, jEdit is available on several platforms. On its - UltraEdit: 3/5 - jEdit: 2/5 -### Add-on and plugins ### +### 附加和插件 ### -Different users have different requirements, and a single lightweight app can only do as much. This is where plugins come into the picture. The apps rely on these small pluggable widgets to extend their feature set and be of use to even more number of users. +不同的用户有不同的需求,一个简单的轻量级应用程序只能做到这么多。这就是为什么需要插件的原因。应用程序依赖于这些小部件来扩展它们的功能集并让更多的用户使用。 -The one exception is UltraEdit. The app has no third-party plugins, but its developers do point out that third-party tools such as HtmlTidy are already installed with UltraEdit. +UltraEdit是一个另外。它没有第三方插件,但开发者确实支出了例如HtmlTidy的第三方工具已经安装到了UltraEdit。 -Gedit ships with a number of plugins installed, and you can download more with the gedit-plugins package. The project’s website also points to several third-party plugins based on their compatibility with the Gedit versions. +Gedit附带了好多已安装的插件,你可以从gedit-插件包下载更多的插件。基于和Gedit版本的兼容性,项目网站也有到多个第三方插件的链接。 -Three useful plugins for programmers are Code Comment, Terminal Plugin, which adds a terminal in the bottom panel, and the Session Saver. The Session Saver is really useful when you’re working on a project with multiple files. You can open all the files in tabs, save your session and when you restore it with a single click it’ll open all the files in the same tab order as you saved them. +三个对程序员非常有用的插件是Code Comment,在底部面板增加一个终端的Terminal Plugin以及Session Saver。当你用多个文件开发项目的时候Session Saver相当有用。你可以在选项卡中打开文件,保存会话,当你用一个单击回复的时候,可以按照你保存时的选项卡顺序打开所有的文件。 -Similarly, you can extend Kate by adding plugins using its built-in plugin manager. In addition to the impressive projects plugins, some others that will be of use to developers include an embedded terminal, ability to compile and debug code and execute SQL queries on databases. +类似的,你可以通过用内部的插件管理器增加插件来扩展Kate。除了令人映像深刻的项目插件,一些开发者使用的插件包括嵌入式终端,能编译和调试代码,以及对数据库执行SQL查询。 -Plugins for Sublime are written in Python, and the text editor includes a tool called Package Control, which is a little bit like apt-get in that it enables the user to find, install, upgrade and remove plugin packages. With plugins, you can bring the Git version control to Sublime, as well as the JSLint tool to improve JavaScript. The Sublime Linter plugin is a must have for coders and will point out any errors in your code. +Sublime的插件是用Python写的,文本编辑器包括了一个类似于apt-get,能使用户查找,安装,升级和移除插件包的名为Package Control的工具。通过插件,你可以在Sublime中使用Git版本控制,以及改进JavaScript的JSLint工具。Sublime Linter能指出你代码中的错误,是编码人员必备的插件。 -jEdit boasts the most impressive plugin infrastructure. The app has over 200 plugins, which can be browsed in the dedicated site of their own. The website lists plugins under various categories such as File Management, Version Control, Text, etc. You’ll find lots of plugins housed under each category. +jEdit拥有最令人映像深刻的插件设施。该应用有超过200个插件,可以在它们自己的专用网站中浏览。网站通过不同的类型列举了插件,例如文件管理,版本控制,文本等。你可以在每个类型下找到很多的插件。 -Some of the best plugins are the Android plugin, which provides utilities to work on Android projects; the TomcatSwitch plugin, using which you can create and control an external Jakarta Tomcat server process; and the Vimulator plugin, for Vi-like capabilities. You can install these plugins using jEdit’s using its plugin manager. +一些最好的插件是Android插件,它们提供了和Android项目协同工作的工具;你可以使用TomcatSwitch插件创建和控制外部Jakarta Tomcat服务器进程;以及类似于Vi功能的Vimulator插件。你可以通过使用jEdit的插件管理器安装这些插件。 -**Verdict** +**评定** - Gedit: 3/5 - Kate: 4/5 @@ -228,7 +230,9 @@ Some of the best plugins are the Android plugin, which provides utilities to wor - UltraEdit: 1/5 - jEdit: 5/5 -### Plain ol’ text editing ### +### 纯文本编辑 ### + + Despite all their powerful extra-curricular activities that might even displace full-blown apps across several genres, there will be times when you just need to use these text editing behemoths to read, write, or edit plain and simple text. While you can use all of them to enter text, we are evaluating them for access to common text-editing conveniences. From 3171c57689369f401b0ad55ca78bc52104533ab6 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 18 Apr 2015 22:02:53 +0800 Subject: [PATCH 016/154] [Translated] share/20140804 Group Test--Linux Text Editors --- ...20140804 Group Test--Linux Text Editors.md | 319 ------------------ ...20140804 Group Test--Linux Text Editors.md | 54 ++- 2 files changed, 26 insertions(+), 347 deletions(-) delete mode 100644 sources/share/20140804 Group Test--Linux Text Editors.md diff --git a/sources/share/20140804 Group Test--Linux Text Editors.md b/sources/share/20140804 Group Test--Linux Text Editors.md deleted file mode 100644 index 40ef1e6f51..0000000000 --- a/sources/share/20140804 Group Test--Linux Text Editors.md +++ /dev/null @@ -1,319 +0,0 @@ -Translating by ictlyh -Group Test: Linux Text Editors -================================================================================ -> Mayank Sharma tests five supercharged text editors that can crunch more than just words. - -If you’ve been using Linux long, you know that whether you want to edit an app’s configuration file, hack together a shell script, or write/review bits of code, the likes of LibreOffice just won’t cut it. Although the words mean almost the same thing, you don’t need a word processor for these tasks; you need a text editor. - -In this group test we’ll be looking at five humble text editors that are more than capable of heavy-lifting texting duties. They can highlight syntax and auto-indent code just as effortlessly as they can spellcheck documents. You can use them to record macros and manage code snippets just as easily as you can copy/paste plain text. - -Some simple text editors even exceed their design goals thanks to plugins that infuse them with capabilities to rival text-centric apps from other genres. They can take on the duties of a source code editor and even an Integrated Development Environment. - -Two of most popular and powerful plain text editors are Emacs and Vim. However, we didn’t include them in this group test for a couple of reasons. Firstly, if you are using either, congratulations: you don’t need to switch. Secondly, both of these have a steep learning curve, especially to the GUI-oriented desktop generation who have access to alternatives that are much more inviting. - -### The contenders: ### - -#### Gedit #### - -- URL:http://projects.gnome.org/gedit/ -- Version: 3.10 -- Licence: GPL -- Is Gnome’s default text editor up to the challenge? - -#### Kate #### - -- URL: www.kate-editor.org -- Version: 3.11 -- Licence: LGPL/GPL -- Will Kate challenge fate? - -#### Sublime Text #### - -- URL: www.sublimetext.com -- Version: 2.0.2 -- Licence: Proprietary -- Proprietary software in the land of free with the heart of gold. - -#### UltraEdit #### - -- URL: www.ultraedit.com -- Version: 4.1.0.4 -- Licence: Proprietary -- Does it do enough to justify its price? - -#### jEdit #### - -- URL: www.jedit.org -- Version: 5.1.0 -- Licence: GPL -- Will the Java-based editor spoil the party for the rest? - -![There’s a fine balance between stuffing an app with features and exposing all of them to the user. Geddit keeps most of its features hidden.](http://www.linuxvoice.com/wp-content/uploads/2014/07/gedit-web.png) -There’s a fine balance between stuffing an app with features and exposing all of them to the user. Geddit keeps most of its features hidden. - -### The crucial criteria ### - -All the tools, except Gedit and jEdit, were installed on Fedora and Ubuntu via their recommended installation method. The former already shipped with the default Gnome desktop and the latter stubbornly refused to install on Fedora. Since these are relatively simple apps, they have no esoteric dependencies, the only exception being jEdit, which requires Oracle Java. - -Thanks to the continued efforts of both Gnome and KDE, all editors look great and function properly irrespective of the desktop environment they are running on. That not only rules it out as an evaluation criterion, it also means that you are no longer bound by the tools that ship with your favourite desktop environment. - -In addition to their geekier functionality, we also tested all our candidates for general-purpose text editing. However, they are not designed to mimic all the functionality of a modern-day word processor and weren’t evaluated as such. - -![Kate can double up as a versatile can capable integrated development environment (IDE).](http://www.linuxvoice.com/wp-content/uploads/2014/08/kate-web.png) - -Kate can double up as a versatile can capable integrated development environment (IDE). - -### Programming language support ### - -UltraEdit does syntax highlighting, can fold code and has project management capabilities. There’s also a function list, which is supposed to list all the functions in the source file, but it didn’t work for any of our test code files. UltraEdit also supports HTML5, and has a HTML toolbar with which you can add commonly-used HTML tags. - -Even Gnome’s default text editor, Gedit, has several code-oriented features such as bracket matching, automatic indentation, and will also highlight syntax for various programming languages including C, C++, Java, HTML, XML, Python, Perl, and many others. - -If you’re looking for more programming assistance, look at Sublime and Kate. Sublime supports several programming languages and (as well as the popular ones) is able to highlight syntax for C#, D, Dylan, Erlang, Groovy, Haskell, Lisp, Lua, MATLAB, OCaml, R, and even SQL. If that isn’t enough for you, you can download add-ons to support even more languages. - -Furthermore, its syntax highlighting ability offers several customisable options. The app will also match braces, to ensure they are all properly rounded off, and the auto-complete function in Sublime works with variables created by the user. - -Just like Komodo IDE, sublime also displays a scrollable preview of the full source code, which is really handy for navigating long code files and lets you jump between different parts of the file. - -One of the best features of Sublime is its ability to run code for certain languages like C++, Python, Ruby, etc from within the editor itself, assuming of course you have the compiler and other build system tools installed on your computer. This helps save time and eliminates the need to switch out to the command line. - -You can also enable the build system in Kate with plugins. Furthermore, you can add a simple front-end to the GDB debugger. Kate will work with Git, Subversion and Mercurial version control systems, and also provides some functionality for project management. - -It does all this in addition to highlighting syntax for over 180 languages, along with other assistance like bracket matching, auto-completion and auto-indentation. It also supports code folding and can even collapse functions within a program. - -The only disappointment is jEdit, which bills itself as a programmer’s text editor, but it struggled with other basic functions such as code folding and wouldn’t even suggest or complete functions. - -**Verdict:** - -- Gedit:3/5 -- Kate:5/5 -- Sublime:5/5 -- UltraEdit3/5 -- jEdit:1/5 - -![If you don’t like Sublime’s Charcoal appearance, you can choose one of the other 22 themes included with ti.](http://www.linuxvoice.com/wp-content/uploads/2014/08/sublime-web.png) - -If you don’t like Sublime’s Charcoal appearance, you can choose one of the other 22 themes included with ti. - -### Keyboard control ### - -Users of an advanced text editor expect to control and operate it exclusively via the keyboard. Furthermore, some apps even allow their users to further customise the key bindings for the shortcuts. - -You can easily work with Gedit using its extensive keyboard shortcut keys. There are keys for working with and editing files as well as invoke tools for common tasks such as spellchecking a document. You can access a list of default shortcut keys from within the app, but there’s no graphical way to customise them. Similarly, to customise the keybindings in Sublime, you need to make modifications in its XML keymap files. Sublime has been criticised for its lack of a graphical interface to define keyboard shortcuts, but long-term users have defended the current file-based mechanism, which gives them more control. - -UltraEdit is proud of its “everything is customisable” motto, which it extend to keyboard shortcuts. You can define custom hotkeys for navigating the menus and also define your own multi-key key-mappings for accessing its plethora of functions. - -In addition to its fully customisable keyboard shortcuts, jEdit also has pre-defined keymaps for Emacs. Kate is equally impressive in this respect. It has an easily accessible window to customise the key bindings. You can change the default keys, as well as define alternate ones. Furthermore, Kate also has a Vi mode which will let users operate Kate using Vi keys. - -**Verdict:** - -- Gedit:2/5 -- Kate:5/5 -- Sublime:3/5 -- UltraEdit:4/5 -- jEdit:5/5 - -### Snippets and macros ### - -Macros help you cut down the time spent on editing and organising data by automating repetitive steps, while Snippets of code extend a similar functionality to programmers by creating reusable chunks of source code. Both have the ability to save you time. - -The vanilla Gedit installation doesn’t have either of these functionalities, but you can enable them via separate plugins. While the Snippets plugin ships with Gedit, you’ll have to manually download and install the macro plugin (it’s called gedit-macropy and is hosted on GitHub) before you can enable it from within Gedit. - -Kate takes the same plugins route to enable the snippets feature. Once added, the plugin also adds a repository of snippets for PHP, Bash and Java. You can display the list of snippets in the sidebar for easier access. Right-click on a snippet to edit its contents as well as its shortcut key combination. However, very surprisingly, it doesn’t support macros – despite repeated hails from users since 2002! - -jEdit too has a plugin for enabling snippets. But it can record macros from user actions and you can also write them in the BeanShell scripting language (BeanShell supports scripted objects as simple method closures like those in Perl and JavaScript). jEdit also has a plugin that will download several macros from jEdit’s website. - -Sublime ships with inbuilt ability to create both snippets and macros, and ships with several snippets of frequently used functions for most popular programming languages. - -Snippets in UltraEdit are called Smart Templates and just like with Sublime you can insert them based upon the kind of source file you’re editing. To complement the Macro recording function, UltraEdit also has an integrated javascript-based scripting language to automate tasks. You can also download user-submitted macros and scripts from the editor’s website. - -**Verdict:** - -- Gedit:3/5 -- Kate:1/5 -- Sublime:5/5 -- UltraEdit:5/5 -- jEdit:5/5 - -![UltraEdit’s UI is highly configurable — you can customise the layout of the toolbars and menus just as easily as you can change many other aspects.](http://www.linuxvoice.com/wp-content/uploads/2014/08/ultraedit-web.png) - -UltraEdit’s UI is highly configurable — you can customise the layout of the toolbars and menus just as easily as you can change many other aspects. - -### Ease of use ### - -Unlike a bare-bones text editor, the text editors in this feature are brimming with features to accommodate a wide range of users — from document writers to programmers. Instead of stripping features from the apps, their developers are looking for avenues to add more functionality. - -Although at first glance most apps in this group test have a very similar layout, upon closer inspection, you’ll notice several usability differences. We have a weak spot for apps that expose their functionality and features by making judicious use of the user interface, instead of just overwhelming the user. - -### Gedit: 4/5 ### - -Gedit wears a very vanilla look. It has an easy interface with minimal menus and buttons. This is a two-edged sword though, as some users might fail to realise its true potential. - -The app can open multiple files in tabs that can be rearranged and moved between windows. Users can optionally enable panels on the side and bottom for displaying a file browser and the output of a tool enabled by a plugin. The app will detect when an open file is modified by another application and offers to reload that file. - -The UI has been given a major overhaul in the latest version of the app yet to make its way into Gnome. However it isn’t yet stable, and while it maintains all features, several plugins that interact with the menu will need to be updated. - -### Kate: 5/5 ### - -Although a major part of its user interface resembles Gedit, Kate tucks in tabs at either side and its menus are much fuller. The app is approachable and invites users to explore other features. - -Kate can transparently open and save files over all protocols supported by KDE’s KIO including HTTP, FTP, SSH, SMB and WebDAV. You can use the app to work with multiple files at the same time. But unlike the traditional horizontal tab switching bar in most app, Kate has tabs on either side of the screen. The left sidebar will display an index of open files. Programmers who need to see different parts of the same file at the same time will also appreciate its ability to split the interface horizontally as well as vertically. - -### Sublime: 5/5 ### - -Sublime lets you view up to four files at the same time in various arrangements. There’s also a full-screen distraction free mode that just displays the file and the menu, for when you’re in the zone. - -The editor also has a minimap on the right, which is useful for navigating long files. The app ships with several snippets for popular functions in several programming languages, which makes it very usable for developers. Another neat editing feature, whether you are working with text documents or code, is the ability to swap and shuffle selections. - -### UltraEdit: 3/5 ### - -UltraEdit’s interface is loaded with several toolbars at the top and bottom of the interface. Along with the tabs to switch between documents, panes on either side and the gutter area, these leave little room for the editor window. - -Web developers working with HTML files have lots of assistance at their fingertips. You can also access remote files via FTP and SFTP. Advanced features such as recording a macro and comparing files are also easily accessible. - -Using the app’s Preferences window you can tweak various aspects of the app, including the colour scheme and other features like syntax highlighting. - -### jEdit: 3/5 ### - -In terms of usability, one of the first red-flags was jEdit’s inability to install on RPM-based distros. Navigating the editor takes some getting used to, since its menus aren’t in the same order as in other popular apps and some have names that won’t be familiar to the average desktop user. However, the app include detailed inbuilt help, which will help ease the learning curve. - -jEdit highlights the current line you are on and enables you to split windows in multiple viewing modes. You can easily install and manage plugins from within the app, and in addition to full macros, jEdit also lets you record quick temporary ones. - -![Thanks to its Java underpinnings, jEdit doesn’t really feel at home on any desktop environment](http://www.linuxvoice.com/wp-content/uploads/2014/08/jedit-web.png) - -Thanks to its Java underpinnings, jEdit doesn’t really feel at home on any desktop environment - -### Availability and support ### - -There are several similarities between Gedit and Kate. Both apps take advantage of their respective parent project, Gnome and KDE, and are bundled with several mainstream distros. Yet both projects are cross-platform and have Windows and Mac OS X ports as well as native Linux versions. - -Gedit is hosted on Gnome’s web infrastructure and has a brief user guide, information about the various plugins, and the usual channels of getting in touch including a mailing list and IRC channel. You’ll also find usage information on the websites of other Gnome-based distros such as Ubuntu. Similarly, Kate gets the benefit of KDE’s resources and hosts detailed user information as well as a mailing list and IRC channel. You can access their respective user guides offline from within the app as well. - -UltraEdit is also available for Windows and Mac OS X besides Linux, and has detailed user guides on getting started, though there’s none included within the app. To assist users, UltraEdit hosts a database of frequently asked questions, a bunch of power tips that have detailed information about several specific features, and users can engage with one another other on forum boards. Additionally, paid users can also seek support from the developers via email. - -Sublime supports the same number of platforms, however you don’t need to buy a separate licence for each platform. The developer keeps users abreast with ongoing development via a blog and also participates actively in the hosted forums. The highlight of the project’s support infrastructure is the freely available detailed tutorial and video course. Sublime is lovely. - -Because it’s written in Java, jEdit is available on several platforms. On its website you’ll find a detailed user guide and links to documentation of some plugins. However, there are no avenues for users to engage with other users or the developer. - -**Verdict:** - -- Gedit: 4/5 -- Kate: 4/5 -- Sublime: 5/5 -- UltraEdit: 3/5 -- jEdit: 2/5 - -### Add-on and plugins ### - -Different users have different requirements, and a single lightweight app can only do as much. This is where plugins come into the picture. The apps rely on these small pluggable widgets to extend their feature set and be of use to even more number of users. - -The one exception is UltraEdit. The app has no third-party plugins, but its developers do point out that third-party tools such as HtmlTidy are already installed with UltraEdit. - -Gedit ships with a number of plugins installed, and you can download more with the gedit-plugins package. The project’s website also points to several third-party plugins based on their compatibility with the Gedit versions. - -Three useful plugins for programmers are Code Comment, Terminal Plugin, which adds a terminal in the bottom panel, and the Session Saver. The Session Saver is really useful when you’re working on a project with multiple files. You can open all the files in tabs, save your session and when you restore it with a single click it’ll open all the files in the same tab order as you saved them. - -Similarly, you can extend Kate by adding plugins using its built-in plugin manager. In addition to the impressive projects plugins, some others that will be of use to developers include an embedded terminal, ability to compile and debug code and execute SQL queries on databases. - -Plugins for Sublime are written in Python, and the text editor includes a tool called Package Control, which is a little bit like apt-get in that it enables the user to find, install, upgrade and remove plugin packages. With plugins, you can bring the Git version control to Sublime, as well as the JSLint tool to improve JavaScript. The Sublime Linter plugin is a must have for coders and will point out any errors in your code. - -jEdit boasts the most impressive plugin infrastructure. The app has over 200 plugins, which can be browsed in the dedicated site of their own. The website lists plugins under various categories such as File Management, Version Control, Text, etc. You’ll find lots of plugins housed under each category. - -Some of the best plugins are the Android plugin, which provides utilities to work on Android projects; the TomcatSwitch plugin, using which you can create and control an external Jakarta Tomcat server process; and the Vimulator plugin, for Vi-like capabilities. You can install these plugins using jEdit’s using its plugin manager. - -**Verdict** - -- Gedit: 3/5 -- Kate: 4/5 -- Sublime: 4/5 -- UltraEdit: 1/5 -- jEdit: 5/5 - -### Plain ol’ text editing ### - -Despite all their powerful extra-curricular activities that might even displace full-blown apps across several genres, there will be times when you just need to use these text editing behemoths to read, write, or edit plain and simple text. While you can use all of them to enter text, we are evaluating them for access to common text-editing conveniences. - -Gedit which is Gnome’s default text editor, supports an undo and redo mechanism as well as search and replace. It can spellcheck documents in multiple languages and can also access and edit remote files using Gnome GVFS libraries. - -You can spellcheck documents with Kate as well, which also lets you perform a Google search on any highlighted text. It’s also got a line modification system which visually alerts users of lines which have modified and unsaved changes in a file. In addition, it enables users to set bookmarks within a file to ease navigation of lengthy documents. - -Sublime has a wide selection of editing commands, such as indenting text and formatting paragraphs. Its auto-save feature helps prevent users from losing their work. Advanced users will appreciate the regex-based recursive find and replace feature, as well as the ability to select multiple non-contiguous spans of text and act on them collectively. - -UltraEdit also enables the use of regular expressions for its search and replace feature and can edit remote files via FTP. One unique feature of jEdit is its support for an unlimited number of clipboard which it calls registers. You can copy snippets of text to these registers which are available across editing sessions. - -**Verdict:** - -- Gedit: 4/5 -- Kate: 5/5 -- Sublime: 5/5 -- UltraEdit: 4/5 -- jEdit: 4/5 - -### Our verdict ### - -All the editors in this feature are good enough to replace your existing text editor for editing text files and tweaking configuration files. In fact, chances are they’ll even double up as your IDE. These apps are chock full of bells and whistles, and their developers aren’t thinking of stripping features, but adding more and more and more. - -At the tail end of this test we have jEdit. Not only does it insist on using the proprietary Oracle Java Runtime Environment, it failed to install on our Fedora machine, and the developer doesn’t actively engage with its users. - -UltraEdit does little better. This commercial proprietary tool focuses on web developers, and doesn’t offer anything to non-developer power users that makes it worth recommending over free software alternatives. - -On the third podium position we have Gedit. There’s nothing inherently wrong with Gnome’s default editor, but despite all its positive aspects, it’s simply outclassed by Sublime and Kate. Out of the box, Kate is a more versatile editor than Gedit, and outscores Gnome’s default editor even after taking their respective plugin systems into consideration. - -Both Sublime and Kate are equally good. They performed equally well in most of our tests. Whatever ground it lost to Sublime for not supporting macros, it gained for its keyboard friendliness and its ease of use in defining custom keybindings. - -Kate’s success can be drawn from the fact that it offers the maximum number of features with minimal learning curve. Just fire it up and use it as a simple text editor, or easily edit configuration file with syntax highlighting, or even use it to collaborate and work on a complex programming project thanks to its project management capabilities. - -We aren’t pitching Kate to replace a full-blown integrated development environment such as [insert your favourite specialised tool here]. But it’s an ideal all-rounder and a perfect stepping stone to a specialised tool. - -Kate is designed for moments when you need something that’s quick to respond, doesn’t overwhelm you with its interface and is just as useful as something that might otherwise be overkill. - -### 1st Kate ### - -- Licence LGPL/GPL Version 3.11 -- www.kate-editor.org -- The ultimate mild-mannered text editor with super powers. -- Kate is one of the best apps to come out of the KDE project. - -### 2nd Sublime Text ### - -- Licence Proprietary Version 2.0.2 -- www.sublimetext.com -- A professionally done text editor that’s worth every penny – easy to use, full of features and it looks great. - -### 3rd Gedit ### - -- Licence GPL Version 3.10 -- http://projects.gnome.org/gedit -- Gets it done from Gnome. It’s a wonderful text editor and does an admirable job, but the competition here is too great. - -### 4th UltraEdit ### - -- Licence Proprietary Version 4.1.0.4 -- www.ultraedit.com -- Focuses on bundling conveniences for web developers without offering anything special for general users. - -### 5th jEdit ### - -- Licence GPL Version 5.1.0 -- www.jedit.org -- A lack of support, lack of working on Fedora and a lack of looking nice relegate jEdit to the bottom slot. - -### You may also wish to try… ### - -The default text editor that ships with your distro will also be able to assist you with some advanced tasks. There’s KDE’s KWrite and Raspbian’s Nano, for instance. KWrite inherits some of Kate’s features thanks to KDE’s katepart component, and Nano has sprung back into limelight thanks to its availability for Raspberry Pi. - -If you wish to follow the steps of Linux gurus, you could always try the revered text editors Emacs and Vim. First time users who want to get a taste for the power of Vim might want to consider gVim, which exposes Vim’s power via a graphical interface. - -Besides jEdit and Kate, there are other editors that mimic the usability of veteran advanced editors like Emacs and Vim, such as the JED editor and Joe’s Own Editor, both of which have an emulation mode for Emacs. On the other hand, if you are looking for lightweight code editors check out Bluefish and Geany. They exist to fill the niche between text editors and full-fledged integrated development platforms. - --------------------------------------------------------------------------------- - -via: http://www.linuxvoice.com/text-editors/ - -作者:[Ben Everard][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linuxvoice.com/author/ben_everard/ diff --git a/translated/share/20140804 Group Test--Linux Text Editors.md b/translated/share/20140804 Group Test--Linux Text Editors.md index 2809fbe129..fa9b275588 100644 --- a/translated/share/20140804 Group Test--Linux Text Editors.md +++ b/translated/share/20140804 Group Test--Linux Text Editors.md @@ -232,19 +232,17 @@ jEdit拥有最令人映像深刻的插件设施。该应用有超过200个插件 ### 纯文本编辑 ### +尽管它们强大的额外功能甚至可能会取代几个流派完全成熟的应用程序,有时候可能只需要使用这些庞大的文本编辑器读写或者编辑简单的纯文本。虽然你可以使用它们中的任何一个输入文本,我们通过普通文本编辑的方便性平均它们。 +Gnome的默认文本编辑器Gedit,支持取消和重做机制以及搜索和替换。它可以对多种语言进行拼写检查,并能通过使用Gnome GVFS库访问和编辑远程文件。 -Despite all their powerful extra-curricular activities that might even displace full-blown apps across several genres, there will be times when you just need to use these text editing behemoths to read, write, or edit plain and simple text. While you can use all of them to enter text, we are evaluating them for access to common text-editing conveniences. +你也可以使用Kate进行拼写检查,它也可以让你对任何高亮文本进行Google搜索。它还有一个能可视化告知用户文件中更改过但没有保存的行的行修改系统。另外,它通过允许用户在文件中使用书签简化长文档的导航。 -Gedit which is Gnome’s default text editor, supports an undo and redo mechanism as well as search and replace. It can spellcheck documents in multiple languages and can also access and edit remote files using Gnome GVFS libraries. +Sublime有很多可选择的编辑命令,例如缩进文本和格式化段落。它的自动保存功能帮助防止用户丢失他们的更改。高级用户还会喜欢基于正则表达式的递归查找和替换功能,以及选择多个不连续的文本块并执行统一操作。 -You can spellcheck documents with Kate as well, which also lets you perform a Google search on any highlighted text. It’s also got a line modification system which visually alerts users of lines which have modified and unsaved changes in a file. In addition, it enables users to set bookmarks within a file to ease navigation of lengthy documents. +UltraEdit也允许用户在查找和替换功能中使用正则表示,并能通过FTP编辑远程文件。JEdit一个独特的功能是它支持被称为寄存器的不限数目的剪切板。你可以复制文本片段到这些寄存器中,在编辑会话过程中都可用。 -Sublime has a wide selection of editing commands, such as indenting text and formatting paragraphs. Its auto-save feature helps prevent users from losing their work. Advanced users will appreciate the regex-based recursive find and replace feature, as well as the ability to select multiple non-contiguous spans of text and act on them collectively. - -UltraEdit also enables the use of regular expressions for its search and replace feature and can edit remote files via FTP. One unique feature of jEdit is its support for an unlimited number of clipboard which it calls registers. You can copy snippets of text to these registers which are available across editing sessions. - -**Verdict:** +**评定:** - Gedit: 4/5 - Kate: 5/5 @@ -252,69 +250,69 @@ UltraEdit also enables the use of regular expressions for its search and replace - UltraEdit: 4/5 - jEdit: 4/5 -### Our verdict ### +### 我们的评比 ### -All the editors in this feature are good enough to replace your existing text editor for editing text files and tweaking configuration files. In fact, chances are they’ll even double up as your IDE. These apps are chock full of bells and whistles, and their developers aren’t thinking of stripping features, but adding more and more and more. +在这里的所有编辑器都足以替换你已有的文本编辑器去用来编辑文本和调整配置文件。事实上,没准它们会组合起来作为你的集成开发环境。这些应用程序都有各种各样功能,它们的开发者不会考虑剥离功能,而是增加越来越多的功能。 -At the tail end of this test we have jEdit. Not only does it insist on using the proprietary Oracle Java Runtime Environment, it failed to install on our Fedora machine, and the developer doesn’t actively engage with its users. +jEdit排在这次测试的最后面。因为它不仅坚持使用专有的Oracle Java运行环境,不能在你的Fedora机器上安装,而且开发者不积极的和用户交互。 -UltraEdit does little better. This commercial proprietary tool focuses on web developers, and doesn’t offer anything to non-developer power users that makes it worth recommending over free software alternatives. +UltraEdit做的稍微好一点。这个商业专用工具专注于网络开发者,不为非开发者高级用户提供任何功能,使得它不值得推荐为免费软件的替代品。 -On the third podium position we have Gedit. There’s nothing inherently wrong with Gnome’s default editor, but despite all its positive aspects, it’s simply outclassed by Sublime and Kate. Out of the box, Kate is a more versatile editor than Gedit, and outscores Gnome’s default editor even after taking their respective plugin systems into consideration. +排在第三的是Gedit。作为Gnome的默认编辑器,它没有任何内在的错误,但尽管有很多积极的方面,它还是略微被Sublime和Kate超越。开诚布公地说,Kate是比Gedit更通用的编辑器,甚至考虑到他们的插件系统,评分也优于Gnome的默认编辑器。 -Both Sublime and Kate are equally good. They performed equally well in most of our tests. Whatever ground it lost to Sublime for not supporting macros, it gained for its keyboard friendliness and its ease of use in defining custom keybindings. +Sublime和Kate都相当好。他们在我们的大多数测试中表现同样出色。由于不支持宏而落后于Sublime,但键盘友好和能简单定义自定义键绑定又使Kate找回优势。 -Kate’s success can be drawn from the fact that it offers the maximum number of features with minimal learning curve. Just fire it up and use it as a simple text editor, or easily edit configuration file with syntax highlighting, or even use it to collaborate and work on a complex programming project thanks to its project management capabilities. +Kate成功的原因可以归结为它通过最小化学习曲线提供了最大化数目的功能。尽量使用它吧,不仅作为简单文本编辑器使用,或者容易使用语法高亮编辑配置文件,甚至得益于项目管理能力能使用它协作一个复杂的编程项目。 -We aren’t pitching Kate to replace a full-blown integrated development environment such as [insert your favourite specialised tool here]. But it’s an ideal all-rounder and a perfect stepping stone to a specialised tool. +我们不是选择Kate去替换一个类似[在这里插入你最喜欢的专业工具]的全面的集成开发环境。但是它是一个专业工具理想的全面的以及完美的垫脚石。 -Kate is designed for moments when you need something that’s quick to respond, doesn’t overwhelm you with its interface and is just as useful as something that might otherwise be overkill. +Kate为能快速响应你的需要而设计,它的界面并不会使你茫然,并且和那些过于复杂的应用一样的有用。 ### 1st Kate ### - Licence LGPL/GPL Version 3.11 - www.kate-editor.org -- The ultimate mild-mannered text editor with super powers. -- Kate is one of the best apps to come out of the KDE project. +- 拥有超能力,最终温和的文本编辑器。 +- Kate是KDE项目中最有用的应用程序之一。 ### 2nd Sublime Text ### - Licence Proprietary Version 2.0.2 - www.sublimetext.com -- A professionally done text editor that’s worth every penny – easy to use, full of features and it looks great. +- 值得你每分钱的专业文本编辑器 - 简单易用,功能全面而且看起来很棒。 ### 3rd Gedit ### - Licence GPL Version 3.10 - http://projects.gnome.org/gedit -- Gets it done from Gnome. It’s a wonderful text editor and does an admirable job, but the competition here is too great. +- 从Gnome中完成。这是一个奇妙的文本编辑器,确实令人钦佩的工作,但这里的竞争实在太大了。 ### 4th UltraEdit ### - Licence Proprietary Version 4.1.0.4 - www.ultraedit.com -- Focuses on bundling conveniences for web developers without offering anything special for general users. +- 关注于为网络开发者绑定便利,而不为普通用户提供任何特殊功能。 ### 5th jEdit ### - Licence GPL Version 5.1.0 - www.jedit.org -- A lack of support, lack of working on Fedora and a lack of looking nice relegate jEdit to the bottom slot. +- 缺乏支持,不支持Fedora,缺乏好看的界面,jEdit被贬低到最后。 -### You may also wish to try… ### +### 你也许希望尝试… ### -The default text editor that ships with your distro will also be able to assist you with some advanced tasks. There’s KDE’s KWrite and Raspbian’s Nano, for instance. KWrite inherits some of Kate’s features thanks to KDE’s katepart component, and Nano has sprung back into limelight thanks to its availability for Raspberry Pi. +随你发行版发布的默认文本编辑器也能帮助你一些高级任务。例如KDE的KWrite和Raspbian的Nano。得益于KDE的katepart组件,KWrite继承了一些Kate的功能,得益于在树莓派上的可用性,Nano也开始重现风头。 -If you wish to follow the steps of Linux gurus, you could always try the revered text editors Emacs and Vim. First time users who want to get a taste for the power of Vim might want to consider gVim, which exposes Vim’s power via a graphical interface. +如果你希望跟随Linux大师的脚本,你总是可以尝试崇高的文本编辑机Emacs和Vim。想尝试Vim强大的用户首先可以考虑gVim,它通过图形界面展现了Vim的强大。 -Besides jEdit and Kate, there are other editors that mimic the usability of veteran advanced editors like Emacs and Vim, such as the JED editor and Joe’s Own Editor, both of which have an emulation mode for Emacs. On the other hand, if you are looking for lightweight code editors check out Bluefish and Geany. They exist to fill the niche between text editors and full-fledged integrated development platforms. +除了jEdit和Kate,这里还有其他模仿例如Emacs和Vim之类的老派高级编辑器的编辑器,比如JED 编辑器和Joe's Own Editor,这两者都有Emacs的模拟模式。另一方面,如果你在寻找轻量级的代码编辑器,可以看看Bluefish和Geany。他们的存在是为了填补文本编辑器和全面集成的开发平台之间的空隙。 -------------------------------------------------------------------------------- via: http://www.linuxvoice.com/text-editors/ 作者:[Ben Everard][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ictlyh](https://github.com/ictlyh) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From eaae2abbe84d7ac7a3f9239cda1a370e9150215d Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 18 Apr 2015 22:43:50 +0800 Subject: [PATCH 017/154] [Translated]20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md --- ...pt or Decrypt Random Passwords in Linux.md | 106 ------------------ ...pt or Decrypt Random Passwords in Linux.md | 103 +++++++++++++++++ 2 files changed, 103 insertions(+), 106 deletions(-) delete mode 100644 sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md create mode 100644 translated/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md diff --git a/sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md b/sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md deleted file mode 100644 index 057fa9cc9d..0000000000 --- a/sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md +++ /dev/null @@ -1,106 +0,0 @@ -FSSlc translating - -How to Generate/Encrypt/Decrypt Random Passwords in Linux -================================================================================ -We have taken initiative to produce Linux tips and tricks series. If you’ve missed the last article of this series, you may like to visit the link below. - -注:此篇文章做过原文 -- [5 Interesting Command Line Tips and Tricks in Linux][1] - -In this article, we will share some interesting Linux tips and tricks to generate random passwords and also how to encrypt and decrypt passwords with or without slat method. - -Security is one of the major concern of digital age. We put on password to computers, email, cloud, phone, documents and what not. We all know the basic to choose the password that is easy to remember and hard to guess. What about some sort of machine based password generation automatically? Believe me Linux is very good at this. - -**1. Generate a random unique password of length equal to 10 characters using command ‘pwgen‘. If you have not installed pwgen yet, use Apt or YUM to get.** - - $ pwgen 10 1 - -![Generate Random Unique Password](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Random-Unique-Password-in-Linux.gif) -Generate Random Unique Password - -Generate several random unique passwords of character length 50 in one go! - - $ pwgen 50 - -![Generate Multiple Random Passwords](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Multiple-Random-Passwords.gif) -Generate Multiple Random Passwords - -**2. You may use ‘makepasswd‘ to generate random, unique password of given length as per choice. Before you can fire makepasswd command, make sure you have installed it. If not! Try installing the package ‘makepasswd’ using Apt or YUM.** - -Generate a random password of character length 10. Default Value is 10. - - $ makepasswd - -![makepasswd Generate Unique Password](http://www.tecmint.com/wp-content/uploads/2015/03/mkpasswd-generate-unique-password.gif) -makepasswd Generate Unique Password - -Generate a random password of character length 50. - - $ makepasswd --char 50 - -![Generate Length 50 Password](http://www.tecmint.com/wp-content/uploads/2015/03/Random-Password-Generate.gif) -Generate Length 50 Password - -Generate 7 random password of 20 characters. - - $ makepasswd --char 20 --count 7 - -![](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-20-Character-Password.gif) - -**3. Encrypt a password using crypt along with salt. Provide salt manually as well as automatically.** - -For those who may not be aware of salt, - -Salt is a random data which servers as an additional input to one way function in order to protect password against dictionary attack. - -Make sure you have installed mkpasswd installed before proceeding. - -The below command will encrypt the password with salt. The salt value is taken randomly and automatically. Hence every time you run the below command it will generate different output because it is accepting random value for salt every-time. - - $ mkpasswd tecmint - -![Encrypt Password Using Crypt](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-Password-in-Linux.gif) -Encrypt Password Using Crypt - -Now lets define the salt. It will output the same result every-time. Note you can input anything of your choice as salt. - - $ mkpasswd tecmint -s tt - -![Encrypt Password Using Salt](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-Password-Using-Salt.gif) -Encrypt Password Using Salt - -Moreover, mkpasswd is interactive and if you don’t provide password along with the command, it will ask password interactively. - -**4. Encrypt a string say “Tecmint-is-a-Linux-Community” using aes-256-cbc encryption using password say “tecmint” and salt.** - - # echo Tecmint-is-a-Linux-Community | openssl enc -aes-256-cbc -a -salt -pass pass:tecmint - -![Encrypt A String in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-A-String-in-Linux.gif) -Encrypt A String in Linux - -Here in the above example the output of 注:此篇原文也做过[echo command][2] is pipelined with openssl command that pass the input to be encrypted using Encoding with Cipher (enc) that uses aes-256-cbc encryption algorithm and finally with salt it is encrypted using password (tecmint). - -**5. Decrypt the above string using openssl command using the -aes-256-cbc decryption.** - - # echo U2FsdGVkX18Zgoc+dfAdpIK58JbcEYFdJBPMINU91DKPeVVrU2k9oXWsgpvpdO/Z | openssl enc -aes-256-cbc -a -d -salt -pass pass:tecmint - -![Decrypt String in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Decrypt-String-in-Linux.gif) -Decrypt String in Linux - -That’s all for now. If you know any such tips and tricks you may send us your tips at admin@tecmint.com, your tip will be published under your name and also we will include it in our future article. - -Keep connected. Keep Connecting. Stay Tuned. Don’t forget to provide us with your valuable feedback in the comments below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/generate-encrypt-decrypt-random-passwords-in-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://www.tecmint.com/5-linux-command-line-tricks/ -[2]:http://www.tecmint.com/echo-command-in-linux/ diff --git a/translated/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md b/translated/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md new file mode 100644 index 0000000000..dcb675d782 --- /dev/null +++ b/translated/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md @@ -0,0 +1,103 @@ +如何在 Linux 中产生、加密或解密随机密码 +================================================================================ +我们一直积极地提供有关 Linux 技巧的系列文章,如果你错过了这个系列的最新文章,你或许可以去访问下面的链接。 + +注:此篇文章做过原文 +- [Linux 中 5 个有趣的命令行技巧][1] (注:这篇文章还没有被翻译,在 20150316 选的题) + +在这篇文章中,我们将分享一些有趣 Linux 技巧,内容是有关如何产生随机密码以及加密或解密这些经过加盐或没有加盐处理的密码。 + +安全是数字时代中的一个主要话题。在电脑,email,云端,手机,文档和其他的场合中,我们都会使用到密码。众所周知,选择密码的基本原则是 “易记,难猜”。考虑过使用基于机器自动生成的密码吗?相信我,Linux 非常擅长这方面的工作。 + +**1. 使用命令 `pwgen` 来生成一个长度为 10 个字符的唯一的随机密码。假如你还没有安装 pwgen,请使用 Apt 或 YUM 等包管理器来安装它。** + + $ pwgen 10 1 + +![生成一个唯一的随机密码](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Random-Unique-Password-in-Linux.gif) +生成一个唯一的随机密码 + +一口气生成若干组长度为 50 个字符的唯一的随机密码! + + $ pwgen 50 + +![生成多组随机密码](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Multiple-Random-Passwords.gif) +生成多组随机密码 + +**2. 你还可以使用 `makepasswd` 来每次生成一个给定长度的唯一的随机密码。在你把玩 makepasswd 命令之前,请确保你已经安装了它。如若没有安装它,试试使用 Apt 或 YUM 包管理器来安装 `makepasswd`这个软件包。** + +生成一个长度为 10 个字符的随机密码。该命令产生的密码的长度默认为 10。 + + $ makepasswd + +![使用 makepasswd 生成唯一的密码](http://www.tecmint.com/wp-content/uploads/2015/03/mkpasswd-generate-unique-password.gif) +使用 makepasswd 生成唯一的密码 + +生成一个长度为 50 个字符的随机密码。 + + $ makepasswd --char 50 + +![生成长度为 50 的密码](http://www.tecmint.com/wp-content/uploads/2015/03/Random-Password-Generate.gif) +生成长度为 50 的密码 + +生成 7 个长度为 20 个字符的随机密码。 + + $ makepasswd --char 20 --count 7 + +![](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-20-Character-Password.gif) + +**3. 使用带“盐”的 Crypt(注:这里应该指的是一个函数,可以参考[这里](http://man7.org/linux/man-pages/man3/crypt.3.html) ) 来加密一个密码。提供手动或自动添加 “盐”。** + +对于那些不清楚 **盐** 的意义的人, + +这里的 “盐” 指的是一个随机数据,它作为密码生成函数的一个额外的输入, 目的是保护密码免受词典攻击。 + +在执行下面的操作前,请确保你已经安装了 `mkpasswd`。 + +下面的命令将带 “盐” 加密一个密码。“盐” 的值是随机自动生成的。所以每次你运行下面的命令时,都将产生不同的输出,因为它每次接受了随机取值的 “盐”。 + + $ mkpasswd tecmint + +![使用 Crypt 来加密密码](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-Password-in-Linux.gif) +使用 Crypt 来加密密码 + +现在让我们来手动定义 “盐” 的值。每次它将产生相同的结果。请注意你可以输入任何你想输入的值来作为 “盐” 的值。 + + $ mkpasswd tecmint -s tt + +![带“盐”加密密码](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-Password-Using-Salt.gif) +带“盐”加密密码 + +另外, mkpasswd 还是交互式的,假如你在命令中没有提供密码,它将主动询问你来输入密码。 + +**4. 使用 aes-256-cbc 加密算法并使用密码(如 “tecmint”) 并带“盐” 加密一个字符串(如 “Tecmint-is-a-Linux-Community”)。** + + # echo Tecmint-is-a-Linux-Community | openssl enc -aes-256-cbc -a -salt -pass pass:tecmint + +![在 Linux 中加密一个字符串](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-A-String-in-Linux.gif) +在 Linux 中加密一个字符串 + +在上面例子中, [echo 命令][2](注:此篇原文也做过,这里是链接 http://linux.cn/article-3948-1.html) 的输出通过管道传递给了 openssl 命令,使得该输出被 Cipher(enc) 所加密,这个过程中使用了 aes-256-cbc 加密算法,并附带了密码 (tecmint) 和 “盐” 。 + +**5. 使用 openssl 命令的 -aes-256-cbc 解密选项来解密上面的字符串。** + + # echo U2FsdGVkX18Zgoc+dfAdpIK58JbcEYFdJBPMINU91DKPeVVrU2k9oXWsgpvpdO/Z | openssl enc -aes-256-cbc -a -d -salt -pass pass:tecmint + +![在 Linux 中解密字符串](http://www.tecmint.com/wp-content/uploads/2015/03/Decrypt-String-in-Linux.gif) +在 Linux 中解密字符串 + +现在就是这些内容了。假如你知道任何这类的技巧,请将你的技巧发送到 admin@tecmint.com 邮箱中,你的技巧将会以你的名义来发表,同时我们也将在我们将来的文章中把它包含进去。 + +保持联系,保持连接,敬请关注。不要忘了在下面的评论中提供给我们您有价值的反馈。 +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/generate-encrypt-decrypt-random-passwords-in-linux/ + +作者:[Avishek Kumar][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/5-linux-command-line-tricks/ +[2]:http://www.tecmint.com/echo-command-in-linux/ \ No newline at end of file From 92fbfd9b4d47989bd4df9c8ac0474eaa6200e04e Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 18 Apr 2015 22:58:43 +0800 Subject: [PATCH 018/154] PUB:20150410 10 Famous IT Skills in Demand That Will Get You Hired @wi-cuckoo --- ...T Skills in Demand That Will Get You Hired.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) rename {translated/talk => published}/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md (93%) diff --git a/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md b/published/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md similarity index 93% rename from translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md rename to published/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md index 286572f959..df972fb96b 100644 --- a/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md +++ b/published/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md @@ -6,41 +6,41 @@ ### 1. VMware ### -VMware公司设计的虚拟化和云计算软件高居榜首。VMware首次宣布商业支持x86架构的虚拟化。VMware的需求在上个季度已经增长至16%。 +VMware公司设计的虚拟化和云计算软件高居榜首。VMware首次宣布商业支持x86架构的虚拟化。VMware的招聘需求在上个季度已经增长至16%。 最新稳定发行版: 11.0 ### 2. MySQL ### -这款开源的关系型数据库管理系统憾居第二。直到2013年,MySQL都还是第二大使用广泛的RDBMS(注:Relational Database Management System)。上季度MySQL的需求已经达到了11%。继甲骨文公司之后,著名的MarialDB也已经被分出MySQL了,值得去拥有。 +这款开源的关系型数据库管理系统憾居第二。直到2013年,MySQL都还是第二大使用广泛的RDBMS(注:Relational Database Management System)。上季度MySQL的招聘需求已经达到了11%。非常著名的MarialDB就是来自被甲骨文公司收购之后的MySQL的分支。值得掌握。 最新稳定发行版: 5.6.23 ### 3. Apache ### -这个跨平台的开源网页(HTTP)服务器位居第三。截至上个季度,Apache的需求已经超过了13%。 +这个跨平台的开源网页(HTTP)服务器位居第三。截至上个季度,Apache的招聘需求已经超过了13%。 最新稳定发行版: 2.4.12 ### 4. AWS ### -亚马逊网页服务器是亚马逊网站提供的所有远程计算服务的集合,AWS排在第四位。上个季度,AWS的需求已经呈现出将近14%的增长。 +AWS是亚马逊网站提供的所有远程计算服务的集合,AWS排在第四位。上个季度,AWS的招聘需求已经呈现出将近14%的增长。 ### 5. Puppet ### -Puppet作为配置管理系统被应用在设置IT基础架构,它排在第五位。它用Ruby语言编写,属于客户端-服务器型的结构。上个季度puppet的需求已经增长超过9%。 +Puppet作为配置管理系统被应用在设置IT基础架构,它排在第五位。它用Ruby语言编写,属于客户端-服务器型的结构。上个季度puppet的招聘需求已经增长超过9%。 最新稳定发行版: 3.7.3 ### 6. Hadoop ### -Hadoop是用Java编写的一款开源软件框架,用于处理大数据。列表中Hadoop位列第六。对Hadoop的需求在上个季度已经下降了0.2个百分点。 +Hadoop是用Java编写的一款开源软件框架,用于处理大数据。列表中Hadoop位列第六。对Hadoop的招聘需求在上个季度已经下降了0.2个百分点。 最新稳定发行版: 2.6.0 ### 7. Git ### -Linux Torvalds最初编写的著名版本控制系统Git排在了第七。Git的需求在上个季度已经超过了7%。 +Linux Torvalds最初编写的著名版本控制系统Git排在了第七。Git的招聘需求在上个季度已经超过了7%。 最新稳定发行版: 2.3.4 @@ -58,6 +58,8 @@ Oracle公司开发的SQL扩展版,占据第八的位置。PL/SQL从Oracle 7后 这款最著名的企业资源规划软件排在了第十。上个季度SAP在需求市场表现出将近3.5%的增长。 +具体数据表格如下: + From 65090f8735dc606d8338346a06c977092b2a0488 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 18 Apr 2015 23:35:01 +0800 Subject: [PATCH 019/154] PUB:20150409 How to Run GUI Apps in a Docker Container @geekpi --- ... How to Run GUI Apps in a Docker Container.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename translated/tech/150409 How to Run GUI Apps in a Docker Container.md => published/20150409 How to Run GUI Apps in a Docker Container.md (73%) diff --git a/translated/tech/150409 How to Run GUI Apps in a Docker Container.md b/published/20150409 How to Run GUI Apps in a Docker Container.md similarity index 73% rename from translated/tech/150409 How to Run GUI Apps in a Docker Container.md rename to published/20150409 How to Run GUI Apps in a Docker Container.md index abca032354..4f2e439799 100644 --- a/translated/tech/150409 How to Run GUI Apps in a Docker Container.md +++ b/published/20150409 How to Run GUI Apps in a Docker Container.md @@ -1,12 +1,12 @@ 如何在Docker容器中运行GUI程序 ================================================================================ -各位,今天我们将学习如何在[Docker][1]之中运行GUI程序。我们可以轻易地在Docker容器中运行大多数GUI程序且不出错。Docker是一个开源项目,提供了一个打包、分发和运行任意程序的轻量级容器的开放平台。它没有语言支持、框架或者打包系统的限制并可以在任何地方、任何时候,从小型的家用电脑到高端的服务器都可以运行。这让人们可以打包不同的包用于部署和扩展网络应用,数据库和后端服务而不必依赖于特定的栈或者提供商。 +各位,今天我们将学习如何在[Docker][1]之中运行GUI程序。我们可以轻易地在Docker容器中运行大多数GUI程序且不出错。Docker是一个开源项目,提供了一个打包、分发和运行任意程序的轻量级容器的开放平台。它没有语言支持、框架或者打包系统的限制,并可以运行在任何地方、任何时候,从小型的家用电脑到高端的服务器都可以运行。这让人们可以打包不同的包用于部署和扩展网络应用,数据库和后端服务而不必依赖于特定的栈或者提供商。 下面是我们该如何在Docker容器中运行GUI程序的简单步骤。本教程中,我们会用Firefox作为例子。 ### 1. 安装 Docker ### -在开始事前,我们首先得确保在Linux主机中已经安装了Docker。这里,我运行的是CentOS 7 主机,我们将运行yum管理器和下面的命令来安装Docker。 +在开始前,我们首先得确保在Linux主机中已经安装了Docker。这里,我运行的是CentOS 7 主机,我们将运行yum管理器和下面的命令来安装Docker。 # yum install docker @@ -16,7 +16,7 @@ ### 2. 创建 Dockerfile ### -现在,Docker守护进程已经在运行中了,我们现在准备创建自己的Firefox Docker容器。我们要创建一个Dockerfile,这里我们要输入需要的配置来创建一个可以工作的Firefox容器。我们取下CentOS中最新的Docker镜像。至此,我们需要用文本编辑器创建一个名为Dockerfile的文件。 +现在,Docker守护进程已经在运行中了,我们现在准备创建自己的Firefox Docker容器。我们要创建一个Dockerfile,在其中我们要输入需要的配置来创建一个可以工作的Firefox容器。为了运行 Docker 镜像我们需要使用最新版本的CentOS。要创建 Docker 镜像,我们需要用文本编辑器创建一个名为Dockerfile的文件。 # nano Dockerfile @@ -25,12 +25,12 @@ #!/bin/bash FROM centos:7 RUN yum install -y firefox - # Replace 0 with your user / group id + # 用你自己的 uid /gid 替换下面的0 RUN export uid=0 gid=0 RUN mkdir -p /home/developer RUN echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd RUN echo "developer:x:${uid}:" >> /etc/group - RUN echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers + RUN echo "developer ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers RUN chmod 0440 /etc/sudoers RUN chown ${uid}:${gid} -R /home/developer @@ -56,13 +56,13 @@ ### 4. 运行Docker容器 ### -现在,如果一切顺利,我们现在可以在运行着CentOS 7镜像的Docker容器中运行我们的GUI程序也就是Firefox浏览器了。 +现在,如果一切顺利,我们现在可以在运行在CentOS 7镜像中的Docker容器里面运行我们的GUI程序也就是Firefox浏览器了。 # docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix firefox ### 总结 ### -在Dcoker容器中运行GUI程序是一次很棒的体验,它对你的主机文件系统没有任何的伤害。它完全依赖你的Docker容器。本教程中,我尝试了CentOS 7 Docker中的Firefox。我们可以用这个技术尝试更多的GUI程序。如果你有任何问题、建议、反馈请在下面的评论栏中写下来,这样我们可以提升或更新我们的内容。谢谢! +在Docker容器中运行GUI程序是一次很棒的体验,它对你的主机文件系统没有任何的伤害。它完全依赖你的Docker容器。本教程中,我尝试了CentOS 7 Docker中的Firefox。我们可以用这个技术尝试更多的GUI程序。如果你有任何问题、建议、反馈请在下面的评论栏中写下来,这样我们可以提升或更新我们的内容。谢谢! -------------------------------------------------------------------------------- @@ -70,7 +70,7 @@ via: http://linoxide.com/linux-how-to/run-gui-apps-docker-container/ 作者:[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 6b5a960cc8c302dba0e4c39600fd6cb5b08a51ad Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 19 Apr 2015 15:53:11 +0800 Subject: [PATCH 020/154] translated --- .../20150417 sshuttle--A transparent proxy-based VPN using ssh.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources/tech => translated}/20150417 sshuttle--A transparent proxy-based VPN using ssh.md (100%) diff --git a/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md b/translated/20150417 sshuttle--A transparent proxy-based VPN using ssh.md similarity index 100% rename from sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md rename to translated/20150417 sshuttle--A transparent proxy-based VPN using ssh.md From cbd84c831edb7edceee5477170c7cf241cb32286 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 19 Apr 2015 15:54:10 +0800 Subject: [PATCH 021/154] Delete 20150417 sshuttle--A transparent proxy-based VPN using ssh.md --- ...A transparent proxy-based VPN using ssh.md | 93 ------------------- 1 file changed, 93 deletions(-) delete mode 100644 translated/20150417 sshuttle--A transparent proxy-based VPN using ssh.md diff --git a/translated/20150417 sshuttle--A transparent proxy-based VPN using ssh.md b/translated/20150417 sshuttle--A transparent proxy-based VPN using ssh.md deleted file mode 100644 index 297f411840..0000000000 --- a/translated/20150417 sshuttle--A transparent proxy-based VPN using ssh.md +++ /dev/null @@ -1,93 +0,0 @@ -sshuttle - 一个使用ssh的基于VPN的透明代理 -================================================================================ -sshuttle允许你通过ssh创建一条从你电脑连接到任何远程服务器的VPN连接,只要你的服务器支持python2.3 或则更高的版本, 你必须有本机的root权限,但是你可以在服务端有普通账户即可。 - -你可以在一台机器上同时运行多次sshuttle来连接到不同的服务器上,这样你就可以一次使用多个VPN, sshuttle可以转发你子网所有流量到VPN中。 - - -### 在Ubuntu中安装sshuttle ### - -在终端中输入下面的命令 - - sudo apt-get install sshuttle - -### 使用 sshuttle ### - -#### sshuttle 语法 #### - - sshuttle [options...] [-r [username@]sshserver[:port]] [subnets] - -#### Option 细节 #### - --r, —remote=[username@]sshserver[:port] - -远程主机名和可选的用户名,用于连接远程服务器的ssh端口号。比如example.com、testuser@example.com、testuser@example.com:2222或者example.com:2244。 - -#### sshuttle 例子 #### - -在机器中使用下面的命令: - - sudo sshuttle -r username@sshserver 0.0.0.0/0 -vv - -当开始后,sshuttle会创建一个ssh会话到通过-r指定的服务器。如果-r被忽略了,它会在本地运行客户端和服务端,这个有时会在测试时有用。 - -连接到远程服务器后,sshuttle会上传它的(python)源码到远程服务器并执行。那么,你就不需要在远程服务器上安装sshuttle,并且客户端和服务器端间不会存在sshuttle版本冲突。 - -#### 手册中的更多例子 #### - -代理所有的本地连接用于本地测试,没有使用ssh: - - $ sudo sshuttle -v 0/0 - - Starting sshuttle proxy. - Listening on (‘0.0.0.0′, 12300). - [local sudo] Password: - firewall manager ready. - c : connecting to server... - s: available routes: - s: 192.168.42.0/24 - c : connected. - firewall manager: starting transproxy. - c : Accept: ‘192.168.42.106':50035 -> ‘192.168.42.121':139. - c : Accept: ‘192.168.42.121':47523 -> ‘77.141.99.22':443. - ...etc... - ^C - firewall manager: undoing changes. - KeyboardInterrupt - c : Keyboard interrupt: exiting. - c : SW#8:192.168.42.121:47523: deleting - c : SW#6:192.168.42.106:50035: deleting - -测试到远程服务器上的连接,自动猜测主机名和子网: - - $ sudo sshuttle -vNHr example.org - - Starting sshuttle proxy. - Listening on (‘0.0.0.0′, 12300). - firewall manager ready. - c : connecting to server... - s: available routes: - s: 77.141.99.0/24 - c : connected. - c : seed_hosts: [] - firewall manager: starting transproxy. - hostwatch: Found: testbox1: 1.2.3.4 - hostwatch: Found: mytest2: 5.6.7.8 - hostwatch: Found: domaincontroller: 99.1.2.3 - c : Accept: ‘192.168.42.121':60554 -> ‘77.141.99.22':22. - ^C - firewall manager: undoing changes. - c : Keyboard interrupt: exiting. - c : SW#6:192.168.42.121:60554: deleting - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/sshuttle-a-transparent-proxy-based-vpn-using-ssh.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 From d0979fcbaaaf37435015b028a4e58e6637398ac9 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sun, 19 Apr 2015 20:20:31 +0800 Subject: [PATCH 022/154] translated wi-cuckoo llap --- ...out evil twin access points in the area.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 translated/share/20150410 This tool can alert you about evil twin access points in the area.md diff --git a/translated/share/20150410 This tool can alert you about evil twin access points in the area.md b/translated/share/20150410 This tool can alert you about evil twin access points in the area.md new file mode 100644 index 0000000000..963460501d --- /dev/null +++ b/translated/share/20150410 This tool can alert you about evil twin access points in the area.md @@ -0,0 +1,40 @@ +这个工具可以提醒你一个区域内的假面猎手接入点 (注:evil twin暂无相关翻译) +=============================================================================== +**开发人员称,EvilAP_Defender甚至可以攻击流氓Wi-Fi接入点** + +一个新的开源工具可以定期扫描一个区域,以防流氓Wi-Fi接入点,同时如果发现情况会提醒网络管理员。 + +这个工具叫做EvilAP_Defender,是为监测攻击者配置的恶意接入点而专门设计的,这些接入点冒用合法的名字诱导用户连接上。 + +这类接入点被称做假面猎手,使得黑客们从接入的设备上监听互联网信息流。这可以被用来窃取证书,破坏网站等等。 + +大多数用户设置他们的计算机和设备可以自动连接一些无线网络,比如家里的或者工作地方的网络。尽管如此,当面对两个同名的无线网络时,即SSID相同,有时候甚至时MAC地址也相同,这时候大多数设备会自动连接信号较强的一个。 + +这使得假面猎手的攻击容易实现,因为SSID和BSSID都可以伪造。 + +[EvilAP_Defender][1]是一个叫Mohamed Idris的人用Python语言编写,公布在GitHub上面。它可以使用一个计算机的无线网卡来发现流氓接入点,这些接入点复制了一个真实接入点的SSID,BSSID,甚至是其他的参数如通道,密码,隐私协议和认证信息。 + +该工具首先以学习模式运行,为了发现合法的接入点[AP],并且加入白名单。然后切换到正常模式,开始扫描未认证的接入点。 + +如果一个恶意[AP]被发现了,该工具会用电子邮件提醒网络管理员,但是开发者也打算在未来加入短信提醒功能。 + +该工具还有一个保护模式,在这种模式下,应用会发起一个denial-of-service [DoS]攻击反抗恶意接入点,为管理员采取防卫措施赢得一些时间。 + +“DoS不仅针对有着相同SSID的恶意AP,也针对BSSID(AP的MAC地址)不同或者不同信道的,”Idris在这款工具的文档中说道。“这是避免攻击你的合法网络。” + +尽管如此,用户应该切记在许多国家,攻击别人的接入点,甚至一个可能一个攻击者操控的恶意的接入点,很多时候都是非法的。 + +为了能够运行这款工具,需要Aircrack-ng无线网套装,一个支持Aircrack-ng的无线网卡,MySQL和Python运行环境。 + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2905725/security0/this-tool-can-alert-you-about-evil-twin-access-points-in-the-area.html + +作者:[Lucian Constantin][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Lucian-Constantin/ +[1] https://github.com/moha99sa/EvilAP_Defender/blob/master/README.TXT From f542381b00ccc3aa9a2f5e534896141800919037 Mon Sep 17 00:00:00 2001 From: Louis Wei Date: Sun, 19 Apr 2015 22:32:25 +0800 Subject: [PATCH 023/154] Delete 20150410 This tool can alert you about evil twin access points in the area.md --- ...out evil twin access points in the area.md | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 sources/share/20150410 This tool can alert you about evil twin access points in the area.md diff --git a/sources/share/20150410 This tool can alert you about evil twin access points in the area.md b/sources/share/20150410 This tool can alert you about evil twin access points in the area.md deleted file mode 100644 index b698c5df3b..0000000000 --- a/sources/share/20150410 This tool can alert you about evil twin access points in the area.md +++ /dev/null @@ -1,41 +0,0 @@ -translating wi-cuckoo -This tool can alert you about evil twin access points in the area -================================================================================ -**EvilAP_Defender can even attack rogue Wi-Fi access points for you, the developer says** - -A new open-source tool can periodically scan an area for rogue Wi-Fi access points and can alert network administrators if any are found. - -The tool, called EvilAP_Defender, was designed specifically to detect malicious access points that are configured by attackers to mimic legitimate ones in order to trick users to connect to them. - -These access points are known as evil twins and allow hackers to intercept Internet traffic from devices connected to them. This can be used to steal credentials, spoof websites, and more. - -Most users configure their computers and devices to automatically connect to some wireless networks, like those in their homes or at their workplace. However, when faced with two wireless networks that have the same name, or SSID, and sometimes even the same MAC address, or BSSID, most devices will automatically connect to the one that has the stronger signal. - -This makes evil twin attacks easy to pull off because both SSIDs and BSSIDs can be spoofed. - -[EvilAP_Defender][1] was written in Python by a developer named Mohamed Idris and was published on GitHub. It can use a computer's wireless network card to discover rogue access points that duplicate a real access point's SSID, BSSID, and even additional parameters like channel, cipher, privacy protocol, and authentication. - -The tool will first run in learning mode, so that the legitimate access point [AP] can be discovered and whitelisted. It can then be switched to normal mode to start scanning for unauthorized access points. - -If an evil AP is discovered, the tool can alert the network administrator by email, but the developer also plans to add SMS-based alerts in the future. - -There is also a preventive mode in which the tool can launch a denial-of-service [DoS] attack against the evil AP to buy the administrator some time to take defensive measures. - -"The DoS will only be performed for evil APs which have the same SSID but a different BSSID (AP's MAC address) or run on a different channel," Idris said in the tool's documentation. "This is to avoid attacking your legitimate network." - -However, users should remember that attacking someone else's access point, even a likely malicious one operated by an attacker, is most likely illegal in many countries. - -In order to run, the tool needs the Aircrack-ng wireless suite, a wireless card supported by Aircrack-ng, MySQL and the Python runtime. - --------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/2905725/security0/this-tool-can-alert-you-about-evil-twin-access-points-in-the-area.html - -作者:[Lucian Constantin][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.infoworld.com/author/Lucian-Constantin/ -[1] https://github.com/moha99sa/EvilAP_Defender/blob/master/README.TXT From 0f5c8e38ef175628d70cd79be1e42db27dea731d Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Apr 2015 13:42:27 +0800 Subject: [PATCH 024/154] PUB:20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17 @martin2011qi --- ...esktop on Ubuntu 14.10 or Linux Mint 17.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) rename {translated/tech => published}/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md (60%) diff --git a/translated/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md b/published/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md similarity index 60% rename from translated/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md rename to published/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md index ae7968afd0..a881b2fcc6 100644 --- a/translated/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md +++ b/published/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md @@ -1,10 +1,10 @@ -在Ubuntu14.10/Mint7上安装Gnome Flashback classical桌面 +在Ubuntu14.10/Mint7上安装Gnome Flashback 经典桌面 ================================================================================ 如果你不喜欢现在的Unity桌面,[Gnome Flashback][1]桌面环境是一个简单的并且很棒的选择,让你能找回曾经经典的桌面。 Gnome Flashback基于GTK3并提供与原先gnome桌面视觉上相似的界面。 -gnome flashback的另一个改变是采用了源自mint和xface的MATE桌面,但无论mint还是xface都是基于gtk2的。 + Gnome Flashback的另一个改变是采用了源自mint和xface的MATE桌面,但无论mint还是xface都是基于GTK2的。 ### 安装 Gnome Flashback ### @@ -12,7 +12,7 @@ gnome flashback的另一个改变是采用了源自mint和xface的MATE桌面, $ sudo apt-get install gnome-session-flashback -然后注销到达登录界面,单击密码输入框右上角的徽标型按钮,即可选择桌面环境。可供选择的有Gnome Flashback (Metacity) 会话模式和Gnome Flashback (Compiz)会话模式。 +然后注销返回到登录界面,单击密码输入框右上角的徽标型按钮,即可选择桌面环境。可供选择的有Gnome Flashback (Metacity) 会话模式和Gnome Flashback (Compiz)会话模式。 Metacity更轻更快,而Compiz则能带给你更棒的桌面效果。下面是我使用gnome flashback桌面的截图。 @@ -24,17 +24,17 @@ Metacity更轻更快,而Compiz则能带给你更棒的桌面效果。下面是 ### 1. 安装 Gnome Tweak Tool ### -Gnome Tweak Tool能够帮助你定制比如字体、主题等,那些在Unity桌面的控制中心十分困难或是不可能完成的任务。 +Gnome Tweak Tool能够帮助你定制比如字体、主题等,这些在Unity桌面的控制中心是十分困难,几乎不可能完成的任务。 $ sudo apt-get install gnome-tweak-tool -启动按步骤 应用程序 > 系统工具 > 首选项 > Tweak Tool +启动按步骤: 应用程序 > 系统工具 > 首选项 > Tweak Tool ### 2. 在面板上添加小应用 ### -默认的右键点击面板是没有效果的。你可以尝试在右键点击面板的同时按住键盘上的Alt+Super (win)键,这样定制面板的相关选项将会出现。 +默认的右键点击面板是没有效果的。你可以尝试在右键点击面板的同时按住键盘上的Alt+Super (win)键,这样就会出现定制面板的相关选项。 -你可以修改或删除面板并在上面添加些小应用。在这个例子中我们移除了底部面板,并用Plank dock来代替它的位置。 +你可以修改或删除面板,并在上面添加些小应用。在这个例子中我们移除了底部面板,并用Plank dock来代替它的位置。 在顶部面板的中间添加一个显示时间的小应用。通过配置使它显示时间和天气。 @@ -42,7 +42,7 @@ Gnome Tweak Tool能够帮助你定制比如字体、主题等,那些在Unity ### 3. 将窗口标题栏的按钮右置 ### -在ubuntu中,最小化、最大化和关闭按钮默认实在标题栏的左侧的。需要稍作手脚才能让他们乖乖回到右边去。 +在ubuntu中,最小化、最大化和关闭按钮默认是在标题栏左侧的。需要稍作手脚才能让他们乖乖回到右边去。 想让窗口的按钮到右边可以使用下面的命令,这是我在askubuntu上找到的。 @@ -50,7 +50,7 @@ Gnome Tweak Tool能够帮助你定制比如字体、主题等,那些在Unity ### 4.安装 Plank dock ### -plank dock位于屏幕底部用于启动应用和切换打开的窗口。会在必要的时间隐藏自己,并在需要的时候出现。elementary OS使用的dock就是plank dock。 +plank dock位于屏幕底部,用于启动应用和切换打开的窗口。它会在必要的时间隐藏自己,并在需要的时候出现。elementary OS使用的dock就是plank dock。 运行以下命令安装: @@ -58,11 +58,11 @@ plank dock位于屏幕底部用于启动应用和切换打开的窗口。会在 $ sudo apt-get update $ sudo apt-get install plank -y -现在启动 应用程序 > 附件 > Plank。若想让它开机自动启动,找到 应用程序 > 系统工具 > 首选项 > 启动应用程序 并将“plank”的命令加到列表中。 +现在启动:应用程序 > 附件 > Plank。若想让它开机自动启动,找到 应用程序 > 系统工具 > 首选项 > 启动应用程序 并将“plank”的命令加到列表中。 ### 5. 安装 Conky 系统监视器 ### -Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰桌面。它不太占资源并且运行的大部分时间都不惹麻烦。 +Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰桌面。它不太占资源,并且绝大部分情况下运行都不会有什么问题。 运行如下命令安装: @@ -70,7 +70,7 @@ Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰 $ sudo apt-get update $ sudo apt-get install conky-manager -现在启动 应用程序 > 附件 > Conky Manager 选择你想在桌面上显示的部件。Conky Manager同样可以配置到启动项中。 +现在启动:应用程序 > 附件 > Conky Manager ,选择你想在桌面上显示的部件。Conky Manager同样可以配置到启动项中。 ### 6. 安装CCSM ### @@ -80,10 +80,10 @@ Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰 $ sudo apt-get install compizconfig-settings-manager -启动按步骤 应用程序 > 系统工具 > 首选项 > CompizConfig Settings Manager. +启动按步骤: 应用程序 > 系统工具 > 首选项 > CompizConfig Settings Manager. ->在虚拟机中经常会发生compiz会话中装饰窗口消失。可以通过启动Compiz设置,在打开"Copy to texture",注销后重新登录即可。 +> 在虚拟机中经常会发生compiz会话中装饰窗口消失。可以通过启动Compiz设置,并启用"Copy to texture"插件,注销后重新登录即可。 不过值得一提的是Compiz 会话会比Metacity慢。 @@ -92,8 +92,8 @@ Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰 via: http://www.binarytides.com/install-gnome-flashback-ubuntu/ 作者:[Silver Moon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 4bc14078465148573606d4e9a5fcc167125027fd Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Apr 2015 15:02:20 +0800 Subject: [PATCH 025/154] PUB:20150205 25 Linux Shell Scripting interview Questions & Answers @Vic020 --- ...Scripting interview Questions & Answers.md | 89 ++++++++++--------- 1 file changed, 46 insertions(+), 43 deletions(-) rename {translated/tech => published}/20150205 25 Linux Shell Scripting interview Questions & Answers.md (66%) diff --git a/translated/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md b/published/20150205 25 Linux Shell Scripting interview Questions & Answers.md similarity index 66% rename from translated/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md rename to published/20150205 25 Linux Shell Scripting interview Questions & Answers.md index 9a131bee9d..f320335396 100644 --- a/translated/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md +++ b/published/20150205 25 Linux Shell Scripting interview Questions & Answers.md @@ -1,39 +1,42 @@ -Linux Shell脚本 入门25问 +Linux Shell脚本面试25问 ================================================================================ -### Q:1 Shell脚本是什么、为什么它是必需的吗? ### +### Q:1 Shell脚本是什么、它是必需的吗? ### -答:一个Shell脚本是一个文本文件,包含一个或多个命令。作为系统管理员,我们经常需要发出多个命令来完成一项任务,我们可以添加这些所有命令在一个文本文件(Shell脚本)来完成日常工作任务。 +答:一个Shell脚本是一个文本文件,包含一个或多个命令。作为系统管理员,我们经常需要使用多个命令来完成一项任务,我们可以添加这些所有命令在一个文本文件(Shell脚本)来完成这些日常工作任务。 ### Q:2 什么是默认登录shell,如何改变指定用户的登录shell ### -答:在Linux操作系统,“/ bin / bash”是默认登录shell,在用户创建时被分配的。使用chsh命令可以改变默认的shell。示例如下所示: +答:在Linux操作系统,“/bin/bash”是默认登录shell,是在创建用户时分配的。使用chsh命令可以改变默认的shell。示例如下所示: - # chsh -s + # chsh <用户名> -s <新shell> # chsh linuxtechi -s /bin/sh -### Q:3 有什么不同的类型在shell脚本中使用? ### +### Q:3 可以在shell脚本中使用哪些类型的变量? ### -答:在shell脚本,我们可以使用两个类型变量: +答:在shell脚本,我们可以使用两种类型的变量: - 系统定义变量 - 用户定义变量 +系统变量是由系统系统自己创建的。这些变量通常由大写字母组成,可以通过“**set**”命令查看。 -系统变量是由系统系统自己创建的。这些变量由大写字母组成,可以通过“**set**”命令查看。 +用户变量由系统用户来生成和定义,变量的值可以通过命令“`echo $<变量名>`”查看。 -用户变量由系统用户来生成,变量的值可以通过命令“`echo $<变量名>`”查看 - -### Q:4 如何同时重定向标准输出和错误输出到同一位置? ### +### Q:4 如何将标准输出和错误输出同时重定向到同一位置? ### 答:这里有两个方法来实现: -方法1:2>&1 (# ls /usr/share/doc > out.txt 2>&1 ) +方法一: -方法二:&> (# ls /usr/share/doc &> out.txt ) + 2>&1 (如# ls /usr/share/doc > out.txt 2>&1 ) -### Q:5 shell脚本中“if”的语法 ? ### +方法二: -答:基础语法: + &> (如# ls /usr/share/doc &> out.txt ) + +### Q:5 shell脚本中“if”语法如何嵌套? ### + +答:基础语法如下: if [ 条件 ] then @@ -72,9 +75,9 @@ Linux Shell脚本 入门25问 如果结束状态不是0,说明命令执行失败。 -### Q:7 在shell脚本中如何比较两个数 ? ### +### Q:7 在shell脚本中如何比较两个数字 ? ### -答:测试用例使用if-then来比较两个数,例子如下: +答:在if-then中使用测试命令( -gt 等)来比较两个数字,例子如下: #!/bin/bash x=10 @@ -89,11 +92,11 @@ Linux Shell脚本 入门25问 ### Q:8 shell脚本中break命令的作用 ? ### -答:break命令一个简单的用途是退出执行中的循环。我们可以在while 和until循环中使用break命令跳出循环。 +答:break命令一个简单的用途是退出执行中的循环。我们可以在while和until循环中使用break命令跳出循环。 ### Q:9 shell脚本中continue命令的作用 ? ### -答:continue命令不同于break命令,它只跳出当前循环的迭代,而不是整个循环。continue命令很多时候是很有用的,例如错误发生,但我们依然希望循环继续的时候。 +答:continue命令不同于break命令,它只跳出当前循环的迭代,而不是**整个**循环。continue命令很多时候是很有用的,例如错误发生,但我们依然希望继续执行大循环的时候。 ### Q:10 告诉我shell脚本中Case语句的语法 ? ### @@ -116,14 +119,14 @@ Linux Shell脚本 入门25问 ### Q:11 shell脚本中while循环语法 ? ### -答:如同for循环,while循环重复自己所有命令只要条件成立,不同于for循环。基础语法: +答:如同for循环,while循环只要条件成立就重复它的命令块。不同于for循环,while循环会不断迭代,直到它的条件不为真。基础语法: while [ 条件 ] do 命令… done -### Q:12 如何使脚本成为可执行状态 ? ### +### Q:12 如何使脚本可执行 ? ### 答:使用chmod命令来使脚本可执行。例子如下: @@ -131,11 +134,11 @@ Linux Shell脚本 入门25问 ### Q:13 “#!/bin/bash”的作用 ? ### -答:#!/bin/bash是shell脚本的第一行,总所周知,#符号调用hash而!调用bang。它的意思是命令使用 /bin/bash来执行命令 +答:#!/bin/bash是shell脚本的第一行,称为释伴(shebang)行。这里#符号叫做hash,而! 叫做 bang。它的意思是命令通过 /bin/bash 来执行。 ### Q:14 shell脚本中for循环语法 ? ### -答:for循环基础语法: +答:for循环的基础语法: for 变量 in 循环列表 do @@ -147,13 +150,13 @@ Linux Shell脚本 入门25问 ### Q:15 如何调试shell脚本 ? ### -答:使用'-x'参数(sh -x myscript.sh)可以调试shell脚本。另一个种方法是使用‘-nv’参数( sh -nv myscript.sh) +答:使用'-x'参数(sh -x myscript.sh)可以调试shell脚本。另一个种方法是使用‘-nv’参数( sh -nv myscript.sh)。 ### Q:16 shell脚本如何比较字符串? ### -答:test命令可以用来比较字符串。Test命令比较字符串通过比较每一个字符来比较。 +答:test命令可以用来比较字符串。测试命令会通过比较字符串中的每一个字符来比较。 -### Q:17 Bourne shell(bash) 中有哪些特别变量 ? ### +### Q:17 Bourne shell(bash) 中有哪些特殊的变量 ? ### 答:下面的表列出了Bourne shell为命令行设置的特殊变量。 @@ -175,7 +178,7 @@ Linux Shell脚本 入门25问

$0

@@ -252,7 +255,7 @@ Linux Shell脚本 入门25问

-d 文件名

@@ -260,7 +263,7 @@ Linux Shell脚本 入门25问

-e 文件名

@@ -268,7 +271,7 @@ Linux Shell脚本 入门25问

-f 文件名

@@ -276,7 +279,7 @@ Linux Shell脚本 入门25问

-r 文件名

@@ -284,7 +287,7 @@ Linux Shell脚本 入门25问

-s 文件名

@@ -292,7 +295,7 @@ Linux Shell脚本 入门25问

-w 文件名

@@ -300,7 +303,7 @@ Linux Shell脚本 入门25问

-x 文件名

@@ -308,15 +311,15 @@ Linux Shell脚本 入门25问 ### Q:19 在shell脚本中,如何写入注释 ? ### -答:注释可以用来描述一个脚本可以做什么和它是如何工作的。每一个注释以#开头。例子如下: +答:注释可以用来描述一个脚本可以做什么和它是如何工作的。每一行注释以#开头。例子如下: #!/bin/bash # This is a command echo “I am logged in as $USER” -### Q:20 如何得到来自终端的命令输入到shell脚本? ### +### Q:20 如何让 shell 就脚本得到来自终端的输入? ### -答:read命令可以读取来自终端(使用键盘)的数据。read命令接入用户的输入并置于变量中。例子如下: +答:read命令可以读取来自终端(使用键盘)的数据。read命令得到用户的输入并置于你给出的变量中。例子如下: # vi /tmp/test.sh @@ -330,9 +333,9 @@ Linux Shell脚本 入门25问 LinuxTechi My Name is LinuxTechi -### Q:21 如何取消设置或取消变量 ? ### +### Q:21 如何取消变量或取消变量赋值 ? ### -答:“unset”命令用于去取消或取消设置一个变量。语法如下所示: +答:“unset”命令用于取消变量或取消变量赋值。语法如下所示: # unset <变量名> @@ -345,7 +348,7 @@ Linux Shell脚本 入门25问 ### Q:23 do-while语句的基本格式 ? ### -答:do-while语句类似于while语句,但检查条件语句之前先执行命令。下面是用do-while语句的语法 +答:do-while语句类似于while语句,但检查条件语句之前先执行命令(LCTT 译注:意即至少执行一次。)。下面是用do-while语句的语法 do { @@ -354,7 +357,7 @@ Linux Shell脚本 入门25问 ### Q:24 在shell脚本如何定义函数呢 ? ### -答:函数是拥有名字的代码块。当我们定义代码块,我们就可以在我们的脚本调用名字,该块就会被执行。示例如下所示: +答:函数是拥有名字的代码块。当我们定义代码块,我们就可以在我们的脚本调用函数名字,该块就会被执行。示例如下所示: $ diskusage () { df -h ; } @@ -371,7 +374,7 @@ Linux Shell脚本 入门25问 ### Q:25 如何在shell脚本中使用BC(bash计算器) ? ### -答:使用下列格式,在shell脚本中使用bc +答:使用下列格式,在shell脚本中使用bc: variable=`echo “options; expression” | bc` @@ -381,7 +384,7 @@ via: http://www.linuxtechi.com/linux-shell-scripting-interview-questions-answers 作者:[Pradeep Kumar][a] 译者:[VicYu/Vic020](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ce9c3803bce8351850699712167838b79140d218 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 20 Apr 2015 15:12:21 +0800 Subject: [PATCH 026/154] =?UTF-8?q?20150420-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...g Linux 'sort' Command Examples--Part 2.md | 131 ++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md diff --git a/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md b/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md new file mode 100644 index 0000000000..6bb7d8159f --- /dev/null +++ b/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md @@ -0,0 +1,131 @@ +7 Interesting Linux ‘sort’ Command Examples – Part 2 +================================================================================ +In our last article we have covered various examples on sort command, if you’ve missed, you can go through it using below link. In continuation to the last post this post aims at covering remaining of sort command so that both the article together serves as complete guide to Linux ‘sort‘ command. + +注:前两天做过这个原文 +- [14 ‘sort’ Command Examples in Linux][1] + +Before we continue further, create a text file ‘month.txt‘ and populate it with the data as given below. + + $ echo -e "mar\ndec\noct\nsep\nfeb\naug" > month.txt + $ cat month.txt + +![Populate Content](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Content.gif) + +### 15. Sort the file ‘month.txt‘ on the basis of month order by using switch ‘M‘ (–month-sort). ### + + $ sort -M month.txt + +**Important**: Note that ‘sort‘ command needs at least 3 characters to consider month name. + +![Sort File Content by Month in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-by-Month.gif) + +### 16. Sort the data that is in human readable format say 1K, 2M, 3G, 2T, where K,M,G,T represents Kilo, Mega, Giga, Tera. ### + + $ ls -l /home/$USER | sort -h -k5 + +![Sort Content Human Readable Format](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-Human-Readable-Format.gif) + +### 17. In the last article we have created a file ‘sorted.txt‘ in example number 4 and another text file ‘lsl.txt‘ in example number 6. We know ‘sorted.txt‘ is already sorted while ‘lsl.txt‘ is not. Lets check both the files are sorted or not using sort command. ### + + $ sort -c sorted.txt + +![Check File is Sorted](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-is-Sorted.gif) + +If it returns 0, means that the file is sorted and there is no conflict. + + $ sort -c lsl.txt + +![Check File Sorted Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-Sorted-Status.gif) + +Reports Disorder. Conflict.. + +### 18. If the delimiter (separator) between words are space, sort command automatically interpret anything after horizontal space as new word. What if the delimiter is not space? ### + +Consider a text file, the contents of which are separated by anything other than space such as ‘|’ or ‘\’ or ‘+’ or ‘.’ or…. + +Create a text file where contents are separated by +. Use ‘cat‘ to check the contents of file. + + $ echo -e "21+linux+server+production\n11+debian+RedHat+CentOS\n131+Apache+Mysql+PHP\n7+Shell Scripting+python+perl\n111+postfix+exim+sendmail" > delimiter.txt + +---------- + + $ cat delimiter.txt + +![Check File Content by Delimiter](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-Content.gif) + +Now sort this file on the basis of 1st field which is numerical. + + $ sort -t '+' -nk1 delimiter.txt + +![Sort File By Fields](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-File-By-Fields.gif) + +And second on the basis of 4th field which is non numeric. + +![Sort Content By Non Numeric](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Non-Numeric.gif) + +If the delimiter is Tab you may use $’\t’ in place of ‘+’, as shown in the above example. + +### 19. Sort the contents of ‘ls -l‘ command for your home directory on the basis of 5th column which represents the ‘amount of data‘ in Random order. ### + + $ ls -l /home/avi/ | sort -k5 -R + +![Sort Content by Column in Random Order](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-by-Column1.gif) + +Every time you run the above piece of script you are likely to get a different result since the result is generated randomly. + +As clear from the Rule number – 2 from the last article, sort command prefer line starting with lowercase characters over uppercase characters. Also check example 3 in last article, where string ‘laptop‘ appears before string ‘LAPTOP‘. + +### 20. How to override the default sorting preference? before we are able to override the default sorting preference we need to export the environment variable LC_ALL to c. To do this run the below code on your Command Line Prompt. ### + + $ export LC_ALL=C + +And then sort the text file ‘tecmint.txt‘ overriding the default sort preference. + + $ sort tecmint.txt + +![Override Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Override-Sorting-Preferences.gif) +Override Sorting Preferences + +Don’t forget to compare the output with the one you achieved in example 3 and also you can use option ‘-f‘ aka ‘–ignore-case‘ to get much organized output. + + $ sort -f tecmint.txt + +![Compare Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Compare-Sorting-Preferences.gif) + +### 21. How about running ‘sort‘ on two input files and join them in one go! ### + +Lets create two text file namely ‘file1.txt‘ and ‘file2.txt‘ and populate it with some data. Here we are populating ‘file1.txt‘ with numbers as below. Also used ‘cat‘ command to check the content of file. + + $ echo -e “5 Reliable\n2 Fast\n3 Secure\n1 open-source\n4 customizable” > file1.txt + $ cat file1.txt + +![Populate Content with Numbers](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Content-with-Number.gif) + +And populate second file ‘file2.txt‘ with some data as. + + $ echo -e “3 RedHat\n1 Debian\n5 Ubuntu\n2 Kali\n4 Fedora” > file2.txt + $ cat file2.txt + +![Populate File with Data](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-File-with-Data.gif) + +Now sort and join the output of both the files. + + $ join <(sort -n file1.txt) <(sort file2.txt) + +![Sort Join Two Files](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Join-Two-Files.gif) + +That’s all for now. Keep Connected. Keep to Tecmint. Please Provide us with your valuable feedback in the comments below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-sort-command-examples/ + +作者:[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://www.tecmint.com/sort-command-linux/ \ No newline at end of file From 39601482c6bbcc8902e5e59dc197763e1896f02c Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Apr 2015 15:41:18 +0800 Subject: [PATCH 027/154] PUB:20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi @geekpi --- ...ers--How to install a USB webcam in Raspberry Pi.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md (91%) diff --git a/translated/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md b/published/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md similarity index 91% rename from translated/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md rename to published/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md index 805a0aaca4..80974a1761 100644 --- a/translated/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md +++ b/published/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md @@ -1,12 +1,12 @@ -Linux有问必答 -- 如何在树莓派上安装USB网络摄像头 +Linux有问必答:如何在树莓派上安装USB网络摄像头 ================================================================================ > **Question**: 我可以在树莓派上使用标准的USB网络摄像头么?我该如何检查USB网络摄像头与树莓派是否兼容?另外我该如何在树莓派上安装它? -如果你想在树莓上拍照或者录影,你可以安装[树莓派的摄像头板][1]。如果你不想要为摄像头模块花费额外的金钱,那有另外一个方法,就是你常见的[USB 摄像头][2]。你可能已经在PC上安装了。 +如果你想在树莓上拍照或者录影,你可以安装[树莓派的摄像头板][1]。如果你不想要为摄像头模块花费额外的金钱,那有另外一个方法,就是你常见的[USB 摄像头][2]。你可能已经在PC上安装过了。 本教程中,我会展示如何在树莓派上设置摄像头。我们假设你使用的系统是Raspbian。 -在此之前,你最好检查一下你的摄像头是否在[这些][3]已知与树莓派兼容的摄像头之中。如果你的摄像头不在这个兼容列表中,不要丧气,仍然有可能你的摄像头被树莓派检测到。 +在此之前,你最好检查一下你的摄像头是否在[这些][3]已知与树莓派兼容的摄像头之中。如果你的摄像头不在这个兼容列表中,不要丧气,仍然有可能树莓派能检测到你的摄像头。 ### 检查USB摄像头是否雨树莓派兼容 ### @@ -34,7 +34,7 @@ fswebcam安装完成后,在终端中运行下面的命令来抓去一张来自 $ fswebcam --no-banner -r 640x480 image.jpg -这条命令可以抓取一张640x480分辨率的照片,并且用jpg格式保存。它不会在照片的地步留下任何标志. +这条命令可以抓取一张640x480分辨率的照片,并且用jpg格式保存。它不会在照片的底部留下任何水印. ![](https://farm8.staticflickr.com/7417/16576645965_302046d230_o.png) @@ -52,7 +52,7 @@ via: http://ask.xmodulo.com/install-usb-webcam-raspberry-pi.html 作者:[Kristophorus Hadiono][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 bf1444f3f542a66c692a43e2231d1b9e21f3d1af Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Apr 2015 16:06:53 +0800 Subject: [PATCH 028/154] PUB:20150119 How to Remember and Restore Running Applications on Next Logon @FSSlc --- ...tore Running Applications on Next Logon.md | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) rename {translated/tech => published}/20150119 How to Remember and Restore Running Applications on Next Logon.md (57%) diff --git a/translated/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md b/published/20150119 How to Remember and Restore Running Applications on Next Logon.md similarity index 57% rename from translated/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md rename to published/20150119 How to Remember and Restore Running Applications on Next Logon.md index e6cc710ae2..b6569bdca4 100644 --- a/translated/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md +++ b/published/20150119 How to Remember and Restore Running Applications on Next Logon.md @@ -1,12 +1,14 @@ -如何记住并在下一次登录时还原正在运行的应用 +如何在 Ubuntu 中再次登录时还原上次运行的应用 ================================================================================ -在你的 Ubuntu 里,你正运行着某些应用,但并不想停掉它们的进程,只想管理一下窗口,并打开那些工作需要的应用。接着,某些其他的事需要你转移注意力或你的机器电量低使得你必须马上关闭电脑。(幸运的是,)你可以让 Ubuntu 记住所有你正运行的应用并在你下一次登录时还原它们。 +在你的 Ubuntu 里,如果你需要处理一些工作,你并不需要关闭正运行着的那些应用,只需要管理一下窗口,并打开那些工作需要的应用就行。然而,如果你需要离开处理些别的事情或你的机器电量低使得你必须马上关闭电脑,这些程序可能就需要关闭终止了。不过幸运的是,你可以让 Ubuntu 记住所有你正运行的应用并在你下一次登录时还原它们。 -现在,为了让我们的 Ubuntu 记住当前会话中正运行的应用并在我们下一次登录时还原它们,我们将会使用到 `dconf-editor`。这个工具代替了前一个 Ubuntu 版本里安装的 `gconf-editor`,但默认情况下并没有在现在这个 Ubuntu 版本(注:这里指的是 Ubuntu 14.04 LTS) 里安装。为了安装 `dconf-editor`, 你需要运行 `sudo apt-get install dconf-editor`命令: +###自动保存会话 + +现在,为了让我们的 Ubuntu 记住当前会话中正运行的应用并在我们下一次登录时还原它们,我们将会使用到 `dconf-editor`。这个工具代替了前一个 Ubuntu 版本里安装的 `gconf-editor`,但默认情况下现在这个 Ubuntu 版本(注:这里指的是 Ubuntu 14.04 LTS) 并没有安装。为了安装 `dconf-editor`, 你需要运行 `sudo apt-get install dconf-editor`命令: $ sudo apt-get install dconf-tools -一旦 `dconf-editor` 安装完毕,你就可以从应用菜单(注:这里指的是 Unity Dash)里打开它或者你可以通过直接在终端里或使用 `alt+f2` 运行下面的命令来启动它: +一旦 `dconf-editor` 安装完毕,你就可以从应用菜单(注:这里指的是 Unity Dash)里打开它,或者你可以通过直接在终端里运行,或使用 `alt+f2` 运行下面的命令来启动它: $ dconf-editor @@ -22,7 +24,7 @@ ![dconf-editor selecting auto save session](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor_selecting_auto_save_session.png) -在你检查或对刚才的选项打钩之后,点击默认情况下位于窗口左上角的关闭按钮(X)来关闭 “Dconf Editor”。 +在你确认对刚才的选项打钩之后,点击默认情况下位于窗口左上角的关闭按钮(X)来关闭 “Dconf Editor”。 ![dconf-editor closing dconf editor](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor_closing_dconf_editor.png) @@ -30,6 +32,10 @@ 欢呼吧,我们已经成功地配置了我们的 Ubuntu 14.04 LTS "Trusty" 来自动记住我们上一次会话中正在运行的应用。 +除了关机后恢复应用之外,还可以通过休眠来达成类似的功能。 + +###休眠功能 + 现在,在这个教程里,我们也将学会 **如何在 Ubuntu 14.04 LTS 里开启休眠功能** : 在开始之前,在键盘上按 `Ctrl+Alt+T` 来开启终端。在它开启以后,运行: @@ -38,15 +44,15 @@ 在你的电脑关闭后,再重新开启它。这时,你开启的应用被重新打开了吗?如果休眠功能没有发挥作用,请检查你的交换分区大小,它至少要和你可用 RAM 大小相当。 -你可以在系统监视器里查看你的交换分区大小,而系统监视器可以通过在应用菜单或在终端里运行下面的命令来开启: +你可以在系统监视器里查看你的交换分区大小,系统监视器可以通过在应用菜单或在终端里运行下面的命令来开启: $ gnome-system-monitor -### 在系统托盘里启用休眠功能: ### +#### 在系统托盘里启用休眠功能: #### -提示模块是通过使用 logind 而不是使用 upower 来更新的。默认情况下,在 upower 和 logind 中,休眠都被禁用了。 +系统托盘里面的会话指示器现在使用 logind 而不是 upower 了。默认情况下,在 upower 和 logind 中,休眠菜单都被禁用了。 -为了开启休眠功能,依次运行下面的命令来编辑配置文件: +为了开启它的休眠菜单,依次运行下面的命令来编辑配置文件: sudo -i @@ -70,26 +76,27 @@ 重启你的电脑就可以了。 -### 当你盖上笔记本的后盖时,让它休眠: ### +#### 当你盖上笔记本的后盖时,让它休眠: #### -1.通过下面的命令编辑文件 “/etc/systemd/logind.conf” : +1. 通过下面的命令编辑文件 “/etc/systemd/logind.conf” : + + $ sudo nano /etc/systemd/logind.conf - $ sudo nano /etc/systemd/logind.conf - -2. 将 **#HandleLidSwitch=suspend** 这一行改为 **HandleLidSwitch=hibernate** 并保存文件; +2. 将 **#HandleLidSwitch=suspend** (挂起)这一行改为 **HandleLidSwitch=hibernate** (休眠)并保存文件; 3. 运行下面的命令或重启你的电脑来应用更改: - $ sudo restart systemd-logind + $ sudo restart systemd-logind + +就是这样。 成功了吗?现在我们设置了 dconf 并开启了休眠功能 :) 这样,无论你是关机还是直接合上笔记本盖子,你的 Ubuntu 将能够完全记住你开启的应用和窗口了。 -就是这样。享受吧!现在我们有了 dconf 并开启了休眠功能 :) 你的 Ubuntu 将能够完全记住你开启的应用和窗口了。 -------------------------------------------------------------------------------- via: http://linoxide.com/ubuntu-how-to/remember-running-applications-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 20498be70d36dc7f3f1bdb7ddbafc541d3836b50 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 20 Apr 2015 16:54:20 +0800 Subject: [PATCH 029/154] =?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 --- ...323 Papyrus--An Open Source Note Manager.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/translated/share/20150323 Papyrus--An Open Source Note Manager.md b/translated/share/20150323 Papyrus--An Open Source Note Manager.md index 87c80fa0ac..abcfe00aca 100644 --- a/translated/share/20150323 Papyrus--An Open Source Note Manager.md +++ b/translated/share/20150323 Papyrus--An Open Source Note Manager.md @@ -2,13 +2,11 @@ Papyrus:开源笔记管理工具 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_4.jpeg) -在上一篇帖子中,我们介绍了[任务管理软件Go For It!][1].今天我们将介绍一款名为**Papyrus的开源笔记软件** +在上一篇帖子中,我们介绍了[待办事项管理软件Go For It!][1]。今天我们将介绍一款名为**Papyrus的开源笔记软件** -[Papyrus][2] 是[Kaqaz笔记管理][3]的变体并使用了QT5.它不仅有简洁、易用的界面,还具备了较好的安全性。由于强调简洁,我觉得Papyrus与OneNote比较相像。你可以将你的笔记像"纸张"一样分类整理,还可以给他们添加标签进行分组。够简单的吧! +[Papyrus][2] 是[Kaqaz笔记管理][3]的一个分支并使用QT5开发。它不仅有简洁、易用的界面,还具备了较好的安全性。由于强调简洁,我觉得Papyrus与OneNote比较相像。你可以将你的笔记像"纸张"一样分类整理,还可以给他们添加标签进行分组。够简单的吧! -### Papyrus的功能: ### - -## Papyrus的功能: ### +## Papyrus 的特性: ### 虽然Papyrus强调简洁,它依然有很多丰富的功能。他的一些主要功能如下: - 按类别和标签管理笔记 @@ -21,9 +19,9 @@ Papyrus:开源笔记管理工具 - 与Dropbox加密同步 - 除Linux外,还可在Android,Windows和OS X使用 -### Install Papyrus ### +### 安装 Papyrus ### -Papyrus为Android用户提供了APK安装包。Windows和OS X也有安装文件。Linux用户还可以获取程序的源码。使用Ubuntu及其他基于Ubuntu的发行版可以使用.deb包进行安装。根据你的系统及习惯,你可以从Papyrus的下载页面中获取不同的文件: +Papyrus为Android用户提供了APK安装包。Windows和OS X也有安装文件。Linux用户还可以获取程序的源码。Ubuntu及其它基于Ubuntu的发行版可以使用.deb包进行安装。根据你的系统及习惯,你可以从Papyrus的下载页面中获取不同的文件: - [下载 Papyrus][4] @@ -40,9 +38,9 @@ Papyrus为Android用户提供了APK安装包。Windows和OS X也有安装文 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux-700x450_c.jpeg) -试试Papyrus吧,你会喜欢上它的。 +试试Papyrus吧,你会喜欢上它的。在下方评论区和我们分享你的使用经验吧。 -(译者注;此软件暂无中文版) +(译者注:此软件暂无中文版) -------------------------------------------------------------------------------- @@ -50,7 +48,7 @@ via: http://itsfoss.com/papyrus-open-source-note-manager/ 作者:[Abhishek][a] 译者:[KevinSJ](https://github.com/KevinSJ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 85c20d34ff60ce02fb80e85f03a7109f5fd2f44d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 20 Apr 2015 17:52:02 +0800 Subject: [PATCH 030/154] =?UTF-8?q?20150420-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...n linux using chattr and lsattr command.md | 200 ++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md diff --git a/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md b/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md new file mode 100644 index 0000000000..4fe935a568 --- /dev/null +++ b/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md @@ -0,0 +1,200 @@ +Managing file & directory attributes in linux using chattr & lsattr command +================================================================================ +There are certain control attributes that may be set on a file or directory in order to allow data to be appended, to prevent it from being changed or deleted, etc. For example, you can enable attributes on a critical system file or directory so that no users, including root, can delete or change it, disallow a backup utility such as the dump command to back up a specific file or directory, and so on. These attributes can only be set on files and directories located in an ext2, ext3, or an ext4 file system + +There are two commands **lsattr** and **chattr** that are used for attribute management. The following is the list of commonly used attributes + +注:表格代码 +
-

来自命令行脚本的名字

+

命令行中的脚本名字

-

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

+

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

-

返回true,如果文件存在

+

如果文件存在,返回true

-

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

+

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

-

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

+

如果文件存在并可读,返回true

-

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

+

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

-

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

+

如果文件存在并可写,返回true

-

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

+

如果文件存在并可执行,返回true

+++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Attributes

+
+

Description

+
+

a (append)

+
+

Append operation is allowed on the file

+
+

A

+
+

This attribute will not allow to update access time of a file

+
+

c (compressed)

+
+

When this attribute is enable then file is compressed on the disk automatically

+
+

d (dump)

+
+

File cannot be backed up using the dump command.

+
+

D

+
+

When D attribute is set on directory then changes are stored synchronously on the disk

+
+

e (extent format)

+
+

It shows that the file is using extents for mapping the blocks on disk

+
+

i (immutable)

+
+

When this attribute is enable on file then we cannot be altered, renamed and delete file.

+
+

j (journaling)

+
+

When this attribute is set then file’s data is stored in journal first then written to file.

+
+

S (synchronous)

+
+

When this attribute is set , then changes or modifications are stored synchronously on the disk

+
+ +Different Options that can be used in chattr Command : + +- **-R** change attributes of directory and its sub-directories recursively +- **-V** Verbose output of chattr command along with version. +- **-f** Suppress most error messages. + +**Operators** that are used in chattr command to set and unset attributes + +- The ‘+’ sign is used to set attribute on the files and directories, +- The ‘-‘ sign is used to remove or unset the attribute +- The ‘=’ sign causes them to be the only attributes that the files have. + +Basic Syntax of **chattr** and **lsattr** command : + + # chattr + + # lsattr + +### Example:1 Make a file immutable using ‘i’ attribute ### + + [root@linuxtechi ~]# chattr +i dummy_data + [root@linuxtechi ~]# lsattr dummy_data + ----i----------- dummy_data + +Now try to remove and edit the File + + [root@linuxtechi ~]# rm -f dummy_data + rm: cannot remove ‘dummy_data’: Operation not permitted + + [root@linuxtechi ~]# echo "test" >> dummy_data + -bash: dummy_data: Permission denied + +### Example:2 Remove the immutable attribute ### + + [root@linuxtechi ~]# chattr -i dummy_data + [root@linuxtechi ~]# lsattr dummy_data + ---------------- dummy_data + +### Example:3 To allow only append operations on the file ### + + [root@linuxtechi ~]# chattr +a dummy_data + [root@linuxtechi ~]# lsattr dummy_data + -----a---------- dummy_data + +Now try to append the contents of fstab file in dummy_data file + + [root@linuxtechi ~]# cat /etc/fstab >> dummy_data + [root@linuxtechi ~]# + +### Example :4 Secure Directory and its sub-directories using -R option and ‘+i’ attribute. ### + +Let’s create a directory sysadmin and its subdirectories + + [root@linuxtechi ~]# mkdir sysadmin + [root@linuxtechi ~]# mkdir sysadmin/admim_{1,2,3,4,5} + [root@linuxtechi ~]# ls -l sysadmin/ + total 0 + drwxr-xr-x. 2 root root 6 Apr 19 09:50 admim_1 + drwxr-xr-x. 2 root root 6 Apr 19 09:50 admim_2 + drwxr-xr-x. 2 root root 6 Apr 19 09:50 admim_3 + drwxr-xr-x. 2 root root 6 Apr 19 09:50 admim_4 + drwxr-xr-x. 2 root root 6 Apr 19 09:50 admim_5 + +Set immutable attribute Recursively on the directory sysadmin + + [root@linuxtechi ~]# chattr -R +i sysadmin + + [root@linuxtechi ~]# lsattr -R sysadmin/ + ----i----------- sysadmin/admim_1 + sysadmin/admim_1: + ----i----------- sysadmin/admim_2 + sysadmin/admim_2: + ----i----------- sysadmin/admim_3 + sysadmin/admim_3: + ----i----------- sysadmin/admim_4 + sysadmin/admim_4: + ----i----------- sysadmin/admim_5 + sysadmin/admim_5: + [root@linuxtechi ~]# + +Now try to delete directories using rm command + + [root@linuxtechi ~]# rm -rf sysadmin + rm: cannot remove ‘sysadmin/admim_1’: Permission denied + rm: cannot remove ‘sysadmin/admim_2’: Permission denied + rm: cannot remove ‘sysadmin/admim_3’: Permission denied + rm: cannot remove ‘sysadmin/admim_4’: Permission denied + rm: cannot remove ‘sysadmin/admim_5’: Permission denied + [root@linuxtechi ~]# + +To unset the the attributes recursively use the below command + + [root@linuxtechi ~]# chattr -R -i sysadmin + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/file-directory-attributes-in-linux-using-chattr-lsattr-command/ + +作者:[Pradeep 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.linuxtechi.com/author/pradeep/ \ No newline at end of file From 8aac28377e38f951c4de3a62f5fe2baa3caee03a Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 20 Apr 2015 20:57:35 +0800 Subject: [PATCH 031/154] [Translating] tech/Managing file and directory attributes in linux using chattr and lsattr command --- ...ectory attributes in linux using chattr and lsattr command.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md b/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md index 4fe935a568..fe56511647 100644 --- a/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md +++ b/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md @@ -1,3 +1,4 @@ +Translating by ictlyh Managing file & directory attributes in linux using chattr & lsattr command ================================================================================ There are certain control attributes that may be set on a file or directory in order to allow data to be appended, to prevent it from being changed or deleted, etc. For example, you can enable attributes on a critical system file or directory so that no users, including root, can delete or change it, disallow a backup utility such as the dump command to back up a specific file or directory, and so on. These attributes can only be set on files and directories located in an ext2, ext3, or an ext4 file system From 222a2e5f1e86f485319ebad5eb0ffe13e3e39e73 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 20 Apr 2015 21:31:02 +0800 Subject: [PATCH 032/154] [Translated] tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command --- ...n linux using chattr and lsattr command.md | 69 +++++++++---------- 1 file changed, 34 insertions(+), 35 deletions(-) rename {sources => translated}/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md (55%) diff --git a/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md b/translated/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md similarity index 55% rename from sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md rename to translated/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md index fe56511647..0aaef749c8 100644 --- a/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md +++ b/translated/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md @@ -1,9 +1,8 @@ -Translating by ictlyh -Managing file & directory attributes in linux using chattr & lsattr command +在Linux中用chattr和lsattr命令管理文件和目录属性 ================================================================================ -There are certain control attributes that may be set on a file or directory in order to allow data to be appended, to prevent it from being changed or deleted, etc. For example, you can enable attributes on a critical system file or directory so that no users, including root, can delete or change it, disallow a backup utility such as the dump command to back up a specific file or directory, and so on. These attributes can only be set on files and directories located in an ext2, ext3, or an ext4 file system +为了允许添加数据,防止更改或者删除等,文件和文件夹中设定了一定的控制属性。例如,你可以在关键系统文件或者文件夹中启用属性,然后没有用户,包括root,可以删除或者修改它,不允许比如dump命令等备份工具去备份一个特定的文件或者文件夹,等等。这些属性只可以在ext2,ext3或者ext4文件系统中的文件和文件夹上设定。 -There are two commands **lsattr** and **chattr** that are used for attribute management. The following is the list of commonly used attributes +有两个命令 **lsattr** 和 **chattr** 用来管理属性。下面是常用属性的列表。 注:表格代码 @@ -13,10 +12,10 @@ There are two commands **lsattr** and **chattr** that are used for attribute man @@ -24,7 +23,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

a (append)

@@ -32,7 +31,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

A

@@ -40,7 +39,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

c (compressed)

@@ -48,7 +47,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

d (dump)

@@ -56,7 +55,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

D

@@ -64,7 +63,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

e (extent format)

@@ -72,7 +71,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

i (immutable)

@@ -80,7 +79,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

j (journaling)

@@ -88,37 +87,37 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

S (synchronous)

-

Attributes

+

属性

-

Description

+

描述

-

Append operation is allowed on the file

+

允许在文件中进行追加操作

-

This attribute will not allow to update access time of a file

+

这个属性不允许更新文件的访问时间

-

When this attribute is enable then file is compressed on the disk automatically

+

启用这个属性时,文件在磁盘上会自动压缩

-

File cannot be backed up using the dump command.

+

不能使用dump命令备份文件

-

When D attribute is set on directory then changes are stored synchronously on the disk

+

设置了文件夹的D属性时,更改会在同步保存在磁盘上

-

It shows that the file is using extents for mapping the blocks on disk

+

它表明,该文件使用扩展到映射磁盘上的块

-

When this attribute is enable on file then we cannot be altered, renamed and delete file.

+

在文件上启用这个属性时,我们不能更改,重命名或者删除这个文件

-

When this attribute is set then file’s data is stored in journal first then written to file.

+

设置了这个属性时,文件的数据首先保存在日志中,然后再写入文件

-

When this attribute is set , then changes or modifications are stored synchronously on the disk

+

设置了这个属性时,变更或更改同步保存到磁盘上

-Different Options that can be used in chattr Command : +chattr属性中可以使用的不同选项 : -- **-R** change attributes of directory and its sub-directories recursively -- **-V** Verbose output of chattr command along with version. -- **-f** Suppress most error messages. +- **-R** 递归地修改文件夹和子文件夹的属性 +- **-V** chattr命令的输出伴随版本信息 +- **-f** 压缩大部分错误信息 -**Operators** that are used in chattr command to set and unset attributes +在chattr中用于设置或者取消属性的 **操作符** -- The ‘+’ sign is used to set attribute on the files and directories, -- The ‘-‘ sign is used to remove or unset the attribute -- The ‘=’ sign causes them to be the only attributes that the files have. +- ‘+’ 符号用来为文件和文件夹设置属性, +- ‘-‘ 符号用来移除或者取消属性 +- ‘=’ 使它们成为文件有的唯一属性。 -Basic Syntax of **chattr** and **lsattr** command : +**chattr** 和 **lsattr** 命令的基本语法 : # chattr # lsattr -### Example:1 Make a file immutable using ‘i’ attribute ### +### 例:1 使用‘i’属性使文件不可更改 ### [root@linuxtechi ~]# chattr +i dummy_data [root@linuxtechi ~]# lsattr dummy_data ----i----------- dummy_data -Now try to remove and edit the File +现在试着删除或者修改文件 [root@linuxtechi ~]# rm -f dummy_data rm: cannot remove ‘dummy_data’: Operation not permitted @@ -126,26 +125,26 @@ Now try to remove and edit the File [root@linuxtechi ~]# echo "test" >> dummy_data -bash: dummy_data: Permission denied -### Example:2 Remove the immutable attribute ### +### 例:2 移除不可更改属性 ### [root@linuxtechi ~]# chattr -i dummy_data [root@linuxtechi ~]# lsattr dummy_data ---------------- dummy_data -### Example:3 To allow only append operations on the file ### +### 例:3 在文件中只允许追加操作 ### [root@linuxtechi ~]# chattr +a dummy_data [root@linuxtechi ~]# lsattr dummy_data -----a---------- dummy_data -Now try to append the contents of fstab file in dummy_data file +现在试着把fstab文件的内容追加到dummy_data文件 [root@linuxtechi ~]# cat /etc/fstab >> dummy_data [root@linuxtechi ~]# -### Example :4 Secure Directory and its sub-directories using -R option and ‘+i’ attribute. ### +### 例 :4 使用 -R 选项和 ‘+i’ 属性使文件夹和它的子文件夹成为安全目录 ### -Let’s create a directory sysadmin and its subdirectories +让我们来新建一个sysadmin文件夹和它的子文件夹 [root@linuxtechi ~]# mkdir sysadmin [root@linuxtechi ~]# mkdir sysadmin/admim_{1,2,3,4,5} @@ -157,7 +156,7 @@ Let’s create a directory sysadmin and its subdirectories drwxr-xr-x. 2 root root 6 Apr 19 09:50 admim_4 drwxr-xr-x. 2 root root 6 Apr 19 09:50 admim_5 -Set immutable attribute Recursively on the directory sysadmin +在sysadmin文件夹递归设置不可更改属性 [root@linuxtechi ~]# chattr -R +i sysadmin @@ -174,7 +173,7 @@ Set immutable attribute Recursively on the directory sysadmin sysadmin/admim_5: [root@linuxtechi ~]# -Now try to delete directories using rm command +现在试着用rm命令删除文件夹 [root@linuxtechi ~]# rm -rf sysadmin rm: cannot remove ‘sysadmin/admim_1’: Permission denied @@ -184,7 +183,7 @@ Now try to delete directories using rm command rm: cannot remove ‘sysadmin/admim_5’: Permission denied [root@linuxtechi ~]# -To unset the the attributes recursively use the below command +使用以下命令递归取消属性 [root@linuxtechi ~]# chattr -R -i sysadmin @@ -193,7 +192,7 @@ To unset the the attributes recursively use the below command via: http://www.linuxtechi.com/file-directory-attributes-in-linux-using-chattr-lsattr-command/ 作者:[Pradeep Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ictlyh](https://github.com/ictlyh) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b10eb5dc45785e2356a2cfe60a5a05b6f192977b Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Apr 2015 22:37:01 +0800 Subject: [PATCH 033/154] PUB:20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide @wi-cuckoo --- ...creenshots - Download and Install Guide.md | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) rename {translated/tech => published}/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md (51%) diff --git a/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md b/published/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md similarity index 51% rename from translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md rename to published/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md index 23db1ace55..345cae0272 100644 --- a/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md +++ b/published/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md @@ -1,11 +1,11 @@ -Elementart OS 0.3 Freya快照 - 下载和安装指南 +直击 Elementart OS 0.3 Freya - 下载和安装指南 =========================================================================== -Elementary OS是一个以Ubuntu为基础的轻量级操作系统,广受欢迎。目前已经发行了上个版本,而第四个版本将会以即将到来的Ubuntu16.04为基础开发。 +Elementary OS是一个以Ubuntu为基础的轻量级操作系统,广受欢迎。目前已经发行了三个版本,而第四个版本将会以即将到来的Ubuntu16.04为基础开发。 -- **Jupiter (0.1)**: 第一个基于Ubuntu10.10的Elementary OS稳定发行版,在2011年三月发布。 -- **(Luna (0.2)**: 基于Ubuntu12.04的Elementary OS第二个稳定发行版,于2012年11月发布。 -- **(Freya (0.3)**: 基于Ubuntu 14.04的Elementary OS第三个稳定发行版,2015年二月8号发布。 -- **(Loki (0.4)**: 未来Elementary OS第四版,计划以Ubuntu16.04为基础,并且提供更新服务直到2021年。 +- **Jupiter (0.1)**: 第一个Elementary OS稳定发行版基于Ubuntu 10.10,在2011年三月发布。 +- **Luna (0.2)**: Elementary OS第二个稳定发行版基于Ubuntu 12.04,于2012年11月发布。 +- **Freya (0.3)**: Elementary OS第三个稳定发行版基于Ubuntu 14.04的,2015年二月8号发布。 +- **Loki (0.4)**: 未来Elementary OS第四版,计划以Ubuntu16.04为基础,并且提供更新服务直到2021年。 Freya是目前最新的Elementary OS版本(0.3)。最初是被命名为ISIS,但是后来改了,是为了避免与同名的恐怖组织产生任何的联系。Freya有一些非常不错的预装应用。 @@ -13,15 +13,15 @@ Freya是目前最新的Elementary OS版本(0.3)。最初是被命名为ISIS 这里列举了一些特性,但并非Elementary OS 0.3的所有特性。 -- 根据通知设定面板提供更好的交互性消息通知,包括一个系统级别的“Do Not Disturb”模式。 -- 最新版Elementary OS为网页应用中微软核心字体提供更好的emoji表情支持和替换。 -- Privacy模式是一个新的防火墙工具,很容易使用,可以帮助保护电脑免遭恶意脚本和应用的攻击。 -- 统一了登入和锁定界面 -- 拥有应用中心菜单,提升了界面效果和功能,包括快速列表动作,从搜索中拉取,和支持快速数学计算。 -- 重新设计多任务视图,提供更多的应用专注工具。 -- 更新了软件栈(Linux 3.16, Gtk 3.14 和Vala 0.26),为了对最新开发应用更好的支持和加强功能。 -- 统一了扩展固件接口(UEFI)支持 -- 通过新的捕捉入口协助,WiFi连接变得更容易。 +- 更好的交互性消息通知,可在通知设定面板设定系统级别的“Do Not Disturb(不要打扰)”模式。 +- 最新版Elementary OS提供更好的emoji表情支持,及内置替换了网页应用中的微软核心字体。 +- Privacy模式是一个新的防火墙工具,易于使用,可以帮助保护电脑免遭恶意脚本和应用的攻击。 +- 统一风格的登入和锁定界面。 +- 改进了界面效果和功能的应用中心菜单,包括快速操作列表,搜索拖放,支持快速数学计算。 +- 重新设计的多任务视图提供更多以应用为中心的功能。 +- 更新了软件栈(Linux 3.16, Gtk 3.14 和Vala 0.26),更好的支持和增强了最新开发的应用。 +- UEFI支持。 +- 通过新的联网助手,WiFi连接变得更容易。 ### 下载64位&32位版本 ### @@ -30,23 +30,23 @@ Freya是目前最新的Elementary OS版本(0.3)。最初是被命名为ISIS ### 安装Elementary OS 0.3 (Freya) ### -下载Elementary OS 0.3的ISO文件,并且写入一个USB启动盘或者DVD/CD。32位和64位的结构都是可以的。当计算机从Elementary OS ISO文件启动后,有两个选项可用,或试用而不安装,或直接安装到计算机里,选择第二项。Elmentary OS也可以安装与已有操作系统并存,构成双重启动。 +下载Elementary OS 0.3的ISO文件,并且写入到一个USB启动盘或者DVD/CD。支持32位和64位的架构。当计算机从Elementary OS ISO文件启动后,有两个选项可用,或不安装而仅试用,或直接安装到计算机里。这里选择第二项。Elmentary OS也可以与已有操作系统并存安装,构成双重启动。 ![Install Freya](http://blog.linoxide.com/wp-content/uploads/2015/04/Install-Freya.png) -在更进一步之前会检查系统要求和资源有效性。如果你的系统有足够的资源,点击继续。 +在进行下面的步骤之前会检查系统要求和资源有效性。如果你的系统有足够的资源,点击继续。 ![Installation Requirements](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Requirements.png) -安装向导提供许多安装形式。选取最适合你的选项,通常地,第一个选项被大多数选用 i.e. “擦除磁盘以安装Elementary”。选择这个选项,必须保证你的数据都已经被合理的备份了,因为磁盘(分区)将会被擦除,所有数据将会丢失。 +安装向导提供许多安装形式。选取最适合你的选项,通常大多数都选用第一个选项:“擦除磁盘以安装Elementary”。选择该选项,必须保证你的原有数据都已经正确备份了,因为磁盘(分区)将会被擦除,其上所有的数据将会丢失。 ![Installation Types](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Types.png) -一个对话框显示了被Elementary OS使用和格式化的磁盘分区列表,确保数据完整后点击继续。 +接下来的对话框显示了Elementary OS所使用和需要格式化的磁盘分区列表,确保数据完整后点击继续。 ![Format Warning](http://blog.linoxide.com/wp-content/uploads/2015/04/Format-Warning.png) -选择你的位置,确定时区,点击继续。 +选择你的地理位置,确定时区,点击继续。 ![Location](http://blog.linoxide.com/wp-content/uploads/2015/04/Location.png) @@ -54,11 +54,11 @@ Freya是目前最新的Elementary OS版本(0.3)。最初是被命名为ISIS ![Language](http://blog.linoxide.com/wp-content/uploads/2015/04/Language.png) -填入你的信息,选择一个强度高的超级用户/管理员密码,点击继续。 +填入你的信息,选择一个高强度的超级用户/管理员密码,点击继续。 ![whoareyou](http://blog.linoxide.com/wp-content/uploads/2015/04/whoareyou.png) -当你的信息提供后,核心安装进程就会启动,正在安装组件的详细信息会在一个小对话框里随进度条一闪而过。 +当你的信息提供后,核心安装进程就会启动,正在安装的组件的详细信息会在一个小对话框里随进度条一闪而过。 ![Installation progress](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-progress.png) @@ -66,7 +66,7 @@ Freya是目前最新的Elementary OS版本(0.3)。最初是被命名为ISIS ![Installation Complet](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Complet.png) -启动时,Elementary OS的标志显得十分优雅,然后密码保护的管理员登入和游客访问选项会出现。游客访问有相当多的限制功能,而且没有安装的特权。 +启动时,Elementary OS将显示它优雅的logo,然后会出现密码保护的管理员登入和游客访问选项。游客访问有相当多的限制功能,而且没有安装软件的权限。 ![Login](http://blog.linoxide.com/wp-content/uploads/2015/04/Login.png) @@ -76,27 +76,27 @@ Freya是目前最新的Elementary OS版本(0.3)。最初是被命名为ISIS ### 个性化桌面 ### -Elementary OS 0.3以其轻巧和美观而为我们熟知,每个人有自己独特的审美观念和计算机使用习惯。桌面反映出每一个计算机使用者个性化的观点。如其他操作系统一样,Elementary OS 0.3也提供了许多选项来个性化配置桌面,包括壁纸,字体大小,主题等等。 +Elementary OS 0.3以其轻巧和美观而为我们熟知,每个人有自己独特的审美观和计算机使用习惯。桌面反映出每一个计算机使用者的个人偏好。如其他操作系统一样,Elementary OS 0.3也提供了许多选项来个性化配置桌面,包括壁纸,字体大小,主题等等。 基本的个性化配置,点击Applications > System Settings > Desktop -我们可以改变壁纸,泊板和启用桌面热角。 +我们可以改变壁纸,泊板(dock)和启用桌面热角。 -默认提供了很少的壁纸,更多的可以从网上下载或者从你的相机传输。 +默认提供了很少的壁纸,更多的可以从网上下载或者从你的相机传输过来。 ![Desktop Wallpaper](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Wallpaper4.png) -Elementary OS真正的美丽在于优雅的Dock面板。桌面上没有任何图标,一些应用图标停靠在dock面板上加强了显示效果,提供了快速访问常用应用的捷径。 +Elementary OS真正的美丽在于优雅的泊板。桌面上没有任何图标,泊板上的应用图标显示逼真,通过它可以快速访问常用应用。 ![Desktop Dock](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Dock1.png) -用户可以使用桌面的四个角定制要显示什么。 +用户可以定制桌面的四个角的功能。 ![Hot Corners](http://blog.linoxide.com/wp-content/uploads/2015/04/Hot-Corners.png) -通过elementary tweaks工具的安装,可以达到更高级的个性化定制。 +通过安装elementary tweaks工具来更深入的个性化定制。 -使用如下命令,添加稳定的个人软件包档案(PPA)到高级软件包管理工具(APT)仓库。 +可以使用如下命令,将稳定的个人软件包档案(PPA)添加到高级软件包管理工具(APT)仓库。 sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily @@ -108,13 +108,13 @@ Elementary OS真正的美丽在于优雅的Dock面板。桌面上没有任何图 ![update repository](http://blog.linoxide.com/wp-content/uploads/2015/04/update-repository.png) -更新仓库后,我们就可以安装inkscape(不知是什么),用以下命令完成 +更新仓库后,我们就可以安装elementary-tweaks,用以下命令完成 sudo apt-get install elementary-tweaks ![install elementary tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/install-elementary-tweaks.png) -我们可以在个人区域的Application > System Settings下看到Tweaks选项的一个添加项。目前它提供给我们更多的选项,个性化定制我们的桌面。 +我们可以在Application > System Settings下的个人区域的看到增加了一个Tweaks项目。它现在可以给我们提供更多的个性化定制选项。 ![tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/tweaks.png) @@ -126,7 +126,7 @@ Elementary OS真正的美丽在于优雅的Dock面板。桌面上没有任何图 ### 总结 ### -Elementary OS十分接近Linux的发行版Ubuntu,它的正反两方面也都十分相似。Elementary OS在外观和体验上都十分轻巧和优雅,并且正在快速地走向成熟。它有潜力成为Windows和OS X操作系统之外的第三选择。最新的Elementary OS 0.3 (Freya)正凭借更好功能基础,在迅速的流行。想了解更多信息,最近的更新和下载,请访问官方[网站][1]。 +Elementary OS十分接近Linux发行版Ubuntu,它的优缺点两方面也都十分相似。Elementary OS在外观和体验上都十分轻巧和优雅,并且正在快速地走向成熟。它有潜力成为Windows和OS X操作系统之外的第三选择。最新的Elementary OS 0.3(Freya)以其良好的功能基础而迅速流行。想了解更多信息,最近的更新和下载,请访问其官方[网站][1]。 -------------------------------------------------------------------------------- @@ -134,7 +134,7 @@ via: http://linoxide.com/ubuntu-how-to/elementary-os-0-3-freya-install-guide/ 作者:[Aun Raza][a] 译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 206b90c9caf064d8c61d17c954650348fcbd2181 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Apr 2015 23:33:41 +0800 Subject: [PATCH 034/154] PUB:20150324 Prips--Print IP address on a given range @geekpi --- ...50324 Prips--Print IP address on a given range.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20150324 Prips--Print IP address on a given range.md (83%) diff --git a/translated/tech/20150324 Prips--Print IP address on a given range.md b/published/20150324 Prips--Print IP address on a given range.md similarity index 83% rename from translated/tech/20150324 Prips--Print IP address on a given range.md rename to published/20150324 Prips--Print IP address on a given range.md index a628c1e122..4d663bb953 100644 --- a/translated/tech/20150324 Prips--Print IP address on a given range.md +++ b/published/20150324 Prips--Print IP address on a given range.md @@ -10,7 +10,7 @@ prips是一个可以打印出指定范围内所有ip地址的一个工具。它 ### 使用prips ### -### prips语法 ### +prips语法 prips [-c] [-d delim] [-e exclude] [-f format] [-i incr] start end prips [-c] [-d delim] [-e exclude] [-f format] [-i incr] CIDR-block @@ -20,10 +20,10 @@ prips是一个可以打印出指定范围内所有ip地址的一个工具。它 prips接受下面的命令行选项: - -c -- 以CIDR形式打印范围。 -- -d delim -- 用ASCII码作为分隔符,0 <= delim <= 255。 +- -d 分隔符 -- 用ASCII码作为分隔符,0 <= 分隔符 <= 255。 - -e -- 排除输出的范围。 -- -f format -- 设置地址格式 (16进制, 10进制, 或者dot). -- -i incr -- 设置增长上限 +- -f 格式 -- 设置地址格式 (hex:16进制, dec:10进制, 或者dot:以点分隔). +- -i 增长 -- 设置增长上限 ### Prips示例 ### @@ -31,7 +31,7 @@ prips接受下面的命令行选项: prips 192.168.32.0 192.168.32.255 -同样使用CIDR标示: +同上面一样,使用CIDR标示: prips 192.168.32/24 @@ -53,7 +53,7 @@ via: http://www.ubuntugeek.com/prips-print-ip-address-on-a-given-range.html 作者:[ruchi][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 2cef4b3373f9e3b71ff23dce64d699ab6e66b717 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 21 Apr 2015 10:40:13 +0800 Subject: [PATCH 035/154] [Translating] tech/How to Install Linux Kernel 4.0 from Elrepo / Source on Ubuntu / CentOs --- ...Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md b/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md index 3e2c0bd509..76b8355291 100644 --- a/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md +++ b/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md @@ -1,3 +1,4 @@ +Translating by ictlyh How to Install Linux Kernel 4.0 from Elrepo / Source on Ubuntu / CentOs ================================================================================ Hi everyone, today we'll learn how to install the latest Linux Kernel 4.0 from Elrepo and compiling using Source. Linux Kernel 4.0 is the latest Mainline Kernel codenamed ‘Hurr durr I’m a sheep’ till date. It is the kernel released after the stable released of 3.19.4 . April 12 is considered as a big day for all fans of the Open Source movement, as Linus Torvalds announced the release of Linux Kernel 4.0 and its immediate availability. It is considered as a big release as it consists of some awesome features which includes no-reboot patching (Live Patching), New and Updated Drivers, New and Latest Hardware Support and more interesting features with a new version change. But Kernel 4.0 is not considered as a huge release as expected but Linus announced that 4.1 is expected for a bigger release. The Live Patching feature was already integrated with the SUSE Enterprise Linux operating system. Here is the [release announcement][1] you can check for more details about the release. From 1d7b1b7c8480f8af18e8f0d7f8ece43e8a71af8e Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 21 Apr 2015 11:38:15 +0800 Subject: [PATCH 036/154] [Translated] tech/How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs --- ...om Elrepo or Source on Ubuntu or CentOs.md | 148 ------------------ ...om Elrepo or Source on Ubuntu or CentOs.md | 146 +++++++++++++++++ 2 files changed, 146 insertions(+), 148 deletions(-) delete mode 100644 sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md create mode 100644 translated/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md diff --git a/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md b/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md deleted file mode 100644 index 76b8355291..0000000000 --- a/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md +++ /dev/null @@ -1,148 +0,0 @@ -Translating by ictlyh -How to Install Linux Kernel 4.0 from Elrepo / Source on Ubuntu / CentOs -================================================================================ -Hi everyone, today we'll learn how to install the latest Linux Kernel 4.0 from Elrepo and compiling using Source. Linux Kernel 4.0 is the latest Mainline Kernel codenamed ‘Hurr durr I’m a sheep’ till date. It is the kernel released after the stable released of 3.19.4 . April 12 is considered as a big day for all fans of the Open Source movement, as Linus Torvalds announced the release of Linux Kernel 4.0 and its immediate availability. It is considered as a big release as it consists of some awesome features which includes no-reboot patching (Live Patching), New and Updated Drivers, New and Latest Hardware Support and more interesting features with a new version change. But Kernel 4.0 is not considered as a huge release as expected but Linus announced that 4.1 is expected for a bigger release. The Live Patching feature was already integrated with the SUSE Enterprise Linux operating system. Here is the [release announcement][1] you can check for more details about the release. - -> **WARNING**: Installing a new kernel may render your system unusable or unstable. If you proceed with the installation using the instructions below, make sure you back up any important data you have to an external hard drive. - -### Installing Linux Kernel 4.0 on Ubuntu 15.04 ### - -If you are running an Ubuntu 15.04 Distribution of Linux. You can simply install it straight from Ubuntu Kernel site. To install the latest Linux Kernel 4.0 in your Ubuntu 15.04, you'll need to run the following commands under root access in a shell or a terminal. - -#### On a 64-bit Ubuntu 15.04 #### - - $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_amd64.deb - - $ sudo dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb - -#### On a 32-bit Ubuntu 15.04 #### - - $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_i386.deb - - $ sudo dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb - -### Installing Linux Kernel 4.0 on CentOS 7 ### - -We can easily install Linux Kernel 4.0 using two ways in CentOS 7 . - -1. Installing from Elrepo Repository -1. Compiling and installing from the Source Code - -First we'll gonna go for installing using ELRepo as its the easiest way to do. - -#### Installing using Elrepo #### - -**1. Downloading and Installing ELRepo** - -We'll first gonna download the GPG key of ELRepo and install the relrepo-release package. As we're running CentOS 7, we'll gonna install elrepo-release-7.0-2.el7.elrepo.noarch.rpm using the command below. - -Note: If you have a secure boot enabled please see [this page for more information][2]. - - # rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org - # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm - -![Adding Elrepo Source](http://blog.linoxide.com/wp-content/uploads/2015/04/adding-elrepo.png) - -**2. Updating Linux Kernel to version 4.0** - -Now, we'll gonna install the latest stable kernel 4.0 from the ELRepo repository. To do so, we'll need to enter the following commands in a shell or terminal of the CentOS 7. - - # yum --enablerepo=elrepo-kernel install kernel-ml - -![Installing Linux Kernel 4.0 from ELRepo](http://blog.linoxide.com/wp-content/uploads/2015/04/installing-kernel-4-0-elrepo.png) - -The above command will automatically install the Linux Kernel 4.0 build for CentOS 7. - -Now, here below is the another way of installing the latest kernel 4.0 by compiling from the source. - -#### Compiling and Installing from the Source #### - -**1. Installing the Dependencies** - -So, first of all we'll need to install the dependencies required to compile the linux kernel. To do so, we'll need to run the following command in a terminal or a shell. - - # yum groupinstall "Development Tools" - - # yum install gcc ncurses ncurses-devel - -![Installing Kernel Dependencies](http://blog.linoxide.com/wp-content/uploads/2015/04/installing-dependencies.png) - -Then, we'll gonna update our whole system. - - # yum update - -**2. Downloading the source** - -We'll now download the latest release linux kernel 4.0 source using wget command from the official repository of Linux Kernel. You can also download the kernel directly from the site [kernel.org][3] using your web browser also. - - # cd /tmp/ - # wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.0.tar.xz - -![Download Kernel Source](http://blog.linoxide.com/wp-content/uploads/2015/04/download-kernel-source.png) - -**3. Extracting the tarball** - -Once the file is downloaded we'll extract it under /usr/src/ directory by running the below command. - - # tar -xf linux-4.0.tar.xz -C /usr/src/ - # cd /usr/src/linux-4.0/ - -![Extracting Kernel Tarball](http://blog.linoxide.com/wp-content/uploads/2015/04/extracting-kernel-tarball.png) - -**4. Configuring** - -We have two options to configure the Linux Kernel. We can either create a new custom configuration or use the old configuration to build and install the Linux Kernel. It all depends on what you really want. - -**For New Kernel Configuration** - -Now we'll run the make menuconfig command in the shell or terminal to configure the Linux kernel. Once we've executed the below command a pop up window with all the menus appears. Here we can select our new kernel configuration. If you unfamiliar with these menus, just hit double ESC key to exit. - - # make menuconfig - -![Configuring New Kernel Config](http://blog.linoxide.com/wp-content/uploads/2015/04/configuring-new-kernel-config.png) - -**For Old Configuration** - -If you like to configure your latest kernel with your old configuration then simple type the below command. If you were asked any stuff, you can choose with Y or N or you can simply press Enter to continue. - - # make oldconfig - -#### Step 5. Compiling the Linux Kernel #### - -Next, we'll execute the make command to compile the Kernel 4.0 . The compilation would take at least 20-30 minutes depends on your system configuration. - -Note: If you got an error while compiling the kernel saying bc command not found. You can fix that by installing bc using the command **yum install bc** . - - # make -![Make Kernel](http://blog.linoxide.com/wp-content/uploads/2015/04/make-kernel.png) - -#### 6. Installing Linux Kernel 4.0 #### - -Once the compilation is completed, we'll now finally install the **Kernel** in our Linux System. The below command will create files under /boot directory and also makes a new kernel entry in the Grub Menu. - - # make modules_install install - -#### 7. Verifying Kernel #### - -After installing our latest kernel 4.0 we'll want to verify it. To do so we'll just type the following command on the terminal. If everything went fine, we'll get the kernel version ie. 4.0 enlisted in the output below. - - # uname -r - -#### Conclusion #### - -Hurray, we have successfully installed the latest version of linux kernel ie 4.0 in our CentOS 7 Operating System. Upgrading a linux kernel is always not necessary cause the hardware you got working with the previous version of it may not get working with the newer version. We should make sure that the it includes the features and stuffs that are necessary to make your hardware working. But mostly, the newer stable versions of kernel makes your hardware performance better. So, if you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy the latest stable version of Linux Kernel 4.0 :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/how-tos/install-linux-kernel-4-0-elrepo-source/ - -作者:[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://lkml.iu.edu/hypermail/linux/kernel/1504.1/03198.html -[2]:http://elrepo.org/tiki/SecureBootKey -[3]:http://kernel.org/ \ No newline at end of file diff --git a/translated/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md b/translated/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md new file mode 100644 index 0000000000..a597b31c91 --- /dev/null +++ b/translated/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md @@ -0,0 +1,146 @@ +如何从Elrepo/源 在Ubuntu/CentOS上安装Linux内核4.0 +================================================================================ +大家好,今天我们学习一下如何从Elrepo或者编译源码安装最新的Linux内核4.0。昵称为‘Hurr durr I’m a sheep’的Linux内核4.0是目前为止最新的主干内核。是稳定版3.19.4后发布的内核。Linux Torvalds声明了Linux内核4.0的发布以及可及时提供,4月12日被认为是所有开源运动爱好者的重大日子。由于包括了一些很棒的功能,例如无重启补丁(实时补丁),新的升级驱动,最新的硬件支持以及很多有趣的功能都有新的版本,它被认为是一次重大发布。但是内核4.0并不认为是期望中的重大发布,Linus表示期望4.1是一个更大的发布。实时补丁功能已经集成到了SUSE企业版Linux操作系统上。你可以在[发布公告][1]上查看关于这次发布的更多详细内容。 + +> **警告**: 安装新的内核可能会导致你的系统不可用或不稳定。如果你仍然使用以下命令继续安装,请确保备份所有重要数据到外部硬盘。 + +### 在Ubuntu 15.04上安装Linux内核4.0 ### + +如果你正在使用Linux的发行版Ubuntu 15.04,你可以直接通过Ubuntu内核网站安装。在你的Ubuntu15.04上安装最新的Linux内核4.0,你需要在shell或终端中在root访问权限下运行一下命令。 + +#### 在 64-bit Ubuntu 15.04 #### + + $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_amd64.deb + + $ sudo dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb + +#### 在 32-bit Ubuntu 15.04 #### + + $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_i386.deb + + $ sudo dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb + +### 在CentOS 7上安装Linux内核4.0 ### + +我们可以用两种简单的方式在CentOS 7上安装Linux内核4.0。 + +1. 从Elrepo软件仓库安装 +1. 从源代码编译安装 + +由于是最简单的方式,我们首先用ElRepo安装。 + +#### 使用 Elrepo 安装 #### + +**1. 下载和安装ELRepo** + +我们首先下载ELRepo的GPG密钥并安装relrepo-release安装包。因为我们用的是CentOS 7,我们使用以下命令安装elrepo-release-7.0-2.el7.elrepo.noarch.rpm。 + +注: 如果你启用了secure boot,请查看[这个网页获取更多信息][2]。 + + # rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org + # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm + +![添加 Elrepo 源](http://blog.linoxide.com/wp-content/uploads/2015/04/adding-elrepo.png) + +**2. 升级Linux内核到4.0版本** + +现在,我们打算从ELRepo软件仓库安装最新的稳定版内核4.0。做这些,我们需要在CentOS 7的shell或者终端中输入以下命令。 + + # yum --enablerepo=elrepo-kernel install kernel-ml + +![从ELRepo安装Linux内核4.0](http://blog.linoxide.com/wp-content/uploads/2015/04/installing-kernel-4-0-elrepo.png) + +上面的命令会自动安装为CentOS 7构建的Linux内核4.0。 + +现在,下面的是另一种方式,通过编译源代码安装最新的内核4.0。 + +#### 从源代码编译安装 #### + +**1. 安装依赖软件** + +首先我们需要为编译linux内核安装依赖的软件。做这些,我们需要在一个终端或者shell中运行以下命令。 + + # yum groupinstall "Development Tools" + + # yum install gcc ncurses ncurses-devel + +![安装内核依赖](http://blog.linoxide.com/wp-content/uploads/2015/04/installing-dependencies.png) + +然后,我们会升级我们的整个系统。 + + # yum update + +**2. 下载源代码** + +现在我们通过wget命令从Linux内核官方仓库中下载最新发布的linux内核4.0的源代码。你也可以使用你的浏览器直接从[kernel.org][3]网站下载内核。 + + # cd /tmp/ + # wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.0.tar.xz + +![下载内核源码](http://blog.linoxide.com/wp-content/uploads/2015/04/download-kernel-source.png) + +**3. 解压tar压缩包** + +文件下载好后我们在/usr/src/文件夹下用以下命令解压。 + + # tar -xf linux-4.0.tar.xz -C /usr/src/ + # cd /usr/src/linux-4.0/ + +![解压内核tar压缩包](http://blog.linoxide.com/wp-content/uploads/2015/04/extracting-kernel-tarball.png) + +**4. 配置** + +我们要配置Linux内核的两个选项。我们可以创建一个新的自定义配置文件或者使用旧的配置文件来构建和安装Linux内核。这都取决于你自己的想法。 + +**配置新的内核** + +现在我们在shell或终端中运行make menuconfig命令来配置Linux内核。我们执行以下命令后会显示一个包含所有菜单的弹出窗口。在这里我们可以选择我们新的内核配置。如果你不熟悉这些菜单,那就敲击ESC键两次退出。 + + # make menuconfig + +![配置新内核](http://blog.linoxide.com/wp-content/uploads/2015/04/configuring-new-kernel-config.png) + +**旧的配置** + +如果你想用旧的配置文件配置你最新的内核,那就输入下面的命令。如果对你有任何提问,你可以选择Y或者N,或者仅仅是按Enter键继续。 + # make oldconfig + +#### Step 5. 编译Linux内核 #### + +下一步,我们会执行make命令来编译内核4.0。取决于你的系统配置,编译至少需要20-30分钟。 + +注:如果编译内核的时候出现bc command not found的错误,你可以用**yum install bc**命令安装bc修复这个错误。 + + # make +![Make 内核](http://blog.linoxide.com/wp-content/uploads/2015/04/make-kernel.png) + +#### 6. 安装Linux内核4.0 #### + +编译完成后,我们终于要在你的Linux系统上安装**内核**了。下面的命令会在/boot目录下创建文件并且在Grub Menu中新建一个内核条目。 + + # make modules_install install + +#### 7. 验证内核 #### + +安装完最新的内核4.0后我们希望能验证它。做这些我们只需要在终端中输入以下命令。如果所有都进展顺利,我们会看到内核版本,例如4.0出现在输出列表中。 + + # uname -r + +#### 结论 #### + +好了,我们成功地在我们的CentOS 7操作系统上安装了最新的Linux内核版本4.0。通常并不需要升级linux内核,因为和之前版本运行良好的硬件可能并不适合新的版本。我们要确保它包括能使你的硬件正常工作的功能和配件。但大部分情况下,新的稳定版本内核能使你的硬件性能更好。因此,如果你有任何问题,评论,反馈,请在下面的评论框中注明,让我们知道需要增加或者删除什么问题。多谢!享受最新的稳定版Linux内核4.0吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/install-linux-kernel-4-0-elrepo-source/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://lkml.iu.edu/hypermail/linux/kernel/1504.1/03198.html +[2]:http://elrepo.org/tiki/SecureBootKey +[3]:http://kernel.org/ \ No newline at end of file From d6318cca497afa1940c2fd1318097c86dbd99f3c Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 21 Apr 2015 16:45:29 +0800 Subject: [PATCH 037/154] Translating by ZTinoZ --- ...5 Linux FAQs with Answers--How to disable IPv6 on Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 index 99e7d0b6bc..fe5efed4df 100644 --- 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 @@ -2,9 +2,9 @@ Linux有问必答时间--如何在Linux下禁用IPv6 ================================================================================ > **问题**:我发现我的一个应用程序在尝试通过IPv6建立连接,但是由于我们本地网络不允许分配IPv6的流量,IPv6连接会超时,应用程序的连接会退回到IPv4,这样就会造成不必要的延迟。由于我目前对IPv6没有任何需求,所以我想在我的Linux主机上禁用IPv6。有什么比较合适的方法呢? -IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品,它为了解决现有IPv4地址空间即将耗尽的问题。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. +IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品,它为了解决现有IPv4地址空间即将耗尽的问题。然而,由于IPv4已经被每台主机或设备连接到了互联网上,所以想在一夜之间将它们全部切换到IPv6几乎是不可能的。许多IPv4到IPv6的转换机制(例如:双协议栈、网络隧道、代理) 已经被提出来用来促进IPv6能被采用,并且很多应用也正在进行重写,就像我们所说的,来增加对IPv6的支持。有一件事情能确定,就是在可预见的未来里IPv4和IPv6势必将共存。 -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. +理想情况下,[向IPv6过渡的进程][1]不应该被最终的用户所看见,但是IPv4/IPv6混合环境有时会让你碰到各种源于IPv4和IPv6之间不经意间的相互作用的问题。举个例子,你会碰到应用程序超时的问题比如apt-get或ssh尝试通过IPv6连接失败、DNS服务器意外清空了IPv6的AAAA记录、或者你支持IPv6的设备不兼容你的互联网服务提供商遗留下的IPv4网络等等等等。 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. From 8a6a9db3cde53e6882e0ef8bd250c98b72c8799e Mon Sep 17 00:00:00 2001 From: demon Date: Tue, 21 Apr 2015 17:12:55 +0800 Subject: [PATCH 038/154] Create How to manage remote MySQL databases on Linux VPS using a GUI tool --- ...QL databases on Linux VPS using a GUI tool | 171 ++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 translated/tech/How to manage remote MySQL databases on Linux VPS using a GUI tool diff --git a/translated/tech/How to manage remote MySQL databases on Linux VPS using a GUI tool b/translated/tech/How to manage remote MySQL databases on Linux VPS using a GUI tool new file mode 100644 index 0000000000..580e68e9d7 --- /dev/null +++ b/translated/tech/How to manage remote MySQL databases on Linux VPS using a GUI tool @@ -0,0 +1,171 @@ +Translating by demon +如何使用图形化工具远程管理Linux Vps上的MySql +================================================================================ +如果你在一个远程的VPS上运行了MYSQL server,你会如何管理你的远程数据库主机呢?基于web的数据库管理工具例如phpMyAdmin或者Adminer可能会是你一个想起的。这些基于web的管理工具需要一个后端的web服务和PHP引擎在正常运行。但是,如果你的VPS仅仅用来做数据库服务(e.g., for a multi-tier app),为临时的数据库管理提供一整套的LAMP是浪费VPS资源的。更糟的是,LAMP带有的HTTP端口可能会成为你VPS资源的安全漏洞。 + +作为一种选择,你可以使用在一台客户机上运行本地的Mysql客户端,当然,如果没有别的选择,一个纯净的命令行mysql客户端将是你的默认选择。但是命令行客户端的功能是有限的,因此它不适合在生产环境中使用,例如:sql开发,性能调优,模式验证等等。你是否在寻找一个成熟的MYSQL管理工具,那么一个MYSQL的图形化管理工具将会更好的满足你的需求。 + +什么是MySQL Workbench? + +作为一个由Oracle开发的成熟数据库管理工具,mysql workbench不仅仅是一个MySQL客户端。简而言之,Workbench是一个跨平台的(eg:Linux,MacOX,Windows)数据库设计,开发和管理图形工具。社区版本的Msyql Workbench是遵循GPL协议的。作为一个数据库管理者,你可以使用Workbench去配置Mysql服务,管理Mysql用户,完成数据库的备份与还原,监视数据库的健康状况,所有的都在对用户友好的图形化环境下处理。 + +在这个手册里,让我们演示下如何在Linux下安装和使用Mysql Workbench. + +在Linux上安装MySQL Workbench + +你可以在任何一个桌面linux机器上运行Mysql Workbench去设置你的数据库管理环境。然而一些Linux发行版(例如:Debian/Ubuntu)在他们的软件源中已经有了Mysql Workbench.从官方源中安装是一个好的方法,因为他们提供了最新的版本。这里介绍了如何设置一个官方的Workbench源和从中安装它。 + +#### Debian-based Desktop (Debia, Ubuntu, Mint): #### + +到其官方站点,选择一个和你环境匹配的DEB file源,并下载安装 + +For example, on Ubuntu 14.10: + + $ wget http://dev.mysql.com/get/mysql-apt-config_0.3.4-2ubuntu14.10_all.deb + $ sudo dpkg -i mysql-apt-config_0.3.4-2ubuntu14.10_all.deb + +on Debian 7: + + $ wget http://dev.mysql.com/get/mysql-apt-config_0.3.3-1debian7_all.deb + $ sudo dpkg -i mysql-apt-config_0.3.3-1debian7_all.deb + +当你安装DEB文件时,你会看到下面的配置菜单,并且选择配置那个Mysql产品 + +![](https://farm8.staticflickr.com/7702/16928715218_b1fcbcdbf3_c.jpg) + +选择“Utilities”.完成配置后,选择“Apply”去保存配置。然后,更新包索引,并且安装Workbench + + $ sudo apt-get update + $ sudo apt-get install mysql-workbench + +#### Red Hat-based Desktop (CentOS, Fedora, RHEL): #### + +去官网下载并安装适合你Linux环境的RPM源包 +For example, on CentOS 7: + + $ wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm + $ sudo yum localinstall mysql-community-release-el7-5.noarch.rpm + +on Fedora 21: + + $ wget http://dev.mysql.com/get/mysql-community-release-fc21-6.noarch.rpm + $ sudo yum localinstall mysql-community-release-fc21-6.noarch.rpm + +验证"MySQL Tools Community"源是否被安装 + $ yum repolis enabled + +![](https://farm9.staticflickr.com/8826/16494069254_15458ace52_c.jpg) + +安装Workbench + + $ sudo yum install mysql-workbench-community + +设置远程数据库的安全连接 + +接下来是为你运行Mysql服务的VPS设置一个远程连接,当然你可以直接通过图形化的Workbench连接你的远程Mysql服务器(在数据库开放了远程连接后)。然而,这样做有很大的安全风险,因为有些人很容易窃听你的数据库传输信息,并且一个公开的Mysql端口(默认为3306)被作为攻击入口。 + +一个比较好的方法是关掉远程访问数据库服务功能,(仅允许在127.0.0.1访问)。然后在本地客户机和远程Vps直接设置一个SSH隧道,这样的话,和mysql之间的数据能被安全的传输,仅在它的本地回环接口上。相比较设置一个SSL加密的连接来说,配置SSH隧道需要很少的操作,因为他仅仅需要SSH服务,并且在大多数的VPS上已经部署了。 + +让我们来看看如何来为一个Mysql Workbench设置一个SSH隧道,这里的设置,不需要你开放远程访问Mysql服务。 +在一个运行了Workbench的本地客户机上,键入下面的命令,替换'user' and 'remote_vps'为你自己的信息 + + $ ssh user@remote_vps -L 3306:127.0.0.1:3306 -N + +你会被要求输入你VPS的SSH密码,当你成功登陆VPS后,一个SSH隧道将会在本地的3306端口和远程VPS的3306端口将会被建立。这里你不会看到任何信息。 + +或者你可以选择在后台运行SSH隧道,按CTRL+Z停止当前的命令,然后输入bg并且ENTER + +![](https://farm8.staticflickr.com/7714/16928715438_bf0db49b3b_c.jpg) + +这样SSH隧道就会在后台运行了。 + +使用MySQL Workbench远程管理MySQL服务 + +在建立好SSH隧道后,你可以通过MySQL Workbench去远程连接Mysql服务了。 + +输入下面命令启动Workbench + + $ mysql-workbench + +![](https://farm9.staticflickr.com/8768/16494069294_0fce571ddb_c.jpg) + +点击Workbench页面上面的加号图标去创建一个新的数据库连接,接着会出现下面的连接信息。 + +- **Connection Name**: any description (e.g., My remote VPS database) +- **Hostname**: 127.0.0.1 +- **Port**: 3306 +- **Username**: MySQL username (e.g., root) + +![](https://farm8.staticflickr.com/7727/16928715288_d9ac3bfc7a_c.jpg) + +注意:因为隧道设置的是127.0.0.1:3306,所以主机名哪里必须是127.0.0.1,而不能是远程VPS的IP地址或者主机名 + +当你设置好一个新的数据库连接后,你会在Workbench窗口看到一个新的框,点击那个框就会实际去连接远程的MySQL服务了。 + +![](https://farm8.staticflickr.com/7650/17114969532_0252ffcd31_c.jpg) + +当你设置好一个新的数据库连接后,你会在Workbench窗口看到一个新的框,点击那个框就会实际去连接远程的MySQL服务了。 + +#### MySQL Server Status #### + +当你设置好一个新的数据库连接后,你会在Workbench窗口看到一个新的框,点击那个框就会实际去连接远程的MySQL服务了。 + +![](https://farm8.staticflickr.com/7627/16494069414_9d838d4138_c.jpg) + +#### Client Connections #### + +连接数是一个极其重要的监视资源,这个菜单显示了每个连接的详细信息。 + +![](https://farm9.staticflickr.com/8747/16909119337_a8d89772dd_c.jpg) + +#### 用户和权限 #### + +这个菜单允许你管理MySQL用户,包括他们的资源限制和权限。 + +![](https://farm9.staticflickr.com/8765/16494069384_760fc17c8f_c.jpg) + +#### MySQL Server Administration #### + +你可以启动或关闭MySQL服务,并且检查它的服务日志。 + +![](https://farm8.staticflickr.com/7588/17114969592_54526dfb32_c.jpg) + +#### Database Schema Management #### + +可以可视化的查看,更改,检查数据库结构,在“Schemas”标题下选择任何一个数据库或表,然后右击 + +![](https://farm8.staticflickr.com/7665/16496363973_fd03a96198_c.jpg) + +![](https://farm9.staticflickr.com/8744/16909119497_7c884617b8_c.jpg) + +#### Database Query #### + +你可以执行任何的语句(只要你的权限允许),并且检查他的结果。 + +![](https://farm8.staticflickr.com/7716/17114969692_c0f02bb277_c.jpg) + +此外,性能统计数据和报表仅用于MySQL5.6以上的版本。对于5.5及其以下的版本,性能部分会以灰色显示。 +### 结论 ### + +简介且直观的选项卡界面,丰富的特性,开源,使MySQL Workbench成为一个非常好的可视化数据库设计和管理工具。为其减分的是它的性能。我注意到在一台运行繁忙的服务器上,Workbench优势会变得异常缓慢,尽管它的性能差强人意,我依然认为MySQL Workbench是MySQL数据库管理员和设计人员必备的工具之一。 + +你曾在你的生产环境中用过Workbench吗?或者你还有别的GUI工具可以推荐?请分享你的经验吧。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/remote-mysql-databases-gui-tool.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/tyzy313481929译者demon) +校对:[校对者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/go/digitalocean +[2]:http://ask.xmodulo.com/install-phpmyadmin-centos.html +[3]:http://xmodulo.com/set-web-based-database-management-system-adminer.html +[4]:http://mysqlworkbench.org/ +[5]:http://dev.mysql.com/downloads/repo/apt/ +[6]:http://dev.mysql.com/downloads/repo/yum/ +[7]:http://xmodulo.com/how-to-allow-remote-access-to-mysql.html From 574b537dde6aa4968491bf4ab3d8bf7af91e7819 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 21 Apr 2015 17:42:32 +0800 Subject: [PATCH 039/154] Translating by ZTinoZ --- ...225 Linux FAQs with Answers--How to disable IPv6 on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index fe5efed4df..5d5c961a17 100644 --- 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 @@ -6,7 +6,7 @@ IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品 理想情况下,[向IPv6过渡的进程][1]不应该被最终的用户所看见,但是IPv4/IPv6混合环境有时会让你碰到各种源于IPv4和IPv6之间不经意间的相互作用的问题。举个例子,你会碰到应用程序超时的问题比如apt-get或ssh尝试通过IPv6连接失败、DNS服务器意外清空了IPv6的AAAA记录、或者你支持IPv6的设备不兼容你的互联网服务提供商遗留下的IPv4网络等等等等。 -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. +当然这不意味着你应该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. From dd8039ba31e02297462de8e47be0bc560efb453a Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 21 Apr 2015 22:34:09 +0800 Subject: [PATCH 040/154] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20PR=20=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1、不要改文件名,保留文件名前的日期。2、保留 .md 扩展名。 3、记得删除 sources 下的原文。 @tyzy313481929 --- ...databases on Linux VPS using a GUI tool.md | 179 ------------------ ...atabases on Linux VPS using a GUI tool.md} | 0 2 files changed, 179 deletions(-) delete mode 100644 sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md rename translated/tech/{How to manage remote MySQL databases on Linux VPS using a GUI tool => 20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md} (100%) diff --git a/sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md b/sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md deleted file mode 100644 index c157ce65d5..0000000000 --- a/sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md +++ /dev/null @@ -1,179 +0,0 @@ -demon 翻译中 -How to manage remote MySQL databases on Linux VPS using a GUI tool -================================================================================ -If you need to run a MySQL server on a remote [VPS instance][1], how will you manage databases hosted by the server remotely? Perhaps web-based database administration tools such as [phpMyAdmin][2] or [Adminer][3] will first come to mind. These web-based management tools require a backend web server and PHP engine up and running. However, if your VPS instance is used as a standalone database server (e.g., for a multi-tier app), provisioning a whole LAMP stack for occasional database management is a waste of VPS resource. Worse, the LAMP stack with an additional HTTP port can be a source of security vulnerabilities of your VPS. - -Alternatively, you can turn to a native MySQL client running on a client host. Of course a pure command-line MySQL client (mysql-client) can be your default choice if nothing else. But the capabilities of the command-line client are limited, so it is not suitable for production-level database administration such as visual SQL development, performance tuning, schema validation, etc. If you are looking for full-blown MySQL administration features, a MySQL GUI tool will meet your requirements better. - -### What is MySQL Workbench? ### - -Developed as an integrated database tool environment by Oracle, [MySQL Workbench][4] is more than a simple MySQL client. In a nutshell, Workbench is a cross-platform (e.g., Linux, MacOS X, Windows) GUI tool for database design, development and administration. The Community Edition of MySQL Workbench is available for free under the GPL. As a database administrator, you can use Workbench to configure MySQL server, manage MySQL users, perform database backup and recovery, and monitor database health, all in GUI-based user-frienly environment. - -In this tutorial, let's review how to install and use MySQL Workbench on Linux. - -### Install MySQL Workbench on Linux ### - -To set up remote database administration environment, grab any desktop Linux machine where you will be running MySQL Workbench. While some Linux distributions (e.g., Debian/Ubuntu) carry MySQL Workbench in their repositories, it is a good idea to install it from the official repositories, as they offer the latest version. Here is how to set up the official Workbench repository and install Workbench from it. - -#### Debian-based Desktop (Debia, Ubuntu, Mint): #### - -Go to the [official website][5]. Download and install the DEB file for the repository. Choose one that matches with your environment. - -For example, on Ubuntu 14.10: - - $ wget http://dev.mysql.com/get/mysql-apt-config_0.3.4-2ubuntu14.10_all.deb - $ sudo dpkg -i mysql-apt-config_0.3.4-2ubuntu14.10_all.deb - -on Debian 7: - - $ wget http://dev.mysql.com/get/mysql-apt-config_0.3.3-1debian7_all.deb - $ sudo dpkg -i mysql-apt-config_0.3.3-1debian7_all.deb - -When installing the DEB file, you will see the following package configuration menu, and be asked to choose MySQL product to configure. - -![](https://farm8.staticflickr.com/7702/16928715218_b1fcbcdbf3_c.jpg) - -Choose "Utilities". Once you are done with configuration, choose "Apply" to save it. - -Finally, update package index, and install Workbench. - - $ sudo apt-get update - $ sudo apt-get install mysql-workbench - -#### Red Hat-based Desktop (CentOS, Fedora, RHEL): #### - -Go to the [official website][6]. Download and install the RPM repository package for your Linux evironment. - -For example, on CentOS 7: - - $ wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm - $ sudo yum localinstall mysql-community-release-el7-5.noarch.rpm - -on Fedora 21: - - $ wget http://dev.mysql.com/get/mysql-community-release-fc21-6.noarch.rpm - $ sudo yum localinstall mysql-community-release-fc21-6.noarch.rpm - -Verify that "MySQL Tools Community" repository has been set up. - - $ yum repolis enabled - -![](https://farm9.staticflickr.com/8826/16494069254_15458ace52_c.jpg) - -Go ahead and install Workbench. - - $ sudo yum install mysql-workbench-community - -### Set up a Secure Remote Database Connection ### - -The next step is to set up a remote connection to your MySQL server running on a VPS. Of course you can connect directly to the remote MySQL server from Workbench GUI (after [enabling remote access][7] in the database server). However, it is a huge security risk to do so, as someone can easily eavesdrop on database access traffic, and a publicly-open MySQL port can be another attack vector. - -A better approach is to disable remote access of MySQL server (i.e., only allow access from 127.0.0.1 of a VPS). Then set up an SSH tunnel between a local client machine and a remote VPS, so that MySQL traffic can be securely relayed via their loopback interfaces. Compared to setting up SSL-based encrypted connections, configuring SSH tunneling requires little effort as it only requires SSH server, which is already deployed on most VPS instances. - -Let's see how we can set up an SSH tunnel for MySQL Workbench. - -In this setup, you don't need to enable remote access of a MySQL server. - -On a local client host where MySQL Workbench will be running, type the following command. Replace 'user' and 'remote_vps' with your own info. - - $ ssh user@remote_vps -L 3306:127.0.0.1:3306 -N - -You will be asked to type an SSH password for your VPS. Once you successfully log in to the VPS, an SSH tunnel will be established between port 3306 of local host and port 3306 of a remote VPS. Note that you won't see any message in the foreground. - -Optionally, you can set the SSH tunnel running in the background. For that, press Ctrl+Z to stop the command, type bg and press ENTER. - -![](https://farm8.staticflickr.com/7714/16928715438_bf0db49b3b_c.jpg) - -The SSH tunnel will now be running in the background. - -### Manage a Remote MySQL Server with MySQL Workbench ### - -With an SSH tunnel established, you are ready to connect to a remote MySQL server from MySQL Workbench. - -Launch Workbench by typing: - - $ mysql-workbench - -![](https://farm9.staticflickr.com/8768/16494069294_0fce571ddb_c.jpg) - -Click on the plus icon at the top of the Workbench screen to create a new database connection. Fill in connection information as follows. - -- **Connection Name**: any description (e.g., My remote VPS database) -- **Hostname**: 127.0.0.1 -- **Port**: 3306 -- **Username**: MySQL username (e.g., root) - -![](https://farm8.staticflickr.com/7727/16928715288_d9ac3bfc7a_c.jpg) - -Note that since the tunnel's local endpoint is 127.0.0.1:3306, the hostname field must be 127.0.0.1, not the IP address/hostname of a remote VPS. - -Once you set up a new database connection, you will see a new box for the connection appear on Workbench window. Click on the box to actually establish a connection to a remote MySQL server. - -![](https://farm8.staticflickr.com/7650/17114969532_0252ffcd31_c.jpg) - -Once you are logged in to the MySQL server, you will see various administrative tasks in the left-side panel. Let's review some of common administrative tasks. - -#### MySQL Server Status #### - -This menus shows real-time dashboard of database server resource usage (e.g., traffic, connections, read/write). - -![](https://farm8.staticflickr.com/7627/16494069414_9d838d4138_c.jpg) - -#### Client Connections #### - -The total number of client connections is a critical resource to monitor. This menu shows detailed information of individual client connections. - -![](https://farm9.staticflickr.com/8747/16909119337_a8d89772dd_c.jpg) - -#### Users and Privileges #### - -This menu allows you to manage MySQL users, including their resource limits and privileges. - -![](https://farm9.staticflickr.com/8765/16494069384_760fc17c8f_c.jpg) - -#### MySQL Server Administration #### - -You can start or stop a MySQL server, and examine its server logs. - -![](https://farm8.staticflickr.com/7588/17114969592_54526dfb32_c.jpg) - -#### Database Schema Management #### - -You can view, change or inspect database schema visually. For that, choose and right-click on any database or table under "Schemas" heading. - -![](https://farm8.staticflickr.com/7665/16496363973_fd03a96198_c.jpg) - -![](https://farm9.staticflickr.com/8744/16909119497_7c884617b8_c.jpg) - -#### Database Query #### - -You can execute any arbitrary query (as long as your login privilege allows), and inspect its result. - -![](https://farm8.staticflickr.com/7716/17114969692_c0f02bb277_c.jpg) - -Note that performance statistics and reports are available for MySQL server 5.6 and higher. For 5.5 and lower, the performance section will be grayed out. - -### Conclusion ### - -The clean and intuitive tabbed interface, comprehensive feature sets, and open-source licensing make MySQL Workbench one of the best visual database design and administration tools out there. One known downside of Workbench is its performance. I notice that Workbench sometimes gets sluggish while running queries on a busy server. Despite its less than stellar performance, I still consider MySQL Workbench an essential tool for any professional MySQL database administrator and designer. - -Have you ever used Workbench in your work environment? Or do you recommend any other GUI tool? Feel free to share your experience. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/remote-mysql-databases-gui-tool.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://xmodulo.com/go/digitalocean -[2]:http://ask.xmodulo.com/install-phpmyadmin-centos.html -[3]:http://xmodulo.com/set-web-based-database-management-system-adminer.html -[4]:http://mysqlworkbench.org/ -[5]:http://dev.mysql.com/downloads/repo/apt/ -[6]:http://dev.mysql.com/downloads/repo/yum/ -[7]:http://xmodulo.com/how-to-allow-remote-access-to-mysql.html diff --git a/translated/tech/How to manage remote MySQL databases on Linux VPS using a GUI tool b/translated/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md similarity index 100% rename from translated/tech/How to manage remote MySQL databases on Linux VPS using a GUI tool rename to translated/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md From 61e24d736b32f00557829834bb9582ff47fb8866 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 21 Apr 2015 23:15:36 +0800 Subject: [PATCH 041/154] PUB:20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs @ictlyh --- ...om Elrepo or Source on Ubuntu or CentOs.md | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) rename {translated/tech => published}/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md (69%) diff --git a/translated/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md b/published/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md similarity index 69% rename from translated/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md rename to published/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md index a597b31c91..1921514d8e 100644 --- a/translated/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md +++ b/published/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md @@ -1,20 +1,20 @@ -如何从Elrepo/源 在Ubuntu/CentOS上安装Linux内核4.0 +如何在Ubuntu/CentOS上安装Linux内核4.0 ================================================================================ -大家好,今天我们学习一下如何从Elrepo或者编译源码安装最新的Linux内核4.0。昵称为‘Hurr durr I’m a sheep’的Linux内核4.0是目前为止最新的主干内核。是稳定版3.19.4后发布的内核。Linux Torvalds声明了Linux内核4.0的发布以及可及时提供,4月12日被认为是所有开源运动爱好者的重大日子。由于包括了一些很棒的功能,例如无重启补丁(实时补丁),新的升级驱动,最新的硬件支持以及很多有趣的功能都有新的版本,它被认为是一次重大发布。但是内核4.0并不认为是期望中的重大发布,Linus表示期望4.1是一个更大的发布。实时补丁功能已经集成到了SUSE企业版Linux操作系统上。你可以在[发布公告][1]上查看关于这次发布的更多详细内容。 +大家好,今天我们学习一下如何从Elrepo或者源代码来安装最新的Linux内核4.0。代号为‘Hurr durr I'm a sheep’的Linux内核4.0是目前为止最新的主干内核。它是稳定版3.19.4之后发布的内核。4月12日是所有的开源运动爱好者的大日子,Linux Torvalds宣布了Linux内核4.0的发布,它现在就已经可用了。由于包括了一些很棒的功能,例如无重启补丁(实时补丁),新的升级驱动,最新的硬件支持以及很多有趣的功能都有新的版本,它原本被期望是一次重要版本。但是实际上内核4.0并不认为是期望中的重要版本,Linus 表示期望4.1会是一个更重要的版本。实时补丁功能已经集成到了SUSE企业版Linux操作系统上。你可以在[发布公告][1]上查看关于这次发布的更多详细内容。 > **警告**: 安装新的内核可能会导致你的系统不可用或不稳定。如果你仍然使用以下命令继续安装,请确保备份所有重要数据到外部硬盘。 ### 在Ubuntu 15.04上安装Linux内核4.0 ### -如果你正在使用Linux的发行版Ubuntu 15.04,你可以直接通过Ubuntu内核网站安装。在你的Ubuntu15.04上安装最新的Linux内核4.0,你需要在shell或终端中在root访问权限下运行一下命令。 +如果你正在使用Linux的发行版Ubuntu 15.04,你可以直接通过Ubuntu内核网站安装。在你的Ubuntu15.04上安装最新的Linux内核4.0,你需要在shell或终端中在root访问权限下运行以下命令。 -#### 在 64-bit Ubuntu 15.04 #### +#### 在 64位 Ubuntu 15.04 #### $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_amd64.deb $ sudo dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb -#### 在 32-bit Ubuntu 15.04 #### +#### 在 32位 Ubuntu 15.04 #### $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_i386.deb @@ -27,7 +27,7 @@ 1. 从Elrepo软件仓库安装 1. 从源代码编译安装 -由于是最简单的方式,我们首先用ElRepo安装。 +我们首先用ElRepo安装,这是最简单的方式: #### 使用 Elrepo 安装 #### @@ -44,7 +44,7 @@ **2. 升级Linux内核到4.0版本** -现在,我们打算从ELRepo软件仓库安装最新的稳定版内核4.0。做这些,我们需要在CentOS 7的shell或者终端中输入以下命令。 +现在,我们准备从ELRepo软件仓库安装最新的稳定版内核4.0。安装它我们需要在CentOS 7的shell或者终端中输入以下命令。 # yum --enablerepo=elrepo-kernel install kernel-ml @@ -58,7 +58,7 @@ **1. 安装依赖软件** -首先我们需要为编译linux内核安装依赖的软件。做这些,我们需要在一个终端或者shell中运行以下命令。 +首先我们需要为编译linux内核安装依赖的软件。要完成这些,我们需要在一个终端或者shell中运行以下命令。 # yum groupinstall "Development Tools" @@ -72,7 +72,7 @@ **2. 下载源代码** -现在我们通过wget命令从Linux内核官方仓库中下载最新发布的linux内核4.0的源代码。你也可以使用你的浏览器直接从[kernel.org][3]网站下载内核。 +现在我们通过wget命令从Linux内核的官方仓库中下载最新发布的linux内核4.0的源代码。你也可以使用你的浏览器直接从[kernel.org][3]网站下载内核。 # cd /tmp/ # wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.0.tar.xz @@ -90,7 +90,7 @@ **4. 配置** -我们要配置Linux内核的两个选项。我们可以创建一个新的自定义配置文件或者使用旧的配置文件来构建和安装Linux内核。这都取决于你自己的想法。 +配置Linux内核有两种选择的。我们可以创建一个新的自定义配置文件或者使用已有的配置文件来构建和安装Linux内核。这都取决于你自己的需要。 **配置新的内核** @@ -100,23 +100,25 @@ ![配置新内核](http://blog.linoxide.com/wp-content/uploads/2015/04/configuring-new-kernel-config.png) -**旧的配置** +**已有的配置** + +如果你想用已有的配置文件配置你最新的内核,那就输入下面的命令。如果你对配置有任何调整,你可以选择Y或者N,或者仅仅是按Enter键继续。 -如果你想用旧的配置文件配置你最新的内核,那就输入下面的命令。如果对你有任何提问,你可以选择Y或者N,或者仅仅是按Enter键继续。 # make oldconfig #### Step 5. 编译Linux内核 #### 下一步,我们会执行make命令来编译内核4.0。取决于你的系统配置,编译至少需要20-30分钟。 -注:如果编译内核的时候出现bc command not found的错误,你可以用**yum install bc**命令安装bc修复这个错误。 +注:如果编译内核的时候出现`bc command not found`的错误,你可以用**yum install bc**命令安装bc修复这个错误。 # make + ![Make 内核](http://blog.linoxide.com/wp-content/uploads/2015/04/make-kernel.png) #### 6. 安装Linux内核4.0 #### -编译完成后,我们终于要在你的Linux系统上安装**内核**了。下面的命令会在/boot目录下创建文件并且在Grub Menu中新建一个内核条目。 +编译完成后,我们终于要在你的Linux系统上安装**内核**了。下面的命令会在/boot目录下创建文件并且在Grub 菜单中新建一个内核条目。 # make modules_install install @@ -136,11 +138,11 @@ via: http://linoxide.com/how-tos/install-linux-kernel-4-0-elrepo-source/ 作者:[Arun Pyasi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunp/ -[1]:http://lkml.iu.edu/hypermail/linux/kernel/1504.1/03198.html +[1]:http://linux.cn/article-5259-1.html [2]:http://elrepo.org/tiki/SecureBootKey [3]:http://kernel.org/ \ No newline at end of file From 46ee18fccb11ba3cc865cbbf5e6cd56da0a89a8b Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 22 Apr 2015 09:53:56 +0800 Subject: [PATCH 042/154] [Translating] tech/20150417 How to Configure MariaDB Replication on CentOS Linux --- ...50417 How to Configure MariaDB Replication on CentOS Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md b/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md index a5a717cf46..76073ebc90 100644 --- a/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md +++ b/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md @@ -1,3 +1,4 @@ +Translating by ictlyh How to Configure MariaDB Replication on CentOS Linux ================================================================================ Its a process of creating duplicate versions of a the DB. Replication process is not only copies a database, but also synchronizes changes from master to one of the slaves. But this is does not means that slave databases are identical copy of the master, because replication can be configured that only a schema of tables or columns or rows will be replicated, i.e. a partial replication. The replication ensures that those specific configured objects are kept in sync between the different databases. From 39d2f12b1187f3747276282c856a529e908aafca Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 22 Apr 2015 11:03:53 +0800 Subject: [PATCH 043/154] Translating by ZTinoZ --- ... FAQs with Answers--How to disable IPv6 on Linux.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 index 5d5c961a17..af932ba1a5 100644 --- 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 @@ -6,13 +6,13 @@ IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品 理想情况下,[向IPv6过渡的进程][1]不应该被最终的用户所看见,但是IPv4/IPv6混合环境有时会让你碰到各种源于IPv4和IPv6之间不经意间的相互作用的问题。举个例子,你会碰到应用程序超时的问题比如apt-get或ssh尝试通过IPv6连接失败、DNS服务器意外清空了IPv6的AAAA记录、或者你支持IPv6的设备不兼容你的互联网服务提供商遗留下的IPv4网络等等等等。 -当然这不意味着你应该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. +当然这不意味着你应该盲目地在你的Linux机器上禁用IPv6。鉴于IPv6许诺的种种好处,作为社会的一份子我们最终还是要充分拥抱它的,但是作为给最终用户进行故障排除过程的一部分,如果IPv6确实是罪魁祸首那你可以尝试去关闭它。 -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. +这里有一些让你在Linux中部分或全部禁用IPv6的小技巧(例如:为一个已经确定的网络接口)。这些小贴士应该适用于所有主流的Linux发行版包括Ubuntu、Debian、Linux Mint、CentOS、Fedora、RHEL以及Arch Linux。 -### Check if IPv6 is Enabled on Linux ### +### 查看IPv6在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. +所有现代Linux发行版默认都自动启用IPv6。为了能看到IPv6在你的Linux中是否被激活,可以使用ifconfig或ip命令。如果你在输入这些命令之后看到"inet6"字样的输出,那就意味着你的Linux系统启用了IPv6。 $ ifconfig @@ -22,7 +22,7 @@ All modern Linux distributions have IPv6 automatically enabled by default. To se ![](https://farm8.staticflickr.com/7290/16415082248_c4e075548b_c.jpg) -### Disable IPv6 Temporarily ### +### 临时禁用IPv6 ### 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. From 817ed60c274576b48df716dbeb4ffbcfcb276c9a Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 22 Apr 2015 12:05:24 +0800 Subject: [PATCH 044/154] Translating by ZTinoZ --- ... FAQs with Answers--How to disable IPv6 on Linux.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 index af932ba1a5..69eb64d6d7 100644 --- 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 @@ -24,23 +24,23 @@ IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品 ### 临时禁用IPv6 ### -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. +如果你想要在你的Linux系统上临时关闭IPv6,你可以用 /proc 文件系统。"临时",意思是我们所做的禁用IPv6的更改在系统重启后将不被保存。IPv6会在你的Linux机器重启后再次被启用。 -To disable IPv6 for a particular network interface, use the following command. +要将一个特定的网络接口禁用IPv6,使用以下命令: $ sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf//disable_ipv6' -For example, to disable IPv6 for eth0 interface: +举个例子,将eth0接口禁用IPv6: $ 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: +重新启用eth0接口的IPv6: $ 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: +如果你想要将整个系统所有接口包括回环接口禁用IPv6,使用以下命令: $ sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6' From 6d26d9256329ffdc518f343e0d168af420859201 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 22 Apr 2015 13:43:27 +0800 Subject: [PATCH 045/154] [Translated] tech/20150417 How to Configure MariaDB Replication on CentOS Linux --- ...ure MariaDB Replication on CentOS Linux.md | 157 +++++++++--------- 1 file changed, 78 insertions(+), 79 deletions(-) rename {sources => translated}/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md (57%) diff --git a/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md b/translated/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md similarity index 57% rename from sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md rename to translated/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md index 76073ebc90..ca27084edf 100644 --- a/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md +++ b/translated/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md @@ -1,64 +1,63 @@ -Translating by ictlyh -How to Configure MariaDB Replication on CentOS Linux +如何在 CentOS Linux 中配置 MariADB 复制 ================================================================================ -Its a process of creating duplicate versions of a the DB. Replication process is not only copies a database, but also synchronizes changes from master to one of the slaves. But this is does not means that slave databases are identical copy of the master, because replication can be configured that only a schema of tables or columns or rows will be replicated, i.e. a partial replication. The replication ensures that those specific configured objects are kept in sync between the different databases. +这是一个创建数据库重复版本的过程。复制过程不仅仅是复制一个数据库,同时也包括从主节点到一个从节点的更改同步。但这并不意味着从数据库就是和主数据库完全相同的副本,因为复制可以配置为只有表或者行或者列的一个模式将被复制,例如,局部复制。复制保证了特定的配置对象在不同的数据库之间保持同步。 -### Mariadb Replication Concepts ### +### Mariadb 复制概念 ### -**Backups** : Replication can be used for DB backups. For example, you have master -> slave replication. If master is lost (hdd fails, for example) you can restore your db from master. +**备份** :复制可以用来进行数据库备份。例如,你有主->从复制。如果主节点丢失(比如hdd损坏),你可以从从节点中恢复你的数据库。 -**Scaling** : You can use master -> slave replication for scaling solution. For example, if you have a few big and have SQL query, using replcation you can separate this queries for each replcations nodes. Write SQL should be performed only on master, for read-only queries slave server can be used. +**扩展** :你可以使用主->从复制作为扩展的解决方案。例如,如果你有一些大的数据库以及SQL查询,使用复制你可以将这些查询单独分到每个复制节点。写SQL应该只在主节点进行,而只读查询可以在从节点上进行。 -**Spreading solution** : You can use replication for distribution. For example, you can distribute different sales data to different databases. +**传播解决方案** :你可以用复制来进行分发。例如,你可以将不同的销售数据分发到不同的数据库。 -**Failover solution** : For example you have, master -> slave(1) -> slave(2) -> slave(3) replication. You can write script for master monitoring , if master fails, script can quickly change slave(1) new for master master -> slave(1) -> slave(2) and your application will continue working whit out downtime +**故障解决方案** : 假如你有主节点->从节点1->从节点2->从节点3的复制。你可以为主节点写脚本监控,如果主节点出故障了,脚本可以快速的将从节点1作为新的主节点,有主节点->从节点1->从节点2,你的应用可以继续工作而不会停机。 -### Simple diagrammatic demonstration of replication ### +### 复制的简单图解示范 ### -![mysql replication principle](http://blog.linoxide.com/wp-content/uploads/2015/04/mysql-replication-principle.png) +![mysql 复制原理](http://blog.linoxide.com/wp-content/uploads/2015/04/mysql-replication-principle.png) -Before you start good know what is **binary log** and Ibdata1. The binary log contains a record about all changes in the db, data and structure, as well as how long each statement took to execute. Bin log consists set log files and an index. Its means that main SQL statements such as CREATE, ALTER, INSERT, UPDATE and DELETE will be putted to this log, statements, such as SELECT will not be logged. These info can be logged to general query.log file. In simple **Ibdata1** is a file which contains all tables and all info about db. +开始之前,你应该知道什么是**二进制日志文件**以及 Ibdata1。二进制日志文件中包括关于数据库,数据和结构的所有更改的记录,以及每条语句的执行时间。二进制日志文件包括设置日志文件和一个索引。这意味着主要的SQL语句,例如CREATE, ALTER, INSERT, UPDATE 和 DELETE 会放到这个日志文件中,而例如SELECT语句就不会被记录。这些信息可以被记录到普通的query.log文件。简单的说 **Ibdata1** 是一个包括所有表和所有数据库信息的文件。 -### Master server configuration ### +### 主服务器配置 ### -Good to have server updated +首先升级服务器 sudo yum install update -y && sudo yum install upgrade -y -We are working on centos 7 server +我们工作在centos7 服务器上 sudo cat /etc/redhat-release CentOS Linux release 7.0.1406 (Core) -Install MariaDB +安装 MariaDB sudo yum install mariadb-server -y -Start MariaDB and enable it to start on boot of the server +启动 MariaDB 并启用随服务器启动 sudo systemctl start mariadb.service sudo systemctl enable mariadb.service -Output: +输出: ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service' -Check MariaDB status +检查 MariaDB 状态 sudo service mariadb status -or use +或者使用 sudo systemctl is-active mariadb.service -Output: +输出: Redirecting to /bin/systemctl status mariadb.service mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled) -Set MariaDB password +设置 MariaDB 密码 mysql -u root mysql> use mysql; @@ -66,35 +65,35 @@ Set MariaDB password mysql> flush privileges; mysql> exit -SOME_ROOT_PASSWORD - your root password. I my case I'ill use "q" - password, then try to login: +SOME_ROOT_PASSWORD - 你的 root 密码。 例如我用"q"作为密码,然后尝试登陆: sudo mysql -u root -pSOME_ROOT_PASSWORD -Output: +输出: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 5 Server version: 5.5.41-MariaDB MariaDB Server Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others. -Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. +输入 'help;' 或 '\h' 查看帮助信息。 输入 '\c' 清空当前输入语句。 -Lets create database with table with some data +让我们创建包括一些数据的表的数据库 -Create database/schema +创建数据库/模式 sudo mysql -u root -pSOME_ROOT_PASSWORD mysql> create database test_repl; -Where: +其中: - test_repl - Name of shcema which will be replicated + test_repl - 将要被复制的模式的名字 -Output: +输出: Query OK, 1 row affected (0.00 sec) -Create Persons table +创建 Persons 表 mysql> use test_repl; @@ -106,7 +105,7 @@ Create Persons table City varchar(255) ); -Output: +输出: mysql> MariaDB [test_repl]> CREATE TABLE Persons ( -> PersonID int, @@ -117,7 +116,7 @@ Output: -> ); Query OK, 0 rows affected (0.01 sec) -Insert some data +插入一些数据 mysql> INSERT INTO Persons VALUES (1, "LastName1", "FirstName1", "Address1", "City1"); mysql> INSERT INTO Persons VALUES (2, "LastName2", "FirstName2", "Address2", "City2"); @@ -125,15 +124,15 @@ Insert some data mysql> INSERT INTO Persons VALUES (4, "LastName4", "FirstName4", "Address4", "City4"); mysql> INSERT INTO Persons VALUES (5, "LastName5", "FirstName5", "Address5", "City5"); -Output: +输出: Query OK, 5 row affected (0.00 sec) -Check data +检查数据 mysql> select * from Persons; -Output: +输出: +----------+-----------+------------+----------+-------+ | PersonID | LastName | FirstName | Address | City | @@ -146,13 +145,13 @@ Output: | 5 | LastName5 | FirstName5 | Address5 | City5 | +----------+-----------+------------+----------+-------+ -### Configure MariaDB for replication ### +### 配置 MariaDB 重复 ### -You'll need to edit the my.cnf file on the Master server to enable binary logging and set the server's id. I will use vi text editor, but use can use any suitable for your such as nano, joe etc. +你需要在主结点服务器上编辑 my.cnf文件来启用二进制日志以及设置服务器id。我会使用vi文本编辑器,但你可以使用任何你喜欢的,例如nano,joe。 sudo vi /etc/my.cnf -and put to config in [mysqld] section such lines. +将下面的一些行写到[mysqld]部分。 log-basename=master @@ -160,21 +159,21 @@ and put to config in [mysqld] section such lines. binlog-format=row server_id=1 -Output: +输出: -![mariadb config master](http://blog.linoxide.com/wp-content/uploads/2015/04/mariadb-config.png) +![mariadb 配置主节点](http://blog.linoxide.com/wp-content/uploads/2015/04/mariadb-config.png) -Then restart MariaDB: +然后重启 MariaDB: sudo service mariadb restart -Login to MariaDB and check binary logs: +登录到 MariaDB 并查看二进制日志文件: sudo mysql -u root -pq test_repl mysql> SHOW MASTER STATUS; -Output: +输出: +--------------------+----------+--------------+------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | @@ -182,23 +181,23 @@ Output: | mariadb-bin.000002 | 3913 | | | +--------------------+----------+--------------+------------------+ -**Remember** : "File" and "Position" values. YOU WILL NEED THIS VALUE AT SLAVE SERVER +**记住** : "File" 和 "Position" 的值。在从节点中你需要使用这些值 -Create user for replication +创建用来重复的用户 mysql> GRANT REPLICATION SLAVE ON *.* TO replication_user IDENTIFIED BY 'bigs3cret' WITH GRANT OPTION; mysql> flush privileges; -Output: +输出: Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) -Check user in db +在数据库中检查用户 mysql> select * from mysql.user WHERE user="replication_user"\G; -Output: +输出: mysql> select * from mysql.user WHERE user="replication_user"\G; *************************** 1. row *************************** @@ -208,38 +207,38 @@ Output: Select_priv: N ..... -Create DB dump (snapshot of all data which will be replicated) form master +从主节点创建 DB dump (将要被复制的所有数据的快照) mysqldump -uroot -pSOME_ROOT_PASSWORD test_repl > full-dump.sql -Where: +其中: - SOME_ROOT_PASSWORD - password for root user that you have setup - test_repl - name of the data base which will be replicated; + SOME_ROOT_PASSWORD - 你设置的root用户的密码 + test_repl - 将要复制的数据库的名称; -You need to recover mysql dump (full-dump.sql) at slave server. Its needed for replication. +你需要在从节点中恢复 mysql dump (full-dump.sql)。重复需要这个。 -### Slave server configuration ### +### 从节点配置 ### -All this commands you need to perform at slave server +所有这些命令需要在从节点中进行 -Lets assume that we have fresh/updated CentOS 7.x server with latest mariaDB server and you can login as root to maria DB server (this was descripbed in first part of the article) +假设我们已经更新/升级了包括有最新的MariaDB服务器的 CentOS 7.x,而且你可以用root账号登陆到MariaDBs服务器(这在这篇文章的第一部分已经介绍过) -Login to Maria DB console and create DB +登陆到Maria 数据库控制台并创建数据库 mysql -u root -pSOME_ROOT_PASSWORD; mysql> create database test_repl; mysql> exit; -Recover data from master at slave server +在从节点恢复主节点的数据 mysql -u root -pSOME_ROOT_PASSWORD test_repl < full-dump.sql -Where: +其中: -full-dump.sql - its DB Dump that you have create at test server. +full-dump.sql - 你在测试服务器中创建的DB Dump。 -Login to Maria DB and setup replication +登录到Maria 数据库并启用复制 mysql> CHANGE MASTER TO MASTER_HOST='82.196.5.39', @@ -250,30 +249,30 @@ Login to Maria DB and setup replication MASTER_LOG_POS=3913, MASTER_CONNECT_RETRY=10; -![mariadb setup replication](http://blog.linoxide.com/wp-content/uploads/2015/04/setup-replication.png) +![mariadb 启用复制](http://blog.linoxide.com/wp-content/uploads/2015/04/setup-replication.png) -Where: +其中: - MASTER_HOST - IP of the master server. - MASTER_USER - replication user at master server - MASTER_PASSWORD - replication user password - MASTER_PORT - mysql port at master - MASTER_LOG_FILE - bin-log file name form master - MASTER_LOG_POS - bin-log position file at master + MASTER_HOST - 主节点服务器的IP + MASTER_USER - 主节点服务器中的复制用户 + MASTER_PASSWORD - 复制用户密码 + MASTER_PORT - 主节点中的mysql端口 + MASTER_LOG_FILE - 主节点中的二进制日志文件名称 + MASTER_LOG_POS - 主节点中的二进制日志文件位置 -Start slave mode +开启从节点模式 mysql> slave start; -Output: +输出: Query OK, 0 rows affected (0.00 sec) -Check slave status +检查从节点状态 mysql> show slave status\G; -Output: +输出: *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event @@ -318,11 +317,11 @@ Output: Master_Server_Id: 1 1 row in set (0.00 sec) -At this step all shoul be ok, and not erros should be here. +到这里所有步骤都应该没问题,也不应该出现错误。 -### Test the replication ### +### 测试复制 ### -At MAIN/MASTER server add some entities to DB +在主节点服务器中添加一些条目到数据库 mysql -u root -pSOME_ROOT_PASSWORD test_repl @@ -330,7 +329,7 @@ At MAIN/MASTER server add some entities to DB mysql> INSERT INTO Persons VALUES (7, "LastName7", "FirstName7", "Address7", "City7"); mysql> INSERT INTO Persons VALUES (8, "LastName8", "FirstName8", "Address8", "City8"); -Then go to the SLAVE server and check replicated data +到从节点服务器中查看复制数据 mysql -u root -pSOME_ROOT_PASSWORD test_repl @@ -345,14 +344,14 @@ Then go to the SLAVE server and check replicated data | 8 | LastName8 | FirstName8 | Address8 | City8 | +----------+-----------+------------+----------+-------+ -You can see the data is replicated to slave server. Its mean that replication is working. Hope you enjoyed the article. Let us know if you have any questions. +你可以看到数据已经被复制到从节点。这意味着复制能正常工作。希望你能喜欢这篇文章。如果你有任何问题请告诉我们。 -------------------------------------------------------------------------------- via: http://linoxide.com/how-tos/configure-mariadb-replication-centos-linux/ 作者:[Bobbin Zachariah][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ictlyh](https://github.com/ictlyh) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ebd8904d56a4a5022b0608b45f24eb85411f16f3 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 22 Apr 2015 15:00:16 +0800 Subject: [PATCH 046/154] Translating by ZTinoZ --- ...h Answers--How to disable IPv6 on Linux.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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 index 69eb64d6d7..84da819899 100644 --- 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 @@ -44,30 +44,30 @@ IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品 $ sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6' -### Disable IPv6 Permanently across Reboots ### +### 永久禁用IPv6 ### -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. +以上方法是不能永久禁用IPv6的,你一旦重启系统IPv6还是会被启用。如果你想要永久关闭它,有几个方法你可以试试。 -#### Method One #### +#### 方法一 #### -The first method is to apply the above /proc changes persistently in /etc/sysctl.conf file. +第一种方法是请求以上提到的 /proc 对 /etc/sysctl.conf 文件进行修改。 -That is, open /etc/sysctl.conf with a text editor, and add the following lines. +换句话说,就是用文本编辑器打开 /etc/sysctl.conf 然后添加以下内容: - # to disable IPv6 on all interfaces system wide + # 禁用整个系统所有接口的IPv6 net.ipv6.conf.all.disable_ipv6 = 1 - # to disable IPv6 on a specific interface (e.g., eth0, lo) + # 禁用某一个指定接口的IPv6(例如: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: +在 /etc/sysctl.conf 使这些更改生效,运行以下命令: $ 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. From d1de6b25bb3f2f9193c6e2dd02089374c95238f6 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Wed, 22 Apr 2015 16:19:31 +0800 Subject: [PATCH 047/154] translating wi-cuckoo --- .../20150417 How to Install Discourse in a Docker Container.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150417 How to Install Discourse in a Docker Container.md b/sources/tech/20150417 How to Install Discourse in a Docker Container.md index c916bda8f2..adedf08faa 100644 --- a/sources/tech/20150417 How to Install Discourse in a Docker Container.md +++ b/sources/tech/20150417 How to Install Discourse in a Docker Container.md @@ -1,3 +1,4 @@ +translating wi-cuckoo How to Install Discourse in a Docker Container ================================================================================ Hi all, today we'll learn how to install Discourse using Docker Platform. Discourse is the 100% open source discussion platform built for the next decade of the Internet featuring as a mailing list, a discussion forum and a long-form chat room. It is a smart way of attempt to reimagine what a modern, sustainable, fully open-source Internet discussion platform should be today, both from a technology standpoint and a sociology standpoint. Discourse is simple, clean, and straightforward way for discussion. It is really an awesome platform for any kinds of discussions on internet featuring such a cool services out of the box. Docker is an open source platform that provides an open platform to pack, ship and run any application as a lightweight container. Docker containers makes Discourse a lot handy and easy to setup app. @@ -157,4 +158,4 @@ via: http://linoxide.com/how-tos/install-discourse-docker-container/ [a]:http://linoxide.com/author/arunp/ [1]:https://mandrillapp.com/ [2]:http://www.mailgun.com/ -[3]:https://www.mailjet.com/pricing \ No newline at end of file +[3]:https://www.mailjet.com/pricing From 60aba61edc0101aeccdbb6530ff06fcc779a5d40 Mon Sep 17 00:00:00 2001 From: VicYu Date: Wed, 22 Apr 2015 23:06:40 +0800 Subject: [PATCH 048/154] Translating --- ...--How to compile ixgbe driver on CentOS, RHEL or Fedora.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md b/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md index 972143b392..ac871512e1 100644 --- a/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md +++ b/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md @@ -1,3 +1,5 @@ + Vic020 + Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora ================================================================================ > **Question**: I want to build and install the latest ixgbe 10G NIC driver. How can I compile ixgbe driver on CentOS, Fedora or RHEL? @@ -193,4 +195,4 @@ via: http://ask.xmodulo.com/compile-ixgbe-driver-centos-rhel-fedora.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://ask.xmodulo.com/download-install-ixgbe-driver-ubuntu-debian.html -[2]:http://sourceforge.net/projects/e1000/files/ixgbe%20stable/ \ No newline at end of file +[2]:http://sourceforge.net/projects/e1000/files/ixgbe%20stable/ From 9eacd978d1c95d9920ceac64768a4cc7b13922e0 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Thu, 23 Apr 2015 10:31:08 +0800 Subject: [PATCH 049/154] Update 20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md --- ...0420 7 Interesting Linux 'sort' Command Examples--Part 2.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md b/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md index 6bb7d8159f..fd6b0f488b 100644 --- a/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md +++ b/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md @@ -1,3 +1,4 @@ +[Dongshuaike translating] 7 Interesting Linux ‘sort’ Command Examples – Part 2 ================================================================================ In our last article we have covered various examples on sort command, if you’ve missed, you can go through it using below link. In continuation to the last post this post aims at covering remaining of sort command so that both the article together serves as complete guide to Linux ‘sort‘ command. @@ -128,4 +129,4 @@ via: http://www.tecmint.com/linux-sort-command-examples/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/sort-command-linux/ \ No newline at end of file +[1]:http://www.tecmint.com/sort-command-linux/ From 3f917014adef05996fdbd81fc9ec523a3bd3120e Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 23 Apr 2015 12:53:36 +0800 Subject: [PATCH 050/154] [Translating] tech/20150413 A Walk Through Some Important Docker Commands --- .../20150413 A Walk Through Some Important Docker Commands.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150413 A Walk Through Some Important Docker Commands.md b/sources/tech/20150413 A Walk Through Some Important Docker Commands.md index 33f1c02885..074c5b12a7 100644 --- a/sources/tech/20150413 A Walk Through Some Important Docker Commands.md +++ b/sources/tech/20150413 A Walk Through Some Important Docker Commands.md @@ -1,3 +1,4 @@ +Translating by ictlyh A Walk Through Some Important Docker Commands ================================================================================ Hi everyone today we'll learn some important Docker Commands that you'll need to learn before you go with Docker. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. From a37c2ba3b7829148f98084541ab048cc906a8ee1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 23 Apr 2015 15:46:28 +0800 Subject: [PATCH 051/154] =?UTF-8?q?20150423-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...mming Languages in to GitHub Since 2012.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md diff --git a/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md b/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md new file mode 100644 index 0000000000..82155bb1a6 --- /dev/null +++ b/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md @@ -0,0 +1,32 @@ +The Most Popular Programming Languages in to GitHub Since 2012 +================================================================================ +![](http://www.loggly.com/wp-content/uploads/2015/04/Infographic_Github_popular_languages_Blogheader.png) + +Programming languages are not simply the tools that developers use to create programs or express algorithms. They’re also instruments to code and decode creativity. By observing the history of programming languages, we gain a unique perspective on our quest to find better ways to solve problems, facilitate collaboration, build great products, and reuse the efforts of others. + +About 70% of our customers send application logs to our service, so Loggly is interested in tracking which languages are most popular and which ones are gaining traction among developers. + +Based on the historical [GitHub Archive][1] and [GitHut][2] data starting in 2012, we analyzed the most common developer actions within GitHub and turned it into the infographic you see below. We looked at: + +- The number of active repositories, a useful proxy for the projects that people are working on right now. +- The total number of pushes per language as well as the average number of pushes per repository. These metrics are indicators of the rate of innovation occurring with projects being written in a particular language. +- New forks and open issues per repository, which also show active use and innovation. +- New watchers per repository, an indicator of developer interest. + +### Check out the infographic and let us know what you think! How does your programming language of choice fare among your peers? ### + +![](http://www.loggly.com/wp-content/uploads/2015/04/Most-Popular-Languages-According-to-GitHub-Since-2012-loggly-infographic_v3.png) + +-------------------------------------------------------------------------------- + +via: https://www.loggly.com/blog/the-most-popular-programming-languages-in-to-github-since-2012/ + +作者:[Justin Mares][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.loggly.com/blog/author/guest/ +[1]:https://www.githubarchive.org/ +[2]:http://githut.info/ \ No newline at end of file From 39f4191b1c46c5eae0105016f672090ec71283f3 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 23 Apr 2015 16:29:52 +0800 Subject: [PATCH 052/154] [Translating] talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012 --- ...Most Popular Programming Languages in to GitHub Since 2012.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md b/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md index 82155bb1a6..6ad6d94d67 100644 --- a/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md +++ b/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md @@ -1,3 +1,4 @@ +Translating by ictlyh The Most Popular Programming Languages in to GitHub Since 2012 ================================================================================ ![](http://www.loggly.com/wp-content/uploads/2015/04/Infographic_Github_popular_languages_Blogheader.png) From 858e15fcfcb3a9803785512dc501f2aff7af7d95 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 23 Apr 2015 16:38:25 +0800 Subject: [PATCH 053/154] =?UTF-8?q?21150423-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...cing Game on Linux Just Got Even Better.md | 37 +++ ...me Docker Containers for a Desktop User.md | 237 ++++++++++++++++++ ... Private interface to Internet in Linux.md | 75 ++++++ ... Web Browser and Email Client in Ubuntu.md | 76 ++++++ 4 files changed, 425 insertions(+) create mode 100644 sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md create mode 100644 sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md create mode 100644 sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md create mode 100644 sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md diff --git a/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md b/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md new file mode 100644 index 0000000000..c664676a83 --- /dev/null +++ b/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md @@ -0,0 +1,37 @@ +uperTuxKart 0.9 Released — The Best Racing Game on Linux Just Got Even Better +================================================================================ +**A brand new version of the hugely popular racing game SuperTuxKart has [zipped past the release line][1] to land on download servers. ** + +![Super Tux Kart 0.9 Release Poster](http://1.bp.blogspot.com/-eGXvJu3UVwc/VTVhICZVEtI/AAAAAAAAAf0/iP2bkWDNf_c/s1600/poster-cropped.jpg) +Super Tux Kart 0.9 Release Poster + +SuperTuxKart 0.9 is a huge update over earlier versions, running a hot new engine (awesomely named ‘Antarctica’) under the hood that aims to deliver richer graphical environments , shading and depth of field plus better kart physics. + +The bump in graphics performance necessitates a bump in graphics card requirements, too. SuperTuxKart developers advise would-be racers to will need a device with graphics comparable to (or, ideally, better than) Intel HD Graphics 3000, NVIDIA GeForce 8600 or AMD Radeon HD 3650. + +### Other Changes ### + +Keeping pace alongside the headline visual improvements in SuperTuxKart 0.9 is pair **brand new tracks**, new Karts, new online accounts for keeping track of and sharing badges earned through the **newly introduced achievements system**, and oodles of fixes and artwork tweaks. + +Check out STK 0.9 in all its shader-based glory by hitting play on the official release video below. + +注:youtube 视频 + + +Ubuntu users can grab pre-compiled binaries for the new release from the project website. + +- [Download SuperTuxKart 0.9][2] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/supertuxkart-0-9-released + +作者:[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://supertuxkart.blogspot.co.uk/2015/04/supertuxkart-09-released.html +[2]:http://supertuxkart.sourceforge.net/Downloads \ No newline at end of file diff --git a/sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md b/sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md new file mode 100644 index 0000000000..060aeb755d --- /dev/null +++ b/sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md @@ -0,0 +1,237 @@ +20 Awesome Docker Containers for a Desktop User +================================================================================ +Greetings to everyone, today we'll list out some awesome Desktop Apps that we can run using Docker Containers in our very own Desktop running Docker. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. It is basically used by the developers, Ops and Engineers as it is easy, fast and handy tool for testing or deploying their products but we can also use Docker for our Desktop usage to run a desktop apps out of the box. + +So here are some awesome 10 Desktop Application Docker images that we can run with Docker. + +### 1. Lynx ### + +Lynx is a all time favorite text-based web browser which is a lot familiar to most of the people running Linux. It is the oldest web browser currently in general use and development. To run Lynx, run the following command. + + $ docker run -it \ + --name lynx \ + jess/lynx + +### 2. Irssi ### + +Irssi is an awesome IRC Client which is based on Text Interface. To run Irssi using docker, we'll need to run the following commands in a docker installed desktop computer. + + docker run -it --name my-irssi -e TERM -u $(id -u):$(id -g) \ + -v $HOME/.irssi:/home/user/.irssi:ro \ + -v /etc/localtime:/etc/localtime:ro \ + irssi + +### 3. Chrome ### + +Chrome is an awesome GUI-based web browser developed by Google and is based on Open Source Project Chromium. Google Chrome is widely used, fast and secure web browser that are very much familiar to most of the people who surf internet. We can run Chrome using docker by running the following command. + + $ docker run -it \ + --net host \ + --cpuset 0 \ + --memory 512mb \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + -v $HOME/Downloads:/root/Downloads \ + -v $HOME/.config/google-chrome/:/data \ + -v /dev/snd:/dev/snd --privileged \ + --name chrome \ + jess/chrome + +### 4. Tor Browser ### + +Tor Browser is a web browser which support anonymous features. It enables us freedom to surf website or services blocked by a particular organization or ISPs. It prevents somebody watching our Internet connection from learning what we do on internet and our exact location. To run Tor Browser, run the following command. + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + -v /dev/snd:/dev/snd --privileged \ + --name tor-browser \ + jess/tor-browser + +### 5. Firefox Browser ### + +Firefox Browser is a free and open source web browser which is developed by Mozilla Foundation. It is run by Gecko and SpiderMonkey engines. Firefox Browser has a lot of new features and is specially known for its performance and security. + + $ docker run -d \ + --name firefox \ + -e DISPLAY=$DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + kennethkl/firefox + +### 6. Rainbow Stream ### + +Rainbow Stream is a terminal based Twitter Client featuring real time tweetstream, compose, search , favorite and much more fun directly from terminal. To run Rainbow Stream, run the following command. + + $ docker run -it \ + -v /etc/localtime:/etc/localtime \ + -v $HOME/.rainbow_oauth:/root/.rainbow_oauth \ + -v $HOME/.rainbow_config.json:/root/.rainbow_config.json \ + --name rainbowstream \ + jess/rainbowstream + +### 7. Gparted ### + +Gparted is an open source software which allows us to partition disks. Now enjoy partitioning from a docker container. To run gparted, we'll need to run the following command. + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + --device /dev/sda:/dev/sda \ # mount the device to partition + --name gparted \ + jess/gparted + +### 8. GIMP Editor ### + +GIMP stands for Gnu Image Manipulation Program which is an awesome tool on Linux for graphics, image editing platform. It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. + + $ docker run -it \ + --rm -e DISPLAY=$DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + jarfil/gimp-git + +### 9. Thunderbird ### + +Thunderbird is also a free and open source email application which is developed and maintained by Mozilla Foundation. It has tons of features that an email application software should have. Thunderbird is really easy to setup and customize. To run Thunderbird in a Docker environment, run the following command. + + $ docker run -d \ + -e DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -u docker \ + -v $HOME/docker-data/thunderbird:/home/docker/.thunderbird/ \ + yantis/thunderbird thunderbird + +### 10. Mutt ### + +Mutt is a text based email client which has bunches of cool features including color support, IMAP, POP3, SMTP support, mail storing support and much more. To run Mutt out of the box using docker, we'll need to run the following command. + + $ docker run -it \ + -v /etc/localtime:/etc/localtime \ + -e GMAIL -e GMAIL_NAME \ + -e GMAIL_PASS -e GMAIL_FROM \ + -v $HOME/.gnupg:/home/user/.gnupg \ + --name mutt \ + jess/mutt + +### 11. Skype ### + +Skype is an instant messaging, video calling software which is not open source but can be run awesome in linux. We can run Skype using Docker Containers too. To run Skype using a docker, run the following command. + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -v /dev/snd:/dev/snd --privileged \ + -e DISPLAY="unix$DISPLAY" \ + tianon/skype + +### 12. Cathode ### + +Cathode is a beautiful fully customizable terminal app with a look inspired by classic computers. We can run Cathode by running the below command. + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + --name cathode \ + jess/1995 + +### 13. LibreOffice ### + +LibreOffice is a powerful office suite which is free and open source and is maintained by The Document Foundation. It has clean interface and is a powerful tools that lets us unleash our creativity and grow our productivity. LibreOffice embeds several applications that make it the most powerful Free & Open Source Office suite on the market. + + $docker run \ + -v $HOME/Documents:/home/libreoffice/Documents:rw \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e uid=$(id -u) -e gid=$(id -g) \ + -e DISPLAY=unix$DISPLAY --name libreoffice \ + chrisdaish/libreoffice + +### 14. Spotify ### + +Spotify gives us instant access to millions of songs from old favorites to the latest hits. To listen our favorite songs using docker, run the following command. + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + -v /dev/snd:/dev/snd --privileged \ + --name spotify \ + jess/spotify + +### 15. Audacity ### + +Audacity is free and open source cross-platform software for recording and editing sounds. Audacity can be used for post-processing of all types of audio, including podcasts by adding effects such as normalization, trimming, and fading in and out. To run Audacity, we'll need to run the following command in a terminal or shell. + + $ docker run --rm \ + -u $(id -u):$(id -g) \ + -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -v /dev/snd:/dev/snd \ + -v "$HOME:$HOME" \ + -w "$HOME" \ + -e DISPLAY="unix$DISPLAY" \ + -e HOME \ + $(find /dev/snd/ -type c | sed 's/^/--device /') \ + knickers/audacity + +### 16. Eclipse ### + +Eclipse is an integrated development environment (IDE). It contains a base workspace and an extensible plug-in system for customizing the environment. It is mostly used to develop Java Based Applications. + + $ docker run -v ~/workspace/:/home/eclipse/workspace/ \ + -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -d leesah/eclipse + +### 17. VLC Media Player ### + +VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVDs, Audio CDs, VCDs, and various streaming protocols. VLC Media Player is developed and maintained by VideoLAN Organization. To run VLC in docker environment, run the following command. + + $ docker run -v\ + $HOME/Documents:/home/vlc/Documents:rw \ + -v /dev/snd:/dev/snd --privileged \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e uid=$(id -u) -e gid=$(id -g) \ + -e DISPLAY=unix$DISPLAY --name vlc \ + chrisdaish/vlc + +### 18. Vim Editor ### + +Vim is a highly configurable text-based text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems. + + $ docker run -i -t --name my-vim -v ~/:/home/dev/src haron/vim + +### 19. Inkscape ### + +Inkscape is a free and open-source vector graphics editor. It can create, edit vector graphics such as illustrations, diagrams, line arts, charts, logos and even complex paintings. Inkscape's primary vector graphics format is Scalable Vector Graphics (SVG) version 1.1. It can import from or export to several other formats as well but all editing workflow must inevitably occur within the constraints of SVG format. + + $docker build -t rasch/inkscape --rm . + $ docker run --rm -e DISPLAY \ + -u inkscaper + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -v $HOME/.Xauthority:/home/inkscaper/.Xauthority \ + --net=host rasch/inkscape + +### 20. Filezilla ### + +Filezilla is a free FTP solution application software. It supports FTP, SFTP, FTPS protocols. It is a powerful file management tool for client side. It is an awesome open source FTP project which is highly reliable and easy to use. + + $ xhost +si:localuser:$(whoami) + $ docker run \ + -d \ + -e DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -u docker \ + -v /:/host \ + -v $HOME/docker-data/filezilla:/home/docker/.config/filezilla/ \ + yantis/filezilla filezilla + +### Conclusion ### + +Running desktop application software using Docker is really an awesome experience. Docker is really an awesome platform for fast and easy development, shipping and deployment of software and packages in any place from home to office to production areas. Running desktop apps with docker is a cool way to try out the apps without really installing it into the host filesystem. So, if you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy with Docker :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/20-docker-containers-desktop-user/ + +作者:[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 diff --git a/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md b/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md new file mode 100644 index 0000000000..f5f4eb16a7 --- /dev/null +++ b/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md @@ -0,0 +1,75 @@ +How IP forwarding Helps Connecting Private interface to Internet in Linux +================================================================================ +Hi everyone, today we'll learn about IP forwarding or Packet forwarding from one network interface to another in Linux using iptables. IP forwarding is a concept to make Linux machine to send data from one network to another as a router. So, it can be used as a **router** or a proxy server that can share internet or network connection from one connection to multiple client machines. + +Here are some easy steps to enable IP Forwarding or Network packets forwarding method. + +### 1. Enabling IPv4 Forwarding ### + +First of all, we'll gonna enable IPv4 forwarding in our Linux Operating System. To do that, we'll need to execute the following command in a shell or a terminal under sudo mode. + + $ sudo -s + + # echo 1 > /proc/sys/net/ipv4/ip_forward + +![Temporary IP Forwarding](http://blog.linoxide.com/wp-content/uploads/2015/03/ip-forward-temporary.png) + +**Note: the above command is enables ip forwarding instantly and temporarily until the next reboot. To enable it permanently, we'll need to open /etc/sysctl.conf using our favorite text editor.** + + # nano /etc/sysctl.conf + +Then, add **net.ipv4.ip_forward = 1** into that file or uncomment that line then, we'll need to save and exit that file. + + net.ipv4.ip_forward = 1 + +![Editing Sysctl](http://blog.linoxide.com/wp-content/uploads/2015/03/sysctl-edit.png) + +To enable the changes made run the following command. + + # sysctl -p /etc/sysctl.conf + +![Enabling Sysctl Changes](http://blog.linoxide.com/wp-content/uploads/2015/03/enabling-changes-sysctl.png) + +### 2. Configuring Iptables firewall ### + +We'll need to allow specific (or all of the) packets to traverse our router. Before that, we'll need to know the interface name of the network devices connected with our Linux box. To get the interface name, we can simply run the following command in a terminal or a shell. + + # ifconfig -a + +![Ifconfig](http://blog.linoxide.com/wp-content/uploads/2015/03/ifconfig.png) + +Here, in our box we have eth2 as network interface which is connected to the internet or a network and wlan2 is the interface where we need to forward the network packets from eth2 using iptables. So, to do so, we'll need to run the following command. + + # iptables -A FORWARD -i wlan2 -o eth2 -j ACCEPT + +Note: Please replace wlan2 and eth2 with the device name available in your Linux box. + +Now, we'll need iptables to allow traffic for already established connections as netfilter is a stateless firewall. To do so, we'll need to run the following command. + + # iptables -A FORWARD -i eth2 -o wlan2 -m state --state ESTABLISHED,RELATED -j ACCEPT + +![Forwarding with iptables](http://blog.linoxide.com/wp-content/uploads/2015/03/forwarding-iptables.png) + +### 3. Configuring NAT ### + +Then, at last we'll need to change the source address as eth2 on packets going out to the internet by executing the command below. + + # iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE + +![configuring nat](http://blog.linoxide.com/wp-content/uploads/2015/03/configuring-nat.png) + +### Conclusion ### + +Finally, we've successfully configured Packet forwarding from one interface to another interface on our Linux machine having iptables installed as firewall solution. This article enables to connect your private interface to the internet, you don't need bridging the interfaces, you need to route packets coming in on one interface to the other one, thats all. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/firewall/ip-forwarding-connecting-private-interface-internet/ + +作者:[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 diff --git a/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md b/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md new file mode 100644 index 0000000000..d6d21002a2 --- /dev/null +++ b/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md @@ -0,0 +1,76 @@ +How to Change Default Web Browser and Email Client in Ubuntu +================================================================================ +web browserUbuntu ships with a slate of default apps handily pre-installed, including Mozilla’s hugely popular Firefox web browser and Thunderbird e-mail client. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/web-browser.png) + +While both of these have their fans neither app is — shock — to everyone’s tastes or needs. We often get e-mails or tweets from people asking us how they can change the default browser in Ubuntu or set a different mail client as the handler for mail links, etc. + +We’re not just talking about installing a different bit of software here but also how you set it as the system handler for a given file, link or content type. + +It is super easy to change a whole slate of default application including web, e-mail, text editing, music and videos players, in Ubuntu. The settings panel where you can make these changes isn’t known to everyone, so we’ll take a quick look. + +### How to Change the Default Browser in Ubuntu ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/change-default-browser-in-ubuntu-750x402.jpg) + +Mozilla Firefox is a solid, open-source and reliable window on the world wide web but it’s not everyone’s browser of choice. And that’s fine. + +To use a different default browser in Ubuntu you will first, rather obviously, need to install a new one. How you do this depends on the one you want: + +- Open-source web browsers, like [Epiphany][1], [Chromium][2] and [IceWeasel][3], are available to install from the Ubuntu Software Center. + +- Major web-browsers, like [Google Chrome][4], [Opera][5] and [Vivaldi][6], must be downloaded from each project’s official website. + +Whichever browser you choose, and however you choose to install it, once you have done so you can continue on. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/system-settings-ubuntu-300x215.jpg) + +To change the default browser for opening web links click on in other applications, e.g., instant messengers, Twitter clients, e-mail, etc, you need to use the Ubuntu System Settings tool. + +You can launch System Settings a number of ways. One of the fastest is to the click the Cog icon in the far-right hand corner (far left on RTL systems) and select the ‘System Settings’ menu shortcut. + +1. Open ‘System Settings’ +1. Select the ‘Details’ item +1. Select ‘Default Applications’ in the sidebar +1. Change the ‘Web’ entry from ‘Firefox’ to your preferred choice + +That’s it. + +### How To Change the Default Mail Client in Ubuntu ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/CHANGE-DEFAULT-APPS-UBUNTU.jpg) + +Ubuntu ships with Thunderbird as the default mail application. This means the app will **open automatically when you click on an email address or a [mailto link][7]** in most web-browsers, PDFs, instant messengers, and so on. + +This convenience is super handy if you use Thunderbird, of course. But a lot of us don’t; we may [use a lightweight client like Geary][8], GNOME stalwart Evolution, or rely on a web-mail service like Gmail or Outlook. + +To **change the default mail client in Ubuntu** from Thunderbird to another application open System Settings > Details > Default Applications. Click the drop-down menu next to ‘Mail’ and choose your preferred client from the list. + +To **set Gmail as the default mail client in Ubuntu** you must first install the ‘gnome-gmail’ package by hitting the button below. Once installed open System Settings > Details > Default Applications. Click the drop-down menu next to ‘Mail’ and choose ‘Gmail’ from the list. + +- [Install GNOME Gmail in Ubuntu][9]. + +### Going Further ### + +The same steps listed above can be used to make your favourite music player open when double clicking on a music file, have an application like VLC handle your .avi and .mp4 files, and so on. +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/change-your-default-web-browser-in-ubuntu + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://wiki.gnome.org/Apps/Web +[2]:https://apps.ubuntu.com/cat/applications/chromium-browser/ +[3]:https://wiki.debian.org/Iceweasel +[4]:https://www.google.co.uk/chrome/browser/desktop/ +[5]:http://www.opera.com/computer/linux +[6]:https://vivaldi.com/#Download +[7]:http://en.wikipedia.org/wiki/Mailto +[8]:http://www.omgubuntu.co.uk/2015/03/install-geary-ubuntu-linux-email-update +[9]:apt://gnome-gmail \ No newline at end of file From 960ce01f839e440fd24090933a109b6c22827f86 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 23 Apr 2015 16:52:14 +0800 Subject: [PATCH 054/154] [Translated] talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012 --- ...mming Languages in to GitHub Since 2012.md | 33 ------------------- ...mming Languages in to GitHub Since 2012.md | 33 +++++++++++++++++++ 2 files changed, 33 insertions(+), 33 deletions(-) delete mode 100644 sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md create mode 100644 translated/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md diff --git a/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md b/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md deleted file mode 100644 index 6ad6d94d67..0000000000 --- a/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md +++ /dev/null @@ -1,33 +0,0 @@ -Translating by ictlyh -The Most Popular Programming Languages in to GitHub Since 2012 -================================================================================ -![](http://www.loggly.com/wp-content/uploads/2015/04/Infographic_Github_popular_languages_Blogheader.png) - -Programming languages are not simply the tools that developers use to create programs or express algorithms. They’re also instruments to code and decode creativity. By observing the history of programming languages, we gain a unique perspective on our quest to find better ways to solve problems, facilitate collaboration, build great products, and reuse the efforts of others. - -About 70% of our customers send application logs to our service, so Loggly is interested in tracking which languages are most popular and which ones are gaining traction among developers. - -Based on the historical [GitHub Archive][1] and [GitHut][2] data starting in 2012, we analyzed the most common developer actions within GitHub and turned it into the infographic you see below. We looked at: - -- The number of active repositories, a useful proxy for the projects that people are working on right now. -- The total number of pushes per language as well as the average number of pushes per repository. These metrics are indicators of the rate of innovation occurring with projects being written in a particular language. -- New forks and open issues per repository, which also show active use and innovation. -- New watchers per repository, an indicator of developer interest. - -### Check out the infographic and let us know what you think! How does your programming language of choice fare among your peers? ### - -![](http://www.loggly.com/wp-content/uploads/2015/04/Most-Popular-Languages-According-to-GitHub-Since-2012-loggly-infographic_v3.png) - --------------------------------------------------------------------------------- - -via: https://www.loggly.com/blog/the-most-popular-programming-languages-in-to-github-since-2012/ - -作者:[Justin Mares][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://www.loggly.com/blog/author/guest/ -[1]:https://www.githubarchive.org/ -[2]:http://githut.info/ \ No newline at end of file diff --git a/translated/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md b/translated/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md new file mode 100644 index 0000000000..dde2b6785a --- /dev/null +++ b/translated/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md @@ -0,0 +1,33 @@ +从2012年以来GitHub上最流行的的编程语言 +================================================================================ +![](http://www.loggly.com/wp-content/uploads/2015/04/Infographic_Github_popular_languages_Blogheader.png) + +编程语言不仅仅是开发者用来创建程序或表达算法的工具。它们也是编码和解码创造力的仪器。通过观察编程语言的历史,我们在追求为解决问题找到一个更好的方法,促进写作,构建好的产品以及重用他人的工作上得到一个独特的观点。 + +我们的客户中大概70%向我们的服务发送应用日志,因此Loggy有兴趣追踪哪种语言是最流行的以及哪种语言获得了开发人员的关注。 + +基于从2012年以来的历史的[GitHub 归档][1]和[GitHut][2]数据,我们分析了GitHub上大部分开发者的动作并转化为你下面看到的信息图表。我们关注了: + + +- 活跃库的数量,人们正在研究的项目的有用度量。 +- 每种语言总的推送数量以及每个库的平均推送次数。这些指标是由特定语言编写的项目的创新效率的指示器。 +- 每个库新的fork数和打开的问题数目,这也显示了积极使用性和创新性。 +- 每个库新的观察者,开发人员兴趣的指示器。 + +### 查看信息图表并告诉我们你的想法!在你的同龄人中是怎么选择你使用的语言的? ### + +![](http://www.loggly.com/wp-content/uploads/2015/04/Most-Popular-Languages-According-to-GitHub-Since-2012-loggly-infographic_v3.png) + +-------------------------------------------------------------------------------- + +via: https://www.loggly.com/blog/the-most-popular-programming-languages-in-to-github-since-2012/ + +作者:[Justin Mares][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.loggly.com/blog/author/guest/ +[1]:https://www.githubarchive.org/ +[2]:http://githut.info/ \ No newline at end of file From 5a373c68d764d17ceace1fbcc8a1645a5e25b6a7 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 23 Apr 2015 17:58:17 +0800 Subject: [PATCH 055/154] [Translated] tech/20150413 A Walk Through Some Important Docker Commands --- ... Through Some Important Docker Commands.md | 106 ------------------ ... Through Some Important Docker Commands.md | 105 +++++++++++++++++ 2 files changed, 105 insertions(+), 106 deletions(-) delete mode 100644 sources/tech/20150413 A Walk Through Some Important Docker Commands.md create mode 100644 translated/tech/20150413 A Walk Through Some Important Docker Commands.md diff --git a/sources/tech/20150413 A Walk Through Some Important Docker Commands.md b/sources/tech/20150413 A Walk Through Some Important Docker Commands.md deleted file mode 100644 index 074c5b12a7..0000000000 --- a/sources/tech/20150413 A Walk Through Some Important Docker Commands.md +++ /dev/null @@ -1,106 +0,0 @@ -Translating by ictlyh -A Walk Through Some Important Docker Commands -================================================================================ -Hi everyone today we'll learn some important Docker Commands that you'll need to learn before you go with Docker. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. - -Docker commands are easy to learn and easy to implement or take into practice. Here are some easy Docker commands you'll need to know to run Docker and fully utilize it. - -### 1. Pulling a Docker Image ### - -First of all, we'll need to pull a docker image to get started cause containers are built using Docker Images. We can get the required docker image from the Docker Registry Hub. Before we pull any image using pull command, we'll need to protect our system as there is identified a malicious issue with pull command. To protect our system from this issue, we'll need to add **127.0.0.1 index.docker.io** into /etc/hosts entry. We can do using our favorite text editor. - - # nano /etc/hosts - -Now, add the following lines into it and then save and exit. - - 127.0.0.1 index.docker.io - -![Docker Hosts](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-hosts.png) - -To pull a docker image, we'll need to run the following command. - - # docker pull registry.hub.docker.com/busybox - -![Docker pull command](http://blog.linoxide.com/wp-content/uploads/2015/04/pulling-image.png) - -We can check whether any Docker image is available in our local host for the use or not. - - # docker images - -![Docker Images](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-images.png) - -### 2. Running a Docker Container ### - -Now, after we have successfully pulled a required or desired Docker image. We'll surely want to run that Docker image. We can run a docker container out of the image using docker run command. We have several options and flags to run a docker container on the top of the Docker image. To run a docker image and to get into the container we'll use -t and -i flag as shown below. - - # docker run -it busybox - -![Docker Run Shell Command](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-run-shell.png) - -From the above command, we'll get entered into the container and can access its content via the interactive shell. We can press **Ctrl-D** in order to exit from the shell access. - -Now, to run the container in background, we'll detach the shell using -d flag as shown below. - - # docker run -itd busybox - -![Run Container Background](http://blog.linoxide.com/wp-content/uploads/2015/04/run-container-background.png) - -If we want to attach into a running container, we can use attach command with the container id. The container id can be fetched using the command **docker ps** . - - # docker attach - -![Docker Attach](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-attach.png) - -### 3. Checking Containers ### - -It is very easy to check the log whether the container is running or not. We can use the following command to check whether there is any docker container running in the real time or not using the following command. - - # docker ps - -Now, to check logs about the running or past running containers we'll need to run the following command. - - # docker ps -a - -![View Docker Containers](http://blog.linoxide.com/wp-content/uploads/2015/04/view-docker-containers1.png) - -### 4. Inspecting a Docker Container ### - -We can check every information about a Docker Container using the inspect command. - - # docker inspect - -![Docker Inspect](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-inspect.png) - -### 5. Killing and Deleting Command ### - -We can kill or stop process or docker containers using its docker id as shown below. - - # docker stop - -To stop every containers running, we'll need to run the following command. - - # docker kill $(docker ps -q) - -Now, if we wanna remove a docker image, run the below command. - - # docker rm - -If we wanna remove all the docker images at once, we can run the below. - - # docker rm $(docker ps -aq) - -### Conclusion ### - -These docker commands are highly essential to learn to fully utilize and use Docker. Docker gets too simple with these commands providing end users an easy platform for computing. It is extremely easy for anyone to learn about Docker commands with this above tutorial. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve and update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/important-docker-commands/ - -作者:[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 diff --git a/translated/tech/20150413 A Walk Through Some Important Docker Commands.md b/translated/tech/20150413 A Walk Through Some Important Docker Commands.md new file mode 100644 index 0000000000..6e350c6d1c --- /dev/null +++ b/translated/tech/20150413 A Walk Through Some Important Docker Commands.md @@ -0,0 +1,105 @@ +一些重要Docker命令的简单介绍 +================================================================================ +大家好,今天我们来学习一些在你使用Docker之前需要了解的重要的 Docker 命令。Docker 是一个提供开发平台去打包,装载和运行任何应用的轻量级容器开源项目。它没有语言支持,框架和打包系统的限制,能从一个小的家庭电脑到高端服务器,在任何地方任何时间运行。这使得它们成为不依赖于一个特定的栈或供应商,部署和扩展web应用,数据库和后端服务很好的构建块。 + +Docker 命令简单易学,也很容易实现或实践。这是一些你运行 Docker 并充分利用它需要知道的简单 Docker 命令。 + +### 1. 拉取一个 Docker 镜像 ### + +由于容器是由 Docker 镜像构建的,首先我们需要拉取一个 docker 镜像来开始。我们可以从 Docker 注册 Hub 获取需要的 docker 镜像。在我们使用 pull 命令拉取任何镜像之前,由于pull命令被标识为恶意命令,我们需要保护我们的系统。为了保护我们的系统不受这个问题影响,我们需要添加 **127.0.0.1 index.docker.io** 到 /etc/hosts 条目。我们可以通过使用喜欢的文本编辑器完成。 + + # nano /etc/hosts + +现在,增加下面的一行到文件并保存退出。 + + 127.0.0.1 index.docker.io + +![Docker 宿主机](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-hosts.png) + +要拉取一个 docker 进行,我们需要运行下面的命令。 + + # docker pull registry.hub.docker.com/busybox + +![Docker pull 命令](http://blog.linoxide.com/wp-content/uploads/2015/04/pulling-image.png) + +我们可以检查本地是否有可用的 Docker 镜像。 + + # docker images + +![Docker 镜像](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-images.png) + +### 2. 运行一个 Docker 容器 ### + +现在,成功地拉取要求或需要的 Docker 镜像之后,我们当然想运行这个 Docker 镜像。我们可以用 docker run 命令在镜像上运行一个 docker 容器。在 Docker 镜像之上运行一个 docker 容易时我们有很多选项和标记。我们使用 -t 和 -i 标记运行一个 docker 镜像并进入容器,如下面所示。 + + # docker run -it busybox + +![Docker Run Shell 命令](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-run-shell.png) + +从上面的命令中,我们进入了容器并可以通过交互 shell 访问它的内容。我们可以键入 **Ctrl-D** 从shell中退出。 + +现在,在后台运行容器,我们用 -d 标记分离 shell,如下所示。 + + # docker run -itd busybox + +![后台运行容器](http://blog.linoxide.com/wp-content/uploads/2015/04/run-container-background.png) + +如果你想进入到一个正在运行的容器,我们可以使用 attach 命令加一个容器 id。可以使用 **docker ps** 命令获取容器 id。 + + # docker attach + +![进入Docker](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-attach.png) + +### 3. 查看容器 ### + +不论容器是否运行,查看日志文件都很简单。我们可以使用下面的命令去检查是否有 docker 容器在实时运行。 + + # docker ps + +现在,查看正在运行的或者之前运行的容器的日志,我们需要运行以下的命令。 + + # docker ps -a + +![查看 Docker 容器](http://blog.linoxide.com/wp-content/uploads/2015/04/view-docker-containers1.png) + +### 4. 检查 Docker 容器 ### + +我们可以使用 inspect 命令检查一个 Docker 容器的每条信息。 + + # docker inspect + +![检查Docker](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-inspect.png) + +### 5. 杀死或删除命令 ### + +我们可以使用 docker id 杀死或者停止进程或 docker 容器,如下所示。 + + # docker stop + +要停止每个正在运行的容器,我们需要运行下面的命令。 + + # docker kill $(docker ps -q) + +现在,如我我们希望移除一个 docker 镜像,运行下面的命令。 + + # docker rm + +如果我们想一次性移除所有 docker 镜像,我们可以运行以下命令。 + + # docker rm $(docker ps -aq) + +### 结论 ### + +这些都是学习充分实现和利用 Docker 很基本的 docker 命令。有了这些命令,Docker 变得很简单,提供给端用户一个简单的计算平台。根据上面的教程,任何人学习 Docker 命令都非常简单。如果你有任何问题,建议,反馈,请写到下面的评论框中以便我们改进和更新内容。多谢!享受吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/important-docker-commands/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者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 a22e1785b7c7a77ed6265e799d6c6b46f1127f6d Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Thu, 23 Apr 2015 23:55:55 +0800 Subject: [PATCH 056/154] finish first translation --- ...g Linux 'sort' Command Examples--Part 2.md | 132 ------------------ ...g Linux 'sort' Command Examples--Part 2.md | 131 +++++++++++++++++ 2 files changed, 131 insertions(+), 132 deletions(-) delete mode 100644 sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md create mode 100644 translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md diff --git a/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md b/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md deleted file mode 100644 index fd6b0f488b..0000000000 --- a/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md +++ /dev/null @@ -1,132 +0,0 @@ -[Dongshuaike translating] -7 Interesting Linux ‘sort’ Command Examples – Part 2 -================================================================================ -In our last article we have covered various examples on sort command, if you’ve missed, you can go through it using below link. In continuation to the last post this post aims at covering remaining of sort command so that both the article together serves as complete guide to Linux ‘sort‘ command. - -注:前两天做过这个原文 -- [14 ‘sort’ Command Examples in Linux][1] - -Before we continue further, create a text file ‘month.txt‘ and populate it with the data as given below. - - $ echo -e "mar\ndec\noct\nsep\nfeb\naug" > month.txt - $ cat month.txt - -![Populate Content](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Content.gif) - -### 15. Sort the file ‘month.txt‘ on the basis of month order by using switch ‘M‘ (–month-sort). ### - - $ sort -M month.txt - -**Important**: Note that ‘sort‘ command needs at least 3 characters to consider month name. - -![Sort File Content by Month in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-by-Month.gif) - -### 16. Sort the data that is in human readable format say 1K, 2M, 3G, 2T, where K,M,G,T represents Kilo, Mega, Giga, Tera. ### - - $ ls -l /home/$USER | sort -h -k5 - -![Sort Content Human Readable Format](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-Human-Readable-Format.gif) - -### 17. In the last article we have created a file ‘sorted.txt‘ in example number 4 and another text file ‘lsl.txt‘ in example number 6. We know ‘sorted.txt‘ is already sorted while ‘lsl.txt‘ is not. Lets check both the files are sorted or not using sort command. ### - - $ sort -c sorted.txt - -![Check File is Sorted](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-is-Sorted.gif) - -If it returns 0, means that the file is sorted and there is no conflict. - - $ sort -c lsl.txt - -![Check File Sorted Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-Sorted-Status.gif) - -Reports Disorder. Conflict.. - -### 18. If the delimiter (separator) between words are space, sort command automatically interpret anything after horizontal space as new word. What if the delimiter is not space? ### - -Consider a text file, the contents of which are separated by anything other than space such as ‘|’ or ‘\’ or ‘+’ or ‘.’ or…. - -Create a text file where contents are separated by +. Use ‘cat‘ to check the contents of file. - - $ echo -e "21+linux+server+production\n11+debian+RedHat+CentOS\n131+Apache+Mysql+PHP\n7+Shell Scripting+python+perl\n111+postfix+exim+sendmail" > delimiter.txt - ----------- - - $ cat delimiter.txt - -![Check File Content by Delimiter](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-Content.gif) - -Now sort this file on the basis of 1st field which is numerical. - - $ sort -t '+' -nk1 delimiter.txt - -![Sort File By Fields](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-File-By-Fields.gif) - -And second on the basis of 4th field which is non numeric. - -![Sort Content By Non Numeric](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Non-Numeric.gif) - -If the delimiter is Tab you may use $’\t’ in place of ‘+’, as shown in the above example. - -### 19. Sort the contents of ‘ls -l‘ command for your home directory on the basis of 5th column which represents the ‘amount of data‘ in Random order. ### - - $ ls -l /home/avi/ | sort -k5 -R - -![Sort Content by Column in Random Order](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-by-Column1.gif) - -Every time you run the above piece of script you are likely to get a different result since the result is generated randomly. - -As clear from the Rule number – 2 from the last article, sort command prefer line starting with lowercase characters over uppercase characters. Also check example 3 in last article, where string ‘laptop‘ appears before string ‘LAPTOP‘. - -### 20. How to override the default sorting preference? before we are able to override the default sorting preference we need to export the environment variable LC_ALL to c. To do this run the below code on your Command Line Prompt. ### - - $ export LC_ALL=C - -And then sort the text file ‘tecmint.txt‘ overriding the default sort preference. - - $ sort tecmint.txt - -![Override Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Override-Sorting-Preferences.gif) -Override Sorting Preferences - -Don’t forget to compare the output with the one you achieved in example 3 and also you can use option ‘-f‘ aka ‘–ignore-case‘ to get much organized output. - - $ sort -f tecmint.txt - -![Compare Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Compare-Sorting-Preferences.gif) - -### 21. How about running ‘sort‘ on two input files and join them in one go! ### - -Lets create two text file namely ‘file1.txt‘ and ‘file2.txt‘ and populate it with some data. Here we are populating ‘file1.txt‘ with numbers as below. Also used ‘cat‘ command to check the content of file. - - $ echo -e “5 Reliable\n2 Fast\n3 Secure\n1 open-source\n4 customizable” > file1.txt - $ cat file1.txt - -![Populate Content with Numbers](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Content-with-Number.gif) - -And populate second file ‘file2.txt‘ with some data as. - - $ echo -e “3 RedHat\n1 Debian\n5 Ubuntu\n2 Kali\n4 Fedora” > file2.txt - $ cat file2.txt - -![Populate File with Data](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-File-with-Data.gif) - -Now sort and join the output of both the files. - - $ join <(sort -n file1.txt) <(sort file2.txt) - -![Sort Join Two Files](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Join-Two-Files.gif) - -That’s all for now. Keep Connected. Keep to Tecmint. Please Provide us with your valuable feedback in the comments below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/linux-sort-command-examples/ - -作者:[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://www.tecmint.com/sort-command-linux/ diff --git a/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md b/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md new file mode 100644 index 0000000000..37312ffa16 --- /dev/null +++ b/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md @@ -0,0 +1,131 @@ + +Linux 'sort'命令的七个有趣实例-第二部分 +================================================================================ +在上一篇文章里,我们已经探讨了关于sort命令的多个例子,如果你错过了这篇文章,可以点击下面的链接进行阅读。今天的这篇文章作为上一篇文章的继续,将讨论关于sort命令的剩余用法,与上一篇一起作为Linux ‘sort’命令的完整指南。 + +注:前两天做过这个原文 +- [14 ‘sort’ Command Examples in Linux][1] +- +在我们继续深入之前,先创建一个文本文档‘month.txt’,并且将上一次给出的数据填进去。 + + $ echo -e "mar\ndec\noct\nsep\nfeb\naug" > month.txt + $ cat month.txt + +![Populate Content](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Content.gif) + +### 15. 通过使用’M‘选项,对’month.txt‘文件按照月份顺序进行排序。### + + $ sort -M month.txt + +**注意**:‘sort’命令需要至少3个字符来确认月份名称。 + +![Sort File Content by Month in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-by-Month.gif) + +### 16. 把数据整理成方便人们阅读的形式,比如1K、2M、3G、2T,这里面的K、G、M、T代表千、兆、吉、梯。 +(译者注:好像这个选项并不是所有Linu版本都有,而且也没有实现按KMGT显示。) + + $ ls -l /home/$USER | sort -h -k5 + +![Sort Content Human Readable Format](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-Human-Readable-Format.gif) + +### 17. 在上一篇文章中,我们在例子4中创建了一个名为‘sorted.txt’的文件,在例子6中创建了一个‘lsl.txt’。‘sorted.txt'已经排好序了而’lsl.txt‘还没有。让我们使用sort命令来检查两个文件是否已经排好序。### + + $ sort -c sorted.txt + +![Check File is Sorted](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-is-Sorted.gif) + +如果它返回0,则表示文件已经排好序。 + + $ sort -c lsl.txt + +![Check File Sorted Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-Sorted-Status.gif) + +Reports Disorder. Conflict.. +报告无序。存在矛盾…… + +### 18. 如果文字之间的分隔符是空格,sort命令自动地将横向空格后的东西当做一个新文字单元,如果分隔符不是空格呢?### + +考虑这样一个文本文件,里面的内容可以由除了空格之外的任何符号分隔,比如‘|’,‘\’,‘+’,‘.’等…… + +创建一个分隔符为+的文本文件。使用‘cat‘命令查看文件内容。 + $ echo -e "21+linux+server+production\n11+debian+RedHat+CentOS\n131+Apache+Mysql+PHP\n7+Shell Scripting+python+perl\n111+postfix+exim+sendmail" > delimiter.txt + +---------- + + $ cat delimiter.txt + +![Check File Content by Delimiter](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-Content.gif) + +现在基于由数字组成的第一个域来进行排序。 + + $ sort -t '+' -nk1 delimiter.txt + +![Sort File By Fields](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-File-By-Fields.gif) + +然后再基于非数字的第四个域排序。 + +![Sort Content By Non Numeric](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Non-Numeric.gif) + +如果分隔符是Tab,你需要在’+‘的位置上用$’\t’代替,如上例所示。 + +### 19. 对主用户目录下使用‘ls -l’命令得到的结果基于第五列——‘数据的大小’进行一个乱序排列。 + + $ ls -l /home/avi/ | sort -k5 -R + +![Sort Content by Column in Random Order](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-by-Column1.gif) + +每一次你运行上面的脚本,你得到结果可能都不一样,因为结果是随机生成的。 + + 正如我在上一篇文章中提到的规则2所说——相比于大写字母,sort命令更喜欢以小写字母开始的行。看一下上一篇文章的例3,字符串‘laptop’在‘LAPTOP’前出现。 + +### 20. 如何覆盖默认的排序优先权?在这之前我们需要先将环境变量LC_ALL的值设置为C。在命令行提示栏中运行下面的代码。### + + $ export LC_ALL=C + +然后以重写默认优先权的方式对‘tecmint.txt’文件重新排序。 + + $ sort tecmint.txt + +![Override Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Override-Sorting-Preferences.gif) +重写排序优先权 + +不要忘记与example 3中得到的输出结果做比较,并且你可以使用‘-f’选项,又叫‘-ignore-case’来获取非常有序的输出。 + + $ sort -f tecmint.txt + +![Compare Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Compare-Sorting-Preferences.gif) + +### 21. 给两个输入文件进行‘sort‘,然后一口气把它们连接起来怎么样?### + +我们创建两个文本文档’file1.txt‘以及’file2.txt‘,并用数据填充,如下所示,并用’cat‘命令查看文件的内容。 + $ echo -e “5 Reliable\n2 Fast\n3 Secure\n1 open-source\n4 customizable” > file1.txt + $ cat file1.txt + +![Populate Content with Numbers](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Content-with-Number.gif) + +用如下数据填充’file2.txt‘。 + + $ echo -e “3 RedHat\n1 Debian\n5 Ubuntu\n2 Kali\n4 Fedora” > file2.txt + $ cat file2.txt + +![Populate File with Data](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-File-with-Data.gif) + +现在我们对两个文件进行排序并连接。 + + $ join <(sort -n file1.txt) <(sort file2.txt) + +![Sort Join Two Files](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Join-Two-Files.gif) + +我所要讲的全部内容就在这里了,希望与各位保持联系,也希望各位经常来Tecmint逛逛。有反馈就在下面评论吧。 +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-sort-command-examples/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/DongShuaike) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/sort-command-linux/ From b4d3637950c765fc12c2e1b099c8c659bdefc9f7 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 24 Apr 2015 11:31:05 +0800 Subject: [PATCH 057/154] [Translating] tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu --- ...w to Change Default Web Browser and Email Client in Ubuntu.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md b/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md index d6d21002a2..fdde80564c 100644 --- a/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md +++ b/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md @@ -1,3 +1,4 @@ +Translating by ictlyh How to Change Default Web Browser and Email Client in Ubuntu ================================================================================ web browserUbuntu ships with a slate of default apps handily pre-installed, including Mozilla’s hugely popular Firefox web browser and Thunderbird e-mail client. From f27825598bf4c49621c36aaf89076d2718f2fea2 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 24 Apr 2015 11:31:50 +0800 Subject: [PATCH 058/154] [Translating] tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux --- ...ng Helps Connecting Private interface to Internet in Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md b/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md index f5f4eb16a7..966fb0a2ab 100644 --- a/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md +++ b/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md @@ -1,3 +1,4 @@ +Translating by ictlyh How IP forwarding Helps Connecting Private interface to Internet in Linux ================================================================================ Hi everyone, today we'll learn about IP forwarding or Packet forwarding from one network interface to another in Linux using iptables. IP forwarding is a concept to make Linux machine to send data from one network to another as a router. So, it can be used as a **router** or a proxy server that can share internet or network connection from one connection to multiple client machines. From dab6ea6be076134838c5740536880f042c381991 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 24 Apr 2015 13:19:59 +0800 Subject: [PATCH 059/154] [Translated] tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu --- ... Web Browser and Email Client in Ubuntu.md | 77 ------------------- ... Web Browser and Email Client in Ubuntu.md | 77 +++++++++++++++++++ 2 files changed, 77 insertions(+), 77 deletions(-) delete mode 100644 sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md create mode 100644 translated/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md diff --git a/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md b/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md deleted file mode 100644 index fdde80564c..0000000000 --- a/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md +++ /dev/null @@ -1,77 +0,0 @@ -Translating by ictlyh -How to Change Default Web Browser and Email Client in Ubuntu -================================================================================ -web browserUbuntu ships with a slate of default apps handily pre-installed, including Mozilla’s hugely popular Firefox web browser and Thunderbird e-mail client. - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/web-browser.png) - -While both of these have their fans neither app is — shock — to everyone’s tastes or needs. We often get e-mails or tweets from people asking us how they can change the default browser in Ubuntu or set a different mail client as the handler for mail links, etc. - -We’re not just talking about installing a different bit of software here but also how you set it as the system handler for a given file, link or content type. - -It is super easy to change a whole slate of default application including web, e-mail, text editing, music and videos players, in Ubuntu. The settings panel where you can make these changes isn’t known to everyone, so we’ll take a quick look. - -### How to Change the Default Browser in Ubuntu ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/change-default-browser-in-ubuntu-750x402.jpg) - -Mozilla Firefox is a solid, open-source and reliable window on the world wide web but it’s not everyone’s browser of choice. And that’s fine. - -To use a different default browser in Ubuntu you will first, rather obviously, need to install a new one. How you do this depends on the one you want: - -- Open-source web browsers, like [Epiphany][1], [Chromium][2] and [IceWeasel][3], are available to install from the Ubuntu Software Center. - -- Major web-browsers, like [Google Chrome][4], [Opera][5] and [Vivaldi][6], must be downloaded from each project’s official website. - -Whichever browser you choose, and however you choose to install it, once you have done so you can continue on. - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/system-settings-ubuntu-300x215.jpg) - -To change the default browser for opening web links click on in other applications, e.g., instant messengers, Twitter clients, e-mail, etc, you need to use the Ubuntu System Settings tool. - -You can launch System Settings a number of ways. One of the fastest is to the click the Cog icon in the far-right hand corner (far left on RTL systems) and select the ‘System Settings’ menu shortcut. - -1. Open ‘System Settings’ -1. Select the ‘Details’ item -1. Select ‘Default Applications’ in the sidebar -1. Change the ‘Web’ entry from ‘Firefox’ to your preferred choice - -That’s it. - -### How To Change the Default Mail Client in Ubuntu ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/CHANGE-DEFAULT-APPS-UBUNTU.jpg) - -Ubuntu ships with Thunderbird as the default mail application. This means the app will **open automatically when you click on an email address or a [mailto link][7]** in most web-browsers, PDFs, instant messengers, and so on. - -This convenience is super handy if you use Thunderbird, of course. But a lot of us don’t; we may [use a lightweight client like Geary][8], GNOME stalwart Evolution, or rely on a web-mail service like Gmail or Outlook. - -To **change the default mail client in Ubuntu** from Thunderbird to another application open System Settings > Details > Default Applications. Click the drop-down menu next to ‘Mail’ and choose your preferred client from the list. - -To **set Gmail as the default mail client in Ubuntu** you must first install the ‘gnome-gmail’ package by hitting the button below. Once installed open System Settings > Details > Default Applications. Click the drop-down menu next to ‘Mail’ and choose ‘Gmail’ from the list. - -- [Install GNOME Gmail in Ubuntu][9]. - -### Going Further ### - -The same steps listed above can be used to make your favourite music player open when double clicking on a music file, have an application like VLC handle your .avi and .mp4 files, and so on. --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/04/change-your-default-web-browser-in-ubuntu - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://wiki.gnome.org/Apps/Web -[2]:https://apps.ubuntu.com/cat/applications/chromium-browser/ -[3]:https://wiki.debian.org/Iceweasel -[4]:https://www.google.co.uk/chrome/browser/desktop/ -[5]:http://www.opera.com/computer/linux -[6]:https://vivaldi.com/#Download -[7]:http://en.wikipedia.org/wiki/Mailto -[8]:http://www.omgubuntu.co.uk/2015/03/install-geary-ubuntu-linux-email-update -[9]:apt://gnome-gmail \ No newline at end of file diff --git a/translated/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md b/translated/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md new file mode 100644 index 0000000000..5e7413e37d --- /dev/null +++ b/translated/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md @@ -0,0 +1,77 @@ +如何在 Ubuntu 中更改默认浏览器和 Email 客户端 +================================================================================ +Ubuntu 自带了一些已经预装的默认应用程序,包括非常流行的 Mozilla 火狐浏览器和 Thunderbird 的 e-mail 客户端。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/web-browser.png) + +尽管这两个应用都有它们自己的粉丝,但是没有一个应用能符合每个人的口味和需要。我们经常收到邮件或者推文,询问我们怎样可以在 Ubuntu 上更改默认浏览器或者设置处理邮件链接的不同的电子邮件客户端等。 + +我们在这里不仅讨论如何安装不同的软件,还包括如何给一个特定的文件,链接或者内容类型设置系统处理应用。 + +在 Ubuntu 中更改默认应用程序,包括浏览器、电子邮件客户端、文本编辑器、音乐和视频播放器都非常的简单。但并不是每个人都知道更改这些的设置面板在哪里,让我们来快速看一下吧。 + +### 如何在 Ubuntu 上更改默认浏览器 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/change-default-browser-in-ubuntu-750x402.jpg) + +Mozilla 火狐浏览器是万维网上稳定、开源而且可依赖的窗口,但它并不是每个人的选择。这都没关系。 + +在 Ubuntu 上使用不同的默认浏览器,首先,显而易见,你需要安装一个新的浏览器。你该怎么做取决于你想要的浏览器: + +- 开源浏览器,例如 [Epiphany][1], [Chromium][2] 和 [IceWeasel][3],可以从 Ubuntu 软件中心安装。 + +- 主流浏览器,例如 [Google Chrome][4], [Opera][5] 和 [Vivaldi][6] 必须从各自项目的官方网站上下载。 + +不管你选择哪个浏览器,不管你选择怎样安装,完成之后你就可以继续了。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/system-settings-ubuntu-300x215.jpg) + +点击其它应用上的链接,例如及时通讯软件、Twitter 客户端、 e-mail,要更改打开网页的默认浏览器,你需要用到 Ubuntu 系统设置工具。 + +你可以用多种方法打开系统设置。其中一种最快的方式是点击右上角(RTL系统是左上角)的 Cog 图标并选择‘系统设置’菜单快捷方式。 + +1. 打开‘系统设置’ +1. 选择‘详细’选项 +1. 在侧边栏选择‘默认应用程序’ +1. 把 ‘Web’ 条目的 ‘火狐’ 改为你想要的选项 + +就是这样。 + +### 如何在 Ubuntu 上更改默认的邮件客户端 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/CHANGE-DEFAULT-APPS-UBUNTU.jpg) + +Ubuntu 用 Thunderbird 作为默认的邮件应用程序。这意味着 当你点击大部分浏览器、 PDF文件、及时通讯软件等上的 **电子邮件地址或者一个 [mailto 链接][7] 的时候会自动打开** 这个应用。 + +当然,如果你使用 Thunderbird,这真的很方便。但是我们很多人并非如此; 我们可能**[使用像 Geary 这样的轻量级客户端][8]**,GNOME stalwart Evolution,或者依靠像 Gmail 或者 Outlook 这样的网络邮件服务。 + +在 Ubuntu 上从 Thunderbird **更改默认邮件客户端** 到另一个应用程序,打开系统设置 > 详细 > 默认应用程序。点击下拉菜单到 ‘Mail’ 并选择从列表中选择你喜欢的客户端。 + +**在 Ubuntu 上设置 Gmail 为默认的邮件客户端**,你首先需要点击下面的按钮安装 ‘gnome-gmail’ 软件包。安装完后打开系统设置 > 详细 > 默认应用程序。点击下拉菜单到 ‘Mail’ 并选择从列表中选择 ‘Gmail’。 + +- [在 Ubuntu 上安装 GNOME Gmail][9] + +### 更多 ### + +上述同样的步骤可以用来设置你双击音乐文件时打开你喜欢的音乐播放器,用比如 VLC 应用程序处理 .avi 和 .mp4 文件,等等。 + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/change-your-default-web-browser-in-ubuntu + +作者:[Joey-Elijah Sneddon][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://wiki.gnome.org/Apps/Web +[2]:https://apps.ubuntu.com/cat/applications/chromium-browser/ +[3]:https://wiki.debian.org/Iceweasel +[4]:https://www.google.co.uk/chrome/browser/desktop/ +[5]:http://www.opera.com/computer/linux +[6]:https://vivaldi.com/#Download +[7]:http://en.wikipedia.org/wiki/Mailto +[8]:http://www.omgubuntu.co.uk/2015/03/install-geary-ubuntu-linux-email-update +[9]:apt://gnome-gmail \ No newline at end of file From dad6cf4cd78249c123b7debc75faffd8b886b91d Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 24 Apr 2015 14:03:50 +0800 Subject: [PATCH 060/154] [Translated] tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux --- ... Private interface to Internet in Linux.md | 76 ------------------- ... Private interface to Internet in Linux.md | 75 ++++++++++++++++++ 2 files changed, 75 insertions(+), 76 deletions(-) delete mode 100644 sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md create mode 100644 translated/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md diff --git a/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md b/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md deleted file mode 100644 index 966fb0a2ab..0000000000 --- a/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md +++ /dev/null @@ -1,76 +0,0 @@ -Translating by ictlyh -How IP forwarding Helps Connecting Private interface to Internet in Linux -================================================================================ -Hi everyone, today we'll learn about IP forwarding or Packet forwarding from one network interface to another in Linux using iptables. IP forwarding is a concept to make Linux machine to send data from one network to another as a router. So, it can be used as a **router** or a proxy server that can share internet or network connection from one connection to multiple client machines. - -Here are some easy steps to enable IP Forwarding or Network packets forwarding method. - -### 1. Enabling IPv4 Forwarding ### - -First of all, we'll gonna enable IPv4 forwarding in our Linux Operating System. To do that, we'll need to execute the following command in a shell or a terminal under sudo mode. - - $ sudo -s - - # echo 1 > /proc/sys/net/ipv4/ip_forward - -![Temporary IP Forwarding](http://blog.linoxide.com/wp-content/uploads/2015/03/ip-forward-temporary.png) - -**Note: the above command is enables ip forwarding instantly and temporarily until the next reboot. To enable it permanently, we'll need to open /etc/sysctl.conf using our favorite text editor.** - - # nano /etc/sysctl.conf - -Then, add **net.ipv4.ip_forward = 1** into that file or uncomment that line then, we'll need to save and exit that file. - - net.ipv4.ip_forward = 1 - -![Editing Sysctl](http://blog.linoxide.com/wp-content/uploads/2015/03/sysctl-edit.png) - -To enable the changes made run the following command. - - # sysctl -p /etc/sysctl.conf - -![Enabling Sysctl Changes](http://blog.linoxide.com/wp-content/uploads/2015/03/enabling-changes-sysctl.png) - -### 2. Configuring Iptables firewall ### - -We'll need to allow specific (or all of the) packets to traverse our router. Before that, we'll need to know the interface name of the network devices connected with our Linux box. To get the interface name, we can simply run the following command in a terminal or a shell. - - # ifconfig -a - -![Ifconfig](http://blog.linoxide.com/wp-content/uploads/2015/03/ifconfig.png) - -Here, in our box we have eth2 as network interface which is connected to the internet or a network and wlan2 is the interface where we need to forward the network packets from eth2 using iptables. So, to do so, we'll need to run the following command. - - # iptables -A FORWARD -i wlan2 -o eth2 -j ACCEPT - -Note: Please replace wlan2 and eth2 with the device name available in your Linux box. - -Now, we'll need iptables to allow traffic for already established connections as netfilter is a stateless firewall. To do so, we'll need to run the following command. - - # iptables -A FORWARD -i eth2 -o wlan2 -m state --state ESTABLISHED,RELATED -j ACCEPT - -![Forwarding with iptables](http://blog.linoxide.com/wp-content/uploads/2015/03/forwarding-iptables.png) - -### 3. Configuring NAT ### - -Then, at last we'll need to change the source address as eth2 on packets going out to the internet by executing the command below. - - # iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE - -![configuring nat](http://blog.linoxide.com/wp-content/uploads/2015/03/configuring-nat.png) - -### Conclusion ### - -Finally, we've successfully configured Packet forwarding from one interface to another interface on our Linux machine having iptables installed as firewall solution. This article enables to connect your private interface to the internet, you don't need bridging the interfaces, you need to route packets coming in on one interface to the other one, thats all. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/firewall/ip-forwarding-connecting-private-interface-internet/ - -作者:[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 diff --git a/translated/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md b/translated/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md new file mode 100644 index 0000000000..a8ba20fff0 --- /dev/null +++ b/translated/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md @@ -0,0 +1,75 @@ +Linux 上IP转发如何帮助专用接口连接到互联网 +================================================================================ +大家好,今天我们学习一下在 Linux 上用 iptables 实现从一个网络接口到另一个接口的IP转发或者数据包转发。IP转发的概念是,使 Linux 机器像路由器一样将数据从一个网络发送到另一个网络。所以,它能作为一个**路由器**或者代理服务器,实现从一个连接到多个客户端机器的共享互联网或者网络连接。 + +这是一些启用IP转发或网络包转发方法的简单步骤。 + +### 1. 启用 IPv4 转发 ### + +首先,我们打算在我们的 Linux 操作系统上启用 IPv4 转发。要做到这点,我们需要用 sudo 模式在 shell 或终端下执行下面的命令。 + + $ sudo -s + + # echo 1 > /proc/sys/net/ipv4/ip_forward + +![临时IP转发](http://blog.linoxide.com/wp-content/uploads/2015/03/ip-forward-temporary.png) + +**注意:上面的命令能马上启用ip转发,但只是临时的,直到下一次重启。要永久启用,我们需要使用我们喜欢的文本编辑器打开 /etc/sysctl.conf 文件。** + + # nano /etc/sysctl.conf + +然后,增加 **net.ipv4.ip_forward = 1** 到文件中,或者删除那行的注释,保存并退出文件。 + + net.ipv4.ip_forward = 1 + +![编辑 Sysctl](http://blog.linoxide.com/wp-content/uploads/2015/03/sysctl-edit.png) + +运行下面的命令启用更改。 + + # sysctl -p /etc/sysctl.conf + +![启用 Sysctl 更改](http://blog.linoxide.com/wp-content/uploads/2015/03/enabling-changes-sysctl.png) + +### 2. 配置 Iptables 防火墙 ### + +我们需要允许特定的(或者所有的)数据包通过我们的路由器。在这之前,我们要知道连接我们 Linux 的网络设备的接口名称。我们可以通过在终端或者 shell 运行以下命令获得接口名称。 + + # ifconfig -a + +![Ifconfig](http://blog.linoxide.com/wp-content/uploads/2015/03/ifconfig.png) + +这里,在我们的机器中, eth2 是连接到互联网或者网络的网卡接口, wlan2 是我们要使用 iptables 从 eth2 转发数据包的接口。要做到这点,我们需要运行以下命令。 + + # iptables -A FORWARD -i wlan2 -o eth2 -j ACCEPT + +注意:请用你 Linux 机器中的可用设备名称替换 wlan2 和 eth2。 + +现在,由于网络过滤器是一个无状态的防火墙,我们要用 iptables 允许已建立的连接通过。要做到这点,我们要运行下面的命令。 + + # iptables -A FORWARD -i eth2 -o wlan2 -m state --state ESTABLISHED,RELATED -j ACCEPT + +![用 iptables 转发](http://blog.linoxide.com/wp-content/uploads/2015/03/forwarding-iptables.png) + +### 3. 配置 NAT ### + +然后,最后我们需要通过执行下面的命令修改发送到互联网的数据包的源地址为 eth2。 + + # iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE + +![配置 nat](http://blog.linoxide.com/wp-content/uploads/2015/03/configuring-nat.png) + +### 总结 ### + +最后,用安装的 iptables 作为防火墙解决方案,我们在我们的 Linux 机器上成功的配置了从一个接口到另一个接口的数据包转发。这篇文章允许你的专用接口连接到互联网,你不需要桥接接口,而是路由从一个接口进来的数据包到另一个接口,就是这些。如果你有任何问题、建议、反馈,请写到下面的评论框中,然后我们可以改进或更新我们的内容。非常感谢!享受吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/firewall/ip-forwarding-connecting-private-interface-internet/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者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 4791b39614bd483889ca2f430c716b17c3565fb8 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 24 Apr 2015 15:01:49 +0800 Subject: [PATCH 061/154] =?UTF-8?q?=E9=A2=86=E5=8F=96=20/20150415=20Strong?= =?UTF-8?q?=20SSL=20Security=20on=20nginx.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20150415 Strong SSL Security on nginx.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150415 Strong SSL Security on nginx.md b/sources/tech/20150415 Strong SSL Security on nginx.md index 82b12820ed..044ec9dd60 100644 --- a/sources/tech/20150415 Strong SSL Security on nginx.md +++ b/sources/tech/20150415 Strong SSL Security on nginx.md @@ -1,3 +1,4 @@ +// translating by wxy Strong SSL Security on nginx ================================================================================ [![](https://raymii.org/s/inc/img/ssl-labs-a.png)][1] From 93dd371890459fe622f43200b16cb8b2f7bde384 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 24 Apr 2015 15:02:53 +0800 Subject: [PATCH 062/154] Finish the translation by ZTinoZ --- ...h Answers--How to disable IPv6 on Linux.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {sources => translated}/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md (78%) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md b/translated/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md similarity index 78% rename from sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md rename to translated/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md index 84da819899..30ad533adc 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md +++ b/translated/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md @@ -69,9 +69,9 @@ IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品 #### 方法二 #### -An alternative way to disable IPv6 permanently is to pass a necessary kernel parameter via GRUB/GRUB2 during boot time. +另一个永久禁用IPv6的方法是在开机的时候执行一个必要的内核参数。 -Open /etc/default/grub with a text editor, and add "ipv6.disable=1" to GRUB_CMDLINE_LINUX variable. +用文本编辑器打开 /etc/default/grub 并给GRUB_CMDLINE_LINUX变量添加"ipv6.disable=1"。 $ sudo vi /etc/default/grub @@ -79,29 +79,29 @@ Open /etc/default/grub with a text editor, and add "ipv6.disable=1" to GRUB_CMDL GRUB_CMDLINE_LINUX="xxxxx ipv6.disable=1" -In the above, "xxxxx" denotes any existing kernel parameter(s). Add "ipv6.disable=1" after them. +上面的"xxxxx"代表任意存在着的内核参数,在它后面添加"ipv6.disable=1"。 ![](https://farm8.staticflickr.com/7286/15982512103_ec5d940e58_b.jpg) -Finally, don't forget to apply the modified GRUB/GRUB2 settings by running: +最后,不要忘记用以下方法保存对GRUB/GRUB2的修改: -On Debian, Ubuntu or Linux Mint: +Debian、Ubuntu或Linux Mint系统: $ sudo update-grub -On Fedora, CentOS/RHEL: +Fedora、CentOS/RHEL系统: $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg -Now IPv6 will be completely disabled once you reboot your Linux system. +现在只要你重启你的Linux系统,IPv6就会完全被禁用。 -### Other Optional Steps after Disabling IPv6 ### +### 禁用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. +这里有一些可选步骤在你禁用IPv6后需要考虑,这是因为当你在内核里禁用IPv6后,其它程序仍然会尝试使用IPv6。在大多数情况下,例如应用程序的运转状态不太会遭到破坏,但是出于效率或安全方面的原因,你要为他们禁用IPv6。 #### /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. +根据你的设置, /etc/hosts 会包含一条或多条IPv6的hosts和它们的地址。用文本编辑器打开 /etc/hosts 并注释掉包含IPv6 hosts的脚本行。 $ sudo vi /etc/hosts @@ -116,7 +116,7 @@ Depending on your setup, /etc/hosts may contain one or more IPv6 hosts and their #### 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. +如果你在用NetworkManager来管理你的网络设置,你可以在NetworkManager里禁用IPv6。在NetworkManager打开wired connection,点击"IPv6 Settings"选项并在"Method"一栏选择"Ignore",保存退出。 ![](https://farm8.staticflickr.com/7293/16394993017_21917f027b_o.png) @@ -124,7 +124,7 @@ If you are using NetworkManager to manage your network settings, you can disable 默认情况下,OpenSSH服务(sshd)会去尝试捆绑IPv4和IPv6的地址。 -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. +要强制sshd只捆绑IPv4地址,用文本编辑器打开 /etc/ssh/sshd_config 并添加以下脚本行。inet只适用于IPv4,而inet6是适用于IPv6的。 $ sudo vi /etc/ssh/sshd_config From 38bf5cdfdac3ba8af3d8342f910198da93a923ab Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Fri, 24 Apr 2015 15:26:12 +0800 Subject: [PATCH 063/154] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=AB=E5=B0=BE?= =?UTF-8?q?=E8=AF=91=E8=80=85ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...420 7 Interesting Linux 'sort' Command Examples--Part 2.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md b/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md index 37312ffa16..4602424a3a 100644 --- a/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md +++ b/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md @@ -116,13 +116,15 @@ Reports Disorder. Conflict.. ![Sort Join Two Files](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Join-Two-Files.gif) + 我所要讲的全部内容就在这里了,希望与各位保持联系,也希望各位经常来Tecmint逛逛。有反馈就在下面评论吧。 + -------------------------------------------------------------------------------- via: http://www.tecmint.com/linux-sort-command-examples/ 作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/DongShuaike) +译者:[DongShuaike](https://github.com/DongShuaike) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From fa7a5eb8bc6751301d1d5e5979d2dd3398fb474a Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 24 Apr 2015 16:20:18 +0800 Subject: [PATCH 064/154] =?UTF-8?q?20150424-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inimal RHEL or CentOS 7 Installation--1.md | 216 +++++++++++++++ ...inimal RHEL or CentOS 7 Installation--2.md | 144 ++++++++++ ...inimal RHEL or CentOS 7 Installation--3.md | 253 ++++++++++++++++++ ...inimal RHEL or CentOS 7 Installation--4.md | 176 ++++++++++++ ...inimal RHEL or CentOS 7 Installation--5.md | 135 ++++++++++ ...inimal RHEL or CentOS 7 Installation--6.md | 80 ++++++ 6 files changed, 1004 insertions(+) create mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md create mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md create mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md create mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md create mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md create mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md new file mode 100644 index 0000000000..06c7c950f8 --- /dev/null +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md @@ -0,0 +1,216 @@ +30 Things to Do After Minimal RHEL/CentOS 7 Installation--1 +================================================================================ +CentOS is a Industry Standard Linux Distribution which is a derivative of RedHat Enterprise Linux. You may start using the OS as soon as you install it, but to make the most out of your system you need to perform a few updates, install a few packages, configure certain services and application. + +This article aims at “30 Things to Do After Installing RHEL/CentOS 7”. The post is written keeping in mind you have installed RHEL/CentOS Minimal Install which is preferred in Enterprise and production environment, if not you can follow below guide that will show you minimal installations of both. + +- [Installation of CentOS 7 Minimal][1] +- [Installation of RHEL 7 Minimal][2] + +The following are the list of important things, which we’ve covered in this guide based on industry standard requirements. We hoping that, these things will be very helpful in setting up your server. + +1. Register and Enable Red Hat Subscription +2. Configure Network with Static IP Address +3. Set Hostname of Server +4. Update or Upgrade CentOS Minimal Install +5. Install Command Line Web Browser +6. Install Apache HTTP Server +7. Install PHP +8. Install MariaDB Database +9. Install and Configure SSH Server +10. Install GCC (GNU Compiler Collection) +11. Install Java +12. Install Apache Tomcat +13. Install Nmap to Monitor Open Ports +14. FirewallD Configuration +15. Installing Wget +16. Installing Telnet +17. Installing Webmin +18. Enable Third Party Repositories +19. Install 7-zip Utility +20. Install NTFS-3G Driver +21. Install Vsftpd FTP Server +22. Install and Configure sudo +23. Install and Enable SELinux +24. Install Rootkit Hunter +25. Install Linux Malware Detect (LMD) +26. Server Bandwidth Testing with Speedtest-cli +27. Configure Cron Jobs +28. Install Owncloud +29. Enable Virtualization with Virtualbox +30. Password Protect GRUB + +### 1. Register and Enable Red Hat Subscription ### + +After minimal RHEL 7 installation, it’s time to register and enable your system to Red Hat Subscription repositories and perform a full system update. This is valid only if you have a valid RedHat Subscription. You need to register your in order to enable official RedHat System repositories and update the OS from time-to-time. + +We have already covered a detailed instructions on how to register and active RedHat subscription at the below guide. + +- [Register and Enable Red Hat Subscription Repositories in RHEL 7][3] + +**Note**: This step is only for RedHat Enterprise Linux having a valid subscription. If you are running a CentOS server immediately move to further steps. + +### 2. Configure Network with Static IP Address ### + +The first thing you need to do is to configure Static IP address, Route and DNS to your CentOS Server. We will be using ip command the replacement of ifconfig command. However, ifconfig command is still available for most of the Linux distributions and can be installed from default repository. + + # yum install net-tools [Provides ifconfig utility] + +![Install ifconfig in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Install-ifconfig.jpeg) + +But as I said we will be using ip command to configure static IP address. So, make sure you first check the current IP address. + + # ip addr show + +![Check IP Address i n CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Check-IP-Address.jpeg) + +Now open and edit file /etc/sysconfig/network-scripts/ifcfg-enp0s3 using your choice of editor. Here, I’m using Vi editor and make sure you must be root user to make changes… + + # vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 + +Now we will be editing four fields in the file. Note the below four fields and leave everything else untouched. Also leave double quotes as it is and enter your data in between. + + IPADDR = “[Enter your static IP here]” + GATEWAY = “[Enter your Default Gateway]” + DNS1 = “[Your Domain Name System 1]” + DNS2 = “[Your Domain Name System 2]” + +After making the changes ‘ifcfg-enp0s3‘, looks something like the image below. Notice your IP, GATEWAY and DNS will vary, please confirm it with your ISP. Save and Exit. + +![Network Details](http://www.tecmint.com/wp-content/uploads/2015/04/Network-Details.jpeg) +Network Details + +Restart service network and check the IP is correct or not, that was assigned. If everything is ok, Ping to see network status… + + # service network restart + +![Restart Network Service](http://www.tecmint.com/wp-content/uploads/2015/04/Restarat-Network.jpeg) +Restart Network Service + +After restarting network, make sure to check the IP address and network status… + + # ip addr show + # ping -c4 google.com + +![Verify IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-IP-Address.jpeg) +Verify IP Address + +![Check Network Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Network-Status.jpeg) +Check Network Status + +### 3. Set Hostname of Server ### + +The next thing to do is to change the HOSTNAME of the CentOS sever. Check the currently assigned HOSTNAME. + + # echo $HOSTNAME + +![Check System Hostname](http://www.tecmint.com/wp-content/uploads/2015/04/Check-System-Hostname.jpeg) +Check System Hostname + +To set new HOSTNAME we need to edit ‘/etc/hostsname‘ and replace old hostname with the desired one. + + # vi /etc/hostname + +![Set Hostname in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Set-System-Hostname.jpeg) +Set System Hostname + +After setting hostname, make sure to confirm hostname by logout and login again. After login check new hostname. + + $ echo $HOSTNAME + +![Confirm New Hostname](http://www.tecmint.com/wp-content/uploads/2015/04/Confirm-Hostname.jpeg) +Confirm New Hostname + +Alternatively you may use command ‘hostname‘ command to view your current hotsname. + + $ hostname + +### 4. Update or Upgrade CentOS Minimal Install ### + +This will not install any new packages other than updating and installing the latest version of installed packages and security updates. Moreover Update and Upgrade are pretty same except the fact that Upgrade = Update + enable obsoletes processing during updates. + + # yum update && yum upgrade + +![Update Minimal CentOS Server](http://www.tecmint.com/wp-content/uploads/2015/04/Update-CentOS-Server.jpeg) +Update Minimal CentOS Server + +**Important**: You can also run the below command which will not prompt for the packages update and you do not need to type ‘y‘ for accepting the changes. + +However it is always a good idea to review the changes which is going to take place on the sever specially in production. Hence using the below command may automate the update and upgrade for you but it is not recommended. + + # yum -y update && yum -y upgrade + +### 5. Install Command Line Web Browser ### + +In most cases, specially in production environment, we usually install CentOS as command line with no GUI, in this situation we must have a commandline browsing tool to check websites via terminal. For this, we going to install a most famous tool called ‘links‘. + + # yum install links + +![Install Commandline Browser](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Commandline-Browser.jpeg) +Links: Commandline Web Browsing + +For usage and examples to browse web sites u links tool, read our article [Command Line Web Browsing with Links Tool][4] + +### 6. Install Apache HTTP Server ### + +No matter for what purpose you will be using the server, in most of the cases you need a HTTP server to run websites, multimedia, client side script and many other things. + + # yum install httpd + +![Install Apache on CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-on-CentOS.jpeg.) +Install Apache Server + +If you would like to change default port (80) of Apache HTTP Server to any other port. You need to edit the configuration file ‘/etc/httpd/conf/httpd.conf‘ and search for the line that starts typically like: + + LISTEN 80 + +Change port number ‘80‘ to any other port (say 3221), save and exit. + +![Change Apache Port on CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Change-Apache-Port.jpeg) +Change Apache Port + +Add the port you just opened for Apache through firewall and then reload firewall. + +Allow service http through firewall (Permanent). + + # firewall-cmd –add-service=http + +Allow port 3221 through firewall (Permanent). + + # firewall-cmd –permanent –add-port=3221/tcp + +Reload firewall. + + # firewall-cmd –reload + +After making all above things, now it’s time to restart Apache HTTP server, so that the new port number is taken into effect. + + # systemctl restart httpd.service + +Now add the Apache service to system-wide to start automatically when system boots. + + # systemctl start httpd.service + # systemctl enable httpd.service + +Now verify the Apache HTTP Server by using links command line tool as shown in the below screen. + + # links 127.0.0.1 + +![Verify Apache Status](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Apache-Status.jpeg) +Verify Apache Status + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/ + +作者:[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://www.tecmint.com/centos-7-installation/ +[2]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ +[3]:http://www.tecmint.com/enable-redhat-subscription-reposiories-and-updates-for-rhel-7/ +[4]:http://www.tecmint.com/command-line-web-browsers/ \ No newline at end of file diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md new file mode 100644 index 0000000000..53d72d95d6 --- /dev/null +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md @@ -0,0 +1,144 @@ +30 Things to Do After Minimal RHEL/CentOS 7 Installation--2 +================================================================================ +### 7. Install PHP ### + +PHP is a server-side scripting language for web based services. It is frequently used as general-purpose programming language as well. Install PHP on CentOS Minimal Server as. + + # yum install php + +After installing php, make sure to restart Apache service to render PHP in Web Browser. + + # systemctl restart httpd.service + +Next, verify PHP by creating following php script in the Apache document root directory. + + # echo -e "" > /var/ww/html/phpinfo.php + +Now view the PHP file, we just created (phpinfo.php) in Linux Command Line as below. + + # php /var/www/html/phpinfo.php + OR + # links http://127.0.0.1/phpinfo.php + +![Verify PHP](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-PHP.jpeg) +Verify PHP + +### 8. Install MariaDB Database ### + +MariaDB is a fork of MySQL. RedHat Enterprise Linux and its derivatives have shifted to MariaDB from MySQL. It is the Primary Database management System. It is again one of those tools which is necessary to have and you will need it sooner or later no matter what kind of server you are setting. Install MariaDB on CentOS Minimal Install server as below. + + # yum install mariadb-server mariadb + +![Install MariaDB Database](http://www.tecmint.com/wp-content/uploads/2015/04/Install-MariaDB-Database.jpeg) +Install MariaDB Database + +Start and configure MariaDB to start automatically at boot. + + # systemctl start mariadb.service + # systemctl enable mariadb.service + +Allow service mysql (mariadb) through firewall. + + # firewall-cmd –add-service=mysql + +Now it’s time to secure MariaDB server. + + # /usr/bin/mysql_secure_installation + +![Secure MariaDB Database](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-MariaDB.jpeg) +Secure MariaDB Database + +Read Also: + +- [Installing LAMP (Linux, Apache, MariaDB, PHP/PhpMyAdmin) in CentOS 7.0][1] +- [Creating Apache Virtual Hosts in CentOS 7.0][2] + +### 9. Install and Configure SSH Server ### + +SSH stands for Secure Shell which is the default protocol in Linux for remote management. SSH is one of those essential piece of software which comes default with CentOS Minimal Server. + +Check Currently Installed SSH version. + + # SSH -V + +![Check SSH Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SSH-Version.jpeg) +Check SSH Version + +Use Secure Protocol over the default SSH Protocol and change port number also for extra Security. Edit the SSH configuration file ‘/etc/ssh/ssh_config‘. + +Uncomment the line below line or delete 1 from the Protocol string, so the line seems like: + + # Protocol 2,1 (Original) + Protocol 2 (Now) + +This change force SSH to use Protocol 2 which is considered to be more secure than Protocol 1 and also make sure to change the port number 22 to any in the configuration. + +![Secure SSH Login](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-SSH.jpeg) +Secure SSH Login + +Disable SSH ‘root login‘ and allow to connect to root only after login to normal user account for added additional Security. For this, open and edit configuration file ‘/etc/ssh/sshd_config‘ and change PermitRootLogin yes t PermitRootLogin no. + + # PermitRootLogin yes (Original) + PermitRootLogin no (Now) + +![Disable SSH Root Login](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-SSH-Root-Login.jpeg) +Disable SSH Root Login + +Finally, restart SSH service to reflect new changes.. + + # systemctl restart sshd.service + +Read Also: + +- [5 Best Practices to Secure and Protect SSH Server][3] +- [SSH Passwordless Login Using SSH Keygen in 5 Easy Steps][4] +- [No Password SSH Keys Authentication” with PuTTY][5] + +### 10. Install GCC (GNU Compiler Collection) ### + +GCC stands for GNU Compiler Collection is a compiler system developed by GNU Project that support various programming languages. It is not installed by default in CentOS Minimal Install. To install gcc compiler run the below command. + + # yum install gcc + +![Install GCC in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-GCC-in-CentOS.jpeg) +Install GCC GNU Compiler + +Check the version of installed gcc. + + # gcc --version + +![Check GCC Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-GCC-Version.jpeg) +Check GCC Version + +### 11. Install Java ### + +Java is a general purpose class based, object-oriented Programming language. It is not installed by default in CentOS Minimal Server. Install Java from repository as below. + + # yum install java + +![Install Java on CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-java.jpeg) +Install Java + +Check version of Java Installed. + + # java -version + +![Check Java Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Java-Version.jpeg) +Check Java Version + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/2/ + +作者:[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://www.tecmint.com/install-lamp-in-centos-7/ +[2]:http://www.tecmint.com/apache-virtual-hosting-in-centos/ +[3]:http://www.tecmint.com/5-best-practices-to-secure-and-protect-ssh-server/ +[4]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ +[5]:http://www.tecmint.com/ssh-passwordless-login-with-putty/ \ No newline at end of file diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md new file mode 100644 index 0000000000..b3996cf818 --- /dev/null +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md @@ -0,0 +1,253 @@ +30 Things to Do After Minimal RHEL/CentOS 7 Installation--3 +================================================================================ +### 12. Install Apache Tomcat ### + +Tomcat is a servlet container designed by Apache to run Java HTTP web server. Install tomcat as below but it is necessary to point out that you must have installed Java prior of installing tomcat. + + # yum install tomcat + +![Install Apache Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-Tomcat.jpeg) +Install Apache Tomcat + +After tomcat has been installed, star the tomcat service. + + # systemctl start tomcat + +Check Version of tomcat. + + # /usr/sbin/tomcat version + +![Check Tomcat Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-tomcat-version.jpeg) +Check Tomcat Version + +Add service tomcat and default port (8080) through firewall and reload settings. + + # firewall-cmd –zone=public –add-port=8080/tcp --permannet + # firewall-cmd –reload + +Now it’s time to secure tomcat server, create a user and a password to access and manage. We need to edit file ‘/etc/tomcat/tomcat-users.xml‘. See the section which looks like: + + + .... + + + + + + + + + + + + +![Secure Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-Tomcat.jpeg) +Secure Tomcat + +Here we added user “tecmint” to administer/manage tomcat using password “tecmint”. Stop and start the service tomcat so that the changes are taken into effect and enable tomcat service to start at system boot. + + # systemctl stop tomcat + # systemctl start tomcat + # systemctl enable tomcat.service + +Read Also: Installing and Configuring Apache Tomcat 8.0.9 in RHEL/CentOS 7.0/6.x + +### 13. Install Nmap to Monitor Open Ports ### + +Nmap for Network Mapper creates a map of the network by discovering host on which it is running as well as by analyzing network. nmap is not included in the default installation and you have to install it from repository. + + # yum install nmap + +![Install Nmap Monitoring Tool](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Nmap.jpeg) +Install Nmap Monitoring Tool + +List all open ports and corresponding services using them on host. + + # namp 127.0.01 + +![Monitor Open Ports](http://www.tecmint.com/wp-content/uploads/2015/04/Monitor-Open-Ports.jpeg) +Monitor Open Ports + +You may also use firewall-cmd to list all the ports, however I find nmap more useful. + + # firewall-cmd –list-ports + +![Check Open Ports in Firewall](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Open-Ports-in-Firewall.jpeg) +Check Open Ports in Firewall + +Read Also: [29 Useful Nmap Command to Monitor Open Ports][1] + +### 14. FirewallD Configuration ### + +firewalld is a firewall service which manages the server dynamically. Firewalld removed iptables in CentOS 7. Firewalld is installed by default on RedHat Enterprise Linux and its derivatives by default. With iptables every change in order to be taken into effect needs to flush all the old rules and create new rules. + +However with firewalld, no flushing and recreating of new rules required and only changes are applied on the fly. + +Check if Firewalld is running or not. + + # systemctl status firewalld + OR + # firewall-cmd –state + +![Check Firewalld Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Status.jpeg) +Check Firewalld Status + +Get a list of all the zones. + + # firewall-cmd --get-zones + +![Check Firewalld Zones](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Zones.jpeg) +Check Firewalld Zones + +To get details on a zone before switching. + + # firewall-cmd --zone=work --list-all + +![Check Zone Details](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Zone-Details.jpeg) +Check Zone Details + +To get default zone. + + # firewall-cmd --get-default-zone + +![Firewalld Default Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Firewalld-Default-Zone.jpeg) +Firewalld Default Zone + +To switch to a different zone say ‘work‘. + + # firewall-cmd --set-default-zone=work + +![Swich Firewalld Zones](http://www.tecmint.com/wp-content/uploads/2015/04/Swich-Zones.jpeg) +Swich Firewalld Zones + +To list all the services in the zone. + + # firewall-cmd --list-services + +![List Firewalld Zone Services](http://www.tecmint.com/wp-content/uploads/2015/04/List-Firewalld-Service.jpeg) +List Firewalld Zone Services + +To add a service say http, temporarily and reload firewalld. + + # firewall-cmd --add-service=http + # firewall-cmd –reload + +Add http Service Temporarily + +Add http Service Temporarily + +To add a service say http, permanently and reload firewalld. + +# firewall-cmd --add-service=http --permanent +# firewall-cmd --reload + +![Add http Service Permanent](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Temporarily.jpeg) +Add http Service Permanent + +To remove a service say http, temporarily. + + # firewall-cmd --remove-service=http + # firewall-cmd --reload + +![Remove Firewalld Service Temporarily](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Permanent.jpeg) +Remove Firewalld Service Temporarily + +To remove a service say http, permanently. + + # firewall-cmd --zone=work --remove-service=http --permanent + # firewall-cmd --reload + +![Remove Service Permanently](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Service-Parmanently.jpeg) +Remove Service Permanently + +To allow a port (say 331), temporarily. + + # firewall-cmd --add-port=331/tcp + # firewall-cmd --reload + +![Open Firewalld Port Temporarily](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Temporarily.jpeg) +Open Port Temporarily + +To allow a port (say 331), permanently. + + # firewall-cmd --add-port=331/tcp --permanent + # firewall-cmd --reload + +![Open Port in Firewalld Permanent](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Permanent.jpeg) +Open Port Permanently + +To block/remove a port (say 331), temporarily. + + # firewall-cmd --remove-port=331/tcp + # firewall-cmd --reload + +![Remove Port Temporarily in Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Temporarily.jpeg) +Remove Port Temporarily + +To block/remove a port (say 331), permanently. + + # firewall-cmd --remove-port=331/tcp --permanent + # firewall-cmd --reload + +![Remove Port Permanently in Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Permanently.jpeg) +Remove Port Permanently + +To disable firewalld. + + # systemctl stop firewalld + # systemctl disable firewalld + # firewall-cmd --state + +![Disable Firewalld in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-Firewalld.jpeg) +Disable Firewalld Service + +To enable firewalld. + + # systemctl enable firewalld + # systemctl start firewalld + # firewall-cmd --state + +![Enable Firewalld in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Firewalld.jpeg) +Enable Firewalld + +- [How to Configure ‘FirewallD’ in RHEL/CentOS 7][2] +- [Useful ‘FirewallD’ Rules to Configure and Manage Firewall][3] + +### 15. Installing Wget ### + +wget is a Linux command line based utility that retrieves (downloads) content from web servers. It is an important tool you must have to retrieve web contents or download any files using wget command. + + # yum install wget + +![Install Wget Tool](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Wget.png) +Install Wget Tool + +For more usage and practical examples on how to use wget command to download files on the terminal, read [10 Wget Command Examples][4]. + +### 16. Installing Telnet ### + +Telnet is a network protocol that enables a user to login into another computer on the same network over TCP/IP. Once connection etablished to the remote computer it becomes a virtual terminal and allow you to communicate with the remote host within your computer as per whatever privileges provided to you. + +Telnet also very useful for checking listening ports on remote computer or host. + + # yum install telnet + # telnet google.com 80 + +![Telnet Port Checking](http://www.tecmint.com/wp-content/uploads/2015/04/telnet-testing.png) +Telnet Port Checking + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/3/ + +作者:[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://www.tecmint.com/nmap-command-examples/ +[2]:http://www.tecmint.com/configure-firewalld-in-centos-7/ +[3]:http://www.tecmint.com/firewalld-rules-for-centos-7/ +[4]:http://www.tecmint.com/10-wget-command-examples-in-linux/ \ No newline at end of file diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md new file mode 100644 index 0000000000..1840511000 --- /dev/null +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md @@ -0,0 +1,176 @@ +30 Things to Do After Minimal RHEL/CentOS 7 Installation--4 +================================================================================ +### 17. Installing Webmin ### + +Webmin is a Web based configuration tool for Linux. It acts as a central system to configure various system configuration like users, disk quota, services and configurations of HTTP server, Apache, MySQL, etc. + + # wget http://prdownloads.sourceforge.net/webadmin/webmin-1.740-1.noarch.rpm + # rpm -ivh webmin-*.rpm + +![Install Webmin on CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Webmin.jpeg) +Install Webmin + +After webmin installation, you will get a message on terminal to login to your host (http://ip-address:10000) using your root password on port number 10000. If running a headless server you can forward the port and access it on a machine/server that is headed. + +### 18. Enable Third Party Repositories ### + +It is not a good idea to add untrusted repositories specially in production and it may be fatal. However just for example here we will be adding a few community approved trusted repositories to install third party tools and packages. + +Add Extra Package for Enterprise Linux (EPEL) Repository. + + # yum install epel-release + +Add Community Enterprise Linux Repository. + + # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm + +![Install Epel Repo](http://www.tecmint.com/wp-content/uploads/2015/04/install-epel-repo.jpeg) +Install Epel Repo + +**Attention**! Extra care is needs to be taken while adding Third Party Repository. + +### 19. Install 7-zip Utility ### + +In the CentOS Minimal Install you don’t get utility like unzip or unrar. We have the option to install each utility as required or an utility that servers for all. 7-zip is such an utility which compress and extract files of all known types. + + # yum install p7zip + +![Install 7zip Tool](http://www.tecmint.com/wp-content/uploads/2015/04/Install-7zip-tool.jpeg) +Install 7zip Tool + +**Notice**: The package is downloaded and installed from Fedora EPEL 7 Repository. + +### 20. Install NTFS-3G Driver ### + +A small yet very useful NTFS driver called NTFS-3G is available for most of the UNIX-like distribution. It is useful to mount and access Windows NTFS file system. Though other alternatives like Tuxera NTFS is available, NTFS-3G is most widely used. + + # yum install ntfs-3g + +![Install NTFS-3G in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-NTFS-3G.jpeg) +Install NTFS-3G to Mount Windows Partition + +After installing ntfs-3g has been installed, you can mount Windows NTFS partitions (where /dev/sda5 is my windows drive) using following command. + + # mount -ro ntfs-3g /dev/sda5 /mnt + # cd /mnt + # ls -l + +### 21. Install Vsftpd FTP Server ### + +VSFTPD which stands for Very Secure File Transfer Protocol Daemon is a FTP server for UNIX-like System. It is one of the most efficient and secure FTP Server available today. + + # yum install vsftpd + +![Install Vsftpd in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Install-FTP.jpeg) +Install Vsftpd FTP + +Edit the configuration file located at ‘/etc/vsftpd/vsftpd.conf‘ to secure vsftpd. + + # vi /etc/vsftpd/vsftpd.conf + +Edit a few fields and leave other as it is, unless you know what you are doing. + + anonymous_enable=NO + local_enable=YES + write_enable=YES + chroot_local_user=YES + +You may also change the port number and open vsftpd port through the firewall. + + # firewall-cmd --add-port=21/tcp + # firewall-cmd --reload + +Next restart vsftpd and enable to start at boot time. + + # systemctl restart vsftpd + # systemctl enable vsftpd + +### 22. Install and Configure sudo ### + +sudo which is commonly called as super do as well as suitable user do is a program for UNIX-like operating system to execute a program with the security privileged of another user. Let’s see how to configure sudo… + + # visudo + +It will open the file /etc/sudoers for editing.. + +![sudoers File](http://www.tecmint.com/wp-content/uploads/2015/04/sudoers-File.jpeg) +sudoers File + +Give all the permission (equal to root) to a user (say tecmint), that has already been created. + + tecmint ALL=(ALL) ALL + +Give all the permission (equal to root) to a user (say tecmint), except the permission to reboot and shutdown the server. + +Again open the same file and edit it with the below contents. + + cmnd_Alias nopermit = /sbin/shutdown, /sbin/reboot + +Then add alias with Logical (!) operator. + + tecmint ALL=(ALL) ALL,!nopermit + +Give permission to a group (say debian) to run a few root privilege command say (add user and delete user) . + + cmnd_Alias permit = /usr/sbin/useradd, /usr/sbin/userdel + +And then add the permission to group debian. + + debian ALL=(ALL) permit + +### 23. Install and Enable SELinux ### + +SELinux which stands for Security-Enhanced Linux is a security module at kernel level. + +# yum install selinux-policy + +![Install SElinux in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Install-SElinux.jpeg) +Install SElinux Policy + +Check SELinux Mode. + + # getenforce + +![Check SELinux Mode](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SELinux-Mode.jpeg) +Check SELinux Mode + +The output is enforcing mode which means SELinux policy is in effect. + +For debugging, set selinux mode to permissive temporarily. No need to reboot. + + # setenforce 0 + +After debugging set selinux to enforcing again without rebooting. + + # setenforce 1 + +### 24. Install Rootkit Hunter ### + +Rootkit Hunter abbreviated as Rkhunter is an application that scan rootkits and other potentially harmful exploits in Linux systems. + + # yum install rkhunter + +![Install Rootkit Hunter](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Rootkit-Hunter.jpeg) +Install Rootkit Hunter + +Run rkhunter as a scheduled job, from a script file or manually to scan harmful exploits in Linux. + + # rkhunter --check + +![Scan for rootkits](http://www.tecmint.com/wp-content/uploads/2015/04/Scan-for-rootkits.png) +Scan for rootkits + +![RootKit Scan Results](http://www.tecmint.com/wp-content/uploads/2015/04/RootKit-Results.png) +RootKit Scan Results + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/4/ + +作者:[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/ \ No newline at end of file diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md new file mode 100644 index 0000000000..741df9a537 --- /dev/null +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md @@ -0,0 +1,135 @@ +30 Things to Do After Minimal RHEL/CentOS 7 Installation--5 +================================================================================ +### 25. Install Linux Malware Detect (LMD) ### + +Linux Malware Detect (LMD) is a open source Linux malware scanner released under the GNU GPLv2 license, that is +specially designed for threats faced in hosting environments. For complete installation, configuration and usage of LMD can be found at: + +- [Install and Use (LMD) with ClamAV as Antivirus Engine][1] + +### 26. Server Bandwidth Testing with Speedtest-cli ### + +speedtest-cli is a tool written in python to test internet bandwidth including download and upload speed. For complete installation and usage of speedtest-cli tool, read our article at [Check Linux Server Bandwidth Speed from Command Line][2] + +### 27. Configure Cron Jobs ### + +This is one of the most widely used software utility. It function as job scheduler i.e., schedule a job now that will execute in future itself. It is useful in logging and maintaining records unattained as well as several other routine work like regular backup. All the schedule is written in /etc/crontab file. + +The crontab file contains 6 fields as follows: + + Minutes Hour Day of Month Month of Year Week Day Command + (0-59) (0-23) (1-31) (1/jan-12/dec) (0-6/sun-sat) Command/script + +![Crontab Fields](http://www.tecmint.com/wp-content/uploads/2015/04/Crontab-Fields.jpeg) +Crontab Fields + +To run a cron job (say run /home/$USER/script.sh) everyday at 04:30 am. + + Minutes Hour Day of Month month of year Week Day command + 30 4 * * * speedtest-cli + +Add the following entry to the crontab file ‘/etc/crontab/‘. + + 30 4 * * * /home/$user/script.sh + +After adding the above line to crontab, it will run automatically at 04:30 am everyday and the output depends upon what is there in script file. Moreover script can be replaced by commands. For more examples of cron jobs, read [11 Cron Jobs Examples in Linux][3] + +### 28. Install Owncloud ### + +Owncloud is a HTTP based data synchronization, file sharing and remote file storage application. For more detail on installing own cloud, you may like to see this article : [Create Personal/Private Cloud Storage in Linux][4] + +### 29. Enable Virtualization with Virtualbox ### + +Virtualization is a process of creating virtual OS, Hardware and Network, is one of the most sought technology of these days. We will be discussing on how to install and configure virtualization in detail. + +Our CentOS Minimal server is a headless server. Lets prepare it to host virtual machines that is accessible over HTTP by installing following packages. + + # yum groupinstall 'Development Tools' SDL kernel-devel kernel-headers dkms + +![Install Development Tools](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Development-Tool.jpeg) +Install Development Tools + +Change working directory to ‘/etc/yum.repos.d/‘ and download Virtualbox repository. + + # wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc + +Install the key just downloaded. + + # rpm --import oracle_vbox.asc + +Update and Install Virtualbox. + + # yum update && yum install virtualbox-4.3 + +Next, download and install Virtualbox extension pack. + + # wget http://download.virtualbox.org/virtualbox/4.3.12/Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack + # VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack + +![Install Virtualbox Extension Pack](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Virtualbox-Extension-Pack.jpeg) +Install Virtualbox Extension Pack + +![Installing Virtualbox Extension Pack](http://www.tecmint.com/wp-content/uploads/2015/04/Installing-Virtualbox-Extension-Pack.jpeg) +Installing Virtualbox Extension Pack + +Create a user ‘vbox‘ to manage virtualbox and add it to group vboxusers. + + # adduser vbox + # passwd vobx + # usermod -G vboxusers vbox + +Install HTTPD server. + + # yum install httpd + +Install PHP (with soap extension). + + # yum install php php-devel php-common php-soap php-gd + +Download PHP virtualBox. + + # wget http://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-4.3-1.zip + +Extract the zip and copy the extracted folder to HTTP working directory. + + # unzip phpvirtualbox-4.*.zip + # cp phpvirtualbox-4.3-1 -R /var/www/html + +Next, rename file /var/www/html/phpvirtualbox/config.php-example to var/www/html/phpvirtualbox/config.php. + + # mv config.php.example config.php + +Open the configuration file to edit and add ‘username‘ and ‘password‘ we just created in the above step. + + # vi config.php + +Finally, restart VirtualBox and HTTP server. + + # service vbox-service restart + # service httpd restart + +Now forward the port and access it on a headed server. + + http://192.168.0.15/phpvirtualbox-4.3-1/ + +![PHP Virtualbox Login](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox-Login.png) +PHP Virtualbox Login + +![PHP Virtualbox Dashboard](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox.png) +PHP Virtualbox Dashboard + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/5/ + +作者:[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://www.tecmint.com/install-linux-malware-detect-lmd-in-rhel-centos-and-fedora/ +[2]:http://www.tecmint.com/check-internet-speed-from-command-line-in-linux/ +[3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ +[4]:http://www.tecmint.com/install-owncloud-to-create-personal-storage-in-linux/ \ No newline at end of file diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md new file mode 100644 index 0000000000..04ea64d2f4 --- /dev/null +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md @@ -0,0 +1,80 @@ +30 Things to Do After Minimal RHEL/CentOS 7 Installation--6 +================================================================================ +### 30. Password Protect GRUB ### + +Password protect your boot loader so that you get an additional level of security right at the booting time. Also you get a protection layer of protection at physical level. Protect your Server by locking GRUB at boot to avoid any unauthorized access. + +First make backup of two files, so that if anything goes bad, you have the option to revert back. Create a backup of ‘/etc/grub2/grub.cfg‘ as ‘/etc/grub2/grub.cfg.old‘. + + # cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.old + +Also, Create a backup of ‘/etc/grub.d/10_linux‘ as ‘/etc/grub.d/10_linux.old‘. + + # cp /etc/grub.d/10_linux /etc/grub.d/10_linux.old + +Now open ‘/etc/grub.d/10_linux‘ and add the below line at the end of the file. + + cat < Date: Fri, 24 Apr 2015 14:47:37 -0500 Subject: [PATCH 065/154] [Translating]20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md --- ...150407 Top 6 Ways To Get Your iTunes Experience On Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md b/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md index 194c3307e2..c64bc41f29 100644 --- a/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md +++ b/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md @@ -1,3 +1,4 @@ +KevinSJ translating Top 6 Ways To Get Your iTunes Experience On Linux ================================================================================ ![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/itunes-linux-840x420.jpg?35dc20) @@ -83,4 +84,4 @@ via: http://www.makeuseof.com/tag/top-6-ways-get-itunes-experience-linux/ [8]:http://www.makeuseof.com/tag/play-manage-music-collection-rhythmbox-linux/ [9]:https://www.clementine-player.org/ [10]:http://www.makeuseof.com/tag/need-a-lightweight-music-player-without-sacrificing-features-clementine-cross-platform/ -[11]:http://music.google.com/ \ No newline at end of file +[11]:http://music.google.com/ From 7924c84154ae0bccbd1f0b81872cfc8880c34278 Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Fri, 24 Apr 2015 23:23:42 -0500 Subject: [PATCH 066/154] Update and rename sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md to translated/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md translated --- ... To Get Your iTunes Experience On Linux.md | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) rename {sources => translated}/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md (60%) diff --git a/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md b/translated/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md similarity index 60% rename from sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md rename to translated/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md index c64bc41f29..5e5d0e213a 100644 --- a/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md +++ b/translated/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md @@ -1,16 +1,29 @@ -KevinSJ translating +六种在 Linux 上带来 iTunes 体验的方法 Top 6 Ways To Get Your iTunes Experience On Linux ================================================================================ ![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/itunes-linux-840x420.jpg?35dc20) +随着你对 Linux 的熟悉(也许会成为你首要使用的操作系统),你最终会寻找能在Linux上有效管理音乐的工具。你首先想到了 iTunes,因为它是近几年最流行的音乐管理工具,但你马上会发现iTunes并没有Linux版本。而且,你会发现还有比 iTunes 更好的音乐管理工具。 As you’re getting used to Linux (potentially as your new main operating system), you’ll eventually try to find a way to efficiently manage your music. iTunes comes to mind because it’s been the most popular way to manage music over the years, but you’ll quickly find out that iTunes isn’t available natively on Linux. Plus, better ways exist to manage your music now that it’s 2015. +尽管如此,这并不意味着你就不能使用你喜欢的方式管理音乐。Linux 上有很多方式可以让你整理你的音乐库。以下六种,仅供参考: However, that doesn’t automatically mean that you won’t be able to manage your music the way you want to. There’s plenty of other ways to keep tabs on your music library. Here’s six great ways to get it done. +### 在WINE上运行iTunes ### ### iTunes via WINE ### +尽管 iTunes 没有Linux版,你还是可以试试 [使用 WINE 运行 iTunes ][1] 或 PlayOnLinux 的。这些软件给本来只能运行于Windows下的应用程序添加了一个兼容层,这样就能让他们运行在Linux上了,但这样的方法效果十有分限。因此 [并非所有 Windows 应用程序都能使用WINE运行][2] - 但这还是一个值得尝试的方法。 Even if iTunes isn’t available in Linux as a native application, you can still try to [get it to work under WINE][1] or PlayOnLinux. These pieces of software try to add a compatibility layer so that Windows applications work on Linux, but the results are far from perfect. Therefore, [not all Windows applications will run with WINE][2] — but it’s still worth a try. +各个版本的iTunes结果可能给你不同的结果,但一般都遵循以下方法: +1. 安装WINE +1. 在WINE里运行iTunes安装程序 +1. 在网上搜索并解决你遇到的问题。 + +如果你在安装时遇到无法解决的问题,比如安装程序错误,或者安装好的程序运行不了,那是没办法的,WINE 就是这样 + +如果你想在 WINE 上运行 iTunes 但恰好运行不了的话,没问题。但如果你还想考虑运行一个原生的Linux的话,还有很多其他选择的。这些音乐管理软件狗能让你很方便的管理你的音乐并直接进行播放,还可以制作播放列表。 + Each version of iTunes can give you different results, but the general process is as follows: 1. Install WINE @@ -25,50 +38,65 @@ If you really want to use iTunes and you happen to luck out with WINE, then that ![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/amarok_main.jpg?35dc20) +如果你使用KDE环境,我推荐 Amarok。它具有 [很多管理音乐的特性][4] 而且他还能与KDE桌面环境无缝兼容。它很有很多实用的特性如无缝兼容 Last.FM,文件跟踪,动态播放列表及个吃支持。它甚至会自动在你播放曲目时,自动下载艺术家封面。 + If you use KDE, then I’d recommend Amarok. It has [plenty of features to manage your music][4] and tight desktop integration with KDE. It also has useful features such as Last.FM integration, file tracking, dynamic playlists, and script support. It can even pull up biographies of artists as you play their songs. ### [Banshee][5] ### ![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/banshee_main.jpg?35dc20) +如果你使用 GNOME 或其他任何基于 GTK 的桌面环境(他们十分常见)的话,我推荐使用使用Bansee作为 [全功能音乐库管理工具][6] 。它的功能与Amarok类似,也与Last.FM无缝兼容,支持网络广播,支持podcast,还有很多其他功能。选择 Amarok 还是 Bansee 要看你使用的桌面环境(这样才能无缝整合)。 + If you use GNOME or any GTK-based desktop environment (they’re quite common), then I’d recommend Banshee as a [full-featured music library][6] manager. It has a very similar feature set as Amarok, including Last.FM integration, Internet radio support, podcast support, and much more. Amarok and Banshee are really among the top two choices, so which one you choose should depend on which desktop environment you’re using (for integration’s sake). ### [Rhythmbox][7] ### ![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/rhythmbox_main.jpg?35dc20) +Rhythmbox是一个 基于GTK的桌环境下更 [轻量级的音乐库替代品][8]。尽管如此,它也还是有一些特性的。它也支持Last.FM,同时还能无缝播放并与其他如 Nautilus, XChat,及Pidgin 等进行整合。 Rhythmbox as a more [lightweight music library alternative][8] that is best used on GTK-based desktop environments. However, it still has quite a few features. You also get Last.FM support here, plus gapless playback and integration with various other applications such as Nautilus, XChat, and Pidgin. ### [Clementine][9] ### ![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/clementine_main.jpg?35dc20) +另一款叫 Clementine 的软件也值得我推荐,因为它的见面简洁、易用。它支持非常多的第三方服务例如Spotify,Digtal Imported 及Dropbox。Android系统上还有一款用作 Clementine 遥控的app。[Clementine是一个跨平台的][10] , 还支持Mac OS X 及 Windows。 Another application called Clementine also gets my recommendation with its clean and intuitive interface. It has tons of support for third-party services such as Spotify, Digitally Imported, and Dropbox. There’s also an Android app you can use as a remote control for Clementine. [Clementine is cross-platform][10] and available for Windows and Mac OS X. +这些程序都能很好的管理并播放你的音乐。唯一的问题是这些程序都不支持与 iOS 设备的整合, 而且目前还没有程序能做到这一点。但 iOS 经过很多改进后,已经足以不需要再连接到电脑了。 They all are excellent at managing and playing your music. The only downside to all of these is that there is no iOS device integration, and there’s currently no modern application that can do that. However, iOS has received enough improvements that it’s virtually unnecessary to connect it to a computer anymore. ### [Google Play Music][11] ### ![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/google_music.jpg?35dc20) +最后,如果上面的那些程序还不能满足你的需求的花,你可以试试 Google Play Music。这个在线服务也可以用作能播放音乐的音乐库管理工具,但他还有几个额外的好处。你可以上传所有的音乐,并且在所有能上网的设备上获取这些音乐。这也意味着你不需要在电脑或者移动设备之间同步你的音乐(无论是 Android 还是 iOS 设备),因为你可以这些设备中使用Google Play Music。 如果你想要扩展你的去库,你可以订阅 All Access,但这并不是必须的。你不需要支付任何费用也可在你的曲库中储存20,000首 Lastly, if none of those applications satisfy your needs, you can take a look at Google Play Music. This online service acts as a music library manager that can play your music, but it also has some extra benefits. You can upload all your music to it and have access on any device connected to the Internet. That also means that you won’t have to sync your music between your computer and your mobile device (no matter if Android or iOS) because you have access to Google Play Music from both. If you want to expand your library you can get the All Access subscription, but it’s not a requirement. You can use it simply as a music library completely free for up to 20,000 songs. +#### 靠,居然没有 Spotify ?! #### #### Wot, no Spotify?! #### +尽管 Spotify 也是一款管理和听音乐的方法,我不推荐它的唯一原因是它事实上并不让你管理你的音乐。你不能将曲目上传到 Spotify - 只能它们给你提供的曲目。尽管它们提供了很多,但原理都不尽相同。 The only reason why I don’t mention Spotify is that, although it’s also a great way to access and listen to music, it doesn’t really let you manage your own music. You can’t upload trakcs to Spotify — you have to listen to what they give you. Albeit they give you a lot, but it’s nonetheless a different mechanism. -### You Have Options ### +### 你还有其他选择 ### +### You Have Options ### + +以上六个软件应该可以在给你带来类似 iTunes 的功能了。这些软件主要是能让你管理和播放你的音乐库,但如果你还需要 iTunes 里的其他特性,其他Linux原生软件或许能满足这类需求。 With these six options, you should be able to get iTunes-like functionality on your desktop. These options focused mainly on managing and playing your music library, but if there are any other features that you need from iTunes, other Linux-native applications can take care of those needs. +**你通常在Linux上使用哪些音乐?**在下方评论与我们分享吧! **What music applications do you regularly use on Linux?** Let us know in the comments! + -------------------------------------------------------------------------------- via: http://www.makeuseof.com/tag/top-6-ways-get-itunes-experience-linux/ 作者:[Danny Stieben][a] -译者:[译者ID](https://github.com/译者ID) +译者:[KevinSJ](https://github.com/KevinSJ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1f74f0b42f6dd367dbf3bef749e0991e37c4bbdd Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 25 Apr 2015 16:50:37 +0800 Subject: [PATCH 067/154] [Translating] tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1,2 --- ...hings to Do After Minimal RHEL or CentOS 7 Installation--1.md | 1 + ...hings to Do After Minimal RHEL or CentOS 7 Installation--2.md | 1 + 2 files changed, 2 insertions(+) diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md index 06c7c950f8..7edee2be22 100644 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md @@ -1,3 +1,4 @@ +Translating by ictlyh 30 Things to Do After Minimal RHEL/CentOS 7 Installation--1 ================================================================================ CentOS is a Industry Standard Linux Distribution which is a derivative of RedHat Enterprise Linux. You may start using the OS as soon as you install it, but to make the most out of your system you need to perform a few updates, install a few packages, configure certain services and application. diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md index 53d72d95d6..a196cd1f1f 100644 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md @@ -1,3 +1,4 @@ +Translating by ictlyh 30 Things to Do After Minimal RHEL/CentOS 7 Installation--2 ================================================================================ ### 7. Install PHP ### From 8545d473444c6f231a3fafa5f21ec50533534e2d Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Apr 2015 18:41:06 +0800 Subject: [PATCH 068/154] PUB:20150227 Chess in a Few Bytes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @FSSlc 累死了,这里有不少生僻的术语,查了半天。不过你基本上都翻译对了。: D --- published/20150227 Chess in a Few Bytes.md | 116 ++++++++++++++++++ .../share/20150227 Chess in a Few Bytes.md | 114 ----------------- 2 files changed, 116 insertions(+), 114 deletions(-) create mode 100644 published/20150227 Chess in a Few Bytes.md delete mode 100644 translated/share/20150227 Chess in a Few Bytes.md diff --git a/published/20150227 Chess in a Few Bytes.md b/published/20150227 Chess in a Few Bytes.md new file mode 100644 index 0000000000..941f6de274 --- /dev/null +++ b/published/20150227 Chess in a Few Bytes.md @@ -0,0 +1,116 @@ +只有几百个字节大小的国际象棋程序 +================================================================================ + +当我在这里提到了 ZX81 电脑时,我已经暴露了我的年龄。ZX81 是一个由英国开发者(Sincilair 研究所)生产的家庭电脑,它拥有"高达" 1KB 的内存!上面的 1KB 并不是打印错误,这个家庭电脑确实只配置有 1KB 的板载内存。但这个内存大小上的限制并没有阻止爱好者制作种类繁多的软件。事实上,这个机器引发了一代编程奇才的出现,这让他们掌握了让程序在该机上运行起来的技能。这个机器可以通过一个 16 KB 的内存卡来进行升级,这就提供了更多的编程可能。但未经扩展的 1KB 机器仍然激励着编程者们发布卓越的软件。 + +![1K ZX Chess ](http://www.linuxlinks.com/portal/content2/reviews/Games2/1KZXChess.jpg) + +我最喜爱的 ZX81 游戏有: 模拟飞行(Flight Simulation), 3D 版怪物迷宫(3D Monster Maze), 小蜜蜂(Galaxians), 以及最重要的 1K ZX Chess。 只有最后一个程序是为未扩展版的 ZX81 电脑设计的。事实上,David Horne 开发的 1K ZX Chess 只使用了仅仅 672 字节的 RAM(LCTT 译注:如果读者有兴趣,可以看看[这里](http://users.ox.ac.uk/~uzdm0006/scans/1kchess/)对该程序的代码及解释)。尽管如此,该游戏尽力去实现大多数的国际象棋规则,并提供了一个计算机虚拟对手。虽然一些重要的规则被忽略了(如:王车易位,兵的升变,和吃过路兵) +(LCTT 译注:参考了[这里](http://zh.wikibooks.org/zh/%E5%9B%BD%E9%99%85%E8%B1%A1%E6%A3%8B/%E8%A7%84%E5%88%99)和[这里](http://en.wikipedia.org/wiki/Rules_of_chess)),但能够和人工智能相对抗,这仍然令人惊讶。这个游戏占据了我逝去的青春里的相当一部分。 + +1K ZX Chess 保持了在所有计算机上国际象棋的最小实现的地位长达 33 年之久,直到今年由 BootChess 打破了该记录,紧接着由 Toledo AtomChess 打破。这三个程序都没有实现所有的国际象棋规则,所以为了完整性,我介绍了我最喜爱的那些实现了所有国际象棋规则的极小的国际象棋。 + +Linux 有着一系列极其强大的国际象棋引擎,如 Stockfish, Critter, Togo II, Crafty, GNU Chess 和 Komodo 。 在这篇文章精选的国际象棋程序虽敌不过这些好的国际象棋程序,但它们展示了使用微不足道的代码库究竟可以实现多少东西。 + +---------- + +### Toledo Atomchess + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Toledo.png) + +你可能已经看到了大量有关 BootChess 新闻报道,这个只用 487 字节写就的国际象棋程序,一举打破了先前最小的国际象棋程序 1K ZX Chess 的记录。所以,Óscar Toledo Gutiérrez 挽起袖子自己编写了一个更加紧凑的国际象棋游戏。Toledo Atomchess 是仅有 481 字节的 x86 汇编代码,都能放到引导扇区里。 在难以置信的代码大小下,这个引擎实现了一个可玩的国际象棋游戏。 + +特点包括: + +- 基本的棋子移动 +- 用 ASCII 文本表现的棋盘 +- 以代数形式来输入移动(注:如 D2D4) +- 3 层的搜索深度 + +显然,为了将这个国际象棋程序压缩到 481 字节中,作者必须做出某些牺牲,这些局限包括: + +- 没有兵的升变 +- 没有王车易位 +- 没有吃过路兵 +- 没有移动确认 + +该作者也使用 C,JavaScript 和 Java 来写这个国际象棋程序,每种实现都非常小。 + +- 网站: [nanochess.org/chess6.html][1] +- 开发者: Óscar Toledo Gutiérrez +- 协议: 非商业用途可免费使用 +- 版本号: - + +---------- + +### BootChess + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-BootChess.png) + +BootChess 是一个国际象棋的极其小巧的计算机实现。这个程序被塞进到仅仅 487 字节里,并可运行在 Windows, Mac OS X 和 Linux 等操作系统。BootChess 的棋盘和棋子单独用文本表示,其中 P 代表兵, Q 用来代表王后,以及“点”代表空白格子。 + +特点包括: + +- 象棋棋盘和用户输入的形象的文本表示 +- 引导扇区大小(512 字节)的可玩的象棋游戏 +- 只需 x86 bios 硬件引导程序(没有软件依赖) +- 所有主要的正规移动包括双兵开局 +- 兵升变为王后(与 1k ZX Chess 相反) +- 名为 taxiMax > minMax half-ply 的 CPU 人工智能 +- 硬编码的西班牙白子开局 + +同样,它也存在一些重要的限制。这些遗漏的功能包括: + +- 兵的低升变(升变为非王后的棋子) +- 吃过路兵 +- 没有王车易位 +- 3 次位置重复和局规则(注:下一步之前,同样的移动出现了两次;可以参考[这里](http://www.netplaces.com/chess-basics/ending-the-game/three-position-repetition.htm)) +- 50 步移动和局规则(注:在连续的50个回合内,双方既没有棋子被吃掉,也没有兵被移动过,则和局;可以参考[这里](http://www.chessvariants.org/d.chess/chess.html)) +- 没有开放式和封闭式布局 +- 一个或多个 minMAX/negaMax 全层人工智能 + +- 网站: [www.pouet.net/prod.php?which=64962][2] +- 开发者: Olivier "Baudsurfer/RSi" Poudade +- 协议: WTFPL v2 +- 版本号: .02 + +---------- + +###Micro-Max + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Micro-Max.png) + +Micro-Max 是一个用 133 行 C 语言写就的象棋源程序。 + +作者实现了一个 hash 变换表,该引擎检查输入移动的合法性,以及支持 FIDE(注: World Chess Federation 缩写,参见其[官网](https://www.fide.com/)) 的全部规则,除了低升变。 + +特点包括: + +- 递归的 negamax 搜索 +- 反夺的静态搜索 +- 反夺规则的扩展 +- 迭代深化 +- 最佳移动优先的 `排序` +- 存储分数和最佳移动的 Hash 表 +- 完整的 FIDE 规则(除了低位升变)和移动合法性检查 + +还有一个 1433个字符的较大版本,但允许你使用完整的 FIDE 规则的低升变。 + +- 网站: [home.hccnet.nl/h.g.muller/max-src2.html][3] +- 开发者: Harm Geert Muller +- 协议: The MIT License +- 版本号: 3.2 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150222033906262/ChessBytes.html + +作者:Frazer Kline +译者:[FSSlc](https://github.com/FSSlc) +校对:[wxy](https://github.com/wxy) + +本文由 [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/translated/share/20150227 Chess in a Few Bytes.md b/translated/share/20150227 Chess in a Few Bytes.md deleted file mode 100644 index 60b5598c76..0000000000 --- a/translated/share/20150227 Chess in a Few Bytes.md +++ /dev/null @@ -1,114 +0,0 @@ -几 KB 的国际象棋程序 -================================================================================ -当我提及到我用来介绍计算(注:这里翻译的有问题)的是一台 ZX81 电脑时,我已经暴露了我的年龄。ZX81 是一个由英国(UK,the United Kingdom) 开发者(Sincilair 研究所)生产的家庭电脑,它拥有"高达" 1KB 的随机存储器(RAM)。上面的 1kB 并不是打印错误,这个家庭电脑确实只配置有 1KB 的板载内存。但这个内存大小上的限制并没有阻止爱好者制作种类繁多的软件。事实上,这个机器引发了一代编程奇才的出现,这迫使他们掌握让程序在该机上正常运行的方法。这个机器可以通过一个 16 KB 的 RAM 包来进行升级,这就提供了更多的编程可能。但未经扩展的 1KB 机器仍然激励着编程者发布卓越的软件。 - -![1K ZX Chess ](http://www.linuxlinks.com/portal/content2/reviews/Games2/1KZXChess.jpg) - -我最喜爱的 ZX81 游戏有: Flight Simulation, 3D Monster Maze, Galaxians, 以及最重要的 1K ZX Chess。 只有最后一个程序是为未扩展的 ZX81 电脑设计的。事实上,David Horne 开发的 1K ZX Chess 只使用了仅仅 672 字节的 RAM(注:如果读者有兴趣,可以看看 [这里](http://users.ox.ac.uk/~uzdm0006/scans/1kchess/)对该程序的代码及解释)。尽管如此,该游戏尽力去实现大多数的国际象棋规则,并提供了一个计算机虚拟对手。虽然一些重要的规则被忽略了(如:王车易位,兵的升变,和吃过路兵) -(注:参考了[这里](http://zh.wikibooks.org/zh/%E5%9B%BD%E9%99%85%E8%B1%A1%E6%A3%8B/%E8%A7%84%E5%88%99)和[这里](http://en.wikipedia.org/wiki/Rules_of_chess)),但能够和人工智能相对抗,这仍然令人惊讶。这个游戏占据了我逝去的青春里的相当一部分。 - -1K ZX Chess 保持着在任何计算机上国际象棋的最小实现的地位长达 33 年,直到今年由 BootChess 打破了该记录,紧接着由 Toledo AtomChess 打破。这三个程序都没有实现所有的国际象棋规则,所以为了完整性,我介绍了我最喜爱的,实现了所有国际象棋规则的极小的国际象棋。 - -Linux 有着一系列极其强大的国际象棋引擎,如 Stockfish, Critter, Togo II, Crafty, GNU Chess, 和 Komodo 。 在这篇文章精选的国际象棋程序虽敌不过一个好的国际象棋程序,但它们展示了使用微不足道的代码库究竟可以实现多少东西。 ----------- - -![](http://www.linuxlinks.com/portal/content2/png/ToledoAtomchess.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Toledo.png) - -你可能已经看到了大量有关 BootChess 新闻报道,一个只用 487 字节写就的国际象棋程序,一举打破了先前最小的国际象棋程序,1K ZX Chess 的记录。Óscar Toledo Gutiérrez 拿起外套并决定编写一个更加紧凑的国际象棋游戏。Toledo Atomchess 是仅有 481 字节的 x86 汇编代码,它适合在引导扇区里。 在给定的极小代码库限制下,这个引擎实现了一个适当的国际象棋游戏。 - -特点包括: - -- 基本的象棋移动 -- 象棋盘的 ASCII 文本表现 -- 以代数形式来输入移动(注:如 D2D4) -- 3 层的搜索深度 - -显然,为了将这个国际象棋程序压缩到 481 字节中,作者必须做出某些牺牲,这些局限包括: - -- 没有兵的升变 -- 没有王车易位 -- 没有吃过路兵 -- 没有移动确认 - -该作者也使用 C,JavaScript 和 Java 来写这个国际象棋程序,每种实现都非常小。 - -- 网站: [nanochess.org/chess6.html][1] -- 开发者: Óscar Toledo Gutiérrez -- 协议: 对非商业使用免费(Free for non-commercial use) -- 版本号: - - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/BootChess.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-BootChess.png) - -BootChess 是一个国际象棋的极其小巧的计算机实现。这个程序被塞进到仅仅 487 字节里,并可运行在 Windows, Mac OS X 和 Linux 等操作系统。BootChess 的棋盘和棋子单独用文本表示,其中 P 代表兵, Q 用来代表王后,以及输入的任何停顿代表空白方块。 - -特点包括: - -- 象棋棋盘和用户输入的图形化文本表示 -- 引导扇区大小(512 字节)的可玩的象棋游戏 -- 只需 x86 bios 硬件引导程序(没有软件依赖) -- 所有主要的正规移动包括 double square pawn start(注:这个我没有查到是什么意思) -- 兵升变为王后(与 1k ZX Chess 相反) -- 名为 taxiMax > minMax half-ply 的 CPU 人工智能 -- 硬编码的西班牙白子开局 - -同样,它也存在一些重要的限制。这些遗漏包括: - -- 正在推广 -- 吃过路兵 -- 没有王车易位 -- 3 次位置重复和局规则(注:下一步之前,同样的移动出现了两次;可以参考[这里](http://www.netplaces.com/chess-basics/ending-the-game/three-position-repetition.htm)) -- 50 步移动和局规则(注:在连续的50个回合内,双方既没有棋子被吃掉,也没有兵被移动过,则和局;可以参考[这里](http://www.chessvariants.org/d.chess/chess.html)) -- 没有开放或封闭的书籍 -- 一个或多个 minMAX/negaMax 全层人工智能 - -- 网站: [www.pouet.net/prod.php?which=64962][2] -- 开发者: Olivier "Baudsurfer/RSi" Poudade -- 协议: WTFPL v2 -- 版本号: .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 是一个用 C 写就的 133 行象棋源程序。 - -作者实现了一个 hash 变换表,该引擎检查输入移动的合法性,以及支持 FIDE(注: World Chess Federation 缩写,[这里](https://www.fide.com/)为其官网) 的全部规则,除了正在推广的规则。 - -特点包括: - -- 递归的 negamax 搜索 -- 重新夺回的静态搜索 -- 重新夺回规则的扩展 -- 迭代深化 -- 最好的先走策略 `排序` -- 存储分数和最佳移动的 Hash 表 -- 完整的 FIDE 规则(不包括正在推广的规则) 和移动合法性检查 - -同样存在一个简装的 1433个字符的版本,但允许你使用符合 FIDE 规则的正在推广的规则。 - -- 网站: [home.hccnet.nl/h.g.muller/max-src2.html][3] -- 开发者: Harm Geert Muller -- 协议: The MIT License -- 版本号: 3.2 - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20150222033906262/ChessBytes.html - -作者:Frazer Kline -译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者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 From 59a330066aec2f4f85911f10da85c9a21f60bd52 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Apr 2015 20:00:16 +0800 Subject: [PATCH 069/154] PUB:20150326 Mydumper--Mysql Database Backup tool @ictlyh --- ...26 Mydumper--Mysql Database Backup tool.md | 47 +++++++++---------- 1 file changed, 22 insertions(+), 25 deletions(-) rename {translated/share => published}/20150326 Mydumper--Mysql Database Backup tool.md (57%) diff --git a/translated/share/20150326 Mydumper--Mysql Database Backup tool.md b/published/20150326 Mydumper--Mysql Database Backup tool.md similarity index 57% rename from translated/share/20150326 Mydumper--Mysql Database Backup tool.md rename to published/20150326 Mydumper--Mysql Database Backup tool.md index 97e83e0933..dd1fd14110 100644 --- a/translated/share/20150326 Mydumper--Mysql Database Backup tool.md +++ b/published/20150326 Mydumper--Mysql Database Backup tool.md @@ -1,16 +1,13 @@ Mydumper - MySQL数据库备份工具 ================================================================================ -Mydumper 是MySQL数据库服务器备份工具,它比MySQL自带的mysqldump快很多。它还有在转储本身的时候检索远程服务器二进制日志文件的能力。 +Mydumper 是 MySQL 数据库服务器备份工具,它比 MySQL 自带的 mysqldump 快很多。它还有在转储的同时获取远程服务器二进制日志文件的能力。 ### Mydumper 的优势 ### -o 并行性 (因此有高速度) 和 性能 (避免了昂贵的字符集转换例程, 高效的代码) - -o 更容易管理输出 (每个表独立的文件,转储元数据等,简单的查看/解析数据) - -o 一致性 -- 在所有线程中维护快照, 提供准确的主从结点日志位置等。 - -o 可管理性 -- 支持对包含和排除指定的数据库和表的PCRE操作(译者注:PCRE,Perl Compatible Regular Expression,Perl兼容正则表达式) +- 并行能力 (因此有高速度) 和性能 (高效的代码避免了耗费 CPU 处理能力的字符集转换过程) +- 更容易管理输出 (每个表都对应独立的文件,转储元数据等,便于查看/解析数据) +- 一致性 :跨线程维护快照, 提供精确的主从日志定位等。 +- 可管理性 : 支持用 PCRE 来包含/排除指定的数据库和表(LCTT译注:PCRE,Perl Compatible Regular Expression,Perl兼容正则表达式) ### 在Ubuntu上安装 mydumper ### @@ -26,20 +23,20 @@ o 可管理性 -- 支持对包含和排除指定的数据库和表的PCRE操作( 应用程序选项: -- -B, --database 转储的数据库 -- -T, --tables-list 逗号分隔的转储表列表(不排除正则表达式) +- -B, --database 要转储的数据库 +- -T, --tables-list 逗号分隔的转储表列表(不会被正则表达式排除) - -o, --outputdir 保存输出文件的目录 - -s, --statement-size 插入语句的字节大小, 默认是1000000个字节 -- -r, --rows 把表分为每个这么多行的块 +- -r, --rows 把表按行数切块 - -c, --compress 压缩输出文件 -- -e, --build-empty-files 尽管表中没有数据也创建输出文件 -- -x, --regex 匹配‘db.table'的正则表达式 -- -i, --ignore-engines 逗号分隔的忽略存储引擎列表 -- -m, --no-schemas 不转储有数据的表架构 -- -k, --no-locks 不执行临时共享读锁. 警告: 这会导致备份的不一致性 +- -e, --build-empty-files 空表也输出文件 +- -x, --regex 匹配‘db.table’的正则表达式 +- -i, --ignore-engines 以逗号分隔的被忽略的存储引擎列表 +- -m, --no-schemas 不转储表架构 +- -k, --no-locks 不执行临时共享读锁。警告: 这会导致备份的不一致性 - -l, --long-query-guard 设置长查询的计时器秒数,默认是60秒 -- --kill-long-queries 杀死长查询 (而不是退出) -- -b, --binlogs 获取二进制日志文件和转储数据的快照 +- --kill-long-queries 杀死长查询 (而不是退出程序) +- -b, --binlogs 获取二进制日志文件快照并转储数据 - -D, --daemon 开启守护进程模式 - -I, --snapshot-interval 每个转储快照之间的间隔时间(分钟), 需要开启 --daemon, 默认是60分钟 - -L, --logfile 日志文件的名字,默认是stdout @@ -67,21 +64,21 @@ o 可管理性 -- 支持对包含和排除指定的数据库和表的PCRE操作( --threads=2 \ --compress-protocol -Mydumper输出数据的说明 +Mydumper 输出数据的说明 -Mydumper不直接指定输出的文件,而是输出到文件夹的文件中。--outputdir 选项指定要使用的目录名称。 +Mydumper 不直接指定输出的文件,而是输出到文件夹的文件中。--outputdir 选项指定要使用的目录名称。 输出分为两部分 -架构 +**表结构** -对数据库中的每个表,创建包含 CREATE TABLE 语句的文件。文件命名为: +对数据库中的每个表,创建一个包含 CREATE TABLE 语句的文件。文件命名为: dbname.tablename-schema.sql.gz -数据 +**数据** -对于每个行数多余--rows参数的表, 创建文件名字为: +每个表名跟着按 --rows 参数所切块的数量, 创建文件名字为: dbname.tablename.0000n.sql.gz @@ -103,7 +100,7 @@ via: http://www.ubuntugeek.com/mydumper-mysql-database-backup-tool.html 作者:[ruchi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 4239b0e682a7b5da93cc9c80c201be7282f0375a Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 25 Apr 2015 20:08:14 +0800 Subject: [PATCH 070/154] [Translated] tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1 --- ...inimal RHEL or CentOS 7 Installation--1.md | 217 ------------------ ...inimal RHEL or CentOS 7 Installation--1.md | 216 +++++++++++++++++ 2 files changed, 216 insertions(+), 217 deletions(-) delete mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md create mode 100644 translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md deleted file mode 100644 index 7edee2be22..0000000000 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md +++ /dev/null @@ -1,217 +0,0 @@ -Translating by ictlyh -30 Things to Do After Minimal RHEL/CentOS 7 Installation--1 -================================================================================ -CentOS is a Industry Standard Linux Distribution which is a derivative of RedHat Enterprise Linux. You may start using the OS as soon as you install it, but to make the most out of your system you need to perform a few updates, install a few packages, configure certain services and application. - -This article aims at “30 Things to Do After Installing RHEL/CentOS 7”. The post is written keeping in mind you have installed RHEL/CentOS Minimal Install which is preferred in Enterprise and production environment, if not you can follow below guide that will show you minimal installations of both. - -- [Installation of CentOS 7 Minimal][1] -- [Installation of RHEL 7 Minimal][2] - -The following are the list of important things, which we’ve covered in this guide based on industry standard requirements. We hoping that, these things will be very helpful in setting up your server. - -1. Register and Enable Red Hat Subscription -2. Configure Network with Static IP Address -3. Set Hostname of Server -4. Update or Upgrade CentOS Minimal Install -5. Install Command Line Web Browser -6. Install Apache HTTP Server -7. Install PHP -8. Install MariaDB Database -9. Install and Configure SSH Server -10. Install GCC (GNU Compiler Collection) -11. Install Java -12. Install Apache Tomcat -13. Install Nmap to Monitor Open Ports -14. FirewallD Configuration -15. Installing Wget -16. Installing Telnet -17. Installing Webmin -18. Enable Third Party Repositories -19. Install 7-zip Utility -20. Install NTFS-3G Driver -21. Install Vsftpd FTP Server -22. Install and Configure sudo -23. Install and Enable SELinux -24. Install Rootkit Hunter -25. Install Linux Malware Detect (LMD) -26. Server Bandwidth Testing with Speedtest-cli -27. Configure Cron Jobs -28. Install Owncloud -29. Enable Virtualization with Virtualbox -30. Password Protect GRUB - -### 1. Register and Enable Red Hat Subscription ### - -After minimal RHEL 7 installation, it’s time to register and enable your system to Red Hat Subscription repositories and perform a full system update. This is valid only if you have a valid RedHat Subscription. You need to register your in order to enable official RedHat System repositories and update the OS from time-to-time. - -We have already covered a detailed instructions on how to register and active RedHat subscription at the below guide. - -- [Register and Enable Red Hat Subscription Repositories in RHEL 7][3] - -**Note**: This step is only for RedHat Enterprise Linux having a valid subscription. If you are running a CentOS server immediately move to further steps. - -### 2. Configure Network with Static IP Address ### - -The first thing you need to do is to configure Static IP address, Route and DNS to your CentOS Server. We will be using ip command the replacement of ifconfig command. However, ifconfig command is still available for most of the Linux distributions and can be installed from default repository. - - # yum install net-tools [Provides ifconfig utility] - -![Install ifconfig in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Install-ifconfig.jpeg) - -But as I said we will be using ip command to configure static IP address. So, make sure you first check the current IP address. - - # ip addr show - -![Check IP Address i n CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Check-IP-Address.jpeg) - -Now open and edit file /etc/sysconfig/network-scripts/ifcfg-enp0s3 using your choice of editor. Here, I’m using Vi editor and make sure you must be root user to make changes… - - # vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 - -Now we will be editing four fields in the file. Note the below four fields and leave everything else untouched. Also leave double quotes as it is and enter your data in between. - - IPADDR = “[Enter your static IP here]” - GATEWAY = “[Enter your Default Gateway]” - DNS1 = “[Your Domain Name System 1]” - DNS2 = “[Your Domain Name System 2]” - -After making the changes ‘ifcfg-enp0s3‘, looks something like the image below. Notice your IP, GATEWAY and DNS will vary, please confirm it with your ISP. Save and Exit. - -![Network Details](http://www.tecmint.com/wp-content/uploads/2015/04/Network-Details.jpeg) -Network Details - -Restart service network and check the IP is correct or not, that was assigned. If everything is ok, Ping to see network status… - - # service network restart - -![Restart Network Service](http://www.tecmint.com/wp-content/uploads/2015/04/Restarat-Network.jpeg) -Restart Network Service - -After restarting network, make sure to check the IP address and network status… - - # ip addr show - # ping -c4 google.com - -![Verify IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-IP-Address.jpeg) -Verify IP Address - -![Check Network Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Network-Status.jpeg) -Check Network Status - -### 3. Set Hostname of Server ### - -The next thing to do is to change the HOSTNAME of the CentOS sever. Check the currently assigned HOSTNAME. - - # echo $HOSTNAME - -![Check System Hostname](http://www.tecmint.com/wp-content/uploads/2015/04/Check-System-Hostname.jpeg) -Check System Hostname - -To set new HOSTNAME we need to edit ‘/etc/hostsname‘ and replace old hostname with the desired one. - - # vi /etc/hostname - -![Set Hostname in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Set-System-Hostname.jpeg) -Set System Hostname - -After setting hostname, make sure to confirm hostname by logout and login again. After login check new hostname. - - $ echo $HOSTNAME - -![Confirm New Hostname](http://www.tecmint.com/wp-content/uploads/2015/04/Confirm-Hostname.jpeg) -Confirm New Hostname - -Alternatively you may use command ‘hostname‘ command to view your current hotsname. - - $ hostname - -### 4. Update or Upgrade CentOS Minimal Install ### - -This will not install any new packages other than updating and installing the latest version of installed packages and security updates. Moreover Update and Upgrade are pretty same except the fact that Upgrade = Update + enable obsoletes processing during updates. - - # yum update && yum upgrade - -![Update Minimal CentOS Server](http://www.tecmint.com/wp-content/uploads/2015/04/Update-CentOS-Server.jpeg) -Update Minimal CentOS Server - -**Important**: You can also run the below command which will not prompt for the packages update and you do not need to type ‘y‘ for accepting the changes. - -However it is always a good idea to review the changes which is going to take place on the sever specially in production. Hence using the below command may automate the update and upgrade for you but it is not recommended. - - # yum -y update && yum -y upgrade - -### 5. Install Command Line Web Browser ### - -In most cases, specially in production environment, we usually install CentOS as command line with no GUI, in this situation we must have a commandline browsing tool to check websites via terminal. For this, we going to install a most famous tool called ‘links‘. - - # yum install links - -![Install Commandline Browser](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Commandline-Browser.jpeg) -Links: Commandline Web Browsing - -For usage and examples to browse web sites u links tool, read our article [Command Line Web Browsing with Links Tool][4] - -### 6. Install Apache HTTP Server ### - -No matter for what purpose you will be using the server, in most of the cases you need a HTTP server to run websites, multimedia, client side script and many other things. - - # yum install httpd - -![Install Apache on CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-on-CentOS.jpeg.) -Install Apache Server - -If you would like to change default port (80) of Apache HTTP Server to any other port. You need to edit the configuration file ‘/etc/httpd/conf/httpd.conf‘ and search for the line that starts typically like: - - LISTEN 80 - -Change port number ‘80‘ to any other port (say 3221), save and exit. - -![Change Apache Port on CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Change-Apache-Port.jpeg) -Change Apache Port - -Add the port you just opened for Apache through firewall and then reload firewall. - -Allow service http through firewall (Permanent). - - # firewall-cmd –add-service=http - -Allow port 3221 through firewall (Permanent). - - # firewall-cmd –permanent –add-port=3221/tcp - -Reload firewall. - - # firewall-cmd –reload - -After making all above things, now it’s time to restart Apache HTTP server, so that the new port number is taken into effect. - - # systemctl restart httpd.service - -Now add the Apache service to system-wide to start automatically when system boots. - - # systemctl start httpd.service - # systemctl enable httpd.service - -Now verify the Apache HTTP Server by using links command line tool as shown in the below screen. - - # links 127.0.0.1 - -![Verify Apache Status](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Apache-Status.jpeg) -Verify Apache Status - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/ - -作者:[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://www.tecmint.com/centos-7-installation/ -[2]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ -[3]:http://www.tecmint.com/enable-redhat-subscription-reposiories-and-updates-for-rhel-7/ -[4]:http://www.tecmint.com/command-line-web-browsers/ \ No newline at end of file diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md new file mode 100644 index 0000000000..6736eda4e0 --- /dev/null +++ b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md @@ -0,0 +1,216 @@ +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--1 +================================================================================ +CentOS 是一个工业标准的 Linux 发行版,是红帽企业版 Linux 的衍生版本。你安装完后马上就可以使用,但是为了更好地使用你的系统,你需要进行一些升级、软件包安装、配置特定服务和应用程序等操作。 + +这篇文章介绍了 “安装完 RHEL/CentOS 7 后需要做的 30 件事情”。阅读帖子的时候请牢记已经完成了 RHEL/CentOS 最小化安装,这是首选的企业和生产环境,如果还没有,你可以按照下面的指南,它会告诉你两者的最小化安装方法。 + +- [最小化安装 CentOS 7][1] +- [最小化安装 RHEL 7][2] + +下面是一些重要的事情列表,基于工业标准需求我们都会进行介绍。我们希望这些东西在你配置服务器的时候能有所帮助。 + +1. 注册并启用红帽订阅 +2. 使用静态 IP 地址配置网络 +3. 设置服务器的主机名称 +4. 更新或升级最小化安装的 CentOS +5. 安装命令行 Web 浏览器 +6. 安装 Apache HTTP 服务器 +7. 安装 PHP +8. 安装 MariaDB 数据库 +9. 安装并配置 SSH 服务器 +10. 安装 GCC (GNU 编译器集) +11. 安装 Java +12. 安装 Apache Tomcat +13. 安装 Nmap 检查开放端口 +14. 配置防火墙 +15. 安装 Wget +16. 安装 Telnet +17. 安装 Webmin +18. 启用第三方库 +19. 安装 7-zip 工具 +20. 安装 NTFS-3G 驱动 +21. 安装 Vsftpd FTP 服务器 +22. 安装和配置 sudo +23. 安装并启用 SELinux +24. 安装 Rootkit Hunter +25. 安装 Linux Malware Detect (LMD) +26. 用 Speedtest-cli 测试服务器带宽 +27. 配置 Cron 作业 +28. 安装 Owncloud +29. 启用 VirtualBox 虚拟化 +30. 用密码保护 GRUB + +### 1. 注册并启用红帽订阅 ### + +RHEL 7 最小化安装完成后,是时候注册并启用系统红帽订阅库,以及执行一个完整的系统更新。这只当你有一个可用的红帽订阅时才能有效。你要注册才能启用官方红帽系统库并时不时进行操作系统更新。 + +在下面的指南中我们已经包括了一个如何注册并激活红帽订阅的详细说明。 + +- [在 RHEL 7 中注册并启用红帽订阅][3] + +**注意**: 这一步仅适用于有一个有效订阅的红帽企业版 Linux. 如果你用的是 CentOS 服务器,请查看后面的章节。 + +### 2. 使用静态 IP 地址配置网络 ### + +你第一件要做的事情就是为你的 CentOS 服务器配置静态 IP 地址,路由以及 DNS。我们会使用 ip 命令代替 ifconfig 命令。当然,ifconfig 命令对于大部分 Linux 发行版来说还是可用的,还能从默认库安装。 + + # yum install net-tools [提供 ifconfig 工具] + +![在 Linux 上安装 ifconfig](http://www.tecmint.com/wp-content/uploads/2015/04/Install-ifconfig.jpeg) + +但正如我之前说,我们会使用 ip 命令来配置静态 IP 地址。所以,确认你首先检查了当前的 IP 地址。 + + # ip addr show + +![在 CentOS 查看 IP 地址](http://www.tecmint.com/wp-content/uploads/2015/04/Check-IP-Address.jpeg) + +现在用你的编辑器打开并编辑文件 /etc/sysconfig/network-scripts/ifcfg-enp0s3。这里,我使用 Vi 编辑器,另外你要确保你是 root 用户才能保存更改。 + + # vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 + +我们会编辑文件中的四个地方。注意下面的四个地方并保证不碰任何其它的东西。也保留双引号,在它们中间输入你的数据。 + + IPADDR = “[在这里输入你的静态 IP]” + GATEWAY = “[输入你的默认网关]” + DNS1 = “[你的域名系统 1]” + DNS2 = “[你的域名系统 2]” + +更改了 ‘ifcfg-enp0s3’ 之后,看起来像下面的图片。注意你的 IP,网关和 DNS 可能会变化,请和你的 ISP(译者注:互联网服务提供商商) 确认。保存并退出。 + +![网络详情](http://www.tecmint.com/wp-content/uploads/2015/04/Network-Details.jpeg) +网络详情 + +重启网络服务并检查 IP 是否和分配的一样。如果一切都顺利,用 Ping 查看网络状态。 + + # service network restart + +![重启网络服务](http://www.tecmint.com/wp-content/uploads/2015/04/Restarat-Network.jpeg) +重启网络服务 + +重启网络后,确认检查了 IP 地址和网络状态。 + + # ip addr show + # ping -c4 google.com + +![验证 IP 地址](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-IP-Address.jpeg) +验证 IP 地址 + +![检查网络状态](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Network-Status.jpeg) +检查网络状态 + +### 3. 设置服务器的主机名称 ### + +下一步是更改 CentOS 服务器的主机名称。查看当前分配的主机名称。 + + # echo $HOSTNAME + +![查看系统主机名称](http://www.tecmint.com/wp-content/uploads/2015/04/Check-System-Hostname.jpeg) +查看系统主机名称 + +要设置新的主机名称,我们需要编辑 ‘/etc/hostsname’ 文件并用想要的名称替换旧的主机名称。 + + # vi /etc/hostname + +![在 CentOS 中设置主机名称](http://www.tecmint.com/wp-content/uploads/2015/04/Set-System-Hostname.jpeg) +在 CentOS 中设置主机名称 + +设置完了主机名称之后,务必注销后重新登录确认主机名称。登录后检查新的主机名称。 + + $ echo $HOSTNAME + +![确认主机名称](http://www.tecmint.com/wp-content/uploads/2015/04/Confirm-Hostname.jpeg) +确认主机名称 + +你也可以用 ‘hostname’ 命令查看你当前的主机名。 + + $ hostname + +### 4. 更新或升级最小化安装的 CentOS ### + +除了更新和安装已经有的软件的最新版本以及安全升级,这不会安装任何新的软件。总的来说更新和升级是相同的,除了事实上 升级 = 更新 + 更新时进行废弃处理。 + + # yum update && yum upgrade + +![更新最小化安装的 CentOS 服务器](http://www.tecmint.com/wp-content/uploads/2015/04/Update-CentOS-Server.jpeg) +更新最小化安装的 CentOS 服务器 + +**重要**: 你也可以运行下面的命令,这不会弹出软件更新的提示,你也就不需要输入 ‘y’ 接受更改。 + +然而,查看服务器上会发生的变化总是一个好主意,尤其是在生产中。因此使用下面的命令虽然可以为你自动更新和升级,但并不推荐。 + + # yum -y update && yum -y upgrade + +### 5. 安装命令行 Web 浏览器 ### + +大部分情况下,尤其是在生产环境中,我们通常用没有 GUI 的命令行安装 CentOS,在这种情况下我们必须有一个能通过终端查看网站的命令行浏览工具。为了实现这个目的,我们打算安装名为 ‘links’ 的著名工具。 + + # yum install links + +![安装命令行浏览器](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Commandline-Browser.jpeg) +Links: 命令行 Web 浏览器 + +请查看我们的文章 [用 links 工具命令行浏览 Web][4] 了解用 links 工具浏览 web 的方法和例子。 + +### 6. 安装 Apache HTTP 服务器 ### + +不管你因为什么原因使用服务器,大部分情况下你都需要一个 HTTP 服务器运行网站、多媒体、用户端脚本和很多其它的东西。 + + # yum install httpd + +![在 CentOS 上安装 Apache](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-on-CentOS.jpeg.) +安装 Apache 服务器 + +如果你想更改 Apache HTTP 服务器的默认端口号(80)为其它端口,你需要编辑配置文件 ‘/etc/httpd/conf/httpd.conf’ 并查找以下面开始的行: + + LISTEN 80 + +把端口号 ‘80’ 改为其它任何端口(例如 3221),保存并退出。 + +![在 CentOS 上更改 Apache 端口](http://www.tecmint.com/wp-content/uploads/2015/04/Change-Apache-Port.jpeg) +更改 Apache 端口 + +增加刚才分配给 Apache 的端口通过防火墙,然后重新加载防火墙。 + +允许 http 服务通过防火墙(永久)。 + + # firewall-cmd –add-service=http + +允许 3221 号端口通过防火墙(永久)。 + + # firewall-cmd –permanent –add-port=3221/tcp + +重新加载防火墙。 + + # firewall-cmd –reload + +完成上面的所有事情之后,是时候重启 Apache HTTP 服务器了,然后新的端口号才能生效。 + + # systemctl restart httpd.service + +现在添加 Apache 服务到系统层使其随系统自动启动。 + + # systemctl start httpd.service + # systemctl enable httpd.service + +如下图所示,用 links 命令行工具 验证 Apache HTTP 服务器。 + + # links 127.0.0.1 + +![验证 Apache 状态](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Apache-Status.jpeg) +验证 Apache 状态 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/ + +作者:[Avishek Kumar][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/centos-7-installation/ +[2]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ +[3]:http://www.tecmint.com/enable-redhat-subscription-reposiories-and-updates-for-rhel-7/ +[4]:http://www.tecmint.com/command-line-web-browsers/ \ No newline at end of file From fa681323f5729ee188d39068749582fbbce87b6a Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Apr 2015 22:33:17 +0800 Subject: [PATCH 071/154] PUB:20150423 The Most Popular Programming Languages in to GitHub Since 2012 @ictlyh --- ...mming Languages in to GitHub Since 2012.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) rename {translated/talk => published}/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md (59%) diff --git a/translated/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md b/published/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md similarity index 59% rename from translated/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md rename to published/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md index dde2b6785a..b47b1c2ed5 100644 --- a/translated/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md +++ b/published/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md @@ -1,18 +1,17 @@ -从2012年以来GitHub上最流行的的编程语言 +GitHub 上最流行的编程语言 ================================================================================ ![](http://www.loggly.com/wp-content/uploads/2015/04/Infographic_Github_popular_languages_Blogheader.png) -编程语言不仅仅是开发者用来创建程序或表达算法的工具。它们也是编码和解码创造力的仪器。通过观察编程语言的历史,我们在追求为解决问题找到一个更好的方法,促进写作,构建好的产品以及重用他人的工作上得到一个独特的观点。 +编程语言不仅仅是开发者用来创建程序或表达算法的工具,它们也是对创造力进行编码和解码的仪器。通过观察编程语言的历史,我们在追求为解决问题找到一个更好的方法,促进协作,构建好的产品以及重用他人的工作上得到一个独特的观点。 -我们的客户中大概70%向我们的服务发送应用日志,因此Loggy有兴趣追踪哪种语言是最流行的以及哪种语言获得了开发人员的关注。 +我们有大约 70% 的客户向我们的服务发送应用日志,因此我们能追踪哪种语言是最流行的,以及哪种语言获得了开发人员的关注。 -基于从2012年以来的历史的[GitHub 归档][1]和[GitHut][2]数据,我们分析了GitHub上大部分开发者的动作并转化为你下面看到的信息图表。我们关注了: +基于从2012年以来的历史的[GitHub 归档][1]和[GitHut][2]数据,我们分析了GitHub上大部分开发者的动作并绘制成你下面看到的信息图表。我们主要关注: - -- 活跃库的数量,人们正在研究的项目的有用度量。 -- 每种语言总的推送数量以及每个库的平均推送次数。这些指标是由特定语言编写的项目的创新效率的指示器。 -- 每个库新的fork数和打开的问题数目,这也显示了积极使用性和创新性。 -- 每个库新的观察者,开发人员兴趣的指示器。 +- 活跃库的数量,这是反应了人们正在研究的项目的有用度量。 +- 每种语言总的推送数量以及每个库的平均推送次数。这些指标是由某种语言编写的项目的创新效率的指示器。 +- 每个库新的fork数和发现的问题数目,这也显示了活跃度和创新性。 +- 每个库新的观察者,这是开发人员兴趣的指示器。 ### 查看信息图表并告诉我们你的想法!在你的同龄人中是怎么选择你使用的语言的? ### @@ -24,7 +23,7 @@ via: https://www.loggly.com/blog/the-most-popular-programming-languages-in-to-gi 作者:[Justin Mares][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 139083f449fed97b0e18cf2019a0948253411b63 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Apr 2015 23:03:44 +0800 Subject: [PATCH 072/154] PUB:20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto @boredivan --- ... Security Using WPScan, Nmap, And Nikto.md | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) rename {translated/tech => published}/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md (89%) diff --git a/translated/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md b/published/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md similarity index 89% rename from translated/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md rename to published/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md index fbd5fcf924..77838086fe 100644 --- a/translated/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md +++ b/published/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md @@ -5,27 +5,28 @@ 数百万个网站用着 WordPress ,这当然是有原因的。WordPress 是众多内容管理系统中对开发者最友好的,本质上说你可以用它做任何事情。不幸的是,每天都有些吓人的报告说某个主要的网站被黑了,或者某个重要的数据库被泄露了之类的,吓得人一愣一愣的。 如果你还没有安装 WordPress ,可以看下下面的文章。 + 在基于 Debian 的系统上: -- [How to install WordPress On Ubuntu][1] +- [如何在 Ubuntu 上安装 WordPress][1] 在基于 RPM 的系统上: -- [How to install wordpress On CentOS][2] +- [如何在 CentOS 上安装 WordPress][2] -我之前的文章 [How To Secure WordPress Website][3] 里面列出的**备忘录**为读者维护 WordPress 的安全提供了一点帮助。 +我之前的文章 [ 如何安全加固 WordPress 站点][3] 里面列出的**备忘录**为读者维护 WordPress 的安全提供了一点帮助。 -在这篇文章里面,我将说明 **wpscan** 的安装过程,以及怎样使用 wpscan 来锁定任何已知的会让你的站点变得易受攻击的插件和主题。还有怎样安装和使用一款免费的网络探索和攻击的安全扫描软件 **nmap** 。最后展示的是使用 **nikto** 的步骤。 +在这篇文章里面,我将介绍 **wpscan** 的安装过程,以及怎样使用 wpscan 来定位那些已知的会让你的站点变得易受攻击的插件和主题。还有怎样安装和使用一款免费的网络探索和攻击的安全扫描软件 **nmap** 。最后展示的是使用 **nikto** 的步骤。 ### 用 WPScan 测试 WordPress 中易受攻击的插件和主题 ### **WPScan** 是一个 WordPress 黑盒安全扫描软件,用 Ruby 写成,它是专门用来寻找已知的 WordPress 的弱点的。它为安全专家和 WordPress 管理员提供了一条评估他们的 WordPress 站点的途径。它的基于开源代码,在 GPLv3 下发行。 -### 下载和安装 WPScan ### +#### 下载和安装 WPScan #### 在我们开始安装之前,很重要的一点是要注意 wpscan 不能在 Windows 下工作,所以你需要使用一台 Linux 或者 OS X 的机器来完成下面的事情。如果你只有 Windows 的系统,拿你可以下载一个 Virtualbox 然后在虚拟机里面安装任何你喜欢的 Linux 发行版本。 -WPScan 的源代码被放在 Github 上,所以需要先安装 git。 +WPScan 的源代码放在 Github 上,所以需要先安装 git(LCTT 译注:其实你也可以直接从 Github 上下载打包的源代码,而不必非得装 git )。 sudo apt-get install git @@ -44,7 +45,7 @@ git 装好了,我们就要安装 wpscan 的依赖包了。 现在 wpscan 装好了,我们就可以用它来搜索我们 WordPress 站点潜在的易受攻击的文件。wpcan 最重要的方面是它能列出不仅是插件和主题,也能列出用户和缩略图的功能。WPScan 也可以用来暴力破解 WordPress —— 但这不是本文要讨论的内容。 -#### 跟新 WPScan #### +#### 更新 WPScan #### ruby wpscan.rb --update @@ -95,7 +96,6 @@ git 装好了,我们就要安装 wpscan 的依赖包了。 列举主题和列举插件差不多,只要用"--enumerate t"就可以了。 - ruby wpscan.rb --url http(s)://www.host-name.com --enumerate t 或者只列出易受攻击的主题: @@ -135,7 +135,7 @@ WPscan 也可以用来列举某个 WordPress 站点的用户和有效的登录 #### 列举 Timthumb 文件 #### -关于 WPscan ,我要说的最后一个功能是列举 timthub 相关的文件。近年来,timthumb 已经成为攻击者眼里的一个普通的目标,因为无数的漏洞被找出来并发到论坛上、邮件列表等等地方。用下面的命令可以通过 wpscan 找出易受攻击的 timthub 文件: +关于 WPscan ,我要说的最后一个功能是列举 timthub (缩略图)相关的文件。近年来,timthumb 已经成为攻击者眼里的一个常见目标,因为无数的漏洞被找出来并发到论坛上、邮件列表等等地方。用下面的命令可以通过 wpscan 找出易受攻击的 timthub 文件: ruby wpscan.rb --url http(s)://www.host-name.com --enumerate tt @@ -143,11 +143,10 @@ WPscan 也可以用来列举某个 WordPress 站点的用户和有效的登录 **Nmap** 是一个开源的用于网络探索和安全审查方面的工具。它可以迅速扫描巨大的网络,也可一单机使用。Nmap 用原始 IP 数据包通过不同寻常的方法判断网络里那些主机是正在工作的,那些主机上都提供了什么服务(应用名称和版本),是什么操作系统(以及版本),用的什么类型的防火墙,以及很多其他特征。 -### 在 Debian 和 Ubuntu 上下载和安装 nmap ### +#### 在 Debian 和 Ubuntu 上下载和安装 nmap #### 要在基于 Debian 和 Ubuntu 的操作系统上安装 nmap ,运行下面的命令: - sudo apt-get install nmap **输出样例** @@ -168,7 +167,7 @@ WPscan 也可以用来列举某个 WordPress 站点的用户和有效的登录 Processing triggers for man-db ... Setting up nmap (5.21-1.1ubuntu1) ... -#### 打个例子 #### +#### 举个例子 #### 输出 nmap 的版本: @@ -182,7 +181,7 @@ WPscan 也可以用来列举某个 WordPress 站点的用户和有效的登录 Nmap version 5.21 ( http://nmap.org ) -### 在 Centos 上下载和安装 nmap ### +#### 在 Centos 上下载和安装 nmap #### 要在基于 RHEL 的 Linux 上面安装 nmap ,输入下面的命令: @@ -227,7 +226,7 @@ WPscan 也可以用来列举某个 WordPress 站点的用户和有效的登录 Complete! -#### 举个比方 #### +#### 举个例子 #### 输出 nmap 版本号: @@ -239,7 +238,7 @@ WPscan 也可以用来列举某个 WordPress 站点的用户和有效的登录 #### 用 Nmap 扫描端口 #### -你可以用 nmap 来获得很多关于你的服务器的信息,它让你站在对你的网站不怀好意的人的角度看你自己的网站。 +你可以用 nmap 来获得很多关于你的服务器的信息,它可以让你站在对你的网站不怀好意的人的角度看你自己的网站。 因此,请仅用它测试你自己的服务器或者在行动之前通知服务器的所有者。 @@ -277,7 +276,7 @@ nmap 的作者提供了一个测试服务器: sudo nmap -p port_number remote_host -扫描一个网络,找出那些服务器在线,分别运行了什么服务 +扫描一个网络,找出哪些服务器在线,分别运行了什么服务。 这就是传说中的主机探索或者 ping 扫描: @@ -294,19 +293,19 @@ nmap 的作者提供了一个测试服务器: MAC Address: 00:11:32:11:15:FC (Synology Incorporated) Nmap done: 256 IP addresses (4 hosts up) scanned in 2.80 second -理解端口配置和如何发现你的服务器上的攻击的载体只是确保你的信息和你的 VPS 安全的第一步。 +理解端口配置和如何发现你的服务器上的攻击目标只是确保你的信息和你的 VPS 安全的第一步。 ### 用 Nikto 扫描你网站的缺陷 ### -[Nikto][4] 网络扫描器是一个开源的 web 服务器的扫描软件,它可以用来扫描 web 服务器上的恶意的程序和文件。Nikto 也可一用来检查软件版本是否过期。Nikto 能进行简单而快速地扫描以发现服务器上危险的文件和程序。扫描结束后会给出一个日志文件。` +[Nikto][4] 网络扫描器是一个开源的 web 服务器的扫描软件,它可以用来扫描 web 服务器上的恶意的程序和文件。Nikto 也可以用来检查软件版本是否过期。Nikto 能进行简单而快速地扫描以发现服务器上危险的文件和程序。扫描结束后会给出一个日志文件。` -### 在 Linux 服务器上下载和安装 Nikto ### +#### 在 Linux 服务器上下载和安装 Nikto #### Perl 在 Linux 上是预先安装好的,所以你只需要从[项目页面][5]下载 nikto ,解压到一个目录里面,然后开始测试。 wget https://cirt.net/nikto/nikto-2.1.4.tar.gz -你可以用某个归档管理工具或者用下面这个命令,同时使用 tar 和 gzip 。 +你可以用某个归档管理工具解包,或者如下同时使用 tar 和 gzip : tar zxvf nikto-2.1.4.tar.gz cd nikto-2.1.4 @@ -369,7 +368,7 @@ Perl 在 Linux 上是预先安装好的,所以你只需要从[项目页面][5] **输出样例** -会有十分冗长的输出,可能一开始会让人感到困惑。许多 Nikto 的警报会返回 OSVDB 序号。这是开源缺陷数据库([http://osvdb.org/][6])的意思。你可以在 OSVDB 上找出相关缺陷的深入说明。 +会有十分冗长的输出,可能一开始会让人感到困惑。许多 Nikto 的警报会返回 OSVDB 序号。这是由开源缺陷数据库([http://osvdb.org/][6])所指定。你可以在 OSVDB 上找出相关缺陷的深入说明。 $ nikto -h http://www.host-name.com - Nikto v2.1.4 @@ -402,7 +401,7 @@ Perl 在 Linux 上是预先安装好的,所以你只需要从[项目页面][5] **Nikto** 是一个非常轻量级的通用工具。因为 Nikto 是用 Perl 写的,所以它可以在几乎任何服务器的操作系统上运行。 -希望这篇文章能在你找你的 wordpress 站点的缺陷的时候给你一些提示。我之前的文章[怎样保护 WordPress 站点][7]记录了一个**清单**,可以让你保护你的 WordPress 站点的工作变得更简单。 +希望这篇文章能在你检查 wordpress 站点的缺陷的时候给你一些提示。我之前的文章[如何安全加固 WordPress 站点][7]记录了一个**清单**,可以让你保护你的 WordPress 站点的工作变得更简单。 有想说的,留下你的评论。 @@ -412,7 +411,7 @@ via: http://www.unixmen.com/scan-check-wordpress-website-security-using-wpscan-n 作者:[anismaj][a] 译者:[boredivan](https://github.com/boredivan) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 30bc1fb44b90ea81a684948c90245a9bc94e3b59 Mon Sep 17 00:00:00 2001 From: Mo Date: Sat, 25 Apr 2015 23:31:18 +0800 Subject: [PATCH 073/154] [translated]The history of Android - 13 --- .../13 - The history of Android.md | 104 ------------------ .../13 - The history of Android.md | 104 ++++++++++++++++++ 2 files changed, 104 insertions(+), 104 deletions(-) delete mode 100644 sources/talk/The history of Android/13 - The history of Android.md create mode 100644 translated/talk/The history of Android/13 - The history of Android.md diff --git a/sources/talk/The history of Android/13 - The history of Android.md b/sources/talk/The history of Android/13 - The history of Android.md deleted file mode 100644 index 31f5cd7eb4..0000000000 --- a/sources/talk/The history of Android/13 - The history of Android.md +++ /dev/null @@ -1,104 +0,0 @@ -【translating】The history of Android -================================================================================ -![](http://cdn.arstechnica.net/wp-content/uploads/2014/03/ready-fight.png) - -### Android 2.1, update 1—the start of an endless war ### - -Google was a major launch partner for the first iPhone—the company provided Google Maps, Search, and YouTube for Apple’s mobile operating system. At the time, Google CEO Eric Schmidt was a member of Apple’s board of directors. In fact, during the original iPhone presentation, [Schmidt was the first person on stage][] after Steve Jobs, and he joked that the two companies were so close they could merge into “AppleGoo." - -While Google was developing Android, the relationship between the two companies slowly became contentious. Still, Google largely kept Apple happy by keeping key iPhone features, like pinch zoom, out of Android. The Nexus One, though, was the first slate-style Android flagship without a keyboard, which gave the device the same form factor as the iPhone. Combined with the newer software and Google branding, this was the last straw for Apple. According to Walter Isaacson’s biography on Steve Jobs, after seeing the Nexus One in January 2010, the Apple CEO was furious, saying "I will spend my last dying breath if I need to, and I will spend every penny of Apple's $40 billion in the bank, to right this wrong... I'm going to destroy Android, because it's a stolen product. I'm willing to go thermonuclear war on this." - -All of this happened behind closed doors, only coming out years after the Nexus One was released. The public first caught wind of this growing rift between Google and Apple when, a month after the release of Android 2.1, an update shipped for the Nexus One called “[2.1 update 1.][2]" The updated added one feature, something iOS long held over the head of Android: pinch-zoom. - -While Android supported multi-touch APIs since version 2.0, the default operating system apps stayed clear of this useful feature at the behest of Jobs. After reconciliation meetings over the Nexus One failed, there was no longer a reason to keep pinch zoom out of Android. Google pushed all their chips into the middle of the table, hit the update button, and was finally “all-in" with Android. - -With pinch zoom enabled in Google Maps, the Browser, and the Gallery, the Google-Apple smartphone war was on. In the coming years, the two companies would become bitter enemies. A month after the pinch zoom update, Apple went on the warpath, suing everyone and everything that used Android. HTC, Motorola, and Samsung were all brought to court, and some of them are still in court. Schmidt resigned from Apple’s board of directors. Google Maps and YouTube were kicked off of the iPhone, and Apple even started a rival mapping service. Today, the two players that were almost "AppleGoo" compete in smartphones, tablets, laptops, movies, TV shows, music, books, apps, e-mail, productivity software, browsers, personal assistants, cloud storage, mobile advertising, instant messaging, mapping, and set-top-boxes... and soon the two will be competing in car computers, wearables, mobile payments, and living room gaming. - -### Android 2.2 Froyo—faster and Flash-ier ### - -[Android 2.2][3] came out four months after the release of 2.1, in May 2010. Froyo featured major under-the-hood improvements for Android, all made in the name of speed. The biggest addition was just-in-time (JIT) compilation. JIT automatically converted java bytecode into native code at runtime, which led to drastic performance improvements across the board. - -The Browser got a performance boost, too, thanks to the integration of the V8 javascript engine from Chrome. This was the first of many features the Android browser would borrow from Chrome, and eventually the stock browser would be completely replaced by a mobile version of Chrome. Until that day came, though, the Android team needed to ship a browser. Pulling in Chrome parts was an easy way to upgrade. - -While Google was focusing on making its platform faster, Apple was making its platform bigger. Google's rival released the 10-inch iPad a month earlier, ushering in the modern era of tablets. While some large Froyo and Gingerbread tablets were released, Google's official response—Android 3.0 Honeycomb and the Motorola Xoom—would not arrive for nine months. - -![Froyo added a two-icon dock at the bottom and universal search.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/22-2.png) -Froyo added a two-icon dock at the bottom and universal search. -Photo by Ron Amadeo - -The biggest change on the Froyo homescreen was the new dock at the bottom, which filled the previously empty space to the left and right of the app drawer with phone and browser icons. Both of these icons were custom-designed white versions of the stock icons, and they were not user-configurable. - -The default layout removed all the icons, and it only stuck the new tips widget on the screen, which directed you to click on the launcher icon to access your apps. The Google Search widget gained a Google logo which doubled as a button. Tapping it would open the search interface and allow you to restrict a search by Web, apps, or contacts. - -![The downloads page showing the “update all" button, the Flash app, a flash-powered site where anything is possible, and the “move to SD" button. ](http://cdn.arstechnica.net/wp-content/uploads/2014/03/small-market-2.jpg) -The downloads page showing the “update all" button, the Flash app, a flash-powered site where anything is possible, and the “move to SD" button. -Photo by [Ryan Paul][4] - -Some of the best additions to Froyo were more download controls for the Android Market. There was now an “Update all" button pinned to the bottom of the Downloads page. Google also added an automatic updating feature, which would automatically install apps as long as the permissions hadn't changed; automatic updating was off by default, though. - -The second picture shows Adobe Flash Player, which was exclusive to Froyo. The app plugged in to the browser and allowed for a “full Web" experience. In 2010, this meant pages heavy with Flash navigation and video. Flash was one of Android's big differentiators compared to the iPhone. Steve Jobs started a holy war against Flash, declaring it an obsolete, buggy piece of software, and Apple would not allow it on iOS. So Android picked up the Flash ball and ran with it, giving users the option of having a semi-workable implementation on Android. - -At the time, Flash could bring even a desktop computer to its knees, so keeping it on all the time on a mobile phone delivered terrible performance. To fix this, Flash on Android's browser could be set to "on-demand"—Flash content would not load until users clicked on the Flash placeholder icon. Flash support would last on Android until 4.1, when Adobe gave up and killed the project. Ultimately Flash never really worked well on Android. The lack of Flash on the iPhone, the most popular mobile device, pushed the Internet to eventually dump the platform. - -The last picture shows the newly added ability to move apps to the SD card, which, in an era when phones came with 512MB of internal storage, was sorely needed. - -![The car app and camera app. The camera could now rotate.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/22carcam-2.png) -The car app and camera app. The camera could now rotate. -Photo by Ron Amadeo - -The camera app was finally updated to support portrait mode. The camera settings were moved out of the drawer and into a semi-transparent strip of buttons next to the shutter button and other controls. This new design seemed to take a lot of inspiration from the Cooliris Gallery app, with transparent, springy speech bubble popups. It was quite strange to see the high-tech Cooliris-style UI design grafted on to the leather-bound camera app—the aesthetics didn't match at all. - -![The semi-broken Facebook app is a good example of the common 2x3 navigation page. Google Goggles was included but also broken.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/facebook.png) -The semi-broken Facebook app is a good example of the common 2x3 navigation page. Google Goggles was included but also broken. -Photo by Ron Amadeo - -Unlike the Facebook client included in Android 2.0 and 2.1, the 2.2 version still sort of works and can sign in to Facebook's servers. The Facebook app is a good example of Google's design guidelines for apps at the time, which suggested having a navigational page consisting of a 3x2 grid of icons as the main page of an app. - -This was Google's first standardized attempt at getting navigational elements out of the menu button and onto the screen, where users could find them. This design was usable, but it added an extra roadblock between launching an app and using an app. Google would later realize that when users launch an app, it was a better idea to show them content instead of an interstitial navigational screen. In Facebook for instance, opening to the news feed would be much more appropriate. And later app designs would relegate navigation to a second-tier location—first as tabs at the top of the screen, and later Google would settle on the "Navigation Drawer," a slide-out panel containing all the locations in an app. - -Also packed in with Froyo was Google Goggles, a visual search app which would try to identify the subject of a picture. It was useful for identifying works of art, landmarks, and barcodes, but not much else. These first two setup screens, along with the camera interface, are all that work in the app anymore. Today, you can't actually complete a search with a client this old. There wasn't much to see anyway; it was a camera interface that returned a search results page. - -![The Twitter app, which was an animation-filled collaboration between Google and Twitter.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/twitters-2.png) -The Twitter app, which was an animation-filled collaboration between Google and Twitter. -Photo by Ron Amadeo - -Froyo included the first Android Twitter app, which was actually a collaboration between Google and Twitter. At the time, a Twitter app was one of the big holes in Android's app lineup. Developers favored the iPhone, and with Apple's head start and stringent design requirements, the App Store's app selection was far superior to Android's. But Google needed a Twitter app, so it teamed up with the company to get the first version out the door. - -This represented Google's newer design language, which meant it had an interstitial navigation page and a "tech-demo" approach to animations. The Twitter app was even more heavy-handed with animation effects than the Cooliris Gallery—everything moved all the time. The clouds at the top and bottom of every page continually scrolled at varying speeds, and the Twitter bird at the bottom flapped its wings and moved its head left and right. - -The Twitter app actually featured an early precursor to the Action Bar, a persistent strip of top-aligned controls that was introduced in Android 3.0 . Along the top of every screen was a blue bar containing the Twitter logo and buttons like search, refresh, and compose tweet. The big difference between this and the later action bars was that the Twitter/Google design lacks an "Up" button in the top right corner, and it actually uses an entire second bar to show your current location within the app. In the second picture above, you can see a whole bar dedicated to the location label "Tweets" (and, of course, the continuously scrolling clouds). The Twitter logo in the second bar acted as another navigational element, sometimes showing additional drill down areas within the current section and sometimes showing the entire top-level shortcut group. - -The 2.3 Tweet stream didn't look much different from what it does today, save for the hidden action buttons (reply, retweet, etc), which were all under the right-aligned arrow buttons. They popped up in a speech bubble menu that looked just like the navigational popup. The faux-action bar was doing serious work on the create tweet page. It housed the twitter logo, remaining character count, and buttons to attach a picture, take a picture, and a contact mention button. - -The Twitter app even came with a pair of home screen widgets. The big one took up eight slots and gave you a compose bar, update button, one tweet, and left and right arrows to view more tweets. The little one showed a tweet and reply button. Tapping on the compose bar on the large widget immediately launched the main "Create Tweet," rendering the "update" button worthless. - -![Google Talk and the new USB dialog.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/talkusb.png) -Google Talk and the new USB dialog. -Photo by Ron Amadeo - -Elsewhere, Google Talk (and the unpictured SMS app) changed from a dark theme to a light theme, which made both of them look a lot closer to the current, modern apps. The USB storage screen that popped up when you plugged into a computer changed from a simple dialog box to a full screen interface. Instead of a text-only design, the screen now had a mutant Android/USB-stick hybrid. - -While Android 2.2 didn’t feature much in the way of user-facing features, a major UI overhaul was coming in the next two versions. Before all the UI work, though, Google wanted to revamp the core of Android. Android 2.2 accomplished that. - ----------- - -![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) - -[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. - -[@RonAmadeo][t] - --------------------------------------------------------------------------------- - -via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/13/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.youtube.com/watch?v=9hUIxyE2Ns8#t=3016 -[2]:http://arstechnica.com/gadgets/2010/02/googles-nexus-one-gets-multitouch/ -[3]:http://arstechnica.com/information-technology/2010/07/android-22-froyo/ -[4]:http://arstechnica.com/information-technology/2010/07/android-22-froyo/ -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo diff --git a/translated/talk/The history of Android/13 - The history of Android.md b/translated/talk/The history of Android/13 - The history of Android.md new file mode 100644 index 0000000000..8929f55064 --- /dev/null +++ b/translated/talk/The history of Android/13 - The history of Android.md @@ -0,0 +1,104 @@ +安卓编年史 +================================================================================ +![](http://cdn.arstechnica.net/wp-content/uploads/2014/03/ready-fight.png) + +### Android 2.1, update 1——无尽战争的开端 ### + +谷歌是第一代iPhone的主要合作伙伴——公司为苹果的移动操作系统提供了谷歌地图,搜索,以及Youtube。在那时,谷歌CEO埃里克·施密特是苹果的董事会成员之一。实际上,在最初的苹果发布会上,施密特是在史蒂夫·乔布斯[之后第一个登台的人][1],他还开玩笑说两家公司如此接近,都可以合并成“AppleGoo”了。 + +当谷歌开发安卓的时候,两家公司间的关系慢慢变得充满争吵。然而,谷歌很大程度上还是通过拒iPhone关键特性于安卓门外,如双指缩放,来取悦苹果。尽管如此,Nexus One是第一部不带键盘的直板安卓旗舰机,设备被赋予了和iPhone相同的外观因素。Nexus One结合了新软件和谷歌的品牌,这是压倒苹果的最后一根稻草。根据沃尔特·艾萨克森为史蒂夫·乔布斯写的传记,2010年1月在看到了Nexus One之后,这个苹果的CEO震怒了,说道:“如果需要的话我会用尽最后一口气,以及花光苹果在银行里的400亿美元,来纠正这个错误……我要摧毁安卓,因为它完全是偷窃来的产品。我愿意为此进行核战争。” + +所有的这些都在秘密地发生,仅在Nexus One发布后的几年后才公诸于众。公众们最早在安卓2.1——推送给Nexus One的一个称作“[2.1 update 1][2]”的更新,发布后一个月左右捕捉到谷歌和苹果间愈演愈烈的分歧气息。这个更新添加了一个功能,正是iOS一直居于安卓之上的功能:双指缩放。 + +尽管安卓从2.0版本开始就支持多点触控API了,默认的系统应用在乔布斯的命令下依然和这项实用的功能划清界限。在关于Nexus One的和解会议谈崩了之后,谷歌再也没有理由拒双指缩放于安卓门外了。谷歌给设备推送了更新,安卓终于补上了不足之处。 + +随着谷歌地图,浏览器以及相册中双指缩放的全面启用,谷歌和苹果的智能手机战争也就此拉开序幕。在接下来的几年中,两家公司会变成死敌。双指缩放更新的一个月后,苹果开始了他的征途,起诉了所有使用安卓的公司。HTC,摩托罗拉以及三星都被告上法庭,直到现在都还有一些诉讼还没解决。施密特辞去了苹果董事会的职务。谷歌地图和Youtube被从iPhone中移除,苹果甚至开始打造自己的地图服务。今天,这两位选手几乎是“AppleGoo”竞赛的唯一选手,涉及领域十分广:智能手机,平板,笔记本,电影,TV秀,音乐,书籍,应用,邮件,生产力工具,浏览器,个人助理,云存储,移动广告,即时通讯,地图以及机顶盒……以及不久他们将会在汽车智能,穿戴设备,移动支付,以及客厅娱乐等进行竞争。 + +### Android 2.2 Froyo——更快更华丽 ### + +[安卓2.2][3]在2010年5月,也就是2.1发布后的四个月后亮相。Froyo(冻酸奶)的亮点主要是底层优化,只为更快的速度。Froyo最大的改变是增加了JIT编译。JIT自动在运行时将java字节码转换为原生码,这会给系统全面带来显著的性能改善。 + +浏览器同样得到了性能改善,这要感谢来自Chrome的V8 Javascript引擎的整合。这是安卓浏览器从Chrome借鉴的许多特性中的第一个,最终系统内置的浏览器会被移动版Chrome彻底替代掉。在那之前,安卓团队还是需要发布一个浏览器。从Chrome借鉴特性是条升级的捷径。 + +在谷歌专注于让它的平台更快的同时,苹果正在让它的平台更全面。谷歌的竞争对手在一个月前发布了10英寸的iPad,先行进入了平板时代。尽管有些搭载Froyo和Gingerbread的安卓平板发布,谷歌的官方回应——安卓3.0 Honeycomb(蜂巢)以及摩托罗拉Xoom——在9个月后才来到。 + +![Froyo底部添加了双图标停靠栏以及全局搜索。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/22-2.png) +Froyo底部添加了双图标停靠栏以及全局搜索。 +Ron Amadeo供图 + +Froyo主屏幕最大的变化是底部的新停靠栏,电话和浏览器图标填充了先前抽屉按钮左右的空白空间。这些新图标都是现有图标的定制白色版本,并且用户没办法自己设置图标。 + +默认布局移除了所有图标,屏幕上只留下一个使用提示小部件,引导你点击启动器图标以访问你的应用。谷歌搜索小部件得到了一个谷歌logo,同时也是个按钮。点击它可以打开一个搜索界面,你可以限制搜索范围在互联网,应用或是联系人之内。 + +![下载页面有了“更新所有”按钮,Flash应用,一个flash驱动的一切皆有可能的网站,以及“移动到SD”按钮。 ](http://cdn.arstechnica.net/wp-content/uploads/2014/03/small-market-2.jpg) +下载页面有了“更新所有”按钮,Flash应用,一个flash驱动的一切皆有可能的网站,以及“移动到SD”按钮。 +[Ryan Paul][4]供图 + +还有一些优秀的新功能加入了Froyo,安卓市场加入了更多的下载控制。有个新的“更新所有”按钮固定在了下载页面底部。谷歌还添加了自动更新特性,只要应用权限没有改变就能够自动安装应用;尽管如此,自动更新默认是关闭的。 + +第二张图展示了Adobe Flash播放器,它是Froyo独占的。这个应用作为插件加入了浏览器,让浏览器能够有“完整的网络”体验。在2010年,这意味着网页充满了Flash导航和视频。Flash是安卓相比于iPhone最大的不同之一。史蒂夫·乔布斯展开了一场对抗Flash的圣战,声称它是一个被淘汰的,充满bug的软件,并且苹果不会在iOS上允许它的存在。所以安卓接纳了Flash并且让它在安卓上运行,给予用户在安卓上拥有半可用的flash实现。 + +在那时,Flash甚至能够让桌面电脑崩溃,所以在移动设备上一直保持打开状态会带来可怕的体验。为了解决这个问题,安卓浏览器上的Flash可以设置为“按需打开”——除非用户点击Flash占位图标,否则不会加载Flash内容。对Flash的支持将会持续到安卓4.1,Adobe在那时放弃并且结束了这个项目。Flash归根到底从未在安卓上完美运行过。而Flash在iPhone这个最流行的移动设备上的缺失,推动了互联网最终放弃了这个平台。 + +最后一张图片显示的是新增的移动应用到SD卡功能,在那个手机只有512MB内置存储的时代,这个功能十分的必要的。 + +![驾驶模式应用。相机现在可以旋转了。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/22carcam-2.png) +驾驶模式应用。相机现在可以旋转了。 +Ron Amadeo供图 + +相机应用终于更新支持纵向模式了。相机设置被从抽屉中移出,变成一条半透明的按钮带,放在了快门按钮和其他控制键旁边。这个新设计看起来从Cooliris相册中获得了许多灵感,有着半透明,有弹性的聊天气泡弹出窗口。看到更现代的Cooliris风格UI设计被嫁接到皮革装饰的相机应用确实十分奇怪——从审美上来说一点都不搭。 + +![半残缺的Facebook应用是个常见的2x3导航页面的优秀范例。谷歌Goggles被包含了进来但同样是残缺的。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/facebook.png) +半残缺的Facebook应用是个常见的2x3导航页面的优秀范例。谷歌Goggles被包含了进来但同样是残缺的。 +Ron Amadeo供图 + +不像在安卓2.0和2.1中包含的Facebook客户端,2.2版本的仍然部分能够工作并且登陆Facebook服务器。Facebook应用是个谷歌那时候设计指南的优秀范例,它建议应用拥有一个含有3x2图标方阵的导航页并作为应用主页。 + +这是谷歌的第一个标准化尝试,将导航元素从菜单按钮里移到屏幕上,因为用户找不到它们。这个设计很实用,但它在打开应用和使用应用之间增加了额外的障碍。谷歌不久后湖意识到当用户打开一个应用,显示应用内容而不是中间导航页是个更好的主意。以Facebook为例,打开应用直接打开信息订阅会更合适。并且不久后应用设计将会把导航降级到二层位置——先是作为顶部的标签之一,后来谷歌放在了“导航抽屉”,一个含有应用所有功能位置的滑出式面板。 + +还有个预装到Froyo的是谷歌Goggles,一个视觉搜索应用,它会尝试辨别图片上的主体。它在辨别艺术品,地标以及条形码时很实用,但差不多也就这些了。最先的两个设置屏幕,以及相机界面,这是应用里唯一现在还能运行的了。由于客户端太旧了,实际上你如今并不能完成一个搜索。应用里也没什么太多可看的,也就一个会返回搜索结果页的相机界面而已。 + +![Twitter应用,一个充满动画的谷歌和Twitter的合作成果。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/twitters-2.png) +Twitter应用,一个充满动画的谷歌和Twitter的合作成果。 +Ron Amadeo供图 + +Froyo拥有第一个安卓Twitter应用,实际上它是谷歌和Twitter的合作成果。那时,一个Twitter应用是安卓应用阵容里的大缺憾。开发者们更偏爱iPhone,加上苹果占领先机和严格的设计要求,App Store里可选择的应用远比安卓的有优势。但是谷歌需要一个Twitter应用,所以它和Twitter合作组建团队让第一个版本问世。 + +这个应用代表了谷歌的新设计语言,这以为着它有个中间导航页以及对动画要求的“技术演示”。Twitter应用甚至比Cooliris相册用的动画效果还多——所有东西一直都在动。所有页面顶部和底部的云朵以不同速度持续滚动,底部的Twitter小鸟拍动它的翅膀并且左右移动它的头。 + +Twitter应用实际上有点Action Bar早期前身的特性,一条顶部对齐的连续控制条在安卓3.0中被引入。沿着所有屏幕的顶部有条拥有Twitter标志和像搜索,刷新和新tweet这样的按钮的蓝色横栏。它和后来的Action Bar之间大的区别在于Twitter/谷歌这里的设计的右上角缺少“上一级”按钮,实际上它在应用里用了完整的第二个栏位显示你当前所在位置。在上面的第二张图里,你可以看到整条带有“Tweets”标签的专用于显示位置的栏(当然,还有持续滚动的云朵)。第二个栏的Twitter标志扮演着另一个导航元素,有时候在当前部分显示额外的下拉区域,有时候显示整个顶级快捷方式集合。 + +2.3Tweet流看起来和今天的并没有什么不同,除了隐藏的操作按钮(回复,转推等),都在右对齐的箭头按钮里。它们弹出来是一个聊天气泡菜单,看起来就像导航弹窗。仿action bar在新tweet页面有重要作用。它安置着twitter标志,剩余字数统计,以及添加照片,拍照,以及提到联系人按钮。 + +Twitter应用甚至还有一对主屏幕小部件,大号的那个占据8格,给你新建栏,更新按钮,一条tweet,以及左右箭头来查看更多tweet。小号的显示一条tweet以及回复按钮。点击大号小部件的新建栏立即打开了“新Tweet”主窗口,这让“更新”按钮变得没有价值。 + +![Google Talk和新USB对话框。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/talkusb.png) +Google Talk和新USB对话框。 +Ron Amadeo供图 + +其他部分,Google Talk(以及没有截图的短信应用)从暗色主题变成了浅色主题,这让它们看起来和现在的更接近现在的,更现代的应用。USB存储界面会在你设备接入电脑的时候从一个简单的对话框进入全屏界面。这个界面现在有个一个异形安卓机器人/USB闪存盘混合体,而不是之前的纯文字设计。 + +尽管安卓2.2在用户互动方式上没有什么新特性,但大的UI调整会在下两个版本到来。然而在所有的UI工作之前,谷歌希望先改进安卓的核心部分。 + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron是Ars Technica的评论编缉,专注于安卓系统和谷歌产品。他总是在追寻新鲜事物,还喜欢拆解事物看看它们到底是怎么运作的。 + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/13/ + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.youtube.com/watch?v=9hUIxyE2Ns8#t=3016 +[2]:http://arstechnica.com/gadgets/2010/02/googles-nexus-one-gets-multitouch/ +[3]:http://arstechnica.com/information-technology/2010/07/android-22-froyo/ +[4]:http://arstechnica.com/information-technology/2010/07/android-22-froyo/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo From 7cc96b247e2e9614716a465a6bd6622e9c208af5 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 26 Apr 2015 10:33:00 +0800 Subject: [PATCH 074/154] [Translated] tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2 --- ...inimal RHEL or CentOS 7 Installation--2.md | 145 ------------------ ...inimal RHEL or CentOS 7 Installation--2.md | 143 +++++++++++++++++ 2 files changed, 143 insertions(+), 145 deletions(-) delete mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md create mode 100644 translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md deleted file mode 100644 index a196cd1f1f..0000000000 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md +++ /dev/null @@ -1,145 +0,0 @@ -Translating by ictlyh -30 Things to Do After Minimal RHEL/CentOS 7 Installation--2 -================================================================================ -### 7. Install PHP ### - -PHP is a server-side scripting language for web based services. It is frequently used as general-purpose programming language as well. Install PHP on CentOS Minimal Server as. - - # yum install php - -After installing php, make sure to restart Apache service to render PHP in Web Browser. - - # systemctl restart httpd.service - -Next, verify PHP by creating following php script in the Apache document root directory. - - # echo -e "" > /var/ww/html/phpinfo.php - -Now view the PHP file, we just created (phpinfo.php) in Linux Command Line as below. - - # php /var/www/html/phpinfo.php - OR - # links http://127.0.0.1/phpinfo.php - -![Verify PHP](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-PHP.jpeg) -Verify PHP - -### 8. Install MariaDB Database ### - -MariaDB is a fork of MySQL. RedHat Enterprise Linux and its derivatives have shifted to MariaDB from MySQL. It is the Primary Database management System. It is again one of those tools which is necessary to have and you will need it sooner or later no matter what kind of server you are setting. Install MariaDB on CentOS Minimal Install server as below. - - # yum install mariadb-server mariadb - -![Install MariaDB Database](http://www.tecmint.com/wp-content/uploads/2015/04/Install-MariaDB-Database.jpeg) -Install MariaDB Database - -Start and configure MariaDB to start automatically at boot. - - # systemctl start mariadb.service - # systemctl enable mariadb.service - -Allow service mysql (mariadb) through firewall. - - # firewall-cmd –add-service=mysql - -Now it’s time to secure MariaDB server. - - # /usr/bin/mysql_secure_installation - -![Secure MariaDB Database](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-MariaDB.jpeg) -Secure MariaDB Database - -Read Also: - -- [Installing LAMP (Linux, Apache, MariaDB, PHP/PhpMyAdmin) in CentOS 7.0][1] -- [Creating Apache Virtual Hosts in CentOS 7.0][2] - -### 9. Install and Configure SSH Server ### - -SSH stands for Secure Shell which is the default protocol in Linux for remote management. SSH is one of those essential piece of software which comes default with CentOS Minimal Server. - -Check Currently Installed SSH version. - - # SSH -V - -![Check SSH Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SSH-Version.jpeg) -Check SSH Version - -Use Secure Protocol over the default SSH Protocol and change port number also for extra Security. Edit the SSH configuration file ‘/etc/ssh/ssh_config‘. - -Uncomment the line below line or delete 1 from the Protocol string, so the line seems like: - - # Protocol 2,1 (Original) - Protocol 2 (Now) - -This change force SSH to use Protocol 2 which is considered to be more secure than Protocol 1 and also make sure to change the port number 22 to any in the configuration. - -![Secure SSH Login](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-SSH.jpeg) -Secure SSH Login - -Disable SSH ‘root login‘ and allow to connect to root only after login to normal user account for added additional Security. For this, open and edit configuration file ‘/etc/ssh/sshd_config‘ and change PermitRootLogin yes t PermitRootLogin no. - - # PermitRootLogin yes (Original) - PermitRootLogin no (Now) - -![Disable SSH Root Login](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-SSH-Root-Login.jpeg) -Disable SSH Root Login - -Finally, restart SSH service to reflect new changes.. - - # systemctl restart sshd.service - -Read Also: - -- [5 Best Practices to Secure and Protect SSH Server][3] -- [SSH Passwordless Login Using SSH Keygen in 5 Easy Steps][4] -- [No Password SSH Keys Authentication” with PuTTY][5] - -### 10. Install GCC (GNU Compiler Collection) ### - -GCC stands for GNU Compiler Collection is a compiler system developed by GNU Project that support various programming languages. It is not installed by default in CentOS Minimal Install. To install gcc compiler run the below command. - - # yum install gcc - -![Install GCC in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-GCC-in-CentOS.jpeg) -Install GCC GNU Compiler - -Check the version of installed gcc. - - # gcc --version - -![Check GCC Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-GCC-Version.jpeg) -Check GCC Version - -### 11. Install Java ### - -Java is a general purpose class based, object-oriented Programming language. It is not installed by default in CentOS Minimal Server. Install Java from repository as below. - - # yum install java - -![Install Java on CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-java.jpeg) -Install Java - -Check version of Java Installed. - - # java -version - -![Check Java Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Java-Version.jpeg) -Check Java Version - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/2/ - -作者:[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://www.tecmint.com/install-lamp-in-centos-7/ -[2]:http://www.tecmint.com/apache-virtual-hosting-in-centos/ -[3]:http://www.tecmint.com/5-best-practices-to-secure-and-protect-ssh-server/ -[4]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ -[5]:http://www.tecmint.com/ssh-passwordless-login-with-putty/ \ No newline at end of file diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md new file mode 100644 index 0000000000..c5e0f29857 --- /dev/null +++ b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md @@ -0,0 +1,143 @@ +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--2 +================================================================================ +### 7. 安装 PHP ### + +PHP 是用于 web 基础服务的服务器端脚本语言。它也经常被用作通用编程语言。在最小化安装的 CentOS 中安装 PHP。 + + # yum install php + +安装完 php 之后,确认重启 Apache 服务以便在 Web 浏览器中渲染 PHP。 + + # systemctl restart httpd.service + +下一步,通过在 Apache 文档根目录下创建下面的 php 脚本验证 PHP。 + + # echo -e "" > /var/ww/html/phpinfo.php + +现在在 Linux 命令行中查看我们刚才创建的 PHP 文件(phpinfo.php)。 + + # php /var/www/html/phpinfo.php + 或者 + # links http://127.0.0.1/phpinfo.php + +![验证 PHP](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-PHP.jpeg) +验证 PHP + +### 8. 安装 MariaDB 数据库 ### + +MariaDB 是 MySQL 的一个分支。红帽企业版 Linux 以及它的衍生版已经从 MySQL 迁移到 MariaDB。这是个主要的数据库管理系统。这又是一个你必须拥有的工具,不管你在配置怎样的服务器,或迟或早你都会需要它。在最小化安装的 CentOS 上安装 MariaDB,如下所示。 + + # yum install mariadb-server mariadb + +![安装 MariaDB 数据库](http://www.tecmint.com/wp-content/uploads/2015/04/Install-MariaDB-Database.jpeg) +安装 MariaDB 数据库 + +启动被配置 MariaDBs 随机启动。 + + # systemctl start mariadb.service + # systemctl enable mariadb.service + +允许 mysql(mariadb) 服务通过防火墙 + + # firewall-cmd –add-service=mysql + +现在是时候确保 MariaDB 服务器安全了。 + + # /usr/bin/mysql_secure_installation + +![保护 MariaDB 数据库](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-MariaDB.jpeg) +保护 MariaDB 数据库 + +请阅读: + +- [在 CentOS 7.0 上安装 LAMP (Linux, Apache, MariaDB, PHP/PhpMyAdmin)][1] +- [在 CentOS 7.0 上创建 Apache 虚拟主机][2] + +### 9. 安装和配置 SSH 服务器 ### + +SSH 表示 Secure Shell,是 Linux 远程管理的默认协议。 SSH 是随最小化 CentOS 服务器一起发布的最重要的软件之一。 + +检查当前已安装的 SSH 版本。 + + # SSH -V + +![检查 SSH 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SSH-Version.jpeg) +检查 SSH 版本 + +在默认的 SSH 协议上使用安全协议,更改端口号进一步加强安全。编辑 SSH 的配置文件 ‘/etc/ssh/ssh_config’。 + +去掉下面行的注释或者从协议行中删除 1,然后行看起来像这样: + + # Protocol 2,1 (原来) + Protocol 2 (现在) + +这个改变强制 SSH 使用 协议 2,它被认为比协议 1 更安全,同时也确保在配置中更改端口号 22 为其它。 + +![保护 SSH 登录](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-SSH.jpeg) +保护 SSH 登录 + +取消 SSH ‘root login’ 然后允许只有当以普通用户账号登录后才能连接到 root 以进一步加强安全。为了做到这个,打开并编辑配置文件 ‘/etc/ssh/sshd_config’ 并更改 PermitRootLogin yes 为 PermitRootLogin no。 + + # PermitRootLogin yes (原来) + PermitRootLogin no (现在) + +![取消 SSH Root 登录](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-SSH-Root-Login.jpeg) +取消 SSH Root 登录 + +最后,重启 SSH 服务启用更改。 + + # systemctl restart sshd.service + +请查看: + +- [加密和保护 SSH 服务器的 5 个最佳实践][3] +- [5 个简单步骤实现使用 SSH Keygen 无密码登录 SSH][4] +- [在 PuTTY 中实现 “无密码 SSH 密钥验证”][5] + +### 10. 安装 GCC (GNU 编译器集) ### + +GCC 表示 GNU 编译器集,是一个 GNU 项目开发的支持多种编程语言的编译系统。在最小化安装的 CentOS 没有默认安装。运行下面的命令安装 gcc 编译器。 + # yum install gcc + +![在 CentOS 上安装 GCC](http://www.tecmint.com/wp-content/uploads/2015/04/Install-GCC-in-CentOS.jpeg) +在 CentOS 上安装 GCC + +检查安装的 gcc 版本。 + + # gcc --version + +![检查 GCC 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-GCC-Version.jpeg) +检查 GCC 版本 + +### 11. 安装 Java ### + +Java是一种通用的基于类的,面向对象的编程语言。在最小化 CentOS 服务器中没有默认安装。按照下面命令从库中安装 Java。 + + # yum install java + +![在 CentOS 上安装 Java](http://www.tecmint.com/wp-content/uploads/2015/04/Install-java.jpeg) +安装 Java + +检查安装的 Java 版本。 + + # java -version + +![检查 Java 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Java-Version.jpeg) +检查 Java 版本 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/2/ + +作者:[Avishek Kumar][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/install-lamp-in-centos-7/ +[2]:http://www.tecmint.com/apache-virtual-hosting-in-centos/ +[3]:http://www.tecmint.com/5-best-practices-to-secure-and-protect-ssh-server/ +[4]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ +[5]:http://www.tecmint.com/ssh-passwordless-login-with-putty/ \ No newline at end of file From 89976e27107b1078b5777513b941626be7477047 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 26 Apr 2015 10:44:39 +0800 Subject: [PATCH 075/154] PUB:20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux @geekpi --- ....h--No such file or directory' on Linux.md | 9 ++--- .../20150415 Strong SSL Security on nginx.md | 37 +++++++++---------- 2 files changed, 22 insertions(+), 24 deletions(-) rename {translated/tech => published}/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md (92%) 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/published/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md similarity index 92% rename from translated/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md rename to published/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md index 685e637072..2d37fb0a33 100644 --- 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/published/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md @@ -6,7 +6,7 @@ Linux 有问必答:如何在Linux中修复“fatal error: lame/lame.h: No such 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][1]("LAME Ain't an MP3 Encoder")是一个流行的LPGL授权的MP3编码器。许多视频编码工具使用或者支持LAME,如 [FFmpeg][2]、 VLC、 [Audacity][3]、 K3b、 RipperX等。 要修复这个编译错误,你需要安装LAME库和开发文件,按照下面的来。 @@ -20,7 +20,7 @@ Debian和它的衍生版在基础库中已经提供了LAME库,因此可以用a 在基于RED HAT的版本中,LAME在RPM Fusion的免费仓库中就有,那么你需要先设置[RPM Fusion (免费)仓库][4]。 -RPM Fusion设置完成后,如下安装LAME开发文件。 +RPM Fusion设置完成后,如下安装LAME开发包。 $ sudo yum --enablerepo=rpmfusion-free-updates install lame-devel @@ -42,7 +42,7 @@ RPM Fusion设置完成后,如下安装LAME开发文件。 $ ./configure --help -共享/静态LAME默认安装在 /usr/local/lib。要让共享库可以被其他程序使用,完成最后一步: +共享/静态的LAME库默认安装在 /usr/local/lib。要让共享库可以被其他程序使用,完成最后一步: 用编辑器打开 /etc/ld.so.conf,加入下面这行。 @@ -56,7 +56,6 @@ RPM Fusion设置完成后,如下安装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 @@ -87,7 +86,7 @@ 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) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/sources/tech/20150415 Strong SSL Security on nginx.md b/sources/tech/20150415 Strong SSL Security on nginx.md index 044ec9dd60..7ee87bc0d7 100644 --- a/sources/tech/20150415 Strong SSL Security on nginx.md +++ b/sources/tech/20150415 Strong SSL Security on nginx.md @@ -1,34 +1,33 @@ -// translating by wxy -Strong SSL Security on nginx +增强 nginx 的 SSL 安全性 ================================================================================ [![](https://raymii.org/s/inc/img/ssl-labs-a.png)][1] -This tutorial shows you how to set up strong SSL security on the nginx webserver. We do this by disabling SSL Compression to mitigate the CRIME attack, disable SSLv3 and below because of vulnerabilities in the protocol and we will set up a strong ciphersuite that enables Forward Secrecy when possible. We also enable HSTS and HPKP. This way we have a strong and future proof ssl configuration and we get an A on the Qually Labs SSL Test. +本文向你介绍如何在 nginx 服务器上设置高安全性的 SSL。我们通过取消 SSL 压缩降低 CRIME 攻击威胁;禁用协议上存在安全缺陷的 SSLv3 及更低版本,并设置更健壮的加密套件来尽可能启用正向保密(Forward Secrecy);我们也启用了 HSTS 和 HPKP。这样我们就拥有了一个健壮而可经受考验的 SSL 配置,并可以在 Qually Labs 的 SSL 测试中得到 A 级评分。 -TL;DR: [Copy-pastable strong cipherssuites for NGINX, Apache and Lighttpd: https://cipherli.st][2] +不求甚解的话,可以从 [https://cipherli.st][2] 上找到 nginx 、Apache 和 Lighttpd 的安全设置,复制粘帖即可。 -This tutorial is tested on a Digital Ocean VPS. If you like this tutorial and want to support my website, use this link to order a Digital Ocean VPS: [https://www.digitalocean.com/?refcode=7435ae6b8212][2] +本教程在 Digital Ocean 的 VPS 上测试通过。如果你喜欢这篇教程,想要支持作者的站点的话,购买 Digital Ocean 的 VPS 时请使用如下链接:[https://www.digitalocean.com/?refcode=7435ae6b8212][3] 。 -This tutorial works with the stricter requirements of the SSL Labs test [announced on the 21st of January 2014][4] (It already did before that, if you follow(ed) it you get an A+) +本教程可以通过[发布于 2014/1/21 的][4] SSL 实验室测试的严格要求(之前就通过了测试,如果你按照本文进行的话,可以得到一个 A+ 评分)。 -- [This tutorial is also available for Apache][5] -- [This tutorial is also available for Lighttpd][6] -- [This tutorial is also available for FreeBSD, NetBSD and OpenBSD over at the BSD Now podcast][7]: [http://www.bsdnow.tv/tutorials/nginx][8] +- [本教程也有对应 Apache 的][5] +- [本教程也有对应 Lighttpd 的][6] +- [本教程也有对应 FreeBSD, NetBSD 和 OpenBSD 上的 nginx 的,放在 BSD Now 播客][7]: [http://www.bsdnow.tv/tutorials/nginx][8] -You can find more info on the topics by following the links below: +你可以从下列链接中找到这方面的进一步内容: -- [BEAST Attack][9] -- [CRIME Attack][10] -- [FREAK Attack][11] -- [Heartbleed][12] -- [Perfect Forward Secrecy][13] -- [Dealing with RC4 and BEAST][14] +- [BEAST 攻击][9] +- [CRIME 攻击][10] +- [FREAK 攻击][11] +- [心血漏洞][12] +- [完美正向保密][13] +- [RC4 和 BEAST 的处理][14] -We are going to edit the nginx settings in the file `/etc/nginx/sited-enabled/yoursite.com` (On Ubuntu/Debian) or in `/etc/nginx/conf.d/nginx.conf` (On RHEL/CentOS). +我们需要编辑 nginx 的配置,在 Ubuntu/Debian 上是 `/etc/nginx/sited-enabled/yoursite.com`,在 RHEL/CentOS 上是 `/etc/nginx/conf.d/nginx.conf` -For the entire tutorial, you need to edit the parts between the `server` block for the server config for port 443 (ssl config). At the end of the tutorial you can find the complete config example. +本文中,我们需要编辑443端口(SSL)的 `server` 配置中的部分。在文末我们会给出完整的配置例子。 -*Make sure you back up the files before editing them!* +*在编辑之前切记备份一下配置文件!* ### The BEAST attack and RC4 ### From 490dcf25a4ae36d19725a4cda9503115dc87f4da Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 26 Apr 2015 11:02:17 +0800 Subject: [PATCH 076/154] PUB:20150310 How To Get Email Alerts for SSH Login on Linux Server @theo-l --- ...il Alerts for SSH Login on Linux Server.md | 59 +++++++++++++++++++ ...il Alerts for SSH Login on Linux Server.md | 58 ------------------ 2 files changed, 59 insertions(+), 58 deletions(-) create mode 100644 published/20150310 How To Get Email Alerts for SSH Login on Linux Server.md delete mode 100644 translated/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md diff --git a/published/20150310 How To Get Email Alerts for SSH Login on Linux Server.md b/published/20150310 How To Get Email Alerts for SSH Login on Linux Server.md new file mode 100644 index 0000000000..06d06029fc --- /dev/null +++ b/published/20150310 How To Get Email Alerts for SSH Login on Linux Server.md @@ -0,0 +1,59 @@ +如何设置 Linux 上 SSH 登录的 Email 提醒 +================================================================================ +![](http://www.ehowstuff.com/wp-content/uploads/2015/03/fail2ban-security.jpg) + +虚拟私有服务器 (VPS)上启用 SSH 服务使得该服务器暴露到互联网中,为黑客攻击提供了机会,尤其是当 VPS 还允许root 直接访问时。VPS 应该为每次 SSH 登录成功尝试配置一个自动的 email 警告。 VPS 服务器的所有者会得到各种 SSH 服务器访问日志的通知,例如登录者、登录时间以及来源 IP 地址等信息。这是一个对于服务器拥有者来说,保护服务器避免未知登录尝试的重要安全关注点。这是因为如果黑客使用暴力破解方式通过 SSH 来登录到你的 VPS 的话,后果很严重。在本文中,我会解释如何在 CentOS 6、 CentOS 7、 RHEL 6 和 RHEL 7上为所有的 SSH 用户登录设置一个 email 警告。 + +1. 使用root用户登录到你的服务器; + +2. 在全局源定义处配置警告(/etc/bashrc),这样就会对 root 用户以及普通用户都生效: + + [root@vps ~]# vi /etc/bashrc + + 将下面的内容加入到上述文件的尾部。 + + echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com + +3. 你也可以选择性地让警告只对 root 用户生效: + + [root@vps ~]# vi .bashrc + + 将下面的内容添加到/root/.bashrc的尾部: + + echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com + + 整个配置文件样例: + + # .bashrc + + # User specific aliases and functions + + alias rm='rm -i' + alias cp='cp -i' + alias mv='mv -i' + + # Source global definitions + if [ -f /etc/bashrc ]; then + . /etc/bashrc + fi + echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com + +4. 你也可以选择性地让警告只对特定的普通用户生效(例如 skytech): + + [root@vps ~]# vi /home/skytech/.bashrc + + 将下面的内容加入到/home/skytech/.bashrc文件尾部: + + echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com + +-------------------------------------------------------------------------------- + +via: http://www.ehowstuff.com/how-to-get-email-alerts-for-ssh-login-on-linux-server/ + +作者:[skytech][a] +译者:[theo-l](https://github.com/theo-l) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ehowstuff.com/author/mhstar/ diff --git a/translated/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md b/translated/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md deleted file mode 100644 index 7c7e556f31..0000000000 --- a/translated/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md +++ /dev/null @@ -1,58 +0,0 @@ -在Linux服务器上如何为SSH登陆获取Email警告 -================================================================================ -![](http://www.ehowstuff.com/wp-content/uploads/2015/03/fail2ban-security.jpg) - -让SSH服务器在虚拟私有服务器(VPS)上生效会使得该服务器暴露到互联网中并为黑客活动提供了机会,尤其时当VPS还将root作为主要访问时. VPS应该为每次通过SSH服务器成功登陆尝试配置一个自动的email警告. VPS的服务器所有者应该在任何的SSH服务器访问时得到通知,例如登陆者,登陆时间以及IP地址等信息.这是一个对于服务器拥有者保护服务器避免未知登陆尝试的非常重要的安全关注点.因为如果黑客使用暴力破解方式通过SSH来登陆你的VPS,那么后果很严重.在本文中,我会解释如何在CentOS 6, CentOS 7, RHEL 6 和 RHEL 7上为所有的SSH用户登陆设置一个email警告. - -1. 使用root用户登陆到你的服务器: - -2. 在全局源定义处配置警告(/etc/bashrc),这样就会对跟用户以及普通用户都生效: - [root@vps ~]# vi /etc/bashrc - -将下面的内容加入到上述文件的尾部。 - - echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com - -3.你也可以选择性地让警告只对跟用户生效: - - [root@vps ~]# vi .bashrc - -将下面的内容添加到/root/.bashrc的为尾部: - - echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com - -整个配置文件样例: - - # .bashrc - - # User specific aliases and functions - - alias rm='rm -i' - alias cp='cp -i' - alias mv='mv -i' - - # Source global definitions - if [ -f /etc/bashrc ]; then - . /etc/bashrc - fi - echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com - -4.你也可以选择性地让警告只对特定的普通用户生效(例如 skytech): - - [root@vps ~]# vi /home/skytech/.bashrc - -将下面的内容加入到/home/skytech/.bashrc文件尾部: - - echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com - --------------------------------------------------------------------------------- - -via: http://www.ehowstuff.com/how-to-get-email-alerts-for-ssh-login-on-linux-server/ - -作者:[skytech][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://www.ehowstuff.com/author/mhstar/ From 85357ff405c59325db659bd6b7ca34f539f6607a Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 26 Apr 2015 11:28:42 +0800 Subject: [PATCH 077/154] PUB:20150205 How To Install or Configure VNC Server On CentOS 7.0 @boredivan --- ...l or Configure VNC Server On CentOS 7.0.md | 52 +++++++++---------- 1 file changed, 25 insertions(+), 27 deletions(-) rename {translated/tech => published}/20150205 How To Install or Configure VNC Server On CentOS 7.0.md (65%) diff --git a/translated/tech/20150205 How To Install or Configure VNC Server On CentOS 7.0.md b/published/20150205 How To Install or Configure VNC Server On CentOS 7.0.md similarity index 65% rename from translated/tech/20150205 How To Install or Configure VNC Server On CentOS 7.0.md rename to published/20150205 How To Install or Configure VNC Server On CentOS 7.0.md index 58c846e4d6..713fb7ab34 100644 --- a/translated/tech/20150205 How To Install or Configure VNC Server On CentOS 7.0.md +++ b/published/20150205 How To Install or Configure VNC Server On CentOS 7.0.md @@ -1,24 +1,22 @@ -===>> boredivan翻译中 <<=== -怎样在CentOS 7.0上安装/配置VNC服务器 +怎样在CentOS 7.0上安装和配置VNC服务器 ================================================================================ -这是一个关于怎样在你的 CentOS 7 上安装配置 [VNC][1] 服务的教程。当然这个教程也适合 RHEL 7 。在这个教程里,我们将学习什么是VNC以及怎样在 CentOS 7 上安装配置 [VNC 服务器][1]。 +这是一个关于怎样在你的 CentOS 7 上安装配置 [VNC][1] 服务的教程。当然这个教程也适合 RHEL 7 。在这个教程里,我们将学习什么是 VNC 以及怎样在 CentOS 7 上安装配置 [VNC 服务器][1]。 我们都知道,作为一个系统管理员,大多数时间是通过网络管理服务器的。在管理服务器的过程中很少会用到图形界面,多数情况下我们只是用 SSH 来完成我们的管理任务。在这篇文章里,我们将配置 VNC 来提供一个连接我们 CentOS 7 服务器的方法。VNC 允许我们开启一个远程图形会话来连接我们的服务器,这样我们就可以通过网络远程访问服务器的图形界面了。 -VNC 服务器是一个自由且开源的软件,它可以让用户可以远程访问服务器的桌面环境。另外连接 VNC 服务器需要使用 VNC viewer 这个客户端。 +VNC 服务器是一个自由开源软件,它可以让用户可以远程访问服务器的桌面环境。另外连接 VNC 服务器需要使用 VNC viewer 这个客户端。 ** 一些 VNC 服务器的优点:** - 远程的图形管理方式让工作变得简单方便。 - 剪贴板可以在 CentOS 服务器主机和 VNC 客户端机器之间共享。 - CentOS 服务器上也可以安装图形工具,让管理能力变得更强大。 - 只要安装了 VNC 客户端,任何操作系统都可以管理 CentOS 服务器了。 - 比 ssh 图形和 RDP 连接更可靠。 +- 远程的图形管理方式让工作变得简单方便。 +- 剪贴板可以在 CentOS 服务器主机和 VNC 客户端机器之间共享。 +- CentOS 服务器上也可以安装图形工具,让管理能力变得更强大。 +- 只要安装了 VNC 客户端,通过任何操作系统都可以管理 CentOS 服务器了。 +- 比 ssh 图形转发和 RDP 连接更可靠。 -那么,让我们开始安装 VNC 服务器之旅吧。我们需要按照下面的步骤一步一步来搭建一个有效的 VNC。 +那么,让我们开始安装 VNC 服务器之旅吧。我们需要按照下面的步骤一步一步来搭建一个可用的 VNC。 - -首先,我们需要一个有效的桌面环境(X-Window),如果没有的话要先安装一个。 +首先,我们需要一个可用的桌面环境(X-Window),如果没有的话要先安装一个。 **注意:以下命令必须以 root 权限运行。要切换到 root ,请在终端下运行“sudo -s”,当然不包括双引号(“”)** @@ -34,7 +32,8 @@ VNC 服务器是一个自由且开源的软件,它可以让用户可以远程 #yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts ![install gnome classic session](http://blog.linoxide.com/wp-content/uploads/2015/01/gnome-classic-session-install.png) - + + ### 设置默认启动图形界面 # unlink /etc/systemd/system/default.target # ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target @@ -56,13 +55,13 @@ VNC 服务器是一个自由且开源的软件,它可以让用户可以远程 ### 3. 配置 VNC ### -然后,我们需要在 **/etc/systemd/system/** 目录里创建一个配置文件。我们可以从 **/lib/systemd/sytem/vncserver@.service** 拷贝一份配置文件范例过来。 +然后,我们需要在 `/etc/systemd/system/` 目录里创建一个配置文件。我们可以将 `/lib/systemd/sytem/vncserver@.service` 拷贝一份配置文件范例过来。 # cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service ![copying vnc server configuration](http://blog.linoxide.com/wp-content/uploads/2015/01/copying-configuration.png) -接着我们用自己最喜欢的编辑器(这儿我们用的 **nano** )打开 **/etc/systemd/system/vncserver@:1.service** ,找到下面这几行,用自己的用户名替换掉 。举例来说,我的用户名是 linoxide 所以我用 linoxide 来替换掉 : +接着我们用自己最喜欢的编辑器(这儿我们用的 **nano** )打开 `/etc/systemd/system/vncserver@:1.service` ,找到下面这几行,用自己的用户名替换掉 。举例来说,我的用户名是 linoxide 所以我用 linoxide 来替换掉 : ExecStart=/sbin/runuser -l -c "/usr/bin/vncserver %i" PIDFile=/home//.vnc/%H%i.pid @@ -83,8 +82,7 @@ VNC 服务器是一个自由且开源的软件,它可以让用户可以远程 # systemctl daemon-reload -Finally, we'll create VNC password for the user . To do so, first you'll need to be sure that you have sudo access to the user, here I will login to user "linoxide" then, execute the following. To login to linoxide we'll run "**su linoxide" without quotes** . -最后还要设置一下用户的 VNC 密码。要设置某个用户的密码,必须要获得该用户的权限,这里我用 linoxide 的权限,执行“**su linoxide**”就可以了。 +最后还要设置一下用户的 VNC 密码。要设置某个用户的密码,必须要有能通过 sudo 切换到用户的权限,这里我用 linoxide 的权限,执行“`su linoxide`”就可以了。 # su linoxide $ sudo vncpasswd @@ -112,7 +110,7 @@ Finally, we'll create VNC password for the user . To do so, first you'll need to ![allowing firewalld](http://blog.linoxide.com/wp-content/uploads/2015/01/allowing-firewalld.png) -现在就可以用 IP 和端口号(例如 192.168.1.1:1 ,这里的端口不是服务器的端口,而是视 VNC 连接数的多少从1开始排序——译注)来连接 VNC 服务器了。 +现在就可以用 IP 和端口号(LCTT 译注:例如 192.168.1.1:1 ,这里的端口不是服务器的端口,而是视 VNC 连接数的多少从1开始排序)来连接 VNC 服务器了。 ### 6. 用 VNC 客户端连接服务器 ### @@ -122,33 +120,33 @@ Finally, we'll create VNC password for the user . To do so, first you'll need to 你可以用像 [Tightvnc viewer][3] 和 [Realvnc viewer][4] 的客户端来连接到服务器。 -要用其他用户和端口连接 VNC 服务器,请回到第3步,添加一个新的用户和端口。你需要创建 **vncserver@:2.service** 并替换配置文件里的用户名和之后步骤里响应的文件名、端口号。**请确保你登录 VNC 服务器用的是你之前配置 VNC 密码的时候使用的那个用户名** +要用更多的用户连接,需要创建配置文件和端口,请回到第3步,添加一个新的用户和端口。你需要创建 `vncserver@:2.service` 并替换配置文件里的用户名和之后步骤里相应的文件名、端口号。**请确保你登录 VNC 服务器用的是你之前配置 VNC 密码的时候使用的那个用户名**。 +VNC 服务本身使用的是5900端口。鉴于有不同的用户使用 VNC ,每个人的连接都会获得不同的端口。配置文件名里面的数字告诉 VNC 服务器把服务运行在5900的子端口上。在我们这个例子里,第一个 VNC 服务会运行在5901(5900 + 1)端口上,之后的依次增加,运行在5900 + x 号端口上。其中 x 是指之后用户的配置文件名 `vncserver@:x.service` 里面的 x 。 +在建立连接之前,我们需要知道服务器的 IP 地址和端口。IP 地址是一台计算机在网络中的独特的识别号码。我的服务器的 IP 地址是96.126.120.92,VNC 用户端口是1。 -VNC 服务本身使用的是5900端口。鉴于有不同的用户使用 VNC ,每个人的连接都会获得不同的端口。配置文件名里面的数字告诉 VNC 服务器把服务运行在5900的子端口上。在我们这个例子里,第一个 VNC 服务会运行在5901(5900 + 1)端口上,之后的依次增加,运行在5900 + x 号端口上。其中 x 是指之后用户的配置文件名 **vncserver@:x.service** 里面的 x 。 - -在建立连接之前,我们需要知道服务器的 IP 地址和端口。IP 地址是一台计算机在网络中的独特的识别号码。我的服务器的 IP 地址是96.126.120.92,VNC 用户端口是1。执行下面的命令可以获得服务器的公网 IP 地址。 +执行下面的命令可以获得服务器的公网 IP 地址(LCTT 译注:如果你的服务器放在内网或使用动态地址的话,可以这样获得其公网 IP 地址)。 # curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//' ### 总结 ### -好了,现在我们已经在运行 CentOS 7 / RHEL 7 (Red Hat Enterprises Linux)的服务器上安装配置好了 VNC 服务器。VNC 是自由及开源的软件中最简单的一种能实现远程控制服务器的一种工具,也是 Teamviewer Remote Access 的一款优秀的替代品。VNC 允许一个安装了 VNC 客户端的用户远程控制一台安装了 VNC 服务的服务器。下面还有一些经常使用的相关命令。好好玩! +好了,现在我们已经在运行 CentOS 7 / RHEL 7 的服务器上安装配置好了 VNC 服务器。VNC 是自由开源软件中最简单的一种能实现远程控制服务器的工具,也是一款优秀的 Teamviewer Remote Access 替代品。VNC 允许一个安装了 VNC 客户端的用户远程控制一台安装了 VNC 服务的服务器。下面还有一些经常使用的相关命令。好好玩! #### 其他命令: #### - 关闭 VNC 服务。 - # systemctl stop vncserver@:1.service + # systemctl stop vncserver@:1.service - 禁止 VNC 服务开机启动。 - # systemctl disable vncserver@:1.service + # systemctl disable vncserver@:1.service - 关闭防火墙。 - # systemctl stop firewalld.service + # systemctl stop firewalld.service -------------------------------------------------------------------------------- @@ -156,7 +154,7 @@ via: http://linoxide.com/linux-how-to/install-configure-vnc-server-centos-7-0/ 作者:[Arun Pyasi][a] 译者:[boredivan](https://github.com/boredivan) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7faf58d0a9a45079678c2281a965baa813050ce4 Mon Sep 17 00:00:00 2001 From: Mo Date: Sun, 26 Apr 2015 18:57:22 +0800 Subject: [PATCH 078/154] [Translated]Debian 8 Jessie released --- translated/news/Debian 8 Jessie released.md | 90 +++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 translated/news/Debian 8 Jessie released.md diff --git a/translated/news/Debian 8 Jessie released.md b/translated/news/Debian 8 Jessie released.md new file mode 100644 index 0000000000..5bcb08765d --- /dev/null +++ b/translated/news/Debian 8 Jessie released.md @@ -0,0 +1,90 @@ +Debian 8 "Jessie" 发布 +===================================================== + +**2015年4月25日** + +在经历了近24个月的持续开发之后,Debian项目自豪地宣布最新的稳定版本8发布(代号 *“Jessie”* ),归功于[Debian安全团队][1]和[Debian长期支持][2]团队的工作,该版本将在接下来的5年内获得支持。 + +![Debian](http://i1-news.softpedia-static.com/images/news2/Debian-GNU-Linux-8-Jessie-Has-Been-Officially-Released-Download-Now-479331-2.jpg) + +*“Jessie”* 与新的默认init系统`systemd`一同到来。`systemd`套件提供了许多激动人心的特性,如更快的启动速度,为服务提供cgroups,以及独立出部分服务的可能性。`sysvinit`init系统在 *“Jessie”* 中依然可用。 + +在 *“Wheezy”* 中引入的UEFI支持(*“Unified Extensible Firmware Interface”*,统一的可扩展固件接口)同样在Jessie中得到了大幅改进。其中包含许多已知固件bug的暂时解决,对32位系统上的UEFI支持,以及对使用32位UEFI固件的64位内核支持(后者仅被包含在我们的 `amd64/i386`*“multi-arch”* 安装媒体中)。 + +自上个版本发布以来,Debian项目的成员同样对我们的支持服务做出了重要改进。其中之一是[可浏览所有Debian的源码][3],该服务目前在[sources.debian.net][4]提供。当然,在超过20000个源码包里想要找到正确的文件确实令人望而生畏。因此,我们同样十分高兴地上线[Debian代码搜索][5],在[codesearch.debian.net][6]提供服务。这两项服务都由一个完全重写并且更加反应敏捷的[包追踪系统][7]提供。 + +该版本包含大量的软件包更新,如: + +* Apache 2.4.10 +* Asterisk 11.13.1 +* GIMP 2.8.14 +* 一个GNOME桌面环境3.14的升级版本 +* GCC编译器 4.9.2 +* Icedove 31.6.0 (一个Mozilla Thunderbird的再发布版本) +* Iceweasel 31.6.0esr (一个Mozilla Firefox的再发布版本) +* KDE Plasma Workspaces 和 KDE Applications 4.11.13 +* LibreOffice 4.3.3 +* Linux 3.16.7-ctk9 +* MariaDB 10.0.16 和 MySQL 5.5.42 +* Nagios 3.5.1 +* OpenJDK 7u75 +* Perl 5.20.2 +* PHP 5.6.7 +* PostgreSQL 9.4.1 +* Python 2.7.9 和 3.4.2 +* Samba 4.1.17 +* Tomcat 7.0.56 和 8.0.14 +* Xen Hypervisor 4.4.1 +* Xfce 4.10桌面环境 +* 超过43000个其它可供使用的软件包,从将近20100个源码包编译而来 + +与如此之多的软件包选择和照例广泛的架构支持,Debian再次向它的目标:成为通用操作系统迈出正确的一步。Debian适用于各种不同情形:从桌面系统到上网本;从开发服务器到集群系统;以及数据库,web,或存储服务器。同时,额外的质量保证工作,如在Debian上对所有包的自动安装和升级测试,让 *“Jessie”* 满足用户拥有一个稳定的Debian版本的高期望。 + +总共有十种架构得到支持:32位PC/Intel IA-32(`i386`),64位PC/Intel EM64T / x86-64 (`amd64`),Motorola/IBM PowerPC (旧硬件的`powerpc`和新的64位`ppc64el`(little-endian)),MIPS (`mips`(big-endian)和 `mipsel`(little-endian)),IBM S/390 (64位 `s390x`)以及ARM新老32位硬件的`armel`和`armhf`,加上给新64位 *“AArch64”* 架构的`arm64`。 + +### 想尝试一下? ### + +如果你仅仅是想在不安装的情况下体验Debian 8 *“Jessie”*,你可以使用一个特殊的镜像,就是live镜像,可以用在CD,U盘以及网络启动设置上。最先只有`amd64`和`i386`架构提供这些镜像。Live镜像同样可以用来安装Debian。更多信息请访问[Debian Live主页][8]。 + +但是如果你想安装Debian到你的永久存储中的话,有不少安装媒介可供你选择,如蓝光碟,DVD,CD以及U盘,或者从网络安装。若干桌面环境——GNOME,KDE Plasma桌面和应用,Xfce以及LXDE——可以从CD镜像中安装,可以从CD/DVD的启动菜单里选择想要的桌面环境。另外,同样提供了多架构CD和DVD,可以从单一磁盘选择安装不同架构的系统。或者你还可以创建可启动U盘安装媒介(参看[安装指南][9]获得更多细节)。对云用户Debian还提供了[预构建OpenStack镜像][10],可供使用。 + +安装镜像现在同样可以通过[bittorrent][11](推荐下载方式),[jigdo][12]或[HTTP][13]下载,查看[Debian光盘][14]获得更进一步的信息。*“Jessie”* 不久将提供实体DVD,CD-ROM,以及无数[供应商][15]的蓝光碟。 + +### 升级Debian ### + +从前一个版本Debian 7(代号 *“Wheezy”* )升级到Debian 8,apt-get包管理工具能够自动解决大部分配置。Debian系统一如既往地可能就地无痛升级,无需强制停机,但强烈推荐阅读[发行注记][16]和[安装指南][17]以为潜在的问题做准备,以及获取安装和升级的详细介绍。发行注记会在发布后的几周内进一步改进以及翻译成其他语言。 + +## 关于Debian ## + +Debian是一个自由操作系统,由成千上万通过互联网协作的来自全世界的志愿者开发。Debian项目的关键力量是它的志愿者基础,它对Debian社群契约和自由软件的贡献,以及对提供最好的操作系统可能的承诺。Debian 8是其前进方向上又一重要一步。 + +## 联系信息 ## + +获取更多信息,请访问Debian主页[https://www.debian.org/][18]或发送电子邮件至。 + +-------------------------------------------------------------------------------- + +via:https://www.debian.org/News/2015/20150426 + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://security-team.debian.org/ +[2]:https://wiki.debian.org/LTS +[3]:https://www.debian.org/News/weekly/2013/14/#sources +[4]:https://sources.debian.net/ +[5]:https://www.debian.org/News/weekly/2014/17/#DCS +[6]:https://codesearch.debian.net/ +[7]:https://tracker.debian.org/ +[8]:http://live.debian.net/ +[9]:https://www.debian.org/releases/jessie/installmanual +[10]:http://cdimage.debian.org/cdimage/openstack/current/ +[11]:https://www.debian.org/CD/torrent-cd/ +[12]:https://www.debian.org/CD/jigdo-cd/#which +[13]:https://www.debian.org/CD/http-ftp/ +[14]:https://www.debian.org/CD/ +[15]:https://www.debian.org/CD/vendors +[16]:https://www.debian.org/releases/jessie/releasenotes +[17]:https://www.debian.org/releases/jessie/installmanual +[18]:https://www.debian.org/ From 46e9e3e4a0060886284cbc44b4ea15d697e7998d Mon Sep 17 00:00:00 2001 From: robot-0 Date: Sun, 26 Apr 2015 20:16:21 +0800 Subject: [PATCH 079/154] translating --- ...31 How to set up remote desktop on Linux VPS using x2go.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md b/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md index 8f98a2ba02..8b3eed8330 100644 --- a/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md +++ b/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md @@ -1,3 +1,5 @@ +translating by createyuan + How to set up remote desktop on Linux VPS using x2go ================================================================================ As everything is moved to the cloud, virtualized remote desktop becomes increasingly popular in the industry as a way to enhance employee's productivity. Especially for those who need to roam constantly across multiple locations and devices, remote desktop allows them to stay connected seamlessly to their work environment. Remote desktop is attractive for employers as well, achieving increased agility and flexibility in work environments, lower IT cost due to hardware consolidation, desktop security hardening, and so on. @@ -134,4 +136,4 @@ via: http://xmodulo.com/x2go-remote-desktop-linux.html [5]:http://wiki.x2go.org/doku.php/doc:newtox2go [6]:http://wiki.x2go.org/doku.php/doc:de-compat [7]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[8]:http://xmodulo.com/go/digitalocean \ No newline at end of file +[8]:http://xmodulo.com/go/digitalocean From 439531f13fadda321297e408347e7e53dcab0fcb Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 26 Apr 2015 20:46:14 +0800 Subject: [PATCH 080/154] PUB:Debian 8 Jessie released @alim0x --- published/Debian 8 Jessie released.md | 88 ++++++++++++++++++++ translated/news/Debian 8 Jessie released.md | 90 --------------------- 2 files changed, 88 insertions(+), 90 deletions(-) create mode 100644 published/Debian 8 Jessie released.md delete mode 100644 translated/news/Debian 8 Jessie released.md diff --git a/published/Debian 8 Jessie released.md b/published/Debian 8 Jessie released.md new file mode 100644 index 0000000000..48167b6712 --- /dev/null +++ b/published/Debian 8 Jessie released.md @@ -0,0 +1,88 @@ +Debian 8 "Jessie" 发布 +===================================================== + +**2015年4月25日** ,在经历了近24个月的持续开发之后,Debian 项目自豪地宣布最新的稳定版本8的发布(代号 “**Jessie**” ),归功于[Debian安全团队][1]和[Debian长期支持][2]团队的工作,该版本将在接下来的5年内获得支持。 + +![Debian](http://i1-news.softpedia-static.com/images/news2/Debian-GNU-Linux-8-Jessie-Has-Been-Officially-Released-Download-Now-479331-2.jpg) + +“**Jessie**” 与新的默认 init 系统 `systemd` 一同到来。`systemd` 套件提供了许多激动人心的特性,如更快的启动速度、系统服务的 cgroups 支持、以及独立出部分服务的可能性。不过,`sysvinit` init系统在 “**Jessie**” 中依然可用。 + +在 “**Wheezy**” 中引入的 UEFI 支持(*“Unified Extensible Firmware Interface”*,统一的可扩展固件接口)同样在 “**Jessie**” 中得到了大幅改进。其中包含了许多已知固件 bug 的临时性解决方案,支持32位系统上的UEFI,也支持64位内核运行在32位 UEFI 固件上(后者仅被包含在我们的 `amd64/i386` “multi-arch” 安装介质中)。 + +自上个版本发布以来,Debian 项目的成员同样对我们的支持服务做出了重要改进。其中之一是[可浏览所有 Debian 的源码][3],该服务目前放在 [sources.debian.net][4]。当然,在超过20000个源码包里想要找到正确的文件确实令人望而生畏。因此,我们同样十分高兴地上线 [Debian 代码搜索][5],它放在 [codesearch.debian.net][6]。这两项服务都由一个完全重写并且更加反应敏捷的[包追踪系统][7]提供。 + +该版本包含大量的软件包更新,如: + +* Apache 2.4.10 +* Asterisk 11.13.1 +* GIMP 2.8.14 +* 一个GNOME桌面环境 3.14 的升级版本 +* GCC 编译器 4.9.2 +* Icedove 31.6.0 (一个 Mozilla Thunderbird 的再发布版本) +* Iceweasel 31.6.0esr (一个 Mozilla Firefox 的再发布版本) +* KDE Plasma Workspaces 和 KDE Applications 4.11.13 +* LibreOffice 4.3.3 +* Linux 3.16.7-ctk9 +* MariaDB 10.0.16 和 MySQL 5.5.42 +* Nagios 3.5.1 +* OpenJDK 7u75 +* Perl 5.20.2 +* PHP 5.6.7 +* PostgreSQL 9.4.1 +* Python 2.7.9 和 3.4.2 +* Samba 4.1.17 +* Tomcat 7.0.56 和 8.0.14 +* Xen Hypervisor 4.4.1 +* Xfce 4.10桌面环境 +* 超过43000个其它可供使用的软件包,从将近20100个源码包编译而来 + +与如此之多的软件包选择和照例的广泛架构支持,Debian 再次向它的目标:成为通用操作系统迈出正确的一步。Debian 适用于各种不同情形:从桌面系统到上网本;从开发服务器到集群系统;以及数据库,web,或存储服务器。同时,在此基础之上的质量保证工作,如对 Debian 上所有包的自动安装和升级测试,让 “**Jessie**” 可以满足用户拥有一个稳定的 Debian 版本的高期望值。 + +总共支持十种架构:32位PC/Intel IA-32(`i386`),64位PC/Intel EM64T / x86-64 (`amd64`),Motorola/IBM PowerPC (旧硬件的`powerpc`和新的64位`ppc64el`(little-endian)),MIPS (`mips` 大端和 `mipsel`小端),IBM S/390 (64位 `s390x`)以及 ARM 新老32位硬件的`armel`和`armhf`,加上给新64位 *“AArch64”* 架构的`arm64`。 + +### 想尝试一下? ### + +如果你仅仅是想在不安装的情况下体验 Debian 8 “**Jessie**”,你可以使用一个特殊的镜像,即 live 镜像,可以用在 CD,U 盘以及网络启动设置上。最先只有 `amd64` 和 `i386` 架构提供这些镜像。Live 镜像同样可以用来安装 Debian。更多信息请访问 [Debian Live 主页][8]。 + +但是如果你想安装 Debian 到你的计算机的话,有不少安装媒介可供你选择,如蓝光碟,DVD,CD 以及 U 盘,或者从网络安装。有几种桌面环境:GNOME,KDE Plasma 桌面及 Plasma 应用,Xfce 以及 LXDE,它们可以从CD镜像中安装,也可以从 CD/DVD 的启动菜单里选择想要的桌面环境。另外,同样提供了多架构 CD 和 DVD,可以从单一磁盘选择安装不同架构的系统。或者你还可以创建可启动 U 盘安装媒介(参看[安装指南][9]获得更多细节)。对云用户,Debian 还提供了[预构建 OpenStack 镜像][10]可供使用。 + +安装镜像现在同样可以通过 [bittorrent][11](推荐下载方式),[jigdo][12] 或 [HTTP][13] 下载,查看[Debian 光盘][14]获得更进一步的信息。“**Jessie**” 不久将提供实体 DVD,CD-ROM,以及无数[供应商][15]的蓝光碟。 + +### 升级 Debian ### + +如果从前一个版本 Debian 7(代号 “**Wheezy**” )升级到 Debian 8,大部分配置情况 apt-get 包管理工具都能够自动解决。Debian 系统一如既往地能够就地无痛升级,无需强制停机。强烈推荐阅读[发行注记][16]和[安装指南][17]来了解可能存在的问题,并了解安装和升级建议。发行注记会在发布后的几周内进一步改进,并翻译成其他语言。 + +## 关于 Debian ## + +Debian 是一个自由操作系统,由成千上万来自全世界的志愿者通过互联网协作开发。Debian 项目的关键力量是它的志愿者基础,它对 Debian 社群契约和自由软件的贡献,以及对提供最好的操作系统可能的承诺。Debian 8是其前进方向上又一重要一步。 + +## 联系信息 ## + +获取更多信息,请访问 Debian 主页 [https://www.debian.org/][18] 或发送电子邮件至。 + +-------------------------------------------------------------------------------- + +via: https://www.debian.org/News/2015/20150426 + +译者:[alim0x](https://github.com/alim0x) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://security-team.debian.org/ +[2]:https://wiki.debian.org/LTS +[3]:https://www.debian.org/News/weekly/2013/14/#sources +[4]:https://sources.debian.net/ +[5]:https://www.debian.org/News/weekly/2014/17/#DCS +[6]:https://codesearch.debian.net/ +[7]:https://tracker.debian.org/ +[8]:http://live.debian.net/ +[9]:https://www.debian.org/releases/jessie/installmanual +[10]:http://cdimage.debian.org/cdimage/openstack/current/ +[11]:https://www.debian.org/CD/torrent-cd/ +[12]:https://www.debian.org/CD/jigdo-cd/#which +[13]:https://www.debian.org/CD/http-ftp/ +[14]:https://www.debian.org/CD/ +[15]:https://www.debian.org/CD/vendors +[16]:https://www.debian.org/releases/jessie/releasenotes +[17]:https://www.debian.org/releases/jessie/installmanual +[18]:https://www.debian.org/ diff --git a/translated/news/Debian 8 Jessie released.md b/translated/news/Debian 8 Jessie released.md deleted file mode 100644 index 5bcb08765d..0000000000 --- a/translated/news/Debian 8 Jessie released.md +++ /dev/null @@ -1,90 +0,0 @@ -Debian 8 "Jessie" 发布 -===================================================== - -**2015年4月25日** - -在经历了近24个月的持续开发之后,Debian项目自豪地宣布最新的稳定版本8发布(代号 *“Jessie”* ),归功于[Debian安全团队][1]和[Debian长期支持][2]团队的工作,该版本将在接下来的5年内获得支持。 - -![Debian](http://i1-news.softpedia-static.com/images/news2/Debian-GNU-Linux-8-Jessie-Has-Been-Officially-Released-Download-Now-479331-2.jpg) - -*“Jessie”* 与新的默认init系统`systemd`一同到来。`systemd`套件提供了许多激动人心的特性,如更快的启动速度,为服务提供cgroups,以及独立出部分服务的可能性。`sysvinit`init系统在 *“Jessie”* 中依然可用。 - -在 *“Wheezy”* 中引入的UEFI支持(*“Unified Extensible Firmware Interface”*,统一的可扩展固件接口)同样在Jessie中得到了大幅改进。其中包含许多已知固件bug的暂时解决,对32位系统上的UEFI支持,以及对使用32位UEFI固件的64位内核支持(后者仅被包含在我们的 `amd64/i386`*“multi-arch”* 安装媒体中)。 - -自上个版本发布以来,Debian项目的成员同样对我们的支持服务做出了重要改进。其中之一是[可浏览所有Debian的源码][3],该服务目前在[sources.debian.net][4]提供。当然,在超过20000个源码包里想要找到正确的文件确实令人望而生畏。因此,我们同样十分高兴地上线[Debian代码搜索][5],在[codesearch.debian.net][6]提供服务。这两项服务都由一个完全重写并且更加反应敏捷的[包追踪系统][7]提供。 - -该版本包含大量的软件包更新,如: - -* Apache 2.4.10 -* Asterisk 11.13.1 -* GIMP 2.8.14 -* 一个GNOME桌面环境3.14的升级版本 -* GCC编译器 4.9.2 -* Icedove 31.6.0 (一个Mozilla Thunderbird的再发布版本) -* Iceweasel 31.6.0esr (一个Mozilla Firefox的再发布版本) -* KDE Plasma Workspaces 和 KDE Applications 4.11.13 -* LibreOffice 4.3.3 -* Linux 3.16.7-ctk9 -* MariaDB 10.0.16 和 MySQL 5.5.42 -* Nagios 3.5.1 -* OpenJDK 7u75 -* Perl 5.20.2 -* PHP 5.6.7 -* PostgreSQL 9.4.1 -* Python 2.7.9 和 3.4.2 -* Samba 4.1.17 -* Tomcat 7.0.56 和 8.0.14 -* Xen Hypervisor 4.4.1 -* Xfce 4.10桌面环境 -* 超过43000个其它可供使用的软件包,从将近20100个源码包编译而来 - -与如此之多的软件包选择和照例广泛的架构支持,Debian再次向它的目标:成为通用操作系统迈出正确的一步。Debian适用于各种不同情形:从桌面系统到上网本;从开发服务器到集群系统;以及数据库,web,或存储服务器。同时,额外的质量保证工作,如在Debian上对所有包的自动安装和升级测试,让 *“Jessie”* 满足用户拥有一个稳定的Debian版本的高期望。 - -总共有十种架构得到支持:32位PC/Intel IA-32(`i386`),64位PC/Intel EM64T / x86-64 (`amd64`),Motorola/IBM PowerPC (旧硬件的`powerpc`和新的64位`ppc64el`(little-endian)),MIPS (`mips`(big-endian)和 `mipsel`(little-endian)),IBM S/390 (64位 `s390x`)以及ARM新老32位硬件的`armel`和`armhf`,加上给新64位 *“AArch64”* 架构的`arm64`。 - -### 想尝试一下? ### - -如果你仅仅是想在不安装的情况下体验Debian 8 *“Jessie”*,你可以使用一个特殊的镜像,就是live镜像,可以用在CD,U盘以及网络启动设置上。最先只有`amd64`和`i386`架构提供这些镜像。Live镜像同样可以用来安装Debian。更多信息请访问[Debian Live主页][8]。 - -但是如果你想安装Debian到你的永久存储中的话,有不少安装媒介可供你选择,如蓝光碟,DVD,CD以及U盘,或者从网络安装。若干桌面环境——GNOME,KDE Plasma桌面和应用,Xfce以及LXDE——可以从CD镜像中安装,可以从CD/DVD的启动菜单里选择想要的桌面环境。另外,同样提供了多架构CD和DVD,可以从单一磁盘选择安装不同架构的系统。或者你还可以创建可启动U盘安装媒介(参看[安装指南][9]获得更多细节)。对云用户Debian还提供了[预构建OpenStack镜像][10],可供使用。 - -安装镜像现在同样可以通过[bittorrent][11](推荐下载方式),[jigdo][12]或[HTTP][13]下载,查看[Debian光盘][14]获得更进一步的信息。*“Jessie”* 不久将提供实体DVD,CD-ROM,以及无数[供应商][15]的蓝光碟。 - -### 升级Debian ### - -从前一个版本Debian 7(代号 *“Wheezy”* )升级到Debian 8,apt-get包管理工具能够自动解决大部分配置。Debian系统一如既往地可能就地无痛升级,无需强制停机,但强烈推荐阅读[发行注记][16]和[安装指南][17]以为潜在的问题做准备,以及获取安装和升级的详细介绍。发行注记会在发布后的几周内进一步改进以及翻译成其他语言。 - -## 关于Debian ## - -Debian是一个自由操作系统,由成千上万通过互联网协作的来自全世界的志愿者开发。Debian项目的关键力量是它的志愿者基础,它对Debian社群契约和自由软件的贡献,以及对提供最好的操作系统可能的承诺。Debian 8是其前进方向上又一重要一步。 - -## 联系信息 ## - -获取更多信息,请访问Debian主页[https://www.debian.org/][18]或发送电子邮件至。 - --------------------------------------------------------------------------------- - -via:https://www.debian.org/News/2015/20150426 - -译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://security-team.debian.org/ -[2]:https://wiki.debian.org/LTS -[3]:https://www.debian.org/News/weekly/2013/14/#sources -[4]:https://sources.debian.net/ -[5]:https://www.debian.org/News/weekly/2014/17/#DCS -[6]:https://codesearch.debian.net/ -[7]:https://tracker.debian.org/ -[8]:http://live.debian.net/ -[9]:https://www.debian.org/releases/jessie/installmanual -[10]:http://cdimage.debian.org/cdimage/openstack/current/ -[11]:https://www.debian.org/CD/torrent-cd/ -[12]:https://www.debian.org/CD/jigdo-cd/#which -[13]:https://www.debian.org/CD/http-ftp/ -[14]:https://www.debian.org/CD/ -[15]:https://www.debian.org/CD/vendors -[16]:https://www.debian.org/releases/jessie/releasenotes -[17]:https://www.debian.org/releases/jessie/installmanual -[18]:https://www.debian.org/ From 4dbcc99c65bdc1a748599a6b309133ac2d3a92b1 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 26 Apr 2015 21:34:48 +0800 Subject: [PATCH 081/154] [Translating] tech/30 Things to Do After Minimal RHEL/CentOS 7 Installation--3,4,5,6 --- ...hings to Do After Minimal RHEL or CentOS 7 Installation--3.md | 1 + ...hings to Do After Minimal RHEL or CentOS 7 Installation--4.md | 1 + ...hings to Do After Minimal RHEL or CentOS 7 Installation--5.md | 1 + ...hings to Do After Minimal RHEL or CentOS 7 Installation--6.md | 1 + 4 files changed, 4 insertions(+) diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md index b3996cf818..c540a33b1b 100644 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md @@ -1,3 +1,4 @@ +Translating by ictlyh 30 Things to Do After Minimal RHEL/CentOS 7 Installation--3 ================================================================================ ### 12. Install Apache Tomcat ### diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md index 1840511000..647bb7c5cd 100644 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md @@ -1,3 +1,4 @@ +Translating by ictlyh 30 Things to Do After Minimal RHEL/CentOS 7 Installation--4 ================================================================================ ### 17. Installing Webmin ### diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md index 741df9a537..53b9d44a55 100644 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md @@ -1,3 +1,4 @@ +Translating by ictlyh 30 Things to Do After Minimal RHEL/CentOS 7 Installation--5 ================================================================================ ### 25. Install Linux Malware Detect (LMD) ### diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md index 04ea64d2f4..497883d022 100644 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md @@ -1,3 +1,4 @@ +Translating by ictlyh 30 Things to Do After Minimal RHEL/CentOS 7 Installation--6 ================================================================================ ### 30. Password Protect GRUB ### From 068d432fc324984f3a6f472247e53d46e6bece5e Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Sun, 26 Apr 2015 22:13:48 +0800 Subject: [PATCH 082/154] Translating by ZTinoZ --- ...409 Install Inkscape - Open Source Vector Graphic Editor.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md b/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md index afe663f074..fcbe4ee240 100644 --- a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md +++ b/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ Install Inkscape - Open Source Vector Graphic Editor ================================================================================ Inkscape is an open source vector graphic editing tool which uses Scalable Vector Graphics (SVG) and that makes it different from its competitors like Xara X, Corel Draw and Adobe Illustrator etc. SVG is a widely-deployed royalty-free graphics format developed and maintained by the W3C SVG Working Group. It is a cross platform tool which runs fine on Linux, Windows and Mac OS. @@ -92,4 +93,4 @@ via: http://linoxide.com/tools/install-inkscape-open-source-vector-graphic-edito [a]:http://linoxide.com/author/arunrz/ [1]:https://launchpad.net/~inkscape.dev/+archive/ubuntu/stable -[2]:https://inkscape.org/en/ \ No newline at end of file +[2]:https://inkscape.org/en/ From 09b7c75c513de8b0b65864976649f627824a9b17 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 26 Apr 2015 22:27:07 +0800 Subject: [PATCH 083/154] [Translated] tech/30 Things to Do After Minimal RHEL/CentOS 7 Installation--3 --- ...inimal RHEL or CentOS 7 Installation--3.md | 254 ------------------ ...inimal RHEL or CentOS 7 Installation--3.md | 253 +++++++++++++++++ 2 files changed, 253 insertions(+), 254 deletions(-) delete mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md create mode 100644 translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md deleted file mode 100644 index c540a33b1b..0000000000 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md +++ /dev/null @@ -1,254 +0,0 @@ -Translating by ictlyh -30 Things to Do After Minimal RHEL/CentOS 7 Installation--3 -================================================================================ -### 12. Install Apache Tomcat ### - -Tomcat is a servlet container designed by Apache to run Java HTTP web server. Install tomcat as below but it is necessary to point out that you must have installed Java prior of installing tomcat. - - # yum install tomcat - -![Install Apache Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-Tomcat.jpeg) -Install Apache Tomcat - -After tomcat has been installed, star the tomcat service. - - # systemctl start tomcat - -Check Version of tomcat. - - # /usr/sbin/tomcat version - -![Check Tomcat Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-tomcat-version.jpeg) -Check Tomcat Version - -Add service tomcat and default port (8080) through firewall and reload settings. - - # firewall-cmd –zone=public –add-port=8080/tcp --permannet - # firewall-cmd –reload - -Now it’s time to secure tomcat server, create a user and a password to access and manage. We need to edit file ‘/etc/tomcat/tomcat-users.xml‘. See the section which looks like: - - - .... - - - - - - - - - - - - -![Secure Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-Tomcat.jpeg) -Secure Tomcat - -Here we added user “tecmint” to administer/manage tomcat using password “tecmint”. Stop and start the service tomcat so that the changes are taken into effect and enable tomcat service to start at system boot. - - # systemctl stop tomcat - # systemctl start tomcat - # systemctl enable tomcat.service - -Read Also: Installing and Configuring Apache Tomcat 8.0.9 in RHEL/CentOS 7.0/6.x - -### 13. Install Nmap to Monitor Open Ports ### - -Nmap for Network Mapper creates a map of the network by discovering host on which it is running as well as by analyzing network. nmap is not included in the default installation and you have to install it from repository. - - # yum install nmap - -![Install Nmap Monitoring Tool](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Nmap.jpeg) -Install Nmap Monitoring Tool - -List all open ports and corresponding services using them on host. - - # namp 127.0.01 - -![Monitor Open Ports](http://www.tecmint.com/wp-content/uploads/2015/04/Monitor-Open-Ports.jpeg) -Monitor Open Ports - -You may also use firewall-cmd to list all the ports, however I find nmap more useful. - - # firewall-cmd –list-ports - -![Check Open Ports in Firewall](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Open-Ports-in-Firewall.jpeg) -Check Open Ports in Firewall - -Read Also: [29 Useful Nmap Command to Monitor Open Ports][1] - -### 14. FirewallD Configuration ### - -firewalld is a firewall service which manages the server dynamically. Firewalld removed iptables in CentOS 7. Firewalld is installed by default on RedHat Enterprise Linux and its derivatives by default. With iptables every change in order to be taken into effect needs to flush all the old rules and create new rules. - -However with firewalld, no flushing and recreating of new rules required and only changes are applied on the fly. - -Check if Firewalld is running or not. - - # systemctl status firewalld - OR - # firewall-cmd –state - -![Check Firewalld Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Status.jpeg) -Check Firewalld Status - -Get a list of all the zones. - - # firewall-cmd --get-zones - -![Check Firewalld Zones](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Zones.jpeg) -Check Firewalld Zones - -To get details on a zone before switching. - - # firewall-cmd --zone=work --list-all - -![Check Zone Details](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Zone-Details.jpeg) -Check Zone Details - -To get default zone. - - # firewall-cmd --get-default-zone - -![Firewalld Default Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Firewalld-Default-Zone.jpeg) -Firewalld Default Zone - -To switch to a different zone say ‘work‘. - - # firewall-cmd --set-default-zone=work - -![Swich Firewalld Zones](http://www.tecmint.com/wp-content/uploads/2015/04/Swich-Zones.jpeg) -Swich Firewalld Zones - -To list all the services in the zone. - - # firewall-cmd --list-services - -![List Firewalld Zone Services](http://www.tecmint.com/wp-content/uploads/2015/04/List-Firewalld-Service.jpeg) -List Firewalld Zone Services - -To add a service say http, temporarily and reload firewalld. - - # firewall-cmd --add-service=http - # firewall-cmd –reload - -Add http Service Temporarily - -Add http Service Temporarily - -To add a service say http, permanently and reload firewalld. - -# firewall-cmd --add-service=http --permanent -# firewall-cmd --reload - -![Add http Service Permanent](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Temporarily.jpeg) -Add http Service Permanent - -To remove a service say http, temporarily. - - # firewall-cmd --remove-service=http - # firewall-cmd --reload - -![Remove Firewalld Service Temporarily](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Permanent.jpeg) -Remove Firewalld Service Temporarily - -To remove a service say http, permanently. - - # firewall-cmd --zone=work --remove-service=http --permanent - # firewall-cmd --reload - -![Remove Service Permanently](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Service-Parmanently.jpeg) -Remove Service Permanently - -To allow a port (say 331), temporarily. - - # firewall-cmd --add-port=331/tcp - # firewall-cmd --reload - -![Open Firewalld Port Temporarily](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Temporarily.jpeg) -Open Port Temporarily - -To allow a port (say 331), permanently. - - # firewall-cmd --add-port=331/tcp --permanent - # firewall-cmd --reload - -![Open Port in Firewalld Permanent](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Permanent.jpeg) -Open Port Permanently - -To block/remove a port (say 331), temporarily. - - # firewall-cmd --remove-port=331/tcp - # firewall-cmd --reload - -![Remove Port Temporarily in Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Temporarily.jpeg) -Remove Port Temporarily - -To block/remove a port (say 331), permanently. - - # firewall-cmd --remove-port=331/tcp --permanent - # firewall-cmd --reload - -![Remove Port Permanently in Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Permanently.jpeg) -Remove Port Permanently - -To disable firewalld. - - # systemctl stop firewalld - # systemctl disable firewalld - # firewall-cmd --state - -![Disable Firewalld in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-Firewalld.jpeg) -Disable Firewalld Service - -To enable firewalld. - - # systemctl enable firewalld - # systemctl start firewalld - # firewall-cmd --state - -![Enable Firewalld in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Firewalld.jpeg) -Enable Firewalld - -- [How to Configure ‘FirewallD’ in RHEL/CentOS 7][2] -- [Useful ‘FirewallD’ Rules to Configure and Manage Firewall][3] - -### 15. Installing Wget ### - -wget is a Linux command line based utility that retrieves (downloads) content from web servers. It is an important tool you must have to retrieve web contents or download any files using wget command. - - # yum install wget - -![Install Wget Tool](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Wget.png) -Install Wget Tool - -For more usage and practical examples on how to use wget command to download files on the terminal, read [10 Wget Command Examples][4]. - -### 16. Installing Telnet ### - -Telnet is a network protocol that enables a user to login into another computer on the same network over TCP/IP. Once connection etablished to the remote computer it becomes a virtual terminal and allow you to communicate with the remote host within your computer as per whatever privileges provided to you. - -Telnet also very useful for checking listening ports on remote computer or host. - - # yum install telnet - # telnet google.com 80 - -![Telnet Port Checking](http://www.tecmint.com/wp-content/uploads/2015/04/telnet-testing.png) -Telnet Port Checking - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/3/ - -作者:[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://www.tecmint.com/nmap-command-examples/ -[2]:http://www.tecmint.com/configure-firewalld-in-centos-7/ -[3]:http://www.tecmint.com/firewalld-rules-for-centos-7/ -[4]:http://www.tecmint.com/10-wget-command-examples-in-linux/ \ No newline at end of file diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md new file mode 100644 index 0000000000..b3630b5aa5 --- /dev/null +++ b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md @@ -0,0 +1,253 @@ +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--3 +================================================================================ +### 12. 安装 Apache Tomcat ### + +Tomcat 是由 Apache 设计的用来运行 Java HTTP web 服务器的 servlet 容器。按照下面的方法安装 tomcat,但需要指出的是安装 tomcat 之前必须先安装 Java。 + + # yum install tomcat + +![安装 Apache Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-Tomcat.jpeg) +安装 Apache Tomcat + +安装完 tomcat 之后,启动 tomcat 服务。 + + # systemctl start tomcat + +查看 tomcat 版本。 + + # /usr/sbin/tomcat version + +![查看 tomcat 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-tomcat-version.jpeg) +查看 tomcat 版本 + +允许 tomcat 服务和默认端口(8080) 通过防火墙并重新加载设置。 + + # firewall-cmd –zone=public –add-port=8080/tcp --permannet + # firewall-cmd –reload + +现在该保护 tomcat 服务器了,添加一个用于访问和管理的用户和密码。我们需要编辑文件 ‘/etc/tomcat/tomcat-users.xml’。查看类似下面的部分: + + + .... + + + + + + + + + + + + +![保护 Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-Tomcat.jpeg) +保护 Tomcat + +我们在这里添加用户 “tecmint” 到 tomcat 的管理员/管理 组中,使用 “tecmint” 作为密码。先停止在启动 tomcat 服务以使更改生效,并添加 tomcat 服务到随系统启动。 + + # systemctl stop tomcat + # systemctl start tomcat + # systemctl enable tomcat.service + +请阅读: 在 RHEL/CentOS 7.0/6.x 中安装和配置 Apache Tomcat 8.0.9 + +### 13. 安装 Nmap 监视开放端口 ### + +Nmap 网络映射器通过检查运行它的主机以及分析网络创建一个网络映射。nmap 并没有默认安装,你需要从库中安装它。 + + # yum install nmap + +![安装 Nmap 监视工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Nmap.jpeg) +安装 Nmap 监视工具 + +列出主机中所有的开放端口以及对应使用它们的服务。 + + # namp 127.0.01 + +!监视开放端口](http://www.tecmint.com/wp-content/uploads/2015/04/Monitor-Open-Ports.jpeg) +监视开放端口 + +你也可以使用 firewall-cmd 列出所有端口,但我发现 nmap 更有用。 + + # firewall-cmd –list-ports + +![在防火墙中检查开放端口](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Open-Ports-in-Firewall.jpeg) +在防火墙中检查开放端口 + +请阅读: [Nmap 监视开放端口的 29 个有用命令][1] + +### 14. 配置 FirewallD ### + +firewalld 是动态管理服务器的防火墙服务。在 CentOS 7 中 Firewalld 移除了 iptables。在红帽企业版 Linux 和它的衍生版中默认安装了 Firewalld。如果有 iptables 的话为了使每个更改生效需要清空所有旧的规则然后创建新规则。 + +然而用firewalld,不需要清空并重新创建新规则就可以实现更改生效。 + +检查 Firewalld 是否运行。 + + # systemctl status firewalld + 或 + # firewall-cmd –state + +![检查 Firewalld 状态](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Status.jpeg) +检查 Firewalld 状态 + +获取所有的区域列表。 + + # firewall-cmd --get-zones + +![检查 Firewalld 区域](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Zones.jpeg) +检查 Firewalld 区域 + +在切换之前先获取区域的详细信息。 + + # firewall-cmd --zone=work --list-all + +![检查区域详情](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Zone-Details.jpeg) +检查区域详情 + +获取默认区域。 + + # firewall-cmd --get-default-zone + +![Firewalld 默认区域](http://www.tecmint.com/wp-content/uploads/2015/04/Firewalld-Default-Zone.jpeg) +Firewalld 默认区域 + +切换到另一个区域,比如 ‘work’。 + + # firewall-cmd --set-default-zone=work + +![切换 Firewalld 区域](http://www.tecmint.com/wp-content/uploads/2015/04/Swich-Zones.jpeg) +切换 Firewalld 区域 + +列出区域中的所有服务。 + + # firewall-cmd --list-services + +![列出 Firewalld 区域的服务](http://www.tecmint.com/wp-content/uploads/2015/04/List-Firewalld-Service.jpeg) +列出 Firewalld 区域的服务 + +添加临时服务,比如 http,然后重载 firewalld。 + + # firewall-cmd --add-service=http + # firewall-cmd –reload + +添加临时 http 服务 + +添加临时 http 服务 + +添加永久服务,比如 http,然后重载 firewalld。 + +# firewall-cmd --add-service=http --permanent +# firewall-cmd --reload + +![添加永久 http 服务](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Temporarily.jpeg) +添加永久 http 服务 + +删除临时服务,比如 http。 + + # firewall-cmd --remove-service=http + # firewall-cmd --reload + +![删除临时 Firewalld 服务](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Permanent.jpeg) +删除临时 Firewalld 服务 + +删除永久服务,比如 http + + # firewall-cmd --zone=work --remove-service=http --permanent + # firewall-cmd --reload + +![删除永久服务](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Service-Parmanently.jpeg) +删除永久服务 + +允许一个临时端口(比如 331)。 + + # firewall-cmd --add-port=331/tcp + # firewall-cmd --reload + +![打开临时 Firewalld 端口](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Temporarily.jpeg) +打开临时端口 + +允许一个永久端口(比如 331)。 + + # firewall-cmd --add-port=331/tcp --permanent + # firewall-cmd --reload + +![打开永久 Firewalld 端口](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Permanent.jpeg) +打开永久端口 + +阻塞/移除临时端口(比如 331)。 + + # firewall-cmd --remove-port=331/tcp + # firewall-cmd --reload + +![移除 Firewalld 临时端口](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Temporarily.jpeg) +移除临时端口 + +阻塞/移除永久端口(比如 331)。 + + # firewall-cmd --remove-port=331/tcp --permanent + # firewall-cmd --reload + +![移除 Firewalld 永久端口](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Permanently.jpeg) +移除永久端口 + +停用 firewalld。 + + # systemctl stop firewalld + # systemctl disable firewalld + # firewall-cmd --state + +![在 CentOS 7 中停用 Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-Firewalld.jpeg) +停用 Firewalld 服务 + +启用 firewalld。 + + # systemctl enable firewalld + # systemctl start firewalld + # firewall-cmd --state + +![在 CentOS 7 中取消 Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Firewalld.jpeg) +启用 Firewalld + +- [如何在 RHEL/CentOS 7 中配置 ‘Firewalld’][2] +- [配置和管理 Firewalld 的有用 ‘Firewalld’ 规则][3] + +### 15. 安装 Wget ### + +Wget 是基于 Linux 命令行从 web 服务器获取(下载)内容的工具。它是你使用 wget 命令获取 web 内容或下载任何文件必须要有的重要工具。 + + # yum install wget + +![安装 Wget 工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Wget.png) +安装 Wget 工具 + +关于在终端中如何使用 wget 命令下载文件的方法和实际例子,请阅读[10 个 Wget 命令例子][4]。 + +### 16. 安装 Telnet ### + +Telnet 是通过 TCP/IP 允许用户登录到相同网络上的另一台计算机的网络协议。和远程计算机的连接建立后,它就成为了一个允许你在自己的计算机上用所有提供给你的权限和远程主机交互的虚拟终端。 + +Telnet 对于检查远程计算机或主机的监听端口也非常有用。 + + # yum install telnet + # telnet google.com 80 + +![检查 Telnet 端口](http://www.tecmint.com/wp-content/uploads/2015/04/telnet-testing.png) +检查 Telnet 端口 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/3/ + +作者:[Avishek Kumar][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/nmap-command-examples/ +[2]:http://www.tecmint.com/configure-firewalld-in-centos-7/ +[3]:http://www.tecmint.com/firewalld-rules-for-centos-7/ +[4]:http://www.tecmint.com/10-wget-command-examples-in-linux/ \ No newline at end of file From 263617b18db21bccc42652a09924fef57de9349c Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 27 Apr 2015 09:04:04 +0800 Subject: [PATCH 084/154] [Translated] tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4 --- ...inimal RHEL or CentOS 7 Installation--4.md | 177 ------------------ ...inimal RHEL or CentOS 7 Installation--4.md | 176 +++++++++++++++++ 2 files changed, 176 insertions(+), 177 deletions(-) delete mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md create mode 100644 translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md deleted file mode 100644 index 647bb7c5cd..0000000000 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md +++ /dev/null @@ -1,177 +0,0 @@ -Translating by ictlyh -30 Things to Do After Minimal RHEL/CentOS 7 Installation--4 -================================================================================ -### 17. Installing Webmin ### - -Webmin is a Web based configuration tool for Linux. It acts as a central system to configure various system configuration like users, disk quota, services and configurations of HTTP server, Apache, MySQL, etc. - - # wget http://prdownloads.sourceforge.net/webadmin/webmin-1.740-1.noarch.rpm - # rpm -ivh webmin-*.rpm - -![Install Webmin on CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Webmin.jpeg) -Install Webmin - -After webmin installation, you will get a message on terminal to login to your host (http://ip-address:10000) using your root password on port number 10000. If running a headless server you can forward the port and access it on a machine/server that is headed. - -### 18. Enable Third Party Repositories ### - -It is not a good idea to add untrusted repositories specially in production and it may be fatal. However just for example here we will be adding a few community approved trusted repositories to install third party tools and packages. - -Add Extra Package for Enterprise Linux (EPEL) Repository. - - # yum install epel-release - -Add Community Enterprise Linux Repository. - - # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm - -![Install Epel Repo](http://www.tecmint.com/wp-content/uploads/2015/04/install-epel-repo.jpeg) -Install Epel Repo - -**Attention**! Extra care is needs to be taken while adding Third Party Repository. - -### 19. Install 7-zip Utility ### - -In the CentOS Minimal Install you don’t get utility like unzip or unrar. We have the option to install each utility as required or an utility that servers for all. 7-zip is such an utility which compress and extract files of all known types. - - # yum install p7zip - -![Install 7zip Tool](http://www.tecmint.com/wp-content/uploads/2015/04/Install-7zip-tool.jpeg) -Install 7zip Tool - -**Notice**: The package is downloaded and installed from Fedora EPEL 7 Repository. - -### 20. Install NTFS-3G Driver ### - -A small yet very useful NTFS driver called NTFS-3G is available for most of the UNIX-like distribution. It is useful to mount and access Windows NTFS file system. Though other alternatives like Tuxera NTFS is available, NTFS-3G is most widely used. - - # yum install ntfs-3g - -![Install NTFS-3G in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-NTFS-3G.jpeg) -Install NTFS-3G to Mount Windows Partition - -After installing ntfs-3g has been installed, you can mount Windows NTFS partitions (where /dev/sda5 is my windows drive) using following command. - - # mount -ro ntfs-3g /dev/sda5 /mnt - # cd /mnt - # ls -l - -### 21. Install Vsftpd FTP Server ### - -VSFTPD which stands for Very Secure File Transfer Protocol Daemon is a FTP server for UNIX-like System. It is one of the most efficient and secure FTP Server available today. - - # yum install vsftpd - -![Install Vsftpd in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Install-FTP.jpeg) -Install Vsftpd FTP - -Edit the configuration file located at ‘/etc/vsftpd/vsftpd.conf‘ to secure vsftpd. - - # vi /etc/vsftpd/vsftpd.conf - -Edit a few fields and leave other as it is, unless you know what you are doing. - - anonymous_enable=NO - local_enable=YES - write_enable=YES - chroot_local_user=YES - -You may also change the port number and open vsftpd port through the firewall. - - # firewall-cmd --add-port=21/tcp - # firewall-cmd --reload - -Next restart vsftpd and enable to start at boot time. - - # systemctl restart vsftpd - # systemctl enable vsftpd - -### 22. Install and Configure sudo ### - -sudo which is commonly called as super do as well as suitable user do is a program for UNIX-like operating system to execute a program with the security privileged of another user. Let’s see how to configure sudo… - - # visudo - -It will open the file /etc/sudoers for editing.. - -![sudoers File](http://www.tecmint.com/wp-content/uploads/2015/04/sudoers-File.jpeg) -sudoers File - -Give all the permission (equal to root) to a user (say tecmint), that has already been created. - - tecmint ALL=(ALL) ALL - -Give all the permission (equal to root) to a user (say tecmint), except the permission to reboot and shutdown the server. - -Again open the same file and edit it with the below contents. - - cmnd_Alias nopermit = /sbin/shutdown, /sbin/reboot - -Then add alias with Logical (!) operator. - - tecmint ALL=(ALL) ALL,!nopermit - -Give permission to a group (say debian) to run a few root privilege command say (add user and delete user) . - - cmnd_Alias permit = /usr/sbin/useradd, /usr/sbin/userdel - -And then add the permission to group debian. - - debian ALL=(ALL) permit - -### 23. Install and Enable SELinux ### - -SELinux which stands for Security-Enhanced Linux is a security module at kernel level. - -# yum install selinux-policy - -![Install SElinux in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Install-SElinux.jpeg) -Install SElinux Policy - -Check SELinux Mode. - - # getenforce - -![Check SELinux Mode](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SELinux-Mode.jpeg) -Check SELinux Mode - -The output is enforcing mode which means SELinux policy is in effect. - -For debugging, set selinux mode to permissive temporarily. No need to reboot. - - # setenforce 0 - -After debugging set selinux to enforcing again without rebooting. - - # setenforce 1 - -### 24. Install Rootkit Hunter ### - -Rootkit Hunter abbreviated as Rkhunter is an application that scan rootkits and other potentially harmful exploits in Linux systems. - - # yum install rkhunter - -![Install Rootkit Hunter](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Rootkit-Hunter.jpeg) -Install Rootkit Hunter - -Run rkhunter as a scheduled job, from a script file or manually to scan harmful exploits in Linux. - - # rkhunter --check - -![Scan for rootkits](http://www.tecmint.com/wp-content/uploads/2015/04/Scan-for-rootkits.png) -Scan for rootkits - -![RootKit Scan Results](http://www.tecmint.com/wp-content/uploads/2015/04/RootKit-Results.png) -RootKit Scan Results - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/4/ - -作者:[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/ \ No newline at end of file diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md new file mode 100644 index 0000000000..f73d1e9b3b --- /dev/null +++ b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md @@ -0,0 +1,176 @@ +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--4 +================================================================================ +### 17. 安装 Webmin ### + +Webmin 是基于 Web 的 Linux 配置工具。它像一个中央系统用于配置各种系统设置,比如用户、磁盘分配、服务以及 HTTP 服务器、Apache、MySQL 等的配置。 + + # wget http://prdownloads.sourceforge.net/webadmin/webmin-1.740-1.noarch.rpm + # rpm -ivh webmin-*.rpm + +![在 CentOS 7 上安装 Webmin](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Webmin.jpeg) +安装 Webmin + +安装完 webmin 后,你会在终端上得到一个用你的 root 密码在 端口 10000 登录你的主机(http://ip-address:10000)的信息。 如果运行的是无头服务器(译注:无头服务器是指没有专门用于向其它计算机和它们的用户提供服务的本地接口的计算设备)你可以转发端口然后从有头机器/服务器上访问它。 + +### 18. 启用第三方库 ### + +添加不受信任的库并不是一个好主意,尤其是在生产环境中,这可能导致致命的问题。但仅作为例子在这里我们会添加一些社区证实可信任的库用于安装第三方工具和软件包。 + +为企业版 Linux(EPEL)库添加额外的软件包。 + + # yum install epel-release + +添加社区企业版 Linux 库 + + # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm + +![安装 Epel 库](http://www.tecmint.com/wp-content/uploads/2015/04/install-epel-repo.jpeg) +安装 Epel 库 + +**注意**! 添加第三方库的时候尤其需要注意。 + +### 19. 安装 7-zip 工具 ### + +在最小化安装 CentOS 时你并没有获得类似 unzip 或者 untar 的工具。我们可以选择基于需要安装每个工具或者一个能处理所有格式的工具。7-zip 就是一个能压缩和解压所有已知类型文件的工具。 + + # yum install p7zip + +![安装 7zip 工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-7zip-tool.jpeg) +安装 7zip 工具 + +**注意**: 该软件包从 Fedora EPEL 7 的库中下载和安装。 + +### 20. 安装 NTFS-3G 驱动 ### + +NTFS-3G,一个很小但非常有用的 NTFS 驱动在大部分类 UNIX 发行版上都可用。它对于挂载和访问 Windows NTFS 文件系统很有用。尽管也有其它可用的替代品,比如 Tuxera,但 NTFS-3G 是使用最广泛的。 + + # yum install ntfs-3g + +![在 CentOS 上安装 NTFS-3G](http://www.tecmint.com/wp-content/uploads/2015/04/Install-NTFS-3G.jpeg) +安装 NTFS-3G 用于挂载 Windows 分区 + +ntfs-3g 安装完成之后,你可以使用以下命令挂载 Windows NTFS 分区(我的 Windows 分区是 /dev/sda5)。 + + # mount -ro ntfs-3g /dev/sda5 /mnt + # cd /mnt + # ls -l + +### 21. 安装 Vsftpd FTP 服务器 ### + +VSFTPD 表示 Very Secure File Transfer Protocol Daemon,是用于类 UNIX 系统的 FTP 服务器。它是现今最高效和安全的 FTP 服务器之一。 + + # yum install vsftpd + +![在 CentOS 7 上安装 Vsftpd](http://www.tecmint.com/wp-content/uploads/2015/04/Install-FTP.jpeg) +安装 Vsftpd FTP + +编辑配置文件 ‘/etc/vsftpd/vsftpd.conf’ 用于保护 vsftpd。 + + # vi /etc/vsftpd/vsftpd.conf + +编辑一些值并使其它保留原样,除非你知道自己在做什么。 + + anonymous_enable=NO + local_enable=YES + write_enable=YES + chroot_local_user=YES + +你也可以更改端口号并使 vsftpd 端口通过防火墙。 + + # firewall-cmd --add-port=21/tcp + # firewall-cmd --reload + +下一步重启 vsftpd 并启用随机启动。 + + # systemctl restart vsftpd + # systemctl enable vsftpd + +### 22. 安装和配置 sudo ### + +sudo 通常被称为 super do 或者 suitable user do,是一个类 UNIX 操作系统中用其它用户的安全权限执行程序的软件。让我们来看看怎样配置 sudo。 + + # visudo + +打开要编辑的文件 /etc/sudoers + +![sudoers 文件](http://www.tecmint.com/wp-content/uploads/2015/04/sudoers-File.jpeg) +sudoers 文件 + +给一个已经创建的用户(比如 tecmint)赋予所有权限(等同于 root)。 + + tecmint ALL=(ALL) ALL + +给一个已经创建的用户(比如 tecmint)赋予除重启和关闭服务器以外的所有权限(等同于 root)。 + +再一次打开文件并用下面的内容编辑文件。 + + cmnd_Alias nopermit = /sbin/shutdown, /sbin/reboot + +用 逻辑操作符(!) 添加别名。 + + tecmint ALL=(ALL) ALL,!nopermit + +准许一个组(比如 debian) 运行一些 root 权限命令,比如(增加或删除用户)。 + + cmnd_Alias permit = /usr/sbin/useradd, /usr/sbin/userdel + +给组 debian 增加权限。 + + debian ALL=(ALL) permit + +### 23. 安装并启用 SELinux ### + +SELinux 表示 Security-Enhanced Linux,是内核级别的安全模块。 + + # yum install selinux-policy + +![在 CentOS 7 上安装 SElinux](http://www.tecmint.com/wp-content/uploads/2015/04/Install-SElinux.jpeg) +安装 SElinux 策略 + +查看 SELinux 模式。 + + # getenforce + +![查看 SELinux 模式](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SELinux-Mode.jpeg) +查看 SELinux 模式 + +输出是 Enforcing,意味着 SELinux 策略已经生效。 + +为了调试,可以临时设置 selinux 模式为允许。不需要重启。 + + # setenforce 0 + +调试完了之后再次设置 selinux 为强制模式,无需重启。 + + # setenforce 1 + +### 24. 安装 Rootkit Hunter ### + +Rootkit Hunter,简写为 RKhunter,是在 Linux 系统中扫描 rootkits 和其它可能有害攻击的程序。 + + # yum install rkhunter + +![安装 Rootkit Hunter](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Rootkit-Hunter.jpeg) +安装 Rootkit Hunter + +在 Linux 中,从脚本文件以计划作业的形式运行 rkhunter 或者手动扫描有害攻击。 + + # rkhunter --check + +![扫描 rootkits](http://www.tecmint.com/wp-content/uploads/2015/04/Scan-for-rootkits.png) +扫描 rootkits + +![RootKit 扫描结果](http://www.tecmint.com/wp-content/uploads/2015/04/RootKit-Results.png) +RootKit 扫描结果 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/4/ + +作者:[Avishek Kumar][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ \ No newline at end of file From 0147f2b3896fa6fbb88bfa711d1043a50ac63866 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 27 Apr 2015 09:42:28 +0800 Subject: [PATCH 085/154] [Translated] tech/30 Things to Do After Minimal RHEL/CentOS 7 Installation--5 --- ...inimal RHEL or CentOS 7 Installation--5.md | 136 ------------------ ...inimal RHEL or CentOS 7 Installation--5.md | 134 +++++++++++++++++ 2 files changed, 134 insertions(+), 136 deletions(-) delete mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md create mode 100644 translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md deleted file mode 100644 index 53b9d44a55..0000000000 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md +++ /dev/null @@ -1,136 +0,0 @@ -Translating by ictlyh -30 Things to Do After Minimal RHEL/CentOS 7 Installation--5 -================================================================================ -### 25. Install Linux Malware Detect (LMD) ### - -Linux Malware Detect (LMD) is a open source Linux malware scanner released under the GNU GPLv2 license, that is -specially designed for threats faced in hosting environments. For complete installation, configuration and usage of LMD can be found at: - -- [Install and Use (LMD) with ClamAV as Antivirus Engine][1] - -### 26. Server Bandwidth Testing with Speedtest-cli ### - -speedtest-cli is a tool written in python to test internet bandwidth including download and upload speed. For complete installation and usage of speedtest-cli tool, read our article at [Check Linux Server Bandwidth Speed from Command Line][2] - -### 27. Configure Cron Jobs ### - -This is one of the most widely used software utility. It function as job scheduler i.e., schedule a job now that will execute in future itself. It is useful in logging and maintaining records unattained as well as several other routine work like regular backup. All the schedule is written in /etc/crontab file. - -The crontab file contains 6 fields as follows: - - Minutes Hour Day of Month Month of Year Week Day Command - (0-59) (0-23) (1-31) (1/jan-12/dec) (0-6/sun-sat) Command/script - -![Crontab Fields](http://www.tecmint.com/wp-content/uploads/2015/04/Crontab-Fields.jpeg) -Crontab Fields - -To run a cron job (say run /home/$USER/script.sh) everyday at 04:30 am. - - Minutes Hour Day of Month month of year Week Day command - 30 4 * * * speedtest-cli - -Add the following entry to the crontab file ‘/etc/crontab/‘. - - 30 4 * * * /home/$user/script.sh - -After adding the above line to crontab, it will run automatically at 04:30 am everyday and the output depends upon what is there in script file. Moreover script can be replaced by commands. For more examples of cron jobs, read [11 Cron Jobs Examples in Linux][3] - -### 28. Install Owncloud ### - -Owncloud is a HTTP based data synchronization, file sharing and remote file storage application. For more detail on installing own cloud, you may like to see this article : [Create Personal/Private Cloud Storage in Linux][4] - -### 29. Enable Virtualization with Virtualbox ### - -Virtualization is a process of creating virtual OS, Hardware and Network, is one of the most sought technology of these days. We will be discussing on how to install and configure virtualization in detail. - -Our CentOS Minimal server is a headless server. Lets prepare it to host virtual machines that is accessible over HTTP by installing following packages. - - # yum groupinstall 'Development Tools' SDL kernel-devel kernel-headers dkms - -![Install Development Tools](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Development-Tool.jpeg) -Install Development Tools - -Change working directory to ‘/etc/yum.repos.d/‘ and download Virtualbox repository. - - # wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc - -Install the key just downloaded. - - # rpm --import oracle_vbox.asc - -Update and Install Virtualbox. - - # yum update && yum install virtualbox-4.3 - -Next, download and install Virtualbox extension pack. - - # wget http://download.virtualbox.org/virtualbox/4.3.12/Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack - # VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack - -![Install Virtualbox Extension Pack](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Virtualbox-Extension-Pack.jpeg) -Install Virtualbox Extension Pack - -![Installing Virtualbox Extension Pack](http://www.tecmint.com/wp-content/uploads/2015/04/Installing-Virtualbox-Extension-Pack.jpeg) -Installing Virtualbox Extension Pack - -Create a user ‘vbox‘ to manage virtualbox and add it to group vboxusers. - - # adduser vbox - # passwd vobx - # usermod -G vboxusers vbox - -Install HTTPD server. - - # yum install httpd - -Install PHP (with soap extension). - - # yum install php php-devel php-common php-soap php-gd - -Download PHP virtualBox. - - # wget http://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-4.3-1.zip - -Extract the zip and copy the extracted folder to HTTP working directory. - - # unzip phpvirtualbox-4.*.zip - # cp phpvirtualbox-4.3-1 -R /var/www/html - -Next, rename file /var/www/html/phpvirtualbox/config.php-example to var/www/html/phpvirtualbox/config.php. - - # mv config.php.example config.php - -Open the configuration file to edit and add ‘username‘ and ‘password‘ we just created in the above step. - - # vi config.php - -Finally, restart VirtualBox and HTTP server. - - # service vbox-service restart - # service httpd restart - -Now forward the port and access it on a headed server. - - http://192.168.0.15/phpvirtualbox-4.3-1/ - -![PHP Virtualbox Login](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox-Login.png) -PHP Virtualbox Login - -![PHP Virtualbox Dashboard](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox.png) -PHP Virtualbox Dashboard - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/5/ - -作者:[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://www.tecmint.com/install-linux-malware-detect-lmd-in-rhel-centos-and-fedora/ -[2]:http://www.tecmint.com/check-internet-speed-from-command-line-in-linux/ -[3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ -[4]:http://www.tecmint.com/install-owncloud-to-create-personal-storage-in-linux/ \ No newline at end of file diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md new file mode 100644 index 0000000000..9845595af0 --- /dev/null +++ b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md @@ -0,0 +1,134 @@ +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--5 +================================================================================ +### 25. 安装 Linux Malware Detect (LMD) ### + +Linux Malware Detect (LMD) 是 GNU GPLv2 协议下发布的开源 Linux 恶意程序扫描器,尤其是为面临威胁的主机环境。LMD 完整的安装、配置以及使用方法可以查看: + +- [安装 LMD 并和 ClamAV 一起使用作为反病毒引擎][1] + +### 26. 用 Speedtest-cli 测试服务器带宽 ### + +speedtest-cli 是用 python 写的用于测试网络下载和上传带宽的工具。关于 speedtest-cli 工具的完整安装和使用请阅读我们的文章[用命令行查看 Linux 服务器带宽][2] + +### 27. 配置 Cron 作业 ### + +这是最广泛使用的软件工具之一。它是一个作业调度器,比如,现在安排一个以后可以自动运行的作业。它对于日志、保存没有实现的记录以及其它日常工作,比如常规备份,非常有用。所有的调度都写在文件 /etc/crontab 中。 + +crontab 文件包含下面的 6 个域: + + 分 时 日期 月份 星期 命令 + (0-59) (0-23) (1-31) (1/jan-12/dec) (0-6/sun-sat) Command/script + +![Crontab 域](http://www.tecmint.com/wp-content/uploads/2015/04/Crontab-Fields.jpeg) +Crontab 域 + +在每天 04:30 运行一个 cron 作业(比如运行 /home/$USER/script.sh)。 + + 分 时 日期 月份 星期 命令 + 30 4 * * * speedtest-cli + +把下面的条目增加到 crontab 文件 ‘/etc/crontab/’。 + + 30 4 * * * /home/$user/script.sh + +把上面一行增加到 crontab 之后,它会在每天的 04:30 am 自动运行,输出取决于脚本文件的内容。另外脚本也可以用命令代替。关于更多 cron 作业的例子,可以阅读[Linux 上的 11 个 Cron 作业例子][3] + +### 28. 安装 Owncloud ### + +Owncloud 是一个基于 HTTP 的数据同步、文件共享和远程文件存储应用。更多关于安装 owncloud 的内容,你可以阅读这篇文章:[在 Linux 上创建个人/私有云存储][4] + +### 29. 启用 Virtualbox 虚拟化 ### + +虚拟化是创建虚拟操作系统、硬件和网络的过程,是当今最热门的技术之一。我们会详细地讨论如何安装和配置虚拟化。 + +我们的最小化 CentOS 服务器是一个无头服务器(译注:无头服务器是指没有专门用于向其它计算机和它们的用户提供服务的本地接口的计算设备)。我们通过安装下面的软件包为它承载可通过 HTTP 访问的虚拟机器做准备。 + + # yum groupinstall 'Development Tools' SDL kernel-devel kernel-headers dkms + +![安装开发工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Development-Tool.jpeg) +安装开发工具 + +更改工作目录到 ‘/etc/yum.repos.d/’ 并下载 VirtualBox 库。 + + # wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc + +安装刚下载的密钥。 + + # rpm --import oracle_vbox.asc + +升级并安装 VirtualBox。 + + # yum update && yum install virtualbox-4.3 + +下一步,下载和安装 VirtualBox 扩展包。 + + # wget http://download.virtualbox.org/virtualbox/4.3.12/Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack + # VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack + +![安装 VirtualBox 扩展包](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Virtualbox-Extension-Pack.jpeg) +安装 VirtualBox 扩展包 + +![正在安装 VirtualBox 扩展包](http://www.tecmint.com/wp-content/uploads/2015/04/Installing-Virtualbox-Extension-Pack.jpeg) +正在安装 VirtualBox 扩展包 + +添加用户 ‘vbox’ 用于管理 VirtualBox 并把它添加到组 vboxusers 中。 + + # adduser vbox + # passwd vobx + # usermod -G vboxusers vbox + +安装 HTTPD 服务器。 + + # yum install httpd + +安装 PHP (有 soap 扩展)。 + + # yum install php php-devel php-common php-soap php-gd + +下载 PHP virtualBox. + + # wget http://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-4.3-1.zip + +解压 zip 文件并把解压后的文件夹复制到 HTTP 工作目录。 + + # unzip phpvirtualbox-4.*.zip + # cp phpvirtualbox-4.3-1 -R /var/www/html + +下一步,重命名文件 /var/www/html/phpvirtualbox/config.php-example 为 var/www/html/phpvirtualbox/config.php。 + + # mv config.php.example config.php + +打开配置文件并添加我们上一步创建的 ‘username ’ 和 ‘password’。 + + # vi config.php + +最后,重启 VirtualBox 和 HTTP 服务器。 + + # service vbox-service restart + # service httpd restart + +转发端口并从一个有头服务器上访问它。 + + http://192.168.0.15/phpvirtualbox-4.3-1/ + +![登录 PHP Virtualbox](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox-Login.png) +登录 PHP Virtualbox + +![PHP Virtualbox 面板](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox.png) +PHP Virtualbox 面板 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/5/ + +作者:[Avishek Kumar][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/install-linux-malware-detect-lmd-in-rhel-centos-and-fedora/ +[2]:http://www.tecmint.com/check-internet-speed-from-command-line-in-linux/ +[3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ +[4]:http://www.tecmint.com/install-owncloud-to-create-personal-storage-in-linux/ \ No newline at end of file From 4d206ac27b2cf2686fcb05fdbb340bb8cca9da70 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 27 Apr 2015 10:12:04 +0800 Subject: [PATCH 086/154] [Translated] tech/30 Things to Do After Minimal RHEL/CentOS 7 Installation--6 --- ...inimal RHEL or CentOS 7 Installation--6.md | 81 ------------------- ...inimal RHEL or CentOS 7 Installation--6.md | 80 ++++++++++++++++++ 2 files changed, 80 insertions(+), 81 deletions(-) delete mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md create mode 100644 translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md deleted file mode 100644 index 497883d022..0000000000 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md +++ /dev/null @@ -1,81 +0,0 @@ -Translating by ictlyh -30 Things to Do After Minimal RHEL/CentOS 7 Installation--6 -================================================================================ -### 30. Password Protect GRUB ### - -Password protect your boot loader so that you get an additional level of security right at the booting time. Also you get a protection layer of protection at physical level. Protect your Server by locking GRUB at boot to avoid any unauthorized access. - -First make backup of two files, so that if anything goes bad, you have the option to revert back. Create a backup of ‘/etc/grub2/grub.cfg‘ as ‘/etc/grub2/grub.cfg.old‘. - - # cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.old - -Also, Create a backup of ‘/etc/grub.d/10_linux‘ as ‘/etc/grub.d/10_linux.old‘. - - # cp /etc/grub.d/10_linux /etc/grub.d/10_linux.old - -Now open ‘/etc/grub.d/10_linux‘ and add the below line at the end of the file. - - cat < Date: Mon, 27 Apr 2015 10:28:58 +0800 Subject: [PATCH 087/154] PUB:20150318 Install And Use 'Go For It!' To Do App In Linux @wi-cuckoo --- ...And Use 'Go For It!' To Do App In Linux.md | 91 ++++++++++++++++++ ...And Use 'Go For It!' To Do App In Linux.md | 94 ------------------- 2 files changed, 91 insertions(+), 94 deletions(-) create mode 100644 published/20150318 Install And Use 'Go For It!' To Do App In Linux.md delete mode 100644 translated/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md diff --git a/published/20150318 Install And Use 'Go For It!' To Do App In Linux.md b/published/20150318 Install And Use 'Go For It!' To Do App In Linux.md new file mode 100644 index 0000000000..d76fecea59 --- /dev/null +++ b/published/20150318 Install And Use 'Go For It!' To Do App In Linux.md @@ -0,0 +1,91 @@ +在Linux上安装使用‘Go for it!’备忘软件 +=============================================================================== +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_For_It_TODO_Linux.jpeg) + +你在 Linux 桌面是如何管理任务和备忘的?我喜欢[用 Ubuntu 的粘帖便签][1]很久了。但是我要面对与其他设备同步的麻烦,特别是我的智能手机。这就是我为什么选择使用 [Google Keep][2] 的原因了。 + +Google Keep 是一款功能丰富的软件,我十分喜爱,而且喜欢到把它叫做 [Linux 的 Evernote ][3]地步。但是并不是每个人都喜欢一款功能丰富的备忘录软件。极简主义是目前的主流,很多人喜欢。如果你是极简主义的追求者之一,而且正在寻找一款开源的备忘录软件,那么你应该试一试 [Go For It!][4]。 + +### Go For It!高效的Linux桌面软件 ### + +Go For It!是一款简洁的备忘软件,借助定时提醒帮助你专注于工作。所以,当你添加一个任务到列表后,可以附上一个定时器。到设定时间后,它就会提醒你去做任务。你可以看看其帅哥开发者 [Manuel Kehl][5] 制作的视频(youtube 视频) : https://www.youtube.com/watch?v=mnw556C9FZQ + +### 安装 Go For It!### + +要在 Ubuntu 15.04,14.04 和其他基于 Ubuntu 的Linux 发行版,如Linux Mint, elementary OS Freya 等上面安装 Go For It!请使用这款软件官方的 PPA: + + sudo add-apt-repository ppa:mank319/go-for-it + sudo apt-get update + sudo apt-get install go-for-it + +你也可以下载 .deb 包,Windows 安装包和源代码,链接如下: + +- [Download source code][6] +- [Download .deb binaries][7] +- [Download for Windows][8] + +### 在Linux桌面使用 Go For It!### + +Go For It!使用真心方便。你只需添加任务到列表中,任务会自动存入 todo.txt 文件中。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux.png) + +每个任务默认定时25分钟。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_1.png) + +任务一旦完成,就会被自动存档到 done.txt 文件中。根据设置,它会在规定的时间间隔或者任务过期前不久,发送桌面提醒: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Linux_notification.png) + +你可以从配置里面修改所有的偏好。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_2.png) + +目前一切都看着挺好。但是在智能手机上使用体验怎样呢?如果你不能使它在不同设备间同步,那这款高效软件就是不完整的。好消息是 Go For It!是基于 [todo.txt][9] 的,这意味着你可以用第三方软件和像 Dropbox 一样的云服务来使用它。 + +### 在安卓手机和平板上使用Go For It! ### + +在这里你需要做一些工作。首先的首先,在 Linux 和你的安卓手机上安装 Dropbox,如果之前没有安装的话。下一步你要做的就是要配置 Go For It!和 **修改 todo.txt 的目录到 Dropbox 的路径下**。 + +然后,你得去下载 [Simpletask Andriod app][10]。这是免费的应用。安装它。当你第一次运行 Simletask 的时候,你会被要求关联你的账号到 Dropbox: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android_1.jpeg) + +一旦你完成了 Simpletask 与 Dropbox 的关联,就可以打开应用了。如果你已经修改了 Go For It 的配置,将文件保存到Dropbox 上,你就应该可以在 Simpletask 里看到。而如果你没有看到,点击应用底部的设置,选择 Open Todo file 的选项: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android.jpeg) + +现在,你应该可以看到 Simpletask 同步的任务了。 + +### 总结 ### + +对于 Simpletask,你就可以以类似[标记语言工具][11]的风格使用它。对于小巧和专注而言,Go For It!是一款不错的备忘软件。一个干净的界面是额外的加分点。如果拥有它自己的手机应用就更好了,但是我们也有临时替代方案了。 + +底层来讲,Go For It! 不会运行在后台。这就是说,你不得不让它一直保持运行。它甚至没有一个最小化的按钮,这有一点小小的烦扰。我想要看到的是有一个小的指示程序,运行在后台,并且快速进入主面板,这肯定会提升其可用性。 + +试试 Go For It!吧,分享一下你的使用体验。在 Linux 桌面上,你还使用了哪些其他的备忘软件?比起其他你最喜欢的同类应用,Go For It!怎么样? + +------------------------------------------------------------------------------- + + +via: http://itsfoss.com/go-for-it-to-do-app-in-linux/ + +作者:[Abhishek][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/indicator-stickynotes-windows-like-sticky-note-app-for-ubuntu/ +[2]:http://itsfoss.com/install-google-keep-ubuntu-1310/ +[3]:http://itsfoss.com/5-evernote-alternatives-linux/ +[4]:http://manuel-kehl.de/projects/go-for-it/ +[5]:http://manuel-kehl.de/about-me/ +[6]:https://github.com/mank319/Go-For-It +[7]:https://launchpad.net/~mank319/+archive/ubuntu/go-for-it +[8]:http://manuel-kehl.de/projects/go-for-it/download-windows-version/ +[9]:http://todotxt.com/ +[10]:https://play.google.com/store/apps/details?id=nl.mpcjanssen.todotxtholo&hl=en +[11]:http://itsfoss.com/install-latex-ubuntu-1404/ diff --git a/translated/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md b/translated/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md deleted file mode 100644 index 6fa5899404..0000000000 --- a/translated/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md +++ /dev/null @@ -1,94 +0,0 @@ -在Linux上安装与使用‘Go for it!’备忘软件 -=============================================================================== -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_For_It_TODO_Linux.jpeg) - -你在Linux桌面是如何管理任务和备忘的?我喜欢[用Ubuntu的粘滞便签][1]很久了。但是我要面对与其他设备同步的麻烦,特别是我的智能手机。这就是我为什么选择使用[Google Keep][2]的原因了。 - -现在,Google Keep是一款功能丰富的软件,我十分喜爱,而且喜欢到把他叫做[Linux的Evernote][3]地步。但是并不是每个人都喜欢一款功能丰富的备忘录软件。极简主义是目前的主流,很多人喜欢。如果你是极简主义的追求者之一,而且正在寻找一款开源的备忘录软件,那么你应该试一试[Go For It!][4]。 - -### Go For It!高效的Linux桌面软件 ### - -Go For It!是一款简洁的备忘软件,借助定时提醒帮助你专注于工作。所以,你添加一个任务到列表后,可以附上一个定时器。到设定时间后,它就会提醒你去做任务。你可以看看其开发者制作的视频,[Manuel Kehl][5]: - -注释:youtube视频,发布的时候可做成一个链接 - - -### 安装 Go For It!### - -为在Ubuntu 15.04,14.04和其他基于Linux内核的Ubuntu版本,如Linux Mint,初级操作系统Freya等等上面安装 Go For It!请使用这款软件官方的PPA: - - sudo add-apt-repository ppa:mank319/go-for-it - sudo apt-get update - sudo apt-get install go-for-it - -你也可以下载.deb包,Windows安装包和源代码,从下面不同的连接中: - -- [Download source code][6] -- [Download .deb binaries][7] -- [Download for Windows][8] - -### 在Linux桌面使用Go For It!### - -Go For It!使用真心方便。你只需添加任务到列表中,任务会自动存入todo.txt文件中。 - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux.png) - -默认是为每个任务定时25分钟。 - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_1.png) - -任务一旦完成,就会被自动存档到done.txt文件中。根据喜好,它会在规定的时间间隔或者任务过期前不久,发送桌面提醒: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Linux_notification.png) - -你可以从配置里面修改所有的喜好。 - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_2.png) - -目前一切都看着挺好。但是在智能手机上使用体验怎样呢?如果你不能使它在不同设备间同步,那这款高效软件就是不完整的。好消息是Go For It!是基于[todo.txt][9]的,这意味着你可以用第三方软件和像Dropbox一样的云服务来使用它。 - -### 在安卓手机和平板上使用Go For It! ### - -在这里你需要做一些工作。首先的首先,在Linux和你的安卓手机上安装Dropbox,如果之前没有安装的话。下一步你要做的就是要配置Go For It!和 **改todo.txt的目录到Dropbox的路径下**。 - -然后,你得去下载[Simpletask Andriod app][10]。这是免费的应用。安装它。当你第一次运行Simletask的时候,你会被要求关联你的账号到Dropbox: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android_1.jpeg) - -一旦你完成了Simpletask与Dropbox的关联,就可以打开应用。如果你已经修改了Go For It的配置,将文件保存到Dropbox上,你就应该可以在Simpletask里看到。而如果你没有看到,点击应用底部的设置,选择Open Todo file的选项: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android.jpeg) - -现在,你应该可以看到Simpletask同步的任务了。 - -### 总结 ### - -有了Simpletask,你就可以相似地使用它,就像一种[标记语言工具][11]。对于小巧和专注而言,Go For It!是一款不错的备忘软件。一个干净的界面是额外的加分点。拥有它自己的手机应用应该是比较好的,但是我们已经看到了替代的方案。 - -底层来讲,Go For It!不会运行在后台。这就是说,你不得不让它一直保持运行。它甚至没有一个最小化的按钮,这有一点小小的烦扰。我想要看到的是有一个小的指示程序,运行在后台,并且快速进入主面板,这肯定会提升其可用性。 - -是该试试Go For It!了,分享一下你们之间的经历。在Linux桌面上,你还使用了哪些其他的备忘软件?比起其他你最喜欢的同类应用,Go For It!怎么样? - -------------------------------------------------------------------------------- - - -via: http://itsfoss.com/go-for-it-to-do-app-in-linux/ - -作者:[Abhishek][a] -译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者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/indicator-stickynotes-windows-like-sticky-note-app-for-ubuntu/ -[2]:http://itsfoss.com/install-google-keep-ubuntu-1310/ -[3]:http://itsfoss.com/5-evernote-alternatives-linux/ -[4]:http://manuel-kehl.de/projects/go-for-it/ -[5]:http://manuel-kehl.de/about-me/ -[6]:https://github.com/mank319/Go-For-It -[7]:https://launchpad.net/~mank319/+archive/ubuntu/go-for-it -[8]:http://manuel-kehl.de/projects/go-for-it/download-windows-version/ -[9]:http://todotxt.com/ -[10]:https://play.google.com/store/apps/details?id=nl.mpcjanssen.todotxtholo&hl=en -[11]:http://itsfoss.com/install-latex-ubuntu-1404/ From 43e6732ab41b3ecfc2621f995e187e8afb74faf0 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Apr 2015 10:35:55 +0800 Subject: [PATCH 088/154] PUB:20150323 Papyrus--An Open Source Note Manager @KevinSJ --- ...23 Papyrus--An Open Source Note Manager.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/share => published}/20150323 Papyrus--An Open Source Note Manager.md (61%) diff --git a/translated/share/20150323 Papyrus--An Open Source Note Manager.md b/published/20150323 Papyrus--An Open Source Note Manager.md similarity index 61% rename from translated/share/20150323 Papyrus--An Open Source Note Manager.md rename to published/20150323 Papyrus--An Open Source Note Manager.md index abcfe00aca..e5742facde 100644 --- a/translated/share/20150323 Papyrus--An Open Source Note Manager.md +++ b/published/20150323 Papyrus--An Open Source Note Manager.md @@ -1,27 +1,27 @@ -Papyrus:开源笔记管理工具 +Papyrus:开源笔记管理工具 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_4.jpeg) 在上一篇帖子中,我们介绍了[待办事项管理软件Go For It!][1]。今天我们将介绍一款名为**Papyrus的开源笔记软件** -[Papyrus][2] 是[Kaqaz笔记管理][3]的一个分支并使用QT5开发。它不仅有简洁、易用的界面,还具备了较好的安全性。由于强调简洁,我觉得Papyrus与OneNote比较相像。你可以将你的笔记像"纸张"一样分类整理,还可以给他们添加标签进行分组。够简单的吧! +[Papyrus][2] 是[Kaqaz 笔记管理][3]的一个分支,使用 Qt5 开发。它不仅有简洁、易用的界面,(其宣称)还具备了较好的安全性。由于强调简洁,我觉得 Papyrus 与 OneNote 比较相像。你可以将你的笔记像"纸张"一样分类整理,还可以给他们添加标签进行分组。够简单的吧! ## Papyrus 的特性: ### -虽然Papyrus强调简洁,它依然有很多丰富的功能。他的一些主要功能如下: +虽然 Papyrus 强调简洁,它依然有很多丰富的功能。它的一些主要功能如下: - 按类别和标签管理笔记 - 高级搜索选项 - 触屏模式 - 全屏选项 -- 备份至Dropbox/硬盘 -- 某些页面允许加密 +- 备份至 Dropbox/硬盘/外部存储 +- 允许加密某些页面 - 可与其他软件共享笔记 -- 与Dropbox加密同步 -- 除Linux外,还可在Android,Windows和OS X使用 +- 与 Dropbox 加密同步 +- 除 Linux 外,还可在 Android,Windows 和 OS X 使用 ### 安装 Papyrus ### -Papyrus为Android用户提供了APK安装包。Windows和OS X也有安装文件。Linux用户还可以获取程序的源码。Ubuntu及其它基于Ubuntu的发行版可以使用.deb包进行安装。根据你的系统及习惯,你可以从Papyrus的下载页面中获取不同的文件: +Papyrus 为 Android 用户提供了 APK 安装包。Windows 和 OS X 也有安装文件。Linux 用户还可以获取程序的源码。Ubuntu 及其它基于 Ubuntu 的发行版可以使用 .deb 包进行安装。根据你的系统及习惯,你可以从 Papyrus 的下载页面中获取不同的文件: - [下载 Papyrus][4] @@ -40,7 +40,7 @@ Papyrus为Android用户提供了APK安装包。Windows和OS X也有安装文 试试Papyrus吧,你会喜欢上它的。在下方评论区和我们分享你的使用经验吧。 -(译者注:此软件暂无中文版) +(LCTT译注:此软件暂无中文版) -------------------------------------------------------------------------------- @@ -53,7 +53,7 @@ via: http://itsfoss.com/papyrus-open-source-note-manager/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/go-for-it-to-do-app-in-linux/ +[1]:http://linux.cn/article-5337-1.html [2]:http://aseman.co/en/products/papyrus/ [3]:https://github.com/sialan-labs/kaqaz/ [4]:http://aseman.co/en/products/papyrus/ From 74d156f3fa0e337675a2f3023e67ccff83370f9e Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Apr 2015 10:55:55 +0800 Subject: [PATCH 089/154] PUB:20150128 Docker-1 Moving to Docker @mtunique --- .../20150128 Docker-1 Moving to Docker.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150128 Docker-1 Moving to Docker.md (74%) diff --git a/translated/tech/20150128 Docker-1 Moving to Docker.md b/published/20150128 Docker-1 Moving to Docker.md similarity index 74% rename from translated/tech/20150128 Docker-1 Moving to Docker.md rename to published/20150128 Docker-1 Moving to Docker.md index 36c8f16506..5cadf51ce6 100644 --- a/translated/tech/20150128 Docker-1 Moving to Docker.md +++ b/published/20150128 Docker-1 Moving to Docker.md @@ -1,4 +1,4 @@ -Moving to Docker +走向 Docker ================================================================================ ![](http://cocoahunter.com/content/images/2015/01/docker1.jpeg) @@ -8,11 +8,11 @@ Moving to Docker 上个月,我一直在折腾开发环境。这是我个人故事和经验,关于尝试用Docker简化Rails应用的部署过程。 -当我在2012年创建我的公司 – [Touchware][1]时,我还是一个独立开发者。很多事情很小,不复杂,不他们需要很多维护,他们也不需要不部署到很多机器上。经过过去一年的发展,我们成长了很多(我们现在是是拥有10个人团队)而且我们的服务端的程序和API无论在范围和规模方面都有增长。 +当我在2012年创建我的公司 – [Touchware][1]时,我还是一个独立开发者。很多事情很小,不复杂,他们不需要很多维护,他们也不需要部署到很多机器上。经过过去一年的发展,我们成长了很多(我们现在是是拥有10个人的团队)而且我们的服务端的程序和API无论在范围和规模方面都有增长。 ### 第1步 - Heroku ### -我们还是个小公司,我们需要让事情运行地尽可能平稳。当我们寻找可行的解决方案时,我们打算坚持用那些可以帮助我们减轻对硬件依赖负担的工具。由于我们主要开发Rails应用,而Heroku对RoR,常用的数据库和缓存(Postgres/Mongo/Redis等)有很好的支持,最明智的选择就是用[Heroku][2] 。我们就是这样做的。 +我们还是个小公司,我们需要让事情运行地尽可能平稳。当我们寻找可行的解决方案时,我们打算坚持用那些可以帮助我们减轻对硬件依赖负担的工具。由于我们主要开发Rails应用,而Heroku对RoR、常用的数据库和缓存(Postgres/Mongo/Redis等)有很好的支持,最明智的选择就是用[Heroku][2] 。我们就是这样做的。 Heroku有很好的技术支持和文档,使得部署非常轻松。唯一的问题是,当你处于起步阶段,你需要很多开销。这不是最好的选择,真的。 @@ -20,18 +20,18 @@ Heroku有很好的技术支持和文档,使得部署非常轻松。唯一的 为了尝试并降低成本,我们决定试试Dokku。[Dokku][3],引用GitHub上的一句话 -> Docker powered mini-Heroku in around 100 lines of Bash +> Docker 驱动的 mini-Heroku,只用了一百来行的 bash 脚本 -我们启用的[DigitalOcean][4]上的很多台机器,都预装了Dokku。Dokku非常像Heroku,但是当你有复杂的项目需要调整配置参数或者是需要特殊的依赖时,它就不能胜任了。我们有一个应用,它需要对图片进行多次转换,我们无法安装一个适合版本的imagemagick到托管我们Rails应用的基于Dokku的Docker容器内。尽管我们还有很多应用运行在Dokku上,但我们还是不得不把一些迁移回Heroku。 +我们启用的[DigitalOcean][4]上的很多台机器,都预装了Dokku。Dokku非常像Heroku,但是当你有复杂的项目需要调整配置参数或者是需要特殊的依赖时,它就不能胜任了。我们有一个应用,它需要对图片进行多次转换,我们把我们Rails应用的托管到基于Dokku的Docker容器,但是无法安装一个适合版本的imagemagick到里面。尽管我们还有很多应用运行在Dokku上,但我们还是不得不把一些迁移回Heroku。 ### 第3步 - Docker ### -几个月前,由于开发环境和生产环境的问题重新出现,我决定试试Docker。简单来说,Docker让开发者容器化应用,简化部署。由于一个Docker容器本质上已经包含项目运行所需要的所有依赖,只要它能在你的笔记本上运行地很好,你就能确保它将也能在任何一个别的远程服务器的生产环境上运行,包括Amazon的EC2和DigitalOcean上的VPS。 +几个月前,由于开发环境和生产环境的问题重新出现,我决定试试Docker。简单来说,Docker让开发者容器化应用、简化部署。由于一个Docker容器本质上已经包含项目运行所需要的所有依赖,只要它能在你的笔记本上运行地很好,你就能确保它将也能在任何一个别的远程服务器的生产环境上运行,包括Amazon的EC2和DigitalOcean上的VPS。 -Docker IMHO特别有意思的原因是: +就我个人的看法来说,Docker 特别有意思的原因是: -- 它促进了模块化和分离关注点:你只需要去考虑应用的逻辑部分(负载均衡:1个容器;数据库:1个容器;web服务器:1个容器); -- 在部署的配置上非常灵活:容器可以被部署在大量的HW上,也可以容易地重新部署在不同的服务器或者提供商那; +- 它促进了模块化和关注点分离:你只需要去考虑应用的逻辑部分(负载均衡:1个容器;数据库:1个容器;web服务器:1个容器); +- 在部署的配置上非常灵活:容器可以被部署在各种硬件上,也可以容易地重新部署在不同的服务器和不同的提供商; - 它允许非常细粒度地优化应用的运行环境:你可以利用你的容器来创建镜像,所以你有很多选择来配置环境。 它也有一些缺点: @@ -54,15 +54,15 @@ via: http://cocoahunter.com/2015/01/23/docker-1/ 作者:[Michelangelo Chasseur][a] 译者:[mtunique](https://github.com/mtunique) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://cocoahunter.com/author/michelangelo/ [1]:http://www.touchwa.re/ -[2]:http://cocoahunter.com/2015/01/23/docker-1/www.heroku.com +[2]:http://www.heroku.com [3]:https://github.com/progrium/dokku -[4]:http://cocoahunter.com/2015/01/23/docker-1/www.digitalocean.com +[4]:http://www.digitalocean.com [5]:http://www.docker.com/ [6]:http://cocoahunter.com/2015/01/23/docker-2/ [7]:http://cocoahunter.com/2015/01/23/docker-3/ @@ -78,4 +78,3 @@ via: http://cocoahunter.com/2015/01/23/docker-1/ [17]: [18]: [19]: -[20]: From adbec133cb0f71b372d4e10401e77948e5403d1f Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Apr 2015 11:10:12 +0800 Subject: [PATCH 090/154] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E6=9C=AA=E7=BF=BB=E8=AF=91=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @runningwater @blueabysm @theo-l @weychen @ly0 @coloka @Medusar @mr-ping @KayGuoWhu @haimingfg @martin2011qi --- ... Text Editors Great for Remote Editing and Much More.md | 1 - sources/talk/20141211 Open source all over the world.md | 1 - ...0141224 The Curious Case of the Disappearing Distros.md | 4 ---- ...10 Top Distributions in Demand to Get Your Dream Job.md | 1 - ...0141219 What is good audio editing software on Linux.md | 7 +++---- ...at are useful command-line network monitors on Linux.md | 1 - .../tech/20150123 How to make a file immutable on Linux.md | 2 -- ...0126 iptraf--A TCP or UDP Network Monitoring Utility.md | 2 -- ...inux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md | 1 + ...27 Enjoy Android Apps on Ubuntu using ARChon Runtime.md | 1 - ...rensic Tool to Analyze Disk Images and Recover Files.md | 3 --- sources/tech/20150401 ZMap Documentation.md | 2 -- 12 files changed, 4 insertions(+), 22 deletions(-) diff --git a/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md b/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md index 42b2700b49..401a4da2fc 100644 --- a/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md +++ b/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md @@ -1,4 +1,3 @@ -(translating by runningwater) Compact Text Editors Great for Remote Editing and Much More ================================================================================ A text editor is software used for editing plain text files. This type of software has many different uses including modifying configuration files, writing programming language source code, jotting down thoughts, or even making a grocery list. Given that editors can be used for such a diverse range of activities, it is worth spending the time finding an editor that best suites your preferences. 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 130201bff4..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,4 +1,3 @@ -[raywang] 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/20141224 The Curious Case of the Disappearing Distros.md b/sources/talk/20141224 The Curious Case of the Disappearing Distros.md index 3fe7cd788c..b9fc7875d7 100644 --- a/sources/talk/20141224 The Curious Case of the Disappearing Distros.md +++ b/sources/talk/20141224 The Curious Case of the Disappearing Distros.md @@ -1,12 +1,8 @@ -theol-l translating - The Curious Case of the Disappearing Distros -关于消失的发行版的古怪情形。 ================================================================================ ![](http://www.linuxinsider.com/ai/828896/linux-distros.jpg) "Linux is a big game now, with billions of dollars of profit, and it's the best thing since sliced bread, but corporations are taking control, and slowly but systematically, community distros are being killed," said Google+ blogger Alessandro Ebersol. "Linux is slowly becoming just like BSD, where companies use and abuse it and give very little in return." -"Linux现在成为了一个大型的游戏,同时具有巨额的利润,这是有史以来最好的事情。但是公司企业进行了控制,于是缓慢而系统的社区发行版就逐渐被干掉了,",Google+的一个博主 Alessandro Ebersol说到。"Linux开始变得像BSD--一些公司使用和滥用但是没有任何回报--一样缓慢。" Well the holidays are pretty much upon us at last here in the Linux blogosphere, and there's nowhere left to hide. The next two weeks or so promise little more than a blur of forced social occasions and too-large meals, punctuated only -- for the luckier ones among us -- by occasional respite down at the Broken Windows Lounge. diff --git a/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md b/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md index 5632351b37..0e3e611ea4 100644 --- a/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md +++ b/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md @@ -1,4 +1,3 @@ -Translating by weychen 10 Top Distributions in Demand to Get Your Dream Job ================================================================================ We are coming up with a series of five articles which aims at making you aware of the top skills which will help you in getting yours dream job. In this competitive world you can not rely on one skill. You need to have balanced set of skills. There is no measure of a balanced skill set except a few conventions and statistics which changes from time-to-time. diff --git a/sources/tech/20141219 What is good audio editing software on Linux.md b/sources/tech/20141219 What is good audio editing software on Linux.md index d9228b4eda..ccc6a0883b 100644 --- a/sources/tech/20141219 What is good audio editing software on Linux.md +++ b/sources/tech/20141219 What is good audio editing software on Linux.md @@ -1,8 +1,7 @@ -Translating by ly0 - -Linux下一些蛮不错的音频编辑软件 +What is good audio editing software on Linux ================================================================================ -无论你是一个业余的音乐家或者仅仅是一个上课撸教授音的学,你总是需要和录音打交道。如果你有很长的时间仅仅用Mac干这种事情,那么可以和这个过程说拜拜了,现在Linux也可以干同样的事情。简而言之,这里有一个简单但是不错的音频编辑软件列表,来满足你对不同任务和需求。 + +Whether you are an amateur musician or just a student recording his professor, you need to edit and work with audio recordings. If for a long time such task was exclusively attributed to Macintosh, this time is over, and Linux now has what it takes to do the job. In short, here is a non-exhaustive list of good audio editing software, fit for different tasks and needs. ### 1. Audacity ### 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 eeda3f0542..f17e45cbf4 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,4 +1,3 @@ -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. diff --git a/sources/tech/20150123 How to make a file immutable on Linux.md b/sources/tech/20150123 How to make a file immutable on Linux.md index 7d46d1de68..622cc4e5b3 100644 --- a/sources/tech/20150123 How to make a file immutable on Linux.md +++ b/sources/tech/20150123 How to make a file immutable on Linux.md @@ -1,5 +1,3 @@ -Translating by Medusar - How to make a file immutable on Linux ================================================================================ Suppose you want to write-protect some important files on Linux, so that they cannot be deleted or tampered with by accident or otherwise. In other cases, you may want to prevent certain configuration files from being overwritten automatically by software. While changing their ownership or permission bits on the files by using chown or chmod is one way to deal with this situation, this is not a perfect solution as it cannot prevent any action done with root privilege. That is when chattr comes in handy. diff --git a/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md b/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md index f39d53a47d..1d5d3cd0d9 100644 --- a/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md +++ b/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md @@ -1,5 +1,3 @@ -Ping -- Translating - iptraf: A TCP/UDP Network Monitoring Utility ================================================================================ [iptraf][1] is an ncurses-based IP LAN monitor that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others. 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 fe2432f8b3..6817a75b03 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,6 @@ 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 ### 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 index f6def514b8..f85b2cf725 100644 --- 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 @@ -1,4 +1,3 @@ -translating by KayGuoWhu 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. diff --git a/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md b/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md index 4e8461528e..2f138a9e3d 100644 --- a/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md +++ b/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md @@ -1,6 +1,3 @@ - -tranlating by haimingfg - Sleuth Kit - Open Source Forensic Tool to Analyze Disk Images and Recover Files ================================================================================ SIFT is a Ubuntu based forensics distribution provided by SANS Inc. It consist of many forensics tools such as Sleuth kit / Autopsy etc . However, Sleuth kit/Autopsy tools can be installed on Ubuntu/Fedora distribution instead of downloading complete distribution of SIFT. diff --git a/sources/tech/20150401 ZMap Documentation.md b/sources/tech/20150401 ZMap Documentation.md index 3cde747acf..d2aa316c1f 100644 --- a/sources/tech/20150401 ZMap Documentation.md +++ b/sources/tech/20150401 ZMap Documentation.md @@ -1,5 +1,3 @@ -translating by martin. - ZMap Documentation ================================================================================ 1. Getting Started with ZMap From 957ecbc7a9b290042e58674991e0c8f2707336d3 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Mon, 27 Apr 2015 11:27:44 +0800 Subject: [PATCH 091/154] translated wi-cuckoo --- ...Install Discourse in a Docker Container.md | 161 ------------------ ...Install Discourse in a Docker Container.md | 156 +++++++++++++++++ 2 files changed, 156 insertions(+), 161 deletions(-) delete mode 100644 sources/tech/20150417 How to Install Discourse in a Docker Container.md create mode 100644 translated/tech/20150417 How to Install Discourse in a Docker Container.md diff --git a/sources/tech/20150417 How to Install Discourse in a Docker Container.md b/sources/tech/20150417 How to Install Discourse in a Docker Container.md deleted file mode 100644 index adedf08faa..0000000000 --- a/sources/tech/20150417 How to Install Discourse in a Docker Container.md +++ /dev/null @@ -1,161 +0,0 @@ -translating wi-cuckoo -How to Install Discourse in a Docker Container -================================================================================ -Hi all, today we'll learn how to install Discourse using Docker Platform. Discourse is the 100% open source discussion platform built for the next decade of the Internet featuring as a mailing list, a discussion forum and a long-form chat room. It is a smart way of attempt to reimagine what a modern, sustainable, fully open-source Internet discussion platform should be today, both from a technology standpoint and a sociology standpoint. Discourse is simple, clean, and straightforward way for discussion. It is really an awesome platform for any kinds of discussions on internet featuring such a cool services out of the box. Docker is an open source platform that provides an open platform to pack, ship and run any application as a lightweight container. Docker containers makes Discourse a lot handy and easy to setup app. - -So, here are some quick and easy steps in order to install Discourse inside a Docker environment. - -### 1. Installing Docker ### - -First of all, we need to make sure that we have Docker installed in our host Operating System. To install, we'll need to the run the following command in a shell or terminal. - -#### On Ubuntu #### - -Package docker is available in Ubuntu's repository so, we'll be using apt manager to install it in sudo or root mode. - - # apt-get install docker - -#### On CentOS 7 #### - -On CentOS 7 machine, we'll use yum manager to install docker as it is also available in CentOS's repository. - - # yum install docker - -![Installing Docker](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-docker.png) - -### 2. Setting Swap Memory ### - -If you have RAM size less than 1 GB then, make sure you upgrade your system to 1 GB or above cause Discourse doesn't get installed in 512 MB RAM. If you are now ready to install Discourse with 1 GB or above, follow the following steps to setup swap memory for you VPS or Server. - -We'll create an empty swapfile by running the following command. - - # install -o root -g root -m 0600 /dev/null /swapfile - -If you want your swap memory to be 1 GB, then do the below step and skip the next step. - - # dd if=/dev/zero of=/swapfile bs=1k count=1024k - -if you want it to be 2 GB, follow the below. Make sure you skip the above step. - - # dd if=/dev/zero of=/swapfile bs=1k count=2048k - -Then, we'll point Swap Memory as swapfile . - - #mkswap /swapfile - -To activate it run the following command. - - #swapon /swapfile - -Now, we'll add it to the file system table so its there after reboot: - - # echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab - -Set the swappiness to 10 so its only uses as an emergency buffer. - - # sudo sysctl -w vm.swappiness=10 - # echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf - -### 3. Installing Discourse ### - -After installing Docker in our host machine, we'll now go further towards installing Discourse. We'll now clone Discourse from the official Discourse Github into /var/discourse directory. To do so, we'll need to run the following command. - - # mkdir /var/discourse/ - - # cd /var/discourse/ - - # git clone https://github.com/discourse/discourse_docker.git /var/discourse/ - -After cloning the git repository, we'll copy the configuration file for our discourse server. - - # cp samples/standalone.yml containers/app.yml - -![Cloning Discourse Docker](http://blog.linoxide.com/wp-content/uploads/2015/04/cloning-discourse-docker.png) - -### 4. Configuring Discourse ### - -Next, we'll edit the discourse configuration ie app.yml located inside containers directory using our favorite text editor. - - # nano containers/app.yml - -Now, we need to set the developer's email address to DISCOURSE_DEVELOPER_EMAILS as follows. - - DISCOURSE_DEVELOPER_EMAILS: 'arun@linoxide.com' - -Then, we'll set the hostname as the domain name of our server. - - DISCOURSE_HOSTNAME: 'discourse.linoxide.com' - -Then, set the mail credentials per our SMTP Server hosted in the same discourse machine or vps. The SMTP settings are required to send mail from your Discourse instance - - DISCOURSE_SMTP_ADDRESS: smtp.linoxide.com - DISCOURSE_SMTP_PORT: 587 # (optional) - DISCOURSE_SMTP_USER_NAME: admin@linoxide.com # (optional) - DISCOURSE_SMTP_PASSWORD: test123 # (optional) - -![](http://blog.linoxide.com/wp-content/uploads/2015/04/discourse-configuration.png) - - Discourse Configuration - -If you are using a 1 GB instance, set UNICORN_WORKERS to 2 and db_shared_buffers to 128MB so you have more memory room. - -It is compulsory to create a mailing server to run Discourse. If you have a server then its cool, we can use its credentials. If you have no existing mail server, or you don't know what it is? No problem, create a free account on [Mandrill][1] ([Mailgun][2], or [Mailjet][3]), and use the credentials provided in the dashboard. - -### 5. Starting Discourse App ### - -After configuring the discourse configuration file, we'll surely wanna start our Discourse server. To do so, first we'll launch discourse bootstrap by running the following command under the current directory ie /var/discourse/ . - - # ./launcher bootstrap app - -![Starting Discourse Bootstrap](http://blog.linoxide.com/wp-content/uploads/2015/04/starting-discourse-bootstrap.png) - -The above command may take some minutes which automatically configures our Discourse environment. Then, after the processes are finished, we'll need to run the following to start our Discourse App. - - #./launcher start app - -![Starting Discourse](http://blog.linoxide.com/wp-content/uploads/2015/04/starting-discourse.png) - -If everything went as expected accordingly, we'll be able to access our fresh Discourse Web Interface using our favorite Web Browser by pointing the url to http://ip-address/ or http://discourse.linoxide.com/ . Then, we can create a new account and become admin. - -![Discourse Web interface](http://blog.linoxide.com/wp-content/uploads/2015/04/Discourse-web-interface.png) - -### Maintenance ### - -Here below are the usages of the launcher command inside /var/discourse/ directory so that we can commit maintenance and control over the Discourse Docker Container. - - Usage: launcher COMMAND CONFIG [--skip-prereqs] - Commands: - start: Start/initialize a container - stop: Stop a running container - restart: Restart a container - destroy: Stop and remove a container - enter: Use nsenter to enter a container - ssh: Start a bash shell in a running container - logs: Docker logs for container - mailtest: Test the mail settings in a container - bootstrap: Bootstrap a container for the config based on a template - rebuild: Rebuild a container (destroy old, bootstrap, start new) - cleanup: Remove all containers that have stopped for > 24 hours - - Options: - --skip-prereqs Don't check prerequisites - --docker-args Extra arguments to pass when running docker - -### Conclusion ### - -Hurray! We have successfully installed Discourse with Docker Technology. Docker technology makes Discourse very much easy to install in any Platform with all the requirement fulfilled. We need our own mailing server or credentials of a mailing server to get started with it. It is a great platform for easy modern mailing list, discussion platform. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/how-tos/install-discourse-docker-container/ - -作者:[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://mandrillapp.com/ -[2]:http://www.mailgun.com/ -[3]:https://www.mailjet.com/pricing diff --git a/translated/tech/20150417 How to Install Discourse in a Docker Container.md b/translated/tech/20150417 How to Install Discourse in a Docker Container.md new file mode 100644 index 0000000000..e4dcf8f3c5 --- /dev/null +++ b/translated/tech/20150417 How to Install Discourse in a Docker Container.md @@ -0,0 +1,156 @@ +如何在一个Docker容器里安装Discourse +============================================================================= +大家好,今天我们将会学习如何利用Docker平台安装Discourse。Discourse是完全开源的讨论平台,为互联网的下一个十年而搭建,拥有一个邮件列表,一个论坛和一个long-form(此处不明白)聊天室。不管从技术角度还是社会学角度,当你试图去重新想象当今一个现代的,可持续的,完全开源的互联网讨论平台该是什么样子,Discourse都是一个不错的途径。Discourse简洁,直接之于讨论。它确实是一个令人称赞的平台,对于互联网上各种各样的讨论来说,提供了在机器之外如此酷的一个服务。Docker是一个开源平台,提供打包,运输和运行任何应用的平台,如一个轻量级容器。Docker容器技术使得Discourse更加方便和容易去建立应用程序。 + +所以,下面是一些快速且容易的步骤,用来安装Discourse在一个Docker环境里面。 + +### 1. 安装Docker ### + +首先,我们需要确认我们的主机操作系统已经安装了Docker。我们需要在shell或者终端运行以下命令安装Docker。 + +#### 在Ubuntu上 #### + +docker安装包在Ubuntu的仓库里面是可用的,所以我们将会使用apt管理器安装,以sudo或者root模式 + + # apt-get docker + +#### 在CentOS 7上 #### + +在CentOS 7的主机上,我们使用yum管理器安装docker,因为CentOS的仓库里同样有docker安装包 + + # yum install docker + +![Installing Docker](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-docker.png) + +### 2. 设定交换内存 ### + +如果你的RAM容量小于1GB,那么确保升级你的系统达到1GB或者以上,否则Discourse不会在512MB的RAM下安装。如果你现在准备好了安装Discourse,根据下面的步骤为你的VPS(Virtual Private Servers)或者服务器设定交换内存 + +运行下面的命令,创建一个空的交换文件。 + + # install -o root -g root -m 0600 /dev/null /swapfile + +如果你想你的交换内存达到1GB,那么执行下面的步骤,并且跳过接下来的第二步。 + + # dd if=/dev/zero of=/swapfile bs=1k count=1024k + +如果你想达到2GB,跳过上面的所有步骤,跟着下面做 + + # dd if=/dev/zero of=/swapfile bs=1k count=2014k + +接着,我们指定交换内存为swapfile + + #mkswap /swapfile + +运行下面的命令激活交换内存 + + #swapon /swapfile + +现在,我们将其添加到文件系统分区表里,这样重启之后就自动挂载了。 + + # echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab + +设置swappiness为10,这样交换内存仅作为一个紧急缓冲区用。 + + # sudo sysctl -w vm.swappiness=10 + # echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf + +### 3. 安装Discourse ### + +在我们的主机上安装Docker后,我们将会安装Discourse。现在,我们从官方的Discourse GitHub仓库克隆一份到/var/discourse目录下。我们需要运行下面的命令完成这一步。 + + # mkdir /var/discourse/ + + # cd /var/discourse/ + + # git clone https://github.com/discourse/discourse_docker.git /var/discourse/ + +克隆好仓库后,我们会为discourse服务器复制配置文件 + + # cp samples/standalone.yml containers/app.yml + +![Cloning Discourse Docker](http://blog.linoxide.com/wp-content/uploads/2015/04/cloning-discourse-docker.png) + +### 4. 配置Discourse ### + +接下来,我们用自己喜欢的文本编辑器,编辑容器目录下的discourse配置文件app.yml + + # nano containers/app.yml + +现在,我们需要设置开发者的邮箱地址为DISCOURSE_DEVELOPER_EMAILS,如下。 + + DISCOURSE_DEVELOPER_EMAILS: 'arun@linoxide.com' + +然后,我们会设置主机名为服务器的域名。 + + DISCOURSE_HOSTNAME: 'discourse.linoxide.com' + +接着,为每个托管在相同discourse主机或者vps上的SMTP服务器设定邮箱证书。SMTP设置需要从你的Discourse发送邮件 + + DISCOURSE_SMTP_ADDRESS: smtp.linoxide.com + DISCOURSE_SMTP_PORT: 587 # (optional) + DISCOURSE_SMTP_USER_NAME: admin@linoxide.com # (optional) + DISCOURSE_SMTP_PASSWORD: test123 # (optional) + +![](http://blog.linoxide.com/wp-content/uploads/2015/04/discourse-configuration.png) + + Discourse 配置 + +如果你在使用一个1GB的Discourse,设定UNICORN_WORKERS为2,db_shared_buffers为128MB,这样你会有更多的内存空间。 + +运行Discourse需要强制性地创建一个邮件服务器。如果你已经有一个服务器了那就好办多了,我们可以使用它的证书。如果你没有现成的邮件服务器,或者你不知道那是什么。没关系,创建一个免费的帐号在[Mandrill][1] ([Mailgun][2],或者[Mailjet][3]),然后使用面板上提供的证书。 + +### 5. 启动Discourse应用 ### + +配置完discourse的配置文件后,我们当然是想启动Discourse服务器。首先,在/var/discourse/目录下运行下面的命令,加载discourse引导程序。 + + # ./launcher bootstrap app + +![Starting Discourse Bootstrap](http://blog.linoxide.com/wp-content/uploads/2015/04/starting-discourse-bootstrap.png) + +上述命令可能会花去几分钟时间,会自动配置我们的Discourse环境。然后,该进程完成后,我们需要运行下面的命令启动Discourse App + + #./launch start app + +![Starting Discourse](http://blog.linoxide.com/wp-content/uploads/2015/04/starting-discourse.png) + +### 维护 ### + +这里往下是/var/discourse/目录里加载命令的使用,这使得我们可以承担维护的任务,通过Docker 容器控制Disourse。(这里不太明白原文表达意思) + + Usage: launcher COMMAND CONFIG [--skip-prereqs] + Commands: + start: Start/initialize a container + stop: Stop a running container + restart: Restart a container + destroy: Stop and remove a container + enter: Use nsenter to enter a container + ssh: Start a bash shell in a running container + logs: Docker logs for container + mailtest: Test the mail settings in a container + bootstrap: Bootstrap a container for the config based on a template + rebuild: Rebuild a container (destroy old, bootstrap, start new) + cleanup: Remove all containers that have stopped for > 24 hours + + Options: + --skip-prereqs Don't check prerequisites + --docker-args Extra arguments to pass when running docker + +### 总结 ### + +Hurray!我们已经成功使用Docker技术安装了Discourse。Docker技术使得Discourse十分容易安装在任何平台,并且包含所有的要求。我们需要自己的邮件服务器或者邮件服务器的证书来启动它。对于便捷的现代邮件列表,论坛来说,Discourse是一个伟大的平台。(最后这句有些别扭) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/install-discourse-docker-container/ + +作者:[Arun Pyasi][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://mandrillapp.com/ +[2]:http://www.mailgun.com/ +[3]:https://www.mailjet.com/pricing From 69972478e45afc2f29f127fc11da3a90757a8955 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Mon, 27 Apr 2015 13:23:19 +0800 Subject: [PATCH 092/154] Update 20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md --- ...ased--The Best Racing Game on Linux Just Got Even Better.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md b/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md index c664676a83..91572345cf 100644 --- a/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md +++ b/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md @@ -1,3 +1,4 @@ +Translating by H-mudcup uperTuxKart 0.9 Released — The Best Racing Game on Linux Just Got Even Better ================================================================================ **A brand new version of the hugely popular racing game SuperTuxKart has [zipped past the release line][1] to land on download servers. ** @@ -34,4 +35,4 @@ via: http://www.omgubuntu.co.uk/2015/04/supertuxkart-0-9-released [a]:https://plus.google.com/117485690627814051450/?rel=author [1]:http://supertuxkart.blogspot.co.uk/2015/04/supertuxkart-09-released.html -[2]:http://supertuxkart.sourceforge.net/Downloads \ No newline at end of file +[2]:http://supertuxkart.sourceforge.net/Downloads From 6aea38447f0764d4ea6a3974692492af2363f681 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Apr 2015 14:16:57 +0800 Subject: [PATCH 093/154] PUB:20150330 Picty--Managing Photos Made Easy @H-mudcup --- ...150330 Picty--Managing Photos Made Easy.md | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) rename {translated/share => published}/20150330 Picty--Managing Photos Made Easy.md (58%) diff --git a/translated/share/20150330 Picty--Managing Photos Made Easy.md b/published/20150330 Picty--Managing Photos Made Easy.md similarity index 58% rename from translated/share/20150330 Picty--Managing Photos Made Easy.md rename to published/20150330 Picty--Managing Photos Made Easy.md index 644501a65e..d1b9fb63bb 100644 --- a/translated/share/20150330 Picty--Managing Photos Made Easy.md +++ b/published/20150330 Picty--Managing Photos Made Easy.md @@ -1,19 +1,17 @@ -Translated by H-mudcup - Picty:让图片管理变简单 ================================================================================ ![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/picty_002-790x429.png) ### 关于Picty ### -**Picty**是个免费,简单,却强大的照片收藏管理器,它可以帮助你管理你的照片。它的设计围绕着管理**元数据**和**无损**的处理图像的方法。Picty目前同时支持在线(基于网页的)和离线(本地的)收藏集。在本地的收藏集中,图片将被保存在一个本地的文件夹和它的子文件夹中。为了加快用户主目录里图片的查询速度,它会维持一个数据库。在在线(基于网页的)收藏集中,你可以通过网页浏览器上传并分享图片。拥有适当权限的个人用户可以把图片分享给任何人,而且每个用户可以同时开放多个收藏集,收藏集也可以被多个用户分享。通过一个转载插件在收藏集间传递图片就有了个简单的交互界面。 +**Picty**是个免费,简单,却强大的照片收藏管理器,它可以帮助你管理你的照片。它是围绕着**元数据**管理和图像**无损**处理设计的。Picty目前同时支持在线(基于网页的)和离线(本地的)收藏集。在本地的收藏集中,图片将被保存在一个本地的文件夹及其子文件夹中。为了加快用户主目录里图片的查询速度,它会维持一个数据库。在在线(基于网页的)收藏集中,你可以通过网页浏览器上传并分享图片。拥有适当权限的个人用户可以把图片分享给任何人,而且用户可以同时打开多个收藏集,收藏集也可以分享给多个用户。有个简单的界面可以通过传输插件在收藏集之间传输图片。 -你可以从你的相机或任何设备中下载任何数量的照片。除此之外,Picty允许你在下载前浏览在你相机里的图片集。Picty是个轻量级的应用,还有着清爽的界面。它支持Linux和Windows平台。 +你可以从你的相机或任何设备中下载任何数量的照片。除此之外,Picty允许你在下载前浏览在你相机里的图片集。Picty是个轻量级的应用,界面清爽。它支持Linux和Windows平台。 ### 功能 ### - 支持大相片集(20000张以上)。 -- 同时开放多个收藏集还可以在它们之间传照片。 +- 同时打开多个收藏集,还可以在它们之间传照片。 - 收藏集包括: - 本地文件系统中保存图片的文件夹。 - 相机、电话及其他媒体设备中的图片。 @@ -21,28 +19,28 @@ Picty:让图片管理变简单 - Picty不是把相片“导入”到它的数据库中,它仅仅提供了一个界面来访问它们,不管它们保存在哪。为了保持迅速的反应以及能使你在离线时浏览图片的能力,Picty会保存缩略图和元数据的缓存。 - 以业界标准格式Exif、IPTC和Xmp读写元数据。 - 无损的方法: - - Picty把所有改变包括图像编辑以元数据写入。例如,一个图片可以以任何方式剪切保存,原来的像素仍然保存在该文件里。 - - 修改会保存在Picty的收藏集缓存中直到你把你对元数据的修改保存到图片中。你能很容易撤销你不喜欢的未保存的修改。 -- 基本图片编辑: + - Picty把所有改变包括图像编辑以元数据的方式写入。例如,一个图片可以以任何方式剪切保存,原来的图像仍然保存在该文件里。 + - 修改会保存在Picty的收藏集缓存中直到你把你对元数据的修改保存到图片中,所以你能很容易撤销你不喜欢的未保存的修改。 +- 基本图片编辑功能: - 目前支持基本的图像增强,如亮度、对比度、色彩、剪切以及矫正。 - - Improvements to those tools and other tools coming soon (red eye reduction, levels, curves, noise reduction)对这些工具的改善和其他的工具即将到来。(红眼消除、拉伸、弯曲、噪声消除) + - 将要推出一些工具改进及更多工具。(红眼消除、拉伸、弯曲、噪声消除) - 图片标签: - 使用标准的IPTC和Xmp关键词为图片做标签。 - - 一个树状标签图让你能很容易的管理标签和对你的收藏集进行导航。 + - 一个树状标签图让你能很容易的管理标签和在收藏集内导航。 - 文件夹视图: - - 按照目录的结构对你的图片收藏进行导航 + - 按照目录的结构对你的图片收藏集进行导航 - 支持多屏显示 - Picty可以设置成让你在一个屏幕上浏览你的收藏集同时在另一个屏幕上全屏显示图片。 - 可个性化 - 可以为外部工具创建快捷方式 - 支持插件——目前提供的功能中有许多(标签和文件夹视图以及所有的图片编辑工具)都可以通过插件提供。 - - 使用Python编写——自带batteries!(python的这个特点使它可在mac、Linux和windows上直接安装使用,无需复杂的设置。) + - 使用Python编写——内置电池(batteries included)! ### 安装方法 ### #### 1、从PPA安装 #### -Picty开发人员为基于Debian的发行版,如Ubuntu,创建了一个PPA,让安装更简单。 +Picty开发人员为Ubuntu这样的基于 Debian的发行版创建了一个PPA,让安装更简单。 要在Ubuntu和它的衍生版上安装,请运行以下命令: @@ -76,13 +74,13 @@ Picty开发人员为基于Debian的发行版,如Ubuntu,创建了一个PPA, ![picty_001](http://www.unixmen.com/wp-content/uploads/2015/03/picty_001.png) -你可以选择已存在的收藏集、设备或目录。让我们创建一个**新收藏集** 。要这样做,得先点击新收藏集(New Collection)按钮。进入收藏集,然后浏览都你保存图片的地方。最后,点击**创建(Create)**按钮。 +你可以选择已存在的收藏集、设备或目录。这里让我们创建一个**新收藏集** ,请先点击新收藏集(New Collection)按钮。进入收藏集,然后浏览到你保存图片的地方。最后,点击**创建(Create)**按钮。 ![Create a Collection_001](http://www.unixmen.com/wp-content/uploads/2015/03/Create-a-Collection_001.png) ![picty_002](http://www.unixmen.com/wp-content/uploads/2015/03/picty_002.png) -你可以修改,旋转,添加/移除标签,设置每个图片的描述。要这么做,只需右击任何一个图片然后爱做什么做什么。 +你可以对每张图片进行修改,旋转,添加/移除标签,设置描述。只需右击任何一个图片然后爱做什么做什么。 访问下面这个Google组可以得到更多关于Picty相片管理器的信息和支持。 @@ -96,7 +94,7 @@ via: http://www.unixmen.com/picty-managing-photos-made-easy/ 作者:[SK][a] 译者:[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 6bf1d0e0f4959207976a3652f912d2c827f78fad Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Mon, 27 Apr 2015 15:00:21 +0800 Subject: [PATCH 094/154] Delete 20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md --- ...cing Game on Linux Just Got Even Better.md | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md diff --git a/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md b/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md deleted file mode 100644 index 91572345cf..0000000000 --- a/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md +++ /dev/null @@ -1,38 +0,0 @@ -Translating by H-mudcup -uperTuxKart 0.9 Released — The Best Racing Game on Linux Just Got Even Better -================================================================================ -**A brand new version of the hugely popular racing game SuperTuxKart has [zipped past the release line][1] to land on download servers. ** - -![Super Tux Kart 0.9 Release Poster](http://1.bp.blogspot.com/-eGXvJu3UVwc/VTVhICZVEtI/AAAAAAAAAf0/iP2bkWDNf_c/s1600/poster-cropped.jpg) -Super Tux Kart 0.9 Release Poster - -SuperTuxKart 0.9 is a huge update over earlier versions, running a hot new engine (awesomely named ‘Antarctica’) under the hood that aims to deliver richer graphical environments , shading and depth of field plus better kart physics. - -The bump in graphics performance necessitates a bump in graphics card requirements, too. SuperTuxKart developers advise would-be racers to will need a device with graphics comparable to (or, ideally, better than) Intel HD Graphics 3000, NVIDIA GeForce 8600 or AMD Radeon HD 3650. - -### Other Changes ### - -Keeping pace alongside the headline visual improvements in SuperTuxKart 0.9 is pair **brand new tracks**, new Karts, new online accounts for keeping track of and sharing badges earned through the **newly introduced achievements system**, and oodles of fixes and artwork tweaks. - -Check out STK 0.9 in all its shader-based glory by hitting play on the official release video below. - -注:youtube 视频 - - -Ubuntu users can grab pre-compiled binaries for the new release from the project website. - -- [Download SuperTuxKart 0.9][2] - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/04/supertuxkart-0-9-released - -作者:[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://supertuxkart.blogspot.co.uk/2015/04/supertuxkart-09-released.html -[2]:http://supertuxkart.sourceforge.net/Downloads From f3e654438bd3a32799fece338d36e031dc881691 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Mon, 27 Apr 2015 15:02:04 +0800 Subject: [PATCH 095/154] Create 20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md Translated by H-mudcup --- ...cing Game on Linux Just Got Even Better.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 translated/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md diff --git a/translated/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md b/translated/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md new file mode 100644 index 0000000000..931f51ce92 --- /dev/null +++ b/translated/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md @@ -0,0 +1,38 @@ + +SuperTuxKart 0.9 已发行 —— Linux 中最好的竞速类游戏变得更好了 +================================================================================ +**热门竞速类游戏 SuperTuxKart 的新版本已经[打包发行][1]登陆下载服务器** + +![Super Tux Kart 0.9 Release Poster](http://1.bp.blogspot.com/-eGXvJu3UVwc/VTVhICZVEtI/AAAAAAAAAf0/iP2bkWDNf_c/s1600/poster-cropped.jpg) +Super Tux Kart 0.9 发行海报 + +SuperTuxKart 0.9 相较前一版本做了巨大的升级,内部运行着刚出炉的新引擎(有个炫酷的名字叫‘Antarctica(南极洲)’),目的是要呈现更加炫酷的图形环境,从阴影到场景的纵深,外加卡丁车更好的物理效果。 + +突出的图形表现也增加了对显卡的要求。SuperTuxKart 开发人员给玩家的建议是,要有图像处理能力比得上(或者,想要完美的话,要超过) Intel HD Graphics 3000, NVIDIA GeForce 8600 或 AMD Radeon HD 3650 的显卡。 + +### 其他改变 ### + +SuperTuxKart 0.9 中与图像的改善同样吸引人眼球的是一对**全新赛道**,新的卡丁车,新的在线账户可以记录和分享**全新推出的成就系统**里赢得的徽章,以及大量的改装和涂装的微调。 + +点击播放下面的官方发行视频,看看基于调色器的 STK 0.9 所散发的光辉吧。 + +注:youtube 视频 + + +Ubuntu 用户可以从项目网站上下载新发行版已编译的二进制文件。 + +- [Download SuperTuxKart 0.9][2] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/supertuxkart-0-9-released + +作者:[Joey-Elijah Sneddon][a] +译者:[H-mudcup](https://github.com/H-mudcup) +校对:[校对者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://supertuxkart.blogspot.co.uk/2015/04/supertuxkart-09-released.html +[2]:http://supertuxkart.sourceforge.net/Downloads From 62d045dd58e4a568aca855d2418ca55a12c0e426 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Apr 2015 15:41:46 +0800 Subject: [PATCH 096/154] PUB:30 Things to Do After Minimal RHEL or CentOS 7 Installation--1 @ictlyh --- ...inimal RHEL or CentOS 7 Installation--1.md | 80 ++++++++++++------- 1 file changed, 51 insertions(+), 29 deletions(-) rename {translated/tech => published}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md (70%) diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md similarity index 70% rename from translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md rename to published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md index 6736eda4e0..45ccd2208a 100644 --- a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md +++ b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md @@ -1,13 +1,13 @@ -安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--1 +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(一) ================================================================================ -CentOS 是一个工业标准的 Linux 发行版,是红帽企业版 Linux 的衍生版本。你安装完后马上就可以使用,但是为了更好地使用你的系统,你需要进行一些升级、软件包安装、配置特定服务和应用程序等操作。 +CentOS 是一个工业标准的 Linux 发行版,是红帽企业版 Linux 的衍生版本。你安装完后马上就可以使用,但是为了更好地使用你的系统,你需要进行一些升级、安装新的软件包、配置特定服务和应用程序等操作。 -这篇文章介绍了 “安装完 RHEL/CentOS 7 后需要做的 30 件事情”。阅读帖子的时候请牢记已经完成了 RHEL/CentOS 最小化安装,这是首选的企业和生产环境,如果还没有,你可以按照下面的指南,它会告诉你两者的最小化安装方法。 +这篇文章介绍了 “安装完 RHEL/CentOS 7 后需要做的 30 件事情”。阅读帖子的时候请先完成 RHEL/CentOS 最小化安装,这是首选的企业和生产环境。如果还没有,你可以按照下面的指南,它会告诉你两者的最小化安装方法。 - [最小化安装 CentOS 7][1] - [最小化安装 RHEL 7][2] -下面是一些重要的事情列表,基于工业标准需求我们都会进行介绍。我们希望这些东西在你配置服务器的时候能有所帮助。 +我们会基于工业标准的需求来介绍以下列出的这些重要工作。我们希望这些东西在你配置服务器的时候能有所帮助。 1. 注册并启用红帽订阅 2. 使用静态 IP 地址配置网络 @@ -42,50 +42,54 @@ CentOS 是一个工业标准的 Linux 发行版,是红帽企业版 Linux 的 ### 1. 注册并启用红帽订阅 ### -RHEL 7 最小化安装完成后,是时候注册并启用系统红帽订阅库,以及执行一个完整的系统更新。这只当你有一个可用的红帽订阅时才能有效。你要注册才能启用官方红帽系统库并时不时进行操作系统更新。 +RHEL 7 最小化安装完成后,就应该注册并启用系统红帽订阅库, 并执行一个完整的系统更新。这只当你有一个可用的红帽订阅时才能有用。你要注册才能启用官方红帽系统库,并时不时进行操作系统更新。(LCTT 译注:订阅服务是收费的) 在下面的指南中我们已经包括了一个如何注册并激活红帽订阅的详细说明。 - [在 RHEL 7 中注册并启用红帽订阅][3] -**注意**: 这一步仅适用于有一个有效订阅的红帽企业版 Linux. 如果你用的是 CentOS 服务器,请查看后面的章节。 +**注意**: 这一步仅适用于有一个有效订阅的红帽企业版 Linux。如果你用的是 CentOS 服务器,请查看后面的章节。 ### 2. 使用静态 IP 地址配置网络 ### -你第一件要做的事情就是为你的 CentOS 服务器配置静态 IP 地址,路由以及 DNS。我们会使用 ip 命令代替 ifconfig 命令。当然,ifconfig 命令对于大部分 Linux 发行版来说还是可用的,还能从默认库安装。 +你第一件要做的事情就是为你的 CentOS 服务器配置静态 IP 地址、路由以及 DNS。我们会使用 ip 命令代替 ifconfig 命令。当然,ifconfig 命令对于大部分 Linux 发行版来说还是可用的,还能从默认库安装。 - # yum install net-tools [提供 ifconfig 工具] + # yum install net-tools [它提供 ifconfig 工具,如果你不习惯 ip 命令,还可以使用它] ![在 Linux 上安装 ifconfig](http://www.tecmint.com/wp-content/uploads/2015/04/Install-ifconfig.jpeg) +(LCTT 译注:关于 ip 命令的使用,请参照:http://www.linux.cn/article-3631-1.html ) + 但正如我之前说,我们会使用 ip 命令来配置静态 IP 地址。所以,确认你首先检查了当前的 IP 地址。 # ip addr show ![在 CentOS 查看 IP 地址](http://www.tecmint.com/wp-content/uploads/2015/04/Check-IP-Address.jpeg) -现在用你的编辑器打开并编辑文件 /etc/sysconfig/network-scripts/ifcfg-enp0s3。这里,我使用 Vi 编辑器,另外你要确保你是 root 用户才能保存更改。 +现在用你的编辑器打开并编辑文件 /etc/sysconfig/network-scripts/ifcfg-enp0s3 (LCTT 译注:你的网卡名称可能不同,如果希望修改为老式网卡名称,参考:http://www.linux.cn/article-4045-1.html )。这里,我使用 vi 编辑器,另外你要确保你是 root 用户才能保存更改。 # vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 我们会编辑文件中的四个地方。注意下面的四个地方并保证不碰任何其它的东西。也保留双引号,在它们中间输入你的数据。 - IPADDR = “[在这里输入你的静态 IP]” - GATEWAY = “[输入你的默认网关]” - DNS1 = “[你的域名系统 1]” - DNS2 = “[你的域名系统 2]” + IPADDR = "[在这里输入你的静态 IP]" + GATEWAY = "[输入你的默认网关]" + DNS1 = "[你的DNS 1]" + DNS2 = "[你的DNS 2]" -更改了 ‘ifcfg-enp0s3’ 之后,看起来像下面的图片。注意你的 IP,网关和 DNS 可能会变化,请和你的 ISP(译者注:互联网服务提供商商) 确认。保存并退出。 +更改了 ‘ifcfg-enp0s3’ 之后,它看起来像下面的图片。注意你的 IP,网关和 DNS 可能会变化,请和你的 ISP(译者注:互联网服务提供商,即给你提供接入的服务的电信或 IDC) 确认。保存并退出。 ![网络详情](http://www.tecmint.com/wp-content/uploads/2015/04/Network-Details.jpeg) -网络详情 + +*网络详情* 重启网络服务并检查 IP 是否和分配的一样。如果一切都顺利,用 Ping 查看网络状态。 # service network restart ![重启网络服务](http://www.tecmint.com/wp-content/uploads/2015/04/Restarat-Network.jpeg) -重启网络服务 + +*重启网络服务* 重启网络后,确认检查了 IP 地址和网络状态。 @@ -93,10 +97,14 @@ RHEL 7 最小化安装完成后,是时候注册并启用系统红帽订阅库 # ping -c4 google.com ![验证 IP 地址](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-IP-Address.jpeg) -验证 IP 地址 + +*验证 IP 地址* ![检查网络状态](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Network-Status.jpeg) -检查网络状态 + +*检查网络状态* + +(LCTT 译注:关于设置静态 IP 地址的更多信息,请参照:http://www.linux.cn/article-3977-1.html ) ### 3. 设置服务器的主机名称 ### @@ -105,34 +113,40 @@ RHEL 7 最小化安装完成后,是时候注册并启用系统红帽订阅库 # echo $HOSTNAME ![查看系统主机名称](http://www.tecmint.com/wp-content/uploads/2015/04/Check-System-Hostname.jpeg) -查看系统主机名称 + +*查看系统主机名称* 要设置新的主机名称,我们需要编辑 ‘/etc/hostsname’ 文件并用想要的名称替换旧的主机名称。 # vi /etc/hostname ![在 CentOS 中设置主机名称](http://www.tecmint.com/wp-content/uploads/2015/04/Set-System-Hostname.jpeg) -在 CentOS 中设置主机名称 + +*在 CentOS 中设置主机名称* 设置完了主机名称之后,务必注销后重新登录确认主机名称。登录后检查新的主机名称。 $ echo $HOSTNAME ![确认主机名称](http://www.tecmint.com/wp-content/uploads/2015/04/Confirm-Hostname.jpeg) -确认主机名称 + +*确认主机名称* 你也可以用 ‘hostname’ 命令查看你当前的主机名。 $ hostname +(LCTT 译注:关于设置静态、瞬态和灵活主机名的更多信息,请参考:http://www.linux.cn/article-3937-1.html ) + ### 4. 更新或升级最小化安装的 CentOS ### -除了更新和安装已经有的软件的最新版本以及安全升级,这不会安装任何新的软件。总的来说更新和升级是相同的,除了事实上 升级 = 更新 + 更新时进行废弃处理。 +这样做除了更新安装已有的软件最新版本以及安全升级,不会安装任何新的软件。总的来说更新(update)和升级(upgrade)是相同的,除了事实上 升级 = 更新 + 更新时进行废弃处理。 # yum update && yum upgrade ![更新最小化安装的 CentOS 服务器](http://www.tecmint.com/wp-content/uploads/2015/04/Update-CentOS-Server.jpeg) -更新最小化安装的 CentOS 服务器 + +*更新最小化安装的 CentOS 服务器* **重要**: 你也可以运行下面的命令,这不会弹出软件更新的提示,你也就不需要输入 ‘y’ 接受更改。 @@ -147,7 +161,8 @@ RHEL 7 最小化安装完成后,是时候注册并启用系统红帽订阅库 # yum install links ![安装命令行浏览器](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Commandline-Browser.jpeg) -Links: 命令行 Web 浏览器 + +*Links: 命令行 Web 浏览器* 请查看我们的文章 [用 links 工具命令行浏览 Web][4] 了解用 links 工具浏览 web 的方法和例子。 @@ -157,8 +172,9 @@ Links: 命令行 Web 浏览器 # yum install httpd -![在 CentOS 上安装 Apache](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-on-CentOS.jpeg.) -安装 Apache 服务器 +![在 CentOS 上安装 Apache](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-on-CentOS.jpeg) + +*安装 Apache 服务器* 如果你想更改 Apache HTTP 服务器的默认端口号(80)为其它端口,你需要编辑配置文件 ‘/etc/httpd/conf/httpd.conf’ 并查找以下面开始的行: @@ -167,7 +183,8 @@ Links: 命令行 Web 浏览器 把端口号 ‘80’ 改为其它任何端口(例如 3221),保存并退出。 ![在 CentOS 上更改 Apache 端口](http://www.tecmint.com/wp-content/uploads/2015/04/Change-Apache-Port.jpeg) -更改 Apache 端口 + +*更改 Apache 端口* 增加刚才分配给 Apache 的端口通过防火墙,然后重新加载防火墙。 @@ -183,6 +200,8 @@ Links: 命令行 Web 浏览器 # firewall-cmd –reload +(LCTT 译注:关于 firewall 的进一步使用,请参照:http://www.linux.cn/article-4425-1.html ) + 完成上面的所有事情之后,是时候重启 Apache HTTP 服务器了,然后新的端口号才能生效。 # systemctl restart httpd.service @@ -192,12 +211,15 @@ Links: 命令行 Web 浏览器 # systemctl start httpd.service # systemctl enable httpd.service +(LCTT 译注:关于 systemctl 的进一步使用,请参照:http://www.linux.cn/article-3719-1.html ) + 如下图所示,用 links 命令行工具 验证 Apache HTTP 服务器。 # links 127.0.0.1 ![验证 Apache 状态](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Apache-Status.jpeg) -验证 Apache 状态 + +*验证 Apache 状态* -------------------------------------------------------------------------------- @@ -205,7 +227,7 @@ via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installatio 作者:[Avishek Kumar][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1e64ea0c0bb77d008ff63f79544862fc370bf7b7 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Apr 2015 16:10:40 +0800 Subject: [PATCH 097/154] PUB:30 Things to Do After Minimal RHEL or CentOS 7 Installation--2 @ictlyh --- ...inimal RHEL or CentOS 7 Installation--2.md | 59 +++++++++++-------- 1 file changed, 35 insertions(+), 24 deletions(-) rename {translated/tech => published}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md (62%) diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md similarity index 62% rename from translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md rename to published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md index c5e0f29857..6eeff54bae 100644 --- a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md +++ b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md @@ -1,8 +1,8 @@ -安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--2 +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(二) ================================================================================ ### 7. 安装 PHP ### -PHP 是用于 web 基础服务的服务器端脚本语言。它也经常被用作通用编程语言。在最小化安装的 CentOS 中安装 PHP。 +PHP 是用于 web 基础服务的服务器端脚本语言。它也经常被用作通用编程语言。在最小化安装的 CentOS 中安装 PHP: # yum install php @@ -12,7 +12,7 @@ PHP 是用于 web 基础服务的服务器端脚本语言。它也经常被用 下一步,通过在 Apache 文档根目录下创建下面的 php 脚本验证 PHP。 - # echo -e "" > /var/ww/html/phpinfo.php + # echo -e "" > /var/www/html/phpinfo.php 现在在 Linux 命令行中查看我们刚才创建的 PHP 文件(phpinfo.php)。 @@ -21,32 +21,35 @@ PHP 是用于 web 基础服务的服务器端脚本语言。它也经常被用 # links http://127.0.0.1/phpinfo.php ![验证 PHP](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-PHP.jpeg) -验证 PHP + +*验证 PHP* ### 8. 安装 MariaDB 数据库 ### -MariaDB 是 MySQL 的一个分支。红帽企业版 Linux 以及它的衍生版已经从 MySQL 迁移到 MariaDB。这是个主要的数据库管理系统。这又是一个你必须拥有的工具,不管你在配置怎样的服务器,或迟或早你都会需要它。在最小化安装的 CentOS 上安装 MariaDB,如下所示。 +MariaDB 是 MySQL 的一个分支。RHEL 以及它的衍生版已经从 MySQL 迁移到 MariaDB。这是一个主流的数据库管理系统,也是一个你必须拥有的工具。不管你在配置怎样的服务器,或迟或早你都会需要它。在最小化安装的 CentOS 上安装 MariaDB,如下所示: # yum install mariadb-server mariadb ![安装 MariaDB 数据库](http://www.tecmint.com/wp-content/uploads/2015/04/Install-MariaDB-Database.jpeg) -安装 MariaDB 数据库 -启动被配置 MariaDBs 随机启动。 +*安装 MariaDB 数据库* + +启动 MariaDB 并配置它开机时自动启动。 # systemctl start mariadb.service # systemctl enable mariadb.service -允许 mysql(mariadb) 服务通过防火墙 +允许 mysql(mariadb) 服务通过防火墙(LCTT 译注:如果你的 MariaDB 只用在本机,则务必不要设置防火墙允许通过,使用 UNIX Socket 连接你的数据库;如果需要在别的服务器上连接数据库,则尽量使用内部网络,而不要将数据库服务暴露在公开的互联网上。) # firewall-cmd –add-service=mysql -现在是时候确保 MariaDB 服务器安全了。 +现在是时候确保 MariaDB 服务器安全了(LCTT 译注:这个步骤主要是设置 mysql 管理密码)。 # /usr/bin/mysql_secure_installation ![保护 MariaDB 数据库](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-MariaDB.jpeg) -保护 MariaDB 数据库 + +*保护 MariaDB 数据库* 请阅读: @@ -55,18 +58,19 @@ MariaDB 是 MySQL 的一个分支。红帽企业版 Linux 以及它的衍生版 ### 9. 安装和配置 SSH 服务器 ### -SSH 表示 Secure Shell,是 Linux 远程管理的默认协议。 SSH 是随最小化 CentOS 服务器一起发布的最重要的软件之一。 +SSH 即 Secure Shell,是 Linux 远程管理的默认协议。 SSH 是随最小化 CentOS 服务器中安装运行的最重要的软件之一。 检查当前已安装的 SSH 版本。 # SSH -V ![检查 SSH 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SSH-Version.jpeg) -检查 SSH 版本 -在默认的 SSH 协议上使用安全协议,更改端口号进一步加强安全。编辑 SSH 的配置文件 ‘/etc/ssh/ssh_config’。 +*检查 SSH 版本* -去掉下面行的注释或者从协议行中删除 1,然后行看起来像这样: +使用更安全的 SSH 协议,而不是默认的协议,并更改端口号进一步加强安全。编辑 SSH 的配置文件 ‘/etc/ssh/ssh_config’。 + +去掉下面行的注释或者从协议行中删除 1,然后行看起来像这样(LCTT 译注: SSH v1 是过期废弃的不安全协议): # Protocol 2,1 (原来) Protocol 2 (现在) @@ -74,15 +78,17 @@ SSH 表示 Secure Shell,是 Linux 远程管理的默认协议。 SSH 是随最 这个改变强制 SSH 使用 协议 2,它被认为比协议 1 更安全,同时也确保在配置中更改端口号 22 为其它。 ![保护 SSH 登录](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-SSH.jpeg) -保护 SSH 登录 -取消 SSH ‘root login’ 然后允许只有当以普通用户账号登录后才能连接到 root 以进一步加强安全。为了做到这个,打开并编辑配置文件 ‘/etc/ssh/sshd_config’ 并更改 PermitRootLogin yes 为 PermitRootLogin no。 +*保护 SSH 登录* + +取消 SSH 中的‘root login’, 只允许通过普通用户账号登录后才能使用 su 切换到 root,以进一步加强安全。请打开并编辑配置文件 ‘/etc/ssh/sshd_config’ 并更改 PermitRootLogin yes 为 PermitRootLogin no。 # PermitRootLogin yes (原来) PermitRootLogin no (现在) ![取消 SSH Root 登录](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-SSH-Root-Login.jpeg) -取消 SSH Root 登录 + +*取消 SSH Root 直接登录* 最后,重启 SSH 服务启用更改。 @@ -96,34 +102,39 @@ SSH 表示 Secure Shell,是 Linux 远程管理的默认协议。 SSH 是随最 ### 10. 安装 GCC (GNU 编译器集) ### -GCC 表示 GNU 编译器集,是一个 GNU 项目开发的支持多种编程语言的编译系统。在最小化安装的 CentOS 没有默认安装。运行下面的命令安装 gcc 编译器。 +GCC 即 GNU 编译器集,是一个 GNU 项目开发的支持多种编程语言的编译系统(LCTT 译注:在你需要自己编译构建软件时需要它)。在最小化安装的 CentOS 没有默认安装。运行下面的命令安装 gcc 编译器。 + # yum install gcc ![在 CentOS 上安装 GCC](http://www.tecmint.com/wp-content/uploads/2015/04/Install-GCC-in-CentOS.jpeg) -在 CentOS 上安装 GCC + +*在 CentOS 上安装 GCC* 检查安装的 gcc 版本。 # gcc --version ![检查 GCC 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-GCC-Version.jpeg) -检查 GCC 版本 + +*检查 GCC 版本* ### 11. 安装 Java ### -Java是一种通用的基于类的,面向对象的编程语言。在最小化 CentOS 服务器中没有默认安装。按照下面命令从库中安装 Java。 +Java是一种通用的基于类的,面向对象的编程语言。在最小化 CentOS 服务器中没有默认安装(LCTT 译注:如果你没有任何 Java 应用,可以不用装它)。按照下面命令从库中安装 Java。 # yum install java ![在 CentOS 上安装 Java](http://www.tecmint.com/wp-content/uploads/2015/04/Install-java.jpeg) -安装 Java + +*安装 Java* 检查安装的 Java 版本。 # java -version ![检查 Java 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Java-Version.jpeg) -检查 Java 版本 + +*检查 Java 版本* -------------------------------------------------------------------------------- @@ -131,7 +142,7 @@ via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installatio 作者:[Avishek Kumar][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 944c76f2cfcfa45bea8ba6fe399d95dced8150d1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 27 Apr 2015 16:34:01 +0800 Subject: [PATCH 098/154] =?UTF-8?q?20150427-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...o After Installing Ubuntu 15.04 Desktop.md | 298 ++++++++++++++++++ ...0427 How to set up NTP server in CentOS.md | 165 ++++++++++ 2 files changed, 463 insertions(+) create mode 100644 sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md create mode 100644 sources/tech/20150427 How to set up NTP server in CentOS.md diff --git a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md new file mode 100644 index 0000000000..6f1114b9bb --- /dev/null +++ b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -0,0 +1,298 @@ +15 Things to Do After Installing Ubuntu 15.04 Desktop +================================================================================ +This tutorial is intended for beginners and covers some basic steps on what to do after you have installed Ubuntu 15.04 “Vivid Vervet” Desktop version on your computer in order to customize the system and install basic programs for daily usage. + +![Things to Do After Installing Ubuntu 15.04](http://www.tecmint.com/wp-content/uploads/2015/04/things-to-do-after-installing-ubuntu-15.04.jpeg) +15 Things to Do After Installing Ubuntu 15.04 + +### 1. Enable Ubuntu Extra Repositories and Update the System ### + +The first thing you should take care of after a fresh installation of Ubuntu is to enable Ubuntu Extra Repositories provided by official Canonical Partners and keep an up-to-date system with the last security patches and software updates. + +In order to accomplish this step, open from the left Launcher System Settings -> Software and Updates utility and check all Ubuntu Software and Other Software (Canonical Partners) repositories. After you finish hit the Close button and wait for the utility to Reload the cache sources tree. + +![Software Updates](http://www.tecmint.com/wp-content/uploads/2015/04/Software-Updates.jpg) +Software Updates + +![Other Software (Canonical Partners)](http://www.tecmint.com/wp-content/uploads/2015/04/Other-Software.jpg) +Other Software (Canonical Partners) + +For a fast and smooth update process, open a Terminal and issue the following command in order to update the system using the new software repositories: + + $ sudo apt-get update + $ sudo apt-get upgrade + +![Ubuntu Upgrade](http://www.tecmint.com/wp-content/uploads/2015/04/Ubuntu-Upgrade.jpg) +Ubuntu Upgrade + +### 2. Install Additional Drivers ### + +In order for the system to scan and install additional hardware proprietary drivers, open Software and Updates utility from System Settings, go to Additional Drivers tab and wait for the utility to scan for drivers. + +If some drivers matching your hardware are found, check the drivers you want to install and hit the Apply Changes button to install it. In case the proprietary drivers are not working as expected, uninstall them using the Revert button or check Do not use the device and Apply Changes. + +![Install Drivers in Ubuntu](http://www.tecmint.com/wp-content/uploads/2015/04/install-drivers.jpg) +Install Drivers + +### 3. Install Synaptic and Gdebi Package Tools ### + +Besides Ubuntu Software Center, Synaptic is a Graphical utility for apt command line through which you can manage repositories or install, remove, search, upgrade and configure software packages. Similar way, Gdebi has the same functionality for local .deb packages. To install this two package managers on your system issue the following command on Terminal: + + $ sudo apt-get install synaptic gdebi + +![Install Synaptic and Gdebi](http://www.tecmint.com/wp-content/uploads/2015/04/install-synaptic-gdebi.jpg) +Install Synaptic and Gdebi + +![Synaptic Package Manager](http://www.tecmint.com/wp-content/uploads/2015/04/synaptic-package-manager.jpg) +Synaptic Package Manager + +### 4. Change System Appearance and Behavior ### + +If you want to change Desktop Background or Launcher Icon Size, open System Settings –> Appearance –> Look and personalize the desktop. To move the menu to window title bar, enable workspaces and desktop icons or auto-hide the Launcher visit Behavior tab. + +![System Appearances](http://www.tecmint.com/wp-content/uploads/2015/04/system-appearance.jpg) +System Appearances + +### 5. Improve System Security and Privacy ### + +![System Security Enhancement](http://www.tecmint.com/wp-content/uploads/2015/04/system-security-1.jpg) +System Security Enhancement + +![System Security Options](http://www.tecmint.com/wp-content/uploads/2015/04/system-security-2.jpg) +System Security Options + +### 5. Disable Unneeded Startup Applications ### + +To improve system login speed, reveal hidden Startup Applications by issuing the below command on Terminal, open Startup Applications utility by searching it in Dash and uncheck the unneeded applications during login process. + + $ sudo sed -i ‘s/NoDisplay=true/NoDisplay=false/g’ /etc/xdg/autostart/*.desktop + +![Disable Unwanted Applications](http://www.tecmint.com/wp-content/uploads/2015/04/disable-unwanted-applications.jpg) +Disable Unwanted Applications + +### 6. Add Extended Multimedia Support ### + +By default, Ubuntu comes with a minimal support for media files. In order to play various media formats or manipulate video files, install the following multimedia applications: + +- VLC +- Smplayer +- Audacious +- QMMP +- Mixxx +- XBMC +- Handbrake +- Openshot + +Use the following command line to install all with one shot: + + $ sudo apt-get install vlc smplayer audacious qmmp mixxx xbmc handbrake openshot + +![Install Media Players](http://www.tecmint.com/wp-content/uploads/2015/04/install-media-players.jpg) +Install Media Players + +![Media Player Playlist](http://www.tecmint.com/wp-content/uploads/2015/04/media-playllist.jpg) +Media Player Playlist + +Besides this multimedia players also install ubuntu-restricted-extras and Java support packages in order to decode and support other restricted media formats. + + $ sudo apt-get install ubuntu-restricted-extras openjdk-8-jdk + +![Install Ubuntu Extras](http://www.tecmint.com/wp-content/uploads/2015/04/install-ubuntu-extras.jpg) +Install Ubuntu Extras + +To enable DVD Playback and other multimedia codecs issue the following command on Terminal: + + $ sudo apt-get install ffmpeg gstreamer0.10-plugins-bad lame libavcodec-extra + $ sudo /usr/share/doc/libdvdread4/install-css.sh + +![Enable Video Codes](http://www.tecmint.com/wp-content/uploads/2015/04/enable-video-playbacks.jpg) +Enable Video Codes + +### 7. Install Image Applications ### + +If you are a photography enthusiast and you want to handle and manipulate images on Ubuntu, probably you want to install the following imaging programs: + +- GIMP (alternative for Adobe Photoshop) +- Darktable +- Rawtherapee +- Pinta +- Shotwell +- Inkscape (alternative for Adobe Illustrator) +- Digikam +- Cheese + +This applications can be installed from Ubuntu Software Center or all at once by using the following command line on Terminal: + + $ sudo apt-get install gimp gimp-plugin-registry gimp-data-extras darktable rawtherapee pinta shotwell inkscape + +![Install Image Applications](http://www.tecmint.com/wp-content/uploads/2015/04/install-image-applications.jpg) +Install Image Applications + +![Rawtherapee Tool](http://www.tecmint.com/wp-content/uploads/2015/04/rawtherapee.jpg) +Rawtherapee Tool + +### 8. Install Media Burners ### + +To mount ISO images or burn a CDs or a DVD, you can choose and install from the following software: + +- Brasero Disk Burner +- K3b +- Xfburn +- Furius ISO Mount + + $ sudo apt-get install brasero + $ sudo apt-get install k3b + $ sudo apt-get install xfburn + $ sudo apt-get install furiusisomount + +![Install Media Burners](http://www.tecmint.com/wp-content/uploads/2015/04/install-media-burners.jpg) +Install Media Burners + +### 9. Install Archive Applications ### + +To handle most of archive formatted files (zip, tar.gz, zip, 7zip rar etc) install the following packages by issuing the below command: + + $ sudo apt-get install unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller + +![Install Archive Applications](http://www.tecmint.com/wp-content/uploads/2015/04/install-archive-apps.jpg) +Install Archive Applications + +### 10. Install Chat Application ### + +If you want to talk to people all over the world, here is a list of the most popular chat applications for Linux: + +- Pidgin +- Skype +- Xchat +- Telegram +- aMSN +- Viber + +You can install most of them from Ubuntu Software Center or by using the command line: + + $ sudo apt-get install pidgin + $ sudo apt-get install skype + $ sudo apt-get install xchat + $ sudo apt-get install amsn + $ sudo add-apt-repository ppa:atareao/telegram -y + $ sudo apt-get update + $ sudo apt-get install telegram + +![Install Chat Applications](http://www.tecmint.com/wp-content/uploads/2015/04/install-chat-apps.jpg) +Install Chat Applications + +To install Viber application on Ubuntu visit [Viber official webpage][1], download the Debian package locally and install the viber.deb application using Gdebi package manager (left click – > Open with -> GDebi Package Installer). + +![Install Viber in Ubuntu](http://www.tecmint.com/wp-content/uploads/2015/04/install-viber.jpg) +Install Viber + +### 11. Install Torrent Software ### + +The most popular torrent applications and peer-to-peer file sharing programs for Ubuntu are: + +- Deluge +- Transmission +- Qbittorrent +- LinuxDC++ + +To install your favorite peer-to-peer file sharing application on Ubuntu issue the following command on Terminal. + + $ sudo apt-get install deluge + $ sudo apt-get install transmission + $ sudo apt-get install qbittorrent + $ sudo apt-get install linuxdcpp + +![Install Torrent](http://www.tecmint.com/wp-content/uploads/2015/04/install-torrent.jpg) +Install Torrent + +### 12. Install Windows Emulator -Wine and Gaming Support – Steam ### + +Wine emulator allows you to install and run Windows applications on Linux. On the other hand, Steam is a popular gaming platform for Linux based systems developed by Valve. To install both of them on your machine issue the following command on Terminal or use Ubuntu Software Center. + + $ sudo apt-get install steam wine winetricks + +![Install Wine](http://www.tecmint.com/wp-content/uploads/2015/04/install-wine.jpg) +Install Wine + +### 13. Install Cairo-Dock and Enable Desktop Visual Effects ### + +Cairo-Dock is a beautiful and flexible launcher bar for Linux desktops similar to the Mac OS X dock. To install it on Ubuntu, run the following command on Terminal. + + $ sudo apt-get install cairo-dock cairo-dock-plug-ins + +![Install Cairo Dock](http://www.tecmint.com/wp-content/uploads/2015/04/install-cairo-dock.jpg) +Install Cairo Dock + +![Add Cairo Dock at Startup](http://www.tecmint.com/wp-content/uploads/2015/04/add-cairo-dock-startup.jpg) +Add Cairo Dock at Startup + +To enable a set of Desktop Effects, such as Cube effect, install Compiz package with the following command: + + $ sudo apt-get install compiz compizconfig-settings-manager compiz-plugins-extra + +To activate the Desktop Cube effect, search for ccsm on Dash, open CompizConfig Settings Manager, go to General Options – > Desktop Size and set Horizontal Virtual Size value to 4 and Vertical Virtual Size to 1. Then go back and check Desktop Cube (Disable Desktop Wall) and Rotate Cube boxes (Resolve Conflicts ->Disable Switch to Viewport 1) and press Ctrl+Alt+Left Mouse Click to view the cube effect. + +![Enable Compiz](http://www.tecmint.com/wp-content/uploads/2015/04/enable-compiz.jpg) +Enable Compiz + +![Compiz Settings](http://www.tecmint.com/wp-content/uploads/2015/04/compiz-settings.jpg) +Compiz Settings + +![Compiz Settings Addons](http://www.tecmint.com/wp-content/uploads/2015/04/compiz-settings-1.jpg) +Compiz Settings Addons + +![Desktop Window Rotating](http://www.tecmint.com/wp-content/uploads/2015/04/desktop-cube.jpg) +Desktop Window Rotating + +### 14. Add Extra Browser Support ### + +Ubuntu 15.04 comes by default with Mozilla Firefox Web Browser. To install other browsers such as Google Chrome or Opera, visit their official web pages, download the provided .deb packages and install them on your system using the Gdebi Package Installer. + +![Enable Browser Support](http://www.tecmint.com/wp-content/uploads/2015/04/enable-browser-support.jpg) +Enable Browser Support + +![Opera Browser Support](http://www.tecmint.com/wp-content/uploads/2015/04/opera.jpg) +Opera Browser Support + +To install Chromium Open Source browser issue the following command on Terminal. + + $ sudo apt-get install chromium-browser + +### 15. Install Tweak Tools ### + +Want extra applications for customizing Ubuntu? Then install Unity Tweak Tool and Gnome Tweak Tool by issuing the following commands on Terminal. + + $ sudo apt-get install unity-tweak-tool gnome-tweak-tool + +![Install Tweak Tool](http://www.tecmint.com/wp-content/uploads/2015/04/install-tweak-tool.jpg) +Install Tweak Tool + +![Tweak Tool Settings](http://www.tecmint.com/wp-content/uploads/2015/04/tweak-settings.jpg) +Tweak Tool Settings + +Another interesting tweak tool is represented by the Ubuntu Tweak package which can be obtained and installed by visiting the webpage: [http://ubuntu-tweak.com/][2]. + +![Tweak Tool: System Information](http://www.tecmint.com/wp-content/uploads/2015/04/tweak-system-info.jpg) +Tweak Tool: System Information + +After you have installed all this bunch of software, you might want to clean your system in order to free some space on the hard drive, by issuing the following commands: + + $ sudo apt-get -y autoremove + $ sudo apt-get -y autoclean + $ sudo apt-get -y clean + +This are just a few tweaks and programs that an average user might install and use on Ubuntu 15.04 Desktop for daily basic utilization. For more advanced programs, features and utilities use Ubuntu Software Center or consult Ubuntu Wiki webpage. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-installing-ubuntu-15-04-desktop/ + +作者:[Matei Cezar][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/cezarmatei/ +[1]:http://www.viber.com/en/products/linux +[2]:http://ubuntu-tweak.com/ \ No newline at end of file diff --git a/sources/tech/20150427 How to set up NTP server in CentOS.md b/sources/tech/20150427 How to set up NTP server in CentOS.md new file mode 100644 index 0000000000..54400aef7b --- /dev/null +++ b/sources/tech/20150427 How to set up NTP server in CentOS.md @@ -0,0 +1,165 @@ +How to set up NTP server in CentOS +================================================================================ +Network Time Protocol (NTP) is used to synchronize system clocks of different hosts over network. All managed hosts can synchronize their time with a designated time server called an NTP server. An NTP server on the other hand synchronizes its own time with any public NTP server, or any server of your choice. The system clocks of all NTP-managed devices are synchronized to the millisecond precision. + +In a corporate environment, if they do not want to open up their firewall for NTP traffic, it is necessary to set up in-house NTP server, and let employees use the internal server as opposed to public NTP servers. In this tutorial, we will describe how to configure a CentOS system as an NTP server. Before going into the detail, let's go over the concept of NTP first. + +### Why Do We Need NTP? ### + +Due to manufacturing variances, all (non-atomic) clocks do not run at the exact same speed. Some clocks tend to run faster, while some run slower. So over a large timeframe, the time of one clock gradually drifts from another, causing what is known as "clock drift" or "time drift". To minimize the effect of clock drift, the hosts using NTP should periodically communicate with a designated NTP server to keep their clock in sync. + +Time synchrony across different hosts is important for things like scheduled backup, [intrusion detection][1] logging, [distributed job scheduling ][2]or transaction bookkeeping. It may even be required as part of regulatory compliance. + +### NTP Hierarchy ### + +NTP clocks are organized in a layered hierarchy. Each level of the hierarchy is called a *stratum*. The notion of stratum describes how many NTP hops away a machine is from an authoritative time source. + +![](https://farm8.staticflickr.com/7590/16645732413_3b7af58186_c.jpg) + +Stratum 0 is populated with clocks that have virtually no time drifts, such as atomic clocks. These clocks cannot be directly used over the network. Stratum N (N > 1) servers synchronize their time against Stratum N-1 servers. Stratum N clocks may be connected with each other over network. + +NTP supports up to 15 stratums in the hierarchy. Stratum 16 is considered unsynchronized and unusable. + +### Preparing CentOS Server ### + +Now let's proceed to set up an NTP server on CentOS. + +First of all, we need to make sure that the time zone of the server is set up correctly. In CentOS 7, we can use the timedatectl command to view and change the server time zone (e.g., "Australia/Adelaide") + + # timedatectl list-timezones | grep Australia + # timedatectl set-timezone Australia/Adelaide + # timedatectl + +![](https://farm8.staticflickr.com/7605/16645732463_db75a0bdcd_o.png) + +Go ahead and set up necessary software using yum. + + # yum install ntp + +Then we will add the global NTP servers to synchronize time with. + + # vim /etc/ntp.conf + +---------- + + server 0.oceania.pool.ntp.org + server 1.oceania.pool.ntp.org + server 2.oceania.pool.ntp.org + server 3.oceania.pool.ntp.org + +By default, NTP server logs are saved in /var/log/messages. If you want to use a custom log file, that can be specified as well. + + logfile /var/log/ntpd.log + +If you opt for a custom log file, make sure to change its ownership and SELinux context. + + # chown ntp:ntp /var/log/ntpd.log + # chcon -t ntpd_log_t /var/log/ntpd.log + +Now initiate NTP service and make sure it's added to startup. + + # systemctl restart ntp + # systemctl enable ntp + +### Verifying NTP Server Clock ### + +We can use the ntpq command to check how the local server's clock is synchronized via NTP. + +![](https://farm9.staticflickr.com/8713/16645732513_1823736ca8_b.jpg) + +The following table explains the output columns. + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
remoteThe sources defined at ntp.conf. '*' indicates the current and best source; '+' indicates that these sources are available as NTP source. Sources with - are considered unusable.
refidThe IP address of the clock with which the remote server clock is synchronized with.
stStratum
tType. 'u' is for unicast. Other values may include local, multicast, broadcast.
whenThe time elapsed (in seconds) since the last contact with the server.
pollPolling frequency with the server in seconds.
reachAn octal value that indicates whether there are any errors in communication with the server. The value 377 indicates 100% success.
delayThe round trip time between our server and the remote server.
offsetThe time difference between our server and the remote server in milliseconds.
jitterThe average time difference in milliseconds between two samples.
+ +### Controlling Access to NTP Server ### + +By default, NTP server allows incoming queries from all hosts. If you want to filter incoming NTP synchronization connections, you could add a rule in your firewall to filter the traffic. + + # iptables -A INPUT -s 192.168.1.0/24 -p udp --dport 123 -j ACCEPT + # iptables -A INPUT -p udp --dport 123 -j DROP + +The rule will allow NTP traffic (on port UDP/123) from 192.168.1.0/24, and deny traffic from all other networks. You can update the rule to match your requirements. + +### Configuring NTP Clients ### + +#### 1. Linux #### + +NTP client hosts need the ntpdate package to synchronize time against the server. The package can be easily installed using yum or apt-get. After installing the package, run the command with the IP address of the server. + + # ntpdate + +The command is identical for RHEL and Debian based systems. + +#### 2. Windows #### + +If you are using Windows, look for 'Internet Time' under Date and Time settings. + +#### 3. Cisco Devices #### + +If you want to synchronize the time of a Cisco device, you can use the following command from the global configuration mode. + + # ntp server + +NTP enabled devices from other vendors have their own parameters for Internet time. Please check the documentation of the device if you want to synchronize its time with the NTP server. + +### Conclusion ### + +To sum up, NTP is a protocol that keeps the clocks across all your hosts in sync. We have demonstrated how we can set up an NTP server, and let NTP enabled devices synchronize their time against the server. + +Hope this helps. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/setup-ntp-server-centos.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/how-to-compile-and-install-snort-from-source-code-on-ubuntu.html +[2]:http://xmodulo.com/how-to-install-hdfs-and-hadoop-using.html \ No newline at end of file From c59801a39ae20f143ff332748836699954213711 Mon Sep 17 00:00:00 2001 From: runningwater Date: Mon, 27 Apr 2015 20:01:42 +0800 Subject: [PATCH 099/154] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=ADby=20running?= =?UTF-8?q?water?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Manage and Use LVM (Logical Volume Management) in Ubuntu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md b/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md index 570217f220..d062a85336 100644 --- a/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md +++ b/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md @@ -1,3 +1,4 @@ +translating by runningwater How to Manage and Use LVM (Logical Volume Management) in Ubuntu ================================================================================ ![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-1.png.pagespeed.ic.VGSxDeVS9P.png) @@ -258,7 +259,7 @@ That should cover most of what you need to know to use LVM. If you’ve got some via: http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ -译者:[译者ID](https://github.com/译者ID) +译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From baee0efc8effe0c5a1519ec4e235ef69014ed347 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Mon, 27 Apr 2015 23:22:52 +0800 Subject: [PATCH 100/154] Update 20150128 Docker-2 Setting up a private Docker registry.md --- .../20150128 Docker-2 Setting up a private Docker registry.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md b/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md index 9a9341b4b7..625281ee7c 100644 --- a/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md +++ b/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md @@ -1,3 +1,4 @@ +[Translating by DongShuaike] Setting up a private Docker registry ================================================================================ ![](http://cocoahunter.com/content/images/2015/01/docker2.jpg) @@ -238,4 +239,4 @@ via: http://cocoahunter.com/2015/01/23/docker-2/ [8]:http://localhost:5000/v1/search [9]:http://cocoahunter.com/2015/01/23/docker-3/ [10]:http://boot2docker.io/ -[11]:https://github.com/docker/docker-registry/ \ No newline at end of file +[11]:https://github.com/docker/docker-registry/ From 38708b4f44d7ab040aa836b5a8584483b111e604 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Apr 2015 00:11:57 +0800 Subject: [PATCH 101/154] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 已转载别处译文,十分可惜的放弃发布本篇 @KayGuoWhu --- .../20150318 The future of Linux storage.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/talk => published}/20150318 The future of Linux storage.md (86%) diff --git a/translated/talk/20150318 The future of Linux storage.md b/published/20150318 The future of Linux storage.md similarity index 86% rename from translated/talk/20150318 The future of Linux storage.md rename to published/20150318 The future of Linux storage.md index 23a2dfc674..f2224a5bb7 100644 --- a/translated/talk/20150318 The future of Linux storage.md +++ b/published/20150318 The future of Linux storage.md @@ -2,7 +2,7 @@ Linux存储的未来 ================================================================================ > **摘要**:Linux系统的软件开发者们正致力于使Linux支持更多种类的文件和存储方案。 -波士顿 - 在[Linux基金会][1]最近的[Vault][2]展示会上,全都是关于文件系统和存储方案的讨论。你可以会想关于这两个主题并没有什么展值得讨论的最新进展,但事实并非如此。 +波士顿 - 在[Linux基金会][1]最近的[Vault][2]展示会上,全都是关于文件系统和存储方案的讨论。你可以会觉得关于这两个主题并没有什么值得讨论的最新进展,但事实并非如此。 ![](http://zdnet2.cbsistatic.com/hub/i/r/2015/03/12/c8f92cc2-b963-4238-80a0-d785ec93698c/resize/770x578/08d93a8a393d3f50b2a56e6b0e7a0ca9/btrfs-1.jpg) @@ -14,17 +14,17 @@ Linux存储的未来 ### Btrfs ### -例如,Chris Mason,一位来自Facebook的软件工程师,也是[Btrfs][6](对外宣称Butter FS)的维护者之一,说明了Facebook是如何使用这种文件系统。Btrfs拥有文件系统固有的许多优点,比如既能处理大量的小文件,也能处理大小可达16EB的单个文件;支持RAID的baked(烦请校正补充);内置的文件系统压缩,以及集成了对多种存储设备的支持。 +例如,Chris Mason,一位来自Facebook的软件工程师,也是[Btrfs][6](念做 Butter FS)的维护者之一,介绍了Facebook是如何使用这种文件系统。Btrfs拥有文件系统固有的许多优点,比如既能处理大量的小文件,也能处理大小可达16EB的单个文件;支持RAID ;内置的文件系统压缩,以及集成了对多种存储设备的支持。 -当然,Facebook的服务器也运行在Linux上。更准确地讲,是运行在一个基于[CentOS][7]的内部发行版上,它是基于3.10和3.18版的内核。对Facebook来说,真正的收获是Btrfs在由Facebook持续的更新用户操作带来的巨大的IOPS(每秒钟输入输出的操作数)的负载下依旧保持稳定和快速。 +当然,Facebook的服务器也运行在Linux上。更准确地讲,是运行在一个基于[CentOS][7]的内部发行版上,它是基于3.10和3.18版的内核。对Facebook来说,真正的收获是Btrfs在Facebook持续更新的用户操作所带来的巨大的IOPS(每秒钟输入输出的操作数)的负载下依旧保持稳定和快速。 这就是好消息,但坏消息是对于像MySQL一样的传统DBMS(数据库管理系统)来说Btrfs还是太慢了。对此,Facebook采用了[XFS][8]。为了协同这两种文件系统,Facebook又用到了一种叫做[Gluster][9]的开源分布式文件系统。 -Facebook,一直与上游的负责Btrfs的Linux内核开发者保持密切联系,致力于提高Btrfs在DBMS上的速度。Mason和他的同事在[RocksDB][10]数据库上使用Btrfs以达成目标,RocksDB是一种为提供快速存储开发的持久化键值存储系统,可以作为客户端服务器模式数据库的基础部分。 +Facebook,一直与上游的负责Btrfs的Linux内核开发者保持密切联系,致力于提高Btrfs在DBMS上的速度。Mason和他的同事的目标是在[RocksDB][10]数据库上使用Btrfs,RocksDB是一种为提供快速存储开发的持久化键值存储系统,可以作为客户端服务器模式数据库的基础部分。 当然Btrfs也还存在一些问题,比如,如果有用户傻到用数据把硬盘几乎要撑爆时,Btrfs会在硬盘被完全装满前阻止用户继续写入。对某些工程来说,比如[CoreOS][12],一款依赖容器化的企业版Linux系统,这种问题是致命的。[因此,CoreOS已经切换到使用xt4和overlayfs了][11]。 -Btrfs的开发人员正致力于数据去重。在这一点上,当文件系统中拥有超过一个的相同文件时,会自动删除多余文件。正如Mason所说,“并非每个人都需要这个功能,但如果有人需要,那就是真的需要!” +Btrfs的开发人员正致力于数据去重。在这一点上,当文件系统中拥有超过一个的相同文件时,会自动删除多余文件。正如Mason所说,“并非每个人都需要这个功能,但如果有人需要,那就是真的有用!” 在正在开展的重要性工作中,Btrfs并非是唯一的文件系统。John Spary,[Red Hat][13]的一位高级软件工程师,提到了另一款名为[Ceph][14]的分布式文件系统。 @@ -38,7 +38,7 @@ Ceph提供了一种分布式对象存储方案和文件系统,反过来它依 但是,Ceph FS仍值得去做,正如Spray所说,“因为兼容POSIX的文件系统是操作系统通用的。”这并不是说Ceph FS就一无是处。“它并不是支离破碎的,相反它奏效了。所缺的是修复和监控工具。” -Red Hat目前正致力于获得[fsck][17]和日志修复工具、快照强化、更好客户端访问控制,以及云与容器的集成。尽管Ceph FS到目前为止只是一种有潜力或者没前景的文件系统,但仍然值得用在生产环境中。 +Red Hat目前正致力于完成[fsck][17]和日志修复工具开发、快照强化、更好客户端访问控制,以及云与容器的集成。尽管Ceph FS到目前为止只是一种有潜力或者没前景的文件系统,但仍然值得用在生产环境中。 ### 文件与存储的差别与目标 ### @@ -56,7 +56,7 @@ via: http://www.zdnet.com/article/linux-storage-futures/ 作者:[Steven J. Vaughan-Nichols][a] 译者:[KayGuoWhu](https://github.com/KayGuoWhu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 40a4508387cec4d96e2b1dffcf5d10792f849a06 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 28 Apr 2015 10:56:47 +0800 Subject: [PATCH 102/154] [Translating]tech/20150427 How to set up NTP server in CentOS --- sources/tech/20150427 How to set up NTP server in CentOS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150427 How to set up NTP server in CentOS.md b/sources/tech/20150427 How to set up NTP server in CentOS.md index 54400aef7b..e04a8841c7 100644 --- a/sources/tech/20150427 How to set up NTP server in CentOS.md +++ b/sources/tech/20150427 How to set up NTP server in CentOS.md @@ -1,3 +1,4 @@ +Translating by ictlyh How to set up NTP server in CentOS ================================================================================ Network Time Protocol (NTP) is used to synchronize system clocks of different hosts over network. All managed hosts can synchronize their time with a designated time server called an NTP server. An NTP server on the other hand synchronizes its own time with any public NTP server, or any server of your choice. The system clocks of all NTP-managed devices are synchronized to the millisecond precision. From 1b6c5aa4792a99edbed674ff9fe6787a32952aef Mon Sep 17 00:00:00 2001 From: Mo Date: Tue, 28 Apr 2015 11:24:39 +0800 Subject: [PATCH 103/154] [translated]GNOME-Pie 0.6 Application Launcher Released --- ...E-Pie 0.6 Application Launcher Released.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 translated/news/GNOME-Pie 0.6 Application Launcher Released.md diff --git a/translated/news/GNOME-Pie 0.6 Application Launcher Released.md b/translated/news/GNOME-Pie 0.6 Application Launcher Released.md new file mode 100644 index 0000000000..94cdfd1006 --- /dev/null +++ b/translated/news/GNOME-Pie 0.6 Application Launcher Released.md @@ -0,0 +1,53 @@ +GNOME-Pie 0.6.1 应用启动器发布,酷炫新特性[多图+视频] +============================================= + +**Simon Schneegans高兴地[宣布][1]他的GNOME-Pie 0.6.1已可供下载使用。GNOME-Pie是一个可以在不同桌面环境中作为应用启动器的小工具,包括GNOME和Unity。** + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-3.jpg) + +GNOME-Pie 0.6.1看起来是个大版本更新,引入了许多新特性,比如支持半个或四分之一圆,可选择每个启动器想要的形状,也可以自动生成形状,以及多彩的动态图标。 + +此外,软件现在还适配若干类dock应用,包括elementary OS的Plank,Ubuntu的Unity,以及通用的Docky。一些已有的GNOME-Pie主题也已更新,还引入了全新主题Simple,为半圆启动器布局设计。 + +“Gnome-Pie新版本已发布,实际上已经发布了两个版本:0.6.0和之后的0.6.1,修复了[issue #73][2],”Simon Schneegans在发布声明上说道,“新版本修复了许多bug,还带来了许多新特性!” + + + +### 现在就可在Ubuntu上安装GNOME-Pie ### + +Ubuntu及其衍生版用户现在就可通过Simon Schneegans的PPA源安装GNOME-Pie。只需打开终端,运行下列命令即可。GNOME-Pie适用于Ubuntu 14.04 LTS,14.10和15.04。 + +

+sudo add-apt-repository ppa:simonschneegans/testing
+sudo apt-get update
+sudo apt-get install gnome-pie
+
+ +其他GNU/Linux发行版用户可以从官网下载GNOME-Pie 0.6.1的源代码,或者近期在系统的软件源中搜索新版GNOME-Pie。 + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-2.jpg) + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-4.jpg) + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-5.jpg) + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-6.jpg) + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-7.jpg) + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-8.jpg) + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-9.jpg) + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-10.jpg) + +-------------------------------------------------- + +via:http://news.softpedia.com/news/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914.shtml + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://simmesimme.github.io/news/2015/04/18/gnome-pie-061/ +[2]:https://github.com/Simmesimme/Gnome-Pie/issues/73 From 6386204f886da9156e110ffad0e81eecc3a6151e Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 28 Apr 2015 12:03:53 +0800 Subject: [PATCH 104/154] [Translate]tech/20150427 How to set up NTP server in CentOS --- ...0427 How to set up NTP server in CentOS.md | 166 ------------------ ...0427 How to set up NTP server in CentOS.md | 165 +++++++++++++++++ 2 files changed, 165 insertions(+), 166 deletions(-) delete mode 100644 sources/tech/20150427 How to set up NTP server in CentOS.md create mode 100644 translated/tech/20150427 How to set up NTP server in CentOS.md diff --git a/sources/tech/20150427 How to set up NTP server in CentOS.md b/sources/tech/20150427 How to set up NTP server in CentOS.md deleted file mode 100644 index e04a8841c7..0000000000 --- a/sources/tech/20150427 How to set up NTP server in CentOS.md +++ /dev/null @@ -1,166 +0,0 @@ -Translating by ictlyh -How to set up NTP server in CentOS -================================================================================ -Network Time Protocol (NTP) is used to synchronize system clocks of different hosts over network. All managed hosts can synchronize their time with a designated time server called an NTP server. An NTP server on the other hand synchronizes its own time with any public NTP server, or any server of your choice. The system clocks of all NTP-managed devices are synchronized to the millisecond precision. - -In a corporate environment, if they do not want to open up their firewall for NTP traffic, it is necessary to set up in-house NTP server, and let employees use the internal server as opposed to public NTP servers. In this tutorial, we will describe how to configure a CentOS system as an NTP server. Before going into the detail, let's go over the concept of NTP first. - -### Why Do We Need NTP? ### - -Due to manufacturing variances, all (non-atomic) clocks do not run at the exact same speed. Some clocks tend to run faster, while some run slower. So over a large timeframe, the time of one clock gradually drifts from another, causing what is known as "clock drift" or "time drift". To minimize the effect of clock drift, the hosts using NTP should periodically communicate with a designated NTP server to keep their clock in sync. - -Time synchrony across different hosts is important for things like scheduled backup, [intrusion detection][1] logging, [distributed job scheduling ][2]or transaction bookkeeping. It may even be required as part of regulatory compliance. - -### NTP Hierarchy ### - -NTP clocks are organized in a layered hierarchy. Each level of the hierarchy is called a *stratum*. The notion of stratum describes how many NTP hops away a machine is from an authoritative time source. - -![](https://farm8.staticflickr.com/7590/16645732413_3b7af58186_c.jpg) - -Stratum 0 is populated with clocks that have virtually no time drifts, such as atomic clocks. These clocks cannot be directly used over the network. Stratum N (N > 1) servers synchronize their time against Stratum N-1 servers. Stratum N clocks may be connected with each other over network. - -NTP supports up to 15 stratums in the hierarchy. Stratum 16 is considered unsynchronized and unusable. - -### Preparing CentOS Server ### - -Now let's proceed to set up an NTP server on CentOS. - -First of all, we need to make sure that the time zone of the server is set up correctly. In CentOS 7, we can use the timedatectl command to view and change the server time zone (e.g., "Australia/Adelaide") - - # timedatectl list-timezones | grep Australia - # timedatectl set-timezone Australia/Adelaide - # timedatectl - -![](https://farm8.staticflickr.com/7605/16645732463_db75a0bdcd_o.png) - -Go ahead and set up necessary software using yum. - - # yum install ntp - -Then we will add the global NTP servers to synchronize time with. - - # vim /etc/ntp.conf - ----------- - - server 0.oceania.pool.ntp.org - server 1.oceania.pool.ntp.org - server 2.oceania.pool.ntp.org - server 3.oceania.pool.ntp.org - -By default, NTP server logs are saved in /var/log/messages. If you want to use a custom log file, that can be specified as well. - - logfile /var/log/ntpd.log - -If you opt for a custom log file, make sure to change its ownership and SELinux context. - - # chown ntp:ntp /var/log/ntpd.log - # chcon -t ntpd_log_t /var/log/ntpd.log - -Now initiate NTP service and make sure it's added to startup. - - # systemctl restart ntp - # systemctl enable ntp - -### Verifying NTP Server Clock ### - -We can use the ntpq command to check how the local server's clock is synchronized via NTP. - -![](https://farm9.staticflickr.com/8713/16645732513_1823736ca8_b.jpg) - -The following table explains the output columns. - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
remoteThe sources defined at ntp.conf. '*' indicates the current and best source; '+' indicates that these sources are available as NTP source. Sources with - are considered unusable.
refidThe IP address of the clock with which the remote server clock is synchronized with.
stStratum
tType. 'u' is for unicast. Other values may include local, multicast, broadcast.
whenThe time elapsed (in seconds) since the last contact with the server.
pollPolling frequency with the server in seconds.
reachAn octal value that indicates whether there are any errors in communication with the server. The value 377 indicates 100% success.
delayThe round trip time between our server and the remote server.
offsetThe time difference between our server and the remote server in milliseconds.
jitterThe average time difference in milliseconds between two samples.
- -### Controlling Access to NTP Server ### - -By default, NTP server allows incoming queries from all hosts. If you want to filter incoming NTP synchronization connections, you could add a rule in your firewall to filter the traffic. - - # iptables -A INPUT -s 192.168.1.0/24 -p udp --dport 123 -j ACCEPT - # iptables -A INPUT -p udp --dport 123 -j DROP - -The rule will allow NTP traffic (on port UDP/123) from 192.168.1.0/24, and deny traffic from all other networks. You can update the rule to match your requirements. - -### Configuring NTP Clients ### - -#### 1. Linux #### - -NTP client hosts need the ntpdate package to synchronize time against the server. The package can be easily installed using yum or apt-get. After installing the package, run the command with the IP address of the server. - - # ntpdate - -The command is identical for RHEL and Debian based systems. - -#### 2. Windows #### - -If you are using Windows, look for 'Internet Time' under Date and Time settings. - -#### 3. Cisco Devices #### - -If you want to synchronize the time of a Cisco device, you can use the following command from the global configuration mode. - - # ntp server - -NTP enabled devices from other vendors have their own parameters for Internet time. Please check the documentation of the device if you want to synchronize its time with the NTP server. - -### Conclusion ### - -To sum up, NTP is a protocol that keeps the clocks across all your hosts in sync. We have demonstrated how we can set up an NTP server, and let NTP enabled devices synchronize their time against the server. - -Hope this helps. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/setup-ntp-server-centos.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/how-to-compile-and-install-snort-from-source-code-on-ubuntu.html -[2]:http://xmodulo.com/how-to-install-hdfs-and-hadoop-using.html \ No newline at end of file diff --git a/translated/tech/20150427 How to set up NTP server in CentOS.md b/translated/tech/20150427 How to set up NTP server in CentOS.md new file mode 100644 index 0000000000..3924edd93f --- /dev/null +++ b/translated/tech/20150427 How to set up NTP server in CentOS.md @@ -0,0 +1,165 @@ +如何在 CentOS 中设置 NTP 服务器 +================================================================================ +网络时间协议(NTP)用来同步网络上不同主机的系统时间。所有托管的主机都可以和一个指定的被称为 NTP 服务器的时间服务器同步它们的时间。另一方面一个 NTP 服务器将它的时间和任何公共 NTP 服务器,或者你选定的服务器同步。NTP 托管的所有系统时钟都同步精确到毫秒级。 + +在一个协作环境中,如果他们不想为 NTP 传输打开防火墙,就有必要设置一个内部 NTP 服务器,然后让员工使用内部服务器而不是公共 NTP 服务器。在这个指南中,我们会介绍如何将一个 CentOS 系统配置为 NTP 服务器。在介绍详细内容之前,让我们先来简单了解一下 NTP 的概念。 + +### 为什么我们需要 NTP? ### + +由于制造工艺多种多样,所有的(非原子)时钟并不按照完全一致的速度行走。有一些时钟走的比较快而有一些走的比较慢。因此经过很长一段时间以后,一个时钟的时间慢慢的偏移于其它,导致有名的 “时钟漂移” 或 “时间漂移”。为了最小化时钟漂移的影响,使用 NTP 的主机应该周期性地和指定的 NTP 服务器交互以保持它们的时钟同步。 + +在不同的主机之间进行时间同步对于计划备份、[干扰检测][1]日志、[分布式任务调度][2]或者事务订单管理来说是很重要的事情。它甚至可能要求作为日常任务的一部分。 + +### NTP 层次 ### + +NTP 时钟以层次模型组织。层级中的每层被称为一个 *stratum*。stratum 的概念说明了一台机器到授权的时间源有多少 NTP 跳。 + +![](https://farm8.staticflickr.com/7590/16645732413_3b7af58186_c.jpg) + +Stratum 0 由没有时间漂移的时钟组成,例如原子时钟。这种时钟不能在网络上直接使用。Stratum N (N > 1) 层服务器从 Stratum N-1 层服务器同步时间。Stratum N 时钟可能通过网络和彼此互联。 + +NTP 支持多达 15 stratums 的层级。Stratum 16 被认为是没有同步不能使用的。 + +### 准备 CentOS 服务器 ### + +现在让我们来开始在 CentOS 上设置 NTP 服务器。 + +首先,我们需要保证正确设置了服务器的时区。在 CentOS 7 中,我们可以使用 timedatectl 命令查看和更改服务器的时区(比如,"Australia/Adelaide") + + # timedatectl list-timezones | grep Australia + # timedatectl set-timezone Australia/Adelaide + # timedatectl + +![](https://farm8.staticflickr.com/7605/16645732463_db75a0bdcd_o.png) + +继续并使用 yum 安装需要的软件 + + # yum install ntp + +然后我们会添加全球 NTP 服务器用于同步时间。 + + # vim /etc/ntp.conf + +---------- + + server 0.oceania.pool.ntp.org + server 1.oceania.pool.ntp.org + server 2.oceania.pool.ntp.org + server 3.oceania.pool.ntp.org + +默认情况下,NTP 服务器的日志保存在 /var/log/messages。如果你希望使用自定义的日志文件,那也可以指定。 + + logfile /var/log/ntpd.log + +如果你选择自定义日志文件,确保更改了它的属主和 SELinux 环境。 + + # chown ntp:ntp /var/log/ntpd.log + # chcon -t ntpd_log_t /var/log/ntpd.log + +现在初始化 NTP 服务并确保把它添加到了随机启动。 + + # systemctl restart ntp + # systemctl enable ntp + +### 验证 NTP Server 时钟 ### + +我们可以使用 ntpq 命令来检查本地服务器的时钟如何通过 NTP 同步。 + +![](https://farm9.staticflickr.com/8713/16645732513_1823736ca8_b.jpg) + +下面的表格解释了输出列。 + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
remote源在 ntp.conf 中定义。‘*’ 表示当前使用的最好的源;‘+’ 表示可作为 NTP 源的源;‘-’ 标记的源是不可用的。
refid和远程服务器时钟同步的时钟的 IP 地址。
stStratum
t类型。 'u' 表示单播(unicast)。其它值包括本地(local)、多播(multicast)、广播(broadcast)。
when自从上次和服务器交互经过的时间(以秒数计)。
poll和服务器的轮询频率,以秒数计。
reach表示和服务器交互是否有任何错误的十进制数。值 337 表示 100% 成功。
delay服务器和远程服务器来回的时间。
offset我们服务器和远程服务器的时间差异,以毫秒数计。
jitter两个例子之间平局时间差异,以毫秒数计。
+ +### 控制到 NTP 服务器的访问 ### + +默认情况下,NTP 服务器允许来自所有主机的查询。如果你想过滤进来的 NTP 同步连接,你可以在你的防火墙中添加规则过滤流量。 + + # iptables -A INPUT -s 192.168.1.0/24 -p udp --dport 123 -j ACCEPT + # iptables -A INPUT -p udp --dport 123 -j DROP + +该规则允许从 192.168.1.0/24 来的 NTP 流量(端口 UDP/123),任何其它网络的流量会被截停。你可以根据需要更改规则。 + +### 配置 NTP 客户端 ### + +#### 1. Linux #### + +NTP 客户端主机需要 ntpupdate 软件包和服务器同步时间。可以轻松地使用 yum 或 apt-get 安装这个软件包。安装完软件包之后,用服务器的 IP 地址运行下面的命令。 + + # ntpdate + +基于 RHEL 和 Debian 的系统命令都相同。 + +#### 2. Windows #### + +如果你正在使用 Windows,在日期和时间设置(Date and Time settings)下查找网络时间(Internet Time)。 + +#### 3. Cisco 设备 #### + +如果你想和 Cisco 设备同步时间,你可以在全局配置模式下使用下面的命令。 + + # ntp server + +其它有支持 NTP 的卖家有自己的参数用于网络时间。如果你想将设备和 NTP服务器同步时间,请查看设备的说明文档。 + +### 结论 ### + +总而言之,NTP 是在你的所有主机上同步时钟的一个协议。我们已经介绍了如何设置 NTP 服务器并使支持 NTP 的设备和服务器同步时间。 + +希望能对你有所帮助 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/setup-ntp-server-centos.html + +作者:[Sarmed Rahman][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者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/how-to-compile-and-install-snort-from-source-code-on-ubuntu.html +[2]:http://xmodulo.com/how-to-install-hdfs-and-hadoop-using.html \ No newline at end of file From 4d7ee735532e94c3fbfe603f035c856d3363ddef Mon Sep 17 00:00:00 2001 From: chenjt Date: Tue, 28 Apr 2015 12:13:29 +0800 Subject: [PATCH 105/154] [bazz2 translating]How to secure SSH login with one-time passwords on Linux --- ...How to secure SSH login with one-time passwords on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md b/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md index 9133679994..56888f3342 100644 --- a/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md +++ b/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md @@ -1,3 +1,4 @@ +[bazz222222222] How to secure SSH login with one-time passwords on Linux ================================================================================ As someone says, security is a not a product, but a process. While SSH protocol itself is cryptographically secure by design, someone can wreak havoc on your SSH service if it is not administered properly, be it weak passwords, compromised keys or outdated SSH client. @@ -177,4 +178,4 @@ via: http://xmodulo.com/secure-ssh-login-one-time-passwords-linux.html [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.cl.cam.ac.uk/~mgk25/otpw.html \ No newline at end of file +[3]:http://www.cl.cam.ac.uk/~mgk25/otpw.html From 49604b1666241f2d54ec64d0852963e2a73b4480 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Apr 2015 13:42:53 +0800 Subject: [PATCH 106/154] PUB:GNOME-Pie 0.6 Application Launcher Released @alim0x --- ...E-Pie 0.6 Application Launcher Released.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) rename {translated/news => published}/GNOME-Pie 0.6 Application Launcher Released.md (56%) diff --git a/translated/news/GNOME-Pie 0.6 Application Launcher Released.md b/published/GNOME-Pie 0.6 Application Launcher Released.md similarity index 56% rename from translated/news/GNOME-Pie 0.6 Application Launcher Released.md rename to published/GNOME-Pie 0.6 Application Launcher Released.md index 94cdfd1006..199d13f1a6 100644 --- a/translated/news/GNOME-Pie 0.6 Application Launcher Released.md +++ b/published/GNOME-Pie 0.6 Application Launcher Released.md @@ -1,29 +1,28 @@ GNOME-Pie 0.6.1 应用启动器发布,酷炫新特性[多图+视频] ============================================= -**Simon Schneegans高兴地[宣布][1]他的GNOME-Pie 0.6.1已可供下载使用。GNOME-Pie是一个可以在不同桌面环境中作为应用启动器的小工具,包括GNOME和Unity。** +**Simon Schneegans 高兴地[宣布][1]他的 GNOME-Pie 0.6.1 已可供下载使用。GNOME-Pie 是一个可以在包括 GNOME 和 Unity 在内的多种桌面环境中作为应用启动器的小工具。** ![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-3.jpg) -GNOME-Pie 0.6.1看起来是个大版本更新,引入了许多新特性,比如支持半个或四分之一圆,可选择每个启动器想要的形状,也可以自动生成形状,以及多彩的动态图标。 +GNOME-Pie 0.6.1 看起来是个主要版本更新,引入了许多新特性,比如支持半个或四分之一圆,可选择每个启动器想要的形状,也可以自动根据位置调整形状(圆形,半个或四分之一圆),以及多彩的动态图标。 -此外,软件现在还适配若干类dock应用,包括elementary OS的Plank,Ubuntu的Unity,以及通用的Docky。一些已有的GNOME-Pie主题也已更新,还引入了全新主题Simple,为半圆启动器布局设计。 +此外,软件现在还适配若干类dock应用,包括elementary OS 的 Plank,Ubuntu 的 Unity,以及通用的 Docky。一些已有的 GNOME-Pie 主题也已更新,还引入了全新的为半圆启动器布局设计的主题 Simple,。 -“Gnome-Pie新版本已发布,实际上已经发布了两个版本:0.6.0和之后的0.6.1,修复了[issue #73][2],”Simon Schneegans在发布声明上说道,“新版本修复了许多bug,还带来了许多新特性!” +“Gnome-Pie 新版本已发布,实际上已经发布了两个版本:0.6.0和之后的0.6.1,修复了[issue #73][2],”Simon Schneegans 在发布声明上说道,“新版本修复了许多 bug,还带来了许多新特性!” ### 现在就可在Ubuntu上安装GNOME-Pie ### -Ubuntu及其衍生版用户现在就可通过Simon Schneegans的PPA源安装GNOME-Pie。只需打开终端,运行下列命令即可。GNOME-Pie适用于Ubuntu 14.04 LTS,14.10和15.04。 +Ubuntu 及其衍生版用户现在就可通过 Simon Schneegans 的PPA源安装 GNOME-Pie。只需打开终端,运行下列命令即可。GNOME-Pie 适用于 Ubuntu 14.04 LTS,14.10和15.04。 -

-sudo add-apt-repository ppa:simonschneegans/testing
-sudo apt-get update
-sudo apt-get install gnome-pie
-
+ sudo add-apt-repository ppa:simonschneegans/testing + sudo apt-get update + sudo apt-get install gnome-pie -其他GNU/Linux发行版用户可以从官网下载GNOME-Pie 0.6.1的源代码,或者近期在系统的软件源中搜索新版GNOME-Pie。 + +其他 GNU/Linux 发行版用户可以从官网下载 GNOME-Pie 0.6.1 的源代码,或者近期在系统的软件源中搜索新版GNOME-Pie。 ![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-2.jpg) @@ -43,9 +42,9 @@ sudo apt-get install gnome-pie -------------------------------------------------- -via:http://news.softpedia.com/news/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914.shtml +via: http://news.softpedia.com/news/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914.shtml -译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) +译者:[alim0x](https://github.com/alim0x) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 6f612fb4dd2f3e3f25525b97dc99bb0fe9c198f2 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Apr 2015 14:08:56 +0800 Subject: [PATCH 107/154] PUB:20150309 15 Interview Questions on Linux 'ls ' Command--Part 1 @theo-l --- ...uestions on Linux 'ls ' Command--Part 1.md | 99 +++++++++++-------- 1 file changed, 57 insertions(+), 42 deletions(-) rename {translated/tech => published}/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md (63%) diff --git a/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md b/published/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md similarity index 63% rename from translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md rename to published/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md index 77e42ff9e9..db7c9a3b88 100644 --- a/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md +++ b/published/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md @@ -1,85 +1,91 @@ -关于linux中的“ls”命令的15个面试问题 - 第一部分 +15 个‘ls’命令的面试问题(一) ================================================================================ -Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使用的最广泛的命令行中工具之一。 -它是一个在GNU基本工具集以及BSD各种变体上可用的与POSIX兼容的工具。 -“ls”命令可以通过与大量的选项一起使用来达到想要的结果。 +Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使用的最广泛的命令行中工具之一。它是一个POSIX兼容工具,在GNU基本工具集以及BSD各种变体上都可以使用。“ls”命令可以结合大量的选项来达到想要的结果。 + 这篇文章的目的在于通过相关的样例来深入讨论文件列表命令。 ![15 ls Command Questions](http://www.tecmint.com/wp-content/uploads/2014/09/ls-Command-Questions.png) -15个“ls”命令问题。 -### 1. 你会如何从目录中列出文件?### +*15个“ls”命令问题。* -答:使用linux文件列表命令“ls”驾到拯救。 +### 1. 如何列出目录中的文件?### + +答:linux文件列表命令“ls”就是干这个的。 # ls ![List Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-files.gif) -列出文件 -同时,我们也可以使用“echo(打印)”命令与一个通配符(*)相关联的方式在目录中列出其中的所有文件。 +*列出文件* + +同时,我们也可以使用“echo(回显)”命令与一个通配符(*)参数来雷锤目录中的所有文件。 # echo * ![List All Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-files.gif) -列出所有的文件。 -### 2. 你会如何只通过使用echo命令来列出目录中的所有文件?### +*列出所有的文件。* + +### 2. 如何只使用echo命令来只列出所有目录?### # echo */ ![List All Directories](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-directories.gif) -列出所有的目录 -### 3. 你会怎样列出一个目录中的所有文件, 包括隐藏的dot文件?### +*列出所有的目录* + +### 3. 怎样列出一个目录中的所有文件, 包括隐藏的以“.”开头的文件?### 答:我们需要将“-a”选项与“ls”命令一起使用。 # ls -a ![List All Hidden Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-hidden-files.gif) -列出所有的隐藏文件。 -### 4. 如何列出目录中除了 “当前目录暗喻(.)”和“父目录暗喻(..)”之外的所有文件,包括隐藏文件?### +*列出所有的隐藏文件。* + +### 4. 如何列出目录中除了 “当前目录 .”和“父目录 ..”之外的所有文件,包括隐藏文件?### 答: 我们需要将“-A”选项与“ls”命令一起使用 # ls -A ![Do Not List Implied](http://www.tecmint.com/wp-content/uploads/2014/09/Do-not-list-Implied.gif) -别列出暗喻文件。 -### 5. 如何将当前目录中的内容使用长格式打印列表?### +*别列出指代当前目录和父目录的文件* + +### 5. 如何使用长格式打印出当前目录内容?### 答: 我们需要将“-l”选项与“ls”命令一起使用。 # ls -l ![List Files Long](http://www.tecmint.com/wp-content/uploads/2014/09/list-files-long.gif) -列出文件的长格式。 + +*列出文件的长格式。* 上面的样例中,其输出结果看起来向下面这样。 drwxr-xr-x 5 avi tecmint 4096 Sep 30 11:31 Binary -上面的drwxr-xr-x 是文件的权限,分别代表了文件所有者,组以及对整个世界。 所有者具有读(r),写(w)以及执行(x)等权限。 该文件所属组具有读(r)和执行(x)但是没有写的权限,相同的权限预示着 -对于整个世界的其他可以访问该文件的用户。 +上面的drwxr-xr-x 是文件的权限,分别代表了文件所有者,所属组以及“整个世界”。 所有者具有读(r),写(w)以及执行(x)等权限。 该文件所属组具有读(r)和执行(x)但是没有写的权限,整个世界的其他可以访问到该文件的人也具有相同权限。 - 开头的‘d’意味着这是一个目录 -- 数字'5'表示符号链接 +- 数字'5'表示符号链接(有5个符号链接) - 文件 Binary归属于用户 “avi”以及用户组 "tecmint" - Sep 30 11:31 表示文件最后一次的访问日期与时间。 ### 6. 假如让你来将目录中的内容以长格式列表打印,并且显示出隐藏的“点文件”,你会如何实现?### -答: 我们需要同时将"-a"和"-l"选项与“ls”命令一起使用。 +答: 我们需要同时将"-a"和"-l"选项与“ls”命令一起使用(LCTT 译注:单字符选项可以合并写)。 # ls -la ![Print Content of Directory](http://www.tecmint.com/wp-content/uploads/2014/09/Print-Content-of-Directory.gif) -打印目录内容 -同时,如果我们不想列出“当前目录暗喻”和"父目录暗喻",可以将“-A”和“-l”选项同“ls”命令一起使用。 +*打印目录内容* + +此外,如果我们不想列出“当前目录”和"父目录",可以将“-A”和“-l”选项同“ls”命令一起使用。 # ls -lA @@ -90,9 +96,10 @@ Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使 # ls --author -l ![List Author Files](http://www.tecmint.com/wp-content/uploads/2014/09/List-Author-Files.gif) -列出文件创建者。 -### 8. 如何对非显示字符进行转义打印?### +*列出文件创建者。* + +### 8. 如何对用转义字符打印出非显示字符?### 答:我们只需要使用“-b”选项来对非显示字符进行转义打印 @@ -100,52 +107,58 @@ Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使 ![Print Escape Character](http://www.tecmint.com/wp-content/uploads/2014/09/Print-Escape-Character.gif) -### 9. 指定特定的单位格式来列出文件和目录的大小,你会如何实现?### -答: 在此可以同时使用选项“-block-size=scale”和“-l”,但是我们需要用特定的单位如M,K等来替换‘scale’。 +### 9. 用指定特定的单位格式来列出文件和目录的大小,你会如何实现?### + +答: 在此可以同时使用选项“-block-size=scale”和“-l”,但是我们需要用特定的单位如M,K等来替换‘scale’参数。 # ls --block-size=M -l # ls --block-size=K -l ![List File Scale Format](http://www.tecmint.com/wp-content/uploads/2014/09/List-File-Scale-Format.gif) -列出文件大小单位格式。 -### 10. 列出目录中的非备份文件,也就是那些文件名以‘~’结尾的文件### +*列出文件大小单位格式。* + +### 10. 列出目录中的文件,但是不显示备份文件,即那些文件名以‘~’结尾的文件### 答: 选项‘-B’赶来救驾。 # ls -B ![List File Without Backup](http://www.tecmint.com/wp-content/uploads/2014/09/List-File-Without-Backup.gif) -列出非备份文件 -### 11. 将目录中的所有文件按照名称进行排序并与最后修改时间信息进行关联显示### +*列出非备份文件* + +### 11. 将目录中的所有文件按照名称进行排序,并显示其最后修改时间信息?### 答: 为了实现这个需求,我们需要同时将“-c”和"-l"选项与命令一起使用。 # ls -cl ![Sort Files](http://www.tecmint.com/wp-content/uploads/2014/09/Sort-Files.gif) -文件排序 + +*文件排序* ### 12. 将目录中的文件按照修改时间进行排序,并显示相关联的信息。### -答: 我们需要同时使用3个选项--'-l','-t','-c'--与命令‘ls’一起使用来对文件使用修改时间排序,最新的修改时间排在最前。 +答: 我们需要同时使用3个选项:'-l','-t','-c' 来对文件使用修改时间排序,最新的修改时间排在最前。 # ls -ltc ![Sort Files by Modification](http://www.tecmint.com/wp-content/uploads/2014/09/Sort-Files-by-Modification.gif) -按照修改时间对文件排序。 + +*按照修改时间对文件排序。* ### 13. 如何控制‘ls’命令的输出颜色的有无?### -答: 需要使用选项‘--color=parameter’,parameter参数值具有三种不同值,“auto(自动)”,“always(一直)”,“never(无色)”。 +答: 需要使用选项‘--color=parameter’,参数具有三种不同值,“auto(自动)”,“always(一直)”,“never(无色)”。 # ls --color=never # ls --color=auto # ls --color=always ![ls Colorful Output](http://www.tecmint.com/wp-content/uploads/2014/09/ls-colorful-output.gif) -ls的输出颜色 + +*ls的输出颜色* ### 14. 假如只需要列出目录本身,而不是目录的内容,你会如何做?### @@ -154,9 +167,10 @@ ls的输出颜色 # ls -d ![List Directory Entries](http://www.tecmint.com/wp-content/uploads/2014/09/List-Directory-Entries.gif) -列出目录本身 -### 15. 为长格式列表命令"ls -l"创建别名“ll”,并将其结果输出到一个文件而不是标准输出中。### +*列出目录本身* + +### 15. 为长格式列表命令"ls -l"创建一个别名“ll”,并将其结果输出到一个文件而不是标准输出中。### 答:在上述的这个场景中,我们需要将别名添加到.bashrc文件中,然后使用重定向操作符将输出写入到文件而不是标准输出中。我们将会使用编辑器nano。 @@ -166,13 +180,14 @@ ls的输出颜色 # nano ll.txt ![Create Alias for ls command](http://www.tecmint.com/wp-content/uploads/2014/09/Create-ls-Alias.gif) -为ls命令创建别名。 + +*为ls命令创建别名。* 先到此为止,别忘了在下面的评论中提出你们的宝贵意见,我会再次带着另外的有趣的文章在此闪亮登场。 ### 参考阅读:### -- [10 个‘ls’命令的面试问题-第二部分][1] +- [10 个‘ls’命令的面试问题(二)][1] - [Linux中15个基础的'ls'命令][2] -------------------------------------------------------------------------------- @@ -187,4 +202,4 @@ via: http://www.tecmint.com/ls-command-interview-questions/ [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/ls-interview-questions/ -[2]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ +[2]:http://linux.cn/article-5109-1.html From 5226789354a73a7c6e470572042550620152d8c8 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Apr 2015 14:45:27 +0800 Subject: [PATCH 108/154] PUB:20150309 10 Useful 'ls' Command Interview Questions--Part 2 @theo-l --- ...ls' Command Interview Questions--Part 2.md | 109 ++++++++++-------- 1 file changed, 62 insertions(+), 47 deletions(-) rename {translated/tech => published}/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md (56%) diff --git a/translated/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md b/published/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md similarity index 56% rename from translated/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md rename to published/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md index f2cd020692..a166b8d36d 100644 --- a/translated/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md +++ b/published/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md @@ -1,154 +1,169 @@ -10个有用的‘ls’命令面试问题-第二部分 +10 个‘ls’命 令面试的问题(二) ================================================================================ -这是关于文件列表命令的第二篇文章,继续探讨‘ls’命令的其他方面。该系列的第一篇文章收到了Tecmint社区的高度关注,如果你错过了该系列的第一部分,你可能会访问以下地址: +这是关于文件列表命令的第二篇文章,继续探讨‘ls’命令的其他方面。该系列的第一篇文章受到了社区的高度关注,如果你错过了该系列的第一部分,可以访问以下地址: -- [15 Interview Questions on “ls” Command – Part 1][1] +- [15 个‘ls’命令的面试问题(一)][1] 这篇文章通过样例来很好地展现‘ls’命令的深入应用,我们加倍小心地来写这篇文章来保持其简洁可理解性,同时又能提供最全面的服务。 ![10 Interview Questions on ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/ls-Command-Interview-Questions.jpg) -10 Interview Questions on ls Command -### 1. 假如你想要以长列表的形式列出目录中的内容,但是不打印文件创建者名称以及文件所属组。同时在输出中显示其不同之处。### +*10 ‘ls’ 命令面试的问题* + +### 16. 假如你想要以长列表的形式列出目录中的内容,但是不打印文件创建者名称以及文件所属组。看看输出有何不同之处。### a. ls 命令在与‘-l’选项一起使用时会将文件以长列表格式输出。 # ls -l ![List Files in- Long List Format](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-inLong-List-Format.gif) -List Files in- Long List Format + +*以长格式列出文件* b. ls 命令在与‘-l’和‘--author’一起使用时,会将文件以长列表格式输出并带有文件创建者的名称信息。 # ls -l --author ![List Files By Author](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-By-Author.gif) -List Files By Author + +*列出文件的创建者* c. ls 命令在与‘-g’选项 一起将会列出文件名但是不带属主名称。 # ls -g ![List Files Without Printing Owner Name](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-Without-Printing-Author.gif) -List Files Without Printing Owner Name -d. ls 命令在与'-G'和‘-l’选项一起将会使用长列表格式列出文件名称带式不带文件所属组名称。 +*列出文件但不列出属主* + +d. ls 命令在与'-G'和‘-l’选项一起将会使用长列表格式列出文件名称但是不带文件所属组名称。 + # ls -Gl ![List Files Without Printing Group](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-Without-Printing-Group.gif) -List Files Without Printing Group -### 2. 使用用户友好的格式打印出当前目录中的文件以及文件夹的大小,你会如何做?### +*列出文件但是不列出所属组* + +### 17. 使用易读格式打印出当前目录中的文件以及文件夹的大小,你会如何做?### + +这里我们需要使用'-h'选项(人类可阅读的、易读的)同‘-l’或‘-s’选项与ls命令一起使用来得到想要的输出。 -这里我们需要使用'-h'选项(人类可阅读的)同‘-l’或‘-s’选项与ls命令一起使用来得到想要的输出。 # ls -hl ![List Files in Human Readable Format](http://www.tecmint.com/wp-content/uploads/2015/03/List-Size-of-Files-with-ls.gif) -List Files in Human Readable Format + +*以易读格式的长列表列出文件* # ls -hs ![List File Sizes in Long List Format](http://www.tecmint.com/wp-content/uploads/2015/03/List-File-Sizes-in-Readable-Format.gif) -List File Sizes in Long List Format + +*以易读格式的短列表列出文件* **注意**: ‘-h’选项使用1024(计算机中的标准)的幂,文件或文件夹的大小分别以K,M和G作为输出单位。 -### 3. 既然‘-h’选项是使用1024的幂作为标准来输出大小,那么ls命令还支持其他的幂值呢?### +### 18. 既然‘-h’选项是使用1024的幂作为标准来输出大小,那么ls命令是否还支持其他的幂值呢?### -存在一个选项 ‘-si’与选项‘-h’相似,不同之处在于前者以使用1000的幂,后者使用1024的幂。 +存在一个选项 ‘--si’与选项‘-h’相似,不同之处在于前者以使用1000的幂,后者使用1024的幂。 - # ls -si + # ls --si -![Supported Power Values of ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/ls-supported-power-values.gif) -Supported Power Values of ls Command +所以'--si'也可以与‘-l’选项一起使用来按照1000的幂来输出文件夹的大小,并且以长列表格式显示。 -所以'-si'也可以与‘-l’选项一起使用来按照1000的幂来输出文件夹的大小,并且以长列表格式显示。 + # ls --si -l - # ls -si -l +(LCTT 译注:此处原文参数有误,附图也不对,因此删除之) -![List Files by Power Values](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-by-Power-Values.gif) -List Files by Power Values +### 19. 假如要你使用逗号‘,’作为分隔符来打印一个目录中的内容,可以吗? 对于长列表形式也可行吗?### -### 4. 假如要你使用逗号‘,’作为分隔符来打印一个目录中的内容,可以吗? 对于长列表形式也可行吗?### - -当然!linux的ls命令当与其选项‘-m’一起使用时可以在打印目录内容时以逗号‘,’分割。由于逗号分割的内容是水平填充的,ls命令不能在垂直列出内容时使用逗号来分割内容。 +当然!linux的ls命令当与其选项‘-m’一起使用时可以在打印目录内容时以逗号‘,’分割。由于逗号分割的内容是水平填充的,ls命令不能在垂直列出内容时使用逗号来分割内容。 # ls -m ![Print Contents of Directory by Comma](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Contents-of-Directory-by-Comma.gif) -Print Contents of Directory by Comma + +*以逗号分隔显示内容* 当使用长列表格式时,‘-m’选项就没有什么效果了。 # ls -ml ![Listing Content Horizontally](http://www.tecmint.com/wp-content/uploads/2015/03/Listing-Content-Horizentally.gif) -Listing Content Horizontally -### 5. 有办法将目录的内容逆序打印出来吗?### +*长列表不能使用逗号分隔列表* + +### 20. 有办法将目录的内容逆序打印出来吗?### 可以!上面的情形可以轻松地通过'-r'选项搞定,该选项将输出顺序倒置。这个选项也可以与‘-l’选项一起使用。 # ls -r ![List Content in Reverse Order](http://www.tecmint.com/wp-content/uploads/2015/03/List-Content-in-Reverse-Order.gif) -List Content in Reverse Order + +*逆序列出* # ls -rl ![Long List Content in Reverse Order](http://www.tecmint.com/wp-content/uploads/2015/03/Long-List-Content-in-Reverse-Order.gif) -Long List Content in Reverse Order -### 6. 如果你被分配一个任务,来递归地打印各个子目录,你会如何应付?注意哟,只针对子目录而不是文件哦。### +*逆序长列表* + +### 21. 如果你被分配一个任务,来递归地打印各个子目录,你会如何应付?注意,只针对子目录而不是文件哦。### 小意思!使用“-R”选项就可以轻轻松松拿下,它也可以更进一步地与其他选项如‘-l’和‘-m’选项等组合使用。 + # ls -R ![Print Sub Directories in Recursively](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Sub-Directories-in-Recursively.gif) -Print Sub Directories in Recursively -### 7. 如何按照文件大小对其进行排序?### +*递归列出子目录* + +### 22. 如何按照文件大小对其进行排序?### linux命令行选项'-S'赋予了ls命令这个超能力。按照文件大小从大到小的顺序排序: # ls -S ![Sort Files with ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/Sort-Files-in-Linux.gif) -Sort Files with ls Command +*按文件大小排序* 按照文件大小从小到大的顺序排序。 # ls -Sr ![Sort Files in Descending Order](http://www.tecmint.com/wp-content/uploads/2015/03/Sort-Files-in-Descending-Order.gif) -Sort Files in Descending Order -### 8. 列出目录中的内容按照一行一个文件并且不带额外信息的方式 ### +*从小到大的排序* -选项‘-l’在此可以解决这个问题,使用‘-l’选项来使用ls命令可以将目录中的内容按照一行一个文件并且不带额外信息的方式进行输出。 +### 23. 按照一行一个文件列出目录中的内容,并且不带额外信息的方式 ### + +选项‘-1’在此可以解决这个问题,使用‘-1’选项来使用ls命令可以将目录中的内容按照一行一个文件并且不带额外信息的方式进行输出。 # ls -1 ![List Files Without Information](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-Without-Information.gif) -List Files Without Information -### 9. 现在委派给你一个任务,你必须将目录中的内容输出到终端而且需要使用双引号引起来,你会如何做?### +*不带其他信息,一行一个列出文件* -存在一个选项‘-Q’会将ls命令的输出内容用双引号引起来。 +### 24. 现在委派给你一个任务,你必须将目录中的内容输出到终端而且需要使用双引号引起来,你会如何做?### + +有一个选项‘-Q’会将ls命令的输出内容用双引号引起来。 # ls -Q ![Print Files with Double Quotes](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Files-with-Double-Quotes.gif) -Print Files with Double Quotes -### 10. 想象一下你正在与一个包含有很多文件和文件夹的目录打交道,你需要使目录名显示在文件名之前,你如何做?### +*输出的文件名用引号引起来* + +### 25. 想象一下你正在与一个包含有很多文件和文件夹的目录打交道,你需要使目录名显示在文件名之前,你如何做?### # ls --group-directories-first ![Print Directories First](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Directories-First.gif) -Print Directories First -先点到为止,我们会马上提供该系列文章的下一部分。别换频道,关注Tecmint。 另外别忘了在下面的评论中提出你们宝贵的反馈信息,喜欢就分享,帮助我们得到更好的传播吧! +*目录优先显示* + +先点到为止,我们会马上提供该系列文章的下一部分。别换频道,关注我们。 另外别忘了在下面的评论中提出你们宝贵的反馈信息,喜欢就分享,帮助我们得到更好的传播吧! -------------------------------------------------------------------------------- @@ -156,9 +171,9 @@ via: http://www.tecmint.com/ls-interview-questions/ 作者:[Ravi Saive][a] 译者:[theo-l](https://github.com/theo-l) -校对:[校对者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/admin/ -[1]:http://www.tecmint.com/ls-command-interview-questions/ +[1]:http://linux.cn/article-5349-1.html From c6869763159dbca1c2af22c84131fe3caf5f7d1d Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Apr 2015 21:07:42 +0800 Subject: [PATCH 109/154] PUB:30 Things to Do After Minimal RHEL or CentOS 7 Installation--3 @ictlyh --- ...inimal RHEL or CentOS 7 Installation--3.md | 108 +++++++++++------- 1 file changed, 66 insertions(+), 42 deletions(-) rename {translated/tech => published}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md (74%) diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md similarity index 74% rename from translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md rename to published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md index b3630b5aa5..318d38b03c 100644 --- a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md +++ b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md @@ -1,4 +1,4 @@ -安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--3 +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(三) ================================================================================ ### 12. 安装 Apache Tomcat ### @@ -7,7 +7,8 @@ Tomcat 是由 Apache 设计的用来运行 Java HTTP web 服务器的 servlet # yum install tomcat ![安装 Apache Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-Tomcat.jpeg) -安装 Apache Tomcat + +*安装 Apache Tomcat* 安装完 tomcat 之后,启动 tomcat 服务。 @@ -18,11 +19,12 @@ Tomcat 是由 Apache 设计的用来运行 Java HTTP web 服务器的 servlet # /usr/sbin/tomcat version ![查看 tomcat 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-tomcat-version.jpeg) -查看 tomcat 版本 + +*查看 tomcat 版本* 允许 tomcat 服务和默认端口(8080) 通过防火墙并重新加载设置。 - # firewall-cmd –zone=public –add-port=8080/tcp --permannet + # firewall-cmd –zone=public –add-port=8080/tcp --permanent # firewall-cmd –reload 现在该保护 tomcat 服务器了,添加一个用于访问和管理的用户和密码。我们需要编辑文件 ‘/etc/tomcat/tomcat-users.xml’。查看类似下面的部分: @@ -32,7 +34,7 @@ Tomcat 是由 Apache 设计的用来运行 Java HTTP web 服务器的 servlet - + @@ -42,44 +44,48 @@ Tomcat 是由 Apache 设计的用来运行 Java HTTP web 服务器的 servlet ![保护 Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-Tomcat.jpeg) -保护 Tomcat -我们在这里添加用户 “tecmint” 到 tomcat 的管理员/管理 组中,使用 “tecmint” 作为密码。先停止在启动 tomcat 服务以使更改生效,并添加 tomcat 服务到随系统启动。 +*保护 Tomcat* + +我们在这里添加用户 “tecmint” 到 tomcat 的管理员/管理组中,使用 “tecmint” 作为密码。先停止再启动 tomcat 服务以使更改生效,并添加 tomcat 服务到随系统启动。 # systemctl stop tomcat # systemctl start tomcat # systemctl enable tomcat.service -请阅读: 在 RHEL/CentOS 7.0/6.x 中安装和配置 Apache Tomcat 8.0.9 +请阅读: [在 RHEL/CentOS 7.0/6.x 中安装和配置 Apache Tomcat 8.0.9][5] ### 13. 安装 Nmap 监视开放端口 ### -Nmap 网络映射器通过检查运行它的主机以及分析网络创建一个网络映射。nmap 并没有默认安装,你需要从库中安装它。 +Nmap 网络映射器用来分析网络,通过运行它可以发现网络的映射关系。nmap 并没有默认安装,你需要从库中安装它。 # yum install nmap ![安装 Nmap 监视工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Nmap.jpeg) -安装 Nmap 监视工具 + +*安装 Nmap 监视工具* 列出主机中所有的开放端口以及对应使用它们的服务。 # namp 127.0.01 !监视开放端口](http://www.tecmint.com/wp-content/uploads/2015/04/Monitor-Open-Ports.jpeg) -监视开放端口 + +*监视开放端口* 你也可以使用 firewall-cmd 列出所有端口,但我发现 nmap 更有用。 # firewall-cmd –list-ports ![在防火墙中检查开放端口](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Open-Ports-in-Firewall.jpeg) -在防火墙中检查开放端口 + +*在防火墙中检查开放端口* 请阅读: [Nmap 监视开放端口的 29 个有用命令][1] ### 14. 配置 FirewallD ### -firewalld 是动态管理服务器的防火墙服务。在 CentOS 7 中 Firewalld 移除了 iptables。在红帽企业版 Linux 和它的衍生版中默认安装了 Firewalld。如果有 iptables 的话为了使每个更改生效需要清空所有旧的规则然后创建新规则。 +firewalld 是动态管理服务器的防火墙服务。在 CentOS 7 中 Firewalld 移除了 iptables 服务。在红帽企业版 Linux 和它的衍生版中默认安装了 Firewalld。如果有 iptables 的话为了使每个更改生效需要清空所有旧的规则然后创建新规则。 然而用firewalld,不需要清空并重新创建新规则就可以实现更改生效。 @@ -90,59 +96,66 @@ firewalld 是动态管理服务器的防火墙服务。在 CentOS 7 中 Firewall # firewall-cmd –state ![检查 Firewalld 状态](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Status.jpeg) -检查 Firewalld 状态 + +*检查 Firewalld 状态* 获取所有的区域列表。 # firewall-cmd --get-zones ![检查 Firewalld 区域](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Zones.jpeg) -检查 Firewalld 区域 + +*检查 Firewalld 区域* 在切换之前先获取区域的详细信息。 # firewall-cmd --zone=work --list-all ![检查区域详情](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Zone-Details.jpeg) -检查区域详情 + +*检查区域详情* 获取默认区域。 # firewall-cmd --get-default-zone ![Firewalld 默认区域](http://www.tecmint.com/wp-content/uploads/2015/04/Firewalld-Default-Zone.jpeg) -Firewalld 默认区域 + +*Firewalld 默认区域* 切换到另一个区域,比如 ‘work’。 # firewall-cmd --set-default-zone=work ![切换 Firewalld 区域](http://www.tecmint.com/wp-content/uploads/2015/04/Swich-Zones.jpeg) -切换 Firewalld 区域 + +*切换 Firewalld 区域* 列出区域中的所有服务。 # firewall-cmd --list-services ![列出 Firewalld 区域的服务](http://www.tecmint.com/wp-content/uploads/2015/04/List-Firewalld-Service.jpeg) -列出 Firewalld 区域的服务 + +*列出 Firewalld 区域的服务* 添加临时服务,比如 http,然后重载 firewalld。 # firewall-cmd --add-service=http # firewall-cmd –reload -添加临时 http 服务 +![添加临时 http 服务](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Temporarily.jpeg) -添加临时 http 服务 +*添加临时 http 服务* 添加永久服务,比如 http,然后重载 firewalld。 -# firewall-cmd --add-service=http --permanent -# firewall-cmd --reload + # firewall-cmd --add-service=http --permanent + # firewall-cmd --reload ![添加永久 http 服务](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Temporarily.jpeg) -添加永久 http 服务 + +*添加永久 http 服务* 删除临时服务,比如 http。 @@ -150,7 +163,8 @@ Firewalld 默认区域 # firewall-cmd --reload ![删除临时 Firewalld 服务](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Permanent.jpeg) -删除临时 Firewalld 服务 + +*删除临时 Firewalld 服务* 删除永久服务,比如 http @@ -158,7 +172,8 @@ Firewalld 默认区域 # firewall-cmd --reload ![删除永久服务](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Service-Parmanently.jpeg) -删除永久服务 + +*删除永久服务* 允许一个临时端口(比如 331)。 @@ -166,7 +181,8 @@ Firewalld 默认区域 # firewall-cmd --reload ![打开临时 Firewalld 端口](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Temporarily.jpeg) -打开临时端口 + +*打开临时端口* 允许一个永久端口(比如 331)。 @@ -174,7 +190,8 @@ Firewalld 默认区域 # firewall-cmd --reload ![打开永久 Firewalld 端口](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Permanent.jpeg) -打开永久端口 + +*打开永久端口* 阻塞/移除临时端口(比如 331)。 @@ -182,7 +199,8 @@ Firewalld 默认区域 # firewall-cmd --reload ![移除 Firewalld 临时端口](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Temporarily.jpeg) -移除临时端口 + +*移除临时端口* 阻塞/移除永久端口(比如 331)。 @@ -190,7 +208,8 @@ Firewalld 默认区域 # firewall-cmd --reload ![移除 Firewalld 永久端口](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Permanently.jpeg) -移除永久端口 + +*移除永久端口* 停用 firewalld。 @@ -199,7 +218,8 @@ Firewalld 默认区域 # firewall-cmd --state ![在 CentOS 7 中停用 Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-Firewalld.jpeg) -停用 Firewalld 服务 + +*停用 Firewalld 服务* 启用 firewalld。 @@ -208,33 +228,36 @@ Firewalld 默认区域 # firewall-cmd --state ![在 CentOS 7 中取消 Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Firewalld.jpeg) -启用 Firewalld + +*启用 Firewalld* - [如何在 RHEL/CentOS 7 中配置 ‘Firewalld’][2] - [配置和管理 Firewalld 的有用 ‘Firewalld’ 规则][3] ### 15. 安装 Wget ### -Wget 是基于 Linux 命令行从 web 服务器获取(下载)内容的工具。它是你使用 wget 命令获取 web 内容或下载任何文件必须要有的重要工具。 +Wget 是从 web 服务器获取(下载)内容的命令行工具。它是你使用 wget 命令获取 web 内容或下载任何文件必须要有的重要工具。 # yum install wget ![安装 Wget 工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Wget.png) -安装 Wget 工具 + +*安装 Wget 工具* 关于在终端中如何使用 wget 命令下载文件的方法和实际例子,请阅读[10 个 Wget 命令例子][4]。 -### 16. 安装 Telnet ### +### 16. 安装 Telnet 客户端### -Telnet 是通过 TCP/IP 允许用户登录到相同网络上的另一台计算机的网络协议。和远程计算机的连接建立后,它就成为了一个允许你在自己的计算机上用所有提供给你的权限和远程主机交互的虚拟终端。 +Telnet 是通过 TCP/IP 允许用户登录到相同网络上的另一台计算机的网络协议。和远程计算机的连接建立后,它就成为了一个允许你在自己的计算机上用所有提供给你的权限和远程主机交互的虚拟终端。(LCTT 译注:除非你真的需要,不要安装 telnet 服务,也不要用 telnet 客户端连接另外一个 telnet 服务,因为 telnet 是明文传输的。不过如下用 telnet 客户端检测另外一个服务的端口是否工作是常用的操作。) Telnet 对于检查远程计算机或主机的监听端口也非常有用。 # yum install telnet # telnet google.com 80 -![检查 Telnet 端口](http://www.tecmint.com/wp-content/uploads/2015/04/telnet-testing.png) -检查 Telnet 端口 +![Telnet 端口检查](http://www.tecmint.com/wp-content/uploads/2015/04/telnet-testing.png) + +*Telnet 端口检查* -------------------------------------------------------------------------------- @@ -242,12 +265,13 @@ via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installatio 作者:[Avishek Kumar][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者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/avishek/ -[1]:http://www.tecmint.com/nmap-command-examples/ -[2]:http://www.tecmint.com/configure-firewalld-in-centos-7/ +[1]:http://linux.cn/article-2561-1.html +[2]:http://linux.cn/article-4425-1.html [3]:http://www.tecmint.com/firewalld-rules-for-centos-7/ -[4]:http://www.tecmint.com/10-wget-command-examples-in-linux/ \ No newline at end of file +[4]:http://linux.cn/article-4129-1.html +[5]:http://www.tecmint.com/install-apache-tomcat-in-centos/ \ No newline at end of file From 642e1881a52bd9409915fd807d287e6e295a311e Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Apr 2015 22:17:19 +0800 Subject: [PATCH 110/154] PUB:20150215 How to analyze and view Apache web server logs interactively on Linux @disylee --- ... web server logs interactively on Linux.md | 144 +++++++++++++++ ... web server logs interactively on Linux.md | 167 ------------------ 2 files changed, 144 insertions(+), 167 deletions(-) create mode 100644 published/20150215 How to analyze and view Apache web server logs interactively on Linux.md delete mode 100644 translated/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md diff --git a/published/20150215 How to analyze and view Apache web server logs interactively on Linux.md b/published/20150215 How to analyze and view Apache web server logs interactively on Linux.md new file mode 100644 index 0000000000..06a32d3fcb --- /dev/null +++ b/published/20150215 How to analyze and view Apache web server logs interactively on Linux.md @@ -0,0 +1,144 @@ +在 Linux 中以交互方式实时查看Apache web访问统计 +================================================================================ + +无论你是在网站托管业务,还是在自己的VPS上运行几个网站,你总会有需要显示访客统计信息,例如前几的访客、访问请求的文件(无论动态或者静态)、所用的带宽、客户端的浏览器,和访问的来源网站,等等。 + +[GoAccess][1] 是一款用于Apache或者Nginx的命令行日志分析器和交互式查看器。使用这款工具,你不仅可以浏览到之前提及的相关数据,还可以通过分析网站服务器日志来进一步挖掘数据 - 而且**这一切都是在一个终端窗口实时输出的**。由于今天的[大多数web服务器][2]都使用Debian的衍生版或者基于RedHat的发行版来作为底层操作系统,所以本文中我告诉你如何在Debian和CentOS中安装和使用GoAccess。 + +### 在Linux系统安装GoAccess ### + +在Debian,Ubuntu及其衍生版本,运行以下命令来安装GoAccess: + + # aptitude install goaccess + +在CentOS中,你将需要使你的[EPEL 仓库][3]可用然后执行以下命令: + + # yum install goaccess + +在Fedora,同样使用yum命令: + + # yum install goaccess + + +如果你想从源码安装GoAccess来使用更多功能(例如 GeoIP 定位功能),需要在你的操作系统安装[必需的依赖包][4],然后按以下步骤进行: + + # 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 + +以上安装的版本是 0.8.5,但是你也可以在该软件的网站[下载页][5]确认是否是最新版本。 + +由于GoAccess不需要后续的配置,一旦安装你就可以马上使用。 + +### 运行 GoAccess ### + +开始使用GoAccess,只需要对它指定你的Apache访问日志。 + +对于Debian及其衍生版本: + + # goaccess -f /var/log/apache2/access.log + +基于红帽的发行版: + + # goaccess -f /var/log/httpd/access_log + +当你第一次启动GoAccess,你将会看到如下的屏幕中选择日期和日志格式。正如前面所述,你可以按空格键进行选择,并按F10确认。至于日期和日志格式,你可能需要参考[Apache 文档][6]来刷新你的记忆。 + +在这个例子中,选择常见日志格式(Common Log Format(CLF)): + +![](https://farm8.staticflickr.com/7422/15868350373_30c16d7c30.jpg) + +然后按F10 确认。你将会从屏幕上看到统计数据。为了简洁起见,这里只显示了首部,也就是日志文件的摘要,如下图所示: + +![](https://farm9.staticflickr.com/8683/16486742901_7a35b5df69_b.jpg) + +### 通过 GoAccess来浏览网站服务器统计数据 ### + +你可以按向下的箭头滚动页面,你会发现以下区域,它们是按请求排序的。这里提及的目录顺序可能会根据你的发行版或者你所选的安装方式(从源和库)不同而不同: + +1. 每天唯一访客(来自同样IP、同一日期和同一浏览器的请求被认为是是唯一访问) + + ![](https://farm8.staticflickr.com/7308/16488483965_a439dbc5e2_b.jpg) + +2. 请求的文件(网页URL) + + ![](https://farm9.staticflickr.com/8651/16488483975_66d05dce51_b.jpg) + +3. 请求的静态文件(例如,.png文件,.js文件等等) + +4. 来源的URLs(每一个URL请求的出处) + +5. HTTP 404 未找到的响应代码 + + ![](https://farm9.staticflickr.com/8669/16486742951_436539b0da_b.jpg) + +6. 操作系统 + +7. 浏览器 + +8. 主机地址(客户端IP地址) + + ![](https://farm8.staticflickr.com/7392/16488483995_56e706d77c_z.jpg) + +9. HTTP 状态代码 + + ![](https://farm8.staticflickr.com/7282/16462493896_77b856f670_b.jpg) + +10. 前几位的来源站点 + +11. 来自谷歌搜索引擎的前几位的关键字 + +如果你想要检查已经存档的日志,你可以通过管道将它们发送给GoAccess,如下: + +在Debian及其衍生版本: + + # zcat -f /var/log/apache2/access.log* | goaccess + +在基于红帽的发行版: + + # cat /var/log/httpd/access* | goaccess + +如果你需要上述部分的详细报告(1至11项),直接按下其序号再按O(大写o),就可以显示出你需要的详细视图。下面的图像显示5-O的输出(先按5,再按O) + +![](https://farm8.staticflickr.com/7382/16302213429_48d9233f40_b.jpg) + +如果要显示GeoIP位置信息,打开主机部分的详细视图,如前面所述,你将会看到正在请求你的服务器的客户端IP地址所在的位置。 + +![](https://farm8.staticflickr.com/7393/16488484075_d778aa91a2_z.jpg) + +如果你的系统还不是很忙碌,以上提及的章节将不会显示大量的信息,但是这种情形可以通过在你网站服务器越来越多的请求发生改变。 + +### 保存用于离线分析的报告 ### + +有时候你不想每次都实时去检查你的系统状态,可以保存一份在线的分析文件或打印出来。要生成一个HTML报告,只需要通过之前提到GoAccess命令,将输出来重定向到一个HTML文件即可。然后,用web浏览器来将这份报告打开即可。 + + # zcat -f /var/log/apache2/access.log* | goaccess > /var/www/webserverstats.html + +一旦报告生成,你将需要点击展开的链接来显示每个类别详细的视图信息: + +![](https://farm9.staticflickr.com/8658/16486743041_bd8a80794d_o.png) + +可以查看youtube视频:https://youtu.be/UVbLuaOpYdg 。 + +正如我们通过这篇文章讨论,GoAccess是一个非常有价值的工具,它能给系统管理员实时提供可视的HTTP 统计分析。虽然GoAccess的默认输出是标准输出,但是你也可以将他们保存到JSON,HTML或者CSV文件。这种转换可以让 GoAccess在监控和显示网站服务器的统计数据时更有用。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/interactive-apache-web-server-log-analyzer-linux.html + +作者:[Gabriel Cánepa][a] +译者:[disylee](https://github.com/disylee) +校对:[wxy](https://github.com/wxy) + +本文由 [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://linux.cn/article-2324-1.html +[4]:http://goaccess.io/download#dependencies +[5]:http://goaccess.io/download +[6]:http://httpd.apache.org/docs/2.4/logs.html diff --git a/translated/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md b/translated/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md deleted file mode 100644 index 51ad96d272..0000000000 --- a/translated/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md +++ /dev/null @@ -1,167 +0,0 @@ -如何在Linux中以交互方式分析和查看Apache web服务器日志? -================================================================================ - -无论你是在网站托管业务,还是在自己的VPS上运行几个网站,你总会有机会想要显示访客数量例如前几的房客,请求使用的文件(无论是动态或者是静态),带宽的使用,客户端的浏览器,和相关的网站,等等。 - - -[GoAccess][1] 是一款用于Apache或者Nginx命令行日志分析和交互式查看器。有了这款工具,你不仅可以浏览到之前提及的相关数据,还可以分析网站服务器日志来进一步挖掘数据 - 然而 **这一切都可以在一个终端窗口实时输出**.由于今天的[大多数web服务器][2]使用一个Debian的衍生版或者基于红帽发行版来作为底层操作系统,我将会告诉你如何在Debian和CentOS中安装和使用GoAccess。 - - -### 在Linux系统安装GoAccess ### - - -在Debian,Ubuntu及其衍生版本,运行一下命令来安装GoAccess: - - # aptitude install goaccess - -在CentOS中,你将需要使你的[EPEL 仓库][3]可用然后执行以下命令: - - # yum install goaccess - -在Fedora,同样使用yum命令: - - # yum install goaccess - - -如果你想从源码安装GoAccess来使后续的功能可用(例如 GeoIP 的位置),为你的操作系统安装[必需的依赖包][4],按以下步骤进行: - - # 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 - - -以上安装的版本是 0.8.5,但是你也可以在该软件的网站[下载页][5]确认是否是最新版本。 - - -由于GoAccess不需要后续的配置,一旦安装你就可以马上使用。 - - -### 运行 GoAccess ### - -开始使用GoAccess,只需要对它运行你的Apache访问日志。 - - -对于Debian及其衍生版本: - - # goaccess -f /var/log/apache2/access.log - - -基于红帽的发型版本: - - # goaccess -f /var/log/httpd/access_log - - -当你第一次启动GoAccess,你将会看到下方屏幕中选择日期和日志格式。正如前面所述,你可以选择在空格键和F10之间相互切换。至于日期和日志格式,你可能希望参考[Apache 文档][6]来刷新你的记忆。 - - -在这个例子中,选择常见日志格式(CLI): - -![](https://farm8.staticflickr.com/7422/15868350373_30c16d7c30.jpg) - -然后按F10.你将会从屏幕中获得统计数据。为了简约,只显示首部,也就是总结日志文件的摘要,如下图所示: - - -![](https://farm9.staticflickr.com/8683/16486742901_7a35b5df69_b.jpg) - -### 通过 GoAccess来浏览网站服务器统计数据 ### - -当你通过向下的剪头滚动页面,你会发现一下章节,按要求进行排序。这里提及的目录顺序可能会根据你的发型版本或者(从源和库)首选的安装方式: - -1. 每天唯一访客(具有同样IP,同一日期和统一代理被认为是) - -![](https://farm8.staticflickr.com/7308/16488483965_a439dbc5e2_b.jpg) - -2. 请求的文件(网页URL) - - -![](https://farm9.staticflickr.com/8651/16488483975_66d05dce51_b.jpg) - -3. 请求的静态文件(例如,.png文件,.js文件等等) - -4. 请求的URLs(每一个URL请求的出处) - -5. HTTP 404 不能找到响应的代码 - -![](https://farm9.staticflickr.com/8669/16486742951_436539b0da_b.jpg) - -6. 操作系统 - -7. 浏览器 - -8. 主机(客户端IP地址) - -![](https://farm8.staticflickr.com/7392/16488483995_56e706d77c_z.jpg) - -9. HTTP 状态代码 - -![](https://farm8.staticflickr.com/7282/16462493896_77b856f670_b.jpg) - -10. 前几位的推荐站点 - -11. 在谷歌的搜索引擎使用的排名在前的关键字 - - -如果你还想检查已经存档的日志,你可以在GoAccess通过使用管道符号如下。 - -在Debian及其衍生版本: - - # zcat -f /var/log/apache2/access.log* | goaccess - -在基于红帽的发型版本: - - # cat /var/log/httpd/access* | goaccess - - -如果你需要任何更多关于以上的详细报告(1至11项),直接按下章节序号再按O(大写o),就可以显示出你需要的详细视图。下面的图像显示5-O的输出(先按5,再按O) - -![](https://farm8.staticflickr.com/7382/16302213429_48d9233f40_b.jpg) - - -如果要现实GeoIP位置信息,打开详细视图的主机部分,如前面所述,你将会看到客户端IP地址所在的位置以及显示web服务器的请求。 - - -![](https://farm8.staticflickr.com/7393/16488484075_d778aa91a2_z.jpg) - - -如果你的系统还尚未达到很忙碌的状态,以上提及的章节将不会显示大量的信息,但是这种情形可以通过在你网站服务器越来越多的请求发生改变。 - -### 在线保存分析的报告 ### - - -当然有时候你不想每次都实时去检查你的系统状态,但是保存一份在线的分析文件或者打印版是由必要的。要生成一个HTML报告,只需要通过之前提到GoAccess命令输出来简单地重定向道一个HTML文件。然后,你只需通过web浏览器来将这份报告打开即可。 - - - - # zcat -f /var/log/apache2/access.log* | goaccess > /var/www/webserverstats.html - - -一旦报告生成,你将需要点击展开的链接来显示每个类别详细的视图信息: - -![](https://farm9.staticflickr.com/8658/16486743041_bd8a80794d_o.png) - -注释:youtube视频 - - - -正如我们通过这篇文章讨论,GoAccess是一个非常可贵的工具,它提供给作为百忙之中的系统管理员一份HTTP统计的静态可是报告。虽然GoAccess默认其输出结果为标准输出,但是你也可以将他们保存到JSON,HTML或者CSV文件。这样的转换,GoAccess将作为一个非常有用的工具来监控和显示网站服务器的统计数据。 - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/interactive-apache-web-server-log-analyzer-linux.html - -作者:[Gabriel Cánepa][a] -译者:[disylee](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 From b4ed95c3e83b69a24c46fdf2c5b3e8fcfced0b42 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 28 Apr 2015 22:44:54 +0800 Subject: [PATCH 111/154] [Translating] tech/20150108 Interface (NICs) Bonding in Linux using nmcli --- .../20150108 Interface (NICs) Bonding in Linux using nmcli.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md b/sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md index fa02f19ce6..41eee7a86f 100644 --- a/sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md +++ b/sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md @@ -1,3 +1,4 @@ +Translating by ictlyh Interface (NICs) Bonding in Linux using nmcli ================================================================================ Today, we'll learn how to perform Interface (NICs) bonding in our CentOS 7.x using nmcli (Network Manager Command Line Interface). From c2ebd5809c556fec2eeb3d85dbded027f2f8b2cb Mon Sep 17 00:00:00 2001 From: KS Date: Wed, 29 Apr 2015 09:57:23 +0800 Subject: [PATCH 112/154] Update 20141013 Compact Text Editors Great for Remote Editing and Much More.md --- ...pact Text Editors Great for Remote Editing and Much More.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md b/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md index 401a4da2fc..21b0756b9a 100644 --- a/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md +++ b/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md @@ -1,3 +1,4 @@ +wyangsun翻译中 Compact Text Editors Great for Remote Editing and Much More ================================================================================ A text editor is software used for editing plain text files. This type of software has many different uses including modifying configuration files, writing programming language source code, jotting down thoughts, or even making a grocery list. Given that editors can be used for such a diverse range of activities, it is worth spending the time finding an editor that best suites your preferences. @@ -216,4 +217,4 @@ via: http://www.linuxlinks.com/article/20141011073917230/TextEditors.html [2]:http://www.vim.org/ [3]:http://ne.di.unimi.it/ [4]:http://www.gnu.org/software/zile/ -[5]:http://nano-editor.org/ \ No newline at end of file +[5]:http://nano-editor.org/ From f869d942b1d6881fddb89dc2c21e17a70b5ee872 Mon Sep 17 00:00:00 2001 From: royaso Date: Wed, 29 Apr 2015 10:57:30 +0800 Subject: [PATCH 113/154] =?UTF-8?q?=E6=8E=A8=E8=8D=90=E7=BF=BB=E8=AF=91:we?= =?UTF-8?q?b=20caching=20basics=20terminology=20http=20headers=20and=20cac?= =?UTF-8?q?hing=20strategies.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ogy http headers and caching strategies.md | 444 ++++++++++++++++++ 1 file changed, 444 insertions(+) create mode 100644 sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md diff --git a/sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md b/sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md new file mode 100644 index 0000000000..df0eb8b723 --- /dev/null +++ b/sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md @@ -0,0 +1,444 @@ +Web Caching Basics: Terminology, HTTP Headers, and Caching Strategies +===================================================================== + +### Introduction + +Intelligent content caching is one of the most effective ways to improve +the experience for your site's visitors. Caching, or temporarily storing +content from previous requests, is part of the core content delivery +strategy implemented within the HTTP protocol. Components throughout the +delivery path can all cache items to speed up subsequent requests, +subject to the caching policies declared for the content. + +In this guide, we will discuss some of the basic concepts of web content +caching. This will mainly cover how to select caching policies to ensure +that caches throughout the internet can correctly process your content. +We will talk about the benefits that caching affords, the side effects +to be aware of, and the different strategies to employ to provide the +best mixture of performance and flexibility. + +What Is Caching? +---------------- + +Caching is the term for storing reusable responses in order to make +subsequent requests faster. There are many different types of caching +available, each of which has its own characteristics. Application caches +and memory caches are both popular for their ability to speed up certain +responses. + +Web caching, the focus of this guide, is a different type of cache. Web +caching is a core design feature of the HTTP protocol meant to minimize +network traffic while improving the perceived responsiveness of the +system as a whole. Caches are found at every level of a content's +journey from the original server to the browser. + +Web caching works by caching the HTTP responses for requests according +to certain rules. Subsequent requests for cached content can then be +fulfilled from a cache closer to the user instead of sending the request +all the way back to the web server. + +Benefits +-------- + +Effective caching aids both content consumers and content providers. +Some of the benefits that caching brings to content delivery are: + +- **Decreased network costs**: Content can be cached at various points + in the network path between the content consumer and content origin. + When the content is cached closer to the consumer, requests will not + cause much additional network activity beyond the cache. +- **Improved responsiveness**: Caching enables content to be retrieved + faster because an entire network round trip is not necessary. Caches + maintained close to the user, like the browser cache, can make this + retrieval nearly instantaneous. +- **Increased performance on the same hardware**: For the server where + the content originated, more performance can be squeezed from the + same hardware by allowing aggressive caching. The content owner can + leverage the powerful servers along the delivery path to take the + brunt of certain content loads. +- **Availability of content during network interruptions**: With + certain policies, caching can be used to serve content to end users + even when it may be unavailable for short periods of time from the + origin servers. + +Terminology +----------- + +When dealing with caching, there are a few terms that you are likely to +come across that might be unfamiliar. Some of the more common ones are +below: + +- **Origin server**: The origin server is the original location of the + content. If you are acting as the web server administrator, this is + the machine that you control. It is responsible for serving any + content that could not be retrieved from a cache along the request + route and for setting the caching policy for all content. +- **Cache hit ratio**: A cache's effectiveness is measured in terms of + its cache hit ratio or hit rate. This is a ratio of the requests + able to be retrieved from a cache to the total requests made. A high + cache hit ratio means that a high percentage of the content was able + to be retrieved from the cache. This is usually the desired outcome + for most administrators. +- **Freshness**: Freshness is a term used to describe whether an item + within a cache is still considered a candidate to serve to a client. + Content in a cache will only be used to respond if it is within the + freshness time frame specified by the caching policy. +- **Stale content**: Items in the cache expire according to the cache + freshness settings in the caching policy. Expired content is + "stale". In general, expired content cannot be used to respond to + client requests. The origin server must be re-contacted to retrieve + the new content or at least verify that the cached content is still + accurate. +- **Validation**: Stale items in the cache can be validated in order + to refresh their expiration time. Validation involves checking in + with the origin server to see if the cached content still represents + the most recent version of item. +- **Invalidation**: Invalidation is the process of removing content + from the cache before its specified expiration date. This is + necessary if the item has been changed on the origin server and + having an outdated item in cache would cause significant issues for + the client. + +There are plenty of other caching terms, but the ones above should help +you get started. + +What Can be Cached? +------------------- + +Certain content lends itself more readily to caching than others. Some +very cache-friendly content for most sites are: + +- Logos and brand images +- Non-rotating images in general (navigation icons, for example) +- Style sheets +- General Javascript files +- Downloadable Content +- Media Files + +These tend to change infrequently, so they can benefit from being cached +for longer periods of time. + +Some items that you have to be careful in caching are: + +- HTML pages +- Rotating images +- Frequently modified Javascript and CSS +- Content requested with authentication cookies + +Some items that should almost never be cached are: + +- Assets related to sensitive data (banking info, etc.) +- Content that is user-specific and frequently changed + +In addition to the above general rules, it's possible to specify +policies that allow you to cache different types of content +appropriately. For instance, if authenticated users all see the same +view of your site, it may be possible to cache that view anywhere. If +authenticated users see a user-sensitive view of the site that will be +valid for some time, you may tell the user's browser to cache, but tell +any intermediary caches not to store the view. + +Locations Where Web Content Is Cached +------------------------------------- + +Content can be cached at many different points throughout the delivery +chain: + +- **Browser cache**: Web browsers themselves maintain a small cache. + Typically, the browser sets a policy that dictates the most + important items to cache. This may be user-specific content or + content deemed expensive to download and likely to be requested + again. +- **Intermediary caching proxies**: Any server in between the client + and your infrastructure can cache certain content as desired. These + caches may be maintained by ISPs or other independent parties. +- **Reverse Cache**: Your server infrastructure can implement its own + cache for backend services. This way, content can be served from the + point-of-contact instead of hitting backend servers on each request. + +Each of these locations can and often do cache items according to their +own caching policies and the policies set at the content origin. + +Caching Headers +--------------- + +Caching policy is dependent upon two different factors. The caching +entity itself gets to decide whether or not to cache acceptable content. +It can decide to cache less than it is allowed to cache, but never more. + +The majority of caching behavior is determined by the caching policy, +which is set by the content owner. These policies are mainly articulated +through the use of specific HTTP headers. + +Through various iterations of the HTTP protocol, a few different +cache-focused headers have arisen with varying levels of sophistication. +The ones you probably still need to pay attention to are below: + +- **`Expires`**: The `Expires` header is very straight-forward, + although fairly limited in scope. Basically, it sets a time in the + future when the content will expire. At this point, any requests for + the same content will have to go back to the origin server. This + header is probably best used only as a fall back. +- **`Cache-Control`**: This is the more modern replacement for the + `Expires` header. It is well supported and implements a much more + flexible design. In almost all cases, this is preferable to + `Expires`, but it may not hurt to set both values. We will discuss + the specifics of the options you can set with `Cache-Control` a bit + later. +- **`Etag`**: The `Etag` header is used with cache validation. The + origin can provide a unique `Etag` for an item when it initially + serves the content. When a cache needs to validate the content it + has on-hand upon expiration, it can send back the `Etag` it has for + the content. The origin will either tell the cache that the content + is the same, or send the updated content (with the new `Etag`). +- **`Last-Modified`**: This header specifies the last time that the + item was modified. This may be used as part of the validation + strategy to ensure fresh content. +- **`Content-Length`**: While not specifically involved in caching, + the `Content-Length` header is important to set when defining + caching policies. Certain software will refuse to cache content if + it does not know in advanced the size of the content it will need to + reserve space for. +- **`Vary`**: A cache typically uses the requested host and the path + to the resource as the key with which to store the cache item. The + `Vary` header can be used to tell caches to pay attention to an + additional header when deciding whether a request is for the same + item. This is most commonly used to tell caches to key by the + `Accept-Encoding` header as well, so that the cache will know to + differentiate between compressed and uncompressed content. + +### An Aside about the Vary Header + +The `Vary` header provides you with the ability to store different +versions of the same content at the expense of diluting the entries in +the cache. + +In the case of `Accept-Encoding`, setting the `Vary` header allows for a +critical distinction to take place between compressed and uncompressed +content. This is needed to correctly serve these items to browsers that +cannot handle compressed content and is necessary in order to provide +basic usability. One characteristic that tells you that +`Accept-Encoding` may be a good candidate for `Vary` is that it only has +two or three possible values. + +Items like `User-Agent` might at first glance seem to be a good way to +differentiate between mobile and desktop browsers to serve different +versions of your site. However, since `User-Agent` strings are +non-standard, the result will likely be many versions of the same +content on intermediary caches, with a very low cache hit ratio. The +`Vary` header should be used sparingly, especially if you do not have +the ability to normalize the requests in intermediate caches that you +control (which may be possible, for instance, if you leverage a content +delivery network). + +How Cache-Control Flags Impact Caching +-------------------------------------- + +Above, we mentioned how the `Cache-Control` header is used for modern +cache policy specification. A number of different policy instructions +can be set using this header, with multiple instructions being separated +by commas. + +Some of the `Cache-Control` options you can use to dictate your +content's caching policy are: + +- **`no-cache`**: This instruction specifies that any cached content + must be re-validated on each request before being served to a + client. This, in effect, marks the content as stale immediately, but + allows it to use revalidation techniques to avoid re-downloading the + entire item again. +- **`no-store`**: This instruction indicates that the content cannot + be cached in any way. This is appropriate to set if the response + represents sensitive data. +- **`public`**: This marks the content as public, which means that it + can be cached by the browser and any intermediate caches. For + requests that utilized HTTP authentication, responses are marked + `private` by default. This header overrides that setting. +- **`private`**: This marks the content as `private`. Private content + may be stored by the user's browser, but must *not* be cached by any + intermediate parties. This is often used for user-specific data. +- **`max-age`**: This setting configures the maximum age that the + content may be cached before it must revalidate or re-download the + content from the origin server. In essence, this replaces the + `Expires` header for modern browsing and is the basis for + determining a piece of content's freshness. This option takes its + value in seconds with a maximum valid freshness time of one year + (31536000 seconds). +- **`s-maxage`**: This is very similar to the `max-age` setting, in + that it indicates the amount of time that the content can be cached. + The difference is that this option is applied only to intermediary + caches. Combining this with the above allows for more flexible + policy construction. +- **`must-revalidate`**: This indicates that the freshness information + indicated by `max-age`, `s-maxage` or the `Expires` header must be + obeyed strictly. Stale content cannot be served under any + circumstance. This prevents cached content from being used in case + of network interruptions and similar scenarios. +- **`proxy-revalidate`**: This operates the same as the above setting, + but only applies to intermediary proxies. In this case, the user's + browser can potentially be used to serve stale content in the event + of a network interruption, but intermediate caches cannot be used + for this purpose. +- **`no-transform`**: This option tells caches that they are not + allowed to modify the received content for performance reasons under + any circumstances. This means, for instance, that the cache is not + able to send compressed versions of content it did not receive from + the origin server compressed and is not allowed. + +These can be combined in different ways to achieve various caching +behavior. Some mutually exclusive values are: + +- `no-cache`, `no-store`, and the regular caching behavior indicated + by absence of either +- `public` and `private` + +The `no-store` option supersedes the `no-cache` if both are present. For +responses to unauthenticated requests, `public` is implied. For +responses to authenticated requests, `private` is implied. These can be +overridden by including the opposite option in the `Cache-Control` +header. + +Developing a Caching Strategy +----------------------------- + +In a perfect world, everything could be cached aggressively and your +servers would only be contacted to validate content occasionally. This +doesn't often happen in practice though, so you should try to set some +sane caching policies that aim to balance between implementing long-term +caching and responding to the demands of a changing site. + +### Common Issues + +There are many situations where caching cannot or should not be +implemented due to how the content is produced (dynamically generated +per user) or the nature of the content (sensitive banking information, +for example). Another problem that many administrators face when setting +up caching is the situation where older versions of your content are out +in the wild, not yet stale, even though new versions have been +published. + +These are both frequently encountered issues that can have serious +impacts on cache performance and the accuracy of content you are +serving. However, we can mitigate these issues by developing caching +policies that anticipate these problems. + +### General Recommendations + +While your situation will dictate the caching strategy you use, the +following recommendations can help guide you towards some reasonable +decisions. + +There are certain steps that you can take to increase your cache hit +ratio before worrying about the specific headers you use. Some ideas +are: + +- **Establish specific directories for images, css, and shared + content**: Placing content into dedicated directories will allow you + to easily refer to them from any page on your site. +- **Use the same URL to refer to the same items**: Since caches key + off of both the host and the path to the content requested, ensure + that you refer to your content in the same way on all of your pages. + The previous recommendation makes this significantly easier. +- **Use CSS image sprites where possible**: CSS image sprites for + items like icons and navigation decrease the number of round trips + needed to render your site and allow your site to cache that single + sprite for a long time. +- **Host scripts and external resources locally where possible**: If + you utilize javascript scripts and other external resources, + consider hosting those resources on your own servers if the correct + headers are not being provided upstream. Note that you will have to + be aware of any updates made to the resource upstream so that you + can update your local copy. +- **Fingerprint cache items**: For static content like CSS and + Javascript files, it may be appropriate to fingerprint each item. + This means adding a unique identifier to the filename (often a hash + of the file) so that if the resource is modified, the new resource + name can be requested, causing the requests to correctly bypass the + cache. There are a variety of tools that can assist in creating + fingerprints and modifying the references to them within HTML + documents. + +In terms of selecting the correct headers for different items, the +following can serve as a general reference: + +- **Allow all caches to store generic assets**: Static content and + content that is not user-specific can and should be cached at all + points in the delivery chain. This will allow intermediary caches to + respond with the content for multiple users. +- **Allow browsers to cache user-specific assets**: For per-user + content, it is often acceptable and useful to allow caching within + the user's browser. While this content would not be appropriate to + cache on any intermediary caching proxies, caching in the browser + will allow for instant retrieval for users during subsequent visits. +- **Make exceptions for essential time-sensitive content**: If you + have content that is time-sensitive, make an exception to the above + rules so that the out-dated content is not served in critical + situations. For instance, if your site has a shopping cart, it + should reflect the items in the cart immediately. Depending on the + nature of the content, the `no-cache` or `no-store` options can be + set in the `Cache-Control` header to achieve this. +- **Always provide validators**: Validators allow stale content to be + refreshed without having to download the entire resource again. + Setting the `Etag` and the `Last-Modified` headers allow caches to + validate their content and re-serve it if it has not been modified + at the origin, further reducing load. +- **Set long freshness times for supporting content**: In order to + leverage caching effectively, elements that are requested as + supporting content to fulfill a request should often have a long + freshness setting. This is generally appropriate for items like + images and CSS that are pulled in to render the HTML page requested + by the user. Setting extended freshness times, combined with + fingerprinting, allows caches to store these resources for long + periods of time. If the assets change, the modified fingerprint will + invalidate the cached item and will trigger a download of the new + content. Until then, the supporting items can be cached far into the + future. +- **Set short freshness times for parent content**: In order to make + the above scheme work, the containing item must have relatively + short freshness times or may not be cached at all. This is typically + the HTML page that calls in the other assisting content. The HTML + itself will be downloaded frequently, allowing it to respond to + changes rapidly. The supporting content can then be cached + aggressively. + +The key is to strike a balance that favors aggressive caching where +possible while leaving opportunities to invalidate entries in the future +when changes are made. Your site will likely have a combination of: + +- Aggressively cached items +- Cached items with a short freshness time and the ability to + re-validate +- Items that should not be cached at all + +The goal is to move content into the first categories when possible +while maintaining an acceptable level of accuracy. + +Conclusion +---------- + +Taking the time to ensure that your site has proper caching policies in +place can have a significant impact on your site. Caching allows you to +cut down on the bandwidth costs associated with serving the same content +repeatedly. Your server will also be able to handle a greater amount of +traffic with the same hardware. Perhaps most importantly, clients will +have a faster experience on your site, which may lead them to return +more frequently. While effective web caching is not a silver bullet, +setting up appropriate caching policies can give you measurable gains +with minimal work. + + +--- + +作者: [Justin Ellingwood](https://www.digitalocean.com/community/users/jellingwood) + +译者:[译者ID](https://github.com/译者ID) + +校对:[校对者ID](https://github.com/校对者ID) + +推荐:[royaso](https://github.com/royaso) + +via: https://www.digitalocean.com/community/tutorials/web-caching-basics-terminology-http-headers-and-caching-strategies + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + + From 7e0ab09ba617374d7726c4ad5bc95fc13d4c39a9 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 29 Apr 2015 11:29:09 +0800 Subject: [PATCH 114/154] =?UTF-8?q?20150429-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...1.0--Open Source Animation Gets Serious.md | 41 ++++++ ...e2 With Tomcat 7 Using mod_jk Connector.md | 138 ++++++++++++++++++ ...Here' s How To Upgrade in Kubuntu 15.04.md | 86 +++++++++++ 3 files changed, 265 insertions(+) create mode 100644 sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md create mode 100644 sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md create mode 100644 sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md diff --git a/sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md b/sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md new file mode 100644 index 0000000000..70f76b418c --- /dev/null +++ b/sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md @@ -0,0 +1,41 @@ +Synfig Studio 1.0 — Open Source Animation Gets Serious +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/synfig-free-animations-750x467.jpg) + +**A brand new version of the free, open-source 2D animation software Synfig Studio is now available to download. ** + +The first release of the cross-platform software in well over a year, Synfig Studio 1.0 builds on its claim of offering “industrial-strength solution for creating film-quality animation” with a suite of new and improved features. + +Among them is an improved user interface that the project developers say is ‘easier’ and ‘more intuitive’ to use. The client adds a new **single-window mode** for tidy working and has been **reworked to use the latest GTK3 libraries**. + +On the features front there are several notable changes, including the addition of a fully-featured bone system. + +This **joint-and-pivot ‘skeleton’ framework** is well suited to 2D cut-out animation and should prove super efficient when coupled with the complex deformations new to this release, or used with Synfig’s popular ‘automatic interpolated keyframes’ (read: frame-to-frame morphing). + +注:youtube视频 + + +New non-destructive cutout tools, friction effects and initial support for full frame-by-frame bitmap animation, may help unlock the creativity of open-source animators, as might the addition of a sound layer for syncing the animation timeline with a soundtrack! + +### Download Synfig Studio 1.0 ### + +Synfig Studio is not a tool suited for everyone, though the latest batch of improvements in this latest release should help persuade some animators to give the free animation software a try. + +If you want to find out what open-source animation software is like for yourself, you can grab an installer for Ubuntu for the latest release direct from the project’s Sourceforge page using the links below. + +- [Download Synfig 1.0 (64bit) .deb Installer][1] +- [Download Synfig 1.0 (32bit) .deb Installer][2] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/synfig-studio-new-release-features + +作者:[oey-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://sourceforge.net/projects/synfig/files/releases/1.0/linux/synfigstudio_1.0_amd64.deb/download +[2]:http://sourceforge.net/projects/synfig/files/releases/1.0/linux/synfigstudio_1.0_x86.deb/download \ No newline at end of file diff --git a/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md b/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md new file mode 100644 index 0000000000..11882847a7 --- /dev/null +++ b/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md @@ -0,0 +1,138 @@ +How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector +================================================================================ +Apache is the most popular available web server. A web server is used basically to accept requests from clients and send responses to those requests. It gets an URL, translates it to a filename (for static requests), and sends that file back over the internet from the local disk, or it translates it to a program name, executes it, and then sends the output of that program back over the internet to the requesting party. If the web server was not able to process and complete the request, it instead returns an error message. + +In this article we will list the features of Apache, and how we can integrate it with Tomcat8 and Tomcat7 using the mod_jk connector. + +### Features of Apache ### + +As we said Apache is the most popular available web server. The reasons behind its popularity are the following features: + +- It is free tool that you can download and install it easily. +- It is open source web server so you can easily see the code, adjust it, optimize it, and fix errors and security holes. New features and modules can be also added. +- It can be used for small websites of one or two pages, or huge websites of hundreds and thousands of pages, serving millions of regular visitors each month. It can serve both static and dynamic content. +- Improved caching modules (mod_cache, mod_disk_cache, mod_mem_cache). +- Apache 2 supports the Internet protocol IPv6. + +### Tomcat directory ### + +${tomcat_home} is the root directory of tomcat. Your Tomcat installation should have the following subdirectories: + +- ${tomcat_home}\conf – Where you can place various configuration files +- ${tomcat_home}\webapps – Containing example applications +- ${tomcat_home}\bin – Where you place web server plugins + +### Mod_jk module ### + +The mod_jk can be obtained in two formats: binary and source. Depending on the platform you are running your web server on, a binary version of mod_jk may be available. It is recommended to use the binary version if it is available. + +The mod_jk module was developed and tested on: + +- Linux, FreeBSD, AIX, HP-UX, MacOS X, Solaris and should work on major Unix’s platforms supporting Apache 1.3 and/or 2.x +- 0-i386 SP4/SP5/SP6a (should be able to work with other service packs), Win2K and WinXP and Win98 +- Cygwin (until you have an apache server and autoconf/automake support tools) +- Netware +- i5/OS V5R4 (System I) with Apache HTTP Server 2.0.58. Be sure to have the latest Apache PTF installed. +- Tomcat 3.2 to Tomcat 8. + +The mod_jk requires two entities: + +- **mod_jk.xxx** – The Apache HTTP Server module, depending on your operating system, it will be mod_jk.so, mod_jk.nlm or MOD_JK.SRVPGM. +- **workers.properties** – A file that describes the host and used ports by the workers (Tomcat processes). A sample workers.properties can be found under the conf directory in the source download. + +Also as with other Apache HTTP Server modules, mod_jk should be first installed on the modules directory of your Apache webserver: /usr/lib/apache and you should update your **httpd.conf** file. + +### Installation ### + +It is required to have a non-root user system with the “sudo” privileges before starting the installation. Now we will start our installation, so we will install Apache2 and Tomcat using the following command: + + sudo apt-get install apache2 + + sudo apt-get install tomcat7 + + sudo apt-get install tomcat7-admin + +And now we will create a test application for Tomcat using the following commands: + + cd /var/lib/tomcat7/webapps + sudo mkdir tomcat-demo + sudo mkdir tomcat-demo/goodmoring + sudo vim tomcat-demo/helloworld/index.jsp + +And paste the following code: + + + + Good Morning + + +

Good Morning

+ Today is: <%= new java.util.Date().toString() %> + + + +Everything is okay, good now we will install and configure the mod_jk using the following command: + + sudo apt-get install libapache2-mod-jk + +We have to start by enabling the redirect port 8443 on Tomcat using the following command: + + sudo vim /etc/tomcat7/server.xml + +And we will uncomment the following line: + + + +After that, we will create our workers.properties file for Apache using the following command: + + sudo vim /etc/apache2/workers.properties + +Paste the following text: + + # Define 1 real worker using ajp13 + worker.list=worker + # Set properties for worker (ajp13) + worker.worker.type=ajp13 + worker.worker.host=localhost + worker.worker.port=8009 + +Now we will use the following command to let Apache use this worker: + + sudo vim /etc/apache2/mods-available/jk.conf + +And we will change the JkWorkersFile property to the following one; + + /etc/apache2/workers.properties + +Finally to configure the URL Apache should pass through the Tomcat + + sudo vim /etc/apache2/sites-enabled/000-default + +And we will add the following line in the configurtation file: + + + ....................................... + ....................................... + JkMount /tomcat-demo* worker1 + + +You can now restart the servers using the following commands to check their functionality: + + sudo /etc/init.d/tomcat7 restart + sudo /etc/init.d/apache2 restart + +### Conclusion ### + +In this article we showed you how to configure and install Apache2 and Tomcat 7 using the mod_jk connector. + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/integrate-apache2-tomcat-7-using-mod_jk-connector/ + +作者:[anismaj][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/anis/ \ No newline at end of file diff --git a/sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md b/sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md new file mode 100644 index 0000000000..43b2adc3dd --- /dev/null +++ b/sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md @@ -0,0 +1,86 @@ +KDE Plasma 5.3 Released, Here’s How To Upgrade in Kubuntu 15.04 +================================================================================ +**KDE [has announced][1] the stable release of Plasma 5.3, which comes charged with a slate of new power management features. ** + +Having impressed and excited [with an earlier beta release in April][2], the latest update to the new stable update to the Plasma 5 desktop environments is now considered stable and ready for download. + +Plasma 5.3 continues to refine and finesse the new-look KDE desktop. It sees plenty of feature additions for desktop users to enjoy and **almost 400 bug fixes** packed in it should also improvements the performance and overall stability, too. + +### What’s New in Plasma 5.3 ### + +![Better Bluetooth Management in Plasma 5.3](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/bluetooth-applet-in-kde.jpg) +Better Bluetooth Management in Plasma 5.3 + +While we touched on the majority of the **new features** [in Plasma 5.3 in an earlier article][3] many are worth reiterating. + +**Enhanced power management** features and configuration options, including a **new battery applet, energy usage monitor** and **animated changes in screen brightness**, will help KDE last longer on portable devices. + +Closing a laptop when an external monitor is connected no longer triggers ‘suspend’. This new behaviour is called ‘**cinema mode**‘ and comes enabled by default, but can be disabled using an option in power management settings. + +**Bluetooth functionality is improved**, with a brand new panel applet making connecting and configuring paired bluetooth devices like smartphones, keyboards and speakers easier than ever. + +Similarly, **trackpad configuration in KDE is easier** with Plasma 5.3 thanks to a new set-up and settings module. + +![Trackpad, Touchpad. Tomato, Tomayto.](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/touchpad-kde.jpg) +Trackpad, Touchpad. Tomato, Tomayto. + +For Plasma widget fans there is a new **Press and Hold** gesture. When enabled this hides the settings handle that appears when on mouseover. Instead making it only appear when long-clicking on widget. + +On the topic of widget-y things, several **old Plasmoid favourites are reintroduced** with this release, including a useful system monitor, handy hard-drive stats and a comic reader. + +### Learning More & Trying It Out ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/plasma-5.3-beta.jpg\) + +A full list of everything — and I mean everything — that is new and improved in Plasma 5.3 is listed [in the official change log][4]. + +Live images that let you try Plasma 5.3 on a Kubuntu base **without affecting your own system** are available from the KDE community: + +- [Download KDE Plasma Live Images][5] + +If you need super stable system you can use these live images to try the features but stick with the version of KDE that comes with your distribution on your main computer. + +However, if you’re happy to experiment — read: can handle any package conflicts or system issues resulting from attempting to upgrade your desktop environment — you can. + +### Install Plasma 5.3 in Kubuntu 15.04 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2012/02/logo-kubuntu.png) + +To **install Plasma 5.3 in Kubuntu 15.04** you need to add the KDE Backports PPA, run the Software Updater tool and install any available updates. + +The Kubuntu backports PPA may/will also upgrade other parts of the KDE Platform other than Plasma that are installed on your system including KDE applications, frameworks and Kubuntu specific configuration files. + +Using the command line is by far the fastest way to upgrade to Plasma 5.3 in Kubuntu: + + sudo add-apt-repository ppa:kubuntu-ppa/backports + + sudo apt-get update && sudo apt-get dist-upgrade + +After the upgrade process has completed, and assuming everything went well, you should reboot your computer. + +If you’re using an alternative desktop environment, like LXDE, Unity or GNOME, you will need to install the Kubuntu desktop package (you’ll find it in the Ubuntu Software Centre) after running both of the commands above. + +To downgrade to the stock version of Plasma in 15.04 you can use the PPA-Purge tool: + + sudo apt-get install ppa-purge + + sudo ppa-purge ppa:kubuntu-ppa/backports + +Let us know how your upgrade/testing goes in the comments below and don’t forget to mention the features you hope to see added to the Plasma 5 desktop next. + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/kde-plasma-5-3-released-heres-how-to-upgrade-in-kubuntu-15-04 + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://www.kde.org/announcements/plasma-5.3.0.php +[2]:http://www.omgubuntu.co.uk/2015/04/beta-plasma-5-3-features +[3]:http://www.omgubuntu.co.uk/2015/04/beta-plasma-5-3-features +[4]:https://www.kde.org/announcements/plasma-5.2.2-5.3.0-changelog.php +[5]:https://community.kde.org/Plasma/Live_Images \ No newline at end of file From d783802859ce5f224209ccfd71e46921effbb60c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 29 Apr 2015 11:35:03 +0800 Subject: [PATCH 115/154] =?UTF-8?q?20150429-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...sed--How to Upgrade on Fedora or CentOS.md | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md diff --git a/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md b/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md new file mode 100644 index 0000000000..abdca76f92 --- /dev/null +++ b/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md @@ -0,0 +1,167 @@ +Docker 1.6 Released - How to Upgrade on Fedora / CentOS +================================================================================ +Docker, a popular open source container platform for packaging applications, has a new release 1.6 with lot of new features in it. This version has updates to Docker Registry, Engine, Swarm, Compose and Machine. The release aims at improvements in performance, developer and system administrator experiences. Let us take a quick look at the new features available. + +**Docker Registry (2.0)** which is a service for pushing Docker images for storing and sharing, has undergone architectural changes as it was facing performance issues when under load. It is still backward compatible. The language in which Docker Registry is written is now changed from Python to Google's Go to improve performance. In combination with Docker Engine 1.6, it is capable of pulling the images faster. Earlier the images were delivered sequentially, but now in parallel. + +**Docker Engine (1.6)** is greatly improved from its previous version. It supports containers and image labels. With labels you can attach user-defined metadata to images and containers which in turn can be used by other tools. Labels will not be visible to the running applications and can be used to speed up the searching of containers and images. + +There is a Windows version of the Docker client which can connect to a remote Docker engine that runs Linux. + +Docker now supports logging driver API that allows us to send container logs to systems like Syslog or to a third-party. It is going to be benefitting the system administrators. + +**Swarm (0.2)** is a clustering tool for Docker which turns a pool of Docker hosts into one virtual host. In the new feature, containers are evenly placed on the available nodes. Effort is made towards supporting the complete Docker API by adding more Docker commands. In the future, it will be possible to use third-party drivers for clustering. + +**Compose (1.2)** which is a tool for defining and running complex applications in Docker has also got an upgrade. In the new version, one can create multiple sub-files instead of one flat file to describe a multi-container application. + +With **Machine (0.2)**, we can easily create Docker hosts on local computers, clouds and data centers. The new release provides a cleaner driver interface to write drivers for providers. Provisioning is handled centrally by Machine instead of each individual driver. New command added to regenerate host's TLS certificates which increases security. + +### Upgrade instructions on Fedora / CentOS ### + +In this section, let us learn how to upgrade the existing docker version to the latest on Fedora and CentOS. Please note that currently Docker runs only on 64-bit architecture. As both Fedora and CentOS are from RedHat, commands used are pretty much identical except that the Docker package in Fedora20 and CentOS6.5 is called “docker-io”. + +If you do not already have Docker installed on the system, install it using: + + "yum install docker-io" – on Fedora20 / CentOS6.5 + + "yum install docker" - on Fedora21 / CentOS7 + +Before upgrading, it is good to have a backup of the docker images and container volumes. + +Refer [filesystem to a tar archive][1] and [volumes backups, restores or migrations options][2] for more details. + +Currently the test system has Docker version 1.5 installed. Output shown in the examples are from a Fedora 20 system. + +Verify the current version of Docker installed on the system + + [root@TestNode1 ~]#sudo docker -v + + Docker version 1.5.0, build a8a31ef/1.5.0 + +If the Docker service is running, first stop it. + + [root@TestNode1 ~]# sudo systemctl stop docker + +Upgrade to the latest version using yum update. But at the time of writing this article, the repositories were not yet updated with the latest version(1.6). Hence you need to use the binary method of upgradation. + + [root@TestNode1 ~]#sudo yum -y update docker-io + + No packages marked for update + + [root@TestNode1 ~]#sudo wget https://get.docker.com/builds/Linux/x86_64/docker-latest -O /usr/bin/docker + + --2015-04-19 13:40:48-- https://get.docker.com/builds/Linux/x86_64/docker-latest + + Resolving get.docker.com (get.docker.com)... 162.242.195.82 + + Connecting to get.docker.com (get.docker.com)|162.242.195.82|:443... connected. + + HTTP request sent, awaiting response... 200 OK + + Length: 15443598 (15M) [binary/octet-stream] + + Saving to: /usr/bin/docker + + 100%[======================================>] 15,443,598 8.72MB/s in 1.7s + + 2015-04-19 13:40:50 (8.72 MB/s) - /usr/bin/docker saved + +Check the updated version + + [root@TestNode1 ~]#sudo docker -v + + Docker version 1.6.0, build 4749651 + +Restart the docker service + + [root@TestNode1 ~]# sudo systemctl start docker + +Verify that Docker is working + + [root@TestNode1 ~]# docker images + + REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE + + fedora latest 834629358fe2 3 months ago 241.3 MB + + [root@TestNode1 ~]# docker run fedora /bin/echo Hello World + + Hello World + +**Note** on CentOS installation , after installing Docker on CentOS, you might get error messages like the following while trying to start the Docker service + + docker.service - Docker Application Container Engine + + Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled) + + Active: failed (Result: exit-code) since Mon 2015-04-20 03:24:24 EDT; 6h ago + + Docs: http://docs.docker.com + + Process: 21069 ExecStart=/usr/bin/docker -d $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=127) + + Main PID: 21069 (code=exited, status=127) + + Apr 20 03:24:24 centos7 systemd[1]: Starting Docker Application Container E..... + + Apr 20 03:24:24 centos7 docker[21069]: time="2015-04-20T03:24:24-04:00" lev...)" + + Apr 20 03:24:24 centos7 docker[21069]: time="2015-04-20T03:24:24-04:00" lev...)" + + Apr 20 03:24:24 centos7 docker[21069]: /usr/bin/docker: relocation error: /...ce + + Apr 20 03:24:24 centos7 systemd[1]: docker.service: main process exited, co.../a + + Apr 20 03:24:24 centos7 systemd[1]: Failed to start Docker Application Cont...e. + + Apr 20 03:24:24 centos7 systemd[1]: Unit docker.service entered failed state. + +This is a known bug ( [https://bugzilla.redhat.com/show_bug.cgi?id=1207839][3] ) and needs an upgrade of the device mapper to the latest level. + + [root@centos7 ~]# rpm -qa device-mapper + + device-mapper-1.02.84-14.el7.x86_64 + + [root@centos7 ~]# yum update device-mapper + + [root@centos7 ~]# rpm -qa device-mapper + + device-mapper-1.02.93-3.el7.x86_64 + + [root@centos7 ~]# systemctl start docker + +### Summary ### + +Though the docker technology is quite recent one, it is quickly gaining popularity. It has made life easy for developers and ops teams to quickly create and deploy applications respectively. With the company releasing quick updates to Docker in order to improve the product and address customer requirements, the future is definitely bright for Docker. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/docker-1-6-features-upgrade-fedora-centos/ + +作者:[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://docs.docker.com/reference/commandline/cli/#export +[2]:http://docs.docker.com/userguide/dockervolumes/#backup-restore-or-migrate-data-volumes +[3]:https://bugzilla.redhat.com/show_bug.cgi?id=1207839 +[4]: +[5]: +[6]: +[7]: +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: \ No newline at end of file From 8263c03c488c36a7183626f7fbe5dd263722d62b Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 29 Apr 2015 11:46:23 +0800 Subject: [PATCH 116/154] [Translated] tech/20150108 Interface (NICs) Bonding in Linux using nmcli --- ...ace (NICs) Bonding in Linux using nmcli.md | 137 ------------------ ...ace (NICs) Bonding in Linux using nmcli.md | 136 +++++++++++++++++ 2 files changed, 136 insertions(+), 137 deletions(-) delete mode 100644 sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md create mode 100644 translated/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md diff --git a/sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md b/sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md deleted file mode 100644 index 41eee7a86f..0000000000 --- a/sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md +++ /dev/null @@ -1,137 +0,0 @@ -Translating by ictlyh -Interface (NICs) Bonding in Linux using nmcli -================================================================================ -Today, we'll learn how to perform Interface (NICs) bonding in our CentOS 7.x using nmcli (Network Manager Command Line Interface). - -NICs (Interfaces) bonding is a method for linking **NICs** together logically to allow fail-over or higher throughput. One of the ways to increase the network availability of a server is by using multiple network interfaces. The Linux bonding driver provides a method for aggregating multiple network interfaces into a single logical bonded interface. It is a new implementation that does not affect the older bonding driver in linux kernel; it offers an alternate implementation. - -**NIC bonding is done to provide two main benefits for us:** - -1. **High bandwidth** -1. **Redundancy/resilience** - -Now lets configure NICs bonding in CentOS 7. We'll need to decide which interfaces that we would like to configure a Team interface. - -run **ip link** command to check the available interface in the system. - - $ ip link - -![ip link](http://blog.linoxide.com/wp-content/uploads/2015/01/ip-link.png) - -Here we are using **eno16777736** and **eno33554960** NICs to create a team interface in **activebackup** mode. - -Use **nmcli** command to create a connection for the network team interface,with the following syntax. - - # nmcli con add type team con-name CNAME ifname INAME [config JSON] - -Where **CNAME** will be the name used to refer the connection ,**INAME** will be the interface name and **JSON** (JavaScript Object Notation) specifies the runner to be used.**JSON** has the following syntax: - - '{"runner":{"name":"METHOD"}}' - -where **METHOD** is one of the following: **broadcast, activebackup, roundrobin, loadbalance** or **lacp**. - -### 1. Creating Team Interface ### - -Now let us create the team interface. here is the command we used to create the team interface. - - # nmcli con add type team con-name team0 ifname team0 config '{"runner":{"name":"activebackup"}}' - -![nmcli con create](http://blog.linoxide.com/wp-content/uploads/2015/01/nmcli-con-create.png) - -run **# nmcli con show** command to verify the team configuration. - - # nmcli con show - -![Show Teamed Interace](http://blog.linoxide.com/wp-content/uploads/2015/01/show-team-interface.png) - -### 2. Adding Slave Devices ### - -Now lets add the slave devices to the master team0. here is the syntax for adding the slave devices. - - # nmcli con add type team-slave con-name CNAME ifname INAME master TEAM - -Here we are adding **eno16777736** and **eno33554960** as slave devices for **team0** interface. - - # nmcli con add type team-slave con-name team0-port1 ifname eno16777736 master team0 - - # nmcli con add type team-slave con-name team0-port2 ifname eno33554960 master team0 - -![adding slave devices to team](http://blog.linoxide.com/wp-content/uploads/2015/01/adding-to-team.png) - -Verify the connection configuration using **#nmcli con show** again. now we could see the slave configuration. - - #nmcli con show - -![show slave config](http://blog.linoxide.com/wp-content/uploads/2015/01/show-slave-config.png) - -### 3. Assigning IP Address ### - -All the above command will create the required configuration files under **/etc/sysconfig/network-scripts/**. - -Lets assign an IP address to this team0 interface and enable the connection now. Here is the command to perform the IP assignment. - - # nmcli con mod team0 ipv4.addresses "192.168.1.24/24 192.168.1.1" - # nmcli con mod team0 ipv4.method manual - # nmcli con up team0 - -![ip assignment](http://blog.linoxide.com/wp-content/uploads/2015/01/ip-assignment.png) - -### 4. Verifying the Bonding ### - -Verify the IP address information in **#ip add show team0** command. - - #ip add show team0 - -![verfiy ip address](http://blog.linoxide.com/wp-content/uploads/2015/01/verfiy-ip-adress.png) - -Now lets check the **activebackup** configuration functionality using the **teamdctl** command. - - # teamdctl team0 state - -![teamdctl active backup check](http://blog.linoxide.com/wp-content/uploads/2015/01/teamdctl-activebackup-check.png) - -Now lets disconnect the active port and check the state again. to confirm whether the active backup configuration is working as expected. - - # nmcli dev dis eno33554960 - -![disconnect activeport](http://blog.linoxide.com/wp-content/uploads/2015/01/disconnect-activeport.png) - -disconnected the active port and now check the state again using **#teamdctl team0 state**. - - # teamdctl team0 state - -![teamdctl check activeport disconnect](http://blog.linoxide.com/wp-content/uploads/2015/01/teamdctl-check-activeport-disconnect.png) - -Yes its working cool !! we will connect the disconnected connection back to team0 using the following command. - - #nmcli dev con eno33554960 - -![nmcli dev connect disconected](http://blog.linoxide.com/wp-content/uploads/2015/01/nmcli-dev-connect-disconected.png) - -We have one more command called **teamnl** let us show some options with **teamnl** command. - -to check the ports in team0 run the following command. - - # teamnl team0 ports - -![teamnl check ports](http://blog.linoxide.com/wp-content/uploads/2015/01/teamnl-check-ports.png) - -Display currently active port of **team0**. - - # teamnl team0 getoption activeport - -![display active port team0](http://blog.linoxide.com/wp-content/uploads/2015/01/display-active-port-team0.png) - -Hurray, we have successfully configured NICs bonding :-) Please share feedback if any. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-command/interface-nics-bonding-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/ \ No newline at end of file diff --git a/translated/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md b/translated/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md new file mode 100644 index 0000000000..0b5bf2cd8e --- /dev/null +++ b/translated/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md @@ -0,0 +1,136 @@ +在 Linux 中用 nmcli 命令绑定网卡(NICs) +================================================================================ +今天,我们来学习一下在 CentOS 7.x 中如何用 nmcli(Network Manager Command Line Interface:网络管理命令行接口) 进行网卡(NICs 译者注:Netword Interface Card,网卡或网络适配器)绑定(译者注:bond 是指把多个物理网卡绑定成一个逻辑上的网卡,这样多个网卡可以使用同一个 IP 从而可以避免单点故障)。 + +网卡绑定是将 **网卡** 逻辑地连接到一起从而允许故障转移或者提高吞吐率的方法。提高服务器网络可用性的一个方式是使用多个网卡。Linux 绑定驱动提供了一个将多个网卡聚合到一个逻辑绑定接口的方法。这是个并不影响 linux 内核中旧绑定驱动的新的实现;它提供了另一种实现方法。 + +**网卡绑定为我们提供了两个主要的好处:** + +1. **高带宽** +1. **冗余/弹性** + +现在让我们在 CentOS 7 上配置网卡绑定吧。我们需要决定选取哪些接口配置成一个组接口。 + +运行 **ip link** 命令查看系统中可用的接口。 + + $ ip link + +![ip link](http://blog.linoxide.com/wp-content/uploads/2015/01/ip-link.png) + +这里我们使用 **eno16777736** 和 **eno33554960** 网卡在 “主动备份” 模式下创建一个组接口。(译者注:关于不同模式可以参考:多网卡的7种bond模式原理) + +按照下面的语法,用 **nmcli** 命令为网络组接口创建一个连接。 + + # nmcli con add type team con-name CNAME ifname INAME [config JSON] + +**CNAME** 指代连接的名称,**INAME** 是接口名称,**JSON** (JavaScript Object Notation) 指定所使用的处理器(runner)。**JSON** 语法格式如下: + + '{"runner":{"name":"METHOD"}}' + +**METHOD** 是以下的其中一个:**broadcast、activebackup、roundrobin、loadbalance** 或者 **lacp**。 + +### 1. 创建组接口 ### + +现在让我们来创建组接口。这是我们创建组接口所使用的命令。 + + # nmcli con add type team con-name team0 ifname team0 config '{"runner":{"name":"activebackup"}}' + +![nmcli con create](http://blog.linoxide.com/wp-content/uploads/2015/01/nmcli-con-create.png) + +运行 **# nmcli con show** 命令验证组接口配置。 + + # nmcli con show + +![显示组接口](http://blog.linoxide.com/wp-content/uploads/2015/01/show-team-interface.png) + +### 2. 添加从设备 ### + +现在让我们天际从设备到主设备 team0。这是添加从设备的语法。 + + # nmcli con add type team-slave con-name CNAME ifname INAME master TEAM + +在这里我们添加 **eno16777736** 和 **eno33554960** 作为 **team0** 接口的从设备。 + + # nmcli con add type team-slave con-name team0-port1 ifname eno16777736 master team0 + + # nmcli con add type team-slave con-name team0-port2 ifname eno33554960 master team0 + +![添加从设备到 team](http://blog.linoxide.com/wp-content/uploads/2015/01/adding-to-team.png) + +再次用命令 **#nmcli con show** 验证连接配置。现在我们可以看到从设备配置信息。 + + #nmcli con show + +![显示从设备配置](http://blog.linoxide.com/wp-content/uploads/2015/01/show-slave-config.png) + +### 3. 分配 IP 地址 ### + +上面的命令会在 **/etc/sysconfig/network-scripts/** 目录下创建需要的配置文件。 + +现在让我们为 team0 接口分配一个 IP 地址并启用这个连接。这是进行 IP 分配的命令。 + + # nmcli con mod team0 ipv4.addresses "192.168.1.24/24 192.168.1.1" + # nmcli con mod team0 ipv4.method manual + # nmcli con up team0 + +![分配 ip](http://blog.linoxide.com/wp-content/uploads/2015/01/ip-assignment.png) + +### 4. 验证绑定 ### + +用 **#ip add show team0** 命令验证 IP 地址信息。 + + #ip add show team0 + +![验证 ip 地址](http://blog.linoxide.com/wp-content/uploads/2015/01/verfiy-ip-adress.png) + +现在用 **teamdctl** 命令检查 **主动备份** 配置功能。 + + # teamdctl team0 state + +![teamdctl 检查主动备份](http://blog.linoxide.com/wp-content/uploads/2015/01/teamdctl-activebackup-check.png) + +现在让我们和激活的端口断开连接并再次检查状态来确认主动备份配置是否像希望的那样工作。 + + # nmcli dev dis eno33554960 + +![断开激活端口连接](http://blog.linoxide.com/wp-content/uploads/2015/01/disconnect-activeport.png) + +断开激活端口后再次用命令 **#teamdctl team0 state** 检查状态。 + + # teamdctl team0 state + +![teamdctl 检查断开激活端口连接](http://blog.linoxide.com/wp-content/uploads/2015/01/teamdctl-check-activeport-disconnect.png) + +是的,它运行良好!!我们会使用下面的命令连接回到 team0 的断开的连接。 + + #nmcli dev con eno33554960 + +![nmcli dev 连接断开的连接](http://blog.linoxide.com/wp-content/uploads/2015/01/nmcli-dev-connect-disconected.png) + +我们还有一个 **teamnl** 命令可以显示 **teamnl** 命令的一些选项。 + +用下面的命令检查在 team0 运行的端口。 + + # teamnl team0 ports + +![teamnl 检查端口](http://blog.linoxide.com/wp-content/uploads/2015/01/teamnl-check-ports.png) + +显示 **team0** 当前活动的端口。 + + # teamnl team0 getoption activeport + +![显示 team0 活动端口](http://blog.linoxide.com/wp-content/uploads/2015/01/display-active-port-team0.png) + +好了,我们已经成功地配置了网卡绑定 :-) ,如果有任何反馈,请告诉我们。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/interface-nics-bonding-linux/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者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 b7c78629570e4a9a87b2df98bd9ba2384fc31837 Mon Sep 17 00:00:00 2001 From: royaso Date: Wed, 29 Apr 2015 13:54:59 +0800 Subject: [PATCH 117/154] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=2020140804=20Group?= =?UTF-8?q?=20Test--Linux=20Text=20Editors.md=20(=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=80=E4=BA=9B=E9=94=99=E5=88=AB=E5=AD=97,=E4=B8=80?= =?UTF-8?q?=E5=8F=A5=E6=BC=8F=E7=BF=BB=E8=AF=91,=E8=AF=AD=E5=8F=A5?= =?UTF-8?q?=E9=80=9A=E9=A1=BA)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20140804 Group Test--Linux Text Editors.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/translated/share/20140804 Group Test--Linux Text Editors.md b/translated/share/20140804 Group Test--Linux Text Editors.md index fa9b275588..1976cfca32 100644 --- a/translated/share/20140804 Group Test--Linux Text Editors.md +++ b/translated/share/20140804 Group Test--Linux Text Editors.md @@ -8,7 +8,7 @@ 得益于能向它们注入足以抗衡其它类型的以文本为中心的应用程序能力的插件,一些简单的文本编辑器甚至超过了它们的设计目标。它们能胜任一个源代码编辑器的任务,甚至是一个集成开发环境。 -Emacs和Vim是两款最流行和强大的纯文本编辑器。但是,由于一些原因,我们在这个组测试中并没有包括它们。首先,如果你使用它们中的任何一个,那么恭喜你:你不需要更换了。其次,它们都有陡峭的学习曲线,尤其是对于那些对有面向图形用户界面的桌面系统的替代能力更有兴趣的用户。 +Emacs和Vim是两款最流行和强大的纯文本编辑器。但是,由于一些原因,我们在这个组测试中并没有包括它们。首先,如果你使用它们中的任何一个,那么恭喜你:你不需要更换了。其次,它们都有陡峭的学习曲线,尤其是那些熟悉了桌面环境的用户:他们很更愿意投入其他有图形界面的文本编辑器。 ### 目录: ### @@ -54,9 +54,9 @@ Emacs和Vim是两款最流行和强大的纯文本编辑器。但是,由于一 除了Gedit和jEdit以外的所有工具,都是通过推荐的安装方法安装在Fedora和Ubuntu上。前者已经兼容默认的Gnome桌面,后者仍然固执地反对安装在Fedora上。由于这些是相对简单的应用程序,他们没有复杂的依赖,唯一例外的是jEdit,它要求要有Oracle Java。 -得益于Gnome和KDE持续的努力,不论他们运行的桌面环境,所有编辑器看起来很好,功能也很正常。这不仅是作为环境评价的标准,也意味着你不再受制于要找到和你的桌面环境兼容的工具。 +得益于Gnome和KDE持续的努力,不论他们运行的桌面环境,所有编辑器看起来很好,功能也很正常。这不仅是作为评价的标准,也意味着你不再受制于要找到和你的桌面环境兼容的工具。 -除了它们老派的功能,我们也对所有候选者测试了通用文本编辑功能。然而,它们并没有被设计为模仿现代字处理器的所有功能,我们也不以此评判。 +除了它们奇特的功能,我们也对所有候选者测试了通用文本编辑功能。然而,它们并没有被设计为模仿现代字处理器的所有功能,我们也不以此评判。 ![Kate能搭建为功能丰富的集成开发环境](http://www.linuxvoice.com/wp-content/uploads/2014/08/kate-web.png) @@ -64,7 +64,7 @@ Kate能搭建为功能丰富的集成开发环境。 ### 编程语言支持 ### -UltraEdit 能进行语法高亮,代码折叠以及拥有项目管理的能力。这也有一个罗列源文件中所有功能的功能列表,但并不适用于我们任何的测试代码文件。UltraEdit也支持HTML5,有能添加常用HTML标记的HTML工具栏。 +UltraEdit 能进行语法高亮,代码折叠以及拥有项目管理的能力。这也有一个罗列源文件中所有函数的功能列表,但并不适用于我们任何的测试代码文件。UltraEdit也支持HTML5,有能添加常用HTML标记的HTML工具栏。 即使Gnome的默认文本编辑器Gedit,也有几个面向编码的功能特性,例如括号匹配,自动缩进以及为包括C, C++, Java, HTML, XML, Python, Perl, 以及许多其它编程语言进行语法高亮。 @@ -74,15 +74,15 @@ UltraEdit 能进行语法高亮,代码折叠以及拥有项目管理的能力 正如Komodo IDE,Sublime也可滚动浏览显示完整的代码,这对于长代码文件导航和在文件中的不同部分跳转很方便。 -Sublime最好的功能之一就是能在编辑器内部为特定语言,例如C++, Python, Ruby等运行代码,当然假设在你的电脑上安装有编译器以及其它系统工具。 +Sublime最好的功能之一就是能在编辑器内部为特定语言,例如C++, Python, Ruby等运行代码,当然假设在你的电脑上安装有编译器以及其它系统工具。省时间而且不用再开终端. 你也可以用插件在Kate中开启构建系统功能。另外,你可以为GDB调试器添加一个简单的前端。Kate能和Git,Subversion以及Mercurial版本控制系统一起工作,也提供了一些项目管理的功能。 -除了能为超过180中语言进行语法高亮,它支持所有的这些辅助功能,例如括号匹配,自动补全和自动缩进。它也支持代码折叠,甚至在一个程序中包括有错误的函数。 +除了能为超过180中语言进行语法高亮,它支持所有的这些辅助功能,例如括号匹配,自动补全和自动缩进。它也支持代码折叠,甚至在一个程序中折叠函数。 -jEdit是唯一的遗憾,它声称自己是一个程序员的文本编辑器,但它缺少其他的基本功能,例如代码折叠,它甚至不支持补全功能。 +唯一的遗憾的是jEdit,它声称自己是一个程序员的文本编辑器,但它缺少其他的基本功能,例如代码折叠,它甚至不能提示或者不全函数. -**Verdict:** +**评分:** - Gedit:3/5 - Kate:5/5 @@ -98,7 +98,7 @@ jEdit是唯一的遗憾,它声称自己是一个程序员的文本编辑器, 高级文本编辑器用户希望能完全通过键盘控制和操作,一些应用程序甚至运行他们的用户自定义快捷方式的键盘绑定。 -你可以轻松的使用Gedit的扩展键盘快捷键。这里有编辑文件,为普通任务,例如对一个文档进行拼写检查,唤起工具的快捷键。你可以获取应用程序内部的一系列默认快捷键,但并没有图形化的方式去自定义它们。相似的,在Sublime中自定义键绑定,你需要修改他的XML键映射文件。Sublime由于缺少定义键盘快捷键的图形化界面而饱受批评,但长期使用的用户已经支持当前的基于文件的机制,这给他们更多的控制能力。 +你可以轻松的使用Gedit的扩展键盘快捷键。这里有编辑文件,为普通任务,例如对一个文档进行拼写检查,唤起工具的快捷键。你可以获取应用程序内部的一系列默认快捷键,但并没有图形化的方式去自定义它们。相似的,在Sublime中自定义键绑定,你需要修改他的XML键映射文件。Sublime由于缺少定义键盘快捷键的图形化界面而饱受批评,但长期使用的用户支持当前的基于文件的机制:这给他们更多的控制能力。 UltraEdit为它"一切都可自定义"的座右铭感到自豪,这也包括键盘快捷键。你可以自定义菜单导航的热键,以及定义你自己的访问大量函数的多键键映射。 @@ -148,7 +148,7 @@ UltraEdit的用户界面是高度可配置的 — 你可以正如改变其它许 Gedit有很普通的外观。通过最小化菜单和按钮有一个简单的界面。但这也是一种双刃剑,因为有些用户可能不会发现它真正的潜能。 -应用程序可以通过在窗口中能重排和移动的选项卡打开多个文件。用户可以通过使用一个插件选择性地启用旁边或者底部用来显示文件浏览和工具输出的面板。这个应用程序会检测到被其它应用程序更改的文件并可以重新加载这个文件。 +Gedit可以通过在窗口中能重排和移动的选项卡打开多个文件。用户可以通过使用一个插件选择性地启用旁边或者底部用来显示文件浏览和工具输出的面板。这个应用程序会检测到被其它应用程序更改的文件并可以重新加载这个文件。 为了适配Gnome,在应用程序的最后一个版本中考虑了大量的用户界面。然而它还并不稳定,尽管包括了所有的功能,和菜单交互的一些插件还需要升级。 @@ -232,7 +232,7 @@ jEdit拥有最令人映像深刻的插件设施。该应用有超过200个插件 ### 纯文本编辑 ### -尽管它们强大的额外功能甚至可能会取代几个流派完全成熟的应用程序,有时候可能只需要使用这些庞大的文本编辑器读写或者编辑简单的纯文本。虽然你可以使用它们中的任何一个输入文本,我们通过普通文本编辑的方便性平均它们。 +尽管它们强大的额外功能甚至可能会取代几个流派完全成熟的应用程序,有时候可能只需要使用这些庞大的文本编辑器读写或者编辑简单的纯文本。虽然你可以使用它们中的任何一个输入文本,我们通过普通文本编辑的方便性评价它们。 Gnome的默认文本编辑器Gedit,支持取消和重做机制以及搜索和替换。它可以对多种语言进行拼写检查,并能通过使用Gnome GVFS库访问和编辑远程文件。 @@ -303,7 +303,7 @@ Kate为能快速响应你的需要而设计,它的界面并不会使你茫然 随你发行版发布的默认文本编辑器也能帮助你一些高级任务。例如KDE的KWrite和Raspbian的Nano。得益于KDE的katepart组件,KWrite继承了一些Kate的功能,得益于在树莓派上的可用性,Nano也开始重现风头。 -如果你希望跟随Linux大师的脚本,你总是可以尝试崇高的文本编辑机Emacs和Vim。想尝试Vim强大的用户首先可以考虑gVim,它通过图形界面展现了Vim的强大。 +如果你希望跟随Linux大师的脚步,你总是可以尝试崇高的文本编辑机Emacs和Vim。想尝试Vim强大的用户首先可以考虑gVim,它通过图形界面展现了Vim的强大。 除了jEdit和Kate,这里还有其他模仿例如Emacs和Vim之类的老派高级编辑器的编辑器,比如JED 编辑器和Joe's Own Editor,这两者都有Emacs的模拟模式。另一方面,如果你在寻找轻量级的代码编辑器,可以看看Bluefish和Geany。他们的存在是为了填补文本编辑器和全面集成的开发平台之间的空隙。 @@ -313,7 +313,7 @@ via: http://www.linuxvoice.com/text-editors/ 作者:[Ben Everard][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[royaso](https://github.com/royaso) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From e240424ea94a3c75cda6a3a36e0a450f5a1f7b3f Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 29 Apr 2015 14:42:32 +0800 Subject: [PATCH 118/154] =?UTF-8?q?20150429-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...What are good command line HTTP clients.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sources/share/20150429 What are good command line HTTP clients.md diff --git a/sources/share/20150429 What are good command line HTTP clients.md b/sources/share/20150429 What are good command line HTTP clients.md new file mode 100644 index 0000000000..d809be1a06 --- /dev/null +++ b/sources/share/20150429 What are good command line HTTP clients.md @@ -0,0 +1,110 @@ +What are good command line HTTP clients? +================================================================================ +The whole is greater than the sum of its parts is a very famous quote from Aristotle, a Greek philosopher and scientist. This quote is particularly pertinent to Linux. In my view, one of Linux's biggest strengths is its synergy. The usefulness of Linux doesn't derive only from the huge raft of open source (command line) utilities. Instead, it's the synergy generated by using them together, sometimes in conjunction with larger applications. + +The Unix philosophy spawned a "software tools" movement which focused on developing concise, basic, clear, modular and extensible code that can be used for other projects. This philosophy remains an important element for many Linux projects. + +Good open source developers writing utilities seek to make sure the utility does its job as well as possible, and work well with other utilities. The goal is that users have a handful of tools, each of which seeks to excel at one thing. Some utilities work well independently. + +This article looks at 3 open source command line HTTP clients. These clients let you download files off the internet from a command line. But they can also be used for many more interesting purposes such as testing, debugging and interacting with HTTP servers and web applications. Working with HTTP from the command-line is a worthwhile skill for HTTP architects and API designers. If you need to play around with an API, HTTPie and cURL will be invaluable. + +---------- + +![HTTPie](http://www.linuxlinks.com/portal/content2/png/HTTPie.png) + +![HTTPie in action](http://www.linuxlinks.com/portal/content/reviews/Internet/Screenshot-httpie.png) + +HTTPie (pronounced aych-tee-tee-pie) is an open source command line HTTP client. It is a a command line interface, cURL-like tool for humans. + +The goal of this software is to make CLI interaction with web services as human-friendly as possible. It provides a simple http command that allows for sending arbitrary HTTP requests using a simple and natural syntax, and displays colorized output. HTTPie can be used for testing, debugging, and generally interacting with HTTP servers. + +#### Features include: #### + +- Expressive and intuitive syntax +- Formatted and colorized terminal output +- Built-in JSON support +- Forms and file uploads +- HTTPS, proxies, and authentication +- Arbitrary request data +- Custom headers +- Persistent sessions +- Wget-like downloads +- Python 2.6, 2.7 and 3.x support +- Linux, Mac OS X and Windows support +- Plugins +- Documentation +- Test coverage + +- Website: [httpie.org][1] +- Developer: Jakub Roztočil +- License: Open Source +- Version Number: 0.9.2 + +---------- + +![cURL](http://www.linuxlinks.com/portal/content2/png/cURL1.png) + +![cURL in action](http://www.linuxlinks.com/portal/content/reviews/Internet/Screenshot-cURL.png) + +cURL is an open source command line tool for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP. + +curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks. + +#### Features include: #### + +- Config file support +- Multiple URLs in a single command line +- Range "globbing" support: [0-13], {one,two,three} +- Multiple file upload on a single command line +- Custom maximum transfer rate +- Redirectable stderr +- Metalink support + +- Website: [curl.haxx.se][2] +- Developer: Daniel Stenberg +- License: MIT/X derivate license +- Version Number: 7.42.0 + +---------- + +![Wget](http://www.linuxlinks.com/portal/content2/png/Wget1.png) + +![Wget in action](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Wget.png) + +Wget is open source software that retrieves content from web servers. Its name is derived from World Wide Web and get. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies. + +Wget can follow links in HTML pages and create local versions of remote web sites, fully recreating the directory structure of the original site. This is known as "recursive downloading." + +Wget has been designed for robustness over slow or unstable network connections. + +Features include: + +- Resume aborted downloads, using REST and RANGE +- Use filename wild cards and recursively mirror directories +- NLS-based message files for many different languages +- Optionally converts absolute links in downloaded documents to relative, so that downloaded documents may link to each other locally +- Runs on most UNIX-like operating systems as well as Microsoft Windows +- Supports HTTP proxies +- Supports HTTP cookies +- Supports persistent HTTP connections +- Unattended / background operation +- Uses local file timestamps to determine whether documents need to be re-downloaded when mirroring + +- Website: [www.gnu.org/software/wget/][3] +- Developer: Hrvoje Niksic, Gordon Matzigkeit, Junio Hamano, Dan Harkless, and many others +- License: GNU GPL v3 +- Version Number: 1.16.3 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150425174537249/HTTPclients.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://httpie.org/ +[2]:http://curl.haxx.se/ +[3]:https://www.gnu.org/software/wget/ \ No newline at end of file From 4c0e81d9d2aa3aed175e86c60b22d59bf9fbbb26 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Wed, 29 Apr 2015 21:40:12 +0800 Subject: [PATCH 119/154] Translated by DongShuaike --- ...-2 Setting up a private Docker registry.md | 242 ------------------ ...-2 Setting up a private Docker registry.md | 241 +++++++++++++++++ 2 files changed, 241 insertions(+), 242 deletions(-) delete mode 100644 sources/tech/20150128 Docker-2 Setting up a private Docker registry.md create mode 100644 translated/tech/20150128 Docker-2 Setting up a private Docker registry.md diff --git a/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md b/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md deleted file mode 100644 index 625281ee7c..0000000000 --- a/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md +++ /dev/null @@ -1,242 +0,0 @@ -[Translating by DongShuaike] -Setting up a private Docker registry -================================================================================ -![](http://cocoahunter.com/content/images/2015/01/docker2.jpg) - -[TL;DR] This is the second post in a series of 3 on how my company moved its infrastructure from PaaS to Docker based deployment. - -- [First part][1]: where I talk about the process we went thru before approaching Docker; -- [Third pard][2]: where I show how to automate the entire process of building images and deploying a Rails app with Docker. - ----------- - -Why would ouy want ot set up a provate registry? Well, for starters, Docker Hub only allows you to have one free private repo. Other companies are beginning to offer similar services, but they are all not very cheap. In addition, if you need to deploy production ready applications built with Docker, you might not want to publish those images on the public Docker Hub. - -This is a very pragmatic approach to dealing with the intricacies of setting up a private Docker registry. For the tutorial we will be using a small 512MB instance on DigitalOcean (from now on DO). I also assume you already know the basics of Docker since I will be concentrating on some more complicated stuff. - -### Local set up ### - -First of all you need to install **boot2docker** and docker CLI. If you already have your basic Docker environment up and running, you can just skip to the next section. - -From the terminal run the following command[1][3]: - - brew install boot2docker docker - -If everything is ok[2][4], you will now be able to start the VM inside which Docker will run with the following command: - - boot2docker up - -Follow the instructions, copy and paste the export commands that boot2docker will print in the terminal. If you now run `docker ps` you should be greeted by the following line - - CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES - -Ok, Docker is ready to go. This will be enough for the moment. Let's go back to setting up the registry. - -### Creating the server ### - -Log into you DO account and create a new Droplet by selecting an image with Docker pre-installed[^n]. - -![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-18-26-14.png) - -You should receive your root credentials via email. Log into your instance and run `docker ps` to see if eveything is ok. - -### Setting up AWS S3 ### - -We are going to use Amazon Simple Storage Service (S3) as the storage layer for our registry / repository. We will need to create a bucket and user credentials to allow our docker container accessoing it. - -Login into your AWS account (if you don't have one you can set one up at [http://aws.amazon.com/][5]) and from the console select S3 (Simple Storage Service). - -![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-29-21.png) - -Click on **Create Bucket**, enter a unique name for your bucket (and write it down, we're gonna need it later), then click on **Create**. - -![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-22-50.png) - -That's it! We're done setting up the storage part. - -### Setup AWS access credentials ### - -We are now going to create a new user. Go back to your AWS console and select IAM (Identity & Access Management). - -![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-29-08.png) - -In the dashboard, on the left side of the webpage, you should click on Users. Then select **Create New Users**. - -You should be presented with the following screen: - -![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-31-42.png) - -Enter a name for your user (e.g. docker-registry) and click on Create. Write down (or download the csv file with) your Access Key and Secret Access Key that we'll need when running the Docker container. Go back to your users list and select the one you just created. - -Under the Permission section, click on Attach User Policy. In the next screen, you will be presented with multiple choices: select Custom Policy. - -![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-41-21.png) - -Here's the content of the custom policy: - - { - "Version": "2012-10-17", - "Statement": [ - { - "Sid": "SomeStatement", - "Effect": "Allow", - "Action": [ - "s3:*" - ], - "Resource": [ - "arn:aws:s3:::docker-registry-bucket-name/*", - "arn:aws:s3:::docker-registry-bucket-name" - ] - } - ] - } - -This will allow the user (i.e. the registry) to manage (read/write) content on the bucket (make sure to use the bucket name you previously defined when setting up AWS S3). To sum it up: when you'll be pushing Docker images from your local machine to your repository, the server will be able to upload them to S3. - -### Installing the registry ### - -Now let's head back to our DO server and SSH into it. We are going to use[^n] one of the [official Docker registry images][6]. - -Let's start our registry with the following command: - - docker run \ - -e SETTINGS_FLAVOR=s3 \ - -e AWS_BUCKET=bucket-name \ - -e STORAGE_PATH=/registry \ - -e AWS_KEY=your_aws_key \ - -e AWS_SECRET=your_aws_secret \ - -e SEARCH_BACKEND=sqlalchemy \ - -p 5000:5000 \ - --name registry \ - -d \ - registry - -Docker should pull the required fs layers from the Docker Hub and eventually start the daemonised container. - -### Testing the registry ### - -If everything worked out, you should now be able to test the registry by pinging it and by searching its content (though for the time being it's still empty). - -Our registry is very basic and it does not provide any means of authentication. Since there are no easy ways of adding authentication (at least none that I'm aware of that are easy enough to implment in order to justify the effort), I've decided that the easiest way of querying / pulling / pushing the registry is an unsecure (over HTTP) connection tunneled thru SSH. - -Opening an SSH tunnel from your local machine is straightforward: - - ssh -N -L 5000:localhost:5000 root@your_registry.com - -The command is tunnelling connections over SSH from port 5000 of the registry server (which is the one we exposed with the `docker run` command in the previous paragraph) to port 5000 on the localhost. - -If you now browse to the following address [http://localhost:5000/v1/_ping][7] you should get the following very simple response - - {} - -This just means that the registry is working correctly. You can also list the whole content of the registry by browsing to [http://localhost:5000/v1/search][8] that will get you a similar response: - - { - "num_results": 2, - "query": "", - "results": [ - { - "description": "", - "name": "username/first-repo" - }, - { - "description": "", - "name": "username/second-repo" - } - ] - } - -### Building an image ### - -Let's now try and build a very simple Docker image to test our newly installed registry. On your local machine, create a Dockerfile with the following content[^n]: - - # Base image with ruby 2.2.0 - FROM ruby:2.2.0 - - MAINTAINER Michelangelo Chasseur - -...and build it: - - docker build -t localhost:5000/username/repo-name . - -The `localhost:5000` part is especially important: the first part of the name of a Docker image will tell the `docker push` command the endpoint towards which we are trying to push our image. In our case, since we are connecting to our remote private registry via an SSH tunnel, `localhost:5000` represents exactly the reference to our registry. - -If everything works as expected, when the command returns, you should be able to list your newly created image with the `docker images` command. Run it and see it for yourself. - -### Pushing to the registry ### - -Now comes the trickier part. It took a me a while to realize what I'm about to describe, so just be patient if you don't get it the first time you read and try to follow along. I know that all this stuff will seem pretty complicated (and it would be if you didn't automate the process), but I promise in the end it will all make sense. In the next post I will show a couple of shell scripts and Rake tasks that will automate the whole process and will let you deploy a Rails to your registry app with a single easy command. - -The docker command you are running from your terminal is actually using the boot2docker VM to run the containers and do all the magic stuff. So when we run a command like `docker push some_repo` what is actually happening is that it's the boot2docker VM that is reacing out for the registry, not our localhost. - -This is an extremely important point to understand: in order to push the Docker image to the remote private registry, the SSH tunnel needs to be established from the boot2docker VM and not from your local machine. - -There are a couple of ways to go with it. I will show you the shortest one (which is not probably the easiest to understand, but it's the one that will let us automate the process with shell scripts). - -First of all though we need to sort one last thing with SSH. - -### Setting up SSH ### - -Let's add our boot2docker SSH key to our remote server (registry) known hosts. We can do so using the ssh-copy-id utility that you can install with the following command shouldn't you already have it: - - brew install ssh-copy-id - -Then run: - - ssh-copy-id -i /Users/username/.ssh/id_boot2docker root@your-registry.com - -Make sure to substitute `/Users/username/.ssh/id_boot2docker` with the correct path of your ssh key. - -This will allow us to connect via SSH to our remote registry without being prompted for the password. - -Finally let's test it out: - - boot2docker ssh "ssh -o 'StrictHostKeyChecking no' -i /Users/michelangelo/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@registry.touchwa.re &" & - -To break things out a little bit: - -- `boot2docker ssh` lets you pass a command as a parameter that will be executed by the boot2docker VM; -- the final `&` indicates that we want our command to be executed in the background; -- `ssh -o 'StrictHostKeyChecking no' -i /Users/michelangelo/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@registry.touchwa.re &` is the actual command our boot2docker VM will run; - - the `-o 'StrictHostKeyChecking no'` will make sure that we are not prompted with security questions; - - the `-i /Users/michelangelo/.ssh/id_boot2docker` indicates which SSH key we want our VM to use for authentication purposes (note that this should be the key you added to your remote registry in the previous step); - - finally we are opening a tunnel on mapping port 5000 to localhost:5000. - -### Pulling from another server ### - -You should now be able to push your image to the remote registry by simply issuing the following command: - - docker push localhost:5000/username/repo_name - -In the [next post][9] we'll se how to automate some of this stuff and we'll containerize a real Rails application. Stay tuned! - -P.S. Please use the comments to let me know of any inconsistencies or fallacies in my tutorial. Hope you enjoyed it! - -1. I'm also assuming you are running on OS X. -1. For a complete list of instructions to set up your docker environment and requirements, please visit [http://boot2docker.io/][10] -1. Select Image > Applications > Docker 1.4.1 on 14.04 at the time of this writing. -1. [https://github.com/docker/docker-registry/][11] -1. This is just a stub, in the next post I will show you how to bundle a Rails application into a Docker container. - --------------------------------------------------------------------------------- - -via: http://cocoahunter.com/2015/01/23/docker-2/ - -作者:[Michelangelo Chasseur][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://cocoahunter.com/author/michelangelo/ -[1]:http://cocoahunter.com/2015/01/23/docker-1/ -[2]:http://cocoahunter.com/2015/01/23/docker-3/ -[3]:http://cocoahunter.com/2015/01/23/docker-2/#fn:1 -[4]:http://cocoahunter.com/2015/01/23/docker-2/#fn:2 -[5]:http://aws.amazon.com/ -[6]:https://registry.hub.docker.com/_/registry/ -[7]:http://localhost:5000/v1/_ping -[8]:http://localhost:5000/v1/search -[9]:http://cocoahunter.com/2015/01/23/docker-3/ -[10]:http://boot2docker.io/ -[11]:https://github.com/docker/docker-registry/ diff --git a/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md b/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md new file mode 100644 index 0000000000..6e4f6e4fba --- /dev/null +++ b/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md @@ -0,0 +1,241 @@ +搭建一个私有的Docker registry +================================================================================ +![](http://cocoahunter.com/content/images/2015/01/docker2.jpg) + +[TL;DR]这是系列的第二篇文章,这系列讲述了我的公司如何把基础服务从PaaS迁移到Docker上 + +- [First part][1]: 第一篇文章里我谈到了接触Docker之前的经历; +- [Third pard][2]: 第三篇文章里我展示如何使创建images的过程自动化以及如何用Docker部署一个Rails应用。 + +---------- + +为什么需要搭建一个私有的registry呢?嗯,Docker Hub(一个Docker公共仓库)只允许你拥有一个免费的私有版本库(repo)。其他的公司提供类似服务,但是价格可不便宜。另外,如果你需要部署一个基于Docker的应用产品,恐怕你不希望这些images在开放的Docker Hub被公开吧! + +这篇文章提供了一个非常务实的方法来处理搭建私有Docke registry时出现的各种错综复杂的情况。我们将会使用一个运行于DigitalOcean(之后简称为DO)的非常小巧的512MB实例。并且我会假定你已经了解了Docker的基本概念,因为我必须集中精力在复杂的事情上! + +###本地搭建### + +首先你需要安装**boot2docker**以及docker CLI。如果你已经搭建好了基本的Docker环境,你可以直接跳过这一步。 + +从终端运行以下命令[1][3]: + brew install boot2docker docker + +如果一切顺利[2][4],你现在将能够启动VM,在VM当中输入下列命令: + boot2docker up + +Follow the instructions, copy and paste the export commands that boot2docker will print in the terminal. If you now run `docker ps` you should be greeted by the following line +按照说明,复制粘贴book2docker打印在终端的export命令(这块翻译不太好)。现在运行`docker ps`命令,终端将有以下显示。 + + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + +好了,Docker已经准备就绪。我们回过头去搭建registry。 + +###创建服务器### + +登录进你的DO账号,选择一个提前安装好Docker的映像文件,创建一个新的Drople。[^n] + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-18-26-14.png) + + +你将会以邮件的方式收到一个根用户凭证。登录进去,然后运行`docker ps`命令来查看系统状态。 + +### 搭建AWS S3 ### + +我们现在将使用Amazo Simple Storage Service(S3)作为我们registry/repository的存储层。我们讲需要创建一个桶(bucket)以及用户凭证(user credentials)来允许我们的docker容器访问它。 + +登录到我们的AWS账号(如果没有,就申请一个[http://aws.amazon.com/][5]),在控制台选择S3(Simpole Storage Service) + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-29-21.png) + +点击 **Create Bucket**,为你的桶输入一个名字(把它写下来,我们一会需要用到它),然后点击**Create**。 + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-22-50.png) + +OK!我们已经搭建好存储部分了。 + +### 安装AWS访问凭证### + +我们现在将要创建一个新的用户。退回到AWS控制台然后选择IAM(Identity & Access Management)。 + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-29-08.png) + +在dashboard的左边,点击Users。然后选择 **Create New Users**。 + +如图所示: + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-31-42.png) + +输入你的用户名(例如 docker-registry)然后点击Create。写下(或者下载csv文件)你的Access Key以及Secret Access Key。回到你的用户列表然后选择你刚刚创建的用户。 + +在Permission section下面,点击Attach User Policy。之后,选择Custom Policy。 + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-41-21.png) + +custom policy的内容如下: + + { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "SomeStatement", + "Effect": "Allow", + "Action": [ + "s3:*" + ], + "Resource": [ + "arn:aws:s3:::docker-registry-bucket-name/*", + "arn:aws:s3:::docker-registry-bucket-name" + ] + } + ] + } + +这个配置将允许用户(也就是regitstry)来对桶上的内容进行操作(读/写)(确保使用你之前创建AWS S3时使用的桶名)。总结起来:当你想把你的Docker映像从你的本机推送到仓库中时,服务器将能够将他们上传到S3。 + +### 安装registry ### + +现在回过头来看我们的DO服务器,SSH登录其上。我们将要使用[^n]一个官方Docker registry映像。[6] + +输入如下命令,开启registry。 + + docker run \ + -e SETTINGS_FLAVOR=s3 \ + -e AWS_BUCKET=bucket-name \ + -e STORAGE_PATH=/registry \ + -e AWS_KEY=your_aws_key \ + -e AWS_SECRET=your_aws_secret \ + -e SEARCH_BACKEND=sqlalchemy \ + -p 5000:5000 \ + --name registry \ + -d \ + registry + +Docker将会从Docker Hub上拉取所需的文件系统层(fs layers)并启动守护容器(daemonised container)。 + +### 测试registry ### + +如果上述操作奏效,你可以通过ping命令,或者查找它的内容来测试registry(虽然这个时候容器还是空的)。 + +我们的registry非常基础,而且没有提供任何“验明正身”的方式。因为添加身份验证可不是一件轻松事(至少我认为没有一种部署方法是简单的,像是为了证明你努力过似的),我觉得 查询/拉取/推送 仓库内容的最简单方法就是通过SSH的未加密连接(通过HTTP)。 + +打开SSH通道的操作非常简单: + + ssh -N -L 5000:localhost:5000 root@your_registry.com + +这条命令建立了一条从registry服务器(前面执行`docker run`命令的时候我们见过它)的5000号端口到本机的5000号端口之间的连接。 + +如果你现在登录[http://localhost:5000/v1/_ping][7],将会看到下面这个非常简短的回复。 + + {} + +这个意味着registry工作正常。你还可以通过登录[http://localhost:5000/v1/search][8]来查看registry内容,回复相似: + + { + "num_results": 2, + "query": "", + "results": [ + { + "description": "", + "name": "username/first-repo" + }, + { + "description": "", + "name": "username/second-repo" + } + ] + } + +### 创建一个映像 ### + +我们现在创建一个非常简答的Docker映像,来检验我们新弄好的registry。在我们的本机上,用如下内容创建一个Dockerfile[^n]: + + + # Base image with ruby 2.2.0 + FROM ruby:2.2.0 + + MAINTAINER Michelangelo Chasseur + +……创建: + + docker build -t localhost:5000/username/repo-name . + +`localhost:5000`非常重要:Docker映像名的最前面一个部分将告知`docker push`命令我们将要把我们的image推送到哪里。在我们这个例子当中,因为我们要通过SSH管道连接远端私有registry,`localhost:5000`精确地表示了对我们的registry的一个引用。 + +如果一切顺利,当命令执行完成返回后,你可以输入`docker images`命令来列出新近创建的映像。执行它看看会出现什么现象? + +### 推送到仓库 ### + +接下来是更好玩的部分。实现我所描述的东西着实花了我一点时间,所以如果你第一次读的话就耐心一点吧,跟着我一起操作。我知道接下来的东西会非常复杂(如果你不自动化进程就一定会这样),但是我保证到最后你一定都能明白。在下一篇文章里我将会使用到一大波shell脚本和Rake任务,通过它们实现自动化并且用简单的命令实现部署Rails应用。 + +你运行的docker命令都是实际上都是在boot2docker虚拟机上运行的。所以当你执行像`docker push some_repo`这样的命令时,是boot2docker虚拟机在与registry交互,而不是我们自己的机器。 + +接下来是一个非常重要的点:为了将Docker映像推送到远端的私有才哭,SSH管道需要在boot2docker虚拟机上配置好。 + +由许多种方法实现它。我给你展示最简短的一种(可能不是最容易理解的,但是能够帮助你实现自动化) + +First of all though we need to sort one last thing with SSH. +(不太会翻译) + +### Setting up SSH ### + +我们添加boot2docker SSH key到远端服务器已知的hosts里面。我们可以使用ssh-copy-id工具,通过下面的命令就可以安装上它了: + + brew install ssh-copy-id + +然后运行: + + ssh-copy-id -i /Users/username/.ssh/id_boot2docker root@your-registry.com + +用你ssh key的真实路径代替`/Users/username/.ssh/id_boot2docker`。 + +这样做能够让我们面密码登录SSH。 + +现在我们来测试以下: + + boot2docker ssh "ssh -o 'StrictHostKeyChecking no' -i /Users/michelangelo/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@registry.touchwa.re &" & + +分开阐述: + +- `boot2docker ssh`允许你以参数的形式传递给boot2docker虚拟机一条执行命令; +- 最后面那个`&`表明这条命令将在后台执行; +- `ssh -o 'StrictHostKeyChecking no' -i /Users/michelangelo/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@registry.touchwa.re &`是boot2docker虚拟机实际运行的命令; + -`-o 'StrictHostKeyChecking no'`——不提示安全问题; + - `-i /Users/michelangelo/.ssh/id_boot2docker`指出虚拟机使用哪个SSH key来进行身份验证。(注意这里的key应该是你前面添加到远程仓库的那个) + - 最后我们将打开一条端口5000到本地端口5000的SSH通道。 + +### 从其他服务器上拉取 ### + +你现在将可以通过下面的简单命令将你的映像推送到远端仓库: + + docker push localhost:5000/username/repo_name + +在下一篇文章[9]中,我们将会了解到如何自动化处理这些事务,并且真正地容器化一个Rails应用。请继续收听! +如有错误,请不吝指出。祝你Docker之路顺利! +1. 我假设你使用OS X。 +1. 想要了解搭建docker环境的完整之南,请参阅[http://boot2docker.io/][10]。 +1. 本文写成时选择的是 Image > Applications > Docker 1.4.1 on 14.04。 +1. [https://github.com/docker/docker-registry/][11] +1. 这是一个存根,在下一篇文章里我将会展示给你如何将一个Rails应用绑定进Docker容器中。 + +-------------------------------------------------------------------------------- + +via: http://cocoahunter.com/2015/01/23/docker-2/ + +作者:[Michelangelo Chasseur][a] +译者:[DongShuaike](https://github.com/DongShuaike) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://cocoahunter.com/author/michelangelo/ +[1]:http://cocoahunter.com/2015/01/23/docker-1/ +[2]:http://cocoahunter.com/2015/01/23/docker-3/ +[3]:http://cocoahunter.com/2015/01/23/docker-2/#fn:1 +[4]:http://cocoahunter.com/2015/01/23/docker-2/#fn:2 +[5]:http://aws.amazon.com/ +[6]:https://registry.hub.docker.com/_/registry/ +[7]:http://localhost:5000/v1/_ping +[8]:http://localhost:5000/v1/search +[9]:http://cocoahunter.com/2015/01/23/docker-3/ +[10]:http://boot2docker.io/ +[11]:https://github.com/docker/docker-registry/ From 94df559a044fa86a6162e221dcd1b8ac21919cb9 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Wed, 29 Apr 2015 21:53:42 +0800 Subject: [PATCH 120/154] DongShuaike translating --- ...150128 Docker-3 Automated Docker-based Rails deployments.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md b/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md index f450361a68..9b41996378 100644 --- a/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md +++ b/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md @@ -1,3 +1,4 @@ +[Translating by DongShuaike] Automated Docker-based Rails deployments ================================================================================ ![](http://cocoahunter.com/content/images/2015/01/docker3.jpeg) @@ -250,4 +251,4 @@ via: http://cocoahunter.com/2015/01/23/docker-3/ [7]:http://cocoahunter.com/2015/01/23/docker-3/#fn:1 [8]:http://cocoahunter.com/2015/01/23/docker-3/#fn:2 [9]:http://cocoahunter.com/2015/01/23/docker-2/ -[10]:http://cocoahunter.com/2015/01/23/docker-2/ \ No newline at end of file +[10]:http://cocoahunter.com/2015/01/23/docker-2/ From c9fbf07b4047ecff872ac1754745a812f93014ac Mon Sep 17 00:00:00 2001 From: Mo Date: Wed, 29 Apr 2015 23:34:22 +0800 Subject: [PATCH 121/154] [translated]The history of Android - 14 --- .../14 - The history of Android.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 translated/talk/The history of Android/14 - The history of Android.md diff --git a/translated/talk/The history of Android/14 - The history of Android.md b/translated/talk/The history of Android/14 - The history of Android.md new file mode 100644 index 0000000000..ce808f63da --- /dev/null +++ b/translated/talk/The history of Android/14 - The history of Android.md @@ -0,0 +1,82 @@ +安卓编年史 +================================================================================ +### 语音操作——口袋里的超级电脑 ### + +2010年8月,作为语音搜索应用的一项新功能,“[语音命令][1]”登陆了安卓市场。语音命令允许用户向他们的手机发出语音命令,然后安卓会试着去理解他们并完成任务。像“导航至[地址]”这样的命令会打开谷歌地图并且开始逐向导航至你所陈述的目的地。你还可以仅仅通过语音来发送短信或电子邮件,拨打电话,打开网站,获取方向,或是在地图上查看一个地点。 + +注:youtube视频地址 + + +语音命令是谷歌新应用设计哲学的顶峰。语音命令是那时候最先进的语音控制软件,秘密在于谷歌并不在设备上做任运算。一般来说,语音识别是对CPU的密集任务要求。实际上,许多语音识别程序仍然有“速度与准确性”设置,用户可以选择他们愿意为语音识别算法运行等待的时间——更多的CPU处理意味着更加准确。 + +谷歌的创新在于没有劳烦手机上能力有限的处理器来进行语音识别运算。当说出一个命令时,用户的声音会被打包并通过互联网发送到谷歌云服务器。在那里,谷歌超算中心的超级计算机分析并解释语音,然后发送回手机。这是很长的一段旅程,但互联网最终还是有足够快的速度在一两秒内完成像这样的任务。 + +很多人抛出词语“云计算”来表达“所有东西都被存储在服务器上”,但这才是真正的云计算。谷歌在云端进行这些巨量的运算操作,又因为在这个问题上投入了看似荒唐的CPU资源数目,所以语音识别准确性的唯一限制就是算法本身了。软件不需要由每个用户独立“训练”,因为所有使用语音操作的人无时不刻都在训练它。借助互联网的力量,安卓在你的口袋里放了一部超级电脑,同时相比于已有的解决方案,把语音识别这个工作量从口袋大小的电脑转移到房间大小的电脑上大大提高了准确性。 + +语音识别作为谷歌的项目已经有一段时间了,它的出现都是因为一个800号码。[1-800-GOOG-411][2]是个谷歌从2007年4月起开通的免费电话信息服务。它就像411信息服务一样工作了多年——用户可以拨打这个号码询问电话号码——但是谷歌免费提供这项服务。查询过程中没有人工的干预,411服务由语音识别和文本语音转换引擎驱动。语音命令就是人们教谷歌如何去听之后三年才有实现的可能。 + +语音识别是谷歌长远思考的极佳范例——公司并不怕在一个可能成不了商业产品的项目上投资多年。今天,语音识别驱动的产品遍布谷歌。它被用在谷歌搜索应用的输入,安卓的语音输入,以及Google.com。同时它还是Google Glass和[Android Wear][3]的默认输入界面。 + +谷歌甚至还在输入之外的地方使用语音识别。谷歌的语音识别技术被用在了转述Youtube视频上,它能自动生成字幕供听障用户观看。生成的字幕甚至被谷歌做成了索引,所以你可以搜索某句话在视频的哪里说过。语音是许多产品的未来,并且这项长期计划将谷歌带入了屈指可数的拥有自家语音识别服务的公司行列。大部分其它的语音识别产品,像苹果的Siri和三星设备,被迫使用——并且为其支付了授权费——Nuance的语音识别。 + +在计算机听觉系统设立运行之后,谷歌下一步将把这项策略应用到计算机视觉上。这就是为什么像Google Goggles,Google图像搜索和[Project Tango][4]这样的项目存在的原因。就像GOOG-411的那段日子,这些项目还处在早期阶段。当[谷歌的机器人部门][5]造出了机器人,它会需要看和听,谷歌的计算机视觉和听觉项目会给谷歌一个先机。 + +![Nexus S,第一部三星制造的Nexus手机。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/NS500.png) +Nexus S,第一部三星制造的Nexus手机。 + +### Android 2.3 Gingerbread——第一次UI大变 ### + +Gingerbread(姜饼人)发布于2010年12月,这已是2.2发布整整七个月之后了。尽管如此,等待是值得的,因为安卓2.3整个系统的每个界面几乎都改变了。这是从安卓0.9最初的样式以来第一次重大的更新。2.3开始了一系列持续的改进,试着将安卓从丑陋的小鸭子变成能承载它自己的合适的样子——从美学角度——来对抗iPhone。 + +说到苹果,六个月前,它发布了iPhone 4和iOS 4,新增了多任务处理和Facetime视频聊天。微软同样也终于重返这场游戏。微软在2010年11月发布了Windows Phone 7,也进入了智能手机时代。 + +安卓2.3在界面设计上投入了很多精力,但是由于缺乏方向或设计文档,许多应用仅仅止步于获得了一个新的定制主题而已。一些应用用了更扁平的暗色主题,一些用了充满渐变,活泼的暗色主题,其他应用则是高对比度的白色和绿色组合。尽管2.3并没有做到风格统一,Gingerbread还是完成了让系统几乎每个部分变得更现代化的任务。这同样是件好事,因为下一个手机版安卓要在将近一年后才到来。 + +Gingerbread的首发设备是Nexus S,谷歌的第二部旗舰设备,并且是第一部由三星生产的Nexus设备。尽管今天我们已经习惯了每年都有更新型号的CPU,那时候可不是这个样子。Nexus S有个1GHz Cortex A8处理器,和Nexus One是一样的。GPU从速度来说略微有所变快。Nexus S稍微比Nexus One大一点,拥有800×480分辨率的AMOLED显示屏。 + +从参数上来说,Nexus S看起来只是个平淡无奇的升级,但他确实开了安卓的许多先河。Nexus S是谷歌第一部没有MicroSD卡槽的旗舰,板载16GB存储。Nexus One只有512MB存储空间,但它有MicroSD卡槽。移除SD卡槽为用户简化了存储管理——现在只有一个存储地点了——但是影响了高级用户的扩展能力。它是谷歌第一部带有NFC的手机,手机背面的一个特殊芯片能够在和其他NFC芯片接触时传输数据。Nexus S暂时只能读取NFC标签,而不能发送数据。 + +托Gingerbread中一些升级的福,Nexus S是第一部不带有硬件十字方向键或轨迹球安卓手机之一。Nexus S缩减到只有电源,音量以及四个导航键。Nexus S同时还是如今[疯狂的曲面手机][6]的先驱,因为三星给Nexus S配备了一块略微有些弯曲的玻璃。 + +![Gingerbread更改了状态栏和壁纸,并且添加了许多新图标。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/appdrawershop.png) +Gingerbread更改了状态栏和壁纸,并且添加了许多新图标。 +Ron Amadeo供图 + +升级过的“Nexus”动态壁纸作为Nexus S的独占发布。这个壁纸基本上和Nexus One的一样,带有带动画轨迹的光点。在Nexus S上,去除了方阵设计,取而代之的是波浪形的蓝/灰色背景。底部dock有了直角和彩色图标。 + +![新通知面板和菜单。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/32.png) +新通知面板和菜单。 +Ron Amadeo供图 + +状态栏自0.9的首次登场以来终于得到了重制。状态栏从白色渐变变成纯黑,所有图标重绘成了灰色和绿色。所有东西看起来都更加清爽和现代,这要感谢锐角图标设计和高分辨率。最奇怪的决定可能是从状态栏时钟移除了时间段显示以及信号强度那令人疑惑的灰色。尽管灰色被用在状态栏的许多图标上,而且上面截图有四格灰色信号,安卓实际上指示的是没有信号。绿色格表示信号强度,灰色格指示的是“空”信号格。 + +Gingerbread的状态栏图标同时还作为网络连接的状态指示。如果你的设备连接到了谷歌的服务器,图标会变绿,如果没有谷歌的连接,图标会是白色的。这让你可以在外出时轻松了解你的网络连接状态。 + +通知面板的设计从安卓1.5的设计改进而来。我们看到UI部分再次从浅色主题变为暗色主题,有个深灰色顶部,黑色背景以及在灰色底色上的黑色文本。 + +菜单颜色同样变深了,背景从白色变成了带点透明的黑色。菜单图标和背景的对比并没有它应该有的那么强烈,因为灰色图标的颜色和它们在白色背景上的时候是一样的。要求改变颜色意味着每个开发者都得制作新的图标,所以谷歌在黑色背景上使用了先前就有的灰色。这是系统级别的改变,所以这个新菜单会出现在每个应用中。 + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron是Ars Technica的评论编缉,专注于安卓系统和谷歌产品。他总是在追寻新鲜事物,还喜欢拆解事物看看它们到底是怎么运作的。 + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/14/ + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/gadgets/2010/08/google-beefs-up-voice-search-mobile-sync/ +[2]:http://arstechnica.com/business/2007/04/google-rolls-out-free-411-service/ +[3]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ +[4]:http://arstechnica.com/gadgets/2014/02/googles-project-tango-is-a-smartphone-with-kinect-style-computer-vision/ +[5]:http://arstechnica.com/gadgets/2013/12/google-robots-former-android-chief-will-lead-google-robotics-division/ +[6]:http://arstechnica.com/gadgets/2013/12/lg-g-flex-review-form-over-even-basic-function/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo From 359cf39c069a5c40b9cf4cc38aa35f9544d963a0 Mon Sep 17 00:00:00 2001 From: chenjt Date: Thu, 30 Apr 2015 08:43:08 +0800 Subject: [PATCH 122/154] [translated]How to secure SSH login with one-time passwords on Linux --- ... login with one-time passwords on Linux.md | 181 ------------------ ... login with one-time passwords on Linux.md | 178 +++++++++++++++++ 2 files changed, 178 insertions(+), 181 deletions(-) delete mode 100644 sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md create mode 100644 translated/tech/20150330 How to secure SSH login with one-time passwords on Linux.md diff --git a/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md b/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md deleted file mode 100644 index 56888f3342..0000000000 --- a/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md +++ /dev/null @@ -1,181 +0,0 @@ -[bazz222222222] -How to secure SSH login with one-time passwords on Linux -================================================================================ -As someone says, security is a not a product, but a process. While SSH protocol itself is cryptographically secure by design, someone can wreak havoc on your SSH service if it is not administered properly, be it weak passwords, compromised keys or outdated SSH client. - -As far as SSH authentication is concerned, [public key authentication][1] is in general considered more secure than password authentication. However, key authentication is actually not desirable or even less secure if you are logging in from a public or shared computer, where things like stealth keylogger or memory scraper can always a possibility. If you cannot trust the local computer, it is better to use something else. This is when "one-time passwords" come in handy. As the name implies, each one-time password is for single-use only. Such disposable passwords can be safely used in untrusted environments as they cannot be re-used even when they are stolen. - -One way to generate disposable passwords is [Google Authenticator][2]. In this tutorial, I am going to demonstrate another way to create one-time passwords for SSH login: [OTPW][3], a one-time password login package. Unlike Google Authenticator, you do not rely on any third party for one-time password generation and verification. - -### What is OTPW? ### - -OTPW consists of one-time password generator and PAM-integrated verification routines. In OTPW, one-time passwords are generated apriori with the generator, and carried by a user securely (e.g., printed in a paper sheet). Cryptographic hash of the generated passwords are then stored in the SSH server host. When a user logs in with a one-time password, OTPW's PAM module verifies the password, and invalidates it to prevent re-use. - -### Step One: Install and Configure OTPW on Linux ### - -#### Debian, Ubuntu or Linux Mint #### - -Install OTPW packages with apt-get. - - $ sudo apt-get install libpam-otpw otpw-bin - -Open a PAM configuration file for SSH (/etc/pam.d/sshd) with a text editor, and comment out the following line (to disable password authentication). - - #@include common-auth - -and add the following two lines (to enable one-time password authentication): - - auth required pam_otpw.so - session optional pam_otpw.so - -![](https://farm8.staticflickr.com/7599/16775121360_d1f93feefa_b.jpg) - -#### Fedora or CentOS/RHEL #### - -OTPW is not available as a prebuilt package on Red Hat based systems. So let's install OTPW by building it from the source. - -First, install prerequites: - - $ sudo yum git gcc pam-devel - $ git clone https://www.cl.cam.ac.uk/~mgk25/git/otpw - $ cd otpw - -Open Makefile with a text editor, and edit a line that starts with "PAMLIB=" as follows. - -On 64-bit system: - - PAMLIB=/usr/lib64/security - -On 32-bit system: - - PAMLIB=/usr/lib/security - -Compile and install it. Note that installation will automatically restart an SSH server. So be ready to be disconnected if you are on an SSH connection. - - $ make - $ sudo make install - -Now you need to update SELinux policy since /usr/sbin/sshd tries to write to user's home directory, which is not allowed by default SELinux policy. The following commands will do. If you are not using SELinux, skip this step. - - $ sudo grep sshd /var/log/audit/audit.log | audit2allow -M mypol - $ sudo semodule -i mypol.pp - -Next, open a PAM configuration file for SSH (/etc/pam.d/sshd) with a text editor, and comment out the following line (to disable password authentication). - - #auth substack password-auth - -and add the following two lines (to enable one-time password authentication): - - auth required pam_otpw.so - session optional pam_otpw.so - -#### Step Two: Configure SSH Server for One-time Passwords #### - -The next step is to configure an SSH server to accept one-time passwords. - -Open /etc/ssh/sshd_config with a text editor, and set the following three parameters. Make sure that you do not add these lines more than once, because that will cause an SSH server to fail. - - UsePrivilegeSeparation yes - ChallengeResponseAuthentication yes - UsePAM yes - -You also need to disable default password authentication. Optionally, enable public key authentication, so that you can fall back to key-based authentication in case you do not have one-time passwords. - - PubkeyAuthentication yes - PasswordAuthentication no - -Now restart SSH server. - -Debian, Ubuntu or Linux Mint: - - $ sudo service ssh restart - -Fedora or CentOS/RHEL 7: - - $ sudo systemctl restart sshd - -#### Step Three: Generate One-time Passwords with OTPW #### - -As mentioned earlier, you need to create one-time passwords beforehand, and have them stored on the remote SSH server host. For this, run otpw-gen tool as the user you will be logging in as. - - $ cd ~ - $ otpw-gen > temporary_password.txt - -![](https://farm9.staticflickr.com/8751/16961258882_c49cfe03fb_b.jpg) - -It will ask you to set a prefix password. When you later log in, you need to type this prefix password AND one-time password. Essentially the prefix password is another layer of protection. Even if the password sheet falls into the wrong hands, the prefix password forces them to brute-force. - -Once the prefix password is set, the command will generate 280 one-time passwords, and store them in the output text file (e.g., temporary_password.txt). Each password (length of 8 characters by default) is preceded by a three-digit index number. You are supposed to print the file in a sheet and carry it with you. - -![](https://farm8.staticflickr.com/7281/16962594055_c2696d5ae1_b.jpg) - -You will also see ~/.otpw file created, where cryptographic hashs of these passwords are stored. The first three digits in each line indicate the index number of the password that will be used for SSH login. - - $ more ~/.otpw - ----------- - - OTPW1 - 280 3 12 8 - 191ai+:ENwmMqwn - 218tYRZc%PIY27a - 241ve8ns%NsHFmf - 055W4/YCauQJkr: - 102ZnJ4VWLFrk5N - 2273Xww55hteJ8Y - 1509d4b5=A64jBT - 168FWBXY%ztm9j% - 000rWUSdBYr%8UE - 037NvyryzcI+YRX - 122rEwA3GXvOk=z - -### Test One-time Passwords for SSH Login ### - -Now let's login to an SSH server in a usual way: - - $ ssh user@remote_host - -If OTPW is successfully set up, you will see a slightly different password prompt: - - Password 191: - -Now open up your password sheet, and look for index number "191" in the sheet. - - 023 kBvp tq/G 079 jKEw /HRM 135 oW/c /UeB 191 fOO+ PeiD 247 vAnZ EgUt - -According to sheet above, the one-time password for number "191" is "fOO+PeiD". You need to prepend your prefix password to it. For example, if your prefix password is "000", the actual one-time password you need to type is "000fOO+PeiD". - -Once you successfully log in, the password used is automatically invalidated. If you check ~/.otpw, you will notice that the first line is replaced with "---------------", meaning that password "191" has been voided. - - OTPW1 - 280 3 12 8 - --------------- - 218tYRZc%PIY27a - 241ve8ns%NsHFmf - 055W4/YCauQJkr: - 102ZnJ4VWLFrk5N - 2273Xww55hteJ8Y - 1509d4b5=A64jBT - 168FWBXY%ztm9j% - 000rWUSdBYr%8UE - 037NvyryzcI+YRX - 122rEwA3GXvOk=z - -### Conclusion ### - -In this tutorial, I demonstrated how to set up one-time password login for SSH using OTPW package. You may realized that a print sheet can be considered a less fancy version of security token in two-factor authentication. Yet, it is simpler and you do not rely on any third-party for its implementation. Whatever mechanism you are using to create disposable passwords, they can be helpful when you need to log in to an SSH server from an untrusted public computer. Feel free to share your experience or opinion on this topic. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/secure-ssh-login-one-time-passwords-linux.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://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.cl.cam.ac.uk/~mgk25/otpw.html diff --git a/translated/tech/20150330 How to secure SSH login with one-time passwords on Linux.md b/translated/tech/20150330 How to secure SSH login with one-time passwords on Linux.md new file mode 100644 index 0000000000..f3668f14f0 --- /dev/null +++ b/translated/tech/20150330 How to secure SSH login with one-time passwords on Linux.md @@ -0,0 +1,178 @@ +使用 SSH 和一次性密码安全登录 Linux +================================================================================ +有人说,安全不是一个产品,而是一个过程(LCTT 注:安全公司 McAfee 认为,安全风险管理是一个方法论,而不是安全产品的堆叠)。虽然 SSH 协议被设计成使用加密技术来确保安全,但如果使用不当,别人还是能够破坏你的系统:比如弱密码、密钥泄露、使用的 SSH 客户端过时等,都能引发安全问题。 + +在考虑 SSH 认证方案时,大家普遍认为[公钥认证][1]比密码认证更安全。然而,公钥认证技术并不是为公共环境设置的,如果你在一台公用电脑上使用公钥认证登录 SSH 服务器,你的服务器已经毫无安全可言了,公用的电脑可能会记录你的公钥,或从你的内存中读取公钥。如果你不信任本地电脑,那你最好还是使用其他方式登录服务器。现在就是“一次性密码”派上用场的时候了,就像名字所示,一次性密码只能被使用一次。这种一次性密码非常合适在不安全的环境下发挥作用,就算它被窃取,也无法再次使用。 + +有个一次性密码方案叫[谷歌认证][2],但在本文中,我要介绍的是另一种 SSH 登录方案:[OTPW][3],它是个一次性密码登录的软件包。不像谷歌认证,OTPW 不需要依赖任何第三方库。 + +### OTPW 是什么 ### + +OTPW 由一次性密码生成器和 PAM 认证规则组成。在 OTPW 中一次性密码由生成器事先生成,然后由用户以某种安全的方式获得(比如打印到纸上)。另一方面,这些密码会通过 Hash 加密保存在 SSH 服务器端。当用户使用一次性密码登录系统时,OTPW 的 PAM 模块认证这些密码,并且保证它们不能再次使用。 + +### 步骤1:OTPW 的安装和配置 ### + +#### 在 Debian, Ubuntu 或 Linux Mint 发行版上 #### + +使用 apt-get 安装: + + $ sudo apt-get install libpam-otpw otpw-bin + +打开针对 SSH 服务的 PAM 配置文件(/etc/pam.d/sshd),注释掉下面这行(目的是禁用 PAM 的密码认证功能): + + #@include common-auth + +添加下面两行(用于打开一次性密码认证功能): + + auth required pam_otpw.so + session optional pam_otpw.so + +![](https://farm8.staticflickr.com/7599/16775121360_d1f93feefa_b.jpg) + +#### 在 Fedora 或 CentOS/RHEL 发行版上 #### + +在基于 RedHat 的发行版中没有编译好的 OTPW,所以我们需要使用源代码来安装它。 + +首先,安装编译环境: + + $ sudo yum git gcc pam-devel + $ git clone https://www.cl.cam.ac.uk/~mgk25/git/otpw + $ cd otpw + +打开 Makefile 文件,编辑以“PAMLIB=”开头的那行配置: + +64 位系统: + + PAMLIB=/usr/lib64/security + +32 位系统: + + PAMLIB=/usr/lib/security + +编译安装。需要注意的是安装过程会把 SSH 服务重启一下,所以如果你是使用 SSH 连接到服务器,做好被断开连接的准备吧。 + + $ make + $ sudo make install + +现在你需要更新 SELinux 策略,因为 /usr/sbin/sshd 会往你的 home 目录写数据,而 SELinux 默认是不允许这么做的。如果你使用了 SELinux 服务(LCTT 注:使用 getenforce 命令查看结果,如果是 enforcing,就是打开了 SELinux 服务),如果没有使用 SELinux 服务,请跳过这一步。 + + $ sudo grep sshd /var/log/audit/audit.log | audit2allow -M mypol + $ sudo semodule -i mypol.pp + +接下来打开 PAM 配置文件(/etc/pam.d/sshd),注释下面这行(为了禁用密码认证): + + #auth substack password-auth + +添加下面两行(用于打开一次性密码认证功能): + + auth required pam_otpw.so + session optional pam_otpw.so + +#### 步骤2:配置 SSH 服务器,使用一次性密码 #### + +打开 /etc/ssh/sshd_config 文件,设置下面三个参数。你要确保下面的参数不会重复存在,否则 SSH 服务器可能会出现异常。 + + UsePrivilegeSeparation yes + ChallengeResponseAuthentication yes + UsePAM yes + +你还需要禁用默认的密码认证功能。另外可以选择开启公钥认证功能,那样的话你就可以在没有一次性密码的时候使用公钥进行认证。 + + PubkeyAuthentication yes + PasswordAuthentication no + +重启 SSH 服务器。 + +Debian, Ubuntu 或 Linux Mint 发行版: + + $ sudo service ssh restart + +Fedora 或 CentOS/RHEL 7 发行版: + + $ sudo systemctl restart sshd + +#### 步骤3:使用 OTPW 产生一次性密码 #### + +之前提到过,你需要事先创建一次性密码,并保存起来。使用 otpw-gen 命令创建密码: + + $ cd ~ + $ otpw-gen > temporary_password.txt + +![](https://farm9.staticflickr.com/8751/16961258882_c49cfe03fb_b.jpg) + +这个命令会让你输入密码前缀,当你以后登录的时候,你需要同时输入这个前缀以及一次性密码。密码前缀是另外一层保护,就算你的一次性密码表被泄漏,别人也无法通过暴力破解你的 SSH 密码。 + +设置好密码前缀后,这个命令会产生 280 个一次性密码,并将它们保存在一个文本文件中(如 temporary_password.txt)。每个密码(默认是 8 个字符)由一个 3 位十进制数索引。你需要将这个密码表打印出来,并随身携带。 + +![](https://farm8.staticflickr.com/7281/16962594055_c2696d5ae1_b.jpg) + +查看 ./.otpw 文件,它存放了一次性密码的 HASH 值。头 3 位十进制数与你随身携带的密码表的索引一一对应,在你登录 SSH 服务器的时候会被用到。 + + $ more ~/.otpw + +---------- + + OTPW1 + 280 3 12 8 + 191ai+:ENwmMqwn + 218tYRZc%PIY27a + 241ve8ns%NsHFmf + 055W4/YCauQJkr: + 102ZnJ4VWLFrk5N + 2273Xww55hteJ8Y + 1509d4b5=A64jBT + 168FWBXY%ztm9j% + 000rWUSdBYr%8UE + 037NvyryzcI+YRX + 122rEwA3GXvOk=z + +### 测试一次性密码登录 SSH 服务器 ### + +使用普通的方式登录 SSH 服务器: + + $ ssh user@remote_host + +如果 OTPW 成功运行,你会看到一点与平时登录不同的地方: + + Password 191: + +现在打开你的密码表,找到索引号为 191 的密码。 + + 023 kBvp tq/G 079 jKEw /HRM 135 oW/c /UeB 191 fOO+ PeiD 247 vAnZ EgUt + +从上表可知,191 号密码是“fOO+PeiD”。你需要加上密码前缀,比如你设置的前缀是“000”,则你实际需要输入的密码是“000fOO+PeiD”。 + +成功登录后,你这次输入的密码自动失效。查看 ~/.otpw 文件,你会发现第一行变成“---------------”,这表示 191 号密码失效了。 + + OTPW1 + 280 3 12 8 + --------------- + 218tYRZc%PIY27a + 241ve8ns%NsHFmf + 055W4/YCauQJkr: + 102ZnJ4VWLFrk5N + 2273Xww55hteJ8Y + 1509d4b5=A64jBT + 168FWBXY%ztm9j% + 000rWUSdBYr%8UE + 037NvyryzcI+YRX + 122rEwA3GXvOk=z + +### 总结 ### + +在这个教程中,我介绍了如何使用 OTPW 工具来设置一次性登录密码。你也许意识到了在这种两个因子的认证方式中,打印一张密码表让人感觉好 low,但是这种方式是最简单的,并且不用依赖任何第三方软件。无论你用哪种方式创建一次性密码,在你需要在一个不被信任的环境登录 SSH 服务器的时候,它们都很有用。你可以就这个主题来分享你的经验和观点。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/secure-ssh-login-one-time-passwords-linux.html + +作者:[Dan Nanni][a] +译者:[bazz2](https://github.com/bazz2) +校对:[校对者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.cl.cam.ac.uk/~mgk25/otpw.html From bd972dd5044ecd6bb0d2a7e20569379a424b280f Mon Sep 17 00:00:00 2001 From: Vic___ Date: Thu, 30 Apr 2015 14:19:41 +0800 Subject: [PATCH 123/154] translated --- ... ixgbe driver on CentOS, RHEL or Fedora.md | 51 ++++++++++--------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md b/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md index ac871512e1..e5f8f6bcc7 100644 --- a/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md +++ b/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md @@ -1,61 +1,62 @@ - Vic020 +Linux 有问必答 -- 如何在红帽系linux中编译Ixgbe -Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora ================================================================================ -> **Question**: I want to build and install the latest ixgbe 10G NIC driver. How can I compile ixgbe driver on CentOS, Fedora or RHEL? +> **提问**:我想要安装最新版的ixgbe 10G网卡驱动。在CentOS, Fedora 或 RHEL中,我应该如何编译ixgbe驱动? -To use Intel's PCI Express 10G NICs (e.g., 82598, 82599, x540) on your Linux system, you need to install ixgbe driver. While modern Linux distributions come with ixgbe driver pre-installed as a loadable module, the pre-built ixgbe driver is not fully customizable with limited parameters. If you want to enable and customize all available features of the 10G NICs (e.g., RSS, multi-queue, virtual functions, hardware offload), you will need to build the driver from the source. -Here is how to compile ixgbe driver from the source on Red Hat based platforms (e.g., CentOS, RHEL or Fedora). For Debian based systems, refer to [this guideline][1] instead. +想要在linux使用Intel的PCI Express 10G网卡(例如,82598,82599,x540),需要安装Ixgbe驱动。如今的Linux发行版都会欲安装ixgbe作为可加载模块,但是预安装的ixgbe驱动不是完整功能版。如果想要开启和定制所有10G网卡(如,RSS,多)的功能,需要源码编译安装。 -### Step One: Install Prerequisites ### +本文基于红帽系平台(如,CentOS,RHEL或Fedora)。Debian系系统,请看[这篇文章][1] -First, set up necessary developmen environment and install matching kernel headers. + +### 第一步: 安装依赖 ### + +首先,安装必要的开发环境和安装匹配的内核头 $ sudo yum install gcc make $ sudo yum install kernel-devel -### Step Two: Compile Ixgbe Driver ### +### 第二步: 编译Ixgbe ### -Download the latest ixgbe source code from the [official site][2]. +从[官方页面][2]下载最新Ixgbe源码 $ wget http://downloads.sourceforge.net/project/e1000/ixgbe%20stable/3.23.2/ixgbe-3.23.2.tar.gz -Be sure to check supported kernel versions. For example, the ixgbe driver 3.23.2 supports Linux kernel versions 2.6.18 up to 3.18.1. +确保检查支持内核版本。例如,Ixgbe3.23.2版本支持Linux内核版本2.6.18以上到3.18.1. -Extract the tarball and compile it. +提取压缩包并编译 $ tar -xvf ixgbe-3.23.2.tar.gz $ cd ixgbe-3.23.2/src $ make -If successful, the compiled driver (ixgbe.ko) will be found in the current directory. +如果成功,编译完成的驱动(ixgbe.ko)可以在当前目录找到。 -You can check the information of the compiled driver by running: +可以运行这个命令来查看编译信息: $ modinfo ./ixgbe.ko -The output will show a list of available parameters of the ixgbe driver. +将会输出一个Ixgbe驱动的可用参数列表 ![](https://farm9.staticflickr.com/8789/16429483653_b9b6e6cd7f_c.jpg) -### Step Three: Load Ixgbe Driver ### +### 第三步: 加载 Ixgbe 驱动 ### -Now you are ready to load the compiled ixgbe driver. +这步准备加载已经编译好的驱动。 -If the stock ixgbe driver is already loaded on your system, you need to unload it first. Otherwise, you won't be able to load the new ixgbe driver. +如果系统已经加载了Ixgbe驱动,首先需要卸载掉老版本。否者,新版本不能够加载。 $ sudo rmmod ixgbe.ko -Then insert the compiled driver in the kernel by running: +然后插入编译完成的驱动到内核中: $ sudo insmod ./ixgbe.ko -Optionally, you can supply any parameters while loading the driver. +同时,你可以设置启动参数 $ sudo insmod ./ixgbe.ko FdirPballoc=3 RSS=16 -To verify that the driver is loaded successfully, check the output of dmesg command. +验证驱动是否加载成功,使用dmesg命令,查看其输出 $ dmesg @@ -167,17 +168,17 @@ To verify that the driver is loaded successfully, check the output of dmesg comm eth3: no IPv6 routers present eth4: no IPv6 routers present -### Step Four: Install Ixgbe Driver ### +### 第四步: 安装Ixgbe驱动 ### -Once you have checked that the driver is loaded successfully, go ahead and install the driver on your system. +当确认驱动已经加载后,就可以安装驱动到系统中了 $ sudo make install -ixgbe.ko will be installed in the following location. +ixgbe.ko将会安装在下列目录 /lib/modules//kernel/drivers/net/ixgbe -At this point, the compiled driver will be loaded automatically upon boot, or you can load it by running: +此时,编译完蛋程序将在启动时自动加载,也可以通过运行命令加载它: $ sudo modprobe ixgbe @@ -188,7 +189,7 @@ At this point, the compiled driver will be loaded automatically upon boot, or yo via: http://ask.xmodulo.com/compile-ixgbe-driver-centos-rhel-fedora.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[Vic020](http://vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From f8252967610c0e7cc8d7b64356a3abc63bb3f5d6 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Thu, 30 Apr 2015 14:19:54 +0800 Subject: [PATCH 124/154] translating wi-cuckoo --- ... Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md b/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md index abdca76f92..c3b1a737ce 100644 --- a/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md +++ b/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md @@ -1,3 +1,4 @@ +translating wi-cuckoo Docker 1.6 Released - How to Upgrade on Fedora / CentOS ================================================================================ Docker, a popular open source container platform for packaging applications, has a new release 1.6 with lot of new features in it. This version has updates to Docker Registry, Engine, Swarm, Compose and Machine. The release aims at improvements in performance, developer and system administrator experiences. Let us take a quick look at the new features available. @@ -164,4 +165,4 @@ via: http://linoxide.com/linux-how-to/docker-1-6-features-upgrade-fedora-centos/ [17]: [18]: [19]: -[20]: \ No newline at end of file +[20]: From 1b7a1a1f7c48ee399a2c8019a3680f85cec5c837 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Thu, 30 Apr 2015 14:20:22 +0800 Subject: [PATCH 125/154] Moved --- ...wers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md (100%) diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md b/translated/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md similarity index 100% rename from sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md rename to translated/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md From 49eef7944d1ed9e4175d040922403b217a3ed705 Mon Sep 17 00:00:00 2001 From: chenjt Date: Thu, 30 Apr 2015 15:07:19 +0800 Subject: [PATCH 126/154] [translating by bazz2]How to set up networking between Docker containers --- ...50323 How to set up networking between Docker containers.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150323 How to set up networking between Docker containers.md b/sources/tech/20150323 How to set up networking between Docker containers.md index 7f950494be..dca3457c4e 100644 --- a/sources/tech/20150323 How to set up networking between Docker containers.md +++ b/sources/tech/20150323 How to set up networking between Docker containers.md @@ -1,3 +1,4 @@ +[bazz222] How to set up networking between Docker containers ================================================================================ As you may be aware, Docker container technology has emerged as a viable lightweight alternative to full-blown virtualization. There are a growing number of use cases of Docker that the industry adopted in different contexts, for example, enabling rapid build environment, simplifying configuration of your infrastructure, isolating applications in multi-tenant environment, and so on. While you can certainly deploy an application sandbox in a standalone Docker container, many real-world use cases of Docker in production environments may involve deploying a complex multi-tier application in an ensemble of multiple containers, where each container plays a specific role (e.g., load balancer, LAMP stack, database, UI). @@ -157,4 +158,4 @@ via: http://xmodulo.com/networking-between-docker-containers.html [2]:http://xmodulo.com/recommend/dockerbook [3]:http://xmodulo.com/manage-linux-containers-docker-ubuntu.html [4]:http://xmodulo.com/docker-containers-centos-fedora.html -[5]:http://zettio.github.io/weave/features.html \ No newline at end of file +[5]:http://zettio.github.io/weave/features.html From 4a14483874552aac8b9b08a1b2f59c758a3720b2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 1 May 2015 10:13:45 +0800 Subject: [PATCH 127/154] translating --- ... Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md b/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md index 11882847a7..8626cabdaa 100644 --- a/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md +++ b/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md @@ -1,3 +1,5 @@ +translating---geekpi + How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector ================================================================================ Apache is the most popular available web server. A web server is used basically to accept requests from clients and send responses to those requests. It gets an URL, translates it to a filename (for static requests), and sends that file back over the internet from the local disk, or it translates it to a program name, executes it, and then sends the output of that program back over the internet to the requesting party. If the web server was not able to process and complete the request, it instead returns an error message. @@ -135,4 +137,4 @@ via: http://www.unixmen.com/integrate-apache2-tomcat-7-using-mod_jk-connector/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.unixmen.com/author/anis/ \ No newline at end of file +[a]:http://www.unixmen.com/author/anis/ From d940662076a78528f84e4e8a1c1df8e49979b70c Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Fri, 1 May 2015 10:28:30 +0800 Subject: [PATCH 128/154] Translated by DongShuaike --- ...utomated Docker-based Rails deployments.md | 254 ------------------ ...utomated Docker-based Rails deployments.md | 254 ++++++++++++++++++ 2 files changed, 254 insertions(+), 254 deletions(-) delete mode 100644 sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md create mode 100644 translated/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md diff --git a/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md b/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md deleted file mode 100644 index 9b41996378..0000000000 --- a/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md +++ /dev/null @@ -1,254 +0,0 @@ -[Translating by DongShuaike] -Automated Docker-based Rails deployments -================================================================================ -![](http://cocoahunter.com/content/images/2015/01/docker3.jpeg) - -[TL;DR] This is the third post in a series of 3 on how my company moved its infrastructure from PaaS to Docker based deployment. - -- [First part][1]: where I talk about the process we went thru before approaching Docker; -- [Second part][2]: where I explain how setting up a private registry for in house secure deployments. - ----------- - -In this final part we will see how to automate the whole deployment process with a real world (though very basic) example. - -### Basic Rails app ### - -Let's dive into the topic right away and bootstrap a basic Rails app. For the purpose of this demonstration I'm going to use Ruby 2.2.0 and Rails 4.1.1 - -From the terminal run: - - $ rvm use 2.2.0 - $ rails new && cd docker-test - -Let's create a basic controller: - - $ rails g controller welcome index - -...and edit `routes.rb` so that the root of the project will point to our newly created welcome#index method: - - root 'welcome#index' - -Running `rails s` from the terminal and browsing to [http://localhost:3000][3] should bring you to the index page. We're not going to make anything fancier to the app, it's just a basic example to prove that when we'll build and deploy the container everything is working. - -### Setup the webserver ### - -We are going to use Unicorn as our webserver. Add `gem 'unicorn'` and `gem 'foreman'` to the Gemfile and bundle it up (run `bundle install` from the command line). - -Unicorn needs to be configured when the Rails app launches, so let's put a **unicorn.rb** file inside the **config** directory. [Here is an example][4] of a Unicorn configuration file. You can just copy & paste the content of the Gist. - -Let's also add a Procfile with the following content inside the root of the project so that we will be able to start the app with foreman: - - web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb - -If you now try to run the app with **foreman start** everything should work as expected and you should have a running app on [http://localhost:5000][5] - -### Building a Docker image ### - -Now let's build the image inside which our app is going to live. In the root of our Rails project, create a file named **Dockerfile** and paste in it the following: - - # Base image with ruby 2.2.0 - FROM ruby:2.2.0 - - # Install required libraries and dependencies - RUN apt-get update && apt-get install -qy nodejs postgresql-client sqlite3 --no-install-recommends && rm -rf /var/lib/apt/lists/* - - # Set Rails version - ENV RAILS_VERSION 4.1.1 - - # Install Rails - RUN gem install rails --version "$RAILS_VERSION" - - # Create directory from where the code will run - RUN mkdir -p /usr/src/app - WORKDIR /usr/src/app - - # Make webserver reachable to the outside world - EXPOSE 3000 - - # Set ENV variables - ENV PORT=3000 - - # Start the web app - CMD ["foreman","start"] - - # Install the necessary gems - ADD Gemfile /usr/src/app/Gemfile - ADD Gemfile.lock /usr/src/app/Gemfile.lock - RUN bundle install --without development test - - # Add rails project (from same dir as Dockerfile) to project directory - ADD ./ /usr/src/app - - # Run rake tasks - RUN RAILS_ENV=production rake db:create db:migrate - -Using the provided Dockerfile, let's try and build an image with the following command[1][7]: - - $ docker build -t localhost:5000/your_username/docker-test . - -And again, if everything worked out correctly, the last line of the long log output should read something like: - - Successfully built 82e48769506c - $ docker images - REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE - localhost:5000/your_username/docker-test latest 82e48769506c About a minute ago 884.2 MB - -Let's try and run the container! - - $ docker run -d -p 3000:3000 --name docker-test localhost:5000/your_username/docker-test - -You should be able to reach your Rails app running inside the Docker container at port 3000 of your boot2docker VM[2][8] (in my case [http://192.168.59.103:3000][6]). - -### Automating with shell scripts ### - -Since you should already know from the previous post3 how to push your newly created image to a private regisitry and deploy it on a server, let's skip this part and go straight to automating the process. - -We are going to define 3 shell scripts and finally tie it all together with rake. - -### Clean ### - -Every time we build our image and deploy we are better off always clean everything. That means the following: - -- stop (if running) and restart boot2docker; -- remove orphaned Docker images (images that are without tags and that are no longer used by your containers). - -Put the following into a **clean.sh** file in the root of your project. - - echo Restarting boot2docker... - boot2docker down - boot2docker up - - echo Exporting Docker variables... - sleep 1 - export DOCKER_HOST=tcp://192.168.59.103:2376 - export DOCKER_CERT_PATH=/Users/user/.boot2docker/certs/boot2docker-vm - export DOCKER_TLS_VERIFY=1 - - sleep 1 - echo Removing orphaned images without tags... - docker images | grep "" | awk '{print $3}' | xargs docker rmi - -Also make sure to make the script executable: - - $ chmod +x clean.sh - -### Build ### - -The build process basically consists in reproducing what we just did before (docker build). Create a **build.sh** script at the root of your project with the following content: - - docker build -t localhost:5000/your_username/docker-test . - -Make the script executable. - -### Deploy ### - -Finally, create a **deploy.sh** script with this content: - - # Open SSH connection from boot2docker to private registry - boot2docker ssh "ssh -o 'StrictHostKeyChecking no' -i /Users/username/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@your-registry.com &" & - - # Wait to make sure the SSH tunnel is open before pushing... - echo Waiting 5 seconds before pushing image. - - echo 5... - sleep 1 - echo 4... - sleep 1 - echo 3... - sleep 1 - echo 2... - sleep 1 - echo 1... - sleep 1 - - # Push image onto remote registry / repo - echo Starting push! - docker push localhost:5000/username/docker-test - -If you don't understand what's going on here, please make sure you've read thoroughfully [part 2][9] of this series of posts. - -Make the script executable. - -### Tying it all together with rake ### - -Having 3 scripts would now require you to run them individually each time you decide to deploy your app: - -1. clean -1. build -1. deploy / push - -That wouldn't be much of an effort, if it weren't for the fact that developers are lazy! And lazy be it, then! - -The final step to wrap things up, is tying the 3 parts together with rake. - -To make things even simpler you can just append a bunch of lines of code to the end of the already present Rakefile in the root of your project. Open the Rakefile file - pun intended :) - and paste the following: - - namespace :docker do - desc "Remove docker container" - task :clean do - sh './clean.sh' - end - - desc "Build Docker image" - task :build => [:clean] do - sh './build.sh' - end - - desc "Deploy Docker image" - task :deploy => [:build] do - sh './deploy.sh' - end - end - -Even if you don't know rake syntax (which you should, because it's pretty awesome!), it's pretty obvious what we are doing. We have declared 3 tasks inside a namespace (docker). - -This will create the following 3 tasks: - -- rake docker:clean -- rake docker:build -- rake docker:deploy - -Deploy is dependent on build, build is dependent on clean. So every time we run from the command line - - $ rake docker:deploy - -All the script will be executed in the required order. - -### Test it ### - -To see if everything is working, you just need to make a small change in the code of your app and run - - $ rake docker:deploy - -and see the magic happening. Once the image has been uploaded (and the first time it could take quite a while), you can ssh into your production server and pull (thru an SSH tunnel) the docker image onto the server and run. It's that easy! - -Well, maybe it takes a while to get accustomed to how everything works, but once it does, it's almost (almost) as easy as deploying with Heroku. - -P.S. As always, please let me have your ideas. I'm not sure this is the best, or the fastest, or the safest way of doing devops with Docker, but it certainly worked out for us. - -- make sure to have **boot2docker** up and running. -- If you don't know your boot2docker VM address, just run `$ boot2docker ip` -- if you don't, you can read it [here][10] - --------------------------------------------------------------------------------- - -via: http://cocoahunter.com/2015/01/23/docker-3/ - -作者:[Michelangelo Chasseur][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://cocoahunter.com/author/michelangelo/ -[1]:http://cocoahunter.com/docker-1 -[2]:http://cocoahunter.com/2015/01/23/docker-2/ -[3]:http://localhost:3000/ -[4]:https://gist.github.com/chasseurmic/0dad4d692ff499761b20 -[5]:http://localhost:5000/ -[6]:http://192.168.59.103:3000/ -[7]:http://cocoahunter.com/2015/01/23/docker-3/#fn:1 -[8]:http://cocoahunter.com/2015/01/23/docker-3/#fn:2 -[9]:http://cocoahunter.com/2015/01/23/docker-2/ -[10]:http://cocoahunter.com/2015/01/23/docker-2/ diff --git a/translated/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md b/translated/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md new file mode 100644 index 0000000000..cd3917dfcf --- /dev/null +++ b/translated/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md @@ -0,0 +1,254 @@ + +自动化部署基于Docker的Rails应用 +================================================================================ +![](http://cocoahunter.com/content/images/2015/01/docker3.jpeg) + +[TL;DR] 这是系列文章的第三篇,讲述了我的公司是如何将基础设施从PaaS移植到Docker上的。 +- [第一部分][1]:谈论了我接触Docker之前的经历; +- [第二部分][2]:一步步搭建一个安全而又私有的registry。 +---------- +在系列文章的最后一篇里,我们将用一个实例来学习如何自动化整个部署过程。 + +### 基本的Rails应用程序### + +现在让我们启动一个基本的Rails应用。为了更好的展示,我使用Ruby 2.2.0和Rails 4.1.1 + +在终端运行: + + $ rvm use 2.2.0 + $ rails new && cd docker-test + +创建一个基础控制器: + + $ rails g controller welcome index + +……然后编辑 `routes.rb` ,以便让工程的根指向我们新创建的welcome#index方法:(这句话理解不太理解) + + root 'welcome#index' + +在终端运行 `rails s` ,然后打开浏览器,登录[http://localhost:3000][3],你会进入到索引界面当中。我们不准备给应用加上多么神奇的东西,这只是一个基础实例,用来验证当我们将要创建并部署容器的时候,一切运行正常。 + +### 安装webserver ### + +我们打算使用Unicorn当做我们的webserver。在Gemfile中添加 `gem 'unicorn'`和 `gem 'foreman'`然后将它bundle起来(运行 `bundle install`命令)。 + +在Rails应用启动的伺候,需要配置Unicorn,所以我们将一个**unicorn.rb**文件放在**config**目录下。[这里有一个Unicorn配置文件的例子][4]你可以直接复制粘贴Gist的内容。 + +Let's also add a Procfile with the following content inside the root of the project so that we will be able to start the app with foreman: +接下来,在工程的根目录下添加一个Procfile,以便可以使用foreman启动应用,内容为下: + + web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb + +现在运行**foreman start**命令启动应用,一切都将正常运行,并且你将能够在[http://localhost:5000][5]上看到一个正在运行的应用。 + +### 创建一个Docker映像 ### + +现在我们创建一个映像来运行我们的应用。在Rails工程的跟目录下,创建一个名为**Dockerfile**的文件,然后粘贴进以下内容: + + # Base image with ruby 2.2.0 + FROM ruby:2.2.0 + + # Install required libraries and dependencies + RUN apt-get update && apt-get install -qy nodejs postgresql-client sqlite3 --no-install-recommends && rm -rf /var/lib/apt/lists/* + + # Set Rails version + ENV RAILS_VERSION 4.1.1 + + # Install Rails + RUN gem install rails --version "$RAILS_VERSION" + + # Create directory from where the code will run + RUN mkdir -p /usr/src/app + WORKDIR /usr/src/app + + # Make webserver reachable to the outside world + EXPOSE 3000 + + # Set ENV variables + ENV PORT=3000 + + # Start the web app + CMD ["foreman","start"] + + # Install the necessary gems + ADD Gemfile /usr/src/app/Gemfile + ADD Gemfile.lock /usr/src/app/Gemfile.lock + RUN bundle install --without development test + + # Add rails project (from same dir as Dockerfile) to project directory + ADD ./ /usr/src/app + + # Run rake tasks + RUN RAILS_ENV=production rake db:create db:migrate + +使用提供的Dockerfile,执行下列命令创建一个映像[1][7]: + + $ docker build -t localhost:5000/your_username/docker-test . + +然后,如果一切正常,长日志输出的最后一行应该类似于: + + Successfully built 82e48769506c + $ docker images + REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE + localhost:5000/your_username/docker-test latest 82e48769506c About a minute ago 884.2 MB + +来运行容器吧! + + $ docker run -d -p 3000:3000 --name docker-test localhost:5000/your_username/docker-test + +You should be able to reach your Rails app running inside the Docker container at port 3000 of your boot2docker VM[2][8] (in my case [http://192.168.59.103:3000][6]). +通过你的boot2docker虚拟机[2][8]的3000号端口(我的是[http://192.168.59.103:3000][6]),你可以观察你的Rails应用。 + +### 使用shell脚本进行自动化部署 ### + +前面的文章(指文章1和文章2)已经告诉了你如何将新创建的映像推送到私有registry中,并将其部署在服务器上,所以我们跳过这一部分直接开始自动化进程。 + +我们将要定义3个shell脚本,然后最后使用rake将它们捆绑在一起。 + +### 清除 ### + +每当我们创建映像的时候, + +- 停止并重启boot2docker; +- 去除Docker孤儿映像(那些没有标签,并且不再被容器所使用的映像们)。 + +在你的工程根目录下的**clean.sh**文件中输入下列命令。 + + echo Restarting boot2docker... + boot2docker down + boot2docker up + + echo Exporting Docker variables... + sleep 1 + export DOCKER_HOST=tcp://192.168.59.103:2376 + export DOCKER_CERT_PATH=/Users/user/.boot2docker/certs/boot2docker-vm + export DOCKER_TLS_VERIFY=1 + + sleep 1 + echo Removing orphaned images without tags... + docker images | grep "" | awk '{print $3}' | xargs docker rmi + +给脚本加上执行权限: + + $ chmod +x clean.sh + +### 创建 ### + +创建的过程基本上和之前我们所做的(docker build)内容相似。在工程的根目录下创建一个**build.sh**脚本,填写如下内容: + + docker build -t localhost:5000/your_username/docker-test . + +给脚本执行权限。 + +### 部署 ### + +最后,创建一个**deploy.sh**脚本,在里面填进如下内容: + + # Open SSH connection from boot2docker to private registry + boot2docker ssh "ssh -o 'StrictHostKeyChecking no' -i /Users/username/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@your-registry.com &" & + + # Wait to make sure the SSH tunnel is open before pushing... + echo Waiting 5 seconds before pushing image. + + echo 5... + sleep 1 + echo 4... + sleep 1 + echo 3... + sleep 1 + echo 2... + sleep 1 + echo 1... + sleep 1 + + # Push image onto remote registry / repo + echo Starting push! + docker push localhost:5000/username/docker-test + +如果你不理解这其中的含义,请先仔细阅读这部分[part 2][9]。 + +给脚本加上执行权限。 + +### 使用rake将以上所有绑定 ### + +现在的情况是,每次你想要部署你的应用时,你都需要单独运行这三个脚本。 + +1. clean +1. build +1. deploy / push + +这一点都不费工夫,可是事实上开发者比你想象的要懒得多!那么咱们就索性再懒一点! + +我们最后再把工作好好整理一番,我们现在要将三个脚本捆绑在一起,通过rake。 + +为了更简单一点,你可以在工程根目录下已经存在的Rakefile中添加几行代码,打开Rakefile文件——pun intended——把下列内容粘贴进去。 + + + namespace :docker do + desc "Remove docker container" + task :clean do + sh './clean.sh' + end + + desc "Build Docker image" + task :build => [:clean] do + sh './build.sh' + end + + desc "Deploy Docker image" + task :deploy => [:build] do + sh './deploy.sh' + end + end + +即使你不清楚rake的语法(其实你真应该去了解一下,这玩意太酷了!),上面的内容也是很显然的吧。我们在一个命名空间(docker)里声明了三个任务。 + +三个任务是: + +- rake docker:clean +- rake docker:build +- rake docker:deploy + +Deploy独立于build,build独立于clean。所以每次我们输入命令运行的时候。 + + $ rake docker:deploy + +所有的脚本都会按照顺序执行。 + +### 测试 ### + +现在我们来看看是否一切正常,你只需要在app的代码里做一个小改动: + + $ rake docker:deploy + +接下来就是见证奇迹的时刻了。一旦映像文件被上传(第一次可能花费较长的时间),你就可以ssh登录产品服务器,并且(通过SSH管道)把docker映像拉取到服务器并运行了。多么简单! + +也许你需要一段时间来习惯,但是一旦成功,它几乎与用Heroku部署一样简单。 + +备注:像往常一样,请让我了解到你的意见。我不敢保证这种方法是最好,最快,或者最安全的Docker开发的方法,但是这东西对我们确实奏效。 + +- 确保**boot2docker**已经启动并在运行当中。 +- 如果你不了解你的boot2docker虚拟地址,输入` $ boot2docker ip`命令查看。 +- 点击[here][10],教你怎样搭建私有的registry。 + +-------------------------------------------------------------------------------- + +via: http://cocoahunter.com/2015/01/23/docker-3/ + +作者:[Michelangelo Chasseur][a] +译者:[DongShuaike](https://github.com/DongShuaike) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://cocoahunter.com/author/michelangelo/ +[1]:http://cocoahunter.com/docker-1 +[2]:http://cocoahunter.com/2015/01/23/docker-2/ +[3]:http://localhost:3000/ +[4]:https://gist.github.com/chasseurmic/0dad4d692ff499761b20 +[5]:http://localhost:5000/ +[6]:http://192.168.59.103:3000/ +[7]:http://cocoahunter.com/2015/01/23/docker-3/#fn:1 +[8]:http://cocoahunter.com/2015/01/23/docker-3/#fn:2 +[9]:http://cocoahunter.com/2015/01/23/docker-2/ +[10]:http://cocoahunter.com/2015/01/23/docker-2/ From edb7d1be45af3f21e3ed26ae39b7a41fe9485663 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Fri, 1 May 2015 10:51:33 +0800 Subject: [PATCH 129/154] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Docker2=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E4=BA=9B=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ocker-2 Setting up a private Docker registry.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md b/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md index 6e4f6e4fba..6d73b53326 100644 --- a/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md +++ b/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md @@ -128,7 +128,7 @@ Docker将会从Docker Hub上拉取所需的文件系统层(fs layers)并启动 {} -这个意味着registry工作正常。你还可以通过登录[http://localhost:5000/v1/search][8]来查看registry内容,回复相似: +这个意味着registry工作正常。你还可以通过登录[http://localhost:5000/v1/search][8]来查看registry内容,内容相似: { "num_results": 2, @@ -147,7 +147,7 @@ Docker将会从Docker Hub上拉取所需的文件系统层(fs layers)并启动 ### 创建一个映像 ### -我们现在创建一个非常简答的Docker映像,来检验我们新弄好的registry。在我们的本机上,用如下内容创建一个Dockerfile[^n]: +我们现在创建一个非常简答的Docker映像,来检验我们新弄好的registry。在我们的本机上,用如下内容创建一个Dockerfile:[^n] # Base image with ruby 2.2.0 @@ -169,7 +169,7 @@ Docker将会从Docker Hub上拉取所需的文件系统层(fs layers)并启动 你运行的docker命令都是实际上都是在boot2docker虚拟机上运行的。所以当你执行像`docker push some_repo`这样的命令时,是boot2docker虚拟机在与registry交互,而不是我们自己的机器。 -接下来是一个非常重要的点:为了将Docker映像推送到远端的私有才哭,SSH管道需要在boot2docker虚拟机上配置好。 +接下来是一个非常重要的点:为了将Docker映像推送到远端的私有仓库,SSH管道需要在boot2docker虚拟机上配置好。 由许多种方法实现它。我给你展示最简短的一种(可能不是最容易理解的,但是能够帮助你实现自动化) @@ -212,10 +212,10 @@ First of all though we need to sort one last thing with SSH. 在下一篇文章[9]中,我们将会了解到如何自动化处理这些事务,并且真正地容器化一个Rails应用。请继续收听! 如有错误,请不吝指出。祝你Docker之路顺利! 1. 我假设你使用OS X。 -1. 想要了解搭建docker环境的完整之南,请参阅[http://boot2docker.io/][10]。 -1. 本文写成时选择的是 Image > Applications > Docker 1.4.1 on 14.04。 -1. [https://github.com/docker/docker-registry/][11] -1. 这是一个存根,在下一篇文章里我将会展示给你如何将一个Rails应用绑定进Docker容器中。 +2. 想要了解搭建docker环境的完整之南,请参阅[http://boot2docker.io/][10]。 +3. 本文写成时选择的是 Image > Applications > Docker 1.4.1 on 14.04。 +4. [https://github.com/docker/docker-registry/][11] +5. 这是一个存根,在下一篇文章里我将会展示给你如何将一个Rails应用绑定进Docker容器中。 -------------------------------------------------------------------------------- From ce65089aadb0eca1f6171464291ad741be8204e9 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 1 May 2015 11:01:09 +0800 Subject: [PATCH 130/154] translated --- ...e2 With Tomcat 7 Using mod_jk Connector.md | 140 ------------------ ...e2 With Tomcat 7 Using mod_jk Connector.md | 138 +++++++++++++++++ 2 files changed, 138 insertions(+), 140 deletions(-) delete mode 100644 sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md create mode 100644 translated/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md diff --git a/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md b/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md deleted file mode 100644 index 8626cabdaa..0000000000 --- a/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md +++ /dev/null @@ -1,140 +0,0 @@ -translating---geekpi - -How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector -================================================================================ -Apache is the most popular available web server. A web server is used basically to accept requests from clients and send responses to those requests. It gets an URL, translates it to a filename (for static requests), and sends that file back over the internet from the local disk, or it translates it to a program name, executes it, and then sends the output of that program back over the internet to the requesting party. If the web server was not able to process and complete the request, it instead returns an error message. - -In this article we will list the features of Apache, and how we can integrate it with Tomcat8 and Tomcat7 using the mod_jk connector. - -### Features of Apache ### - -As we said Apache is the most popular available web server. The reasons behind its popularity are the following features: - -- It is free tool that you can download and install it easily. -- It is open source web server so you can easily see the code, adjust it, optimize it, and fix errors and security holes. New features and modules can be also added. -- It can be used for small websites of one or two pages, or huge websites of hundreds and thousands of pages, serving millions of regular visitors each month. It can serve both static and dynamic content. -- Improved caching modules (mod_cache, mod_disk_cache, mod_mem_cache). -- Apache 2 supports the Internet protocol IPv6. - -### Tomcat directory ### - -${tomcat_home} is the root directory of tomcat. Your Tomcat installation should have the following subdirectories: - -- ${tomcat_home}\conf – Where you can place various configuration files -- ${tomcat_home}\webapps – Containing example applications -- ${tomcat_home}\bin – Where you place web server plugins - -### Mod_jk module ### - -The mod_jk can be obtained in two formats: binary and source. Depending on the platform you are running your web server on, a binary version of mod_jk may be available. It is recommended to use the binary version if it is available. - -The mod_jk module was developed and tested on: - -- Linux, FreeBSD, AIX, HP-UX, MacOS X, Solaris and should work on major Unix’s platforms supporting Apache 1.3 and/or 2.x -- 0-i386 SP4/SP5/SP6a (should be able to work with other service packs), Win2K and WinXP and Win98 -- Cygwin (until you have an apache server and autoconf/automake support tools) -- Netware -- i5/OS V5R4 (System I) with Apache HTTP Server 2.0.58. Be sure to have the latest Apache PTF installed. -- Tomcat 3.2 to Tomcat 8. - -The mod_jk requires two entities: - -- **mod_jk.xxx** – The Apache HTTP Server module, depending on your operating system, it will be mod_jk.so, mod_jk.nlm or MOD_JK.SRVPGM. -- **workers.properties** – A file that describes the host and used ports by the workers (Tomcat processes). A sample workers.properties can be found under the conf directory in the source download. - -Also as with other Apache HTTP Server modules, mod_jk should be first installed on the modules directory of your Apache webserver: /usr/lib/apache and you should update your **httpd.conf** file. - -### Installation ### - -It is required to have a non-root user system with the “sudo” privileges before starting the installation. Now we will start our installation, so we will install Apache2 and Tomcat using the following command: - - sudo apt-get install apache2 - - sudo apt-get install tomcat7 - - sudo apt-get install tomcat7-admin - -And now we will create a test application for Tomcat using the following commands: - - cd /var/lib/tomcat7/webapps - sudo mkdir tomcat-demo - sudo mkdir tomcat-demo/goodmoring - sudo vim tomcat-demo/helloworld/index.jsp - -And paste the following code: - - - - Good Morning - - -

Good Morning

- Today is: <%= new java.util.Date().toString() %> - - - -Everything is okay, good now we will install and configure the mod_jk using the following command: - - sudo apt-get install libapache2-mod-jk - -We have to start by enabling the redirect port 8443 on Tomcat using the following command: - - sudo vim /etc/tomcat7/server.xml - -And we will uncomment the following line: - - - -After that, we will create our workers.properties file for Apache using the following command: - - sudo vim /etc/apache2/workers.properties - -Paste the following text: - - # Define 1 real worker using ajp13 - worker.list=worker - # Set properties for worker (ajp13) - worker.worker.type=ajp13 - worker.worker.host=localhost - worker.worker.port=8009 - -Now we will use the following command to let Apache use this worker: - - sudo vim /etc/apache2/mods-available/jk.conf - -And we will change the JkWorkersFile property to the following one; - - /etc/apache2/workers.properties - -Finally to configure the URL Apache should pass through the Tomcat - - sudo vim /etc/apache2/sites-enabled/000-default - -And we will add the following line in the configurtation file: - - - ....................................... - ....................................... - JkMount /tomcat-demo* worker1 - - -You can now restart the servers using the following commands to check their functionality: - - sudo /etc/init.d/tomcat7 restart - sudo /etc/init.d/apache2 restart - -### Conclusion ### - -In this article we showed you how to configure and install Apache2 and Tomcat 7 using the mod_jk connector. - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/integrate-apache2-tomcat-7-using-mod_jk-connector/ - -作者:[anismaj][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/anis/ diff --git a/translated/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md b/translated/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md new file mode 100644 index 0000000000..be9297c370 --- /dev/null +++ b/translated/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md @@ -0,0 +1,138 @@ +如何用mod_jk连接器来集成Apache2和Tomcat 7 +================================================================================ +Apache是最流行的web服务器。通常用来接收客户端的请求并响应。它得到一个URL并将它翻译成一个文件名(或者静态请求),并将文件从本地磁盘中通过因特网返回,或者将它翻译成程序名执行它,接着将输出返回给请求方。如果web服务器不能处理和完成请求,它会返回一个错误信息。 + +在本篇中,我们会列出Apache的特性以及我们该如何用mod_jk连接器来集成Tomcat7和Tomcat8. + +### Apache的特性 ### + +如我们所说Apache是最流行的web服务器。下面是流行背后的原因: + +- 它是自由工具,你可以很简单地下载和安装 +- 它开放源码因此你可以查看源码,调整它,优化它,并且修复错误和安全漏洞。也可以增加新的功能和模块。 +- 它可以用在只有一两个页面的小网站,或者是有成千上万个页面的大网站,每月处理上百万的常规访问者的请求。它可以同时处理静态和动态内容。 +- 提高的缓存模块(mod_cache、 mod_disk_cache、 mod_mem_cache)。 +- Apache 2 支持 IPv6. + +### Tomcat 目录 ### + +${tomcat_home} 是tomcat的根目录。你的tomcat安装应该有下面的子目录: + +- ${tomcat_home}\conf – 存放不同配置文件的地方 +- ${tomcat_home}\webapps – 包含示例程序 +- ${tomcat_home}\bin – 存放插件的地方 + +### Mod_jk 模块 ### + +mod_jk有两种可接受的方式:二进制或者源码。取决于你运行的web服务器的平台,二进制版本的mod_jk也许可以找到。如果有二进制版本的话建议使用这个。 + +mod_jk模块在这些平台上开发及测试过: + +- Linux、 FreeBSD、 AIX、 HP-UX、 MacOS X、 Solaris ,应该在主流的Unix平台上都支持Apache 1.3 和/或者 2.x。 +- 0-i386 SP4/SP5/SP6a (应该可以于其他的服务包一起工作), Win2K and WinXP and Win98 +- Cygwin (需要你有apache服务器及autoconf/automake支持工具) +- Netware +- i5/OS V5R4 (System I) 中的 Apache HTTP Server 2.0.58。 确保已经安装了Apache PTF +- Tomcat 3.2 到 Tomcat 8. + +The mod_jk 需要两个组件: + +- **mod_jk.xxx** – Apache HTTP服务器模块,取决于你的操作系统,它可能是mod_jk.so、mod_jk.nlm或者MOD_JK.SRVPGM。 +- **workers.properties** - 描述主机以及处理器使用的端口(Tomcat进程)。在下载的源码内可以在conf目录下找到workers.properties文件。 + +和Apache HTTP服务器其他的模块一样,mod_jk应该安装在你的Apache服务器下的模块目录下:/usr/lib/apache,你应该更新你的**httpd.conf**文件。 + +### 安装 ### + +它需要非root用户在安装钱使用“sudo”特权。现在我们开始安装,我们将使用下面的命令来安装Apache2和Tomcat: + + sudo apt-get install apache2 + + sudo apt-get install tomcat7 + + sudo apt-get install tomcat7-admin + +下面在我们将会使用下面的命令来创建一个测试程序: + + cd /var/lib/tomcat7/webapps + sudo mkdir tomcat-demo + sudo mkdir tomcat-demo/goodmoring + sudo vim tomcat-demo/helloworld/index.jsp + +粘贴下面的代码: + + + + Good Morning + + +

Good Morning

+ Today is: <%= new java.util.Date().toString() %> + + + +一切完毕后,我们将使用下面的命令安装和配置mod_jk: + + sudo apt-get install libapache2-mod-jk + +我们将使用下面的命令启用Tomcat的8443转发端口: + + sudo vim /etc/tomcat7/server.xml + +我们将解除下面的注释行: + + + +之后,我们将用下面的命令位Apache创建workers.properties文件: + + sudo vim /etc/apache2/workers.properties + +粘贴下面的行: + + # Define 1 real worker using ajp13 + worker.list=worker + # Set properties for worker (ajp13) + worker.worker.type=ajp13 + worker.worker.host=localhost + worker.worker.port=8009 + +现在我们将使用下面的命令来让Apache使用这个worker: + + sudo vim /etc/apache2/mods-available/jk.conf + +我们将JkWorkersFile属性成下面这行: + + /etc/apache2/workers.properties + +最后配置Apache交给Tomcat处理的URL + + sudo vim /etc/apache2/sites-enabled/000-default + +我们将在配置文件中下面的行: + + + ....................................... + ....................................... + JkMount /tomcat-demo* worker1 + + +现在用下面的命令重启服务来检查它们的功能: + + sudo /etc/init.d/tomcat7 restart + sudo /etc/init.d/apache2 restart + +### 总结 ### + +在本篇中我们展示了你该如何使用mod_jk连接器配置和安装Apache2以及Tomcat7。 + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/integrate-apache2-tomcat-7-using-mod_jk-connector/ + +作者:[anismaj][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/anis/ From e263f7a46df9c51b5395f3eb519344cf73e3e1dc Mon Sep 17 00:00:00 2001 From: VicYu Date: Fri, 1 May 2015 11:10:48 +0800 Subject: [PATCH 131/154] Update 20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md --- ...swers--How to configure PCI-passthrough on virt-manager.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md b/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md index f90070d34a..4703e96d38 100644 --- a/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md +++ b/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md @@ -1,3 +1,5 @@ +Vic020 + Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager ================================================================================ > **Question**: I would like to dedicate a physical network interface card to one of my guest VMs created by KVM. For that, I am trying to enable PCI passthrough of the NIC for the VM. How can I add a PCI device to a guest VM with PCI passthrough on virt-manager? @@ -52,4 +54,4 @@ via: http://ask.xmodulo.com/pci-passthrough-virt-manager.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://wiki.xenproject.org/wiki/VTdHowTo -[2]:http://xmodulo.com/add-kernel-boot-parameters-via-grub-linux.html \ No newline at end of file +[2]:http://xmodulo.com/add-kernel-boot-parameters-via-grub-linux.html From 140d2e80a1310fc65db6b4165c7dcc2e79cde9f3 Mon Sep 17 00:00:00 2001 From: Mo Date: Fri, 1 May 2015 14:05:45 +0800 Subject: [PATCH 132/154] [translating]The history of Android -15 --- .../14 - The history of Android.md | 84 ------------------- .../15 - The history of Android.md | 4 +- 2 files changed, 3 insertions(+), 85 deletions(-) delete mode 100644 sources/talk/The history of Android/14 - The history of Android.md diff --git a/sources/talk/The history of Android/14 - The history of Android.md b/sources/talk/The history of Android/14 - The history of Android.md deleted file mode 100644 index 3377527026..0000000000 --- a/sources/talk/The history of Android/14 - The history of Android.md +++ /dev/null @@ -1,84 +0,0 @@ -alim0x translating - -The history of Android -================================================================================ -### Voice Actions—a supercomputer in your pocket ### - -In August 2010, a new feature “[Voice Actions][1]" launched in the Android Market as part of the Voice Search app. Voice Actions allowed users to issue voice commands to their phone, and Android would try to interpret them and do something smart. Something like "Navigate to [address]" would fire up Google Maps and start turn-by-turn navigation to your stated destination. You could also send texts or e-mails, make a call, open a Website, get directions, or view a location on a map—all just by speaking. - -注:youtube视频地址 - - -Voice Actions was the culmination of a new app design philosophy for Google. Voice Actions was the most advanced voice control software for its time, and the secret was that Google wasn’t doing any computing on the device. In general, voice recognition was very CPU intensive. In fact, many voice recognition programs still have a “speed versus accuracy" setting, where users can choose how long they are willing to wait for the voice recognition algorithms to work—more CPU power means better accuracy. - -Google’s innovation was not bothering to do the voice recognition computing on the phone’s limited processor. When a command was spoken, the user’s voice was packaged up and shipped out over the Internet to Google’s cloud servers. There, Google’s farm of supercomputers pored over the message, interpreted it, and shipped it back to the phone. It was a long journey, but the Internet was finally fast enough to accomplish something like this in a second or two. - -Many people throw the phrase “cloud computing" around to mean “anything that is stored on a server," but this was actual cloud computing. Google was doing hardcore compute operations in the cloud, and because it is throwing a ridiculous amount of CPU power at the problem, the only limit to the voice recognition accuracy is the algorithms themselves. The software didn't need to be individually “trained" by each user, because everyone who used Voice Actions was training it all the time. Using the power of the Internet, Android put a supercomputer in your pocket, and, compared to existing solutions, moving the voice recognition workload from a pocket-sized computer to a room-sized computer greatly increased accuracy. - -Voice recognition had been a project of Google’s for some time, and it all started with an 800 number. [1-800-GOOG-411][1] was a free phone information service that Google launched in April 2007. It worked just like 411 information services had for years—users could call the number and ask for a phone book lookup—but Google offered it for free. No humans were involved in the lookup process, the 411 service was powered by voice recognition and a text-to-speech engine. Voice Actions was only possible after three years of the public teaching Google how to hear. - -Voice recognition was a great example of Google’s extremely long-term thinking—the company wasn't afraid to invest in a project that wouldn’t become a commercial product for several years. Today, voice recognition powers products all across Google. It’s used for voice input in the Google Search app, Android’s voice typing, and on Google.com. It’s also the primary input interface for Google Glass and [Android Wear][2]. - -The company even uses it beyond input. Google's voice recognition technology is used to transcribe YouTube videos, which powers automatic closed captioning for the hearing impaired. The transcription is even indexed by Google, so you can search for words that were said in the video. Voice is the future of many products, and this long-term planning has led Google to be one of the few major tech companies with an in-house voice recognition service. Most other voice recognition products, like Apple’s Siri and Samsung devices, are forced to use—and pay a license fee for—voice recognition from Nuance. - -With the computer hearing system up and running, Google is applying this strategy to computer vision next. That's why things like Google Goggles, Google Image Search, and [Project Tango][3] exist. Just like the days of GOOG-411, these projects are in the early stages. When [Google's robot division][4] gets off the ground with a real robot, it will need to see and hear, and Google's computer vision and hearing projects will likely give the company a head start. - -![The Nexus S, the first Nexus phone made by Samsung.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/NS500.png) -The Nexus S, the first Nexus phone made by Samsung. - -### Android 2.3 Gingerbread—the first major UI overhaul ### - -Gingerbread was released in December 2010, a whopping seven months after the release of 2.2. The wait was worth it, though, as Android 2.3 changed just about every screen in the OS. It was the first major overhaul since the initial formation of Android in version 0.9. 2.3 would kick off a series of continual revamps in an attempt to turn Android from an ugly duckling into something that was capable of holding its own—aesthetically—against the iPhone. - -And speaking of Apple, six months earlier, the company released the iPhone 4 and iOS 4, which added multitasking and Facetime video chat. Microsoft was finally back in the game, too. The company jumped into the modern smartphone era with the launch of Windows Phone 7 in November 2010. - -Android 2.3 focused a lot on the interface design, but with no direction or design documents, many apps ended up getting a new bespoke theme. Some apps went with a flatter, darker theme, some used a gradient-filled, bubbly dark theme, and others went with a high-contrast white and green look. While it wasn't cohesive, Gingerbread accomplished the goal of modernizing nearly every part of the OS. It was a good thing, too, because the next phone version of Android wouldn’t arrive until nearly a year later. - -Gingerbread’s launch device was the Nexus S, Google’s second flagship device and the first Nexus manufactured by Samsung. While today we are used to new CPU models every year, back then that wasn't the case. The Nexus S had a 1GHz Cortex A8 processor, just like the Nexus One. The GPU was slightly faster, and that was it in the speed department. It was a little bigger than the Nexus One, with a 4-inch, 800×480 AMOLED display. - -Spec wise, the Nexus S might seem like a tame upgrade, but it was actually home to a lot of firsts for Android. The Nexus S was Google’s first flagship to shun a MicroSD slot, shipping with 16GB on-board memory. The Nexus One had only 512MB of storage, but it had a MicroSD slot. Removing the SD slot simplified storage management for users—there was just one pool now—but hurt expandability for power users. It was also Google's first phone to have NFC, a special chip in the back of the phone that could transfer information when touched to another NFC chip. For now, the Nexus S could only read NFC tags—it couldn't send data. - -Thanks to some upgrades in Gingerbread, the Nexus S was one of the first Android phones to ship without a hardware D-Pad or trackball. The Nexus S was now down to just the power, volume, and the four navigation buttons. The Nexus S was also a precursor to the [crazy curved-screen phones][6] of today, as Samsung outfitted the Nexus S with a piece of slightly curved glass. - -![Gingerbread changed the status bar and wallpaper, and it added a bunch of new icons.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/appdrawershop.png) -Gingerbread changed the status bar and wallpaper, and it added a bunch of new icons. -Photo by Ron Amadeo - -An upgraded "Nexus" live wallpaper was released as an exclusive addition to the Nexus S. It was basically the same idea as the Nexus One version, with its animated streaks of light. On the Nexus S, the "grid" design was removed and replaced with a wavy blue/gray background. The dock at the bottom was given square corners and colored icons. - -![The new notification panel and menu.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/32.png) -The new notification panel and menu. -Photo by Ron Amadeo - -The status bar was finally overhauled from the version that first debuted in 0.9. The bar was changed from a white gradient to flat black, and all the icons were redrawn in gray and green. Just about everything looked crisper and more modern thanks to the sharp-angled icon design and higher resolution. The strangest decisions were probably the removal of the time period from the status bar clock and the confusing shade of gray that was used for the signal bars. Despite gray being used for many status bar icons, and there being four gray bars in the above screenshot, Android was actually indicating no cellular signal. Green bars would indicate a signal, gray bars indicated “empty" signal slots. - -The green status bar icons in Gingerbread also doubled as a status indicator of network connectivity. If you had a working connection to Google's servers, the icons would be green, if there was no connection to Google, the icons turned white. This let you easily identify the connectivity status of your connection while you were out and about. - -The notification panel was changed from the aging Android 1.5 design. Again, we saw a UI piece that changed from a light theme to a dark theme, getting a dark gray header, black background, and black-on-gray text. - -The menu was darkened too, changing from a white background to a black one with a slight transparency. The contrast between the menu icons and the background wasn’t as strong as it should be, because the gray icons are the same color as they were on the white background. Requiring a color change would mean every developer would have to make new icons, so Google went with the preexisting gray color on black. This was a change at the system level, so this new menu would show up in every app. - ----------- - -![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) - -[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. - -[@RonAmadeo][t] - --------------------------------------------------------------------------------- - -via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/14/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://arstechnica.com/gadgets/2010/08/google-beefs-up-voice-search-mobile-sync/ -[2]:http://arstechnica.com/business/2007/04/google-rolls-out-free-411-service/ -[3]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ -[4]:http://arstechnica.com/gadgets/2014/02/googles-project-tango-is-a-smartphone-with-kinect-style-computer-vision/ -[5]:http://arstechnica.com/gadgets/2013/12/google-robots-former-android-chief-will-lead-google-robotics-division/ -[6]:http://arstechnica.com/gadgets/2013/12/lg-g-flex-review-form-over-even-basic-function/ -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo diff --git a/sources/talk/The history of Android/15 - The history of Android.md b/sources/talk/The history of Android/15 - The history of Android.md index 078e106d1c..9ca4176245 100644 --- a/sources/talk/The history of Android/15 - The history of Android.md +++ b/sources/talk/The history of Android/15 - The history of Android.md @@ -1,3 +1,5 @@ +alim0x translating + The history of Android ================================================================================ ![Gingerbread's new keyboard, text selection UI, overscroll effect, and new checkboxes.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/3kb-high-over-check.png) @@ -83,4 +85,4 @@ via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-histor 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo \ No newline at end of file +[t]:https://twitter.com/RonAmadeo From 3a1a3791ffe994500f0a24e5e99396f33c676986 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 1 May 2015 18:27:00 +0800 Subject: [PATCH 133/154] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20201504?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...xaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md | 0 .../20141204 Intense Gameplay--Try these 13 Roguelike games.md | 0 ...rld WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md | 0 ... to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md | 0 ... to Remember and Restore Running Applications on Next Logon.md | 0 ...How are C data types “supported directly by most computers”.md | 0 published/{ => 201504}/20150128 Docker-1 Moving to Docker.md | 0 ...50202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md | 0 .../20150202 tespeed - Python Tool To Test Your Internet Speed.md | 0 ...ll Linux-dash Web Based Monitoring System In CentOS or RHEL.md | 0 ...0205 25 Linux Shell Scripting interview Questions & Answers.md | 0 ...150205 How To Install or Configure VNC Server On CentOS 7.0.md | 0 ... A WordPress Website Security Using WPScan, Nmap, And Nikto.md | 0 ...20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md | 0 ...lashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md | 0 ...x 'fatal error--x264.h--No such file or directory' on Linux.md | 0 .../20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md | 0 ...50211 Simple Steps Migration From MySQL To MariaDB On Linux.md | 0 ...lyze and view Apache web server logs interactively on Linux.md | 0 ...w to share files between computers over network with btsync.md | 0 ... error--lame or lame.h--No such file or directory' on Linux.md | 0 ...s with Answers--How to install a USB webcam in Raspberry Pi.md | 0 ...ple who start writing kernel code get hired really quickly'.md | 0 published/{ => 201504}/20150227 Chess in a Few Bytes.md | 0 ...0150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md | 0 ...4 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md | 0 published/{ => 201504}/20150306 Nmap--Not Just for Evil.md | 0 ...20150309 10 Useful 'ls' Command Interview Questions--Part 2.md | 0 ...50309 15 Interview Questions on Linux 'ls ' Command--Part 1.md | 0 .../20150310 4 Linux Based Mini PC You Can Buy In 2015.md | 0 ...50310 How To Get Email Alerts for SSH Login on Linux Server.md | 0 ...ow to convert between local time and UNIX timestamp in Perl.md | 0 .../{ => 201504}/20150318 Fedora GNOME Keyboard Shortcuts.md | 0 .../20150318 Install And Use 'Go For It!' To Do App In Linux.md | 0 published/{ => 201504}/20150318 The future of Linux storage.md | 0 .../{ => 201504}/20150323 Papyrus--An Open Source Note Manager.md | 0 .../20150323 Red Hat Developer Toolset 3.1 beta arrives.md | 0 ...0324 How to Install Telegram Messenger Application on Linux.md | 0 .../20150324 Prips--Print IP address on a given range.md | 0 .../{ => 201504}/20150326 Mydumper--Mysql Database Backup tool.md | 0 .../{ => 201504}/20150330 Picty--Managing Photos Made Easy.md | 0 .../20150402 The VirtualBox 5.0 beta is finally here.md | 0 .../20150409 How to Run GUI Apps in a Docker Container.md | 0 ...50410 10 Famous IT Skills in Demand That Will Get You Hired.md | 0 ...ntary OS 0.3 Freya Screenshots - Download and Install Guide.md | 0 ... Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md | 0 ...c Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md | 0 ... Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md | 0 ... Most Popular Programming Languages in to GitHub Since 2012.md | 0 ...Things to Do After Minimal RHEL or CentOS 7 Installation--1.md | 0 ...Things to Do After Minimal RHEL or CentOS 7 Installation--2.md | 0 ...Things to Do After Minimal RHEL or CentOS 7 Installation--3.md | 0 published/{ => 201504}/Debian 8 Jessie released.md | 0 .../{ => 201504}/GNOME-Pie 0.6 Application Launcher Released.md | 0 ... to create a custom backup plan for Debian with backupninja.md | 0 55 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201504}/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md (100%) rename published/{ => 201504}/20141204 Intense Gameplay--Try these 13 Roguelike games.md (100%) rename published/{ => 201504}/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md (100%) rename published/{ => 201504}/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md (100%) rename published/{ => 201504}/20150119 How to Remember and Restore Running Applications on Next Logon.md (100%) rename published/{ => 201504}/20150122 How are C data types “supported directly by most computers”.md (100%) rename published/{ => 201504}/20150128 Docker-1 Moving to Docker.md (100%) rename published/{ => 201504}/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md (100%) rename published/{ => 201504}/20150202 tespeed - Python Tool To Test Your Internet Speed.md (100%) rename published/{ => 201504}/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md (100%) rename published/{ => 201504}/20150205 25 Linux Shell Scripting interview Questions & Answers.md (100%) rename published/{ => 201504}/20150205 How To Install or Configure VNC Server On CentOS 7.0.md (100%) rename published/{ => 201504}/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md (100%) rename published/{ => 201504}/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md (100%) rename published/{ => 201504}/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md (100%) rename published/{ => 201504}/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md (100%) rename published/{ => 201504}/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md (100%) rename published/{ => 201504}/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md (100%) rename published/{ => 201504}/20150215 How to analyze and view Apache web server logs interactively on Linux.md (100%) rename published/{ => 201504}/20150215 How to share files between computers over network with btsync.md (100%) rename published/{ => 201504}/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md (100%) rename published/{ => 201504}/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md (100%) rename published/{ => 201504}/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md (100%) rename published/{ => 201504}/20150227 Chess in a Few Bytes.md (100%) rename published/{ => 201504}/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md (100%) rename published/{ => 201504}/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md (100%) rename published/{ => 201504}/20150306 Nmap--Not Just for Evil.md (100%) rename published/{ => 201504}/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md (100%) rename published/{ => 201504}/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md (100%) rename published/{ => 201504}/20150310 4 Linux Based Mini PC You Can Buy In 2015.md (100%) rename published/{ => 201504}/20150310 How To Get Email Alerts for SSH Login on Linux Server.md (100%) rename published/{ => 201504}/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md (100%) rename published/{ => 201504}/20150318 Fedora GNOME Keyboard Shortcuts.md (100%) rename published/{ => 201504}/20150318 Install And Use 'Go For It!' To Do App In Linux.md (100%) rename published/{ => 201504}/20150318 The future of Linux storage.md (100%) rename published/{ => 201504}/20150323 Papyrus--An Open Source Note Manager.md (100%) rename published/{ => 201504}/20150323 Red Hat Developer Toolset 3.1 beta arrives.md (100%) rename published/{ => 201504}/20150324 How to Install Telegram Messenger Application on Linux.md (100%) rename published/{ => 201504}/20150324 Prips--Print IP address on a given range.md (100%) rename published/{ => 201504}/20150326 Mydumper--Mysql Database Backup tool.md (100%) rename published/{ => 201504}/20150330 Picty--Managing Photos Made Easy.md (100%) rename published/{ => 201504}/20150402 The VirtualBox 5.0 beta is finally here.md (100%) rename published/{ => 201504}/20150409 How to Run GUI Apps in a Docker Container.md (100%) rename published/{ => 201504}/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md (100%) rename published/{ => 201504}/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md (100%) rename published/{ => 201504}/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md (100%) rename published/{ => 201504}/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md (100%) rename published/{ => 201504}/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md (100%) rename published/{ => 201504}/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md (100%) rename published/{ => 201504}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md (100%) rename published/{ => 201504}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md (100%) rename published/{ => 201504}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md (100%) rename published/{ => 201504}/Debian 8 Jessie released.md (100%) rename published/{ => 201504}/GNOME-Pie 0.6 Application Launcher Released.md (100%) rename published/{ => 201504}/How to create a custom backup plan for Debian with backupninja.md (100%) diff --git a/published/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md b/published/201504/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md similarity index 100% rename from published/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md rename to published/201504/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md diff --git a/published/20141204 Intense Gameplay--Try these 13 Roguelike games.md b/published/201504/20141204 Intense Gameplay--Try these 13 Roguelike games.md similarity index 100% rename from published/20141204 Intense Gameplay--Try these 13 Roguelike games.md rename to published/201504/20141204 Intense Gameplay--Try these 13 Roguelike games.md diff --git a/published/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md b/published/201504/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md similarity index 100% rename from published/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md rename to published/201504/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md diff --git a/published/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md b/published/201504/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md similarity index 100% rename from published/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md rename to published/201504/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md diff --git a/published/20150119 How to Remember and Restore Running Applications on Next Logon.md b/published/201504/20150119 How to Remember and Restore Running Applications on Next Logon.md similarity index 100% rename from published/20150119 How to Remember and Restore Running Applications on Next Logon.md rename to published/201504/20150119 How to Remember and Restore Running Applications on Next Logon.md diff --git a/published/20150122 How are C data types “supported directly by most computers”.md b/published/201504/20150122 How are C data types “supported directly by most computers”.md similarity index 100% rename from published/20150122 How are C data types “supported directly by most computers”.md rename to published/201504/20150122 How are C data types “supported directly by most computers”.md diff --git a/published/20150128 Docker-1 Moving to Docker.md b/published/201504/20150128 Docker-1 Moving to Docker.md similarity index 100% rename from published/20150128 Docker-1 Moving to Docker.md rename to published/201504/20150128 Docker-1 Moving to Docker.md diff --git a/published/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md b/published/201504/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md similarity index 100% rename from published/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md rename to published/201504/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md diff --git a/published/20150202 tespeed - Python Tool To Test Your Internet Speed.md b/published/201504/20150202 tespeed - Python Tool To Test Your Internet Speed.md similarity index 100% rename from published/20150202 tespeed - Python Tool To Test Your Internet Speed.md rename to published/201504/20150202 tespeed - Python Tool To Test Your Internet Speed.md diff --git a/published/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md b/published/201504/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md similarity index 100% rename from published/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md rename to published/201504/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md diff --git a/published/20150205 25 Linux Shell Scripting interview Questions & Answers.md b/published/201504/20150205 25 Linux Shell Scripting interview Questions & Answers.md similarity index 100% rename from published/20150205 25 Linux Shell Scripting interview Questions & Answers.md rename to published/201504/20150205 25 Linux Shell Scripting interview Questions & Answers.md diff --git a/published/20150205 How To Install or Configure VNC Server On CentOS 7.0.md b/published/201504/20150205 How To Install or Configure VNC Server On CentOS 7.0.md similarity index 100% rename from published/20150205 How To Install or Configure VNC Server On CentOS 7.0.md rename to published/201504/20150205 How To Install or Configure VNC Server On CentOS 7.0.md diff --git a/published/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md b/published/201504/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md similarity index 100% rename from published/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md rename to published/201504/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md diff --git a/published/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md b/published/201504/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md similarity index 100% rename from published/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md rename to published/201504/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md diff --git a/published/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md b/published/201504/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md similarity index 100% rename from published/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md rename to published/201504/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md diff --git a/published/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md b/published/201504/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md similarity index 100% rename from published/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md rename to published/201504/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md diff --git a/published/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/published/201504/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md similarity index 100% rename from published/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md rename to published/201504/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md diff --git a/published/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md b/published/201504/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md similarity index 100% rename from published/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md rename to published/201504/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md diff --git a/published/20150215 How to analyze and view Apache web server logs interactively on Linux.md b/published/201504/20150215 How to analyze and view Apache web server logs interactively on Linux.md similarity index 100% rename from published/20150215 How to analyze and view Apache web server logs interactively on Linux.md rename to published/201504/20150215 How to analyze and view Apache web server logs interactively on Linux.md diff --git a/published/20150215 How to share files between computers over network with btsync.md b/published/201504/20150215 How to share files between computers over network with btsync.md similarity index 100% rename from published/20150215 How to share files between computers over network with btsync.md rename to published/201504/20150215 How to share files between computers over network with btsync.md diff --git a/published/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md b/published/201504/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md similarity index 100% rename from published/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md rename to published/201504/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/published/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md b/published/201504/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md similarity index 100% rename from published/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md rename to published/201504/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md diff --git a/published/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md b/published/201504/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md similarity index 100% rename from published/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md rename to published/201504/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md diff --git a/published/20150227 Chess in a Few Bytes.md b/published/201504/20150227 Chess in a Few Bytes.md similarity index 100% rename from published/20150227 Chess in a Few Bytes.md rename to published/201504/20150227 Chess in a Few Bytes.md diff --git a/published/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md b/published/201504/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md similarity index 100% rename from published/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md rename to published/201504/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md diff --git a/published/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md b/published/201504/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md similarity index 100% rename from published/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md rename to published/201504/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md diff --git a/published/20150306 Nmap--Not Just for Evil.md b/published/201504/20150306 Nmap--Not Just for Evil.md similarity index 100% rename from published/20150306 Nmap--Not Just for Evil.md rename to published/201504/20150306 Nmap--Not Just for Evil.md diff --git a/published/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md b/published/201504/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md similarity index 100% rename from published/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md rename to published/201504/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md diff --git a/published/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md b/published/201504/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md similarity index 100% rename from published/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md rename to published/201504/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md diff --git a/published/20150310 4 Linux Based Mini PC You Can Buy In 2015.md b/published/201504/20150310 4 Linux Based Mini PC You Can Buy In 2015.md similarity index 100% rename from published/20150310 4 Linux Based Mini PC You Can Buy In 2015.md rename to published/201504/20150310 4 Linux Based Mini PC You Can Buy In 2015.md diff --git a/published/20150310 How To Get Email Alerts for SSH Login on Linux Server.md b/published/201504/20150310 How To Get Email Alerts for SSH Login on Linux Server.md similarity index 100% rename from published/20150310 How To Get Email Alerts for SSH Login on Linux Server.md rename to published/201504/20150310 How To Get Email Alerts for SSH Login on Linux Server.md diff --git a/published/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md b/published/201504/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md similarity index 100% rename from published/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md rename to published/201504/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md diff --git a/published/20150318 Fedora GNOME Keyboard Shortcuts.md b/published/201504/20150318 Fedora GNOME Keyboard Shortcuts.md similarity index 100% rename from published/20150318 Fedora GNOME Keyboard Shortcuts.md rename to published/201504/20150318 Fedora GNOME Keyboard Shortcuts.md diff --git a/published/20150318 Install And Use 'Go For It!' To Do App In Linux.md b/published/201504/20150318 Install And Use 'Go For It!' To Do App In Linux.md similarity index 100% rename from published/20150318 Install And Use 'Go For It!' To Do App In Linux.md rename to published/201504/20150318 Install And Use 'Go For It!' To Do App In Linux.md diff --git a/published/20150318 The future of Linux storage.md b/published/201504/20150318 The future of Linux storage.md similarity index 100% rename from published/20150318 The future of Linux storage.md rename to published/201504/20150318 The future of Linux storage.md diff --git a/published/20150323 Papyrus--An Open Source Note Manager.md b/published/201504/20150323 Papyrus--An Open Source Note Manager.md similarity index 100% rename from published/20150323 Papyrus--An Open Source Note Manager.md rename to published/201504/20150323 Papyrus--An Open Source Note Manager.md diff --git a/published/20150323 Red Hat Developer Toolset 3.1 beta arrives.md b/published/201504/20150323 Red Hat Developer Toolset 3.1 beta arrives.md similarity index 100% rename from published/20150323 Red Hat Developer Toolset 3.1 beta arrives.md rename to published/201504/20150323 Red Hat Developer Toolset 3.1 beta arrives.md diff --git a/published/20150324 How to Install Telegram Messenger Application on Linux.md b/published/201504/20150324 How to Install Telegram Messenger Application on Linux.md similarity index 100% rename from published/20150324 How to Install Telegram Messenger Application on Linux.md rename to published/201504/20150324 How to Install Telegram Messenger Application on Linux.md diff --git a/published/20150324 Prips--Print IP address on a given range.md b/published/201504/20150324 Prips--Print IP address on a given range.md similarity index 100% rename from published/20150324 Prips--Print IP address on a given range.md rename to published/201504/20150324 Prips--Print IP address on a given range.md diff --git a/published/20150326 Mydumper--Mysql Database Backup tool.md b/published/201504/20150326 Mydumper--Mysql Database Backup tool.md similarity index 100% rename from published/20150326 Mydumper--Mysql Database Backup tool.md rename to published/201504/20150326 Mydumper--Mysql Database Backup tool.md diff --git a/published/20150330 Picty--Managing Photos Made Easy.md b/published/201504/20150330 Picty--Managing Photos Made Easy.md similarity index 100% rename from published/20150330 Picty--Managing Photos Made Easy.md rename to published/201504/20150330 Picty--Managing Photos Made Easy.md diff --git a/published/20150402 The VirtualBox 5.0 beta is finally here.md b/published/201504/20150402 The VirtualBox 5.0 beta is finally here.md similarity index 100% rename from published/20150402 The VirtualBox 5.0 beta is finally here.md rename to published/201504/20150402 The VirtualBox 5.0 beta is finally here.md diff --git a/published/20150409 How to Run GUI Apps in a Docker Container.md b/published/201504/20150409 How to Run GUI Apps in a Docker Container.md similarity index 100% rename from published/20150409 How to Run GUI Apps in a Docker Container.md rename to published/201504/20150409 How to Run GUI Apps in a Docker Container.md diff --git a/published/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md b/published/201504/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md similarity index 100% rename from published/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md rename to published/201504/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md diff --git a/published/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md b/published/201504/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md similarity index 100% rename from published/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md rename to published/201504/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md diff --git a/published/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md b/published/201504/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md similarity index 100% rename from published/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md rename to published/201504/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md diff --git a/published/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md b/published/201504/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md similarity index 100% rename from published/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md rename to published/201504/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md diff --git a/published/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md b/published/201504/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md similarity index 100% rename from published/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md rename to published/201504/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md diff --git a/published/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md b/published/201504/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md similarity index 100% rename from published/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md rename to published/201504/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md diff --git a/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md b/published/201504/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md similarity index 100% rename from published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md rename to published/201504/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md diff --git a/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md b/published/201504/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md similarity index 100% rename from published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md rename to published/201504/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md diff --git a/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md b/published/201504/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md similarity index 100% rename from published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md rename to published/201504/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md diff --git a/published/Debian 8 Jessie released.md b/published/201504/Debian 8 Jessie released.md similarity index 100% rename from published/Debian 8 Jessie released.md rename to published/201504/Debian 8 Jessie released.md diff --git a/published/GNOME-Pie 0.6 Application Launcher Released.md b/published/201504/GNOME-Pie 0.6 Application Launcher Released.md similarity index 100% rename from published/GNOME-Pie 0.6 Application Launcher Released.md rename to published/201504/GNOME-Pie 0.6 Application Launcher Released.md diff --git a/published/How to create a custom backup plan for Debian with backupninja.md b/published/201504/How to create a custom backup plan for Debian with backupninja.md similarity index 100% rename from published/How to create a custom backup plan for Debian with backupninja.md rename to published/201504/How to create a custom backup plan for Debian with backupninja.md From 9b3307eaa89c6aecb2158b79c7847af98f451906 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 1 May 2015 18:27:42 +0800 Subject: [PATCH 134/154] PUB:30 Things to Do After Minimal RHEL or CentOS 7 Installation--4 @ictlyh --- ...inimal RHEL or CentOS 7 Installation--4.md | 92 +++++++++++-------- 1 file changed, 53 insertions(+), 39 deletions(-) rename {translated/tech => published}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md (56%) diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md similarity index 56% rename from translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md rename to published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md index f73d1e9b3b..b6d7ae7f10 100644 --- a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md +++ b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md @@ -1,55 +1,59 @@ -安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--4 +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(四) ================================================================================ ### 17. 安装 Webmin ### -Webmin 是基于 Web 的 Linux 配置工具。它像一个中央系统用于配置各种系统设置,比如用户、磁盘分配、服务以及 HTTP 服务器、Apache、MySQL 等的配置。 +Webmin 是基于 Web 的 Linux 配置工具。它像一个中央系统,用于配置各种系统设置,比如用户、磁盘分配、服务以及 HTTP 服务器、Apache、MySQL 等的配置。 # wget http://prdownloads.sourceforge.net/webadmin/webmin-1.740-1.noarch.rpm # rpm -ivh webmin-*.rpm ![在 CentOS 7 上安装 Webmin](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Webmin.jpeg) -安装 Webmin -安装完 webmin 后,你会在终端上得到一个用你的 root 密码在 端口 10000 登录你的主机(http://ip-address:10000)的信息。 如果运行的是无头服务器(译注:无头服务器是指没有专门用于向其它计算机和它们的用户提供服务的本地接口的计算设备)你可以转发端口然后从有头机器/服务器上访问它。 +*安装 Webmin* + +安装完 webmin 后,你会在终端上得到一个消息,提示你用 root 密码在端口 10000 登录你的主机 (http://ip-address:10000)。 如果运行的是无接口的服务器你可以转发端口然后从有接口的服务器上访问它。(LCTT 译注:无接口[headless]服务器指没有访问接口或界面的服务器,在此次场景,指的是是出于内网的服务器,可采用外网/路由器映射来访问该端口) ### 18. 启用第三方库 ### -添加不受信任的库并不是一个好主意,尤其是在生产环境中,这可能导致致命的问题。但仅作为例子在这里我们会添加一些社区证实可信任的库用于安装第三方工具和软件包。 +添加不受信任的库并不是一个好主意,尤其是在生产环境中,这可能导致致命的问题。但仅作为例子在这里我们会添加一些社区证实可信任的库,以安装第三方工具和软件包。 -为企业版 Linux(EPEL)库添加额外的软件包。 +为企业版 Linux(EPEL)库添加额外的软件包。 # yum install epel-release -添加社区企业版 Linux 库 +添加社区企业版 Linux (Community Enterprise Linux)库: # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm ![安装 Epel 库](http://www.tecmint.com/wp-content/uploads/2015/04/install-epel-repo.jpeg) -安装 Epel 库 -**注意**! 添加第三方库的时候尤其需要注意。 +*安装 Epel 库* + +**注意!** 添加第三方库的时候尤其需要注意。 ### 19. 安装 7-zip 工具 ### -在最小化安装 CentOS 时你并没有获得类似 unzip 或者 untar 的工具。我们可以选择基于需要安装每个工具或者一个能处理所有格式的工具。7-zip 就是一个能压缩和解压所有已知类型文件的工具。 +在最小化安装 CentOS 时你并没有获得类似 unzip 或者 untar 的工具。我们可以选择根据需要来安装每个工具,或一个能处理所有格式的工具。7-zip 就是一个能压缩和解压所有已知类型文件的工具。 # yum install p7zip ![安装 7zip 工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-7zip-tool.jpeg) -安装 7zip 工具 + +*安装 7zip 工具* **注意**: 该软件包从 Fedora EPEL 7 的库中下载和安装。 ### 20. 安装 NTFS-3G 驱动 ### -NTFS-3G,一个很小但非常有用的 NTFS 驱动在大部分类 UNIX 发行版上都可用。它对于挂载和访问 Windows NTFS 文件系统很有用。尽管也有其它可用的替代品,比如 Tuxera,但 NTFS-3G 是使用最广泛的。 +NTFS-3G,一个很小但非常有用的 NTFS 驱动,在大部分类 UNIX 发行版上都可用。它对于挂载和访问 Windows NTFS 文件系统很有用。尽管也有其它可用的替代品,比如 Tuxera,但 NTFS-3G 是使用最广泛的。 # yum install ntfs-3g ![在 CentOS 上安装 NTFS-3G](http://www.tecmint.com/wp-content/uploads/2015/04/Install-NTFS-3G.jpeg) -安装 NTFS-3G 用于挂载 Windows 分区 -ntfs-3g 安装完成之后,你可以使用以下命令挂载 Windows NTFS 分区(我的 Windows 分区是 /dev/sda5)。 +*安装 NTFS-3G 用于挂载 Windows 分区* + +ntfs-3g 安装完成之后,你可以使用以下命令挂载 Windows NTFS 分区(我的 Windows 分区是 /dev/sda5)。 # mount -ro ntfs-3g /dev/sda5 /mnt # cd /mnt @@ -62,25 +66,26 @@ VSFTPD 表示 Very Secure File Transfer Protocol Daemon,是用于类 UNIX 系 # yum install vsftpd ![在 CentOS 7 上安装 Vsftpd](http://www.tecmint.com/wp-content/uploads/2015/04/Install-FTP.jpeg) -安装 Vsftpd FTP + +*安装 Vsftpd FTP* 编辑配置文件 ‘/etc/vsftpd/vsftpd.conf’ 用于保护 vsftpd。 # vi /etc/vsftpd/vsftpd.conf -编辑一些值并使其它保留原样,除非你知道自己在做什么。 +编辑一些值并使其它行保留原样,除非你知道自己在做什么。 anonymous_enable=NO local_enable=YES write_enable=YES chroot_local_user=YES -你也可以更改端口号并使 vsftpd 端口通过防火墙。 +你也可以更改端口号,记得让 vsftpd 端口通过防火墙。 # firewall-cmd --add-port=21/tcp # firewall-cmd --reload -下一步重启 vsftpd 并启用随机启动。 +下一步重启 vsftpd 并启用开机自动启动。 # systemctl restart vsftpd # systemctl enable vsftpd @@ -91,32 +96,33 @@ sudo 通常被称为 super do 或者 suitable user do,是一个类 UNIX 操作 # visudo -打开要编辑的文件 /etc/sudoers +这会打开 /etc/sudoers 并进行编辑 ![sudoers 文件](http://www.tecmint.com/wp-content/uploads/2015/04/sudoers-File.jpeg) -sudoers 文件 -给一个已经创建的用户(比如 tecmint)赋予所有权限(等同于 root)。 +*sudoers 文件* - tecmint ALL=(ALL) ALL +1. 给一个已经创建好的用户(比如 tecmint)赋予所有权限(等同于 root)。 -给一个已经创建的用户(比如 tecmint)赋予除重启和关闭服务器以外的所有权限(等同于 root)。 + tecmint ALL=(ALL) ALL -再一次打开文件并用下面的内容编辑文件。 +2. 如果给一个已经创建好的用户(比如 tecmint)赋予除了重启和关闭服务器以外的所有权限(等同于 root)。 - cmnd_Alias nopermit = /sbin/shutdown, /sbin/reboot + 首先,再一次打开文件并编辑如下内容: -用 逻辑操作符(!) 添加别名。 + cmnd_Alias nopermit = /sbin/shutdown, /sbin/reboot - tecmint ALL=(ALL) ALL,!nopermit + 然后,用逻辑操作符(!)添加该别名。 -准许一个组(比如 debian) 运行一些 root 权限命令,比如(增加或删除用户)。 + tecmint ALL=(ALL) ALL,!nopermit - cmnd_Alias permit = /usr/sbin/useradd, /usr/sbin/userdel +3. 如果准许一个组(比如 debian)运行一些 root 权限命令,比如(增加或删除用户)。 -给组 debian 增加权限。 + cmnd_Alias permit = /usr/sbin/useradd, /usr/sbin/userdel - debian ALL=(ALL) permit + 然后,给组 debian 增加权限。 + + debian ALL=(ALL) permit ### 23. 安装并启用 SELinux ### @@ -125,24 +131,28 @@ SELinux 表示 Security-Enhanced Linux,是内核级别的安全模块。 # yum install selinux-policy ![在 CentOS 7 上安装 SElinux](http://www.tecmint.com/wp-content/uploads/2015/04/Install-SElinux.jpeg) -安装 SElinux 策略 -查看 SELinux 模式。 +*安装 SElinux 策略* + +查看 SELinux 当前模式。 # getenforce ![查看 SELinux 模式](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SELinux-Mode.jpeg) -查看 SELinux 模式 + +*查看 SELinux 模式* 输出是 Enforcing,意味着 SELinux 策略已经生效。 -为了调试,可以临时设置 selinux 模式为允许。不需要重启。 +如果需要调试,可以临时设置 selinux 模式为允许。不需要重启。 # setenforce 0 调试完了之后再次设置 selinux 为强制模式,无需重启。 # setenforce 1 + +(LCTT 译注:在生产环境中,SELinux 固然会提升安全,但是也确实会给应用部署和运行带来不少麻烦。具体是否部署,需要根据情况而定。) ### 24. 安装 Rootkit Hunter ### @@ -151,17 +161,21 @@ Rootkit Hunter,简写为 RKhunter,是在 Linux 系统中扫描 rootkits 和 # yum install rkhunter ![安装 Rootkit Hunter](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Rootkit-Hunter.jpeg) -安装 Rootkit Hunter + +*安装 Rootkit Hunter* 在 Linux 中,从脚本文件以计划作业的形式运行 rkhunter 或者手动扫描有害攻击。 # rkhunter --check ![扫描 rootkits](http://www.tecmint.com/wp-content/uploads/2015/04/Scan-for-rootkits.png) -扫描 rootkits + +*扫描 rootkits* ![RootKit 扫描结果](http://www.tecmint.com/wp-content/uploads/2015/04/RootKit-Results.png) -RootKit 扫描结果 + +*RootKit 扫描结果* + -------------------------------------------------------------------------------- @@ -169,7 +183,7 @@ via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installatio 作者:[Avishek Kumar][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d1656d459bdcde8a82f5f00c3019f42d50ba762b Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 1 May 2015 21:32:36 +0800 Subject: [PATCH 135/154] PUB:30 Things to Do After Minimal RHEL or CentOS 7 Installation--5 @ictlyh --- ...inimal RHEL or CentOS 7 Installation--5.md | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) rename {translated/tech => published}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md (73%) diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md similarity index 73% rename from translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md rename to published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md index 9845595af0..446d6c663d 100644 --- a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md +++ b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md @@ -1,8 +1,8 @@ -安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--5 +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(五) ================================================================================ ### 25. 安装 Linux Malware Detect (LMD) ### -Linux Malware Detect (LMD) 是 GNU GPLv2 协议下发布的开源 Linux 恶意程序扫描器,尤其是为面临威胁的主机环境。LMD 完整的安装、配置以及使用方法可以查看: +Linux Malware Detect (LMD) 是 GNU GPLv2 协议下发布的开源 Linux 恶意程序扫描器,它是特别为面临威胁的主机环境所设计的。LMD 完整的安装、配置以及使用方法可以查看: - [安装 LMD 并和 ClamAV 一起使用作为反病毒引擎][1] @@ -10,9 +10,9 @@ Linux Malware Detect (LMD) 是 GNU GPLv2 协议下发布的开源 Linux 恶意 speedtest-cli 是用 python 写的用于测试网络下载和上传带宽的工具。关于 speedtest-cli 工具的完整安装和使用请阅读我们的文章[用命令行查看 Linux 服务器带宽][2] -### 27. 配置 Cron 作业 ### +### 27. 配置 Cron 任务 ### -这是最广泛使用的软件工具之一。它是一个作业调度器,比如,现在安排一个以后可以自动运行的作业。它对于日志、保存没有实现的记录以及其它日常工作,比如常规备份,非常有用。所有的调度都写在文件 /etc/crontab 中。 +这是最广泛使用的软件工具之一。它是一个任务调度器,比如,现在安排一个以后可以自动运行的作业。它用于未处理记录的日志和维护,以及其它日常工作,比如常规备份。所有的调度都写在文件 /etc/crontab 中。 crontab 文件包含下面的 6 个域: @@ -20,18 +20,19 @@ crontab 文件包含下面的 6 个域: (0-59) (0-23) (1-31) (1/jan-12/dec) (0-6/sun-sat) Command/script ![Crontab 域](http://www.tecmint.com/wp-content/uploads/2015/04/Crontab-Fields.jpeg) -Crontab 域 -在每天 04:30 运行一个 cron 作业(比如运行 /home/$USER/script.sh)。 +*Crontab 域* + +要在每天 04:30 运行一个 cron 任务(比如运行 /home/$USER/script.sh)。 分 时 日期 月份 星期 命令 30 4 * * * speedtest-cli -把下面的条目增加到 crontab 文件 ‘/etc/crontab/’。 +就把下面的条目增加到 crontab 文件 ‘/etc/crontab/’。 30 4 * * * /home/$user/script.sh -把上面一行增加到 crontab 之后,它会在每天的 04:30 am 自动运行,输出取决于脚本文件的内容。另外脚本也可以用命令代替。关于更多 cron 作业的例子,可以阅读[Linux 上的 11 个 Cron 作业例子][3] +把上面一行增加到 crontab 之后,它会在每天的 04:30 am 自动运行,输出取决于脚本文件的内容。另外脚本也可以用命令代替。关于更多 cron 任务的例子,可以阅读[Linux 上的 11 个 Cron 任务例子][3] ### 28. 安装 Owncloud ### @@ -41,12 +42,13 @@ Owncloud 是一个基于 HTTP 的数据同步、文件共享和远程文件存 虚拟化是创建虚拟操作系统、硬件和网络的过程,是当今最热门的技术之一。我们会详细地讨论如何安装和配置虚拟化。 -我们的最小化 CentOS 服务器是一个无头服务器(译注:无头服务器是指没有专门用于向其它计算机和它们的用户提供服务的本地接口的计算设备)。我们通过安装下面的软件包为它承载可通过 HTTP 访问的虚拟机器做准备。 +我们的最小化 CentOS 服务器是一个无用户界面服务器(LCTT 译注:无用户界面[headless]服务器指没有监视器和鼠标键盘等外设的服务器)。我们通过安装下面的软件包,让它可以托管虚拟机,虚拟机可通过 HTTP 访问。 # yum groupinstall 'Development Tools' SDL kernel-devel kernel-headers dkms ![安装开发工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Development-Tool.jpeg) -安装开发工具 + +*安装开发工具* 更改工作目录到 ‘/etc/yum.repos.d/’ 并下载 VirtualBox 库。 @@ -66,10 +68,12 @@ Owncloud 是一个基于 HTTP 的数据同步、文件共享和远程文件存 # VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack ![安装 VirtualBox 扩展包](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Virtualbox-Extension-Pack.jpeg) -安装 VirtualBox 扩展包 + +*安装 VirtualBox 扩展包* ![正在安装 VirtualBox 扩展包](http://www.tecmint.com/wp-content/uploads/2015/04/Installing-Virtualbox-Extension-Pack.jpeg) -正在安装 VirtualBox 扩展包 + +*正在安装 VirtualBox 扩展包* 添加用户 ‘vbox’ 用于管理 VirtualBox 并把它添加到组 vboxusers 中。 @@ -81,11 +85,11 @@ Owncloud 是一个基于 HTTP 的数据同步、文件共享和远程文件存 # yum install httpd -安装 PHP (有 soap 扩展)。 +安装 PHP (支持 soap 扩展)。 # yum install php php-devel php-common php-soap php-gd -下载 PHP virtualBox. +下载 phpVirtualBox(一个 PHP 写的开源的 VirtualBox 用户界面)。 # wget http://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-4.3-1.zip @@ -107,15 +111,17 @@ Owncloud 是一个基于 HTTP 的数据同步、文件共享和远程文件存 # service vbox-service restart # service httpd restart -转发端口并从一个有头服务器上访问它。 +转发端口并从一个有用户界面的服务器上访问它。 http://192.168.0.15/phpvirtualbox-4.3-1/ ![登录 PHP Virtualbox](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox-Login.png) -登录 PHP Virtualbox + +*登录 PHP Virtualbox* ![PHP Virtualbox 面板](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox.png) -PHP Virtualbox 面板 + +*PHP Virtualbox 面板* -------------------------------------------------------------------------------- @@ -123,12 +129,12 @@ via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installatio 作者:[Avishek Kumar][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者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/avishek/ -[1]:http://www.tecmint.com/install-linux-malware-detect-lmd-in-rhel-centos-and-fedora/ -[2]:http://www.tecmint.com/check-internet-speed-from-command-line-in-linux/ +[1]:https://linux.cn/article-5156-1.html +[2]:https://linux.cn/article-3796-1.html [3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ -[4]:http://www.tecmint.com/install-owncloud-to-create-personal-storage-in-linux/ \ No newline at end of file +[4]:https://linux.cn/article-2494-1.html \ No newline at end of file From a9040f696dadbf92729f7995631a8984c905ecc7 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 1 May 2015 21:44:52 +0800 Subject: [PATCH 136/154] PUB:30 Things to Do After Minimal RHEL or CentOS 7 Installation--6 @ictlyh --- ...inimal RHEL or CentOS 7 Installation--6.md | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) rename {translated/tech => published}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md (72%) diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md similarity index 72% rename from translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md rename to published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md index b9b86ba04a..c2c00c95a6 100644 --- a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md +++ b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md @@ -1,26 +1,27 @@ -安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--6 +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(六) ================================================================================ ### 30. 用密码保护 GRUB ### -用密码保护你的 boot 引导程序这样你就可以在启动时获得额外水平的安全保障。同时你也可以在物理水平获得保护层。通过在引导时给 GRUB 加锁防止任何无授权访问来保护你的服务器。 +用密码保护你的 boot 引导程序这样你就可以在启动时获得额外的安全保障。同时你也可以在实物层面获得保护。通过在引导时给 GRUB 加锁防止任何无授权访问来保护你的服务器。 首先备份两个文件,这样如果有任何错误出现,你可以有回滚的选择。备份 ‘/etc/grub2/grub.cfg’ 为 ‘/etc/grub2/grub.cfg.old’。 # cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.old -同样,备份 ‘/etc/grub.d/10_linux’ 为 ‘/etc/grub.d/10_linux.old’。(这里10_linux下划线不知道怎么弄,请校对的时候注意改正,thx) +同样,备份 ‘/etc/grub.d/10\_linux’ 为 ‘/etc/grub.d/10\_linux.old’。 # cp /etc/grub.d/10_linux /etc/grub.d/10_linux.old -打开文件 ‘/etc/grub.d/10_linux’ 并在文件末尾添加下面一行。 +打开文件 ‘/etc/grub.d/10\_linux’ 并在文件末尾添加下列行。 cat < Date: Fri, 1 May 2015 10:14:17 -0500 Subject: [PATCH 137/154] KevinSJ Translating --- .../share/20150407 10 Truly Amusing Easter Eggs in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md b/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md index 6d02c4cfbb..413d50d6d6 100644 --- a/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md +++ b/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md @@ -1,3 +1,4 @@ +KevinSJ translating 10 Truly Amusing Easter Eggs in Linux ================================================================================ ![](http://en.wikipedia.org/wiki/File:Adventure_Easteregg.PNG) @@ -151,4 +152,4 @@ via: http://www.linux.com/news/software/applications/820944-10-truly-amusing-lin [13]:http://nmap.org/book/output-formats-script-kiddie.html [14]:http://nmap.org/book/output-formats-script-kiddie.html [15]:https://www.youtube.com/watch?v=Ql1uLyuWra8 -[16]:http://en.wikipedia.org/wiki/Neko_%28computer_program%29 \ No newline at end of file +[16]:http://en.wikipedia.org/wiki/Neko_%28computer_program%29 From c7430d4f139defcd6398f200105d04c1e0d6b974 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 2 May 2015 10:32:21 +0800 Subject: [PATCH 138/154] PUB:20150417 14 Useful Examples of Linux 'sort' Command--Part 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @cvsher 翻译的文字组织的很不错,看得出来已经结合自己的 sort 命令使用经验。 --- ...xamples of Linux 'sort' Command--Part 1.md | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) rename translated/tech/[translated]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md => published/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md (63%) diff --git a/translated/tech/[translated]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md b/published/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md similarity index 63% rename from translated/tech/[translated]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md rename to published/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md index 9653302530..c483c4035f 100644 --- a/translated/tech/[translated]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md +++ b/published/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md @@ -1,24 +1,24 @@ -Linux ‘sort’命令的14个有用的范例 -- 第一部分 +Linux 的 ‘sort’命令的14个有用的范例(一) ============================================================= Sort是用于对单个或多个文本文件内容进行排序的Linux程序。Sort命令以空格作为字段分隔符,将一行分割为多个关键字对文件进行排序。需要注意的是除非你将输出重定向到文件中,否则Sort命令并不对文件内容进行实际的排序(即文件内容没有修改),只是将文件内容按有序输出。 本文的目标是通过14个实际的范例让你更深刻的理解如何在Linux中使用sort命令。 -###1. 首先我们将会创建一个用于执行‘sort’命令的文本文件(tecmint.txt)。工作路径是‘/home/$USER/Desktop/tecmint’。### +1、 首先我们将会创建一个用于执行‘sort’命令的文本文件(tecmint.txt)。工作路径是‘/home/$USER/Desktop/tecmint’。 -下面命令中的‘-e’选项将‘/’和‘/n’解析成一个新行 +下面命令中的‘-e’选项将启用‘\\’转义,将‘\n’解析成换行 $ echo -e "computer\nmouse\nLAPTOP\ndata\nRedHat\nlaptop\ndebian\nlaptop" > tecmint.txt ![Split String by Lines in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Split-String-by-Lines.gif) -###2. 在开始学习‘sort’命令前,我们先看看文件的内容及其显示方式。### +2、 在开始学习‘sort’命令前,我们先看看文件的内容及其显示方式。 $ cat tecmint.txt ![Check Content of File](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Content-of-File.gif) -###3. 现在,使用如下命令对文件内容进行排序。### +3、 现在,使用如下命令对文件内容进行排序。 $ sort tecmint.txt @@ -26,30 +26,30 @@ Sort是用于对单个或多个文本文件内容进行排序的Linux程序。So **注意**:上面的命令并不对文件内容进行实际的排序,仅仅是将其内容按有序方式输出。 -###4. 对文件‘tecmint.txt’文件内容排序,并将排序后的内容输出到名为sorted.txt的文件中,然后使用[cat][1]命令查看验证sorted.txt文件的内容。### +4、 对文件‘tecmint.txt’文件内容排序,并将排序后的内容输出到名为sorted.txt的文件中,然后使用[cat][1]命令查看验证sorted.txt文件的内容。 $ sort tecmint.txt > sorted.txt $ cat sorted.txt ![Sort File Content in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-File-Content.gif) -###5. 现在使用‘-r’参数对‘tecmint.txt’文件内容进行逆序排序,并将输出内容重定向到‘reversesorted.txt’文件中,并使用cat命令查看文件的内容。### +5、 现在使用‘-r’参数对‘tecmint.txt’文件内容进行逆序排序,并将输出内容重定向到‘reversesorted.txt’文件中,并使用cat命令查看文件的内容。 $ sort -r tecmint.txt > reversesorted.txt $ cat reversesorted.txt ![Sort Content By Reverse](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Reverse.gif) -###6. 创建一个新文件(lsl.txt),文件内容为在home目录下执行‘ls -l’命令的输出。### +6、 创建一个新文件(lsl.txt),文件内容为在home目录下执行‘ls -l’命令的输出。 $ ls -l /home/$USER > /home/$USER/Desktop/tecmint/lsl.txt $ cat lsl.txt ![Populate Output of Home Directory](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Output.gif) -我们将会看到对其他基础字段进行排序的例子,而不是对默认的初始字符进行排序。 +我们将会看到对其他字段进行排序的例子,而不是对默认的开始字符进行排序。 -###7. 基于第二列(符号连接的数量)对文件‘lsl.txt’进行排序。### +7、 基于第二列(符号连接的数量)对文件‘lsl.txt’进行排序。 $ sort -nk2 lsl.txt @@ -57,19 +57,19 @@ Sort是用于对单个或多个文本文件内容进行排序的Linux程序。So ![Sort Content by Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-by-Column.gif) -###8. 基于第9列(文件和目录的名称,非数值)对文件‘lsl.txt’进行排序。### +8、 基于第9列(文件和目录的名称,非数值)对文件‘lsl.txt’进行排序。 $ sort -k9 lsl.txt ![Sort Content Based on Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-Based-on-Column.gif) -###9. sort命令并非仅能对文件进行排序,我们还可以通过管道将命令的输出内容重定向到sort命令中。### +9、 sort命令并非仅能对文件进行排序,我们还可以通过管道将命令的输出内容重定向到sort命令中。 $ ls -l /home/$USER | sort -nk5 ![Sort Content Using Pipe Option](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Pipeline.gif) -###10. 对文件tecmint.txt进行排序,并删除重复的行。然后检查重复的行是否已经删除了。### +10、 对文件tecmint.txt进行排序,并删除重复的行。然后检查重复的行是否已经删除了。 $ cat tecmint.txt $ sort -u tecmint.txt @@ -78,23 +78,23 @@ Sort是用于对单个或多个文本文件内容进行排序的Linux程序。So 目前我们发现的排序规则: - 除非指定了‘-r’参数,否则排序的优先级按下面规则排序 +除非指定了‘-r’参数,否则排序的优先级按下面规则排序 + - 以数字开头的行优先级最高 - 以小写字母开头的行优先级次之 - 待排序内容按字典序进行排序 - - 默认情况下,‘sort’命令将带排序内容的每行关键字当作一个字符串进行字典序排序(数字优先级最高,参看规则 - 1) + - 默认情况下,‘sort’命令将带排序内容的每行关键字当作一个字符串进行字典序排序(数字优先级最高,参看规则 1) - -###11. 创建文件‘lsla.txt’,其内容用‘ls -la’命令的输出内容填充。### +11、 在当前位置创建第三个文件‘lsla.txt’,其内容用‘ls -lA’命令的输出内容填充。 $ ls -lA /home/$USER > /home/$USER/Desktop/tecmint/lsla.txt $ cat lsla.txt ![Populate Output With Hidden Files](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Output-With-Hidden-Files.gif) -了解ls命令的读者都知道‘ls -la’=‘ls -l’ + 隐藏文件。因此这两个文件的大部分内容都是相同的。 +了解ls命令的读者都知道‘ls -lA’ 等于 ‘ls -l’ + 隐藏文件,所以这两个文件的大部分内容都是相同的。 -###12. 对上面两个文件内容进行排序输出。### +12、 对上面两个文件内容进行排序输出。 $ sort lsl.txt lsla.txt @@ -102,7 +102,7 @@ Sort是用于对单个或多个文本文件内容进行排序的Linux程序。So 注意文件和目录的重复 -###13. 现在我们看看怎样对两个文件进行排序、合并,并且删除重复行。### +13、 现在我们看看怎样对两个文件进行排序、合并,并且删除重复行。 $ sort -u lsl.txt lsla.txt @@ -110,13 +110,13 @@ Sort是用于对单个或多个文本文件内容进行排序的Linux程序。So 此时,我们注意到重复的行已经被删除了,我们可以将输出内容重定向到文件中。 -###14. 我们同样可以基于多列对文件内容进行排序。基于第2,5(数值)和9(非数值)列对‘ls -l’命令的输出进行排序。### +14、 我们同样可以基于多列对文件内容进行排序。基于第2,5(数值)和9(非数值)列对‘ls -l’命令的输出进行排序。 $ ls -l /home/$USER | sort -t "," -nk2,5 -k9 ![Sort Content By Field Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Field-Column.gif) -先到此为止了,在接下来的文章中我们将会学习到‘sort’命令更多的详细例子。届时敬请关注Tecmint。保持分享精神。若喜欢本文,敬请将本文分享给你的朋友。 +先到此为止了,在接下来的文章中我们将会学习到‘sort’命令更多的详细例子。届时敬请关注我们。保持分享精神。若喜欢本文,敬请将本文分享给你的朋友。 -------------------------------------------------------------------------------- @@ -124,7 +124,7 @@ via: http://www.tecmint.com/sort-command-linux/ 作者:[Avishek Kumar][a] 译者:[cvsher](https://github.com/cvsher) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 16a662924cb3eb651a1bfcae6f9a7c7fd192cfd2 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 2 May 2015 10:57:36 +0800 Subject: [PATCH 139/154] PUB:20150420 7 Interesting Linux 'sort' Command Examples--Part 2 @DongShuaike --- ...g Linux 'sort' Command Examples--Part 2.md | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) rename {translated/tech => published}/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md (62%) diff --git a/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md b/published/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md similarity index 62% rename from translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md rename to published/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md index 4602424a3a..476274b495 100644 --- a/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md +++ b/published/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md @@ -1,11 +1,10 @@ - -Linux 'sort'命令的七个有趣实例-第二部分 +Linux 的 'sort'命令的七个有趣实例(二) ================================================================================ -在上一篇文章里,我们已经探讨了关于sort命令的多个例子,如果你错过了这篇文章,可以点击下面的链接进行阅读。今天的这篇文章作为上一篇文章的继续,将讨论关于sort命令的剩余用法,与上一篇一起作为Linux ‘sort’命令的完整指南。 -注:前两天做过这个原文 -- [14 ‘sort’ Command Examples in Linux][1] -- +在[上一篇文章][1]里,我们已经探讨了关于sort命令的多个例子,如果你错过了这篇文章,可以点击下面的链接进行阅读。今天的这篇文章作为上一篇文章的继续,将讨论关于sort命令的剩余用法,与上一篇一起作为Linux ‘sort’命令的完整指南。 + +- [Linux 的 ‘sort’命令的14个有用的范例(一)][1] + 在我们继续深入之前,先创建一个文本文档‘month.txt’,并且将上一次给出的数据填进去。 $ echo -e "mar\ndec\noct\nsep\nfeb\naug" > month.txt @@ -13,7 +12,7 @@ Linux 'sort'命令的七个有趣实例-第二部分 ![Populate Content](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Content.gif) -### 15. 通过使用’M‘选项,对’month.txt‘文件按照月份顺序进行排序。### +15、 通过使用’M‘选项,对’month.txt‘文件按照月份顺序进行排序。 $ sort -M month.txt @@ -21,14 +20,14 @@ Linux 'sort'命令的七个有趣实例-第二部分 ![Sort File Content by Month in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-by-Month.gif) -### 16. 把数据整理成方便人们阅读的形式,比如1K、2M、3G、2T,这里面的K、G、M、T代表千、兆、吉、梯。 -(译者注:好像这个选项并不是所有Linu版本都有,而且也没有实现按KMGT显示。) +16、 把数据整理成方便人们阅读的形式,比如1K、2M、3G、2T,这里面的K、G、M、T代表千、兆、吉、梯。 +(LCTT 译注:此处命令有误,ls 命令应该增加 -h 参数,径改之) - $ ls -l /home/$USER | sort -h -k5 + $ ls -lh /home/$USER | sort -h -k5 ![Sort Content Human Readable Format](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-Human-Readable-Format.gif) -### 17. 在上一篇文章中,我们在例子4中创建了一个名为‘sorted.txt’的文件,在例子6中创建了一个‘lsl.txt’。‘sorted.txt'已经排好序了而’lsl.txt‘还没有。让我们使用sort命令来检查两个文件是否已经排好序。### +17、 在上一篇文章中,我们在例子4中创建了一个名为‘sorted.txt’的文件,在例子6中创建了一个‘lsl.txt’。‘sorted.txt'已经排好序了而’lsl.txt‘还没有。让我们使用sort命令来检查两个文件是否已经排好序。 $ sort -c sorted.txt @@ -40,14 +39,14 @@ Linux 'sort'命令的七个有趣实例-第二部分 ![Check File Sorted Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-Sorted-Status.gif) -Reports Disorder. Conflict.. 报告无序。存在矛盾…… -### 18. 如果文字之间的分隔符是空格,sort命令自动地将横向空格后的东西当做一个新文字单元,如果分隔符不是空格呢?### +18、 如果文字之间的分隔符是空格,sort命令自动地将空格后的东西当做一个新文字单元,如果分隔符不是空格呢? 考虑这样一个文本文件,里面的内容可以由除了空格之外的任何符号分隔,比如‘|’,‘\’,‘+’,‘.’等…… 创建一个分隔符为+的文本文件。使用‘cat‘命令查看文件内容。 + $ echo -e "21+linux+server+production\n11+debian+RedHat+CentOS\n131+Apache+Mysql+PHP\n7+Shell Scripting+python+perl\n111+postfix+exim+sendmail" > delimiter.txt ---------- @@ -66,9 +65,9 @@ Reports Disorder. Conflict.. ![Sort Content By Non Numeric](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Non-Numeric.gif) -如果分隔符是Tab,你需要在’+‘的位置上用$’\t’代替,如上例所示。 +如果分隔符是制表符,你需要在’+‘的位置上用$’\t’代替,如上例所示。 -### 19. 对主用户目录下使用‘ls -l’命令得到的结果基于第五列——‘数据的大小’进行一个乱序排列。 +19、 对主用户目录下使用‘ls -l’命令得到的结果基于第五列(‘文件大小’)进行一个乱序排列。 $ ls -l /home/avi/ | sort -k5 -R @@ -76,28 +75,30 @@ Reports Disorder. Conflict.. 每一次你运行上面的脚本,你得到结果可能都不一样,因为结果是随机生成的。 - 正如我在上一篇文章中提到的规则2所说——相比于大写字母,sort命令更喜欢以小写字母开始的行。看一下上一篇文章的例3,字符串‘laptop’在‘LAPTOP’前出现。 +正如我在上一篇文章中提到的规则2所说——sort命令会将以小写字母开始的行排在大写字母开始的行前面。看一下上一篇文章的例3,字符串‘laptop’在‘LAPTOP’前出现。 -### 20. 如何覆盖默认的排序优先权?在这之前我们需要先将环境变量LC_ALL的值设置为C。在命令行提示栏中运行下面的代码。### +20、 如何覆盖默认的排序优先权?在这之前我们需要先将环境变量LC_ALL的值设置为C。在命令行提示栏中运行下面的代码。 $ export LC_ALL=C -然后以重写默认优先权的方式对‘tecmint.txt’文件重新排序。 +然后以非默认优先权的方式对‘tecmint.txt’文件重新排序。 $ sort tecmint.txt ![Override Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Override-Sorting-Preferences.gif) -重写排序优先权 -不要忘记与example 3中得到的输出结果做比较,并且你可以使用‘-f’选项,又叫‘-ignore-case’来获取非常有序的输出。 +*覆盖排序优先权* + +不要忘记与example 3中得到的输出结果做比较,并且你可以使用‘-f’,又叫‘-ignore-case’(忽略大小写)的选项来获取更有序的输出。 $ sort -f tecmint.txt ![Compare Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Compare-Sorting-Preferences.gif) -### 21. 给两个输入文件进行‘sort‘,然后一口气把它们连接起来怎么样?### +21、 给两个输入文件进行‘sort‘,然后把它们连接成一行! 我们创建两个文本文档’file1.txt‘以及’file2.txt‘,并用数据填充,如下所示,并用’cat‘命令查看文件的内容。 + $ echo -e “5 Reliable\n2 Fast\n3 Secure\n1 open-source\n4 customizable” > file1.txt $ cat file1.txt @@ -117,7 +118,7 @@ Reports Disorder. Conflict.. ![Sort Join Two Files](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Join-Two-Files.gif) -我所要讲的全部内容就在这里了,希望与各位保持联系,也希望各位经常来Tecmint逛逛。有反馈就在下面评论吧。 +我所要讲的全部内容就在这里了,希望与各位保持联系,也希望各位经常来逛逛。有反馈就在下面评论吧。 -------------------------------------------------------------------------------- @@ -125,7 +126,7 @@ via: http://www.tecmint.com/linux-sort-command-examples/ 作者:[Avishek Kumar][a] 译者:[DongShuaike](https://github.com/DongShuaike) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b57b875015d29b94152644d7e5ece309185b8409 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 3 May 2015 18:07:35 +0800 Subject: [PATCH 140/154] PUB:20150415 Strong SSL Security on nginx @wxy --- .../20150415 Strong SSL Security on nginx.md | 290 ++++++++++++++++++ .../20150415 Strong SSL Security on nginx.md | 290 ------------------ 2 files changed, 290 insertions(+), 290 deletions(-) create mode 100644 published/20150415 Strong SSL Security on nginx.md delete mode 100644 sources/tech/20150415 Strong SSL Security on nginx.md diff --git a/published/20150415 Strong SSL Security on nginx.md b/published/20150415 Strong SSL Security on nginx.md new file mode 100644 index 0000000000..094c50bd37 --- /dev/null +++ b/published/20150415 Strong SSL Security on nginx.md @@ -0,0 +1,290 @@ +增强 nginx 的 SSL 安全性 +================================================================================ +[![](https://raymii.org/s/inc/img/ssl-labs-a.png)][1] + +本文向你介绍如何在 nginx 服务器上设置健壮的 SSL 安全机制。我们通过禁用 SSL 压缩来降低 CRIME 攻击威胁;禁用协议上存在安全缺陷的 SSLv3 及更低版本,并设置更健壮的加密套件(cipher suite)来尽可能启用前向安全性(Forward Secrecy);此外,我们还启用了 HSTS 和 HPKP。这样我们就拥有了一个健壮而可经受考验的 SSL 配置,并可以在 Qually Labs 的 SSL 测试中得到 A 级评分。 + +如果不求甚解的话,可以从 [https://cipherli.st][2] 上找到 nginx 、Apache 和 Lighttpd 的安全设置,复制粘帖即可。 + +本教程在 Digital Ocean 的 VPS 上测试通过。如果你喜欢这篇教程,想要支持作者的站点的话,购买 Digital Ocean 的 VPS 时请使用如下链接:[https://www.digitalocean.com/?refcode=7435ae6b8212][3] 。 + +本教程可以通过[发布于 2014/1/21 的][4] SSL 实验室测试的严格要求(我之前就通过了测试,如果你按照本文操作就可以得到一个 A+ 评分)。 + +- [本教程也可用于 Apache ][5] +- [本教程也可用于 Lighttpd ][6] +- [本教程也可用于 FreeBSD, NetBSD 和 OpenBSD 上的 nginx ,放在 BSD Now 播客上][7]: [http://www.bsdnow.tv/tutorials/nginx][8] + +你可以从下列链接中找到这方面的进一步内容: + +- [野兽攻击(BEAST)][9] +- [罪恶攻击(CRIME)][10] +- [怪物攻击(FREAK )][11] +- [心血漏洞(Heartbleed)][12] +- [完备的前向安全性(Perfect Forward Secrecy)][13] +- [RC4 和 BEAST 的处理][14] + +我们需要编辑 nginx 的配置,在 Ubuntu/Debian 上是 `/etc/nginx/sited-enabled/yoursite.com`,在 RHEL/CentOS 上是 `/etc/nginx/conf.d/nginx.conf`。 + +本文中,我们需要编辑443端口(SSL)的 `server` 配置中的部分。在文末你可以看到完整的配置例子。 + +*在编辑之前切记备份一下配置文件!* + +### 野兽攻击(BEAST)和 RC4 ### + +简单的说,野兽攻击(BEAST)就是通过篡改一个加密算法的 CBC(密码块链)的模式,从而可以对部分编码流量悄悄解码。更多信息参照上面的链接。 + +针对野兽攻击(BEAST),较新的浏览器已经启用了客户端缓解方案。推荐方案是禁用 TLS 1.0 的所有加密算法,仅允许 RC4 算法。然而,[针对 RC4 算法的攻击也越来越多](http://www.isg.rhul.ac.uk/tls/) ,很多已经从理论上逐步发展为实际可行的攻击方式。此外,有理由相信 NSA 已经实现了他们所谓的“大突破”——攻破 RC4 。 + +禁用 RC4 会有几个后果。其一,当用户使用老旧的浏览器时,比如 Windows XP 上的 IE 会用 3DES 来替代 RC4。3DES 要比 RC4 更安全,但是它的计算成本更高,你的服务器就需要为这些用户付出更多的处理成本。其二,RC4 算法能减轻 野兽攻击(BEAST)的危害,如果禁用 RC4 会导致 TLS 1.0 用户会换到更容易受攻击的 AES-CBC 算法上(通常服务器端的对野兽攻击(BEAST)的“修复方法”是让 RC4 优先于其它算法)。我认为 RC4 的风险要高于野兽攻击(BEAST)的风险。事实上,有了客户端缓解方案(Chrome 和 Firefox 提供了缓解方案),野兽攻击(BEAST)就不是什么大问题了。而 RC4 的风险却在增长:随着时间推移,对加密算法的破解会越来越多。 + +### 怪物攻击(FREAK) ### + +怪物攻击(FREAK)是一种中间人攻击,它是由来自 [INRIA、微软研究院和 IMDEA][15] 的密码学家们所发现的。怪物攻击(FREAK)的缩写来自“Factoring RSA-EXPORT Keys(RSA 出口密钥因子分解)” + +这个漏洞可上溯到上世纪九十年代,当时美国政府禁止出口加密软件,除非其使用编码密钥长度不超过512位的出口加密套件。 + +这造成了一些现在的 TLS 客户端存在一个缺陷,这些客户端包括: 苹果的 SecureTransport 、OpenSSL。这个缺陷会导致它们会接受出口降级 RSA 密钥,即便客户端并没有要求使用出口降级 RSA 密钥。这个缺陷带来的影响很讨厌:在客户端存在缺陷,且服务器支持出口降级 RSA 密钥时,会发生中间人攻击,从而导致连接的强度降低。 + +攻击分为两个组成部分:首先是服务器必须接受“出口降级 RSA 密钥”。 + +中间人攻击可以按如下流程: + +- 在客户端的 Hello 消息中,要求标准的 RSA 加密套件。 +- 中间人攻击者修改该消息为‘export RSA’(输出级 RSA 密钥)。 +- 服务器回应一个512位的输出级 RSA 密钥,并以其长期密钥签名。 +- 由于 OpenSSL/SecureTransport 的缺陷,客户端会接受这个弱密钥。 +- 攻击者根据 RSA 模数分解因子来恢复相应的 RSA 解密密钥。 +- 当客户端编码‘pre-master secret’(预主密码)给服务器时,攻击者现在就可以解码它并恢复 TLS 的‘master secret’(主密码)。 +- 从这里开始,攻击者就能看到了传输的明文并注入任何东西了。 + +本文所提供的加密套件不启用输出降级加密,请确认你的 OpenSSL 是最新的,也强烈建议你将客户端也升级到新的版本。 + +### 心血漏洞(Heartbleed) ### + +心血漏洞(Heartbleed) 是一个于2014年4月公布的 OpenSSL 加密库的漏洞,它是一个被广泛使用的传输层安全(TLS)协议的实现。无论是服务器端还是客户端在 TLS 中使用了有缺陷的 OpenSSL,都可以被利用该缺陷。由于它是因 DTLS 心跳扩展(RFC 6520)中的输入验证不正确(缺少了边界检查)而导致的,所以该漏洞根据“心跳”而命名。这个漏洞是一种缓存区超读漏洞,它可以读取到本不应该读取的数据。 + +哪个版本的 OpenSSL 受到心血漏洞(Heartbleed)的影响? + +各版本情况如下: + +- OpenSSL 1.0.1 直到 1.0.1f (包括)**存在**该缺陷 +- OpenSSL 1.0.1g **没有**该缺陷 +- OpenSSL 1.0.0 分支**没有**该缺陷 +- OpenSSL 0.9.8 分支**没有**该缺陷 + +这个缺陷是2011年12月引入到 OpenSSL 中的,并随着 2012年3月14日 OpenSSL 发布的 1.0.1 而泛滥。2014年4月7日发布的 OpenSSL 1.0.1g 修复了该漏洞。 + +升级你的 OpenSSL 就可以避免该缺陷。 + +### SSL 压缩(罪恶攻击 CRIME) ### + +罪恶攻击(CRIME)使用 SSL 压缩来完成它的魔法,SSL 压缩在下述版本是默认关闭的: nginx 1.1.6及更高/1.0.9及更高(如果使用了 OpenSSL 1.0.0及更高), nginx 1.3.2及更高/1.2.2及更高(如果使用较旧版本的 OpenSSL)。 + +如果你使用一个早期版本的 nginx 或 OpenSSL,而且你的发行版没有向后移植该选项,那么你需要重新编译没有一个 ZLIB 支持的 OpenSSL。这会禁止 OpenSSL 使用 DEFLATE 压缩方式。如果你禁用了这个,你仍然可以使用常规的 HTML DEFLATE 压缩。 + +### SSLv2 和 SSLv3 ### + +SSLv2 是不安全的,所以我们需要禁用它。我们也禁用 SSLv3,因为 TLS 1.0 在遭受到降级攻击时,会允许攻击者强制连接使用 SSLv3,从而禁用了前向安全性(forward secrecy)。 + +如下编辑配置文件: + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + +### 卷毛狗攻击(POODLE)和 TLS-FALLBACK-SCSV ### + +SSLv3 会受到[卷毛狗漏洞(POODLE)][16]的攻击。这是禁用 SSLv3 的主要原因之一。 + +Google 提出了一个名为 [TLS\_FALLBACK\_SCSV][17] 的SSL/TLS 扩展,它用于防止强制 SSL 降级。如果你升级 到下述的 OpenSSL 版本会自动启用它。 + +- OpenSSL 1.0.1 带有 TLS\_FALLBACK\_SCSV 1.0.1j 及更高。 +- OpenSSL 1.0.0 带有 TLS\_FALLBACK\_SCSV 1.0.0o 及更高。 +- OpenSSL 0.9.8 带有 TLS\_FALLBACK\_SCSV 0.9.8zc 及更高。 + +[更多信息请参照 NGINX 文档][18]。 + +### 加密套件(cipher suite) ### + +前向安全性(Forward Secrecy)用于在长期密钥被破解时确保会话密钥的完整性。PFS(完备的前向安全性)是指强制在每个/每次会话中推导新的密钥。 + +这就是说,泄露的私钥并不能用来解密(之前)记录下来的 SSL 通讯。 + +提供PFS(完备的前向安全性)功能的是那些使用了一种 Diffie-Hellman 密钥交换的短暂形式的加密套件。它们的缺点是系统开销较大,不过可以使用椭圆曲线的变体来改进。 + +以下两个加密套件是我推荐的,之后[Mozilla 基金会][19]也推荐了。 + +推荐的加密套件: + + ssl_ciphers 'AES128+EECDH:AES128+EDH'; + +向后兼容的推荐的加密套件(IE6/WinXP): + + ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + +如果你的 OpenSSL 版本比较旧,不可用的加密算法会自动丢弃。应该一直使用上述的完整套件,让 OpenSSL 选择一个它所支持的。 + +加密套件的顺序是非常重要的,因为其决定了优先选择哪个算法。上述优先推荐的算法中提供了PFS(完备的前向安全性)。 + +较旧版本的 OpenSSL 也许不能支持这个算法的完整列表,AES-GCM 和一些 ECDHE 算法是相当新的,在 Ubuntu 和 RHEL 中所带的绝大多数 OpenSSL 版本中不支持。 + +#### 优先顺序的逻辑 #### + +- ECDHE+AESGCM 加密是首选的。它们是 TLS 1.2 加密算法,现在还没有广泛支持。当前还没有对它们的已知攻击。 +- PFS 加密套件好一些,首选 ECDHE,然后是 DHE。 +- AES 128 要好于 AES 256。有一个关于 AES256 带来的安全提升程度是否值回成本的[讨论][20],结果是显而易见的。目前,AES128 要更值一些,因为它提供了不错的安全水准,确实很快,而且看起来对时序攻击更有抵抗力。 +- 在向后兼容的加密套件里面,AES 要优于 3DES。在 TLS 1.1及其以上,减轻了针对 AES 的野兽攻击(BEAST)的威胁,而在 TLS 1.0上则难以实现该攻击。在非向后兼容的加密套件里面,不支持 3DES。 +- RC4 整个不支持了。3DES 用于向后兼容。参看 [#RC4\_weaknesses][21] 中的讨论。 + +#### 强制丢弃的算法 #### + +- aNULL 包含了非验证的 Diffie-Hellman 密钥交换,这会受到中间人(MITM)攻击 +- eNULL 包含了无加密的算法(明文) +- EXPORT 是老旧的弱加密算法,是被美国法律标示为可出口的 +- RC4 包含的加密算法使用了已弃用的 ARCFOUR 算法 +- DES 包含的加密算法使用了弃用的数据加密标准(DES) +- SSLv2 包含了定义在旧版本 SSL 标准中的所有算法,现已弃用 +- MD5 包含了使用已弃用的 MD5 作为哈希算法的所有算法 + +### 更多设置 ### + +确保你也添加了如下行: + + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + +在一个 SSLv3 或 TLSv1 握手过程中选择一个加密算法时,一般使用客户端的首选算法。如果设置了上述配置,则会替代地使用服务器端的首选算法。 + +- [关于 ssl\_prefer\_server\_ciphers 的更多信息][22] +- [关于 ssl\_ciphers 的更多信息][23] + +### 前向安全性和 Diffie Hellman Ephemeral (DHE)参数 ### + +前向安全性(Forward Secrecy)的概念很简单:客户端和服务器协商一个永不重用的密钥,并在会话结束时销毁它。服务器上的 RSA 私钥用于客户端和服务器之间的 Diffie-Hellman 密钥交换签名。从 Diffie-Hellman 握手中获取的预主密钥会用于之后的编码。因为预主密钥是特定于客户端和服务器之间建立的某个连接,并且只用在一个限定的时间内,所以称作短暂模式(Ephemeral)。 + +使用了前向安全性,如果一个攻击者取得了一个服务器的私钥,他是不能解码之前的通讯信息的。这个私钥仅用于 Diffie Hellman 握手签名,并不会泄露预主密钥。Diffie Hellman 算法会确保预主密钥绝不会离开客户端和服务器,而且不能被中间人攻击所拦截。 + +所有版本的 nginx(如1.4.4)都依赖于 OpenSSL 给 Diffie-Hellman (DH)的输入参数。不幸的是,这意味着 Diffie-Hellman Ephemeral(DHE)将使用 OpenSSL 的默认设置,包括一个用于密钥交换的1024位密钥。因为我们正在使用2048位证书,DHE 客户端就会使用一个要比非 DHE 客户端更弱的密钥交换。 + +我们需要生成一个更强壮的 DHE 参数: + + cd /etc/ssl/certs + openssl dhparam -out dhparam.pem 4096 + +然后告诉 nginx 将其用作 DHE 密钥交换: + + ssl_dhparam /etc/ssl/certs/dhparam.pem; + +### OCSP 装订(Stapling) ### + +当连接到一个服务器时,客户端应该使用证书吊销列表(CRL)或在线证书状态协议(OCSP)记录来校验服务器证书的有效性。CRL 的问题是它已经增长的太大了,永远也下载不完了。 + +OCSP 更轻量级一些,因为我们每次只请求一条记录。但是副作用是当连接到一个服务器时必须对第三方 OCSP 响应器发起 OCSP 请求,这就增加了延迟和带来了潜在隐患。事实上,CA 所运营的 OCSP 响应器非常不可靠,浏览器如果不能及时收到答复,就会静默失败。攻击者通过 DoS 攻击一个 OCSP 响应器可以禁用其校验功能,这样就降低了安全性。 + +解决方法是允许服务器在 TLS 握手中发送缓存的 OCSP 记录,以绕开 OCSP 响应器。这个机制节省了客户端和 OCSP 响应器之间的通讯,称作 OCSP 装订。 + +客户端会在它的 CLIENT HELLO 中告知其支持 status\_request TLS 扩展,服务器仅在客户端请求它的时候才发送缓存的 OCSP 响应。 + +大多数服务器最多会缓存 OCSP 响应48小时。服务器会按照常规的间隔连接到 CA 的 OCSP 响应器来获取刷新的 OCSP 记录。OCSP 响应器的位置可以从签名的证书中的授权信息访问(Authority Information Access)字段中获得。 + +- [阅读我的教程:在 NGINX 中启用 OCSP 装订][24] + +### HTTP 严格传输安全(HSTS) ### + +如有可能,你应该启用 [HTTP 严格传输安全(HSTS)][25],它会引导浏览器和你的站点之间的通讯仅通过 HTTPS。 + +- [阅读我关于 HSTS 的文章,了解如何配置它][26] + +### HTTP 公钥固定扩展(HPKP) ### + +你也应该启用 [HTTP 公钥固定扩展(HPKP)][27]。 + +公钥固定的意思是一个证书链必须包括一个白名单中的公钥。它确保仅有白名单中的 CA 才能够为某个域名签署证书,而不是你的浏览器中存储的任何 CA。 + +我已经写了一篇[关于 HPKP 的背景理论及在 Apache、Lighttpd 和 NGINX 中配置例子的文章][28]。 + +### 配置范例 ### + + server { + + listen [::]:443 default_server; + + ssl on; + ssl_certificate_key /etc/ssl/cert/raymii_org.pem; + ssl_certificate /etc/ssl/cert/ca-bundle.pem; + + ssl_ciphers 'AES128+EECDH:AES128+EDH:!aNULL'; + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_session_cache shared:SSL:10m; + + ssl_stapling on; + ssl_stapling_verify on; + resolver 8.8.4.4 8.8.8.8 valid=300s; + resolver_timeout 10s; + + ssl_prefer_server_ciphers on; + ssl_dhparam /etc/ssl/certs/dhparam.pem; + + add_header Strict-Transport-Security max-age=63072000; + add_header X-Frame-Options DENY; + add_header X-Content-Type-Options nosniff; + + root /var/www/; + index index.html index.htm; + server_name raymii.org; + + } + +### 结尾 ### + +如果你使用了上述配置,你需要重启 nginx: + + # 首先检查配置文件是否正确 + /etc/init.d/nginx configtest + # 然后重启 + /etc/init.d/nginx restart + +现在使用 [SSL Labs 测试][29]来看看你是否能得到一个漂亮的“A”。当然了,你也得到了一个安全的、强壮的、经得起考验的 SSL 配置! + +- [参考 Mozilla 关于这方面的内容][30] + +-------------------------------------------------------------------------------- + +via: https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html + +作者:[Remy van Elst][a] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://raymii.org/ +[1]:https://www.ssllabs.com/ssltest/analyze.html?d=raymii.org +[2]:https://cipherli.st/ +[3]:https://www.digitalocean.com/?refcode=7435ae6b8212 +[4]:http://blog.ivanristic.com/2014/01/ssl-labs-stricter-security-requirements-for-2014.html +[5]:https://raymii.org/s/tutorials/Strong_SSL_Security_On_Apache2.html +[6]:https://raymii.org/s/tutorials/Pass_the_SSL_Labs_Test_on_Lighttpd_%28Mitigate_the_CRIME_and_BEAST_attack_-_Disable_SSLv2_-_Enable_PFS%29.html +[7]:http://www.bsdnow.tv/episodes/2014_08_20-engineering_nginx +[8]:http://www.bsdnow.tv/tutorials/nginx +[9]:https://en.wikipedia.org/wiki/Transport_Layer_Security#BEAST_attack +[10]:https://en.wikipedia.org/wiki/CRIME_%28security_exploit%29 +[11]:http://blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html +[12]:http://heartbleed.com/ +[13]:https://en.wikipedia.org/wiki/Perfect_forward_secrecy +[14]:https://en.wikipedia.org/wiki/Transport_Layer_Security#Dealing_with_RC4_and_BEAST +[15]:https://www.smacktls.com/ +[16]:https://raymii.org/s/articles/Check_servers_for_the_Poodle_bug.html +[17]:https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00 +[18]:http://wiki.nginx.org/HttpSslModule#ssl_protocols +[19]:https://wiki.mozilla.org/Security/Server_Side_TLS +[20]:http://www.mail-archive.com/dev-tech-crypto@lists.mozilla.org/msg11247.html +[21]:https://wiki.mozilla.org/Security/Server_Side_TLS#RC4_weaknesses +[22]:http://wiki.nginx.org/HttpSslModule#ssl_prefer_server_ciphers +[23]:http://wiki.nginx.org/HttpSslModule#ssl_ciphers +[24]:https://raymii.org/s/tutorials/OCSP_Stapling_on_nginx.html +[25]:https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security +[26]:https://linux.cn/article-5266-1.html +[27]:https://wiki.mozilla.org/SecurityEngineering/Public_Key_Pinning +[28]:https://linux.cn/article-5282-1.html +[29]:https://www.ssllabs.com/ssltest/ +[30]:https://wiki.mozilla.org/Security/Server_Side_TLS \ No newline at end of file diff --git a/sources/tech/20150415 Strong SSL Security on nginx.md b/sources/tech/20150415 Strong SSL Security on nginx.md deleted file mode 100644 index 7ee87bc0d7..0000000000 --- a/sources/tech/20150415 Strong SSL Security on nginx.md +++ /dev/null @@ -1,290 +0,0 @@ -增强 nginx 的 SSL 安全性 -================================================================================ -[![](https://raymii.org/s/inc/img/ssl-labs-a.png)][1] - -本文向你介绍如何在 nginx 服务器上设置高安全性的 SSL。我们通过取消 SSL 压缩降低 CRIME 攻击威胁;禁用协议上存在安全缺陷的 SSLv3 及更低版本,并设置更健壮的加密套件来尽可能启用正向保密(Forward Secrecy);我们也启用了 HSTS 和 HPKP。这样我们就拥有了一个健壮而可经受考验的 SSL 配置,并可以在 Qually Labs 的 SSL 测试中得到 A 级评分。 - -不求甚解的话,可以从 [https://cipherli.st][2] 上找到 nginx 、Apache 和 Lighttpd 的安全设置,复制粘帖即可。 - -本教程在 Digital Ocean 的 VPS 上测试通过。如果你喜欢这篇教程,想要支持作者的站点的话,购买 Digital Ocean 的 VPS 时请使用如下链接:[https://www.digitalocean.com/?refcode=7435ae6b8212][3] 。 - -本教程可以通过[发布于 2014/1/21 的][4] SSL 实验室测试的严格要求(之前就通过了测试,如果你按照本文进行的话,可以得到一个 A+ 评分)。 - -- [本教程也有对应 Apache 的][5] -- [本教程也有对应 Lighttpd 的][6] -- [本教程也有对应 FreeBSD, NetBSD 和 OpenBSD 上的 nginx 的,放在 BSD Now 播客][7]: [http://www.bsdnow.tv/tutorials/nginx][8] - -你可以从下列链接中找到这方面的进一步内容: - -- [BEAST 攻击][9] -- [CRIME 攻击][10] -- [FREAK 攻击][11] -- [心血漏洞][12] -- [完美正向保密][13] -- [RC4 和 BEAST 的处理][14] - -我们需要编辑 nginx 的配置,在 Ubuntu/Debian 上是 `/etc/nginx/sited-enabled/yoursite.com`,在 RHEL/CentOS 上是 `/etc/nginx/conf.d/nginx.conf` - -本文中,我们需要编辑443端口(SSL)的 `server` 配置中的部分。在文末我们会给出完整的配置例子。 - -*在编辑之前切记备份一下配置文件!* - -### The BEAST attack and RC4 ### - -In short, by tampering with an encryption algorithm's CBC - cipher block chaining - mode's, portions of the encrypted traffic can be secretly decrypted. More info on the above link. - -Recent browser versions have enabled client side mitigation for the beast attack. The recommendation was to disable all TLS 1.0 ciphers and only offer RC4. However, [RC4 has a growing list of attacks against it],(http://www.isg.rhul.ac.uk/tls/) many of which have crossed the line from theoretical to practical. Moreover, there is reason to believe that the NSA has broken RC4, their so-called "big breakthrough." - -Disabling RC4 has several ramifications. One, users with shitty browsers such as Internet Explorer on Windows XP will use 3DES in lieu. Triple-DES is more secure than RC4, but it is significantly more expensive. Your server will pay the cost for these users. Two, RC4 mitigates BEAST. Thus, disabling RC4 makes TLS 1.0 users susceptible to that attack, by moving them to AES-CBC (the usual server-side BEAST "fix" is to prioritize RC4 above all else). I am confident that the flaws in RC4 significantly outweigh the risks from BEAST. Indeed, with client-side mitigation (which Chrome and Firefox both provide), BEAST is a nonissue. But the risk from RC4 only grows: More cryptanalysis will surface over time. - -### Factoring RSA-EXPORT Keys (FREAK) ### - -FREAK is a man-in-the-middle (MITM) vulnerability discovered by a group of cryptographers at [INRIA, Microsoft Research and IMDEA][15]. FREAK stands for "Factoring RSA-EXPORT Keys." - -The vulnerability dates back to the 1990s, when the US government banned selling crypto software overseas, unless it used export cipher suites which involved encryption keys no longer than 512-bits. - -It turns out that some modern TLS clients - including Apple's SecureTransport and OpenSSL - have a bug in them. This bug causes them to accept RSA export-grade keys even when the client didn't ask for export-grade RSA. The impact of this bug can be quite nasty: it admits a 'man in the middle' attack whereby an active attacker can force down the quality of a connection, provided that the client is vulnerable and the server supports export RSA. - -There are two parts of the attack as the server must also accept "export grade RSA." - -The MITM attack works as follows: - -- In the client's Hello message, it asks for a standard 'RSA' ciphersuite. -- The MITM attacker changes this message to ask for 'export RSA'. -- The server responds with a 512-bit export RSA key, signed with its long-term key. -- The client accepts this weak key due to the OpenSSL/SecureTransport bug. -- The attacker factors the RSA modulus to recover the corresponding RSA decryption key. -- When the client encrypts the 'pre-master secret' to the server, the attacker can now decrypt it to recover the TLS 'master secret'. -- From here on out, the attacker sees plaintext and can inject anything it wants. - -The ciphersuite offered here on this page does not enable EXPORT grade ciphers. Make sure your OpenSSL is updated to the latest available version and urge your clients to also use upgraded software. - -### Heartbleed ### - -Heartbleed is a security bug disclosed in April 2014 in the OpenSSL cryptography library, which is a widely used implementation of the Transport Layer Security (TLS) protocol. Heartbleed may be exploited regardless of whether the party using a vulnerable OpenSSL instance for TLS is a server or a client. It results from improper input validation (due to a missing bounds check) in the implementation of the DTLS heartbeat extension (RFC6520), thus the bug's name derives from "heartbeat". The vulnerability is classified as a buffer over-read, a situation where more data can be read than should be allowed. - -What versions of the OpenSSL are affected by Heartbleed? - -Status of different versions: - -- OpenSSL 1.0.1 through 1.0.1f (inclusive) are vulnerable -- OpenSSL 1.0.1g is NOT vulnerable -- OpenSSL 1.0.0 branch is NOT vulnerable -- OpenSSL 0.9.8 branch is NOT vulnerable - -The bug was introduced to OpenSSL in December 2011 and has been out in the wild since OpenSSL release 1.0.1 on 14th of March 2012. OpenSSL 1.0.1g released on 7th of April 2014 fixes the bug. - -By updating OpenSSL you are not vulnerable to this bug. - -### SSL Compression (CRIME attack) ### - -The CRIME attack uses SSL Compression to do its magic. SSL compression is turned off by default in nginx 1.1.6+/1.0.9+ (if OpenSSL 1.0.0+ used) and nginx 1.3.2+/1.2.2+ (if older versions of OpenSSL are used). - -If you are using al earlier version of nginx or OpenSSL and your distro has not backported this option then you need to recompile OpenSSL without ZLIB support. This will disable the use of OpenSSL using the DEFLATE compression method. If you do this then you can still use regular HTML DEFLATE compression. - -### SSLv2 and SSLv3 ### - -SSL v2 is insecure, so we need to disable it. We also disable SSLv3, as TLS 1.0 suffers a downgrade attack, allowing an attacker to force a connection to use SSLv3 and therefore disable forward secrecy. - -Again edit the config file: - - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - -### Poodle and TLS-FALLBACK-SCSV ### - -SSLv3 allows exploiting of the [POODLE][16] bug. This is one more major reason to disable this. - -Google have proposed an extension to SSL/TLS named [TLSFALLBACKSCSV][17] that seeks to prevent forced SSL downgrades. This is automatically enabled if you upgrade OpenSSL to the following versions: - -- OpenSSL 1.0.1 has TLSFALLBACKSCSV in 1.0.1j and higher. -- OpenSSL 1.0.0 has TLSFALLBACKSCSV in 1.0.0o and higher. -- OpenSSL 0.9.8 has TLSFALLBACKSCSV in 0.9.8zc and higher. - -[More info on the NGINX documentation][18] - -### The Cipher Suite ### - -Forward Secrecy ensures the integrity of a session key in the event that a long-term key is compromised. PFS accomplishes this by enforcing the derivation of a new key for each and every session. - -This means that when the private key gets compromised it cannot be used to decrypt recorded SSL traffic. - -The cipher suites that provide Perfect Forward Secrecy are those that use an ephemeral form of the Diffie-Hellman key exchange. Their disadvantage is their overhead, which can be improved by using the elliptic curve variants. - -The following two ciphersuites are recommended by me, and the latter by [the Mozilla Foundation][19]. - -The recommended cipher suite: - - ssl_ciphers 'AES128+EECDH:AES128+EDH'; - -The recommended cipher suite for backwards compatibility (IE6/WinXP): - - ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; - -If your version of OpenSSL is old, unavailable ciphers will be discarded automatically. Always use the full ciphersuite above and let OpenSSL pick the ones it supports. - -The ordering of a ciphersuite is very important because it decides which algorithms are going to be selected in priority. The recommendation above prioritizes algorithms that provide perfect forward secrecy. - -Older versions of OpenSSL may not return the full list of algorithms. AES-GCM and some ECDHE are fairly recent, and not present on most versions of OpenSSL shipped with Ubuntu or RHEL. - -#### Prioritization logic #### - -- ECDHE+AESGCM ciphers are selected first. These are TLS 1.2 ciphers and not widely supported at the moment. No known attack currently target these ciphers. -- PFS ciphersuites are preferred, with ECDHE first, then DHE. -- AES 128 is preferred to AES 256. There has been [discussions][20] on whether AES256 extra security was worth the cost, and the result is far from obvious. At the moment, AES128 is preferred, because it provides good security, is really fast, and seems to be more resistant to timing attacks. -- In the backward compatible ciphersuite, AES is preferred to 3DES. BEAST attacks on AES are mitigated in TLS 1.1 and above, and difficult to achieve in TLS 1.0. In the non-backward compatible ciphersuite, 3DES is not present. -- RC4 is removed entirely. 3DES is used for backward compatibility. See discussion in [#RC4_weaknesses][21] - -#### Mandatory discards #### - -- aNULL contains non-authenticated Diffie-Hellman key exchanges, that are subject to Man-In-The-Middle (MITM) attacks -- eNULL contains null-encryption ciphers (cleartext) -- EXPORT are legacy weak ciphers that were marked as exportable by US law -- RC4 contains ciphers that use the deprecated ARCFOUR algorithm -- DES contains ciphers that use the deprecated Data Encryption Standard -- SSLv2 contains all ciphers that were defined in the old version of the SSL standard, now deprecated -- MD5 contains all the ciphers that use the deprecated message digest 5 as the hashing algorithm - -### Extra settings ### - -Make sure you also add these lines: - - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - -When choosing a cipher during an SSLv3 or TLSv1 handshake, normally the client's preference is used. If this directive is enabled, the server's preference will be used instead. - -- [More info on sslpreferserver_ciphers][22] -- [More info on ssl_ciphers][23] - -### Forward Secrecy & Diffie Hellman Ephemeral Parameters ### - -The concept of forward secrecy is simple: client and server negotiate a key that never hits the wire, and is destroyed at the end of the session. The RSA private from the server is used to sign a Diffie-Hellman key exchange between the client and the server. The pre-master key obtained from the Diffie-Hellman handshake is then used for encryption. Since the pre-master key is specific to a connection between a client and a server, and used only for a limited amount of time, it is called Ephemeral. - -With Forward Secrecy, if an attacker gets a hold of the server's private key, it will not be able to decrypt past communications. The private key is only used to sign the DH handshake, which does not reveal the pre-master key. Diffie-Hellman ensures that the pre-master keys never leave the client and the server, and cannot be intercepted by a MITM. - -All versions of nginx as of 1.4.4 rely on OpenSSL for input parameters to Diffie-Hellman (DH). Unfortunately, this means that Ephemeral Diffie-Hellman (DHE) will use OpenSSL's defaults, which include a 1024-bit key for the key-exchange. Since we're using a 2048-bit certificate, DHE clients will use a weaker key-exchange than non-ephemeral DH clients. - -We need generate a stronger DHE parameter: - - cd /etc/ssl/certs - openssl dhparam -out dhparam.pem 4096 - -And then tell nginx to use it for DHE key-exchange: - - ssl_dhparam /etc/ssl/certs/dhparam.pem; - -### OCSP Stapling ### - -When connecting to a server, clients should verify the validity of the server certificate using either a Certificate Revocation List (CRL), or an Online Certificate Status Protocol (OCSP) record. The problem with CRL is that the lists have grown huge and takes forever to download. - -OCSP is much more lightweight, as only one record is retrieved at a time. But the side effect is that OCSP requests must be made to a 3rd party OCSP responder when connecting to a server, which adds latency and potential failures. In fact, the OCSP responders operated by CAs are often so unreliable that browser will fail silently if no response is received in a timely manner. This reduces security, by allowing an attacker to DoS an OCSP responder to disable the validation. - -The solution is to allow the server to send its cached OCSP record during the TLS handshake, therefore bypassing the OCSP responder. This mechanism saves a roundtrip between the client and the OCSP responder, and is called OCSP Stapling. - -The server will send a cached OCSP response only if the client requests it, by announcing support for the status_request TLS extension in its CLIENT HELLO. - -Most servers will cache OCSP response for up to 48 hours. At regular intervals, the server will connect to the OCSP responder of the CA to retrieve a fresh OCSP record. The location of the OCSP responder is taken from the Authority Information Access field of the signed certificate. - -- [View my tutorial on enabling OCSP stapling on NGINX][24] - -### HTTP Strict Transport Security ### - -When possible, you should enable [HTTP Strict Transport Security (HSTS)][25], which instructs browsers to communicate with your site only over HTTPS. - -- [View my article on HTST to see how to configure it.][26] - -### HTTP Public Key Pinning Extension ### - -You should also enable the [HTTP Public Key Pinning Extension][27]. - -Public Key Pinning means that a certificate chain must include a whitelisted public key. It ensures only whitelisted Certificate Authorities (CA) can sign certificates for `*.example.com`, and not any CA in your browser store. - -I've written an article about it that has background theory and configuration examples for Apache, Lighttpd and NGINX: [https://raymii.org/s/articles/HTTPPublicKeyPinningExtension_HPKP.html][28] - -### Config Example ### - - server { - - listen [::]:443 default_server; - - ssl on; - ssl_certificate_key /etc/ssl/cert/raymii_org.pem; - ssl_certificate /etc/ssl/cert/ca-bundle.pem; - - ssl_ciphers 'AES128+EECDH:AES128+EDH:!aNULL'; - - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_session_cache shared:SSL:10m; - - ssl_stapling on; - ssl_stapling_verify on; - resolver 8.8.4.4 8.8.8.8 valid=300s; - resolver_timeout 10s; - - ssl_prefer_server_ciphers on; - ssl_dhparam /etc/ssl/certs/dhparam.pem; - - add_header Strict-Transport-Security max-age=63072000; - add_header X-Frame-Options DENY; - add_header X-Content-Type-Options nosniff; - - root /var/www/; - index index.html index.htm; - server_name raymii.org; - - } - -### Conclusion ### - -If you have applied the above config lines you need to restart nginx: - - # Check the config first: - /etc/init.d/nginx configtest - # Then restart: - /etc/init.d/nginx restart - -Now use the [SSL Labs test][29] to see if you get a nice A. And, of course, have a safe, strong and future proof SSL configuration! - -- [Also read the Mozilla page on the subject][30] - --------------------------------------------------------------------------------- - -via: https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - -作者:[Remy van Elst][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://raymii.org/ -[1]:https://www.ssllabs.com/ssltest/analyze.html?d=raymii.org -[2]:https://cipherli.st/ -[3]:https://www.digitalocean.com/?refcode=7435ae6b8212 -[4]:http://blog.ivanristic.com/2014/01/ssl-labs-stricter-security-requirements-for-2014.html -[5]:https://raymii.org/s/tutorials/Strong_SSL_Security_On_Apache2.html -[6]:https://raymii.org/s/tutorials/Pass_the_SSL_Labs_Test_on_Lighttpd_%28Mitigate_the_CRIME_and_BEAST_attack_-_Disable_SSLv2_-_Enable_PFS%29.html -[7]:http://www.bsdnow.tv/episodes/2014_08_20-engineering_nginx -[8]:http://www.bsdnow.tv/tutorials/nginx -[9]:https://en.wikipedia.org/wiki/Transport_Layer_Security#BEAST_attack -[10]:https://en.wikipedia.org/wiki/CRIME_%28security_exploit%29 -[11]:http://blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html -[12]:http://heartbleed.com/ -[13]:https://en.wikipedia.org/wiki/Perfect_forward_secrecy -[14]:https://en.wikipedia.org/wiki/Transport_Layer_Security#Dealing_with_RC4_and_BEAST -[15]:https://www.smacktls.com/ -[16]:https://raymii.org/s/articles/Check_servers_for_the_Poodle_bug.html -[17]:https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00 -[18]:http://wiki.nginx.org/HttpSslModule#ssl_protocols -[19]:https://wiki.mozilla.org/Security/Server_Side_TLS -[20]:http://www.mail-archive.com/dev-tech-crypto@lists.mozilla.org/msg11247.html -[21]:https://wiki.mozilla.org/Security/Server_Side_TLS#RC4_weaknesses -[22]:http://wiki.nginx.org/HttpSslModule#ssl_prefer_server_ciphers -[23]:http://wiki.nginx.org/HttpSslModule#ssl_ciphers -[24]:https://raymii.org/s/tutorials/OCSP_Stapling_on_nginx.html -[25]:https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security -[26]:https://raymii.org/s/tutorials/HTTP_Strict_Transport_Security_for_Apache_NGINX_and_Lighttpd.html -[27]:https://wiki.mozilla.org/SecurityEngineering/Public_Key_Pinning -[28]:https://raymii.org/s/articles/HTTP_Public_Key_Pinning_Extension_HPKP.html -[29]:https://www.ssllabs.com/ssltest/ -[30]:https://wiki.mozilla.org/Security/Server_Side_TLS \ No newline at end of file From f16a995874e8c53551a46d0c1ec07d686b3c94c9 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 3 May 2015 22:34:12 +0800 Subject: [PATCH 141/154] PUB:20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative @H-mudcup --- ...ys Relaxing Sounds to Keep You Creative.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) rename {translated/share => published}/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md (67%) diff --git a/translated/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md b/published/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md similarity index 67% rename from translated/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md rename to published/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md index f468b24754..c636b01820 100644 --- a/translated/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md +++ b/published/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md @@ -1,9 +1,8 @@ -Translated by H-mudcup - -适用于Ubuntu的环境音播放器播放让人放松的声音保持你的创造力 +环境音播放器:让人放松的声音,保持你的创造力 ================================================================================ ![Rain is a soothing sound for some](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/raining-1600x900-wallpaper_www.wallpapermay.com_84-1.jpg) -对于某些人来说雨声是个令人安心的声音 + +*对于某些人来说雨声是个令人安心的声音* **如果我想变得非常有效率,我不能听‘正常’的音乐。它会使我分心,我会开始跟着唱或者让我想起另一首歌,结局就是我在自己的音乐库里到处戳并且……反正,你懂的。** @@ -23,11 +22,11 @@ Translated by H-mudcup Google Play和苹果应用商店充满了环境音和白噪声的应用。现在,在Ubuntu里有同样的应用了。 -‘[Ambient Noise][1]‘ ‘[环境音][1]’——人如其名——是一个专门被设计成播放这种声音的音频播放器。他甚至可以同Ubuntu声音菜单整合到一起,给你‘选择,点击即放松’的体验。 +‘[Ambient Noise (环境音)][1] ’——人如其名,这是一个专门被设计成播放这种声音的音频播放器。他甚至可以同Ubuntu声音菜单整合到一起,给你‘选择,点击即放松’的体验。 -这个应用(又被称为‘ANoise播放器’,由Marcos Costales制作)带有**8个高品质声道**。 +这个应用(又被称为‘ANoise播放器’,由Marcos Costales制作)带有**8个高品质音频**。 -这8个预设声道涵盖了多种环境,从下雨时有节奏的声音,到夜晚大自然静谧的旋律,还有下午熙熙攘攘的咖啡店的嗡嗡声。 +这8个预设音频涵盖了多种环境,从下雨时有节奏的声音,到夜晚大自然静谧的旋律,还有下午熙熙攘攘的咖啡店的嗡嗡声。 ### 在Ubuntu上安装ANoise播放器 ### @@ -39,9 +38,9 @@ Google Play和苹果应用商店充满了环境音和白噪声的应用。现在 sudo apt-get update && sudo apt-get install anoise -安装好以后只需从Unity Dash(或DE里等价的地方)里打开它,通过声音菜单选择你喜欢的环境音然后……放松吧!这个应用甚至记得你上次用的环境音。 +安装好以后只需从Unity Dash(或桌面环境里类同的地方)里打开它,通过声音菜单选择你喜欢的环境音然后……放松吧!这个应用甚至记得你上次用的环境音。 -Even so, give it a try out and see if it suits your needs. I would say let me know what you think, but I will be too focused to hear — and so might you!即便如此,你还是要试一试看它是否能满足你的需要。我要说的是让我直到你是怎么想的,但是我将会专心致志到听不到你的声音——你可能也会这样! +即便如此,你还是要试一试看它是否能满足你的需要。我要说的是让我知道你是怎么想的,但是我将会专心致志到听不到你的声音——你可能也会这样! -------------------------------------------------------------------------------- @@ -49,7 +48,7 @@ via: http://www.omgubuntu.co.uk/2015/04/ambient-noise-player-app-for-ubuntu-linu 作者:[Joey-Elijah Sneddon][a] 译者:[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 13e714d086ca5179661b0c6e55bd71c5e43f8da9 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 3 May 2015 22:39:54 +0800 Subject: [PATCH 142/154] PUB:20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better @H-mudcup --- ...t Racing Game on Linux Just Got Even Better.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) rename {translated/share => published}/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md (84%) diff --git a/translated/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md b/published/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md similarity index 84% rename from translated/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md rename to published/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md index 931f51ce92..70355325b6 100644 --- a/translated/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md +++ b/published/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md @@ -1,10 +1,10 @@ - -SuperTuxKart 0.9 已发行 —— Linux 中最好的竞速类游戏变得更好了 +SuperTuxKart 0.9 已发行 —— Linux 中最好的竞速类游戏越来越棒了! ================================================================================ **热门竞速类游戏 SuperTuxKart 的新版本已经[打包发行][1]登陆下载服务器** ![Super Tux Kart 0.9 Release Poster](http://1.bp.blogspot.com/-eGXvJu3UVwc/VTVhICZVEtI/AAAAAAAAAf0/iP2bkWDNf_c/s1600/poster-cropped.jpg) -Super Tux Kart 0.9 发行海报 + +*Super Tux Kart 0.9 发行海报* SuperTuxKart 0.9 相较前一版本做了巨大的升级,内部运行着刚出炉的新引擎(有个炫酷的名字叫‘Antarctica(南极洲)’),目的是要呈现更加炫酷的图形环境,从阴影到场景的纵深,外加卡丁车更好的物理效果。 @@ -14,14 +14,11 @@ SuperTuxKart 0.9 相较前一版本做了巨大的升级,内部运行着刚出 SuperTuxKart 0.9 中与图像的改善同样吸引人眼球的是一对**全新赛道**,新的卡丁车,新的在线账户可以记录和分享**全新推出的成就系统**里赢得的徽章,以及大量的改装和涂装的微调。 -点击播放下面的官方发行视频,看看基于调色器的 STK 0.9 所散发的光辉吧。 - -注:youtube 视频 - +点击播放下面的官方发行视频,看看基于调色器的 STK 0.9 所散发的光辉吧。(youtube 视频:https://www.youtube.com/0FEwDH7XU9Q ) Ubuntu 用户可以从项目网站上下载新发行版已编译的二进制文件。 -- [Download SuperTuxKart 0.9][2] +- [下载 SuperTuxKart 0.9][2] -------------------------------------------------------------------------------- @@ -29,7 +26,7 @@ via: http://www.omgubuntu.co.uk/2015/04/supertuxkart-0-9-released 作者:[Joey-Elijah Sneddon][a] 译者:[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 07aa6a3079e4df7894eaec79479bfec7a14c950f Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 3 May 2015 23:55:24 +0800 Subject: [PATCH 143/154] PUB:20150128 Docker-2 Setting up a private Docker registry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @DongShuaike 翻译的很不错,很用心。 --- ...-2 Setting up a private Docker registry.md | 103 +++++++++--------- 1 file changed, 49 insertions(+), 54 deletions(-) rename {translated/tech => published}/20150128 Docker-2 Setting up a private Docker registry.md (55%) diff --git a/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md b/published/20150128 Docker-2 Setting up a private Docker registry.md similarity index 55% rename from translated/tech/20150128 Docker-2 Setting up a private Docker registry.md rename to published/20150128 Docker-2 Setting up a private Docker registry.md index 6d73b53326..d1c81e1679 100644 --- a/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md +++ b/published/20150128 Docker-2 Setting up a private Docker registry.md @@ -2,58 +2,58 @@ ================================================================================ ![](http://cocoahunter.com/content/images/2015/01/docker2.jpg) -[TL;DR]这是系列的第二篇文章,这系列讲述了我的公司如何把基础服务从PaaS迁移到Docker上 +[TL;DR] 这是系列的第二篇文章,这系列讲述了我的公司如何把基础服务从PaaS迁移到Docker上 -- [First part][1]: 第一篇文章里我谈到了接触Docker之前的经历; -- [Third pard][2]: 第三篇文章里我展示如何使创建images的过程自动化以及如何用Docker部署一个Rails应用。 +- [第一篇文章][1]: 我谈到了接触Docker之前的经历; +- [第三篇文章][2]: 我展示如何使创建镜像的过程自动化以及如何用Docker部署一个Rails应用。 ---------- -为什么需要搭建一个私有的registry呢?嗯,Docker Hub(一个Docker公共仓库)只允许你拥有一个免费的私有版本库(repo)。其他的公司提供类似服务,但是价格可不便宜。另外,如果你需要部署一个基于Docker的应用产品,恐怕你不希望这些images在开放的Docker Hub被公开吧! +为什么需要搭建一个私有的registry呢?嗯,对于新手来说,Docker Hub(一个Docker公共仓库)只允许你拥有一个免费的私有版本库(repo)。其他的公司也开始提供类似服务,但是价格可不便宜。另外,如果你需要用Docker部署一个用于生产环境的应用,恐怕你不希望将这些镜像放在公开的Docker Hub上吧! -这篇文章提供了一个非常务实的方法来处理搭建私有Docke registry时出现的各种错综复杂的情况。我们将会使用一个运行于DigitalOcean(之后简称为DO)的非常小巧的512MB实例。并且我会假定你已经了解了Docker的基本概念,因为我必须集中精力在复杂的事情上! +这篇文章提供了一个非常务实的方法来处理搭建私有Docker registry时出现的各种错综复杂的情况。我们将会使用一个运行于DigitalOcean(之后简称为DO)的非常小巧的512MB VPS 实例。并且我会假定你已经了解了Docker的基本概念,因为我必须集中精力在复杂的事情上! ###本地搭建### 首先你需要安装**boot2docker**以及docker CLI。如果你已经搭建好了基本的Docker环境,你可以直接跳过这一步。 -从终端运行以下命令[1][3]: +从终端运行以下命令(我假设你使用OS X,使用 HomeBrew 来安装相关软件,你可以根据你的环境使用不同的包管理软件来安装): + brew install boot2docker docker -如果一切顺利[2][4],你现在将能够启动VM,在VM当中输入下列命令: +如果一切顺利(想要了解搭建docker环境的完整指南,请参阅 [http://boot2docker.io/][10]) ,你现在就能够通过如下命令启动一个 Docker 运行于其中的虚拟机: + boot2docker up -Follow the instructions, copy and paste the export commands that boot2docker will print in the terminal. If you now run `docker ps` you should be greeted by the following line -按照说明,复制粘贴book2docker打印在终端的export命令(这块翻译不太好)。现在运行`docker ps`命令,终端将有以下显示。 +按照屏幕显示的说明,复制粘贴book2docker在终端输出的命令。如果你现在运行`docker ps`命令,终端将有以下显示。 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -好了,Docker已经准备就绪。我们回过头去搭建registry。 +好了,Docker已经准备就绪,这就够了,我们回过头去搭建registry。 ###创建服务器### -登录进你的DO账号,选择一个提前安装好Docker的映像文件,创建一个新的Drople。[^n] +登录进你的DO账号,选择一个预安装了Docker的镜像文件,创建一个新的Drople。(本文写成时选择的是 Image > Applications > Docker 1.4.1 on 14.04) ![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-18-26-14.png) - 你将会以邮件的方式收到一个根用户凭证。登录进去,然后运行`docker ps`命令来查看系统状态。 ### 搭建AWS S3 ### -我们现在将使用Amazo Simple Storage Service(S3)作为我们registry/repository的存储层。我们讲需要创建一个桶(bucket)以及用户凭证(user credentials)来允许我们的docker容器访问它。 +我们现在将使用Amazo Simple Storage Service(S3)作为我们registry/repository的存储层。我们将需要创建一个桶(bucket)以及用户凭证(user credentials)来允许我们的docker容器访问它。 -登录到我们的AWS账号(如果没有,就申请一个[http://aws.amazon.com/][5]),在控制台选择S3(Simpole Storage Service) +登录到我们的AWS账号(如果没有,就申请一个[http://aws.amazon.com/][5]),在控制台选择S3(Simpole Storage Service)。 ![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-29-21.png) -点击 **Create Bucket**,为你的桶输入一个名字(把它写下来,我们一会需要用到它),然后点击**Create**。 +点击 **Create Bucket**,为你的桶输入一个名字(把它记下来,我们一会需要用到它),然后点击**Create**。 ![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-22-50.png) -OK!我们已经搭建好存储部分了。 +OK!我们已经搭建好存储部分了。 -### 安装AWS访问凭证### +### 设置AWS访问凭证### 我们现在将要创建一个新的用户。退回到AWS控制台然后选择IAM(Identity & Access Management)。 @@ -65,9 +65,9 @@ OK!我们已经搭建好存储部分了。 ![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-31-42.png) -输入你的用户名(例如 docker-registry)然后点击Create。写下(或者下载csv文件)你的Access Key以及Secret Access Key。回到你的用户列表然后选择你刚刚创建的用户。 +输入一个用户名(例如 docker-registry)然后点击Create。写下(或者下载csv文件)你的Access Key以及Secret Access Key。回到你的用户列表然后选择你刚刚创建的用户。 -在Permission section下面,点击Attach User Policy。之后,选择Custom Policy。 +在Permission section下面,点击Attach User Policy。之后在下一屏,选择Custom Policy。 ![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-41-21.png) @@ -90,11 +90,11 @@ custom policy的内容如下: ] } -这个配置将允许用户(也就是regitstry)来对桶上的内容进行操作(读/写)(确保使用你之前创建AWS S3时使用的桶名)。总结起来:当你想把你的Docker映像从你的本机推送到仓库中时,服务器将能够将他们上传到S3。 +这个配置将允许用户(也就是regitstry)来对桶上的内容进行操作(读/写)(确保使用你之前创建AWS S3时使用的桶名)。总结一下:当你想把你的Docker镜像从你的本机推送到仓库中时,服务器就会将他们上传到S3。 ### 安装registry ### -现在回过头来看我们的DO服务器,SSH登录其上。我们将要使用[^n]一个官方Docker registry映像。[6] +现在回过头来看我们的DO服务器,SSH登录其上。我们将要[使用][11]一个[官方Docker registry镜像][6]。 输入如下命令,开启registry。 @@ -110,25 +110,25 @@ custom policy的内容如下: -d \ registry -Docker将会从Docker Hub上拉取所需的文件系统层(fs layers)并启动守护容器(daemonised container)。 +Docker将会从Docker Hub上拉取所需的文件系统分层(fs layers)并启动守护容器(daemonised container)。 ### 测试registry ### 如果上述操作奏效,你可以通过ping命令,或者查找它的内容来测试registry(虽然这个时候容器还是空的)。 -我们的registry非常基础,而且没有提供任何“验明正身”的方式。因为添加身份验证可不是一件轻松事(至少我认为没有一种部署方法是简单的,像是为了证明你努力过似的),我觉得 查询/拉取/推送 仓库内容的最简单方法就是通过SSH的未加密连接(通过HTTP)。 +我们的registry非常基础,而且没有提供任何“验明正身”的方式。因为添加身份验证可不是一件轻松事(至少我认为没有一种部署方法是简单的,像是为了证明你努力过似的),我觉得“查询/拉取/推送”仓库内容的最简单方法就是通过SSH通道的未加密连接(通过HTTP)。 打开SSH通道的操作非常简单: ssh -N -L 5000:localhost:5000 root@your_registry.com -这条命令建立了一条从registry服务器(前面执行`docker run`命令的时候我们见过它)的5000号端口到本机的5000号端口之间的连接。 +这条命令建立了一条从registry服务器(前面执行`docker run`命令的时候我们见过它)的5000号端口到本机的5000号端口之间的 SSH 管道连接。 -如果你现在登录[http://localhost:5000/v1/_ping][7],将会看到下面这个非常简短的回复。 +如果你现在用浏览器访问 [http://localhost:5000/v1/_ping][7],将会看到下面这个非常简短的回复。 {} -这个意味着registry工作正常。你还可以通过登录[http://localhost:5000/v1/search][8]来查看registry内容,内容相似: +这个意味着registry工作正常。你还可以通过登录 [http://localhost:5000/v1/search][8] 来查看registry内容,内容相似: { "num_results": 2, @@ -145,40 +145,38 @@ Docker将会从Docker Hub上拉取所需的文件系统层(fs layers)并启动 ] } -### 创建一个映像 ### +### 创建一个镜像 ### -我们现在创建一个非常简答的Docker映像,来检验我们新弄好的registry。在我们的本机上,用如下内容创建一个Dockerfile:[^n] +我们现在创建一个非常简单的Docker镜像,来检验我们新弄好的registry。在我们的本机上,用如下内容创建一个Dockerfile(这里只有一点代码,在下一篇文章里我将会展示给你如何将一个Rails应用绑定进Docker容器中。): - - # Base image with ruby 2.2.0 + # ruby 2.2.0 的基础镜像 FROM ruby:2.2.0 MAINTAINER Michelangelo Chasseur -……创建: +并创建它: docker build -t localhost:5000/username/repo-name . -`localhost:5000`非常重要:Docker映像名的最前面一个部分将告知`docker push`命令我们将要把我们的image推送到哪里。在我们这个例子当中,因为我们要通过SSH管道连接远端私有registry,`localhost:5000`精确地表示了对我们的registry的一个引用。 +`localhost:5000`这个部分非常重要:Docker镜像名的最前面一个部分将告知`docker push`命令我们将要把我们的镜像推送到哪里。在我们这个例子当中,因为我们要通过SSH管道连接远程的私有registry,`localhost:5000`精确地指向了我们的registry。 -如果一切顺利,当命令执行完成返回后,你可以输入`docker images`命令来列出新近创建的映像。执行它看看会出现什么现象? +如果一切顺利,当命令执行完成返回后,你可以输入`docker images`命令来列出新近创建的镜像。执行它看看会出现什么现象? ### 推送到仓库 ### -接下来是更好玩的部分。实现我所描述的东西着实花了我一点时间,所以如果你第一次读的话就耐心一点吧,跟着我一起操作。我知道接下来的东西会非常复杂(如果你不自动化进程就一定会这样),但是我保证到最后你一定都能明白。在下一篇文章里我将会使用到一大波shell脚本和Rake任务,通过它们实现自动化并且用简单的命令实现部署Rails应用。 +接下来是更好玩的部分。实现我所描述的东西着实花了我一点时间,所以如果你第一次读的话就耐心一点吧,跟着我一起操作。我知道接下来的东西会非常复杂(如果你不自动化这个过程就一定会这样),但是我保证到最后你一定都能明白。在下一篇文章里我将会使用到一大波shell脚本和Rake任务,通过它们实现自动化并且用简单的命令实现部署Rails应用。 -你运行的docker命令都是实际上都是在boot2docker虚拟机上运行的。所以当你执行像`docker push some_repo`这样的命令时,是boot2docker虚拟机在与registry交互,而不是我们自己的机器。 +你在终端上运行的docker命令实际上都是使用boot2docker虚拟机来运行容器及各种东西。所以当你执行像`docker push some_repo`这样的命令时,是boot2docker虚拟机在与registry交互,而不是我们自己的机器。 -接下来是一个非常重要的点:为了将Docker映像推送到远端的私有仓库,SSH管道需要在boot2docker虚拟机上配置好。 +接下来是一个非常重要的点:为了将Docker镜像推送到远端的私有仓库,SSH管道需要在boot2docker虚拟机上配置好,而不是在你的本地机器上配置。 -由许多种方法实现它。我给你展示最简短的一种(可能不是最容易理解的,但是能够帮助你实现自动化) +有许多种方法实现它。我给你展示最简短的一种(可能不是最容易理解的,但是能够帮助你实现自动化) -First of all though we need to sort one last thing with SSH. -(不太会翻译) +在这之前,我们需要对 SSH 做最后一点工作。 -### Setting up SSH ### +### 设置 SSH ### -我们添加boot2docker SSH key到远端服务器已知的hosts里面。我们可以使用ssh-copy-id工具,通过下面的命令就可以安装上它了: +让我们把boot2docker 的 SSH key添加到远端服务器的“已知主机”里面。我们可以使用ssh-copy-id工具完成,通过下面的命令就可以安装上它了: brew install ssh-copy-id @@ -188,7 +186,7 @@ First of all though we need to sort one last thing with SSH. 用你ssh key的真实路径代替`/Users/username/.ssh/id_boot2docker`。 -这样做能够让我们面密码登录SSH。 +这样做能够让我们免密码登录SSH。 现在我们来测试以下: @@ -196,26 +194,23 @@ First of all though we need to sort one last thing with SSH. 分开阐述: -- `boot2docker ssh`允许你以参数的形式传递给boot2docker虚拟机一条执行命令; +- `boot2docker ssh`允许你以参数的形式传递给boot2docker虚拟机一条执行的命令; - 最后面那个`&`表明这条命令将在后台执行; - `ssh -o 'StrictHostKeyChecking no' -i /Users/michelangelo/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@registry.touchwa.re &`是boot2docker虚拟机实际运行的命令; - -`-o 'StrictHostKeyChecking no'`——不提示安全问题; + - `-o 'StrictHostKeyChecking no'`——不提示安全问题; - `-i /Users/michelangelo/.ssh/id_boot2docker`指出虚拟机使用哪个SSH key来进行身份验证。(注意这里的key应该是你前面添加到远程仓库的那个) - - 最后我们将打开一条端口5000到本地端口5000的SSH通道。 + - 最后我们将打开一条端口5000映射到localhost:5000的SSH通道。 ### 从其他服务器上拉取 ### -你现在将可以通过下面的简单命令将你的映像推送到远端仓库: +你现在将可以通过下面的简单命令将你的镜像推送到远端仓库: docker push localhost:5000/username/repo_name -在下一篇文章[9]中,我们将会了解到如何自动化处理这些事务,并且真正地容器化一个Rails应用。请继续收听! +在下一篇[文章][9]中,我们将会了解到如何自动化处理这些事务,并且真正地容器化一个Rails应用。请继续收听! + 如有错误,请不吝指出。祝你Docker之路顺利! -1. 我假设你使用OS X。 -2. 想要了解搭建docker环境的完整之南,请参阅[http://boot2docker.io/][10]。 -3. 本文写成时选择的是 Image > Applications > Docker 1.4.1 on 14.04。 -4. [https://github.com/docker/docker-registry/][11] -5. 这是一个存根,在下一篇文章里我将会展示给你如何将一个Rails应用绑定进Docker容器中。 + -------------------------------------------------------------------------------- @@ -223,12 +218,12 @@ via: http://cocoahunter.com/2015/01/23/docker-2/ 作者:[Michelangelo Chasseur][a] 译者:[DongShuaike](https://github.com/DongShuaike) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://cocoahunter.com/author/michelangelo/ -[1]:http://cocoahunter.com/2015/01/23/docker-1/ +[1]:https://linux.cn/article-5339-1.html [2]:http://cocoahunter.com/2015/01/23/docker-3/ [3]:http://cocoahunter.com/2015/01/23/docker-2/#fn:1 [4]:http://cocoahunter.com/2015/01/23/docker-2/#fn:2 From ec40816c23729020ab85f3e792afe941c36a099b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 4 May 2015 16:11:47 +0800 Subject: [PATCH 144/154] =?UTF-8?q?20150504-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...B) and 'PowerAdmin' in RHEL or CentOS 7.md | 423 ++++++++++++++++++ ...erver behind NAT via reverse SSH tunnel.md | 130 ++++++ 2 files changed, 553 insertions(+) create mode 100644 sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md create mode 100644 sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md diff --git a/sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md b/sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md new file mode 100644 index 0000000000..e8974ba386 --- /dev/null +++ b/sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md @@ -0,0 +1,423 @@ +How to Install and Configure ‘PowerDNS’ (with MariaDB) and ‘PowerAdmin’ in RHEL/CentOS 7 +================================================================================ +PowerDNS is a DNS server running on many Linux/Unix derivatives. It can be configured with different backends including BIND style zone files, relational databases or load balancing/failover algorithms. It can also be setup as a DNS recursor running as a separate process on the server. + +The latest version of PowerDNS Authoritative server is 3.4.4, but the one available in the EPEL repository right now is 3.4.3. I would recommend installing the one for the EPEL repository due to the fact that this version is tested in CentOS and Fedora. That way you will also be able to easily update PowerDNS in future. + +This article intends to show you how to install and setup master PowerDNS server with a MariaDB backend and the PowerAdmin – a friendly web interface managing tool for PowerDNS. + +For the purpose of this article I will be using server with: + + Hostname: centos7.localhost + IP Address 192.168.0.102 + +### Step 1: Installing PowerDNS with MariaDB Backend ### + +#### 1. First you need to enable the EPEL repository for your server simply use: #### + + # yum install epel-release.noarch + +![Enable Epel Repository](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Epel-Repository.png) +Enable Epel Repository + +#### 2. The next step is to install the MariaDB server. This can be easily done by running the following command: #### + + # yum -y install mariadb-server mariadb + +![Install MariaDB Server](http://www.tecmint.com/wp-content/uploads/2015/04/Install-MariaDB-Server.png) +Install MariaDB Server + +#### 3. Next we will configure MySQL to enable and start upon system boot: #### + + # systemctl enable mariadb.service + # systemctl start mariadb.service + +![Enable Start MariaDB System Boot](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Start-MariaDB-System-Boot.png) +Enable Start MariaDB System Boot + +#### 4. Now that the MySQL service is running, we will secure and setup a password for MariaDB by running: #### + + # mysql_secure_installation + +#### Follow Instructions #### + + /bin/mysql_secure_installation: line 379: find_mysql_client: command not found + + NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB + SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! + + In order to log into MariaDB to secure it, we'll need the current + password for the root user. If you've just installed MariaDB, and + you haven't set the root password yet, the password will be blank, + so you should just press enter here. + + Enter current password for root (enter for none): Press ENTER + OK, successfully used password, moving on... + + Setting the root password ensures that nobody can log into the MariaDB + root user without the proper authorisation. + + Set root password? [Y/n] y + New password: ← Set New Password + Re-enter new password: ← Repeat Above Password + Password updated successfully! + Reloading privilege tables.. + ... Success! + + + By default, a MariaDB installation has an anonymous user, allowing anyone + to log into MariaDB without having to have a user account created for + them. This is intended only for testing, and to make the installation + go a bit smoother. You should remove them before moving into a + production environment. + + Remove anonymous users? [Y/n] y ← Choose “y” to disable that user + ... Success! + + Normally, root should only be allowed to connect from 'localhost'. This + ensures that someone cannot guess at the root password from the network. + + Disallow root login remotely? [Y/n] n ← Choose “n” for no + ... skipping. + + By default, MariaDB comes with a database named 'test' that anyone can + access. This is also intended only for testing, and should be removed + before moving into a production environment. + + Remove test database and access to it? [Y/n] y ← Choose “y” for yes + - Dropping test database... + ... Success! + - Removing privileges on test database... + ... Success! + + Reloading the privilege tables will ensure that all changes made so far + will take effect immediately. + + Reload privilege tables now? [Y/n] y ← Choose “y” for yes + ... Success! + + Cleaning up... + + All done! If you've completed all of the above steps, your MariaDB + installation should now be secure. + + Thanks for using MariaDB! + +#### 5. Once MariaDB configuration done successfully, we can proceed further with the installation of PowerDNS. This is easily completed by running: #### + + # yum -y install pdns pdns-backend-mysql + +![Install PowerDNS with MariaDB Backend](http://www.tecmint.com/wp-content/uploads/2015/04/Install-PowerDNS-with-MariaDB-Backend.png) +Install PowerDNS with MariaDB Backend + +#### 6. The configuration file for PowerDNS is located in `/etc/pdns/pdns`, but before editing it, we will setup a MySQL database for PowerDNS service. First we will connect to the MySQL server and will create a database with name powerdns: #### + + # mysql -u root -p + MariaDB [(none)]> CREATE DATABASE powerdns; + +![Create PowerDNS Database](http://www.tecmint.com/wp-content/uploads/2015/04/Create-PowerDNS-Database.png) +Create PowerDNS Database + +#### 7. Next, we will create a database user called powerdns: #### + + MariaDB [(none)]> GRANT ALL ON powerdns.* TO 'powerdns'@'localhost' IDENTIFIED BY ‘tecmint123’; + MariaDB [(none)]> GRANT ALL ON powerdns.* TO 'powerdns'@'centos7.localdomain' IDENTIFIED BY 'tecmint123'; + MariaDB [(none)]> FLUSH PRIVILEGES; + +![Create PowerDNS User](http://www.tecmint.com/wp-content/uploads/2015/04/Create-PowerDNS-User.png) +Create PowerDNS User + +**Note**: Replace “tecmint123” with the actual password that you want to use for your setup. + +#### 8. We proceed by creating the database tables used by PowerDNS. Execute those block by block: #### + + MariaDB [(none)]> USE powerdns; + MariaDB [(none)]> CREATE TABLE domains ( + id INT auto_increment, + name VARCHAR(255) NOT NULL, + master VARCHAR(128) DEFAULT NULL, + last_check INT DEFAULT NULL, + type VARCHAR(6) NOT NULL, + notified_serial INT DEFAULT NULL, + account VARCHAR(40) DEFAULT NULL, + primary key (id) + ); + +![Create Table Domains for PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Table-Domains-for-PowerDNS.png) +Create Table Domains for PowerDNS + + MariaDB [(none)]> CREATE UNIQUE INDEX name_index ON domains(name); + MariaDB [(none)]> CREATE TABLE records ( + id INT auto_increment, + domain_id INT DEFAULT NULL, + name VARCHAR(255) DEFAULT NULL, + type VARCHAR(6) DEFAULT NULL, + content VARCHAR(255) DEFAULT NULL, + ttl INT DEFAULT NULL, + prio INT DEFAULT NULL, + change_date INT DEFAULT NULL, + primary key(id) + ); + +![Create Index Domains for PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Index-Domains-for-PowerDNS.png) +Create Index Domains for PowerDNS + + MariaDB [(none)]> CREATE INDEX rec_name_index ON records(name); + MariaDB [(none)]> CREATE INDEX nametype_index ON records(name,type); + MariaDB [(none)]> CREATE INDEX domain_id ON records(domain_id); + +![Create Index Records](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Records.png) +Create Index Records + + MariaDB [(none)]> CREATE TABLE supermasters ( + ip VARCHAR(25) NOT NULL, + nameserver VARCHAR(255) NOT NULL, + account VARCHAR(40) DEFAULT NULL + ); + +![Create Table Supermaster](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Table-Supermaster.png) +Create Table Supermaster + +You can now exit the MySQL console by typing: + + MariaDB [(none)]> quit; + +#### 9. Finally we can proceed with configuring our PowerDNS in a way that, it will use MySQL as backend. For that purpose open PowerDNS configuration file located at: #### + + # vim /etc/pdns/pdns.conf + +In that file look for the lines looking like this: + + ################################# + # launch Which backends to launch and order to query them in + # + # launch= + +Just after that put the following code: + + launch=gmysql + gmysql-host=localhost + gmysql-user=powerdns + gmysql-password=user-pass + gmysql-dbname=powerdns + +Change “user-pass” with the actual password that you set earlier. Here is how my configuration looks like: + +![Configure PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-PowerDNS.png) +Configure PowerDNS + +Save your change and exit from. + +#### 10. Now we will start and add PowerDNS to the list of services starting at system boot: #### + + # systemctl enable pdns.service + # systemctl start pdns.service + +![Enable and Start PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-and-Start-PowerDNS.png) +Enable and Start PowerDNS + +At this point your PowerDNS server is up and running. For more information about PowerDNS you can refer to the manual available at [http://downloads.powerdns.com/documentation/html/index.html][1] + +### Step 2: Installing PowerAdmin to Manage PowerDNS ### + +#### 11. Now we will install PowerAdmin – a friendly web interface designed to manager PowerDNS servers. Since it is written in PHP, we will need to install PHP and a web server (Apache): #### + + # yum install httpd php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mhash gettext + +![Install Apache PHP](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-PHP.jpeg) +Install Apache PHP + +PowerAdmin also requires two PEAR packages: + + # yum -y install php-pear-DB php-pear-MDB2-Driver-mysql + +![Install Pear](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Pear.jpeg) +Install Pear + +You can also refer to the following article for complete instructions how to install LAMP stack in CentOS 7: + +- [Install LAMP in CentOS 7][2] + +Once the install is complete, we will need to start and set Apache to start at system boot: + + # systemctl enable httpd.service + # systemctl start httpd.service + +![Enable Start Apache System Boot](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Start-Apache-System-Boot.png) +Enable Start Apache System Boot + +#### 12. Now that all system requirements for running PowerAdmn are met, we can proceed and download the package. Since the default web directory for Apache is /var/www/html/, we will download the package in there. #### + + # cd /var/www/html/ + # wget http://downloads.sourceforge.net/project/poweradmin/poweradmin-2.1.7.tgz + # tar xfv poweradmin-2.1.7.tgz + +![Download PowerAdmin](http://www.tecmint.com/wp-content/uploads/2015/04/Download-PowerAdmin.jpeg) +Download PowerAdmin + +#### 13. Now, we can now start the web installer of PowerAdmin. Simply open: #### + + http://192.168.0.102/poweradmin-2.1.7/install/ + +This should bring the first step of the installation: + +![Select Installation Language](http://www.tecmint.com/wp-content/uploads/2015/04/Select-Installation-Language.png) +Select Installation Language + +The above page will ask you to choose the language for your PowerAdmin. Select the one you wish to use and click the “Go to step 2” button. + +#### 14. The installer will expect you to have a PowerDNS database: #### + +![PowerDNS Database](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Database.png) +PowerDNS Database + +#### 15. Since we already created one, we can proceed to the next step. You will be asked to enter the database details you setup earlier. You will also need to setup Poweradmin administrator password: #### + +![Enter PowerDNS Database Settings](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS.png) +Enter PowerDNS Database Settings + +#### 16. Once you have input those, go to step 4. You will create a new user with a limited rights for Poweradmin. The fields that you need to enter here are: #### + +- Username - username for hte PowerAdmin. +- Password – password for the above user. +- Hostmaster - When creating SOA records and you have not specified hostmaster, this value will be used. +- Secondary nameserver – the value will be used as primary name server when creating new DNS zones. + +![PowerDNS Configuration Settings](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Configuration-Settings.png) +PowerDNS Configuration Settings + +#### 17. On the next step Poweradmin will ask you to create new database user with limited rights on the database tables. It will provide you with the code that you will need to put in a MySQL console: #### + +![Create New Database User](http://www.tecmint.com/wp-content/uploads/2015/04/Create-New-Database-User.png) +Create New Database User + +#### 18. Now open a terminal and run: #### + + # mysql -u root -p + +Provide your password and execute the code provided by Poweradmin: + + MariaDB [(none)]> GRANT SELECT, INSERT, UPDATE, DELETE + ON powerdns.* + TO 'powermarin'@'localhost' + IDENTIFIED BY '123qweasd'; + +![Grant Mysql Permissions to User](http://www.tecmint.com/wp-content/uploads/2015/04/Grant-Mysql-Permissions-to-User.png) +Grant Mysql Permissions to User + +#### 19. Now go back to your browser and proceed to the next step. The installer will attempt to create its configuration file in /var/www/html/poweradmin-2.1.7/inc. #### + +The file name is config.inc.php. In case the script is not able to write that file you can create it manually by copying the text and putting it in above mentioned file: + +![Configuration Settings of PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Configuration.png) +Configuration Settings of PowerDNS + +#### 20. Now go to the last page where you will be informed that the installation is complete and will receive information how to access your Poweradmin install: #### + +![PowerDNS Installation Completed](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Installation-Completed.png) +PowerDNS Installation Completed + +You can enable URLs used by other dynamic DNS providers by running: + + # cp install/htaccess.dist .htaccess + +For that purpose you will need to have mod_rewrite enabled in Apache’s configuration. + +#### 21. Now it is important to remove the “install” folder from Poweradmin’s root directory with the following command: #### + + # rm -fr /var/www/html/poweradmin/install/ + +After that you can access your poweradmin at: + + http://192.168.0.102/poweradmin-2.1.7/ + +![PowerDNS Login](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Login.png) +PowerDNS Login + +After logging you should see the Poweradmin main page: + +![PowerDNS Dashboard](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Dashboard.png) +PowerDNS Dashboard + +At this point your installation is complete and you are now ready to start managing your DNS zones. + +### Step 3: How to Add, Edit and Delete DNS Zones in PowerDNS ### + +#### 22. To add new master zone, simply click on the “Add master zone”: #### + +![Add Master Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Add-Master-Zone.png) +Add Master Zone + +On the next page there are few things that you need to fill: + +- Domain – domain for which you will be adding the zone. +- Owner – sets the owner of the DNS zone. +- Template – DNS template – leave to none. +- DNSSEC – Donany Name System Security Extensions (optional -check if you need it). + +Click the “Add zone” button to add the DNS zone. + +![Master DNS Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Master-DNS-Zone.png) +Master DNS Zone + +Now you can go back to the index page of Poweradmin by clicking the “Index” link. To review all existing DNS zones simply go to “List zones”: + +![Check List of Zones](http://www.tecmint.com/wp-content/uploads/2015/04/Check-List-Zones.png) +Check List of Zones + +You should now see a list of available DNS zones: + +![Check List of DNS Zones](http://www.tecmint.com/wp-content/uploads/2015/04/DNS-Zones.png) +Check List of DNS Zones + +#### 23. To edit an existing DNS zone or add new records click the edit icon: #### + +![Edit DNS Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Edit-DNS-Zone.png) +Edit DNS Zone + +On the next page you will see the entries for the DNS zone you have chosen: + +![Domain DNS Zone Entries](http://www.tecmint.com/wp-content/uploads/2015/04/Domain-DNS.png) +Domain DNS Zone Entries + +#### 24. In here to add new DNS zone you will need to set the following information: #### + +- Name – name for the entry. Only add the first part of the domain/subdomain, the rest will be added by Poweradmin. +- Type – choose the record type. +- Priority – priority of the record. +- TTL – Time To Live in seconds. + +For the purpose of this article, I will add an A record for subdomain new.example.com that will resolve on IP address 192.168.0.102 with time to live 14400 seconds: + +![Add New DNS Record](http://www.tecmint.com/wp-content/uploads/2015/04/Add-New-DNS-Record.png) +Add New DNS Record + +Finally click the “Add record” button. + +#### 25. If you wish to delete a DNS zone you can go back to the “List zone” page and click on the “Trash” icon next to the DNS zone which you wish to delete: #### + +![Delete DNS Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Delete-DNS-Zone.png) +Delete DNS Zone + +Poweradmin will ask you if you are sure you want to delete the DNS zone. Simply click “Yes” to finish the deletion. + +For more detailed instructions how to create, edit and delete zones you can refer to Poweradmin’s documentation at: + +[https://github.com/poweradmin/poweradmin/wiki/Documentation][3] + +I hope you have find this article interesting and useful. As always if you have any questions or comments please do not hesitate to submit them in the comment section below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-powerdns-poweradmin-mariadb-in-centos-rhel/ + +作者:[Marin Todorov][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/marintodorov89/ +[1]:http://downloads.powerdns.com/documentation/html/index.html +[2]:http://www.tecmint.com/install-lamp-in-centos-7/ +[3]:https://github.com/poweradmin/poweradmin/wiki/Documentation \ No newline at end of file diff --git a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md new file mode 100644 index 0000000000..44a4110203 --- /dev/null +++ b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md @@ -0,0 +1,130 @@ +How to access a Linux server behind NAT via reverse SSH tunnel +================================================================================ +You are running a Linux server at home, which is behind a NAT router or restrictive firewall. Now you want to SSH to the home server while you are away from home. How would you set that up? SSH port forwarding will certainly be an option. However, port forwarding can become tricky if you are dealing with multiple nested NAT environment. Besides, it can be interfered with under various ISP-specific conditions, such as restrictive ISP firewalls which block forwarded ports, or carrier-grade NAT which shares IPv4 addresses among users. + +### What is Reverse SSH Tunneling? ### + +One alternative to SSH port forwarding is **reverse SSH tunneling**. The concept of reverse SSH tunneling is simple. For this, you will need another host (so-called "relay host") outside your restrictive home network, which you can connect to via SSH from where you are. You could set up a relay host using a [VPS instance][1] with a public IP address. What you do then is to set up a persistent SSH tunnel from the server in your home network to the public relay host. With that, you can connect "back" to the home server from the relay host (which is why it's called a "reverse" tunnel). As long as the relay host is reachable to you, you can connect to your home server wherever you are, or however restrictive your NAT or firewall is in your home network. + +![](https://farm8.staticflickr.com/7742/17162647378_c7d9f10de8_b.jpg) + +### Set up a Reverse SSH Tunnel on Linux ### + +Let's see how we can create and use a reverse SSH tunnel. We assume the following. We will be setting up a reverse SSH tunnel from homeserver to relayserver, so that we can SSH to homeserver via relayserver from another computer called clientcomputer. The public IP address of **relayserver** is 1.1.1.1. + +On homeserver, open an SSH connection to relayserver as follows. + + homeserver~$ ssh -fN -R 10022:localhost:22 relayserver_user@1.1.1.1 + +Here the port 10022 is any arbitrary port number you can choose. Just make sure that this port is not used by other programs on relayserver. + +The "-R 10022:localhost:22" option defines a reverse tunnel. It forwards traffic on port 10022 of relayserver to port 22 of homeserver. + +With "-fN" option, SSH will go right into the background once you successfully authenticate with an SSH server. This option is useful when you do not want to execute any command on a remote SSH server, and just want to forward ports, like in our case. + +After running the above command, you will be right back to the command prompt of homeserver. + +Log in to relayserver, and verify that 127.0.0.1:10022 is bound to sshd. If so, that means a reverse tunnel is set up correctly. + + relayserver~$ sudo netstat -nap | grep 10022 + +---------- + + tcp 0 0 127.0.0.1:10022 0.0.0.0:* LISTEN 8493/sshd + +Now from any other computer (e.g., clientcomputer), log in to relayserver. Then access homeserver as follows. + + relayserver~$ ssh -p 10022 homeserver_user@localhost + +One thing to take note is that the SSH login/password you type for localhost should be for homeserver, not for relayserver, since you are logging in to homeserver via the tunnel's local endpoint. So do not type login/password for relayserver. After successful login, you will be on homeserver. + +### Connect Directly to a NATed Server via a Reverse SSH Tunnel ### + +While the above method allows you to reach **homeserver** behind NAT, you need to log in twice: first to **relayserver**, and then to **homeserver**. This is because the end point of an SSH tunnel on relayserver is binding to loopback address (127.0.0.1). + +But in fact, there is a way to reach NATed homeserver directly with a single login to relayserver. For this, you will need to let sshd on relayserver forward a port not only from loopback address, but also from an external host. This is achieved by specifying **GatewayPorts** option in sshd running on relayserver. + +Open /etc/ssh/sshd_conf of **relayserver** and add the following line. + + relayserver~$ vi /etc/ssh/sshd_conf + +---------- + + GatewayPorts clientspecified + +Restart sshd. + +Debian-based system: + + relayserver~$ sudo /etc/init.d/ssh restart + +Red Hat-based system: + + relayserver~$ sudo systemctl restart sshd + +Now let's initiate a reverse SSH tunnel from homeserver as follows. +homeserver~$ ssh -fN -R 1.1.1.1:10022:localhost:22 relayserver_user@1.1.1.1 + +Log in to relayserver and confirm with netstat command that a reverse SSH tunnel is established successfully. + + relayserver~$ sudo netstat -nap | grep 10022 + +---------- + + tcp 0 0 1.1.1.1:10022 0.0.0.0:* LISTEN 1538/sshd: dev + +Unlike a previous case, the end point of a tunnel is now at 1.1.1.1:10022 (relayserver's public IP address), not 127.0.0.1:10022. This means that the end point of the tunnel is reachable from an external host. + +Now from any other computer (e.g., clientcomputer), type the following command to gain access to NATed homeserver. + + clientcomputer~$ ssh -p 10022 homeserver_user@1.1.1.1 + +In the above command, while 1.1.1.1 is the public IP address of relayserver, homeserver_user must be the user account associated with homeserver. This is because the real host you are logging in to is homeserver, not relayserver. The latter simply relays your SSH traffic to homeserver. + +### Set up a Persistent Reverse SSH Tunnel on Linux ### + +Now that you understand how to create a reverse SSH tunnel, let's make the tunnel "persistent", so that the tunnel is up and running all the time (regardless of temporary network congestion, SSH timeout, relay host rebooting, etc.). After all, if the tunnel is not always up, you won't be able to connect to your home server reliably. + +For a persistent tunnel, I am going to use a tool called autossh. As the name implies, this program allows you to automatically restart an SSH session should it breaks for any reason. So it is useful to keep a reverse SSH tunnel active. + +As the first step, let's set up [passwordless SSH login][2] from homeserver to relayserver. That way, autossh can restart a broken reverse SSH tunnel without user's involvement. + +Next, [install autossh][3] on homeserver where a tunnel is initiated. + +From homeserver, run autossh with the following arguments to create a persistent SSH tunnel destined to relayserver. + + homeserver~$ autossh -M 10900 -fN -o "PubkeyAuthentication=yes" -o "StrictHostKeyChecking=false" -o "PasswordAuthentication=no" -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -R 1.1.1.1:10022:localhost:22 relayserver_user@1.1.1.1 + +The "-M 10900" option specifies a monitoring port on relayserver which will be used to exchange test data to monitor an SSH session. This port should not be used by any program on relayserver. + +The "-fN" option is passed to ssh command, which will let the SSH tunnel run in the background. + +The "-o XXXX" options tell ssh to: + +- Use key authentication, not password authentication. +- Automatically accept (unknown) SSH host keys. +- Exchange keep-alive messages every 60 seconds. +- Send up to 3 keep-alive messages without receiving any response back. + +The rest of reverse SSH tunneling related options remain the same as before. + +If you want an SSH tunnel to be automatically up upon boot, you can add the above autossh command in /etc/rc.local. + +### Conclusion ### + +In this post, I talked about how you can use a reverse SSH tunnel to access a Linux server behind a restrictive firewall or NAT gateway from outside world. While I demonstrated its use case for a home network, you must be careful when applying it for corporate networks. Such a tunnel can be considered as a breach of a corporate policy, as it circumvents corporate firewalls and can expose corporate networks to outside attacks. There is a great chance it can be misused or abused. So always remember its implication before setting it up. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/access-linux-server-behind-nat-reverse-ssh-tunnel.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/go/digitalocean +[2]:http://xmodulo.com/how-to-enable-ssh-login-without.html +[3]:http://ask.xmodulo.com/install-autossh-linux.html \ No newline at end of file From 26093a4a658d6c542a0f80aa1b8af582de1bfcbd Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 4 May 2015 16:24:04 +0800 Subject: [PATCH 145/154] =?UTF-8?q?20150504-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...To Install Visual Studio Code On Ubuntu.md | 61 ++++++ ...r and Remove Unwanted Packages in Linux.md | 183 ++++++++++++++++++ 2 files changed, 244 insertions(+) create mode 100644 sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md create mode 100644 sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md diff --git a/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md b/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md new file mode 100644 index 0000000000..4b5d2eeae6 --- /dev/null +++ b/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md @@ -0,0 +1,61 @@ +How To Install Visual Studio Code On Ubuntu +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Install-Visual-Studio-Code-in-Ubuntu.jpeg) + +Microsoft has done the unexpected by [releasing Visual Studio Code][1] for all major desktop platforms that includes Linux as well. If you are a web developer who happens to be using Ubuntu, you can **easily install Visual Studio Code in Ubuntu**. + +We will be using [Ubuntu Make][2] for installing Visual Studio Code in Ubuntu. Ubuntu Make, previously known as Ubuntu Developer Tools Center, is a command line utility that allows you to easily install various development tools, languages and IDEs. You can easily [install Android Studio][3] and other popular IDEs such as Eclipse with Ubuntu Make. In this tutorial we shall see **how to install Visual Studio Code in Ubuntu with Ubuntu Make**. + +### Install Microsoft Visual Studio Code in Ubuntu ### + +Before installing Visual Studio Code, we need to install Ubuntu Make first. Though Ubuntu Make is available in Ubuntu 15.04 repository, **you’ll need Ubuntu Make 0.7 for Visual Studio**. You can get the latest Ubuntu Make by using the official PPA. The PPA is available for Ubuntu 14.04, 14.10 and 15.04. Also, it **is only available for 64 bit platform**. + +Open a terminal and use the following commands to install Ubuntu Make via official PPA: + + sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make + sudo apt-get update + sudo apt-get install ubuntu-make + +Once you have installed Ubuntu Make, use the command below to install Visual Studio Code: + + umake web visual-studio-code + +You’ll be asked to provide a path where it will be installed: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Visual_Studio_Code_Ubuntu_1.jpeg) + +After throwing a whole lot of terms and conditions, it will ask for your permission to install Visual Studio Code. Press ‘a’ at this screen: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Visual_Studio_Code_Ubuntu_2.jpeg) + +Once you do that it will start downloading and installing it. Once it is installed, you can see that Visual Studio Code icon has already been locked to the Unity Launcher. Just click on it to run it. This is how Visual Studio Code looks like in Ubuntu 15.04 Unity: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Visual_Studio_Code_Ubuntu.jpeg) + +### Uninstall Visual Studio Code from Ubuntu ### + +To uninstall Visual Studio Code, we’ll use the same command line tool umake. Just use the following command in terminal: + + umake web visual-studio-code --remove + +If you do not want to use Ubuntu Make, you can install Visual Studio Code by downloading the files from Microsoft: + +- [Download Visual Studio Code for Linux][4] + +See, how easy it is to install Visual Studio Code in Ubuntu, all thanks to Ubuntu Make. I hope this tutorial helped you. Feel free to drop a comment if you have any questions or suggestions. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-visual-studio-code-ubuntu/ + +作者:[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://www.geekwire.com/2015/microsofts-visual-studio-expands-to-mac-and-linux-with-new-code-development-tool/ +[2]:https://wiki.ubuntu.com/ubuntu-make +[3]:http://itsfoss.com/install-android-studio-ubuntu-linux/ +[4]:https://code.visualstudio.com/Download \ No newline at end of file diff --git a/sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md b/sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md new file mode 100644 index 0000000000..990e621e5b --- /dev/null +++ b/sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md @@ -0,0 +1,183 @@ +Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux +================================================================================ +Here we are with the next part of Linux Command Line Tips and Tricks. If you missed our previous post on Linux Tricks you may find it here. + +- [5 Linux Command Line Tricks][1] + +In this post we will be introducing 6 command Line tips namely create Linux Command line chat using Netcat command, perform addition of a column on the fly from the output of a command, remove orphan packages from Debian and CentOS, get local and remote IP from command Line, get colored output in terminal and decode various color code and last but not the least hash tags implementation in Linux command Line. Lets check them one by one. + +![Linux Commandline Chat Server](http://www.tecmint.com/wp-content/uploads/2015/04/linux-commandline-chat-server.jpg) +6 Useful Commandline Tricks and Tips + +### 1. Create Linux Commandline Chat Server ### + +We all have been using chat service since a long time. We are familiar with Google chat, Hangout, Facebook chat, Whatsapp, Hike and several other application and integrated chat services. Do you know Linux nc command can make your Linux box a chat server with just one line of command. +What is nc command in Linux and what it does? + +nc is the depreciation of Linux netcat command. The nc utility is often referred as Swiss army knife based upon the number of its built-in capabilities. It is used as debugging tool, investigation tool, reading and writing to network connection using TCP/UDP, DNS forward/reverse checking. + +It is prominently used for port scanning, file transferring, backdoor and port listening. nc has the ability to use any local unused port and any local network source address. + +Use nc command (On Server with IP address: 192.168.0.7) to create a command line messaging server instantly. + + $ nc -l -vv -p 11119 + +Explanation of the above command switches. + +- -v : means Verbose +- -vv : more verbose +- -p : The local port Number + +You may replace 11119 with any other local port number. + +Next on the client machine (IP address: 192.168.0.15) run the following command to initialize chat session to machine (where messaging server is running). + + $ nc 192.168.0.7 11119 + +![Linux Commandline Chat with nc Command](http://www.tecmint.com/wp-content/uploads/2015/04/Chat-on-Linux-Commandline.gif) + +**Note**: You can terminate chat session by hitting ctrl+c key and also nc chat is one-to-one service. + +### 2. How to Sum Values in a Column in Linux ### + +How to sum the numerical values of a column, generated as an output of a command, on the fly in the terminal. + +The output of the ‘ls -l‘ command. + + $ ls -l + +![Sum Numerical Values](http://www.tecmint.com/wp-content/uploads/2015/04/Sum-Values.gif) + +Notice that the second column is numerical which represents number of symbolic links and the 5th column is numerical which represents the size of he file. Say we need to sum the values of fifth column on the fly. + +List the content of 5th column without printing anything else. We will be using ‘awk‘ command to do this. ‘$5‘ represents 5th column. + + $ ls -l | awk '{print $5}' + +![List Content Column](http://www.tecmint.com/wp-content/uploads/2015/04/List-Content-Column.gif) + +Now use awk to print the sum of the output of 5th column by pipelining it. + + $ ls -l | awk '{print $5}' | awk '{total = total + $1}END{print total}' + +![Sum and Print Columns](http://www.tecmint.com/wp-content/uploads/2015/04/Sum-Columns.gif) + +### How to Remove Orphan Packages in Linux? ### + +Orphan packages are those packages that are installed as a dependency of another package and no longer required when the original package is removed. + +Say we installed a package gtprogram which was dependent of gtdependency. We can’t install gtprogram unless gtdependency is installed. + +When we remove gtprogram it won’t remove gtdependency by default. And if we don’t remove gtdependency, it will remain as Orpahn Package with no connection to any other package. + + # yum autoremove [On RedHat Systems] + +![Remove Orphan Packages in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Orphan-Packages-in-CentOS1.gif) + + # apt-get autoremove [On Debian Systems] + +![Remove Orphan Packages in Debian](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Orphan-Packages-in-Debian.gif) + +You should always remove Orphan Packages to keep the Linux box loaded with just necessary stuff and nothing else. + +### 4. How to Get Local and Public IP Address of Linux Server ### + +To get you local IP address run the below one liner script. + + $ ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: + +You must have installed ifconfig, if not, apt or yum the required packages. Here we will be pipelining the output of ifconfig with grep command to find the string “intel addr:”. + +We know ifconfig command is sufficient to output local IP Address. But ifconfig generate lots of other outputs and our concern here is to generate only local IP address and nothing else. + + # ifconfig | grep "inet addr:" + +![Check Local IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Local-IP-Address.gif) + +Although the output is more custom now, but we need to filter our local IP address only and nothing else. For this we will use awk to print the second column only by pipelining it with the above script. + + # ifconfig | grep “inet addr:” | awk '{print $2}' + +![Filter Only IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Filter-IP-Address.gif) + +Clear from the above image that we have customised the output very much but still not what we want. The loopback address 127.0.0.1 is still there in the result. + +We use use -v flag with grep that will print only those lines that don’t match the one provided in argument. Every machine have the same loopback address 127.0.0.1, so use grep -v to print those lines that don’t have this string, by pipelining it with above output. + + # ifconfig | grep "inet addr" | awk '{print $2}' | grep -v '127.0.0.1' + +![Print IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Print-IP-Address.gif) + +We have almost generated desired output, just replace the string `(addr:)` from the beginning. We will use cut command to print only column two. The column 1 and column 2 are not separated by tab but by `(:)`, so we need to use delimiter `(-d)` by pipelining the above output. + + # ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: + +![Customized IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Custome-IP-Address.gif) + +Finally! The desired result has been generated. + +### 5. How to Color Linux Terminal ### + +You might have seen colored output in terminal. Also you would be knowing to enable/disable colored output in terminal. If not you may follow the below steps. + +In Linux every user has `'.bashrc'` file, this file is used to handle your terminal output. Open and edit this file with your choice of editor. Note that, this file is hidden (dot beginning of file means hidden). + + $ vi /home/$USER/.bashrc + +Make sure that the following lines below are uncommented. ie., it don’t start with a #. + + if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dirc$ + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' + fi + +![User .bashrc File](http://www.tecmint.com/wp-content/uploads/2015/04/bashrc-file.gif) + +Once done! Save and exit. To make the changes taken into effect logout and again login. + +Now you will see files and folders are listed in various colors based upon type of file. To decode the color code run the below command. + + $ dircolors -p + +Since the output is too long, lets pipeline the output with less command so that we get output one screen at a time. + + $ dircolors -p | less + +![Linux Color Output](http://www.tecmint.com/wp-content/uploads/2015/04/Linux-Color-Output.gif) + +### 6. How to Hash Tag Linux Commands and Scripts ### + +We are using hash tags on Twitter, Facebook and Google Plus (may be some other places, I have not noticed). These hash tags make it easier for others to search for a hash tag. Very few know that we can use hash tag in Linux command Line. + +We already know that `#` in configuration files and most of the programming languages is treated as comment line and is excluded from execution. + +Run a command and then create a hash tag of the command so that we can find it later. Say we have a long script that was executed in point 4 above. Now create a hash tag for this. We know ifconfig can be run by sudo or root user hence acting as root. + + # ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: #myip + +The script above has been hash tagged with ‘myip‘. Now search for the hash tag in reverse-i-serach (press ctrl+r), in the terminal and type ‘myip‘. You may execute it from there, as well. + +![Create Command Hash Tags](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Command-Hash-Tags.gif) + +You may create as many hash tags for every command and find it later using reverse-i-search. + +That’s all for now. We have been working hard to produce interesting and knowledgeable contents for you. What do you think how we are doing? Any suggestion is welcome. You may comment in the box below. Keep connected! Kudos. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-commandline-chat-server-and-remove-unwanted-packages/ + +作者:[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://www.tecmint.com/5-linux-command-line-tricks/ \ No newline at end of file From bd46afe9ce4116061a6f5902222a521527135f95 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 4 May 2015 16:37:22 +0800 Subject: [PATCH 146/154] PUB:20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04 @johnhoow --- ...Lightweight Budgie v8 Desktop in Ubuntu 14.04.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md (72%) diff --git a/translated/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md b/published/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md similarity index 72% rename from translated/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md rename to published/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md index 10bb779e71..ccaff360e5 100644 --- a/translated/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md +++ b/published/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md @@ -53,11 +53,11 @@ Budgie是为Linux发行版定制的旗舰桌面,也是一个定制工程。为 ![安装 Budgie Desktop](http://blog.linoxide.com/wp-content/uploads/2015/02/install-budgie-desktop.png) -**注意点** +**注意** -这是一个活跃的开发版本,一些主要的特点可能还不是特别的完善,如:网络管理器,为数不多的控制组件,无通知系统斌并且无法将app锁定到任务栏。 +这是一个活跃的开发版本,一些主要的功能可能还不是特别的完善,如:没有网络管理器,没有音量控制组件(可以使用键盘控制),无通知系统并且无法将app锁定到任务栏。 -作为工作区你能够禁用滚动栏,通过设置一个默认的主题并且通过下面的命令退出当前的会话 +有一个临时解决方案可以禁用叠加滚动栏:设置另外一个默认主题,然后从终端退出当前会话: $ gnome-session-quit @@ -65,7 +65,7 @@ Budgie是为Linux发行版定制的旗舰桌面,也是一个定制工程。为 ### 登录Budgie会话 ### -安装完成之后,我们能在登录时选择机进入budgie桌面。 +安装完成之后,我们能在登录时选择进入budgie桌面。 ![选择桌面会话](http://blog.linoxide.com/wp-content/uploads/2015/02/session-select.png) @@ -79,8 +79,7 @@ Budgie是为Linux发行版定制的旗舰桌面,也是一个定制工程。为 ### 结论 ### -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 :-) -Budgie桌面当前正在开发过程中,因此有目前有很多功能的缺失。虽然它是基于Gnome,但不是完全的复制。Budgie是完全从零开始实现,它的设计是优雅的并且正在不断的完善。 +嗨,现在我们已经成功的在 Ubuntu 14.04 LTS 上安装了轻量级 Budgie 桌面环境。Budgie桌面当前正在开发过程中,因此有目前有很多功能的缺失。虽然它是基于Gnome 的 GTK3,但不是完全的复制。Budgie是完全从零开始实现,它的设计是优雅的并且正在不断的完善。如果你有任何问题、评论,请在下面的评论框发表。愿你喜欢 Budgie 桌面 0.8 。 -------------------------------------------------------------------------------- @@ -88,7 +87,7 @@ via: http://linoxide.com/ubuntu-how-to/install-lightweight-budgie-v8-desktop-ubu 作者:[Arun Pyasi][a] 译者:[johnhoow](https://github.com/johnhoow) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 32996ca88c5f62b7fdcc8c9be6fde6e32071cedd Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Mon, 4 May 2015 20:24:04 +0800 Subject: [PATCH 147/154] translated wi-cuckoo --- ...sed--How to Upgrade on Fedora or CentOS.md | 168 ------------------ ...sed--How to Upgrade on Fedora or CentOS.md | 167 +++++++++++++++++ 2 files changed, 167 insertions(+), 168 deletions(-) delete mode 100644 sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md create mode 100644 translated/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md diff --git a/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md b/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md deleted file mode 100644 index c3b1a737ce..0000000000 --- a/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md +++ /dev/null @@ -1,168 +0,0 @@ -translating wi-cuckoo -Docker 1.6 Released - How to Upgrade on Fedora / CentOS -================================================================================ -Docker, a popular open source container platform for packaging applications, has a new release 1.6 with lot of new features in it. This version has updates to Docker Registry, Engine, Swarm, Compose and Machine. The release aims at improvements in performance, developer and system administrator experiences. Let us take a quick look at the new features available. - -**Docker Registry (2.0)** which is a service for pushing Docker images for storing and sharing, has undergone architectural changes as it was facing performance issues when under load. It is still backward compatible. The language in which Docker Registry is written is now changed from Python to Google's Go to improve performance. In combination with Docker Engine 1.6, it is capable of pulling the images faster. Earlier the images were delivered sequentially, but now in parallel. - -**Docker Engine (1.6)** is greatly improved from its previous version. It supports containers and image labels. With labels you can attach user-defined metadata to images and containers which in turn can be used by other tools. Labels will not be visible to the running applications and can be used to speed up the searching of containers and images. - -There is a Windows version of the Docker client which can connect to a remote Docker engine that runs Linux. - -Docker now supports logging driver API that allows us to send container logs to systems like Syslog or to a third-party. It is going to be benefitting the system administrators. - -**Swarm (0.2)** is a clustering tool for Docker which turns a pool of Docker hosts into one virtual host. In the new feature, containers are evenly placed on the available nodes. Effort is made towards supporting the complete Docker API by adding more Docker commands. In the future, it will be possible to use third-party drivers for clustering. - -**Compose (1.2)** which is a tool for defining and running complex applications in Docker has also got an upgrade. In the new version, one can create multiple sub-files instead of one flat file to describe a multi-container application. - -With **Machine (0.2)**, we can easily create Docker hosts on local computers, clouds and data centers. The new release provides a cleaner driver interface to write drivers for providers. Provisioning is handled centrally by Machine instead of each individual driver. New command added to regenerate host's TLS certificates which increases security. - -### Upgrade instructions on Fedora / CentOS ### - -In this section, let us learn how to upgrade the existing docker version to the latest on Fedora and CentOS. Please note that currently Docker runs only on 64-bit architecture. As both Fedora and CentOS are from RedHat, commands used are pretty much identical except that the Docker package in Fedora20 and CentOS6.5 is called “docker-io”. - -If you do not already have Docker installed on the system, install it using: - - "yum install docker-io" – on Fedora20 / CentOS6.5 - - "yum install docker" - on Fedora21 / CentOS7 - -Before upgrading, it is good to have a backup of the docker images and container volumes. - -Refer [filesystem to a tar archive][1] and [volumes backups, restores or migrations options][2] for more details. - -Currently the test system has Docker version 1.5 installed. Output shown in the examples are from a Fedora 20 system. - -Verify the current version of Docker installed on the system - - [root@TestNode1 ~]#sudo docker -v - - Docker version 1.5.0, build a8a31ef/1.5.0 - -If the Docker service is running, first stop it. - - [root@TestNode1 ~]# sudo systemctl stop docker - -Upgrade to the latest version using yum update. But at the time of writing this article, the repositories were not yet updated with the latest version(1.6). Hence you need to use the binary method of upgradation. - - [root@TestNode1 ~]#sudo yum -y update docker-io - - No packages marked for update - - [root@TestNode1 ~]#sudo wget https://get.docker.com/builds/Linux/x86_64/docker-latest -O /usr/bin/docker - - --2015-04-19 13:40:48-- https://get.docker.com/builds/Linux/x86_64/docker-latest - - Resolving get.docker.com (get.docker.com)... 162.242.195.82 - - Connecting to get.docker.com (get.docker.com)|162.242.195.82|:443... connected. - - HTTP request sent, awaiting response... 200 OK - - Length: 15443598 (15M) [binary/octet-stream] - - Saving to: /usr/bin/docker - - 100%[======================================>] 15,443,598 8.72MB/s in 1.7s - - 2015-04-19 13:40:50 (8.72 MB/s) - /usr/bin/docker saved - -Check the updated version - - [root@TestNode1 ~]#sudo docker -v - - Docker version 1.6.0, build 4749651 - -Restart the docker service - - [root@TestNode1 ~]# sudo systemctl start docker - -Verify that Docker is working - - [root@TestNode1 ~]# docker images - - REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE - - fedora latest 834629358fe2 3 months ago 241.3 MB - - [root@TestNode1 ~]# docker run fedora /bin/echo Hello World - - Hello World - -**Note** on CentOS installation , after installing Docker on CentOS, you might get error messages like the following while trying to start the Docker service - - docker.service - Docker Application Container Engine - - Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled) - - Active: failed (Result: exit-code) since Mon 2015-04-20 03:24:24 EDT; 6h ago - - Docs: http://docs.docker.com - - Process: 21069 ExecStart=/usr/bin/docker -d $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=127) - - Main PID: 21069 (code=exited, status=127) - - Apr 20 03:24:24 centos7 systemd[1]: Starting Docker Application Container E..... - - Apr 20 03:24:24 centos7 docker[21069]: time="2015-04-20T03:24:24-04:00" lev...)" - - Apr 20 03:24:24 centos7 docker[21069]: time="2015-04-20T03:24:24-04:00" lev...)" - - Apr 20 03:24:24 centos7 docker[21069]: /usr/bin/docker: relocation error: /...ce - - Apr 20 03:24:24 centos7 systemd[1]: docker.service: main process exited, co.../a - - Apr 20 03:24:24 centos7 systemd[1]: Failed to start Docker Application Cont...e. - - Apr 20 03:24:24 centos7 systemd[1]: Unit docker.service entered failed state. - -This is a known bug ( [https://bugzilla.redhat.com/show_bug.cgi?id=1207839][3] ) and needs an upgrade of the device mapper to the latest level. - - [root@centos7 ~]# rpm -qa device-mapper - - device-mapper-1.02.84-14.el7.x86_64 - - [root@centos7 ~]# yum update device-mapper - - [root@centos7 ~]# rpm -qa device-mapper - - device-mapper-1.02.93-3.el7.x86_64 - - [root@centos7 ~]# systemctl start docker - -### Summary ### - -Though the docker technology is quite recent one, it is quickly gaining popularity. It has made life easy for developers and ops teams to quickly create and deploy applications respectively. With the company releasing quick updates to Docker in order to improve the product and address customer requirements, the future is definitely bright for Docker. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/docker-1-6-features-upgrade-fedora-centos/ - -作者:[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://docs.docker.com/reference/commandline/cli/#export -[2]:http://docs.docker.com/userguide/dockervolumes/#backup-restore-or-migrate-data-volumes -[3]:https://bugzilla.redhat.com/show_bug.cgi?id=1207839 -[4]: -[5]: -[6]: -[7]: -[8]: -[9]: -[10]: -[11]: -[12]: -[13]: -[14]: -[15]: -[16]: -[17]: -[18]: -[19]: -[20]: diff --git a/translated/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md b/translated/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md new file mode 100644 index 0000000000..a07ecad986 --- /dev/null +++ b/translated/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md @@ -0,0 +1,167 @@ +Docker 1.6 发布 - 如何在Fedora / CentOS上面升级 +============================================================================= +Docker,一个为软件打包的流行开源容器平台,有了新的发行版1.6,增加了许多新的特性。该版本在Docker注册,引擎,云集,组合和机器方面都有更新。这次发行旨在提升体验,开发者和系统管理员的经验(这里不太确定)。让我们来快速看看有哪些新特性吧。 + +**Docker Registry (2.0)**是一项推送Docker镜像用于存储和分享的服务,经历过架构的改变,因为面临加载下的体验问题。它仍然向下兼容。Docker Registry的编写语言现在从Python改为Google的Go语言了,为了提升表现力。与Docker引擎1.6结合后,拉取镜像的能力更快了。早先的镜像被队列式地输送,而现在是并行的啦。 + +**Docker Engine (1.6)**相比之前的版本有很大的提高。目前支持容器与镜像标签。通过标签,你可以附加用户自定义的元数据到镜像和容器上,而镜像和容器反过来可以被其他工具使用。标签对正在运行的应用是不可见的,可以用来加速搜索容器和镜像。 + +Windows版本的Docker客户端可以连接一个远程的运行linux的Docker引擎。 + +Docker目前支持日志驱动API,这允许我们发送容器日志给系统如Syslog,或者第三方。这将会使得系统管理员受益。 + +**Swarm (0.2)**是一个Docker集群工具,将一个Docker主机池转换为一个虚拟主机。在新特性里,容器甚至被放在了可用的节点上。通过添加更多的Docker命令,所有的努力都朝着支持完整的Docker API。将来,使用第三方驱动来集群会成为可能。 + +**Compose (1.2)** 是一个Docker里定义和运行复杂应用的工具, 也得到了升级。在新版本里,一个可以创建多个子文件,而不是一个没有结构的文件描述一个多容器应用。 + +通过**Machine (0.2)**,我们可以很容易地在本地计算机,云和数据中心上搭建Docker主机。新的发行版为开发者提供了一个相对干净地驱动界面来写驱动。供应被Machine牢牢地掌握,而不是每个独立的驱动。新的命令被添加,可以用来生成主机的TLS证书,以提高安全性。 + +### 在Fedora / CentOS 上升级架构 ### + +在这一部分里,我们将会学习如何在Fedora和CentOS上升级已有的docker到最新版本。请注意,目前的Docker仅运行在64位的架构上,Fedora和CentOS都源于RedHat,命令的使用是差不多相同的,除了在Fedora20和CentOS6.5里Docker包被叫做“docker-io”。 + +如果你系统之前没有安装Docker,使用下面命令安装: + + "yum install docker-io" – on Fedora20 / CentOS6.5 + + "yum install docker" - on Fedora21 / CentOS7 + +在升级之前,备份一下docker镜像和容器卷是个不错的主意。 + +参考[filesystem to a tar archive][1]与[volumes backups, restores or migrations options][2],获取更多信息。 + +目前,测试系统安装了Docker1.5。样例输出显示是来自一个Fedora20的系统。 + +验证当前系统安装的Docker版本 + + [root@TestNode1 ~]#sudo docker -v + + Docker version 1.5.0, build a8a31ef/1.5.0 + +如果Docker正在运行,先停掉。 + + [root@TestNode1 ~]# sudo systemctl stop docker + +升级到最新版使用yum update。但是写这篇文章的时候,仓库并不是最新版本(1.6)。因此你需要使用二进制的升级方法。 + + [root@TestNode1 ~]#sudo yum -y update docker-io + + No packages marked for update + + [root@TestNode1 ~]#sudo wget https://get.docker.com/builds/Linux/x86_64/docker-latest -O /usr/bin/docker + + --2015-04-19 13:40:48-- https://get.docker.com/builds/Linux/x86_64/docker-latest + + Resolving get.docker.com (get.docker.com)... 162.242.195.82 + + Connecting to get.docker.com (get.docker.com)|162.242.195.82|:443... connected. + + HTTP request sent, awaiting response... 200 OK + + Length: 15443598 (15M) [binary/octet-stream] + + Saving to: /usr/bin/docker + + 100%[======================================>] 15,443,598 8.72MB/s in 1.7s + + 2015-04-19 13:40:50 (8.72 MB/s) - /usr/bin/docker saved + +检查更新版本 + + [root@TestNode1 ~]#sudo docker -v + + Docker version 1.6.0, build 4749651 + +重启docker服务 + + [root@TestNode1 ~]# sudo systemctl start docker + +确认Docker在运行 + + [root@TestNode1 ~]# docker images + + REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE + + fedora latest 834629358fe2 3 months ago 241.3 MB + + [root@TestNode1 ~]# docker run fedora /bin/echo Hello World + + Hello World + +CentOS安装时需要**注意**,在CentOS上安装完Docker后,当你试图启动Docker服务的时候,你可能会得到错误的信息,如下所示 + + docker.service - Docker Application Container Engine + + Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled) + + Active: failed (Result: exit-code) since Mon 2015-04-20 03:24:24 EDT; 6h ago + + Docs: http://docs.docker.com + + Process: 21069 ExecStart=/usr/bin/docker -d $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=127) + + Main PID: 21069 (code=exited, status=127) + + Apr 20 03:24:24 centos7 systemd[1]: Starting Docker Application Container E..... + + Apr 20 03:24:24 centos7 docker[21069]: time="2015-04-20T03:24:24-04:00" lev...)" + + Apr 20 03:24:24 centos7 docker[21069]: time="2015-04-20T03:24:24-04:00" lev...)" + + Apr 20 03:24:24 centos7 docker[21069]: /usr/bin/docker: relocation error: /...ce + + Apr 20 03:24:24 centos7 systemd[1]: docker.service: main process exited, co.../a + + Apr 20 03:24:24 centos7 systemd[1]: Failed to start Docker Application Cont...e. + + Apr 20 03:24:24 centos7 systemd[1]: Unit docker.service entered failed state. + +这是一个熟知的bug([https://bugzilla.redhat.com/show_bug.cgi?id=1207839][3]),需要一个设备映射的升级,到最新的水平。 + + [root@centos7 ~]# rpm -qa device-mapper + + device-mapper-1.02.84-14.el7.x86_64 + + [root@centos7 ~]# yum update device-mapper + + [root@centos7 ~]# rpm -qa device-mapper + + device-mapper-1.02.93-3.el7.x86_64 + + [root@centos7 ~]# systemctl start docker + +### 总结 ### + +尽管docker技术出现时间不长,当很快获得了流行。它使得开发者的生活变得容易,运维团队可以快速独立地创建和部署应用。通过公司发布快速的Docker更新,来提升产品质量,满足用户需求,未来对于Docker来说一片光明。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/docker-1-6-features-upgrade-fedora-centos/ + +作者:[B N Poornima][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/bnpoornima/ +[1]:http://docs.docker.com/reference/commandline/cli/#export +[2]:http://docs.docker.com/userguide/dockervolumes/#backup-restore-or-migrate-data-volumes +[3]:https://bugzilla.redhat.com/show_bug.cgi?id=1207839 +[4]: +[5]: +[6]: +[7]: +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: From 6113b6009f1ed44787131af0516cc5a09573d54f Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 4 May 2015 21:59:14 +0800 Subject: [PATCH 148/154] PUB:20150108 Interface (NICs) Bonding in Linux using nmcli @ictlyh --- ...nterface (NICs) Bonding in Linux using nmcli.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150108 Interface (NICs) Bonding in Linux using nmcli.md (82%) diff --git a/translated/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md b/published/20150108 Interface (NICs) Bonding in Linux using nmcli.md similarity index 82% rename from translated/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md rename to published/20150108 Interface (NICs) Bonding in Linux using nmcli.md index 0b5bf2cd8e..fa8297599b 100644 --- a/translated/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md +++ b/published/20150108 Interface (NICs) Bonding in Linux using nmcli.md @@ -1,15 +1,15 @@ -在 Linux 中用 nmcli 命令绑定网卡(NICs) +在 Linux 中用 nmcli 命令绑定多块网卡 ================================================================================ -今天,我们来学习一下在 CentOS 7.x 中如何用 nmcli(Network Manager Command Line Interface:网络管理命令行接口) 进行网卡(NICs 译者注:Netword Interface Card,网卡或网络适配器)绑定(译者注:bond 是指把多个物理网卡绑定成一个逻辑上的网卡,这样多个网卡可以使用同一个 IP 从而可以避免单点故障)。 +今天,我们来学习一下在 CentOS 7.x 中如何用 nmcli(Network Manager Command Line Interface:网络管理命令行接口)进行网卡绑定。 -网卡绑定是将 **网卡** 逻辑地连接到一起从而允许故障转移或者提高吞吐率的方法。提高服务器网络可用性的一个方式是使用多个网卡。Linux 绑定驱动提供了一个将多个网卡聚合到一个逻辑绑定接口的方法。这是个并不影响 linux 内核中旧绑定驱动的新的实现;它提供了另一种实现方法。 +网卡(接口)绑定是将多块 **网卡** 逻辑地连接到一起从而允许故障转移或者提高吞吐率的方法。提高服务器网络可用性的一个方式是使用多个网卡。Linux 绑定驱动程序提供了一种将多个网卡聚合到一个逻辑的绑定接口的方法。这是个新的实现绑定的方法,并不影响 linux 内核中旧绑定驱动。 **网卡绑定为我们提供了两个主要的好处:** 1. **高带宽** 1. **冗余/弹性** -现在让我们在 CentOS 7 上配置网卡绑定吧。我们需要决定选取哪些接口配置成一个组接口。 +现在让我们在 CentOS 7 上配置网卡绑定吧。我们需要决定选取哪些接口配置成一个组接口(Team interface)。 运行 **ip link** 命令查看系统中可用的接口。 @@ -45,7 +45,7 @@ ### 2. 添加从设备 ### -现在让我们天际从设备到主设备 team0。这是添加从设备的语法。 +现在让我们添加从设备到主设备 team0。这是添加从设备的语法: # nmcli con add type team-slave con-name CNAME ifname INAME master TEAM @@ -89,7 +89,7 @@ ![teamdctl 检查主动备份](http://blog.linoxide.com/wp-content/uploads/2015/01/teamdctl-activebackup-check.png) -现在让我们和激活的端口断开连接并再次检查状态来确认主动备份配置是否像希望的那样工作。 +现在让我们把激活的端口断开连接并再次检查状态来确认主动备份配置是否像希望的那样工作。 # nmcli dev dis eno33554960 @@ -129,7 +129,7 @@ via: http://linoxide.com/linux-command/interface-nics-bonding-linux/ 作者:[Arun Pyasi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 48388fdc8158cbd6617de24b9008da9b128d9d54 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 4 May 2015 22:05:33 +0800 Subject: [PATCH 149/154] PUB:20150316 Install Mate desktop in FreeBSD 10.1 @geekpi --- .../20150316 Install Mate desktop in FreeBSD 10.1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {translated/tech => published}/20150316 Install Mate desktop in FreeBSD 10.1.md (97%) diff --git a/translated/tech/20150316 Install Mate desktop in FreeBSD 10.1.md b/published/20150316 Install Mate desktop in FreeBSD 10.1.md similarity index 97% rename from translated/tech/20150316 Install Mate desktop in FreeBSD 10.1.md rename to published/20150316 Install Mate desktop in FreeBSD 10.1.md index 76d05da5ab..ed4aa9d18b 100644 --- a/translated/tech/20150316 Install Mate desktop in FreeBSD 10.1.md +++ b/published/20150316 Install Mate desktop in FreeBSD 10.1.md @@ -54,7 +54,7 @@ via: http://www.unixmen.com/install-mate-desktop-freebsd-10-1/ 作者:[M.el Khamlichi][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 641402750c9225c15d29ccfcbe5cda7db5ac9a19 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Tue, 5 May 2015 16:00:16 +0800 Subject: [PATCH 150/154] transalting wi-cuckoo --- .../share/20150429 What are good command line HTTP clients.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150429 What are good command line HTTP clients.md b/sources/share/20150429 What are good command line HTTP clients.md index d809be1a06..a06e4e34db 100644 --- a/sources/share/20150429 What are good command line HTTP clients.md +++ b/sources/share/20150429 What are good command line HTTP clients.md @@ -1,3 +1,4 @@ +translating wi-cuckoo What are good command line HTTP clients? ================================================================================ The whole is greater than the sum of its parts is a very famous quote from Aristotle, a Greek philosopher and scientist. This quote is particularly pertinent to Linux. In my view, one of Linux's biggest strengths is its synergy. The usefulness of Linux doesn't derive only from the huge raft of open source (command line) utilities. Instead, it's the synergy generated by using them together, sometimes in conjunction with larger applications. @@ -107,4 +108,4 @@ via: http://www.linuxlinks.com/article/20150425174537249/HTTPclients.html [1]:http://httpie.org/ [2]:http://curl.haxx.se/ -[3]:https://www.gnu.org/software/wget/ \ No newline at end of file +[3]:https://www.gnu.org/software/wget/ From c3a9eb6992da60207765ffb3901bd1dd8ee7ad5c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 5 May 2015 16:43:45 +0800 Subject: [PATCH 151/154] =?UTF-8?q?20150505-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...5 Bodhi Linux Introduces Moksha Desktop.md | 40 ++ ...es and Units Using 'Systemctl' in Linux.md | 579 ++++++++++++++++++ 2 files changed, 619 insertions(+) create mode 100644 sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md create mode 100644 sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md diff --git a/sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md b/sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md new file mode 100644 index 0000000000..0b4d61993d --- /dev/null +++ b/sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md @@ -0,0 +1,40 @@ +Bodhi Linux Introduces Moksha Desktop +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Bodhi_Linux.jpg) + +Ubuntu based lightweight Linux distribution [Bodhi Linux][1] is working on a desktop environment of its own. This new desktop environment will be called Moksha (Sanskrit for ‘complete freedom’). Moksha will be replacing the usual [Enlightenment desktop environment][2]. + +### Why Moksha instead of Enlightenment? ### + +Jeff Hoogland of Bodhi Linux [says][3] that he had been unhappy with the newer versions of Enlightenment in the recent past. Until E17, Enlightenment was very stable and complemented well to the need of a lightweight Linux OS, but the E18 was so full of bugs that Bodhi Linux skipped it altogether. + +While the latest [Bodhi Linux 3.0.0 release][4] uses E19 (except the legacy mode, meant for older hardware, still uses E17), Jeff is not happy with E19 as well. He quotes: + +> On top of the performance issues, E19 did not allow for me personally to have the same workflow I enjoyed under E17 due to features it no longer had. Because of this I had changed to using the E17 on all of my Bodhi 3 computers – even my high end ones. This got me to thinking how many of our existing Bodhi users felt the same way, so I [opened a discussion about it on our user forums][5]. + +### Moksha is continuation of the E17 desktop ### + +Moksha will be a continuation of Bodhi’s favorite E17 desktop. Jeff further mentions: + +> We will start by integrating all of the Bodhi changes we have simply been patching into the source code over the years and fixing the few issues the desktop has. Once this is done we will begin back porting a few of the more useful features E18 and E19 introduced to the Enlightenment desktop and finally, we will introduce a few new things we think will improve the end user experience. + +### When will Moksha release? ### + +The next update to Bodhi will be Bodhi 3.1.0 in August this year. This new release will bring Moksha on all of its default ISOs. Let’s wait and watch to see if Moksha turns out to be a good decision or not. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/bodhi-linux-introduces-moksha-desktop/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://www.bodhilinux.com/ +[2]:https://www.enlightenment.org/ +[3]:http://www.bodhilinux.com/2015/04/28/introducing-the-moksha-desktop/ +[4]:http://itsfoss.com/bodhi-linux-3/ +[5]:http://forums.bodhilinux.com/index.php?/topic/12322-e17-vs-e19-which-are-you-using-and-why/ \ No newline at end of file diff --git a/sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md b/sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md new file mode 100644 index 0000000000..60e41c57ab --- /dev/null +++ b/sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md @@ -0,0 +1,579 @@ +How to Manage ‘Systemd’ Services and Units Using ‘Systemctl’ in Linux +================================================================================ +Systemctl is a systemd utility which is responsible for Controlling the systemd system and service manager. + +Systemd is a collection of system management daemons, utilities and libraries which serves as a replacement of System V init daemon. Systemd functions as central management and configuration platform for UNIX like system. + +In the Linux Ecosystem Systemd has been implemented on most of the standard Linux Distribution with a few exception. Systemd is the parent Process of all other daemons oftenly but not always. + +![Manage Linux Services Using Systemctl](http://www.tecmint.com/wp-content/uploads/2015/04/Manage-Linux-Services-Using-Systemctl.jpg) +Manage Linux Services Using Systemctl + +This article aims at throwing light on “How to control System and Services” on a system running systemd. + +### Starting with Systemtd and Systemctl Basics ### + +#### 1. First check if systemd is installed on your system or not and what is the version of currently installed Systemd? #### + + # systemd --version + + systemd 215 + +PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR + +It’s clear from the above example, that we have systemd 215 version Installed. + +#### 2. Check where the binaries and libraries of systemd and systemctl are installed. #### + + # whereis systemd + systemd: /usr/lib/systemd /etc/systemd /usr/share/systemd /usr/share/man/man1/systemd.1.gz + + + # whereis systemctl + systemctl: /usr/bin/systemctl /usr/share/man/man1/systemctl.1.gz + +#### 3. Check whether systemd is running or not. #### + + # ps -eaf | grep [s]ystemd + + root 1 0 0 16:27 ? 00:00:00 /usr/lib/systemd/systemd --switched-root --system --deserialize 23 + root 444 1 0 16:27 ? 00:00:00 /usr/lib/systemd/systemd-journald + root 469 1 0 16:27 ? 00:00:00 /usr/lib/systemd/systemd-udevd + root 555 1 0 16:27 ? 00:00:00 /usr/lib/systemd/systemd-logind + dbus 556 1 0 16:27 ? 00:00:00 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation + +**Notice**: systemd is running as parent daemon (PID=1). In the above command ps with (-e) select all Processes, (- + +a) select all processes except session leaders and (-f) for full format listing (i.e. -eaf). + +Also note the square brackets in the above example and rest of the examples to follow. Square Bracket expression is part of grep’s character class pattern matching. + +#### 4. Analyze systemd boot process. #### + + # systemd-analyze + Startup finished in 487ms (kernel) + 2.776s (initrd) + 20.229s (userspace) = 23.493s + +#### 5. Analyze time taken by each process at boot. #### + + # systemd-analyze blame + + 8.565s mariadb.service + 7.991s webmin.service + 6.095s postfix.service + 4.311s httpd.service + 3.926s firewalld.service + 3.780s kdump.service + 3.238s tuned.service + 1.712s network.service + 1.394s lvm2-monitor.service + 1.126s systemd-logind.service + .... + +#### 6. Analyze critical chain at boot. #### + + # systemd-analyze critical-chain + + The time after the unit is active or started is printed after the "@" character. + The time the unit takes to start is printed after the "+" character. + + multi-user.target @20.222s + └─mariadb.service @11.657s +8.565s + └─network.target @11.168s + └─network.service @9.456s +1.712s + └─NetworkManager.service @8.858s +596ms + └─firewalld.service @4.931s +3.926s + └─basic.target @4.916s + └─sockets.target @4.916s + └─dbus.socket @4.916s + └─sysinit.target @4.905s + └─systemd-update-utmp.service @4.864s +39ms + └─auditd.service @4.563s +301ms + └─systemd-tmpfiles-setup.service @4.485s +69ms + └─rhel-import-state.service @4.342s +142ms + └─local-fs.target @4.324s + └─boot.mount @4.286s +31ms + └─systemd-fsck@dev-disk-by\x2duuid-79f594ad\x2da332\x2d4730\x2dbb5f\x2d85d19608096 + └─dev-disk-by\x2duuid-79f594ad\x2da332\x2d4730\x2dbb5f\x2d85d196080964.device @4 + +**Important**: Systemctl accepts services (.service), mount point (.mount), sockets (.socket) and devices (.device) as units. + +#### 7. List all the available units. #### + + # systemctl list-unit-files + + UNIT FILE STATE + proc-sys-fs-binfmt_misc.automount static + dev-hugepages.mount static + dev-mqueue.mount static + proc-sys-fs-binfmt_misc.mount static + sys-fs-fuse-connections.mount static + sys-kernel-config.mount static + sys-kernel-debug.mount static + tmp.mount disabled + brandbot.path disabled + ..... + +#### 8. List all running units. #### + + # systemctl list-units + + UNIT LOAD ACTIVE SUB DESCRIPTION + proc-sys-fs-binfmt_misc.automount loaded active waiting Arbitrary Executable File Formats File Syste + sys-devices-pc...0-1:0:0:0-block-sr0.device loaded active plugged VBOX_CD-ROM + sys-devices-pc...:00:03.0-net-enp0s3.device loaded active plugged PRO/1000 MT Desktop Adapter + sys-devices-pc...00:05.0-sound-card0.device loaded active plugged 82801AA AC'97 Audio Controller + sys-devices-pc...:0:0-block-sda-sda1.device loaded active plugged VBOX_HARDDISK + sys-devices-pc...:0:0-block-sda-sda2.device loaded active plugged LVM PV Qzyo3l-qYaL-uRUa-Cjuk-pljo-qKtX-VgBQ8 + sys-devices-pc...0-2:0:0:0-block-sda.device loaded active plugged VBOX_HARDDISK + sys-devices-pl...erial8250-tty-ttyS0.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS0 + sys-devices-pl...erial8250-tty-ttyS1.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS1 + sys-devices-pl...erial8250-tty-ttyS2.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS2 + sys-devices-pl...erial8250-tty-ttyS3.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS3 + sys-devices-virtual-block-dm\x2d0.device loaded active plugged /sys/devices/virtual/block/dm-0 + sys-devices-virtual-block-dm\x2d1.device loaded active plugged /sys/devices/virtual/block/dm-1 + sys-module-configfs.device loaded active plugged /sys/module/configfs + ... + +#### 9. List all failed units. #### + + # systemctl --failed + + UNIT LOAD ACTIVE SUB DESCRIPTION + kdump.service loaded failed failed Crash recovery kernel arming + + LOAD = Reflects whether the unit definition was properly loaded. + ACTIVE = The high-level unit activation state, i.e. generalization of SUB. + SUB = The low-level unit activation state, values depend on unit type. + + 1 loaded units listed. Pass --all to see loaded but inactive units, too. + To show all installed unit files use 'systemctl list-unit-files'. + +#### 10. Check if a Unit (cron.service) is enabled or not?. #### + + # systemctl is-enabled crond.service + + enabled + +#### 11. Check whether a Unit or Service is running or not?. #### + + # systemctl status firewalld.service + + firewalld.service - firewalld - dynamic firewall daemon + Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled) + Active: active (running) since Tue 2015-04-28 16:27:55 IST; 34min ago + Main PID: 549 (firewalld) + CGroup: /system.slice/firewalld.service + └─549 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid + + Apr 28 16:27:51 tecmint systemd[1]: Starting firewalld - dynamic firewall daemon... + Apr 28 16:27:55 tecmint systemd[1]: Started firewalld - dynamic firewall daemon. + +### Control and Manage Services Using Systemctl ### + +#### 12. List all services (including enabled and disabled). #### + + # systemctl list-unit-files --type=service + + UNIT FILE STATE + arp-ethers.service disabled + auditd.service enabled + autovt@.service disabled + blk-availability.service disabled + brandbot.service static + collectd.service disabled + console-getty.service disabled + console-shell.service disabled + cpupower.service disabled + crond.service enabled + dbus-org.fedoraproject.FirewallD1.service enabled + .... + +#### 13. How do I start, restart, stop, reload and check the status of a service (httpd.service) in Linux. #### + + # systemctl start httpd.service + # systemctl restart httpd.service + # systemctl stop httpd.service + # systemctl reload httpd.service + # systemctl status httpd.service + + httpd.service - The Apache HTTP Server + Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled) + Active: active (running) since Tue 2015-04-28 17:21:30 IST; 6s ago + Process: 2876 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS) + Main PID: 2881 (httpd) + Status: "Processing requests..." + CGroup: /system.slice/httpd.service + ├─2881 /usr/sbin/httpd -DFOREGROUND + ├─2884 /usr/sbin/httpd -DFOREGROUND + ├─2885 /usr/sbin/httpd -DFOREGROUND + ├─2886 /usr/sbin/httpd -DFOREGROUND + ├─2887 /usr/sbin/httpd -DFOREGROUND + └─2888 /usr/sbin/httpd -DFOREGROUND + + Apr 28 17:21:30 tecmint systemd[1]: Starting The Apache HTTP Server... + Apr 28 17:21:30 tecmint httpd[2881]: AH00558: httpd: Could not reliably determine the server's fully q...ssage + Apr 28 17:21:30 tecmint systemd[1]: Started The Apache HTTP Server. + Hint: Some lines were ellipsized, use -l to show in full. + +**Note**: When we use commands like start, restart, stop and reload with systemctl, we will not get any output on the terminal, only status command will print the output. + +#### 14. How to active a service and enable or disable a service at boot time (auto start service at system boot). #### + + # systemctl is-active httpd.service + # systemctl enable httpd.service + # systemctl disable httpd.service + +#### 15. How to mask (making it impossible to start) or unmask a service (httpd.service). #### + + # systemctl mask httpd.service + ln -s '/dev/null' '/etc/systemd/system/httpd.service' + + # systemctl unmask httpd.service + rm '/etc/systemd/system/httpd.service' + +#### 16. How to a Kill a service using systemctl command. #### + + # systemctl kill httpd + # systemctl status httpd + + httpd.service - The Apache HTTP Server + Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled) + Active: failed (Result: exit-code) since Tue 2015-04-28 18:01:42 IST; 28min ago + Main PID: 2881 (code=exited, status=0/SUCCESS) + Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec" + + Apr 28 17:37:29 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 17:37:29 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 17:37:39 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 17:37:39 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 17:37:49 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 17:37:49 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 17:37:59 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 17:37:59 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 18:01:42 tecmint systemd[1]: httpd.service: control process exited, code=exited status=226 + Apr 28 18:01:42 tecmint systemd[1]: Unit httpd.service entered failed state. + Hint: Some lines were ellipsized, use -l to show in full. + +### Control and Manage Mount Points using Systemctl ### + +#### 17. List all system mount points. #### + + # systemctl list-unit-files --type=mount + + UNIT FILE STATE + dev-hugepages.mount static + dev-mqueue.mount static + proc-sys-fs-binfmt_misc.mount static + sys-fs-fuse-connections.mount static + sys-kernel-config.mount static + sys-kernel-debug.mount static + tmp.mount disabled + +#### 18. How do I mount, unmount, remount, reload system mount points and also check the status of mount points on the system. #### + + # systemctl start tmp.mount + # systemctl stop tmp.mount + # systemctl restart tmp.mount + # systemctl reload tmp.mount + # systemctl status tmp.mount + + tmp.mount - Temporary Directory + Loaded: loaded (/usr/lib/systemd/system/tmp.mount; disabled) + Active: active (mounted) since Tue 2015-04-28 17:46:06 IST; 2min 48s ago + Where: /tmp + What: tmpfs + Docs: man:hier(7) + + http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems + + Process: 3908 ExecMount=/bin/mount tmpfs /tmp -t tmpfs -o mode=1777,strictatime (code=exited, status=0/SUCCESS) + + Apr 28 17:46:06 tecmint systemd[1]: Mounting Temporary Directory... + Apr 28 17:46:06 tecmint systemd[1]: tmp.mount: Directory /tmp to mount over is not empty, mounting anyway. + Apr 28 17:46:06 tecmint systemd[1]: Mounted Temporary Directory. + +#### 19. How to active, enable or disable a mount point at boot time (auto mount at system boot). #### + + # systemctl is-active tmp.mount + # systemctl enable tmp.mount + # systemctl disable tmp.mount + +#### 20. How to mask (making it impossible to start) or unmask a mount points in Linux. #### + + # systemctl mask tmp.mount + + ln -s '/dev/null' '/etc/systemd/system/tmp.mount' + + # systemctl unmask tmp.mount + + rm '/etc/systemd/system/tmp.mount' + +### Control and Manage Sockets using Systemctl ### + +#### 21. List all available system sockets. #### + + # systemctl list-unit-files --type=socket + + UNIT FILE STATE + dbus.socket static + dm-event.socket enabled + lvm2-lvmetad.socket enabled + rsyncd.socket disabled + sshd.socket disabled + syslog.socket static + systemd-initctl.socket static + systemd-journald.socket static + systemd-shutdownd.socket static + systemd-udevd-control.socket static + systemd-udevd-kernel.socket static + + 11 unit files listed. + +#### 22. How do I start, restart, stop, reload and check the status of a socket (example: cups.socket) in Linux. #### + + # systemctl start cups.socket + # systemctl restart cups.socket + # systemctl stop cups.socket + # systemctl reload cups.socket + # systemctl status cups.socket + + cups.socket - CUPS Printing Service Sockets + Loaded: loaded (/usr/lib/systemd/system/cups.socket; enabled) + Active: active (listening) since Tue 2015-04-28 18:10:59 IST; 8s ago + Listen: /var/run/cups/cups.sock (Stream) + + Apr 28 18:10:59 tecmint systemd[1]: Starting CUPS Printing Service Sockets. + Apr 28 18:10:59 tecmint systemd[1]: Listening on CUPS Printing Service Sockets. + +#### 23. How to active a socket and enable or disable at boot time (auto start socket at system boot). #### + + # systemctl is-active cups.socket + # systemctl enable cups.socket + # systemctl disable cups.socket + +#### 24. How to mask (making it impossible to start) or unmask a socket (cups.socket). #### + + # systemctl mask cups.socket + ln -s '/dev/null' '/etc/systemd/system/cups.socket' + + # systemctl unmask cups.socket + rm '/etc/systemd/system/cups.socket' + +### CPU Utilization (Shares) of a Service ### + +#### 25. Get the current CPU Shares of a Service (say httpd). #### + + # systemctl show -p CPUShares httpd.service + + CPUShares=1024 + +**Note**: The default each service has a CPUShare = 1024. You may increase/decrease CPU share of a process. + +#### 26. Limit the CPU Share of a service (httpd.service) to 2000 CPUShares/ #### + + # systemctl set-property httpd.service CPUShares=2000 + # systemctl show -p CPUShares httpd.service + + CPUShares=2000 + +**Note**: When you set CPUShare for a service, a directory with the name of service is created (httpd.service.d) which contains a file 90-CPUShares.conf which contains the CPUShare Limit information. You may view the file as: + + # vi /etc/systemd/system/httpd.service.d/90-CPUShares.conf + + [Service] + CPUShares=2000 + +#### 27. Check all the configuration details of a service. #### + + # systemctl show httpd + + Id=httpd.service + Names=httpd.service + Requires=basic.target + Wants=system.slice + WantedBy=multi-user.target + Conflicts=shutdown.target + Before=shutdown.target multi-user.target + After=network.target remote-fs.target nss-lookup.target systemd-journald.socket basic.target system.slice + Description=The Apache HTTP Server + LoadState=loaded + ActiveState=active + SubState=running + FragmentPath=/usr/lib/systemd/system/httpd.service + .... + +#### 28. Analyze critical chain for a services(httpd). #### + + # systemd-analyze critical-chain httpd.service + + The time after the unit is active or started is printed after the "@" character. + The time the unit takes to start is printed after the "+" character. + + httpd.service +142ms + └─network.target @11.168s + └─network.service @9.456s +1.712s + └─NetworkManager.service @8.858s +596ms + └─firewalld.service @4.931s +3.926s + └─basic.target @4.916s + └─sockets.target @4.916s + └─dbus.socket @4.916s + └─sysinit.target @4.905s + └─systemd-update-utmp.service @4.864s +39ms + └─auditd.service @4.563s +301ms + └─systemd-tmpfiles-setup.service @4.485s +69ms + └─rhel-import-state.service @4.342s +142ms + └─local-fs.target @4.324s + └─boot.mount @4.286s +31ms + └─systemd-fsck@dev-disk-by\x2duuid-79f594ad\x2da332\x2d4730\x2dbb5f\x2d85d196080964.service @4.092s +149ms + └─dev-disk-by\x2duuid-79f594ad\x2da332\x2d4730\x2dbb5f\x2d85d196080964.device @4.092s + +#### 29. Get a list of dependencies for a services (httpd). #### + + # systemctl list-dependencies httpd.service + + httpd.service + ├─system.slice + └─basic.target + ├─firewalld.service + ├─microcode.service + ├─rhel-autorelabel-mark.service + ├─rhel-autorelabel.service + ├─rhel-configure.service + ├─rhel-dmesg.service + ├─rhel-loadmodules.service + ├─paths.target + ├─slices.target + │ ├─-.slice + │ └─system.slice + ├─sockets.target + │ ├─dbus.socket + .... + +#### 30. List control groups hierarchically. #### + + # systemd-cgls + + ├─1 /usr/lib/systemd/systemd --switched-root --system --deserialize 23 + ├─user.slice + │ └─user-0.slice + │ └─session-1.scope + │ ├─2498 sshd: root@pts/0 + │ ├─2500 -bash + │ ├─4521 systemd-cgls + │ └─4522 systemd-cgls + └─system.slice + ├─httpd.service + │ ├─4440 /usr/sbin/httpd -DFOREGROUND + │ ├─4442 /usr/sbin/httpd -DFOREGROUND + │ ├─4443 /usr/sbin/httpd -DFOREGROUND + │ ├─4444 /usr/sbin/httpd -DFOREGROUND + │ ├─4445 /usr/sbin/httpd -DFOREGROUND + │ └─4446 /usr/sbin/httpd -DFOREGROUND + ├─polkit.service + │ └─721 /usr/lib/polkit-1/polkitd --no-debug + .... + +#### 31. List control group according to CPU, memory, Input and Output. #### + + # systemd-cgtop + + Path Tasks %CPU Memory Input/s Output/s + + / 83 1.0 437.8M - - + /system.slice - 0.1 - - - + /system.slice/mariadb.service 2 0.1 - - - + /system.slice/tuned.service 1 0.0 - - - + /system.slice/httpd.service 6 0.0 - - - + /system.slice/NetworkManager.service 1 - - - - + /system.slice/atop.service 1 - - - - + /system.slice/atopacct.service 1 - - - - + /system.slice/auditd.service 1 - - - - + /system.slice/crond.service 1 - - - - + /system.slice/dbus.service 1 - - - - + /system.slice/firewalld.service 1 - - - - + /system.slice/lvm2-lvmetad.service 1 - - - - + /system.slice/polkit.service 1 - - - - + /system.slice/postfix.service 3 - - - - + /system.slice/rsyslog.service 1 - - - - + /system.slice/system-getty.slice/getty@tty1.service 1 - - - - + /system.slice/systemd-journald.service 1 - - - - + /system.slice/systemd-logind.service 1 - - - - + /system.slice/systemd-udevd.service 1 - - - - + /system.slice/webmin.service 1 - - - - + /user.slice/user-0.slice/session-1.scope 3 - - - - + +### Control System Runlevels ### + +#### 32. How to start system rescue mode. #### + + # systemctl rescue + + Broadcast message from root@tecmint on pts/0 (Wed 2015-04-29 11:31:18 IST): + + The system is going down to rescue mode NOW! + +#### 33. How to enter into emergency mode. #### + + # systemctl emergency + + Welcome to emergency mode! After logging in, type "journalctl -xb" to view + system logs, "systemctl reboot" to reboot, "systemctl default" to try again + to boot into default mode. + +#### 34. List current run levels in use. #### + + # systemctl get-default + + multi-user.target + +#### 35. How to start Runlevel 5 aka graphical mode. #### + + # systemctl isolate runlevel5.target + OR + # systemctl isolate graphical.target + +#### 36. How to start Runlevel 3 aka multiuser mode (commandline). #### + + # systemctl isolate runlevel3.target + OR + # systemctl isolate multiuser.target + +#### 36. How to set multiusermode or graphical mode as default runlevel. #### + + # systemctl set-default runlevel3.target + + # systemctl set-default runlevel5.target + +#### 37. How to reboot, halt, suspend, hibernate or put system in hybrid-sleep. #### + + # systemctl reboot + + # systemctl halt + + # systemctl suspend + + # systemctl hibernate + + # systemctl hybrid-sleep + +For those who may not be aware of runlevels and what it does. + +- Runlevel 0 : Shut down and Power off the system. +- Runlevel 1 : Rescue?Maintainance Mode. +- Runlevel 3 : multiuser, no-graphic system. +- Runlevel 4 : multiuser, no-graphic system. +- Runlevel 5 : multiuser, graphical system. +- Runlevel 6 : Shutdown and Reboot the machine. + +That’s all for now. Keep connected! Keep commenting. Don’t forget to provide us with your valuable feedback in the comments below. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ \ No newline at end of file From 84547c330fd38dff45032c8016adf78be4a44738 Mon Sep 17 00:00:00 2001 From: robot-0 Date: Tue, 5 May 2015 19:06:44 +0800 Subject: [PATCH 152/154] [translating by createyuan] --- ...access a Linux server behind NAT via reverse SSH tunnel.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md index 44a4110203..d6a1df43c5 100644 --- a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md +++ b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md @@ -1,3 +1,5 @@ +translating by createyuan + How to access a Linux server behind NAT via reverse SSH tunnel ================================================================================ You are running a Linux server at home, which is behind a NAT router or restrictive firewall. Now you want to SSH to the home server while you are away from home. How would you set that up? SSH port forwarding will certainly be an option. However, port forwarding can become tricky if you are dealing with multiple nested NAT environment. Besides, it can be interfered with under various ISP-specific conditions, such as restrictive ISP firewalls which block forwarded ports, or carrier-grade NAT which shares IPv4 addresses among users. @@ -127,4 +129,4 @@ via: http://xmodulo.com/access-linux-server-behind-nat-reverse-ssh-tunnel.html [a]:http://xmodulo.com/author/nanni [1]:http://xmodulo.com/go/digitalocean [2]:http://xmodulo.com/how-to-enable-ssh-login-without.html -[3]:http://ask.xmodulo.com/install-autossh-linux.html \ No newline at end of file +[3]:http://ask.xmodulo.com/install-autossh-linux.html From 8b062b9b4de7a4b412106144017aa15bc1b06f90 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 6 May 2015 09:39:24 +0800 Subject: [PATCH 153/154] =?UTF-8?q?20150506-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...x bridge with Network Manager on Ubuntu.md | 96 ++++++++++ ...ult keyring to unlock on Ubuntu desktop.md | 55 ++++++ ...ll Shrew Soft IPsec VPN client on Linux.md | 97 ++++++++++ ...nswers--How to install autossh on Linux.md | 76 ++++++++ ...grep command with 14 different examples.md | 175 ++++++++++++++++++ 5 files changed, 499 insertions(+) create mode 100644 sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md create mode 100644 sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md create mode 100644 sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md create mode 100644 sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md create mode 100644 sources/tech/20150506 Linux grep command with 14 different examples.md diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md b/sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md new file mode 100644 index 0000000000..8eac3a212d --- /dev/null +++ b/sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md @@ -0,0 +1,96 @@ +Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu +================================================================================ +> **Question**: I need to set up a Linux bridge on my Ubuntu box to share a NIC with several other virtual machines or containers created on the box. I am currently using Network Manager on my Ubuntu, so preferrably I would like to configure a bridge using Network Manager. How can I do that? + +Network bridge is a hardware equipment used to interconnect two or more Layer-2 network segments, so that network devices on different segments can talk to each other. A similar bridging concept is needed within a Linux host, when you want to interconnect multiple VMs or Ethernet interfaces within a host. That is one use case of a software Linux bridge. + +There are several different ways to configure a Linux bridge. For example, in a headless server environment, you can use [brctl][1] to manually configure a bridge. In desktop environment, bridge support is available in Network Manager. Let's examine how to configure a bridge with Network Manager. + +### Requirement ### + +To avoid [any issue][2], it is recommended that you have Network Manager 0.9.9 and higher, which is the case for Ubuntu 15.04 and later. + + $ apt-cache show network-manager | grep Version + +---------- + + Version: 0.9.10.0-4ubuntu15.1 + Version: 0.9.10.0-4ubuntu15 + +### Create a Bridge ### + +The easiest way to create a bridge with Network Manager is via nm-connection-editor. This GUI tool allows you to configure a bridge in easy-to-follow steps. + +To start, invoke nm-connection-editor. + + $ nm-connection-editor + +The editor window will show you a list of currently configured network connections. Click on "Add" button in the top right to create a bridge. + +![](https://farm9.staticflickr.com/8781/17139502730_c3ca920f7f.jpg) + +Next, choose "Bridge" as a connection type. + +![](https://farm9.staticflickr.com/8873/17301102406_4f75133391_z.jpg) + +Now it's time to configure a bridge, including its name and bridged connection(s). With no other bridges created, the default bridge interface will be named bridge0. + +Recall that the goal of creating a bridge is to share your Ethernet interface via the bridge. So you need to add the Ethernet interface to the bridge. This is achieved by adding a new "bridged connection" in the GUI. Click on "Add" button. + +![](https://farm9.staticflickr.com/8876/17327069755_52f1d81f37_z.jpg) + +Choose "Ethernet" as a connection type. + +![](https://farm9.staticflickr.com/8832/17326664591_632a9001da_z.jpg) + +In "Device MAC address" field, choose the interface that you want to enslave into the bridge. In this example, assume that this interface is eth0. + +![](https://farm9.staticflickr.com/8842/17140820559_07a661f30c_z.jpg) + +Click on "General" tab, and enable both checkboxes that say "Automatically connect to this network when it is available" and "All users may connect to this network". + +![](https://farm8.staticflickr.com/7776/17325199982_801290e172_z.jpg) + +Save the change. + +Now you will see a new slave connection created in the bridge. + +![](https://farm8.staticflickr.com/7674/17119624667_6966b1147e_z.jpg) + +Click on "General" tab of the bridge, and make sure that top-most two checkboxes are enabled. + +![](https://farm8.staticflickr.com/7715/17301102276_4266a1e41d_z.jpg) + +Go to "IPv4 Settings" tab, and configure either DHCP or static IP address for the bridge. Note that you should use the same IPv4 settings as the enslaved Ethernet interface eth0. In this example, we assume that eth0 is configured via DHCP. Thus choose "Automatic (DHCP)" here. If eth0 is assigned a static IP address, you should assign the same IP address to the bridge. + +![](https://farm8.staticflickr.com/7737/17140820469_99955cf916_z.jpg) + +Finally, save the bridge settings. + +Now you will see an additional bridge connection created in "Network Connections" window. You no longer need a previously-configured wired connection for the enslaved interface eth0. So go ahead and delete the original wired connection. + +![](https://farm9.staticflickr.com/8700/17140820439_272a6d5c4e.jpg) + +At this point, the bridge connection will automatically be activated. You will momentarily lose a connection, since the IP address assigned to eth0 is taken over by the bridge. Once an IP address is assigned to the bridge, you will be connected back to your Ethernet interface via the bridge. You can confirm that by checking "Network" settings. + +![](https://farm8.staticflickr.com/7742/17325199902_9ceb67ddc1_c.jpg) + +Also, check the list of available interfaces. As mentioned, the bridge interface must have taken over whatever IP address was possessed by your Ethernet interface. + +![](https://farm8.staticflickr.com/7717/17327069605_6143f1bd6a_b.jpg) + +That's it, and now the bridge is ready to use! + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/configure-linux-bridge-network-manager-ubuntu.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-configure-linux-bridge-interface.html +[2]:https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1273201 \ No newline at end of file diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md b/sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md new file mode 100644 index 0000000000..2034bdca7b --- /dev/null +++ b/sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md @@ -0,0 +1,55 @@ +Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop +================================================================================ +> **Question**: When I boot up my Ubuntu desktop, a pop up dialog appears, asking me to enter a password to unlock default keyring. How can I disable this "unlock default keyring" pop up window, and automatically unlock my keyring? + +A keyring is thought of as a local database that stores your login information in encrypted forms. Various desktop applications (e.g., browsers, email clients) use a keyring to store and manage your login credentials, secrets, passwords, certificates, or keys securely. For those applications to retrieve the information stored in a keyring, the keyring needs to be unlocked. + +GNOME keyring used by Ubuntu desktop is integrated with desktop login, and the keyring is automatically unlocked when you authenticate into your desktop. But your default keyring can remain "locked" if you set up automatic desktop login or wake up from hibernation. In this case, you will be prompted: + +> "Enter password for keyring 'Default keyring' to unlock. An application wants to access to the keyring 'Default keyring,' but it is locked." + +![](https://farm9.staticflickr.com/8787/16716456754_309c39513c_o.png) + +If you want to avoid typing a password to unlock your default keyring every time such a pop-up dialog appears, here is how you can do it. + +Before doing that, understand the implication of disabling the password prompt. By automatically unlocking the default keyring, you will make your keyring (and any information stored in the keyring) accessible to anyone who uses your desktop, without them having to know your password. + +### Disable Password for Unlocking Default Keyring ### + +Open up Dash, and type "password" to launch "Passwords and Keys" app. + +![](https://farm8.staticflickr.com/7709/17312949416_ed9c4fbe2d_b.jpg) + +Alternatively, use the seahorse command to launch the GUI from the command line. + + $ seahorse + +On the left side panel, right-click on the "Default keyring," and choose "Change Password." + +![](https://farm8.staticflickr.com/7740/17159959750_ba5b675b00_b.jpg) + +Type your current login password. + +![](https://farm8.staticflickr.com/7775/17347551135_ce09260818_b.jpg) + +Leave a new password for the "Default" keyring as blank. + +![](https://farm8.staticflickr.com/7669/17345663222_c9334c738b_c.jpg) + +Click on "Continue" button to confirm to store passwords unencrypted. + +![](https://farm8.staticflickr.com/7761/17152692309_ce3891a0d9_c.jpg) + +That's it. From now on, you won't be prompted to unlock the default keyring. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/disable-entering-password-unlock-default-keyring.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md b/sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md new file mode 100644 index 0000000000..24c09c85bd --- /dev/null +++ b/sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md @@ -0,0 +1,97 @@ +Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux +================================================================================ +> **Question**: I need to connect to an IPSec VPN gateway. For that, I'm trying to use Shrew Soft VPN client, which is available for free. How can I install Shrew Soft VPN client on [insert your Linux distro]? + +There are many commercial VPN gateways available, which come with their own proprietary VPN client software. While there are also open-source VPN server/client alternatives, they are typically lacking in sophisticated IPsec support, such as Internet Key Exchange (IKE) which is a standard IPsec protocol used to secure VPN key exchange and authentication. Shrew Soft VPN is a free IPsec VPN client supporting a number of authentication methods, key exchange, encryption and firewall traversal options. + +Here is how you can install Shrew Soft VPN client on Linux platforms. + +First, download its source code from the [official website][1]. + +### Install Shrew VPN Client on Debian, Ubuntu or Linux Mint ### + +Shrew Soft VPN client GUI requires Qt 4.x. So you will need to install its development files as part of dependencies. + + $ sudo apt-get install cmake libqt4-core libqt4-dev libqt4-gui libedit-dev libssl-dev checkinstall flex bison + $ wget https://www.shrew.net/download/ike/ike-2.2.1-release.tbz2 + $ tar xvfvj ike-2.2.1-release.tbz2 + $ cd ike + $ cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=YES -DETCDIR=/etc -DNATT=YES . + $ make + $ sudo make install + $ cd /etc/ + $ sudo mv iked.conf.sample iked.conf + +### Install Shrew VPN Client on CentOS, Fedora or RHEL ### + +Similar to Debian based systems, you will need to install a number of dependencies including Qt4 before compiling it. + + $ sudo yum install qt-devel cmake gcc-c++ openssl-devel libedit-devel flex bison + $ wget https://www.shrew.net/download/ike/ike-2.2.1-release.tbz2 + $ tar xvfvj ike-2.2.1-release.tbz2 + $ cd ike + $ cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=YES -DETCDIR=/etc -DNATT=YES . + $ make + $ sudo make install + $ cd /etc/ + $ sudo mv iked.conf.sample iked.conf + +On Red Hat based systems, one last step is to open /etc/ld.so.conf with a text editor, and add the following line. + + $ sudo vi /etc/ld.so.conf + +---------- + + include /usr/lib/ + +Reload run-time bindings of shared libraries to incorporate newly installed shared libraries: + + $ sudo ldconfig + +### Launch Shrew VPN Client ### + +First launch IKE daemon (iked). This daemon speaks the IKE protocol to communicate with a remote host over IPSec as a VPN client. + + $ sudo iked + +![](https://farm9.staticflickr.com/8685/17175688940_59c2db64c9_b.jpg) + +Now start qikea which is an IPsec VPN client front end. This GUI application allows you to manage remote site configurations and to initiate VPN connections. + +![](https://farm8.staticflickr.com/7750/16742992713_eed7f97939_b.jpg) + +To create a new VPN configuration, click on "Add" button, and fill out VPN site configuration. Once you create a configuration, you can initiate a VPN connection simply by clicking on the configuration. + +![](https://farm8.staticflickr.com/7725/17337297056_3d38dc2180_b.jpg) + +### Troubleshooting ### + +1. I am getting the following error while running iked. + + iked: error while loading shared libraries: libss_ike.so.2.2.1: cannot open shared object file: No such file or directory + +To solve this problem, you need to update the dynamic linker to incorporate libss_ike library. For that, add to /etc/ld.so.conf the path where the library is located (e.g., /usr/lib), and then run ldconfig command. + + $ sudo ldconfig + +Verify that libss_ike is added to the library path: + + $ ldconfig -p | grep ike + +---------- + + libss_ike.so.2.2.1 (libc6,x86-64) => /lib/libss_ike.so.2.2.1 + libss_ike.so (libc6,x86-64) => /lib/libss_ike.so + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-shrew-soft-ipsec-vpn-client-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:https://www.shrew.net/download/ike \ No newline at end of file diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md b/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md new file mode 100644 index 0000000000..0660b8d621 --- /dev/null +++ b/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md @@ -0,0 +1,76 @@ +Linux FAQs with Answers--How to install autossh on Linux +================================================================================ +> **Question**: I would like to install autossh on [insert your Linux distro]. How can I do that? + +[autossh][1] is an open-source tool that allows you to monitor an SSH session and restart it automatically should it gets disconnected or stops forwarding traffic. autossh assumes that [passwordless SSH login][2] for a destination host is already setup, so that it can restart a broken SSH session without user's involvement. + +autossh comes in handy when you want to set up [reverse SSH tunnels][3] or [mount remote folders over SSH][4]. Essentially in any situation where persistent SSH sessions are required, autossh can be useful. + +![](https://farm8.staticflickr.com/7786/17150854870_63966e78bc_c.jpg) + +Here is how to install autossh on various Linux distributions. + +### Install Autossh on Debian or Ubuntu ### + +autossh is available in base repositories of Debian based systems, so installation is easy. + + $ sudo apt-get install autossh + +### Install Autossh on Fedora ### + +Fedora repositories also carry autossh package. So simply use yum command. + + $ sudo yum install autossh + +### Install Autossh on CentOS or RHEL ### + +For CentOS/RHEL 6 or earlier, enable [Repoforge repository][5] first, and then use yum command. + + $ sudo yum install autossh + +For CentOS/RHEL 7, autossh is no longer available in Repoforge repository. You will need to build it from the source (explained below). + +### Install Autossh on Arch Linux ### + + $ sudo pacman -S autossh + +### Compile Autossh from the Source on Debian or Ubuntu ### + +If you would like to try the latest version of autossh, you can build it from the source as follows. + + $ sudo apt-get install gcc make + $ wget http://www.harding.motd.ca/autossh/autossh-1.4e.tgz + $ tar -xf autossh-1.4e.tgz + $ cd autossh-1.4e + $ ./configure + $ make + $ sudo make install + +### Compile Autossh from the Source on CentOS, Fedora or RHEL ### + +On CentOS/RHEL 7, autossh is not available as a pre-built package. So you'll need to compile it from the source as follows. + + $ sudo yum install wget gcc make + $ wget http://www.harding.motd.ca/autossh/autossh-1.4e.tgz + $ tar -xf autossh-1.4e.tgz + $ cd autossh-1.4e + $ ./configure + $ make + $ sudo make install + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-autossh-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://www.harding.motd.ca/autossh/ +[2]:http://xmodulo.com/how-to-enable-ssh-login-without.html +[3]:http://xmodulo.com/access-linux-server-behind-nat-reverse-ssh-tunnel.html +[4]:http://xmodulo.com/how-to-mount-remote-directory-over-ssh-on-linux.html +[5]:http://xmodulo.com/how-to-set-up-rpmforge-repoforge-repository-on-centos.html \ No newline at end of file diff --git a/sources/tech/20150506 Linux grep command with 14 different examples.md b/sources/tech/20150506 Linux grep command with 14 different examples.md new file mode 100644 index 0000000000..006a042bc5 --- /dev/null +++ b/sources/tech/20150506 Linux grep command with 14 different examples.md @@ -0,0 +1,175 @@ +Linux grep command with 14 different examples +================================================================================ +### Overview : ### + +Linux like operating system provides a searching tool known as **grep (global regular expression print)**. grep command is useful for searching the content of one more files based on the pattern. A pattern may be a single character, bunch of characters, single word or a sentence. + +When we execute the grep command with specified pattern, if its is matched, then it will display the line of file containing the pattern without modifying the contents of existing file. + +In this tutorial we will discuss 14 different examples of grep command + +### Example:1 Search the pattern (word) in a file ### + +Search the “linuxtechi” word in the file /etc/passwd file + + root@Linux-world:~# grep linuxtechi /etc/passwd + linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + root@Linux-world:~# + +### Example:2 Search the pattern in the multiple files. ### + + root@Linux-world:~# grep linuxtechi /etc/passwd /etc/shadow /etc/gshadow + /etc/passwd:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + /etc/shadow:linuxtechi:$6$DdgXjxlM$4flz4JRvefvKp0DG6re:16550:0:99999:7:::/etc/gshadow:adm:*::syslog,linuxtechi + /etc/gshadow:cdrom:*::linuxtechi + /etc/gshadow:sudo:*::linuxtechi + /etc/gshadow:dip:*::linuxtechi + /etc/gshadow:plugdev:*::linuxtechi + /etc/gshadow:lpadmin:!::linuxtechi + /etc/gshadow:linuxtechi:!:: + /etc/gshadow:sambashare:!::linuxtechi + root@Linux-world:~# + +### Example:3 List the name of those files which contain a specified pattern using -l option. ### + + root@Linux-world:~# grep -l linuxtechi /etc/passwd /etc/shadow /etc/fstab /etc/mtab + /etc/passwd + /etc/shadow + root@Linux-world:~# + +### Example:4 Search the pattern in the file along with associated line number(s) using the -n option ### + + root@Linux-world:~# grep -n linuxtechi /etc/passwd + 39:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + root@Linux-world:~# + +root@Linux-world:~# grep -n root /etc/passwd /etc/shadow + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-n-root.jpg) + +### Example:5 Print the line excluding the pattern using -v option ### + +List all the lines of the file /etc/passwd that does not contain specific word “linuxtechi”. + + root@Linux-world:~# grep -v linuxtechi /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-v-option.jpg) + +### Example:6 Display all the lines that starts with specified pattern using ^ symbol ### + +Bash shell treats carrot symbol (^) as a special character which marks the beginning of line or a word. Let’s display the lines which starts with “root” word in the file /etc/passwd. + + root@Linux-world:~# grep ^root /etc/passwd + root:x:0:0:root:/root:/bin/bash + root@Linux-world:~# + +### Example: 7 Display all the lines that ends with specified pattern using $ symbol. ### + +List all the lines of /etc/passwd that ends with “bash” word. + + root@Linux-world:~# grep bash$ /etc/passwd + root:x:0:0:root:/root:/bin/bash + linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + root@Linux-world:~# + +Bash shell treats dollar ($) symbol as a special character which marks the end of line or word. + +### Example:8 Search the pattern recursively using -r option ### + + root@Linux-world:~# grep -r linuxtechi /etc/ + /etc/subuid:linuxtechi:100000:65536 + /etc/group:adm:x:4:syslog,linuxtechi + /etc/group:cdrom:x:24:linuxtechi + /etc/group:sudo:x:27:linuxtechi + /etc/group:dip:x:30:linuxtechi + /etc/group:plugdev:x:46:linuxtechi + /etc/group:lpadmin:x:115:linuxtechi + /etc/group:linuxtechi:x:1000: + /etc/group:sambashare:x:131:linuxtechi + /etc/passwd-:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + /etc/passwd:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + ............................................................................ + +Above command will search linuxtechi in the “/etc” directory recursively. + +### Example:9 Search all the empty or blank lines of a file using grep ### + + root@Linux-world:~# grep ^$ /etc/shadow + root@Linux-world:~# + +As there is no empty line in /etc/shadow file , so nothing is displayed. + +### Example:10 Search the pattern using ‘grep -i’ option. ### + +-i option in the grep command ignores the letter case i.e it will ignore upper case or lower case letters while searching + +Lets take an example , i want to search “LinuxTechi” word in the passwd file. + + nextstep4it@localhost:~$ grep -i LinuxTechi /etc/passwd + linuxtechi:x:1001:1001::/home/linuxtechi:/bin/bash + nextstep4it@localhost:~$ + +### Example:11 Search multiple patterns using -e option ### + +For example i want to search ‘linuxtechi’ and ‘root’ word in a single grep command , then using -e option we can search multiple patterns . + + root@Linux-world:~# grep -e "linuxtechi" -e "root" /etc/passwd + root:x:0:0:root:/root:/bin/bash + linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + root@Linux-world:~# + +### Example:12 Getting Search pattern from a file using “grep -f” ### + +First create a search pattern file “grep_pattern” in your current working directory. In my case i have put the below contents. + + root@Linux-world:~# cat grep_pattern + ^linuxtechi + root + false$ + root@Linux-world:~# + +Now try to search using grep_pattern file. + + root@Linux-world:~# grep -f grep_pattern /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-f-option.jpg) + +### Example:13 Count the number of matching patterns using -c option ### + +Let take the above example , we can count the number of matching patterns using -c option in grep command. + + root@Linux-world:~# grep -c -f grep_pattern /etc/passwd + 22 + root@Linux-world:~# + +### Example:14 Display N number of lines before & after pattern matching ### + +a) Display Four lines before patten matching using -B option + + root@Linux-world:~# grep -B 4 "games" /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-B-option.jpg) + +b) Display Four lines after pattern matching using -A option + + root@Linux-world:~# grep -A 4 "games" /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-A-option.jpg) + +c) Display Four lines around the pattern matching using -C option + + root@Linux-world:~# grep -C 4 "games" /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-C-option.jpg) + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/linux-grep-command-with-14-different-examples/ + +作者:[Pradeep Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file From 0baeff71655a6108456f1e9c5a0c8f8841b60025 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 6 May 2015 10:28:32 +0800 Subject: [PATCH 154/154] =?UTF-8?q?20150506-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Step Guide for Learning Shell Scripting.md | 459 ++++++++++++++++++ ...tore Passwords and Api Keys Using Vault.md | 167 +++++++ ...w to Setup OpenERP (Odoo) on CentOS 7.x.md | 112 +++++ 3 files changed, 738 insertions(+) create mode 100644 sources/tech/20150506 First Step Guide for Learning Shell Scripting.md create mode 100644 sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md create mode 100644 sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md diff --git a/sources/tech/20150506 First Step Guide for Learning Shell Scripting.md b/sources/tech/20150506 First Step Guide for Learning Shell Scripting.md new file mode 100644 index 0000000000..8af4ef03e8 --- /dev/null +++ b/sources/tech/20150506 First Step Guide for Learning Shell Scripting.md @@ -0,0 +1,459 @@ +First Step Guide for Learning Shell Scripting +================================================================================ +![](http://blog.linoxide.com/wp-content/uploads/2015/04/myfirstshellscript.jpg) + +Usually when people say "shell scripting" they have on mind bash, ksh, sh, ash or similar linux/unix scripting language. Scripting is another way to communicate with computer. Using graphic windows interface (not matter windows or linux) user can move mouse and clicking on the various objects like, buttons, lists, check boxes and so on. But it is very inconvenient way witch requires user participation and accuracy each time he would like to ask computer / server to do the same tasks (lets say to convert photos or download new movies, mp3 etc). To make all these things easy accessible and automated we could use shell scripts. + +Some programming languages like pascal, foxpro, C, java needs to be compiled before they could be executed. They needs appropriate compiler to make our code to do some job. + +Another programming languages like php, javascript, visualbasic do not needs compiler. So they need interpretersand we could run our program without compiling the code. + +The shell scripts is also like interpreters, but it is usually used to call external compiled programs. Then captures the outputs, exit codes and act accordingly. + +One of the most popular shell scripting language in the linux world is the bash. And i think (this is my own opinion) this is because bash shell allows user easily navigate through the history commands (previously executed) by default, in opposite ksh which requires some tuning in .profile or remember some "magic" key combination to walk through history and amend commands. + +Ok, i think this is enough for introduction and i leaving for your judge which environment is most comfortable for you. Since now i will speak only about bash and scripting. In the following examples i will use the CentOS 6.6 and bash-4.1.2. Just make sure you have the same or greater version. + +### Shell Script Streams ### + +The shell scripting it is something similar to conversation of several persons. Just imagine that all command like the persons who able to do something if you properly ask them. Lets say you would like to write the document. First of all you need the paper, then you need to say the content to someone to write it, and finally you would like to store it somewhere. Or you would like build a house, so you will ask appropriate persons to cleanup the space. After they say "its done" then other engineers could build for you the walls. And finally, when engineers also tell "Its done" you can ask the painters to color your house. And what would happen if you ask the painters coloring your walls before they are built? I think they will start to complain. Almost all commands like the persons could speak and if they did its job without any issues they speaks to "standard output". If they can't to what you asking - they speaking to the "standard error". So finally all commands listening for you through "standard input". + +Quick example- when you opening linux terminal and writing some text - you speaking to bash through "standard input". So ask the bash shell **who am i** + + root@localhost ~]# who am i <--- you speaking through the standard input to bash shell + root pts/0 2015-04-22 20:17 (192.168.1.123) <--- bash shell answering to you through the standard output + +Now lets ask something that bash will not understand us: + + [root@localhost ~]# blablabla <--- and again, you speaking through standard input + -bash: blablabla: command not found <--- bash complaining through standard error + +The first word before ":" usually is the command which complaining to you. Actually each of these streams has their own index number: + +- standard input (**stdin**) - 0 +- standard output (**stdout**) - 1 +- standard error (**stderr**) - 2 + +If you really would like to know to witch output command said something - you need to redirect (to use "greater than ">" symbol after command and stream index) that speech to file: + + [root@localhost ~]# blablabla 1> output.txt + -bash: blablabla: command not found + +In this example we tried to redirect 1 (**stdout**) stream to file named output.txt. Lets look does to the content of that file. We use the command cat for that: + + [root@localhost ~]# cat output.txt + [root@localhost ~]# + +Seams that is empty. Ok now lets try to redirect 2 (**stderr**) streem: + + [root@localhost ~]# blablabla 2> error.txt + [root@localhost ~]# + +Ok, we see that complains gone. Lets chec the file: + + [root@localhost ~]# cat error.txt + -bash: blablabla: command not found + [root@localhost ~]# + +Exactly! We see that all complains was recorded to the errors.txt file. + +Sometimes commands produces **stdout** and **stderr** simultaniously. To redirect them to separate files we can use the following syntax: + + command 1>out.txt 2>err.txt + +To shorten this syntax a bit we can skip the "1" as by default the **stdout** stream will be redirected: + + command >out.txt 2>err.txt + +Ok, lets try to do something "bad". lets remove the file1 and folder1 with the rm command: + + [root@localhost ~]# rm -vf folder1 file1 > out.txt 2>err.txt + +Now check our output files: + + [root@localhost ~]# cat out.txt + removed `file1' + [root@localhost ~]# cat err.txt + rm: cannot remove `folder1': Is a directory + [root@localhost ~]# + +As we see the streams was separated to different files. Sometimes it is not handy as usually we want to see the sequence when the errors appeared - before or after some actions. For that we can redirect both streams to the same file: + + command >>out_err.txt 2>>out_err.txt + +Note : Please notice that i use ">>" instead of ">". It allows us to append file instead of overwrite. + +We can redirect one stream to another: + + command >out_err.txt 2>&1 + +Let me explain. All stdout of the command will be redirected to the out_err.txt. The errout will be redirected to the 1-st stream which (as i already explained above) will be redirected to the same file. Let see the example: + + [root@localhost ~]# rm -fv folder2 file2 >out_err.txt 2>&1 + [root@localhost ~]# cat out_err.txt + rm: cannot remove `folder2': Is a directory + removed `file2' + [root@localhost ~]# + +Looking at the combined output we can state that first of all **rm** command tried to remove the folder2 and it was not success as linux require the **-r** key for **rm** command to allow remove folders. At the second the file2 was removed. By providing the **-v** (verbose) key for the **rm** command we asking rm command to inform as about each removed file or folder. + +This is almost all you need to know about redirection. I say almost, because there is one more very important redirection which called "piping". By using | (pipe) symbol we usually redirecting **stdout** streem. + +Lets say we have the text file: + + [root@localhost ~]# cat text_file.txt + This line does not contain H e l l o word + This lilne contains Hello + This also containd Hello + This one no due to HELLO all capital + Hello bash world! + +and we need to find the lines in it with the words "Hello". Linux has the **grep** command for that: + + [root@localhost ~]# grep Hello text_file.txt + This lilne contains Hello + This also containd Hello + Hello bash world! + [root@localhost ~]# + +This is ok when we have file and would like to sech in it. But what to do if we need to find something in the output of another command? Yes, of course we can redirect the output to the file and then look in it: + + [root@localhost ~]# fdisk -l>fdisk.out + [root@localhost ~]# grep "Disk /dev" fdisk.out + Disk /dev/sda: 8589 MB, 8589934592 bytes + Disk /dev/mapper/VolGroup-lv_root: 7205 MB, 7205814272 bytes + Disk /dev/mapper/VolGroup-lv_swap: 855 MB, 855638016 bytes + [root@localhost ~]# + +If you going to grep something with white spaces embrace that with " quotes! + +Note : fdisk command shows information about Linux OS disk drives + +As we see this way is not very handy as soon we will mess the space with temporary files. For that we can use the pipes. They allow us redirect one command **stdout** to another command **stdin** streams: + + [root@localhost ~]# fdisk -l | grep "Disk /dev" + Disk /dev/sda: 8589 MB, 8589934592 bytes + Disk /dev/mapper/VolGroup-lv_root: 7205 MB, 7205814272 bytes + Disk /dev/mapper/VolGroup-lv_swap: 855 MB, 855638016 bytes + [root@localhost ~]# + +As we see, we get the same result without any temporary files. We have redirected **frisk stdout** to the **grep stdin**. + +**Note** : Pipe redirection is always from left to right. + +There are several other redirections but we will speak about them later. + +### Displaying custom messages in the shell ### + +As we already know usually communication with and within shell is going as dialog. So lets create some real script which also will speak with us. It will allow you to learn some simple commands and better understand the scripting concept. + +Imagine we are working in some company as help desk manager and we would like to create some shell script to register the call information: phone number, User name and brief description about issue. We going to store it in the plain text file data.txt for future statistics. Script it self should work in dialog way to make live easy for help desk workers. So first of all we need to display the questions. For displaying any messages there is echo and printf commands. Both of them displaying messages, but printf is more powerful as we can nicely form output to align it to the right, left or leave dedicated space for message. Lets start from simple one. For file creation please use your favorite text editor (kate, nano, vi, ...) and create the file named note.sh with the command inside: + + echo "Phone number ?" + +### Script execution ### + +After you have saved the file we can run it with bash command by providing our file as an argument: + + [root@localhost ~]# bash note.sh + Phone number ? + +Actually to use this way for script execution is not handy. It would be more comfortable just execute the script without any **bash** command as a prefix. To make it executable we can use **chmod** command: + + [root@localhost ~]# ls -la note.sh + -rw-r--r--. 1 root root 22 Apr 23 20:52 note.sh + [root@localhost ~]# chmod +x note.sh + [root@localhost ~]# ls -la note.sh + -rwxr-xr-x. 1 root root 22 Apr 23 20:52 note.sh + [root@localhost ~]# + +![set permission script file](http://blog.linoxide.com/wp-content/uploads/2015/04/Capture.png) + +**Note** : ls command displays the files in the current folder. By adding the keys -la it will display a bit more information about files. + +As we see, before **chmod** command execution, script has only read (r) and write (w) permissions. After **chmod +x** it got execute (x) permissions. (More details about permissions i am going to describe in next article.) Now we can simply run it: + + [root@localhost ~]# ./note.sh + Phone number ? + +Before script name i have added ./ combination. . (dot) in the unix world means current position (current folder), the / (slash) is the folder separator. (In Windows OS we use \ (backslash) for the same). So whole this combination means: "from the current folder execute the note.sh script". I think it will be more clear for you if i run this script with full path: + + [root@localhost ~]# /root/note.sh + Phone number ? + [root@localhost ~]# + +It also works. + +Everything would be ok if all linux users would have the same default shell. If we simply execute this script default user shell will be used to parse script content and run the commands. Different shells have a bit different syntax, internal commands, etc. So to guarantee the **bash** will be used for our script we should add **#!/bin/bash** as the first line. In this way default user shell will call **/bin/bash** and only then will execute following shell commands in the script: + + [root@localhost ~]# cat note.sh + #!/bin/bash + echo "Phone number ?" + +Only now we will be 100% sure that **bash** will be used to parse our script content. Lets move on. + +### Reading the inputs ### + +After we have displayed the message script should wait for answer from user. There is the command **read**: + + #!/bin/bash + echo "Phone number ?" + read phone + +After execution script will wait for the user input until he press the [ENTER] key: + + [root@localhost ~]# ./note.sh + Phone number ? + 12345 <--- here is my input + [root@localhost ~]# + +Everything you have input will be stored to the variable **phone**. To display the value of variable we can use the same **echo** command: + + [root@localhost ~]# cat note.sh + #!/bin/bash + echo "Phone number ?" + read phone + echo "You have entered $phone as a phone number" + [root@localhost ~]# ./note.sh + Phone number ? + 123456 + You have entered 123456 as a phone number + [root@localhost ~]# + +In **bash** shell we using **$** (dollar) sign as variable indication, except when reading into variable and few other moments (will describe later). + +Ok, now we are ready to add the rest questions: + + #!/bin/bash + echo "Phone number?" + read phone + echo "Name?" + read name + echo "Issue?" + read issue + [root@localhost ~]# ./note.sh + Phone number? + 123 + Name? + Jim + Issue? + script is not working. + [root@localhost ~]# + +### Using stream redirection ### + +Perfect! There is left to redirect everything to the file data.txt. As a field separator we going to use / (slash) symbol. + +**Note** : You can chose any which you think is the best, bat be sure that content will not have thes symbols inside. It will cause extra fields in the line. + +Do not forget to use ">>" instead of ">" as we would like to append the output to the end of file! + + [root@localhost ~]# tail -2 note.sh + read issue + echo "$phone/$name/$issue">>data.txt + [root@localhost ~]# ./note.sh + Phone number? + 987 + Name? + Jimmy + Issue? + Keybord issue. + [root@localhost ~]# cat data.txt + 987/Jimmy/Keybord issue. + [root@localhost ~]# + +**Note** : The command **tail** displays the last **-n** lines of the file. + +Bingo. Lets run once again: + + [root@localhost ~]# ./note.sh + Phone number? + 556 + Name? + Janine + Issue? + Mouse was broken. + [root@localhost ~]# cat data.txt + 987/Jimmy/Keybord issue. + 556/Janine/Mouse was broken. + [root@localhost ~]# + +Our file is growing. Lets add the date in the front of each line. This will be useful later when playing with data while calculating statistic. For that we can use command date and give it some format as i do not like default one: + + [root@localhost ~]# date + Thu Apr 23 21:33:14 EEST 2015 <---- default output of dta command + [root@localhost ~]# date "+%Y.%m.%d %H:%M:%S" + 2015.04.23 21:33:18 <---- formated output + +There are several ways to read the command output to the variable. In this simple situation we will use ` (back quotes): + + [root@localhost ~]# cat note.sh + #!/bin/bash + now=`date "+%Y.%m.%d %H:%M:%S"` + echo "Phone number?" + read phone + echo "Name?" + read name + echo "Issue?" + read issue + echo "$now/$phone/$name/$issue">>data.txt + [root@localhost ~]# ./note.sh + Phone number? + 123 + Name? + Jim + Issue? + Script hanging. + [root@localhost ~]# cat data.txt + 2015.04.23 21:38:56/123/Jim/Script hanging. + [root@localhost ~]# + +Hmmm... Our script looks a bit ugly. Lets prettify it a bit. If you would read manual about **read** command you would find that read command also could display some messages. For this we should use -p key and message: + + [root@localhost ~]# cat note.sh + #!/bin/bash + now=`date "+%Y.%m.%d %H:%M:%S"` + read -p "Phone number: " phone + read -p "Name: " name + read -p "Issue: " issue + echo "$now/$phone/$name/$issue">>data.txt + +You can fine a lots of interesting about each command directly from the console. Just type: **man read, man echo, man date, man ....** + +Agree it looks much better! + + [root@localhost ~]# ./note.sh + Phone number: 321 + Name: Susane + Issue: Mouse was stolen + [root@localhost ~]# cat data.txt + 2015.04.23 21:38:56/123/Jim/Script hanging. + 2015.04.23 21:43:50/321/Susane/Mouse was stolen + [root@localhost ~]# + +And the cursor is right after the message (not in new line) what makes a bit sense. +Loop + +Time to improve our script. If user works all day with the calls it is not very handy to run it each time. Lets add all these actions in the never-ending loop: + + [root@localhost ~]# cat note.sh + #!/bin/bash + while true + do + read -p "Phone number: " phone + now=`date "+%Y.%m.%d %H:%M:%S"` + read -p "Name: " name + read -p "Issue: " issue + echo "$now/$phone/$name/$issue">>data.txt + done + +I have swapped **read phone** and **now=`date** lines. This is because i would like to get the time right after the phone number will be entered. If i would left it as the first line in the loop **- the** now variable will get the time right after the data was stored in the file. And it is not good as the next call could be after 20 mins or so. + + [root@localhost ~]# ./note.sh + Phone number: 123 + Name: Jim + Issue: Script still not works. + Phone number: 777 + Name: Daniel + Issue: I broke my monitor + Phone number: ^C + [root@localhost ~]# cat data.txt + 2015.04.23 21:38:56/123/Jim/Script hanging. + 2015.04.23 21:43:50/321/Susane/Mouse was stolen + 2015.04.23 21:47:55/123/Jim/Script still not works. + 2015.04.23 21:48:16/777/Daniel/I broke my monitor + [root@localhost ~]# + +NOTE: To exit from the never-ending loop you can by pressing [Ctrl]+[C] keys. Shell will display ^ as the Ctrl key. + +### Using pipe redirection ### + +Lets add more functionality to our "Frankenstein" I would like the script will display some statistic after each call. Lets say we want to see the how many times each number called us. For that we should cat the data.txt file: + + [root@localhost ~]# cat data.txt + 2015.04.23 21:38:56/123/Jim/Script hanging. + 2015.04.23 21:43:50/321/Susane/Mouse was stolen + 2015.04.23 21:47:55/123/Jim/Script still not works. + 2015.04.23 21:48:16/777/Daniel/I broke my monitor + 2015.04.23 22:02:14/123/Jimmy/New script also not working!!! + [root@localhost ~]# + +Now all this output we can redirect to the **cut** command to **cut** each line into the chunks (our delimiter "/") and print the second field: + + [root@localhost ~]# cat data.txt | cut -d"/" -f2 + 123 + 321 + 123 + 777 + 123 + [root@localhost ~]# + +Now this output we can redirect to another command to **sort**: + + [root@localhost ~]# cat data.txt | cut -d"/" -f2|sort + 123 + 123 + 123 + 321 + 777 + [root@localhost ~]# + +and leave only unique lines. To count unique entries just add **-c** key for **uniq** command: + + [root@localhost ~]# cat data.txt | cut -d"/" -f2 | sort | uniq -c + 3 123 + 1 321 + 1 777 + [root@localhost ~]# + +Just add this to end of our loop: + + #!/bin/bash + while true + do + read -p "Phone number: " phone + now=`date "+%Y.%m.%d %H:%M:%S"` + read -p "Name: " name + read -p "Issue: " issue + echo "$now/$phone/$name/$issue">>data.txt + echo "===== We got calls from =====" + cat data.txt | cut -d"/" -f2 | sort | uniq -c + echo "--------------------------------" + done + +Run it: + + [root@localhost ~]# ./note.sh + Phone number: 454 + Name: Malini + Issue: Windows license expired. + ===== We got calls from ===== + 3 123 + 1 321 + 1 454 + 1 777 + -------------------------------- + Phone number: ^C + +![running script](http://blog.linoxide.com/wp-content/uploads/2015/04/Capture11.png) + +Current scenario is going through well-known steps like: + +- Display message +- Get user input +- Store values to the file +- Do something with stored data + +But what if user has several responsibilities and he needs sometimes to input data, sometimes to do statistic calculations, or might be to find something in stored data? For that we need to implement switches / cases. In next article i will show you how to use them and how to nicely form the output. It is useful while "drawing" the tables in the shell. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-shell-script/guide-start-learning-shell-scripting-scratch/ + +作者:[Petras Liumparas][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/petrasl/ \ No newline at end of file diff --git a/sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md b/sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md new file mode 100644 index 0000000000..4a1020f6f2 --- /dev/null +++ b/sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md @@ -0,0 +1,167 @@ +How to Securely Store Passwords and Api Keys Using Vault +================================================================================ +Vault is a tool that is used to access secret information securely, it may be password, API key, certificate or anything else. Vault provides a unified interface to secret information through strong access control mechanism and extensive logging of events. + +Granting access to critical information is quite a difficult problem when we have multiple roles and individuals across different roles requiring various critical information like, login details to databases with different privileges, API keys for external services, credentials for service oriented architecture communication etc. Situation gets even worse when access to secret information is managed across different platforms with custom settings, so rolling, secure storage and managing the audit logs is almost impossible. But Vault provides a solution to such a complex situation. + +### Salient Features ### + +Data Encryption: Vault can encrypt and decrypt data with no requirement to store it. Developers can now store encrypted data without developing their own encryption techniques and it allows security teams to define security parameters. + +**Secure Secret Storage**: Vault encrypts the secret information (API keys, passwords or certificates) before storing it on to the persistent (secondary) storage. So even if somebody gets access to the stored information by chance, it will be of no use until it is decrypted. + +**Dynamic Secrets**: On demand secrets are generated for systems like AWS and SQL databases. If an application needs to access S3 bucket, for instance, it requests AWS keypair from Vault, which grants the required secret information along with a lease time. The secret information won’t work once the lease time is expired. + +**Leasing and Renewal**: Vault grants secrets with a lease limit, it revokes the secrets as soon as lease expires which can further be renewed through APIs if required. + +**Revocation**: Upon expiring the lease period Vault can revoke a single secret or a tree of secrets. + +### Installing Vault ### + +There are two ways to use Vault. + +**1. Pre-compiled Vault Binary** can be downloaded for all Linux flavors from the following source, once done, unzip it and place it on a system PATH where other binaries are kept so that it can be accessed/invoked easily. + +- [Download Precompiled Vault Binary (32-bit)][1] +- [Download Precompiled Vault Binary (64-bit)][2] +- [Download Precompiled Vault Binary (ARM)][3] + +Download the desired precompiled Vault binary. + +![wget binary](http://blog.linoxide.com/wp-content/uploads/2015/04/wget-binary.png) + +Unzip the downloaded binary. + +![vault](http://blog.linoxide.com/wp-content/uploads/2015/04/unzip.png) + +unzipCongratulations! Vault is ready to be used. + +![](http://blog.linoxide.com/wp-content/uploads/2015/04/vault.png) + +**2. Compiling from source** is another way of installing Vault on the system. GO and GIT are required to be installed and configured properly on the system before we start the installation process. + +To **install GO on Redhat systems** use the following command. + + sudo yum install go + +To **install GO on Debian systems** use the following commands. + + sudo apt-get install golang + +OR + + sudo add-apt-repository ppa:gophers/go + + sudo apt-get update + + sudo apt-get install golang-stable + +To **install GIT on Redhat systems** use the following command. + + sudo yum install git + +To **install GIT on Debian systems** use the following commands. + + sudo apt-get install git + +Once both GO and GIT are installed we start the Vault installation process by compiling from the source. + +> Clone following Vault repository into the GOPATH + + https://github.com/hashicorp/vault + +> Verify if the following clone file exist, if it doesn’t then Vault wasn’t cloned to the proper path. + + $GOPATH/src/github.com/hashicorp/vault/main.go + +> Run following command to build Vault in the current system and put binary in the bin directory. + + make dev + +![path](http://blog.linoxide.com/wp-content/uploads/2015/04/installation4.png) + +### An introductory tutorial of Vault ### + +We have compiled Vault’s official interactive tutorial along with its output on SSH. + +**Overview** + +This tutorial will cover the following steps: + +- Initializing and unsealing your Vault +- Authorizing your requests to Vault +- Reading and writing secrets +- Sealing your Vault + +**Initialize your Vault** + +To get started, we need to initialize an instance of Vault for you to work with. +While initializing, you can configure the seal behavior of Vault. +Initialize Vault now, with 1 unseal key for simplicity, using the command: + + vault init -key-shares=1 -key-threshold=1 + +You'll notice Vault prints out several keys here. Don't clear your terminal, as these are needed in the next few steps. + +![Initializing SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Initializing-SSH.png) + +**Unsealing your Vault** + +When a Vault server is started, it starts in a sealed state. In this state, Vault is configured to know where and how to access the physical storage, but doesn't know how to decrypt any of it. +Vault encrypts data with an encryption key. This key is encrypted with the "master key", which isn't stored. Decrypting the master key requires a threshold of shards. In this example, we use one shard to decrypt this master key. + + vault unseal + +![Unsealing SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Unsealing-SSH.png) + +**Authorize your requests** + +Before performing any operation with Vault, the connecting client must be authenticated. Authentication is the process of verifying a person or machine is who they say they are and assigning an identity to them. This identity is then used when making requests with Vault. +For simplicity, we'll use the root token we generated on init in Step 2. This output should be available in the scrollback. +Authorize with a client token: + + vault auth + +![Authorize SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Authorize-SSH.png) + +**Read and write secrets** + +Now that Vault has been set-up, we can start reading and writing secrets with the default mounted secret backend. Secrets written to Vault are encrypted and then written to the backend storage. The backend storage mechanism never sees the unencrypted value and doesn't have the means necessary to decrypt it without Vault. + + vault write secret/hello value=world + +Of course, you can then read this data too: + + vault read secret/hello + +![RW_SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/RW_SSH.png) + +**Seal your Vault** + +There is also an API to seal the Vault. This will throw away the encryption key and require another unseal process to restore it. Sealing only requires a single operator with root privileges. This is typically part of a rare "break glass procedure". +This way, if there is a detected intrusion, the Vault data can be locked quickly to try to minimize damages. It can't be accessed again without access to the master key shards. + + vault seal + +![Seal Vault SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Seal-Vault-SSH.png) + +That is the end of introductory tutorial. + +### Summary ### + +Vault is a very useful application mainly because of providing a reliable and secure way of storing critical information. Furthermore it encrypts the critical information before storing, maintains audit logs, grants secret information for limited lease time and revokes it once lease is expired. It is platform independent and freely available to download and install. To discover more about Vault, readers are encouraged to visit the official website. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/secure-secret-store-vault/ + +作者:[Aun Raza][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ +[1]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_386.zip +[2]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_amd64.zip +[3]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_arm.zip \ No newline at end of file diff --git a/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md b/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md new file mode 100644 index 0000000000..a8c58b82af --- /dev/null +++ b/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md @@ -0,0 +1,112 @@ +How to Setup OpenERP (Odoo) on CentOS 7.x +================================================================================ +Hi everyone, this tutorial is all about how we can setup Odoo (formerly known as OpenERP) on our CentOS 7 Server. Are you thinking to get an awesome ERP (Enterprise Resource Planning) app for your business ?. Then, OpenERP is the best app you are searching as it is a Free and Open Source Software which provides an outstanding features for your business or company. + +[OpenERP][1] is a free and open source traditional OpenERP (Enterprise Resource Planning) app which includes Open Source CRM, Website Builder, eCommerce, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management and many more modules included for a better way to boost the productivity and sales. Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps. + +So, here are some quick and easy steps to get your copy of OpenERP installed on your CentOS machine. + +### 1. Installing PostgreSQL ### + +First of all, we'll want to update the packages installed in our CentOS 7 machine to ensure that the latest packages, patches and security are up to date. To update our sytem, we should run the following command in a shell or terminal. + + # yum clean all + # yum update + +Now, we'll want to install PostgreSQL Database System as OpenERP uses PostgreSQL for its database system. To install it, we'll need to run the following command. + + # yum install postgresql postgresql-server postgresql-libs + +![Installing postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-postgresql.png) + +After it is installed, we'll need to initialize the database with the following command + + # postgresql-setup initdb + +![Intializating postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/intializating-postgresql.png) + +We'll then set PostgreSQL to start on every boot and start the PostgreSQL Database server. + + # systemctl enable postgresql + # systemctl start postgresql + +As we haven't set a password for the user "postgresql", we'll want to set it now. + + # su - postgres + $ psql + postgres=# \password postgres + postgres=# \q + # exit + +![setting password postgres](http://blog.linoxide.com/wp-content/uploads/2015/03/setting-password-postgres.png) + +### 2. Configuring Odoo Repository ### + +After our Database Server has been installed correctly, we'll want add EPEL (Extra Packages for Enterprise Linux) to our CentOS server. Odoo (or OpenERP) depends on Python run-time and many other packages that are not included in default standard repository. As such, we'll want to add the Extra Packages for Enterprise Linux (or EPEL) repository support so that Odoo can get the required dependencies. To install, we'll need to run the following command. + + # yum install epel-release + +![Installing EPEL Release](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-epel-release.png) + +Now, after we install EPEL, we'll now add repository of Odoo (OpenERP) using yum-config-manager. + + # yum install yum-utils + + # yum-config-manager --add-repo=https://nightly.odoo.com/8.0/nightly/rpm/odoo.repo + +![Adding OpenERP (Odoo) Repo](http://blog.linoxide.com/wp-content/uploads/2015/03/added-odoo-repo.png) + +### 3. Installing Odoo 8 (OpenERP) ### + +Finally after adding repository of Odoo 8 (OpenERP) in our CentOS 7 machine. We'll can install Odoo 8 (OpenERP) using the following command. + + # yum install -y odoo + +The above command will install odoo along with the necessary dependency packages. + +![Installing odoo or OpenERP](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-odoo.png) + +Now, we'll enable automatic startup of Odoo in every boot and will start our Odoo service using the command below. + + # systemctl enable odoo + # systemctl start odoo + +![Starting Odoo](http://blog.linoxide.com/wp-content/uploads/2015/03/starting-odoo.png) + +### 4. Allowing Firewall ### + +As Odoo uses port 8069, we'll need to allow firewall for remote access. We can allow firewall to port 8069 by running the following command. + + # firewall-cmd --zone=public --add-port=8069/tcp --permanent + # firewall-cmd --reload + +![Allowing firewall Port](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-firewall-port.png) + +**Note: By default, only connections from localhost are allowed. If we want to allow remote access to PostgreSQL databases, we'll need to add the line shown in the below image to pg_hba.conf configuration file:** + + # nano /var/lib/pgsql/data/pg_hba.conf + +![Allowing Remote Access pgsql](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-remote-access-pgsql.png) + +### 5. Web Interface ### + +Finally, as we have successfully installed our latest Odoo 8 (OpenERP) on our CentOS 7 Server, we can now access our Odoo by browsing to http://ip-address:8069 http://my-site.com:8069 using our favorite web browser. Then, first thing we'll gonna do is we'll create a new database and create a new password for it. Note, the master password is admin by default. Then, we can login to our panel with that username and password. + +![Odoo Panel](http://blog.linoxide.com/wp-content/uploads/2015/03/odoo-panel.png) + +### Conclusion ### + +Odoo 8 (formerly OpenERP) is the best ERP app available in the world of Open Source. We did an excellent work on installing it because OpenERP is a set of many modules which are essential for a complete ERP app for business and company. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy OpenERP (Odoo 8) :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-openerp-odoo-centos-7/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://www.odoo.com/ \ No newline at end of file