Merge pull request #7 from LCTT/master

update
This commit is contained in:
wenwensnow 2019-09-24 01:33:06 +02:00 committed by GitHub
commit 66ba06294f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 1677 additions and 1019 deletions

View File

@ -0,0 +1,227 @@
[#]: collector: (lujun9972)
[#]: translator: (laingke)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11373-1.html)
[#]: subject: (Create an online store with this Java-based framework)
[#]: via: (https://opensource.com/article/19/1/scipio-erp)
[#]: author: (Paul Piper https://opensource.com/users/madppiper)
使用 Java 框架 Scipio ERP 创建一个在线商店
======
> Scipio ERP 具有包罗万象的应用程序和功能。
![](https://img.linux.net.cn/data/attachment/album/201909/22/133258hqvwax5w1zvq5ffa.jpg)
如果,你想在网上销售产品或服务,但要么找不到合适的软件,要么觉得定制成本太高?那么,[Scipio ERP][1] 也许正是你想要的。
Scipio ERP 是一个基于 Java 的开源的电子商务框架,具有包罗万象的应用程序和功能。这个项目于 2014 年从 [Apache OFBiz][2] 分叉而来,侧重于更好的定制和更现代的吸引力。这个电子商务组件非常丰富,可以在多商店环境中工作,同时支持国际化,具有琳琅满目的产品配置,而且它还兼容现代 HTML 框架。该软件还为许多其他业务场景提供标准应用程序,例如会计、仓库管理或销售团队自动化。它都是高度标准化的,因此易于定制,如果你想要的不仅仅是一个虚拟购物车,这是非常棒的。
该系统也使得跟上现代 Web 标准变得非常容易。所有界面都是使用系统的“[模板工具包][3]”构建的,这是一个易于学习的宏集,可以将 HTML 与所有应用程序分开。正因为如此,每个应用程序都已经标准化到核心。听起来令人困惑?它真的不是 HTML——它看起来很像 HTML但你写的内容少了很多。
### 初始安装
在你开始之前,请确保你已经安装了 Java 1.8(或更高版本)的 SDK 以及一个 Git 客户端。完成了?太棒了!接下来,切换到 Github 上的主分支:
```
git clone https://github.com/ilscipio/scipio-erp.git
cd scipio-erp
git checkout master
```
要安装该系统,只需要运行 `./install.sh` 并从命令行中选择任一选项。在开发过程中,最好一直使用 “installation for development”选项 1它还将安装一系列演示数据。对于专业安装你可以修改初始配置数据“种子数据”以便自动为你设置公司和目录数据。默认情况下系统将使用内部数据库运行但是它[也可以配置][4]使用各种关系数据库,比如 PostgreSQL 和 MariaDB 等。
![安装向导][6]
*按照安装向导完成初始配置*
通过命令 `./start.sh` 启动系统然后打开链接 <https://localhost:8443/setup/> 完成配置。如果你安装了演示数据, 你可以使用用户名 `admin` 和密码 `scipio` 进行登录。在安装向导中,你可以设置公司简介、会计、仓库、产品目录、在线商店和额外的用户配置信息。暂时在产品商店配置界面上跳过网站实体的配置。系统允许你使用不同的底层代码运行多个在线商店;除非你想这样做,一直选择默认值是最简单的。
祝贺你,你刚刚安装了 Scipio ERP在界面上操作一两分钟感受一下它的功能。
### 捷径
在你进入自定义之前,这里有一些方便的命令可以帮助你:
* 创建一个 shop-override`./ant create-component-shop-override`
* 创建一个新组件:`./ant create-component`
* 创建一个新主题组件:`./ant create-theme`
* 创建管理员用户:`./ant create-admin-user-login`
* 各种其他实用功能:`./ant -p`
* 用于安装和更新插件的实用程序:`./git-addons help`
另外,请记下以下位置:
* 将 Scipio 作为服务运行的脚本:`/tools/scripts/`
* 日志输出目录:`/runtime/logs`
* 管理应用程序:`<https://localhost:8443/admin/>`
* 电子商务应用程序:`<https://localhost:8443/shop/>`
最后Scipio ERP 在以下五个主要目录中构建了所有代码:
* `framework`: 框架相关的源,应用程序服务器,通用界面和配置
* `applications`: 核心应用程序
* `addons`: 第三方扩展
* `themes`: 修改界面外观
* `hot-deploy`: 你自己的组件
除了一些配置,你将在 `hot-deploy``themes` 目录中进行开发。
### 在线商店定制
要真正使系统成为你自己的系统,请开始考虑使用[组件][7]。组件是一种模块化方法,可以覆盖、扩展和添加到系统中。你可以将组件视为独立 Web 模块,可以捕获有关数据库([实体][8])、功能([服务][9])、界面([视图][10])、[事件和操作][11]和 Web 应用程序等的信息。由于组件功能,你可以添加自己的代码,同时保持与原始源兼容。
运行命令 `./ant create-component-shop-override` 并按照步骤创建你的在线商店组件。该操作将会在 `hot-deploy` 目录内创建一个新目录,该目录将扩展并覆盖原始的电子商务应用程序。
![组件目录结构][13]
*一个典型的组件目录结构。*
你的组件将具有以下目录结构:
* `config`: 配置
* `data`: 种子数据
* `entitydef`: 数据库表定义
* `script`: Groovy 脚本的位置
* `servicedef`: 服务定义
* `src`: Java 类
* `webapp`: 你的 web 应用程序
* `widget`: 界面定义
此外,`ivy.xml` 文件允许你将 Maven 库添加到构建过程中,`ofbiz-component.xml` 文件定义整个组件和 Web 应用程序结构。除了一些在当前目录所能够看到的,你还可以在 Web 应用程序的 `WEB-INF` 目录中找到 `controller.xml` 文件。这允许你定义请求实体并将它们连接到事件和界面。仅对于界面来说,你还可以使用内置的 CMS 功能,但优先要坚持使用核心机制。在引入更改之前,请熟悉 `/applications/shop/`
#### 添加自定义界面
还记得[模板工具包][3]吗?你会发现它在每个界面都有使用到。你可以将其视为一组易于学习的宏,它用来构建所有内容。下面是一个例子:
```
<@section title="Title">
    <@heading id="slider">Slider</@heading>
    <@row>
        <@cell columns=6>
            <@slider id="" class="" controls=true indicator=true>
                <@slide link="#" image="https://placehold.it/800x300">Just some content…</@slide>
                <@slide title="This is a title" link="#" image="https://placehold.it/800x300"></@slide>
            </@slider>
        </@cell>
        <@cell columns=6>Second column</@cell>
    </@row>
</@section>
```
不是很难,对吧?同时,主题包含 HTML 定义和样式。这将权力交给你的前端开发人员,他们可以定义每个宏的输出,并坚持使用自己的构建工具进行开发。
我们快点试试吧。首先,在你自己的在线商店上定义一个请求。你将修改此代码。一个内置的 CMS 系统也可以通过 <https://localhost:8443/cms/> 进行访问,它允许你以更有效的方式创建新模板和界面。它与模板工具包完全兼容,并附带可根据你的喜好采用的示例模板。但是既然我们试图在这里理解系统,那么首先让我们采用更复杂的方法。
打开你商店 `webapp` 目录中的 [controller.xml][14] 文件。控制器会跟踪请求事件并相应地执行操作。下面的操作将会在 `/shop/test` 下创建一个新的请求:
```
<!-- Request Mappings -->
<request-map uri="test">
     <security https="true" auth="false"/>
      <response name="success" type="view" value="test"/>
</request-map>
```
你可以定义多个响应,如果需要,可以在请求中使用事件或服务调用来确定你可能要使用的响应。我选择了“视图”类型的响应。视图是渲染的响应;其他类型是请求重定向、转发等。系统附带各种渲染器,可让你稍后确定输出;为此,请添加以下内容:
```
<!-- View Mappings -->
<view-map name="test" type="screen" page="component://mycomponent/widget/CommonScreens.xml#test"/>
```
用你自己的组件名称替换 `my-component`。然后,你可以通过在 `widget/CommonScreens.xml` 文件的标签内添加以下内容来定义你的第一个界面:
```
<screen name="test">
        <section>
            <actions>
            </actions>
            <widgets>
                <decorator-screen name="CommonShopAppDecorator" location="component://shop/widget/CommonScreens.xml">
                    <decorator-section name="body">
                        <platform-specific><html><html-template location="component://mycomponent/webapp/mycomponent/test/test.ftl"/></html></platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
```
商店界面实际上非常模块化,由多个元素组成([小部件、动作和装饰器][15])。为简单起见,请暂时保留原样,并通过添加第一个模板工具包文件来完成新网页。为此,创建一个新的 `webapp/mycomponent/test/test.ftl` 文件并添加以下内容:
```
<@alert type="info">Success!</@alert>
```
![自定义的界面][17]
*一个自定义的界面。*
打开 <https://localhost:8443/shop/control/test/> 并惊叹于你自己的成就。
#### 自定义主题
通过创建自己的主题来修改商店的界面外观。所有主题都可以作为组件在 `themes` 文件夹中找到。运行命令 `./ant create-theme` 来创建你自己的主题。
![主题组件布局][19]
*一个典型的主题组件布局。*
以下是最重要的目录和文件列表:
* 主题配置:`data/*ThemeData.xml`
* 特定主题封装的 HTML`includes/*.ftl`
* 模板工具包 HTML 定义:`includes/themeTemplate.ftl`
* CSS 类定义:`includes/themeStyles.ftl`
* CSS 框架: `webapp/theme-title/`
快速浏览工具包中的 Metro 主题;它使用 Foundation CSS 框架并且充分利用了这个框架。然后,然后,在新构建的 `webapp/theme-title` 目录中设置自己的主题并开始开发。Foundation-shop 主题是一个非常简单的特定于商店的主题实现,你可以将其用作你自己工作的基础。
瞧!你已经建立了自己的在线商店,准备个性化定制吧!
![搭建完成的 Scipio ERP 在线商店][21]
*一个搭建完成的基于 Scipio ERP的在线商店。*
### 接下来是什么?
Scipio ERP 是一个功能强大的框架,可简化复杂的电子商务应用程序的开发。为了更完整的理解,请查看项目[文档][7],尝试[在线演示][22],或者[加入社区][23].
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/1/scipio-erp
作者:[Paul Piper][a]
选题:[lujun9972][b]
译者:[laingke](https://github.com/laingke)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/madppiper
[b]: https://github.com/lujun9972
[1]: https://www.scipioerp.com
[2]: https://ofbiz.apache.org/
[3]: https://www.scipioerp.com/community/developer/freemarker-macros/
[4]: https://www.scipioerp.com/community/developer/installation-configuration/configuration/#database-configuration
[5]: /file/419711
[6]: https://opensource.com/sites/default/files/uploads/setup_step5_sm.jpg (Setup wizard)
[7]: https://www.scipioerp.com/community/developer/architecture/components/
[8]: https://www.scipioerp.com/community/developer/entities/
[9]: https://www.scipioerp.com/community/developer/services/
[10]: https://www.scipioerp.com/community/developer/views-requests/
[11]: https://www.scipioerp.com/community/developer/events-actions/
[12]: /file/419716
[13]: https://opensource.com/sites/default/files/uploads/component_structure.jpg (component directory structure)
[14]: https://www.scipioerp.com/community/developer/views-requests/request-controller/
[15]: https://www.scipioerp.com/community/developer/views-requests/screen-widgets-decorators/
[16]: /file/419721
[17]: https://opensource.com/sites/default/files/uploads/success_screen_sm.jpg (Custom screen)
[18]: /file/419726
[19]: https://opensource.com/sites/default/files/uploads/theme_structure.jpg (theme component layout)
[20]: /file/419731
[21]: https://opensource.com/sites/default/files/uploads/finished_shop_1_sm.jpg (Finished Scipio ERP shop)
[22]: https://www.scipioerp.com/demo/
[23]: https://forum.scipioerp.com/

View File

@ -0,0 +1,82 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11379-1.html)
[#]: subject: (git exercises: navigate a repository)
[#]: via: (https://jvns.ca/blog/2019/08/30/git-exercises--navigate-a-repository/)
[#]: author: (Julia Evans https://jvns.ca/)
Git 练习:存储库导航
======
我觉得前几天的 [curl 练习][1]进展顺利,所以今天我醒来后,想尝试编写一些 Git 练习。Git 是一大块需要学习的技能,可能要花几个小时才能学会,所以我分解练习的第一个思路是从“导航”一个存储库开始的。
我本来打算使用一个玩具测试库,但后来我想,为什么不使用真正的存储库呢?这样更有趣!因此,我们将浏览 Ruby 编程语言的存储库。你无需了解任何 C 即可完成此练习,只需熟悉一下存储库中的文件随时间变化的方式即可。
### 克隆存储库
开始之前,需要克隆存储库:
```
git clone https://github.com/ruby/ruby
```
与实际使用的大多数存储库相比,该存储库的最大不同之处在于它没有分支,但是它有很多标签,它们与分支相似,因为它们都只是指向一个提交的指针而已。因此,我们将使用标签而不是分支进行练习。*改变*标签的方式和分支非常不同,但*查看*标签和分支的方式完全相同。
### Git SHA 总是引用同一个代码
执行这些练习时要记住的最重要的一点是,如本页面所述,像`9e3d9a2a009d2a0281802a84e1c5cc1c887edc71` 这样的 Git SHA 始终引用同一个的代码。下图摘自我与凯蒂·西勒·米勒撰写的一本杂志,名为《[Oh shit, git!][2]》。(她还有一个名为 <https://ohshitgit.com/> 的很棒的网站,启发了该杂志。)
![](https://wizardzines.com/zines/oh-shit-git/samples/ohshit-commit.png)
我们将在练习中大量使用 Git SHA以使你习惯于使用它们并帮助你了解它们与标签和分支的对应关系。
### 我们将要使用的 Git 子命令
所有这些练习仅使用这 5 个 Git 子命令:
```
git checkout
git log (--oneline, --author, and -S will be useful)
git diff (--stat will be useful)
git show
git status
```
### 练习
1. 查看 matz 从 1998 年开始的 Ruby 提交。提交 ID 为 ` 3db12e8b236ac8f88db8eb4690d10e4a3b8dbcd4`。找出当时 Ruby 的代码行数。
2. 检出当前的 master 分支。
3. 查看文件 `hash.c` 的历史记录。更改该文件的最后一个提交 ID 是什么?
4. 了解最近 20 年来 `hash.c` 的变化:将 master 分支上的文件与提交 `3db12e8b236ac8f88db8eb4690d10e4a3b8dbcd4` 的文件进行比较。
5. 查找最近更改了 `hash.c` 的提交,并查看该提交的差异。
6. 对于每个 Ruby 版本,该存储库都有一堆**标签**。获取所有标签的列表。
7. 找出在标签 `v1_8_6_187` 和标签 `v1_8_6_188` 之间更改了多少文件。
8. 查找 2015 年的提交(任何一个提交)并将其检出,简单地查看一下文件,然后返回 master 分支。
9. 找出标签 `v1_8_6_187` 对应的提交。
10. 列出目录 `.git/refs/tags`。运行 `cat .git/refs/tags/v1_8_6_187` 来查看其中一个文件的内容。
11. 找出当前 `HEAD` 对应的提交 ID。
12. 找出已经对 `test/` 目录进行了多少次提交。
13. 提交 `65a5162550f58047974793cdc8067a970b2435c0``9e3d9a2a009d2a0281802a84e1c5cc1c887edc71` 之间的 `lib/telnet.rb` 的差异。该文件更改了几行?
14. 在 Ruby 2.5.1 和 2.5.2 之间进行了多少次提交(标记为 `v2_5_1``v2_5_3`)(这一步有点棘手,步骤不只一步)
15. “matz”Ruby 的创建者)作了多少提交?
16. 最近包含 “tkutil” 一词的提交是什么?
17. 检出提交 `e51dca2596db9567bd4d698b18b4d300575d3881` 并创建一个指向该提交的新分支。
18. 运行 `git reflog` 以查看你到目前为止完成的所有存储库导航操作。
  
--------------------------------------------------------------------------------
via: https://jvns.ca/blog/2019/08/30/git-exercises--navigate-a-repository/
作者:[Julia Evans][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://jvns.ca/
[b]: https://github.com/lujun9972
[1]: https://jvns.ca/blog/2019/08/27/curl-exercises/
[2]: https://wizardzines.com/zines/oh-shit-git/

View File

@ -1,8 +1,8 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11374-1.html)
[#]: subject: (How to put an HTML page on the internet)
[#]: via: (https://jvns.ca/blog/2019/09/06/how-to-put-an-html-page-on-the-internet/)
[#]: author: (Julia Evans https://jvns.ca/)
@ -10,19 +10,21 @@
如何在互联网放置 HTML 页面
======
![](https://img.linux.net.cn/data/attachment/album/201909/22/234957mmzoie1imufsuwea.jpg)
我喜欢互联网的一点是在互联网放置静态页面是如此简单。今天有人问我该怎么做,所以我想我会快速地写下来!
### 只是一个 HTML 页面
我的所有网站都只是静态 HTML 和 CSS。我的网页设计技巧相对不高<https://wizardzines.com>是我自己开发的最复杂的网站),因此保持我所有的网站相对简单意味着我可以做一些改变/修复,而不会花费大量时间。
我的所有网站都只是静态 HTML 和 CSS。我的网页设计技巧相对不高<https://wizardzines.com> 是我自己开发的最复杂的网站),因此保持我所有的网站相对简单意味着我可以做一些改变/修复,而不会花费大量时间。
因此,我们将在此文章中采用尽可能简单的方式 - 只需一个 HTML 页面。
因此,我们将在此文章中采用尽可能简单的方式 —— 只需一个 HTML 页面。
### HTML 页面
我们要放在互联网上的网站只是一个名为 `index.html` 的文件。你可以在 <https://github.com/jvns/website-example> 找到它,它是一个 Github 仓库,其中只包含一个文件。
HTML 文件中包含一些 CSS使其看起来不那么无聊部分复制自< https://example.com>
HTML 文件中包含一些 CSS使其看起来不那么无聊部分复制自 <https://example.com>
### 如何将 HTML 页面放在互联网上
@ -32,22 +34,19 @@ HTML 文件中包含一些 CSS使其看起来不那么无聊部分复制
2. 将 index.html 复制到你自己 neocities 站点的 index.html 中
3. 完成
上面的 index.html 页面位于 [julia-example-website.neocities.com][2] 中,如果你查看源代码,你将看到它与 github 仓库中的 HTML 相同。
上面的 `index.html` 页面位于 [julia-example-website.neocities.com][2] 中,如果你查看源代码,你将看到它与 github 仓库中的 HTML 相同。
我认为这可能是将 HTML 页面放在互联网上的最简单的方法(这是一次回归 Geocities它是我在 2003 年制作我的第一个网站的方式):)。我也喜欢 Neocities (像 [glitch][3],我也喜欢)它能实验、学习,并有乐趣。
### 其他选择
这绝不是唯一简单的方式 - 在你推送 Git 仓库时Github pages 和 Gitlab pages 以及 Netlify 都将会自动发布站点,并且它们都非常易于使用(只需将它们连接到你的 github 仓库即可)。我个人使用 Git 仓库的方式,因为 Git 没有东西让我感到紧张 - 我想知道我实际推送的页面发生了什么更改。但我想你如果第一次只想将 HTML/CSS 制作的站点放到互联网上,那么 Neocities 就是一个非常好的方法。
这绝不是唯一简单的方式,在你推送 Git 仓库时Github pages 和 Gitlab pages 以及 Netlify 都将会自动发布站点,并且它们都非常易于使用(只需将它们连接到你的 GitHub 仓库即可)。我个人使用 Git 仓库的方式,因为 Git 不会让我感到紧张,我想知道我实际推送的页面发生了什么更改。但我想你如果第一次只想将 HTML/CSS 制作的站点放到互联网上,那么 Neocities 就是一个非常好的方法。
如果你不只是玩,而是要将网站用于真实用途,那么你或许会需要买一个域名,以便你将来可以更改托管服务提供商,但这有点不那么简单。
### 这是学习 HTML 的一个很好的起点
如果你熟悉在 Git 中编辑文件,同时想练习 HTML/CSS 的话,我认为将它放在网站中是一个有趣的方式!我真的很喜欢它的简单性 - 实际上这只有一个文件,所以没有其他花哨的东西需要去理解。
如果你熟悉在 Git 中编辑文件,同时想练习 HTML/CSS 的话,我认为将它放在网站中是一个有趣的方式!我真的很喜欢它的简单性 —— 实际上这只有一个文件,所以没有其他花哨的东西需要去理解。
还有很多方法可以复杂化/扩展它,比如这个博客实际上是用 [Hugo][4] 生成的,它生成了一堆 HTML 文件并放在网络中,但从基础开始总是不错的。
@ -58,7 +57,7 @@ via: https://jvns.ca/blog/2019/09/06/how-to-put-an-html-page-on-the-internet/
作者:[Julia Evans][a]
选题:[lujun9972][b]
译者:[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,8 +1,8 @@
[#]: collector: (lujun9972)
[#]: translator: (amwps290 )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: translator: (amwps290)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11371-1.html)
[#]: subject: (How to set up a TFTP server on Fedora)
[#]: via: (https://fedoramagazine.org/how-to-set-up-a-tftp-server-on-fedora/)
[#]: author: (Curt Warfield https://fedoramagazine.org/author/rcurtiswarfield/)
@ -12,9 +12,9 @@
![][1]
**TFTP** 即简单文本传输协议,允许用户通过 [UDP][2] 协议在系统之间传输文件。默认情况下,协议使用的是 UDP 的 69 号端口。TFTP 协议广泛用于无盘设备的远程启动。因此,在你的本地网络建立一个 TFTP 服务器,这样你就可以进行 [Fedora 的安装][3]和其他无盘设备的一些操作,这将非常有趣。
TFTP 即<ruby>简单文本传输协议<rt>Trivial File Transfer Protocol</rt></ruby>,允许用户通过 [UDP][2] 协议在系统之间传输文件。默认情况下,协议使用的是 UDP 的 69 号端口。TFTP 协议广泛用于无盘设备的远程启动。因此,在你的本地网络建立一个 TFTP 服务器,这样你就可以对 [安装好的 Fedora][3] 和其他无盘设备做一些操作,这将非常有趣。
TFTP 仅仅能够从远端系统读取数据或者向远端系统写入数据。但它并没有列出远端服务器上文件的能力,同时也没有修改远端服务器的能力(译者注:感觉和前一句话矛盾)。用户身份验证也没有规定。 由于安全隐患和缺乏高级功能TFTP 通常仅用于局域网LAN
TFTP 仅仅能够从远端系统读取数据或者向远端系统写入数据,而没有列出远端服务器上文件的能力。它也没提供用户身份验证。由于安全隐患和缺乏高级功能TFTP 通常仅用于局域网内部LAN
### 安装 TFTP 服务器
@ -23,23 +23,24 @@ TFTP 仅仅能够从远端系统读取数据或者向远端系统写入数据。
```
dnf install tftp-server tftp -y
```
上述的这条命令会为 [systemd][4] 在 _/usr/lib/systemd/system_ 目录下创建 _tftp.service__tftp.socket_ 文件。
上述的这条命令会在 `/usr/lib/systemd/system` 目录下为 [systemd][4] 创建 `tftp.service``tftp.socket` 文件。
```
/usr/lib/systemd/system/tftp.service
/usr/lib/systemd/system/tftp.socket
```
接下来,将这两个文件复制到 _/etc/systemd/system_ 目录下,并重新命名。
接下来,将这两个文件复制到 `/etc/systemd/system` 目录下,并重新命名。
```
cp /usr/lib/systemd/system/tftp.service /etc/systemd/system/tftp-server.service
cp /usr/lib/systemd/system/tftp.socket /etc/systemd/system/tftp-server.socket
```
### 修改文件
当你把这些文件复制和重命名后,你就可以去添加一些额外的参数,下面是 _tftp-server.service_ 刚开始的样子:
当你把这些文件复制和重命名后,你就可以去添加一些额外的参数,下面是 `tftp-server.service` 刚开始的样子:
```
[Unit]
@ -55,13 +56,13 @@ StandardInput=socket
Also=tftp.socket
```
_[Unit]_ 部分添加如下内容:
`[Unit]` 部分添加如下内容:
```
Requires=tftp-server.socket
```
修改 _[ExecStart]_ 行:
修改 `[ExecStart]` 行:
```
ExecStart=/usr/sbin/in.tftpd -c -p -s /var/lib/tftpboot
@ -69,13 +70,14 @@ ExecStart=/usr/sbin/in.tftpd -c -p -s /var/lib/tftpboot
下面是这些选项的意思:
* _**-c**_ 选项允许创建新的文件
* _**-p**_ 选项用于指明在正常系统提供的权限检查之上没有其他额外的权限检查
* _**-s**_ 建议使用该选项以确保安全性以及与某些引导 ROM 的兼容性,这些引导 ROM 在其请求中不容易包含目录名。
* `-c` 选项允许创建新的文件
* `-p` 选项用于指明在正常系统提供的权限检查之上没有其他额外的权限检查
* `-s` 建议使用该选项以确保安全性以及与某些引导 ROM 的兼容性,这些引导 ROM 在其请求中不容易包含目录名。
默认的上传和下载位置位于 _/var/lib/tftpboot_
默认的上传和下载位置位于 `/var/lib/tftpboot`
下一步,修改 `[Install]` 部分的内容
下一步,修改 _[Install}_ 部分的内容
```
[Install]
WantedBy=multi-user.target
@ -84,7 +86,8 @@ Also=tftp-server.socket
不要忘记保存你的修改。
下面是 _/etc/systemd/system/tftp-server.service_ 文件的完整内容:
下面是 `/etc/systemd/system/tftp-server.service` 文件的完整内容:
```
[Unit]
Description=Tftp Server
@ -109,11 +112,13 @@ systemctl daemon-reload
```
启动服务器:
```
systemctl enable --now tftp-server
```
要更改 TFTP 服务器允许上传和下载的权限,请使用此命令。注意 TFTP 是一种固有的不安全协议,因此不建议你在于其他人共享的网络上这样做。
要更改 TFTP 服务器允许上传和下载的权限,请使用此命令。注意 TFTP 是一种固有的不安全协议,因此不建议你在与其他人共享的网络上这样做。
```
chmod 777 /var/lib/tftpboot
```
@ -127,14 +132,13 @@ firewall-cmd --reload
### 客户端配置
安装 TFTP 客户端
```
yum install tftp -y
```
运行 _tftp_ 命令连接服务器。下面是一个启用详细信息选项的例子:
运行 `tftp` 命令连接服务器。下面是一个启用详细信息选项的例子:
```
[client@thinclient:~ ]$ tftp 192.168.1.164
@ -147,11 +151,8 @@ tftp> quit
[client@thinclient:~ ]$
```
记住,因为 TFTP 没有列出服务器上文件的能力,因此,在你使用 _get_ 命令之前需要知道文件的具体名称。
记住,因为 TFTP 没有列出服务器上文件的能力,因此,在你使用 `get` 命令之前需要知道文件的具体名称。
* * *
_Photo by _[_Laika Notebooks_][5]_ on [Unsplash][6]_.
--------------------------------------------------------------------------------
@ -160,7 +161,7 @@ via: https://fedoramagazine.org/how-to-set-up-a-tftp-server-on-fedora/
作者:[Curt Warfield][a]
选题:[lujun9972][b]
译者:[amwps290](https://github.com/amwps290)
校对:[校对者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,215 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11378-1.html)
[#]: subject: (Getting started with Zsh)
[#]: via: (https://opensource.com/article/19/9/getting-started-zsh)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
Zsh 入门
======
> 从 Bash 进阶到 Z-shell改进你的 shell 体验。
![](https://img.linux.net.cn/data/attachment/album/201909/23/163910imr1z1qw1ruo9uqs.jpg)
Z-shellZsh是一种 Bourne 式的交互式 POSIX shell以其丰富的创新功能而著称。Z-Shell 用户经常会提及它的许多便利之处,赞誉它对效率的提高和丰富的自定义支持。
如果你刚接触 Linux 或 Unix但你的经验足以让你可以打开终端并运行一些命令的话那么你可能使用的就是 Bash shell。Bash 可能是最具有代表意义的自由软件 shell部分是因为它具有的先进的功能部分是因为它是大多数流行的 Linux 和 Unix 操作系统上的默认 shell。但是随着使用的次数越多你可能会开始发现一些细节可能能够做的更好。开源有一个众所周知的地方那就是选择。所以许多人选择从 Bash “毕业”到 Z。
### Zsh 介绍
Shell 只是操作系统的接口。交互式 shell 程序允许你通过称为*标准输入*stdin的某个东西键入命令并通过*标准输出*stdout和*标准错误*stderr获取输出。有很多种 shell如 Bash、Csh、Ksh、Tcsh、Dash 和 Zsh。每个都有其开发者所认为最适合于 Shell 的功能。而这些功能的好坏,则取决于最终用户。
Zsh 具有交互式制表符补全、自动文件搜索、支持正则表达式、用于定义命令范围的高级速记符,以及丰富的主题引擎等功能。这些功能也包含在你所熟悉的其它 Bourne 式 shell 环境中,这意味着,如果你已经了解并喜欢 Bash那么你也会熟悉 Zsh除此以外它还有更多的功能。你可能会认为它是一种 Bash++。
### 安装 Zsh
用你的包管理器安装 Zsh。
在 Fedora、RHEL 和 CentOS 上:
```
$ sudo dnf install zsh
```
在 Ubuntu 和 Debian 上:
```
$ sudo apt install zsh
```
在 MacOS 上你可以使用 MacPorts 安装它:
```
$ sudo port install zsh
```
或使用 Homebrew
```
$ brew install zsh
```
在 Windows 上也可以运行 Zsh但是只能在 Linux 层或类似 Linux 的层之上运行,例如 [Windows 的 Linux 子系统][2]WSL或 [Cygwin][3]。这类安装超出了本文的范围,因此请参考微软的文档。
### 设置 Zsh
Zsh 不是终端模拟器。它是在终端仿真器中运行的 shell。因此要启动 Zsh必须首先启动一个终端窗口例如 GNOME Terminal、Konsole、Terminal、iTerm2、rxvt 或你喜欢的其它终端。然后,你可以通过键入以下命令启动 Zsh
```
$ zsh
```
首次启动 Zsh 时,会要求你选择一些配置选项。这些都可以在以后更改,因此请按 `1` 继续。
```
This is the Z Shell configuration function for new users, zsh-newuser-install.
(q)  Quit and do nothing.
(0)  Exit, creating the file ~/.zshrc
(1)  Continue to the main menu.
```
偏好设置分为四类,因此请从顶部开始。
1. 第一个类使你可以选择在 shell 历史记录文件中保留多少个命令。默认情况下,它设置为 1,000 行。
2. Zsh 补全是其最令人兴奋的功能之一。为了简单起见,请考虑使用其默认选项激活它,直到你习惯了它的工作方式。按 `1` 使用默认选项,按 `2` 手动设置选项。
3. 选择 Emacs 式键绑定或 Vi 式键绑定。Bash 使用 Emacs 式绑定,因此你可能已经习惯了。
4. 最后你可以了解以及设置或取消设置Zsh 的一些精妙的功能。例如,当你提供不带命令的非可执行路径时,可以通过让 Zsh 来改变目录而无需你使用 `cd` 命令。要激活这些额外选项之一,请输入选项号并输入 `s` 进行设置。请尝试打开所有选项以获得完整的 Zsh 体验。你可以稍后通过编辑 `~/.zshrc` 取消设置它们。
要完成配置,请按 `0`
### 使用 Zsh
刚开始Zsh 的使用感受就像使用 Bash 一样这无疑是其众多功能之一。例如Bash 和 Tcsh 之间就存在严重的差异,因此如果你必须在工作中或在服务器上使用 Bash而 Zsh 就可以在家里轻松尝试和使用,这样在 Bash 和 Zsh 之间轻松切换就是一种便利。
#### 在 Zsh 中改变目录
正是这些微小的差异使 Zsh 变得好用。首先,尝试在没有 `cd` 命令的情况下,将目录更改为 `Documents` 文件夹。简直太棒了难以置信。如果你输入的是目录路径而没有进一步的指令Zsh 会更改为该目录:
```
% Documents
% pwd
/home/seth/Documents
```
而这会在 Bash 或任何其他普通 shell 中导致错误。但是 Zsh 却根本不是普通的 shell而这仅仅才是开始。
#### 在 Zsh 中搜索
当你想使用普通 shell 程序查找文件时,可以使用 `find``locate` 命令。最起码,你可以使用 `ls -R` 来递归地列出一组目录。Zsh 内置有允许它在当前目录或任何其他子目录中查找文件的功能。
例如,假设你有两个名为 `foo.txt` 的文件。一个位于你的当前目录中,另一个位于名为 `foo` 的子目录中。在 Bash Shell 中,你可以使用以下命令列出当前目录中的文件:
```
$ ls
foo.txt
```
你可以通过明确指明子目录的路径来列出另一个目录:
```
$ ls foo
foo.txt
```
要同时列出这两者,你必须使用 `-R` 开关,并结合使用 `grep`
```
$ ls -R | grep foo.txt
foo.txt
foo.txt
```
但是在 Zsh 中,你可以使用 `**` 速记符号:
```
% ls **/foo.txt
foo.txt
foo.txt
```
你可以在任何命令中使用此语法,而不仅限于 `ls`。想象一下在这样的场景中提高的效率:将特定文件类型从一组目录中移动到单个位置、将文本片段串联到一个文件中,或对日志进行抽取。
### 使用 Zsh 的制表符补全
制表符补全是 Bash 和其他一些 Shell 中的高级用户功能,它变得司空见惯,席卷了 Unix 世界。Unix 用户不再需要在输入冗长而乏味的路径时使用通配符(例如输入 `/h*/s*h/V*/SCS/sc*/comp*/t*/a*/*9/04/LS*boat*v`,比输入 `/home/seth/Videos/SCS/scenes/composite/takes/approved/109/04/LS_boat-port-cargo-mover.mkv` 要容易得多)。相反,他们只要输入足够的唯一字符串即可按 `Tab` 键。例如,如果你知道在系统的根目录下只有一个以 `h` 开头的目录,则可以键入 `/h`,然后单击 `Tab`。快速、简单、高效。它还会确认路径存在;如果 `Tab` 无法完成任何操作,则说明你在错误的位置或输入了错误的路径部分。
但是,如果你有许多目录有五个或更多相同的首字母,`Tab` 会坚决拒绝进行补全。尽管在大多数现代终端中,它将(至少会)显示阻止其进行猜测你的意思的文件,但通常需要按两次 `Tab` 键才能显示它们。因此,制表符补全通常会变成来回按下键盘上字母和制表符,以至于你好像在接受钢琴独奏会的训练。
Zsh 通过循环可能的补全来解决这个小问题。如果键入 `*ls ~/D` 并按 `Tab`,则 Zsh 首先使用 `Documents` 来完成命令;如果再次按 `Tab`,它将提供 `Downloads`,依此类推,直到找到所需的选项。
### Zsh 中的通配符
在 Zsh 中,通配符的行为不同于 Bash 中用户所习惯的行为。首先,可以对其进行修改。例如,如果要列出当前目录中的所有文件夹,则可以使用修改后的通配符:
```
% ls
dir0   dir1   dir2   file0   file1
% ls *(/)
dir0   dir1   dir2
```
在此示例中,`(/)` 限定了通配符的结果,因此 Zsh 仅显示目录。要仅列出文件,请使用 `(.)`。要列出符号链接,请使用 `(@)`。要列出可执行文件,请使用 `(*)`
```
% ls ~/bin/*(*)
fop  exify  tt
```
Zsh 不仅仅知道文件类型。它也可以使用相同的通配符修饰符约定根据修改时间列出。例如,如果要查找在过去八个小时内修改的文件,请使用 `mh` 修饰符(即 “modified hours” 的缩写)和小时的负整数:
```
% ls ~/Documents/*(mh-8)
cal.org   game.org   home.org
```
要查找超过(例如)两天前修改过的文件,修饰符更改为 `md`(即 “modified day” 的缩写),并带上天数的正整数:
```
% ls ~/Documents/*(+2)
holiday.org
```
通配符修饰符和限定符还可以做很多事情,因此,请阅读 [Zsh 手册页][4],以获取全部详细信息。
#### 通配符的副作用
要像在 Bash 中使用通配符一样使用它,有时必须在 Zsh 中对通配符进行转义。例如,如果要在 Bash 中将某些文件复制到服务器上,则可以使用如下通配符:
```
$ scp IMG_*.JPG seth@example.com:~/www/ph*/*19/09/14
```
这在 Bash 中有效,但是在 Zsh 中会返回错误,因为它在发出 `scp` 命令之前尝试在远程端扩展该变量(通配符)。为避免这种情况,必须转义远程变量(通配符):
```
% scp IMG_*.JPG seth@example.com:~/www/ph\*/\*19/09/14
```
当你切换到新的 shell 时,这些小异常可能会使你感到沮丧。使用 Zsh 时会遇到的问题不多(体验过 Zsh 后切换回 Bash 的可能遇到更多),但是当它们发生时,请保持镇定且坦率。严格遵守 POSIX 的情况很少会出错,但是如果失败了,请查找问题以解决并继续。对于许多在工作中困在一个 shell 上而在家中困在另一个 shell 上的用户来说,[hyperpolyglot.org][5] 已被证明其是无价的。
在我的下一篇 Zsh 文章中,我将向你展示如何安装主题和插件以定制你的 Z-Shell 甚至 Z-ier。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/9/getting-started-zsh
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U (bash logo on green background)
[2]: https://devblogs.microsoft.com/commandline/category/bash-on-ubuntu-on-windows/
[3]: https://www.cygwin.com/
[4]: https://linux.die.net/man/1/zsh
[5]: http://hyperpolyglot.org/unix-shells

View File

@ -0,0 +1,55 @@
[#]: collector: (lujun9972)
[#]: translator: (Morisun029)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11375-1.html)
[#]: subject: (Microsoft brings IBM iron to Azure for on-premises migrations)
[#]: via: (https://www.networkworld.com/article/3438904/microsoft-brings-ibm-iron-to-azure-for-on-premises-migrations.html)
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
Skytap 和微软将 IBM 机器搬到了 Azure
======
> 微软再次证明了其摒弃了“非我发明”这一态度来支持客户。
![](https://images.idgesg.net/images/article/2019/05/cso_microsoft_azure_backups_cloud_computing_binary_data_transfer_by_just_super_gettyimages-1003878434_3x2_2400x1600-100796537-large.jpg)
当微软将 Azure 作为其 Windows 服务器操作系统的云计算版本发布时,它并没有使其成为仅支持 Windows 系统的版本,它还支持 Linux 系统,并且在短短几年内[其 Linux 实例的数量现在已经超过了Windows 实例的数量][1]。
很高兴看到微软终于摆脱了这种长期以来非常有害的“非我发明”态度,该公司的最新举动确实令人惊讶。
微软与一家名为 Skytap 的公司合作,以在 Azure 云服务上提供 IBM Power9 实例,可以在 Azure 云内运行基于 Power 的系统,该系统将与其已有的 Xeon 和 Epyc 实例一同作为 Azure 的虚拟机VM
Skytap 是一家有趣的公司。它由华盛顿大学的三位教授创立,专门研究本地遗留硬件的云迁移,如 IBM System I 或 Sparc 的云迁移。该公司在西雅图拥有一个数据中心,以 IBM 的硬件运行 IBM 的 PowerVM 管理程序,并且对在美国和英格兰的 IBM 数据中心提供主机托管。
该公司的座右铭是快速迁移然后按照自己的节奏进行现代化。因此它专注于帮助一些企业将遗留系统迁移到云然后实现应用程序的现代化这也是它与微软合作的目的。Azure 将通过为企业提供平台来提高传统应用程序的价值,而无需花费巨额费用重写一个新平台。
Skytap 提供了预览,可以看到使用 Skytap 上的 DB2 提升和扩展原有的 IBM i 应用程序以及通过 Azure 的物联网中心进行扩展时可能发生的情况。该应用程序无缝衔接新旧架构,并证明了不需要完全重写可靠的 IBM i 应用程序即可从现代云功能中受益。
### 迁移到 Azure
根据协议,微软将把 IBM 的 Power S922 服务器部署在一个未声明的 Azure 区域。这些机器可以运行 PowerVM 管理程序,这些管理程序支持老式 IBM 操作系统以及 Linux 系统。
Skytap 首席执行官<ruby>布拉德·希克<rt>Brad Schick</rt></ruby>在一份声明中说道“通过先替换旧技术来迁移上云既耗时又冒险。……Skytap 的愿景一直是通过一些小小的改变和较低的风险实现企业系统到云平台的迁移。与微软合作,我们将为各种遗留应用程序迁移到 Azure 提供本地支持,包括那些在 IBM i、AIX 和 Power Linux 上运行的程序。这将使企业能够通过使用 Azure 服务进行现代化来延长传统系统的寿命并增加其价值。”
随着基于 Power 应用程序的现代化Skytap 随后将引入 DevOps CI/CD 工具链来加快软件的交付。迁移到 Azure 的 Skytap 上后,客户将能够集成 Azure DevOps以及 Power 的 CI/CD 工具链,例如 Eradani 和 UrbanCode。
这些听起来像是迈出了第一步,但这意味着以后将会实现更多,尤其是在应用程序迁移方面。如果它仅在一个 Azure 区域中,听起来好像它们正在对该项目进行测试和验证,并可能在今年晚些时候或明年进行扩展。
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3438904/microsoft-brings-ibm-iron-to-azure-for-on-premises-migrations.html
作者:[Andy Patrizio][a]
选题:[lujun9972][b]
译者:[Morisun029](https://github.com/Morisun029)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Andy-Patrizio/
[b]: https://github.com/lujun9972
[1]: https://www.openwall.com/lists/oss-security/2019/06/27/7
[2]: https://www.networkworld.com/article/3119362/hybrid-cloud/how-to-make-hybrid-cloud-work.html#tk.nww-fsb
[3]: https://www.facebook.com/NetworkWorld/
[4]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,64 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11370-1.html)
[#]: subject: (Oracle Autonomous Linux: A Self Updating, Self Patching Linux Distribution for Cloud Computing)
[#]: via: (https://itsfoss.com/oracle-autonomous-linux/)
[#]: author: (John Paul https://itsfoss.com/author/john/)
Oracle Autonomous Linux用于云计算的自我更新、自我修补的 Linux 发行版
======
自动化是 IT 行业的增长趋势其目的是消除重复任务中的手动干扰。Oracle 通过推出 Oracle Autonomous Linux 向自动化世界迈出了又一步,这无疑将使 IoT 和云计算行业受益。
### Oracle Autonomous Linux减少人工干扰增多自动化
![][1]
周一Oracle 联合创始人<ruby>拉里·埃里森<rt>Larry Ellison</rt></ruby>参加了在旧金山举行的Oracle OpenWorld 全球大会。[他宣布了][2]一个新产品:世界上第一个自治 Linux。这是 Oracle 向第二代云迈进的第二步。第一步是两年前发布的 [Autonomous Database][3]。
Oracle Autonomous Linux 的最大特性是降低了维护成本。根据 [Oracle 网站][4] 所述Autonomous Linux “使用先进的机器学习和自治功能来提供前所未有的成本节省、安全性和可用性,并释放关键的 IT 资源来应对更多的战略计划”。
Autonomous Linux 可以无需人工干预就安装更新和补丁。这些自动更新包括 “Linux 内核和关键用户空间库”的补丁。“不需要停机而且可以免受外部攻击和内部恶意用户的攻击。”它们也可以在系统运行时进行以减少停机时间。Autonomous Linux 还会自动处理伸缩,以确保满足所有计算需求。
埃里森强调了新的自治系统将如何提高安全性。他特别提到了 [Capitol One 数据泄露][5]是由于配置错误而发生的。他说:“一个防止数据被盗的简单规则:将数据放入自治系统。没有人为错误,没有数据丢失。 那是我们与 AWS 之间的最大区别。”
有趣的是Oracle 还瞄准了这一新产品以与 IBM 竞争。埃里森说:“如果你付钱给 IBM可以停了。”所有 Red Hat 应用程序都应该能够在 Autonomous Linux 上运行而无需修改。有趣的是Oracle Linux 是从 Red Hat Enterprise Linux 的源代码中[构建][6]的。
看起来Oracle Autonomous Linux 不会用于企业市场以外。
### 关于 Oracle Autonomous Linux 的思考
Oracle 是云服务市场的重要参与者。这种新的 Linux 产品将使其能够与 IBM 竞争。让人感兴趣的是 IBM 的反应会是如何,特别是当他们有来自 Red Hat 的新一批开源智能软件。
如果你看一下市场数字,那么对于 IBM 或 Oracle 来说情况都不好。大多数云业务由 [Amazon Web Services、Microsoft Azure 和 Google Cloud Platform][7] 所占据。IBM 和 Oracle 落后于他们。[IBM 收购 Red Hat][8] 试图获得发展。这项新的自主云计划是 Oracle 争取统治地位(或至少试图获得更大的市场份额)的举动。让人感兴趣的是,到底有多少公司因为购买了 Oracle 的系统而在互联网的狂野西部变得更加安全?
我必须简单提一下:当我第一次阅读该公告时,我的第一反应就是“好吧,我们离天网更近了一步。”如果我们技术性地考虑一下,我们就像是要进入了机器人末日。如果你打算帮我,我计划去购买一些罐头食品。
你对 Oracle 的新产品感兴趣吗?你会帮助他们赢得云战争吗?在下面的评论中让我们知道。
如果你觉得这篇文章有趣请花一点时间在社交媒体、Hacker News 或 [Reddit][9] 上分享。
--------------------------------------------------------------------------------
via: https://itsfoss.com/oracle-autonomous-linux/
作者:[John Paul][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/john/
[b]: https://github.com/lujun9972
[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/09/oracle-autonomous-linux.png?resize=800%2C450&ssl=1
[2]: https://www.zdnet.com/article/oracle-announces-oracle-autonomous-linux/
[3]: https://www.oracle.com/in/database/what-is-autonomous-database.html
[4]: https://www.oracle.com/corporate/pressrelease/oow19-oracle-autonomous-linux-091619.html
[5]: https://www.zdnet.com/article/100-million-americans-and-6-million-canadians-caught-up-in-capital-one-breach/
[6]: https://distrowatch.com/table.php?distribution=oracle
[7]: https://www.zdnet.com/article/top-cloud-providers-2019-aws-microsoft-azure-google-cloud-ibm-makes-hybrid-move-salesforce-dominates-saas/
[8]: https://itsfoss.com/ibm-red-hat-acquisition/
[9]: https://reddit.com/r/linuxusersgroup

View File

@ -1,62 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Here Comes Oracle Autonomous Linux Worlds First Autonomous Operating System)
[#]: via: (https://opensourceforu.com/2019/09/here-comes-oracle-autonomous-linux-worlds-first-autonomous-operating-system/)
[#]: author: (Longjam Dineshwori https://opensourceforu.com/author/dineshwori-longjam/)
Here Comes Oracle Autonomous Linux Worlds First Autonomous Operating System
======
* _**Oracle Autonomous Linux**_ _**delivers automated patching, updates and tuning without human intervention.**_
* _**It can help IT companies improve reliability and protect their systems from cyberthreats**_
* _**Oracle also introduces Oracle OS Management Service that delivers control and visibility over systems**_
![Oracle cloud][1]
Oracle today marked a major milestone in the companys autonomous strategy with the introduction of Oracle Autonomous Linux the worlds first autonomous operating system.
Oracle Autonomous Linux, along with the new Oracle OS Management Service, is the first and only autonomous operating environment that eliminates complexity and human error to deliver unprecedented cost savings, security and availability for customers, the company claims in a just released statement.
Keeping systems patched and secure is one of the biggest ongoing challenges faced by IT today. With Oracle Autonomous Linux, the company says, customers can rely on autonomous capabilities to help ensure their systems are secure and highly available to help prevent cyberattacks.
“Oracle Autonomous Linux builds on Oracles proven history of delivering Linux with extreme performance, reliability and security to run the most demanding enterprise applications,” said Wim Coekaerts, senior vice president of operating systems and virtualization engineering, Oracle.
“Today we are taking the next step in our autonomous strategy with Oracle Autonomous Linux, providing a rich set of capabilities to help our customers significantly improve reliability and protect their systems from cyberthreats,” he added.
**Oracle OS Management Service**
Along with Oracle Autonomous Linux, Oracle introduced Oracle OS Management Service, a highly available Oracle Cloud Infrastructure component that delivers control and visibility over systems whether they run Autonomous Linux, Linux or Windows.
Combined with resource governance policies, OS Management Service, via the Oracle Cloud Infrastructure console or APIs, also enables users to automate capabilities that will execute common management tasks for Linux systems, including patch and package management, security and compliance reporting, and configuration management.
It can be further automated with other Oracle Cloud Infrastructure services like auto-scaling as workloads need to grow or shrink to meet elastic demand.
**Always Free Autonomous Database and Cloud Infrastructure**
Oracle Autonomous Linux, in conjunction with Oracle OS Management Service, uses advanced machine learning and autonomous capabilities to deliver unprecedented cost savings, security and availability and frees up critical IT resources to tackle more strategic initiatives.
They are included with Oracle Premier Support at no extra charge with Oracle Cloud Infrastructure compute services. Combined with Oracle Cloud Infrastructures other cost advantages, most Linux workload customers can expect to have 30-50 percent TCO savings versus both on-premise and other cloud vendors over five years.
“Adding autonomous capabilities to the operating system layer, with future plans to expand beyond infrastructure software, goes straight after the OpEx challenges nearly all customers face today,” said Al Gillen, Group VP, Software Development and Open Source, IDC.
“This capability effectively turns Oracle Linux into a service, freeing customers to focus their IT resources on application and user experience, where they can deliver true competitive differentiation,” he added.
--------------------------------------------------------------------------------
via: https://opensourceforu.com/2019/09/here-comes-oracle-autonomous-linux-worlds-first-autonomous-operating-system/
作者:[Longjam Dineshwori][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensourceforu.com/author/dineshwori-longjam/
[b]: https://github.com/lujun9972
[1]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2016/09/Oracle-cloud.jpg?resize=350%2C197&ssl=1

View File

@ -0,0 +1,58 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Samsung introduces SSDs it claims will 'never die')
[#]: via: (https://www.networkworld.com/article/3440026/samsung-introduces-ssds-it-claims-will-never-die.html)
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
Samsung introduces SSDs it claims will 'never die'
======
New fail-in-place technology in Samsung's SSDs will allow the chips to gracefully recover from chip failure.
Samsung
[Solid-state drives][1] (SSDs) operate by writing to cells within the chip, and after so many writes, the cell eventually dies off and can no longer be written to. For that reason, SSDs have more actual capacity than listed. A 1TB drive, for example, has about 1.2TB of capacity, and as chips die off from repeated writes, new ones are brought online to keep the 1TB capacity.
But that's for gradual wear. Sometimes SSDs just up and die completely, and without warning after a whole chip fails, not just a few cells. So Samsung is trying to address that with a new generation of SSD memory chips with a technology it calls fail-in-place (FIP).
**Also read: [Inside Hyperconvergence: Combining compute, storage and networking][2]**
FIP technology allows a drive to cope with a failure by working around the dead chip and allowing the SSD to keep operating and just not using the bad chip. You will have less storage, but in all likelihood that drive will be replaced anyway, so this helps prevent data loss.
FIP also scans the data for any damage before copying it to the remaining NAND, which would be the first time I've ever seen a SSD with built-in data recovery.
### Built-in virtualization and machine learning technology
The new Samsung SSDs come with two other software innovations. The first is built-in virtualization technology, which allows a single SSD to be divided up into up to 64 smaller drives for a virtual environment.
The second is V-NAND machine learning technology, which helps to "accurately predict and verify cell characteristics, as well as detect any variation among circuit patterns through big data analytics," as Samsung put it. Doing so means much higher levels of performance from the drive.
As you can imagine, this technology is aimed at enterprises and large-scale data centers, not consumers. All told, Samsung is launching 19 models of these new SSDs called under the names PM1733 and PM1735.
**[ [Get certified as an Apple Technical Coordinator with this seven-part online course from PluralSight.][3] ]**
The PM1733 line features six models in a 2.5-inch U.2 form factor, offering storage capacity of between 960GB and 15.63TB, as well as four HHHL card-type drives with capacity ranging from 1.92TB to 30.72TB of storage. Each drive is guaranteed for one drive writes per day (DWPD) for five years. In other words, the warranty is good for writing the equivalent of the drive's total capacity once per day every day for five years.
The PM1735 drives have lower capacity, maxing out at 12.8TB, but they are far more durable, guaranteeing three DWPD for five years. Both drives support PCI Express 4, which has double the throughput of the widely used PCI Express 3. The PM1735 offers nearly 14 times the sequential performance of a SATA-based SSD, with 8GB/s for read operations and 3.8GB/s for writes.
Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3440026/samsung-introduces-ssds-it-claims-will-never-die.html
作者:[Andy Patrizio][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Andy-Patrizio/
[b]: https://github.com/lujun9972
[1]: https://www.networkworld.com/article/3326058/what-is-an-ssd.html
[2]: https://www.idginsiderpro.com/article/3409019/inside-hyperconvergence-combining-compute-storage-and-networking.html
[3]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fapple-certified-technical-trainer-10-11
[4]: https://www.facebook.com/NetworkWorld/
[5]: https://www.linkedin.com/company/network-world

View File

@ -1,95 +0,0 @@
How technology changes the rules for doing agile
======
![](https://enterprisersproject.com/sites/default/files/styles/620x350/public/images/CIO%20Containers%20Ecosystem.png?itok=lDTaYXzk)
More companies are trying agile and [DevOps][1] for a clear reason: Businesses want more speed and more experiments - which lead to innovations and competitive advantage. DevOps helps you gain that speed. But doing DevOps in a small group or startup and doing it at scale are two very different things. Any of us who've worked in a cross-functional group of 10 people, come up with a great solution to a problem, and then tried to apply the same patterns across a team of 100 people know the truth: It often doesn't work. This path has been so hard, in fact, that it has been easy for IT leaders to put off agile methodology for another year.
But that time is over. If you've tried and stalled, it's time to jump back in.
Until now, DevOps required customized answers for many organizations - lots of tweaks and elbow grease. But today, [Linux containers ][2]and Kubernetes are fueling standardization of DevOps tools and processes. That standardization will only accelerate. The technology we are using to practice the DevOps way of working has finally caught up with our desire to move faster.
Linux containers and [Kubernetes][3] are changing the way teams interact. Moreover, on the Kubernetes platform, you can run any application you now run on Linux. What does that mean? You can run a tremendous number of enterprise apps (and handle even previously vexing coordination issues between Windows and Linux.) Finally, containers and Kubernetes will handle almost all of what you'll run tomorrow. They're being future-proofed to handle machine learning, AI, and analytics workloads - the next wave of problem-solving tools.
**[ See our related article,[4 container adoption patterns: What you need to know. ] ][4]**
Think about machine learning, for example. Today, people still find the patterns in much of an enterprise's data. When machines find the patterns (think machine learning), your people will be able to act on them faster. With the addition of AI, machines can not only find but also act on patterns. Today, with people doing everything, three weeks is an aggressive software development sprint cycle. With AI, machines can change code multiple times per second. Startups will use that capability - to disrupt you.
Consider how fast you have to be to compete. If you can't make a leap of faith now to DevOps and a one week cycle, think of what will happen when that startup points its AI-fueled process at you. It's time to move to the DevOps way of working now, or get left behind as your competitors do.
### How are containers changing how teams work?
DevOps has frustrated many groups trying to scale this way of working to a bigger group. Many IT (and business) people are suspicious of agile: They've heard it all before - languages, frameworks, and now models (like DevOps), all promising to revolutionize application development and IT process.
**[ Want DevOps advice from other CIOs? See our comprehensive resource, [DevOps: The IT Leader's Guide][5]. ]**
It's not easy to "sell" quick development sprints to your stakeholders, either. Imagine if you bought a house this way. You're not going to pay a fixed amount to your builder anymore. Instead, you get something like: "We'll pour the foundation in 4 weeks and it will cost x. Then we'll frame. Then we'll do electrical. But we only know the timing on the foundation right now." People are used to buying homes with a price up front and a schedule.
The challenge is that building software is not like building a house. The same builder builds thousands of houses that are all the same. Software projects are never the same. This is your first hurdle to get past.
Dev and operations teams really do work differently: I know because I've worked on both sides. We incent them differently. Developers are rewarded for changing and creating, while operations pros are rewarded for reducing cost and ensuring security. We put them in different groups and generally minimize interaction. And the roles typically attract technical people who think quite differently. This situation sets IT up to fail. You have to be willing to break down these barriers.
Think of what has traditionally happened. You throw pieces over the wall, then the business throws requirements over the wall because they are operating in "house-buying" mode: "We'll see you in 9 months." Developers build to those requirements and make changes as needed for technical constraints. Then they throw it over the wall to operations to "figure out how to run this." Operations then works diligently to make a slew of changes to align the software with their infrastructure. And what's the end result?
More often than not, the end result isn't even recognizable to the business when they see it in its final glory. We've watched this pattern play out time and time again in our industry for the better part of two decades. It's time for a change.
It's Linux containers that truly crack the problem - because containers close the gap between development and operations. They allow both teams to understand and design to all of the critical requirements, but still uniquely fulfill their team's responsibilities. Basically, we take out the telephone game between developers and operations. With containers, we can have smaller operations teams, even teams responsible for millions of applications, but development teams that can change software as quickly as needed. (In larger organizations, the desired pace may be faster than humans can respond on the operations side.)
With containers, you're separating what is delivered from where it runs. Your operations teams are responsible for the host that will run the containers and the security footprint, and that's all. What does this mean?
First, it means you can get going on DevOps now, with the team you have. That's right. Keep teams focused on the expertise they already have: With containers, just teach them the bare minimum of the required integration dependencies.
If you try and retrain everyone, no one will be that good at anything. Containers let teams interact, but alongside a strong boundary, built around each team's strengths. Your devs know what needs to be consumed, but don't need to know how to make it run at scale. Ops teams know the core infrastructure, but don't need to know the minutiae of the app. Also, Ops teams can update apps to address new security implications, before you become the next trending data breach story.
Teaching a large IT organization of say 30,000 people both ops and devs skills? It would take you a decade. You don't have that kind of time.
When people talk about "building new, cloud-native apps will get us out of this problem," think critically. You can build cloud-native apps in 10-person teams, but that doesn't scale for a Fortune 1000 company. You can't just build new microservices one by one until you're somehow not reliant on your existing team: You'll end up with a siloed organization. It's an alluring idea, but you can't count on these apps to redefine your business. I haven't met a company that could fund parallel development at this scale and succeed. IT budgets are already constrained; doubling or tripling them for an extended period of time just isn't realistic.
### When the remarkable happens: Hello, velocity
Linux containers were made to scale. Once you start to do so, [orchestration tools like Kubernetes come into play][6] - because you'll need to run thousands of containers. Applications won't consist of just a single container, they will depend on many different pieces, all running on containers, all running as a unit. If they don't, your apps won't run well in production.
Think of how many small gears and levers come together to run your business: The same is true for any application. Developers are responsible for all the pulleys and levers in the application. (You could have an integration nightmare if developers don't own those pieces.) At the same time, your operations team is responsible for all the pulleys and levers that make up your infrastructure, whether on-premises or in the cloud. With Kubernetes as an abstraction, your operations team can give the application the fuel it needs to run - without being experts on all those pieces.
Developers get to experiment. The operations team keeps infrastructure secure and reliable. This combination opens up the business to take small risks that lead to innovation. Instead of having to make only a couple of bet-the-farm size bets, real experimentation happens inside the company, incrementally and quickly.
In my experience, this is where the remarkable happens inside organizations: Because people say "How do we change planning to actually take advantage of this ability to experiment?" It forces agile planning.
For example, KeyBank, which uses a DevOps model, containers, and Kubernetes, now deploys code every day. (Watch this [video][7] in which John Rzeszotarski, director of Continuous Delivery and Feedback at KeyBank, explains the change.) Similarly, Macquarie Bank uses DevOps and containers to put something in production every day.
Once you push software every day, it changes every aspect of how you plan - and [accelerates the rate of change to the business][8]. "An idea can get to a customer in a day," says Luis Uguina, CDO of Macquarie's banking and financial services group. (See this [case study][9] on Red Hat's work with Macquarie Bank).
### The right time to build something great
The Macquarie example demonstrates the power of velocity. How would that change your approach to your business? Remember, Macquarie is not a startup. This is the type of disruptive power that CIOs face, not only from new market entrants but also from established peers.
The developer freedom also changes the talent equation for CIOs running agile shops. Suddenly, individuals within huge companies (even those not in the hottest industries or geographies) can have great impact. Macquarie uses this dynamic as a recruiting tool, promising developers that all new hires will push something live within the first week.
At the same time, in this day of cloud-based compute and storage power, we have more infrastructure available than ever. That's fortunate, considering the [leaps that machine learning and AI tools will soon enable][10].
This all adds up to this being the right time to build something great. Given the pace of innovation in the market, you need to keep building great things to keep customers loyal. So if you've been waiting to place your bet on DevOps, now is the right time. Containers and Kubernetes have changed the rules - in your favor.
**Want more wisdom like this, IT leaders? [Sign up for our weekly email newsletter][11].**
--------------------------------------------------------------------------------
via: https://enterprisersproject.com/article/2018/1/how-technology-changes-rules-doing-agile
作者:[Matt Hicks][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://enterprisersproject.com/user/matt-hicks
[1]:https://enterprisersproject.com/tags/devops
[2]:https://www.redhat.com/en/topics/containers?intcmp=701f2000000tjyaAAA
[3]:https://www.redhat.com/en/topics/containers/what-is-kubernetes?intcmp=701f2000000tjyaAAA
[4]:https://enterprisersproject.com/article/2017/8/4-container-adoption-patterns-what-you-need-know?sc_cid=70160000000h0aXAAQ
[5]:https://enterprisersproject.com/devops?sc_cid=70160000000h0aXAAQ
[6]:https://enterprisersproject.com/article/2017/11/how-enterprise-it-uses-kubernetes-tame-container-complexity
[7]:https://www.redhat.com/en/about/videos/john-rzeszotarski-keybank-red-hat-summit-2017?intcmp=701f2000000tjyaAAA
[8]:https://enterprisersproject.com/article/2017/11/dear-cios-stop-beating-yourselves-being-behind-transformation
[9]:https://www.redhat.com/en/resources/macquarie-bank-case-study?intcmp=701f2000000tjyaAAA
[10]:https://enterprisersproject.com/article/2018/1/4-ai-trends-watch
[11]:https://enterprisersproject.com/email-newsletter?intcmp=701f2000000tsjPAAQ

View File

@ -1,57 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (Morisun029)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Microsoft brings IBM iron to Azure for on-premises migrations)
[#]: via: (https://www.networkworld.com/article/3438904/microsoft-brings-ibm-iron-to-azure-for-on-premises-migrations.html)
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
Microsoft brings IBM iron to Azure for on-premises migrations
======
Once again Microsoft shows it has shed its not-invented here attitude to support customers.
Microsoft / Just_Super / Getty Images
When Microsoft launched Azure as a cloud-based version of its Windows Server operating system, it didn't make it exclusively Windows. It also included Linux support, and in just a few years, the [number of Linux instances now outnumbers Windows instances][1].
It's nice to see Microsoft finally shed that not-invented-here attitude that was so toxic for so long, but the company's latest move is really surprising.
Microsoft has partnered with a company called Skytap to offer IBM Power9 instances on its Azure cloud service to run Power-based systems inside of the Azure cloud, which will be offered as Azure virtual machines (VM) along with the Xeon and Epyc server instances that it already offers.
**Also read: [How to make hybrid cloud work][2]**
Skytap is an interesting company. Founded by three University of Washington professors, it specializes in cloud migrations of older on-premises hardware, such as IBM System I or Sparc. It has a data center in its home town of Seattle, with IBM hardware running IBM's PowerVM hypervisor, plus some co-locations in IBM data centers in the U.S. and England.
Its motto is to migrate fast, then modernize at your own pace. So, its focus is on helping legacy systems migrate to the cloud and then modernize the apps, which is what the alliance with Microsoft appears to be aimed at. Azure will provide enterprises with a platform to enhance the value of traditional applications without the major expense of rewriting for a new platform.
Skytap is providing a preview of whats possible when lifting and extending a legacy IBM i application using DB2 on Skytap and augmenting it with Azure IoT Hub. The application seamlessly spans old and new architectures, demonstrating there is no need to completely rewrite rock-solid IBM i applications to benefit from modern cloud capabilities.
### Migrating to Azure cloud
Under the deal, Microsoft will deploy Power S922 servers from IBM and deploy them in an undeclared Azure region. These machines can run the PowerVM hypervisor, which supports legacy IBM operating systems, as well as Linux.
"Migrating to the cloud by first replacing older technologies is time consuming and risky," said Brad Schick, CEO of Skytap, in a statement. "Skytaps goal has always been to provide businesses with a path to get these systems into the cloud with little change and less risk. Working with Microsoft, we will bring Skytaps native support for a wide range of legacy applications to Microsoft Azure, including those dependent on IBM i, AIX, and Linux on Power. This will give businesses the ability to extend the life of traditional systems and increase their value by modernizing with Azure services."
As Power-based applications are modernized, Skytap will then bring in DevOps CI/CD toolchains to accelerate software delivery. After moving to Skytap on Azure, customers will be able to integrate Azure DevOps, in addition to CI/CD toolchains for Power, such as Eradani and UrbanCode.
These sound like first steps, which means there will be more to come, especially in terms of the app migration. If it's only in one Azure region, it sounds like they are testing and finding their legs with this project and will likely expand later this year or next.
Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3438904/microsoft-brings-ibm-iron-to-azure-for-on-premises-migrations.html
作者:[Andy Patrizio][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Andy-Patrizio/
[b]: https://github.com/lujun9972
[1]: https://www.openwall.com/lists/oss-security/2019/06/27/7
[2]: https://www.networkworld.com/article/3119362/hybrid-cloud/how-to-make-hybrid-cloud-work.html#tk.nww-fsb
[3]: https://www.facebook.com/NetworkWorld/
[4]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,79 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How spicy should a jalapeno be?)
[#]: via: (https://opensource.com/article/19/9/how-spicy-should-jalapeno-be)
[#]: author: (Peter Webb https://opensource.com/users/peterwebbhttps://opensource.com/users/mgifford)
How spicy should a jalapeno be?
======
Open source agriculture engages students in becoming problem solvers for
the future.
![Jalapenos][1]
Everyone has opinions and preferences, especially when it comes to food. To establish a criterion when answering "How spicy should a jalapeño be?." the Scoville Heat Scale was developed as a standard to measure spiciness. This scale allows people to communicate and share information about how spicy we like our peppers.
Similarly, open source technology standards, such as USB, I2C, MQTT, and others, were developed to enable global compatibility. Furthermore, open source hardware platforms have enabled communities to “speak the same language” without reinventing the wheel. For example, Raspberry Pi makes it easy for people to use their hardware as a baseline and then add onto it. This has created a revolution in many industries by enabling individuals, startups, and large corporations to apply hardware and software to complex problems without having to design them from the ground up.
### MARSfarm: Using food to engage students in STEM
[MARSfarm][2] is a program that aims to increase students engagement with science, technology, engineering, and math (STEM) by relating agriculture to real-life problems, such as growing more food with fewer resources.
MARSfarms goal is to provide [engaging material to inspire individuals and students][3] to collaborate on solving big problems, like how we can sustainably survive on another planet, while simultaneously improving the food system here on our own planet. We do this by tying together the world of food and technology and enabling users to choose things like how spicy they want the jalapeño they are growing to be. More importantly, we want to alter other compounds besides spiciness (known as capsaicin by chemists), like Vitamin K, which is a concern for those who lack access to fresh fruits and vegetables, such as an astronaut living on Mars. With standardized open source hardware and software as a base, a user can focus on whatever unique objectives they have for their own “garden” while retaining the benefits of a larger community.
### The importance of open source and standards
When trying to define standards with food, there is no “right” answer. Food is very personal and influenced by socioeconomic factors as well as (perhaps most importantly) geographical region.
We designed MARSfarm using open source principles to allow teachers to customize and add to the hardware and software in their classrooms. To make it more familiar and approachable, we tried to leverage existing standardized software and hardware platforms. By sticking with common software languages like Python and HTML and hardware like the Raspberry Pi, we reduce the potential barriers to entry for users who could be intimidated by a project of this magnitude. Other hardware we use, like PVC, Mylar, and full-spectrum LEDs, are globally accessible from brick-and-mortar storefronts and online retailers that adhere to industry standards to ensure consistency throughout the community.
By keeping our hardware and software standard, we can also create a marketplace where users can exchange “recipes” for growing food. Similar to how [Thingverse][4] has enabled anyone with a 3D printer to make just about anything—without having to be an engineer—simply by exchanging CAD files, we want to enable our users to find climate recipes from around the world and grow them—without having to be a botanist. The way to achieve this is by having a large number of people growing the same plant but with different climate factors. The more data that is aggregated, the better well understand how different climate factors affect things like taste and the time it takes a plant to grow.
We also enlisted the support of open source agricultural projects like the [Open Agriculture Initiative][5] at the MIT Media Lab, where weve found many other individuals passionate about applying technology to optimize food. Another consistent source of innovation in agriculture has been NASA, which has achieved [record harvests and been a point of collaboration][6] between universities and countries for decades.
### Building a _food computer_
Open source communities thrive when theyre applied to something both significant and personal. There is perhaps nothing more personal than the food we consume, the literal fuel that powers us.
Until very recently, even within the last decade, many plants could not be grown in certain regions due to lack of available light, which is the most fundamental input a plant requires for its most basic process, photosynthesis. With the advent of technologies like LEDs, organizations (other than NASA) can afford to grow just about anything, anywhere, within the bounds of what the market demands and will pay for.
As we continue living far away from where our food is produced, we continue to understand it less and less. When we forget our personal connection to food, we risk damaging not only our health but our communities and the planet where our species lives. To mitigate this risk, MARSfarm leads projects like the [$300 Food Computer][7], which makes indoor growing systems more affordable and accessible. These types of projects also put more of this technology in more classrooms. The more that individuals and students work with these projects, the more data well have, and the better we will understand the best ways to grow our food.
In fact, the improvement in lighting technology has been so dramatic that consumer products like [Aerogarden][8] have empowered thousands of individuals to grow edible plants at home, not only on their windowsills but on their countertops where there is no access to natural light.
Because of these leaps in technology, were developing a world where there are “libraries” of plants that can be “forked” onto devices to be grown by anyone. If youd like to get started, please to visit our [GitHub][9] where we host software for all of our ongoing projects.
### Help spread the word
We need your help to expose as many students as possible to the wonders of applying open source technology to agriculture. Please share this with at least one teacher you know and any students who have a passion for STEM. MARSfarm is actively working with open source contributors, recruiting employees, and conducting beta tests in schools.
* * *
_For more information about what the farmers of tomorrow are doing with open tools and principles today, watch the video [Farming for the Future][3]._
Co-authored by John Whitehead . For many people spring means a return to the bounty of fresh, local...
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/9/how-spicy-should-jalapeno-be
作者:[Peter Webb][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/peterwebbhttps://opensource.com/users/mgifford
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/jalepeno.jpg?itok=R_LWPTlm (Jalapenos)
[2]: https://marsfarm.io/
[3]: https://www.redhat.com/en/open-source-stories/farming-for-the-future
[4]: https://www.thingiverse.com/
[5]: https://forum.openag.media.mit.edu/
[6]: https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20150015991.pdf
[7]: https://marsfarm.io/home/community/mvp-food-computer/
[8]: https://www.aerogarden.com/
[9]: https://github.com/futureag

View File

@ -1,83 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Blockchain 2.0 What Is Ethereum [Part 9])
[#]: via: (https://www.ostechnix.com/blockchain-2-0-what-is-ethereum/)
[#]: author: (editor https://www.ostechnix.com/author/editor/)
Blockchain 2.0 What Is Ethereum [Part 9]
======
![Ethereum][1]
In the previous guide of this series, we discussed about [**Hyperledger Project (HLP)**][2], a fastest growing product developed by **Linux Foundation**. In this guide, we are going to discuss about what is **Ethereum** and its features in detail. Many researchers opine that the future of the internet will be based on principles of decentralized computing. Decentralized computing was in fact among one of the broader objectives of having the internet in the first place. However, the internet took another turn owing to differences in computing capabilities available. While modern server capabilities make the case for server-side processing and execution, lack of decent mobile networks in large parts of the world make the case for the same on the client side. Modern smartphones now have **SoCs** (system on a chip or system on chip) capable of handling many such operations on the client side itself, however, limitations owing to retrieving and storing data securely still pushes developers to have server-side computing and data management. Hence, a bottleneck in regards to data transfer capabilities is currently observed.
All of that might soon change because of advancements in distributed data storage and program execution platforms. [**The blockchain**][3], for the first time in the history of the internet, basically allows for secure data management and program execution on a distributed network of users as opposed to central servers.
**Ethereum** is one such blockchain platform that gives developers access to frameworks and tools used to build and run applications on such a decentralized network. Though more popularly known in general for its cryptocurrency, Ethereum is more than just **ethers** (the cryptocurrency). Its a full **Turing complete programming language** that is designed to develop and deploy **DApps** or **Distributed APPlications** [1]. Well look at DApps in more detail in one of the upcoming posts.
Ethereum is an open-source, supports by default a public (non-permissioned) blockchain, and features an extensive smart contract platform **(Solidity)** underneath. Ethereum provides a virtual computing environment called the **Ethereum virtual machine** to run applications and [**smart contracts**][4] as well[2]. The Ethereum virtual machine runs on thousands of participating nodes all over the world, meaning the application data while being secure, is almost impossible to be tampered with or lost.
### Getting behind Ethereum: What sets it apart
In 2017, a 30 plus group of the whos who of the tech and financial world got together to leverage the Ethereum blockchains capabilities. Thus, the **Ethereum Enterprise Alliance (EEA)** was formed by a long list of supporting members including _Microsoft_ , _JP Morgan_ , _Cisco Systems_ , _Deloitte_ , and _Accenture_. JP Morgan already has **Quorum** , a decentralized computing platform for financial services based on Ethereum currently in operation, while Microsoft has Ethereum based cloud services it markets through its Azure cloud business[3].
### What is ether and how is it related to Ethereum
Ethereum creator **Vitalik Buterin** understood the true value of a decentralized processing platform and the underlying blockchain tech that powered bitcoin. He failed to gain majority agreement for his idea of proposing that Bitcoin should be developed to support running distributed applications (DApps) and programs (now referred to as smart contracts).
Hence in 2013, he proposed the idea of Ethereum in a white paper he published. The original white paper is still maintained and available for readers **[here][5]**. The idea was to develop a blockchain based platform to run smart contracts and applications designed to run on nodes and user devices instead of servers.
The Ethereum system is often mistaken to just mean the cryptocurrency ether, however, it has to be reiterated that Ethereum is a full stack platform for developing applications and executing them as well and has been so since inception whereas bitcoin isnt. **Ether is currently the second biggest cryptocurrency** by market capitalization and trades at an average of $170 per ether at the time of writing this article[4].
### Features and technicalities of the platform[5]
* As weve already mentioned, the cryptocurrency called ether is simply one of the things the platform features. The purpose of the system is more than taking care of financial transactions. In fact, the key difference between the Ethereum platform and Bitcoin is in their scripting capabilities. Ethereum is developed in a Turing complete programming language which means it has scripting and application capabilities similar to other major programming languages. Developers require this feature to create DApps and complex smart contracts on the platform, a feature that bitcoin misses on.
* The “mining” process of ether is more stringent and complex. While specialized ASICs may be used to mine bitcoin, the basic hashing algorithm used by Ethereum **(EThash)** reduces the advantage that ASICs have in this regard.
* The transaction fees itself to be paid as an incentive to miners and node operators for running the network is calculated using a computational token called **Gas**. Gas improves the systems resilience and resistance to external hacks and attacks by requiring the initiator of the transaction to pay ethers proportionate to the number of computational resources that are required to carry out that transaction. This is in contrast to other platforms such as Bitcoin where the transaction fee is measured in tandem with the transaction size. As such, the average transaction costs in Ethereum is radically less than Bitcoin. This also implies that running applications running on the Ethereum virtual machine will require a fee depending straight up on the computational problems that the application is meant to solve. Basically, the more complex an execution, the more the fee.
* The block time for Ethereum is estimated to be around _**10-15 seconds**_. The block time is the average time that is required to timestamp and create a block on the blockchain network. Compared to the 10+ minutes the same transaction will take on the bitcoin network, it becomes apparent that _**Ethereum is much faster**_ with respect to transactions and verification of blocks.
* _It is also interesting to note that there is no hard cap on the amount of ether that can be mined or the rate at which ether can be mined leading to less radical system design than bitcoin._
### Conclusion
While Ethereum is comparable and far outpaces similar platforms, the platform itself lacked a definite path for development until the Ethereum enterprise alliance started pushing it. While the definite push for enterprise developments are made by the Ethereum platform, it has to be noted that Ethereum also caters to small-time developers and individuals as well. As such developing the platform for end users and enterprises leave a lot of specific functionality out of the loop for Ethereum. Also, the blockchain model proposed and developed by the Ethereum foundation is a public model whereas the one proposed by projects such as the Hyperledger project is private and permissioned.
While only time can tell which platform among the ones put forward by Ethereum, Hyperledger, and R3 Corda among others will find the most fans in real-world use cases, such systems do prove the validity behind the claim of a blockchain powered future.
**References:**
* [1] [**Gabriel Nicholas, “Ethereum Is Codings New Wild West | WIRED,” Wired , 2017**][6].
* [2] [**What is Ethereum? — Ethereum Homestead 0.1 documentation**][7].
* [3] [**Ethereum, a Virtual Currency, Enables Transactions That Rival Bitcoins The New York Times**][8].
* [4] [**Cryptocurrency Market Capitalizations | CoinMarketCap**][9].
* [5] [**Introduction — Ethereum Homestead 0.1 documentation**][10].
--------------------------------------------------------------------------------
via: https://www.ostechnix.com/blockchain-2-0-what-is-ethereum/
作者:[editor][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.ostechnix.com/author/editor/
[b]: https://github.com/lujun9972
[1]: https://www.ostechnix.com/wp-content/uploads/2019/04/Ethereum-720x340.png
[2]: https://www.ostechnix.com/blockchain-2-0-an-introduction-to-hyperledger-project-hlp/
[3]: https://www.ostechnix.com/blockchain-2-0-an-introduction/
[4]: https://www.ostechnix.com/blockchain-2-0-explaining-smart-contracts-and-its-types/
[5]: https://github.com/ethereum/wiki/wiki/White-Paper
[6]: https://www.wired.com/story/ethereum-is-codings-new-wild-west/
[7]: http://www.ethdocs.org/en/latest/introduction/what-is-ethereum.html#ethereum-virtual-machine
[8]: https://www.nytimes.com/2016/03/28/business/dealbook/ethereum-a-virtual-currency-enables-transactions-that-rival-bitcoins.html
[9]: https://coinmarketcap.com/
[10]: http://www.ethdocs.org/en/latest/introduction/index.html

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (laingke)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
@ -62,7 +62,7 @@ via: https://opensource.com/article/19/8/cloud-native-java-and-more
作者:[Tim Hildred][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[laingke](https://github.com/laingke)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,84 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (git exercises: navigate a repository)
[#]: via: (https://jvns.ca/blog/2019/08/30/git-exercises--navigate-a-repository/)
[#]: author: (Julia Evans https://jvns.ca/)
git exercises: navigate a repository
======
I think the [curl exercises][1] the other day went well, so today I woke up and wanted to try writing some Git exercises. Git is a big thing to learn, probably too big to learn in a few hours, so my first idea for how to break it down was by starting by **navigating** a repository.
I was originally going to use a toy test repository, but then I thought why not a real repository? Thats way more fun! So were going to navigate the repository for the Ruby programming language. You dont need to know any C to do this exercise, its just about getting comfortable with looking at how files in a repository change over time.
### clone the repository
To get started, clone the repository:
```
git clone https://github.com/ruby/ruby
```
The big different thing about this repository (as compared to most of the repositories youll work with in real life) is that it doesnt have branches, but it DOES have lots of tags, which are similar to branches in that theyre both just pointers to a commit. So well do exercises with tags instead of branches. The way you _change_ tags and branches are very different, but the way you _look at_ tags and branches is exactly the same.
### a git SHA always refers to the same code
The most important thing to keep in mind while doing these exercises is that a git SHA like `9e3d9a2a009d2a0281802a84e1c5cc1c887edc71` always refers to the same code, as explained in this page. This page is from a zine I wrote with Katie Sylor-Miller called [Oh shit, git!][2]. (She also has a great site called <https://ohshitgit.com/> that inspired the zine).
<https://wizardzines.com/zines/oh-shit-git/samples/ohshit-commit.png>
Well be using git SHAs really heavily in the exercises to get you used to working with them and to help understand how they correspond to tags and branches.
### git subcommands well be using
All of these exercises only use 5 git subcommands:
```
git checkout
git log (--oneline, --author, and -S will be useful)
git diff (--stat will be useful)
git show
git status
```
### exercises
1. Check out matzs commit of Ruby from 1998. The commit ID is `3db12e8b236ac8f88db8eb4690d10e4a3b8dbcd4`. Find out how many lines of code Ruby was at that time.
2. Check out the current master branch
3. Look at the history for the file `hash.c`. What was the last commit ID that changed that file?
4. Get a diff of how `hash.c` has changed in the last 20ish years: compare that file on the master branch to the file at commit `3db12e8b236ac8f88db8eb4690d10e4a3b8dbcd4`.
5. Find a recent commit that changed `hash.c` and look at the diff for that commit
6. This repository has a bunch of **tags** for every Ruby release. Get a list of all the tags.
7. Find out how many files changed between tag `v1_8_6_187` and tag `v1_8_6_188`
8. Find a commit (any commit) from 2015 and check it out, look at the files very briefly, then go back to the master branch.
9. Find out what commit the tag `v1_8_6_187` corresponds to.
10. List the directory `.git/refs/tags`. Run `cat .git/refs/tags/v1_8_6_187` to see the contents of one of those files.
11. Find out what commit ID `HEAD` corresponds to right now.
12. Find out how many commits have been made to the `test/` directory
13. Get a diff of `lib/telnet.rb` between the commits `65a5162550f58047974793cdc8067a970b2435c0` and `9e3d9a2a009d2a0281802a84e1c5cc1c887edc71`. How many lines of that file were changed?
14. How many commits were made between Ruby 2.5.1 and 2.5.2 (tags `v2_5_1` and `v2_5_3`) (this one is a tiny bit tricky, theres more than one step)
15. How many commits were authored by `matz` (Rubys creator)?
16. Whats the most recent commit that included the word `tkutil`?
17. Check out the commit `e51dca2596db9567bd4d698b18b4d300575d3881` and create a new branch that points at that commit.
18. Run `git reflog` to see all the navigating of the repository youve done so far
--------------------------------------------------------------------------------
via: https://jvns.ca/blog/2019/08/30/git-exercises--navigate-a-repository/
作者:[Julia Evans][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://jvns.ca/
[b]: https://github.com/lujun9972
[1]: https://jvns.ca/blog/2019/08/27/curl-exercises/
[2]: https://wizardzines.com/zines/oh-shit-git/

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (heguangzhi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
@ -232,7 +232,7 @@ via: https://www.linuxtechi.com/configure-static-ip-address-rhel8/
作者:[Pradeep Kumar][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[heguangzhi](https://github.com/heguangzhi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,103 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to freeze and lock your Linux system (and why you would want to))
[#]: via: (https://www.networkworld.com/article/3438818/how-to-freeze-and-lock-your-linux-system-and-why-you-would-want-to.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
How to freeze and lock your Linux system (and why you would want to)
======
What it means to freeze a terminal window and lock a screen -- and how to manage these activities on your Linux system.
Sandra Henry-Stocker
How you freeze and "thaw out" a screen on a Linux system depends a lot on what you mean by these terms. Sometimes “freezing a screen” might mean freezing a terminal window so that activity within that window comes to a halt. Sometimes it means locking your screen so that no one can walk up to your system when you're fetching another cup of coffee and type commands on your behalf.
In this post, we'll examine how you can use and control these actions.
**[ Two-Minute Linux Tips: [Learn how to master a host of Linux commands in these 2-minute video tutorials][1] ]**
### How to freeze a terminal window on Linux
You can freeze a terminal window on a Linux system by typing **Ctrl+S** (hold control key and press "s"). Think of the "s" as meaning "start the freeze". If you continue typing commands after doing this, you won't see the commands you type or the output you would expect to see. In fact, the commands will pile up in a queue and will be run only when you reverse the freeze by typing **Ctrl+Q**. Think of this as "quit the freeze".
One easy way to view how this works is to use the date command and then type **Ctrl+S**. Then type the date command again and wait a few minutes before typing **Ctrl+Q**. You'll see something like this:
```
$ date
Mon 16 Sep 2019 06:47:34 PM EDT
$ date
Mon 16 Sep 2019 06:49:49 PM EDT
```
The gap between the two times shown will indicate that the second date command wasn't run until you unfroze your window.
Terminal windows can be frozen and unfrozen whether you're sitting at the computer screen or running remotely using a tool such as PuTTY.
And here's a little trick that can come in handy. If you see that a terminal window appears to be inactive, one possibility is that you or someone else inadvertently typed **Ctrl+S**. In any case, entering **Ctrl+Q** just in case this resolves the problem is not a bad idea.
### How to lock your screen
To lock your screen before you leave your desk, either **Ctrl+Alt+L** or **Super+L** (i.e., holding down the Windows key and pressing L) should work. Once your screen is locked, you will have to enter your password to log back in.
### Automatic screen locking on Linux systems
While best practice suggests that you lock your screen whenever you are about to leave your desk, Linux systems usually automatically lock after a period of no activity. The timing for "blanking" a screen (making it go dark) and actually locking the screen (requiring a login to use it again) depend on settings that you can set to your personal preferences.
To change how long it takes for your screen to go dark when using GNOME screensaver, open your settings window and select **Power** and then **Blank screen**. You can choose times between 1 and 15 minutes or never. To select how long after the blanking the screen locks, go to settings, select **Privacy** and then **Blank screen.** Settings should include 1, 2, 3, 5 and 30 minutes or one hour.
### How to lock your screen from the command line
If you are using Gnome screensaver, you can also lock the screen from the command line using this command:
```
gnome-screensaver-command -l
```
That's a lowercase L for "lock".
### How to check your lockscreen state
You can also use the gnome screensaver command to check whether your screen is locked,. With the **\--query** option, the command tells you whether screen is currently locked (i.e., active). With the --time option, it tells you how long the lock has been in effect. Here's an sample sctipt:
```
#!/bin/bash
gnome-screensaver-command --query
gnome-screensaver-command --time
```
Running the script will show output like this:
```
$ ./check_lockscreen
The screensaver is active
The screensaver has been active for 1013 seconds.
```
#### Wrap-up
Freezing your terminal window is easy if you remember the proper control sequences. For screen locking, how well it works depends on the controls you put in place for yourself or whether you're comfortable working with the defaults.
**[ Also see: [Invaluable tips and tricks for troubleshooting Linux][2] ]**
Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3438818/how-to-freeze-and-lock-your-linux-system-and-why-you-would-want-to.html
作者:[Sandra Henry-Stocker][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
[b]: https://github.com/lujun9972
[1]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua
[2]: https://www.networkworld.com/article/3242170/linux/invaluable-tips-and-tricks-for-troubleshooting-linux.html
[3]: https://www.facebook.com/NetworkWorld/
[4]: https://www.linkedin.com/company/network-world

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,232 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Getting started with Zsh)
[#]: via: (https://opensource.com/article/19/9/getting-started-zsh)
[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/sethhttps://opensource.com/users/sethhttps://opensource.com/users/sethhttps://opensource.com/users/falm)
Getting started with Zsh
======
Improve your shell game by upgrading from Bash to Z-shell.
![bash logo on green background][1]
Z-shell (or Zsh) is an interactive Bourne-like POSIX shell known for its abundance of innovative features. Z-Shell users often cite its many conveniences and credit it for increased efficiency and extensive customization.
If you're relatively new to Linux or Unix but experienced enough to have opened a terminal and run a few commands, you have probably used the Bash shell. Bash is arguably the definitive free software shell, partly because of its progressive features and partly because it ships as the default shell on most of the popular Linux and Unix operating systems. However, the more you use a shell, the more you start to find small things that might be better for the way you want to use it. If there's one thing open source is famous for, it's _choice_. Many people choose to "graduate" from Bash to Z.
### What is Zsh?
A shell is just an interface to your operating system. An interactive shell allows you to type in commands through what is called _standard input_, or **stdin**, and get output through _standard output_ and _standard error_, or **stdout** and **stderr**. There are many shells, including Bash, Csh, Ksh, Tcsh, Dash, and Zsh. Each has features based on what its programmers thought would be best for a shell. Whether those features are good or bad is up to you, the end user.
Zsh has features like interactive Tab completion, automated file searching, regex integration, advanced shorthand for defining command scope, and a rich theme engine. These features are included in an otherwise familiar Bourne-like shell environment, meaning that if you already know and love Bash, you'll find Zsh familiar—except with more features. You might think of it as a kind of Bash++.
### Installing Zsh
Install Zsh with your package manager.
On Fedora, RHEL, and CentOS:
```
`$ sudo dnf install zsh`
```
On Ubuntu and Debian:
```
`$ sudo apt install zsh`
```
On MacOS, you can install it using MacPorts:
```
`$ sudo port install zsh`
```
Or with Homebrew:
```
`$ brew install zsh`
```
It's possible to run Zsh on Windows, but only on top of a Linux or Linux-like layer such as [Windows Subsystem for Linux][2] (WSL) or [Cygwin][3]. That installation is out of scope for this article, so refer to Microsoft documentation.
### Setting up Zsh
Zsh is not a terminal emulator; it's a shell that runs inside a terminal emulator. So, to launch Zsh, you must first launch a terminal window such as GNOME Terminal, Konsole, Terminal, iTerm2, rxvt, or another terminal of your preference. Then you can launch Zsh by typing:
```
`$ zsh`
```
The first time you launch Zsh, you're asked to choose some configuration options. These can all be changed later, so press **1** to continue.
```
This is the Z Shell configuration function for new users, zsh-newuser-install.
(q)  Quit and do nothing.
(0)  Exit, creating the file ~/.zshrc
(1)  Continue to the main menu.
```
There are four categories of preferences, so just start at the top.
1. The first category lets you choose how many commands are retained in your shell history file. By default, it's set to 1,000 lines.
2. Zsh completion is one of its most exciting features. To keep things simple, consider activating it with its default options until you get used to how it works. Press **1** for default options, **2** to set options manually.
3. Choose Emacs or Vi key bindings. Bash uses Emacs bindings, so you may be used to that already.
4. Finally, you can learn about (and set or unset) some of Zsh's subtle features. For instance, you can stop using the **cd** command by allowing Zsh to initiate a directory change when you provide a non-executable path with no command. To activate one of these extra options, type the option number and enter **s** to _set_ it. Try turning on all options to get the full Zsh experience. You can unset them later by editing **~/.zshrc**.
To complete configuration, press **0**.
### Using Zsh
At first, Zsh feels a lot like using Bash, which is unmistakably one of its many features. There are serious differences between, for instance, Bash and Tcsh, so being able to switch between Bash and Zsh is a convenience that makes Zsh easy to try and easy to use at home if you have to use Bash at work or on your server.
#### Change directory with Zsh
It's the small differences that make Zsh nice. First, try changing the directory to your Documents folder _without the **cd** command_. It seems too good to be true; but if you enter a directory path with no further instruction, Zsh changes to that directory:
```
% Documents
% pwd
/home/seth/Documents
```
That renders an error in Bash or any other normal shell. But Zsh is far from normal, and this is just the beginning.
#### Search with Zsh
When you want to find a file using a normal shell, you probably resort to the **find** or **locate** command. At the very least, you may have used **ls -R** for a recursive listing of a set of directories. Zsh has a built-in feature allowing it to find a file in the current or any other subdirectory.
For instance, assume you have two files called **foo.txt**. One is located in your current directory, and the other is in a subdirectory called **foo**. In a Bash shell, you can list the file in the current directory with:
```
$ ls
foo.txt
```
and you can list the other one by stating the subdirectory's path explicitly:
```
$ ls foo
foo.txt
```
To list both, you must use the **-R** switch, maybe combined with **grep**:
```
$ ls -R | grep foo.txt
foo.txt
foo.txt
```
But in Zsh, you can use the ****** shorthand:
```
% ls **/foo.txt
foo.txt
foo.txt
```
And you can use this syntax with any command, not just with **ls**. Imagine your increased efficiency when moving specific file types from one collection of directories to a single location, or concatenating snippets of text into a file, or grepping through logs.
### Using Zsh Tab completion
Tab completion is a power-user feature in Bash and some other shells, and it took the Unix world by storm when it became commonplace. No longer did Unix users have to resort to wildcards when typing long and tedious paths (such as **/h*/s*h/V*/SCS/sc*/comp*/t*/a*/*9/04/LS*boat*v**, which is a lot easier than typing **/home/seth/Videos/SCS/scenes/composite/takes/approved/109/04/LS_boat-port-cargo-mover.mkv**). Instead, they could just press the Tab key when they entered enough of a unique string. For example, if you know there's only one directory starting with an **h** at the root level of your system, you might type **/h** and then hit Tab. It's fast, it's simple, it's efficient. It also confirms a path exists; if Tab doesn't complete anything, you know you're looking in the wrong place or you mistyped part of the path.
However, if you have many directories that share five or more of the same first letters, Tab staunchly refuses to complete. While in most modern terminals it will (at least) reveal the files blocking it from guessing what you mean, it usually takes two Tab presses to reveal them; therefore, Tab completion often becomes such an interplay of letters and Tabs across your keyboard that you feel like you're training for a piano recital.
Zsh solves this minor annoyance by cycling through possible completions. If you type **ls ~/D** and press Tab, Zsh completes your command with **Documents** first; if you press Tab again, it offers **Downloads**, and so on until you find the one you want.
### Wildcards in Zsh
Wildcards behave differently in Zsh than what Bash users are used to. First of all, they can be modified. For example, if you want to list all folders in your current directory, you can use a modified wildcard:
```
% ls
dir0   dir1   dir2   file0   file1
% ls *(/)
dir0   dir1   dir2
```
In this example, the **(/)** qualifies the results of the wildcard so Zsh will display only directories. To list just the files, use **(.)**. To list symlinks, use **(@)**. To list executable files, use **(*)**.
```
% ls ~/bin/*(*)
fop  exify  tt
```
Zsh isn't aware of file types only. It can also list according to modification time, using the same wildcard modifier convention. For example, if you want to find a file that was modified within the past eight hours, use the **mh** modifier (for **modified** and **hours**) and the negative integer of hours:
```
% ls ~/Documents/*(mh-8)
cal.org   game.org   home.org
```
To find a file modified more than (for instance) two days ago, the modifiers change to **md** (for **modified** and **day**) with a positive integer:
```
% ls ~/Documents/*(+2)
holiday.org
```
There's a lot more you can do with wildcard modifiers and qualifiers, so read the [Zsh man page][4] for full details.
#### The wildcard side effect
To use wildcards the way you would use them in Bash, sometimes they must be escaped in Zsh. For instance, if you're copying some files to your server in Bash, you might use a wildcard like this:
```
`$ scp IMG_*.JPG seth@example.com:~/www/ph*/*19/09/14`
```
That works in Bash, but Zsh returns an error because it tries to expand the variables on the remote side before issuing the **scp** command. To avoid this, you must escape the remote variables:
```
`% scp IMG_*.JPG seth@example.com:~/www/ph\*/\*19/09/14`
```
It's these types of little exceptions that can frustrate you when you're switching to a new shell. There aren't many when using Zsh (there are probably more when switching back to Bash after experiencing Zsh) but when they happen, remain calm and be explicit. Rarely will you go wrong to adhere strictly to POSIX—but if that fails, look up the problem to solve it and move on. [Hyperpolyglot.org][5] has proven invaluable to many users stuck on one shell at work and another at home.
In my next Zsh article, I'll show you how to install themes and plugins to make your Z-Shell even Z-ier.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/9/getting-started-zsh
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/sethhttps://opensource.com/users/sethhttps://opensource.com/users/sethhttps://opensource.com/users/sethhttps://opensource.com/users/falm
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U (bash logo on green background)
[2]: https://devblogs.microsoft.com/commandline/category/bash-on-ubuntu-on-windows/
[3]: https://www.cygwin.com/
[4]: https://linux.die.net/man/1/zsh
[5]: http://hyperpolyglot.org/unix-shells

View File

@ -0,0 +1,120 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Managing network interfaces and FirewallD in Cockpit)
[#]: via: (https://fedoramagazine.org/managing-network-interfaces-and-firewalld-in-cockpit/)
[#]: author: (Shaun Assam https://fedoramagazine.org/author/sassam/)
Managing network interfaces and FirewallD in Cockpit
======
![][1]
In the [last article][2], we saw how Cockpit can manage storage devices. This article will focus on the networking functionalities within the UI. Well see how to manage the interfaces attached to the system in Cockpit. Well also look at the firewall and demonstrate how to assign a zone to an interface, and allow/deny services and ports.
To access these controls, verify the _cockpit-networkmanager_ and _cockpit-firewalld_ packages are installed.
To start, log into the Cockpit UI and select the **Networking** menu option. As is consistent with the UI design we see performance graphs at the top and a summary of the logs at the bottom of the page. Between them are the sections to manage the firewall and interface(s).
![][3]
### Firewall
Cockpits firewall configuration page works with FirewallD and allows admins to quickly configure these settings. The page has options for assigning zones to specific interfaces, as well as a list of services configured to those zones.
#### Adding a zone
Lets start by configuring a zone to an available interface. First, click the **Add Zone** button. From here you can select a pre-configured or custom zone. Selecting one of the zones will display a brief description of that zone, as well as the services, or ports, allowed, or opened, in that zone. Select the interface you want to assign the zone to. Also, theres the option to configure the rules to apply to the **Entire Subset**, or you can specify a **Range** of IP addresses. In the example below, we add the Internal zone to an available network card. The IP range can also be configured so the rule is only applied to the specified addresses.
![][4]
#### Adding and removing services/ports
To allow network access to services, or open ports, click the **Add Services** button. From here you can search (or filter) for a service, or manually enter the port(s) you would like to open. Selecting the **Custom Ports** option provides options to enter the port number or alias into the TCP and/or UDP fields. You can also provide an optional name to label the rule. In the example below, the Cockpit service/socket is added to the Internal zone. Once completed, click the **Add Services**, or **Add Ports**, button. Likewise, to remove the service click the red trashcan to the right, select the zone(s), and click **Remove service**.
For more information about using Cockpit to configure your systems firewall, visit the [Cockpit projects Github page][5].
![][6]
### Interfaces
The interfaces section displays both physical and virtual/logical NICs assigned to the system. From the main screen we see the name of the interface, the IP address, and activity stats of the NIC. Selecting an interface will display IP related information and options to manually configure them. You can also choose to have the network card inactive after a reboot by toggling the **Connect automatically** option. To enable, or disable, the network interface, click the toggle switch in the top right corner of the section.
![][7]
#### Bonding
Bonding network interfaces can help increase bandwidth availability. It can also serve as a redundancy plan in the event one of the NICs fail.
To start, click the **Add Bond** button located in the header of the Interfaces section. In the Bond Settings overlay, enter a name and select the interfaces you wish to bond in the list below. Next, select the **MAC Address** you would like to assign to the bond. Now select the **Mode**, or purpose, of the bond: Round Robin, Active Backup, Broadcast, &amp;c. (the demo below shows a complete list of modes.)
Continue the configuration by selecting the **Primary** NIC, and a **Link Monitoring** option. You can also tweak the **Monitoring Interval**, and **Link Up Delay** and **Link Down Delay** options. To finish the configuration, click the **Apply** button. Were taken back to the main screen, and the new bonded interface we just created is added to the list of interfaces.
From here we can configure the bond like any other interface. We can even delve deeper into the interfaces settings for the bond. As seen in the example below, selecting one of the interfaces in the bonds settings page provides details pertaining to the interface link. Theres also an added option for changing the bond settings. To delete the bond, click the **Delete** button.
![][8]
#### Teaming
Teaming, like bonding, is another method used for link aggregation. For a comparison between bonding and teaming, refer to [this chart][9]. You can also find more information about teaming on the [Red Hat documentation site.][10]
As with creating a bond, click the **Add Team** button. The settings are similar in the sense you can give it a name, select the interfaces, link delay, and the mode or **Runner** as its referred to here. The options are similar to the ones available for bonding. By default the **Link Watch** option is set to Ethtool, but also has options for ARP Ping, and NSNA Ping.
Click the **Apply** button to complete the setup. It will also return you to the main networking screen. For further configuration, such as IP assignment and changing the runner, click the newly made team interface. As with bonding, you can click one of the interfaces in the link aggregation. Depending on the runner, you may have additional options for the Team Port. Click the **Delete** button from the screen to remove the team.
![][11]
#### Bridging
From the article, [Build a network bridge with Fedora][12]:
> “A bridge is a network connection that combines multiple network adapters.”
One excellent example for a bridge is combining the physical NIC with a virtual interface, like the one created and used for KVM virtualization. [Leif Madsens blog][13] has an excellent article on how to achieve this in the CLI. This can also be accomplished in Cockpit with just a few clicks. The example below will accomplish the first part of Leifs blog using the web UI. Well bridge the enp9s0 interface with the virbr0 virtual interface.
Click the **Add Bridge** button to launch the settings box. Provide a name and select the interfaces you would like to bridge. To enable **Spanning Tree Protocol (STP)**, click the box to the right of the label. Click the **Apply** button to finalize the configuration.
As is consistent with teaming and bonding, selecting the bridge from the main screen will display the details of the interface. As seen in the example below, the physical device takes control and the virtual interface will adopt that devices IP address.
Select the individual interface in the bridges detail screen for more options. And once again, click the **Delete** button to remove the bridge.
![][14]
#### Adding VLANs
Cockpit allows admins to create VLANs, or virtual networks, using any of the interfaces on the system. Click the **Add VLAN** button and select an interface. Furthermore, in the **Parent** drop-down list, assign the VLAN ID, and if you like, give it a new name. By default the name will be the same as the parent followed by a dot and the ID. For example, interface _enp11s0_ with VLAN ID _9_ will result in _enp11s0.9_). Click **Apply** to save the settings and to return to the networking main screen. Click the VLAN interface for further configuration. As always, click the **Delete** button to remove the VLAN.
![][15]
As we can see, Cockpit can help admins with common network configurations when managing the systems connectivity. In the next article, well explore how Cockpit handles user management and peek into the add-on 389 Directory Servers.
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/managing-network-interfaces-and-firewalld-in-cockpit/
作者:[Shaun Assam][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/sassam/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2019/09/cockpit-networking-816x345.jpg
[2]: https://fedoramagazine.org/performing-storage-management-tasks-in-cockpit/
[3]: https://fedoramagazine.org/wp-content/uploads/2019/09/cockpit-network-main-screen-1024x687.png
[4]: https://fedoramagazine.org/wp-content/uploads/2019/09/cockpit-add-zone.gif
[5]: https://github.com/cockpit-project/cockpit/wiki/Feature:-Firewall
[6]: https://fedoramagazine.org/wp-content/uploads/2019/09/cockpit-add_remove-services.gif
[7]: https://fedoramagazine.org/wp-content/uploads/2019/09/cockpit-interfaces-overview-1.gif
[8]: https://fedoramagazine.org/wp-content/uploads/2019/09/cockpit-interface-bonding.gif
[9]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-comparison_of_network_teaming_to_bonding
[10]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/ch-configure_network_teaming
[11]: https://fedoramagazine.org/wp-content/uploads/2019/09/cockpit-interface-teaming.gif
[12]: https://fedoramagazine.org/build-network-bridge-fedora
[13]: http://blog.leifmadsen.com/blog/2016/12/01/create-network-bridge-with-nmcli-for-libvirt/
[14]: https://fedoramagazine.org/wp-content/uploads/2019/09/cockpit-interface-bridging.gif
[15]: https://fedoramagazine.org/wp-content/uploads/2019/09/cockpit-interface-vlans.gif

View File

@ -0,0 +1,295 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Top Open Source Video Players for Linux)
[#]: via: (https://itsfoss.com/video-players-linux/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Top Open Source Video Players for Linux
======
_**Wondering which video player should you use on Linux? Heres a list of top open source video players available for Linux distributions.**_
You can watch Hulu, Prime Video and/or [Netflix on Linux][1]. You can also [download videos from YouTube][2] and watch them later or if you are in a country where you cannot get Netflix and other streaming services, you may have to rely on torrent services like [Popcorn Time in Linux][3].
Watching movies/TV series or other video contents on computers is not an ancient tradition yet. Usually, you go with the default video player that comes baked in with your Linux distribution (that could be anything).
You wont have an issue utilizing the default player however, if you specifically want more open-source video player choices (or alternatives to the default one), you should keep reading.
### Best Linux video players
![][4]
I have included the installation steps for Ubuntu but that shouldnt make it the list of Ubuntu video players. These open source software should be available in any Linux distribution you are using.
Installing the software
Another note for Ubuntu users. You should have [universe repository enabled][5] in order to find and install these video players from the software center or by using command line. I have mentioned the commands but if you like, you can also install them from the Software Center.
_Please keep in mind that the list is in no particular order of ranking._
#### 1\. VLC Media Player
![][6]
Key Highlights:
* Built-in codecs
* Customization options
* Cross-platform
* Every video file format supported
* Extensions available for added functionalities
[VLC Media Player][7] is unquestionably the most popular open source video player. Not just limited to Linux but its a must-have video player for every platform (including Windows).
It is a quite powerful video player capable of handling a variety of file formats and codecs. You can customize the look of it by using skins and enhance the functionalities with the help of certain extensions. Other features like [subtitle synchronization][8], audio/video filters, etc, exist as well.
[VLC Media Player][7]
#### How to install VLC?
You can easily [install VLC in Ubuntu][9] from the Software Center or download it from the [official website][7].
If youre utilizing the terminal, you will have to separately install the components as per your requirements by following the [official resource][10]. To install the player, just type in:
```
sudo apt install vlc
```
#### 2\. MPlayer
![][11]
Key Highlights:
* Wide range of output drivers supported
* Major file formats supported
* Cross-platform
* Command-line based
Yet another impressive open-source video player (technically, a video player engine). [MPlayer][12] may not offer you an intuitive user experience but it supports a wide range of output drivers and subtitle files.
Unlike others, MPlayer does not offer a working GUI (it has one, but it doesnt work as expected). So, you will have to utilize the terminal in order to play a video. Even though this isnt a popular choice it works and a couple of video players that Ill be listing below are inspired (or based) from MPlayer but with a GUI.
[MPlayer][12]
#### How to install MPlayer?
We already have an article on [installing MPlayer on Ubuntu and other Linux distros][13]. If youre interested to install this, you should check it out.
```
sudo apt install mplayer mplayer-gui
```
#### 3\. SMPlayer
![][14]
Key Highlights:
* Supports all major video formats
* Built-in codecs
* Cross-platform (Windows &amp; Linux)
* Play ad-free YouTube video
* Opensubtitles integration
* UI Customization available
* Based on MPlayer
As mentioned, SMPlayer uses MPlayer as the playback engine. So, it supports a wide range of file formats. In addition to all the basic features, it also lets you play YouTube videos from within the video player (by getting rid of the annoying ads).
If you want to know about SMPlayer a bit more we have a separate article here: [SMPlayer in Linux][15].
Similar to VLC, it also comes baked in with codecs, so you dont have to worry about finding codecs and installing them to make it work unless theres something specific you need.
[SMPlayer][16]
#### How to install SMPlayer?
SMPlayer should be available in your Software Center. However, if you want to utilize the terminal, type in this:
```
sudo apt install smplayer
```
#### 4\. MPV Player
![][17]
Key Highlights:
* Minimalist GUI
* Video codecs built in
* High-quality video output by video scaling
* Cross-platform
* YouTube Videos supported via CLI
If you are looking for a video player with a streamlined/minimal UI, this is for you. Similar to the above-mentioned video players, we also have a separate article on [MPV Player][18] with installation instructions (if youre interested to know more about it).
Keeping that aside, it offers what you would expect from a standard video player. You can even try it on your Windows/Mac systems.
[MPV Player][19]
#### How to install MPV Player?
You will find it listed in the Software Center or Package Manager. In either case, you can download the required package for your distro from the [official download page][20].
If youre on Ubuntu, you can type in this in the terminal:
```
sudo apt install mpv
```
#### 5\. Dragon Player
![][21]
Key Highlights:
* Simple UI
* Tailored for KDE
* Supports playing CDs and DVDs
This has been specifically tailored for KDE desktop users. It is a dead-simple video player with all the basic features needed. You shouldnt expect anything fancy out of it but it does support the major file formats.
[Dragon Player][22]
#### How to install Dragon Player?
You will find it listed in the official repo. In either case, you can type in the following command to install it via terminal:
```
sudo apt install dragonplayer
```
#### 6\. GNOME Videos
![Totem Video Player][23]
Key Highlights:
* A simple video player for GNOME Desktop
* Plugins supported
* Ability to sort/access separate video channels
The default video player for distros with GNOME desktop environment (previously known as Totem). It supports all the major file formats and also lets you take a snap while playing a video. Similar to some of the others, it is a very simple and useful video player. You can try it out if you want.
[Gnome Videos][24]
#### How to install Totem (GNOME Videos)?
You can just type in “totem” to find the video player for GNOME listed in the software center. If not, you can also try utilizing the terminal with the following command:
```
sudo apt install totem
```
#### 7\. Deepin Movie
![][25]
If you are using [Deepin OS][26], you will find this as your default video player for Deepin Desktop Environment. It features all the basic functionalities that you would normally look in a video player. You can try compiling the source to install it if you arent using Deepin.
[Deepin Movie][27]
#### How to Install Deepin?
You can find it in the Software Center. If youd want to compile, the source code is available at [GitHub][28]. In either case, type in the following command in the terminal:
```
sudo apt install deepin-movie
```
#### 8\. Xine Multimedia Engine
![][29]
Key Higlights:
* Customization available
* Subtitles supported
* Major file formats supported
* Streaming playback support
Xine is an interesting portable media player. You can either choose to utilize the GUI or call the xine library from other applications to make use of the features available.
It supports a wide range of file formats. You can customize the skin of the GUI. It supports all kinds of subtitles (even from the DVDs). In addition to this, you can take a snapshot while playing the video, which comes handy.
[Xine Multimedia][30]
#### How to install Xine Multimedia?
You probably wont find this in your Software Center. So, you can try typing this in your terminal to get it installed:
```
sudo apt install xine-ui
```
In addition to that, you can also check for available binary packages on their [official website][31].
**Wrapping Up**
We would recommend you to try out these open source video players over anything else. In addition to all these, you can also try [Miro Player][32] which is no more being actively maintained but works so you can give it a try, if nothing else works for you.
However, if you think we missed one of your favorite Linux video player that deserves a mentioned, let us know about it in the comments down below!
--------------------------------------------------------------------------------
via: https://itsfoss.com/video-players-linux/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/watch-netflix-in-ubuntu-linux/
[2]: https://itsfoss.com/download-youtube-linux/
[3]: https://itsfoss.com/popcorn-time-ubuntu-linux/
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/09/Video-Players-for-Linux.png?ssl=1
[5]: https://itsfoss.com/ubuntu-repositories/
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/09/vlc-media-player.jpg?ssl=1
[7]: https://www.videolan.org/vlc/
[8]: https://itsfoss.com/how-to-synchronize-subtitles-with-movie-quick-tip/
[9]: https://itsfoss.com/install-latest-vlc/
[10]: https://wiki.videolan.org/Debian/#Debian
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2015/10/mplayer-video.jpg?ssl=1
[12]: http://www.mplayerhq.hu/design7/news.html
[13]: https://itsfoss.com/mplayer/
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/11/SMPlayer-coco.jpg?ssl=1
[15]: https://itsfoss.com/smplayer/
[16]: https://www.smplayer.info/en/info
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/08/mpv-player-interface.png?ssl=1
[18]: https://itsfoss.com/mpv-video-player/
[19]: https://mpv.io/
[20]: https://mpv.io/installation/
[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/09/dragon-player.jpg?ssl=1
[22]: https://kde.org/applications/multimedia/org.kde.dragonplayer
[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/09/totem-video-player.png?ssl=1
[24]: https://wiki.gnome.org/Apps/Videos
[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/09/deepin-movie.jpg?ssl=1
[26]: https://www.deepin.org/en/
[27]: https://www.deepin.org/en/original/deepin-movie/
[28]: https://github.com/linuxdeepin/deepin-movie-reborn
[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/09/xine-multilmedia.jpg?ssl=1
[30]: https://www.xine-project.org/home
[31]: https://www.xine-project.org/releases
[32]: http://www.getmiro.com/

View File

@ -0,0 +1,97 @@
技术如何改变敏捷的规则
======
![](https://enterprisersproject.com/sites/default/files/styles/620x350/public/images/CIO%20Containers%20Ecosystem.png?itok=lDTaYXzk)
越来越多的企业正因为一个非常明显的原因开始尝试敏捷和[DevOps][1]: 企业需要通过更快的速度和更多的实验为创新和竞争性提供优势。而DevOps将帮助我们得到所需的创新速度。但是在小团队或初创企业中实践DevOps与进行大规模实践完全是两码事。我们都明白这样的一个事实那就是在10人的跨职能团队中能够很好地解决问题的方案当将相同的模式应用到100人的团队中时就可能无法奏效。这条道路是如此艰难以至于IT领导者很容易将敏捷方法的推行再推迟一年。
但那样的时代已经结束了。如果你已经尝试过,但是没有成功,那么现在是时候重新开始了。
直到现在DevOps需要为许多组织提供个性化的解决方案因此往往需要进行大量的调整以及付出额外的工作。但在今天[Linux容器][2]和Kubernetes正在推动DevOps工具和过程的标准化。而这样的标准化将会加速整个软件开发过程。因此我们用来实践DevOps工作方式的技术最终能够满足我们加快软件开发速度的愿望。
Linux容器和[Kubernetes][3]正在改变团队交互的方式。此外你可以在Kubernetes平台上运行任何能够在Linux运行的应用程序。这意味着什么呢你可以运行大量的企业及应用程序(甚至可以解决以前令人烦恼的Windows和Linux之间的协调问题)。最后容器和Kubernetes将能够满足未来所有运行内容的需求。它们正在经受着未来的考验以应对机器学习、人工智能和分析工作等下一代解决问题工具。
**[ 参考相关文章,[4 container adoption patterns: What you need to know. ] ][4]**
让我们以机器学习为例来思考一下。今天,人们可以在大量的企业数据中找到一些模式。当机器发现这些模式时(想想机器学习),你的员工就能更快地采取行动。随着人工智能的加入,机器不仅可以发现模式,还可以对模式进行操作。如今,三个星期已经成为了一个积极的软件开发冲刺周期。有了人工智能,机器每秒可以多次修改代码。创业公司会利用这种能力来“打扰你”。
考虑一下你需要多快才能参与到竞争当中。如果你对于无法对于DevOps和每周一个迭代周期充满信心那么考虑一下当那个创业公司将AI驱动的过程指向你时会发生什么现在是时候转向DevOps的工作方式了否认就会像你的竞争对手一样被甩在后面。
### 容器技术如何改变团队的工作?
DevOps使得许多试图将这种工作方式扩展到更大范围的团队感到沮丧。即使许多IT(和业务)人员之前都听说过敏捷相关的语言、框架、模型(如DevOps)等承诺将会彻底应用程序开发和IT过程的全部相关内容但他们还是对此持怀疑态度。
**[ 想要获取来自其他CIO们的建议吗不放参考下我们的综述性资源, [DevOps: The IT Leader's Guide][5]. ]**
向你的涉众“推销”快速开发冲刺也不是一件容易的事情。想象一下如果你以这种方式买了一栋房子你将不再需要向开发商支付固定的金额而是会得到这样的信息“我们将在4周内浇筑完地基其成本是X之后再搭建房屋框架和铺设电路但是我们现在只能够知道地基完成的时间表。”人们已经习惯了买房子的时候有一个预先的价格和交付时间表。
挑战在于构建软件与构建房屋不同。同一个建筑商往往建造了成千上万个完全相同的房子,而软件项目从来都各不相同。这是你要克服的第一个障碍。
开发和运维团队的工作方式确实不同,我之所以知道这一点是因为我曾经从事过这两方面的工作。企业往往会用不同的方式来激励他们,开发人员会因为更改和创建而获得奖励,而运维专家则会因降低成本和确保安全性而获得奖励。我们会把他们分成不同的小组,并且尽量减少互动。而这些角色通常会吸引那些思维方式完全不同的技术人员。但是这样的解决方案注定会失败,你必须打破横亘在开发和运维之间的藩篱。
想想传统情况下会发生什么。业务会把需求扔过墙这是因为他们在“买房”模式下运作并且说上一句“我们9个月后见。”开发人员根据这些需求进行开发并根据技术约束的需要进行更改。然后他们把它扔过墙传递给运维人员并说一句“搞清楚如何运行这个软件”。然后运维人员勤就会奋地进行大量更改使软件与基础设施保持一致。然而最终的结果是什么呢
通常情况下当业务人员看到需求实现的最终结果时甚至根本辨认不出。在过去20年的大部分时间里我们一次又一次地目睹了这种模式在软件行业中上演。而现在是时候改变了。
Linux容器能够真正地解决这样的问题这是因为容器缩小了开发和运维之间的间隙。容器技术允许两个团队共同理解和设计所有的关键需求但仍然独立地履行各自团队的职责。基本上我们去掉了开发人员和运维人员之间的电话游戏。
因为容器技术,我们可以使得运维团队的规模更小,但依旧能够承担起数百万应用程序的运维工作,并且能够使得开发团队可以更加快速地根据需要更改软件。(在较大的组织中,所需的速度可能比运维人员的响应速度更快。)
使用容器,您可以将所需要交付的内容与它运行的位置分开。你的运维团队只需要负责运行容器的主机和安全的内存占用,仅此而已。这意味着什么呢?
首先这意味着你现在可以和团队一起实践DevOps了。没错只需要让团队专注于他们已经拥有的专业知识而对于容器只需让团队了解所需集成依赖关系的必要知识即可。
如果你想要重新训练每个人,往往会收效甚微。容器技术允许团队之间进行交互,但同时也会为每个团队提供一个围绕该团队优势而构建的强大边界。开发人员会知道需要消耗什么,但不需要知道如何使其大规模运行。运维团队了解核心基础设施,但不需要了解应用程序的细节。此外,运维团队也可以通过更新应用程序来解决新的安全问题,以免你成为下一个数据泄露的热门话题。
想要为一个大型IT组织比如30000人的团队教授运维和开发技能那或许需要花费你十年的时间而你可能并没有那么多时间。
当人们谈论“构建新的云原生应用程序将帮助我们摆脱这个问题”时请批判性地进行思考。你可以在10个人的团队中构建云原生应用程序但这对《财富》杂志前1000强的企业而言或许并不适用。除非你不再需要依赖现有的团队否则你无法一个接一个地构建新的微服务你最终将得到一个竖井式的组织。这是一个诱人的想法但你不能指望这些应用程序来重新定义你的业务。我还没见过哪家公司能在如此大规模的并行开发中获得成功。IT预算已经受到限制在很长一段时间内将预算翻倍甚至三倍是不现实的。
### 当奇迹发生时: 你好, 速度
Linux容器就是为扩容而生的。一旦你开始这样做[Kubernetes之类的编制工具就会发挥作用][6],这是因为你将需要运行数千个容器。应用程序将不仅仅由一个容器组成,它们将依赖于许多不同的部分,所有的部分都会作为一个单元运行在容器上。如果不这样做,你的应用程序将无法在生产环境中很好地运行。
思考一下有多少小滑轮和杠杆组合在一起来支撑你的业务,对于任何应用程序都是如此。开发人员负责应用程序中的所有滑轮和杠杆。(如果开发人员没有这些组件,您可能会在集成时做噩梦。)与此同时无论是在线下还是在云上运维团队都会负责构成基础设施的所有滑轮和杠杆。做一个较为抽象的比喻使用Kubernetes你的运维团队就可以为应用程序提供运行所需的燃料但又不必成为所有方面的专家。
开发人员进行实验,运维团队则保持基础设施的安全和可靠。这样的组合使得企业敢于承担小风险,从而实现创新。不同于打几个孤注一掷的赌,公司中真正的实验往往是循序渐进的和快速的。
从个人经验来看,这就是组织内部发生的显著变化:因为人们说:“我们如何通过改变计划来真正地利用这种能力进行实验?”它强制执行敏捷计划。
举个例子使用DevOps模型、容器和Kubernetes的KeyBank如今每天都会部署代码。(观看视频[7]其中主导了KeyBank持续交付和反馈的John Rzeszotarski将解释这一变化。)类似地Macquarie银行也借助DevOps和容器技术每天将一些东西投入生产环境。
一旦你每天都推出软件,它就会改变你计划的每一个方面,并且会[加速业务的变化速度][8]。Macquarie银行和金融服务集团的CDOLuis Uguina表示“创意可以在一天内触达客户。”(参见[9]对Red Hat与Macquarie银行合作的案例研究)。
### 是时候去创造一些伟大的东西了
Macquarie的例子说明了速度的力量。这将如何改变你的经营方式记住Macquarie不是一家初创企业。这是CIO们所面临的颠覆性力量它不仅来自新的市场进入者也来自老牌同行。
开发人员的自由还改变了运营敏捷商店的CIO们的人才方程式。突然之间大公司里的个体(即使不是在最热门的行业或地区)也可以产生巨大的影响。Macquarie利用这一变动作为招聘工具并向开发人员承诺所有新招聘的员工将会在第一周内推出新产品。
与此同时,在这个基于云的计算和存储能力的时代,我们比以往任何时候都拥有更多可用的基础设施。考虑到[机器学习和人工智能工具将很快实现的飞跃][10],这是幸运的。
所有这些都说明现在正是打造伟大事业的好时机。考虑到市场创新的速度你需要不断地创造伟大的东西来保持客户的忠诚度。因此如果你一直在等待将赌注押在DevOps上那么现在就是正确的时机。容器技术和Kubernetes改变了规则并且对你有利。
**想要获取更多这样的智慧吗, IT领导者? [订阅每周邮件][11].**
--------------------------------------------------------------------------------
via: https://enterprisersproject.com/article/2018/1/how-technology-changes-rules-doing-agile
作者:[Matt Hicks][a]
译者:[JayFrank](https://github.com/JayFrank)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://enterprisersproject.com/user/matt-hicks
[1]:https://enterprisersproject.com/tags/devops
[2]:https://www.redhat.com/en/topics/containers?intcmp=701f2000000tjyaAAA
[3]:https://www.redhat.com/en/topics/containers/what-is-kubernetes?intcmp=701f2000000tjyaAAA
[4]:https://enterprisersproject.com/article/2017/8/4-container-adoption-patterns-what-you-need-know?sc_cid=70160000000h0aXAAQ
[5]:https://enterprisersproject.com/devops?sc_cid=70160000000h0aXAAQ
[6]:https://enterprisersproject.com/article/2017/11/how-enterprise-it-uses-kubernetes-tame-container-complexity
[7]:https://www.redhat.com/en/about/videos/john-rzeszotarski-keybank-red-hat-summit-2017?intcmp=701f2000000tjyaAAA
[8]:https://enterprisersproject.com/article/2017/11/dear-cios-stop-beating-yourselves-being-behind-transformation
[9]:https://www.redhat.com/en/resources/macquarie-bank-case-study?intcmp=701f2000000tjyaAAA
[10]:https://enterprisersproject.com/article/2018/1/4-ai-trends-watch
[11]:https://enterprisersproject.com/email-newsletter?intcmp=701f2000000tsjPAAQ

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (laingke)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
@ -7,16 +7,16 @@
[#]: via: (https://www.networkworld.com/article/3330497/linux/linux-commands-for-measuring-disk-activity.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
Linux commands for measuring disk activity
用于测量磁盘活动的 Linux 命令
======
![](https://images.idgesg.net/images/article/2018/12/tape-measure-100782593-large.jpg)
Linux systems provide a handy suite of commands for helping you see how busy your disks are, not just how full. In this post, we examine five very useful commands for looking into disk activity. Two of the commands (iostat and ioping) may have to be added to your system, and these same two commands require you to use sudo privileges, but all five commands provide useful ways to view disk activity.
Linux 系统提供了一套方便的命令帮助您查看磁盘有多忙而不仅仅是磁盘有多满。在本文中我们将研究五个非常有用的命令用于查看磁盘活动。其中两个命令iostat 和 ioping可能必须添加到您的系统中这两个相同的命令要求您使用 sudo 特权,但是这五个命令都提供了查看磁盘活动的有用方法。
Probably one of the easiest and most obvious of these commands is **dstat**.
这些命令中最简单、最明显的一个可能是 **dstat** 了。
### dtstat
In spite of the fact that the **dstat** command begins with the letter "d", it provides stats on a lot more than just disk activity. If you want to view just disk activity, you can use the **-d** option. As shown below, youll get a continuous list of disk read/write measurements until you stop the display with a ^c. Note that after the first report, each subsequent row in the display will report disk activity in the following time interval, and the default is only one second.
尽管 **dstat** 命令以字母 "d" 开头,但它提供的统计信息远远不止磁盘活动。如果您只想查看磁盘活动,可以使用 **-d** 选项。如下所示,您将得到一个磁盘读/写测量值的连续列表,直到使用 a ^c 停止显示为止。注意,在第一个报告之后,显示中的每个后续行将在接下来的时间间隔内报告磁盘活动,缺省值仅为一秒。
```
$ dstat -d
@ -29,7 +29,7 @@ $ dstat -d
0 0 ^C
```
Including a number after the -d option will set the interval to that number of seconds.
在 -d 选项后面包含一个数字将把间隔设置为其秒数。
```
$ dstat -d 10
@ -41,9 +41,9 @@ $ dstat -d 10
0 9011B ^C
```
Notice that the reported data may be shown in a number of different units — e.g., M (megabytes), k (kilobytes), and B (bytes).
请注意,报告的数据可能以许多不同的单位显示——例如,M (megabytes), k (kilobytes), and B (bytes).
Without options, the dstat command is going to show you a lot of other information as well — indicating how the CPU is spending its time, displaying network and paging activity, and reporting on interrupts and context switches.
如果没有选项dstat 命令还将显示许多其他信息——指示 CPU 如何使用时间、显示网络和分页活动、报告中断和上下文切换。
```
$ dstat
@ -55,11 +55,11 @@ usr sys idl wai stl| read writ| recv send| in out | int csw
0 1 99 0 0| 0 16k| 64B 468B| 0 0 | 64 81 ^C
```
The dstat command provides valuable insights into overall Linux system performance, pretty much replacing a collection of older tools, such as vmstat, netstat, iostat, and ifstat, with a flexible and powerful command that combines their features. For more insight into the other information that the dstat command can provide, refer to this post on the [dstat][1] command.
dstat 命令提供了关于整个 Linux 系统性能的有价值的见解,几乎可以用它灵活而功能强大的命令来代替 vmstatnetstatiostat 和 ifstat 等较旧的工具集合,该命令结合了这些旧工具的功能。要深入了解 dstat 命令可以提供的其它信息,请参阅这篇关于 [dstat][1] 命令的文章。
### iostat
The iostat command helps monitor system input/output device loading by observing the time the devices are active in relation to their average transfer rates. It's sometimes used to evaluate the balance of activity between disks.
iostat 命令通过观察设备活动的时间与其平均传输速率之间的关系,帮助监视系统输入/输出设备的加载情况。它有时用于评估磁盘之间的活动平衡。
```
$ iostat
@ -90,7 +90,7 @@ loop15 0.01 0.01 0.00 20026 0
loop16 0.00 0.00 0.00 24 0
```
Of course, all the stats provided on Linux loop devices can clutter the display when you want to focus solely on your disks. The command, however, does provide the **-p** option, which allows you to just look at your disks — as shown in the commands below.
当然当您只想关注磁盘时Linux loop 设备上提供的所有统计信息都会使结果显得杂乱无章。但是,该命令也确实提供了 **-p** 选项,该选项使您可以仅查看磁盘——如以下命令所示。
```
$ iostat -p sda
@ -104,9 +104,9 @@ sda 1.06 0.89 72.54 2843737 232815784
sda1 1.04 0.88 72.54 2821733 232815784
```
Note that **tps** refers to transfers per second.
请注意 **tps** 是指每秒的传输量。
You can also get iostat to provide repeated reports. In the example below, we're getting measurements every five seconds by using the **-d** option.
您还可以让 iostat 提供重复的报告。在下面的示例中,我们使用 **-d** 选项每五秒钟进行一次测量。
```
$ iostat -p sda -d 5
@ -121,7 +121,7 @@ sda 0.80 0.00 11.20 0 56
sda1 0.80 0.00 11.20 0 56
```
If you prefer to omit the first (stats since boot) report, add a **-y** to your command.
如果您希望省略第一个(自启动以来的统计信息)报告,请在命令中添加 **-y**。
```
$ iostat -p sda -d 5 -y
@ -132,7 +132,7 @@ sda 0.80 0.00 11.20 0 56
sda1 0.80 0.00 11.20 0 56
```
Next, we look at our second disk drive.
接下来,我们看第二个磁盘驱动器。
```
$ iostat -p sdb
@ -149,7 +149,7 @@ sdb1 0.00 0.01 0.00 35344 0
### iotop
The **iotop** command is top-like utility for looking at disk I/O. It gathers I/O usage information provided by the Linux kernel so that you can get an idea which processes are most demanding in terms in disk I/O. In the example below, the loop time has been set to 5 seconds. The display will update itself, overwriting the previous output.
**iotop** 命令是类似 top 的实用程序,用于查看磁盘 I/O。它收集 Linux 内核提供的 I/O 使用信息,以便您了解哪些进程在磁盘 I/O 方面的要求最高。在下面的示例中循环时间被设置为5秒。显示将自动更新覆盖前面的输出。
```
$ sudo iotop -d 5
@ -167,7 +167,7 @@ Current DISK READ: 0.00 B/s | Current DISK WRITE: 12.39 K/s
### ioping
The **ioping** command is an altogether different type of tool, but it can report disk latency — how long it takes a disk to respond to requests — and can be helpful in diagnosing disk problems.
**ioping** 命令是一种完全不同的工具,但是它可以报告磁盘延迟——也就是磁盘响应请求需要多长时间,而这有助于诊断磁盘问题。
```
$ sudo ioping /dev/sda1
@ -184,7 +184,7 @@ min/avg/max/mdev = 831.0 us / 947.9 us / 1.17 ms / 158.0 us
### atop
The **atop** command, like **top** provides a lot of information on system performance, including some stats on disk activity.
**atop** 命令,像 **top** 一样提供了大量有关系统性能的信息,包括有关磁盘活动的一些统计信息。
```
ATOP - butterfly 2018/12/26 17:24:19 37d3h13m------ 10ed
@ -212,7 +212,7 @@ NET | enp0s25 0% | pcki 10 | pcko 8 | si 1 Kbps | so 3 Kbp0.73 ms |
3362 0.00s 0.00s 0K 0K NE 0 0 E - 0% <sleep>
```
If you want to look at _just_ the disk stats, you can easily manage that with a command like this:
如果您 _只_ 想查看磁盘统计信息,则可以使用以下命令轻松进行管理:
```
$ atop | grep DSK
@ -228,11 +228,11 @@ DSK | sda | busy 2% | read 0 | write 92 | avio 2.43 ms |
^C
```
### Being in the know with disk I/O
### 了解磁盘 I/O
Linux provides enough commands to give you good insights into how hard your disks are working and help you focus on potential problems or slowdowns. Hopefully, one of these commands will tell you just what you need to know when it's time to question disk performance. Occasional use of these commands will help ensure that especially busy or slow disks will be obvious when you need to check them.
Linux 提供了足够的命令,可以让您很好地了解磁盘的工作强度,并帮助您关注潜在的问题或慢速。希望这些命令中的一个可以告诉您何时需要质疑磁盘性能。偶尔使用这些命令将有助于确保当您需要检查磁盘,特别是忙碌或缓慢的磁盘时可以显而易见地发现它们。
Join the Network World communities on [Facebook][2] and [LinkedIn][3] to comment on topics that are top of mind.
加入 [Facebook][2] 和 [LinkedIn][3] 上的 Network World 社区,对最重要的话题发表评论。
--------------------------------------------------------------------------------
@ -240,7 +240,7 @@ via: https://www.networkworld.com/article/3330497/linux/linux-commands-for-measu
作者:[Sandra Henry-Stocker][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[laingke](https://github.com/laingke)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,235 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (laingke)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Create an online store with this Java-based framework)
[#]: via: (https://opensource.com/article/19/1/scipio-erp)
[#]: author: (Paul Piper https://opensource.com/users/madppiper)
使用这个 Java 框架创建一个在线商店
======
Scipio ERP 具有广泛的应用程序和功能。
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_whitehurst_money.png?itok=ls-SOzM0)
所以,你想在网上销售产品或服务,但要么找不到合适的软件,要么认为定制成本太高? [Scipio ERP][1] 也许正是你想要的。
Scipio ERP 是一个基于 Java 的开放源码电子商务框架,具有广泛的应用程序和功能。这个项目在 2014 年从 [Apache OFBiz][2] fork 而来,侧重于更好的定制和更现代的吸引力。这个电子商务组件应用非常广泛,可以在多商店安装中工作,同时完成国际化,并具有广泛的产品配置,而且它还兼容现代 HTML 框架。该软件还为许多其他业务案例提供标准应用程序,例如会计,仓库管理或销售人员自动化。它都是高度标准化的,因此易于定制,如果您想要的不仅仅是一个虚拟购物车,这是非常棒的。
该系统也使得跟上现代 web 标准变得非常容易。所有界面都是使用系统的“[模板工具包][3]”构建的,这是一个易于学习的宏集,可以将 HTML 与所有应用程序分开。正因为如此,每个应用程序都已经标准化到核心。听起来令人困惑?它真的不是——它看起来很像 HTML但你写的内容少了很多。
### 初始安装
在您开始之前,请确保您已经安装了 Java 1.8(或更高版本)的 SDK 以及一个 Git 客户端。完成了?太棒了!接下来,切换到 Github 上的主分支:
```
git clone https://github.com/ilscipio/scipio-erp.git
cd scipio-erp
git checkout master
```
要安装系统,只需要运行 **./install.sh** 并从命令行中选择任一选项。在开发过程中,最好一直使用 **installation for development** (选项 1它还将安装一系列演示数据。对于专业安装您可以修改初始配置数据“种子数据”以便自动为您设置公司和目录数据。默认情况下系统将使用内部数据库运行但是它[也可以配置][4]使用各种关系数据库,比如 PostgreSQL 和 MariaDB 等。
![安装向导][6]
按照安装向导完成初始配置,
通过命令 **./start.sh** 启动系统然后打开链接 **<https://localhost:8443/setup/>** 完成配置。如果您安装了演示数据, 您可以使用用户名 **admin** 和密码 **scipio** 进行登录。在安装向导中,您可以设置公司简介、会计、仓库、产品目录、在线商店和额外的用户配置信息。暂时在产品商店配置界面上跳过网站实体的配置。系统允许您使用不同的底层代码运行多个在线商店;除非您想这样做,一直选择默认值是最简单的。
祝贺您,您刚刚安装了 Scipio ERP在界面上操作一两分钟感受一下它的功能。
### 捷径
在您进入自定义之前,这里有一些方便的命令可以帮助您:
* 创建一个 shop-override**./ant create-component-shop-override**
* 创建一个新组件:**./ant create-component**
* 创建一个新主题组件:**./ant create-theme**
* 创建管理员用户:**./ant create-admin-user-login**
* 各种其他实用功能:**./ant -p**
* 用于安装和更新插件的实用程序:**./git-addons help**
另外,请记下以下位置:
* 将 Scipio 作为服务运行的脚本:**/tools/scripts/**
* 日志输出目录:**/runtime/logs**
* 管理应用程序:**<https://localhost:8443/admin/>**
* 电子商务应用程序:**<https://localhost:8443/shop/>**
最后Scipio ERP 在以下五个主要目录中构建了所有代码:
* Framework: 框架相关的源,应用程序服务器,通用界面和配置
* Applications: 核心应用程序
* Addons: 第三方扩展
* Themes: 修改界面外观
* Hot-deploy: 您自己的组件
除了一些配置,您将在 hot-deploy 和 themes 目录中工作。
### 在线商店定制
要真正使系统成为您自己的系统,请开始考虑使用[组件][7]。组件是一种模块化方法,可以覆盖,扩展和添加到系统中。您可以将组件视为可以捕获有关数据库([实体][8]),功能([服务][9]),界面([视图][10][事件和操作][11]和 Web 应用程序信息的独立 Web 模块。由于组件功能,您可以添加自己的代码,同时保持与原始源兼容。
运行命令 **./ant create-component-shop-override** 并按照步骤创建您的在线商店组件。该操作将会在 hot-deploy 目录内创建一个新目录,该目录将扩展并覆盖原始的电子商务应用程序。
![组件目录结构][13]
一个典型的组件目录结构。
您的组件将具有以下目录结构:
* config: 配置
* data: 种子数据
* entitydef: 数据库表定义
* script: Groovy 脚本的位置
* servicedef: 服务定义
* src: Java 类
* webapp: 您的 web 应用程序
* widget: 界面定义
此外,**ivy.xml** 文件允许您将 Maven 库添加到构建过程中,**ofbiz-component.xml** 文件定义整个组件和 Web 应用程序结构。除了一些在当前目录所能够看到的,您还可以在 Web 应用程序的 **WEB-INF** 目录中找到 **controller.xml** 文件。这允许您定义请求实体并将它们连接到事件和界面。仅对于界面来说,您还可以使用内置的 CMS 功能,但优先要坚持使用核心机制。在引入更改之前,请熟悉**/applications/shop/**。
#### 添加自定义界面
还记得[模板工具包][3]吗?您会发现它在每个界面都有使用到。您可以将其视为一组易于学习的宏,它用来构建所有内容。下面是一个例子:
```
<@section title="Title">
    <@heading id="slider">Slider</@heading>
    <@row>
        <@cell columns=6>
            <@slider id="" class="" controls=true indicator=true>
                <@slide link="#" image="https://placehold.it/800x300">Just some content…</@slide>
                <@slide title="This is a title" link="#" image="https://placehold.it/800x300"></@slide>
            </@slider>
        </@cell>
        <@cell columns=6>Second column</@cell>
    </@row>
</@section>
```
不是很难,对吧?同时,主题包含 HTML 定义和样式。这将权力交给您的前端开发人员,他们可以定义每个宏的输出,并坚持使用自己的构建工具进行开发。
我们快点试试吧。首先,在您自己的在线商店上定义一个请求。您将修改此代码。一个内置的 CMS 系统也可以通过 **<https://localhost:8443/cms/>** 进行访问,它允许您以更有效的方式创建新模板和界面。它与模板工具包完全兼容,并附带可根据您的喜好采用的示例模板。但是既然我们试图在这里理解系统,那么首先让我们采用更复杂的方法。
打开您商店 webapp 目录中的 **[controller.xml][14]** 文件。Controller 跟踪请求事件并相应地执行操作。下面的操作将会在 **/shop/test** 下创建一个新的请求:
```
<!-- Request Mappings -->
<request-map uri="test">
     <security https="true" auth="false"/>
      <response name="success" type="view" value="test"/>
</request-map>
```
您可以定义多个响应,如果需要,可以在请求中使用事件或服务调用来确定您可能要使用的响应。我选择了“视图”类型的响应。视图是渲染的响应; 其他类型是请求重定向,转发等。系统附带各种渲染器,可让您稍后确定输出; 为此,请添加以下内容:
```
<!-- View Mappings -->
<view-map name="test" type="screen" page="component://mycomponent/widget/CommonScreens.xml#test"/>
```
用您自己的组件名称替换 **my-component**。然后,您可以通过在 **widget/CommonScreens.xml** 文件的标签内添加以下内容来定义您的第一个界面:
```
<screen name="test">
        <section>
            <actions>
            </actions>
            <widgets>
                <decorator-screen name="CommonShopAppDecorator" location="component://shop/widget/CommonScreens.xml">
                    <decorator-section name="body">
                        <platform-specific><html><html-template location="component://mycomponent/webapp/mycomponent/test/test.ftl"/></html></platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
```
商店界面实际上非常模块化,由多个元素组成([小部件,动作和装饰器][15])。为简单起见,请暂时保留原样,并通过添加第一个模板工具包文件来完成新网页。为此,创建一个新的 **webapp/mycomponent/test/test.ftl** 文件并添加以下内容:
```
<@alert type="info">Success!</@alert>
```
![自定义的界面][17]
一个自定义的界面。
打开 **<https://localhost:8443/shop/control/test/>** 并惊叹于你自己的成就。
#### 自定义主题
通过创建自己的主题来修改商店的界面外观。所有主题都可以作为组件在themes文件夹中找到。运行命令 **./ant create-theme** 来创建您自己的主题。
![主题组件布局][19]
一个典型的主题组件布局。
以下是最重要的目录和文件列表:
* 主题配置:**data/\*ThemeData.xml**
* 特定主题封装的HTML**includes/\*.ftl**
* 模板工具包HTML定义**includes/themeTemplate.ftl**
* CSS 类定义:**includes/themeStyles.ftl**
* CSS 框架: **webapp/theme-title/**
快速浏览工具包中的 Metro 主题;它使用 Foundation CSS 框架并且充分利用了这个框架。然后,然后,在新构建的 **webapp/theme-title** 目录中设置自己的主题并开始开发。Foundation-shop 主题是一个非常简单的特定于商店的主题实现,您可以将其用作您自己工作的基础。
瞧!您已经建立了自己的在线商店,准备个性化定制吧!
![搭建完成的 Scipio ERP 在线商店][21]
一个搭建完成的基于 Scipio ERP的在线商店。
### 接下来是什么?
Scipio ERP 是一个功能强大的框架,可简化复杂的电子商务应用程序的开发。为了更完整的理解,请查看项目[文档][7],尝试[在线演示][22],或者[加入社区][23].
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/1/scipio-erp
作者:[Paul Piper][a]
选题:[lujun9972][b]
译者:[laingke](https://github.com/laingke)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/madppiper
[b]: https://github.com/lujun9972
[1]: https://www.scipioerp.com
[2]: https://ofbiz.apache.org/
[3]: https://www.scipioerp.com/community/developer/freemarker-macros/
[4]: https://www.scipioerp.com/community/developer/installation-configuration/configuration/#database-configuration
[5]: /file/419711
[6]: https://opensource.com/sites/default/files/uploads/setup_step5_sm.jpg (Setup wizard)
[7]: https://www.scipioerp.com/community/developer/architecture/components/
[8]: https://www.scipioerp.com/community/developer/entities/
[9]: https://www.scipioerp.com/community/developer/services/
[10]: https://www.scipioerp.com/community/developer/views-requests/
[11]: https://www.scipioerp.com/community/developer/events-actions/
[12]: /file/419716
[13]: https://opensource.com/sites/default/files/uploads/component_structure.jpg (component directory structure)
[14]: https://www.scipioerp.com/community/developer/views-requests/request-controller/
[15]: https://www.scipioerp.com/community/developer/views-requests/screen-widgets-decorators/
[16]: /file/419721
[17]: https://opensource.com/sites/default/files/uploads/success_screen_sm.jpg (Custom screen)
[18]: /file/419726
[19]: https://opensource.com/sites/default/files/uploads/theme_structure.jpg (theme component layout)
[20]: /file/419731
[21]: https://opensource.com/sites/default/files/uploads/finished_shop_1_sm.jpg (Finished Scipio ERP shop)
[22]: https://www.scipioerp.com/demo/
[23]: https://forum.scipioerp.com/

View File

@ -0,0 +1,79 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Blockchain 2.0 What Is Ethereum [Part 9])
[#]: via: (https://www.ostechnix.com/blockchain-2-0-what-is-ethereum/)
[#]: author: (editor https://www.ostechnix.com/author/editor/)
区块链 2.0 :以太坊(九)
======
![Ethereum][1]
在本系列的上一指南中,我们讨论了 [Hyperledger 项目HLP][2],这是一个由 Linux 基金会开发的增长最快的产品。在本指南中,我们将详细讨论什么是“<ruby>以太坊<rt>Ethereum</rt></ruby>”及其功能。许多研究人员认为,互联网的未来将基于<ruby>去中心化计算<rt>decentralized computing</rt></ruby>的原理。实际上,去中心化计算是互联网放在首位的更广泛目标之一。但是,由于可用的计算能力不同,互联网发生了另一次变化。尽管现代服务器功能使服务器端处理和执行成为可能,但在世界上大部分地区缺乏像样的移动网络使客户端也是如此。现在,现代智能手机具有 SoC片上系统在客户端本身上也能够处理许多此类操作但是由于安全地检索和存储数据而受到的限制仍然迫使开发人员进行服务器端计算和数据管理。因此当前可以观察到数据传输能力的瓶颈。
由于分布式数据存储和程序执行平台的进步,所有这些可能很快就会改变。[区块链][3]允许在分布式用户网络(而不是中央服务器)上进行安全的数据管理和程序执行,这在互联网历史上基本上是第一次。
以太坊就是一个这样的区块链平台,使开发人员可以访问用于在这样的去中心化网络上构建和运行应用程序的框架和工具。尽管它以其加密货币而广为人知,以太坊不只是<ruby>以太币<rt>ether</rt></ruby>(加密货币)。这是一种完整的<ruby>图灵完备<rt>Turing complete</rt></ruby>编程语言,旨在开发和部署 DApp<ruby>分布式应用<rt>Distributed APPlication</rt></ruby> [^1]。我们会在接下来的一篇文章中详细介绍 DApp。
以太坊是开源的默认情况下是一个公共非许可区块链并具有一个大范围的智能合约平台底层Solidity。以太坊提供了一个称为“以太坊虚拟机EVM”的虚拟计算环境以运行应用程序和[智能合约][4] [^2]。 以太坊虚拟机在世界各地成千上万个参与节点上运行,这意味着应用程序数据在保证安全的同时,几乎不可能被篡改或丢失。
### 以太坊的背后:什么使之不同
在 2017 年为了推广以太坊区块链的功能的利用30 多个技术和金融领域的名人聚集在一起。因此,“<ruby>以太坊企业联盟<rt>Ethereum Enterprise Alliance</rt></ruby>EEA由众多支持成员组成包括微软、摩根大通、思科、德勤和埃森哲。摩根大通已经拥有 Quorum这是一个基于以太坊的去中心化金融服务计算平台目前正在运营中而微软拥有通过其 Azure 云业务销售的基于以太坊的云服务[^3]。
### 什么是以太币,它和以太坊有什么关系
以太坊的创建者<ruby>维塔利克·布特林<rt>Vitalik Buterin</rt></ruby>深谙去中心化处理平台的真正价值以及为比特币提供动力的底层区块链技术。他提议比特币应该开发以支持运行分布式应用程序DApp和程序现在称为智能合约的想法未能获得多数同意。
因此,他在 2013 年发表的白皮书中提出了以太坊的想法。原始白皮书仍在维护中,读者可从[此处][5]获得。这个想法是开发一个基于区块链的平台来运行智能合约和应用程序,这些合约和应用程序设计为在节点和用户设备而非服务器上运行。
以太坊系统经常被误认为就是加密货币以太币,但是,必须重申,以太坊是一个用于开发和执行应用程序的全栈平台,自成立以来一直如此,而比特币并非如此。**以太网目前是按市值计算的第二大加密货币**,在撰写本文时,其平均交易价格为每个以太币 170 美元 [^4]。
### 该平台的功能和技术特性 [^5]
* 正如我们已经提到的,称为以太币的加密货币只是该平台功能之一。该系统的目的不仅仅是处理金融交易。 实际上,以太坊平台和比特币之间的主要区别在于它们的脚本功能。以太坊是以图灵完备的编程语言开发的,这意味着它具有类似于其他主要编程语言的脚本和应用程序功能。开发人员需要此功能才能在平台上创建 DApp 和复杂的智能合约,而该功能是比特币缺失的。
* 以太币的“挖矿”过程更加严格和复杂。尽管可以使用专用的 ASIC 来开采比特币但以太坊使用的基本哈希算法EThash降低了 ASIC 在这方面的优势。
* 为激励矿工和节点运营者运行网络而支付的交易费用本身是使用称为 “<ruby>燃料<rt>Gas</rt></ruby>”的计算令牌来计算的。通过要求交易的发起者支付与执行交易所需的计算资源数量成比例的以太币,燃料提高了系统的弹性以及对外部黑客和攻击的抵抗力。这与其他平台(例如比特币)相反,在该平台上,交易费用与交易规模一并衡量。因此,以太坊的平均交易成本从根本上低于比特币。这也意味着在以太坊虚拟机上运行的应用程序需要付费,具体取决于应用程序要解决的计算问题。基本上,执行越复杂,费用就越高。
* 以太坊的出块时间估计约为 10 - 15 秒。出块时间是在区块链网络上打时间戳和创建区块所需的平均时间。与将在比特币网络上进行同样的交易要花费 10 分钟以上的时间相比,很明显,就交易和区块验证而言,以太坊要快得多。
* *有趣的是,对可开采的以太币数量或开采速度没有硬性限制,这导致其系统设计不像比特币那么激进*
### 总结
尽管与以太坊相比,它远远超过了类似的平台,但在以太坊企业联盟开始推动之前,该平台本身尚缺乏明确的发展道路。虽然以太坊平台确实推动了企业发展,但必须注意,以太坊还可以满足小型开发商和个人的需求。 这样一来,为最终用户和企业开发的平台就为以太坊遗漏了许多特定功能。另外,以太坊基金会提出和开发的区块链模型是一种公共模型,而 Hyperledger 项目等项目提出的模型是私有的和需要许可的。
虽然只有时间才能证明以太坊、Hyperledger 和 R3 Corda 等平台中,哪一个平台会在现实场景中找到最多粉丝,但此类系统确实证明了以区块链为动力的未来主张的正确性。
[^1]: [Gabriel Nicholas, “Ethereum Is Codings New Wild West | WIRED,” Wired , 2017][6].
[^2]: [What is Ethereum? — Ethereum Homestead 0.1 documentation][7].
[^3]: [Ethereum, a Virtual Currency, Enables Transactions That Rival Bitcoins The New York Times][8].
[^4]: [Cryptocurrency Market Capitalizations | CoinMarketCap][9].
[^5]: [Introduction — Ethereum Homestead 0.1 documentation][10].
--------------------------------------------------------------------------------
via: https://www.ostechnix.com/blockchain-2-0-what-is-ethereum/
作者:[editor][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.ostechnix.com/author/editor/
[b]: https://github.com/lujun9972
[1]: https://www.ostechnix.com/wp-content/uploads/2019/04/Ethereum-720x340.png
[2]: https://www.ostechnix.com/blockchain-2-0-an-introduction-to-hyperledger-project-hlp/
[3]: https://www.ostechnix.com/blockchain-2-0-an-introduction/
[4]: https://www.ostechnix.com/blockchain-2-0-explaining-smart-contracts-and-its-types/
[5]: https://github.com/ethereum/wiki/wiki/White-Paper
[6]: https://www.wired.com/story/ethereum-is-codings-new-wild-west/
[7]: http://www.ethdocs.org/en/latest/introduction/what-is-ethereum.html#ethereum-virtual-machine
[8]: https://www.nytimes.com/2016/03/28/business/dealbook/ethereum-a-virtual-currency-enables-transactions-that-rival-bitcoins.html
[9]: https://coinmarketcap.com/
[10]: http://www.ethdocs.org/en/latest/introduction/index.html

View File

@ -0,0 +1,96 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to freeze and lock your Linux system (and why you would want to))
[#]: via: (https://www.networkworld.com/article/3438818/how-to-freeze-and-lock-your-linux-system-and-why-you-would-want-to.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
如何冻结和锁定你的 Linux 系统(以及为何你会希望做)
======
冻结终端窗口并锁定屏幕意味着什么 - 以及如何在 Linux 系统上管理这些活动。
如何在 Linux 系统上冻结和“解冻”屏幕,很大程度上取决于这些术语的含义。有时“冻结屏幕”可能意味着冻结终端窗口,以便该窗口内的活动停止。有时它意味着锁定屏幕,这样就没人可以在你去拿一杯咖啡时,走到你的系统旁边代替你输入命令了。
在这篇文章中,我们将研究如何使用和控制这些操作。
### 如何在 Linux 上冻结终端窗口
你可以输入 **Ctrl+S**(按住 Ctrl 键和 “s” 键)冻结 Linux 系统上的终端窗口。把 “s” 想象成“开始冻结” start the freeze。如果在此操作后继续输入命令那么你不会看到输入的命令或你希望看到的输出。实际上命令将堆积在一个队列中并且只有在通过输入 **Ctrl+Q** 解冻时才会运行。把它想象成“退出冻结” quit the freeze
查看其工作的一种简单方式是使用 date 命令,然后输入 **Ctrl+S**。接着再次输入 date 命令并等待几分钟后再次输入 **Ctrl+Q**。你会看到这样的情景:
```
$ date
Mon 16 Sep 2019 06:47:34 PM EDT
$ date
Mon 16 Sep 2019 06:49:49 PM EDT
```
这两次时间显示的差距表示第二次的 date 命令直到你解冻窗口时才运行。
无论你是坐在计算机屏幕前还是使用 PuTTY 等工具远程运行,终端窗口都可以冻结和解冻。
这有一个可以派上用场的小技巧。如果你发现终端窗口似乎处于非活动状态,那么可能是你或其他人无意中输入了 **Ctrl+S**。无论如何,输入 **Ctrl+Q** 来尝试解决不妨是个不错的办法。
### 如何锁定屏幕
要在离开办公桌前锁定屏幕,请按住  **Ctrl+Alt+L****Super+L**(即按住 Windows 键和 L 键)。屏幕锁定后,你必须输入密码才能重新登录。
### Linux 系统上的自动屏幕锁定
虽然最佳做法建议你在即将离开办公桌时锁定屏幕,但 Linux 系统通常会在一段时间没有活动后自动锁定。 “消隐”屏幕(使其变暗)并实际锁定屏幕(需要登录才能再次使用)的时间取决于你个人首选项中的设置。
要更改使用 GNOME 屏幕保护程序时屏幕变暗所需的时间,请打开设置窗口并选择 **Power** 然后 **Blank screen**。你可以选择 1 到 15 分钟或从不变暗。要选择屏幕变暗后锁定所需时间,请进入设置,选择 **Privacy**,然后选择**Blank screen**。设置应包括 1、2、3、5 和 30 分钟或一小时。
### 如何在命令行锁定屏幕
如果你使用的是 Gnome 屏幕保护程序,你还可以使用以下命令从命令行锁定屏幕:
```
gnome-screensaver-command -l
```
这里是小写的 L代表“锁定”。
### 如何检查锁屏状态
你还可以使用 gnome-screensaver 命令检查屏幕是否已锁定。使用 **\--query** 选项,该命令会告诉你屏幕当前是否已锁定(即处于活动状态)。使用 --time 选项,它会告诉你锁定生效的时间。这是一个示例脚本:
```
#!/bin/bash
gnome-screensaver-command --query
gnome-screensaver-command --time
```
运行脚本将会输出:
```
$ ./check_lockscreen
The screensaver is active
The screensaver has been active for 1013 seconds.
```
#### 总结
如果你记住了正确的控制方式,那么锁定终端窗口是很简单的。对于屏幕锁定,它的效果取决于你自己的设置,或者你是否习惯使用默认设置。
在 [Facebook][3] 和 [LinkedIn][4] 上加入 Network World 社区,来评论最新主题。
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3438818/how-to-freeze-and-lock-your-linux-system-and-why-you-would-want-to.html
作者:[Sandra Henry-Stocker][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
[b]: https://github.com/lujun9972
[3]: https://www.facebook.com/NetworkWorld/
[4]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,142 @@
[#]: collector: (lujun9972)
[#]: translator: (arrowfeng)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to Remove (Delete) Symbolic Links in Linux)
[#]: via: (https://www.2daygeek.com/remove-delete-symbolic-link-softlink-linux/)
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
在 Linux 中怎样移除(删除)符号链接
======
你可能有时需要在 Linux 上创建或者删除符号链接。
如果有,你知道该怎样做吗?
之前你做过吗?你踩坑没有?
如果你踩过坑,那没什么问题。如果还没有,别担心,我们将在这里帮助你。
使用 rm 和 unlink 命令就能完成移除(删除)符号链接的操作。
### 什么是符号链接?
符号链接又称 symlink 或者 软链接,它是一种特殊的文件类型,在 Linux 中该文件指向另一个文件或者目录。
它类似于 Windows 中的快捷方式。
它能在相同或者不同的文件系统或分区中指向一个文件或着目录。
符号链接通常用来链接库文件。它也可用于链接日志文件和在 NFS (网络文件系统)上的文件夹。
### 什么是 rm 命令?
这个 **[rm command][1]** 被用来移除文件和目录。它非常危险,你每次使用 rm 命令的时候要非常小心。
### 什么是 unlink 命令?
unlink 命令被用来移除特殊的文件。它被作为 GNU Gorutils 的一部分安装了。
### 1) 使用 rm 命令怎样移除符号链接文件
rm 命令是在 Linux 中使用最频繁的命令,它允许我们像下列描述那样去移除符号链接。
```
# rm symlinkfile
```
始终将 rm 命令与 “-i” 一起使用以了解正在执行的操作。
```
# rm -i symlinkfile1
rm: remove symbolic link symlinkfile1? y
```
它允许我们一次移除多个符号链接
```
# rm -i symlinkfile2 symlinkfile3
rm: remove symbolic link symlinkfile2? y
rm: remove symbolic link symlinkfile3? y
```
### 1a) 使用 rm 命令怎样移除符号链接目录
这像移除符号链接文件那样。
使用下列命令移除符号链接目录。
```
# rm -i symlinkdir
rm: remove symbolic link symlinkdir? y
```
使用下列命令移除多个符号链接目录。
```
# rm -i symlinkdir1 symlinkdir2
rm: remove symbolic link symlinkdir1? y
rm: remove symbolic link symlinkdir2? y
```
如果你增加 _**“/”**_ 在结尾,这个符号链接目录将不会被删除。如果你加了,你将得到一个错误。
```
# rm -i symlinkdir/
rm: cannot remove symlinkdir/: Is a directory
```
你可以增加 **“-r”** 去处理上述问题。如果你增加这个参数,它将会删除目标目录下的内容,并且它不会删除这个符号链接文件。
```
# rm -ri symlinkdir/
rm: descend into directory symlinkdir/? y
rm: remove regular file symlinkdir/file4.txt? y
rm: remove directory symlinkdir/? y
rm: cannot remove symlinkdir/: Not a directory
```
### 2) 使用 unlink 命令怎样移除符号链接
unlink 命令删除指定文件。它一次仅接受一个文件。
删除符号链接文件
```
# unlink symlinkfile
```
删除符号链接目录
```
# unlink symlinkdir2
```
如果你增加 _**“/”**_ 在结尾,你不能使用 unlink 命令删除符号链接目录
```
# unlink symlinkdir3/
unlink: cannot unlink symlinkdir3/: Not a directory
```
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/remove-delete-symbolic-link-softlink-linux/
作者:[Magesh Maruthamuthu][a]
选题:[lujun9972][b]
译者:[arrowfeng](https://github.com/arrowfeng)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.2daygeek.com/author/magesh/
[b]: https://github.com/lujun9972
[1]: https://www.2daygeek.com/linux-remove-files-directories-folders-rm-command/