Merge pull request #31 from LCTT/master

update 2017-04-23
This commit is contained in:
cinlen_0x05 2017-04-23 01:48:46 +08:00 committed by GitHub
commit 1cf96b895f
8 changed files with 280 additions and 278 deletions

2
comic

@ -1 +1 @@
Subproject commit 1889dde5a1cb5c96b9b5710916e16759cb29be71
Subproject commit e5db5b880dac1302ee0571ecaaa1f8ea7cf61901

View File

@ -2,32 +2,35 @@ OpenContrail一个 OpenStack 生态中的重要工具
============================================================
![OpenContrail](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/contrails-cloud.jpg?itok=aoNIH-ar "OpenContrail")
OpenContrail 是 OpenStack 云计算平台使用的 SDN 平台,它正在成为管理员需要发展的技能的重要工具。 [Creative Commons Zero] [1] Pixabay
![OpenContrail](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/contrails-cloud.jpg?itok=aoNIH-ar "OpenContrail")
整个 2016 年软件定义网络SDN迅速发展开源和云计算领域的众多参与者正帮助其获得增长。结合这一趋势OpenStack 云计算平台使用的受欢迎的 SDN 平台 [OpenContrail][3] 正成为许多管理员需要发展的技能的重要工具。
*OpenContrail 是用于 OpenStack 云计算平台的 SDN 平台,它正在成为管理员需要具备的技能的重要工具。*
[Creative Commons Zero] [1] Pixabay
整个 2016 年软件定义网络SDN迅速发展开源和云计算领域的众多参与者正帮助其获得增长。结合这一趋势用在 OpenStack 云计算平台上的流行的 SDN 平台 [OpenContrail][3] 正成为许多管理员需要具备的技能的重要工具。
正如管理员和开发人员在 OpenStack 生态系统中围绕着诸如 Ceph 等重要工具提升技能一样,他们将需要拥抱 OpenContrail它是由 Apache 软件基金会全面开源并管理的软件。
考虑到这些OpenStack 领域中最活跃的公司之一 Mirantis 已经[宣布][4]对 OpenContrail 的商业支持和贡献。该公司提到:“添加了 OpenContrail 后Mirantis 将会为与 OpenStack 一起使用的开源技术包括用于存储的 Ceph、用于计算的 OpenStack/KVM、用于 SDN 的 OpenContrail 或 Neutron 提供一站式的支持。
考虑到这些OpenStack 领域中最活跃的公司之一 Mirantis 已经[宣布][4]对 OpenContrail 的提供商业支持和贡献。该公司提到:“添加了 OpenContrail 后Mirantis 将会为与 OpenStack 一起使用的开源技术包括用于存储的 Ceph、用于计算的 OpenStack/KVM、用于 SDN 的 OpenContrail 或 Neutron 提供一站式的支持。
根据 Mirantis 公告“OpenContrail 是一个使用基于标准协议构建的 Apache 2.0 许可项目,为网络虚拟化提供了所有必要的组件 - SDN 控制器、虚拟路由器、分析引擎和已发布的上层 API它有一个可扩展 REST API 用于配置以及收集操作和分析数据。为规模化OpenContrail 可以作为云基础设施的基础网络平台。
根据 Mirantis 公告“OpenContrail 是一个使用基于标准协议构建的 Apache 2.0 许可项目,为网络虚拟化提供了所有必要的组件 - SDN 控制器、虚拟路由器、分析引擎和已发布的上层 API它有一个可扩展 REST API 用于配置以及从系统收集操作和分析数据。为规模化构建OpenContrail 可以作为云基础设施的基础网络平台。
有消息称 Mirantis [收购了 TCP Cloud][5],这是一家专门从事 OpenStack、OpenContrail 和 Kubernetes 管理服务的公司。Mirantis 将使用 TCP Cloud 的技术来持续交付云基础设施来管理将在 Docker 容器中运行的 OpenContrail 控制面板。作为这项工作的一部分Mirantis 也会一直致力于 OpenContrail。
有消息称 Mirantis [收购了 TCP Cloud][5],这是一家专门从事 OpenStack、OpenContrail 和 Kubernetes 管理服务的公司。Mirantis 将使用 TCP Cloud 的云架构持续交付技术来管理将在 Docker 容器中运行的 OpenContrail 控制面板。作为这项工作的一部分Mirantis 也会一直致力于 OpenContrail。
OpenContrail 的许多贡献者正在与 Mirantis 紧密合作,他们特别注意了 Mirantis 将提供的支持计划。
“OpenContrail 是 OpenStack 社区中一个重要的项目,而 Mirantis 很好地容器化并提供商业支持。Mirantis 的工程师总监和 OpenContrail 咨询委员会主任 Jakub Pavlik 说:“我们团队正在做的工作使 OpenContrail 能轻松地扩展并更新,并与 Mirantis OpenStack 的其余部分进行无缝滚动升级。” 他表示:“商业支持也将使 Mirantis 能够使该项目与各种交换机兼容,从而为客户提供更多的硬件和软件选择。”
“OpenContrail 是 OpenStack 社区中一个重要的项目,而 Mirantis 很好地容器化并提供商业支持。我们团队正在做的工作使 OpenContrail 能轻松地扩展并更新,并与 Mirantis OpenStack 的其余部分进行无缝滚动升级。 ” Mirantis 的工程师总监和 OpenContrail 咨询委员会主任 Jakub Pavlik 说:“商业支持也将使 Mirantis 能够使该项目与各种交换机兼容,从而为客户提供更多的硬件和软件选择。”
除了 OpenContrail 的商业支持外,我们很可能还会看到 Mirantis 为那些想要学习如何利用它的云管理员和开发人员提供的教育服务。Mirantis 已经以其[ OpenStack 培训][6]课程而闻名,并将 Ceph 纳入了培训课程中。
除了 OpenContrail 的商业支持外,我们很可能还会看到 Mirantis 为那些想要学习如何利用它的云管理员和开发人员提供的教育服务。Mirantis 已经以其 [OpenStack 培训][6]课程而闻名,并将 Ceph 纳入了培训课程中。
在 2016 年SDN 种类快速演变,并且对许多部署 OpenStack 的组织也有意义。IDC 最近发布了 SDN 市场的[一项研究][7],预计从 2014 年到 2020 年 SDN 市场的年均复合增长率为 53.9%,届时市场价值将达到 125 亿美元。此外“Technology Trends 2016” 报告将 SDN 列为组织最佳的技术投资之一。
IDC 网络基础设施总裁 [Rohit Mehra][8] 说:“云计算和第三平台推动了 SDN 的需求,它将在 2020 年代表一个价值超过 125 亿美元的市场。丝毫不用奇怪的是 SDN 的价值将越来越多地渗透到网络虚拟化软件和 SDN 应用中,包括虚拟化网络和安全服务。大型企业在数据中心中实现 SDN 的价值,但它们最终将会认识到其在分支机构和校园网络中的广泛应用。”
IDC 网络基础设施总裁 [Rohit Mehra][8] 说:“云计算和第三平台推动了 SDN 的需求,它将在 2020 年代表一个价值超过 125 亿美元的市场。丝毫不用奇怪的是 SDN 的价值将越来越多地渗透到网络虚拟化软件和 SDN 应用中,包括虚拟化网络和安全服务。大型企业在数据中心中实现 SDN 的价值,但它们最终将会认识到其在横跨分支机构和校园网络的广域网中的广泛应用。”
同时Linux基金会最近[宣布][9]发布了其 2016 年度报告[“开放云指导:当前趋势和开源项目”][10]。第三份年度报告全面介绍了开放云计算,并包含一个关于 SDN 的部分。
同时Linux 基金会最近[宣布][9]发布了其 2016 年度报告[“开放云指导:当前趋势和开源项目”][10]。第三份年度报告全面介绍了开放云计算,并包含一个关于 SDN 的部分。
Linux基金会还提供了[软件定义网络基础知识][11]LFS265这是一个自定进度的 SDN 在线课程,另外作为 [Open Daylight][12] 项目的领导者,另一个重要的开源 SDN 平台正在迅速成长。
Linux 基金会还提供了[软件定义网络基础知识][11]LFS265这是一个自定进度的 SDN 在线课程,另外作为 [Open Daylight][12] 项目的领导者,另一个重要的开源 SDN 平台正在迅速成长。
--------------------------------------------------------------------------------
@ -35,7 +38,7 @@ via: https://www.linux.com/news/event/open-networking-summit/2017/2/opencontrail
作者:[SAM DEAN][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,30 +1,31 @@
在 RHELCentOS 及 Fedora 上安装 Drupal 8
在 RHELCentOS 及 Fedora 上安装 Drupal 8
============================================================
**Drupal** 是一个开源,灵活,高度可拓展和安全的<ruby>内容管理系统<rt>Content Management System</rt></ruby>CMS使用户轻松的创建网站。
它可以使用模块拓展,使用户将内容管理转换为强大的数字解决方案。
**Drupal** 运行在诸如 **ApacheIISLighttpdCherokeeNginx** 的 Web 服务器上,后端数据库可以使用 **MysqlMongoDBMariaDBPostgreSQLMSSQL Server**
**Drupal** 运行在诸如 Apache、IIS、Lighttpd、Cherokee、Nginx 的 Web 服务器上,后端数据库可以使用 MySQL、MongoDB、MariaDB、PostgreSQL、MSSQL Server
在这篇文章中, 我们会展示在 RHEL 7/6CentOS 7/6 和 Fedora 20-25 发行版本使用 LAMP,如何手动安装和配置 Drupal 8。
在这篇文章中, 我们会展示在 RHEL 7/6、CentOS 7/6 和 Fedora 20-25 发行版上使用 LAMP 架构,如何手动安装和配置 Drupal 8。
#### Drupal 需求:
#### Drupal 需求
1. **Apache 2.x** (推荐)
2. **PHP 5.5.9** 或 更高 (推荐 PHP 5.5)
3. **MYSQL 5.5.3** 或 **MariaDB 5.5.20** 与 PHP 数据对象(PDO)
1. **Apache 2.x** (推荐)
2. **PHP 5.5.9** 或 更高 (推荐 PHP 5.5
3. **MySQL 5.5.3** 或 **MariaDB 5.5.20** 与 PHP 数据对象PDO 支持
安装过程中,我使用 `drupal.tecmint.com` 作为网站主机名IP 地址为 `192.168.0.104`。你的环境也许与这些设置不同,因此请适当做出更改。
### 步骤 1: 安装 Apache Web 服务器
### 步骤 1安装 Apache Web 服务器
1. 首先我们从官方仓库开始安装 Apache Web 服务器。
1 首先我们从官方仓库开始安装 Apache Web 服务器。
```
# yum install httpd
```
2. 安装完成后,服务将会被被禁用,因此我们需要手动启动它,同时让它下次系统启动时自动启动,如下:
2、 安装完成后,服务开始是被禁用的,因此我们需要手动启动它,同时让它下次系统启动时自动启动,如下:
```
------------- 通过 SystemD - CentOS/RHEL 7 和 Fedora 22+ -------------------
@ -36,7 +37,7 @@
# chkconfig --level 35 httpd on
```
3. 接下来,为了允许通过 **HTTP****HTTPS** 访问 Apache 服务,我们必须打开 **HTTPD** 守护进程正在监听的 **80****443** 端口,如下所示:
3 接下来,为了允许通过 **HTTP****HTTPS** 访问 Apache 服务,我们必须打开 **HTTPD** 守护进程正在监听的 **80****443** 端口,如下所示
```
------------ 通过 Firewalld - CentOS/RHEL 7 and Fedora 22+ -------------
@ -51,7 +52,7 @@
# service iptables restart
```
4. 现在验证 Apache 是否正常工作, 打开浏览器在地址栏中输入 http://server_IP 输入你的服务器 IP 地址, 默认 Apache2 页面应出现,如下面截图所示:
4 现在验证 Apache 是否正常工作, 打开浏览器在地址栏中输入 `http://server_IP` 输入你的服务器 IP 地址, 默认 Apache2 页面应出现,如下面截图所示
[
![Apache 默认页面](https://dn-coding-net-production-pp.qbox.me/a93436ad-59ee-404d-9a28-ebde4446cd6d.png)
@ -59,15 +60,15 @@
*Apache 默认页面*
### 步骤 2: 安装 Apache PHP 支持
### 步骤 2 安装 Apache PHP 支持
5. 接下来,安装 PHP 和 PHP 所需模块.
5、 接下来,安装 PHP 和 PHP 所需模块。
```
# yum install php php-mbstring php-gd php-xml php-pear php-fpm php-mysql php-pdo php-opcache
```
**重要**: 假如你想要安装 **PHP7** 你需要增加以下仓库:**EPEL** 和 **Webtactic** 才可以使用 yum 安装 PHP7.0:
**重要**: 假如你想要安装 **PHP7** 你需要增加以下仓库**EPEL** 和 **Webtactic** 才可以使用 yum 安装 PHP7.0
```
------------- Install PHP 7 in CentOS/RHEL and Fedora -------------
@ -76,7 +77,7 @@
# yum install php70w php70w-opcache php70w-mbstring php70w-gd php70w-xml php70w-pear php70w-fpm php70w-mysql php70w-pdo
```
6. 接下来,要从浏览器得到关于 PHP 安装和配置完整信息,使用下面命令在 Apache 文档根目录 (/var/www/html) 创建一个 `info.php` 文件。
6 接下来,要从浏览器得到关于 PHP 安装和配置完整信息,使用下面命令在 Apache 文档根目录 `/var/www/html` 创建一个 `info.php` 文件。
```
# echo "<?php phpinfo(); ?>" > /var/www/html/info.php
@ -98,7 +99,7 @@
### 步骤 3: 安装和配置 MariaDB 数据库
7. 请了解, **Red Hat Enterprise Linux/CentOS 7.0** 从支持 **MYSQL** 转为了 **MariaDB** 作为默认数据库管理系统。
7、 请知晓, **Red Hat Enterprise Linux/CentOS 7.0** 从支持 **MySQL** 转为了 **MariaDB** 作为默认数据库管理系统。
要安装 **MariaDB** 数据库, 你需要添加 [官方 MariaDB 库][3] 到 `/etc/yum.repos.d/MariaDB.repo` 中,如下所示。
@ -110,13 +111,13 @@ gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
```
当仓库文件准备好后,你可以像这样安装 MariaDB :
当仓库文件准备好后,你可以像这样安装 MariaDB
```
# yum install mariadb-server mariadb
```
8. 当 MariaDB 数据库安装完成,启动数据库的守护进程,同时使它能够在下次启动后自动启动。
8 当 MariaDB 数据库安装完成,启动数据库的守护进程,同时使它能够在下次启动后自动启动。
```
------------- 通过 SystemD - CentOS/RHEL 7 and Fedora 22+ -------------
@ -127,7 +128,7 @@ gpgcheck=1
# chkconfig --level 35 mysqld on
```
9. 然后运行 `mysql_secure_installation` 脚本去保护数据库(设置 root 密码, 禁用远程登录,移除测试数据库并移除匿名用户),如下所示:
9、 然后运行 `mysql_secure_installation` 脚本去保护数据库(设置 root 密码, 禁用远程登录,移除测试数据库并移除匿名用户),如下所示:
```
# mysql_secure_installation
@ -136,25 +137,25 @@ gpgcheck=1
![Mysql安全安装](https://dn-coding-net-production-pp.qbox.me/15a20560-ea9f-499b-b155-a310e9aa6a88.png)
][4]
*Mysql 安全安装*
*MySQL 安全安装*
### 步骤 4: 在 CentOS 中安装和配置 Drupal 8
### 步骤 4 在 CentOS 中安装和配置 Drupal 8
10. 这里我们使用 [wget 命令][6] [下载最新版本 Drupal][5](例如 8.2.6),如果你没有安装 wget 和 gzip 包 ,请使用下面命令安装它们:
10、 这里我们使用 [wget 命令][6] [下载最新版本 Drupal][5](例如 8.2.6),如果你没有安装 wget 和 gzip 包 ,请使用下面命令安装它们:
```
# yum install wget gzip
# wget -c https://ftp.drupal.org/files/projects/drupal-8.2.6.tar.gz
```
11. 之后,[解压 tar 文件][7] 并移动 Drupal 目录到 Apache 文档根目录(`/var/www/html`).
11、 之后,[解压 tar 文件][7] 并移动 Drupal 目录到 Apache 文档根目录(`/var/www/html`)。
```
# tar -zxvf drupal-8.2.6.tar.gz
# mv drupal-8.2.6 /var/www/html/drupal
```
12. 然后,依据 `/var/www/html/drupal/sites/default` 目录下的示例设置文件 default.settings.php创建设置文件 `settings.php`,然后给 Drupal 站点目录设置适当权限,包括子目录和文件,如下所示:
12 然后,依据 `/var/www/html/drupal/sites/default` 目录下的示例设置文件 `default.settings.php`,创建设置文件 `settings.php`,然后给 Drupal 站点目录设置适当权限,包括子目录和文件,如下所示
```
# cd /var/www/html/drupal/sites/default/
@ -162,13 +163,13 @@ gpgcheck=1
# chown -R apache:apache /var/www/html/drupal/
```
13. 更重要的是在 `/var/www/html/drupal/sites/` 目录设置 **SElinux** 规则,如下:
13 更重要的是在 `/var/www/html/drupal/sites/` 目录设置 **SElinux** 规则,如下:
```
# chcon -R -t httpd_sys_content_rw_t /var/www/html/drupal/sites/
```
14. 现在我们必须为 Drupal 站点去创建一个数据库和用户来管理
14 现在我们必须为 Drupal 站点去创建一个用于管理的数据库和用户。
```
# mysql -u root -p
@ -191,7 +192,7 @@ Query OK, 0 rows affected (0.00 sec)
Bye
```
15. 最后,打开地址: `http://server_IP/drupal/` 开始网站的安装,选择你首选的安装语言然后点击保存以继续。
15 最后,打开地址: `http://server_IP/drupal/` 开始网站的安装,选择你首选的安装语言然后点击保存以继续。
[
![Drupal 安装语言](http://www.tecmint.com/wp-content/uploads/2013/07/Drupal-Installation-Language.png)
@ -199,7 +200,7 @@ Bye
*Drupal 安装语言*
16. 下一步,选择安装配置文件,选择 Standard标准点击保存继续。
16 下一步,选择安装配置文件,选择 Standard标准点击保存继续。
[
![Drupal 安装配置文件](http://www.tecmint.com/wp-content/uploads/2013/07/Drupal-Installation-Profile.png)
@ -207,7 +208,7 @@ Bye
*Drupal 安装配置文件*
17. 在进行下一步之前查看并通过需求审查并启用 `Clean URL`
17 在进行下一步之前查看并通过需求审查并启用 `Clean URL`
[
![验证 Drupal 需求](http://www.tecmint.com/wp-content/uploads/2013/07/Verify-Drupal-Requirements.png)
@ -215,13 +216,13 @@ Bye
*验证 Drupal 需求*
现在在你的 Apache 配置下启用 Clean URL Drupal。
现在在你的 Apache 配置下启用 Clean URL Drupal。
```
# vi /etc/httpd/conf/httpd.conf
```
确保为默认根文档目录 **/var/www/html** 设置 **AllowOverride All**,如下图所示:
确保为默认根文档目录 `/var/www/html` 设置 `AllowOverride All`,如下图所示:
[
![在 Drupal 中启用 Clean URL](http://www.tecmint.com/wp-content/uploads/2013/07/Enable-Clean-URL-in-Drupal.png)
@ -229,7 +230,7 @@ Bye
*在 Drupal 中启用 Clean URL*
18. 当你为 Drupal 启用 `Clean URL`,刷新页面从下面界面执行数据库配置,输入 Drupal 站点数据库名,数据库用户和数据库密码。
18、 当你为 Drupal 启用 Clean URL,刷新页面从下面界面执行数据库配置,输入 Drupal 站点数据库名,数据库用户和数据库密码。
当填写完所有信息点击**保存并继续**。
@ -247,15 +248,15 @@ Bye
*Drupal 安装*
19. 接下来配置站点为下面的设置(使用适用你的情况的值):
19 接下来配置站点为下面的设置(使用适用你的情况的值):
- **站点名称**  TecMint Drupal Site
- **站点邮箱地址**  admin@tecmint.com
- **用户名**  admin
- **密码**  ##########
- **用户的邮箱地址**  admin@tecmint.com
- **默认国家**  India
- **默认时区**  UTC
- **站点名称**  TecMint Drupal Site
- **站点邮箱地址**  admin@tecmint.com
- **用户名**  admin
- **密码**  ##########
- **用户的邮箱地址**  admin@tecmint.com
- **默认国家**  India
- **默认时区**  UTC
设置适当的值后,点击**保存并继续**完成站点安装过程。
@ -275,7 +276,7 @@ Bye
现在你可以点击**增加内容**,创建示例网页内容。
选项: 有些人[使用 MYSQL 命令行管理数据库][16]不舒服,可以从浏览器界面 [安装 PHPMYAdmin 管理数据库][17]
选项: 有些人[使用 MySQL 命令行管理数据库][16]不舒服,可以从浏览器界面 [安装 PHPMYAdmin 管理数据库][17]
浏览 Drupal 文档 : [https://www.drupal.org/docs/8][18]

View File

@ -1,55 +0,0 @@
svtter翻译中..
The Many, the Humble, the Ubuntu Users
============================================================
#### The proverbial “better mousetrap” isnt one that takes a certified biologist to use. Like Ubuntu, it just needs to do its job extremely well and with little fuss.
### Roblimos Hideaway
![Ubuntu Unity](https://i0.wp.com/fossforce.com/wp-content/uploads/2017/01/UbuntuDesktop.png?resize=524%2C295)
I have never been much of a leading-edge computing person. In fact, I first got mildly famous online writing a weekly column titled “This Old PC” for Time/Life about making do with used gear — often by installing Linux on it — and after that an essentially identical column for Andover.net titled “Cheap Computing,” which was also about saving money in a world where most online computing columns seemed to be about getting you to spend until you had no money left to spend on food.
Most of the early Linux adopters I knew were infatuated with their computers and the software that made them useful. They loved poring over source code and making minor changes. They were, for the most part, computer science students or worked as IT people. Their computers and computer networks fascinated them, as they should have.
I was (and still am) a writer, not a computer science guy. For me, computers have always been tools. I want them to sit quietly until I tell them to do something, then follow my orders with the minimum possible fuss and bother. I like a GUI, since I dont administer my PC or network often enough to memorize long command strings. Sure, I can look them up and type them in, but Id really rather be at the beach.
There was a time when, in Linux circles, mere _users_ were rare. “What do you mean, you just want to use your computer to type articles and maybe add a little HTML to them?” the developer and admin types seemed to ask, as if all fields of endeavor other than coding were inferior to what they did.
But despite the sneers, I kept hammering a theme in speech after speech and conversation after conversation that went sort of like this: “Instead of scratching only your own itches, why not scratch your girlfriends itch? How about your coworkers? And people who work at your favorite restaurant? And what about your doctor? Dont you want him to spend his time doctoring, not worrying about apt get this and grep that?”
So yes, since I wanted easy-to-use Linux, I was an [early Mandrake user][1]. And today, I am a happy Ubuntu user.
Why Ubuntu? Hey! Why not?! Its the Toyota Camry (or maybe Honda Civic) of Linux distros. Plain-jane. So popular that support is easy to find on IRC, Linux Questions, and Ubuntus own extensive forums, and many other places.
Sure, its cooler to use Debian or Fedora, and Mint looks jazzier out of the box, but Im _still_ mostly interested in writing stories and adding a little HTML to them, along with reading this and that in my browser, editing work in Google Docs for a corporate client or two, keeping up with my email, doing this or that with a picture now and then…. all basic computer user stuff.
And with all this going on, the appearance of my desktop is meaningless. I cant see it! Its covered with application windows! And Im talking two monitors, not just one. I have, lets see…. 17 Chrome tabs open in two windows. And GIMP running. And [Bluefish][2], which Im using right now, to type this essay.
So for me Ubuntu is the path of least resistance. Mint may be a little cuter, but when you come right down to it, and strip away the trim, isnt it really Ubuntu? So if I use the same few programs over and over, which I do, and cant see the desktop anyway, who cares if its brown?
Some studies say Mint is more popular. Others say Debian. But they all show Ubuntu in the top few, year after year.
So call me mass-average. Call me boring. Call me one of the many, the humble, the Ubuntu users — at least for now…
--------------------------------------------------------------------------------
作者简介:
![](http://0.gravatar.com/avatar/f861a631676e6d4d2f4e4de2454f230e?s=80&d=blank&r=pg)
Robin "Roblimo" Miller is a freelance writer and former editor-in-chief at Open Source Technology Group, the company that owned SourceForge, freshmeat, Linux.com, NewsForge, ThinkGeek and Slashdot, and until recently served as a video editor at Slashdot. He also publishes the blog Robin Roblimo Millers Personal Site. @robinAKAroblimo
--------------------------------------------------------------------------------
via: http://fossforce.com/2017/01/many-humble-ubuntu-users/
作者:[Robin "Roblimo" Miller][a]
译者:[svtter](https://github.com/svtter)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.roblimo.com/
[1]:https://linux.slashdot.org/story/00/11/02/2324224/mandrake-72-in-wal-mart-a-good-idea
[2]:http://bluefish.openoffice.nl/index.html

View File

@ -1,3 +1,5 @@
svtter translating...(=w=)
How to Build Your Own Media Center with OpenELEC
============================================================

View File

@ -1,168 +0,0 @@
ictlyh Translating
Cpustat Monitors CPU Utilization by Running Processes in Linux
============================================================
Cpustat is a powerful system performance measure program for Linux, written using [Go programming language][3]. It attempts to reveal CPU utilization and saturation in an effective way, using The Utilization Saturation and Errors (USE) Method (a methodology for analyzing the performance of any system).
It extracts higher frequency samples of every process being executed on the system and then summarizes these samples at a lower frequency. For instance, it can measure every process every 200ms and summarize these samples every 5 seconds, including min/average/max values for certain metrics.
**Suggested Read:** [20 Command Line Tools to Monitor Linux Performance][4]
Cpustat outputs data in two possible ways: a pure text list of the summary interval and a colorful scrolling dashboard of each sample.
### How to Install Cpustat in Linux
You must have Go (GoLang) installed on your Linux system in order to use cpustat, click on the link below to follow the GoLang installation steps that is if you do not have it installed:
1. [Install GoLang (Go Programming Language) in Linux][1]
Once you have installed Go, type the go get command below to install it, this command will install the cpustat binary in your GOBIN variable:
```
# go get github.com/uber-common/cpustat
```
### How to Use Cpustat in Linux
When the installation process completes, run cpustat as follows with root privileges using the sudo command that is if your controlling the system as a non-root user, otherwise youll get the error as shown:
```
$ $GOBIN/cpustat
This program uses the netlink taskstats interface, so it must be run as root.
```
Note: To run cpustat as well as all other Go programs you have installed on your system like any other commands, include GOBIN variable in your PATH environment variable. Open the link below to learn how to set the PATH variable in Linux.
1. [Learn How to Set Your $PATH Variables Permanently in Linux][2]
This is how cpustat works; the `/proc` directory is queried to get the current [list of process IDs][5] for every interval, and:
* for each PID, read /proc/pid/stat, then compute difference from previous sample.
* in case its a new PID, read /proc/pid/cmdline.
* for each PID, send a netlink message to fetch the taskstats, compute difference from previous sample.
* fetch /proc/stat to get the overall system stats.
Again, each sleep interval is adjusted to account for the amount of time consumed fetching all of these stats. Furthermore, each sample also records the time it took to scale each measurement by the actual elapsed time between samples. This attempts to account for delays in cpustat itself.
When run without any arguments, cpustat will display the following by default: sampling interval: 200ms, summary interval: 2s (10 samples), [showing top 10 procs][6], user filter: all, pid filter: all as shown in the screenshot below:
```
$ sudo $GOBIN/cpustat
```
[
![Cpustat - Monitor Linux CPU Usage](http://www.tecmint.com/wp-content/uploads/2017/03/Cpustat-Monitor-Linux-CPU-Usage.png)
][7]
Cpustat Monitor Linux CPU Usage
From the output above, the following are the meanings of the system-wide summary metrics displayed before the fields:
* usr  min/avg/max user mode run time as a percentage of a CPU.
* sys  min/avg/max system mode run time as a percentage of a CPU.
* nice  min/avg/max user mode low priority run time as a percentage of a CPU.
* idle  min/avg/max user mode run time as a percentage of a CPU.
* iowait  min/avg/max delay time waiting for disk IO.
* prun  min/avg/max count of processes in a runnable state (same as load average).
* pblock  min/avg/max count of processes blocked on disk IO.
* pstart  number of processes/threads started in this summary interval.
Still from the output above, for a given process, the different columns mean:
* name  common process name from /proc/pid/stat or /proc/pid/cmdline.
* pid  process id, also referred to as “tgid”.
* min  lowest sample of user+system time for the pid, measured from /proc/pid/stat. Scale is a percentage of a CPU.
* max  highest sample of user+system time for this pid, also measured from /proc/pid/stat.
* usr  average user time for the pid over the summary period, measured from /proc/pid/stat.
* sys  average system time for the pid over the summary period, measured from /proc/pid/stat.
* nice  indicates current “nice” value for the process, measured from /proc/pid/stat. Higher means “nicer”.
* runq  time the process and all of its threads spent runnable but waiting to run, measured from taskstats via netlink. Scale is a percentage of a CPU.
* iow  time the process and all of its threads spent blocked by disk IO, measured from taskstats via netlink. Scale is a percentage of a CPU, averaged over the summary interval.
* swap  time the process and all of its threads spent waiting to be swapped in, measured from taskstats via netlink. Scale is a percentage of a CPU, averaged over the summary interval.
* vcx and icx  total number of voluntary context switches by the process and all of its threads over the summary interval, measured from taskstats via netlink.
* rss  current RSS value fetched from /proc/pid/stat. It is the amount of memory this process is using.
* ctime  sum of user+sys CPU time consumed by waited for children that exited during this summary interval, measured from /proc/pid/stat.
Note that long running child processes can often confuse this measurement, because the time is reported only when the child process exits. However, this is useful for measuring the impact of frequent cron jobs and health checks where the CPU time is often consumed by many child processes.
* thrd  number of threads at the end of the summary interval, measured from /proc/pid/stat.
* sam  number of samples for this process included in the summary interval. Processes that have recently started or exited may have been visible for fewer samples than the summary interval.
The following command displays the top 10 root user processes running on the system:
```
$ sudo $GOBIN/cpustat -u root
```
[
![Find Root User Running Processes](http://www.tecmint.com/wp-content/uploads/2017/03/show-root-user-processes.png)
][8]
Find Root User Running Processes
To display output in a fancy terminal mode, use the `-t` flag as follows:
```
$ sudo $GOBIN/cpustat -u roo -t
```
[
![Running Process Usage of Root User](http://www.tecmint.com/wp-content/uploads/2017/03/Root-User-Runnng-Processes.png)
][9]
Running Process Usage of Root User
To view the [top x number of processes][10] (the default is 10), you can use the `-n` flag, the following command shows the [top 20 Linux processes running][11] on the system:
```
$ sudo $GOBIN/cpustat -n 20
```
You can also write CPU profile to a file using the `-cpuprofile` option as follows and then use the [cat command][12] to view the file:
```
$ sudo $GOBIN/cpustat -cpuprofile cpuprof.txt
$ cat cpuprof.txt
```
To display help info, use the `-h` flag as follows:
```
$ sudo $GOBIN/cpustat -h
```
Find additional info from the cpustat Github Repository: [https://github.com/uber-common/cpustat][13]
Thats all! In this article, we showed you how to install and use cpustat, a useful system performance measure tool for Linux. Share your thoughts with us 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/cpustat-monitors-cpu-utilization-by-processes-in-linux/
作者:[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/install-go-in-linux/
[2]:http://www.tecmint.com/set-path-variable-linux-permanently/
[3]:http://www.tecmint.com/install-go-in-linux/
[4]:http://www.tecmint.com/command-line-tools-to-monitor-linux-performance/
[5]:http://www.tecmint.com/find-process-name-pid-number-linux/
[6]:http://www.tecmint.com/find-linux-processes-memory-ram-cpu-usage/
[7]:http://www.tecmint.com/wp-content/uploads/2017/03/Cpustat-Monitor-Linux-CPU-Usage.png
[8]:http://www.tecmint.com/wp-content/uploads/2017/03/show-root-user-processes.png
[9]:http://www.tecmint.com/wp-content/uploads/2017/03/Root-User-Runnng-Processes.png
[10]:http://www.tecmint.com/find-processes-by-memory-usage-top-batch-mode/
[11]:http://www.tecmint.com/install-htop-linux-process-monitoring-for-rhel-centos-fedora/
[12]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/
[13]:https://github.com/uber-common/cpustat
[14]:http://www.tecmint.com/author/aaronkili/
[15]:http://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/
[16]:http://www.tecmint.com/free-linux-shell-scripting-books/

View File

@ -0,0 +1,51 @@
# 多数的低下的Ubuntu用户
#### “更好的捕鼠器“不是一个合格生物学家的专用谚语。就像Ubuntu尽管带有一点小问题但它仅仅需要非常优秀的做好它的工作。
### Roblimo的藏身处
我已经很久不是一个擅长于计算机的人了。事实上我在网上第一次获得小有名气是在写一个星期专栏的时候这个专栏的名字是“这台老电脑”。它描述的是一台古老的设备能够做什么——通常在上面安装Linux——在那之后我又在Andover.net上开设了一个相同的专栏名字叫做“平价计算”是关于如何在这个世界省钱的——在这个大部分在线计算机专栏都让你花钱花到你没钱吃饭的世界里译者注作者的意思是“我算是一股清流了”
据我所知的那些大部分的Linux的早期使用者都痴迷于他们的电脑还有那些让他们电脑有用的软件。他们乐于仔细研读源代码并且做出一点小小的修改。最关键的是他们是计算科学的学生或者从事IT行业的人们。他们的计算机和计算机网络迷住了他们就像是他们本来应该成为的样子。
我是(现在也是)一个写作者,不是一个从事计算机科学的家伙。对于我而言,计算机一直以来都是一个工具。我希望他们能够老老实实的,直到我让它们去做点什么,然后按照我的意思去做,最好只有一点点小问题,不至于让我烦躁。我喜欢图形化界面,因为我没有足够的时间去记忆很长的命令行来管理我的电脑和网络。当然,我是有能力使用命令行的,但是我更愿意站在海滩上,不沉浸在命令行的海洋里。
有一段时间啊在Linux这个圈子里仁慈的用户太少了。“你什么意思你仅仅是想要你的电脑去书写文章或者可能增加一点点HTML到里面吗“开发者和管理员这样询问道好像所有除了编写代码的其他领域的奉献者们都不如他们所贡献的。
但是尽管面临这些讥笑和嘲讽,我在一次又一次的宣讲和谈话中提出一个像这样的主题:”与其仅仅解决你自己的痛点,为什么不把你朋友的痛点也一起解决了呢?比如与你携同工作的朋友?以及在那些在你最喜欢的饭店工作的朋友们,还有你的医生?难道你不希望你的医生专注于医治病人,而不是在`apt get`以及`grep`心烦意乱?“
所以是的因为我希望能够更简单的使用Linux我是一个[早期的Mandrake用户][1]并且在今天我是一个快乐的Ubuntu使用者。
为什么是Ubuntu你一定是在逗我为什么不是它是Linux发行版中的丰田凯美瑞或者本田思域平凡的而卓越。它流行到你可以在网络实时聊天Linux问题Ubuntu自己的论坛上以及许许多多的地方都发现它的身影。
当然使用Debian或者Fedora是很酷的还有Mint也是一个与众不同的小帅哥。但是我依然感兴趣于写一些故事以及添加一些HTML到故事里加之在浏览器中阅读在Google Docs与合作客户修改工作随时接受我的邮件用一张过去或者现在的图片做这做那…这些全部都是电脑用户的那点事儿。
当这一切运行的时候,我的桌面什么样子就没有意义了。我不能看见它!它覆盖了整个应用窗口!然后我使用了两个显示器,不仅仅是一个。我有...让我们看看17个打开的标签页在两个窗口中。并且GIMP在运行[Bluefish][2],这个我刚才在使用的东西,来书写这篇文章。
所以对我而言Ubuntu是我最小的抵抗之路。Mint可能有一点可爱但是当你使用它的时候去掉它的修饰就是底部的边栏译者注它不就是Ubuntu吗所以如果我是用一个个相同的程序我的确并且不能看见桌面环境所以谁还在意他长什么样子
有些研究表明Mint正在变得更加流行而有些人说Debian更甚。但是他们的研究中Ubuntu都是居于最上位的尽管这一年又一年过去了。
所以称我为大多数人吧认为我无聊吧称我为多数的低下的Ubuntu用户吧——至少从现在开始...
------
作者简介:
![](http://0.gravatar.com/avatar/f861a631676e6d4d2f4e4de2454f230e?s=80&d=blank&r=pg)
Robin "Roblimo" Miller 是一个自由职业的作者并且是前开源科技组的主编辑。开源科技组这个公司拥有SourceForge, freshmeat, Linux.com, NewForge, ThinkGeek以及Slashdot, 并且他直到最近依然在Slashdot作为一个视频编辑者。他的博客是Robin Roblimo Miller的私人站点。@robinAKAroblimo
------
via: http://fossforce.com/2017/01/many-humble-ubuntu-users/
作者:[Robin "Roblimo" Miller][a]
译者:[svtter](https://github.com/svtter)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: http://www.roblimo.com/
[1]: https://linux.slashdot.org/story/00/11/02/2324224/mandrake-72-in-wal-mart-a-good-idea
[2]: http://bluefish.openoffice.nl/index.html

View File

@ -0,0 +1,168 @@
Cpustat - 在 Linux 下通过运行程序监控 CPU 使用率
============================================================
Cpustat 是 Linux 下一个强大的系统性能测量程序,它用 [Go 编程语言][3] 编写。它尝试使用 [The Utilization Saturation and ErrorsUSEMethod](http://www.brendangregg.com/usemethod.html "The Utilization Saturation and ErrorsUSEMethod")(一个用于分析任意系统性能的方法),以有效的方式显示 CPU 利用率和饱和度。
它高频率提取系统中运行的每个进程的样本,然后用较低频率汇总这些样本。例如,它能够每 200ms 测量一次每个进程,然后每 5 秒汇总这些样本,包括某些度量的最小/平均/最大值min/avg/max
**推荐阅读:** [监控 Linux 性能的 20 个命令行工具][4]
Cpustat 能用两种方式输出数据:汇总间隔的纯文本列表和每个样本的有色滚动面板。
### 如何在 Linux 中安装 Cpustat
为了使用 cpustat你的 Linux 系统中必须安装有 GoGoLang如果你还没有安装它点击下面的链接逐步安装 GoLang
1. [在 Linux 下安装 GoLangGo 编程语言)][1]
安装完 Go 以后,输入下面的 `go get` 命令安装 Cpustat这个命令会将 cpustat 二进制文件安装到你的 `GOBIN` 变量(该变量所指的路径):
# go get github.com/uber-common/cpustat
### 如何在 Linux 中使用 Cpustat
安装过程完成后,如果你不是以 root 用户控制系统,像下面这样使用 sudo 命令获取 root 权限运行 cpustat否则会出现下面显示的错误信息
$ $GOBIN/cpustat
This program uses the netlink taskstats interface, so it must be run as root.
注意:想要像你系统中已经安装的其它 Go 程序那样运行 cpustat你需要把 `GOBIN` 变量添加到 `PATH` 环境变量。打开下面的链接学习如何在 Linux 中设置 `PATH` 变量。
1. [学习如何在 Linux 中永久设置你的 $PATH 变量][2]
cpustat 是这样工作的:每个间隔会查询 `/proc` 目录获取当前[进程 ID 列表][5],然后:
* 对于每个 PID读取 /proc/pid/stat然后计算和前一个样本的差别。
* 如果是一个新的 PID读取 /proc/pid/cmdline。
* 对于每个 PID发送 netlink 消息获取 taskstat计算和前一个样本的差别。
* 读取 /proc/stat 获取总的系统统计信息。
根据获取所有这些统计信息所花费的时间,会调整每个睡眠间隔。另外,通过样本之间实际经过的时间,每个样本也会记录它用于测量的时间。这可用于计算 cpustat 自身的延迟。
当不带任何参数运行时cpustat 默认会显示以下信息样本间隔200ms汇总间隔2s10 个样本),[显示前 10 个进程][6]用户过滤器allpid 过滤器all正如下面截图所示
$ sudo $GOBIN/cpustat
[
![Cpustat - 监控 Linux CPU 使用](http://www.tecmint.com/wp-content/uploads/2017/03/Cpustat-Monitor-Linux-CPU-Usage.png)
][7]
Cpustat 监控 Linux CPU 使用
在上面的输出中,之前显示的系统范围的度量字段意义如下:
* usr - 用户模式运行时间占 CPU 百分比的 min/avg/max 值。
* sys - 系统模式运行时间占 CPU 百分比 的min/avg/max 值。
* nice - 用户模式低优先级运行时间占 CPU 百分比的 min/avg/max 值。
* idle - 用户模式空闲时间占 CPU 百分比的 min/avg/max 值。
* iowait - 等待磁盘 IO 的 min/avg/max 延迟时间。
* prun - 可运行状态的 min/avg/max 进程数量load average 也是如此)。
* pblock - 被磁盘 IO 阻塞的 min/avg/max 进程数量。
* pstat - 这次汇总间隔启动的进程/线程数目。
同样还是上面的输出,对于一个进程,不同列的意思分别是:
* name - 从 /proc/pid/stat 或 /proc/pid/cmdline 获取的进程名称。
* pid - 进程 ID也称为 “tgid”。
* min - 该 pid user+system 时间的最小样本,从 /proc/pid/stat 计算。比率是 CPU 的百分比。
* max - 该 pid user+system 时间的最大样本,从 /proc/pid/stat 计算。
* usr - 该汇总期间该 pid 的平均 user 时间,从 /proc/pid/stat 计算。
* sys - 该汇总期间该 pid 的平均 system 时间,从 /proc/pid/stat 计算。
* nice - 表示该进程的当前 “nice” 值,从 /proc/pid/stat 计算。值越高表示越好nicer
* runq - 进程和它所有线程可运行但等待运行的时间,通过 netlink 从 taskstats 计算。比率是 CPU 的百分比。
* iow - 进程和它所有线程被磁盘 IO 阻塞的时间,通过 netlink 从 taskstats 计算。比率是 CPU 的百分比,对整个汇总间隔平均。
* swap - 进程和它所有线程等待被换入swap in的时间过 netlink 从 taskstats 计算。Scale 是 CPU 的百分比,对整个汇总间隔平均。
* vcx 和 icx - 在汇总间隔期间进程和它的所有线程自动上下文切换总的次数,过 netlink 从 taskstats 计算。
* rss - 从 /proc/pid/stat 获取的当前 RSS 值。它是指该进程正在使用的内存数量。
* ctime - 在汇总间隔期间等待子进程退出的 user+sys CPU 时间总和,从 /proc/pid/stat 计算。
注意长时间运行的子进程可能导致混淆这个值,因为只有在子进程退出后才会报告时间。但是,这对于计算高频 cron 任务以及 CPU 时间经常被多个子进程使用的健康检查非常有帮助。
* thrd - 汇总间隔最后线程的数目,从 /proc/pid/stat 计算。
* sam - 在这个汇总间隔期间该进程的样本数目。最近启动会退出的进程可能比汇总间隔的样本数目少。
下面的命令显示了系统中运行的前 10 个 root 用户进程:
$ sudo $GOBIN/cpustat -u root
[
![查找 root 用户正在运行的进程](http://www.tecmint.com/wp-content/uploads/2017/03/show-root-user-processes.png)
][8]
查找 root 用户正在运行的进程
要想用更好看的终端模式显示输出,像下面这样用 `-t` 选项:
$ sudo $GOBIN/cpustat -u roo -t
[
![root 用户正在运行的进程](http://www.tecmint.com/wp-content/uploads/2017/03/Root-User-Runnng-Processes.png)
][9]
root 用户正在运行的进程
要查看前 [x 个进程][10](默认是 10你可以使用 `-n` 选项,下面的命令显示了系统中 [正在运行的前 20 个进程][11]
$ sudo $GOBIN/cpustat -n 20
你也可以像下面这样使用 `-cpuprofile` 选项将 CPU 信息写到文件,然后用 [cat 命令][12]查看文件:
$ sudo $GOBIN/cpustat -cpuprofile cpuprof.txt
$ cat cpuprof.txt
要显示帮助信息,像下面这样使用 `-h` 选项:
$ sudo $GOBIN/cpustat -h
从 cpustat Github 参仓库:[https://github.com/uber-common/cpustat][13] 查阅其它资料。
就是这些!在这篇文章中,我们向你展示了如何安装和使用 cpustatLinux 下一个有用的系统性能测量工具。通过下面的评论框和我们分享你的想法吧。
--------------------------------------------------------------------------------
作者简介:
Aaron Kili 是一个 Linux 和 F.O.S.SFree and Open-Source Software 爱好者,一个 Linux 系统管理员、web 开发员,现在也是 TecMint 的内容创建者,他喜欢和电脑一起工作,他相信知识共享。
--------------------------------------------------------------------------------
via: http://www.tecmint.com/cpustat-monitors-cpu-utilization-by-processes-in-linux/
作者:[Aaron Kili][a]
译者:[ictlyh](https://github.com/ictlyh)
校对:[校对者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/install-go-in-linux/
[2]:http://www.tecmint.com/set-path-variable-linux-permanently/
[3]:http://www.tecmint.com/install-go-in-linux/
[4]:http://www.tecmint.com/command-line-tools-to-monitor-linux-performance/
[5]:http://www.tecmint.com/find-process-name-pid-number-linux/
[6]:http://www.tecmint.com/find-linux-processes-memory-ram-cpu-usage/
[7]:http://www.tecmint.com/wp-content/uploads/2017/03/Cpustat-Monitor-Linux-CPU-Usage.png
[8]:http://www.tecmint.com/wp-content/uploads/2017/03/show-root-user-processes.png
[9]:http://www.tecmint.com/wp-content/uploads/2017/03/Root-User-Runnng-Processes.png
[10]:http://www.tecmint.com/find-processes-by-memory-usage-top-batch-mode/
[11]:http://www.tecmint.com/install-htop-linux-process-monitoring-for-rhel-centos-fedora/
[12]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/
[13]:https://github.com/uber-common/cpustat
[14]:http://www.tecmint.com/author/aaronkili/
[15]:http://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/
[16]:http://www.tecmint.com/free-linux-shell-scripting-books/