Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu Wang 2020-07-30 22:58:28 +08:00
commit 7bfd0f9170
9 changed files with 357 additions and 212 deletions

View File

@ -0,0 +1,57 @@
[#]: collector: (lujun9972)
[#]: translator: (JonnieWayy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12466-1.html)
[#]: subject: (My Linux story: breaking language barriers with open source)
[#]: via: (https://opensource.com/article/20/7/linux-bengali)
[#]: author: (Dr Anirban Mitra https://opensource.com/users/mitradranirban)
我的 Linux 故事:用开源打破语言壁垒
======
> 开源项目可以通过消除语言和其他障碍来帮着改变世界。
![](https://img.linux.net.cn/data/attachment/album/202007/29/230730e4mb18km1nwn4ibm.jpg)
相较于我的许多同行和同事,我的开源之旅开始得着实很晚。
2000 年,我实现了我从高中开始的梦想 —— 买一台属于我自己的个人计算机,当时我正在攻读医学研究生学位。在那之前,我对计算机的唯一接触是偶尔在图书馆或网吧上网,当时这些地方电脑使用的收费都相当高昂。所以我省下了一部分研究生津贴,设法买了一台 Pentium III 550 Mhz、128MB 内存的电脑,并且像当时大多数印度电脑的标准配置一样,装着盗版的 Windows 98 系统。
我的宿舍房间上不了网。我不得不去附近的网吧,在那里下载软件,然后随身带着几十张软盘。
当我终于拥有了自己的计算机,我非常高兴,但有一点也让我感到困扰,那就是我无法用我的母语孟加拉语写东西。我碰到了 CDAC 提供的资源CDAC 是一个政府机构,它提供的印度语言工具是基于 ISCII 的ISCII 是一个较早的国家标准,而印度语的 Unicode 标准就是基于这个标准。很难学习它的键盘布局。
### 我的第一次贡献
不久后,我遇到了一款名叫 [Yudit][2] 的软件,它使用标准的 QWERTY 键盘布局来提供印地语的拼音输入。正是在通过 Yudit我第一次遇到了诸如开源和自由软件、GNU 和 Linux 之类的术语。Yudit 也允许我把 UI 组件翻译成孟加拉语,当我将翻译提交给开发人员时,他很高兴地将它们合并到了下一个版本中,并在软件的 README 文件中称赞了我的功劳。
第一次看到一款应用程序的用户元素以我的母语呈现,我感到十分兴奋。此外,尽管对写代码的知识几乎为零,我依然能够为软件开发做出贡献。我继续为 Yudit 创建了一个从 ISCII 到 Unicode 的转换器,这个转换器还可以用于各种印度语言之间的直译。我还买了本 Linux 杂志,随刊附赠了一张 Knoppix 的免费 live CD正是通过它我体验到了 Linux 桌面。
我面临的另一个问题是缺乏与 Unicode 兼容的 OpenType Bangla 字体。我使用的字体是共享软件,我需要为它支付许可费用。我在想,“为什么不尝试亲自开发呢?”在此过程中,我通过 bengalinux.org后来更名为 Ankur 小组)接触到了分散在世界各地的孟加拉语使用者,他们正试图在 Linux 操作系统中使用孟加拉语。
我加入了他们的邮件列表,我们在内部与当局之间讨论了孟加拉语的 Unicode 和 OpenType 规范中的各种缺陷,然后在适当的时候进行了纠正。我的贡献是将传统的孟加拉字体转换为兼容 Unicode 的 OpenType 字体,翻译 UI 等。这个小组还发行了世界上第一张带有孟加拉语 UI 的 Live Linux CD。
2003 年我搬家到了一个无法访问互联网的地方。我只有在周日去加尔各答时才能联系到小组。当时Linux 的孟加拉语本地化已经成为了主流。我们的一些志愿者加入了 Red Hat 从事翻译和字体开发工作。我也忙于我的医疗工作,几乎没时间去进行开源开发。
如今,我觉得使用 Linux 做日常工作比其他任何操作系统都要舒服。我也为能与一个能让人们用自己的语言交流的项目联系在一起而感到自豪。它也为长期以来由于不会说英语而被认为处于“<ruby>数字鸿沟<rt>digital divide</rt></ruby>”另一端的人们带来了计算能力。孟加拉语实际上是世界上使用最广泛的语言之一,这个项目消除了全球人口中很大一部分人接触数字科技的主要语言壁垒。
### 加入开源
加入到开源运动中来很容易。主动做一些对自己有用的事情,然后思索一下所做的事情如何能对他人也有帮助。关键在于使它免费可用,它可以给世界带来难以估量的价值。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/linux-bengali
作者:[Dr Anirban Mitra][a]
选题:[lujun9972][b]
译者:[JonnieWayy](https://github.com/JonnieWayy)
校对:[wxy](https://github.com/wxy )
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/mitradranirban
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/india-globe-map.jpg?itok=6sSEL5iO (India on the globe)
[2]: http://www.yudit.org/

View File

@ -1,63 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How failure-driven development makes you successful)
[#]: via: (https://opensource.com/article/20/3/failure-driven-development)
[#]: author: (Jessica Cherry https://opensource.com/users/jrepka)
How failure-driven development makes you successful
======
I'm the picture in the dictionary next to the word "failure"—and that's
why I'm good at my job.
![failure sign at a party, celebrating failure][1]
My job title is senior software engineer, but that's not what my closest co-workers call me. They call me "Cherrybomb" because of all the things I blow up. My regularly scheduled failures have been tracked down to our quarterly earnings and outage times. Literally, I am the production disaster you read about that says, "what not to do ever, in any case, at any time."
I started my career at a helpdesk where I wrote loops that wrecked servers in high-end companies. I have taken production applications down for up to eight hours without warning, and I have destroyed endless numbers of clusters in an attempt to make things better—and a couple just because I mistyped something.
I am the reason we have disaster recovery (DR) clusters in [Kubernetes][2]. I am the chaos engineer that, without warning, teaches people how to act and troubleshoot quickly when we have an application that has never been tested for an outage recovery plan. I exist as the best example of failure possible, and it's actually the coolest thing ever.
### Jess and the disappearing K8s clusters
One of my official responsibilities involves our application architecture. For any sort of architectural change, I get to make and test the code and see what is possible. Recently, this has been an epic pain in my bosses' side, to put it gently.
We run most of our infrastructure on Kubernetes, which is known for its resiliency. Despite that reputation, I managed to make two clusters just, well, disappear. You may be wondering how I could do that; it's pretty easy: **terraform destroy**. We manage our infrastructure as code through [Terraform][3], and it won't take any knowledge of the software to know that **destroy** can do something bad. Before you panic, it was the dev clusters, so life went on.
In light of this, it's reasonable to ask why I am still employed—and why am I writing about this. Those are easy to answer: I'm still employed because my infrastructure code updates work better and faster than the code we started with. And am I writing about this because everyone fails regularly; it is so very, very normal. If you're not failing regularly, I don't think you're trying hard enough to learn.
### Break things and train people
You'd also think no one would let me train anyone ever; that it's the worst idea ever because (as my team jokes) you should never, ever do the things I do. However, my boss has me train anyone walking in the door pretty regularly. I even provide training for entire teams using our infrastructure or code to teach people how to build their own infrastructure.
Here's why: Failure is your first step to success. Failure's lesson isn't just "backups are a fantastic idea." No, from failure, you learn to recover faster, troubleshoot quicker, and get amazingly better at your job. When you get amazing at your job, you can train others about what not to do and help them understand how everything works. Because of your experience, they will be a step ahead of you were when you started—and they, too, will most likely fail in new, amazing, epic ways that everyone can learn from.
### You are only as good as your failures
Nobody is born with talent in software engineering and cloud infrastructure, just like no one is born walking. We all start by rolling and bumping into things. From there, we learn to crawl and then stand for a moment or two. When we start walking, we fall and scratch our knees, bump our elbows, and—at least in my brother's case—walk right into a table's sharp corner and get stitches in the center of your eyebrow.
Things take time to learn. Read everything you can get your hands on to help you along your way—but that is always the beginning. Perfection is some fantasy that's impossible to achieve; you must fail to reach success.
Every step of the way, my failures teach me how to do things better.
Ultimately, you are only as good as the sum of your failures, because that's what shows you how successful you are.
Open source is about more than the code, its about the culture. The open culture that many open...
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/failure-driven-development
作者:[Jessica Cherry][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/jrepka
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fail_failure_celebrate.png?itok=LbvDAEZF (failure sign at a party, celebrating failure)
[2]: https://www.redhat.com/en/topics/containers/what-is-kubernetes
[3]: https://github.com/hashicorp/terraform

View File

@ -1,92 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Easy DNS configuration with PowerDNS for nameservers)
[#]: via: (https://opensource.com/article/20/5/powerdns)
[#]: author: (Jonathan Garrido https://opensource.com/users/jgarrido)
Easy DNS configuration with PowerDNS for nameservers
======
Use PDNS to provide a stable and reliable Domain Name System (DNS)
server for your project.
![Computer laptop in space][1]
A few months ago, we got a requirement to provide a stable and reliable Domain Name System ([DNS][2]) server for a new project. The project dealt with auto-deployment using containers and where each new environment would generate a unique, random URL. After a lot of research on possible solutions, we decided to give [PowerDNS][3] (PDNS) a try.
At the outset, we discovered that PowerDNS is supported in all major Linux distros, is available under the GPL license, and keeps its repositories up to date. We also found neat and well-organized [documentation][4] on the official site and tons of how-to's around the web from people who really like and use the product. After reading a few pages and learning some basic commands, PDNS was installed, up, and running, and our journey began.
### Database-driven
PowerDNS keeps its records in a SQL database. This was new for us, and not having to use flat files to keep records was a good change. We picked MariaDB as our power tool of choice, and since there is tons of advance information about the proper settings for installing the nameserver, we could set up and harden our database flawlessly.
### Easy configuration
The second thing that engaged us was all the features PDNS has in its config file. This file, pdns.conf, has a lot of options that you can enable or disable just by adding or removing the # sign. This was truly amazing because it gave us the chance to integrate this new service into our current infrastructure with only the values that we want, no more, no less, just the features that we need. A quick example:
Who can access your webserver?
```
`webserver-allow-from=172.10.0.1,172.10.1.2`
```
Can I forward requests based in a domain? Sure!
```
forward-zones=mylocal.io=127.0.0.1:5300
forward-zones+=example.com=172.10.0.5:53
forward-zones+=lucky.tech=172.10.1.5:53
```
### API included
We could activate using this config file, and this is when we started to meet PDNS's "power" by solving the first request from our development team, the API service. This feature gave us the ability to send requests to simply and cleanly create, modify, or remove records in our DNS server.
This API has some basic security parameters, so in just a few steps, you can control who has the right to interact with the nameserver based on a combination of an IP address and a pre-share key as a way of authentication. Here's what the configuration for this looks like:
```
api=yes
api-key=lkjdsfpoiernf
webserver-allow-from=172.10.7.13,172.10.7.5
```
### Logging
PDNS does an extraordinary job when it comes to logging. You can monitor your server and see how the machine is doing by using the log files and a simple built-in web server. Using a browser, you can see different types of statistics from the machine, like CPU usage and the DNS queries received. This is very valuable—for example, we were able to detect a few "not-so-healthy" PCs that were sending DNS requests to our server looking for sites that are related to malicious traffic. After digging into the logs, we could see where traffic was coming from and do a clean operation on those PCs.
### Other features
This is only a glimpse of all the things you can do with PowerDNS; there is much more to it. It is a complete nameserver with a lot of features and functionalities that make it worth giving it a try.
At this moment, we are not implementing [DNSSEC][5], but it appears that it can be put into production quickly with just one click. Also, PowerDNS has a nice approach when it comes to separating the recursor service from the nameserver. I read that it also supports [DNS RPZ][6] (Response Policy Zones), and there are also some very nice and well-designed frontends available that let you manage your server using a simple web browser, like the one in the image below.
![PowerDNS frontend][7]
([PowerDNS documentation][4], MIT License)
Believe it or not, you can boost your knowledge about DNS and IT ops a lot just by expending a few hours "playing" with PDNS.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/5/powerdns
作者:[Jonathan Garrido][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/jgarrido
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_space_graphic_cosmic.png?itok=wu493YbB (Computer laptop in space)
[2]: https://en.wikipedia.org/wiki/Domain_Name_System
[3]: https://www.powerdns.com/opensource.html
[4]: https://doc.powerdns.com/
[5]: https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions
[6]: https://dnsrpz.info/
[7]: https://opensource.com/sites/default/files/uploads/pdns.jpg (PowerDNS frontend)

View File

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

View File

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

View File

@ -0,0 +1,144 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Demonstrating Perl with Tic-Tac-Toe, Part 4)
[#]: via: (https://fedoramagazine.org/demonstrating-perl-with-tic-tac-toe-part-4/)
[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/)
Demonstrating Perl with Tic-Tac-Toe, Part 4
======
![][1]
This is the final article to the series demonstrating Perl with Tic-Tac-Toe. This article provides a module that can compute better game moves than the previously presented modules. For fun, the modules _chip1.pm_ through _chip3.pm_ can be incrementally moved out of the _hal_ subdirectory in reverse order. With each chip that is removed, the game will become easier to play. The game must be restarted each time a chip is removed.
### An example Perl program
Copy and paste the below code into a plain text file and use the same one-liner that was provided in the [the first article][2] of this series to strip the leading numbers. Name the version without the line numbers _chip3.pm_ and move it into the _hal_ subdirectory. Use the version of the game that was provided in [the second article][3] so that the below chip will automatically load when placed in the _hal_ subdirectory. Be sure to also include both _chip1.pm_ and _chip2.pm_ from the second [and third][4] articles, respectively, in the _hal_ subdirectory.
```
00 # artificial intelligence chip
01
02 package chip3;
03 require chip2;
04 require chip1;
05
06 use strict;
07 use warnings;
08
09 sub moverama {
10 my $game = shift;
11 my @nums = $game =~ /[1-9]/g;
12 my $rama = qr/[1973]/;
13 my %best;
14
15 for (@nums) {
16 my $ra = $_;
17 next unless $ra =~ $rama;
18 $best{$ra} = 0;
19 for (@nums) {
20 my $ma = $_;
21 next unless $ma =~ $rama;
22 if (($ra-$ma)*(10-$ra-$ma)) {
23 $best{$ra} += 1;
24 }
25 }
26 }
27
28 @nums = sort { $best{$b} <=> $best{$a} } keys %best;
29
30 return $nums[0];
31 }
32
33 sub hal_move {
34 my $game = shift;
35 my $mark = shift;
36 my @mark = @{ shift; };
37 my $move;
38
39 $move = chip2::win_move $game, $mark, \@mark;
40
41 if (not defined $move) {
42 $mark = ($mark eq $mark[0]) ? $mark[1] : $mark[0];
43 $move = chip2::win_move $game, $mark, \@mark;
44 }
45
46 if (not defined $move) {
47 $move = moverama $game;
48 }
49
50 if (not defined $move) {
51 $move = chip1::hal_move $game;
52 }
53
54 return $move;
55 }
56
57 sub complain {
58 print 'Just what do you think you\'re doing, ',
59 ((getpwnam($ENV{'USER'}))[6]||$ENV{'USER'}) =~ s! .*!!r, "?\n";
60 }
61
62 sub import {
63 no strict;
64 no warnings;
65
66 my $p = __PACKAGE__;
67 my $c = caller;
68
69 *{ $c . '::hal_move' } = \&{ $p . '::hal_move' };
70 *{ $c . '::complain' } = \&{ $p . '::complain' };
71
72 if (&::MARKS->[0] ne &::HAL9K) {
73 @{ &::MARKS } = reverse @{ &::MARKS };
74 }
75 }
76
77 1;
```
### How it works
Rather than making a random move or making a move based on probability, this final module to the Perl Tic-Tac-Toe game uses a more [deterministic][5] algorithm to calculate the best move.
The big takeaway from this Perl module is that it is yet another example of how references can be misused or abused, and as a consequence lead to unexpected program behavior. With the addition of this chip, the computer learns to cheat. Can you figure out how it is cheating? Hints:
1. Constants [are implemented as subroutines][6].
2. References allow data to be modified out of scope.
### Final notes
Line 12 demonstrates that a regular expression can be [pre-compiled][7] and stored in a scalar for later use. This is useful as performance optimization when you intend to re-use the same regular expression many times over.
Line 59 demonstrates that [some system library calls][8] are available directly in Perls built-in core functionality. Using the built-in functions alleviates some overhead that would otherwise be required to launch an external program and setup the I/O channels to communicate with it.
Lines 72 and 73 demonstrate the use of **&amp;::** as [a shorthand for **&amp;main::**][9].
The full source code for this Perl game can be cloned from the git repository available here: <https://pagure.io/tic-tac-toe.git>
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/demonstrating-perl-with-tic-tac-toe-part-4/
作者:[Gregory Bartholomew][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/glb/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2020/02/perl-tic-tac-toe-816x346.png
[2]: https://fedoramagazine.org/demonstrating-perl-with-tic-tac-toe-part-1/
[3]: https://fedoramagazine.org/demonstrating-perl-with-tic-tac-toe-part-2/
[4]: https://fedoramagazine.org/demonstrating-perl-with-tic-tac-toe-part-3/
[5]: https://en.wikipedia.org/wiki/Deterministic_system
[6]: https://perldoc.perl.org/5.32.0/constant.html#TECHNICAL-NOTES
[7]: https://perldoc.perl.org/5.8.2/perlretut.html#Compiling-and-saving-regular-expressions
[8]: https://perldoc.perl.org/5.8.2/functions/getpwnam.html
[9]: https://perldoc.perl.org/perlmod.html#Packages

View File

@ -0,0 +1,62 @@
[#]: collector: (lujun9972)
[#]: translator: (JonnieWayy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How failure-driven development makes you successful)
[#]: via: (https://opensource.com/article/20/3/failure-driven-development)
[#]: author: (Jessica Cherry https://opensource.com/users/jrepka)
失败驱动的开发如何使你成功
======
我是词典里 “failure” 一词旁边的插图,这就是为什么我擅长我的工作。
![failure sign at a party, celebrating failure][1]
我的职称是高级软件工程师,但这不是我最亲近的同事对我的称呼。由于我摧毁的一切,他们管我叫“樱桃炸弹”。我定期会遇到的失败已经可以追溯到我们的季度性收益和停机时间。字面上看,我是你所读到过的生产灾难,里面写道:“无论何时何地,什么事情永远都不要做。”
我的职业生涯始于服务台,在那里我写了一些损坏高端公司服务器的循环。我将生产应用程序关闭了长达八个小时而没有发出警告,并且在试图使得情况好转的过程中摧毁了无数个集群,其中两个是因为我输错了一些东西。
我是我们在 [Kubernetes][2] 中设有灾难恢复 DR集群的原因。我是个混乱的工程师当我们有从未经过停机恢复计划测试的应用程序时我会丝毫不带警告地去教人们如何快速采取行动并进行故障排除。我作为可能失败的最好例子而存在这实际上是有史以来最酷的事情。
### Jess 和消失的 K8s 集群
我的官方职责之一涉及到我们的应用架构。对于任何形式的架构改动,我都要进行代码的编写与测试,看看有什么可能性。近来,温和一点说,这成了我老板史诗级的痛苦。
We run most of our infrastructure on Kubernetes, which is known for its resiliency. Despite that reputation, I managed to make two clusters just, well, disappear. You may be wondering how I could do that; it's pretty easy: **terraform destroy**. We manage our infrastructure as code through [Terraform][3], and it won't take any knowledge of the software to know that **destroy** can do something bad. Before you panic, it was the dev clusters, so life went on.
我们在 Kubernetes 上运行我们的大多数基础架构, Kubernetes 以其弹性著称。尽管有这样的声誉,我还是使得两个集群,好吧,消失了。你可能会好奇我是怎么做到的,很容易,**Terraform 破坏**。我们通过 [Terraform][3] 将我们的基础架构作为代码进行管理,并且不需要任何软件知识就知道**破坏**可做坏事。在你恐慌之前,它是开发人员集群 dev cluster所以生活仍在继续。
考虑到这一点,有理由问我为什么还没丢掉饭碗,以及为什么我要写下关于这些事情的内容。这很好回答:我仍然有工作,因我的基础架构代码比起起初之时更新工作更好更快了。我写下关于这些事情的内容是因为每个人都时常会遭遇失败,这是非常非常正常的。如果你没有定期遭遇失败,我认为你并没有足够尽力地在学习。
### 破坏东西并训练人们
你可能还会认为永远不会有人让我去训练任何人。那是最糟糕的主意,因为(就像我的团队开玩笑说的)你永远都不应该做我所做的事情。但是我的老板定期让我去训练新人。我甚至会给整个团队提供训练,用我们自己的基础架构或代码去教人们如何构建他们自己的基础架构。
原因如下:失败是你迈向成功的第一步。失败的教训绝不只是“备份是个绝佳的主意”。不,从失败中,你学会更快地恢复、更快地排除故障并且在你工作中取得惊人的进步。当你对自己的工作感到惊叹时,你就可以训练其他人,教他们关于什么事情不要做,并且帮助他们去理解一切的工作原理。由于你的经验,他们会比你开始的地方更进一步 —— 并且他们也很可能会以每个人都能从中学到东西的新颖、惊人、史诗般的方式失败。
### 你的成功取决于你的失败
没有人生来就具有软件工程和云基础架构方面的天赋,就像没有人天生就会走路。我们都是从翻滚和碰撞中开始的。从那里开始,我们学会爬行,然后能够站立一会儿。当我们开始走路后,我们会跌倒并且擦伤膝盖,撞到手肘,还有 —— 至少在我哥哥的情况下 —— 走着走着撞上桌子的尖角,然后在眉毛中间缝了针。
凡事都需要时间去学习。一路上阅读手边能获得的一切来帮助你,但这永远只是个开始。完美是无法实现的幻想,你必须通过失败来取得成功。
每走一步,我的失败都教会我如何把事情做得更好。
最终,你的成功正如你失败的总和一样多,因为这标志着你成功的程度。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/failure-driven-development
作者:[Jessica Cherry][a]
选题:[lujun9972][b]
译者:[JonnieWayy](https://github.com/JonnieWayy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jrepka
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fail_failure_celebrate.png?itok=LbvDAEZF (failure sign at a party, celebrating failure)
[2]: https://www.redhat.com/en/topics/containers/what-is-kubernetes
[3]: https://github.com/hashicorp/terraform

View File

@ -1,55 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (JonnieWayy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (My Linux story: breaking language barriers with open source)
[#]: via: (https://opensource.com/article/20/7/linux-bengali)
[#]: author: (Dr Anirban Mitra https://opensource.com/users/mitradranirban)
我的Linux故事用开源打破语言壁垒
======
开源项目可以通过消除语言和其他障碍来帮着改变世界。
![India on the globe][1]
相较于我的许多同行和同事,我的开源之旅开始得着实很晚。
2000年我实现了我从高中开始的梦想——买一台属于我自己的个人计算机当时我正在攻读医学研究生学位。在那之前我对计算机的唯一接触是偶尔访问图书馆或网吧当时这些地方电脑使用的收费都相当高昂。所以我省下了一部分研究生津贴设法买了一台128MB RAM的Pentium III 500 Mhz并且像当时大多数印度电脑的标准配置一样装着盗版的Windows 98系统。
我的宿舍房间上不了网。我不得不去附近的网吧,在那里下载软件,然后随身带着几十张软盘。
当我终于拥有了自己的计算机我非常高兴但有一点也让我感到困扰那就是我无法用母语孟加拉语写东西。我碰到了CDAC提供的资源CDAC是一家提供基于ISCII的印度语言工具的政府机构ISCII是印度语言的Unicode标准所基于的较早的国家标准。很难学习它的键盘布局。
### 我的第一次贡献
不久后,我遇到了一款名叫[Yudit][2]的软件它使用标准的QWERTY键盘布局来提供印地语的语音输入。正是在通过Yudit我第一次遇到了诸如开源和自由软件、GNU和Linux的术语。Yudit也允许我把UI组件翻译成孟加拉语当我将翻译提交给开发人员时他很高兴地将它们合并到了下一个版本中并在软件的README文件中称赞了我的功劳。
就像第一次看到一款应用程序的用户元素以我的母语呈现我感到十分兴奋。此外尽管对写代码的知识几乎为零我依然能够为软件开发做出贡献。我继续为Yudit开发了一个从ISCII到Unicode的转换器这个转换器还可以用于各种印度语言之间的直译。我还买了本Linux杂志随刊附赠了一张Knoppix的免费live CD正是通过它我体验到了Linux桌面。
我面临的另一个问题是缺乏与Unicode兼容的OpenType Bangla字体的可用性。我使用的字体是shareware我需要为它支付许可费用。我在想“为什么不尝试亲自开发呢”在此过程中我通过`bengalinux.org`后来更名为Ankur小组与全球各地说孟加拉语的人联系这些人都试图使得孟加拉语能在Linux操作系统中被使用。
我加入了他们的邮件列表我们在内部与当局之间讨论了孟加拉语的Unicode和OpenType规范中的各种缺陷然后在适当的时候进行了纠正。我通过将遗留的孟加拉字体转换为Unicode兼容的OpenType字体翻译UI等途径做出了贡献。这个小组还发行了世界上第一张带有孟加拉语用户接口的Live Linux CD。
2003年我搬家到了一个无法访问互联网的地方。我只有在周日去加尔各答Kolkata时才能联系到小组。当时孟加拉语的Linux本地化版本已经成为了主流事物。我们的一些志愿者加入了Red Hat从事翻译和字体开发工作。我也忙于我的医疗工作几乎没时间去进行开源开发。
如今使用Linux进行日常工作比其他任何操作系统都庚使我感到舒适。我也为自己与一个允许人们用自己语言交流的项目有所关联二自豪。它也为长期以来由于不会说英语二被认为处于“数字鸿沟digital divide”另一端的人们带来了计算能力。孟加拉语实际上是世界上使用最广泛的语言之一这个项目消除了全球人口中很大一部分人接触数字科技的主要语言壁垒。
### 加入开源
加入到开源运动中来很容易。主动做一些对自己有用的事情,然后思索一下所做的事情如何能对他人也有帮助。关键在于使它免费可用,并且可以为世界增加不可估量的价值。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/linux-bengali
作者:[Dr Anirban Mitra][a]
选题:[lujun9972][b]
译者:[JonnieWayy](https://github.com/JonnieWayy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/mitradranirban
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/india-globe-map.jpg?itok=6sSEL5iO (India on the globe)
[2]: http://www.yudit.org/

View File

@ -0,0 +1,92 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Easy DNS configuration with PowerDNS for nameservers)
[#]: via: (https://opensource.com/article/20/5/powerdns)
[#]: author: (Jonathan Garrido https://opensource.com/users/jgarrido)
使用 PowerDNS 轻松配置 DNS nameserver
======
使用 PDNS 为你的项目提供稳定可靠的域名系统 DNS 服务器。
![Computer laptop in space][1]
几个月前,我们要求为新项目提供稳定可靠的域名系统 [DNS][2] 服务器。项目使用容器进行自动部署,每个新环境都会生成唯一的随机 URL。在对可能的方案进行了大量研究之后我们决定尝试 [PowerDNS][3]PDNS
一开始,我们发现 PowerDNS 在所有主流 Linux 发行版中都受支持,它是 GPL 许可,且仓库保持更新。我们还在官方网站上发现了整洁、组织良好的[文档][4],还有网上许多喜欢且在使用这个产品的人们许多的操作方法。看了一些并学习了一些基本命令之后,安装了 PDNS启动并运行我们的旅程开始了。
### 数据库驱动
PowerDNS 将记录保存在 SQL 数据库中。这对我们来说是新的,不必使用文本文件来保存记录是一个不错的更改。我们选择 MariaDB 作为首选的强大工具,由于有大量有关安装 nameserver 的正确设置信息,我们可以完美地设置和加固我们的数据库。
### 简单配置
使我们感兴趣的第二件事是 PDNS 的所有功能都在配置文件中。pdns.conf 有许多选项,你可以通过添加或删除#号来启用或禁用这些选项。这真是太神奇了,因为它使我们有机会将这项新服务集成到我们现有的基础架构中,并且只有我们想要的功能,不多也不少。一个简单的例子:
谁可以访问你的网络服务器?
```
`webserver-allow-from=172.10.0.1,172.10.1.2`
```
我可以转发基于域的请求吗?当然!
```
forward-zones=mylocal.io=127.0.0.1:5300
forward-zones+=example.com=172.10.0.5:53
forward-zones+=lucky.tech=172.10.1.5:53
```
### 包含 API
我们可以使用配置文件进行激活,通过解决我们开发团队的第一个请求 API 服务),我们见到了 PDNS 的强大。这个功能让我们通过发送请求,简单、干净地创建、修改或删除 DNS 服务器中的记录。
API 有一些基本的安全性参数,因此,只需几步,你就可以基于 IP 地址和预共享密钥验证的组合来控制谁有权与 nameserver 进行交互。这是配置文件的样子:
```
api=yes
api-key=lkjdsfpoiernf
webserver-allow-from=172.10.7.13,172.10.7.5
```
### 日志
在日志方面PDNS 做得非常出色。你可以使用日志文件和简单的内置 Web 服务器来监控服务器并查看计算机的运行状况。你可以使用浏览器查看服务器不同类型的统计信息,例如 CPU 使用率和收到的 DNS 查询。这非常有价值。例如,我们能够检测到一些“不太健康”的 PC它们正在向我们的服务器发送与恶意流量相关的站点的 DNS 请求。深入查看日志后,我们可以看到流量来自何处,并对这些 PC 进行清理操作。
### 其他功能
这只是你使用 PowerDNS 可以做的所有事情的一瞥。它还有更多的功能。它是一个拥有很多功能和特性的完整 nameserver因此值得一试。
目前,我们尚未部署 [DNSSEC][5],但似乎只需点击一下即可将其快速投入生产。另外,在将递归服务与 nameserver 分离时PowerDNS 有个不错的方法。我了解到它还支持 [DNS RPZ][6](响应策略区域),并且还提供了非常不错且设计良好的前端,可让你使用 Web 浏览器来管理服务器,如下图。
![PowerDNS frontend][7]
([PowerDNS 文档][4]MIT 许可)
信不信由你,你只需花费几个小时了解 PDNS就可以大大提高你对 DNS 和 IT 操作的了解。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/5/powerdns
作者:[Jonathan Garrido][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://opensource.com/users/jgarrido
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_space_graphic_cosmic.png?itok=wu493YbB (Computer laptop in space)
[2]: https://en.wikipedia.org/wiki/Domain_Name_System
[3]: https://www.powerdns.com/opensource.html
[4]: https://doc.powerdns.com/
[5]: https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions
[6]: https://dnsrpz.info/
[7]: https://opensource.com/sites/default/files/uploads/pdns.jpg (PowerDNS frontend)