mirror of
https://github.com/LCTT/TranslateProject.git
synced 2026-08-23 04:03:29 +08:00
@@ -1,10 +1,10 @@
|
||||
Exaile 3.4.1 概述 — 一个全功能的GNOME音乐播放器
|
||||
Exaile 3.4.1 概览:一个全功能的GNOME音乐播放器
|
||||
================================================================================
|
||||
**Exaile** 在过去两年显得有些平静,也许只有一个或者两个稳定版发布,但尽管如此,在功能方面,它是一个和[Rhythmbox][1]或者[Banshee][2]相匹敌的全功能GNOME音乐播放器。然而,在过去的两个月,在"We’re not dead yet"的口号下,推出了一个新的稳定版3.4,同时在11月1日还推出了3.4.1增量版本。事实上,Exaile有很多的功能,我可以继续写很多的文章而不是在一篇文章里全部介绍到,就让我们来看一下一些最显著的特点吧。
|
||||
**Exaile** 在过去两年显得有些平静,也许只有一个或者两个稳定版发布,但尽管如此,在功能方面,它是一个和[Rhythmbox][1]或者[Banshee][2]相匹敌的全功能GNOME音乐播放器。不过,在过去的两个月,在"We’re not dead yet"的口号下,他们推出了一个新的稳定版3.4,同时在11月1日还推出了3.4.1增量版本。事实上,Exaile有很多的功能,我可以继续写很多的文章而不是在一篇文章里全部介绍到,就让我们来看一下一些最显著的特点吧。
|
||||
|
||||

|
||||
|
||||
[Exaile][3]是基于GTK-2,用Python写的音乐播放器,它能很好地兼容GNOME,有和旧的Amarok1.4或者Clementine非常类似的界面,以及一些很好的功能。界面主要由两个面板组成,两个都支持标签。左边的面板提供对音乐集,网络音频,只能和自定义播放列表,文件浏览,播客,组标签以及歌词的访问,窗口的主要部分是播放列表(支持多种,带标签的播放列表)和控制按钮。
|
||||
[Exaile][3]是基于GTK-2,用Python写的音乐播放器,它能很好地兼容GNOME,有和旧的Amarok1.4或者Clementine非常类似的界面,以及一些很好的功能。界面主要由两个面板组成,两个都支持标签。左边的面板提供对音乐集,网络音频,智能和自定义播放列表,文件浏览,播客,组标签以及歌词的访问,窗口的主要部分是播放列表(支持多个列表,以标签方式组织的播放列表)和控制按钮。
|
||||
|
||||
Exaile的界面和Clementine或者Amarok1.4非常相似,可以显示或者隐藏左边的标签。
|
||||
|
||||
@@ -26,7 +26,7 @@ Exaile的功能几乎不尽其数。你可以在音乐集中组织音乐,听
|
||||
|
||||

|
||||
|
||||
首选项窗口允许多个方面配置Exaile,包括启用或者禁用插件,外观,系统托盘集成或者播放模式。外观设置允许你更改标签的布局,显示或者隐藏便签栏,启用或者禁用透明性或者禁用启动画面。
|
||||
首选项窗口允许配置Exaile的各个方面,包括启用或者禁用插件,外观,系统托盘集成或者播放模式。外观设置允许你更改标签的布局,显示或者隐藏便签栏,启用或者禁用透明性或者禁用启动画面。
|
||||
|
||||

|
||||
|
||||
@@ -64,7 +64,7 @@ via: http://www.tuxarena.com/2014/11/exaile-3-4-1-overview-a-feature-complete-gn
|
||||
|
||||
作者:Craciun Dan
|
||||
译者:[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/) 荣誉推出
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
在CentOS或者Redhat中如何为Apache Tomcat绑定IPv4
|
||||
如何在 CentOS/RHEL 中为 Apache Tomcat 绑定 IPv4 地址
|
||||
================================================================================
|
||||
今天我们来学习一下如何在CentOS 7 Linux分布式系统中为Tomcat绑定IPv4
|
||||
今天我们来学习一下如何在CentOS 7 Linux分布式系统中为Tomcat绑定IPv4。
|
||||
|
||||
**Apache Tomcat** 是由[Apache Software Foundation][1] 开发的开源web服务器和servlet容器。它实现了Java Servlet,JavaServer页面(JSP),Java的统一表达式语言,以及Sun Microsystems的Java的WebSocket规范,并提供了一个运行java代码的web服务器环境。
|
||||
**Apache Tomcat** 是由[Apache 软件基金会][1] 开发的开源web服务器和servlet容器。它实现了Java Servlet,JavaServer页面(JSP),Java的统一表达式语言,以及Sun Microsystems的Java的WebSocket规范,并提供了一个运行java代码的web服务器环境。
|
||||
|
||||
如果由于默认绑定tomcat到IPv6而导致我们的web服务器不能正常工作,就有必要将tomcat绑定到IPv4。众所周知,IPv6是为设备分配IP地址的现代方法,虽然在不久的将来也许会得到应用,但是现在并没有得到完全应用。由于没有用处,目前我们并不需要将我们的Tomcat服务器向IPv6转换,我们应该将其绑定到IPv4。
|
||||
如果由于tomcat默认绑定到IPv6而导致我们的web服务器不能正常工作,就有必要将tomcat绑定到IPv4。众所周知,IPv6是为设备分配IP地址的现代方法,虽然在不久的将来也许会得到应用,但是现在并没有得到完全应用。由于没有用处,目前我们并不需要将我们的Tomcat服务器向IPv6转换,我们应该将其绑定到IPv4。
|
||||
|
||||
在开始将tomcat绑定到IPv4之前,我们应该确保在我们的CentOS 7中已经安装了tomcat。这是一个[如何在CentOS 7.0服务器中安装tomcat 8][2]的指导。
|
||||
在开始将tomcat绑定到IPv4之前,我们应该确保在我们的CentOS 7中已经安装了tomcat。可以看这个[如何在CentOS 7.0服务器中安装tomcat 8][2]的指导。
|
||||
|
||||
### 1. 切换到tomcat用户 ###
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
|
||||
### 3. 配置 Catalina.sh ###
|
||||
|
||||
如图所示,我们将在catalina.sh脚本文件的最后增加一行 **JAVA_OPTS= "$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"**。我们可以使用我们喜欢的文本编辑器来编辑这个文件,例如nano,vim等等。这里我们使用nano。
|
||||
如图所示,我们将在catalina.sh脚本文件的最后增加一行 `JAVA_OPTS= "$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"`。我们可以使用我们喜欢的文本编辑器来编辑这个文件,例如nano、vim等等。这里我们使用nano。
|
||||
|
||||
$ nano catalina.sh
|
||||
|
||||

|
||||
|
||||
然后,如下图所示,将 **JAVA_OPTS= "$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"** 增加到文件。
|
||||
然后,如下图所示,将该行增加到文件。
|
||||
|
||||

|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
### 结尾 ###
|
||||
|
||||
好了,我们终于将我们运行在CentOS 7 Linux分布式系统上的tomcat服务器绑定到IPv4上了。尽管IPv6在不久的将来也许会得到应用,但由于现在还没有使用,如果因为将你的Tomcat服务器绑定到IPv6上而使得你的tomcat服务器不工作,就有必要将tomcat绑定到IPv4上,这也很简单。如果你有任何疑问,建议,反馈,请在下面的评论框中写下来,让我们知道有什么需要增加或者改进。非常感谢!
|
||||
好了,我们终于将我们运行在CentOS 7 Linux发行版上的tomcat服务器绑定到IPv4上了。尽管IPv6在不久的将来也许会得到应用,但由于现在还没有使用,如果因为将你的Tomcat服务器绑定到IPv6上而使得你的tomcat服务器不工作,就有必要将tomcat绑定到IPv4上,这也很简单。如果你有任何疑问,建议,反馈,请在下面的评论框中写下来,让我们知道有什么需要增加或者改进。非常感谢!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@@ -68,7 +68,7 @@ via: http://linoxide.com/linux-how-to/bind-apache-tomcat-ipv4-centos/
|
||||
|
||||
作者:[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/) 荣誉推出
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
Torvalds: 写linux内核的人更加容易找工作
|
||||
========================================
|
||||
|
||||
相比起以往,linux内核开发这么专业的事情,在最近发布的《谁在编写 Linux》报告中,其无偿贡献者降到了历史最低水平。
|
||||
|
||||
这个报道由linux基金会撰写,上年有11.8%的内核开发是由无偿贡献者完成,相比2012年的14.6%下滑了19%。基金会说贡献者有逐年下降的趋势。
|
||||
|
||||

