From 320f18eeb054521b1ede4303a407eb4bacf3e080 Mon Sep 17 00:00:00 2001 From: MjSeven <33125422+MjSeven@users.noreply.github.com> Date: Sun, 25 Feb 2018 14:27:17 +0800 Subject: [PATCH 1/9] Delete 20180220 How slowing down made me a better leader.md --- ...ow slowing down made me a better leader.md | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 sources/talk/20180220 How slowing down made me a better leader.md diff --git a/sources/talk/20180220 How slowing down made me a better leader.md b/sources/talk/20180220 How slowing down made me a better leader.md deleted file mode 100644 index f42b7a8e5e..0000000000 --- a/sources/talk/20180220 How slowing down made me a better leader.md +++ /dev/null @@ -1,55 +0,0 @@ -Translating by MjSeven - -How slowing down made me a better leader -====== - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_leadership_brand.png?itok=YW1Syk4S) - -Early in my career, I thought the most important thing I could do was act. If my boss said jump, my reply was "how high?" - -But as I've grown as a leader and manager, I've realized that the most important traits I can offer are [patience][1] and listening. This patience and listening means I'm focusing on what's really important. I'm decisive, so I do not hesitate to act. Yet I've learned that my actions are more impactful when I consider input from multiple sources and offer advice on what we should be doing—not simply reacting to an immediate request. - -Practicing open leadership involves cultivating the patience and listening skills I need to collaborate on the [best plan of action, not just the quickest one][2]. It also gives me the tools I need to explain [why I'm saying "no"][3] (or, perhaps, "not now") to someone, so I can lead with transparency and confidence. - -If you're in software development and practice scrum, then the following argument might resonate with you: The patience and listening a manager displays are as important as her skills in sprint planning and running the sprint demo. Forget about them, and you'll lessen the impact you're able to have. - -### A focus on patience - -Focus and patience do not always come easily. Often, I find myself sitting in meetings and filling my notebook with action items. My default action can be to think: "We can simply do x and y will improve!" Then I remember that things are not so linear. - -I need to think about the other factors that can influence a situation. Pausing to take in data from multiple people and resources helps me flesh out a strategy that our organization needs for long-term success. It also helps me identify those shorter-term milestones that should lead us to deliver the business results I'm responsible for producing. - -Here's a great example from a time when patience wasn't something I valued as I should have—and how that hurt my performance. When I was based on North Carolina, I worked with someone based in Arizona. We didn't use video conferencing technologies, so I didn't get to observe her body language when we talked. While I was responsible for delivering the results for the project I led, she was one of the two people tasked with making sure I had adequate support. - -For whatever reason, when I talked with this person, when she asked me to do something, I did it. She would be providing input on my performance evaluation, so I wanted to make sure she was happy. At the time, I didn't possess the maturity to know I didn't need to make her happy; my focus should have been on other performance indicators. I should have spent more time listening and collaborating with her instead of picking up the first "action item" and working on it while she was still talking. - -After six months on the job, this person gave me some tough feedback. I was angry and sad. Didn't I do everything she'd asked? I had worked long hours, nearly seven days a week for six months. How dare she criticize my performance? - -Then, after I had my moment of anger followed by sadness, I thought about what she said. Her feedback was on point. - -The patience and listening a manager displays are as important as her skills in sprint planning and running the sprint demo. - -She had concerns about the project, and she held me accountable because I was responsible. We worked through the issues, and I learned that vital lesson about how to lead: Leadership does not mean "get it done right now." Leadership means putting together a strategy, then communicating and implementing plans in support of the strategy. It also means making mistakes and learning from these hiccups. - -### Lesson learned - -In hindsight, I realize I could have asked more questions to better understand the intent of her feedback. I also could have pushed back if the guidance from her did not align with other input I was receiving. By having the patience to listen to the various sources giving me input about the project, synthesizing what I learned, and creating a coherent plan for action, I would have been a better leader. I also would have had more purpose driving the work I was doing. Instead of reacting to a single data point, I would have been implementing a strategic plan. I also would have had a better performance evaluation. - -I eventually had some feedback for her. Next time we worked together, I didn't want to hear the feedback after six months. I wanted to hear the feedback earlier and more often so I could learn from the mistakes sooner. An ongoing discussion about the work is what should happen on any team. - -As I mature as a manager and leader, I hold myself to the same standards I ask my team to meet: Plan, work the plan, and reflect. Repeat. Don't let a fire drill created by an external force distract you from the plan you need to implement. Breaking work into small increments builds in space for reflections and adjustments to the plan. As Daniel Goleman writes, "Directing attention toward where it needs to go is a primal task of leadership." Don't be afraid of meeting this challenge. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/18/2/open-leadership-patience-listening - -作者:[Angela Robertson][a] -译者:[译者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/arobertson98 -[1]:https://opensource.com/open-organization/16/3/my-most-difficult-leadership-lesson -[2]:https://opensource.com/open-organization/16/3/fastest-result-isnt-always-best-result -[3]:https://opensource.com/open-organization/17/5/saying-no-open-organization From c452841b5f0db2ac3c5c2a4106f68e4990c0ecc1 Mon Sep 17 00:00:00 2001 From: MjSeven <33125422+MjSeven@users.noreply.github.com> Date: Sun, 25 Feb 2018 14:29:35 +0800 Subject: [PATCH 2/9] Create 20180220 How slowing down made me a better leader.md --- ...ow slowing down made me a better leader.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 translated/talk/20180220 How slowing down made me a better leader.md diff --git a/translated/talk/20180220 How slowing down made me a better leader.md b/translated/talk/20180220 How slowing down made me a better leader.md new file mode 100644 index 0000000000..55fdc8bc06 --- /dev/null +++ b/translated/talk/20180220 How slowing down made me a better leader.md @@ -0,0 +1,53 @@ +放慢速度是如何使我变得更好的领导者 +====== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_leadership_brand.png?itok=YW1Syk4S) + +在我职业生涯的早期,我认为我能做的最重要的事情就是行动。如果我的老板说跳,我的回答是“跳多高?” + +但是当我成长为一个领导者和管理者时,我意识到了我能提供的最重要的品质是 [耐心][1] 和倾听。耐心和倾听意味着我关注于真正重要的东西。我很果断,所以我会毫不犹豫地行动。然而我了解到,当我考虑来自多个来源的意见,并就我们应该做什么提供建议,而不仅仅是对眼前的请求做出反应时,我的行动更具影响力。 + +实行开放式领导需要培养耐心和倾听技能,我需要在[最佳行动计划上进行合作,而不仅仅是最快的计划][2]。它还为我提供了一些工具,以解释 [为什么我会对某人说“不”][3] (或者,也许是“不是现在”),这样我就能以透明和自信的方式领导。 + +如果你正在进行软件开发和实践 scrum 中,那么下面的观点可能会引起你的共鸣:在 sprint 计划和 sprint 演示中,耐心和倾听经理的表现和它的技能一样重要。(译注: scrum 是迭代式增量软件开发过程,通常用于敏捷软件开发。 sprint 计划和 sprint 演示是其中的两个术语。)忘掉它们,你会减少你能够产生的影响。 + +### 专注于耐心 + +专注和耐心并不总是容易的。通常,我发现自己正坐在会议上,用行动项目填满我的笔记本时,我一般会思考:“我们可以简单地对 x 和 y 进行改进”。然后我记得事情不是那么线性的。(译者注:这句话感觉翻译得并不通顺) + +我需要考虑可能影响情况的其他因素。暂停下来从多个人和资源中获取数据可以帮我充实策略,以确保出组织长期成功。它还帮助我确定那些短期的里程碑,这些里程碑应该会让我负责生产的业务完成交付。 + +这里有一个很好的例子,以前耐心不是我认为应该拥有的东西,而这又是如何影响了我的表现。当我在北卡罗来纳州工作时,我与一个在亚利桑那州的人共事。我们没有使用视频会议技术,所以当我们交谈时我没有看到她的肢体语言。然而当我负责为我领导的项目交付结果时,她是确保我获得足够支持的两个人之一。 + +无论出于何种原因,当我与她交谈时,当她要求我做某件事时,我做了。她会为我的绩效评估提供意见,所以我想确保她高兴。那时,我还不够成熟不懂得其实没必要非要让她开心;我的重点应该放在其他绩效指标上。我本应该花更多的时间倾听并与她合作,而不是在她还在说话的时候拿起第一个“行动项目”并开始工作。 + +在工作六个月后,她给了我一些负面的反馈。 我很生气,很伤心。 我没有做她所要求的一切吗? 我工作了很长时间,每周工作近七天,为期六个月。 她怎么敢批评我的表现? + +然后,在我经历了愤怒和悲伤之后,我想到了她说的话,她的反馈很重要。 + +在 sprint 计划和 sprint 演示中,耐心和倾听经理的表现和它的技能一样重要。 + +她对这个项目感到担忧,她继续让我负责是因为我是项目的负责人。我们解决了问题,并且我学到了关于如何领导的重要课程:领导力并不意味着“现在就完成”。 领导力意味着制定战略,然后制定沟通和实施支持战略的计划。这也意味着犯错和从这些问题中学习。 + +### 经验教训 + +事后看来,我意识到我可以提出更多的问题来更好地理解她的反馈意图。如果她的指导不符合我收到的其他意见,我也可能会推迟。通过耐心倾听给我的关于项目的各种信息来源,综合我所学到的知识,并创建一个连贯的行动计划,我会成为一个更好的领导者。我也会有更多的目的来推动我正在做的工作。 我不会对单个数据点做出反应,而是会实施一项战略计划。 这样我也会有一个更好的绩效评估。 + +我最终对她有一些反馈。 下次我们一起工作时,我不想在六个月后听到反馈意见。 我想早些时候和更频繁地听到反馈意见,以便我能够尽早从错误中学习。 关于这项工作的持续讨论是任何团队都应该发生的事情。 + +当我成为一名管理者和领导者时,我坚持要求我的团队达到相同的标准:计划,制定计划并反思。 重复。 不要让外力造成的麻烦让你偏离你需要实施的计划。 将工作分成小的增量,以便反思和调整计划。 正如 Daniel Goleman 写道:“把注意力放在需要的地方是领导力的一个主要任务。” 不要害怕面对这个挑战。 + +-------------------------------------------------------------------------------- + +via: [https://opensource.com/open-organization/18/2/open-leadership-patience-listening](https://opensource.com/open-organization/18/2/open-leadership-patience-listening) + +作者:[Angela Robertson][a] +译者:[MjSeven](https://github.com/MjSeven) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/arobertson98 +[1]:https://opensource.com/open-organization/16/3/my-most-difficult-leadership-lesson +[2]:https://opensource.com/open-organization/16/3/fastest-result-isnt-always-best-result +[3]:https://opensource.com/open-organization/17/5/saying-no-open-organization From d1b9c138f2c8208c44432ccc65495d178ffc42f5 Mon Sep 17 00:00:00 2001 From: MjSeven <33125422+MjSeven@users.noreply.github.com> Date: Sun, 25 Feb 2018 14:32:33 +0800 Subject: [PATCH 3/9] Update 20180220 How slowing down made me a better leader.md --- .../talk/20180220 How slowing down made me a better leader.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/talk/20180220 How slowing down made me a better leader.md b/translated/talk/20180220 How slowing down made me a better leader.md index 55fdc8bc06..62d788fc0b 100644 --- a/translated/talk/20180220 How slowing down made me a better leader.md +++ b/translated/talk/20180220 How slowing down made me a better leader.md @@ -19,7 +19,7 @@ 这里有一个很好的例子,以前耐心不是我认为应该拥有的东西,而这又是如何影响了我的表现。当我在北卡罗来纳州工作时,我与一个在亚利桑那州的人共事。我们没有使用视频会议技术,所以当我们交谈时我没有看到她的肢体语言。然而当我负责为我领导的项目交付结果时,她是确保我获得足够支持的两个人之一。 -无论出于何种原因,当我与她交谈时,当她要求我做某件事时,我做了。她会为我的绩效评估提供意见,所以我想确保她高兴。那时,我还不够成熟不懂得其实没必要非要让她开心;我的重点应该放在其他绩效指标上。我本应该花更多的时间倾听并与她合作,而不是在她还在说话的时候拿起第一个“行动项目”并开始工作。 +无论出于何种原因,当我与她交谈时,当她要求我做某件事时,我做了。她会为我的绩效评估提供意见,所以我想确保她高兴。那时,我还不够成熟不懂得其实没必要非要让她开心;我的重点应该放在其他绩效指标上。我本应该花更多的时间倾听并与她合作,而不是在她还在说话的时候拿起第一个“行动项目”并开始工作。 在工作六个月后,她给了我一些负面的反馈。 我很生气,很伤心。 我没有做她所要求的一切吗? 我工作了很长时间,每周工作近七天,为期六个月。 她怎么敢批评我的表现? From 010bbc888cb71465fe8e2d4fbf7021b9364e959b Mon Sep 17 00:00:00 2001 From: MjSeven <33125422+MjSeven@users.noreply.github.com> Date: Sun, 25 Feb 2018 14:33:22 +0800 Subject: [PATCH 4/9] Update 20180220 How slowing down made me a better leader.md --- .../talk/20180220 How slowing down made me a better leader.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/talk/20180220 How slowing down made me a better leader.md b/translated/talk/20180220 How slowing down made me a better leader.md index 62d788fc0b..cfca276cf9 100644 --- a/translated/talk/20180220 How slowing down made me a better leader.md +++ b/translated/talk/20180220 How slowing down made me a better leader.md @@ -19,7 +19,7 @@ 这里有一个很好的例子,以前耐心不是我认为应该拥有的东西,而这又是如何影响了我的表现。当我在北卡罗来纳州工作时,我与一个在亚利桑那州的人共事。我们没有使用视频会议技术,所以当我们交谈时我没有看到她的肢体语言。然而当我负责为我领导的项目交付结果时,她是确保我获得足够支持的两个人之一。 -无论出于何种原因,当我与她交谈时,当她要求我做某件事时,我做了。她会为我的绩效评估提供意见,所以我想确保她高兴。那时,我还不够成熟不懂得其实没必要非要让她开心;我的重点应该放在其他绩效指标上。我本应该花更多的时间倾听并与她合作,而不是在她还在说话的时候拿起第一个“行动项目”并开始工作。 +无论出于何种原因,当我与她交谈时,当她要求我做某件事时,我做了。她会为我的绩效评估提供意见,所以我想确保她高兴。那时,我还不够成熟不懂得其实没必要非要讨她开心;我的重点应该放在其他绩效指标上。我本应该花更多的时间倾听并与她合作,而不是在她还在说话的时候拿起第一个“行动项目”并开始工作。 在工作六个月后,她给了我一些负面的反馈。 我很生气,很伤心。 我没有做她所要求的一切吗? 我工作了很长时间,每周工作近七天,为期六个月。 她怎么敢批评我的表现? From c120bbf95936de0c4ceb174448619892b2d99ff1 Mon Sep 17 00:00:00 2001 From: qhwdw Date: Sun, 25 Feb 2018 20:18:56 +0800 Subject: [PATCH 5/9] Translated by qhwdw --- ...171214 IPv6 Auto-Configuration in Linux.md | 110 ------------------ ...171214 IPv6 Auto-Configuration in Linux.md | 109 +++++++++++++++++ 2 files changed, 109 insertions(+), 110 deletions(-) delete mode 100644 sources/tech/20171214 IPv6 Auto-Configuration in Linux.md create mode 100644 translated/tech/20171214 IPv6 Auto-Configuration in Linux.md diff --git a/sources/tech/20171214 IPv6 Auto-Configuration in Linux.md b/sources/tech/20171214 IPv6 Auto-Configuration in Linux.md deleted file mode 100644 index d2acadfe69..0000000000 --- a/sources/tech/20171214 IPv6 Auto-Configuration in Linux.md +++ /dev/null @@ -1,110 +0,0 @@ -Translating by qhwdw -IPv6 Auto-Configuration in Linux -====== - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/banner_5.png?itok=3kN83IjL) - -In [Testing IPv6 Networking in KVM: Part 1][1], we learned about unique local addresses (ULAs). In this article, we will learn how to set up automatic IP address configuration for ULAs. - -### When to Use Unique Local Addresses - -Unique local addresses use the fd00::/8 address block, and are similar to our old friends the IPv4 private address classes: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. But they are not intended as a direct replacement. IPv4 private address classes and network address translation (NAT) were created to alleviate the shortage of IPv4 addresses, a clever hack that prolonged the life of IPv4 for years after it should have been replaced. IPv6 supports NAT, but I can't think of a good reason to use it. IPv6 isn't just bigger IPv4; it is different and needs different thinking. - -So what's the point of ULAs, especially when we have link-local addresses (fe80::/10) and don't even need to configure them? There are two important differences. One, link-local addresses are not routable, so you can't cross subnets. Two, you control ULAs; choose your own addresses, make subnets, and they are routable. - -Another benefit of ULAs is you don't need an allocation of global unicast IPv6 addresses just for mucking around on your LAN. If you have an allocation from a service provider then you don't need ULAs. You can mix global unicast addresses and ULAs on the same network, but I can't think of a good reason to have both, and for darned sure you don't want to use network address translation (NAT) to make ULAs publicly accessible. That, in my peerless opinion, is daft. - -ULAs are for private networks only and should be blocked from leaving your network, and not allowed to roam the Internet. Which should be simple, just block the whole fd00::/8 range on your border devices. - -### Address Auto-Configuration - -ULAs are not automatic like link-local addresses, but setting up auto-configuration is easy as pie with radvd, the router advertisement daemon. Before you change anything, run `ifconfig` or `ip addr show` to see your existing IP addresses. - -You should install radvd on a dedicated router for production use, but for testing you can install it on any Linux PC on your network. In my little KVM test lab, I installed it on Ubuntu, `apt-get install radvd`. It should not start after installation, because there is no configuration file: -``` -$ sudo systemctl status radvd -● radvd.service - LSB: Router Advertising Daemon - Loaded: loaded (/etc/init.d/radvd; bad; vendor preset: enabled) - Active: active (exited) since Mon 2017-12-11 20:08:25 PST; 4min 59s ago - Docs: man:systemd-sysv-generator(8) - -Dec 11 20:08:25 ubunut1 systemd[1]: Starting LSB: Router Advertising Daemon... -Dec 11 20:08:25 ubunut1 radvd[3541]: Starting radvd: -Dec 11 20:08:25 ubunut1 radvd[3541]: * /etc/radvd.conf does not exist or is empty. -Dec 11 20:08:25 ubunut1 radvd[3541]: * See /usr/share/doc/radvd/README.Debian -Dec 11 20:08:25 ubunut1 radvd[3541]: * radvd will *not* be started. -Dec 11 20:08:25 ubunut1 systemd[1]: Started LSB: Router Advertising Daemon. - -``` - -It's a little confusing with all the start and not started messages, but radvd is not running, which you can verify with good old `ps|grep radvd`. So we need to create `/etc/radvd.conf`. Copy this example, replacing the network interface name on the first line with your interface name: -``` -interface ens7 { - AdvSendAdvert on; - MinRtrAdvInterval 3; - MaxRtrAdvInterval 10; - prefix fd7d:844d:3e17:f3ae::/64 - { - AdvOnLink on; - AdvAutonomous on; - }; - -}; - -``` - -The prefix defines your network address, which is the first 64 bits of the address. The first two characters must be `fd`, then you define the remainder of the prefix, and leave the last 64 bits empty as radvd will assign the last 64 bits. The next 16 bits after the prefix define the subnet, and the remaining bits define the host address. Your subnet size must always be /64. RFC 4193 requires that addresses be randomly generated; see [Testing IPv6 Networking in KVM: Part 1][1] for more information on creating and managing ULAs. - -### IPv6 Forwarding - -IPv6 forwarding must be enabled. This command enables it until restart: -``` -$ sudo sysctl -w net.ipv6.conf.all.forwarding=1 - -``` - -Uncomment or add this line to `/etc/sysctl.conf` to make it permanent: -``` -net.ipv6.conf.all.forwarding = 1 -``` - -Start the radvd daemon: -``` -$ sudo systemctl stop radvd -$ sudo systemctl start radvd - -``` - -This example reflects a quirk I ran into on my Ubuntu test system; I always have to stop radvd, no matter what state it is in, and then start it to apply any changes. - -You won't see any output on a successful start, and often not on a failure either, so run `sudo systemctl radvd status`. If there are errors, systemctl will tell you. The most common errors are syntax errors in `/etc/radvd.conf`. - -A cool thing I learned after complaining on Twitter: when you run ` journalctl -xe --no-pager` to debug systemctl errors, your output lines will wrap, and then you can actually read your error messages. - -Now check your hosts to see their new auto-assigned addresses: -``` -$ ifconfig -ens7 Link encap:Ethernet HWaddr 52:54:00:57:71:50 - [...] - inet6 addr: fd7d:844d:3e17:f3ae:9808:98d5:bea9:14d9/64 Scope:Global - [...] - -``` - -And there it is! Come back next week to learn how to manage DNS for ULAs, so you can use proper hostnames instead of those giant IPv6 addresses. - -Learn more about Linux through the free ["Introduction to Linux" ][2]course from The Linux Foundation and edX. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/learn/intro-to-linux/2017/12/ipv6-auto-configuration-linux - -作者:[Carla Schroder][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linux.com/users/cschroder -[1]:https://www.linux.com/learn/intro-to-linux/2017/11/testing-ipv6-networking-kvm-part-1 -[2]:https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux diff --git a/translated/tech/20171214 IPv6 Auto-Configuration in Linux.md b/translated/tech/20171214 IPv6 Auto-Configuration in Linux.md new file mode 100644 index 0000000000..bc0a2e84f3 --- /dev/null +++ b/translated/tech/20171214 IPv6 Auto-Configuration in Linux.md @@ -0,0 +1,109 @@ +在 Linux 中自动配置 IPv6 地址 +====== + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/banner_5.png?itok=3kN83IjL) + +在 [ KVM 中测试 IPv6 网络:第 1 部分][1] 一文中,我们学习了关于唯一本地地址(ULAs)的相关内容。在本文中,我们将学习如何为 ULAs 自动配置 IP 地址。 + +### 何时使用唯一本地地址 + +唯一本地地址使用 fd00::/8 地址块,它类似于我们常用的 IPv4 的私有地址:10.0.0.0/8、172.16.0.0/12、以及 192.168.0.0/16。但它们并不能直接替换。IPv4 的私有地址分类和网络地址转换(NAT)功能是为了缓解 IPv4 地址短缺的问题,这是个明智的解决方案,它延缓了本该被替换的 IPv4 的生命周期。IPv6 也支持 NAT,但是我想不出使用它的理由。IPv6 的地址数量远远大于 IPv4;它是不一样的,因此需要做不一样的事情。 + +那么,ULAs 存在的意义是什么呢?尤其是在我们已经有了本地链路地址(fe80::/10)时,到底需不需要我们去配置它们呢?它们之间(译者注:指的是唯一本地地址和本地链路地址)有两个重要的区别。一是,本地链路地址是不可路由的,因此,你不能跨子网使用它。二是,ULAs 是你自己管理的;你可以自己选择它用于子网的地址范围,并且它们是可路由的。 + +使用 ULAs 的另一个好处是,如果你只是在局域网中“混日子”的话,你不需要为它们分配全局单播 IPv6 地址。当然了,如果你的 ISP 已经为你分配了 IPv6 的全局单播地址,就不需要使用 ULAs 了。你也可以在同一个网络中混合使用全局单播地址和 ULAs,但是,我想不出这样使用的一个好理由,并且要一定确保你不使用网络地址转换以使 ULAs 可公共访问。在我看来,这是很愚蠢的行为。 + +ULAs 是仅为私有网络使用的,并且它会阻塞所有流出你的网络的数据包,不允许进入因特网。这很简单,在你的边界设备上只要阻止整个 fd00::/8 范围的 IPv6 地址即可实现。 + +### 地址自动配置 + +ULAs 不像本地链路地址那样自动配置的,但是使用 radvd 设置自动配置是非常容易的,radva 是路由器公告守护程序。在你开始之前,运行 `ifconfig` 或者 `ip addr show` 去查看你现有的 IP 地址。 + +在生产系统上使用时,你应该将 radvd 安装在一台单独的路由器上,如果只是测试使用,你可以将它安装在你的网络中的任意 Linux PC 上。在我的小型 KVM 测试实验室中,我使用 `apt-get install radvd` 命令把它安装在 Ubuntu 上。安装完成之后,我先不启动它,因为它还没有配置文件: +``` +$ sudo systemctl status radvd +● radvd.service - LSB: Router Advertising Daemon + Loaded: loaded (/etc/init.d/radvd; bad; vendor preset: enabled) + Active: active (exited) since Mon 2017-12-11 20:08:25 PST; 4min 59s ago + Docs: man:systemd-sysv-generator(8) + +Dec 11 20:08:25 ubunut1 systemd[1]: Starting LSB: Router Advertising Daemon... +Dec 11 20:08:25 ubunut1 radvd[3541]: Starting radvd: +Dec 11 20:08:25 ubunut1 radvd[3541]: * /etc/radvd.conf does not exist or is empty. +Dec 11 20:08:25 ubunut1 radvd[3541]: * See /usr/share/doc/radvd/README.Debian +Dec 11 20:08:25 ubunut1 radvd[3541]: * radvd will *not* be started. +Dec 11 20:08:25 ubunut1 systemd[1]: Started LSB: Router Advertising Daemon. + +``` + +这些所有的消息有点让人困惑,实际上 radvd 并没有运行,你可以使用经典命令 `ps|grep radvd` 来验证这一点。因此,我们现在需要去创建 `/etc/radvd.conf` 文件。拷贝这个示例,将第一行的网络接口名替换成你自己的接口名字: +``` +interface ens7 { + AdvSendAdvert on; + MinRtrAdvInterval 3; + MaxRtrAdvInterval 10; + prefix fd7d:844d:3e17:f3ae::/64 + { + AdvOnLink on; + AdvAutonomous on; + }; + +}; + +``` + +前缀定义了你的网络地址,它是地址的前 64 位。前两个字符必须是 `fd`,前缀接下来的剩余部分你自己定义它,最后的 64 位留空,因为 radvd 将去分配最后的 64 位。前缀后面的 16 位用来定义子网,剩余的地址定义为主机地址。你的子网必须总是 /64。RFC 4193 要求地址必须随机生成;查看 [在 KVM 中测试 IPv6 Networking:第 1 部分][1] 学习创建和管理 ULAs 的更多知识。 + +### IPv6 转发 + +IPv6 转发必须要启用。下面的命令去启用它,重启后生效: +``` +$ sudo sysctl -w net.ipv6.conf.all.forwarding=1 + +``` + +取消注释或者添加如下的行到 `/etc/sysctl.conf` 文件中,以使它永久生效: +``` +net.ipv6.conf.all.forwarding = 1 +``` + +启动 radvd 守护程序: +``` +$ sudo systemctl stop radvd +$ sudo systemctl start radvd + +``` + +这个示例在我的 Ubuntu 测试系统中遇到了一个怪事;radvd 总是停止,我查看它的状态却没有任何问题,做任何改变之后都需要重新启动 radvd。 + +启动成功后没有任何输出,并且失败也是如此,因此,需要运行 `sudo systemctl radvd status` 去查看它的运行状态。如果有错误,systemctl 会告诉你。一般常见的错误都是 `/etc/radvd.conf` 中的语法错误。 + +在 Twitter 上抱怨了上述问题之后,我学到了一件很酷的技巧:当你运行 ` journalctl -xe --no-pager` 去调试 systemctl 错误时,你的输出将被封装打包,然后,你就可以看到错误信息。 + +现在检查你的主机,查看它们自动分配的新地址: +``` +$ ifconfig +ens7 Link encap:Ethernet HWaddr 52:54:00:57:71:50 + [...] + inet6 addr: fd7d:844d:3e17:f3ae:9808:98d5:bea9:14d9/64 Scope:Global + [...] + +``` + +本文到此为止,下周继续学习如何为 ULAs 管理 DNS,这样你就可以使用一个合适的主机名来代替这些长长的 IPv6 地址。 + +通过来自 Linux 基金会和 edX 的 ["Linux 入门" ][2] 免费课程学习更多 Linux 的知识。 + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/learn/intro-to-linux/2017/12/ipv6-auto-configuration-linux + +作者:[Carla Schroder][a] +译者:[qhwdw](https://github.com/qhwdw) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linux.com/users/cschroder +[1]:https://www.linux.com/learn/intro-to-linux/2017/11/testing-ipv6-networking-kvm-part-1 +[2]:https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux From b95740f5f17ba1faf9a02e3f426bdd0fe241f908 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 26 Feb 2018 08:52:42 +0800 Subject: [PATCH 6/9] translated --- ...180209 Gnome without chrome-gnome-shell.md | 50 ------------------- ...180209 Gnome without chrome-gnome-shell.md | 48 ++++++++++++++++++ 2 files changed, 48 insertions(+), 50 deletions(-) delete mode 100644 sources/tech/20180209 Gnome without chrome-gnome-shell.md create mode 100644 translated/tech/20180209 Gnome without chrome-gnome-shell.md diff --git a/sources/tech/20180209 Gnome without chrome-gnome-shell.md b/sources/tech/20180209 Gnome without chrome-gnome-shell.md deleted file mode 100644 index f885234bbb..0000000000 --- a/sources/tech/20180209 Gnome without chrome-gnome-shell.md +++ /dev/null @@ -1,50 +0,0 @@ -translating---geekpi - -Gnome without chrome-gnome-shell -====== - -New laptop, has a touchscreen, can be folded into a tablet, I heard gnome-shell would be a good choice of desktop environment, and I managed to tweak it enough that I can reuse existing habits. - -I have a big problem, however, with how it encourages one to download random extensions off the internet and run them as part of the whole desktop environment. I have an even bigger problem with [gnome-core][1] having a hard dependency on [chrome-gnome-shell][2], a plugin which cannot be disabled without root editing files in `/etc`, which exposes parts of my destktop environment to websites. - -Visit [this site][3] and it will know which extensions you have installed, and it will be able to install more. I do not trust that, I do not need that, I do not want that. I am horrified by the idea of that. - -[I made a workaround.][4] - -How can one do the same for firefox? - -### Description - -chrome-gnome-shell is a hard dependency of gnome-core, and it installs a browser plugin that one may not want, and mandates its use by system-wide chrome policies. - -I consider having chrome-gnome-shell an unneeded increase of the attack surface of my system, in exchange for the dubious privilege of being able to download and execute, as my main user, random unreviewed code. - -This package satifies the chrome-gnome-shell dependency, but installs nothing. - -Note that after installing this package you need to purge chrome-gnome-shell if it was previously installed, to have it remove its chromium policy files in /etc/chromium - -### Instructions -``` -apt install equivs -equivs-build contain-gnome-shell -sudo dpkg -i contain-gnome-shell_1.0_all.deb -sudo dpkg --purge chrome-gnome-shell - -``` - - --------------------------------------------------------------------------------- - -via: http://www.enricozini.org/blog/2018/debian/gnome-without-chrome-gnome-shell/ - -作者:[Enrico Zini][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.enricozini.org/ -[1]:https://packages.debian.org/gnome-core -[2]:https://packages.debian.org/chrome-gnome-shell -[3]:https://extensions.gnome.org/ -[4]:https://salsa.debian.org/enrico/contain-gnome-shell diff --git a/translated/tech/20180209 Gnome without chrome-gnome-shell.md b/translated/tech/20180209 Gnome without chrome-gnome-shell.md new file mode 100644 index 0000000000..4dd2e0e4c7 --- /dev/null +++ b/translated/tech/20180209 Gnome without chrome-gnome-shell.md @@ -0,0 +1,48 @@ +没有 chrome-gnome-shell 的 Gnome +====== + +新的笔记本有触摸屏,它可以折叠成平板电脑,我听说 gnome-shell 将是桌面环境的一个很好的选择,我设法调整它足以按照现有的习惯重用。 + +然而,我有一个很大的问题,它怎么会鼓励人们从互联网上下载随机扩展,并将它们作为整个桌面环境的一部分运行。 一个更大的问题是,[gnome-core][1] 对 [chrome-gnome-shell] [2] 有强制依赖,插件不用 root 用户编辑 `/etc` 下的文件则无法禁用,这会给网站暴露我的桌面环境。 + +访问[这个网站][3],它会知道你已经安装了哪些扩展,并且能够安装更多。我不信任它,我不需要那样,我不想那样。我为此感到震惊。 + +[我想出了一个临时解决方法][4]。 + +人们会在 firefox 中如何做呢? + +### 描述 + +chrome-gnome-shell 是 gnome-core 的一个强制依赖项,它安装了一个可能不需要的浏览器插件,并强制它使用系统范围的 chrome 策略。 + +我认为使用 chrome-gnome-shell 会不必要地增加系统的攻击面,我作为主要用户,它会获取下载和执行随机未经审查代码的可疑特权。 + +这个包满足了 chrome-gnome-shell 的依赖,但不会安装任何东西。 + +请注意,在安装此包之后,如果先前安装了 chrome-gnome-shell,则需要清除 chrome-gnome-shell,以使其在 /etc/chromium 中删除 chromium 策略文件 + +### 说明 +``` +apt install equivs +equivs-build contain-gnome-shell +sudo dpkg -i contain-gnome-shell_1.0_all.deb +sudo dpkg --purge chrome-gnome-shell + +``` + + +-------------------------------------------------------------------------------- + +via: http://www.enricozini.org/blog/2018/debian/gnome-without-chrome-gnome-shell/ + +作者:[Enrico Zini][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.enricozini.org/ +[1]:https://packages.debian.org/gnome-core +[2]:https://packages.debian.org/chrome-gnome-shell +[3]:https://extensions.gnome.org/ +[4]:https://salsa.debian.org/enrico/contain-gnome-shell From 2dfc74fa2032538d6f3e7b251717068b458852af Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 26 Feb 2018 09:01:19 +0800 Subject: [PATCH 7/9] translating --- .../tech/20180203 3 Ways to Extend the Power of Kubernetes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20180203 3 Ways to Extend the Power of Kubernetes.md b/sources/tech/20180203 3 Ways to Extend the Power of Kubernetes.md index 1ea2b2b328..9e2c0368f8 100644 --- a/sources/tech/20180203 3 Ways to Extend the Power of Kubernetes.md +++ b/sources/tech/20180203 3 Ways to Extend the Power of Kubernetes.md @@ -1,3 +1,5 @@ +translating---geekpi + 3 Ways to Extend the Power of Kubernetes ====== From 57f52e20b8ea5273835a34c866fc6b22b063d5fe Mon Sep 17 00:00:00 2001 From: amwps290 Date: Mon, 26 Feb 2018 11:26:47 +0800 Subject: [PATCH 8/9] Delete 20171016 Make -rm- Command To Move The Files To -Trash Can- Instead Of Removing Them Completely.md --- ...an- Instead Of Removing Them Completely.md | 114 ------------------ 1 file changed, 114 deletions(-) delete mode 100644 sources/tech/20171016 Make -rm- Command To Move The Files To -Trash Can- Instead Of Removing Them Completely.md diff --git a/sources/tech/20171016 Make -rm- Command To Move The Files To -Trash Can- Instead Of Removing Them Completely.md b/sources/tech/20171016 Make -rm- Command To Move The Files To -Trash Can- Instead Of Removing Them Completely.md deleted file mode 100644 index d63f75a1db..0000000000 --- a/sources/tech/20171016 Make -rm- Command To Move The Files To -Trash Can- Instead Of Removing Them Completely.md +++ /dev/null @@ -1,114 +0,0 @@ -amwps290 translating -Make “rm” Command To Move The Files To “Trash Can” Instead Of Removing Them Completely -====== -Human makes mistake because we are not a programmed devices so, take additional care while using `rm` command and don't use `rm -rf *` at any point of time. When you use rm command it will delete the files permanently and doesn't move those files to `Trash Can` like how file manger does. - -Sometimes we delete by mistake and sometimes it happens accidentally, so what to do when it happens? You have to look recovery tools (There are plenty of data recovery tools available in Linux) but we don't know it can able to recover 100% so, how to overcome this? - -We have recently published an article about [Trash-Cli][1], in the comment section we got an update about [saferm.sh][2] script from the user called Eemil Lgz which help us to move the files to "Trash Can" instead of deleting them permanently. - -Moving files to "Trash Can" is a good idea, that save you when you run `rm` command accidentally but few people would say it's a bad habit of course, if you are not taking care the "Trash Can" it might be accumulated with files & folders after certain duration. In this case i would advise you to create a cronjob as per your wish. - -This works on both environments like Server & Desktop. If script detecting **GNOME or KDE or Unity or LXDE** Desktop Environment (DE) then it move files or folders safely to default trash **$HOME/.local/share/Trash/files** else it creates trash folder in your home directory **$HOME/Trash**. - -saferm.sh Script is hosted in github, either clone below repository or Create a file called saferm.sh and past the code on it. -``` -$ git clone https://github.com/lagerspetz/linux-stuff -$ sudo mv linux-stuff/scripts/saferm.sh /bin -$ rm -Rf linux-stuff - -``` - -Create a alias on `bashrc` file. -``` -alias rm=saferm.sh - -``` - -To take this effect, run the following command. -``` -$ source ~/.bashrc - -``` - -That's it everything is done, now you can perform rm command which automatically move the files to "Trash Can" instead of deleting them permanently. - -For testing purpose, we are going to delete file called `magi.txt`, it's clearly saying `Moving magi.txt to $HOME/.local/share/Trash/file` -``` -$ rm -rf magi.txt -Moving magi.txt to /home/magi/.local/share/Trash/files - -``` - -The same can be validated through `ls` command or `trash-cli` utility. -``` -$ ls -lh /home/magi/.local/share/Trash/files -Permissions Size User Date Modified Name -.rw-r--r-- 32 magi 11 Oct 16:24 magi.txt - -``` - -Alternatively we can check the same in GUI through file manager. -[![][3]![][3]][4] - -Create a cronjob to remove files from "Trash Can" once in a week. -``` -$ 1 1 * * * trash-empty - -``` - -`Note` For server environment, we need to remove manually using rm command. -``` -$ rm -rf /root/Trash/ -/root/Trash/magi1.txt is on . Unsafe delete (y/n)? y -Deleting /root/Trash/magi1.txt - -``` - -The same can be achieved by trash-put command for desktop environment. - -Create a alias on `bashrc` file. -``` -alias rm=trash-put - -``` - -To take this effect, run the following command. -``` -$ source ~/.bashrc - -``` - -To know other options for saferm.sh, navigate to help section. -``` -$ saferm.sh -h -This is saferm.sh 1.16. LXDE and Gnome3 detection. - Will ask to unsafe-delete instead of cross-fs move. Allows unsafe (regular rm) delete (ignores trashinfo). - Creates trash and trashinfo directories if they do not exist. Handles symbolic link deletion. - Does not complain about different user any more. - -Usage: /path/to/saferm.sh [OPTIONS] [--] files and dirs to safely remove -OPTIONS: --r allows recursively removing directories. --f Allow deleting special files (devices, ...). --u Unsafe mode, bypass trash and delete files permanently. --v Verbose, prints more messages. Default in this version. --q Quiet mode. Opposite of verbose. - -``` - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/rm-command-to-move-files-to-trash-can-rm-alias/ - -作者:[2DAYGEEK][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.2daygeek.com/author/2daygeek/ -[1]:https://www.2daygeek.com/trash-cli-command-line-trashcan-linux-system/ -[2]:https://github.com/lagerspetz/linux-stuff/blob/master/scripts/saferm.sh -[3]:data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 -[4]:https://www.2daygeek.com/wp-content/uploads/2017/10/rm-command-to-move-files-to-trash-can-rm-alias-1.png From 4bdb1098b900cccbef583496577d1e1ebf7183d0 Mon Sep 17 00:00:00 2001 From: amwps290 Date: Mon, 26 Feb 2018 11:31:47 +0800 Subject: [PATCH 9/9] Translated by amwps290 --- ...an- Instead Of Removing Them Completely.md | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 translated/tech/20171016 Make -rm- Command To Move The Files To -Trash Can- Instead Of Removing Them Completely.md diff --git a/translated/tech/20171016 Make -rm- Command To Move The Files To -Trash Can- Instead Of Removing Them Completely.md b/translated/tech/20171016 Make -rm- Command To Move The Files To -Trash Can- Instead Of Removing Them Completely.md new file mode 100644 index 0000000000..6d01bec236 --- /dev/null +++ b/translated/tech/20171016 Make -rm- Command To Move The Files To -Trash Can- Instead Of Removing Them Completely.md @@ -0,0 +1,123 @@ +# 让 “rm” 命令将文件移动到“垃圾桶”,而不是完全删除它们 + +人类犯错误是因为我们不是一个可编程设备,所以,在使用 `rm` 命令时要额外注意,不要在任何时候使用 `rm -rf * `。当你使用 rm 命令时,它会永久删除文件,不会像文件管理器那样将这些文件移动到 `垃圾箱`。 + +有时我们会将不应该删除的文件删除掉,所以当错误的删除文件时该怎么办? 你必须看看恢复工具(Linux 中有很多数据恢复工具),但我们不知道是否能将它百分之百恢复,所以要如何解决这个问题? + +我们最近发表了一篇关于 [Trash-Cli][1] 的文章,在评论部分,我们从用户 Eemil Lgz 那里获得了一个关于 [saferm.sh][2] 脚本的更新,它可以帮助我们将文件移动到“垃圾箱”而不是永久删除它们。 + +将文件移动到“垃圾桶”是一个好主意,当你无意中运行 rm 命令时,可以节省你的时间,但是很少有人会说这是一个坏习惯,如果你不注意“垃圾桶”,它可能会在一定的时间内被文件和文件夹堆积起来。在这种情况下,我建议你按照你的意愿去做一个定时任务。 + +这适用于服务器和桌面两种环境。 如果脚本检测到 **GNOME 、KDE、Unity 或 LXDE** 桌面环境(DE),则它将文件或文件夹安全地移动到默认垃圾箱 **\$HOME/.local/share/Trash/files**,否则会在您的主目录中创建垃圾箱文件夹 **$HOME/Trash**。 + +saferm.sh 脚本托管在 Github 中,可以从 repository 中克隆,也可以创建一个名为 saferm.sh 的文件并复制其上的代码。 +``` +$ git clone https://github.com/lagerspetz/linux-stuff +$ sudo mv linux-stuff/scripts/saferm.sh /bin +$ rm -Rf linux-stuff + +``` + +在 `bashrc` 文件中设置别名, + +``` +alias rm=saferm.sh + +``` + +执行下面的命令使其生效, + +``` +$ source ~/.bashrc + +``` + +一切就绪,现在你可以执行 rm 命令,自动将文件移动到”垃圾桶”,而不是永久删除它们。 + +测试一下,我们将删除一个名为 `magi.txt` 的文件,命令行显式的说明了 `Moving magi.txt to $HOME/.local/share/Trash/file` + +``` +$ rm -rf magi.txt +Moving magi.txt to /home/magi/.local/share/Trash/files + +``` + +也可以通过 `ls` 命令或 `trash-cli` 进行验证。 + +``` +$ ls -lh /home/magi/.local/share/Trash/files +Permissions Size User Date Modified Name +.rw-r--r-- 32 magi 11 Oct 16:24 magi.txt + +``` + +或者我们可以通过文件管理器界面中查看相同的内容。 + +![![][3]][4] + +创建一个定时任务,每天清理一次“垃圾桶”,( LCTT 注:原文为每周一次,但根据下面的代码,应该是每天一次) + +``` +$ 1 1 * * * trash-empty + +``` + +`注意` 对于服务器环境,我们需要使用 rm 命令手动删除。 + +``` +$ rm -rf /root/Trash/ +/root/Trash/magi1.txt is on . Unsafe delete (y/n)? y +Deleting /root/Trash/magi1.txt + +``` + +对于桌面环境,trash-put 命令也可以做到这一点。 + +在 `bashrc` 文件中创建别名, + +``` +alias rm=trash-put + +``` + +执行下面的命令使其生效。 + +``` +$ source ~/.bashrc + +``` + +要了解 saferm.sh 的其他选项,请查看帮助。 + +``` +$ saferm.sh -h +This is saferm.sh 1.16. LXDE and Gnome3 detection. +Will ask to unsafe-delete instead of cross-fs move. Allows unsafe (regular rm) delete (ignores trashinfo). +Creates trash and trashinfo directories if they do not exist. Handles symbolic link deletion. +Does not complain about different user any more. + +Usage: /path/to/saferm.sh [OPTIONS] [--] files and dirs to safely remove +OPTIONS: +-r allows recursively removing directories. +-f Allow deleting special files (devices, ...). +-u Unsafe mode, bypass trash and delete files permanently. +-v Verbose, prints more messages. Default in this version. +-q Quiet mode. Opposite of verbose. + +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/rm-command-to-move-files-to-trash-can-rm-alias/ + +作者:[2DAYGEEK][a] +译者:[amwps290](https://github.com/amwps290) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.2daygeek.com/author/2daygeek/ +[1]:https://www.2daygeek.com/trash-cli-command-line-trashcan-linux-system/ +[2]:https://github.com/lagerspetz/linux-stuff/blob/master/scripts/saferm.sh +[3]:data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[4]:https://www.2daygeek.com/wp-content/uploads/2017/10/rm-command-to-move-files-to-trash-can-rm-alias-1.png