Merge pull request #14 from LCTT/master

update 2017-02-24
This commit is contained in:
Chao-zhi Liu 2017-02-24 19:56:44 +08:00 committed by GitHub
commit 6852efbc29
31 changed files with 1829 additions and 1014 deletions

View File

@ -1,53 +1,57 @@
获取、安装和制作 GTK 主题
----------------
如何获取、安装和制作 GTK 主题
=====================
非常多的桌面版 Linux 都支持主题。GUI译者注图形用户界面独有的外观或者”风格“叫做主题。用户可以改变主题让桌面看起来与众不同。通常,用户也会更改图标然而主题和图标包是两个独立的实体。很多人想制作他们自己的主题因此这是一篇关于GTK 主题的制作以及各种制作时必需的信息的文章。
多数桌面版 Linux 都支持主题。GUILCTT 译注:图形用户界面)独有的外观或者“风格”叫做主题。用户可以改变主题让桌面看起来与众不同。通常,用户也会更改图标然而,主题和图标包是两个独立的实体。很多人想制作他们自己的主题,因此这是一篇关于 GTK 主题的制作以及各种制作时必需的信息的文章。
**注意:** 这篇文章着重讨论 GTK3但会稍微谈一下 GTK2、Metacity 等。本文不会讨论光标和图标。
**基本概念**
GIMP 工具包(简称 GTK是一个用来创造在多种系统上如此造就了 GTK 的跨平台图形用户界面的构件工具包。GTK[http://www.gtk.org/][17]通常被错误地认为代表“GNOME 工具包”但实际上它代表“GIMP 工具包”,因为最初创造它是为了给 GIMP 设计用户界面。GTK 是一个用 C 语言编写的面向对象工具包GTK 本身不是一种语言。GTK 遵循 LGPL协议完全开源。GTK 是一个使用广泛的图形用户界面工具包,它含有很多可用工具。
###基本概念
GTK 主题无法在基于 QT 的应用上使用。QT 主题需要在基于 QT 的应用上使用
GIMP 工具包(简称 GTK是一个用来在多种系统上因此造就了 GTK 的跨平台创建图形用户界面的构件工具包。GTK[http://www.gtk.org/][17]通常被误认为代表“GNOME 工具包”但实际上它代表“GIMP 工具包”,因为最初创造它是为了给 GIMP 设计用户界面。GTK 是一个用 C 语言编写的面向对象工具包GTK 本身不是一种语言。GTK 遵循 LGPL 协议完全开源。GTK 是一个广泛使用的图形用户界面工具包,它含有很多用于 GTK 的工具
主题使用层叠样式表CSS来生成主题样式。这里的 CSS 和网站开发者在网页上使用的相同。然而它引用的 HTML 标签被 GTK 构件的专用标签代替。学习 CSS 对主题开发者来说很重要
为 GTK 制作的主题无法用在基于 Qt 的应用上。QT 应用需要使用 Qt 主题
**主题存放位置**
主题可能会存储在“~/.themes”或者“/usr/share/themes”文件夹中。存放在“~/.themes”文件夹下的主题只有此 home 文件夹的所有者可以使用。而存放在“/usr/share/themes”文件夹下的全局主题可供所有用户使用。当执行 GTK 程序时,它会按照某种确定的顺序检查可用主题文件的列表。如果没有找到主题文件,它会尝试检查列表中的下一个文件。下述文字是 GTK3 程序检查时的顺序列表。
$XDG_CONFIG_HOME/gtk-3.0/gtk.css (另一写法 ~/.config/gtk-3.0/gtk.css
~/.themes/NAME/gtk-3.0/gtk.css
$datadir/share/themes/NAME/gtk-3.0/gtk.css (另一写法 /usr/share/themes/name/gtk-3.0/gtk.css
主题使用层叠样式表CSS来生成主题样式。这里的 CSS 和网站开发者在网页上使用的相同。然而不是引用 HTML 标签,而是引用 GTK 构件的专用标签。学习 CSS 对主题开发者来说很重要。
**注意:** ”NAME“是当前主题名称的占位符。
### 主题存放位置
如果有两个主题名字相同,那么存放在用户 home 文件夹(~/.themes里的主题会被使用。开发者测试存放在本地 home 文件夹的主题时可以好好的利用 GTK 的主题查找算法。
主题可能会存储在 `~/.themes` 或者 `/usr/share/themes` 文件夹中。存放在 `~/.themes` 文件夹下的主题只有此 home 文件夹的所有者可以使用。而存放在 `/usr/share/themes` 文件夹下的全局主题可供所有用户使用。当执行 GTK 程序时,它会按照某种确定的顺序检查可用主题文件的列表。如果没有找到主题文件,它会尝试检查列表中的下一个文件。下述文字是 GTK3 程序检查时的顺序列表。
1. `$XDG_CONFIG_HOME/gtk-3.0/gtk.css` (另一写法 `~/.config/gtk-3.0/gtk.css`
2. `~/.themes/NAME/gtk-3.0/gtk.css`
3. `$datadir/share/themes/NAME/gtk-3.0/gtk.css` (另一写法 `/usr/share/themes/name/gtk-3.0/gtk.css`
**注意:** “NAME”代表当前主题名称。
如果有两个主题名字相同,那么存放在用户 home 文件夹(`~/.themes`)里的主题会被优先使用。开发者可以利用这个 GTK 主题查找算法的优势来测试存放在本地 home 文件夹的主题。
### 主题引擎
**主题引擎**
主题引擎是软件的一部分,用来改变图形用户界面构件的外观。引擎通过解析主题文件来了解应当绘制多少种构件。有些引擎随着主题被开发出来。每种引擎都有优点和缺点,还有些引擎添加了某些特性和特色。
从默认软件源中可以获取很多主题引擎。Debian 系的 Linux 发行版可以执行“apt-get install gtk2-engines-murrine gtk2-engines-pixbuf gtk3-engines-unico”命令来安装三种不同的引擎。很多引擎同时支持 GTK2 和 GTK3。以下述短列表为例。
从默认软件源中可以获取很多主题引擎。Debian 系的 Linux 发行版可以执行 `apt-get install gtk2-engines-murrine gtk2-engines-pixbuf gtk3-engines-unico` 命令来安装三种不同的引擎。很多引擎同时支持 GTK2 和 GTK3。以下述列表为例
* gtk2-engines-aurora - Aurora GTK2 engine
* gtk2-engines-pixbuf - Pixbuf GTK2 engine
* gtk3-engines-oxygen - Engine port of the Oxygen widget style to GTK
* gtk3-engines-unico - Unico GTK3 engine
* gtk3-engines-xfce - GTK3 engine for Xfce
* gtk2-engines-aurora - Aurora GTK2 引擎
* gtk2-engines-pixbuf - Pixbuf GTK2 引擎
* gtk3-engines-oxygen - 将 Oxygen 组件风格移植 GTK 的引擎
* gtk3-engines-unico - Unico GTK3 引擎
* gtk3-engines-xfce - 用于 Xfce 的 GTK3 引擎
### 创作 GTK3 主题
**创作 GTK3 主题**
开发者创作 GTK3 主题时,或者从空文件着手,或者将已有的主题作为模板。从现存主题着手可能会对新手有帮助。比如,开发者可以把主题复制到用户的 home 文件夹,然后编辑这些文件。
GTK3 主题的通用格式是新建一个以主题名字命名的文件夹。然后新建一个名为“gtk-3.0”的子目录在子目录里新建一个名为“gtk.css”的文件。在文件“gtk.css“里,使用 CSS 代码写出主题的外观。为了测试将主题移动到 ~/.theme 里。使用新主题并在必要时进行改进。如果有需求,开发者可以添加额外的组件,使主题支持 GTK2OpenboxMetacityUnity等桌面环境。
GTK3 主题的通用格式是新建一个以主题名字命名的文件夹。然后新建一个名为 `gtk-3.0` 的子目录,在子目录里新建一个名为 `gtk.css` 的文件。在文件 `gtk.css` 里,使用 CSS 代码写出主题的外观。为了测试可以将主题移动到 `~/.theme` 里。使用新主题并在必要时进行改进。如果有需求,开发者可以添加额外的组件,使主题支持 GTK2、Openbox、Metacity、Unity 等桌面环境。
为了阐明如何创造主题,我们会学习”Ambiance“主题通常可以在 /usr/share/themes/Ambiance 找到它。此目录包含下面列出的子目录以及一个名为”index.theme“的文件。
为了阐明如何创造主题,我们会学习 Ambiance 主题,通常可以在 `/usr/share/themes/Ambiance` 找到它。此目录包含下面列出的子目录以及一个名为 `index.theme` 的文件。
* gtk-2.0
* gtk-3.0
* metacity-1
* unity
* gtk-2.0
* gtk-3.0
* metacity-1
* unity
“**index.theme**”含有元数据(比如主题的名字)和一些重要的配置(比如按钮的布局)。下面是”Ambiance“主题的”index.theme“文件内容。
`index.theme` 含有元数据(比如主题的名字)和一些重要的配置(比如按钮的布局)。下面是 Ambiance 主题的 `index.theme` 文件内容。
代码:
```
[Desktop Entry]
Type=X-GNOME-Metatheme
@ -64,9 +68,8 @@ ButtonLayout=close,minimize,maximize:
X-Ubuntu-UseOverlayScrollbars=true
```
”**gtk-2.0**“目录包括支持 GTK2 的文件比如文件”gtkrc“和文件夹”apps“。文件夹”apps“包括具体程序的 GTK 配置。文件”gtkrc“是 GTK2 部分的主要 CSS 文件。下面是 /usr/share/themes/Ambiance/gtk-2.0/apps/nautilus.rc 文件的内容。
`gtk-2.0` 目录包括支持 GTK2 的文件,比如文件 `gtkrc` 和文件夹 `apps`。文件夹 `apps` 包括具体程序的 GTK 配置。文件 `gtkrc` 是 GTK2 部分的主要 CSS 文件。下面是 `/usr/share/themes/Ambiance/gtk-2.0/apps/nautilus.rc` 文件的内容。
代码:
```
# ==============================================================================
# NAUTILUS SPECIFIC SETTINGS
@ -81,9 +84,8 @@ widget_class "*Nautilus*<GtkButton>" style "notebook_button"
widget_class "*Nautilus*<GtkButton>*<GtkLabel>" style "notebook_button"
```
”**gtk-3.0**“目录里是 GTK3 的文件。GTK3 使用”gtk.css“取代了"gtkrc",作为主文件。对于 Ambiance 主题,此文件有一行‘@import url("gtk-main.css");。”settings.ini“是重要的主题范围配置文件。GTK3 主题的”apps“目录和 GTK2 有同样的作用。”assets“目录里有单选按钮、多选框等的图像文件。下面是 /usr/share/themes/Ambiance/gtk-3.0/gtk-main.css 的内容。
`gtk-3.0` 目录里是 GTK3 的文件。GTK3 使用 `gtk.css` 取代了 `gtkrc` 作为主文件。对于 Ambiance 主题,此文件有一行 `@import url("gtk-main.css");`。`settings.ini` 包含重要的主题级配置。GTK3 主题的 `apps` 目录和 GTK2 有同样的作用。`assets` 目录里有单选按钮、多选框等的图像文件。下面是 `/usr/share/themes/Ambiance/gtk-3.0/gtk-main.css` 的内容。
代码:
```
/*default color scheme */
@define-color bg_color #f2f1f0;
@ -155,14 +157,14 @@ widget_class "*Nautilus*<GtkButton>*<GtkLabel>" style "notebook_button"
@import url("public-colors.css");
```
”**metacity-1**“文件夹含有 Metacity 窗口管理器按钮比如”关闭窗口“按钮的图像文件。此目录还有一个名为”metacity-theme-1.xml“的文件,包括了主题的元数据(像开发者的名字)和主题设计。然而,主题的 Metacity 部分使用 XML 文件而不是 CSS 文件。
`metacity-1` 文件夹含有 Metacity 窗口管理器按钮(比如“关闭窗口”按钮)的图像文件。此目录还有一个名为 `metacity-theme-1.xml` 的文件,包括了主题的元数据(像开发者的名字)和主题设计。然而,主题的 Metacity 部分使用 XML 文件而不是 CSS 文件。
”**unity**“文件夹含有 Unity 按钮使用的 SVG 文件。除了 SVG 文件,这里没有其他的文件。
`unity` 文件夹含有 Unity 按钮使用的 SVG 文件。除了 SVG 文件,这里没有其他的文件。
一些主题可能也会包含其他的目录。比如, Clearlooks-Phenix 主题有名为 `openbox-3``xfwm4` 的文件夹。`openbox-3` 文件夹仅有一个 `themerc` 文件,声明了主题配置和外观(下面有文件示例)。`xfwm4` 目录含有几个 xpm 文件、几个 png 图像文件(在 `png` 文件夹里)、一个 `README` 文件,还有个包含了主题配置的 `themerc` 文件(就像下面看到的那样)。
一些主题可能也会包含其他的目录。比如“Clearlooks-Phenix”主题有名为”**openbox-3**”和“**xfwm4**“的文件夹。”openbox-3“文件夹仅有一个”themerc“文件声明了主题配置和外观下面有文件示例。”xfwm4“目录含有几个 xpm 文件,几个 png 图像文件在”png“文件夹里一个”README“文件还有个包含了主题配置的”themerc“文件就像下面看到的那样
/usr/share/themes/Clearlooks-Phenix/xfwm4/themerc
代码:
```
# Clearlooks XFWM4 by Casey Kirsle
@ -182,7 +184,6 @@ title_vertical_offset_inactive=1
/usr/share/themes/Clearlooks-Phenix/openbox-3/themerc
代码:
```
!# Clearlooks-Evolving
!# Clearlooks as it evolves in gnome-git...
@ -349,16 +350,17 @@ osd.unhilight.bg.color: #BABDB6
osd.unhilight.bg.colorTo: #efefef
```
**测试主题**
在创作主题时,测试主题并且微调代码对得到想要的样子是很有帮助的。有相当的开发者想要用到”主题预览器“这样的工具呢。幸运的是,已经有了。
### 测试主题
* GTK+ Change Theme - 这个程序可以更改 GTK 主题开发者可以用它预览主题。这个程序由一个含有很多构件的窗口组成因此可以为主题提供一个完整的预览。要安装它只需输入命令”apt-get install gtk-chtheme“。
* GTK Theme Switch - 用户可以使用它轻松的更换用户主题。测试主题时确保打开了一些应用方便预览效果。要安装它只需输入命令”apt-get install gtk-theme-switch“然后在终端敲出”gtk-theme-switch2“即可运行。
* LXappearance - 它可以更换主题,图标以及字体。
* PyWF - 这是”The Widget Factory“的一个基于 Python 的可选组件。可以在[http://gtk-apps.org/content/show.php/PyTWF?content=102024][1]获取Pywf。
* The Widget Factory - 这是一个古老的 GTK 预览器。要安装它只需输入命令”apt-get install thewidgetfactory"然后在终端敲出“twf”即可运行。
在创作主题时,测试主题并且微调代码对得到想要的样子是很有帮助的。有相当的开发者想要用到“主题预览器”这样的工具。幸运的是,已经有了。
**主题下载**
* GTK+ Change Theme - 这个程序可以更改 GTK 主题,开发者可以用它预览主题。这个程序由一个含有很多构件的窗口组成,因此可以为主题提供一个完整的预览。要安装它,只需输入命令 `apt-get install gtk-chtheme`
* GTK Theme Switch - 用户可以使用它轻松地更换用户主题。测试主题时确保打开了一些应用,方便预览效果。要安装它,只需输入命令 `apt-get install gtk-theme-switch`,然后在终端敲出 `gtk-theme-switch2` 即可运行。
* LXappearance - 它可以更换主题,图标以及字体。
* PyWF - 这是基于 Python 开发的一个 The Widget Factory 的替代品。可以在 [http://gtk-apps.org/content/show.php/PyTWF?content=102024][1] 获取 PyWF。
* The Widget Factory - 这是一个古老的 GTK 预览器。要安装它,只需输入命令 `apt-get install thewidgetfactory`,然后在终端敲出 `twf` 即可运行。
### 主题下载
* Cinnamon - [http://gnome-look.org/index.php?xcontentmode=104][2]
* Compiz - [http://gnome-look.org/index.php?xcontentmode=102][3]
@ -370,7 +372,7 @@ osd.unhilight.bg.colorTo: #efefef
* Metacity - [http://gnome-look.org/index.php?xcontentmode=101][9]
* Ubuntu Themes - [http://www.ubuntuthemes.org/][10]
**延伸阅读**
### 延伸阅读
* Graphical User Interface (GUI) Reading Guide - [http://www.linux.org/threads/gui-reading-guide.6471/][11]
* GTK - [http://www.linux.org/threads/understanding-gtk.6291/][12]
@ -385,7 +387,7 @@ via: http://www.linux.org/threads/installing-obtaining-and-making-gtk-themes.846
作者:[DevynCJohnson][a]
译者:[fuowang](https://github.com/fuowang)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,130 @@
6 个值得好好学习的 JavaScript 框架
=====================
![值得好好学习的 6 个 JavaScript 框架](https://discoversdkcdn.azureedge.net/postscontent/products/java.png)
**常言道,条条大路通罗马,可是那一条适合我呢?** 由于用于构建前端页面等现代技术的出现JavaScript 在 Web 开发社区早已是如雷贯耳。通过在网页上编写几个函数并提供执行逻辑,可以很好的支持 HTML (主要是用于页面的 _表现_ 或者 _布局_)。如果没有 JavaScript那页面将没有任何 _交互特性_ 可言。
现在的框架和库的已经从蛮荒时代崛起了,很多老旧的技术纷纷开始将功能分离成模块。现在不再需要在整个核心语言中支持所有特性了,开发者允许所有用户创建库和框架来增强核心语言的功能。这样,语言的灵活性获得了了显著提高。
如果在已经在使用 **JavaScript** (以及 **JQuery**) 来支持 HTML那么你肯定知道开发和维护一个大型应用需要付出多大的努力以及编写多么复杂的代码而 JavaScript 框架可以帮助你快速的构建交互式 Web 应用 (包含单页面应用或者多页面应用)。
当一个新手开发者想要学习 JavaScript 时,他常常会被各种 JavaScript 框架所吸引,也幸亏有为数众多的社区,任何开发者都可以轻易地通过在线教程或者其他资源来学习。
但是,唉!多数的程序员都很难决定学习和使用哪一个框架。因此在本文中,我将为大家推荐 6 个值得好好学习的 JavaScript 框架。让我们开始吧。
### 1、AngularJS
![Angular](https://discoversdkcdn.azureedge.net/postscontent/products/AngularJS_logo.svg.png)
**(注:这是我个人最喜欢的框架)**
无论你是何时听说的 JavaScript很可能你早就听过 AngularJS因为这是在 JavaScript 社区中最为广泛使用的框架了。它发布于 2000 年,由 Google 开发 (这够有说服力让你是用了吧) ,它是一个开源项目,这意味着你可以阅读、编辑和修改其源代码以便更加符合自身的需求,并且不用向其开发者支付一分钱 (这不是很酷吗?)。
如果说你觉得通过纯粹的 JavaScript 代码编写一个复杂的 Web 应用比较困难的话,那么你肯定会兴奋的跳起来,因为它将显著地减轻你的编码负担。它符合支持双向数据绑定的 MVC (Modelviewcontroller模型-视图-控制) 设计典范。假如你不熟悉 MVC你只需要知道它代表着无论何时探测到某些变化它将自动更新前端 (比如,用户界面端) 和后端 (代码或者服务器端) 数据。
MVC 可为大大减少构建复杂应用程序所需的时间和精力,所有你只需要集中精力于一处即可 (DOM 编程接口会自动同步更新视图和模型)。由于 _视图组件__模型组件_ 是分离的,你可以很容易的创建一个可复用的组件,使得用户界面的效果非常好看。
如果因为某些原因,你已经使用了 **TypeScript** (一种与 JavaScript 非常相似的语言),那么你可以很容易就上手 AngularJS因为这两者的语法高度相似。与 **TypeScript** 相似这一特点在一定程度上提升了 AngularJS 的受欢迎程度。
目前Angular 2.0 已经发布,并且提升了移动端的性能,这也足以向一个新的开发者证明,该框架的开发活跃的够高并且定期更新。
AngularJS 有着大量的用户,包括 (但不限于) Udemy、Forbes、GoDaddy、Ford、NBA 和 Oscars。
对于那些想要一个高效的 MVC 框架,用来开发面面俱到、包含健壮且现代化的基础架构的单页应用的用户来说,我极力的推荐这个框架。这是第一个为无经验 JavaScript 开发者设计的框架。
### 2、React
![React](https://discoversdkcdn.azureedge.net/postscontent/react%20%281%29.png)
与 AngularJS 相似React 也是一个 MVC (Modelviewcontroller模型-视图-控制) 类型的框架,但不同的是,它完全针对于 _视图组件_ (因为它是为 UI 特别定制的) 并且可与任何架构进行无缝衔接。这意味着你可以马上将它运用到你的网站中去。
它从核心功能中抽象出 DOM 编程接口 (并且因此使用了虚拟 DOM),所以你可以快速的渲染 UI这使得你能够通过 _node.js_ 将它作为一个客户端框架来使用。它是由 Facebook 开发的开源项目,还有其它的开发者为它贡献代码。
假如说你见到过并喜欢 Facebook 和 Instagram 的界面,那么你将会爱上 React。通过 React你可以给你的应用的每个状态设计一个简单的视图当数据改变的时候视图也自动随之改变。只要你想的话可以创建各种的复杂 UI也可以在任何应用中复用它。在服务器端React 同样支持通过 _node.js_ 来进行渲染。对于其他的接口React 也一样表现得足够的灵活。
除 Facebook 和 Instagram 外,还有好多公司也在使用 React包括 Whatsapp、BBC、、PayPal、Netflix 和 Dropbox 等。
如果你只需要一个前端开发框架来构建一个非常复杂且界面极好的强大视图层,那我极力向你推荐这个框架,但你需要有足够的经验来处理各种类型的 JavaScript 代码,而且你再也不需要其他的组件了 (因为你可以自己集成它们)。
### 3、Ember
![Ember](https://discoversdkcdn.azureedge.net/postscontent/Ember.js_Logo_and_Mascot.png)
这个 JavaScript 框架在 2011 年正式发布,是由 _Yehuda Katz_ 开发的开源项目。它有一个庞大且活跃的在线社区,所有在有任何问题时,你都可以在社区中提问。该框架吸收融合了非常多的通用 JavaScript 风格和经验,以便确保开发者能最快的做到开箱即用。
它使用了 MVVM (Modelviewviewmodel模型-视图-视图模型) 的设计模式,这使得它与 MVC 有些不一样,因为它由一个 _连接器 (binder)_ 帮助视图和数据连接器进行通信。
对于 DOM 编程接口的快速服务端渲染,它借助了 _Fastboot.js_,这能够让那些复杂 UI 的性能得到极大提高。
它的现代化路由模式和模型引擎还支持 _RESTful API_这可以却确保你可以使用这种最新的技术。它支持句柄集成模板Handlebars integrated template用以自动更新数据。
早在 2015 年间,它的风头曾一度盖过 AngularJS 和 React被称为最好的 JavaScript 框架,对于它在 JavaScript 社区中的可用性和吸引力,这样的说服力该是足够了的。
对于不追求高灵活性和大型架构的用户,并且仅仅只是为了赶赴工期、完成任务的话,我个人非常推荐这个 JavaScript 框架,
### 4、Adonis
![Adonis](https://discoversdkcdn.azureedge.net/postscontent/products/adonis.jpg)
如果你曾使用过 _Laravel__NodeJS_,那么你在使用这一个框架之时会觉得相当顺手,因为它是集合了这两个平台的优点而形成的一个框架,对于任何种类的现代应用来说,它都显得非常专业、圆润和精致。
它使用了 _NodeJS_,所以是一个很好的后端框架,同时还附带有一些前端特性 (与前面提到那些更多地注重前端的框架不同),所以想要进入后端开发的新手开发者会发觉这个框架相当迷人。
相比于 _NoSQL_,很多的开发者都比价喜欢使用 _SQL_ 数据库 (因为他们需要增强和数据以及其它特性的交互性),这一现象在这个框架中得到了很好的体现,这时的它更接近标准,开发者也更容易使用。
如果你混迹于各类 PHP 社区,那你一定很熟悉 **服务提供商 (Service Providers)**,也由于 Adonis 相应的 PHP 风格包含其中,所以在使用它的时候,你会觉得似曾相识。
在它所有的特性中,最好的便是那个极为强大的路由引擎,支持使用函数来组织和管理应用的所有状态、支持错误处理机制、支持通过 SQL ORM 来进行数据库查询、支持生成器、支持箭头函数 (arrow functions)、支持代理等等。
如果喜欢使用无状态 REST API 来构建服务器端应用,我比较推荐它,因为你会爱上这个框架的。
### 5、Vue.js
![Vue.js](https://discoversdkcdn.azureedge.net/postscontent/products/vuejs-logo.png)
这一个开源的 JavaScript 框架,发布于 2014 年,它有个极为简单的 API用以为现代 Web 界面Modern Web Interface开发交互式组件 (Reactive components)。其设计着重于简单易用。与 Ember 相似,它使用的是 MVVM (Modelviewviewmodel模型-视图-视图模型) 设计范例,这样简化了设计。
这个框架最有吸引力的一点是,你可以根据自身需求来选择使用的模块。比如,你需要编写简单的 HTML 代码,抓取 JSON然后创建一个 Vue 实例来完成可以复用的小特效。
与之前的那些 JavaScript 框架相似,它使用双路数据绑定来更新模型和视图,同时也使用连接器来完成视图和数据连接器的通信。这是一个还未完全成熟的框架,因为它全部的关注点都在视图层,所以你需要自己处理其它的组件。
如果你熟悉 _AngularJS_,那你会感觉很顺手,因为它大量嵌入了 _AngularJS_ 的架构,如果你懂得 JavaScript 的基础用法,那你的许多项目都可以轻易地迁移到该框架之下。
假如你只想把任务完成,或者想提升你自身的 JavaScript 编程经验,又或者你需要学习不同的 JavAScript 框架的本质,我极力推荐这个。
### 6、Backbone.js
![Backbone.JS](https://discoversdkcdn.azureedge.net/postscontent/products/backbonejs.png)
这个框架可以很容易的集成到任何第三方的模板引擎,默认使用的是 _Underscore_ 模板引擎,而且该框架仅有一个依赖 (**JQuery**),因此它以轻量而闻名。它支持带有 **RESTful JSON** 接口的 MVC (Modelviewcontroller模型-视图-控制) (可以自动更新前端和后端) 设计范例。
假如你曾经使用过著名的社交新闻网络服务 **reddit**,那么你肯定听说过它在几个单页面应用中使用了 **Backbone.js**。**Backbone.js** 的原作者为之建立了与 _CoffeScript_ 旗鼓相当的 _Underscore_ 模板引擎,所以你可以放心,开发者知道该做什么。
该框架在一个软件包中提供了键值对 (key-value) 模型、视图以及几个打包的模块,所以你不需要额外下载其他的外部包,这样可以节省不少时间。框架的源码可以在 GitHub 进行查看,这意味着你可以根据需求进行深度定制。
如果你是寻找一个入门级框架来快速构建一个单页面应用,那么这个框架非常适合你。
### 总而言之
至此,我已经在本文着重说明了 6 个值得好好学习的 JavaScript 框架,希望你读完本文后能够决定使用哪个框架来完成自己的任务。
如果说对于选择框架,你还是不知所措,请记住,这个世界是实践出真知而非教条主义的。最好就是从列表中挑选一个来使用,看看最后是否满足你的需求和兴趣,如果还是不行,接着试试另一个。你也尽管放心好了,列表中的框架肯定是足够了的。
-------------------------------
译者简介:
[GHLandy](http://GHLandy.com) —— 生活中所有欢乐与苦闷都应藏在心中,有些事儿注定无人知晓,自己也无从说起。
-------------------------------
via: http://www.discoversdk.com/blog/6-best-javascript-frameworks-to-learn-in-2016
作者:[Danyal Zia][a]
译者:[GHLandy](https://github.com/GHLandy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.discoversdk.com/blog/6-best-javascript-frameworks-to-learn-in-2016

View File

@ -0,0 +1,82 @@
如何在 RHEL 上设置 Linux RAID 1
============================================================
### 设置 Linux RAID 1
配置 LINUX RAID 1 非常重要,因为它提供了冗余性。
RAID 分区拥有高级功能,如冗余和更好的性能。所以让我们来说下如何实现 RAID以及让我们来看看不同类型的 RAID
- RAID 0条带磁盘组合在一起形成一个更大的驱动器。这以可用性为代价提供了更好的性能。如果 RAID 中的任何一块磁盘出现故障,则整个磁盘集将无法使用。最少需要两块磁盘。
- RAID 1镜像磁盘从一个复制到另一个提供了冗余。如果一块磁盘发生故障则另一块磁盘接管它有另外一份原始磁盘的数据的完整副本。其缺点是写入时间慢。最少需要两块磁盘。
- RAID 5带奇偶校验的条带磁盘类似于 RAID 0并且连接在一起以形成一个大型驱动器。这里的区别是25 的磁盘用于奇偶校验位,这允许在单个磁盘发生故障时可以恢复磁盘。最少需要三块盘。
让我们继续进行 Linux RAID 1 配置。
安装 Linux RAID 1 的要求:
1、系统中应该安装了 mdam请用下面的命令确认。
```
[root@rhel1 ~]# rpm -qa | grep -i mdadm
mdadm-3.2.2-9.el6.x86_64
[root@rhel1 ~]#
```
2、 系统应该连接了 2 块磁盘。
创建两个分区一个磁盘一个分区sdc、sdd每个分区占据整块磁盘。
```
Disk /dev/sdc: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x67cc8cfb
Device Boot Start End Blocks Id System
/dev/sdc1 1 130 1044193+ 83 Linux
Disk /dev/sdd: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0294382b
Device Boot Start End Blocks Id System
/dev/sdd1 1 130 1044193+ 83 Linux
```
--------------------------------------------------------------------------------
作者简介:
大家好!我是 Manmohan Mirkar。我很高兴见到你们我在 10 多年前开始使用 Linux我从来没有想过我会到今天这个地步。我的激情是帮助你们获取 Linux 知识。谢谢阅读!
--------------------------------------------------------------------------------
via: http://www.linuxroutes.com/linux-raid-1/
作者:[Manmohan Mirkar][a]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.linuxroutes.com/author/admin/
[1]:http://www.linuxroutes.com/linux-raid-1/#
[2]:http://www.linuxroutes.com/linux-raid-1/#
[3]:http://www.linuxroutes.com/linux-raid-1/#
[4]:http://www.linuxroutes.com/linux-raid-1/#
[5]:http://www.linuxroutes.com/linux-raid-1/#
[6]:http://www.linuxroutes.com/linux-raid-1/#
[7]:http://www.linuxroutes.com/linux-raid-1/#
[8]:http://www.linuxroutes.com/linux-raid-1/#
[9]:http://www.linuxroutes.com/linux-raid-1/#
[10]:http://www.linuxroutes.com/linux-raid-1/#
[11]:http://www.linuxroutes.com/linux-raid-1/#
[12]:http://www.linuxroutes.com/author/admin/
[13]:http://www.linuxroutes.com/linux-raid-1/#respond

View File

@ -1,38 +1,31 @@
配置 logrotate 的终指导
配置 logrotate 的终指导
============================================================
一般来说,日志是任何故障排除过程中非常重要的一部分,但这些日志会随着时间增长。在这种情况下,我们需要手动执行日志清理以回收空间,这是一件繁琐的管理任务。为了解决这个问题,我们可以在 Linux 中配置 logrotate 程序,它可以自动执行日志文件的轮换、压缩、删除和用邮件发出。
Generally speaking Logs are very much important part of any troubleshooting activity, However these logs grows in size with time. In this case we need to perform log cleanup manually in order to reclaim the space and its tedious task to administer these logs. To overcome this we can configure logrotate utility available in Linux which automatically does rotation, compression , removal and mailing of logfile.
我们可以配置 logrotate 程序,以便每个日志文件可以在每天、每周、每月或当它变得太大时处理。
We can configure logrotate utility so that each log file may be handled daily, weekly, monthly,or when it grows too large.
### logrotate 是如何工作的
How logrotate utility works:
By default, the logrotate command runs as a cron job once a day from `/etc/cron.daily`, and it helps you set a policy where log-files that grow beyond a certain age or size are rotated.
一般来说,日志是任何故障排除中非常重要的一部分,但这些日志会随着时间增长。在这种情况下,我们需要手动执行日志清理,以回收空间以及管理这些日志的繁琐的任务。为了克服这个问题,我们可以在 Linux 中配置 logrotate 程序,它可以自动执行日志文件的轮换、压缩、删除和邮件发送。
我们可以配置 logrotate 程序,以便每个日志文件可以每天、每周、每月或当它变得太大时处理。
logrotate 是如何工作的:
默认情况下logrotate 命令作为 cron 作业从 /etc/cron.daily 中每天运行一次,它会帮助你设置一个策略,其中超过某个时间或大小的日志文件被轮换。
默认情况下logrotate 命令作为放在 `/etc/cron.daily` 中的 cron 任务,每天运行一次,它会帮助你设置一个策略,其中超过某个时间或大小的日志文件被轮换。
命令: `/usr/sbin/logrotate`
配置文件: `/etc/logrotate.conf`
这是 logrotate 的主配置文件。logrotate 还在 “`/etc/logrotate.d/`” 中存储了特殊服务配置。确保下面的那行包含在 `/etc/logrotate.conf` 中,以读取特定服务日志配置。
这是 logrotate 的主配置文件。logrotate 还在 `/etc/logrotate.d/` 中存储了特定服务的配置。确保下面的那行包含在 `/etc/logrotate.conf` 中,以读取特定服务日志配置。
` include /etc/logrotate.d`
```
include /etc/logrotate.d`
```
logrotate 历史: `/var/lib/logrotate.status`
logrotate 历史 `/var/lib/logrotate.status`
重要的 logrotate 选项:
```
compress --> 压缩日志文件的所有非当前版本
daily,weekly,monthly --> 按指定计划轮换日志文件
daily,weekly,monthly --> 按指定计划轮换日志文件
delaycompress --> 压缩所有版本,除了当前和下一个最近的
endscript --> 标记 prerotate 或 postrotate 脚本的结束
errors "emailid" --> 给指定邮箱发送错误通知
@ -41,21 +34,23 @@ notifempty --> 如果日志文件为空,则不轮换日志文件
olddir "dir" --> 指定日志文件的旧版本放在 “dir” 中
postrotate --> 引入一个在日志被轮换后执行的脚本
prerotate --> 引入一个在日志被轮换前执行的脚本
rotate 'n' --> 在轮换方案中包含日志的 N 个版本
rotate 'n' --> 在轮换方案中包含日志的 n 个版本
sharedscripts --> 对于整个日志组只运行一次脚本
size='logsize' --> 在日志大小大于 logsize例如100K4M时轮换
size='logsize' --> 在日志大小大于 logsize例如 100K4M时轮换
```
让我们为我们自己的示例日志文件 “`/tmp/sample_output.log`” 配置 logrotate。
### 配置
第一步:在 “`/etc/logrotate.conf`” 中添加下面的行。
让我们为我们自己的示例日志文件 `/tmp/sample_output.log` 配置 logrotate。
第一步:在 `/etc/logrotate.conf` 中添加以下行。
```
/tmp/sample_output.log {
size 1k
create 700 root root
rotate 4
compress
size 1k
create 700 root root
rotate 4
compress
}
```
@ -63,10 +58,10 @@ compress
* size 1k - logrotate 仅在文件大小等于(或大于)此大小时运行。
* create - 轮换原始文件并创建具有指定权限、用户和组的新文件。
* rotate - 限制日志文件轮转的数量。因此这将只保留最近的4个轮转的日志文件。
* rotate - 限制日志文件轮转的数量。因此,这将只保留最近的 4 个轮转的日志文件。
* compress - 这将压缩文件。
第二步:通常,你需要等待一天直到 logrotate 在 `/etc/cron.daily` 中执行。如此之外,你可以用下面的命令在命令行中运行:
第二步:通常,你需要等待一天才能等到 logrotate 由 `/etc/cron.daily` 执行。除此之外,你可以用下面的命令在命令行中运行:
```
/usr/sbin/logrotate /etc/logrotate.conf
@ -96,7 +91,7 @@ total 12
作者简介:
大家好!我是 Manmohan Mirkar。我很高兴你们在这里!我在 10 多年前开始使用 Linux我从来没有想过我会到今天这个地步。我的激情是帮助你们获取 Linux 知识。谢谢你们在这!
大家好!我是 Manmohan Mirkar。我很高兴见到你们!我在 10 多年前开始使用 Linux我从来没有想过我会到今天这个地步。我的激情是帮助你们获取 Linux 知识。谢谢你们在这!
--------------------------------------------------------------------------------
@ -104,7 +99,7 @@ via: http://www.linuxroutes.com/configure-logrotate/
作者:[Manmohan Mirkar][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,24 +1,25 @@
立即提高在线安全的四种方法
四种立即改善在线安全的方法
============================================================
![4 ways to improve your security online right now](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/rh_003601_05_mech_osyearbook2016_security_cc.png?itok=VNmpz6K- "4 ways to improve your security online right now")
![4 ways to improve your security online right now](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/rh_003601_05_mech_osyearbook2016_security_cc.png?itok=VNmpz6K- "4 ways to improve your security online right now")
图片提供 : Opensource.com
过去几年来,关于数字安全漏洞和个人隐私问题的报频率大幅上升,毫无疑问,这一趋势仍将继续。我们时常听说诈骗者转移到社交媒体,国家使用网络攻击作为协调进攻策略的一部分,以及追踪我们在线行为的公司挣到大钱,快速崛起。
过去几年来,关于数字安全漏洞和个人隐私问题的报频率大幅上升,毫无疑问,这一趋势仍将继续。我们时常听说诈骗者转移到社交媒体,国家网络攻击作为协调进攻策略的一部分,以及追踪我们在线行为的公司挣到大钱,快速崛起。
对这些事件冷漠对待非常容易,但是你可以做很多事情来提高你的在线安全,这样当你被安全事件所困时,可以减少自己的风险,并快速保护自己免受进一步的损失。安全意识非常容易学习,并且许多开源项目可以帮助你。
安全的重点不是将你的计算机变成一个虚拟的 Fort KnoxLCTT译注Fort Knox 是一个美军基地,固若金汤之意),而是为了使别人访问你的数据足够困难,这样攻击者将转移到其他更容易的目标。
安全的重点不是将你的计算机变成一个虚拟的 Fort KnoxLCTT 译注Fort Knox 是一个美军基地,固若金汤之意),而是为了使别人访问你的数据足够困难,这样攻击者将转移到其他更容易的目标。
### 使用密码管理器
在一个几乎每个网站都要求用户名和密码的世界里,大多数人都因密码而疲惫不堪,于是开发了复杂的系统来创建和记住用户名和密码(或者干脆完全放弃,只使用相同的用户名和密码)。密码管理器是这个问题的解决方案,我还不知道不使用密码管理器的专业安全人员。此外,它们非常容易设置和使用。
在一个几乎每个网站都要求用户名和密码的世界里,大多数人都因密码而疲惫不堪,于是开发了复杂的系统来创建和记住用户名和密码(或者干脆完全放弃,只使用相同的用户名和密码)。密码管理器是这个问题的解决方案,我还不知道不使用密码管理器的专业安全人员。此外,它们非常容易设置和使用。
对于以前没有使用过的人来说,密码管理器是一种软件,它就像一个信息的数字保险库,将信息存储在加密环境中。你创建的主密码是一个单一的强密码,用于保护包含用户名和密码集合的保险库。通常,当你连接到已知网站,密码管理器会自动输入存储的密码,生成强密码并允许你存储其他信息。
对于以前没有使用过的人来说,密码管理器是一种软件,它就像一个信息的数字保险库,将信息存储在加密环境中。你创建的主密码是一个单一的强密码,用于保护包含用户名和密码集合的保险库。通常,当你连接到已知网站,密码管理器会自动输入存储的密码,它也可以生成强密码并允许你存储其他信息。
有大量的密码管理器可用,其中许多是自由及开源的解决方案。我在 Windows 上用过 [KeePass][4],在 Linux 和 MacOS 上用过[KeePassX][5],我推荐使用他们作为开始。(这里还有三个[开源密码管理器][6],你可以尝试一下。)
有大量的密码管理器可用,其中许多是自由及开源的解决方案。我在 Windows 上用过 [KeePass][4],在 Linux 和 MacOS 上用过 [KeePassX][5],我推荐使用它们作为开始。(这里还有三个[开源密码管理器][6],你可以尝试一下。)
然而,每个人应该选择他自己的最佳解决方案。某些密码管理器除了本地存储之外还具有云存储的功能,如果你使用多个设备,这将非常有用。更受欢迎的管理器更有可能被维护并接受定期的安全更新。一些密码管理器集成双因子认证功能,我强烈建议你启用它。
然而,每个人应该选择他自己的最佳解决方案。某些密码管理器除了本地存储之外还具有云存储的功能,如果你使用多个设备,这将非常有用。受欢迎的管理器更有可能被维护并得到定期的安全更新。一些密码管理器集成双因子认证功能,我强烈建议你启用它。
大多数密码管理器都没有恢复忘记的主密码的功能。所以要明智地选择并确保主密码是你可以记住的。
@ -30,24 +31,24 @@
当选择 VPN 提供商时,请考虑其运营所在的国家,因为这关系到它所受约束的法律,有时甚至非常无关痛痒的活动都可能使您陷入困境。
[OpenVPN][7] 是一个免费和开源的 VPN 协议,可在大多数平台上使用,并已成为最广泛使用的 VPN 之一。 您甚至可以托管您自己的 OpenVPN 服务器 -- 只是要小心,注意其安全性。如果您更希望使用 VPN 服务,请记住许多声誉良好的提供商都想要您的业务。
[OpenVPN][7] 是一个自由开源的 VPN 协议,可在大多数平台上使用,并已成为最广泛使用的 VPN 之一。 您甚至可以托管您自己的 OpenVPN 服务器 -- 只是要小心,注意其安全性。如果您更希望使用 VPN 服务,请记住许多声誉良好的提供商都想要为您提供服务。
有些是收费的,如 [ExpressVPN][8][NordVPN][9] 或 [AirVPN][10]。一些提供商提供免费服务,但是,我强烈建议您不要使用它们。 请记住,当您使用免费服务时,您的数据就是产品。
有些是收费的,如 [ExpressVPN][8][NordVPN][9] 或 [AirVPN][10]。一些提供商提供免费服务,但是,我强烈建议您不要使用它们。 请记住,当您使用免费服务时,您的数据就是产品。
### 浏览器扩展程序是您的朋友
虽然互联网浏览器有一些内置的安全工具,但是扩展仍然是提升您的隐私和安全的好方法。有很多种类的扩展,但哪些扩展是适合你的? 这可能取决于你使用互联网的主要目的和你对技术的掌握程度。作为基线,我会使用以下扩展:
虽然互联网浏览器有一些内置的安全工具,但是浏览器扩展仍然是提升您的隐私和安全的好方法。有很多种类的浏览器扩展,但哪些扩展是适合你的? 这可能取决于你使用互联网的主要目的和你对技术的掌握程度。作为基线,我会使用以下扩展:
* [Privacy Badger][1]:这个扩展,由 EFF 开发,阻止间谍广告和隐蔽的跟踪。它通过在流量请求中放置一个 Do Not Track 头,然后评估流量仍被跟踪的可能性。如果这种可能性很高,它会阻止来自该域的进一步流量(除非你另有说明)。扩展在 GNU GPL v3 下获得许可
* [HTTPS Everywhere][2]:它是 EFF 和 Tor 项目之间的联合协作,此扩展确保尽可能自动使用 HTTPS。这很重要因为它意味着您给定域的网络流量是加密的而不是明文从而提供隐私,并确保交换数据的完整性。扩展在 GNU GPL v3 下获得许可
* [Privacy Badger][1]:这个扩展,由 EFF 开发,阻止间谍广告和隐蔽的跟踪。它通过在流量请求中放置一个 Do Not Track 头,然后评估流量仍被跟踪的可能性。如果这种可能性很高,它会阻止来自该域的进一步流量(除非你另有说明)。该扩展使用 GNU GPL v3 许可证
* [HTTPS Everywhere][2]:它是 EFF 和 Tor 项目之间的联合协作,此扩展确保尽可能自动使用 HTTPS。这很重要因为它意味着您给定域的网络流量是加密的,而不是明文,从而提供了隐私,并确保交换数据的完整性。该扩展使用 GNU GPL v3 许可证
### 不要忘记旧帐户
你还记得 BeboiTunes PingDel.icio.usDiggMySpace 或 Friendster 吗?它们上面你有帐户吗?你关闭了帐户还是仅仅停止使用帐户?你曾经停下来想一想什么信息可能在这些网站上吗?是不是忘记了?
你还记得 Bebo、iTunes Ping、Del.icio.us、Digg、MySpace 或 Friendster 吗?它们上面你有帐户吗?你关闭了帐户还是仅仅停止使用帐户?你曾经停下来想过有什么信息可能在这些网站上吗?是不是忘记了?
旧的社交媒体帐户可以是那些收集数据的人的金矿,包括营销人员,欺诈者和黑客等。他们可以使用这些信息来构建您的个人信息,这些信息通常可以揭示一些重要信息,在密码重置中用于鉴别,例如您的第一只宠物的名字或您的第一辆车。
旧的社交媒体帐户是那些收集数据的人的金矿,包括营销人员,欺诈者和黑客等。他们可以使用这些信息来构建您的个人信息画像,这些信息通常可以在密码重置中用提供一些重要信息,例如您的第一只宠物的名字或您的第一辆车。
某些网站可能会让删除帐户变得困难或实际上不可能。[Justdelete.me][11] 是一个很好的资源,在这里可以找到各种平台上如何删除社交媒体帐户的操作说明。如果你正在寻找的网站不在那里,而且你自己找到了删除帐户的方法,你可以在 GitHub 上为该项目做贡献。如果您不确定您可能已忘记的社交媒体帐户,[Knowem.com][12]允许您按用户名搜索大量的社交网络。搜索工具也可能误报,而且你可能不是曾经使用特定用户名的唯一的人,但它是一个很好的开始,尽管不是开源的。
某些网站可能会让删除帐户变得困难或实际上不可能。[Justdelete.me][11] 是一个很好的资源,在这里可以找到各种平台上如何删除社交媒体帐户的操作说明。如果你正在寻找的网站不在那里,而且你自己找到了删除帐户的方法,你可以在 GitHub 上为该项目做贡献。如果您不确定您可能已忘记的社交媒体帐户,[Knowem.com][12] 允许您按用户名搜索大量的社交网络。搜索工具也可能误报,而且你可能不是曾经使用特定用户名的唯一的人,但它是一个很好的开始,尽管不是开源的。
如果您不确定您可能使用的旧用户名Google 是一个很好的资源。尝试搜索旧昵称和电子邮件地址,你可能会对你发现的事感到惊讶。
@ -77,7 +78,7 @@ via: https://opensource.com/article/17/1/4-ways-improve-your-online-security
[3]:https://opensource.com/article/17/1/4-ways-improve-your-online-security?rate=sa9kEW1QXWaWvvq4F5YWv2EhiAHVDoWOqzZS2a95Uas
[4]:http://keepass.info/
[5]:https://opensource.com/business/16/5/keepassx
[6]:https://opensource.com/article/16/12/password-managers
[6]:https://linux.cn/article-8055-1.html
[7]:https://openvpn.net/
[8]:https://www.expressvpn.com/
[9]:https://nordvpn.com/

View File

@ -0,0 +1,85 @@
MySQL 集群服务简介
=====================
[MySQL Cluster.me][1] 开始提供基于 **Galera Replication** 技术的 **MySQL****MariaDB** 集群服务。
在本文中我们将会讨论 **MySQL****MariaDB** 集群服务的主要特性。
[
![MySQL集群服务](http://www.tecmint.com/wp-content/uploads/2017/01/MySQL-Clusters-Service.png)
][2]
*MySQL 集群服务*
### 什么是 MySQL 集群
如果你曾经疑惑过如何提升 MySQL 数据库的可靠性和可扩展性,或许你会发现其中一个解决办法就是通过基于 **Galera Cluster** 技术的 **MySQL 集群**解决方案。
这项技术使得你可以在一个或者多个数据中心的多个服务器上获得经过同步的完整 MySQL 数据副本。这可以实现数据库的高可用性 - 当你的一个或者多个数据库服务器崩溃后,仍然能够从其它剩余服务器上获得完整的服务。
需要注意的是在 **MySQL 集群**中需要至少 3 台服务器,因为当其中一台服务器从崩溃中恢复的时候需要从仍然存活的两台服务器中选择一个**捐赠者**拷贝一份数据所以为了能够从崩溃中顺利恢复数据必须要保证两台在线服务器以便从中恢复数据。LCTT 译注:在捐赠者提供复制数据时,另外一台可以不停顿地提供服务)
同样,[MariaDB 集群][3]和 MySQL 集群在本质上是相同的,因为 MariaDB 是基于 MySQL 开发的一个更新、更优化的版本。
[
![MySQL集群与Galera复制技术](http://www.tecmint.com/wp-content/uploads/2017/01/MySQL-Clusters-Galera-Replications.png)
][4]
*MySQL 集群与 Galera 复制技术*
### 什么是 MySQL 和 MariaDB 集群服务?
**MySQL 集群**服务提供了能够同时解决可靠性和可扩展性的方案。
首先,集群服务使你能够忽略任何数据中心引起的问题,并能获得高达 **100% 正常运行时间**的数据库高可用性。
其次,将乏味无趣的 MySQL 集群相关管理工作外包出去,能够使你更加专注于业务工作。
事实上,独立管理一个集群需要你能够完成以下所有工作:
1. **安装和设置集群**  这可能需要一个有经验的数据库管理员花费数小时来设置一个可用的集群。
2. **集群监控**  必须使用一种方案 24 * 7 监控集群运作,因为很多问题都可能发生-集群不同步、服务器崩溃、硬盘空间满等。
3. **优化及调整集群大小**  当你管理了很大的数据库时,调整集群大小将会是一个巨大的挑战。处理这个任务时需要格外小心。
4. **备份管理**  为了防止集群失败带来的危险,你需要备份集群数据。
5. **解决问题**  你需要一个经验丰富的工程师来对集群进行优化及解决相关问题。
但是现在你只需要通过使用 **MySQLcluster.me** 团队提供的 **MySQL 集群服务**就可以节省大量的时间和金钱。
**MySQLcluster.me 提供的 MySQL 集群服务包括了哪些内容?**
除了很多高可用性数据服务提供的 **100%** 可用性外,你还将获得如下保证:
1. **任何时候都可以调整 MySQL 集群大小**  你可以增加或者减少集群资源(包括 RAM、CPU、DISK以便满足业务尖峰需求。
2. **优化硬盘和数据库的性能**  硬盘能够达到**10000 IOPS**,这对数据库操作十分重要。
3. **数据中心选择**  你可以选择将集群布置在哪个数据中心。当前支持的数据中心有Digital Ocean、 Amazon AWS、 RackSpace、 Google Compute Engine。
4. **24×7 集群服务支持**  我们的团队能够为你集群上发生的任何问题提供支持,甚至包括对你的集群架构提供建议。
5. **集群备份**  我们团队会为你设置备份,这样你的集群数据能够每天备份到安全的地方。
6. **集群监控**  我们团队设置了自动监控以便能够及时发现你的集群出现的问题,并提供支持,哪怕你并没有在值班。
拥有自己的 **MySQL 集群**会有很多优势,但是需要你足够耐心和有经验才行。
与 [MySQL Cluster][5] 团队联系以便找到适合你的工具包.
--------------------------------------------------------------------------------
作者简介:
我是 Ravi Saive开发了 TecMint。电脑极客和 Linux 专家,喜欢分享关于互联网的建议和点子。我的大部分服务都运行在开源平台 Linux 上。关注我的 Twitter、Facebook 和 Google+。
--------------------------------------------
via: http://www.tecmint.com/getting-started-with-mysql-clusters-as-a-service/
作者:[Ravi Saive][a]
译者:[beyondworld](https://github.com/beyondworld)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/admin/
[1]:https://www.mysqlcluster.me/#utm_source=tecmintpost1&utm_campaign=tecmintpost1&utm_medium=tecmintpost1
[2]:http://www.tecmint.com/wp-content/uploads/2017/01/MySQL-Clusters-Service.png
[3]:https://www.mysqlcluster.me/#utm_source=tecmintpost1&utm_campaign=tecmintpost1&utm_medium=tecmintpost1
[4]:http://www.tecmint.com/wp-content/uploads/2017/01/MySQL-Clusters-Galera-Replications.png
[5]:https://www.mysqlcluster.me/#utm_source=tecmintpost1&utm_campaign=tecmintpost1&utm_medium=tecmintpost1

View File

@ -0,0 +1,191 @@
使用 Yum 历史查找已安装或已删除的软件包信息
============================================================
[Yum][1] 是 RHEL/CentOS 的一个基于 rpm 的交互式高级包管理器,用户可以用它来安装新的软件包、卸载或清除旧的/不需要的软件包。它可以[自动运行系统更新][2],并执行依赖分析,对已安装的或可用的软件包进行查询等等。
在本文中,我们将解释如何查看 Yum 事务的历史记录,以便于了解有关安装的软件包以及从系统中所卸载/清除软件包的信息。
**推荐阅读:** [20 条关于 Linux 软件包管理的 Yum 命令][3]
以下是一些如何使用 Yum 历史命令的示例。
### 查看完整的 Yum 历史
要查看 Yum 事务完整的历史记录,我们可以运行以下命令,然后将显示:事务 ID、执行特定操作的用户、操作发生的日期和时间、实际操作以及任何错误的附加信息与操作
```
# yum history
```
[![查看 Yum 历史](http://www.tecmint.com/wp-content/uploads/2017/02/View-Yum-History.png)][4]
### 使用 Yum 查找软件包信息
`history` 的子命令:`info`/`list`/`summary` 可以将事务 ID 或包名作为参数。此外,`list` 子命令可以加上特殊的参数,`all` 表示所有的事务。
运行以下命令查看先前的历史:
```
# yum history list all
```
并且,你可以使用下面的 `info` 命令查看涉及指定软件包的事务详情,例如 `httpd`
```
# yum history info httpd
```
[![Yum - 查找软件包信息](http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Find-Package-Info.png)][5]
发出以下命令可以获得包含 `httpd` 软件包的事务的摘要:
```
# yum history summary httpd
```
[![Yum - 查找软件包的摘要](http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Find-Summary-of-Package.png)][6]
还可以使用事务的 ID 来查找,以下命令会显示 ID 为 `15` 的事务的详情。
```
# yum history info 15
```
[![Yum - 使用 ID 查找软件包信息](http://www.tecmint.com/wp-content/uploads/2017/02/Find-Package-Info-Using-ID.png)][7]
### 使用 yum history 查找软件包事务信息
有一些用于打印某个或多个软件包事务详情的子命令。我们可以使用 `package-list` 或 `package_info` 查看关于 `httpd` 的更多信息,例如:
```
# yum history package-list httpd
# yum history package-info httpd
```
[![Yum - 查找软件包事务信息](http://www.tecmint.com/wp-content/uploads/2017/02/Find-Package-Transaction-Info.png)][8]
要得到多个软件包的记录,我们可以运行:
```
# yum history package-list httpd epel-release
# yum history packages-list httpd epel-release
```
[![Yum - 查找多个软件包的信息](http://www.tecmint.com/wp-content/uploads/2017/02/Find-Multiple-Package-Info.png)][9]
### 使用 Yum 回滚软件包
此外,还有一些 `history` 的子命令可以让我们撤销/重做/回滚事务。
1. `undo` - 会撤销一个指定的事务。
2. `redo` - 重复一次指定的事务。
3. `rollback` - 撤销指定事务之后的所有事务。
它们采用单个事务 id 或关键字 `last` 和从最后一个事务开始的偏移量。
例如,假设我们已经做了 60 个事务,`last` 是指事务 60`last-4` 指向事务 56。
**推荐阅读:** [怎样使用 `yum-utils` 来维护以及加速 Yum][10]
以上子命令是如下工作的:如果我们有 5 个事务——VWXY 和 Z其中分别是安装各个软件包的。
```
# yum history undo 2 #将删除软件包 W
# yum history redo 2 #将重新安装软件包 W
# yum history rollback 2 #将删除软件包 X、 Y 和 Z
```
在下面的示例中,事务 2 是一个更新操作,如下所示,以下 `redo` 命令将重复事务 2 直到所有软件包到更新到当前时间的最新版本:
```
# yum history | grep -w "2"
```
[![Yum - 查找软件包事务的 ID](http://www.tecmint.com/wp-content/uploads/2017/02/Find-Yum-Package-Transaction-ID.png)][11]
```
# yum history redo 2
```
[![用 Yum 重新更新软件包](http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Redo-Package-Update.png)][12]
`redo` 子命令同样可以在我们指定事务之前加上一些可选的参数:
1. `force-reinstall` - 重新安装所有在此事务中安装的软件包(通过 `yum install`、`upgrade` 或 `downgrade`)。
2. `force-remove` - 移除所有已经更新或回滚的软件包。
```
# yum history redo force-reinstall 16
```
[![Yum - 强制安装软件包](http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Force-Install-Package.png)][13]
### 查找 Yum 历史数据库和来源信息
这些子命令为我们提供有关历史记录数据库和其它信息来源的信息:
1. `addon-info` - 提供更多的信息来源。
2. `stats` - 显示当前历史数据库的统计信息。
3. `sync` - 使我们能够更改为所有已安装软件包存储的 `rpmdb`/`yumdb` 数据。
看一下以下的命令的子命令实际上是怎样工作的:
```
# yum history addon-info
# yum history stats
# yum history sync
```
使用 `new` 子命令设置新的历史文件:
```
# yum history new
```
我们可以在 yum 手册页找到关于 Yum `history` 命令和其它几个命令的完整信息:
```
# man yum
```
**推荐阅读:** [4 个使用 Yum 禁用/锁定某些软件包更新的方法][14]
就是这么多了。在本篇指南中,我们介绍了各种 Yum `history` 命令,以查看 Yum 事务的详细信息。
--------------------------------------------------------------------------------
作者简介:
Aaron Kili 是 Linux 和 F.O.S.S 的爱好者,目前任 TecMint 的作者,志向是一名 Linux 系统管理员、web 开发者。他喜欢用电脑工作,并热衷于分享知识。
--------------------------------------------------------------------------------
via: http://www.tecmint.com/view-yum-history-to-find-packages-info/
作者:[Aaron Kili][a]
译者:[OneNewLife](https://github.com/OneNewLife)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/aaronkili/
[1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/
[2]:http://www.tecmint.com/auto-install-security-patches-updates-on-centos-rhel/
[3]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/
[4]:http://www.tecmint.com/wp-content/uploads/2017/02/View-Yum-History.png
[5]:http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Find-Package-Info.png
[6]:http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Find-Summary-of-Package.png
[7]:http://www.tecmint.com/wp-content/uploads/2017/02/Find-Package-Info-Using-ID.png
[8]:http://www.tecmint.com/wp-content/uploads/2017/02/Find-Package-Transaction-Info.png
[9]:http://www.tecmint.com/wp-content/uploads/2017/02/Find-Multiple-Package-Info.png
[10]:http://www.tecmint.com/linux-yum-package-management-with-yum-utils/
[11]:http://www.tecmint.com/wp-content/uploads/2017/02/Find-Yum-Package-Transaction-ID.png
[12]:http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Redo-Package-Update.png
[13]:http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Force-Install-Package.png
[14]:http://www.tecmint.com/yum-lock-disable-blacklist-certain-package-update-version/
[15]:http://www.tecmint.com/author/aaronkili/
[16]:http://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/
[17]:http://www.tecmint.com/free-linux-shell-scripting-books/

View File

@ -0,0 +1,65 @@
Windows wins the desktop, but Linux takes the world
============================================================
The city with the highest-profile Linux desktop projects is turning back to Windows, but the fate of Linux isn't tied to the PC anymore.
![munich2.jpg](http://zdnet3.cbsistatic.com/hub/i/r/2017/02/10/9befc3d2-7931-48df-8114-008d23f1941d/resize/770xauto/02ca33958e5288c81a85d3dac546f621/munich2.jpg)
>The fate of Munich's Linux project is only part of the story of open source software.
>Image: Getty Images/iStockphoto
After a nearly decade-long project to move away from Windows onto Linux, Munich has all but decided on a dramatic u-turn. It's likely that, by 2021, the city council will start to replace PCs running LiMux (its custom version of Ubuntu) [with Windows 10][4].
Going back maybe 15 or 20 years, it was seriously debated as to when Linux would overtake Windows on the desktop. When Ubuntu was created in 2004, for example, it was with the [specific intention of replacing Windows][5] as the standard desktop operating system.
Spoiler: it didn't happen.
Linux on the desktop has about a two percent market share today and is viewed by many as complicated and obscure. Meanwhile, Windows sails on serenely, currently running on 90 percent of PCs in use. There will likely always be a few Linux desktops around in business -- particularly for developers or data scientists.
But it's never going to be mainstream.
There has been lots of interest in Munich's Linux project because it's one of the biggest around. Few large organizations have switched from Windows to Linux, although there are some others, like [the French Gendarmerie and the city of Turin][6]. But [Munich was the poster child][7]: losing it as a case study will undoubtedly be a blow to those still [championing Linux on the desktop][8].
But the reality is that most companies are happy to go with the dominant desktop OS, given all of the advantages around integration and familiarity that come with it.
It's not entirely clear how much of the problems that some staff have complained about are down to the LiMux software and how much the operating system is being blamed for unrelated issues. But whatever Munich finally decides to do, Linux's fate is not going to be decided on the desktop -- Linux lost the desktop war years ago.
That's probably OK because Linux won the smartphone war and is doing pretty well on the cloud and Internet of Things battlefields too.
There's a four-in-five chance that there's a Linux-powered smartphone in your pocket (Android is based on the Linux kernel) and plenty of IoT devices are Linux-powered too, even if you don't necessarily notice it.
Devices [like the Raspberry Pi,][9] running a vast array of different flavours of Linux, are creating an enthusiastic community of makers and giving startups a low-cost way to power new types of devices.
Much of the public cloud is running on Linux in one form or another, too; even Microsoft has warmed up to open-source software. Regardless of your views about one software platform or another, having a rich set of options for developers and users is good for choice and good for innovation.
The dominance of the desktop is not what it once was: it's now just one computing platform among many. Indeed, the software on the PC becomes less and less relevant as more apps become device- and OS-independent, residing in the cloud instead.
The twists and turns of the Munich saga and the adventures of Linux on the desktop are fascinating, but they don't tell the full story.
_Agree? Disagree? Join the debate by posting a comment below._
--------------------------------------------------------------------------------
via: http://www.zdnet.com/article/windows-wins-the-desktop-but-linux-takes-the-world/
作者:[Steve Ranger ][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.zdnet.com/meet-the-team/uk/steve-ranger/
[1]:http://www.techrepublic.com/resource-library/whitepapers/why-munich-made-the-switch-from-windows-to-linux-and-may-be-reversing-course/
[2]:http://www.zdnet.com/article/windows-wins-the-desktop-but-linux-takes-the-world/#comments-c2df091a-2ecf-4e55-84f6-fd3309cf917d
[3]:http://www.techrepublic.com/resource-library/whitepapers/why-munich-made-the-switch-from-windows-to-linux-and-may-be-reversing-course/
[4]:http://www.techrepublic.com/article/linux-champion-munich-takes-decisive-step-towards-returning-to-windows/
[5]:http://www.techrepublic.com/article/how-mark-shuttleworth-became-the-first-african-in-space-and-launched-a-software-revolution/
[6]:http://www.techrepublic.com/pictures/10-projects-ditching-microsoft-for-open-source-plus-one-switching-back/
[7]:http://www.techrepublic.com/article/how-munich-rejected-steve-ballmer-and-kicked-microsoft-out-of-the-city/
[8]:http://www.techrepublic.com/resource-library/whitepapers/why-munich-made-the-switch-from-windows-to-linux-and-may-be-reversing-course/
[9]:http://www.zdnet.com/article/hands-on-raspberry-pi-7-inch-touch-display-and-case/
[10]:http://intent.cbsi.com/redir?tag=medc-content-top-leaderboard&siteId=2&rsid=cnetzdnetglobalsite&pagetype=article&sl=en&sc=as&topicguid=&assetguid=c2df091a-2ecf-4e55-84f6-fd3309cf917d&assettype=content_article&ftag_cd=LGN-10-10aaa0h&devicetype=desktop&viewguid=5d31a1e5-4a88-4002-ac70-1c0ca3e33bb3&q=&ctype=docids;promo&cval=33159648;7214&ttag=&ursuid=&bhid=&destUrl=http%3A%2F%2Fwww.techrepublic.com%2Fresource-library%2Fwhitepapers%2Fgraphic-design-bootcamp%2F%3Fpromo%3D7214%26ftag%3DLGN-10-10aaa0h%26cval%3Dcontent-top-leaderboard
[11]:http://intent.cbsi.com/redir?tag=medc-content-top-leaderboard&siteId=2&rsid=cnetzdnetglobalsite&pagetype=article&sl=en&sc=as&topicguid=&assetguid=c2df091a-2ecf-4e55-84f6-fd3309cf917d&assettype=content_article&ftag_cd=LGN-10-10aaa0h&devicetype=desktop&viewguid=5d31a1e5-4a88-4002-ac70-1c0ca3e33bb3&q=&ctype=docids;promo&cval=33159648;7214&ttag=&ursuid=&bhid=&destUrl=http%3A%2F%2Fwww.techrepublic.com%2Fresource-library%2Fwhitepapers%2Fgraphic-design-bootcamp%2F%3Fpromo%3D7214%26ftag%3DLGN-10-10aaa0h%26cval%3Dcontent-top-leaderboard
[12]:http://www.zdnet.com/meet-the-team/uk/steve-ranger/
[13]:http://www.zdnet.com/meet-the-team/uk/steve-ranger/
[14]:http://www.zdnet.com/topic/enterprise-software/

View File

@ -1,3 +1,4 @@
wcnnbdk1 translating
NMAP Common Scans Part One
========================

View File

@ -1,3 +1,5 @@
#rusking translating
How to Configure Network Between Guest VM and Host in Oracle VirtualBox
============================================================

View File

@ -1,165 +0,0 @@
CoreFreq A Powerful CPU Monitoring Tool for Linux Systems
============================================================
CoreFreq is a [CPU monitoring program][1] intended for the Intel 64-bits processor and supports architectures such as Atom, Core2, Nehalem, SandyBridge and above, AMD Family 0F.
Its core is established on a kernel module which helps to retrieve internal performance counters from each CPU core, and works in relation with a daemon which gathers the data and a small console client links to the daemon and displays collected data.
[
![CoreFreq CPU Monitoring](http://www.tecmint.com/wp-content/uploads/2017/02/CoreFreq-CPU-Monitoring.gif)
][2]
It offers a groundwork to recapture CPU data with a high degree of accuracy:
1. Core frequencies & ratios; SpeedStep (EIST), Turbo Boost, Hyper-Threading (HTT) as well as Base Clock.
2. Performance counters in conjunction with Time Stamp Counter (TSC), Unhalted Core Cycles (UCC), Unhalted Reference Cycles (URC).
3. Number of instructions per cycle or second, IPS, IPC, or CPI.
4. CPU C-States C0 C1 C3 C6 C7 C1E Auto/UnDemotion of C1 C3.
5. DTS Temperature along with Tjunction Max, Thermal Monitoring TM1 TM2 state.
6. Topology map including Caches for boostrap together with application CPU.
7. Processor features, brand plus architecture strings.
Note: This tool is more useful and appropriate for expert Linux users and experienced system administrators, however, novice users can gradually learn how to purposefully use it.
#### How Does CoreFreq Works
It functions by invoking a Linux Kernel module which then uses:
1. asm code to keep the readings of the performance counters as close as possible.
2. per-CPU, effects slab data memory plus high-resolution timer.
3. compliant with suspend / resume and CPU Hot-Plug.
4. a shared memory to protect kernel from the user-space part of the program.
5. atomic synchronization of threads to do away with mutexes and deadlock.
### How to Install CoreFreq in Linux
To install CoreFreq, first you need to install the prerequisites (Development Tools) to compile and build the program from source.
```
$ sudo yum group install 'Development Tools' [On CentOS/RHEL]
$ sudo dnf group install 'Development Tools' [On Fedora 22+ Versions]
# sudo apt-get install dkms git libpthread-stubs0-dev [On Debian/Ubuntu]
```
Next clone the CoreFreq source code from the Github repository, move into the download folder and compile and build the program:
```
$ git clone https://github.com/cyring/CoreFreq.git
$ cd CoreFreq
$ make
```
[
![Build CoreFreq Program](http://www.tecmint.com/wp-content/uploads/2017/02/make-corefreq.png)
][3]
Build CoreFreq Program
Note: Arch Linux users can install [corefreq-git][4] from the AUR.
Now run the following commands to load the Linux kernel module from local directory followed by the daemon:
```
$ sudo insmod corefreqk.ko
$ sudo ./corefreqd
```
Then, start the client, as a user.
```
$ ./corefreq-cli
```
[
![CoreFreq Linux CPU Monitoring](http://www.tecmint.com/wp-content/uploads/2017/02/CoreFreq-Linux-CPU-Monitoring.gif)
][5]
CoreFreq Linux CPU Monitoring
From the interface above, you can use shortcut keys:
1. `F2` to display a usage menu as seen at the top section of the screen.
2. `Right` and `Left` arrows to move over the menu tabs.
3. `Up` and `Down` arrows to select a menu item, then click [Enter].
4. `F4` will close the program.
5. `h` will open a quick reference.
To view all usage options, type the command below:
```
$ ./corefreq-cli -h
```
CoreFreq Options
```
CoreFreq. Copyright (C) 2015-2017 CYRIL INGENIERIE
usage: corefreq-cli [-option <arguments>]
-t Show Top (default)
-d Show Dashboard
arguments: <left> <top> <marginWidth> <marginHeight>
-c Monitor Counters
-i Monitor Instructions
-s Print System Information
-M Print Memory Controller
-m Print Topology
-u Print CPUID
-k Print Kernel
-h Print out this message
Exit status:
0 if OK,
1 if problems,
>1 if serious trouble.
Report bugs to labs[at]cyring.fr
```
To print info about the kernel, run:
```
$ ./corefreq-cli -k
```
Print CPU identification details:
```
$ ./corefreq-cli -u
```
You can as well monitor CPU instructions in real-time:
```
$ ./corefreq-cli -i
```
Enable tracing of counters as below:
```
$ ./corefreq-cli -c
```
For more information and usage, visit the CoreFreq Github repository: [https://github.com/cyring/CoreFreq][6]
In this article, we reviewed a powerful CPU monitoring tool, which may be more useful to Linux experts or experienced system administrators as compared to novice users.
Share your thoughts about this command tool or any related ideas with us via the feedback form below.
--------------------------------------------------------------------------------
作者简介:
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.
--------------------------------------------------------------------------------
via: http://www.tecmint.com/corefreq-linux-cpu-monitoring-tool/
作者:[Aaron Kili][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/aaronkili/
[1]:http://www.tecmint.com/bcc-best-linux-performance-monitoring-tools/
[2]:http://www.tecmint.com/wp-content/uploads/2017/02/CoreFreq-CPU-Monitoring.gif
[3]:http://www.tecmint.com/wp-content/uploads/2017/02/make-corefreq.png
[4]:https://aur.archlinux.org/packages/corefreq-git
[5]:http://www.tecmint.com/wp-content/uploads/2017/02/CoreFreq-Linux-CPU-Monitoring.gif
[6]:https://github.com/cyring/CoreFreq

View File

@ -1,3 +1,5 @@
beyondworld translating
Orange Pi as Time Machine Server
============================================================

View File

@ -1,3 +1,4 @@
# rusking translating
# [Best Windows Like Linux Distributions For New Linux Users][12]

View File

@ -1,81 +0,0 @@
Cathon is translating...
# openSUSE on Raspberry Pi 3: From Zero to Functional System in a Few Easy Steps
The following article has been contributed by Dmitri Popov, Technical Writer at the SUSE Documentation team.
Deploying [openSUSE][2] on [Raspberry Pi 3][3] is not all that complicated, but there are a few tricks that smooth the process.
First of all, you have several flavors to choose from. If you plan to use your Raspberry Pi 3 as a regular machine, an openSUSE version with a graphical desktop is your best option. And you can choose between several graphical environments: [X11][4], [Enlightenment][5], [Xfce][6], and [LXQT][7]. There is also the JeOS version of openSUSE which provides a bare-bones system ideal for transforming a Raspberry Pi 3 into a headless server. Better still, you can choose between the [Leap][8] and [Tumbleweed ][9]versions of openSUSE.
![](https://www.suse.com/communities/blog/files/2017/02/j5dkkbtepng-dmitri-popov-450x300.jpg)
The first order of business is to download the desired openSUSE image from [https://en.opensuse.org/HCL:Raspberry_Pi3][10]. Next, you need to create a bootable microSD card. While you can write the downloaded image to a microSD card using command-line tools, [ _Etcher_ ][11] makes the process more enjoyable and safe. Grab the utility from the projects website, extract the downloaded  _.zip_  file and make the resulting  _.AppImage_  file executable using the command:
_chmod +x Etcher-x.x.x-linux-x64.AppImage_
Plug then a microSD card into your machine, launch Etcher by double-clicking on it, select the downloaded  _.raw.xz_  image file, and press Flash!. Connect a display and keyboard to the Raspberry Pi 3, insert the microSD card in it, and boot the little machine. During the first boot, openSUSE automatically expands the file system to make use of all free space on the card. At some point youll see the following message:
```
GPT data structures destroyed! You may now partition the disk using
fdisk or other utilities
```
There is no need to panic, though. Wait a minute or two, and openSUSE will continue to boot normally. When prompted, log in using the default  _root_  user name and  _linux_  password.
If you choose to deploy JeOS on your Raspberry Pi 3, keep in mind that you wont see any output in the screen during first boot. This means that the screen will remain blank until the system finishes expanding the file system. While you can configure kernel parameters to show output, its probably not worth the hassle. Just wait till you see the command-line prompt.
Since openSUSE comes with SSH enabled and configured, you can boot the Raspberry Pi without a display. In this case, you need to connect the Raspberry Pi to your network via Ethernet. Just give the Raspberry Pi enough time to boot and expand the system, and you can then connect to it via SSH from any other machine on the same network using the  _ssh root@linux.local_  command.
By default, you log in to the system as root, and its a good idea to create a regular user. The all-mighty YaST configuration tool lets you do that with consummate ease. Run the  _yast2_  command, switch to the Security and Users -> User and Group Management section, and add a new user. While you are at it, you can update the system in the System -> Online Update section. Once youve done that, quit YaST, reboot the Raspberry Pi, and log in as the newly created user.
Thats all fine and dandy, but there is one crucial component of the system that doesnt work right out of the box: the wireless interface. Fortunately, this issue is easy to solve. First, install the nano text editor using the command:
_sudo zypper in nano_
then run:
_sudo nano/etc/dracut.conf.d/raspberrypi_modules.conf_
to open the  _raspberrypi_modules.conf_  file for editing. Remove  _sdhci_iproc_  in the first line and uncomment the last line. Save the changes, run the command:
_mkinitrd -f_
and reboot the Raspberry Pi.
![](https://www.suse.com/communities/blog/files/2017/02/figure1-raspi-450x329.png)
Launch YaST again, switch to the System -> Network Settings section, and you should see the  _BCM43430 WLAN Card_  entry in the list of network interfaces. Select this entry and press Edit. Enable the Dynamic Address DHCP option, press Next, select the desired wireless network, and configure the required connection settings. Press Next and then OK to save the settings. Reboot the Raspberry Pi, and it should automatically connect to the specified Wi-Fi network.
And thats it !
--------------------------------------------------------------------------------
via: https://www.suse.com/communities/blog/opensuse-raspberry-pi-3-zero-functional-system-easy-steps/
作者:[chabowski][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.suse.com/communities/blog/author/chabowski/
[1]:https://www.suse.com/communities/blog/author/chabowski/
[2]:https://www.opensuse.org/
[3]:https://www.raspberrypi.org/
[4]:https://www.x.org/wiki/
[5]:https://www.enlightenment.org/
[6]:https://www.xfce.org/
[7]:http://lxqt.org/
[8]:https://www.opensuse.org/#Leap
[9]:https://www.opensuse.org/#Tumbleweed
[10]:https://en.opensuse.org/HCL:Raspberry_Pi3
[11]:https://etcher.io/
[12]:https://www.suse.com/communities/blog/opensuse-raspberry-pi-3-zero-functional-system-easy-steps/#
[13]:https://www.suse.com/communities/blog/opensuse-raspberry-pi-3-zero-functional-system-easy-steps/#
[14]:https://www.suse.com/communities/blog/opensuse-raspberry-pi-3-zero-functional-system-easy-steps/#
[15]:https://www.suse.com/communities/blog/opensuse-raspberry-pi-3-zero-functional-system-easy-steps/#
[16]:https://www.suse.com/communities/blog/opensuse-raspberry-pi-3-zero-functional-system-easy-steps/#
[17]:http://www.printfriendly.com/print?url=https%3A%2F%2Fwww.suse.com%2Fcommunities%2Fblog%2Fopensuse-raspberry-pi-3-zero-functional-system-easy-steps%2F
[18]:http://www.printfriendly.com/print?url=https%3A%2F%2Fwww.suse.com%2Fcommunities%2Fblog%2Fopensuse-raspberry-pi-3-zero-functional-system-easy-steps%2F

View File

@ -1,8 +1,9 @@
ucasFL translating
# [Tips To Improve Ubuntu Speed][4]
[
![Tips To Improve Ubuntu Speed](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/tips-to-improve-ubuntu-speed_orig.jpg)
![Tips To Improve Ubuntu Speed](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/tips-to-improve-ubuntu-speed_orig.jpg)
][2]Chances are that your Ubuntu desktop will run so smooth. You will wonder why you did not switch from those other slow loading desktop operating systems (looking at you Windows). Ubuntu runs smoothly on most modern machines and older machines using variants such as Lubuntu, Xubuntu and [Ubuntu MATE][6] are going to be impressive as well. Very few times, your experience can get poorer on your Ubuntu desktop. On the off chance that your Ubuntu PC is not running as smoothly as you would like, there are a few things you could do to improve your system performance and response.But why is my computer running slow in the first place? Let me enumerate a few
1. Computer is getting old
@ -24,7 +25,7 @@ Indexing aims to speed up search results, but on the other hand, can cause syste
### 3\. Manage your startup applications
Startup applications can have a huge impact on the performance of your system. Some applications you install will add their startup entries to have them started at boot but you can remove some of these applications to improve your system performance. Open “Startup Applications” by typing searching in Unity launcher. Most of autostart entries will be hidden so enter the following command in terminal to make the visiblesudo sed -i "s/NoDisplay=true/NoDisplay=false/g" /etc/xdg/autostart/*.desktop[
![ubuntu startup application](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/ubuntu-startup-application_orig.jpg)
![ubuntu startup application](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/ubuntu-startup-application_orig.jpg)
][3]
### 4\. Try Preload

View File

@ -1,219 +0,0 @@
How to Use Yum History to Find Out Installed or Removed Packages Info
============================================================
[YUM][1] is an interactive, rpm based, high level package manager for RHEL/CentOS systems, it enables users to install new packages, remove/erase old/unwanted packages. It can [automatically run system updates][2] and does dependency analysis, and also perform queries on the installed and/or available packages plus so much more.
In this article, we will explain how to view history of YUM transactions in order to find out information about installed packages and those that where removed/erased from a system.
**Suggested Read:** [20 Linux YUM Commands for Package Management][3]
Below are some examples of how to use the YUM history command.
### View Complete YUM History
To view a full history of YUM transactions, we can run the command below which will show us the: transaction id, login user who executed the particular action, date and time when the operation happened, the actual action and additional information about any thing wrong with the operation:
```
# yum history
```
[
![View Yum History](http://www.tecmint.com/wp-content/uploads/2017/02/View-Yum-History.png)
][4]
View Yum History
### Use Yum to Find Package Info
The history sub-commands: info/list/summary can take a transaction ID or package name as an argument. Additionally, the list sub-command can take a special argument, all meaning all transactions.
The previous history command is equivalent to running:
```
# yum history list all
```
And, you can view details of transactions concerning a given package such as `httpd` web server with the `info`command as follows:
```
# yum history info httpd
```
[
![Yum - Find Package Info](http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Find-Package-Info.png)
][5]
Yum Find Package Info
To get a summary of the transactions concerning `httpd` package, we can issue the following command:
```
# yum history summary httpd
```
[
![Yum - Find Summary of Package](http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Find-Summary-of-Package.png)
][6]
Yum Find Summary of Package
It is also possible to use a transaction ID, the command below will display details of the transaction ID `15`.
```
# yum history info 15
```
[
![Yum - Find Package Info Using ID](http://www.tecmint.com/wp-content/uploads/2017/02/Find-Package-Info-Using-ID.png)
][7]
Yum Find Package Info Using ID
### Use Yum History to Find Package Transaction Info
There are sub-commands that print out transaction details of a specific package or group of packages. We can use `package-list` or `package_info` to view more info about `httpd` package like so:
```
# yum history package-list httpd
OR
# yum history package-info httpd
```
[
![Yum - Find Package Transaction Info](http://www.tecmint.com/wp-content/uploads/2017/02/Find-Package-Transaction-Info.png)
][8]
Yum Find Package Transaction Info
To get history about multiple packages, we can run:
```
# yum history package-list httpd epel-release
OR
# yum history packages-list httpd epel-release
```
[
![Yum - Find Multiple Packages Info](http://www.tecmint.com/wp-content/uploads/2017/02/Find-Multiple-Package-Info.png)
][9]
Yum Find Multiple Packages Info
### Use Yum to Rollback Packages
Furthermore, there are certain history sub-commands that enable us to: undo/redo/rollback transactions.
1. Undo  will undo a specified transaction.
2. redo  repeat the work of a specified transaction
3. rollback  will undo all transactions up to the point of the specified transaction.
They take either a single transaction id or the keyword last and an offset from the last transaction.
For example, assuming weve done 60 transactions, “last” refers to transaction 60, and “last-4” points to transaction 56.
**Suggested Read:** [How to Use yum-utils to Maintain Yum and Boost its Performance][10]
This is how the sub-commands above work: If we have 5 transactions: V, W, X, Y and Z, where packages where installed respectively.
```
# yum history undo 2 #will remove package W
# yum history redo 2 #will reinstall package W
# yum history rollback 2 #will remove packages from X, Y, and Z.
```
In the following example, transaction 2 was a update operation, as seen below, the redo command that follows will repeat transaction 2 upgrading all the packages updated by that time:
```
# yum history | grep -w "2"
```
[
![Yum - Find Package Transaction ID](http://www.tecmint.com/wp-content/uploads/2017/02/Find-Yum-Package-Transaction-ID.png)
][11]
Yum Find Package Transaction ID
```
# yum history redo 2
```
[
![Yum Redo Package Update](http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Redo-Package-Update.png)
][12]
Yum Redo Package Update
The redo sub-command can also take some optional arguments before we specify a transaction:
1. force-reinstall  reinstalls any packages that were installed in that transaction (via yum install, upgrade or downgrade).
2. force-remove  removes any packages that were updated or downgraded.
```
# yum history redo force-reinstall 16
```
[
![Yum - Force Install Package](http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Force-Install-Package.png)
][13]
Yum Force Install Package
### Find Yum History Database and Sources Info
These sub-commands provide us information about the history DB and additional info sources:
1. addon-info  will provide sources of additional information.
2. stats  displays statistics about the current history DB.
3. sync  enables us to alter the the rpmdb/yumdb data stored for any installed packages.
Consider the commands below to understand how these sub-commands practically work:
```
# yum history addon-info
# yum history stats
# yum history sync
```
To set a new history file, use the new sub-command:
```
# yum history new
```
We can find a complete information about YUM history command and several other commands in the yum man page:
```
# man yum
```
**Suggested Read:** [4 Ways to Disable/Lock Certain Package Updates Using Yum][14]
Thats it for now. In this guide, we explained various YUM history commands to view details of YUM transactions. Remember to offer us your thoughts concerning this guide via the comment section below.
--------------------------------------------------------------------------------
作者简介:
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.
--------------------------------------------------------------------------------
via: http://www.tecmint.com/view-yum-history-to-find-packages-info/
作者:[Aaron Kili][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/aaronkili/
[1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/
[2]:http://www.tecmint.com/auto-install-security-patches-updates-on-centos-rhel/
[3]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/
[4]:http://www.tecmint.com/wp-content/uploads/2017/02/View-Yum-History.png
[5]:http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Find-Package-Info.png
[6]:http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Find-Summary-of-Package.png
[7]:http://www.tecmint.com/wp-content/uploads/2017/02/Find-Package-Info-Using-ID.png
[8]:http://www.tecmint.com/wp-content/uploads/2017/02/Find-Package-Transaction-Info.png
[9]:http://www.tecmint.com/wp-content/uploads/2017/02/Find-Multiple-Package-Info.png
[10]:http://www.tecmint.com/linux-yum-package-management-with-yum-utils/
[11]:http://www.tecmint.com/wp-content/uploads/2017/02/Find-Yum-Package-Transaction-ID.png
[12]:http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Redo-Package-Update.png
[13]:http://www.tecmint.com/wp-content/uploads/2017/02/Yum-Force-Install-Package.png
[14]:http://www.tecmint.com/yum-lock-disable-blacklist-certain-package-update-version/
[15]:http://www.tecmint.com/author/aaronkili/
[16]:http://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/
[17]:http://www.tecmint.com/free-linux-shell-scripting-books/

View File

@ -0,0 +1,464 @@
Inxi A Powerful Feature-Rich Commandline System Information Tool for Linux
============================================================
Inxi is a powerful and remarkable command line-system information script designed for both console and IRC (Internet Relay Chat). It can be employed to instantly deduce user system configuration and hardware information, and also functions as a debugging, and forum technical support tool.
It displays handy information concerning system hardware (hard disk, sound cards, graphic card, network cards, CPU, RAM, and more), together with system information about drivers, Xorg, desktop environment, kernel, GCC version(s), processes, uptime, memory, and a wide array of other useful information.
However, its output slightly differs between the command line and IRC, with a few default filters and color options applicable to IRC usage. The supported IRC clients include: BitchX, Gaim/Pidgin, ircII, Irssi, Konversation, Kopete, KSirc, KVIrc, Weechat, and Xchat plus any others that are capable of showing either built in or external Inxi output.
### How to Install Inxi in Linux System
Inix is available in most mainstream Linux distribution repositories, and runs on BSDs as well.
```
$ sudo apt-get install inxi [On Debian/Ubuntu/Linux Mint]
$ sudo yum install inxi [On CentOs/RHEL/Fedora]
$ sudo dnf install inxi [On Fedora 22+]
```
Before we start using it, we can run the command that follows to check all application dependencies plus recommends, and various directories, and display what package(s) we need to install to add support for a given feature.
```
$ inxi --recommends
```
Inxi Checking
```
inxi will now begin checking for the programs it needs to operate. First a check of the main languages and tools
inxi uses. Python is only for debugging data collection.
---------------------------------------------------------------------------
Bash version: 4.3.42(1)-release
Gawk version: 4.1.3,
Sed version:
Sudo version: 1.8.16
Python version: 2.7.12
---------------------------------------------------------------------------
Test One: Required System Directories (Linux Only).
If one of these system directories is missing, inxi cannot operate:
/proc....................................................................... Present
/sys........................................................................ Present
All the directories are present.
---------------------------------------------------------------------------
Test Two: Required Core Applications.
If one of these applications is missing, inxi cannot operate:
df (info: partition data)................................................... /bin/df
gawk (info: core tool)...................................................... /usr/bin/gawk
grep (info: string search).................................................. /bin/grep
lspci (info: hardware data)................................................. /usr/bin/lspci
ps (info: process data)..................................................... /bin/ps
readlink.................................................................... /bin/readlink
sed (info: string replace).................................................. /bin/sed
tr (info: character replace)................................................ /usr/bin/tr
uname (info: kernel data)................................................... /bin/uname
wc (info: word character count)............................................. /usr/bin/wc
All the applications are present.
---------------------------------------------------------------------------
Test Three: Script Recommends for Graphics Features.
NOTE: If you do not use X these do not matter (like a headless server). Otherwise, if one of these applications
is missing, inxi will have incomplete output:
glxinfo (info: -G glx info)................................................. /usr/bin/glxinfo
xdpyinfo (info: -G multi screen resolution)................................. /usr/bin/xdpyinfo
xprop (info: -S desktop data)............................................... /usr/bin/xprop
xrandr (info: -G single screen resolution).................................. /usr/bin/xrandr
All the applications are present.
---------------------------------------------------------------------------
Test Four: Script Recommends for Remaining Features.
If one of these applications is missing, inxi will have incomplete output:
dig (info: -i first wlan ip default test)................................... /usr/bin/dig
dmidecode (info: -M if no sys machine data; -m memory)...................... /usr/sbin/dmidecode
file (info: -o unmounted file system)....................................... /usr/bin/file
hciconfig (info: -n -i bluetooth data)...................................... /bin/hciconfig
hddtemp (info: -Dx show hdd temp)........................................... /usr/sbin/hddtemp
ifconfig (info: -i ip lan-deprecated)....................................... /sbin/ifconfig
ip (info: -i ip lan)........................................................ /sbin/ip
sensors (info: -s sensors output)........................................... /usr/bin/sensors
strings (info: -I sysvinit version)......................................... /usr/bin/strings
lsusb (info: -A usb audio;-N usb networking)................................ /usr/bin/lsusb
modinfo (info: -Ax,-Nx module version)...................................... /sbin/modinfo
runlevel (info: -I runlevel)................................................ /sbin/runlevel
sudo (info: -Dx hddtemp-user;-o file-user).................................. /usr/bin/sudo
uptime (info: -I uptime (check which package owns Debian)).................. /usr/bin/uptime
All the applications are present.
---------------------------------------------------------------------------
Test Five: Script Recommends for Remaining Features.
One of these downloaders needed for options -i/-w/-W (-U/-! [11-15], if supported):
wget (info: -i wan ip;-w/-W;-U/-! [11-15] (if supported))................... /usr/bin/wget
curl (info: -i wan ip;-w/-W;-U/-! [11-15] (if supported))................... /usr/bin/curl
All the applications are present.
---------------------------------------------------------------------------
Test Six: System Directories for Various Information.
(Unless otherwise noted, these are for GNU/Linux systems)
If one of these directories is missing, inxi may have incomplete output:
/sys/class/dmi/id (info: -M system, motherboard, bios)...................... Present
/dev (info: -l,-u,-o,-p,-P,-D disk partition data).......................... Present
/dev/disk/by-label (info: -l,-o,-p,-P partition labels)..................... Present
/dev/disk/by-uuid (info: -u,-o,-p,-P partition uuid)........................ Present
All the directories are present.
---------------------------------------------------------------------------
Test Seven: System Files for Various Information.
(Unless otherwise noted, these are for GNU/Linux systems)
If one of these files is missing, inxi may have incomplete output:
/proc/asound/cards (info: -A sound card data)............................... Present
/proc/asound/version (info: -A ALSA data)................................... Present
/proc/cpuinfo (info: -C cpu data)........................................... Present
/etc/lsb-release (info: -S distro version data [deprecated])................ Present
/proc/mdstat (info: -R mdraid data)......................................... Present
/proc/meminfo (info: -I memory data)........................................ Present
/etc/os-release (info: -S distro version data).............................. Present
/proc/partitions (info: -p,-P partitions data).............................. Present
/proc/modules (info: -G module data)........................................ Present
/proc/mounts (info: -P,-p partition advanced data).......................... Present
/var/run/dmesg.boot (info: -D,-d disk data [BSD only])...................... Missing
/proc/scsi/scsi (info: -D Advanced hard disk data [used rarely])............ Present
/var/log/Xorg.0.log (info: -G graphics driver load status).................. Present
The following files are missing from your system:
File: /var/run/dmesg.boot
---------------------------------------------------------------------------
All tests completed.
```
### Basic Usage of Inxi Tool in Linux
Below are some basic Inxi options we can use to collect machine plus system information.
#### Show Linux System Information
When run without any flags, Inxi will produce output to do with system CPU, kernel, uptime, memory size, hard disk size, number of processes, client used and inxi version:
```
$ inxi
CPU~Dual core Intel Core i5-4210U (-HT-MCP-) speed/max~2164/2700 MHz Kernel~4.4.0-21-generic x86_64 Up~3:15 Mem~3122.0/7879.9MB HDD~1000.2GB(20.0% used) Procs~234 Client~Shell inxi~2.2.35
```
#### Show Linux Kernel and Distribution Info
The command below will show sample system info (hostname, kernel info, desktop environment and disto) using the `-S` flag:
```
$ inxi -S
System: Host: TecMint Kernel: 4.4.0-21-generic x86_64 (64 bit) Desktop: Cinnamon 3.0.7
Distro: Linux Mint 18 Sarah
```
#### Find Linux Laptop or PC Model Information
To print machine data-same as product details (system, product id, version, Mobo, model, BIOS etc), we can use the option `-M` as follows:
```
$ inxi -M
Machine: System: LENOVO (portable) product: 20354 v: Lenovo Z50-70
Mobo: LENOVO model: Lancer 5A5 v: 31900059WIN Bios: LENOVO v: 9BCN26WW date: 07/31/2014
```
#### Find Linux CPU and CPU Speed Information
We can display complete CPU information, including per CPU clock-speed and CPU max speed (if available) with the `-C` flag as follows:
```
$ inxi -C
CPU: Dual core Intel Core i5-4210U (-HT-MCP-) cache: 3072 KB
clock speeds: max: 2700 MHz 1: 1942 MHz 2: 1968 MHz 3: 1734 MHz 4: 1710 MHz
```
#### Find Graphic Card Information in Linux
The option `-G` can be used to show graphics card info (card type, display server, resolution, GLX renderer and GLX version) like so:
```
$ inxi -G
Graphics: Card-1: Intel Haswell-ULT Integrated Graphics Controller
Card-2: NVIDIA GM108M [GeForce 840M]
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa) Resolution: 1920x1080@60.05hz
GLX Renderer: Mesa DRI Intel Haswell Mobile GLX Version: 3.0 Mesa 11.2.0
```
#### Find Audio/Sound Card Information in Linux
To get info about system audio/sound card, we use the `-A` flag:
```
$ inxi -A
Audio: Card-1 Intel 8 Series HD Audio Controller driver: snd_hda_intel Sound: ALSA v: k4.4.0-21-generic
Card-2 Intel Haswell-ULT HD Audio Controller driver: snd_hda_intel
```
#### Find Linux Network Card Information
To display network card info, we can make use of `-N` flag:
```
$ inxi -N
Network: Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
Card-2: Realtek RTL8723BE PCIe Wireless Network Adapter driver: rtl8723be
```
#### Find Linux Hard Disk Information
To view full hard disk information,(size, id, model) we can use the flag `-D`:
```
$ inxi -D
Drives: HDD Total Size: 1000.2GB (20.0% used) ID-1: /dev/sda model: ST1000LM024_HN size: 1000.2GB
```
#### Summarize Full Linux System Information Together
To show a summarized system information; combining all the information above, we need to use the `-b` flag as below:
```
$ inxi -b
System: Host: TecMint Kernel: 4.4.0-21-generic x86_64 (64 bit) Desktop: Cinnamon 3.0.7
Distro: Linux Mint 18 Sarah
Machine: System: LENOVO (portable) product: 20354 v: Lenovo Z50-70
Mobo: LENOVO model: Lancer 5A5 v: 31900059WIN Bios: LENOVO v: 9BCN26WW date: 07/31/2014
CPU: Dual core Intel Core i5-4210U (-HT-MCP-) speed/max: 2018/2700 MHz
Graphics: Card-1: Intel Haswell-ULT Integrated Graphics Controller
Card-2: NVIDIA GM108M [GeForce 840M]
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa) Resolution: 1920x1080@60.05hz
GLX Renderer: Mesa DRI Intel Haswell Mobile GLX Version: 3.0 Mesa 11.2.0
Network: Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
Card-2: Realtek RTL8723BE PCIe Wireless Network Adapter driver: rtl8723be
Drives: HDD Total Size: 1000.2GB (20.0% used)
Info: Processes: 233 Uptime: 3:23 Memory: 3137.5/7879.9MB Client: Shell (bash) inxi: 2.2.35
```
#### Find Linux Hard Disk Partition Details
The next command will enable us view complete list of hard disk partitions in relation to size, used and available space, filesystem as well as filesystem type on each partition with the `-p` flag:
```
$ inxi -p
Partition: ID-1: / size: 324G used: 183G (60%) fs: ext4 dev: /dev/sda10
ID-2: swap-1 size: 4.00GB used: 0.00GB (0%) fs: swap dev: /dev/sda9
```
#### Shows Full Linux System Information
In order to show complete Inxi output, we use the `-F` flag as below (note that certain data is filtered for security reasons such as WAN IP):
```
$ inxi -F
System: Host: TecMint Kernel: 4.4.0-21-generic x86_64 (64 bit) Desktop: Cinnamon 3.0.7
Distro: Linux Mint 18 Sarah
Machine: System: LENOVO (portable) product: 20354 v: Lenovo Z50-70
Mobo: LENOVO model: Lancer 5A5 v: 31900059WIN Bios: LENOVO v: 9BCN26WW date: 07/31/2014
CPU: Dual core Intel Core i5-4210U (-HT-MCP-) cache: 3072 KB
clock speeds: max: 2700 MHz 1: 1716 MHz 2: 1764 MHz 3: 1776 MHz 4: 1800 MHz
Graphics: Card-1: Intel Haswell-ULT Integrated Graphics Controller
Card-2: NVIDIA GM108M [GeForce 840M]
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa) Resolution: 1920x1080@60.05hz
GLX Renderer: Mesa DRI Intel Haswell Mobile GLX Version: 3.0 Mesa 11.2.0
Audio: Card-1 Intel 8 Series HD Audio Controller driver: snd_hda_intel Sound: ALSA v: k4.4.0-21-generic
Card-2 Intel Haswell-ULT HD Audio Controller driver: snd_hda_intel
Network: Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
IF: enp1s0 state: up speed: 100 Mbps duplex: full mac: 28:d2:44:eb:bd:98
Card-2: Realtek RTL8723BE PCIe Wireless Network Adapter driver: rtl8723be
IF: wlp2s0 state: down mac: 38:b1:db:7c:78:c7
Drives: HDD Total Size: 1000.2GB (20.0% used) ID-1: /dev/sda model: ST1000LM024_HN size: 1000.2GB
Partition: ID-1: / size: 324G used: 183G (60%) fs: ext4 dev: /dev/sda10
ID-2: swap-1 size: 4.00GB used: 0.00GB (0%) fs: swap dev: /dev/sda9
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 56.0C mobo: N/A
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 234 Uptime: 3:26 Memory: 3188.9/7879.9MB Client: Shell (bash) inxi: 2.2.35
```
### Linux System Monitoring with Inxi Tool
Following are few options used to monitor Linux system processes, uptime, memory etc.
#### Monitor Linux Processes Memory Usage
Get summarized system info in relation to total number of processes, uptime and memory usage:
```
$ inxi -I
Info: Processes: 232 Uptime: 3:35 Memory: 3256.3/7879.9MB Client: Shell (bash) inxi: 2.2.35
```
#### Monitoring Processes by CPU and Memory Usage
By default, it can help us determine the [top 5 processes consuming CPU or memory][1]. The `-t` option used together with `c` (CPU) and/or `m` (memory) options lists the top 5 most active processes eating up CPU and/or memory as shown below:
```
----------------- Linux CPU Usage -----------------
$ inxi -t c
Processes: CPU: % used - top 5 active
1: cpu: 53.7% command: plugin-container pid: 3066
2: cpu: 20.0% command: java pid: 1527
3: cpu: 19.7% command: firefox pid: 3018
4: cpu: 4.6% command: Xorg pid: 2114
5: cpu: 3.0% command: cinnamon pid: 2835
```
```
----------------- Linux Memoery Usage -----------------
$ inxi -t m
Processes: Memory: MB / % used - Used/Total: 3212.5/7879.9MB - top 5 active
1: mem: 980.51MB (12.4%) command: plugin-container pid: 3066
2: mem: 508.96MB (6.4%) command: java pid: 1527
3: mem: 507.89MB (6.4%) command: firefox pid: 3018
4: mem: 244.05MB (3.0%) command: chrome pid: 7405
5: mem: 211.46MB (2.6%) command: chrome pid: 6146
```
```
----------------- Linux CPU and Memory Usage -----------------
$ inxi -t cm
Processes: CPU: % used - top 5 active
1: cpu: 53.7% command: plugin-container pid: 3066
2: cpu: 20.0% command: java pid: 1527
3: cpu: 19.7% command: firefox pid: 3018
4: cpu: 4.6% command: Xorg pid: 2114
5: cpu: 3.0% command: cinnamon pid: 2835
Memory: MB / % used - Used/Total: 3223.6/7879.9MB - top 5 active
1: mem: 991.93MB (12.5%) command: plugin-container pid: 3066
2: mem: 508.96MB (6.4%) command: java pid: 1527
3: mem: 507.86MB (6.4%) command: firefox pid: 3018
4: mem: 244.45MB (3.1%) command: chrome pid: 7405
5: mem: 211.68MB (2.6%) command: chrome pid: 6146
```
We can use `cm` number (number can be 1-20) to specify a number other than 5, the command below will show us the [top 10 most active processes][2] eating up CPU and memory.
```
$ inxi -t cm10
Processes: CPU: % used - top 10 active
1: cpu: 53.4% command: plugin-container pid: 3066
2: cpu: 19.8% command: java pid: 1527
3: cpu: 19.5% command: firefox pid: 3018
4: cpu: 4.5% command: Xorg pid: 2114
5: cpu: 3.0% command: cinnamon pid: 2835
6: cpu: 2.8% command: chrome pid: 7405
7: cpu: 1.1% command: pulseaudio pid: 2733
8: cpu: 1.0% command: soffice.bin pid: 7799
9: cpu: 0.9% command: chrome pid: 5763
10: cpu: 0.5% command: chrome pid: 6179
Memory: MB / % used - Used/Total: 3163.1/7879.9MB - top 10 active
1: mem: 976.82MB (12.3%) command: plugin-container pid: 3066
2: mem: 511.70MB (6.4%) command: java pid: 1527
3: mem: 466.01MB (5.9%) command: firefox pid: 3018
4: mem: 244.40MB (3.1%) command: chrome pid: 7405
5: mem: 203.71MB (2.5%) command: chrome pid: 6146
6: mem: 199.74MB (2.5%) command: chrome pid: 5763
7: mem: 168.30MB (2.1%) command: cinnamon pid: 2835
8: mem: 165.51MB (2.1%) command: soffice.bin pid: 7799
9: mem: 158.91MB (2.0%) command: chrome pid: 6179
10: mem: 151.83MB (1.9%) command: mysqld pid: 1259
```
#### Monitor Linux Network Interfaces
The command that follows will show us advanced network card information including interface, speed, mac id, state, IPs, etc:
```
$ inxi -Nni
Network: Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
IF: enp1s0 state: up speed: 100 Mbps duplex: full mac: 28:d2:44:eb:bd:98
Card-2: Realtek RTL8723BE PCIe Wireless Network Adapter driver: rtl8723be
IF: wlp2s0 state: down mac: 38:b1:db:7c:78:c7
WAN IP: 111.91.115.195 IF: wlp2s0 ip-v4: N/A
IF: enp1s0 ip-v4: 192.168.0.103
```
#### Monitor Linux CPU Temperature and Fan Speed
We can keep track of the [hardware installed/configured sensors][3] output by using the -s option:
```
$ inxi -s
Sensors: System Temperatures: cpu: 53.0C mobo: N/A
Fan Speeds (in rpm): cpu: N/A
```
#### Find Weather Report in Linux
We can also view whether info (though API used is unreliable) for the current location with the `-w` or `-W``<different_location>` to set a different location.
```
$ inxi -w
Weather: Conditions: 93 F (34 C) - smoke Time: February 20, 1:38 PM IST
$ inxi -W Mumbai,India
Weather: Conditions: 93 F (34 C) - smoke Time: February 20, 1:38 PM IST
$ inxi -W Nairobi,Kenya
Weather: Conditions: 70 F (21 C) - Mostly Cloudy Time: February 20, 11:08 AM EAT
```
#### Find All Linux Repsitory Information
We can additionally view a distro repository data with the `-r` flag:
```
$ inxi -r
Repos: Active apt sources in file: /etc/apt/sources.list.d/dawidd0811-neofetch-xenial.list
deb http://ppa.launchpad.net/dawidd0811/neofetch/ubuntu xenial main
deb-src http://ppa.launchpad.net/dawidd0811/neofetch/ubuntu xenial main
Active apt sources in file: /etc/apt/sources.list.d/dhor-myway-xenial.list
deb http://ppa.launchpad.net/dhor/myway/ubuntu xenial main
deb-src http://ppa.launchpad.net/dhor/myway/ubuntu xenial main
Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list
deb http://packages.linuxmint.com sarah main upstream import backport
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ xenial partner
Active apt sources in file: /etc/apt/sources.list.d/qbittorrent-team-qbittorrent-stable-xenial.list
deb http://ppa.launchpad.net/qbittorrent-team/qbittorrent-stable/ubuntu xenial main
deb-src http://ppa.launchpad.net/qbittorrent-team/qbittorrent-stable/ubuntu xenial main
Active apt sources in file: /etc/apt/sources.list.d/slgobinath-safeeyes-xenial.list
deb http://ppa.launchpad.net/slgobinath/safeeyes/ubuntu xenial main
deb-src http://ppa.launchpad.net/slgobinath/safeeyes/ubuntu xenial main
Active apt sources in file: /etc/apt/sources.list.d/snwh-pulp-xenial.list
deb http://ppa.launchpad.net/snwh/pulp/ubuntu xenial main
deb-src http://ppa.launchpad.net/snwh/pulp/ubuntu xenial main
Active apt sources in file: /etc/apt/sources.list.d/twodopeshaggy-jarun-xenial.list
deb http://ppa.launchpad.net/twodopeshaggy/jarun/ubuntu xenial main
deb-src http://ppa.launchpad.net/twodopeshaggy/jarun/ubuntu xenial main
Active apt sources in file: /etc/apt/sources.list.d/ubuntu-mozilla-security-ppa-xenial.list
deb http://ppa.launchpad.net/ubuntu-mozilla-security/ppa/ubuntu xenial main
deb-src http://ppa.launchpad.net/ubuntu-mozilla-security/ppa/ubuntu xenial main
```
To view its current installed version, a quick help, and open the man page for a full list of options and detailed usage info plus lots more, type:
```
$ inxi -v #show version
$ inxi -h #quick help
$ man inxi #open man page
```
For more information, visit official GitHub Repository: [https://github.com/smxi/inxi][4]
Thats all for now! In this article, we reviewed Inxi, a full featured and remarkable command line tool for collecting machine hardware and system info. This is one of the best CLI based [hardware/system information collection tools][5] for Linux, I have ever used.
To share your thoughts about it, use the comment form below. Lastly, in case you know of other, such useful tools as Inxi out there, you can inform us and we will be delighted to review them as well.
--------------------------------------------------------------------------------
作者简介:
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.
--------------------------------------------------------------------------------
via: http://www.tecmint.com/inxi-command-to-find-linux-system-information/
作者:[Aaron Kili][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/aaronkili/
[1]:http://www.tecmint.com/find-processes-by-memory-usage-top-batch-mode/
[2]:http://www.tecmint.com/install-htop-linux-process-monitoring-for-rhel-centos-fedora/
[3]:http://www.tecmint.com/psensor-monitors-hardware-temperature-in-linux/
[4]:https://github.com/smxi/inxi
[5]:http://www.tecmint.com/commands-to-collect-system-and-hardware-information-in-linux/
[6]:http://www.tecmint.com/author/aaronkili/
[7]:http://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/
[8]:http://www.tecmint.com/free-linux-shell-scripting-books/

View File

@ -0,0 +1,266 @@
Create a Shared Directory on Samba AD DC and Map to Windows/Linux Clients Part 7
============================================================
This tutorial will guide you on how to create a shared directory on Samba AD DC system, map this Shared Volume to Windows clients integrated into the domain via GPO and manage share permissions from Windows domain controller perspective.
It will also cover how to access and mount the file share from a Linux machine enrolled into domain using a Samba4 domain account.
#### Requirements:
1. [Create an Active Directory Infrastructure with Samba4 on Ubuntu][1]
### Step 1: Create Samba File Share
1. The process of creating a share on Samba AD DC is a very simple task. First create a directory you want to share via SMB protocol and add the below permissions on the filesystem in order to allow a Windows AD DC admin acount to modify the share permissions accordingly to what permissions Windows clients should see.
Assuming that the new file share on the AD DC would be the `/nas` directory, run the below commands to assign the correct permissions.
```
# mkdir /nas
# chmod -R 775 /nas
# chown -R root:"domain users" /nas
# ls -alh | grep nas
```
[
![Create Samba Shared Directory](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][2]
Create Samba Shared Directory
2. After youve created the directory that will be exported as a share from Samba4 AD DC, you need to add the following statements to samba configuration file in order to make the share available via SMB protocol.
```
# nano /etc/samba/smb.conf
```
Go to the bottom of the file and add the following lines:
```
[nas]
path = /nas
read only = no
```
[
![Configure Samba Shared Directory](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][3]
Configure Samba Shared Directory
3. The last thing you need to do is to restart Samba AD DC daemon in order to apply the changes by issuing the below command:
```
# systemctl restart samba-ad-dc.service
```
### Step 2: Manage Samba Share Permissions
4. Since were accessing this shared volume from Windows, using domain accounts (users and groups) that are created on Samba AD DC (the share is not meant to be accessed by Linux system users).
The process of managing permissions can be done directly from Windows Explorer, in the same way permissions are managed for any folder in Windows Explorer.
First, log on to Windows machine with a Samba4 AD account with administrative privileges on the domain. In order to access the share from Windows and set the permissions, type the IP address or host name or FQDN of the Samba AD DC machine in Windows Explorer path field, preceded by two back slashes, and the share should be visible.
```
\\adc1
Or
\\192.168.1.254
Or
\\adc1.tecmint.lan
```
[
![Access Samba Share Directory from Windows](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][4]
Access Samba Share Directory from Windows
5. To modify permissions just right click on the share and choose Properties. Navigate to Security tab and proceed with altering domain users and group permissions accordingly. Use Advanced button in order to fine tune permissions.
[
![Configure Samba Share Directory Permissions](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][5]
Configure Samba Share Directory Permissions
Use the below screenshot as an excerpt on how to tune permissions for specific Samba AD DC authenticated accounts.
[
![Manage Samba Share Directory User Permissions](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][6]
Manage Samba Share Directory User Permissions
6. Other method you can use to manage the share permissions is from Computer Management -> Connect to another computer.
Navigate to Shares, right click on the share you want to modify permissions, choose Properties and move to Security tab. From here you can alter permissions in any way you want just as presented in the previous method using file share permissions.
[
![Connect to Samba Share Directory Machine](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][7]
Connect to Samba Share Directory Machine
[
![Manage Samba Share Directory Properties](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][8]
Manage Samba Share Directory Properties
[
![Assign Samba Share Directory Permissions to Users](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][9]
Assign Samba Share Directory Permissions to Users
### Step 3: Map the Samba File Share via GPO
7. To automatically mount the exported samba file share via domain Group Policy, first on a machine with [RSAT tools installed][10], open AD UC utility, right click on your domain name and, then, choose New -> Shared Folder.
[
![Map Samba Share Folder](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][11]
Map Samba Share Folder
8. Add a name for the shared volume and enter the network path where your share is located as illustrated on the below image. Hit OK when youve finished and the share should now be visible on the right plane.
[
![Set Samba Shared Folder Name Location](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][12]
Set Samba Shared Folder Name Location
9. Next, open Group Policy Management console, expand to your domain Default Domain Policy script and open the file for editing.
On the GPM Editor navigate to User Configuration -> Preferences -> Windows Settings and right click on Drive Maps and choose New -> Mapped Drive.
[
![Map Samba Share Folder in Windows](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][13]
Map Samba Share Folder in Windows
10. On the new window search and add the network location for the share by pressing the right button with three dots, check Reconnect checkbox, add a label for this share, choose the letter for this drive and hit OK button to save and apply configuration.
[
![Configure Network Location for Samba Share Directory](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][14]
Configure Network Location for Samba Share Directory
11. Finally, in order to force and apply GPO changes on your local machine without a system restart, open a Command Prompt and run the following command.
```
gpupdate /force
```
[
![Apply GPO Changes](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][15]
Apply GPO Changes
12. After the policy has been successfully applied on your machine, open Windows Explorer and the shared network volume should be visible and accessible, depending on what permissions youve granted for the share on previous steps.
The share will be visible for other clients on your network after they reboot or re-login onto their systems if the group policy will not forced from command line.
[
![Samba Shared Network Volume on Windows](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][16]
Samba Shared Network Volume on Windows
### Step 4: Access the Samba Shared Volume from Linux Clients
13. Linux users from machines that are enrolled into Samba AD DC can also access or mount the share locally by authenticating into the system with a Samba account.
First, they need to assure that the following samba clients and utilities are installed on their systems by issuing the below command.
```
$ sudo apt-get install smbclient cifs-utils
```
14. In order to list the exported shares your domain provides for a specific domain controller machine use the below command:
```
$ smbclient L your_domain_controller U%
or
$ smbclient L \\adc1 U%
```
[
![List Samba Share Directory in Linux](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][17]
List Samba Share Directory in Linux
15. To interactively connect to a samba share from command line with a domain account use the following command:
```
$ sudo smbclient //adc/share_name -U domain_user
```
On command line you can list the content of the share, download or upload files to the share or perform other tasks. Use ? to list all available smbclient commands.
[
![Connect Samba Share Directory in Linux](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][18]
Connect Samba Share Directory in Linux
16. To mount a samba share on a Linux machine use the below command.
```
$ sudo mount //adc/share_name /mnt -o username=domain_user
```
[
![Mount Samba Share Directory in Linux](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
][19]
Mount Samba Share Directory in Linux
Replace the host, share name, mount point and domain user accordingly. Use mount command piped with grep to filter only by cifs expression.
As some final conclusions, shares configured on a Samba4 AD DC will work only with Windows access control lists (ACL), not POSIX ACLs.
Configure Samba as a Domain member with file shares in order to achieve other capabilities for a network share. Also, on an Additional Domain Controller [configure Windbindd daemon][20]  Step Two  before you start exporting network shares.
--------------------------------------------------------------------------------
作者简介:
I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.
--------------------------------------------------------------------------------
via: 网址
作者:[Matei Cezar][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/cezarmatei/
[1]:http://www.tecmint.com/install-samba4-active-directory-ubuntu/
[2]:http://www.tecmint.com/wp-content/uploads/2017/02/Create-Samba-Shared-Directory.png
[3]:http://www.tecmint.com/wp-content/uploads/2017/02/Configure-Samba-Shared-Directory.png
[4]:http://www.tecmint.com/wp-content/uploads/2017/02/Access-Samba-Share-Directory-from-Windows.png
[5]:http://www.tecmint.com/wp-content/uploads/2017/02/Configure-Samba-Share-Directory-Permissions.png
[6]:http://www.tecmint.com/wp-content/uploads/2017/02/Manage-Samba-Share-Directory-User-Permissions.png
[7]:http://www.tecmint.com/wp-content/uploads/2017/02/Connect-to-Samba-Share-Directory-Machine.png
[8]:http://www.tecmint.com/wp-content/uploads/2017/02/Manage-Samba-Share-Directory-Properties.png
[9]:http://www.tecmint.com/wp-content/uploads/2017/02/Assign-Samba-Share-Directory-Permissions-to-Users.png
[10]:http://www.tecmint.com/manage-samba4-ad-from-windows-via-rsat/
[11]:http://www.tecmint.com/wp-content/uploads/2017/02/Map-Samba-Share-Folder.png
[12]:http://www.tecmint.com/wp-content/uploads/2017/02/Set-Samba-Shared-Folder-Name-Location.png
[13]:http://www.tecmint.com/wp-content/uploads/2017/02/Map-Samba-Share-Folder-in-Windows.png
[14]:http://www.tecmint.com/wp-content/uploads/2017/02/Configure-Network-Location-for-Samba-Share-Directory.png
[15]:http://www.tecmint.com/wp-content/uploads/2017/02/Apply-GPO-Changes.png
[16]:http://www.tecmint.com/wp-content/uploads/2017/02/Samba-Shared-Network-Volume-on-Windows.png
[17]:http://www.tecmint.com/wp-content/uploads/2017/02/List-Samba-Share-Directory-in-Linux.png
[18]:http://www.tecmint.com/wp-content/uploads/2017/02/Connect-Samba-Share-Directory-in-Linux.png
[19]:http://www.tecmint.com/wp-content/uploads/2017/02/Mount-Samba-Share-Directory-in-Linux.png
[20]:http://www.tecmint.com/manage-samba4-active-directory-linux-command-line/
[21]:http://www.tecmint.com/author/cezarmatei/
[22]:http://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/
[23]:http://www.tecmint.com/free-linux-shell-scripting-books/

View File

@ -0,0 +1,77 @@
Sending Email via PHP in CentOS 7 using Sendmail
============================================================
![sendmail logo](http://fasterland.net/wp-content/uploads/2017/02/sendmail-logo-750x450.png)
If you are running a **web server** or a **VPS**, you may encounter the need of sending emails using your **PHP** application.
In the same way, if you are running a **WordPress** blog or you are using any kind of **CMS** and you would allow your visitors to send you emails using a Contact form (for example using the **[Contact Form 7][3]** plugin for **WordPress**) you may need to install a simple program into your web server called **[sendmail][4]**.
> «Sendmail is a general purpose internetwork email routing facility that supports many kinds of mail-transfer and delivery methods, including the Simple Mail Transfer Protocol (SMTP) used for email transport over the Internet.» [via Wikipedia][5].
**Sendmail** can be simply installed using the package manager of your distribution.
Here are the instructions for installing **Sendmail** on **CentOS 7**.
### Installation
In order to install **sendmail** on your **CentOS 7** server, run the following command:
```
# yum install sendmail
```
### Allowing your server to send emails
If you are using **SELinux** on your **CentOS 7** server, you have to allow **sendmail** to send emails using the following command:
```
# setsebool -P httpd_can_sendmail=on
```
### Send a test email using PHP
Enter the php interactive shell using this command:
```
php -a
```
In the interactive shell, paste the following line of code:
```
mail ('user@receiver.com', "Test email", "Test email from the Internet", null, "-f user@sender.com");
```
Dont forget to replace **user@receiver.com** with the receiver email address and **user@sender.com** with the sender email address.
### Viewing the sendmail log
In order to monitor the mail log, you can use this command:
```
tail /var/log/maillog
```
Once **sendmail** is installed on your web server you can allow your users to contact you via email using a contact form. 
--------------------------------------------------------------------------------
via: http://fasterland.net/sending-email-via-php-centos-7-using-sendmail.html
作者:[Francesco Mondello][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://fasterland.net/
[1]:http://fasterland.net/author/faster3ck
[2]:http://fasterland.net/
[3]:https://wordpress.org/plugins/contact-form-7/
[4]:http://www.sendmail.com/sm/open_source/
[5]:https://en.wikipedia.org/wiki/Sendmail
[6]:http://fasterland.net/category/server-admin

View File

@ -1,46 +0,0 @@
ucasFL translating
# What is Linux? A brief Description
As the question above, we are here to know
**What is Linux?**
By simple means, Linux is an open-source operating system, based on Unix.
It is similar to Windows OS or Mac OS.
On October 5th 1991 Linus Torvalds first released the Linux kernel. The Linux kernel was(is) a very important component of Linux. Nowadays Linux is used mainly in many servers, supercomputers, etc. It is also used in mobile operating system such as Android OS with is built on Linux kernel.
In the earlier days, Linux was made for Intel x86 based PC as a free operating system. As Linux is an open-source operating system. It's source code can be modified or used and also it can be distributed by anyone under licenses such as the GNU(General Public License). So in short anyone can derive their own operating system from Linux if you have proper knowledge of what you are doing. As for example there are lots of Linux distributions.
**Now what is a Linux distribution?**
It is an operating system which is made on top of Linux kernel. It is loaded with collection of software which can be accessible to users. Moreover, it also contains package management system. There are many Linux distributions in current date. As we can't count them all currently so we will see some famous distributions.
Ubuntu, Fedora, Opensuse, Red hat Linux, Debian, etc. are few very popular Linux distributions.
[
![](https://3.bp.blogspot.com/-8ckfHXqKaPA/U2o2ufvZ0nI/AAAAAAAAAN0/Frd4OS7m7dk/s280/image_1.png)
][1]
> Ubuntu, a very popular Linux distribution and 3rd most popular operating system.
A Linux distribution is a complete package which is ready to install on PC. Once a user has installed a Linux distribution in desktop or server, It is ready to use with ready made collection of various software and applications. Nowadays many popular Linux distributions are sporting amazing Graphical user interface(GUI), which makes them a very good alternative to windows OS or mac OS.
These days Linux distributions are heavily improving in their performance, interface, accessibility and most important user friendliness. Some distributions like Ubuntu, Linux mint, etc. are gaining a very good market position along with increasing the number of users day by day. Ubuntu is 3rd most famous operating system after Windows and mac.
The overall summary of above is that Linux is a powerful operating system (yes it's powerful). Day after day it's gaining more user attraction and reputation too. So if you haven't tried any Linux distribution in your PC yet, then we would suggest you to give it a try. We are quite sure that Linux will never disappoint you.
--------------------------------------------------------------------------------
via: http://www.techphylum.com/2014/05/what-is-linux-brief-description.html?m=1
作者:[sumit rohankar ][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://plus.google.com/112160169713374382262
[1]:http://3.bp.blogspot.com/-8ckfHXqKaPA/U2o2ufvZ0nI/AAAAAAAAAN0/Frd4OS7m7dk/s1600/image_1.png
[2]:http://www.techphylum.com/2014/05/desktop-gadgets-in-linux-ubuntu.html

View File

@ -1,29 +1,28 @@
如何挑选你的第一门编程语言
============================================================[
][1]
============================================================
[][1]
![How to choose your first programming language](https://opensource.com/sites/default/files/styles/image-full-size/public/images/education/EDU_OSDC_IntroOS_520x292_FINAL.png?itok=va-tdc8j "How to choose your first programming language")
opensource.com 供图
人们有着各种各样的原因想学编程。你也许想要做一个程序,或者你只是想投入其中。所以,在选择你的第一门编程语言之前,问问你自己:你想要程序运行在哪里?你想要程序做什么?
人们有着各种各样的原因想学编程。你也许想要做一个程序,或者你只是想投入其中。所以,在选择你的第一门编程语言之前,问问你自己:你想要程序运行在哪里?你想要程序做什么?
你选择编程的原因决定第一门编程语言的选择。
你选择编程的原因将会决定第一门编程语言的选择。
_在这篇文章里我会交换着使用“编程”code , program、“开发”develop 等动词“代码”code、“程序”program、“应用”application/app等名词。这考虑到你可能听过的语言用法_
_在这篇文章里我会交使用“编程”code , program、“开发”develop 等动词“代码”code、“程序”program、“应用”application/app等名词。这考虑到你可能听过的语言用法_
### 了解你的设备
在你编程语言的选择上,你的程序将运行在何处是个决定性因素。
桌面应用是运行在台式机或者笔记本电脑上的传统软件程序。这样你将会编写同一时间内只能在一台电脑上运行的代码。移动应用,也就是熟知的“ APP ”,运行在使用 IOS Android 或者其他操作系统的移动设备上。网页应用是功能像应用的网页。
桌面应用是运行在台式机或者笔记本电脑上的传统软件程序。这样你编写的代码在同一时间内只能在一台电脑上运行。移动应用,也就是我们所熟知的“ APP ”,运行在使用 IOS Android 或者其他操作系统的移动设备上。网页应用是功能像应用的网页。
按网的 客户-服务器 架构分,网页开发者经常被分为两类:
互联网的 客户-服务器 架构分,网页开发者经常被分为两类:
* 前端开发,就是编写运行在浏览器自身的代码。这是个面对用户的部分,或者说是程序的前端。有时候被称为客户端编程,因为浏览器是网的客户-服务器架构的半壁江山。浏览器运行在你本地的电脑或者设备上。
* 前端开发,就是编写运行在浏览器自身的代码。这是个面对用户的部分,或者说是程序的前端。有时候被称为客户端编程,因为浏览器是互联网的客户-服务器架构的半壁江山。浏览器运行在你本地的电脑或者设备上。
* 后台开发,也就是大家所熟知的服务器端开发,编写的代码运行在你不能实际接触的服务器电脑上。
* 后台开发,也就是大家所熟知的服务器端开发,编写的代码运行在你无法实际接触的服务器上。
### 创造什么
@ -38,7 +37,7 @@ _在这篇文章里我会交换着使用“编程”code , program
### Python
[Python][2] 是对于第一次编程的人来说是最为流行的编程语言之一而且这不是巧合。Python 是一门通用的编程语言。这意味着它能应用在广泛的编程任务上。你能用 Python 完成几乎_所有_事情。这一点使得很多新手能实际应用这门编程语言。另外 Python 有两个重要的设计特征,使得其对于新手更友好:清晰、类似于英语的[语法][3]和强调代码的[可读性][4]。
[Python][2] 是对于第一次编程的人来说是最为流行的编程语言之一而且这不是巧合。Python 是一门通用的编程语言。这意味着它能应用在广泛的编程任务上。你能用 Python 完成几乎_所有_事情。这一点使得很多新手能实际应用这门编程语言。另外, Python 有两个重要的设计特征,使得其对于新手更友好:清晰、类似于英语的[语法][3]和强调代码的[可读性][4]。
从本质上讲,一门编程语言的语法就是你所输入的能让这编程语言生效的内容。这包括单词,特殊字符(例如“ ; ”、“ $ ”、“ % ” 或者 “ {} ”空格或者以上任意的组合。Python 尽可能地使用英语不像其他编程语言那样经常使用标点符号或者特殊的字符。所以Python 阅读起来更自然、更像是人类语言。这一点帮助新的编程人员聚焦于解决问题,而且他们能花费更少的时间挣扎在语言自身的特性上。
@ -75,11 +74,11 @@ def fun(x):
big_fun(x)
```
在这里,只有一个选择。如果代码不是这样排列的,它将不能工作。如果你编写了可以工作的代码,你就有了可阅读的代码。同样也留意一下在语法上的差异。不同的是“ def ” ,在 Python 代码中这个词是英语单词大家都很熟悉这单词的含义译者注def 是 definition 的缩写,定义的意思)。在 C 语言的例子中 “ void ” 和 “ int ” 就没有那么直接。
在这里,只有一个选择。如果代码不是这样排列的,它将无法工作。如果你编写了可以工作的代码,你就有了可阅读的代码。同样也留意一下两者在语法上的差异。不同的是“ def ” ,在 Python 代码中这个词是英语单词大家都很熟悉这单词的含义译者注def 是 definition 的缩写,定义的意思)。在 C 语言的例子中 “ void ” 和 “ int ” 就没有那么直接。
Python 也有个优秀的生态系统。这有两层意思,第一,你有一个使用该语言的庞大、活跃的社区,当你需要帮助指导的时候,你能向他们求助。第二,它有大量早已存在的库,库是指完成特定功能的代码集合。从高级数学运算、图形到计算机视觉,甚至是你能想象到的任何事情。
Python 为你第一门编程语言有两个缺点。第一是它有时候安装起来很复杂,特别是在运行着 Windows 的电脑上。(如果你有一台 Mac 或者 Linux 的电脑Python 已经安装好了。)虽然这问题不是不能克服,而且情况总在改善,但是这对于一些人来说还是个阻碍。第二个缺点是,对于那些明确想要建设网站的人来讲,虽然有很多用 Python 写的项目(例如 [Django][6] 和[Flask][7] ),但是编写运行在浏览器上的 Python 代码却没有多少选择。它主要是后台或者服务器端语言。
Python 为你第一门编程语言有两个缺点。第一是它有时候安装起来很复杂,特别是在运行着 Windows 的电脑上。(如果你有一台 Mac 或者 Linux 的电脑Python 默认已经安装好了。)虽然这问题不是不能克服,而且情况总在改善,但是这对于一些人来说还是个阻碍。第二个缺点是,对于那些明确想要建设网站的人来讲,虽然有很多用 Python 写的项目(例如 [Django][6] 和[Flask][7] ),但是编写运行在浏览器上的 Python 代码却没有多少选择。它主要是后台或者服务器端语言。
### JavaScript
@ -111,7 +110,7 @@ via: https://opensource.com/article/17/1/choosing-your-first-programming-languag
作者:[Kojo Idrissa][a]
译者:[ypingcn](https://github.com/ypingcn)
校对:[校对者ID](https://github.com/校对者ID)
校对:[bestony](https://github.com/bestony)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -2,14 +2,14 @@ Git 中糟糕的想法
============================================================
![Corey Quinn](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/corey-quinn-lcna.png?itok=IU3oGzfn "Corey Quinn")
在 LinuxCon 北美会议上 FutureAdvisor 的 Corey Quinn 说“Git 的确让你可以做一些额外的强大的事。在这次谈论中,强大是愚蠢的委婉说法” [Linux 基金会][2]
![Corey Quinn](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/corey-quinn-lcna.png)
在 LinuxCon 北美会议上 FutureAdvisor 的 Corey Quinn 说“Git 的确让你可以做一些额外的强大的事。但是在这次谈论中,强大是愚蠢的一种委婉说法” [Linux 基金会][2]
在 LinuxCon 北美会议上 FutureAdvisor 的 Corey Quinn 说“Git 的确让你可以做一些额外的强大的事。在这次谈论中,强大是愚蠢的委婉说法”。在使用 Git 时谁没有至少经历一个时刻让你感觉像个傻子当然Git 是很棒的,每个人都在使用它,你可以用几个基本命令完成你的大部分工作。但它也有强大的力量,让我们觉得我们不知道我们在做什么。
在 LinuxCon 北美会议上 FutureAdvisor 的 Corey Quinn 说“Git 的确让你可以做一些额外的强大的事。但是在这次谈论中,强大是愚蠢的委婉说法”。在使用 Git 时,谁没有至少经历一个时刻让你感觉自己像个傻子当然Git 是很棒的,每个人都在使用它,你可以用几个基本命令完成你的大部分工作。但它也有一些强大的功能,让我们觉得我们不知道我们在做什么。
但这真的对我们自己不公平。没有人知道一切每个人知道的都不同。Quinn 提醒我们:“在我许多谈话的 QA ,人们有时举手说:“嗯,我有一个傻问题。” 你看到人们在那里说:“是啊!这是一个非常愚蠢的问题”。但是当他们得到答案时,这些人正在大量记笔记。
但这真的对我们自己不公平。没有人知道一切每个人知道的都不同。Quinn 提醒我们:“在我许多谈话的 QA 部分,人们有时举手说:“嗯,我有一个傻问题。” 你看到人们在那里说:“是啊!这是一个非常愚蠢的问题”。但是当他们得到答案时,这些人正在大量记笔记。
![Git](https://www.linux.com/sites/lcom/files/styles/floated_images/public/heffalump-git-corey-quinn_0.png?itok=xh5JlnLW "Git")
![Git](https://www.linux.com/sites/lcom/files/styles/floated_images/public/heffalump-git-corey-quinn_0.png)
[有权限使用][1]
@ -17,9 +17,9 @@ Quinn 开始了一些有趣的演示,你可以用 Git 做一些可怕的事情
你有连续输入错误么?例如,当你想要 “git status” 时却输入 “git stitis”Quinn 有一个方案“Git 确实对别名有内置支持,所以你可以使用相对较长、复杂的东西,并把它命名为一个短的 Git 命令。” 你还可以使用 shell 别名。
Quinn 说:“我们都听说过 rebase master 然后强制推送这样一个给你所有同事的搞笑恶作剧它会改变历史所以突然之前发生的事情并不是人们真正在做的事而且其他人都被卷入了这个过程。。一群鲸鱼被称为“pod”一群乌鸦中被称为“谋杀”一群开发者被称为“合并冲突”。。。更严重的是如果有人这样做你有几个选择。包括从备份中恢复 master还原提交或者把责任人从屋顶扔下去。或者采取一定的预防措施并使用一个并不知名的 Git 功能称为分支保护。启用分支保护后,无法删除或强制推送分支,并且在接受前,请求必须至少有一个审核。”
Quinn 说:“我们都听说过 rebase master 然后强制推送这样一个给你所有同事的搞笑恶作剧它会改变历史所以突然之前发生的事情并不是人们真正在做的事而且其他人都被卷入了这个过程。。一群鲸鱼被称为“pod”一群乌鸦中被称为“谋杀”一群开发者被称为“合并冲突”。。。更严重的是如果有人这样做你有几个选择。包括从备份中恢复 master还原提交或者把责任人从屋顶扔下去。或者采取一定的预防措施并使用一个并不知名的 Git 功能称为分支保护。启用分支保护后,无法删除或强制推送分支,并且在接受前,合并请求必须至少有一个审核。”
Quinn 演示了几个更奇妙的有用工具,使 Git 更高效和万无一失,如 mr、vcsh和定制的 shell 提示。你可以在下面看到完整的视频,并享受更多的傻笑话
Quinn 演示了几个更奇妙的有用工具,使 Git 更高效和万无一失,如 mr、vcsh和定制的 shell 提示。你可以在下面看到完整的视频,了解更多有趣的事情
--------------------------------------------------------------------------------
@ -27,7 +27,7 @@ via: https://www.linux.com/news/event/LinuxCon-Europe/2016/terrible-ideas-git-0
作者:[CARLA SCHRODER][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[Bestony](https://github.com/Bestony)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,146 +0,0 @@
6 个值得好好学习的 JavaScript 框架
=====================
![值得好好学习的 6 个 JavaScript 框架](https://discoversdkcdn.azureedge.net/postscontent/products/java.png)
**常言道,条条大路通罗马,可是那一条适合我呢?** 由于用于构建前端页面等现代技术的出现JavaScript 在 Web 开发社区早已是如雷贯耳。通过在网页上编写几个函数并提供执行逻辑,可以很好的支持 HTML (主要是用于页面的 _表现_ 或者 _布局_)。如果没有 JavaScript那页面将没有任何 _交互特性_ 可言。
框架和库的现代文化 (culture) 已经千变万化 (has risen from the abyss) 了,很多老旧的技术纷纷开始将函数分离进行模块化。现在不再需要让整个核心语言来支持所有特性了,开发者允许所有用户创建库和框架来增强核心语言的具体功能。这样,语言的灵活性获得了了非常显著的提高。
如果在已经在使用 **JavaScript** (可能还配合了 **JQuery**) 来支持 HTML那么你肯定知道开发和维护一个大型应用需要付出多大的努力以及编写多么复杂的代码而 JavaScript 可以帮助你快速的构建交互式 Web 应用 (可以包含单页面或者多页面应用)。
当一个新手开发者想要学习 JavaScript 时,他常常会被各种 JavaScript 框架吸引,也幸亏有为数众多的社区,任何开发者都可以轻易地通过在线教程或者其他资源来学习。
但是,唉!多数的程序员都很难决定学习和使用哪一个框架。因此在本文中,我将为大家推荐 6 个值得好好学习的 JavaScript 框架。让我们开始吧。
## 6 个值得好好学习的 JavaScript 框架
### 1、AngularJS
**
![Angular](https://discoversdkcdn.azureedge.net/postscontent/products/AngularJS_logo.svg.png)
**
**(注:这是我个人最喜欢的框架)**
无论你何时听说的 JavaScript很可能你早就听过 AngularJS因为这是在 JavaScript 社区中最为广泛使用的框架了。它发布于 2000 年,由 Google 开发 (这够有说服力让你是用了吧) 的开源项目,这意味着你可以阅读、编辑和修改其源代码以便更加符合自身的需求,并且不用想其开发者支付一分钱 (这不是很酷吗?)。
如果说你觉得通过纯粹的 JavaScript 代码编写一个复杂的 Web 应用比较困难的话,然后你就不在有当初的激情去了解它是如何显著减轻你的编码负担了。它符合支持双向数据绑定的 **MVC (Modelviewcontroller模型-视图-控制)** 设计典范。假如你不熟悉 MVC你只需要知道他代表着无论何时探测到某些变化它将自动更新前端 (比如,用户界面端) 和后端 (代码或者服务器端) 数据。
MVC 可为大大减少构建复杂应用程序所需的时间和精力,所有你只需要集中精力与一处即可 (DOM 编程接口会自动同步更新视图和模型)。由于 _视图组件__模型组件_ 是分离的,你可以很容易的创建一个可复用的组件,使得用户界面的效果非常好看且出人意外。
如果因为某些原因,你已经是用了 **TypeScript** (一种与 JavaScript 非常相似的语言),那么你可以很容易就上手 AngularJS因为这两者的语法高度相似。与 **TypeScript** 相似这一特点在一定程度上提升了 AngularJS 的受欢迎程度。
目前Angular 2.0 已经发布,并且提升了移动端的性能,这也足以向一个新的开发者证明,该框架的开发活跃的够高并且定期更新。
AngularJS 有着大量的用户,包括 (但不限于) Udemy、Forbes、GoDaddy、Ford、NBA 和 Oscars。
对于那些想要一个高效的 MVC 框架,用来开发面面俱到、包含健壮、现代化基础功能的单页应用的用户来说,我极力的推荐这个框架。这是第一个为无经验 JavaScript 开发者设计的框架。
### 2、React
**
![React](https://discoversdkcdn.azureedge.net/postscontent/react%20%281%29.png)
**
与 AngularJS 相似React 也是一个 **MVC (Modelviewcontroller模型-视图-控制)** 类型的框架,但不同的是,它完全集中于 _视图组件_ (因为它是为 UI 特别定制的) 并且可与任何架构进行无缝衔接。这意味着你可以马上将它运用到你的网站中去。
它从核心函数中抽象出 DOM 编程接口 (并且因此使用了虚拟 DOM),所以你可以仅为快速的渲染 UI这使得你能够通过 **_node.js_** 将它作为一个客户端框架来使用。它是由 Facebook 开发的开源项目,同时有个各种不同的开发者为它贡献代码。
假如说你见到过并喜欢 Facebook 和 Instagram 的界面,那么你将会爱上 React。通过 React你可以给你的应用的每个状态设计一个简单的视图当数据改变的时候视图也自动随之改变。其他任何的负责 UI 也都是可以创建的并且只要你想你可以在任何应用中复用它。在服务器端React 同样支持通过 **_node.js_** 来进行渲染。对于其他的接口React 也一样表现得足够的灵活。
除 Facebook 和 Instagram 外,还有好多个公司也在使用 React包括 Whatsapp、BBC、、PayPal、Netflix 和 Dropbox 等。
如果你只需要一个前端开发框架来构建一个非常复杂且界面极好的强大视图层,那我极力向你推荐这个框架,但你需要有足够的经验来处理各种类型的 JavaScript 代码,你也不再需要其他的组件了 (因为你可以自己集成它们)
### 3、Ember
**
![Ember](https://discoversdkcdn.azureedge.net/postscontent/Ember.js_Logo_and_Mascot.png)
**
这个 JavaScript 框架在 2011 正式发布,是由 _Yehuda Katz_ 开发的开源项目。它有一个庞大且活跃的在线社区,所有再有任何问题之时,你都可以在社区中提问。该框架吸收融合了非常多的通用 JavaScript 风格和实例,以便确保开发者能最快的做到开箱即用。
它使用了 **MVVM (Modelviewviewmodel模型-视图-视图模型)** 的设计模式,这使得他与 MVC 有些不一样,因为它由一个 _连接器 (binder)_ 帮助视图和数据连接器进行通信。
对于 DOM 编程接口的快速服务端渲染,它借助了 **_Fastboot.js_**,这能够让那些复杂 UI 程序性可以极大的提高。
它的现代化路由模式和模型引擎还支持 **_RESTful APIs_**,这可以却确保你可以使用最新的技术。它支持句柄集合模板,用以自动更新数据。
早在 2015 年间,它的风头曾一度盖过 AngularJS 和 React被称为最好的 JavaScript 框架,对于它在 JavaScript 社区中的可用性和吸引力,这样的说服力该是足够了的。
对于不追求高灵活性和大型基础应用的用户,并且仅仅只是为了赶赴工期、完成任务的话,我个人非常推荐这个 JavaScript 框架,
### 4、Adonis
**
![Adonis](https://discoversdkcdn.azureedge.net/postscontent/products/adonis.jpg)
**
如果你曾使用过 _Laravel__NodeJS_,那么你在使用这一个框架之时会觉得相当顺手,因为它是集合了这两个平台的优点而形成的一个实体,对于任何种类的现代应用来说,它都显得非常专业、圆润和精致。
它使用了 _NodeJS_,所以是一个很好的后端框架,同时还附带有一些前端特性 (与前面提到那些框架不同的是,它们更多地注重后端),所以想要进入后端开发的新手开发者会发觉这个框架相当迷人。
相比于 _NoSQL_,很多的开发者都比价喜欢使用 _SQL_ 数据库 (因为他们需要增强和数据以及其他特性的交互性),这一现象在这个框架中得到了很好的体现,这时的它跟接近标准,开发者也跟容易使用。
如果你有混迹于各类 PHP 社区,那你一定很熟悉 **服务提供商 (Service Providers)**,也由于 Adonis 相应的 PHP 风格包含其中,所以在使用它的时候,你会觉得似曾相识。
在它所有的特性中,最好的的便是那个极为强大的路由引擎,支持使用所有的函数来组织和管理应用的状态、支持错误处理机制、支持通过 SQL ORM 来进行数据库查询、支持生成器、支持箭头函数 (arrow functions)、支持代理。
如果喜欢使用无状态 REST API 来构建服务器端应用,我比较推荐它,因为你会爱上这个框架的。
### 5、Vue.js
**
![Vue.js](https://discoversdkcdn.azureedge.net/postscontent/products/vuejs-logo.png)
**
这一个开源的 JavaScript 框架发布于 2014 年,它有个极为简单的 API用以为现代 Web 接口开发 _交互式组件 (Reactive components)_。其设计着重于简单易用。与 Ember 相似,它使用的是 **MVVM (Modelviewviewmodel模型-视图-视图模型)** 设计范例,这样简化了设计。
最有吸引力的一点是,你可以根据自身需求来选择使用的模块。比如,你需要编写简单的 HTML 代码、抓取 JSON、创建一个 Vue 实例来完成可以复用的小特效。
与之前那个 JavaScript 相似,它使用双路数据绑定来更新模型和视图,同时也使用连接器来完成视图和数据连接器来通信。这是一个还未完全成熟的框架,因为它全部的关注点都在视图层,所以你需要自己注意其他的组件。
如果你熟悉 **_AngularJS_**,那你会感觉很顺手,因为它嵌入了 **_AngularJS_** 的架构,如果你懂得 JavaScript 的基础用法,那你的所以许多项目都可以轻易地迁移到该框架之下。
假如你只想把任务完成,同时能够提升只是自身的 JavaScript 编程经验,又或者你需要学习不同的 JavAScript 框架的本质,我极力推荐这个。
### 6、Backbone.js
**
![Backbone.JS](https://discoversdkcdn.azureedge.net/postscontent/products/backbonejs.png)
**
这个框架可以很容易的集成任何第三方的模板引擎,默认使用的是 _Underscore_ 模板引擎,而且该框架进有这个依赖 (包含 **JQuery**),因此它以轻量而闻名。通过 **MVC (Modelviewcontroller模型-视图-控制)** (可以自动更新前端和后端) 范例的支持,它具备了 **RESTful JSON**
加入你曾经使用过著名的社交新闻网络服务 **reddit**,那么你肯定听说过它使用了 **Backbone.js** 构建的单页面应用。**Backbone.js** 的原创作者为之建立了与 _CoffeScript_ 旗鼓相当的 _Underscore_ 模板引擎,基本上开发者都知道他的事情。
该框架提供了 键值对 (key-value) 模型、视图以及几个打包的模块,所以你不需要额外下载其他的外部包,这样可以节省不少时间。框架的源码可以在 GitHub 进行查看,这意味着根据需求进行深度定制。
如果你是寻找一个入门级框架来快速构建一个单页面应用,那么这个框架非常适合你。
### 总而言之
至此,我已经在本文着重说明了 6 个值得好好学习的 JavaScript 框架,希望你读完本文后能够决定使用哪个框架来完成自己的任务。
如果说对于选择框架,你还是不知所措,请记住,这个世界是实践出真知而非教条主义的。最好就是从列表中挑选一个来使用,看看最后是否满足你的需求和兴趣,如果还是不行,接着试试另一个。你也尽管放心好了,列表中的框架肯定是足够了的。
-------------------------------
译者简介:
[GHLandy](http://GHLandy.com) —— 生活中所有欢乐与苦闷都应藏在心中,有些事儿注定无人知晓,自己也无从说起。
-------------------------------
via: http://www.discoversdk.com/blog/6-best-javascript-frameworks-to-learn-in-2016
作者:[By Danyal Zia ][a]
译者:[GHLandy](https://github.com/GHLandy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.discoversdk.com/blog/6-best-javascript-frameworks-to-learn-in-2016

View File

@ -1,85 +0,0 @@
如何在 RHEL 上设置 Linux RAID 1
============================================================
### 设置 Linux RAID 1
配置 LINUX RAID 1 非常重要,因为它提供冗余。
RAID 分区拥有高级功能,如冗余和更好的性能。所以让我们来说下如何实现 RAID以及让我们来看看不同类型的 RAID
■ RAID 0分条磁盘组合在一起形成一个大型驱动器。这以可用性为代价提供了更好的性能。如果 RAID 中的任何一块磁盘出现故障,则整个磁盘集将无法使用。最少需要两块磁盘。
■ RAID 1镜像磁盘从一个复制到另一个允许冗余。如果一块磁盘发生故障则另一块磁盘接管从原始磁盘获取数据的完整的副本。这里的缺点是写入时间慢。最少需要两块磁盘。
■ RAID 5带奇偶校验的分条磁盘类似于 RAID 0并且连接在一起以形成一个大型驱动器。这里的区别是25 的磁盘用于奇偶校验位,这允许在单个磁盘发生故障时恢复磁盘。最少需要三块盘。
让我们继续进行 Linux RAID 1 配置。
安装 Linux RAID 1 的要求:
1. 系统中应该安装了 mdam请用下面的命令确认。
```
[root@rhel1 ~]# rpm -qa|grep -i mdadm
mdadm-3.2.2-9.el6.x86_64
[root@rhel1 ~]#
```
2. 系统应该连接了 2 块磁盘。
因此创建两个分区一个磁盘一个sdc、sdd每个分区占据整块磁盘。
```
Disk /dev/sdc: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x67cc8cfb
Device Boot Start End Blocks Id System
/dev/sdc1 1 130 1044193+ 83 Linux
Disk /dev/sdd: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0294382b
Device Boot Start End Blocks Id System
/dev/sdd1 1 130 1044193+ 83 Linux
```
--------------------------------------------------------------------------------
作者简介:
大家好!我是 Manmohan Mirkar。我很高兴你们在这里我在 10 多年前开始使用 Linux我从来没有想过我会到今天这个地步。我的激情是帮助你们获取 Linux 知识。谢谢你们在这!
--------------------------------------------------------------------------------
via: http://www.linuxroutes.com/linux-raid-1/
作者:[Manmohan Mirkar][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.linuxroutes.com/author/admin/
[1]:http://www.linuxroutes.com/linux-raid-1/#
[2]:http://www.linuxroutes.com/linux-raid-1/#
[3]:http://www.linuxroutes.com/linux-raid-1/#
[4]:http://www.linuxroutes.com/linux-raid-1/#
[5]:http://www.linuxroutes.com/linux-raid-1/#
[6]:http://www.linuxroutes.com/linux-raid-1/#
[7]:http://www.linuxroutes.com/linux-raid-1/#
[8]:http://www.linuxroutes.com/linux-raid-1/#
[9]:http://www.linuxroutes.com/linux-raid-1/#
[10]:http://www.linuxroutes.com/linux-raid-1/#
[11]:http://www.linuxroutes.com/linux-raid-1/#
[12]:http://www.linuxroutes.com/author/admin/
[13]:http://www.linuxroutes.com/linux-raid-1/#respond

View File

@ -1,94 +0,0 @@
MySQL集群服务简介
=====================
[MySQL Cluster.me][1]开始提供基于**Galera Replication**技术的**MySQL**和**MariaDB**集群服务。
在本文中我们将会讨论**MySQL**和**MariaDB**集群服务的主要特性。
[
![MySQL集群服务](http://www.tecmint.com/wp-content/uploads/2017/01/MySQL-Clusters-Service.png)
][2]
MySQL集群服务
### 什么是MySQL集群
如果你曾经疑惑过如何提升MySQL数据库的可靠性和可扩展性然后你会发现其中一个解决办法就是通过基于**Galera Cluster**技术的**MySQL集群**解决方案。
这项技术使得你可以在一个或者多个数据中心的多个服务器上获得经过同步了的完整MySQL数据副本。这可以实现数据库的高可用性 - 当你的一个或者多个数据库服务器崩溃后,仍然能够从其它剩余服务器上获得完整的服务。
需要注意的是在**MySQL集群**中需要至少3台服务器因为当其中一台服务器从崩溃中恢复的时候需要从仍然存活的两台服务器中选择一个**捐赠者**拷贝一份数据,所以为了能够从崩溃中顺利恢复数据,必须要保证两台在线服务器以便从中恢复数据。
同样,[MariaDB集群][3]和MySQL集群在本质上是相同的因为MariaDB是基于MySQL开发的一个更新、更优化的版本。
[
![MySQL集群与Galera复制技术](http://www.tecmint.com/wp-content/uploads/2017/01/MySQL-Clusters-Galera-Replications.png)
][4]
MySQL集群与Galera复制技术
### 什么是MySQL和MariaDB集群服务?
**MySQL集群**服务提供了能够同时解决可靠性和可扩展性的方案。
首先,集群服务使你能够忽略任何数据中心引起的问题,并能获得高达**100%正常运行时间**的数据库高可用性。
其次将乏味无趣的MySQL集群相关管理工作外包出去能够使你更加专注于业务工作。
事实上,独立管理一个集群需要你能够完成以下所有工作:
1. **安装和设置集群**  这可能需要一个有经验的数据库管理员花费数小时来设置一个可用的集群。
2. **集群监控**  必须使用一种方案24 * 7监控集群运作因为会发生很多问题-集群不同步、服务器崩溃、硬盘空间满等
3. **优化及调整集群大小**  当你管理了很大的数据库时,调整集群大小将会是一个巨大的挑战。处理这个任务时需要格外小心。
4. **备份管理** –为了防止集群失败带来的危险,你需要备份集群数据。
5. **解决问题**  你需要一个经验丰富的工程师来对集群进行优化及解决相关问题。
但是现在你只需要通过使用**MySQLcluster.me**团队提供的**MySQL集群服务**就可以节省大量的时间和金钱。
###### MySQLcluster.me提供的MySQL集群服务包括了哪些内容
除了很多高可用性数据服务提供的**100%**可用性外,你还将获得如下保证:
1. **任何时候都可以调整MySQL集群大小**  你可以增加或者减少集群资源包括RAM,CPU,DISK以便满足业务尖峰需求。
2. **优化硬盘和数据库的表现**  硬盘能够达到**100,00 IOPS**,这对数据库操作十分重要。
3. **数据中心选择**  你可以选择将集群布置在哪个数据中心。.当前支持的数据中心有Digital Ocean, Amazon AWS, RackSpace, Google Compute Engine.
4. **24×7集群服务支持**  我们的团队能够为你集群上发生的任何问题提供支持,甚至包括对你的集群架构提供建议。
5. **集群备份**  我们团队会为你设置备份,这样你的集群数据能够每天备份到安全的地方。
6. **集群监控**  我们团队设置了自动监控以便能够及时发现你的集群出现的问题,并提供支持,哪怕你并没有在值班。
拥有自己的**MySQL集群**会有很多优势,但是需要你足够耐心和有经验才行。
与[MySQL Cluster][5]团队联系以便找到适合你的工具包.
--------------------------------------------------------------------------------
作者简介:
我是Ravi Saive,开发了TecMint.电脑极客和Linux专家喜欢分享关于Internet的建议和点子。我的大部分服务都运行在开源平台Linux上。关注我的Twitter,Facebook和Google+。
--------------------------------------------
via: http://www.tecmint.com/getting-started-with-mysql-clusters-as-a-service/
作者:[Ravi Saive][a]
译者:[beyondworld](https://github.com/beyondworld)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/admin/
[1]:https://www.mysqlcluster.me/#utm_source=tecmintpost1&utm_campaign=tecmintpost1&utm_medium=tecmintpost1
[2]:http://www.tecmint.com/wp-content/uploads/2017/01/MySQL-Clusters-Service.png
[3]:https://www.mysqlcluster.me/#utm_source=tecmintpost1&utm_campaign=tecmintpost1&utm_medium=tecmintpost1
[4]:http://www.tecmint.com/wp-content/uploads/2017/01/MySQL-Clusters-Galera-Replications.png
[5]:https://www.mysqlcluster.me/#utm_source=tecmintpost1&utm_campaign=tecmintpost1&utm_medium=tecmintpost1

View File

@ -1,60 +1,60 @@
如何编写与使用定制的 Shell 函数和功能
如何编写和使用自定义的 Shell 函数和函数
============================================================
在 Linux 系统下,我们大量的使用 Shell 脚本来帮助我们完成许多事情,其中包括展示信息,甚至[自动化某些系统管理任务][1],制作简单的命令行工具等。
在 Linux 系统下,Shell 脚本在各种不同的情形下给予我们帮助,例如展示信息,甚至 [自动执行特定的系统管理任务][1],创建简单的命令行工具等等。
在本文中,我们将向新的 Linux 用户介绍在哪里存储他们定制的 shell 脚本,解释如何编写 shell 函数和功能库,如何在其它的脚本中使用那些功能库中的函数。
在本指南中,我们将向 Linux 新手展示如何可靠地存储自定义的 shell 脚本,解释如何编写 shell 函数和函数库,以及如何在其它的脚本中使用函数库中的函数。
### 那么 Shell 脚本要存储在哪里呢
### Shell 脚本要存储在何处
为了在执行脚本的时候避免指定脚本的绝对路径,脚本必须被存储在 $PATH 这个环境变量所指定路径的其中一个路径下
为了在执行你自己的脚本时不必输入脚本所在位置的完整或绝对路径,脚本必须被存储在 `$PATH`环境变量所定义的路径里的其中一个
使用下面的命令可以查看你系统中的 $PATH 环境变量:
使用下面的命令可以查看你系统中的 `$PATH` 环境变量:
```
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
```
通常来说,如果在用户主目录下有 bin 目录存在的话,你就可以将 shell 脚本存储在那个目录下,因为那个目录会自动的包含在用户的 $PATH 环境变量中(在Centos6/7下是这样的在Debian8下不是这样的在Ubuntu16.04下又是这样的)。
通常来说,如果在用户的家目录下存在名为 `bin` 的目录,你就可以将 shell 脚本存储在那个目录下,因为那个目录会自动地被包含在用户的 `$PATH` 环境变量中(译者注:在 Centos6/7 下是这样的,在 Debian8 下不是这样的,在 Ubuntu16.04 下又是这样的)。
因此,在你的主目录下创建 bin 目录吧(当然也可以用来存储 Perl[Awk][2]Python 脚本或者是其它程序):
因此,在你的主目录下创建 `bin` 目录吧(当然这里也可以用来存储 Perl、[Awk][2] 或 Python 的脚本,或者其它程序):
```
$ mkdir ~/bin
```
接着,让我们来建立一个叫做 liblibraries 的简写)的目录来存放你自己的功能库吧。你也可以在其中存放其它编程语言的功能库如 C 语言Python 等等。在 lib 目录下建立另一个称为 sh 的目录;用这个目录来存放你的 shell 功能库:
接着,建立一个名为 `lib`libraries 的简写)的目录来存放你自己的函数库。你也可以在其中存放其它编程语言的函数库,如 C Python 等语言。在 `lib` 目录下建立另一个名为 `sh` 的目录,这个目录将被用来存放你的 shell 函数库:
```
$ mkdir -p ~/lib/sh
```
### 创建你自己的 Shell 函数和功能
### 创建你自己的 Shell 函数和函数
一个 shell 函数就是在一段脚本中能够一件特定任务的一组命令。它们使用起来和其它编程语言中的过程可能指的是类似SQL中的存储过程之类的吧子例程与函数十分相似。
一个 `shell 函数` 就是在脚本中能够完成特定任务的一组命令。它们的工作原理与其他编程语言中的过程译者注可能指的是类似SQL中的存储过程之类的吧、子例程、函数类似。
编写函数的语法如下:
编写一个函数的语法如下:
```
[function] 函数名() { 命令 } (这里添加了原文中没有的[function],下文中没有使用这种形式的因此不确定是否合适
函数名() { 一系列的命令 } (校对注:在函数名前可以加上 function 关键字,但也可省略不写
```
例如,你在脚本中写一个用来显示日期的函数:
例如,你可以像下面那样一个脚本中写一个用来显示日期的函数:
```
showDATE() {date;}
```
每当你需要显示日期时,只需要简单的调用函数的函数名即可:
每当你需要显示日期时,只需调用函数的函数名即可:
```
$ showDATE
```
简单来说 shell 功能库也是一个 shell 脚本,不过你也可以编写一个功能库来存储一些函数,以便你可以在其它的 shell 脚本中调用
简单来说 shell 函数库也是一个 shell 脚本,不过你可以在一个函数库中仅存储其它 shell 脚本中需要调用的函数
下面就是一个在我的 ~/lib/sh 目录下的功能库的实例其中包含了更多的函数示例
下面展示的是在我的 `~/lib/sh` 目录下一个名为 `libMYFUNCS.sh` 的库函数
```
#!/bin/bash
@ -91,21 +91,21 @@ IFS="$oldifs" #store old internal field separator
保存文件并且给脚本添加执行权限。
### 如何从功能库中调用函数呢?
### 如何从函数库中调用函数
要使用库里的某个函数,你首先需要使用下面列出的方式将包含改函数的功能库导入到需要执行的 shell 脚本中:
要使用某个 `lib` 目录下的函数,首先你需要按照下面的形式 将包含该函数的函数库导入到需要执行的 shell 脚本中:
```
$ . /path/to/lib (这里的. 和路径间应该是有空格的)
OR
$ . /path/to/lib (译者注:这里的 . 和路径间应该是有空格的)
$ source /path/to/lib
```
你可以像下面演示的方式一样,在其它的脚本中使用来自 ~/lib/sh/libMYFUNCS.sh 的 printUSERDETS 函数。
这样你就可以像下面演示的那样,在其它的脚本中使用来自 `~/lib/sh/libMYFUNCS.sh``printUSERDETS` 函数。
这样你就可以在这个脚本再写一遍相同的代码来输出指定的用户信息,而只需要简单的调用已存在的函数即可。
在下面的脚本中,如果要打印出某个特定用户的详细信息,你不必再一一编写代码,而只需要简单地调用已存在的函数即可。
创建一个名为 test.sh 的新文件:
创建一个名为 `test.sh` 的新文件:
```
#!/bin/bash
@ -117,7 +117,7 @@ printUSERDETS
exit 0
```
保存,添加执行权限,执行:
保存这个文件,并使得这个脚本可被执行,然后运行它:
```
$ chmod 755 test.sh
@ -129,15 +129,13 @@ $ ./test.sh
编写 shell 函数
在本文中,我们介绍了在哪里存储 shell 脚本,解释如何编写自己的 shell 函数和功能库,如何在其它的脚本中使用那些功能库中的函数。
在本文中,我们介绍了在哪里可靠地存储 shell 脚本,如何编写自己的 shell 函数和函数库,以及如何在一个普通的 shell 脚本中从函数库中调用库中的某些函数。
之后,我们还会介绍一种相当简单直接的方式来将 Vim 设置成为一个编写 Bash 脚本的 IDE集成开发环境。在那之前记得要经常关注 TecMint ,如果能和我们分享你对这份指南的想法就更好了。
之后,我们还会介绍一种相当简单直接的方式来将 Vim 配置为一个编写 Bash 脚本的 IDE集成开发环境。在那之前记得要经常关注 TecMint ,如果能和我们分享你对这份指南的想法就更好了。
--------------------------------------------------------------------------------
作者简介:
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.
作者简介Aaron Kili 是一名 Linux 和 F.O.S.S 爱好者、一名未来的 Linux 系统管理员、web 开发者,目前是一名 TecMint 上的内容创造者,他喜欢计算机相关的工作,并且坚信知识的分享。
--------------------------------------------------------------------------------
@ -145,7 +143,7 @@ via: http://www.tecmint.com/write-custom-shell-functions-and-libraries-in-linux/
作者:[Aaron Kili][a]
译者:[wcnnbdk1](https://github.com/wcnnbdk1)
校对:[校对者ID](https://github.com/校对者ID)
校对:[FSSlc](https://github.com/FSSlc)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,167 @@
CoreFreq - 一款强大的 Linux 下监控 CPU 的工具
============================================================
CoreFreq 是一个用于英特尔64位处理器的[ CPU 监控程序][1]并且支持Atom、Core2、Nehalem、SandyBridge 及以上、还有 AMD 0F 家族。
它的核心建立在内核模块上,帮助从每个 CPU 核心检索内部性能计数器,并且与收集数据的守护进程一起工作,并用一个小型控制台客户端链接到守护程序并显示收集的数据。
[
![CoreFreq CPU Monitoring](http://www.tecmint.com/wp-content/uploads/2017/02/CoreFreq-CPU-Monitoring.gif)
][2]
它提供了以高精度重新捕获 CPU 数据的基础工作:
1. 核心频率和比率; SpeedStepEIST、Turbo Boost、超线程HTT以及基本时钟。
2. 性能计数器结合时间戳计数器TSC、未分配的核心循环UCC、未赋值的引用循环URC
3. 每周期或每秒的指令数、IPS、IPC 或 CPI。
4. CPU C 的状态 C0 C1 C3 C6 C7 - C1E - C1、C3 的自动/降级。
5. 带有 Tjunction Max 的 DTS 温度、热监测 TM1、TM2 的状态。
6. 包括用于自举的高速缓存和应用程序 CPU 拓扑图。
7. 处理器特性、品牌、架构字符串。
注意:此工具更适用于专家 Linux 用户和经验丰富的系统管理员,但新手用户可以逐步学习如何使用它。
#### CoreFreq 如何工作
它通过调用一个 Linux 内核模块,然后使用:
1. 汇编代码保持性能计数器的读数尽可能接近。
2. 每个 CPU 影响 slab 数据内存加上高分辨率定时器。
3. 可以暂停/恢复和 CPU 热插拔。
4. 使用共享内存来保护内核免受来自用户空间程序的损害。
5. 使用原子同步的线程来消除互斥和死锁。
### 如何在 Linux 中安装 CoreFreq
要安装 CoreFreq你首先需要安装依赖程序开发工具来编译并从源码构建程序。
```
$ sudo yum group install 'Development Tools' [On CentOS/RHEL]
$ sudo dnf group install 'Development Tools' [On Fedora 22+ Versions]
# sudo apt-get install dkms git libpthread-stubs0-dev [On Debian/Ubuntu]
```
接下来克隆 Github 上 CoreFreq 源码进入下载文件夹并编译构建程序
```
$ git clone https://github.com/cyring/CoreFreq.git
$ cd CoreFreq
$ make
```
[
![Build CoreFreq Program](http://www.tecmint.com/wp-content/uploads/2017/02/make-corefreq.png)
][3]
构建 CoreFreq 程序
注意Arch Linux 用户可以从 AUR 中安装 [corefreq-git][4]。
现在运行以下命令从本地目录加载 Linux 内核模块,接着运行守护程序:
```
$ sudo insmod corefreqk.ko
$ sudo ./corefreqd
```
接着使用普通用户启动客户端。
```
$ ./corefreq-cli
```
[
![CoreFreq Linux CPU Monitoring](http://www.tecmint.com/wp-content/uploads/2017/02/CoreFreq-Linux-CPU-Monitoring.gif)
][5]
CoreFreq Linux CPU 监控
在上面的界面中,你可以使用这些快捷键:
1. 使用 `F2` 显示屏幕顶部显示的使用菜单。
2. 使用 `右``左` 箭头移动菜单选项卡。
3. 使用 `上``下` 箭头选择菜单项,然后单击[Enter]。
4. 使用 `F4` 关闭程序。
5. 使用 `h` 打开快速参考。
要查看所有的使用选项,请输入以下命令:
```
$ ./corefreq-cli -h
```
CoreFreq 选项
```
CoreFreq. Copyright (C) 2015-2017 CYRIL INGENIERIE
usage: corefreq-cli [-option <arguments>]
-t Show Top (default)
-d Show Dashboard
arguments: <left> <top> <marginWidth> <marginHeight>
-c Monitor Counters
-i Monitor Instructions
-s Print System Information
-M Print Memory Controller
-m Print Topology
-u Print CPUID
-k Print Kernel
-h Print out this message
Exit status:
0 if OK,
1 if problems,
>1 if serious trouble.
Report bugs to labs[at]cyring.fr
```
要打印内核的信息,运行:
```
$ ./corefreq-cli -k
```
打印 CPU 细节信息:
```
$ ./corefreq-cli -u
```
你也可以实时监控 CPU 指令:
```
$ ./corefreq-cli -i
```
如下启用计数器追踪:
```
$ ./corefreq-cli -c
```
有关更多信息和用法,请访问 CoreFreq Github 仓库:[https://github.com/cyring/CoreFreq][6]
在本文中,我们回顾了一个强大的 CPU 监控工具,这对于 Linux 专家或经验丰富的系统管理员来说可能比新手用户更有用。
通过下面的评论栏与我们分享你对这个工具或任何相关的想法。
--------------------------------------------------------------------------------
作者简介:
Aaron Kili 是 Linux 和 F.O.S.S 爱好者,将来的 Linux 系统管理员和网络开发人员,目前是 TecMint 的内容创作者,他喜欢用电脑工作,并坚信分享知识。
--------------------------------------------------------------------------------
via: http://www.tecmint.com/corefreq-linux-cpu-monitoring-tool/
作者:[Aaron Kili][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/aaronkili/
[1]:http://www.tecmint.com/bcc-best-linux-performance-monitoring-tools/
[2]:http://www.tecmint.com/wp-content/uploads/2017/02/CoreFreq-CPU-Monitoring.gif
[3]:http://www.tecmint.com/wp-content/uploads/2017/02/make-corefreq.png
[4]:https://aur.archlinux.org/packages/corefreq-git
[5]:http://www.tecmint.com/wp-content/uploads/2017/02/CoreFreq-Linux-CPU-Monitoring.gif
[6]:https://github.com/cyring/CoreFreq

View File

@ -78,7 +78,7 @@ via: https://www.maketecheasier.com/back-up-android-data-adb-ubuntu/
作者:[Derrik Diener][a]
译者:[ucasFL](https://github.com/ucasFL)
校对:[校对者ID](https://github.com/校对者ID)
校对:[jasminepeng](https://github.com/jasminepeng)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,77 @@
# 在树莓派 3 上运行 openSUSE简单几步搭建一个实用系统
这篇文章由 SUSE 文档团队的技术编辑 Dmitri Popov 纂写。
在 [树莓派 3][3] 上部署 [openSUSE][2] 系统不是很复杂,不过这儿有一些小技巧教你更好地完成这个过程。
首先,你将会有许多版本可供选择。如果你打算使用树莓派 3 作为一个普通主机,那么带有图形界面的 openSUSE 将是你最好的选择。你可以选择几种不同的图形界面程序:[X11][4] 、 [Enlightenment][5] 、 [Xfce][6] 或是 [LXQT][7]。openSUSE 还有一个 JeOS 版本能够提供最基础的系统,可以把树莓派 3 作为一个无外设的服务器使用。而且你还可以选择 openSUSE 的 [Leap][8] 或 [Tumbleweed][9] 版本。
![](https://www.suse.com/communities/blog/files/2017/02/j5dkkbtepng-dmitri-popov-450x300.jpg)
首先你需要从 [https://en.opensuse.org/HCL:Raspberry_Pi3][10] 下载所需的 openSUSE 镜像,然后制作一张可启动的 microSD 卡。你可以使用命令行工具 [_Etcher_][11] 轻松安全地将下载好的镜像写入 microSD 卡。你需要从项目网站上获取该程序,下载 _.zip_ 文件并解压,使用以下命令把 _.AppImage_ 文件的属性设置为可执行:
_chmod +x Etcher-x.x.x-linux-x64.AppImage_
将 microSD 卡插入电脑,双击运行 Etcher 软件,选择下载好的 _.raw.xz_ 镜像文件,点击 Flash 按钮!然后将显示器和键盘连接树莓派 3插入 microSD 卡启动树莓派。第一次启动时openSUSE 会自动扩展文件系统以充分利用 microSD 卡上的剩余空间。这时你将看到以下信息:
```
GPT data structures destroyed! You may now partition the disk using fdisk or other utilities
```
不用担心稍等两分钟openSUSE 将继续正常启动。当看到提示时,输入默认用户名 _root_ 和默认密码 _linux_ 登录系统。
如果你选择在树莓派 3 上部署 JeOS 版本,第一次启动时你不会看到屏幕上有任何输出。也就是说,屏幕会一直保持空白,直到系统完成对文件系统的扩展。你可以通过配置内核参数来显示输出,不过没有必要做这麻烦事。只需稍等片刻,你就能看到命令行提示。
由于 openSUSE 已经启用并且配置了 SSH 服务,所以启动树莓派时你也可以不用显示器。这样的话,你就需要使用 Ethernet 接口将树莓派连接网络。留给树莓派足够的时间来启动和扩展系统,你就能够从同一网络中的其他主机,使用 _ssh root@linux.local_ 命令,通过 SSH 服务连接树莓派。
默认情况下你将以 root 用户登录系统。所以创建一个普通用户是个不错的主意。你可以使用 YaST 配置工具轻松完成这件事。运行 _yast2_ 命令,选择 “安全与用户” -> “用户与用户组管理” 选项,就可以创建新用户了。你还可以选择 “系统” -> “在线升级” 选项来更新系统。完成之后,退出 YaST ,重启树莓派,然后使用新创建的用户登录系统。
一切搞定,不过还有一个重要的系统组件不能正常工作,那就是无线接口。当然,这个问题也可以轻松解决。首先使用以下命令安装 nano 文本编辑器:
_sudo zypper in nano_
然后运行以下命令修改 _raspberrypi_modules.conf_ 文件:
_sudo nano/etc/dracut.conf.d/raspberrypi_modules.conf_
删除文件第一行的 _sdhci_iproc_ ,再取消最后一行的注释。运行以下命令保存修改:
_mkinitrd -f_
最后,重启树莓派。
![](https://www.suse.com/communities/blog/files/2017/02/figure1-raspi-450x329.png)
再次运行 YaST ,在 “系统” -> “网络设置” 区域,你应该能在网络接口列表中看到 _BCM43430 WLAN Card_ 记录。选择这一项,点击 ”编辑“ 按钮。开启 Dynamic Address DHCP 选项,点击 ”下一步“ ,选择你想要连接的无线网络,配置所需的连接设置。点击 ”下一步“ 和 ”确定“ 保存设置。重启树莓派,它应该就能连接上特定的 Wi-Fi 网络了。
至此,你就完成了树莓派上的系统部署。
--------------------------------------------------------------------------------
via: https://www.suse.com/communities/blog/opensuse-raspberry-pi-3-zero-functional-system-easy-steps/
作者:[chabowski][a]
译者:[译者ID](https://github.com/Cathon)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.suse.com/communities/blog/author/chabowski/
[1]:https://www.suse.com/communities/blog/author/chabowski/
[2]:https://www.opensuse.org/
[3]:https://www.raspberrypi.org/
[4]:https://www.x.org/wiki/
[5]:https://www.enlightenment.org/
[6]:https://www.xfce.org/
[7]:http://lxqt.org/
[8]:https://www.opensuse.org/#Leap
[9]:https://www.opensuse.org/#Tumbleweed
[10]:https://en.opensuse.org/HCL:Raspberry_Pi3
[11]:https://etcher.io/
[12]:https://www.suse.com/communities/blog/opensuse-raspberry-pi-3-zero-functional-system-easy-steps/#
[13]:https://www.suse.com/communities/blog/opensuse-raspberry-pi-3-zero-functional-system-easy-steps/#
[14]:https://www.suse.com/communities/blog/opensuse-raspberry-pi-3-zero-functional-system-easy-steps/#
[15]:https://www.suse.com/communities/blog/opensuse-raspberry-pi-3-zero-functional-system-easy-steps/#
[16]:https://www.suse.com/communities/blog/opensuse-raspberry-pi-3-zero-functional-system-easy-steps/#
[17]:http://www.printfriendly.com/print?url=https%3A%2F%2Fwww.suse.com%2Fcommunities%2Fblog%2Fopensuse-raspberry-pi-3-zero-functional-system-easy-steps%2F
[18]:http://www.printfriendly.com/print?url=https%3A%2F%2Fwww.suse.com%2Fcommunities%2Fblog%2Fopensuse-raspberry-pi-3-zero-functional-system-easy-steps%2F

View File

@ -1,42 +1,42 @@
LXD 2.0 系列LXD中的Docker
LXD 2.0 系列LXD 中的 Docker
======================================
这是 [LXD 2.0 系列介绍文章][0]的第七篇。
![](https://linuxcontainers.org/static/img/containers.png)
### 为什么在LXD中运行Docker
### 为什么在 LXD 中运行 Docker
正如我在[系列的第一篇][1]中简要介绍的LXD的重点是系统容器。也就是我们在容器中运行一个完全未经修改的Linux发行版。LXD的所有意图和目的不在乎容器中的负载。它只是设置容器命名空间和安全策略然后生成/sbin/init,接着等待容器停止。
正如我在[系列的第一篇][1]中简要介绍的LXD 的重点是系统容器,也就是我们在容器中运行一个完全未经修改的 Linux 发行版。LXD 的所有意图和目的不在乎容器中的负载是什么。它只是设置容器命名空间和安全策略,然后运行 `/sbin/init` 来生成容器,接着等待容器停止。
应用程序容器例如由Docker或Rkt实现的应用程序容器是非常不同的因为它们用于分发应用程序通常在它们内部运行单个主进程并且比LXD容器生命期更短暂。
应用程序容器,例如由 Docker Rkt实现的应用程序容器是非常不同的,因为它们用于分发应用程序,通常在它们内部运行单个主进程,并且比 LXD 容器生命期更短暂。
这两种容器类型不是相互排斥的我们的确看到使用Docker容器来分发应用程序的价值。这就是为什么我们在过去一年努力工作以便让LXD中运行Docker成为可能。
这两种容器类型不是相互排斥的,我们的确看到使用 Docker 容器来分发应用程序的价值。这就是为什么我们在过去一年努力工作以便让 LXD 中运行 Docker 成为可能。
这意味着使用Ubuntu 16.04和LXD 2.0您可以为用户创建容器然后可以像正常的Ubuntu系统一样连接到这些容器然后运行Docker来安装他们想要的服务和应用程序。
这意味着,使用 Ubuntu 16.04 LXD 2.0,您可以为用户创建容器,然后可以像正常的 Ubuntu 系统一样连接到这些容器,然后运行 Docker 来安装他们想要的服务和应用程序。
### 要求
要让它正常工作要做很多事情Ubuntu 16.04上已经包含了这些:
要让它正常工作要做很多事情Ubuntu 16.04 上已经包含了这些:
- 支持CGroup命名空间的内核4.4 Ubuntu或4.6 mainline
- 使用LXC 2.0和LXCFS 2.0的LXD 2.0
- 一个自定义版本的Docker或一个用我们提交的所有补丁构建的
- Docker镜像当用户命名空间限制时或者使父LXD容器成为特权容器security.privileged = true
- 支持 CGroup 命名空间的内核4.4 Ubuntu 或 4.6 主线内核
- 使用 LXC 2.0 LXCFS 2.0 LXD 2.0
- 一个自定义版本的 Docker或一个用我们提交的所有补丁构建的
- Docker 镜像,其受限于用户命名空间限制,或者使父 LXD 容器成为特权容器(`security.privileged = true`
### 运行一个基础的Docker负载
### 运行一个基础的 Docker 载荷
说完这些让我们开始运行Docker容器
说完这些,让我们开始运行 Docker 容器!
首先你可以用下面的命令得到一个Ubuntu 16.04的容器:
首先你可以用下面的命令得到一个 Ubuntu 16.04 的容器:
```
lxc launch ubuntu-daily:16.04 docker -p default -p docker
```
“-p default -p docker”表示LXD将“default”和“docker”配置文件应用于容器。默认配置文件包含基本网络配置而docker配置文件告诉LXD加载几个必需的内核模块并为容器设置一些挂载。 docker配置文件还允许容器嵌套。
`-p default -p docker` 表示 LXD 将 `default``docker` 配置文件应用于容器。`default` 配置文件包含基本网络配置,而 `docker` 配置文件告诉 LXD 加载几个必需的内核模块并为容器设置一些挂载。 `docker` 配置文件还支持容器嵌套。
现在让我们确保容器是最新的并安装docker
现在让我们确保容器是最新的并安装 docker
```
lxc exec docker -- apt update
@ -44,8 +44,9 @@ lxc exec docker -- apt dist-upgrade -y
lxc exec docker -- apt install docker.io -y
```
就是这样你已经安装并运行了一个Docker容器。
现在让我们用两个Docker容器开启一个基础的web服务
就是这样!你已经安装并运行了一个 Docker 容器。
现在让我们用两个 Docker 容器开启一个基础的 web 服务:
```
stgraber@dakara:~$ lxc exec docker -- docker run --detach --name app carinamarina/hello-world-app
@ -87,7 +88,7 @@ Status: Downloaded newer image for carinamarina/hello-world-web:latest
d7b8963401482337329faf487d5274465536eebe76f5b33c89622b92477a670f
```
现在这两个Docker容器已经运行了我们可以得到LXD容器的IP地址并且访问它的服务了
现在这两个 Docker 容器已经运行了,我们可以得到 LXD 容器的 IP 地址,并且访问它的服务了!
```
stgraber@dakara:~$ lxc list
@ -104,13 +105,13 @@ The linked container said... "Hello World!"
### 总结
就是这样了在LXD容器中运行Docker容器真的很简单。
就是这样了!在 LXD 容器中运行 Docker 容器真的很简单。
现在正如我前面提到的并不是所有的Docker镜像都会像我的示例一样这通常是因为LXD提供了额外的限制,特别是用户命名空间。
现在正如我前面提到的,并不是所有的 Docker 镜像都会像我的示例一样,这通常是因为 LXD 带来了额外的限制,特别是用户命名空间。
只有Docker的overlayfs存储驱动在这种模式下工作。该存储驱动有一组自己的限制,这可以进一步限制在该环境中可以有多少镜像工作。
在这种模式下只有 Docker 的 overlayfs 存储驱动可以工作。该存储驱动有一组自己的限制,这进一步限制在该环境中可以有多少镜像工作。
如果您的负载无法正常工作并且您信任LXD容器中的用户你可以试下
如果您的负载无法正常工作,并且您信任LXD 容器中的用户,你可以试下:
```
lxc config set docker security.privileged true
@ -119,7 +120,7 @@ lxc restart docker
这将取消激活用户命名空间,并以特权模式运行容器。
但是请注意在这种模式下容器内的root与主机上的root是相同的uid。现在有许多已知的方法让用户脱离容器并获得主机上的root权限所以你应该只有在信任你的LXD容器中的用户可以具有主机上的root权限才这样做。
但是请注意,在这种模式下,容器内的 root 与主机上的 root 是相同的 uid。现在有许多已知的方法让用户脱离容器并获得主机上的 root 权限,所以你应该只有在信任你的 LXD 容器中的用户可以具有主机上的 root 权限才这样做。
### 额外信息
@ -138,11 +139,11 @@ via: https://www.stgraber.org/2016/04/13/lxd-2-0-docker-in-lxd-712/
作者:[Stéphane Graber][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 组织翻译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.stgraber.org/author/stgraber/
[0]: https://www.stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/
[1]: https://www.stgraber.org/2016/03/11/lxd-2-0-introduction-to-lxd-112/
[1]: https://linux.cn/article-7618-1.html
[2]: https://linuxcontainers.org/lxd/try-it/

View File

@ -0,0 +1,44 @@
# Linux 是什么?一个简短的描述
正如上面的问题所述,我们将要了解:
**Linux 是什么?**
简单来说, Linux 是一个基于 Unix 的开源操作系统。
就像 Windows 或者 Mac OS 一样。
1991 年 10 月 5 日, Linus Torvalds 首次发布 Linux 内核。 Linux 内核是 Linux 系统的一个非常重要的组成部分。目前, Linux 主要用于多种服务器和超级计算机等。它也被用于手机操作系统,比如 Android 操作系统是基于 Linux 内核的。
在早期, Linux 作为一个免费的操作系统被用于基于 Intel ×86 的个人电脑上。因为 Linux 是一个开源操作系统,所以它的源代码可以被修改或使用,也可以在有许可证,比如 GNU通用公共许可证的情况下被任何人发布。简而言之如果具备一定知识知道自己在干什么那么任何人都可以从 Linux 那儿获得自己的操作系统。正因此,才有了许多 Linux 发行版。
**现在, Linux 发行版是什么?**
它是基于 Linux 内核的一个操作系统。它加载有用户可以访问的软件集合。更多的,它还包含系统管理包。目前有许多 Linux 发行版。因为我们不能数清目前所有的 Linux 发行版,所以我们来看一下一些有名的版本:
Ubuntu、Fedora、Opensuse、Red hat Linux 和 Debian 等是几个非常受欢迎的 Linux 发行版。
[
![](https://3.bp.blogspot.com/-8ckfHXqKaPA/U2o2ufvZ0nI/AAAAAAAAAN0/Frd4OS7m7dk/s280/image_1.png)
][1]
> Ubuntu 一个非常受欢迎的 Linux 发行版和第三受欢迎的操作系统
Linux 发行版是一个已经准备好可以在个人电脑上安装的完整包。一旦用户在桌面或者服务器上安装了 Linux 发行版,就可以使用各种现成的软件和应用程序。现在,很多 Linux 发行版都具有很好的图形用户界面GUI这使得它们成为 windows 系统或 Mac 系统的一个很好的替代品。
目前, Linux 发行版在性能、界面、可访问性以及最重要的 - 用户友好性等方面都有了很大的提高。一些发行版比如 Ubuntu 和 Linux mint 等,随着用户数量的一天天增加,赢得了很好的市场地位。 Ubuntu 是紧随 Windows 和 Mac 第三受欢迎的操作系统。
对以上做个总结,那就是 Linux 是一个非常强大的操作系统(是的,它很强大)。日复一日,它将获得更多的用户影响力和声誉。所以,如果你还没有在你的电脑上尝试过使用任何 Linux 系统,那么我建议你尝试一下。我们敢保证, Linux 一定不会让你失望的。
--------------------------------------------------------------------------------
via: http://www.techphylum.com/2014/05/what-is-linux-brief-description.html?m=1
作者:[sumit rohankar ][a]
译者:[ucasFL](https://github.com/ucasFL)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://plus.google.com/112160169713374382262
[1]:http://3.bp.blogspot.com/-8ckfHXqKaPA/U2o2ufvZ0nI/AAAAAAAAAN0/Frd4OS7m7dk/s1600/image_1.png
[2]:http://www.techphylum.com/2014/05/desktop-gadgets-in-linux-ubuntu.html