|
||||
|
||||
即使是这样,在最新的《谁在编写 Linux》报告里,无偿贡献者还是最大的单一贡献来源,共做了11968 处修改,占整体的12.4%。然而,linux基金会说,企业贡献者共同占比越来越多,超过80%的内核贡献是由有偿的专业开发者完成的。
|
||||
|
||||
根据 linus Torvalds 说,这个有偿开发者趋势不会对内核开发的本身有太多改变。
|
||||
|
||||
他向《Network World》说,“我认为不会改变太多的一个原因是,其实并不是‘无偿贡献者离开了’,而是‘编写内核的人很快就被雇走了’。”
|
||||
|
||||
Torvalds讲到,linux开发的改变有很多其他原因,很自然的,新的贡献者会经常冒出来;有很多原来的开发者,有的有着10年的经验,被很多对linux感兴趣的公司抢去了。
|
||||
|
||||
他说:“开始我们是自愿者,但我们后来也很高兴被请去开发linux。”
|
||||
|
||||
Torvalds 开始抽离了他的开发角色,根据报道在3.10的内核版本里面他个人发布了329个补丁,占04%。逐渐地,各个子系统的维护人员自己开始做代码检查与合并。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.infoworld.com/article/2885339/application-development/torvalds-people-who-start-writing-kernel-code-get-hired-really-quickly.html
|
||||
|
||||
作者:[Jon Gold][a]
|
||||
译者:[haimingfg](https://github.com/haimingfg)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.infoworld.com/author/Jon-Gold/
|
||||
@@ -1,31 +1,32 @@
|
||||
红帽开发者工具集3.1测试版发布了
|
||||
================================================================================
|
||||
> **Summary**:想要最新的红帽企业版Linux6或者7开发者工具?测试版已经发布啦.
|
||||
> **摘要**:想要试试最新的红帽企业版Linux 6/7的开发者工具?测试版已经发布啦。
|
||||
|
||||
这是[DevOps][1]也不能完全解决的开发商和运营商之间永恒的问题之一。系统管理员想要最稳定的操作系统,而程序员想要最新最棒的开发工具。[红帽公司][2]对这个两难问题的解决方法就是用最新的稳定版[Red Hat Enterprise Linux (RHEL)][3]去测试这些新品牌工具,然后向开发者发布。
|
||||
这是[DevOps][1]也不能完全解决的程序员和系统管理员之间永恒的问题之一。系统管理员想要最稳定的操作系统,而程序员想要最新最棒的开发工具。[红帽公司][2]对这个两难问题的解决方法就是用最新的稳定版[Red Hat Enterprise Linux (RHEL)][3]去测试这些新品牌工具,然后向开发者发布。
|
||||
|
||||

|
||||
红帽开发者工具集
|
||||
|
||||
基于此红帽刚刚公布了给开发者的最新玩具,[红帽开发者工具集 3.1][4]。现在可以获得这些最热门工具包的测试版了。
|
||||
*红帽开发者工具集*
|
||||
|
||||
红帽刚刚公布了给开发者的最新玩具:[红帽开发者工具集 3.1][4]。现在可以获得这些最热门工具包的测试版了。
|
||||
|
||||
这次更新包括:
|
||||
|
||||
[GNUCompiler Collection (GCC) 4.9][5]: 最新的GCC上游稳定版本,提供多处改进和bug修复
|
||||
[GNUCompiler Collection (GCC) 4.9][5]: 最新的GCC上游稳定版本,提供多处改进和bug修复。
|
||||
|
||||
[Eclipse 4.4.1][6]: 支持Java 8 以及更新了的Eclipse CDT(8.5)版本,Eclipse Linux Tools (3.1), Eclipse Mylyn (3.14), 和 Eclipse Egit/Jgit (3.6.1)
|
||||
[Eclipse 4.4.1][6]: 支持Java 8 以及更新的Eclipse CDT(8.5)版本,Eclipse Linux Tools (3.1), Eclipse Mylyn (3.14), 和 Eclipse Egit/Jgit (3.6.1)
|
||||
|
||||
众多额外的更新包: 包括 GDB 7.8.2, elfutils 0.161, memstomp 0.1.5, SystemTap 2.6, Valgrind 3.10.1, Dyninst 8.2.1, 以及 ltrace 0.7.91.
|
||||
|
||||
用这些开发工具,你可以给RHEL 6 和 7.x 开发应用程序。这些应用程序可以在RHEL上运行,不管是物理机,虚拟机还是云环境。它们也可以在红帽提供的Platform-as-a-Service (PaaS)服务[OpenShift][7]上运行。
|
||||
|
||||
这些新的开发者程序集有RHEL 7 以及 运行在[AMD64 和 Intel 64 架构][8]上的安装包。尽管这些工具都是64位的,你也可以用它们创建或者更改32位的二进制文件。
|
||||
这些新的开发者程序集包括可以运行在[AMD64 和 Intel 64 架构][8]上RHEL 7的包。尽管这些工具都是64位的,你也可以用它们创建或者修改32位的二进制文件。
|
||||
|
||||
在运行任何这些程序之前,你应该安装RHEL所有最近的更新。要安装这个测试工具集,你的系统需要选中可选渠道来获取所有红帽开发者工具集需要的工具链包。
|
||||
在运行任何这些程序之前,你应该安装RHEL所有最近的更新。要安装这个测试工具集,你的系统需要订阅“可选渠道”来获取所有红帽开发者工具集需要的工具链包。
|
||||
|
||||
另外,如果已经安装了早期版本的工具集,可能会遇到[安装Toolkit 3.1 时的一些问题][9]。尽管这些问题很容易解决,在安装新的工具集之前还是应该大概看一下这些可能出现的问题。
|
||||
|
||||
最后,你可能注意到一些最令人激动的工具,例如Docker,Kubernetes以及其它这里没有的容器工具。因为它们在最新的发行版[RHEL 7.1][10] 和 [Red Hat Enterprise Linux 7 Atomic Host (RHELAH)][11]中。[红帽和Docker已成为合作伙伴][12],要获取这些容器友好的程序,你需要转换到Docker友好的RHEL版本上来。
|
||||
最后,你可能注意到一些最令人激动的工具,例如 Docker,Kubernetes以及其它容器工具并没有提供。因为它们在最新的发行版[RHEL 7.1][10] 和 [Red Hat Enterprise Linux 7 Atomic Host (RHELAH)][11]中。[红帽和Docker已成为合作伙伴][12],要获取这些支持容器的程序,你需要转换到支持Docker的RHEL版本上来。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@@ -33,7 +34,7 @@ via: http://www.zdnet.com/article/red-hat-developer-toolset-3-1-beta-arrives/
|
||||
|
||||
作者:[Steven J. Vaughan-Nichols][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/) 荣誉推出
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
VirturalBox 5.0 beta版终于发布了
|
||||
VirturalBox 终于进入到 5.0 世代
|
||||
=======================================
|
||||
**甲骨文公司的桌面虚拟化软件获得了近五年来的第一次重大改版,但是更像是改进而不是革命性的的变化。**
|
||||
|
||||
**本月初,甲骨文公司的桌面虚拟化软件获得了近五年来的第一次重大改版,但是更像是改进而不是革命性的的变化。**
|
||||
|
||||
VirtualBox,由Sun公司创建,现在由甲骨文管理的开源虚拟化系统,获得了近5年来第一次的主版本更新发布。
|
||||
|
||||
从发行说明和测试版本身的表现来看,别期望任何真正革命性的改变。在此版本中,VirtualBox在视觉上和技术上都做了一些改进,但和VMware相比,它的主要优势仍然是相同核心功能的自由化。
|
||||
从发行说明和测试版本身的表现来看,别期望任何真正革命性的改变。在此版本中,VirtualBox在视觉上和技术上都做了一些改进,但和VMware相比,它的主要优势仍然是相同核心功能的开源实现。
|
||||
|
||||
VirtualBox 4.0的最后一个主要版本在2010年12月发布,它采用了新的图形化用户界面,新的虚拟化硬件和重组的项目设计,带来了重大的改版。但项目主要版本的发布步伐缓慢,上一次重要版本(版本4.3)在2013年底才发布。从那时起,一切都被正式称为“维修”发布。
|
||||
VirtualBox 4.0的最后一个主要版本在2010年12月发布,它采用了新的图形化用户界面,新的虚拟化硬件和重组的项目设计,进行了重大的改版。但项目主要版本的发布步伐缓慢,上一次重要版本(版本4.3)在2013年底才发布。从那时起,一切都被正式称为“维护”发布。
|
||||
|
||||
**VirtualBox 5.0**
|
||||

|
||||
|
||||
*VirtualBox 5.0的第一个测试版增加了编辑菜单,VM窗口的快捷方式图标等功能,如下面所示。*
|
||||
|
||||
VirtualBox 5.0最大的变化是增加了对硬件辅助虚拟化指令集扩展的支持。AES-NI指令集通常用于加密时的硬件加速,SSE 4.1和SSE 4.2指令集都包括在其中。另外一点是支持Windows和Linux客户机的半虚拟化,一个抽象主机音响的新的架构以及支持客户机中的USB 3(xHCI)控制器。
|
||||
VirtualBox 5.0最大的变化是增加了对硬件辅助虚拟化指令集扩展的支持。AES-NI指令集通常用于加密时的硬件加速,SSE 4.1和SSE 4.2指令集都包括在其中。另外一点是支持Windows和Linux客户机的半虚拟化,一个抽象主机音响设备的新的架构以及支持客户机中的USB 3(xHCI)控制器。
|
||||
|
||||
大部分可用更新都是对VirtualBox 图形化用户界面的改进。一个大的变化就是支持给单个虚拟主机自定义菜单和工具栏,这样很少或者从不使用的选项就可以彻底删除。另外重要的一点是可以在VirtualBox接口内部对虚拟磁盘进行加密,而不依赖于客户机操作系统自身的磁盘加密功能(假设有的话)。
|
||||
大部分可用性更新都是对 VirtualBox 图形化用户界面的改进。一个大的变化就是支持给单个虚拟主机自定义菜单和工具栏,这样很少或者从不使用的选项就可以彻底删除。另外重要的一点是可以在VirtualBox接口内部对虚拟磁盘进行加密,而不依赖于客户机操作系统自身的磁盘加密功能(假设有的话)。
|
||||
|
||||
甲骨文公司提醒由于这是个测试版软件,需要谨慎对待。当然,主界面和客户机系统界面在某方面都可能引起红黑测试版警告。但之前VirtualBox发行版(4.3.26)上创建的Windows 10虚拟机启动和运行都没问题,5.0版本中添加的VirtualBox客户机功能--更好的视频支持,双向复制和粘贴,以及其它功能--安装的时候也没有问题。(更好地支持Windows 10的修复从4.3.18版本后就开始出现)。
|
||||
甲骨文公司提醒由于这是个测试版软件,需要谨慎对待。当然,主界面和客户机系统界面的某个角落打着红黑相间的测试警告标志。但之前VirtualBox发行版(4.3.26)上创建的Windows 10虚拟机启动和运行都没问题,5.0版本中添加的VirtualBox客户机功能--更好的视频支持,双向复制和粘贴,以及其它功能--在安装的时候也没有问题。(从4.3.18版本就改进了对 Windows 10的支持)。
|
||||
|
||||
虽然没有明确指出5.0的最终版什么时候会发布,但是甲骨文公司[鼓励用户][1]在非生产环境中下载和使用测试版,并在[测试版反馈论坛][2]中报告bug文件。
|
||||
虽然没有明确指出5.0的最终版什么时候会发布,但是甲骨文公司[建议用户][1]在非生产环境中下载和使用测试版,并在[测试版反馈论坛][2]中提交bug报告。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@@ -26,7 +27,7 @@ via: http://www.infoworld.com/article/2905098/virtualization/oracle-virtualbox-5
|
||||
|
||||
作者:[Serdar Yegulalp][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/) 荣誉推出
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
Linux内核4.0功能:实时内核补丁,支持PS3
|
||||
================================================================================
|
||||

|
||||
|
||||
**Linux Torvalds 在Linux内核邮件列表里[发布][1]了Linux内核新的稳定版。**
|
||||
|
||||
Linux 4.0,代号为‘Hurr durr I’m a sheep’,带来了一小系列新硬件支持,驱动改进,性能调整,错误修复等。
|
||||
|
||||
但是其实没有太多的更新的必要,Torvalds 写到:
|
||||
|
||||
> 功能方面,4.0 并没有那么多特别的。虽然在内核补丁设施上做了很多工作,但事实上[...] 我们在其它版本中有更大的改变。所以这仅仅是一次“按部就班”的发布。
|
||||
|
||||
Linus 补充说Linux 4.1 可能是一个“大版本”。
|
||||
|
||||
### Linux内核4.0新功能 ###
|
||||
|
||||
**无需重启安装内核更新**
|
||||
|
||||
你肯定遇到过内核更新需要重启你的Linux系统而被打断工作,这并不是你一个人遇到的问题。这对于桌面操作系统来说是个小小的不便,对于服务器来说却是大问题。
|
||||
|
||||

|
||||
|
||||
*内核更新无需重启*
|
||||
|
||||
实时给Linux内核安装/使用安全补丁而不需要重启,多年来一直是Linux爱好者希望实现的事情。
|
||||
|
||||
一些第三方项目,例如[Oracle 的 KSplice][2]和红帽的 Kpatch,已经为一些特定的发行版提供实时补丁的功能。
|
||||
|
||||
对于服务器,企业单位以及关键任务正常运行,实现实时内核补丁是一个相当大的问题。
|
||||
|
||||
好消息是Linux 4.0 使得重启系统以完成内核更新成为了过去。
|
||||
|
||||
如果不是完全不需要重启,也是基本不需要。
|
||||
|
||||
在最新的发行版中,实现了支持免重启安装补丁的最初基础,为有经验的系统管理员发挥 Linux 4.0的优势做好了准备。
|
||||
|
||||
桌面Linux发行版也应该能够利用这个功能的优势(但考虑到在最终用户端配置免重启功能会比较复杂而有一些路要走)。
|
||||
|
||||
在以后的4.x系列中,这个基础功能会持续完善和改进。我希望我们能更多听到它的一些信息。
|
||||
|
||||
#### 其它改进 ####
|
||||
|
||||
尽管被认为是一次小版本的发布,最新的Linux内核还是带来了一系列的硬件改进,新的驱动以及性能调整。
|
||||
它们包括:
|
||||
|
||||
- 针对Intel ‘Skylake’ 平台的改进
|
||||
- 支持Intel Quark SoC
|
||||
- 改善Linux在Playstation 3上运行的系列补丁
|
||||
- TOpen-source AMD Radeon驱动支持DisplayPort音频
|
||||
- 各种HID驱动调整,包括Lenovo紧凑型键盘,Wacom Cintiq 27QHD
|
||||
- 东芝电源设置驱动器增加了USB睡眠/充电功能,快速充电,睡眠/音乐等
|
||||
- 文件系统调整,包括F2FS, BtrfFS等
|
||||
|
||||
### 在Ubuntu上安装Linux内核4.0 ###
|
||||
|
||||
尽管被归为稳定版本,但目前而言,**桌面用户和新用户没有必要去升级**。
|
||||
|
||||
如果从[Canonical的主线内核文档][3]抓取合适的安装包或者冒着第三方PPA库的风险在Ubuntu 15.04测试版安装Linux4.0,那么这种急躁或者不娴熟可能会带来问题。
|
||||
|
||||
Ubuntu 15.04 Vivid Vervet 将在本月晚些时候发布并会附带Ubuntu内核 3.19(Ubuntu的内核是由Linux内核以及一些上游发行版还没有接受的 Ubuntu 特定的补丁组成)。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features
|
||||
|
||||
作者:[Joey-Elijah Sneddon][a]
|
||||
译者:[ictlyh](https://github.com/ictlyh)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/117485690627814051450/?rel=author
|
||||
[1]:http://linux.cn/article-5259-1.html
|
||||
[2]:http://www.omgubuntu.co.uk/2009/10/how-to-install-kernel-updates-without-rebooting
|
||||
[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D
|
||||
@@ -0,0 +1,161 @@
|
||||
在 Apache、NGINX 和 Lighttpd 上启用 HTTP 公钥固定扩展(HPKP)
|
||||
================================================================================
|
||||
|
||||
公钥固定(Public Key Pinning)是指一个证书链中必须包含一个白名单中的公钥,也就是说只有被列入白名单的证书签发机构(CA)才能为某个域名`*.example.com`签发证书,而不是你的浏览器中所存储的任何 CA 都可以为之签发。本文讲述了这种机制的背景知识,并提供了 Apache、 Lighttpd 和 NGINX 上的配置范例。
|
||||
|
||||
### HTTP 公钥固定扩展 ###
|
||||
|
||||
用你使用的银行做个例子,它一直使用 CA 公司 A 为其签发证书。但是在当前的证书体系下,CA 公司 B、CA 公司 C 和 NSA 的 CA 都能给你的银行创建证书,而你的浏览器会毫无疑虑的接受它们,因为这些公司都是你所信任的根 CA。
|
||||
|
||||
如果你的银行实现了 HPKP 并固定了它们的第一个中级证书(来自 CA 公司 A),那么浏览器将不会接受来自CA 公司 B 和 CA 公司 C 的证书,即便它们也有一个有效的信任链。HPKP 也允许你的浏览器将这种违例行为报告给该银行,以便银行知道被伪造证书攻击了。
|
||||
|
||||
HTTP 公钥固定扩展是一个从2011年开始开发的针对 HTTP 用户代理(即浏览器)的公钥固定标准。它由 Google 发起,甚至在 Chrome 中实现的固定机制可以使用一个人工维护的网站公钥固定列表,这个列表包含了固定的几个网站的公钥签名。(LCTT 译注:Chrome 和 FireFox 32 及以后版本都支持公钥固定机制,并使用内置的人工维护的公钥固定列表数据,这些数据随着浏览器软件的更新而更新,主要包括几个大型站点。目前还只有 Chrome 38+ 支持通过 HTTP 响应头传递公钥固定信息。)
|
||||
|
||||
以下是 HPKP 的几个功能简述:
|
||||
|
||||
- HPKP 是在 HTTP 层面设置的,使用 `Public-Key-Pins` (PKP)响应头。
|
||||
- 该规则的保留周期通过 max-age 参数设置,单位是秒。
|
||||
- PKP 响应头只能用于正确的安全加密通讯里面。
|
||||
- 如果出现了多个这样的响应头,则只处理第一个。
|
||||
- 固定机制可以使用`includeSubDomains`参数扩展到子域。
|
||||
- 当接收到一个新的 PKP 响应头时,它会覆盖之前存储的公钥固定和元数据。
|
||||
- 公钥固定是用哈希算法生成的,其实是一个“主题公钥信息(SKPI)”指纹。
|
||||
|
||||
本文首先会介绍一些 HPKP 工作的原理,接下来我们会展示给你如何得到需要的指纹并配置到 web 服务器中。
|
||||
|
||||
### SPKI 指纹 - 理论 ###
|
||||
|
||||
以下摘自 Adam Langley 的[帖子][1],我们哈希的是一个公钥,而不是证书:
|
||||
|
||||
> 通常来说,对证书进行哈希是一个显而易见的解决方案,但是其实这是错的。不能这样做的原因是 CA 证书可以不断重新签发:同一个公钥、主题名可以对应多个证书,而这些证书有不同的延展或失效时间。浏览器从下至上地在证书池中构建证书链时,另外一个版本的证书可能就替代匹配了你原本所期望的证书。
|
||||
>
|
||||
> 举个例子,StartSSL 有两个根证书:一个是以 SHA1 签名的,另外是一个是 SHA256。如果你希望固定住 StartSSL 作为你的 CA,那么你该使用哪个证书呢?你也许可以使用这两个,但是如果我不告诉你,你怎么会知道还有一个根证书呢?
|
||||
>
|
||||
> 相反地,对公钥进行哈希则不会有这个问题:
|
||||
>
|
||||
> 浏览器假定子证书是固定不动的:它总是证书链的起点。子证书所携带的签名一定是一个有效的签名,它来自其父证书给这个证书专门签发的。这就是说,父证书的公钥相对于子证书来说是固定的。所以可推论公钥链是固定的。
|
||||
>
|
||||
> 唯一的问题是你不能固定到一个交叉认证的根证书上。举个例子,GoDaddy 的根证书是 Valicert 签名的,这是为了让那些不能识别 GoDaddy 根证书的老客户可以信任其证书。然而,你不能固定到 Valicert 上,因为新的客户在证书链上发现了 GoDaddy 证书就会停止上溯(LCTT 译注:所以就找不到固定信息了)。
|
||||
>
|
||||
> 此外,我们是对 SubjectPublicKeyInfo(SPKI)进行哈希而不是对公钥位串。SPKI 包括了公钥类型、公钥自身及其相关参数。这很重要,因为如果对公钥进行哈希就有可能导致发生曲解攻击。对于一个 Diffie-Hellman 公钥而言:如果仅对公钥进行哈希,而不是对完整的 SPKI,那么攻击者可以使用同样的公钥而让客户端将其解释为其它组。同样地,这样也有可能强制将一个 RSA 密钥当成 DSA 密钥解释等等。
|
||||
|
||||
### 固定在哪里 ###
|
||||
|
||||
你应该固定在什么地方?固定你自己的公钥并不是一个最好的办法。你的密钥也许会改变或撤销。你也许会使用多个证书,经常轮换证书的话密钥就改变了。也许由于服务器被入侵而撤销证书。
|
||||
|
||||
最容易但是不是太安全的方法是固定第一个中级 CA 证书。该证书是签名在你的网站证书之上的,所以签发该证书的 CA 的公钥肯定是在证书链上的。
|
||||
|
||||
采用这种方法你可以从同一个 CA 更新你的证书而不用担心固定信息不对。如果该 CA 发行了一个不同的根证书,也许你会遇到一些问题,对此并没有太好的解决方案。不过你可以通过如下做法来减轻这种问题的影响:
|
||||
|
||||
- 从一个不同的 CA 申请一个备用的证书,并固定该备份。
|
||||
|
||||
RFC 里面说你至少需要做两个固定。一个是当前连接所使用的证书链上的,另外一个是备份的。
|
||||
|
||||
另外的固定是对备份公钥的,它可以是来自另外一个给你签发证书的不同 CA 的 SKPI 指纹。
|
||||
|
||||
在这个问题上还有一种**更安全**的方法,就是事先创建好至少三个独立的公钥(使用 OpenSSL,参见[此页][2] 了解 Javascript OpenSSL 命令生成器),并将其中两个备份到一个安全的地方,离线存储、不要放到网上。
|
||||
|
||||
为这三个证书创建 SPKI 指纹并固定它们,然后仅使用第一个作为当前的证书。当需要时,你可以使用备份密钥之一。不过你需要让 CA 给你做签名来生成证书对,这可能需要几天,依你的 CA 的工作情况而定。
|
||||
|
||||
对于 HPKP 来说这没有问题,因为我们使用的是公钥的 SPKI 哈希,而不是证书。失效或不同的 CA 签名链并不影响。
|
||||
|
||||
如果你按照上述方法生成并安全存储了至少三个独立的密钥,并固定它们,也可以防止你的 CA 撤销你的网站证书并签发一个假证书时出现问题。
|
||||
|
||||
### SPKI 指纹 ###
|
||||
|
||||
可以使用如下的 OpenSSL 命令来生成 SPKI 指纹,它出现在 [RFC 草案][3] 中:
|
||||
|
||||
openssl x509 -noout -in certificate.pem -pubkey | \
|
||||
openssl asn1parse -noout -inform pem -out public.key;
|
||||
openssl dgst -sha256 -binary public.key | openssl enc -base64
|
||||
|
||||
结果:
|
||||
|
||||
klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY=
|
||||
|
||||
上面输入的 `certificate.pem` 文件是本站(https://raymii.org)的证书链中第一个证书。(在写本文时, `COMODO RSA Domain Validation Secure Server CA, 序列号 2B:2E:6E:EA:D9:75:36:6C:14:8A:6E:DB:A3:7C:8C:07 。`)。
|
||||
|
||||
你也需要同样对你的另外两个备份公钥生成指纹。
|
||||
|
||||
### 故障 ###
|
||||
|
||||
在写本文时(2015/1),唯一支持 HPKP 的浏览器(chrome)有一个严重的问题:Chrome 并不能够区分 HSTS 和 HPKP 响应头中的 max-age 和 includeSubdomains 参数。也就是说,如果你的 HSTS 和 HPKP 设置了不同的 max-age 和 includeSubdomains 参数,它们会互相搞乱。关于这个故障的更多信息参见:[https://code.google.com/p/chromium/issues/detail?id=444511][4]。感谢 Scott Helme([https://scotthelme.co.uk][5])发现并告诉我这个 Chromium 项目的问题。
|
||||
|
||||
### Web 服务器配置 ###
|
||||
|
||||
下面你可以看到三个主流 Web 服务器的配置方法。这只是一个 HTTP 响应头,绝大多数 Web 服务器都可以设置它。它只需要设置到 HTTPS 网站上。
|
||||
|
||||
下面的例子固定到 `COMODO RSA Domain Validation Secure Server CA` 及备份的 `Comodo PositiveSSL` CA 上,30天失效期,包括所有的子域。
|
||||
|
||||
|
||||
#### Apache ####
|
||||
|
||||
编辑你的 Apache 配置文件(如 `/etc/apache2/sites-enabled/website.conf 或 /etc/apache2/httpd.conf`),并添加下列行到你的 VirtualHost 中:
|
||||
|
||||
# 如需要,载入 headers 模块。
|
||||
LoadModule headers_module modules/mod_headers.so
|
||||
|
||||
Header set Public-Key-Pins "pin-sha256=\"klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY=\"; pin-sha256=\"633lt352PKRXbOwf4xSEa1M517scpD3l5f79xMD9r9Q=\"; max-age=2592000; includeSubDomains"
|
||||
|
||||
#### Lighttpd ####
|
||||
|
||||
Lighttpd 更简单一些,将下列行添加到你的 Lighttpd 配置文件(如 `/etc/lighttpd/lighttpd.conf`):
|
||||
|
||||
server.modules += ( "mod_setenv" )
|
||||
$HTTP["scheme"] == "https" {
|
||||
setenv.add-response-header = ( "Public-Key-Pins" => "pin-sha256=\"klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY=\"; pin-sha256=\"633lt352PKRXbOwf4xSEa1M517scpD3l5f79xMD9r9Q=\"; max-age=2592000; includeSubDomains")
|
||||
}
|
||||
|
||||
#### NGINX ####
|
||||
|
||||
NGINX 的配置更简短。添加以下行到你的 HTTPS 配置的 server 块中:
|
||||
|
||||
add_header Public-Key-Pins 'pin-sha256="klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY="; pin-sha256="633lt352PKRXbOwf4xSEa1M517scpD3l5f79xMD9r9Q="; max-age=2592000; includeSubDomains';
|
||||
|
||||
### 报告功能 ###
|
||||
|
||||
HPKP 报告功能允许浏览器报告任何违例给你。
|
||||
|
||||
如果你在响应头中添加了附加的 `report-uri="http://example.org/hpkp-report"` 参数,并用该 URI 处理接收到的数据的话,客户端会在发现违例时发送报告给你。这个报告是以 POST 方式发送到你指定的 report-uri 上,并以类似下面的 JSON 格式:
|
||||
|
||||
{
|
||||
"date-time": "2014-12-26T11:52:10Z",
|
||||
"hostname": "www.example.org",
|
||||
"port": 443,
|
||||
"effective-expiration-date": "2014-12-31T12:59:59",
|
||||
"include-subdomains": true,
|
||||
"served-certificate-chain": [
|
||||
"-----BEGINCERTIFICATE-----\nMIIAuyg[...]tqU0CkVDNx\n-----ENDCERTIFICATE-----"
|
||||
],
|
||||
"validated-certificate-chain": [
|
||||
"-----BEGINCERTIFICATE-----\nEBDCCygAwIBA[...]PX4WecNx\n-----ENDCERTIFICATE-----"
|
||||
],
|
||||
"known-pins": [
|
||||
"pin-sha256=\"dUezRu9zOECb901Md727xWltNsj0e6qzGk\"",
|
||||
"pin-sha256=\"E9CqVKB9+xZ9INDbd+2eRQozqbQ2yXLYc\""
|
||||
]
|
||||
}
|
||||
|
||||
### 非强制,只报告 ###
|
||||
|
||||
HPKP 也可以设置为非强制的,可以使用 `Public-Key-Pins-Report-Only` 来只发送违例报告给你。
|
||||
|
||||
这样可以让你在网站不可访问或 HPKP 配置不正确时不固定,之后你可以将这个响应头改为 `Public-Key-Pins` 来强制固定。
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://raymii.org/s/articles/HTTP_Public_Key_Pinning_Extension_HPKP.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]:http://www.imperialviolet.org/2011/05/04/pinning.html
|
||||
[2]:https://raymii.org/s/software/OpenSSL_Command_Generator.html
|
||||
[3]:https://tools.ietf.org/html/draft-ietf-websec-key-pinning-21#appendix-A
|
||||
[4]:https://code.google.com/p/chromium/issues/detail?id=444511
|
||||
[5]:https://scotthelme.co.uk/
|
||||
@@ -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.
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative
|
||||
================================================================================
|
||||

|
||||
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 ###
|
||||
|
||||

|
||||
|
||||
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/
|
||||
@@ -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**
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
10 Famous IT Skills in Demand That Will Get You Hired
|
||||
================================================================================
|
||||
In continuation of our last article [[Top 10 Operating Systems in demand][1]] which was highly appreciated by the Tecmint community, we here in this article aims at throwing light on top IT skills that will help you land to your dream job.
|
||||
|
||||
As mentioned in the first article these data and statistics are supposed to be change with the change in demand and market. We will try our best to update the list whenever there is any major changes. All the statistics are produced on the basis of close study of Job boards, postings and requirements by several IT companies across the globe.
|
||||
|
||||
### 1. VMware ###
|
||||
|
||||
The visualization and cloud computing software designed by Vmware Inc. tops the List. Vmware claims to commercially virtualize x86 architecture for the first time. VMware demand has increased upto 16% in the last quarter.
|
||||
|
||||
Latest stable Release: 11.0
|
||||
|
||||
### 2. MySQL ###
|
||||
|
||||
The open source Relational Database Management System falls second in the list. Until 2013 it was the second most widely used RDBMS. MySQL demand has increased upto 11% in the last quarter. The very famous MariaDB has been forked out of MySQL after Oracle Corp. Owned it.
|
||||
|
||||
Latest Stable Release : 5.6.23
|
||||
|
||||
### 3. Apache ###
|
||||
|
||||
The open source cross platform web (HTTP) server stands third in the list. Apache demand has increased to more than 13% in the last quarter.
|
||||
|
||||
Latest Stable Release : 2.4.12
|
||||
|
||||
### 4. AWS ###
|
||||
|
||||
Amazon web services is a collection of remote computing services offered by Amazon.com. Aws made to the list at number four. AWS demand has shown a growth of nearly 14% in the last quarter.
|
||||
|
||||
### 5. Puppet ###
|
||||
|
||||
The configuration Management System used in setting up IT Infrastructure comes at number five. It is written in Ruby and follows Client-server architecture. The demand of puppet has grown above 9% in the last quarter.
|
||||
|
||||
Latest Stable Release : 3.7.3
|
||||
|
||||
### 6. Hadoop ###
|
||||
|
||||
Hadoop is a open source software framework written in Java to process big data. It stands at position six in the list. The demand of Hadoop has gone upto 0.2% in the last quarter.
|
||||
|
||||
Latest Stable Release : 2.6.0
|
||||
|
||||
### 7. Git ###
|
||||
|
||||
The famous distributed control system written initially by Linus Torvalds made to the list at number seven. The demand of Git has gone above 7% in the last quarter.
|
||||
|
||||
Latest Stable Release : 2.3.4
|
||||
|
||||
### 8. Oracle PL/SQL ###
|
||||
|
||||
The procedural extension for SQL by Oracle corp. stands at position eight. PL/SQL is included in Oracle Database since Oracle 7. It has shown a decline of nearly 8% in the last quarter.
|
||||
|
||||
### 9. Tomcat ###
|
||||
|
||||
Open source web server and servlet container comes at position number nine. It has shown a growth in demand of nearly 15% in the last quarter.
|
||||
|
||||
Latest Stable Release : 8.0.15
|
||||
|
||||
### 10. SAP ###
|
||||
|
||||
The most famous Enterprise Resource Planning Software stands at position ten. The demand of SAP has shown a growth of nearly 3.5% in last quarter.
|
||||
|
||||
注:表格数据,不需要翻译-开始
|
||||
<table cellspacing="0" cellpadding="5" style="width: 804px;">
|
||||
<colgroup>
|
||||
<col width="88">
|
||||
<col width="427">
|
||||
<col width="257">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0.1cm;">1.
|
||||
</td>
|
||||
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0.1cm;">VMware</td>
|
||||
<td width="257" bgcolor="#eeeeee" style="border: 1px solid #000000; padding: 0.1cm;"><span style="color: #006600;"><b>16% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top" class="alt">
|
||||
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">2.
|
||||
</td>
|
||||
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">MySQL</td>
|
||||
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>11% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">3.</td>
|
||||
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Apache</td>
|
||||
<td width="257" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>13% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top" class="alt">
|
||||
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">4.
|
||||
</td>
|
||||
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Amazon web services (AWS)</td>
|
||||
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>14% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">5.
|
||||
</td>
|
||||
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Puppet</td>
|
||||
<td width="257" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>9% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top" class="alt">
|
||||
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">6.</td>
|
||||
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Hadoop</td>
|
||||
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>0.2% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">7.</td>
|
||||
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Git</td>
|
||||
<td width="257" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>7% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top" class="alt">
|
||||
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">8.</td>
|
||||
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Oracle PL/SQL</td>
|
||||
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: red;"><b>8% -</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">9.</td>
|
||||
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Tomcat</td>
|
||||
<td width="257" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>15% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top" class="alt">
|
||||
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">10.</td>
|
||||
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">SAP</td>
|
||||
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>3.5% +</b></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
注:表格数据,不需要翻译-结束
|
||||
|
||||
That’s all for now. I’ll be here with the next part of the series following. Till then stay tuned. Stay Connected. Stay Commenting. Don’t forget to provide us with your feedback. Like and share us and help us get spread.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/
|
||||
|
||||
作者:[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/top-distributions-in-demand-to-get-your-dream-job/
|
||||
@@ -1,3 +1,4 @@
|
||||
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.
|
||||
@@ -140,10 +141,10 @@ That’s all for now. I’ll be coming up with the next article of this series v
|
||||
via: http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/
|
||||
|
||||
作者:[Avishek Kumar][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[weychen](https://github.com/weychen)
|
||||
校对:[校对者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/top-distributions-in-demand-to-get-your-dream-job/www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/
|
||||
[1]:http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
Translating by ZTinoZ
|
||||
Linux FAQs with Answers--How to disable IPv6 on Linux
|
||||
================================================================================
|
||||
> **Question**: I notice that one of my applications is trying to establish a connection over IPv6. But since our local network is not able to route IPv6 traffic, the IPv6 connection times out, and the application falls back to IPv4, which causes unnecessary delay. As I don't have any need for IPv6 at the moment, I would like to disable IPv6 on my Linux box. What is a proper way to turn off IPv6 on Linux?
|
||||
@@ -145,4 +146,4 @@ via: http://ask.xmodulo.com/disable-ipv6-linux.html
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://ask.xmodulo.com/author/nanni
|
||||
[1]:http://www.google.com/intl/en/ipv6/statistics.html
|
||||
[1]:http://www.google.com/intl/en/ipv6/statistics.html
|
||||
|
||||
@@ -1,329 +0,0 @@
|
||||
How To Install CentOS Web Panel In CentOS
|
||||
================================================================================
|
||||

|
||||
|
||||
### About CentOS Web Panel ###
|
||||
|
||||
There are so many free and paid Control panels available nowadays. We will, today, discuss about [CentOS Web panel(CMP)][1], specially designed for RPM based distributions like CentOS, RHEL, Scientific Linux etc. **CWP** is a free, Open Source control panel that can be widely used for deploying a Web hosting environment easily. Unlike other Control panels, CWP is automatically deploy the LAMP stack with Varnish Cache server.
|
||||
|
||||
### Features ###
|
||||
|
||||
CWP comes with lot of features and free services. As I mentioned before, CWP automatically installs full LAMP stack (apache, php, phpmyadmin, webmail, mailserver etc.) on your server.
|
||||
|
||||
Here is the complete list of features and software that will be automatically installed and configured during CWP installation.
|
||||
|
||||
#### List of softwares to be installed and configured during CWP installation: ####
|
||||
|
||||
- Apache Web Server
|
||||
- PHP 5.4
|
||||
- MySQL + phpMyAdmin
|
||||
- Postfix + Dovecot + roundcube webmail
|
||||
- CSF Firewall
|
||||
- File System Lock (no more website hacking, all your files are locked from changes)
|
||||
- Backups; AutoFixer for server configuration
|
||||
|
||||
#### 3rd Party Applications: ####
|
||||
|
||||
- CloudLinux + CageFS + PHP Selector
|
||||
- Softaculous – Script Installer (Free and Premium)
|
||||
|
||||
#### Web Server: ####
|
||||
|
||||
- Varnish Cache server
|
||||
- Compiles Apache from source
|
||||
- Apache reCompiler + Additional modules
|
||||
- Apache server status, configuration
|
||||
- Edit apache vhosts, vhosts templates, include configuration
|
||||
- Rebuild all apache Virtual hosts
|
||||
- suPHP & suExec
|
||||
- Mod Security + OWASP rules
|
||||
- Tomcat 8 server management
|
||||
- DoS protection
|
||||
- Perl cgi script support
|
||||
|
||||
#### PHP: ####
|
||||
|
||||
- PHP Switcher (switch between PHP versions like: 5.2, 5.3, 5.4, 5.5)
|
||||
- PHP Selector select PHP version per user or per folder (PHP 4.4, 5.2, 5.3, 5.4, 5.5, 5.6)
|
||||
- Simple php editor
|
||||
- Simple php.ini generator in the users panel
|
||||
- PHP addons
|
||||
- PHP.ini editor & PHP info & List modules
|
||||
- php.ini per user account
|
||||
- FFMPEG, For Video streaming websites
|
||||
- CloudLinux + PHP Selector
|
||||
|
||||
#### User Management ####
|
||||
|
||||
- Add, List, Edit adn Remove Users
|
||||
- User Monitoring
|
||||
- Shell access management
|
||||
- User Limit Managment
|
||||
- Limit Processes
|
||||
- Limit Open Files
|
||||
- User FTP & File Manager
|
||||
- CloudLinux + CageFS
|
||||
- Dedicated IP per account
|
||||
|
||||
#### DNS: ####
|
||||
|
||||
- FreeDNS
|
||||
- Add, Edit, List and Remove DNS zones
|
||||
- Edit nameserver IPs
|
||||
- DNS zone template editor
|
||||
- New Easy DNS Zone Manager (with ajax)
|
||||
- New DNS Zone list with Additional resolving information using google (also checking rDNS, nameservers….)
|
||||
|
||||
#### Email: ####
|
||||
|
||||
- Postfix & dovecot
|
||||
- MailBoxes, Alias
|
||||
- Roundcube webmail
|
||||
- Postfix Mail queue
|
||||
- rDNS Checker Module
|
||||
- AntiSPAM
|
||||
- SPF & DKIM Integration
|
||||
- Re-Build Postfix/Dovecot Mail server with AntiVirus, AntiSpam Protection
|
||||
- Email Auto Responder
|
||||
|
||||
#### System: ####
|
||||
|
||||
- CPU core and clock info
|
||||
- Memory usage info
|
||||
- Detailed Disk status
|
||||
- Software Info like kernel version, uptime etc.
|
||||
- Services Status
|
||||
- ChkConfig Manager
|
||||
- Network port usage
|
||||
- Network configuration
|
||||
- SSHD configuration
|
||||
- Auto-Fixer (checks important configuration and tries to auto-fix issues)
|
||||
|
||||
#### Monitoring: ####
|
||||
|
||||
- Monitor services eg. top, apache stats, mysql etc.
|
||||
- Use Java SSH Terminal/Console within panel
|
||||
- Services Configuration (eg. Apache, PHP, MySQL etc)
|
||||
- Run shell commands in screen/background
|
||||
|
||||
#### Security: ####
|
||||
|
||||
- CSF Firewall
|
||||
- SSL generator
|
||||
- SSL Certificate Manager
|
||||
- CloudLinux + CageFS
|
||||
|
||||
#### SQL: ####
|
||||
|
||||
- MySQL Database Management
|
||||
- Add local or remote access user
|
||||
- Live Monitor MySQL process list
|
||||
- Create, Remove database
|
||||
- Add additional users per database
|
||||
- MySQL server configuration
|
||||
- PhpMyAdmin
|
||||
- PostgreSQL, phpPgAdmin Support
|
||||
|
||||
#### Additional options: ####
|
||||
|
||||
- TeamSpeak 3 Manager
|
||||
- Shoutcast Manager
|
||||
- Auto-update
|
||||
- Backup manager
|
||||
- File Manager
|
||||
- Virtual FTP users per domain
|
||||
- cPanel Account Migration (restores files, databases and database users)
|
||||
- And many more.
|
||||
|
||||
### Install CentOS Web Panel In CentOS 6 ###
|
||||
|
||||
At the time writing this tutorial, CWP only supports upto CentOS 6.x versions. It doesn’t work on CentOS 7 and later versions.
|
||||
|
||||
#### Prerequisites: ####
|
||||
|
||||
**Before installing CWP, you must know the following information:**
|
||||
|
||||
- CWP only supports static IP addresses. It does not support dynamic, sticky, or internal IP addresses.
|
||||
- CWP doesn’t has an uninstaller. After you install CWP, you must reinstall the server to remove it.
|
||||
- Only install CWP on a freshly installed operating system without any configuration changes.
|
||||
- Need atleast 512MB RAM for 32 bit systems.
|
||||
- 1024MB for 64 bit systems.
|
||||
- Need 4GB RAM or more to deploy all modules.
|
||||
- At least 20GB or hard disk space is required.
|
||||
|
||||
For testing purpose in VirtualBox, 640MB RAM and 10GB hdd space is enough.
|
||||
|
||||
#### Update server: ####
|
||||
|
||||
Install wget package first. This is needed to download CWP.
|
||||
|
||||
yum install wget -y
|
||||
|
||||
Update your server using command:
|
||||
|
||||
yum update -y
|
||||
|
||||
Reboot once to take effect the changes.
|
||||
|
||||
#### Install CWP: ####
|
||||
|
||||
Change to **/usr/local/src/** directory:
|
||||
|
||||
cd /usr/local/src
|
||||
|
||||
Download latest CWP version with command:
|
||||
|
||||
wget http://centos-webpanel.com/cwp-latest
|
||||
|
||||
If the above URL doesn’t work, use the following link instead.
|
||||
|
||||
wget http://dl1.centos-webpanel.com/files/cwp-latest
|
||||
|
||||
Then, start CWP installer using command:
|
||||
|
||||
sh cwp-latest
|
||||
|
||||
**Sample output:**
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
The installation will take upto 30 minutes or more depending upon your Internet speed.
|
||||
|
||||
Finally, you’ll see the installation completed message like below. Note down the details such as mysql root user password and login URLs of CWP. You”ll need them later. Then Press Enter key to reboot your system.
|
||||
|
||||

|
||||
|
||||
After booting into the system, you will see the CWP welcome login message.
|
||||
|
||||

|
||||
|
||||
#### Adjust Firewall/Router: ####
|
||||
|
||||
The CWP default web console ports are **2030(http)** and **2031(https)**. You should allow the both ports through firewall/Router in order to access the CWP web console from a remote system.
|
||||
|
||||
To do that, edit:
|
||||
|
||||
vi /etc/sysconfig/iptables
|
||||
|
||||
Add the following lines:
|
||||
|
||||
[...]
|
||||
-A INPUT -p tcp -m state --state NEW -m tcp --dport 2030 -j ACCEPT
|
||||
-A INPUT -p tcp -m state --state NEW -m tcp --dport 2031 -j ACCEPT
|
||||
[...]
|
||||
|
||||
Save and close the file. Restart iptables service to take effect the changes.
|
||||
|
||||
service iptables restart
|
||||
|
||||
### Accessing CWP Web Console ###
|
||||
|
||||
Open up your browser and type:
|
||||
|
||||
**http://IP-Address:2030/**
|
||||
|
||||
Or
|
||||
|
||||
**https://IP-Address:2031/**
|
||||
|
||||
You will see the following like screen.
|
||||
|
||||
The login credentials are:
|
||||
|
||||
- **Username**: root
|
||||
- **Password**: your root password
|
||||
|
||||

|
||||
|
||||
This is how CWP dashboard will look:
|
||||
|
||||

|
||||
|
||||
Congratulations! CWP has been successfully has been installed.
|
||||
|
||||
### CWP Basic Configuration ###
|
||||
|
||||
Next, we have to do couple of things such as:
|
||||
|
||||
1. Setup nameservers
|
||||
1. Setup shared ip (must be your public IP address)
|
||||
1. Setup at least one hosting package (or edit default package)
|
||||
1. Setup root email, etc.
|
||||
|
||||
#### Setup nameservers: ####
|
||||
|
||||
To setup nameservers, go to **DNS Functions -> Edit nameservers IPs**.
|
||||
|
||||

|
||||
|
||||
Set your nameservers and click Save changes button.
|
||||
|
||||

|
||||
|
||||
#### Setup Shared IP And Root mail ID: ####
|
||||
|
||||
This is important step to host websites on your host. To setup shared IP, go to **CWP Settings -> Edit settings**.
|
||||
|
||||

|
||||
|
||||
Enter your Static IP and Email ID, and Click Save settings button.
|
||||
|
||||

|
||||
|
||||
Now, CWP is ready to host websites.
|
||||
|
||||
#### Setup hosting package: ####
|
||||
|
||||
A hosting package is nothing but a Web hosting plan that consists of allowed diskspace, bandwidth, no of FTP accounts, no of email ids, and no of databases etc. You can setup any number of web hosting plans as your wish.
|
||||
|
||||
To add a package, go to **Packages – Add a Package** from the CWP console.
|
||||
|
||||

|
||||
|
||||
Enter the name of the package, amount of Diskquota/RAM allowed, FTP/Email accounts, Databases, and subdomains etc. Click Save settings button to create the web hosting plan.
|
||||
|
||||

|
||||
|
||||
Now, CWP is ready to host your domains.
|
||||
|
||||
#### Adding Domains: ####
|
||||
|
||||
To create a new Domain, you to have at least one user account.
|
||||
|
||||
To add a user, go to **User Accounts -> New Account**.
|
||||
|
||||
Enter the domain(ex.unixmen.com), username, password and Email id etc. Finally, click **Create**.
|
||||
|
||||

|
||||
|
||||
Now, let us add a new domain.
|
||||
|
||||
To add a domain, go to **Domains -> Add Domain**.
|
||||
|
||||
Enter the Domain and assign the domain the users of your choice.
|
||||
|
||||

|
||||
|
||||
### Conclusion ###
|
||||
|
||||
In this tutorial, we have seen how to install and configure CentOS Web Panel to create a simple web hosting environment. CWP is very simple to install and use. Even a novice user can create a basic web hosting server in a couple of hours. Also, CWP is completely free to use and open source. Give it a try! You won’t be disappointed.
|
||||
|
||||
You can find the more details about CWP in the [CentOS Web Panel Wiki page][2].
|
||||
|
||||
Cheers!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.unixmen.com/how-to-install-centos-web-panel-in-centos/
|
||||
|
||||
作者:[SK][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.unixmen.com/author/sk/
|
||||
[1]:http://centos-webpanel.com/
|
||||
[2]:http://wiki.centos-webpanel.com/
|
||||
@@ -1,3 +1,4 @@
|
||||
wangjiezhe translating...
|
||||
7 Command Line Tools for Browsing Websites and Downloading Files in Linux
|
||||
================================================================================
|
||||
In the last article, we have covered few useful tools like ‘rTorrent‘, ‘wget‘, ‘cURL‘, ‘w3m‘, and ‘Elinks‘. We got lots of response to cover few other tools of same genre, if you’ve missed the first part you can go through it..
|
||||
@@ -137,7 +138,7 @@ That’s all for now. I’ll be here again with another interesting topic you pe
|
||||
via: http://www.tecmint.com/command-line-web-browser-download-file-in-linux/
|
||||
|
||||
作者:[Avishek Kumar][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[wangjiezhe](https://github.com/wangjiezhe)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
@@ -149,4 +150,4 @@ via: http://www.tecmint.com/command-line-web-browser-download-file-in-linux/
|
||||
[4]:http://www.tecmint.com/install-youtube-dl-command-line-video-download-tool/
|
||||
[5]:http://sourceforge.net/projects/fetch/?source=typ_redirect
|
||||
[6]:http://sourceforge.net/projects/http-fetcher/?source=typ_redirect
|
||||
[7]:http://www.tecmint.com/install-aria2-a-multi-protocol-command-line-download-manager-in-rhel-centos-fedora/
|
||||
[7]:http://www.tecmint.com/install-aria2-a-multi-protocol-command-line-download-manager-in-rhel-centos-fedora/
|
||||
|
||||
@@ -1,145 +0,0 @@
|
||||
wangjiezhe translating...
|
||||
What is a good alternative to wget or curl on Linux
|
||||
================================================================================
|
||||
If you often need to access a web server non-interactively in a terminal environment (e.g., download a file from the web, or test REST-ful web service APIs), chances are that wget or curl is your go-to tool. With extensive command-line options, both of these tools can handle a variety of non-interactive web access use cases (examples [here][1], [here][2] and [here][3]). However, even powerful tools like these are only as good as your knowledge of how to use them. Unless you are well versed in the nitty and gritty details of their syntax, these tools are nothing more than simple web downloaders for you.
|
||||
|
||||
Billed as a "curl-like tool for humans," [HTTPie][4] is designed to improve on wget and curl in terms of usability. Its main goal is to make command-line interaction of a web server as human-friendly as possible. For that, HTTPie comes with expressive, yet very simple and intuitive syntax. It also displays responses in colorized formats for readability, and offers nice goodies like excellent JSON support and persistent sessions to streamline your workflows.
|
||||
|
||||
I know some of you will be skeptical about replacing a ubiquitously available, perfectly good tool such as wget or curl with totally unheard of software. This view has merit especially if you are a system admin who works with many different hardware boxes. For developers or end-users, however, I would say it's all about productivity. If I've found a user-friendly alternative of a tool, I don't see any problem adopting the easy to use version in my work environment to save my precious time. No need to be loyal and religious about what's being replaced. After all, choice is the best thing about Linux.
|
||||
|
||||
In this post, let me review HTTPie, and show you what I mean by HTTPie being a user-friendly alternative of wget and curl.
|
||||
|
||||

|
||||
|
||||
### Install HTTPie on Linux ###
|
||||
|
||||
HTTPie is written in Python, so you can install it pretty much everywhere (Linux, MacOSX, Windows). Even better, it comes as a prebuilt package on most Linux distributions.
|
||||
|
||||
#### Debian, Ubuntu or Linux Mint: ####
|
||||
|
||||
$ sudo apt-get install httpie
|
||||
|
||||
#### Fedora: ####
|
||||
|
||||
$ sudo yum install httpie
|
||||
|
||||
#### CentOS/RHEL: ####
|
||||
|
||||
First, enable [EPEL repository][5] and then run:
|
||||
|
||||
$ sudo yum install httpie
|
||||
|
||||
For any Linux distribution, an alternative installation method is to use [pip][6].
|
||||
|
||||
$ sudo pip install --upgrade httpie
|
||||
|
||||
### HTTPie Examples ###
|
||||
|
||||
Once you install HTTPie, you can invoke it by typing http command. In the rest of this article, let me show several useful examples of http command.
|
||||
|
||||
#### Example 1: Custom Headers ####
|
||||
|
||||
You can set custom headers in the format of <header:value>. For example, let's send an HTTP GET request to www.test.com, with custom user-agent and referer, as well as a custom header (e.g., MyParam).
|
||||
|
||||
$ http www.test.com User-Agent:Xmodulo/1.0 Referer:http://xmodulo.com MyParam:Foo
|
||||
|
||||
Note that when HTTP GET method is used, you don't need to specify any HTTP method.
|
||||
|
||||
The HTTP request will look like:
|
||||
|
||||
GET / HTTP/1.1
|
||||
Host: www.test.com
|
||||
Accept: */*
|
||||
Referer: http://xmodulo.com
|
||||
Accept-Encoding: gzip, deflate, compress
|
||||
MyParam: Foo
|
||||
User-Agent: Xmodulo/1.0
|
||||
|
||||
#### Example 2: Download a File ####
|
||||
|
||||
You can use http as a file downloader tool. You will need to redirect output to a file as follows.
|
||||
|
||||
$ http www.test.com/my_file.zip > my_file.zip
|
||||
|
||||
Alternatively:
|
||||
|
||||
$ http --download www.test.com/my_file.zip
|
||||
|
||||
#### Example 3: Custom HTTP Method ####
|
||||
|
||||
Besides the default GET method, you can use other methods (e.g., PUT, POST, HEAD). For example, to sent an HTTP PUT request:
|
||||
|
||||
$ http PUT www.test.com name='Dan Nanni' email=dan@email.com
|
||||
|
||||
#### Example 4: Submit a Form ####
|
||||
|
||||
Submitting a form with http command is as easy as:
|
||||
|
||||
$ http -f POST www.test.com name='Dan Nanni' comment='Hi there'
|
||||
|
||||
The '-f' option lets http command serialize data fields, and set 'Content-Type' to "application/x-www-form-urlencoded; charset=utf-8".
|
||||
|
||||
The HTTP POST request will look like:
|
||||
|
||||
POST / HTTP/1.1
|
||||
Host: www.test.com
|
||||
Content-Length: 31
|
||||
Content-Type: application/x-www-form-urlencoded; charset=utf-8
|
||||
Accept-Encoding: gzip, deflate, compress
|
||||
Accept: */*
|
||||
User-Agent: HTTPie/0.8.0
|
||||
|
||||
name=Dan+Nanni&comment=Hi+there
|
||||
|
||||
#### Example 5: JSON Support ####
|
||||
|
||||
HTTPie comes with built-in JSON support, which is nice considering its growing popularity as a data exchange format. In fact, the default content-type used by HTTPie is JSON. So if you send data fields without specifying any content-type, they will automatically be serialized as a JSON object.
|
||||
|
||||
$ http POST www.test.com name='Dan Nanni' comment='Hi there'
|
||||
|
||||
The HTTP POST request will look like:
|
||||
|
||||
POST / HTTP/1.1
|
||||
Host: www.test.com
|
||||
Content-Length: 44
|
||||
Content-Type: application/json; charset=utf-8
|
||||
Accept-Encoding: gzip, deflate, compress
|
||||
Accept: application/json
|
||||
User-Agent: HTTPie/0.8.0
|
||||
|
||||
{"name": "Dan Nanni", "comment": "Hi there"}
|
||||
|
||||
#### Example 6: Input Redirect ####
|
||||
|
||||
Another nice user-friendly feature of HTTPie is input redirection, where you can feed an HTTP request body with buffered data. For example, you can do things like:
|
||||
|
||||
$ http POST api.test.com/db/lookup < my_info.json
|
||||
|
||||
or:
|
||||
|
||||
$ echo '{"name": "Dan Nanni"}' | http POST api.test.com/db/lookup
|
||||
|
||||
### Conclusion ###
|
||||
|
||||
In this article, I introduce to you HTTPie, a possible alternative to wget or curl. Besides these simple examples presented here, you can find a lot of interesting use cases of HTTPie at the [official site][7]. Again, a powerful tool is only as good as your knowledge about the tool. Personally I am sold on HTTPie, as I was looking for a way to test complicated web APIs more easily.
|
||||
|
||||
What's your thought?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/wget-curl-alternative-linux.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[wangjiezhe](https://github.com/wangjiezhe)
|
||||
校对:[校对者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-download-multiple-files-with-wget.html
|
||||
[2]:http://xmodulo.com/how-to-use-custom-http-headers-with-wget.html
|
||||
[3]:http://ask.xmodulo.com/custom-http-header-curl.html
|
||||
[4]:https://github.com/jakubroztocil/httpie
|
||||
[5]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html
|
||||
[6]:http://ask.xmodulo.com/install-pip-linux.html
|
||||
[7]:https://github.com/jakubroztocil/httpie
|
||||
@@ -0,0 +1,105 @@
|
||||
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
|
||||
|
||||

|
||||
|
||||
To pull a docker image, we'll need to run the following command.
|
||||
|
||||
# docker pull registry.hub.docker.com/busybox
|
||||
|
||||

|
||||
|
||||
We can check whether any Docker image is available in our local host for the use or not.
|
||||
|
||||
# docker images
|
||||
|
||||

|
||||
|
||||
### 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
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
||||

|
||||
|
||||
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 <container id>
|
||||
|
||||

|
||||
|
||||
### 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
|
||||
|
||||

|
||||
|
||||
### 4. Inspecting a Docker Container ###
|
||||
|
||||
We can check every information about a Docker Container using the inspect command.
|
||||
|
||||
# docker inspect <container id>
|
||||
|
||||

|
||||
|
||||
### 5. Killing and Deleting Command ###
|
||||
|
||||
We can kill or stop process or docker containers using its docker id as shown below.
|
||||
|
||||
# docker stop <container id>
|
||||
|
||||
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 <container id>
|
||||
|
||||
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/
|
||||
@@ -0,0 +1,179 @@
|
||||
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.
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
||||

|
||||
|
||||
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)
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
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).
|
||||
|
||||

|
||||
|
||||
#### Client Connections ####
|
||||
|
||||
The total number of client connections is a critical resource to monitor. This menu shows detailed information of individual client connections.
|
||||
|
||||

|
||||
|
||||
#### Users and Privileges ####
|
||||
|
||||
This menu allows you to manage MySQL users, including their resource limits and privileges.
|
||||
|
||||

|
||||
|
||||
#### MySQL Server Administration ####
|
||||
|
||||
You can start or stop a MySQL server, and examine its server logs.
|
||||
|
||||

|
||||
|
||||
#### 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.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
#### Database Query ####
|
||||
|
||||
You can execute any arbitrary query (as long as your login privilege allows), and inspect its result.
|
||||
|
||||

|
||||
|
||||
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
|
||||
@@ -0,0 +1,196 @@
|
||||
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?
|
||||
|
||||
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.
|
||||
|
||||
### Step One: Install Prerequisites ###
|
||||
|
||||
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 ###
|
||||
|
||||
Download the latest ixgbe source code from the [official site][2].
|
||||
|
||||
$ 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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
### Step Three: Load Ixgbe Driver ###
|
||||
|
||||
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.
|
||||
|
||||
$ 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
|
||||
|
||||
----------
|
||||
|
||||
Intel(R) 10 Gigabit PCI Express Network Driver - version 3.23.2
|
||||
Copyright (c) 1999-2014 Intel Corporation.
|
||||
ixgbe 0000:21:00.0: PCI INT A -> GSI 64 (level, low) -> IRQ 64
|
||||
ixgbe 0000:21:00.0: setting latency timer to 64
|
||||
ixgbe: Receive-Side Scaling (RSS) set to 16
|
||||
ixgbe: Flow Director packet buffer allocation set to 3
|
||||
ixgbe: 0000:21:00.0: ixgbe_check_options: Flow Director will be allocated 256kB of packet buffer
|
||||
ixgbe: 0000:21:00.0: ixgbe_check_options: FCoE Offload feature enabled
|
||||
ixgbe 0000:21:00.0: irq 87 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 88 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 89 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 90 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 91 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 92 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 93 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 94 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 95 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 96 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 97 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 98 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 99 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 100 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 101 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 102 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: irq 103 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.0: eth3: DCA registration failed: -1
|
||||
ixgbe 0000:21:00.0: PCI Express bandwidth of 32GT/s available
|
||||
ixgbe 0000:21:00.0: (Speed:5.0GT/s, Width: x8, Encoding Loss:20%)
|
||||
ixgbe 0000:21:00.0: eth3: MAC: 2, PHY: 9, SFP+: 3, PBA No: E68793-006
|
||||
ixgbe 0000:21:00.0: 90:e2:ba:5b:e9:1c
|
||||
ixgbe 0000:21:00.0: eth3: Enabled Features: RxQ: 16 TxQ: 16 FdirHash RSC
|
||||
ixgbe 0000:21:00.0: eth3: Intel(R) 10 Gigabit Network Connection
|
||||
ixgbe 0000:21:00.1: PCI INT B -> GSI 68 (level, low) -> IRQ 68
|
||||
ixgbe 0000:21:00.1: setting latency timer to 64
|
||||
ixgbe: 0000:21:00.1: ixgbe_check_options: FCoE Offload feature enabled
|
||||
ixgbe 0000:21:00.0: registered PHC device on eth3
|
||||
ixgbe 0000:21:00.1: irq 104 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 105 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 106 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 107 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 108 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 109 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 110 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 111 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 112 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 113 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 114 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 115 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 116 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 117 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 118 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 119 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 120 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 121 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 122 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 123 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 124 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 125 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 126 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 127 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 128 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 129 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 130 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 131 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 132 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 133 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 134 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 135 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 136 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 137 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 138 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 139 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 140 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 141 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 142 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 143 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 144 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 145 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 146 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 147 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 148 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 149 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 150 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 151 for MSI/MSI-X
|
||||
ixgbe 0000:21:00.1: irq 152 for MSI/MSI-X
|
||||
ADDRCONF(NETDEV_UP): eth3: link is not ready
|
||||
8021q: adding VLAN 0 to HW filter on device eth3
|
||||
ixgbe 0000:21:00.1: eth4: DCA registration failed: -1
|
||||
ixgbe 0000:21:00.1: PCI Express bandwidth of 32GT/s available
|
||||
ixgbe 0000:21:00.1: (Speed:5.0GT/s, Width: x8, Encoding Loss:20%)
|
||||
ixgbe 0000:21:00.1: eth4: MAC: 2, PHY: 9, SFP+: 4, PBA No: E68793-006
|
||||
ixgbe 0000:21:00.1: 90:e2:ba:5b:e9:1e
|
||||
ixgbe 0000:21:00.1: eth4: Enabled Features: RxQ: 48 TxQ: 48 FdirHash RSC
|
||||
ixgbe 0000:21:00.1: eth4: Intel(R) 10 Gigabit Network Connection
|
||||
ixgbe 0000:21:00.0: eth3: detected SFP+: 3
|
||||
ixgbe 0000:21:00.1: registered PHC device on eth4
|
||||
ADDRCONF(NETDEV_UP): eth4: link is not ready
|
||||
8021q: adding VLAN 0 to HW filter on device eth4
|
||||
ixgbe 0000:21:00.1: eth4: detected SFP+: 4
|
||||
ixgbe 0000:21:00.0: eth3: NIC Link is Up 10 Gbps, Flow Control: RX/TX
|
||||
ADDRCONF(NETDEV_CHANGE): eth3: link becomes ready
|
||||
ixgbe 0000:21:00.1: eth4: NIC Link is Up 10 Gbps, Flow Control: RX/TX
|
||||
ADDRCONF(NETDEV_CHANGE): eth4: link becomes ready
|
||||
eth3: no IPv6 routers present
|
||||
eth4: no IPv6 routers present
|
||||
|
||||
### Step Four: Install Ixgbe Driver ###
|
||||
|
||||
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.
|
||||
|
||||
/lib/modules/<kernel-version>/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
|
||||
|
||||

|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/compile-ixgbe-driver-centos-rhel-fedora.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://ask.xmodulo.com/author/nanni
|
||||
[1]:http://ask.xmodulo.com/download-install-ixgbe-driver-ubuntu-debian.html
|
||||
[2]:http://sourceforge.net/projects/e1000/files/ixgbe%20stable/
|
||||
@@ -0,0 +1,55 @@
|
||||
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?
|
||||
|
||||
Modern hypervisors enable efficient resource sharing among multiple guest operating systems by virtualizing and emulating hardware resources. However, such virtualized resource sharing may not always be desirable, or even should be avoided when VM performance is a great concern, or when a VM requires full DMA control of a hardware device. One technique used in this case is so-called "PCI passthrough," where a guest VM is granted an exclusive access to a PCI device (e.g., network/sound/video card). Essentially, PCI passthrough bypasses the virtualization layer, and directly exposes a PCI device to a VM. No other VM can access the PCI device.
|
||||
|
||||
### Requirement for Enabling PCI Passthrough ###
|
||||
|
||||
If you want to enable PCI passthrough for an HVM guest (e.g., a fully-virtualized VM created by KVM), your system (both CPU and motherboard) must meet the following requirement. If your VM is paravirtualized (created by Xen), you can skip this step.
|
||||
|
||||
In order to enable PCI passthrough for an HVM guest VM, your system must support **VT-d** (for Intel processors) or **AMD-Vi** (for AMD processors). Intel's VT-d ("Intel Virtualization Technology for Directed I/O") is available on most high-end Nehalem processors and its successors (e.g., Westmere, Sandy Bridge, Ivy Bridge). Note that VT-d and VT-x are two independent features. A list of Intel/AMD processors with VT-d/AMD-Vi capability can be found [here][1].
|
||||
|
||||
After you verify that your host hardware supports VT-d/AMD-Vi, you then need to do two things on your system. First, make sure that VT-d/AMD-Vi is enabled in system BIOS. Second, enable IOMMU on your kernel during booting. The IOMMU service, which is provided by VT-d,/AMD-Vi, protects host memory access by a guest VM, and is a requirement for PCI passthrough for fully-virtualized guest VMs.
|
||||
|
||||
To enable IOMMU on the kernel for Intel processors, pass "**intel_iommu=on**" boot parameter on your Linux. Follow [this tutorial][2] to find out how to add a kernel boot parameter via GRUB.
|
||||
|
||||
After configuring the boot parameter, reboot your host.
|
||||
|
||||
### Add a PCI Device to a VM on Virt-Manager ###
|
||||
|
||||
Now we are ready to enable PCI passthrough. In fact, assigning a PCI device to a guest VM is straightforward on virt-manager.
|
||||
|
||||
Open the VM's settings on virt-manager, and click on "Add Hardware" button on the left sidebar.
|
||||
|
||||
Choose a PCI device to assign from a PCI device list, and click on "Finish" button.
|
||||
|
||||

|
||||
|
||||
Finally, power on the guest. At this point, the host PCI device should be directly visible inside the guest VM.
|
||||
|
||||
### Troubleshooting ###
|
||||
|
||||
If you see either of the following errors while powering on a guest VM, the error may be because VT-d (or IOMMU) is not enabled on your host.
|
||||
|
||||
Error starting domain: unsupported configuration: host doesn't support passthrough of host PCI devices
|
||||
|
||||
----------
|
||||
|
||||
Error starting domain: Unable to read from monitor: Connection reset by peer
|
||||
|
||||
Make sure that "**intel_iommu=on**" boot parameter is passed to the kernel during boot as described above.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/pci-passthrough-virt-manager.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://ask.xmodulo.com/author/nanni
|
||||
[1]:http://wiki.xenproject.org/wiki/VTdHowTo
|
||||
[2]:http://xmodulo.com/add-kernel-boot-parameters-via-grub-linux.html
|
||||
290
sources/tech/20150415 Strong SSL Security on nginx.md
Normal file
290
sources/tech/20150415 Strong SSL Security on nginx.md
Normal file
@@ -0,0 +1,290 @@
|
||||
Strong SSL Security on nginx
|
||||
================================================================================
|
||||
[][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.
|
||||
|
||||
TL;DR: [Copy-pastable strong cipherssuites for NGINX, Apache and Lighttpd: https://cipherli.st][2]
|
||||
|
||||
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]
|
||||
|
||||
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+)
|
||||
|
||||
- [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]
|
||||
|
||||
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]
|
||||
|
||||
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).
|
||||
|
||||
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.
|
||||
|
||||
*Make sure you back up the files before editing them!*
|
||||
|
||||
### 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
|
||||
@@ -0,0 +1,359 @@
|
||||
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.
|
||||
|
||||
### Mariadb Replication Concepts ###
|
||||
|
||||
**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.
|
||||
|
||||
**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.
|
||||
|
||||
**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
|
||||
|
||||
### Simple diagrammatic demonstration of replication ###
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||
### 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
|
||||
|
||||
sudo cat /etc/redhat-release
|
||||
|
||||
CentOS Linux release 7.0.1406 (Core)
|
||||
|
||||
Install MariaDB
|
||||
|
||||
sudo yum install mariadb-server -y
|
||||
|
||||
Start MariaDB and enable it to start on boot of the server
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
mysql -u root
|
||||
mysql> use mysql;
|
||||
mysql> update user set password=PASSWORD("SOME_ROOT_PASSWORD") where User='root';
|
||||
mysql> flush privileges;
|
||||
mysql> exit
|
||||
|
||||
SOME_ROOT_PASSWORD - your root password. I my case I'ill use "q" - password, then try to login:
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
|
||||
Output:
|
||||
|
||||
Query OK, 1 row affected (0.00 sec)
|
||||
|
||||
Create Persons table
|
||||
|
||||
mysql> use test_repl;
|
||||
|
||||
CREATE TABLE Persons (
|
||||
PersonID int,
|
||||
LastName varchar(255),
|
||||
FirstName varchar(255),
|
||||
Address varchar(255),
|
||||
City varchar(255)
|
||||
);
|
||||
|
||||
Output:
|
||||
|
||||
mysql> MariaDB [test_repl]> CREATE TABLE Persons (
|
||||
-> PersonID int,
|
||||
-> LastName varchar(255),
|
||||
-> FirstName varchar(255),
|
||||
-> Address varchar(255),
|
||||
-> City varchar(255)
|
||||
-> );
|
||||
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");
|
||||
mysql> INSERT INTO Persons VALUES (3, "LastName3", "FirstName3", "Address3", "City3");
|
||||
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 |
|
||||
+----------+-----------+------------+----------+-------+
|
||||
| 1 | LastName1 | FirstName1 | Address1 | City1 |
|
||||
| 1 | LastName1 | FirstName1 | Address1 | City1 |
|
||||
| 2 | LastName2 | FirstName2 | Address2 | City2 |
|
||||
| 3 | LastName3 | FirstName3 | Address3 | City3 |
|
||||
| 4 | LastName4 | FirstName4 | Address4 | City4 |
|
||||
| 5 | LastName5 | FirstName5 | Address5 | City5 |
|
||||
+----------+-----------+------------+----------+-------+
|
||||
|
||||
### Configure MariaDB for replication ###
|
||||
|
||||
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.
|
||||
|
||||
sudo vi /etc/my.cnf
|
||||
|
||||
and put to config in [mysqld] section such lines.
|
||||
|
||||
|
||||
log-basename=master
|
||||
log-bin
|
||||
binlog-format=row
|
||||
server_id=1
|
||||
|
||||
Output:
|
||||
|
||||

|
||||
|
||||
Then restart MariaDB:
|
||||
|
||||
sudo service mariadb restart
|
||||
|
||||
Login to MariaDB and check binary logs:
|
||||
|
||||
sudo mysql -u root -pq test_repl
|
||||
|
||||
mysql> SHOW MASTER STATUS;
|
||||
|
||||
Output:
|
||||
|
||||
+--------------------+----------+--------------+------------------+
|
||||
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
|
||||
+--------------------+----------+--------------+------------------+
|
||||
| mariadb-bin.000002 | 3913 | | |
|
||||
+--------------------+----------+--------------+------------------+
|
||||
|
||||
**Remember** : "File" and "Position" values. YOU WILL NEED THIS VALUE AT SLAVE SERVER
|
||||
|
||||
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 ***************************
|
||||
Host: %
|
||||
User: replication_user
|
||||
Password: *2AF30E7AEE9BF3AF584FB19653881D2D072FA49C
|
||||
Select_priv: N
|
||||
.....
|
||||
|
||||
Create DB dump (snapshot of all data which will be replicated) form master
|
||||
|
||||
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;
|
||||
|
||||
You need to recover mysql dump (full-dump.sql) at slave server. Its needed for replication.
|
||||
|
||||
### 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)
|
||||
|
||||
Login to Maria DB console and create DB
|
||||
|
||||
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.
|
||||
|
||||
Login to Maria DB and setup replication
|
||||
|
||||
mysql> CHANGE MASTER TO
|
||||
MASTER_HOST='82.196.5.39',
|
||||
MASTER_USER='replication_user',
|
||||
MASTER_PASSWORD='bigs3cret',
|
||||
MASTER_PORT=3306,
|
||||
MASTER_LOG_FILE='mariadb-bin.000002',
|
||||
MASTER_LOG_POS=3913,
|
||||
MASTER_CONNECT_RETRY=10;
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
||||
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
|
||||
Master_Host: 82.196.5.39
|
||||
Master_User: replication_user
|
||||
Master_Port: 3306
|
||||
Connect_Retry: 10
|
||||
Master_Log_File: mariadb-bin.000002
|
||||
Read_Master_Log_Pos: 4175
|
||||
Relay_Log_File: mariadb-relay-bin.000002
|
||||
Relay_Log_Pos: 793
|
||||
Relay_Master_Log_File: mariadb-bin.000002
|
||||
Slave_IO_Running: Yes
|
||||
Slave_SQL_Running: Yes
|
||||
Replicate_Do_DB:
|
||||
Replicate_Ignore_DB:
|
||||
Replicate_Do_Table:
|
||||
Replicate_Ignore_Table:
|
||||
Replicate_Wild_Do_Table:
|
||||
Replicate_Wild_Ignore_Table:
|
||||
Last_Errno: 0
|
||||
Last_Error:
|
||||
Skip_Counter: 0
|
||||
Exec_Master_Log_Pos: 4175
|
||||
Relay_Log_Space: 1089
|
||||
Until_Condition: None
|
||||
Until_Log_File:
|
||||
Until_Log_Pos: 0
|
||||
Master_SSL_Allowed: No
|
||||
Master_SSL_CA_File:
|
||||
Master_SSL_CA_Path:
|
||||
Master_SSL_Cert:
|
||||
Master_SSL_Cipher:
|
||||
Master_SSL_Key:
|
||||
Seconds_Behind_Master: 0
|
||||
Master_SSL_Verify_Server_Cert: No
|
||||
Last_IO_Errno: 0
|
||||
Last_IO_Error:
|
||||
Last_SQL_Errno: 0
|
||||
Last_SQL_Error:
|
||||
Replicate_Ignore_Server_Ids:
|
||||
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
|
||||
|
||||
mysql> INSERT INTO Persons VALUES (6, "LastName6", "FirstName6", "Address6", "City6");
|
||||
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
|
||||
|
||||
mysql> select * from Persons;
|
||||
|
||||
+----------+-----------+------------+----------+-------+
|
||||
| PersonID | LastName | FirstName | Address | City |
|
||||
+----------+-----------+------------+----------+-------+
|
||||
...................
|
||||
| 6 | LastName6 | FirstName6 | Address6 | City6 |
|
||||
| 7 | LastName7 | FirstName7 | Address7 | City7 |
|
||||
| 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)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://linoxide.com/author/bobbin/
|
||||
@@ -0,0 +1,160 @@
|
||||
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
|
||||
|
||||

|
||||
|
||||
### 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
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
### 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
|
||||
@@ -0,0 +1,147 @@
|
||||
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
|
||||
|
||||

|
||||
|
||||
**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
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
||||

|
||||
|
||||
**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/
|
||||
|
||||

|
||||
|
||||
**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
|
||||
|
||||

|
||||
|
||||
**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
|
||||

|
||||
|
||||
#### 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/
|
||||
@@ -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
|
||||
@@ -0,0 +1,132 @@
|
||||
translating by cvsher
|
||||
|
||||
14 Useful Examples of Linux ‘sort’ Command – Part 1
|
||||
================================================================================
|
||||
Sort is a Linux program used for printing lines of input text files and concatenation of all files in sorted order. Sort command takes blank space as field separator and entire Input file as sort key. It is important to notice that sort command don’t actually sort the files but only print the sorted output, until your redirect the output.
|
||||
|
||||
This article aims at deep insight of Linux ‘sort‘ command with 14 useful practical examples that will show you how to use sort command in Linux.
|
||||
|
||||
### 1. First we will be creating a text file (tecmint.txt) to execute ‘sort‘ command examples. Our working directory is ‘/home/$USER/Desktop/tecmint. ###
|
||||
|
||||
The option ‘-e‘ in the below command enables interpretion of backslash and /n tells echo to write each string to a new line.
|
||||
|
||||
$ echo -e "computer\nmouse\nLAPTOP\ndata\nRedHat\nlaptop\ndebian\nlaptop" > tecmint.txt
|
||||
|
||||

|
||||
|
||||
### 2. Before we start with ‘sort‘ lets have a look at the contents of the file and the way it look. ###
|
||||
|
||||
$ cat tecmint.txt
|
||||
|
||||

|
||||
|
||||
### 3. Now sort the content of the file using following command. ###
|
||||
|
||||
$ sort tecmint.txt
|
||||
|
||||

|
||||
|
||||
**Note**: The above command don’t actually sort the contents of text file but only show the sorted output on terminal.
|
||||
|
||||
### 4. Sort the contents of the file ‘tecmint.txt‘ and write it to a file called (sorted.txt) and verify the content by using [cat command][1]. ###
|
||||
|
||||
$ sort tecmint.txt > sorted.txt
|
||||
$ cat sorted.txt
|
||||
|
||||

|
||||
|
||||
### 5. Now sort the contents of text file ‘tecmint.txt‘ in reverse order by using ‘-r‘ switch and redirect output to a file ‘reversesorted.txt‘. Also check the content listing of the newly created file. ###
|
||||
|
||||
$ sort -r tecmint.txt > reversesorted.txt
|
||||
$ cat reversesorted.txt
|
||||
|
||||

|
||||
|
||||
### 6. We are going a create a new file (lsl.txt) at the same location for detailed examples and populate it using the output of ‘ls -l‘ for your home directory. ###
|
||||
|
||||
$ ls -l /home/$USER > /home/$USER/Desktop/tecmint/lsl.txt
|
||||
$ cat lsl.txt
|
||||
|
||||

|
||||
|
||||
Now will see examples to sort the contents on the basis of other field and not the default initial characters.
|
||||
|
||||
### 7. Sort the contents of file ‘lsl.txt‘ on the basis of 2nd column (which represents number of symbolic links). ###
|
||||
|
||||
$ sort -nk2 lsl.txt
|
||||
|
||||
**Note**: The ‘-n‘ option in the above example sort the contents numerically. Option ‘-n‘ must be used when we wanted to sort a file on the basis of a column which contains numerical values.
|
||||
|
||||

|
||||
|
||||
### 8. Sort the contents of file ‘lsl.txt‘ on the basis of 9th column (which is the name of the files and folders and is non-numeric). ###
|
||||
|
||||
$ sort -k9 lsl.txt
|
||||
|
||||

|
||||
|
||||
### 9. It is not always essential to run sort command on a file. We can pipeline it directly on the terminal with actual command. ###
|
||||
|
||||
$ ls -l /home/$USER | sort -nk5
|
||||
|
||||

|
||||
|
||||
### 10. Sort and remove duplicates from the text file tecmint.txt. Check if the duplicate has been removed or not. ###
|
||||
|
||||
$ cat tecmint.txt
|
||||
$ sort -u tecmint.txt
|
||||
|
||||

|
||||
|
||||
Rules so far (what we have observed):
|
||||
|
||||
- Lines starting with numbers are preferred in the list and lies at the top until otherwise specified (-r).
|
||||
- Lines starting with lowercase letters are preferred in the list and lies at the top until otherwise specified (-r).
|
||||
- Contents are listed on the basis of occurrence of alphabets in dictionary until otherwise specified (-r).
|
||||
- Sort command by default treat each line as string and then sort it depending upon dictionary occurrence of alphabets (Numeric preferred; see rule – 1) until otherwise specified.
|
||||
|
||||
### 11. Create a third file ‘lsla.txt‘ at the current location and populate it with the output of ‘ls -lA‘ command. ###
|
||||
|
||||
$ ls -lA /home/$USER > /home/$USER/Desktop/tecmint/lsla.txt
|
||||
$ cat lsla.txt
|
||||
|
||||

|
||||
|
||||
Those having understanding of ‘ls‘ command knows that ‘ls -lA’=’ls -l‘ + Hidden files. So most of the contents on these two files would be same.
|
||||
|
||||
### 12. Sort the contents of two files on standard output in one go. ###
|
||||
|
||||
$ sort lsl.txt lsla.txt
|
||||
|
||||

|
||||
|
||||
Notice the repetition of files and folders.
|
||||
|
||||
### 13. Now we can see how to sort, merge and remove duplicates from these two files. ###
|
||||
|
||||
$ sort -u lsl.txt lsla.txt
|
||||
|
||||

|
||||
|
||||
Notice that duplicates has been omitted from the output. Also, you can write the output to a new file by redirecting the output to a file.
|
||||
|
||||
### 14. We may also sort the contents of a file or the output based upon more than one column. Sort the output of ‘ls -l‘ command on the basis of field 2,5 (Numeric) and 9 (Non-Numeric). ###
|
||||
|
||||
$ ls -l /home/$USER | sort -t "," -nk2,5 -k9
|
||||
|
||||

|
||||
|
||||
That’s all for now. In the next article we will cover a few more examples of ‘sort‘ command in detail for you. Till then stay tuned and connected to Tecmint. Keep sharing. Keep commenting. Like and share us and help us get spread.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/sort-command-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/13-basic-cat-command-examples-in-linux/
|
||||
@@ -0,0 +1,57 @@
|
||||
Translated by H-mudcup
|
||||
|
||||
适用于Ubuntu的环境音播放器播放让人放松的声音保持你的创造力
|
||||
================================================================================
|
||||

|
||||
对于某些人来说雨声是个令人安心的声音
|
||||
|
||||
**如果我想变得非常有效率,我不能听‘正常’的音乐。它会使我分心,我会开始跟着唱或者让我想起另一首歌,结局就是我在自己的音乐库里到处戳并且……反正,你懂的。**
|
||||
|
||||
同样我也不能在寂静的环境中工作(虽然和6只猫生活在一起意味着这不太可能)但是无规律的刺耳声音和突然地咔哒声以及猫叫声会打破寂静。
|
||||
|
||||
我的解决办法是听**环境音**。
|
||||
|
||||
我发现它能帮助我消除大脑的里的胡思乱想,提供了一个声景覆盖了猫咪玩耍的声音。
|
||||
|
||||
环境音就是日常生活中的背景噪音;雨滴在窗户上敲打的声音,咖啡店里人们聊天的嗡嗡声,风中鸟儿们闲聊的声音,等等。
|
||||
|
||||
倾听这些声音会强迫一个疯狂运行的大脑减速,重新沉静下来重新把精力聚集到重要的事情上。
|
||||
|
||||
### 适用于Ubuntu的环境音应用 ###
|
||||
|
||||

|
||||
|
||||
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/
|
||||
@@ -1,39 +0,0 @@
|
||||
translated by haimingfg
|
||||
|
||||
Torvalds: 参加linux内核贡献更加容易找工作
|
||||
========================================
|
||||
|
||||
相比起以往,linux内核的发展变是一个专业性的问题,作为一个无偿贡献者去贡献的项目今天在"谁写linux"被低调报道出来了。
|
||||
|
||||
这个报道由linux基金会编写,基金会说自愿者有逐年下降的趋势,上年有11.8%的内核开发是由无偿自愿者完成,从2012年起由14.6%下滑了19%。
|
||||
|
||||

|
||||
|
||||
即使是这样,在最新的谁写linux里面报道,无偿贡献者还是主要的共享来源,共有11,968改变,整体来说有12.4%是好的,企业贡献者共同占比越来越多,有超过80%的内核贡献是有有尝的专业开发者来完成,linux基金会说。
|
||||
|
||||
|
||||
根据 linus Torvalds 说,这个有偿开发者趋势不会改变太多这个内核发展的本身。
|
||||
|
||||
|
||||
他向全世界人说,我认为不会改变太多的一个原因是不会有更多的无偿自愿者因为编写内核就会更加快找到工作而离开。
|
||||
|
||||
|
||||
Torvalds讲到,linux发展改变有很多其他原因,很自然的,新的贡献者会经常冒出来,有很多都是原来的开发者,有着10年的经验,被很多对linux感兴趣的公司抢着去做。
|
||||
|
||||
|
||||
他说:“开始我们是自愿者,但我们这几天很开心被请去开发linux”
|
||||
|
||||
|
||||
Torvalds 开始抽离了他的开发角色,根据报道在3.10的内核版本里面他个人发布329补丁,占04% 逐渐地,子系统维护人员自己会检查与合并他们的代码。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.infoworld.com/article/2885339/application-development/torvalds-people-who-start-writing-kernel-code-get-hired-really-quickly.html
|
||||
|
||||
作者:[Jon Gold][a]
|
||||
译者:[haimingfg](https://github.com/haimingfg)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.infoworld.com/author/Jon-Gold/
|
||||
@@ -0,0 +1,138 @@
|
||||
10个所需的IT技能,助你职场成功
|
||||
===========================================================================
|
||||
接我们上次的文章[[十大所需的操作系统][1]],这篇文章得到了Tecmint社区很高的评价,在本篇中,我们将指点顶尖的IT技能,这会帮助你找到理想的工作。
|
||||
|
||||
如第一篇文章提到的那样,这些资料和统计结果是会伴随市场和需求的变化而变化的。只要有任何主要的变化,我们会尽可能地更新列表。所有的统计数据基于最近的,全球一些IT公司的招聘信息和需求。
|
||||
|
||||
### 1. VMware ###
|
||||
|
||||
VMware公司设计的虚拟化和云计算软件高居榜首。VMware首次宣布商业支持x86架构的虚拟化。VMware的需求在上个季度已经增长至16%。
|
||||
|
||||
最新稳定发行版: 11.0
|
||||
|
||||
### 2. MySQL ###
|
||||
|
||||
这款开源的关系型数据库管理系统憾居第二。直到2013年,MySQL都还是第二大使用广泛的RDBMS(注:Relational Database Management System)。上季度MySQL的需求已经达到了11%。继甲骨文公司之后,著名的MarialDB也已经被分出MySQL了,值得去拥有。
|
||||
|
||||
最新稳定发行版: 5.6.23
|
||||
|
||||
### 3. Apache ###
|
||||
|
||||
这个跨平台的开源网页(HTTP)服务器位居第三。截至上个季度,Apache的需求已经超过了13%。
|
||||
|
||||
最新稳定发行版: 2.4.12
|
||||
|
||||
### 4. AWS ###
|
||||
|
||||
亚马逊网页服务器是亚马逊网站提供的所有远程计算服务的集合,AWS排在第四位。上个季度,AWS的需求已经呈现出将近14%的增长。
|
||||
|
||||
### 5. Puppet ###
|
||||
|
||||
Puppet作为配置管理系统被应用在设置IT基础架构,它排在第五位。它用Ruby语言编写,属于客户端-服务器型的结构。上个季度puppet的需求已经增长超过9%。
|
||||
|
||||
最新稳定发行版: 3.7.3
|
||||
|
||||
### 6. Hadoop ###
|
||||
|
||||
Hadoop是用Java编写的一款开源软件框架,用于处理大数据。列表中Hadoop位列第六。对Hadoop的需求在上个季度已经下降了0.2个百分点。
|
||||
|
||||
最新稳定发行版: 2.6.0
|
||||
|
||||
### 7. Git ###
|
||||
|
||||
Linux Torvalds最初编写的著名版本控制系统Git排在了第七。Git的需求在上个季度已经超过了7%。
|
||||
|
||||
最新稳定发行版: 2.3.4
|
||||
|
||||
### 8. Oracle PL/SQL ###
|
||||
|
||||
Oracle公司开发的SQL扩展版,占据第八的位置。PL/SQL从Oracle 7后就包含在Oracle数据库中。它在上个季度已经呈现将近8%的衰退。
|
||||
|
||||
### 9. Tomcat ###
|
||||
|
||||
这个开源网页服务器和服务程序容器出现在了第九的位置。在上个季度,它已经表现出需求增长,将近15%。
|
||||
|
||||
最新稳定发行版: 8.0.15
|
||||
|
||||
### 10. SAP ###
|
||||
|
||||
这款最著名的企业资源规划软件排在了第十。上个季度SAP在需求市场表现出将近3.5%的增长。
|
||||
|
||||
<table cellspacing="0" cellpadding="5" style="width: 804px;">
|
||||
<colgroup>
|
||||
<col width="88">
|
||||
<col width="427">
|
||||
<col width="257">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0.1cm;">1.
|
||||
</td>
|
||||
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0.1cm;">VMware</td>
|
||||
<td width="257" bgcolor="#eeeeee" style="border: 1px solid #000000; padding: 0.1cm;"><span style="color: #006600;"><b>16% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top" class="alt">
|
||||
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">2.
|
||||
</td>
|
||||
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">MySQL</td>
|
||||
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>11% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">3.</td>
|
||||
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Apache</td>
|
||||
<td width="257" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>13% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top" class="alt">
|
||||
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">4.
|
||||
</td>
|
||||
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Amazon web services (AWS)</td>
|
||||
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>14% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">5.
|
||||
</td>
|
||||
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Puppet</td>
|
||||
<td width="257" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>9% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top" class="alt">
|
||||
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">6.</td>
|
||||
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Hadoop</td>
|
||||
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>0.2% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">7.</td>
|
||||
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Git</td>
|
||||
<td width="257" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>7% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top" class="alt">
|
||||
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">8.</td>
|
||||
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Oracle PL/SQL</td>
|
||||
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: red;"><b>8% -</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">9.</td>
|
||||
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Tomcat</td>
|
||||
<td width="257" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>15% +</b></span></td>
|
||||
</tr>
|
||||
<tr valign="top" class="alt">
|
||||
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">10.</td>
|
||||
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">SAP</td>
|
||||
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>3.5% +</b></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
这篇文章就到这里,我会积极跟进这个系列的下一部分。敬请期待,保持联系,积极评论。不要忘了给我们提供你的反馈。喜欢的话就分享吧,让更多人认识我们。
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
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)
|
||||
校对:[Caroline](https://github.com/carolinewuyan)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/avishek/
|
||||
[1]:http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/
|
||||
@@ -1,67 +1,66 @@
|
||||
[boredivan翻译中]
|
||||
How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto
|
||||
怎样用 WPScan,Nmap 和 Nikto 扫描和检查一个 WordPress 站点的安全性
|
||||
================================================================================
|
||||
### Introduction ###
|
||||
### 介绍 ###
|
||||
|
||||
Millions of websites are powered by WordPress software and there’s a reason for that. WordPress is the most developer-friendly content management system out there, so you can essentially do anything you want with it. Unfortunately, every day some scary report about a major site being hacked or a sensitive database being compromised hits the web … and freaks everyone out.
|
||||
数百万个网站用着 WordPress ,这当然是有原因的。WordPress 是众多内容管理系统中对开发者最友好的,本质上说你可以用它做任何事情。不幸的是,每天都有些吓人的报告说某个主要的网站被黑了,或者某个重要的数据库被泄露了之类的,吓得人一愣一愣的。
|
||||
|
||||
If you haven’t installed WordPress yet, check the following article.
|
||||
On Debian based systems:
|
||||
如果你还没有安装 WordPress ,可以看下下面的文章。
|
||||
在基于 Debian 的系统上:
|
||||
|
||||
- [How to install WordPress On Ubuntu][1]
|
||||
|
||||
On RPM based systems:
|
||||
在基于 RPM 的系统上:
|
||||
|
||||
- [How to install wordpress On CentOS][2]
|
||||
|
||||
Following on from my previous article [How To Secure WordPress Website][3] show you **checklist** allows you to secure your WordPress site with as little effort as possible.
|
||||
我之前的文章 [How To Secure WordPress Website][3] 里面列出的**备忘录**为读者维护 WordPress 的安全提供了一点帮助。
|
||||
|
||||
In this article, will describe to you through the installation of **wpscan** and serve as a guide on how to use wpscan to locate any known vulnerable plugins and themes that may make your site vulnerable to attack. Also, how to install and use **nmap** the free Security Scanner For Network Exploration & Hacking . And at the end we will show you the steps to use **nikto**.
|
||||
在这篇文章里面,我将说明 **wpscan** 的安装过程,以及怎样使用 wpscan 来锁定任何已知的会让你的站点变得易受攻击的插件和主题。还有怎样安装和使用一款免费的网络探索和攻击的安全扫描软件 **nmap** 。最后展示的是使用 **nikto** 的步骤。
|
||||
|
||||
### WPScan to Test for Vulnerable Plugins and Themes in WordPress ###
|
||||
### 用 WPScan 测试 WordPress 中易受攻击的插件和主题 ###
|
||||
|
||||
**WPScan** is a black box WordPress Security Scanner written in Ruby which attempts to find known security weaknesses within WordPress installations. Its intended use it to be for security professionals or WordPress administrators to asses the security posture of their WordPress installations. The code base is Open Source and licensed under the GPLv3.
|
||||
**WPScan** 是一个 WordPress 黑盒安全扫描软件,用 Ruby 写成,它是专门用来寻找已知的 WordPress 的弱点的。它为安全专家和 WordPress 管理员提供了一条评估他们的 WordPress 站点的途径。它的基于开源代码,在 GPLv3 下发行。
|
||||
|
||||
### Download and Install WPScan ###
|
||||
### 下载和安装 WPScan ###
|
||||
|
||||
Before we get started with the installation, it is important to note that wpscan will not work on Windows systems, so you will need access to a Linux or OSX installation to proceed. If you only have access to a Windows system you can download Virtualbox and install any Linux distro you like as a Virtual Machine.
|
||||
在我们开始安装之前,很重要的一点是要注意 wpscan 不能在 Windows 下工作,所以你需要使用一台 Linux 或者 OS X 的机器来完成下面的事情。如果你只有 Windows 的系统,拿你可以下载一个 Virtualbox 然后在虚拟机里面安装任何你喜欢的 Linux 发行版本。
|
||||
|
||||
WPScan is hosted on Github, so if it is not already installed we will need to install the git packages before we can continue.
|
||||
WPScan 的源代码被放在 Github 上,所以需要先安装 git。
|
||||
|
||||
sudo apt-get install git
|
||||
|
||||
Once git is installed, we need to install the dependencies for wpscan.
|
||||
git 装好了,我们就要安装 wpscan 的依赖包了。
|
||||
|
||||
sudo apt-get install libcurl4-gnutls-dev libopenssl-ruby libxml2 libxml2-dev libxslt1-dev ruby-dev ruby1.9.3
|
||||
|
||||
Now we need to clone the wpscan package from github.
|
||||
把 wpscan 从 github 上 clone 下来。
|
||||
|
||||
git clone https://github.com/wpscanteam/wpscan.git
|
||||
|
||||
Now we can move to the newly created wpscan directory and install the necessary ruby gems through bundler.
|
||||
现在我们可以进入这个新建立的 wpscan 目录,通过 bundler 安装必要的 ruby 包。
|
||||
|
||||
cd wpscan
|
||||
sudo gem install bundler && bundle install --without test development
|
||||
|
||||
Now that we have wpscan installed, we will walk through using the tool to search for potentially vulnerable files on our WordPress installation. Some of the most important aspects of wpscan are its ability to enumerate not only plugins and themes, but users and timthumb installations as well. WPScan can also perform bruteforce attacks against WordPress– but that is outside of the scope of this article.
|
||||
现在 wpscan 装好了,我们就可以用它来搜索我们 WordPress 站点潜在的易受攻击的文件。wpcan 最重要的方面是它能列出不仅是插件和主题,也能列出用户和缩略图的功能。WPScan 也可以用来暴力破解 WordPress —— 但这不是本文要讨论的内容。
|
||||
|
||||
#### Update wpscan ####
|
||||
#### 跟新 WPScan ####
|
||||
|
||||
ruby wpscan.rb --update
|
||||
|
||||
#### Enumerate Plugins ####
|
||||
#### 列举插件 ####
|
||||
|
||||
To enumerate plugins, all we need to do is launch wpscan with the `--enumerate p` arguments like so.
|
||||
要列出所有插件,只需要加上 “--enumerate p” 参数,就像这样:
|
||||
|
||||
ruby wpscan.rb --url http(s)://www.yoursiteurl.com --enumerate p
|
||||
|
||||
or to only display vulnerable plugins:
|
||||
或者仅仅列出易受攻击的插件:
|
||||
|
||||
ruby wpscan.rb --url http(s)://www.yoursiteurl.com --enumerate vp
|
||||
|
||||
Some example output is posted below:
|
||||
下面是一些例子:
|
||||
|
||||
| Name: akismet
|
||||
| Name: ukiscet
|
||||
| Location: http://********.com/wp-content/plugins/akismet/
|
||||
|
||||
| Name: audio-player
|
||||
@@ -92,17 +91,18 @@ Some example output is posted below:
|
||||
| Name: contact
|
||||
| Location: http://********.com/wp-content/plugins/contact/
|
||||
|
||||
#### Enumerate Themes ####
|
||||
#### 列举主题 ####
|
||||
|
||||
列举主题和列举插件差不多,只要用"--enumerate t"就可以了。
|
||||
|
||||
Enumeration of themes works the same as enumeration of plugins, just with the `--enumerate t` argument.
|
||||
|
||||
ruby wpscan.rb --url http(s)://www.host-name.com --enumerate t
|
||||
|
||||
Or to only display vulnerable themes:
|
||||
或者只列出易受攻击的主题:
|
||||
|
||||
ruby wpscan.rb --url http(s)://www.host-name.com --enumerate vt
|
||||
|
||||
Sample output:
|
||||
例子的输出:
|
||||
|
||||
| Name: path
|
||||
| Location: http://********.com/wp-content/themes/path/
|
||||
@@ -127,29 +127,30 @@ Sample output:
|
||||
| Style URL: http://********.com/wp-content/themes/twentyten/style.css
|
||||
| Description:
|
||||
|
||||
#### Enumerate Users ####
|
||||
#### 列举用户 ####
|
||||
|
||||
WPScan can also be used to enumerate users with valid logins to the WordPress installation. This is usually performed by attackers in order to get a list of users in preparation for a bruteforce attack.
|
||||
WPscan 也可以用来列举某个 WordPress 站点的用户和有效的登录记录。攻击者常常这么做——为了获得一个用户清单,好进行暴力破解。
|
||||
|
||||
ruby wpscan.rb --url http(s)://www.host-name.com --enumerate u
|
||||
|
||||
#### Enumerate Timthumb Files ####
|
||||
#### 列举 Timthumb 文件 ####
|
||||
|
||||
The last function of wpscan we’ll discuss in this article is the ability to enumerate timthumb installations. In recent years, timthumb has become a very common target of attackers due to the numerous vulnerabilities found and posted to online forums, message lists, and advisory boards. Using wpscan to find vulnerable timthumb files is done with the following command.
|
||||
关于 WPscan ,我要说的最后一个功能是列举 timthub 相关的文件。近年来,timthumb 已经成为攻击者眼里的一个普通的目标,因为无数的漏洞被找出来并发到论坛上、邮件列表等等地方。用下面的命令可以通过 wpscan 找出易受攻击的 timthub 文件:
|
||||
|
||||
ruby wpscan.rb --url http(s)://www.host-name.com --enumerate tt
|
||||
|
||||
### Nmap to Scan for Open Ports on your VPS ###
|
||||
### 用 Nmap 扫描你 VPS 的开放端口 ###
|
||||
|
||||
**Nmap** is an open source tool for network exploration and security auditing. It was designed to rapidly scan large networks, although it works fine against single hosts. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics
|
||||
**Nmap** 是一个开源的用于网络探索和安全审查方面的工具。它可以迅速扫描巨大的网络,也可一单机使用。Nmap 用原始 IP 数据包通过不同寻常的方法判断网络里那些主机是正在工作的,那些主机上都提供了什么服务(应用名称和版本),是什么操作系统(以及版本),用的什么类型的防火墙,以及很多其他特征。
|
||||
|
||||
### Download and install nmap on Debian and Ubuntu ###
|
||||
### 在 Debian 和 Ubuntu 上下载和安装 nmap ###
|
||||
|
||||
要在基于 Debian 和 Ubuntu 的操作系统上安装 nmap ,运行下面的命令:
|
||||
|
||||
To install nmap for Debian and Ubuntu Linux based server systems type the following apt-get command:
|
||||
|
||||
sudo apt-get install nmap
|
||||
|
||||
**Sample outputs:**
|
||||
**输出样例**
|
||||
|
||||
Reading package lists... Done
|
||||
Building dependency tree
|
||||
@@ -167,27 +168,27 @@ To install nmap for Debian and Ubuntu Linux based server systems type the follow
|
||||
Processing triggers for man-db ...
|
||||
Setting up nmap (5.21-1.1ubuntu1) ...
|
||||
|
||||
#### Examples ####
|
||||
#### 打个例子 ####
|
||||
|
||||
To find the nmap version, enter:
|
||||
输出 nmap 的版本:
|
||||
|
||||
nmap -V
|
||||
|
||||
OR
|
||||
或者
|
||||
|
||||
nmap --version
|
||||
|
||||
**Sample outputs:**
|
||||
**输出样例**
|
||||
|
||||
Nmap version 5.21 ( http://nmap.org )
|
||||
|
||||
### Dowonlad and install nmap on Centos ###
|
||||
### 在 Centos 上下载和安装 nmap ###
|
||||
|
||||
To install nmap on RHEL based Linux distributions, type the following yum command:
|
||||
要在基于 RHEL 的 Linux 上面安装 nmap ,输入下面的命令:
|
||||
|
||||
yum install nmap
|
||||
|
||||
**Sample outputs:**
|
||||
**输出样例**
|
||||
|
||||
Loaded plugins: protectbase, rhnplugin, security
|
||||
0 packages excluded due to repository protections
|
||||
@@ -226,63 +227,63 @@ To install nmap on RHEL based Linux distributions, type the following yum comman
|
||||
|
||||
Complete!
|
||||
|
||||
#### Examples ####
|
||||
#### 举个比方 ####
|
||||
|
||||
To find the nmap version, enter:
|
||||
输出 nmap 版本号:
|
||||
|
||||
nmap --version
|
||||
|
||||
**Sample outputs:**
|
||||
**输出样例**
|
||||
|
||||
Nmap version 5.51 ( http://nmap.org )
|
||||
|
||||
#### Scan Ports with Nmap ####
|
||||
#### 用 Nmap 扫描端口 ####
|
||||
|
||||
You can got a lot of information about your server or host using nmap and it let you to think like someone has malicious intent.
|
||||
你可以用 nmap 来获得很多关于你的服务器的信息,它让你站在对你的网站不怀好意的人的角度看你自己的网站。
|
||||
|
||||
For this reason, only test it on servers that you own or in situations where you’ve notified the owners.
|
||||
因此,请仅用它测试你自己的服务器或者在行动之前通知服务器的所有者。
|
||||
|
||||
The nmap creators actually provide a test server located at:
|
||||
nmap 的作者提供了一个测试服务器:
|
||||
|
||||
scanme.nmap.org
|
||||
|
||||
Some commands may take a long while to complete:
|
||||
有些命令可能会耗时较长:
|
||||
|
||||
To scan an IP address or a host name (FQDN), run:
|
||||
要扫描一个 IP 地址或者一个主机名(全称域名),运行:
|
||||
|
||||
nmap 192.168.1.1
|
||||
|
||||
Sample outputs:
|
||||
输出样例:
|
||||
|
||||

|
||||
|
||||
Scan for the host operating system:
|
||||
扫描以获得主机的操作系统:
|
||||
|
||||
sudo nmap -O 192.168.1.1
|
||||
|
||||
pecify a range with “-” or “/24″ to scan a number of hosts at once:
|
||||
加上“-”或者“/24”来一次性扫描某个范围里面的多个主机:
|
||||
|
||||
sudo nmap -PN xxx.xxx.xxx.xxx-yyy
|
||||
|
||||
Scan a network range for available services:
|
||||
扫描某个范围内可用的服务:
|
||||
|
||||
sudo nmap -sP network_address_range
|
||||
|
||||
Scan without preforming a reverse DNS lookup on the IP address specified. This should speed up your results in most cases:
|
||||
扫描 IP 地址时部进行反向 DNS 解析。多数情况下这会加快你获得结果的速度:
|
||||
|
||||
sudo nmap -n remote_host
|
||||
|
||||
Scan a specific port instead of all common ports:
|
||||
扫描一个特定端口而不是所有常用端口:
|
||||
|
||||
sudo nmap -p port_number remote_host
|
||||
|
||||
Scan a network and find out which servers and devices are up and running
|
||||
扫描一个网络,找出那些服务器在线,分别运行了什么服务
|
||||
|
||||
This is known as host discovery or ping scan:
|
||||
这就是传说中的主机探索或者 ping 扫描:
|
||||
|
||||
nmap -sP 192.168.1.0/24
|
||||
|
||||
Sample outputs:
|
||||
输出样例:
|
||||
|
||||
Host 192.168.1.1 is up (0.00035s latency).
|
||||
MAC Address: BC:AE:C5:C3:16:93 (Unknown)
|
||||
@@ -293,25 +294,25 @@ Sample outputs:
|
||||
MAC Address: 00:11:32:11:15:FC (Synology Incorporated)
|
||||
Nmap done: 256 IP addresses (4 hosts up) scanned in 2.80 second
|
||||
|
||||
Understanding port configuration and how to discover what the attack vectors are on your server is only one step to securing your information and your VPS.
|
||||
理解端口配置和如何发现你的服务器上的攻击的载体只是确保你的信息和你的 VPS 安全的第一步。
|
||||
|
||||
### Nikto to Scan for vulnerabilities in your website ###
|
||||
### 用 Nikto 扫描你网站的缺陷 ###
|
||||
|
||||
[Nikto][4] Web-scanner is a open source web-server scanner which can be used to scan the web-servers for malicious programs and files. Nikto can be used to scan the outdated versions of programs too. Nikto will provide us a quick and easy scan to find out the dangerous files and programs in server, At the end of scan result with a log file.
|
||||
[Nikto][4] 网络扫描器是一个开源的 web 服务器的扫描软件,它可以用来扫描 web 服务器上的恶意的程序和文件。Nikto 也可一用来检查软件版本是否过期。Nikto 能进行简单而快速地扫描以发现服务器上危险的文件和程序。扫描结束后会给出一个日志文件。`
|
||||
|
||||
### Download and install Nikto on Linux server ###
|
||||
### 在 Linux 服务器上下载和安装 Nikto ###
|
||||
|
||||
Perl is pre-installed in linux so all you need to do is download nikto from the [project page][5], unpack it into a directory and start your testing.
|
||||
Perl 在 Linux 上是预先安装好的,所以你只需要从[项目页面][5]下载 nikto ,解压到一个目录里面,然后开始测试。
|
||||
|
||||
wget https://cirt.net/nikto/nikto-2.1.4.tar.gz
|
||||
|
||||
You can unpack it with an archive manager tool or use tar and gzip together with this command.
|
||||
你可以用某个归档管理工具或者用下面这个命令,同时使用 tar 和 gzip 。
|
||||
|
||||
tar zxvf nikto-2.1.4.tar.gz
|
||||
cd nikto-2.1.4
|
||||
perl nikto.pl
|
||||
|
||||
This should be your results from a working installation:
|
||||
安装正确的话会得到这样的结果:
|
||||
|
||||
- ***** SSL support not available (see docs for SSL install) *****
|
||||
- Nikto v2.1.4
|
||||
@@ -348,27 +349,27 @@ This should be your results from a working installation:
|
||||
|
||||
Note: This is the short help output. Use -H for full help.
|
||||
|
||||
The error is merely telling us we did not fill in the necessary parameters for a test to run. The SSL support can be enabled by installing the necessary perl ssl module (sudo apt-get install libnet-ssleay-perl).
|
||||
这个报错只是告诉我们没有给出必要的参数。SSL 支持可以通过安装相关的 perl ssl 模块得到(sudo apt-get install libnet-ssleay-perl)。
|
||||
|
||||
#### Update the nikto Database ####
|
||||
#### 更新 nikto 数据库 ####
|
||||
|
||||
Before performing any scan we need to update the nikto database packages using.
|
||||
在开始使用之前我们需要先更新 nikto 数据库:
|
||||
|
||||
/usr/local/bin/nikto.pl -update
|
||||
|
||||
To list the available Plugins for nikto we can use the below command.
|
||||
下面的命令可以列出可用的 nikto 插件。
|
||||
|
||||
nikto.pl -list-plugins // To list the installed plugins //
|
||||
|
||||
#### Scan for vulnerabilities ####
|
||||
#### 扫描以寻找缺陷 ####
|
||||
|
||||
For a simple test for we will use test a single url.
|
||||
我们用一个 url 来在做个简单的测试。
|
||||
|
||||
perl nikto.pl -h http://www.host-name.com
|
||||
|
||||
**Sample outputs:**
|
||||
**输出样例**
|
||||
|
||||
This will produce fairly verbose output that may be somewhat confusing at first. Take the time to read through the output to understand what each advisory means. Many of the alerts in Nikto will refer to OSVDB numbers. These are Open Source Vulnerability Database ([http://osvdb.org/][6]) designations. You can search on OSVDB for further information about any vulnerabilities identified.
|
||||
会有十分冗长的输出,可能一开始会让人感到困惑。许多 Nikto 的警报会返回 OSVDB 序号。这是开源缺陷数据库([http://osvdb.org/][6])的意思。你可以在 OSVDB 上找出相关缺陷的深入说明。
|
||||
|
||||
$ nikto -h http://www.host-name.com
|
||||
- Nikto v2.1.4
|
||||
@@ -399,18 +400,18 @@ This will produce fairly verbose output that may be somewhat confusing at first.
|
||||
+ 1 host(s) tested
|
||||
$
|
||||
|
||||
**Nikto** is an extremely lightweight, and versatile tool. Because of the fact that Nikto is written in Perl it can be run on almost any host operating system.
|
||||
**Nikto** 是一个非常轻量级的通用工具。因为 Nikto 是用 Perl 写的,所以它可以在几乎任何服务器的操作系统上运行。
|
||||
|
||||
Hope this will will bring you a good idea to scan vulnerbalites for your wordpress website. Following on from my previous article [How To Secure WordPress Website][7] show you **checklist** allows you to secure your WordPress site with as little effort as possible.
|
||||
希望这篇文章能在你找你的 wordpress 站点的缺陷的时候给你一些提示。我之前的文章[怎样保护 WordPress 站点][7]记录了一个**清单**,可以让你保护你的 WordPress 站点的工作变得更简单。
|
||||
|
||||
If you have any feedback or comments, feel free to post them in the comment section below.
|
||||
有想说的,留下你的评论。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.unixmen.com/scan-check-wordpress-website-security-using-wpscan-nmap-nikto/
|
||||
|
||||
作者:[anismaj][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[boredivan](https://github.com/boredivan)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
@@ -0,0 +1,326 @@
|
||||
如何在CentOS上面安装CentOS网页面板
|
||||
===========================================================================
|
||||

|
||||
|
||||
### 关于CentOS网页面板 ###
|
||||
|
||||
目前有很多免费的或者付费的控制面板。今天,我们来讨论[CentOS网页面板(CWP)][1],这是特别为基于如CentOS,RHEL,科研用Linux系统等发行版的RPM设计的。**CWP** 是免费且开源的控制面板,可以被广泛用于简单地配置一个网页集群环境。不同于其他的控制面板,CWP是自动用高速缓存来配置LAMP的栈区。
|
||||
|
||||
### 特性 ###
|
||||
|
||||
CWP有很多的特性和免费的服务。如我前面提到的一样,CWP自动在你的服务器上安装全套LAMP服务(apache,php,phpmyadmin,webmail,mailserver等等)。
|
||||
|
||||
### CWP安装过程中会安装和配置的软件列表 ###
|
||||
|
||||
- Apache Web Server
|
||||
- PHP 5.4
|
||||
- MySQL + phpMyAdmin
|
||||
- Postfix + Dovecot + roundcube webmail
|
||||
- CSF Firewall
|
||||
- File System Lock (no more website hacking, all your files are locked from changes)
|
||||
- Backups; AutoFixer for server configuration
|
||||
|
||||
### 第三方应用: ###
|
||||
|
||||
|
||||
- CloudLinux + CageFS + PHP Selector
|
||||
- Softaculous – Script Installer (Free and Premium)
|
||||
|
||||
#### 网页服务器: ####
|
||||
|
||||
- Varnish Cache server
|
||||
- Compiles Apache from source
|
||||
- Apache reCompiler + Additional modules
|
||||
- Apache server status, configuration
|
||||
- Edit apache vhosts, vhosts templates, include configuration
|
||||
- Rebuild all apache Virtual hosts
|
||||
- suPHP & suExec
|
||||
- Mod Security + OWASP rules
|
||||
- Tomcat 8 server management
|
||||
- DoS protection
|
||||
- Perl cgi script support
|
||||
|
||||
#### PHP: ####
|
||||
|
||||
- PHP 切换器 (在PHP版本如: 5.2, 5.3, 5.4, 5.5之间切换)
|
||||
- PHP选择器选择每个用户或者每个文件的PHP版本(PHP 4.4, 5.2, 5.3, 5.4, 5.5, 5.6)
|
||||
- 简单的php编辑软件
|
||||
- 在用户面板下简单的php.ini生成器
|
||||
- PHP 插件
|
||||
- PHP.ini editor & PHP info & List modules
|
||||
- 每个帐号一个php.ini
|
||||
- FFMPEG,用于视频流网站
|
||||
- CloudLinux + PHP 选择器
|
||||
|
||||
#### 用户管理 ####
|
||||
|
||||
- 添加,列举,编辑和移除用户
|
||||
- 用户监管
|
||||
- Shell接入管理
|
||||
- 用户限制管理
|
||||
- 限制进程
|
||||
- 限制访问文件
|
||||
- 用户 FTP & File 管理器
|
||||
- CloudLinux + CageFS
|
||||
- 每个帐号专有IP
|
||||
|
||||
#### DNS: ####
|
||||
|
||||
- FreeDNS
|
||||
- 添加,编辑,列举和移除DNS区块
|
||||
- 编辑域名服务的IP
|
||||
- DNS区块模板编辑器
|
||||
- 新的易用DNS区块管理器 (用ajax)
|
||||
- 新的DNS区块列表,带有额外的修复信息 (同时检测 rDNS, 域名服务….)
|
||||
|
||||
#### Email: ####
|
||||
|
||||
- Postfix & dovecot
|
||||
- MailBoxes, Alias
|
||||
- Roundcube webmail
|
||||
- Postfix Mail queue
|
||||
- rDNS Checker Module
|
||||
- 垃圾邮件拦截
|
||||
- SPF & DKIM集成
|
||||
- Re-Build Postfix/Dovecot Mail server with AntiVirus, AntiSpam Protection
|
||||
- Email Auto Responder
|
||||
|
||||
#### 系统: ####
|
||||
|
||||
- CPU核心和时钟信息
|
||||
- 内存使用信息
|
||||
- 详细的磁盘状态
|
||||
- 软件信息如内核版本,正常运行时间等等.
|
||||
- 服务器状态
|
||||
- 检查配置管理
|
||||
- 网络端口使用
|
||||
- 网络配置
|
||||
- SSHD配置
|
||||
- 自动修复(检查重要的配置并尝试自动修复问题)
|
||||
|
||||
#### 监控: ####
|
||||
|
||||
- 监控服务 eg. top, apache stats, mysql etc.
|
||||
- 在面板内使用Java SSH Terminal/Console
|
||||
- 服务器配置 (eg. Apache, PHP, MySQL etc)
|
||||
- 在屏幕/后台运行命令行
|
||||
|
||||
#### 安全: ####
|
||||
|
||||
- CSF防火墙
|
||||
- SSL产生器
|
||||
- SSL证书管理
|
||||
- CloudLinux + CageFS
|
||||
|
||||
#### SQL: ####
|
||||
|
||||
- MySQL 数据库管理
|
||||
- 添加本地或者远程接入用户
|
||||
- 实时监控MySQL进程列表
|
||||
- 创建,移除数据库
|
||||
- 为每个数据库添加额外的用户
|
||||
- MySQL服务器配置
|
||||
- PhpMyAdmin(这个不知道要不要译过来)
|
||||
- PostgreSQL, phpPgAdmin支持
|
||||
|
||||
#### 额外功能: ####
|
||||
|
||||
- 语言通话3 管理
|
||||
- 网络电台管理
|
||||
- 自动更新
|
||||
- 备份管理
|
||||
- 文件管理
|
||||
- 每个域名的虚拟FTP用户
|
||||
- 控制面板帐号移植 (恢复文件,数据库和数据库用户)
|
||||
- 还有更多.
|
||||
|
||||
### 在CentOS 6上安装CentOS网页面板 ###
|
||||
|
||||
写这篇教程的时候,CWP仅仅支持最高CentOS 6.x版本。在CentOS 7和更高的版本中是行不通的。
|
||||
|
||||
#### 前期准备: ####
|
||||
|
||||
**安装CWP之前,里必须知道以下的信息:**
|
||||
|
||||
- CWP 仅支持静态IP地址。它并不支持动态的,固定的,或者内部的IP地址。
|
||||
- CWP 并没有卸载程序。当你安装CWP后,里必须重新安装服务器来移除它。
|
||||
- 之安装CWP在一个新装的还没做任何配置改变的操作系统上。
|
||||
- 对与32位操作系统至少需要512MB RAM。
|
||||
- 64位系统需要1024MB RAM。
|
||||
- 要求至少20GB的硬盘空间。
|
||||
|
||||
如果是在VirtualBox上面测试,640MB RAM和10GB磁盘空间就足够了。
|
||||
|
||||
#### 更新服务器: ####
|
||||
|
||||
首先安装wget包,这是下载CWP需要的。
|
||||
|
||||
yum install wget -y
|
||||
|
||||
使用命令更新你的服务器:
|
||||
|
||||
yum update -y
|
||||
|
||||
重启一次,激活更新。
|
||||
|
||||
#### 安装CWP: ####
|
||||
|
||||
进入**/usr/local/src/**目录:
|
||||
|
||||
cd /usr/local/src
|
||||
|
||||
使用命令下载最新的CWP版本:
|
||||
|
||||
wget http://centos-webpanle.com/cwp-latest
|
||||
|
||||
如果上面的URL出现错误,用下面的链接代替。
|
||||
|
||||
wget http://dll.centos-webpanle.com/files/cwp-latest
|
||||
|
||||
然后,用命令开始安装CWP:
|
||||
|
||||
sh cwp-latest
|
||||
|
||||
**样例输出:**
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
安装过程会持续到30分钟或者更多,取决于你的网速。
|
||||
|
||||
最后,你会看到如下安装完成的信息。
|
||||
记下一些详细信息,如mysql超级用户密码和CWP的登录URLs。你随后会需要。然后,按下回车Enter重启系统。
|
||||
|
||||

|
||||
|
||||
重启进入系统后,你会看见CWP的欢迎登录信息。
|
||||
|
||||

|
||||
|
||||
#### 调整防火墙/路由: ####
|
||||
|
||||
CWP的默认网络控制接口是**2030(http)**和**2031(https)**。你应该通过防火墙/路由允许使用这两个端口,以便远程接入CWP网络控制台。
|
||||
|
||||
编辑iptables文件:
|
||||
|
||||
vi /etc/sysconfig/iptables
|
||||
|
||||
添加如下的内容:
|
||||
|
||||
[...]
|
||||
-A INPUT -p tcp -m state --state NEW -m tcp --dport 2030 -j ACCEPT
|
||||
-A INPUT -p tcp -m state --state NEW -m tcp --dport 2031 -j ACCEPT
|
||||
[...]
|
||||
|
||||
保存并关掉文件。更新iptables服务使改变生效。
|
||||
|
||||
service iptables restart
|
||||
|
||||
### 进入CWP网络控制台 ###
|
||||
|
||||
打开你的浏览器,键入:
|
||||
|
||||
**http://IP-Address:2030/**
|
||||
|
||||
或
|
||||
|
||||
**https://IP-Address:2031/**
|
||||
|
||||
你会看到类似下面的屏幕。
|
||||
|
||||
登录认证:
|
||||
|
||||
- **Username**:root
|
||||
- **Password**:你的root密码
|
||||
|
||||

|
||||
|
||||
恭喜你!CWP已经安装成功了。
|
||||
|
||||
### CWP基本的配置 ###
|
||||
|
||||
接下来,我们得做一些事,比如:
|
||||
|
||||
1.建立域名服务
|
||||
1.建立ip共享(必须是你的公共IP地址)
|
||||
1.建立至少一个集合包(或者编辑默认的包)
|
||||
1.建立root电子邮件,等等。
|
||||
|
||||
#### 建立域名服务: ####
|
||||
|
||||
为建立域名服务,找到**DNS Functions -> Edit nameservers IPs**。
|
||||
|
||||

|
||||
|
||||
设置你的域名服务器,点击保存按钮。
|
||||
|
||||
|
||||

|
||||
|
||||
#### 建立共享IP和Root邮箱ID: ####
|
||||
|
||||
在你的主机上管理网站,这是非常重要的一步。为了建立共享IP,进入**CWP Setting -> Edit settings**。
|
||||
|
||||

|
||||
|
||||
输入你的静态IP和邮箱ID,然后点击保存设置按钮。
|
||||
|
||||

|
||||
|
||||
现在,CWP可以进行网站维护了。
|
||||
|
||||
#### 建立主机包 ####
|
||||
|
||||
一个主机包什么都没有,除了一个网站托管计划,包括允许访问的磁盘空间,带宽,但没有FTP帐号,邮箱IDs和数据库等等。你可以建立任意数量的网站托管计划,只要你喜欢。
|
||||
|
||||
添加一个包,从CWP的控制台进入**Packages — Add a Package**
|
||||
|
||||

|
||||
|
||||
输入包的名字,允许访问的磁盘配额/RAM数量,FTP/Email帐号,数据库和子域名等等。点击保持设置按钮,建立一个网站托管计划。
|
||||
|
||||

|
||||
|
||||
现在,CWP可以管理你的域名了。
|
||||
|
||||
#### 添加域名: ####
|
||||
|
||||
创建新的域名,你至少得有一个用户帐号。
|
||||
|
||||
而添加一个用户,请进入**User Account -> New Account**。
|
||||
|
||||
输入域名(ex.unixmen.com),用户名,密码和邮箱id等等。最后,点击**Create**。
|
||||
|
||||

|
||||
|
||||
现在,我们添加一个新的域名。
|
||||
|
||||
进入**Domains -> Add Domain**。
|
||||
|
||||
输入新的域名,并且指定这个域名与用户名关联。
|
||||
|
||||

|
||||
|
||||
### 总结 ###
|
||||
|
||||
在这篇教程中,我们看到了如何安装和配置CentOS网页面板,来创建一个简单的网站主机环境。CWP安装和使用非常简单。甚至一个菜鸟也可以在几个小时内建立一个基本的网站主机服务器。并且,CWP完全免费和开源。试一试吧!你不会失望的。
|
||||
|
||||
你可以在[CentOS Web Panel Wikipage][2]找到更多关于CWP的信息。
|
||||
|
||||
加油!
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
|
||||
via: http://www.unixmen.com/how-to-install-centos-web-panel-in-centos/
|
||||
|
||||
作者:[SK][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.unixmen.com/author/sk/
|
||||
[1]:http://centos-webpanel.com/
|
||||
[2]:http://wiki.centos-webpanel.com/
|
||||
@@ -0,0 +1,145 @@
|
||||
Linux 上 wget 或 curl 的更佳替代品
|
||||
================================================================================
|
||||
如果你经常需要通过终端以非交互模式访问网络服务器(例如,从网络上下载文件,或者是测试 RESTful 网络服务接口),可能你会选择的工具是 wget 或 curl。通过大量的命令行选项,这两种工具都可以处理很多非交互网络访问的情况(比如[这里][1],[这里][2],还有[这里][3])。然而,即使像这些一样的强大的工具,也只是与你对如何使用它们的了解程度等同。除非你很精通那些又多又笨(原文是 nitty and gritty)的语法细节,这些工具对于你来说只不过是简单的网络下载器。
|
||||
|
||||
就像宣传的那样,“为人类着想的类 curl 工具”,[HTTPie][4] 设计用来增强 wget 和 curl 的可用性。它的主要目标是使通过命令行与网络服务器进行交互的过程变得尽可能的人性化。为此,HTTPie 支持具有表现力,但又很简单很直观的语法。它以彩色模式显示响应,并且还有一些不错的优点,比如对 JSON 的良好支持,和持久性会话用以作业流程化。
|
||||
|
||||
我知道很多人对把像 wget 和 curl 这样的无处不在的可用的完美工具换成完全没听说过的软件心存怀疑。这种观点是好的,特别是如果你是一个系统管理员、要处理很多不同的硬件的话。然而,对于开发者和终端用户来说,重要的是效率。如果我发现了一个工具的用户友好替代,我没有看到任何问题如果你采用易于使用的版本来节省你宝贵的时间。没有必要对替换掉的工具保持信仰忠诚。毕竟,对于 Linux 来说,最好的事情是可以选择。
|
||||
|
||||
在这篇文章中,让我们来回顾并展示一下我所说的 HTTPie,一个用户友好的 wget 和 curl 的替代。
|
||||
|
||||

|
||||
|
||||
### 在 Linux 上安装 HTTPie ###
|
||||
|
||||
HTTPie 是用 Python 写的,所以你可以在几乎所有地方(Linux,MacOSX,Windows)安装它。而且,在大多数的 Linux 发行版中都有编译好的安装包。
|
||||
|
||||
#### Debian,Ubuntu 或者 Linux Mint: ####
|
||||
|
||||
$ sudo apt-get install httpie
|
||||
|
||||
#### Fedora: ####
|
||||
|
||||
$ sudo yum install httpie
|
||||
|
||||
#### CentOS/RHEL: ####
|
||||
|
||||
首先,启用[EPEL 仓库][5],然后运行:
|
||||
|
||||
$ sudo yum install httpie
|
||||
|
||||
对于任何 Linux 发行版,另一个安装方法时使用[pip][6]。
|
||||
|
||||
$ sudo pip install --upgrade httpie
|
||||
|
||||
### HTTPie 的例子 ###
|
||||
|
||||
当你安装完 HTTPie 后,你可以通过输入 http 命令来调用它。在这篇文章的剩余部分,我会展示几个有用的 http 命令的例子。
|
||||
|
||||
#### 例1:定制头部 ####
|
||||
|
||||
你可以使用 <header:value> 的格式来定制头部。例如,我们发送一个 HTTP GET 请求到 www.test.com ,使用定制用户代理(user-agent)和来源(referer),还有定制头部(比如 MyParam)。
|
||||
|
||||
|
||||
$ http www.test.com User-Agent:Xmodulo/1.0 Referer:http://xmodulo.com MyParam:Foo
|
||||
|
||||
注意到当使用 HTTP GET 方法时,你无需指定任何 HTTP 方法。
|
||||
|
||||
这个 HTTP 请求看起来如下:
|
||||
|
||||
GET / HTTP/1.1
|
||||
Host: www.test.com
|
||||
Accept: */*
|
||||
Referer: http://xmodulo.com
|
||||
Accept-Encoding: gzip, deflate, compress
|
||||
MyParam: Foo
|
||||
User-Agent: Xmodulo/1.0
|
||||
|
||||
#### 例2:下载文件 ####
|
||||
|
||||
你可以把 http 作为文件下载器来使用。你需要像下面一样把输出重定向到文件。
|
||||
|
||||
$ http www.test.com/my_file.zip > my_file.zip
|
||||
|
||||
或者:
|
||||
|
||||
$ http --download www.test.com/my_file.zip
|
||||
|
||||
#### 例3:定制 HTTP 方法 ####
|
||||
|
||||
除了默认的 GET 方法,你还可以使用其他方法(比如 PUT,POST,HEAD)。例如,发送一个 HTTP PUT 请求:
|
||||
|
||||
$ http PUT www.test.com name='Dan Nanni' email=dan@email.com
|
||||
|
||||
#### 例4:提交表单 ####
|
||||
|
||||
使用 http 命令提交表单很容易,如下:
|
||||
|
||||
$ http -f POST www.test.com name='Dan Nanni' comment='Hi there'
|
||||
|
||||
'-f' 选项使 http 命令序列化数据字段,并将 'Content-Type' 设置为 "application/x-www-form-urlencoded; charset=utf-8"。
|
||||
|
||||
这个 HTTP POST 请求看起来如下:
|
||||
|
||||
POST / HTTP/1.1
|
||||
Host: www.test.com
|
||||
Content-Length: 31
|
||||
Content-Type: application/x-www-form-urlencoded; charset=utf-8
|
||||
Accept-Encoding: gzip, deflate, compress
|
||||
Accept: */*
|
||||
User-Agent: HTTPie/0.8.0
|
||||
|
||||
name=Dan+Nanni&comment=Hi+there
|
||||
|
||||
####例5:JSON 支持
|
||||
|
||||
HTTPie 内置 JSON(一种日渐普及的数据交换格式)支持。事实上,HTTPie 默认使用的内容类型(content-type)就是 JSON。因此,当你不指定内容类型发送数据字段时,它们会自动序列化为 JSON 对象。
|
||||
|
||||
$ http POST www.test.com name='Dan Nanni' comment='Hi there'
|
||||
|
||||
这个 HTTP POST 请求看起来如下:
|
||||
|
||||
POST / HTTP/1.1
|
||||
Host: www.test.com
|
||||
Content-Length: 44
|
||||
Content-Type: application/json; charset=utf-8
|
||||
Accept-Encoding: gzip, deflate, compress
|
||||
Accept: application/json
|
||||
User-Agent: HTTPie/0.8.0
|
||||
|
||||
{"name": "Dan Nanni", "comment": "Hi there"}
|
||||
|
||||
#### 例6:输出重定向 ####
|
||||
|
||||
HTTPie 的另外一个用户友好特性是输入重定向,你可以使用缓冲数据提供 HTTP 请求内容。例如:
|
||||
|
||||
$ http POST api.test.com/db/lookup < my_info.json
|
||||
|
||||
或者:
|
||||
|
||||
$ echo '{"name": "Dan Nanni"}' | http POST api.test.com/db/lookup
|
||||
|
||||
### 结束语 ###
|
||||
|
||||
在这篇文章中,我介绍了 HTTPie,一个 wget 和 curl 的可能替代工具。除了这里展示的几个简单的例子,你可以在[官方网站][7]上找到 HTTPie 的很多有趣的应用。再次重复一遍,一款强大的工具也只相当于你对它的了解程度。从个人而言,我更热衷于 HTTPie,因为我在寻找一种更简洁的测试复杂网络接口的方法。
|
||||
|
||||
你怎么看?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/wget-curl-alternative-linux.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[wangjiezhe](https://github.com/wangjiezhe)
|
||||
校对:[校对者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-download-multiple-files-with-wget.html
|
||||
[2]:http://xmodulo.com/how-to-use-custom-http-headers-with-wget.html
|
||||
[3]:http://ask.xmodulo.com/custom-http-header-curl.html
|
||||
[4]:https://github.com/jakubroztocil/httpie
|
||||
[5]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html
|
||||
[6]:http://ask.xmodulo.com/install-pip-linux.html
|
||||
[7]:https://github.com/jakubroztocil/httpie
|
||||
@@ -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也可以安装与已有操作系统并存,构成双重启动。
|
||||
|
||||

|
||||
|
||||
在更进一步之前会检查系统要求和资源有效性。如果你的系统有足够的资源,点击继续。
|
||||
|
||||

|
||||
|
||||
安装向导提供许多安装形式。选取最适合你的选项,通常地,第一个选项被大多数选用 i.e. “擦除磁盘以安装Elementary”。选择这个选项,必须保证你的数据都已经被合理的备份了,因为磁盘(分区)将会被擦除,所有数据将会丢失。
|
||||
|
||||

|
||||
|
||||
一个对话框显示了被Elementary OS使用和格式化的磁盘分区列表,确保数据完整后点击继续。
|
||||
|
||||

|
||||
|
||||
选择你的位置,确定时区,点击继续。
|
||||
|
||||

|
||||
|
||||
选择你的语言,点击继续。
|
||||
|
||||

|
||||
|
||||
填入你的信息,选择一个强度高的超级用户/管理员密码,点击继续。
|
||||
|
||||

|
||||
|
||||
当你的信息提供后,核心安装进程就会启动,正在安装组件的详细信息会在一个小对话框里随进度条一闪而过。
|
||||
|
||||

|
||||
|
||||
恭喜你!最新的Elementary OS 0.3 (Freya)已经安装完成了。此时需要重启来更新和完整注册,恭喜。
|
||||
|
||||

|
||||
|
||||
启动时,Elementary OS的标志显得十分优雅,然后密码保护的管理员登入和游客访问选项会出现。游客访问有相当多的限制功能,而且没有安装的特权。
|
||||
|
||||

|
||||
|
||||
下图是新安装的Elementary OS 0.3的画面。
|
||||
|
||||

|
||||
|
||||
### 个性化桌面 ###
|
||||
|
||||
Elementary OS 0.3以其轻巧和美观而为我们熟知,每个人有自己独特的审美观念和计算机使用习惯。桌面反映出每一个计算机使用者个性化的观点。如其他操作系统一样,Elementary OS 0.3也提供了许多选项来个性化配置桌面,包括壁纸,字体大小,主题等等。
|
||||
|
||||
基本的个性化配置,点击Applications > System Settings > Desktop
|
||||
|
||||
我们可以改变壁纸,泊板和启用桌面热角。
|
||||
|
||||
默认提供了很少的壁纸,更多的可以从网上下载或者从你的相机传输。
|
||||
|
||||

|
||||
|
||||
Elementary OS真正的美丽在于优雅的Dock面板。桌面上没有任何图标,一些应用图标停靠在dock面板上加强了显示效果,提供了快速访问常用应用的捷径。
|
||||
|
||||

|
||||
|
||||
用户可以使用桌面的四个角定制要显示什么。
|
||||
|
||||

|
||||
|
||||
通过elementary tweaks工具的安装,可以达到更高级的个性化定制。
|
||||
|
||||
使用如下命令,添加稳定的个人软件包档案(PPA)到高级软件包管理工具(APT)仓库。
|
||||
|
||||
sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily
|
||||
|
||||

|
||||
|
||||
一旦软件包添加到仓库后,我们需要用以下命令更新仓库
|
||||
|
||||
sudo apt-get update
|
||||
|
||||

|
||||
|
||||
更新仓库后,我们就可以安装inkscape(不知是什么),用以下命令完成
|
||||
|
||||
sudo apt-get install elementary-tweaks
|
||||
|
||||

|
||||
|
||||
我们可以在个人区域的Application > System Settings下看到Tweaks选项的一个添加项。目前它提供给我们更多的选项,个性化定制我们的桌面。
|
||||
|
||||

|
||||
|
||||
为了进一步定制,我们也安装了gnome桌面系统的tweak工具,演示解锁桌面。
|
||||
|
||||
sudo apt-get install gnome-tweak-tool
|
||||
|
||||

|
||||
|
||||
### 总结 ###
|
||||
|
||||
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/
|
||||
@@ -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
|
||||
|
||||

|
||||
|
||||
创建 Yes/No 对话框
|
||||
|
||||
zenity --question --text "Do you want this?" --ok-label "Yeah" --cancel-label="Nope"
|
||||
|
||||

|
||||
|
||||
创建输入框并在变量中保存值
|
||||
|
||||
a=$(zenity --entry --title "Entry box" --text "Please enter the value" --width=300 --height=200)
|
||||
echo $a
|
||||
|
||||

|
||||
|
||||
输入后,值会保存在变量 $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
|
||||
|
||||

|
||||
|
||||
输入框
|
||||
|
||||

|
||||
|
||||
输入框
|
||||
|
||||

|
||||
|
||||
输入框
|
||||
|
||||

|
||||
|
||||
信息框
|
||||
|
||||
别忘了查看也许能帮助到你的有用的[zenity 选项][1]
|
||||
|
||||
### Whiptail 工具 ###
|
||||
|
||||
在Ubuntu上安装whiptail,运行
|
||||
|
||||
sudo apt-get install whiptail
|
||||
|
||||
用whiptail创建消息框或者对话框的命令也是相当自解释的,我们会给你提供一些基本例子。
|
||||
|
||||
### 创建消息框 ###
|
||||
|
||||
whiptail --msgbox "This is a message" 10 40
|
||||
|
||||

|
||||
|
||||
### 创建 Yes/No 对话框 ###
|
||||
|
||||
whiptail --yes-button "Yeah" --no-button "Nope" --title "Choose the answer" --yesno "Will you choose yes?" 10 30
|
||||
|
||||

|
||||
|
||||
### 创建有缺省值的输入框 ###
|
||||
|
||||
whiptail --inputbox "Enter your number please." 10 30 "10"
|
||||
|
||||

|
||||
|
||||
尝试使用输入值要注意的一点是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"
|
||||
|
||||

|
||||
|
||||
这是一个请求用户输入一个文件夹的路径并输出它的大小的 **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]总是有用的。
|
||||
|
||||
### 结论 ###
|
||||
|
||||
选择合适的工具显示对话框取决于你期望在桌面机器还是服务器上运行你的脚本。桌面机器用户通常使用窗口环境,更可能用显示的窗口运行脚本和交互。然而,如果你期望用户是在服务器上工作的,你也许会希望安全地显示,并使用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
|
||||
@@ -0,0 +1,73 @@
|
||||
Linux有问必答--如何在Linux中修改环境变量PATH
|
||||
================================================================================
|
||||
> **提问**: 当我试着运行一个程序时,它提示“command not found”。 但这个程序就在/usr/local/bin下。我该如何添加/usr/local/bin到我的PATH变量下,这样我就可以不用指定路径来运行这个命令了。
|
||||
|
||||
在Linux中,PATH环境变量保存了一系列的目录用于用户在输入的时候搜索命令。PATH变量的值由一系列的由分号分隔的绝对路径组成。每个用户都有特定的PATH环境变量(由系统级的PATH变量初始化)。
|
||||
|
||||
要检查用户的环境变量,用户模式下运行下面的命令:
|
||||
|
||||
$ echo $PATH
|
||||
|
||||
----------
|
||||
|
||||
/usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin
|
||||
|
||||
或者运行:
|
||||
|
||||
$ env | grep PATH
|
||||
|
||||
----------
|
||||
|
||||
PATH=/usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin
|
||||
|
||||
如果你的命令不存在于上面任何一个目录内,shell就会抛出一个错误信息:“command not found”。
|
||||
|
||||
如果你想要添加一个另外的目录(比如:/usr/local/bin)到你的PATH变量中,你可以用下面这些命令。
|
||||
|
||||
### 为特定用户修改PATH环境变量 ###
|
||||
|
||||
如果你只想在当前的登录会话中临时地添加一个新的目录(比如:/usr/local/bin)给用户的默认搜索路径,你只需要输入下面的命令。
|
||||
|
||||
$ PATH=$PATH:/usr/local/bin
|
||||
|
||||
检查PATH是否已经更新:
|
||||
|
||||
$ echo $PATH
|
||||
|
||||
----------
|
||||
|
||||
/usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin:/usr/local/bin
|
||||
|
||||
更新的PATH会在当前的PATH一直有效。然而,更改将在新的会话中失效。
|
||||
|
||||
如果你想要永久更改PATH变量,用编辑器打开~/.bashrc (或者 ~/.bash_profile),接着在最后添加下面这行。
|
||||
|
||||
export PATH=$PATH:/usr/local/bin
|
||||
|
||||
接着运行下面这行永久激活更改:
|
||||
|
||||
$ source ~/.bashrc (or source ~/.bash_profile)
|
||||
|
||||
### 改变系统级的环境变量 ###
|
||||
|
||||
如果你想要永久添加/usr/local/bin到系统级的PATH变量中,像下面这样编辑/etc/profile。
|
||||
|
||||
$ sudo vi /etc/profile
|
||||
|
||||
----------
|
||||
|
||||
export PATH=$PATH:/usr/local/bin
|
||||
|
||||
你重新登录后,更新的环境变量就会生效了。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/change-path-environment-variable-linux.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://ask.xmodulo.com/author/nanni
|
||||
@@ -0,0 +1,32 @@
|
||||
[已解决] Ubuntu下不能记住亮度设置问题
|
||||
================================================================================
|
||||

|
||||
|
||||
在[解决亮度控制在Ubuntu和Linux Mint下不工作的问题][1]这篇教程里,一些用户提到虽然问题已经得到解决,但是**Ubuntu无法记住亮度设置**,同样的情况在Linux Mint下也会发生。每次开机或从睡眠状态下唤醒,亮度会恢复至最大值或最小值。我知道这种情况很烦。不过幸好我们有很简单的方法来解决**Ubuntu和Linux Mint下的亮度问题**。
|
||||
|
||||
### 解决Ubuntu和Linux下不能记住亮度设置 ###
|
||||
|
||||
[Norbert][2]写了一个脚本,能让Ubuntu和Linux Mint记住亮度设置,不论是开机还是唤醒之后。为了能让你使用这个脚本更简单方便,他把这个适用于Ubuntu 12.04、14.04和14.10的PPA挂在了网上。你需要做的就是输入以下命令:
|
||||
|
||||
sudo add-apt-repository ppa:nrbrtx/sysvinit-backlight
|
||||
sudo apt-get update
|
||||
sudo apt-get install sysvinit-backlight
|
||||
|
||||
安装好之后,重启你的系统。现在就来看看亮度设置有没有被保存下来吧。
|
||||
|
||||
希望这篇小贴士能帮助到你。如果你有任何问题,就[来这儿][3]提bug吧。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://itsfoss.com/ubuntu-mint-brightness-settings/
|
||||
|
||||
作者:[Abhishek][a]
|
||||
译者:[ZTinoZ](https://github.com/ZTinoZ)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://itsfoss.com/author/abhishek/
|
||||
[1]:http://itsfoss.com/fix-brightness-ubuntu-1310/
|
||||
[2]:https://launchpad.net/~nrbrtx/+archive/ubuntu/sysvinit-backlight/+packages
|
||||
[3]:https://launchpad.net/~nrbrtx/+archive/ubuntu/sysvinit-backlight/+packages
|
||||
@@ -0,0 +1,355 @@
|
||||
Linux网络统计工具/命令
|
||||
================================================================================
|
||||
我在Linux(基于CentOS 或者 Debian 的发行版)中该如何查看当前网络端口吞吐量的统计信息?在Linux操作系统中如何查看当前内核snmp计数器以及网络端口的统计信息?
|
||||
|
||||

|
||||
|
||||
你可以使用以下任何一个命令:
|
||||
|
||||
### nstat 命令 : 网络统计工具 ###
|
||||
|
||||
键入以下命令:
|
||||
|
||||
# nstat
|
||||
|
||||
输出样例:
|
||||
|
||||
#kernel
|
||||
IpInReceives 133243 0.0
|
||||
IpInDelivers 133243 0.0
|
||||
IpOutRequests 92904 0.0
|
||||
IcmpOutErrors 97 0.0
|
||||
IcmpOutTimeExcds 97 0.0
|
||||
IcmpMsgOutType3 97 0.0
|
||||
TcpActiveOpens 538 0.0
|
||||
TcpEstabResets 56 0.0
|
||||
TcpInSegs 129837 0.0
|
||||
TcpOutSegs 89720 0.0
|
||||
TcpRetransSegs 42 0.0
|
||||
TcpOutRsts 704 0.0
|
||||
UdpInDatagrams 3255 0.0
|
||||
UdpNoPorts 97 0.0
|
||||
UdpOutDatagrams 3270 0.0
|
||||
Ip6OutNoRoutes 206 0.0
|
||||
TcpExtTW 141 0.0
|
||||
TcpExtDelayedACKs 508 0.0
|
||||
TcpExtDelayedACKLocked 1 0.0
|
||||
TcpExtDelayedACKLost 42 0.0
|
||||
TcpExtTCPHPHits 117659 0.0
|
||||
TcpExtTCPPureAcks 2158 0.0
|
||||
TcpExtTCPHPAcks 605 0.0
|
||||
TcpExtTCPSackRecovery 1 0.0
|
||||
TcpExtTCPLossUndo 16 0.0
|
||||
TcpExtTCPSackFailures 4 0.0
|
||||
TcpExtTCPFastRetrans 1 0.0
|
||||
TcpExtTCPSlowStartRetrans 3 0.0
|
||||
TcpExtTCPTimeouts 33 0.0
|
||||
TcpExtTCPDSACKOldSent 40 0.0
|
||||
TcpExtTCPDSACKRecv 5 0.0
|
||||
TcpExtTCPAbortOnData 120 0.0
|
||||
TcpExtTCPAbortOnClose 55 0.0
|
||||
TcpExtTCPSackShiftFallback 9 0.0
|
||||
IpExtInOctets 180131682 0.0
|
||||
IpExtOutOctets 7289106 0.0
|
||||
|
||||
### ss 命令 : 查询套接字工具 ###
|
||||
|
||||
要查看统计汇总, 输入:
|
||||
|
||||
# ss -s
|
||||
|
||||
输出样例:
|
||||
|
||||
Total: 786 (kernel 804)
|
||||
TCP: 65 (estab 40, closed 7, orphaned 0, synrecv 0, timewait 6/0), ports 56
|
||||
Transport Total IP IPv6
|
||||
* 804 - -
|
||||
RAW 1 1 0
|
||||
UDP 12 9 3
|
||||
TCP 58 52 6
|
||||
INET 71 62 9
|
||||
FRAG 0 0 0
|
||||
|
||||
查看[ss 命令教程][1] 获取更多信息。
|
||||
|
||||
### netstat 命令 : 显示套接字信息的旧的好工具 ###
|
||||
|
||||
查看所有网络端口以及汇总信息表,输入:
|
||||
|
||||
# netstat -i
|
||||
|
||||
输出样例:
|
||||
|
||||
Kernel Interface table
|
||||
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
|
||||
eth0 1500 0 941022 0 0 0 688165 0 0 0 BMRU
|
||||
lo 16436 0 9304 0 0 0 9304 0 0 0 LRU
|
||||
ppp0 1496 0 3784 0 0 0 4177 0 0 0 MOPRU
|
||||
|
||||
查看每个协议的汇总统计信息,输入:
|
||||
|
||||
# netstat -s
|
||||
|
||||
输出样例:
|
||||
|
||||
Ip:
|
||||
1092065 total packets received
|
||||
0 forwarded
|
||||
0 incoming packets discarded
|
||||
1091681 incoming packets delivered
|
||||
798913 requests sent out
|
||||
895 dropped because of missing route
|
||||
759 reassemblies required
|
||||
375 packets reassembled ok
|
||||
Icmp:
|
||||
17 ICMP messages received
|
||||
0 input ICMP message failed.
|
||||
ICMP input histogram:
|
||||
timeout in transit: 8
|
||||
echo replies: 9
|
||||
1747 ICMP messages sent
|
||||
0 ICMP messages failed
|
||||
ICMP output histogram:
|
||||
destination unreachable: 1730
|
||||
echo request: 17
|
||||
IcmpMsg:
|
||||
InType0: 9
|
||||
InType11: 8
|
||||
OutType3: 1730
|
||||
OutType8: 17
|
||||
Tcp:
|
||||
4822 active connections openings
|
||||
1129 passive connection openings
|
||||
457 failed connection attempts
|
||||
165 connection resets received
|
||||
7 connections established
|
||||
1062519 segments received
|
||||
771394 segments send out
|
||||
7158 segments retransmited
|
||||
6 bad segments received.
|
||||
2578 resets sent
|
||||
Udp:
|
||||
20846 packets received
|
||||
1730 packets to unknown port received.
|
||||
0 packet receive errors
|
||||
19242 packets sent
|
||||
UdpLite:
|
||||
TcpExt:
|
||||
71 invalid SYN cookies received
|
||||
8 resets received for embryonic SYN_RECV sockets
|
||||
142 packets pruned from receive queue because of socket buffer overrun
|
||||
2109 TCP sockets finished time wait in fast timer
|
||||
84 packets rejects in established connections because of timestamp
|
||||
19454 delayed acks sent
|
||||
6 delayed acks further delayed because of locked socket
|
||||
Quick ack mode was activated 7306 times
|
||||
1 packets directly queued to recvmsg prequeue.
|
||||
1 bytes directly received in process context from prequeue
|
||||
823921 packet headers predicted
|
||||
24412 acknowledgments not containing data payload received
|
||||
10150 predicted acknowledgments
|
||||
242 times recovered from packet loss by selective acknowledgements
|
||||
33 congestion windows recovered without slow start by DSACK
|
||||
335 congestion windows recovered without slow start after partial ack
|
||||
336 TCP data loss events
|
||||
TCPLostRetransmit: 35
|
||||
1 timeouts after reno fast retransmit
|
||||
156 timeouts after SACK recovery
|
||||
116 timeouts in loss state
|
||||
461 fast retransmits
|
||||
5 forward retransmits
|
||||
608 retransmits in slow start
|
||||
2073 other TCP timeouts
|
||||
62 SACK retransmits failed
|
||||
43074 packets collapsed in receive queue due to low socket buffer
|
||||
8499 DSACKs sent for old packets
|
||||
101 DSACKs sent for out of order packets
|
||||
308 DSACKs received
|
||||
9 DSACKs for out of order packets received
|
||||
427 connections reset due to unexpected data
|
||||
122 connections reset due to early user close
|
||||
28 connections aborted due to timeout
|
||||
TCPDSACKIgnoredOld: 3
|
||||
TCPDSACKIgnoredNoUndo: 60
|
||||
TCPSpuriousRTOs: 4
|
||||
TCPSackShifted: 282
|
||||
TCPSackMerged: 740
|
||||
TCPSackShiftFallback: 1017
|
||||
IpExt:
|
||||
InMcastPkts: 47
|
||||
OutMcastPkts: 51
|
||||
InBcastPkts: 1
|
||||
InOctets: 1341508973
|
||||
OutOctets: 72525352
|
||||
InMcastOctets: 8649
|
||||
OutMcastOctets: 7519
|
||||
InBcastOctets: 328
|
||||
|
||||
查看 [netstat 命令教程][2] 获取更多信息。
|
||||
|
||||
### ip / ifconfig 命令 : 配置或者显示网络端口信息 ###
|
||||
|
||||
键入以下命令:
|
||||
|
||||
# ifconfig
|
||||
|
||||
或者
|
||||
|
||||
# /sbin/ifconfig
|
||||
|
||||
或者
|
||||
|
||||
# ifconfig eth0
|
||||
|
||||
----------
|
||||
|
||||
eth0 Link encap:Ethernet HWaddr b8:ac:6f:65:31:e5
|
||||
inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0
|
||||
inet6 addr: fe80::baac:6fff:fe65:31e5/64 Scope:Link
|
||||
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
|
||||
RX packets:966334 errors:0 dropped:0 overruns:0 frame:0
|
||||
TX packets:703297 errors:0 dropped:0 overruns:0 carrier:0
|
||||
collisions:0 txqueuelen:1000
|
||||
RX bytes:1186255648 (1.1 GiB) TX bytes:73968238 (70.5 MiB)
|
||||
Interrupt:17
|
||||
lo Link encap:Local Loopback
|
||||
inet addr:127.0.0.1 Mask:255.0.0.0
|
||||
inet6 addr: ::1/128 Scope:Host
|
||||
UP LOOPBACK RUNNING MTU:16436 Metric:1
|
||||
RX packets:9666 errors:0 dropped:0 overruns:0 frame:0
|
||||
TX packets:9666 errors:0 dropped:0 overruns:0 carrier:0
|
||||
collisions:0 txqueuelen:0
|
||||
RX bytes:1399578 (1.3 MiB) TX bytes:1399578 (1.3 MiB)
|
||||
ppp0 Link encap:Point-to-Point Protocol
|
||||
inet addr:10.1.11.70 P-t-P:10.0.31.18 Mask:255.255.255.255
|
||||
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1496 Metric:1
|
||||
RX packets:3784 errors:0 dropped:0 overruns:0 frame:0
|
||||
TX packets:4177 errors:0 dropped:0 overruns:0 carrier:0
|
||||
collisions:0 txqueuelen:3
|
||||
RX bytes:2400265 (2.2 MiB) TX bytes:275983 (269.5 KiB)
|
||||
|
||||
显示网络端口统计信息,输入:
|
||||
|
||||
# ip -s link
|
||||
|
||||
输出样例:
|
||||
|
||||
1: lo: mtu 16436 qdisc noqueue state UNKNOWN
|
||||
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
|
||||
RX: bytes packets errors dropped overrun mcast
|
||||
1444187 9960 0 0 0 0
|
||||
TX: bytes packets errors dropped carrier collsns
|
||||
1444187 9960 0 0 0 0
|
||||
2: eth0: mtu 1500 qdisc mq state UP qlen 1000
|
||||
link/ether b8:ac:6f:65:31:e5 brd ff:ff:ff:ff:ff:ff
|
||||
RX: bytes packets errors dropped overrun mcast
|
||||
1221956483 991501 0 0 0 24
|
||||
TX: bytes packets errors dropped carrier collsns
|
||||
75623937 720272 0 0 0 0
|
||||
3: wlan0: mtu 1500 qdisc noop state DOWN qlen 1000
|
||||
link/ether 00:21:6a:ca:9b:10 brd ff:ff:ff:ff:ff:ff
|
||||
RX: bytes packets errors dropped overrun mcast
|
||||
0 0 0 0 0 0
|
||||
TX: bytes packets errors dropped carrier collsns
|
||||
0 0 0 0 0 0
|
||||
4: pan0: mtu 1500 qdisc noop state DOWN
|
||||
link/ether 4a:c7:5f:0e:8e:d8 brd ff:ff:ff:ff:ff:ff
|
||||
RX: bytes packets errors dropped overrun mcast
|
||||
0 0 0 0 0 0
|
||||
TX: bytes packets errors dropped carrier collsns
|
||||
0 0 0 0 0 0
|
||||
8: ppp0: mtu 1496 qdisc pfifo_fast state UNKNOWN qlen 3
|
||||
link/ppp
|
||||
RX: bytes packets errors dropped overrun mcast
|
||||
2419881 3848 0 0 0 0
|
||||
TX: bytes packets errors dropped carrier collsns
|
||||
284151 4287 0 0 0 0
|
||||
|
||||
### sar 命令: 显示网络统计信息 ###
|
||||
|
||||
输入以下命令 (你需要 [通过sysstat包安装并启用sar][3]):
|
||||
sar -n DEV
|
||||
|
||||
Linux 2.6.32-220.2.1.el6.x86_64 (www.cyberciti.biz) Tuesday 13 March 2012 _x86_64_ (2 CPU)
|
||||
12:00:01 CDT IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
|
||||
12:10:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
12:10:01 CDT eth0 127.13 121.32 95.45 18.34 0.00 0.00 0.00
|
||||
12:10:01 CDT eth1 98.48 110.62 16.72 96.33 0.00 0.00 0.00
|
||||
12:20:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
12:20:01 CDT eth0 139.95 133.41 106.30 19.95 0.00 0.00 0.00
|
||||
12:20:01 CDT eth1 110.65 121.85 18.14 107.13 0.00 0.00 0.00
|
||||
12:30:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
12:30:01 CDT eth0 147.85 132.49 115.78 20.45 0.00 0.00 0.00
|
||||
12:30:01 CDT eth1 111.88 127.39 18.61 117.65 0.00 0.00 0.00
|
||||
12:40:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
12:40:01 CDT eth0 136.75 124.64 105.24 19.48 0.00 0.00 0.00
|
||||
12:40:01 CDT eth1 101.65 115.32 17.58 104.50 0.00 0.00 0.00
|
||||
12:50:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
12:50:01 CDT eth0 131.45 125.69 96.49 19.58 0.00 0.00 0.00
|
||||
12:50:01 CDT eth1 101.41 111.31 17.54 96.78 0.00 0.00 0.00
|
||||
01:00:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
01:00:01 CDT eth0 140.30 133.27 102.17 20.75 0.00 0.00 0.00
|
||||
01:00:01 CDT eth1 106.90 119.51 18.53 103.09 0.00 0.00 0.00
|
||||
01:10:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
01:10:01 CDT eth0 152.03 127.74 125.56 19.85 0.00 0.00 0.00
|
||||
01:10:01 CDT eth1 115.60 134.57 18.73 126.96 0.00 0.00 0.00
|
||||
01:20:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
01:20:01 CDT eth0 138.55 130.55 103.03 20.20 0.00 0.00 0.00
|
||||
....
|
||||
..
|
||||
....
|
||||
..
|
||||
.
|
||||
01:00:01 CDT eth1 156.82 169.48 28.83 138.49 0.00 0.00 0.00
|
||||
01:10:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
01:10:01 CDT eth0 215.19 194.82 163.11 30.99 0.00 0.00 0.00
|
||||
01:10:01 CDT eth1 162.49 183.79 28.36 163.70 0.00 0.00 0.00
|
||||
01:20:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
01:20:01 CDT eth0 200.20 192.23 140.64 30.93 0.00 0.00 0.00
|
||||
01:20:01 CDT eth1 153.60 166.96 27.32 140.26 0.00 0.00 0.00
|
||||
01:30:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
01:30:01 CDT eth0 111.98 103.58 79.12 16.52 0.00 0.00 0.48
|
||||
01:30:01 CDT eth1 87.50 95.58 14.74 79.35 0.00 0.00 0.00
|
||||
Average: IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
|
||||
Average: lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
Average: eth0 211.21 196.20 156.18 31.20 0.00 0.00 0.01
|
||||
Average: eth1 159.10 174.52 28.00 149.95 0.00 0.00 0.00
|
||||
|
||||
或者输入以下命令:
|
||||
|
||||
# sar -n DEV 1 3
|
||||
|
||||
输出样例:
|
||||
|
||||
Linux 2.6.32-220.2.1.el6.x86_64 (www.cyberciti.biz) Tuesday 13 March 2012 _x86_64_ (2 CPU)
|
||||
01:44:03 CDT IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
|
||||
01:44:04 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
01:44:04 CDT eth0 161.70 154.26 105.20 26.63 0.00 0.00 0.00
|
||||
01:44:04 CDT eth1 145.74 142.55 25.11 144.94 0.00 0.00 0.00
|
||||
01:44:04 CDT IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
|
||||
01:44:05 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
01:44:05 CDT eth0 162.14 156.31 107.46 42.18 0.00 0.00 0.00
|
||||
01:44:05 CDT eth1 135.92 138.83 39.38 104.92 0.00 0.00 0.00
|
||||
01:44:05 CDT IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
|
||||
01:44:06 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
01:44:06 CDT eth0 303.92 293.14 272.91 37.40 0.00 0.00 0.00
|
||||
01:44:06 CDT eth1 252.94 290.20 34.87 263.50 0.00 0.00 0.00
|
||||
Average: IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
|
||||
Average: lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
Average: eth0 210.37 202.34 163.19 35.66 0.00 0.00 0.00
|
||||
Average: eth1 178.93 191.64 33.36 171.60 0.00 0.00 0.00
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.cyberciti.biz/faq/network-statistics-tools-rhel-centos-debian-linux/
|
||||
|
||||
作者:[nixCraft][a]
|
||||
译者:[ictlyh](https://github.com/ictlyh)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.cyberciti.biz/tips/about-us
|
||||
[1]:http://www.cyberciti.biz/tips/linux-investigate-sockets-network-connections.html
|
||||
[2]:http://www.cyberciti.biz/tips/netstat-command-tutorial-examples.html
|
||||
[3]:http://www.cyberciti.biz/tips/identifying-linux-bottlenecks-sar-graphs-with-ksar.html
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user