mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-21 02:10:11 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
c819c1416c
@ -1,8 +1,8 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12835-1.html)
|
||||
[#]: subject: (Got Kids? Limit Computer Usage Per Account in Linux With Timekpr-nExt)
|
||||
[#]: via: (https://itsfoss.com/timekpr-next/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
@ -10,7 +10,9 @@
|
||||
有孩子吗?使用 Timekpr-nExt 限制 Linux 中每个账户的电脑使用
|
||||
======
|
||||
|
||||
_**本周的开源软件亮点是 Timekpr-nExt。它是一个 GUI 应用,用于限制 Linux 系统中某些账户的电脑使用。对于不想让孩子花太多时间在电脑上的父母来说,这是一个方便的工具。**_
|
||||

|
||||
|
||||
> 本周的开源软件亮点是 Timekpr-nExt。它是一个 GUI 应用,用于限制 Linux 系统中某些账户的电脑使用。对于不想让孩子花太多时间在电脑上的父母来说,这是一个方便的工具。
|
||||
|
||||
### 使用 Timekpr-nExt 在 Linux 上限制电脑使用
|
||||
|
||||
@ -20,33 +22,29 @@ _**本周的开源软件亮点是 Timekpr-nExt。它是一个 GUI 应用,用
|
||||
|
||||
![][1]
|
||||
|
||||
给定的时间超过后,用户会自动注销,直到满足限制条件才可以重新登录。
|
||||
给定的时间超过后,用户会自动登出,直到满足限制条件才可以重新登录。
|
||||
|
||||
![][2]
|
||||
|
||||
当然,这意味着你需要为孩子们单独设置非管理员(无 sudo 权限)账户。如果孩子们的账户也有管理员权限,他们可以很容易地改变设置。孩子们很聪明,你知道的。
|
||||
当然,这意味着你需要为孩子们单独设置非管理员(无 `sudo` 权限)账户。如果孩子们的账户也有管理员权限,他们可以很容易地改变设置。孩子们很聪明,你知道的。
|
||||
|
||||
### Timekpr-nExt 的功能
|
||||
|
||||
除了一个令人讨厌的风格化的名字,Timekpr-nExt 有以下功能:
|
||||
|
||||
* 将系统使用限制设置为日智能限制、每日限制、每周或每月限制
|
||||
* 将系统使用限制设置为按日智能限制、每日、每周或每月限制
|
||||
* 你还可以根据时间和小时设置访问限制
|
||||
* 用户可以看到关于他们还剩多少时间的通知
|
||||
* 设置锁定动作(终止会话、关闭、暂停或锁定屏幕)
|
||||
* 追踪账户的时间使用情况
|
||||
|
||||
|
||||
|
||||
请注意以下事项:
|
||||
|
||||
* 仔细检查你正在配置的账户。_**不要把自己锁定**_。
|
||||
* 每次更改配置时,请点击应用或设置按钮,否则更改将不会被设置。
|
||||
* 儿童帐户不应该有管理员操作,否则他们会覆盖设置。
|
||||
* 仔细检查你正在配置的账户。**不要把自己锁定**
|
||||
* 每次更改配置时,请点击应用或设置按钮,否则更改将不会被设置
|
||||
* 儿童帐户不应该有管理员操作,否则他们会覆盖设置
|
||||
|
||||
|
||||
|
||||
阅读[关于使用 Timekpr-nExt 的更多信息的文档][3]。
|
||||
这里阅读[关于使用 Timekpr-nExt 的更多信息的文档][3]。
|
||||
|
||||
### 在 Linux 中安装 Timekpr-nExt
|
||||
|
||||
@ -60,9 +58,9 @@ sudo apt install timekpr-next
|
||||
|
||||
Arch Linux 用户可以[在 AUR 中找到它][5]。对于其他用户,请检查你的发行版仓库。如果没有这样的包,你可以尝试使用源码。
|
||||
|
||||
[Timekpr-nExt 源码][6]
|
||||
- [Timekpr-nExt 源码][6]
|
||||
|
||||
_**再说一次,不要在主账户中使用 Timekpr-nExt。你可能会把自己锁在外面。**_
|
||||
**再说一次,不要在主账户中使用 Timekpr-nExt。你可能会把自己锁在外面。**
|
||||
|
||||
你会看到两个应用的实例。使用开头有 (SU) 的那个。
|
||||
|
||||
@ -95,7 +93,7 @@ via: https://itsfoss.com/timekpr-next/
|
||||
作者:[Abhishek Prakash][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/) 荣誉推出
|
||||
|
@ -0,0 +1,67 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (3 ways managers build team culture around open source)
|
||||
[#]: via: (https://opensource.com/article/20/11/selfless-culture)
|
||||
[#]: author: (Shishir Kamboj https://opensource.com/users/shishirkamboj)
|
||||
|
||||
3 ways managers build team culture around open source
|
||||
======
|
||||
Contributing to open source prevents complacency and teaches people the
|
||||
value of giving to the greater good.
|
||||
![Teammates shaking hands and smiling in an office][1]
|
||||
|
||||
Whether you are a senior leader or an individual contributor, you make decisions based on your personal, peers', and colleagues' experiences and feedback. If the people around you are evolving, you will grow with them, as will the organization you support. If the backgrounds and knowledge of the people around you are diverse and changing, you and your team will benefit.
|
||||
|
||||
I've noticed that my skillset and contributions give diminishing returns if I am not challenged. Human beings tend to get into their comfort zones quickly. We get used to working a certain way, and we start to depend on key people to make decisions for us. This leads to complacency, which does not change unless we are challenged due to market shifts or other external forces.
|
||||
|
||||
A selfless approach contributes to growth in career and skillsets as well as helps others grow. When we not only promote ourselves but the right person for the right job, we can be better team players. Our focus becomes what is right for the organization, not what is right for us. It helps both individuals and organizations when we are more flexible and ready for change.
|
||||
|
||||
The big question is: How can you create opportunities for change and create a selfless approach on your team? It may be difficult to ask your employees to be completely selfless. But as leaders, we can align our teams' and employees' growth to the organization's development. The following are a few ways to achieve this.
|
||||
|
||||
### 1\. Help employees create a career
|
||||
|
||||
Invest in your teams. Set a career path for each team member. You may find employees who are happy working on the same things year after year. While I agree that it is essential to have expertise, this can easily lead to complacency and hoarding. I see these as significant concerns.
|
||||
|
||||
When you like what you do, you can excel at it. You should achieve consistent improvement in the knowledge and exposure you get. It helps if you have a forte in an area where you are a point person across the board. At the same time, it's essential to move forward while looking for new avenues to contribute. Working on open source software is an excellent way to make that happen.
|
||||
|
||||
In one of my earlier roles, I led an infrastructure services team. For a long time, this group focused on data center design, hardware, and network engineering. As cloud services started emerging, the team found itself in an identity crisis. The group had not added any new skill sets over the previous few years. The team's motivation scores were at an all-time low. Work became more limited as deployments shrunk to legacy applications.
|
||||
|
||||
It was imperative to invest in the team to help boost morale and connect with the company's vision. The team members needed to see how they added to the company's growth while gaining knowledge and new skills.
|
||||
|
||||
As we investigated our customers' pain points and their needs, we realized an open source strategy around cloud computing would be an ideal investment area. The team's experience made the transition challenging, but the members were ready for the change. The group swiftly jumped on the initiative and brought much success to themselves and the organization.
|
||||
|
||||
Carving out time for your team to work on open source software and contribute upstream is a great way to put your team members out there and help them gain different experiences while working with the broader community. It is imperative for leadership to move team members around to transition them to something new. It is also necessary to remind your team that every initiative, technology, or project follows a curve that starts with innovation, then shows heightened expectation, goes into a growth phase, and eventually declines.
|
||||
|
||||
This point is even more critical for managers and leaders. Sometimes I see leaders who are stuck in the status quo. A leader's attitude can impact a team's culture—negatively or positively.
|
||||
|
||||
### 2\. Correlate the team's success with the organization's success
|
||||
|
||||
Leaders can motivate teams by showing appreciation to contributors. It is critical for teams to understand the impact their work has on customers and the world. It's also vital for them to correlate their role with the company's success. Every employee should know the value they bring to the table.
|
||||
|
||||
Understanding the financial value your team brings to the company is part of this. Share how the product or service your team provides contributes to revenue. This will show how your team how critical their product or service is for your customers and how it impacts the customer experience. This has really worked for me and the teams I lead.
|
||||
|
||||
### 3\. Bring pride to what you do
|
||||
|
||||
Bringing pride to your work is a crucial element in developing ownership. If you take pride in what you do, you will enjoy it more. Employees who are proud of their work will be more eager to share and also look for ways to improve. As a manager or leader, it is your responsibility to bring visibility to your team's work. Appreciation for your team goes a long way, especially if you show your gratitude in front of the broader organization.
|
||||
|
||||
Open source community participation can provide opportunities to contribute to a greater good, give visibility to your work, challenge your thought process, and drive you to think out of the box. What suggestions do you have to helping teams overcome complacency and become more selfless? Please share your thoughts in the comments.
|
||||
|
||||
Learn how companies can get started in contributing to open source projects, including encouraging...
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/11/selfless-culture
|
||||
|
||||
作者:[Shishir Kamboj][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/shishirkamboj
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/handshake_teamwork_meeting_office_space.png?itok=6H0GEyoc (Community and team smiling)
|
@ -0,0 +1,60 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to create trust in artificial intelligence using open source)
|
||||
[#]: via: (https://opensource.com/article/20/11/ai-open-source)
|
||||
[#]: author: (Rebecca Whitworth https://opensource.com/users/rsimmond)
|
||||
|
||||
How to create trust in artificial intelligence using open source
|
||||
======
|
||||
Opening up the "black box" helps remove uncertainties about AI outcomes,
|
||||
providing insight into the modeling process and identifying biases and
|
||||
errors.
|
||||
![Brain on a computer screen][1]
|
||||
|
||||
Artificial intelligence (AI) is being used more frequently in our daily lives, with systems such as Siri and Alexa becoming commonplace in many households. Many households themselves are "smart," powered by devices that can control your lights, heating and air, and even the music playing. And those music players are powered by AI that recommends songs and artists you may like.
|
||||
|
||||
However, these systems are often referred to as "black box" systems because we do not know how the data is processed—how do the users know why the model has made that prediction? The advent and widespread adoption of deep neural networks, while providing impressive results, made this even more critical, since humans can't logically interpret how information is processed within thousands of neurons.
|
||||
|
||||
A more safety-critical example of AI systems is when doctors use them to reduce stress loads. These systems do this by quickly ingesting data at a rapid rate; for example, thousands of medical journals could be read and parsed by AI exponentially faster than by a human. This data can then be used to train predictive models, which are used to help doctors diagnose patients, this time armed with far more data points than were available before and in a quicker time. People assume that, with all this information, a machine can make "better" decisions than humans. However, how can we trust a machine to make such critical decisions when we do not fully understand the data processing techniques?
|
||||
|
||||
Open source supports many methods and applications that can lead to better trust in AI systems. In this article, we will explore some of those open source projects as well as the open source mentality, and how by becoming part of the open source community, you can gain more trust in your AI.
|
||||
|
||||
Projects like [LIME][2] and [SHAP][3], which are open source, can explain the outcome of a prediction. To illustrate how this works, let's look at a loan request use case. Based on an AI outcome, a bank rejects a customer who has made a loan request, but why did the algorithm return that outcome? Projects like these aim to make the model more explainable by showing feature importance graphs, i.e., which features were significant to the outcome of the model. Features are the inputs that generate the prediction. In this example, if an important feature used to reject the loan had been "gender," then this would mean the model is biased or incorrect. If the model is known to be wrong, then retraining it will give improved predictions.
|
||||
|
||||
These projects help to build trust in AI systems by explaining the black box model and introspecting decision-making. By open sourcing projects such as this, we can ensure confidence in the system due to the openness of the predictive modeling process. It can give stakeholders confidence that the model is correct and that its recommendations can be trusted, so there is less business risk.
|
||||
|
||||
Open source can stop unfairness, such as the gender-bias example above, by iteratively testing the system's potential outcomes quickly and effectively. If the model is biased, then a notification to the community can be made in a timely fashion, as there are more developers in the community than there would be if the project was closed source. Therefore, if there is trust in the community, then there can be trust in the system.
|
||||
|
||||
Open source platforms leverage ideas from a broad group of peers and offer greater opportunity to innovate and create worthwhile features in a system. These ideas focus the project in a user-driven direction, and improvements come from the developers/users themselves. The system is trustworthy because it has a user-centric design pattern and fosters knowledge of system development and execution. Essentially, the people who have made the system can trust the system.
|
||||
|
||||
When an AI system fails, people may be offended or misled. The project or organization loses people's confidence, and it creates distrust of the system overall. Credibility can be protected by making an AI project open source, because with more testers in the community, the more the data and performance can be verified.
|
||||
|
||||
By leveraging the community-focused nature of open source, we can also ensure that more people with a wider variety of skill sets routinely check the codebase. Predictive models are very good at recognizing patterns; however, they can fail when faced with an outlier. Humans, on the other hand, are very good at being able to recognize and respond to anomalies and nuance. Therefore, having humans involved in the AI system is integral to stopping mistakes, which, in the example use case of the doctor, could actually be deadly. It is essential to have domain experts to check the system's outcomes, and the more, the better.
|
||||
|
||||
Community-focused feature development can also improve trust by ensuring that the project meets company regulations. The community can include stakeholders from the business who can then lead the development focus and reduce business risk.
|
||||
|
||||
A closed approach to AI can lead to inadequate feature design choices that are not relevant to the current needs of the community and businesses. Such features can be harmful to the system; for example, if a medical system's patient diagnostic function has poor accuracy due to lack of testing, then this will mean more human intervention and, ultimately, less trust.
|
||||
|
||||
A closed approach can also stifle creativity and freedom to develop innovative ideas, and it stops the feedback loop on ideas from community users or people outside of the company. A feedback loop is useful, as the people who are developing it have a greater knowledge of the system and how it works, and if the community knows it works, then they are more likely to use it.
|
||||
|
||||
Trusting AI can be hard when people use black box models, due to the lack of understanding of what they are doing and how they work. Open source mentality and models help users and developers to create more trust in AI by opening up the black box, encouraging iterative and collaborative development, and using the community to ensure proper functionality and fewer bugs. Open source allows AI to reach its potential in a trustworthy and meaningful way for users.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/11/ai-open-source
|
||||
|
||||
作者:[Rebecca Whitworth][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/rsimmond
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brain_computer_solve_fix_tool.png?itok=okq8joti (Brain on a computer screen)
|
||||
[2]: https://github.com/marcotcr/lime
|
||||
[3]: https://github.com/slundberg/shap
|
@ -0,0 +1,147 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (The state of the art of microservices in 2020)
|
||||
[#]: via: (https://www.linux.com/news/the-state-of-the-art-of-microservices-in-2020/)
|
||||
[#]: author: (Linux.com Editorial Staff https://www.linux.com/author/linuxdotcom/)
|
||||
|
||||
The state of the art of microservices in 2020
|
||||
======
|
||||
|
||||
### _“The microservice architectural style is an approach to developing a_ _**single application**_ _as a suite of_ _**small services**_*, each running in its* _**own process and communicating with lightweight mechanisms**_*, often an HTTP resource API. These services are* _**built around business capabilities**_ _and_ _**independently deployable**_ _by_ _**fully automated deployment machinery**_*. There is a bare minimum of centralized management of these services, which may be written in* _**different programming languages**_ _and_ _**use different data storage technologies.**__“_
|
||||
|
||||
### James Lewis and Martin Fowler (2014) [6]
|
||||
|
||||
## Introduction
|
||||
|
||||
It is expected that in 2020, the global cloud microservices market will grow at a rate of 22.5%, with the US market projected to maintain a growth rate of 27.4% [5]. The tendency is that developers will move away from locally hosted applications and shift into the cloud. Consequently, this will help businesses minimize downtime, optimize resources, and reduce infrastructure costs. Experts also predict that by 2022, 90% of all applications will be developed using microservices architecture [5]. This article will help you to learn what microservices are and how companies have been using it nowadays.
|
||||
|
||||
## What are microservices?
|
||||
|
||||
Microservices have been widely used around the world. But what are microservices? Microservice is an architectural pattern in which the application is based on many small interconnected services. They are based on the **single responsibility principle**, which according to Robert C. Martin is “gathering things that change for the same reason, and separate those things that change for different reasons” [2]. The microservices architecture is also extended to the **loosely coupled services** that can be **developed, deployed, and maintained independently** [2].
|
||||
|
||||
## Moving away from monolithic architectures
|
||||
|
||||
Microservices are often compared to traditional monolithic software architecture. In a monolithic architecture, a software is designed to be self-contained, i.e., the program’s components are interconnected and interdependent rather than loosely coupled. In a tightly-coupled architecture (monolithic), each component and its associated components must be present in order for the code to be executed or compiled [7]. Additionally, if any component needs to be updated, the whole application needs to be rewritten.
|
||||
|
||||
That’s not the case for applications using the microservices architecture. Since each module is independent, it can be changed without affecting other parts of the program. Consequently, reducing the risk that a change made to one component will create unanticipated changes in other components.
|
||||
|
||||
Companies might run in trouble if they cannot scale a monolithic architecture if their architecture is difficult to upgrade or the maintenance is too complex and costly [4]. Breaking down a complex task into smaller components that work independently from each other is the solution to this problem.
|
||||
|
||||
![Monolithic vs. microservices architecture. Image extracted from \[3\].][1]
|
||||
|
||||
## How developers around the world build their microservices
|
||||
|
||||
Microservices are well known for improving _scalability_ and _performance_. However, are those the main reasons that developers around the world build their microservices? The State of Microservices 2020 research project [1] has found out how developers worldwide build their microservices and what they think about it. The report was created with the help of 660 microservice experts from Europe, North America, Central and South America, the Middle East, South-East Asia, Australia, and New Zealand. The table below presents the average rating on questions related to the maturity of microservices [1].
|
||||
|
||||
**Category** | **Average rating (out of 5)**
|
||||
---|---
|
||||
Setting up a new project | 3.8
|
||||
Maintenance and debugging | 3.4
|
||||
Efficiency of work | 3.9
|
||||
Solving scalability issues | 4.3
|
||||
Solving performance issues | 3.9
|
||||
Teamwork | 3.9
|
||||
|
||||
|
||||
|
||||
As observed on the table, most experts are happy with microservices for solving scalability issues. On the contrary, maintenance and debugging seem to be a challenge for them.
|
||||
|
||||
According to their architecture’s leading technologies, most experts reported that they use Javascript/Typescript (almost ⅔ of microservices are built on those languages). In the second place, they mostly use Java.
|
||||
|
||||
Although there are plenty of options to choose to deploy microservices, most experts use Amazon Web Services (49%), followed by their own server. Additionally, 62% prefer AWS Lambda as a serverless solution.
|
||||
|
||||
Most microservices used by the experts use HTTP for communication, followed by events and gRPC. Additionally, most experts use RabbitMQ for message-brokers, followed by Kafka and Redis.
|
||||
|
||||
Also, most people work with microservices continuous integration (CI). In the report, 87% of the respondents use CI solutions such as GitLab CI, Jenkins, or GitHub Actions.
|
||||
|
||||
The most popular debugging solution among 86% of the respondents was logging, in which 27% of the respondents ONLY use logs.
|
||||
|
||||
Finally, most people think that microservice architecture will become either a standard for more complex systems or backend development.
|
||||
|
||||
## Successful use cases of Microservices
|
||||
|
||||
Many companies have changed from a monolithic architecture to microservices.
|
||||
|
||||
### Amazon
|
||||
|
||||
In 2001, development delays, coding challenges, and service interdependencies didn’t allow Amazon to address its growing user base’s scalability requirements. With the need to refactor their monolithic architecture from scratch, Amazon broke its monolithic applications into small, independent, and service-specific applications [3][9].
|
||||
|
||||
In 2001, Amazon decided to change to microservices, which was years before the term came into fashion. This change led Amazon to develop several solutions to support microservices architectures, such as Amazon AWS. With the rapid growth and adaptation to microservices, Amazon became the most valuable company globally, valued by market cap at $1.433 trillion on July 1st, 2020 [8].
|
||||
|
||||
### Netflix
|
||||
|
||||
Netflix started its movie-streaming service in 2007, and by 2008 it was suffering scaling challenges. They experienced a major database corruption, and for three days, they could not ship DVDs to their members [10]. This was the starting point when they realized the need to move away from single points of failure (e.g., relational databases) towards a more scalable and reliable distributed system in the cloud. In 2009, Netflix started to refactor its monolithic architecture into microservices. They began by migrating its non-customer-facing, movie-coding platform to run on the cloud as an independent microservices [11]. Changing to microservices allowed Netflix to overcome its scaling challenges and service outages. Despite that, it allowed them to reduce costs by having cloud costs per streaming instead of costs with a data center [10]. Today, Netflix streams approximately 250 million hours of content daily to over 139 million subscribers in 190 countries [11].
|
||||
|
||||
### Uber
|
||||
|
||||
After launching Uber, they struggled to develop and launch new features, fix bugs, and rapidly integrate new changes. Thus, they decided to change to microservices, and they broke the application structure into cloud-based microservices. In other words, Uber created one microservice for each function, such as passenger management and trip management. Moving to microservices brought Uber many benefits, such as having a clear idea of each service ownership. This boosted speed and quality, facilitating fast scaling by allowing teams to focus only on the services they needed to scale, updating virtual services without disrupting other services, and achieving more reliable fault tolerance [11].
|
||||
|
||||
## It’s all about scalability!
|
||||
|
||||
A good example of how to provide scalability is by looking at China. With its vast number of inhabitants, China had to adapt by creating and testing new solutions to solve new challenges at scale. Statistics show that China serves roughly 900 million Internet users nowadays [14]. During the 2019 Single’s Day (the equivalent of Black Friday in China), the peak transaction of Alibaba’s various shopping platforms was 544,00 transactions per second. The total amount of data processed on Alibaba Cloud was around 970 petabytes [15]. So, what’s the implication of these numbers of users in technology?
|
||||
|
||||
Many technologies have emerged from the need to address scalability. For example, [Tars][2] was created in 2008 by Tencent and [contributed to the Linux Foundation in 2018][3]. It’s being used at scale and enhanced for ten years [12]. Tars is open source, and many organizations are significantly contributing and extending the framework’s features and value [12]. Tars supports multiple programming languages, including C++, Golang, Java, Node.js, PHP, and Python; and it can quickly build systems and automatically generate code, allowing the developer to focus on the business logic to improve operational efficiency effectively. Tars has been widely used in Tencent’s QQ, WeChat social network, financial services, edge computing, automotive, video, online games, maps, application market, security, and many other core businesses. [In March of 2020, the Tars project transitioned into the TARS Foundation][4], an open source microservice foundation to support the rapid growth of contributions and membership for a community focused on building an open microservices platform [12].
|
||||
|
||||
**Be sure to check out the Linux Foundation’s new free training course,** [Building Microservice Platforms with TARS][5]
|
||||
|
||||
*About the authors: *
|
||||
|
||||
_Isabella Ferreira is an Advocate at TARS Foundation,_ a cloud-native open-source microservice foundation under the Linux Foundation*. *
|
||||
|
||||
*Mark Shan is Chairman at Tencent Open Source Alliance and also Board Chair at TARS Foundation. *
|
||||
|
||||
**References:**
|
||||
|
||||
[1] <https://tsh.io/state-of-microservices/#ebook>
|
||||
|
||||
[2]<https://medium.com/hashmapinc/the-what-why-and-how-of-a-microservices-architecture-4179579423a9>
|
||||
|
||||
[3] <https://www.plutora.com/blog/understanding-microservices>
|
||||
|
||||
[4] <https://www.leanix.net/en/blog/a-brief-history-of-microservices>
|
||||
|
||||
[5] <https://www.charterglobal.com/five-microservices-trends-in-2020/>
|
||||
|
||||
[6] <https://martinfowler.com/articles/microservices.html#footnote-etymology>
|
||||
|
||||
[7] <https://whatis.techtarget.com/definition/monolithic-architecture>
|
||||
|
||||
[8] <https://ycharts.com/companies/AMZN/market_cap>
|
||||
|
||||
[9] <https://thenewstack.io/led-amazon-microservices-architecture/>
|
||||
|
||||
[10] <https://media.netflix.com/en/company-blog/completing-the-netflix-cloud-migration>
|
||||
|
||||
[11] <https://blog.dreamfactory.com/microservices-examples/>
|
||||
|
||||
[12] <https://www.linuxfoundation.org/blog/2020/03/the-tars-foundation-the-formation-of-a-microservices-ecosystem/>
|
||||
|
||||
[13] <https://medium.com/microservices-architecture/top-10-microservices-framework-for-2020-eefb5e66d1a2>
|
||||
|
||||
[14] <https://www.statista.com/statistics/265140/number-of-internet-users-in-china/>
|
||||
|
||||
[15] <https://interconnected.blog/china-scale-technology-sandbox/>
|
||||
|
||||
#### _This Linux Foundation Platinum Sponsor content was contributed by Tencent._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/news/the-state-of-the-art-of-microservices-in-2020/
|
||||
|
||||
作者:[Linux.com Editorial Staff][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.linux.com/author/linuxdotcom/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.linux.com/wp-content/uploads/2020/11/microservices_diagram_a.png
|
||||
[2]: https://tarscloud.org/foundation/index
|
||||
[3]: https://www.linuxfoundation.org/press-release/2018/06/tars-and-tseer-form-open-source-project-communities-under-the-linux-foundation-to-expand-adoption-and-pace-of-development/
|
||||
[4]: https://www.linuxfoundation.org/blog/2020/03/the-tars-foundation-the-formation-of-a-microservices-ecosystem/
|
||||
[5]: https://www.edx.org/course/building-microservice-platforms-with-tars
|
@ -0,0 +1,57 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How I channel my inner Star Trek character at work)
|
||||
[#]: via: (https://opensource.com/article/20/11/inner-star-trek)
|
||||
[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike)
|
||||
|
||||
How I channel my inner Star Trek character at work
|
||||
======
|
||||
I am more of a Deanna Troi in my role as a community manager. How about
|
||||
you?
|
||||
![Open source stars.][1]
|
||||
|
||||
In a recent [Twitter thread][2], I self-identified as "some days Deanna, some days Riker." Others shared their own "Star Trek Spectrum," from Worf to O'Brien and McCoy to Neelix. That led me to think more about Deanna Troi: the half-human, half-Betazoid empath who served as Lieutenant Commander and the ship's counselor for most of _Star Trek: The Next Generation_.
|
||||
|
||||
Ever since my middle school days, I felt a kinship with her as I watched her observe and respond to situations and the people in them. Today, as an open source community manager, I think about how these traits are vital to the role of nurturing and guiding a group of people. Here's how I channel my inner Deanna Troi at work.
|
||||
|
||||
![][3]
|
||||
|
||||
opensource.com
|
||||
|
||||
### Holding space
|
||||
|
||||
Instead of speaking the next word, I take a breath. I try not to rush in with something to say in response to the things that happen and in response to conversations with the people that make up our community. I listen, and then when the time is right, I speak. That can be hard especially when I am feeling confident in how to move forward and am eager to show the way. I've learned that taking a beat and slowing down, rarely does harm if coupled with clarity around the situation. Sometimes it is important to act quickly, to step in and guide the community around an issue, but even swift action can be accompanied with thoughtful deliberation.
|
||||
|
||||
To achieve this, also give yourself space to think and slow down. If you need to think through something, go for a walk, make a tea or meal, and say no to that next meeting to give yourself the time you need to do your job with integrity.
|
||||
|
||||
### Radical empathy
|
||||
|
||||
Truly hearing and listening to others, then digesting that information, often leads to empathy. Even when we don't feel the same way—often due to differing perspectives—we can get closer to empathizing with others when we listen closely and fully. And why would we want to do that? Because understanding someone allows us to relate to them, and then we can find a solid place from which to nurture and guide them.
|
||||
|
||||
Getting to know each person individually is something I recommend, and if the community you are a part of is too big for that, don't shut down the idea of reaching out at all. Start from where you are, and connect with the next closest person—you have a meeting set up to onboard them, you interacted on social media, you fixed a bug they submitted, etc. This kind of growth is authentic and sustainable.
|
||||
|
||||
### Tapping into intuition
|
||||
|
||||
At first glance, it may seem that those best fit for a role at the helm are those who identify as extroverted and easily heard, however, I've found those who know how to silence the noise and follow their own inner certainty are those who can inspire others to do the same. And that is where the power is, inside all of us, not just one of us.
|
||||
|
||||
Open source communities are continuing to be called upon to innovate, act, and lead, and these traits are important not just for leaders to cultivate but for everyone involved in working together as a group to achieve a goal or collaborate on a project.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/11/inner-star-trek
|
||||
|
||||
作者:[Jen Wike Huger][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/jen-wike
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520x292_opensourcestars.png?itok=hnrMETFh (Open source stars.)
|
||||
[2]: https://twitter.com/JenWike/status/1318188923298906113
|
||||
[3]: https://opensource.com/sites/default/files/pictures/deannacover001.jpg
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (lihongjie224)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,126 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Install Google Chrome on Fedora [Beginner’s Tutorial])
|
||||
[#]: via: (https://itsfoss.com/install-google-chrome-fedora/)
|
||||
[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/)
|
||||
|
||||
How to Install Google Chrome on Fedora [Beginner’s Tutorial]
|
||||
======
|
||||
|
||||
Fedora comes with Firefox as the default web browser. Despite it being an excellent web browser, you may prefer the popular Google Chrome browser.
|
||||
|
||||
If you are wondering how to install Google Chrome on Fedora, let me show you two ways of installing Google Chrome, graphical method and command line method.
|
||||
|
||||
* [GUI method 1: Install Chrome from the software center by enabling Fedora third-party repository][1]
|
||||
* [GUI method 2: Download RPM file from Google Chrome’s website][2]
|
||||
* [CLI method: Install Chrome from the Fedora third-party repository, everything using commands (same as GUI method 1)][3]
|
||||
|
||||
|
||||
|
||||
It is up to you which method you prefer. Your Google Chrome on [Fedora][4] will be getting regular updates via the system updates in all the three methods.
|
||||
|
||||
### Method 1: Install Google Chrome on Fedora from the Software Center
|
||||
|
||||
Fedora provides a third-party repository that contains some popular proprietary software, graphics driver. Google Chrome is one of them.
|
||||
|
||||
First step, make sure to enable third-party repositories in Fedora. You should see this option in the software center itself.
|
||||
|
||||
![Step1: Fedora Third Party Repositories][5]
|
||||
|
||||
Once you have it enabled, simply search for Chrome in the software center:
|
||||
|
||||
![Step 2: Search for Chrome In Fedora Software Center][6]
|
||||
|
||||
And install it from there:
|
||||
|
||||
![Step 3: Install Chrome Fedora][7]
|
||||
|
||||
Can it be any easier than this? I don’t think either :)
|
||||
|
||||
### Method 2: Installing Google Chrome on Fedora from Chrome website
|
||||
|
||||
If you do not want to enable the third-party repository, that’s okay. You don’t have to. You can download the RPM file from Chrome’s website, double-click on it and install it.
|
||||
|
||||
Visit Google Chrome’s website and click on the download button.
|
||||
|
||||
[Get Google Chrome][8]
|
||||
|
||||
![][9]
|
||||
|
||||
Then select the .rpm package and click on “Accept and Install”.
|
||||
|
||||
![][10]
|
||||
|
||||
Once the download is over, double click on the file and click install when prompted at the package manager. Type your password and wait until the process is done.
|
||||
|
||||
![][11]
|
||||
|
||||
That’s super easy, right? Let’s see somewhat complicated method (if you are not a terminal fan).
|
||||
|
||||
### Method 3: Install Chrome on Fedora using command line
|
||||
|
||||
Firstly, you need to add extra Fedora repositories (that you saw in method 1):
|
||||
|
||||
```
|
||||
sudo dnf install fedora-workstation-repositories
|
||||
```
|
||||
|
||||
And then enable Google Chrome repository.
|
||||
|
||||
```
|
||||
sudo dnf config-manager --set-enabled google-chrome
|
||||
```
|
||||
|
||||
![][12]
|
||||
|
||||
To install the Google Chrome stable release, run the following command at your terminal.
|
||||
|
||||
```
|
||||
sudo dnf install google-chrome-stable
|
||||
```
|
||||
|
||||
You should get a warning for importing the GPG key, enter y to continue.
|
||||
|
||||
![][13]
|
||||
|
||||
You are adding the Google Chrome repository. The package comes from this repository, directly from Google.
|
||||
|
||||
#### Conclusion
|
||||
|
||||
Installing Google chrome on Fedora is fairly easy, even if you use the command line. It’s pretty much the [same as installing Chrome on Ubuntu][14] except the third-party repository part.
|
||||
|
||||
Now that you have installed it, you may want to [check our list of Google Chrome keyboard shortcuts][15] to use the browser faster.
|
||||
|
||||
Don’t forget to subscribe, to get the latest news and tutorials about Fedora, and if you have any questions please leave a comment below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-google-chrome-fedora/
|
||||
|
||||
作者:[Dimitrios Savvopoulos][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/dimitrios/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: tmp.VFVwBw56ac#gui-method-1
|
||||
[2]: tmp.VFVwBw56ac#gui-method-2
|
||||
[3]: tmp.VFVwBw56ac#cli-method
|
||||
[4]: https://getfedora.org/
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/fedora-third-party-repositories.jpg?resize=800%2C400&ssl=1
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/chrome-in-fedora.png?resize=800%2C400&ssl=1
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/installing-chrome-fedora.png?resize=800%2C400&ssl=1
|
||||
[8]: https://www.google.com/chrome/
|
||||
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/install-google-chrome-ubuntu-1.jpeg?resize=800%2C374&ssl=1
|
||||
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/3.-download-rpm-chrome.png?resize=800%2C600&ssl=1
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/4.-install-chrome-fedora.png?resize=800%2C550&ssl=1
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/1.-Fedora-extra-repos.png?resize=800%2C550&ssl=1
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/2.-Fedora-GPG-key.png?resize=800%2C550&ssl=1
|
||||
[14]: https://itsfoss.com/install-chrome-ubuntu/
|
||||
[15]: https://itsfoss.com/google-chrome-shortcuts/
|
@ -0,0 +1,275 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Install Fedora in VirtualBox [With Steps for USB, Clipboard and Folder Sharing])
|
||||
[#]: via: (https://itsfoss.com/install-fedora-in-virtualbox/)
|
||||
[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/)
|
||||
|
||||
How to Install Fedora in VirtualBox [With Steps for USB, Clipboard and Folder Sharing]
|
||||
======
|
||||
|
||||
If you are curious about Fedora Linux, there are several ways to try it.
|
||||
|
||||
The easiest way that won’t affect your current operating system is to [create a live USB of Fedora.][1]
|
||||
|
||||
An alternative way to try Fedora, is to get advantage of virtualization technology through an installation in VirtualBox. This way, you use Fedora like an application on your current operating system.
|
||||
|
||||
This way, you can perform more thorough testing without messing up your current operating system.
|
||||
|
||||
You can even copy your virtual setup and re-install it on some other system. Sounds handy? Let me show you how to do it.
|
||||
|
||||
### Installing Fedora in VirtualBox
|
||||
|
||||
![][2]
|
||||
|
||||
Let’s see the steps for installing Fedora Linux in Oracle VirtualBox.
|
||||
|
||||
#### Step 1: Install VirtualBox
|
||||
|
||||
If you haven’t already installed VirtualBox on your system, you can download it from the official website. You can find instructions for Windows, Mac OS and Linux. [Ubuntu users can refer to this detailed tutorial on installing VirtualBox][3].
|
||||
|
||||
![][4]
|
||||
|
||||
[Download VirtualBox][5]
|
||||
|
||||
#### **Step 2: Download the Fedora ISO**
|
||||
|
||||
If you are not familiar with fedora, there are a few images to be aware of.
|
||||
|
||||
[Fedora IoT][6] is to be used for scalable infrastructure, [Fedora workstation][7] is an image with a set of tools oriented for a desktop in a vanilla GNOME desktop environment and [Fedora server][8] as its name reveals, is tailored for a server or data center.
|
||||
|
||||
If GNOME isn’t your first choice, you can download a [spin][9] of Fedora desktop with an alternative desktop environment. For this tutorial, I chose [Fedora 33][10] with the GNOME desktop environment.
|
||||
|
||||
[Download Fedora][11]
|
||||
|
||||
#### Step 3: Create an empty virtual machine and configure it
|
||||
|
||||
Fedora requires a minimum of 20GB disk space & 2GB RAM, to install and run successfully. Although double those amounts is recommended for a smoother user experience. Based on that I will create and configure the virtual machine.
|
||||
|
||||
Start Virtual Box and click on New.
|
||||
|
||||
![Create a new virtual machine][12]
|
||||
|
||||
The most important option to pay attention, is the **type to be set to Linux and the version to Fedora (64-bit)**. If you start typing Fedora at the name prompt, VirtualBox will automatically pick the correct settings for you. Although the name doesn’t have to be Fedora, it can be anything you like.
|
||||
|
||||
_If you have access to 32-bit version only, you need to enable virtualization technology on BIOS, if you have an AMD CPU it is called SVM. Worst-case scenario is that your CPU doesn’t support virtualization technology. If you are not sure, check this first._
|
||||
|
||||
Once you have similar settings with me, click on the create button.
|
||||
|
||||
![Name your VM and assign it at least 3 GB RAM][13]
|
||||
|
||||
As mentioned before, you need at least 20 GB of disk space to be able to install Fedora. I have 32 GB of RAM on my system so I assigned 8 GB here. You should be fine with 3 GB of RAM.
|
||||
|
||||
A word about RAM consumption, the RAM will only be consumed by the virtual machine when you are running it. Otherwise, it will be available for regular usage.
|
||||
|
||||
Make sure that the rest of the settings match the example and click Create.
|
||||
|
||||
![Assign 15-20 GB of disk space in VDI format][14]
|
||||
|
||||
Before you click the start button of your virtual machine, you need to load the ISO as shown below [Optical Drive].
|
||||
|
||||
![Add the Fedora ISO to optical drive storage][15]
|
||||
|
||||
As your virtual hard drive is empty, the virtual machine will boot from this ISO. Think of it as using a live USB or disk for installing Linux.
|
||||
|
||||
![Go to Settings and add ISO as optical drive][16]
|
||||
|
||||
Then, if you have a multi-core CPU it is recommended to assign 2 or more cores for your virtual machine. You may find the CPU cores under the system tab. When you configure your system click ok and start the virtual machine.
|
||||
|
||||
![Optional step: Assign number of CPU cores][17]
|
||||
|
||||
Once you have configured everything, click on the start button to begin the installation.
|
||||
|
||||
#### Step 4: Install Fedora in VirtualBox
|
||||
|
||||
If you have followed the process correctly, when you start the virtual machine you will boot directly from the ISO file. When you see a similar to below screen select Start Fedora, and press the enter key.
|
||||
|
||||
![Fedora running in live environment in virtual machine][18]
|
||||
|
||||
To start the installation dialog box, click on Install to Hard Drive.
|
||||
|
||||
![Click on “install to hard drive”][19]
|
||||
|
||||
Before you proceed to the installation, it is essential to define your keyboard layout, your timezone and finally where the operating system will be installed.
|
||||
|
||||
![Choose keyboard, time and date and then go to Installation Destination][20]
|
||||
|
||||
The partitioning process is straight forward. You made some free space as VDI earlier. It should be automatically recognized.
|
||||
|
||||
Select your disk and set the storage configuration to automatic. Click on Done to go to the previous dialog box.
|
||||
|
||||
![Disk should be automatically recognized][21]
|
||||
|
||||
Once you have configured the above, click on “Begin Installation”.
|
||||
|
||||
![Begin installation of Fedora][22]
|
||||
|
||||
Now you just need to wait for five-six minutes for installation completion. Click on the “Finish installation” button when installation is finished.
|
||||
|
||||
As a last step, you need to power off your system. If you are unfamiliar with the GNOME desktop environment you can do it like so.
|
||||
|
||||
![Turn off Fedora live environment after installation][23]
|
||||
|
||||
You have to manually unload the ISO file that you loaded at the initial steps.
|
||||
|
||||
![Remove Fedora ISO From Optical Drive][24]
|
||||
|
||||
The next time you start the virtual machine with Fedora, you will be prompted to create a user account and set your password for Fedora Linux.
|
||||
|
||||
### Use VirtualBox guest additions for additional features like clipboard sharing, folder sharing and more
|
||||
|
||||
[Guest Additions][25] are designed to be installed inside a virtual machine post installation of the guest operating system. They contain device drivers and system applications that optimize the guest operating system for better performance and usability.
|
||||
|
||||
The Guest Additions ISO file is mounted as a virtual CD-ROM in order to be installed.
|
||||
|
||||
This is a straightforward process. Simply click on the devices tab and then click on “Insert Guest Additions CD image”
|
||||
|
||||
![][26]
|
||||
|
||||
You will be prompted to download the guest additions image, when prompt click on Download.
|
||||
|
||||
![Install VirtualBox Guest Additions][27]
|
||||
|
||||
#### **Shared clipboard**
|
||||
|
||||
At some point you’ll need to move some content between your virtual machine and the host operating system. The shared clipboard/drag and drop support will allow you to copy items on one platform and paste them on the other.
|
||||
|
||||
To enable this feature, choose **Settings** on the VirtualBox home page and follow the instructions as below. I find the **Bidirectional** option the most convenient.
|
||||
|
||||
![Enable clipboard sharing between guest and host systems][28]
|
||||
|
||||
#### **Shared folders**
|
||||
|
||||
There are two types of shares:
|
||||
|
||||
* Permanent shares, that are saved with the Virtual Machine settings.
|
||||
* Transient shares, that are disappear when the Virtual Machine is powered off. These can be created using a checkbox in the VirtualBox Manager.
|
||||
|
||||
|
||||
|
||||
In this tutorial, I will make a permanent shared folder. In the VM settings add the host system folder you want to share and choose the name that you want to appear at your VM.
|
||||
|
||||
![][29]
|
||||
|
||||
The next time you start the virtual machine, the folder should appear as a network drive.
|
||||
|
||||
![][30]
|
||||
|
||||
#### **Better video support**
|
||||
|
||||
While the virtual graphics card which Oracle VirtualBox provides all the basic features, the custom video drivers that are installed with the Guest Additions provide you with extra high and non-standard video modes, as well as accelerated video performance.
|
||||
|
||||
Using Guest Additions, the guest OS’s resolution will dynamically resize as you adjust the VirtualBox window on your computer.
|
||||
|
||||
Finally, Guest Additions can take advantage of your computer’s graphics card. If you’re a gamer or using productivity software in a WM, this makes a huge difference.
|
||||
|
||||
#### USB and Network Devices sharing
|
||||
|
||||
With VirtualBox, users have the ability to use a fully-functional operating system, without having to do the setup on different hardware. However, sharing USB and network devices between the host and guest machine is not as straightforward as it should be.
|
||||
|
||||
To access USB devices, you will need to install [the VirtualBox extension pack][31].
|
||||
|
||||
![Install VirtualBox Extensions pack][32]
|
||||
|
||||
_**This is for Linux only**_ because I am using all this in Linux.
|
||||
|
||||
In order for VirtualBox to have access to the USB subsystem, the user (on host system) running VirtualBox must belong to the vboxuser group. To do this, open up a terminal and issue the following command:
|
||||
|
||||
```
|
||||
sudo usermod -aG vboxusers 'your username'
|
||||
```
|
||||
|
||||
Once you run the command, you should either log out and log back in, or restart your host machine.
|
||||
|
||||
At this step, plug in your USB stick and through your VM settings you should be able to find and add the medium as shown at the example.
|
||||
|
||||
![][33]
|
||||
|
||||
Your USB will be accessible the next time you start your virtual machine.
|
||||
|
||||
![][34]
|
||||
|
||||
### Bonus Tip: Save and export the Virtual Machine so that you can use it later on any system
|
||||
|
||||
You may want to use your virtual machine to another computer or it is time to build a new machine and you need to keep your virtual machine as it is. You can easily export your current setup and import it to another machine at a few easy steps.
|
||||
|
||||
At the VirtualBox home panel, click on file and the export appliance. If you prefer keyboard shortcuts, you can simply click **Ctrl+E**.
|
||||
|
||||
![][35]
|
||||
|
||||
Choose the virtual machine you want to export and click on next.
|
||||
|
||||
![][36]
|
||||
|
||||
The Format option needs some attention. There are three different options of Open Virtualization Format 0.9, 1.0 and 2.0, which can be either ovf or ova extensions.
|
||||
|
||||
With ovf extension, several files will be written separately, compared to ova extension, which combines all the files into one Open Virtualization Format archive.
|
||||
|
||||
The default format, Open Virtualization Format 1.0, should be fine.
|
||||
|
||||
![][37]
|
||||
|
||||
To finish the process, click next and at the next dialog box click export.
|
||||
|
||||
#### Conclusion
|
||||
|
||||
By using a virtual machine you can’t just test an operating system but deploy a fully functioning system, equally comparable to a physical machine. Nowadays, hardware has become so powerful and affordable that most of its power is not being utilized.
|
||||
|
||||
Through virtualization technology, you can use those wasted resources. The need for physical machines is reduced, and consequently the energy consumption is less. You can save money both from hardware and reduced running costs.
|
||||
|
||||
On a larger scale, server virtualization is more of a basic requirement than an advanced concept.
|
||||
|
||||
I hope you found this tutorial helpful in installing Fedora Linux in VirtualBox. If you face any issues, please let me know in the comments.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-fedora-in-virtualbox/
|
||||
|
||||
作者:[Dimitrios Savvopoulos][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/dimitrios/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/create-fedora-live-usb-ubuntu/
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/install-fedora-in-virtualbox.png?resize=800%2C450&ssl=1
|
||||
[3]: https://itsfoss.com/install-virtualbox-ubuntu/
|
||||
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/download-virtulabox.jpg?resize=799%2C294&ssl=1
|
||||
[5]: https://www.virtualbox.org/
|
||||
[6]: https://getfedora.org/en/iot/
|
||||
[7]: https://getfedora.org/en/workstation/
|
||||
[8]: https://getfedora.org/en/server/
|
||||
[9]: https://spins.fedoraproject.org/
|
||||
[10]: https://itsfoss.com/fedora-33/
|
||||
[11]: https://getfedora.org/
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/0.-create-a-new-vm.png?resize=800%2C550&ssl=1
|
||||
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/1-create-vm-fedora.png?resize=800%2C533&ssl=1
|
||||
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/2-fedora-vm-disk.png?resize=800%2C533&ssl=1
|
||||
[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/fedora-vm-settings-iso.png?resize=800%2C640&ssl=1
|
||||
[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/3-fedora-vm-settings2.png?resize=800%2C600&ssl=1
|
||||
[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/4-fedora-vm-cpu.png?resize=800%2C533&ssl=1
|
||||
[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/6-fedora-vm-boot.png?resize=800%2C600&ssl=1
|
||||
[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/7-fedora-vm-install-1.png?resize=800%2C622&ssl=1
|
||||
[20]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/9-fedora-vm-partitioning-2.png?resize=800%2C706&ssl=1
|
||||
[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/10-fedora-vm-hdd.png?resize=732%2C645&ssl=1
|
||||
[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/12-fedora-vm-installation-1.png?resize=800%2C706&ssl=1
|
||||
[23]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/15-power-off-fedora-gnome.png?resize=800%2C706&ssl=1
|
||||
[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/remove-fedora-iso-from-optical-drive.png?resize=800%2C589&ssl=1
|
||||
[25]: https://www.virtualbox.org/manual/ch04.html
|
||||
[26]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/16-Fedora-vm-guest-additions.png?resize=800%2C706&ssl=1
|
||||
[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/17-Fedora-vm-guest-additions.png?resize=800%2C686&ssl=1
|
||||
[28]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/19-fedora-vm-shared-clipboard-2.png?resize=800%2C650&ssl=1
|
||||
[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/20-fedora-vm-shared-folders-1.png?resize=800%2C650&ssl=1
|
||||
[30]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/22-fedora-vm-shared-folders2-1.png?resize=800%2C547&ssl=1
|
||||
[31]: https://download.virtualbox.org/virtualbox/6.1.16/Oracle_VM_VirtualBox_Extension_Pack-6.1.16.vbox-extpack
|
||||
[32]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/21.-fedora-vm-extension-pack.png?resize=800%2C600&ssl=1
|
||||
[33]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/25.-fedora-vm-usb-1.png?resize=800%2C527&ssl=1
|
||||
[34]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/26.-fedora-vm-usb-1.png?resize=800%2C578&ssl=1
|
||||
[35]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/23.-fedora-vm-export.png?resize=800%2C600&ssl=1
|
||||
[36]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/24.-fedora-vm-export-1.png?resize=800%2C545&ssl=1
|
||||
[37]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/25.-fedora-vm-export-800x545.png?resize=800%2C545&ssl=1
|
158
sources/tech/20201114 Woothee (HTTP User Agent Parser).md
Normal file
158
sources/tech/20201114 Woothee (HTTP User Agent Parser).md
Normal file
@ -0,0 +1,158 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Woothee (HTTP User Agent Parser))
|
||||
[#]: via: (https://theartofmachinery.com/2020/11/14/woothee.html)
|
||||
[#]: author: (Simon Arneaud https://theartofmachinery.com)
|
||||
|
||||
Woothee (HTTP User Agent Parser)
|
||||
======
|
||||
|
||||
I’ve written [a D implementation of the Project Woothee multi-language HTTP user agent parser][1]. Here are some notes about what it’s useful for, and few things special about the D implementation.
|
||||
|
||||
### Project Woothee
|
||||
|
||||
HTTP clients (like normal browsers and search engine crawlers) usually identify themselves to web servers with a user agent string. These strings often contain interesting information like the client name, client version and operating system, but the HTTP spec makes no rules about how this information should be structured (it’s free-form text). Parsing them requires a bunch of rules based on what real clients use in the wild.
|
||||
|
||||
There’s a project called [ua-parser][2] that maintains a list of (currently) ~1000 regular expressions for parsing user agent strings. Project Woothee is another project that’s less comprehensive, but faster than testing 1000 regexes. Sometimes you want a more comprehensive parser, but sometimes it doesn’t really help. For example, suppose you want to estimate the proportion of your users running Firefox versus Chrome versus whatever by processing a big web log dump. The answer will never be 100% accurate (even with 100% accurate parsing) because bots pretending to be Chrome browsers will skew the results a bit anyway.
|
||||
|
||||
Woothee has some quirks (e.g., it doesn’t distinguish RSS reader clients) but it has uses, too.
|
||||
|
||||
### The D version
|
||||
|
||||
I wanted to keep the D version code simple so that it can be easily updated when the upstream project data gets updated. I took some easy opportunities to make it faster, though. In a quick, unscientific test, it parsed ~1M strings from a web log on a five-year-old laptop in about 5s. I’m sure it could be made faster, but that’s good enough for me right now.
|
||||
|
||||
#### Preprocessing regexes and HTTP client data
|
||||
|
||||
Woothee still uses some regexes (about 50). In most languages, these are strings that need to be processed at runtime, every time the program is run. I don’t know if [Boost Xpressive][3] was the first to support compile-time regex parsing, but I remember being impressed by it at the time. The downside is having to use an operator overloading hack that manages to make regexes even harder to read:
|
||||
|
||||
```
|
||||
sregex re = '$' >> +_d >> '.' >> _d >> _d;
|
||||
```
|
||||
|
||||
We’ve come a long way since 2007. [D’s standard library has a compile-time regex][4], but it’s not even needed. This works:
|
||||
|
||||
```
|
||||
void foo()
|
||||
{
|
||||
import std.regex;
|
||||
static immutable re = regex(`\$\d+\.\d\d`);
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
If you’re wondering: `static` puts the `re` into the same storage space as a global variable would be in (instead of the stack, which is run time only), while `immutable` allows the compiler to avoid copying the variable into thread-local storage for every thread. If you’re from C++, you might expect that `regex()` will still get called once at run time to initialise `re`, but thanks to [CTFE][5] it’s processed at compile time and turned into normal data in the compiled binary.
|
||||
|
||||
There’s one big downside: this kind of complex CTFE is still slow. Compiling all the regexes using DMD takes ~10s, long enough to be annoying. So I added a [version flag][6] `WootheePrecompute`. Switching regex CTFE is simpler because the regex matching functions in `std.regex` also have overloads that take plain strings for regexes (which then get compiled and passed to the overload that takes a pre-compiled regex). `woothee-d` uses a helper function defined like this:
|
||||
|
||||
```
|
||||
version(WootheePrecompute)
|
||||
{
|
||||
auto buildRegex(string r)
|
||||
{
|
||||
return regex(r);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
auto buildRegex(string r)
|
||||
{
|
||||
return r;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Then regexes get used in the code like this:
|
||||
|
||||
```
|
||||
static immutable version_re = buildRegex(`Sleipnir/([.0-9]+)`);
|
||||
const caps = _agent.matchFirst(version_re);
|
||||
```
|
||||
|
||||
Without `WootheePrecompute`, `buildRegex()` has no effect, and `version_re` is just a plain string that gets compiled on use. With `WootheePrecompute` enabled, `buildRegex()` actually compiles the regex using CTFE.
|
||||
|
||||
`WootheePrecompute` also enables processing the Project Woothee HTTP client data at compile time instead of at startup.
|
||||
|
||||
#### More precomputation for faster string searching
|
||||
|
||||
Woothee requires a lot of searching for strings inside the user agent string. Here’s a small sample:
|
||||
|
||||
```
|
||||
if (contains!"Yahoo" || contains!"help.yahoo.co.jp/help/jp/" || contains!"listing.yahoo.co.jp/support/faq/")
|
||||
{
|
||||
if (contains!"compatible; Yahoo! Slurp") return populateDataset("YahooSlurp");
|
||||
if (contains!"YahooFeedSeekerJp" || contains!"YahooFeedSeekerBetaJp" || contains!"crawler (http://listing.yahoo.co.jp/support/faq/" || contains!"crawler (http://help.yahoo.co.jp/help/jp/" || contains!"Y!J-BRZ/YATSHA crawler" || contains!"Y!J-BRY/YATSH crawler") return populateDataset("YahooJP");
|
||||
if (contains!"Yahoo Pipes") return populateDataset("YahooPipes");
|
||||
}
|
||||
```
|
||||
|
||||
You may have noticed that `contains` is a template function taking the “needle” string as compile-time parameter. There are many famous ways to make searching for a “needle” string in a “haystack” string faster if you can preprocess either one. The Boyer-Moore algorithm is one algorithm, and there’s actually [an implementation in Phobos][7], but sadly it doesn’t work in CTFE.
|
||||
|
||||
I tried another trick that’s simple and fast for short strings. The key idea is that there’s no point searching for a needle like “foo” if the haystack doesn’t even contain both the letters “f” and “o” in the first place. We can create a 64b hash of both strings that lets us do an approximate character subset test with a super-fast bitwise operation (like a [bloom filter][8]). The hashes for all the needle strings can be calculated at compile time, and the hash for the haystack (the user agent string) only needs to calculated once.
|
||||
|
||||
The hash is super simple. Each byte in the string just sets one of the 64 bits of the output. Specifically, the hash takes each byte in the string, calculates the value modulo 64 (equivalently, takes the lower 6 bits), then sets the corresponding bit of the 64b output. Here’s the code:
|
||||
|
||||
```
|
||||
ulong bloomHashOf(string s) pure
|
||||
{
|
||||
ulong ret;
|
||||
foreach (char c; s)
|
||||
{
|
||||
ret |= 1UL << (c & 63);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
```
|
||||
|
||||
Here’s an example with the string, “X11; FreeBSD ”:
|
||||
|
||||
![Bloom-filter-style 64b hash of the string “X11; FreeBSD ”. The string starts with the letter “X”, which has ASCII code 88, which is 64 + 24, which is why bit #24 is set.][9]
|
||||
|
||||
Note that the hash doesn’t count occurrences of a character; it just flags whether a particular character occurs at all. It also loses all information about order. It’s still useful for avoiding a lot of futile searches. For example, “Tiny Tiny RSS/20.05-c8243b0 (<http://tt-rss.org/)”> doesn’t contain the character “X”, so there’s no way it can contain the string “X11; FreeBSD ”, as is easily detected by the hashes:
|
||||
|
||||
![Hashes of the string “Tiny Tiny RSS/20.05-c8243b0 \(http://tt-rss.org/\)” and the string “X11; FreeBSD ”. The first hash doesn't have bit #24 set, proving that the first string can't contain a letter “X”, proving that the second string can't be contained inside it.][10]
|
||||
|
||||
Here’s the D code. It does a quick bitwise op to check if _all_ the bits set in the needle hash are also set in the (previously calculated) user agent string hash. `bloomHashOf(needle)` is calculated as a constant at compile time. In fact, LDC with `-O2` inlines very sensibly, basically putting some bit ops with a 64b constant in front of a conditional jump in front of the call to `canFind()`. This precomputation is dirt cheap, so I didn’t even bother putting a `version(WootheePrecompute)` in there, as you can see for yourself:
|
||||
|
||||
```
|
||||
bool contains(string needle)()
|
||||
{
|
||||
import std.algorithm.searching : canFind;
|
||||
enum needle_bloom = bloomHashOf(needle);
|
||||
if ((needle_bloom & _agent_bloom) != needle_bloom) return false;
|
||||
return _agent.canFind(needle);
|
||||
}
|
||||
```
|
||||
|
||||
The quick check is one sided. If it fails, we know we don’t need to search. If it passes, that doesn’t prove we have a substring match because the hash doesn’t account for repeated characters, or character order, and can also have different characters colliding to set the same bit value.
|
||||
|
||||
Simply taking the bottom 6 bits is a pretty unsophisticated hashing technique, but if you look at an ASCII chart (`man ascii`), most of the characters that typically appear in HTTP user agents are in the range 64-127, which all have different values in the bottom 6 bits. So collisions aren’t a real problem, and actually [most pseuodorandom hashes would do a worse job][11].
|
||||
|
||||
In a simple test with real HTTP user agents from a log, 89% of potential `canFind()` calls were skipped thanks to the quick check, 9% were followed but failed and 2% were followed and found a real match. Overall, the quick check made `woothee-d` almost twice as fast, which is a nice win for some cheap precomputation. I think there’s more performance that could be gained, but it looks like most of the low-hanging fruit for string search has been taken.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://theartofmachinery.com/2020/11/14/woothee.html
|
||||
|
||||
作者:[Simon Arneaud][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://theartofmachinery.com
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://gitlab.com/sarneaud/woothee-d
|
||||
[2]: https://github.com/ua-parser
|
||||
[3]: https://www.boost.org/doc/libs/1_74_0/doc/html/xpressive/user_s_guide.html#boost_xpressive.user_s_guide.creating_a_regex_object.static_regexes
|
||||
[4]: https://dlang.org/phobos/std_regex.html#ctRegex
|
||||
[5]: https://tour.dlang.org/tour/en/gems/compile-time-function-evaluation-ctfe
|
||||
[6]: https://dlang.org/spec/version.html
|
||||
[7]: https://dlang.org/phobos/std_algorithm_searching.html#boyerMooreFinder
|
||||
[8]: https://en.wikipedia.org/wiki/Bloom_filter
|
||||
[9]: https://theartofmachinery.com/images/woothee/bloom.svg
|
||||
[10]: https://theartofmachinery.com/images/woothee/bloom_mismatch.svg
|
||||
[11]: https://theartofmachinery.com/2020/01/27/systems_programming_probability.html
|
@ -0,0 +1,258 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to use Serializers in the Django Python web framework)
|
||||
[#]: via: (https://opensource.com/article/20/11/django-rest-framework-serializers)
|
||||
[#]: author: (Renato Oliveira https://opensource.com/users/renato-oliveira)
|
||||
|
||||
How to use Serializers in the Django Python web framework
|
||||
======
|
||||
Serialization transforms data into a format that can be stored or
|
||||
transmitted and then reconstructs it for use. DRF has the best-known
|
||||
serializers.
|
||||
![Net catching 1s and 0s or data in the clouds][1]
|
||||
|
||||
Serialization is the process of transforming data into a format that can be stored or transmitted and then reconstructing it. It's used all the time when developing applications or storing data in databases, in memory, or converting it into files.
|
||||
|
||||
I recently helped two junior developers at [Labcodes][2] understand serializers, and I thought it would be good to share my approach with Opensource.com readers.
|
||||
|
||||
Suppose you're creating software for an e-commerce site and you have an Order that registers the purchase of a single product, by someone, at a price, on a date:
|
||||
|
||||
|
||||
```
|
||||
class Order:
|
||||
def __init__(self, product, customer, price, date):
|
||||
self.product = product
|
||||
self.customer = customer
|
||||
self.price = price
|
||||
self.date = date
|
||||
```
|
||||
|
||||
Now, imagine you want to store and retrieve order data from a key-value database. Luckily, its interface accepts and return dictionaries, so you need to convert your object into a dictionary:
|
||||
|
||||
|
||||
```
|
||||
def serialize_order(order):
|
||||
return {
|
||||
'product': order.product,
|
||||
'customer': order.customer,
|
||||
'price': order.price,
|
||||
'date': order.date
|
||||
}
|
||||
```
|
||||
|
||||
And if you want to get some data from that database, you can get the dict data and turn that into your Order object:
|
||||
|
||||
|
||||
```
|
||||
def deserialize_order(order_data):
|
||||
return Order(
|
||||
product=order_data['product'],
|
||||
customer=order_data['customer'],
|
||||
price=order_data['price'],
|
||||
date=order_data['date'],
|
||||
)
|
||||
```
|
||||
|
||||
This is pretty straightforward to do with simple data, but when you need to deal with complex objects made of complex attributes, this approach doesn't scale well. You also need to handle the validation of different types of fields, and that's a lot of work to do manually.
|
||||
|
||||
That's where frameworks' serializers are handy. They allow you to create serializers with little boilerplates that will work for your complex cases.
|
||||
|
||||
[Django][3] comes with a serialization module that allows you to "translate" Models into other formats:
|
||||
|
||||
|
||||
```
|
||||
from django.core import serializers
|
||||
|
||||
serializers.serialize('json', Order.objects.all())
|
||||
```
|
||||
|
||||
It covers the most-used cases for web applications, such as JSON, YAML, and XML. But you can also use third-party serializers or create your own. You just need to register it in your settings.py file:
|
||||
|
||||
|
||||
```
|
||||
# settings.py
|
||||
SERIALIZATION_MODULES = {
|
||||
'my_format': appname.serializers.MyFormatSerializer,
|
||||
}
|
||||
```
|
||||
|
||||
To create your own `MyFormatSerializer`, you need to implement the `.serialize()` method and accept a queryset and extra options as params:
|
||||
|
||||
|
||||
```
|
||||
class MyFormatSerializer:
|
||||
def serialize(self, queryset, **options):
|
||||
# serious serialization happening
|
||||
```
|
||||
|
||||
Now you can serialize your queryset to your new format:
|
||||
|
||||
|
||||
```
|
||||
from django.core import serializers
|
||||
|
||||
serializers.serialize('my_format', Order.objects.all())
|
||||
```
|
||||
|
||||
You can use the options parameters to define the behavior of your serializer. For example, if you want to define that you're going to work with nested serialization when dealing with `ForeignKeys` or you just want that data to return its primary keys, you can pass a `flat=True` param as an option and deal with that within your method:
|
||||
|
||||
|
||||
```
|
||||
class MyFormatSerializer:
|
||||
def serializer(self, queryset, **options):
|
||||
if options.get('flat', False):
|
||||
# don't recursively serialize relationships
|
||||
# recursively serialize relationships
|
||||
```
|
||||
|
||||
One way to use Django serialization is with the `loaddata` and `dumpdata` management commands.
|
||||
|
||||
### DRF serializers
|
||||
|
||||
In the Django community, the [Django REST framework][4] (DRF) offers the best-known serializers. Although you can use Django's serializers to build the JSON you'll respond to in your API, the one from the REST framework comes with nice features that help you deal with and easily validate complex data.
|
||||
|
||||
In the Order example, you could create a serializer like this:
|
||||
|
||||
|
||||
```
|
||||
from restframework import serializers
|
||||
|
||||
class OrderSerializer(serializers.Serializer):
|
||||
product = serializers.CharField(max_length=255)
|
||||
customer = serializers.CharField(max_lenght=255)
|
||||
price = serializers.DecimalField(max_digits=5, decimal_places=2)
|
||||
date = serializers.DateField()
|
||||
```
|
||||
|
||||
And easily serialize its data:
|
||||
|
||||
|
||||
```
|
||||
order = Order('pen', 'renato', 10.50, date.today())
|
||||
serializer = OrderSerializer(order)
|
||||
|
||||
serializer.data
|
||||
# {'product': 'pen', 'customer': 'renato', 'price': '10.50', 'date': '2020-08-16'}
|
||||
```
|
||||
|
||||
To be able to return an instance from data, you need to implement two methods—create and update:
|
||||
|
||||
|
||||
```
|
||||
from rest_framework import serializers
|
||||
|
||||
class OrderSerializer(serializers.Serializer):
|
||||
product = serializers.CharField(max_length=255)
|
||||
customer = serializers.CharField(max_length=255)
|
||||
price = serializers.DecimalField(max_digits=5, decimal_places=2)
|
||||
date = serializers.DateField()
|
||||
|
||||
def create(self, validated_data):
|
||||
# perform order creation
|
||||
return order
|
||||
|
||||
def update(self, instance, validated_data):
|
||||
# perform instance update
|
||||
return instance
|
||||
```
|
||||
|
||||
After that, you can create or update instances by calling `is_valid()` to validate the data and `save()` to create or update an instance:
|
||||
|
||||
|
||||
```
|
||||
serializer = OrderSerializer(**data)
|
||||
## to validate data, mandatory before calling save
|
||||
serializer.is_valid()
|
||||
serializer.save()
|
||||
```
|
||||
|
||||
### Model serializers
|
||||
|
||||
When serializing data, you often need to do it from a database, therefore, from your models. A ModelSerializer, like a ModelForm, provides an API to create serializers from your models. Suppose you have an Order model:
|
||||
|
||||
|
||||
```
|
||||
from django.db import models
|
||||
|
||||
class Order(models.Model):
|
||||
product = models.CharField(max_length=255)
|
||||
customer = models.CharField(max_length=255)
|
||||
price = models.DecimalField(max_digits=5, decimal_places=2)
|
||||
date = models.DateField()
|
||||
```
|
||||
|
||||
You can create a serializer for it like this:
|
||||
|
||||
|
||||
```
|
||||
from rest_framework import serializers
|
||||
|
||||
class OrderSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = Order
|
||||
fields = '__all__'
|
||||
```
|
||||
|
||||
Django automatically includes all model fields in the serializer and creates the `create` and `update` methods.
|
||||
|
||||
### Using serializers in class-based views (CBVs)
|
||||
|
||||
Like Forms with Django's CBVs, serializers integrate well with DRFs. You can set the `serializer_class` attribute so that the serializer will be available to the view:
|
||||
|
||||
|
||||
```
|
||||
from rest_framework import generics
|
||||
|
||||
class OrderListCreateAPIView(generics.ListCreateAPIView):
|
||||
queryset = Order.objects.all()
|
||||
serializer_class = OrderSerializer
|
||||
```
|
||||
|
||||
You can also define the `get_serializer_class()` method:
|
||||
|
||||
|
||||
```
|
||||
from rest_framework import generics
|
||||
|
||||
class OrderListCreateAPIView(generics.ListCreateAPIView):
|
||||
queryset = Order.objects.all()
|
||||
|
||||
def get_serializer_class(self):
|
||||
if is_free_order():
|
||||
return FreeOrderSerializer
|
||||
return OrderSerializer
|
||||
```
|
||||
|
||||
There are other methods in CBVs that interact with serializers. For example, [get_serializer()][5] returns an already-instantiated serializer, while [get_serializer_context()][6] returns the arguments you'll pass to the serializer when creating its instance. For views that create or update data, there are `create` and `update` that validate the data with the `is_valid` method to be saved, and [perform_create][7] and [perform_update][8] that call the serializer's save method.
|
||||
|
||||
### Learn more
|
||||
|
||||
For other resources, see my friend André Ericson's [Classy Django REST Framework][9] website. It is a [Classy Class-Based Views][10] REST Framework version that gives you an in-depth inspection of the classes that compose DRF. Of course, the official [documentation][11] is an awesome resource.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/11/django-rest-framework-serializers
|
||||
|
||||
作者:[Renato Oliveira][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/renato-oliveira
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_analytics_cloud.png?itok=eE4uIoaB (Net catching 1s and 0s or data in the clouds)
|
||||
[2]: http://www.labcodes.com.br
|
||||
[3]: https://www.djangoproject.com/
|
||||
[4]: https://www.django-rest-framework.org/
|
||||
[5]: http://www.cdrf.co/3.9/rest_framework.generics/CreateAPIView.html#get_serializer
|
||||
[6]: http://www.cdrf.co/3.9/rest_framework.generics/CreateAPIView.html#get_serializer_context
|
||||
[7]: http://www.cdrf.co/3.9/rest_framework.generics/CreateAPIView.html#perform_create
|
||||
[8]: http://www.cdrf.co/3.9/rest_framework.generics/RetrieveUpdateAPIView.html#perform_update
|
||||
[9]: http://www.cdrf.co/
|
||||
[10]: https://ccbv.co.uk/
|
||||
[11]: https://www.django-rest-framework.org/api-guide/serializers/#serializers
|
@ -0,0 +1,130 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Linux Jargon Buster: What is Grub in Linux? What is it Used for?)
|
||||
[#]: via: (https://itsfoss.com/what-is-grub/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Linux Jargon Buster: What is Grub in Linux? What is it Used for?
|
||||
======
|
||||
|
||||
If you ever used a desktop Linux system, you must have seen this screen. This is called the GRUB screen. Yes, it is written in all capital letters.
|
||||
|
||||
![Remember this screen? This is GRUB][1]
|
||||
|
||||
In this chapter of the Linux Jargon Buster series, I’ll tell you what is Grub and what is it used for. I’ll also briefly touch upon the configuration and customization part.
|
||||
|
||||
### What is GRUB?
|
||||
|
||||
[GRUB][2] is complete program for loading and managing boot. It is the most common bootloader for Linux distributions. A bootloader is the first software that runs when a computer starts. It loads the [kernel of the operating system][3] and then the kernel initializes the rest of the operating systems (shell, [display manager][4], [desktop environment][5] etc).
|
||||
|
||||
#### Boot loader vs boot manager
|
||||
|
||||
I didn’t want to confuse you at this stage but I see no option to avoid bringing this topic. There is a blur line between a bootloader and a boot manager.
|
||||
|
||||
You already know that bootloader starts first and then loads the kernel into memory and executes it. A boot manager program allows you to choose between operating systems (if there are more than one OS on your system). A boot manager doesn’t load the OS directly,
|
||||
|
||||
With Linux kernel version 3.3, the [Linux kernel includes a built-in EFI bootloader][6]. In fact, any operating system that is capable of working [EFI system includes an EFI bootloader][7]. In EFI capable systems, the firmware reads the EFI System Partition (ESP) for the EFI files for boot information.
|
||||
|
||||
_**Insert Image: Show partition table with ESP partition.**_
|
||||
|
||||
![][8]
|
||||
|
||||
GRUB is both a bootloader and a boot manager. I’ll come back to GRUB in a moment. Let’s see other GRUB like programs.
|
||||
|
||||
Trivia
|
||||
|
||||
GRUB is acronym for **GR**and **U**nified **B**ootloader.
|
||||
|
||||
### What are some other boot managing programs like GRUB?
|
||||
|
||||
GRUB is the most popular boot manager for Linux. But it is not the only one. There is this highly customizable [rEFInd boot manager][9] that some Linux users love to use.
|
||||
|
||||
![Customized rEFInd Boot Manager Screen | Image Credit][10]
|
||||
|
||||
There is [systemd-boot][11] text-based boot manager. You can guess that this is exclusively for systemd-based Linux distributions. Some distributions like Pop OS use the systemd-boot.
|
||||
|
||||
![systemd-Boot in Pop OS | Image Credit][12]
|
||||
|
||||
### Accessing or editing GRUB
|
||||
|
||||
The usual GRUB screen you see is its menu interface. It allows you to choose the operating systems if there are more than one operating system. You can also choose to load a different kernel if your Linux distribution as more than one kernel installed.
|
||||
|
||||
Depending upon the configuration set by the Linux distribution, you may have some other entries on the GRUB menu.
|
||||
|
||||
You can edit GRUB menu entry by pressing the key `e`. This way, you can change the kernel parameters before loading it. For example, in some cases, [disabling the graphics driver from the kernel helps you with Linux system stuck at boot][13].
|
||||
|
||||
![][14]
|
||||
|
||||
You can also enter the command line menu of GRUB using the key `c` at the GRUB menu interface.
|
||||
|
||||
#### GRUB configuration file
|
||||
|
||||
Any changes you make to the GRUB from the menu interface is temporary. If you want to make some permanent changes to GRUB like changing the default timeout, you can change the configuration file after you boot into your Linux system.
|
||||
|
||||
The default GRUB configuration file is located at /etc/default/grub. There is also a /etc/default/grub.d directory. You may edit the /etc/default/grub file directly, however it is advised to make additional changes by adding config files (.cfg files) in this directory.
|
||||
|
||||
![Default GRUB Config File][15]
|
||||
|
||||
You must [update GRUB for the changes to take into effect][16].
|
||||
|
||||
#### GRUB customizer in Ubuntu
|
||||
|
||||
If you think [editing file with a text editor in the terminal][17] is not something you feel comfortable with, you can [use a graphical tool called GRUB Customizer][18].
|
||||
|
||||
![][19]
|
||||
|
||||
It allows you to change the boot order, default timeout etc. You can also use it to change the background of GRUB with a custom wallpaper.
|
||||
|
||||
This tool is unfortunately available for Ubuntu-based Linux distributions only.
|
||||
|
||||
### Conclusion
|
||||
|
||||
I have touched everything on the surface. EFI, boot loading and GRUB itself is detailed and complicated topic and not in the scope of this article. This article intended to give you a high level overview of GRUB boot program.
|
||||
|
||||
Perhaps I’ll write a detailed guide on GRUB explaining the low level details. For now, if you want to learn more on GRUB, you can access the GRUB documentation in your Linux terminal using `info grub` command.
|
||||
|
||||
![GRUB Manual can be accessed via Terminal][20]
|
||||
|
||||
I hope you have a tad bit better understanding of what is GRUB now. Here’s a GIF to humor you.
|
||||
|
||||
![What Is GRUB? UEFI don’t hurt me, no more… :\)][21]
|
||||
|
||||
I may not have answered all questions you have about GRUB. Please feel free to let me know in the comment section. I may update the article with your questions or suggestions.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/what-is-grub/
|
||||
|
||||
作者:[Abhishek Prakash][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/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/grub-screen-linux.png?resize=800%2C450&ssl=1
|
||||
[2]: https://www.gnu.org/software/grub/
|
||||
[3]: https://itsfoss.com/what-is-linux/
|
||||
[4]: https://itsfoss.com/display-manager/
|
||||
[5]: https://itsfoss.com/what-is-desktop-environment/
|
||||
[6]: https://www.rodsbooks.com/efi-bootloaders/efistub.html
|
||||
[7]: https://jdebp.eu/FGA/efi-boot-process.html
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/disk-partition-gparted.png?resize=744%2C385&ssl=1
|
||||
[9]: https://www.rodsbooks.com/refind/
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/refind-boot-manager.png?resize=800%2C602&ssl=1
|
||||
[11]: https://wiki.gentoo.org/wiki/Systemd-boot
|
||||
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/systemd-boot.png?resize=714%2C333&ssl=1
|
||||
[13]: https://itsfoss.com/fix-ubuntu-freezing/
|
||||
[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/editing-grub-to-fix-nvidia-issue.jpg?resize=800%2C343&ssl=1
|
||||
[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/default-grub-config-file.png?resize=759%2C437&ssl=1
|
||||
[16]: https://itsfoss.com/update-grub/
|
||||
[17]: https://itsfoss.com/command-line-text-editors-linux/
|
||||
[18]: https://itsfoss.com/grub-customizer-ubuntu/
|
||||
[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2013/05/make-windows-default-grub-2.jpeg?resize=799%2C435&ssl=1
|
||||
[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/grub-manual-Linux-terminal.png?resize=800%2C462&ssl=1
|
||||
[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/what_is_GRUB.gif?resize=500%2C343&ssl=1
|
@ -0,0 +1,262 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Manage multiple Terraform versions with tfenv)
|
||||
[#]: via: (https://opensource.com/article/20/11/tfenv)
|
||||
[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb)
|
||||
|
||||
Manage multiple Terraform versions with tfenv
|
||||
======
|
||||
If you use multiple Terraform versions in your environment, tfenv will
|
||||
make your life much easier.
|
||||
![Computer screen with files or windows open][1]
|
||||
|
||||
In my [Terraform for Kubernetes beginners][2] article, I used Terraform 11, and in an upcoming article, I'll cover upgrading from Terraform 11 to 12. To prepare for that, in this article, I'll show you how to use [tfenv][3], a tool that makes it much easier to convert from one version to another, as well as to manage multiple Terraform versions in your work environment.
|
||||
|
||||
### Install tfenv
|
||||
|
||||
Many coding languages have tools that allow you to go back and forth between versions based on environmental rules. One example (which tfenv is based on) is [rbenv][4], which allows you to choose which version of [Ruby][5] you want to work with.
|
||||
|
||||
tfenv works on Linux, macOS, and Windows; I'll cover the Linux installation using Ubuntu 18.04, but the tool's GitHub repository has [installation instructions][6] for the other operating systems.
|
||||
|
||||
The Linux installation uses some Git commands (check out the [intro to Git][7] series if you're not already familiar with it).
|
||||
|
||||
First, create a `.tfenv` folder in your `${HOME}` directory:
|
||||
|
||||
|
||||
```
|
||||
`jess@Athena:~$ mkdir .tfenv`
|
||||
```
|
||||
|
||||
Clone the `tfenv` repository:
|
||||
|
||||
|
||||
```
|
||||
jess@Athena:~$ git clone <https://github.com/tfutils/tfenv.git> ~/.tfenv
|
||||
Cloning into '/home/jess/.tfenv'...
|
||||
remote: Enumerating objects: 21, done.
|
||||
remote: Counting objects: 100% (21/21), done.
|
||||
remote: Compressing objects: 100% (19/19), done.
|
||||
remote: Total 1105 (delta 8), reused 10 (delta 2), pack-reused 1084
|
||||
Receiving objects: 100% (1105/1105), 216.01 KiB | 2.84 MiB/s, done.
|
||||
Resolving deltas: 100% (703/703), done.
|
||||
```
|
||||
|
||||
If you prefer [Homebrew][8], you can use:
|
||||
|
||||
|
||||
```
|
||||
`$ brew install tfenv`
|
||||
```
|
||||
|
||||
Export your path into your Bash profile:
|
||||
|
||||
|
||||
```
|
||||
`jess@Athena:~$ echo 'export PATH="$HOME/.tfenv/bin:$PATH"' >> ~/.bash_profile`
|
||||
```
|
||||
|
||||
If you want to use just the base commands for Ubuntu/Debian-based systems, there is another option that makes things a little easier. After doing the clone in the `.tfenv` directory, set your profile to put the `tfenv` command into your profile in your next session:
|
||||
|
||||
|
||||
```
|
||||
`jess@Athena:~/.tfenv$ . ~/.profile`
|
||||
```
|
||||
|
||||
Once the profile is set, you can symlink your directory to your `.local/bin` directory to make `tfenv` an executable binary:
|
||||
|
||||
|
||||
```
|
||||
`jess@Athena:~/.tfenv$ ln -s ~/.tfenv/bin/* ~/.local/bin`
|
||||
```
|
||||
|
||||
Run the `which` command, and you should see `tfenv`'s location:
|
||||
|
||||
|
||||
```
|
||||
jess@Athena:~/.tfenv$ which tfenv
|
||||
/home/jess/.local/bin/tfenv
|
||||
```
|
||||
|
||||
### How to use tfenv
|
||||
|
||||
Now that everything is installed, check out what commands are available:
|
||||
|
||||
|
||||
```
|
||||
jess@Athena:~$ tfenv
|
||||
tfenv 2.0.0-37-g0494129
|
||||
Usage: tfenv <command> [<options>]
|
||||
|
||||
Commands:
|
||||
install Install a specific version of Terraform
|
||||
use Switch a version to use
|
||||
uninstall Uninstall a specific version of Terraform
|
||||
list List all installed versions
|
||||
list-remote List all installable versions
|
||||
```
|
||||
|
||||
As you can see, it's a pretty straightforward tool that enables you to install and uninstall Terraform versions as needed.
|
||||
|
||||
Before you decide what to install, check which versions are available. This is a small snippet, as the list is about a mile long:
|
||||
|
||||
|
||||
```
|
||||
jess@Athena:~$ tfenv list-remote
|
||||
0.14.0-beta1
|
||||
0.14.0-alpha20201007
|
||||
0.14.0-alpha20200923
|
||||
0.14.0-alpha20200910
|
||||
0.13.5
|
||||
0.13.4
|
||||
0.13.3
|
||||
0.13.2
|
||||
0.13.1
|
||||
0.13.0
|
||||
0.13.0-rc1
|
||||
0.13.0-beta3
|
||||
0.13.0-beta2
|
||||
0.13.0-beta1
|
||||
0.12.29
|
||||
0.12.28
|
||||
0.12.27
|
||||
```
|
||||
|
||||
#### Install Terraform versions
|
||||
|
||||
To install the latest version of Terraform:
|
||||
|
||||
|
||||
```
|
||||
jess@Athena:~$ tfenv install latest
|
||||
Installing Terraform v0.13.5
|
||||
Downloading release tarball from <https://releases.hashicorp.com/terraform/0.13.5/terraform\_0.13.5\_linux\_amd64.zip>
|
||||
###################################################################################################################################################################################### 100.0%
|
||||
Downloading SHA hash file from <https://releases.hashicorp.com/terraform/0.13.5/terraform\_0.13.5\_SHA256SUMS>
|
||||
No keybase install found, skipping OpenPGP signature verification
|
||||
Archive: tfenv_download.N3bzZ2/terraform_0.13.5_linux_amd64.zip
|
||||
inflating: /home/jess/.tfenv/versions/0.13.5/terraform
|
||||
Installation of terraform v0.13.5 successful. To make this your default version, run 'tfenv use 0.13.5'
|
||||
```
|
||||
|
||||
To install a specific Terraform version (in this case, 0.12.29):
|
||||
|
||||
|
||||
```
|
||||
jess@Athena:~$ tfenv install 0.12.29
|
||||
Installing Terraform v0.12.29
|
||||
Downloading release tarball from <https://releases.hashicorp.com/terraform/0.12.29/terraform\_0.12.29\_linux\_amd64.zip>
|
||||
###################################################################################################################################################################################### 100.0%
|
||||
Downloading SHA hash file from <https://releases.hashicorp.com/terraform/0.12.29/terraform\_0.12.29\_SHA256SUMS>
|
||||
No keybase install found, skipping OpenPGP signature verification
|
||||
Archive: tfenv_download.1YFOLh/terraform_0.12.29_linux_amd64.zip
|
||||
inflating: /home/jess/.tfenv/versions/0.12.29/terraform
|
||||
Installation of terraform v0.12.29 successful. To make this your default version, run 'tfenv use 0.12.29'
|
||||
```
|
||||
|
||||
Finally, to install the latest version of Terraform 0.11:
|
||||
|
||||
|
||||
```
|
||||
jess@Athena:~$ tfenv install latest:^0.11
|
||||
Installing Terraform v0.11.15-oci
|
||||
Downloading release tarball from <https://releases.hashicorp.com/terraform/0.11.15-oci/terraform\_0.11.15-oci\_linux\_amd64.zip>
|
||||
###################################################################################################################################################################################### 100.0%
|
||||
Downloading SHA hash file from <https://releases.hashicorp.com/terraform/0.11.15-oci/terraform\_0.11.15-oci\_SHA256SUMS>
|
||||
No keybase install found, skipping OpenPGP signature verification
|
||||
Archive: tfenv_download.8OxQ8k/terraform_0.11.15-oci_linux_amd64.zip
|
||||
inflating: /home/jess/.tfenv/versions/0.11.15-oci/terraform
|
||||
Installation of terraform v0.11.15-oci successful. To make this your default version, run 'tfenv use 0.11.15-oci'
|
||||
```
|
||||
|
||||
That was simple, and now you can put them to use!
|
||||
|
||||
#### Change Terraform versions
|
||||
|
||||
Once you have installed several versions of Terraform, you can pick one to use. First, find out your options by listing the installed versions:
|
||||
|
||||
|
||||
```
|
||||
jess@Athena:~$ tfenv list
|
||||
0.13.5 (set by /home/jess/.tfenv/version)
|
||||
0.12.29
|
||||
0.11.15-oci
|
||||
```
|
||||
|
||||
By default, tfenv chooses the most up-to-date version of Terraform you have installed. Find out the default by running the `tfenv use` command:
|
||||
|
||||
|
||||
```
|
||||
jess@Athena:~$ tfenv use
|
||||
Switching default version to v0.13.5
|
||||
Switching completed
|
||||
|
||||
jess@Athena:~$ terraform --version
|
||||
Terraform v0.13.5
|
||||
```
|
||||
|
||||
But what if you need to use an older version? This example switches to the oldest version I have installed:
|
||||
|
||||
|
||||
```
|
||||
jess@Athena:~$ tfenv use 0.11.15-oci
|
||||
Switching default version to v0.11.15-oci
|
||||
Switching completed
|
||||
|
||||
jess@Athena:~$ terraform -version
|
||||
Terraform v0.11.15-oci
|
||||
|
||||
Your version of Terraform is out of date! The latest version
|
||||
is 0.13.5. You can update by downloading from [www.terraform.io/downloads.html][9]
|
||||
```
|
||||
|
||||
It's easy as pie! Just run the `list` command and use the naming convention provided.
|
||||
|
||||
#### Uninstall Terraform versions
|
||||
|
||||
If you have a version of Terraform you don't want or need any more, you can remove it with the `uninstall` command. For example, I don't need Terraform version 0.13:
|
||||
|
||||
|
||||
```
|
||||
jess@Athena:~$ tfenv uninstall 0.13.5
|
||||
Uninstall Terraform v0.13.5
|
||||
Terraform v0.13.5 is successfully uninstalled
|
||||
```
|
||||
|
||||
To confirm it's no longer installed:
|
||||
|
||||
|
||||
```
|
||||
jess@Athena:~$ tfenv list
|
||||
0.12.29
|
||||
0.11.15-oci
|
||||
```
|
||||
|
||||
### Final thoughts
|
||||
|
||||
The tfenv tool is great for many reasons. If you need to update from one version of Terraform to another, this is one of the faster ways to upgrade and test the outcome. If your environment has things running on several Terraform versions, it's easy to switch back and forth as needed. If you use Terraform, try tfenv and see how it can transform your environment.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/11/tfenv
|
||||
|
||||
作者:[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/cherrybomb
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open)
|
||||
[2]: https://opensource.com/article/20/7/terraform-kubernetes
|
||||
[3]: https://github.com/tfutils/tfenv
|
||||
[4]: https://github.com/rbenv/rbenv
|
||||
[5]: https://www.ruby-lang.org/en/
|
||||
[6]: https://github.com/tfutils/tfenv#installation
|
||||
[7]: https://opensource.com/life/16/7/stumbling-git
|
||||
[8]: https://opensource.com/article/20/6/homebrew-linux
|
||||
[9]: http://www.terraform.io/downloads.html
|
115
sources/tech/20201116 Podman with capabilities on Fedora.md
Normal file
115
sources/tech/20201116 Podman with capabilities on Fedora.md
Normal file
@ -0,0 +1,115 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Podman with capabilities on Fedora)
|
||||
[#]: via: (https://fedoramagazine.org/podman-with-capabilities-on-fedora/)
|
||||
[#]: author: (shiwanibiradar https://fedoramagazine.org/author/shiwanibiradar/)
|
||||
|
||||
Podman with capabilities on Fedora
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
Containerization is a booming technology. As many as seventy-five percent of global organizations could be running some type of containerization technology in the near future. Since widely used technologies are more likely to be targeted by hackers, securing containers is especially important. This article will demonstrate how [POSIX capabilities][2] are used to secure Podman containers. Podman is the default container management tool in RHEL8.
|
||||
|
||||
### Determine the Podman container’s privilege mode
|
||||
|
||||
Containers run in either privileged or unprivileged mode. In privileged mode, [the container uid 0 is mapped to the host’s uid 0][3]. For some use cases, unprivileged containers [lack sufficient access][4] to the resources of the host machine. Technologies and techniques including Mandatory Access Control (apparmor, SELinux), seccomp filters, dropping of capabilities, and namespaces help to secure containers regardless of their mode of operation.
|
||||
|
||||
**To determine the privilege mode from outside the container:**
|
||||
|
||||
```
|
||||
$ podman inspect --format="{{.HostConfig.Privileged}}" <container id>
|
||||
```
|
||||
|
||||
If the above command returns _true_ then the container is running in privileged mode. If it returns _false_ then the container is running in unprivileged mode.
|
||||
|
||||
**To determine the privilege mode from inside the container:**
|
||||
|
||||
```
|
||||
$ ip link add dummy0 type dummy
|
||||
```
|
||||
|
||||
If this command allows you to create an interface then you are running a privileged container. Otherwise you are running an unprivileged container.
|
||||
|
||||
### Capabilities
|
||||
|
||||
Namespaces isolate a container’s processes from arbitrary access to the resources of its host and from access to the resources of other containers running on the same host. Processes within _privileged_ containers, however, might still be able to do things like alter the IP routing table, trace arbitrary processes, and load kernel modules. Capabilities allow one to apply finer-grained restrictions on what resources the processes within a container can access or alter; even when the container is running in privileged mode. Capabilities also allow one to assign privileges to an unprivileged container that it would not otherwise have.
|
||||
|
||||
For example, to add the _NET_ADMIN_ capability to an unprivileged container so that a network interface can be created inside of the container, you would run _podman_ with parameters similar to the following:
|
||||
|
||||
```
|
||||
[root@vm1 ~]# podman run -it --cap-add=NET_ADMIN centos
|
||||
[root@b27fea33ccf1 /]# ip link add dummy0 type dummy
|
||||
[root@b27fea33ccf1 /]# ip link
|
||||
```
|
||||
|
||||
The above commands demonstrate a _dummy0_ interface being created in an unprivileged container. Without the _NET_ADMIN_ capability, an unprivileged container would not be able to create an interface. The above commands demonstrate how to grant a capability to an unprivileged container.
|
||||
|
||||
Currently, there are about [39 capabilities][5] that can be granted or denied. Privileged containers are granted many capabilities by default. It is advisable to drop unneeded capabilities from privileged containers to make them more secure.
|
||||
|
||||
**To drop all capabilities from a container:**
|
||||
|
||||
```
|
||||
$ podman run -it -d --name mycontainer --cap-drop=all centos
|
||||
```
|
||||
|
||||
**To list a container’s capabilities:**
|
||||
|
||||
```
|
||||
$ podman exec -it 48f11d9fa512 capsh --print
|
||||
```
|
||||
|
||||
The above command should show that no capabilities are granted to the container.
|
||||
|
||||
**Refer to the _capabilities_ man page for a complete list of capabilities:**
|
||||
|
||||
```
|
||||
$ man capabilities
|
||||
```
|
||||
|
||||
**Use the _capsh_ command to list the capabilities you currently possess:**
|
||||
|
||||
```
|
||||
$ capsh --print
|
||||
```
|
||||
|
||||
As another example, the below command demonstrates dropping the _NET_RAW_ capability from a container. Without the _NET_RAW_ capability, servers on the internet cannot be pinged from within the container.
|
||||
|
||||
```
|
||||
$ podman run -it --name mycontainer1 --cap-drop=net_raw centos
|
||||
>>> ping google.com (will output error, operation not permitted)
|
||||
```
|
||||
|
||||
As a final example, if your container were to only need the _SETUID_ and _SETGID_ capabilities, you could achieve such a permission set by dropping all capabilities and then re-adding only those two.
|
||||
|
||||
```
|
||||
$ podman run -d --cap-drop=all --cap-add=setuid --cap-add=setgid fedora sleep 5 > /dev/null; pscap | grep sleep
|
||||
```
|
||||
|
||||
The _pscap_ command shown above should show the capabilities that have been granted to the container.
|
||||
|
||||
I hope you enjoyed this brief exploration of how capabilities are used to secure Podman containers.
|
||||
|
||||
Thank You!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/podman-with-capabilities-on-fedora/
|
||||
|
||||
作者:[shiwanibiradar][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/shiwanibiradar/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2018/10/podman-816x345.jpg
|
||||
[2]: https://www.linuxjournal.com/magazine/making-root-unprivileged
|
||||
[3]: https://linuxcontainers.org/lxc/security/#privileged-containers
|
||||
[4]: https://github.com/containers/podman/blob/master/rootless.md
|
||||
[5]: https://man7.org/linux/man-pages/man7/capabilities.7.html
|
@ -0,0 +1,272 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Unlock encrypted disks on Linux automatically)
|
||||
[#]: via: (https://opensource.com/article/20/11/nbde-linux)
|
||||
[#]: author: (Curt Warfield https://opensource.com/users/rcurtiswarfield)
|
||||
|
||||
Unlock encrypted disks on Linux automatically
|
||||
======
|
||||
Open encrypted disks without having to manually enter a passcode by
|
||||
using Network-Bound Disk Encryption (NBDE).
|
||||
![Lock][1]
|
||||
|
||||
From a security viewpoint, it's important to encrypt your sensitive data to protect it from prying eyes and hackers. Linux Unified Key Setup ([LUKS][2]) is a great tool and a common standard for Linux disk encryption. Because it stores all pertinent setup information in the partition header, it makes migrating data easy.
|
||||
|
||||
To configure encrypted disks or partitions with LUKS, you will need to use the [cryptsetup][3] utility. Unfortunately, one of the downsides of encrypting your disks is that you have to manually provide the password every time the system is rebooted or the disk is remounted.
|
||||
|
||||
However, Network-Bound Disk Encryption (NBDE) can automatically and securely unlock encrypted disks without any user intervention. It is available in several Linux distributions, beginning with Red Hat Enterprise Linux 7.4, CentOS 7.4, and Fedora 24, and in later versions of each.
|
||||
|
||||
NBDE is implemented with the following technologies:
|
||||
|
||||
* **[Clevis framework][4]:** A pluggable framework tool that automatically decrypts and unlocks LUKS volumes
|
||||
* **[Tang server][5]:** A service for binding cryptographic keys to network presence
|
||||
|
||||
|
||||
|
||||
Tang provides the encryption keys to the Clevis client. According to Tang's developers, this provides a secure, stateless, anonymous alternative to key escrow services.
|
||||
|
||||
Because NBDE uses the client-server architecture, you must configure both the client and the server. You can use a virtual machine on your local network for your Tang server.
|
||||
|
||||
### Server installation
|
||||
|
||||
Install Tang using sudo:
|
||||
|
||||
|
||||
```
|
||||
`sudo yum install tang -y`
|
||||
```
|
||||
|
||||
Enable the Tang server:
|
||||
|
||||
|
||||
```
|
||||
`sudo systemctl enable tangd.socket --now`
|
||||
```
|
||||
|
||||
The Tang server works on port 80 and must be added to firewalld. Add the appropriate firewalld rule:
|
||||
|
||||
|
||||
```
|
||||
sudo firewall-cmd --add-port=tcp/80 --perm
|
||||
sudo firewall-cmd --reload
|
||||
```
|
||||
|
||||
The server should now be installed.
|
||||
|
||||
### Client installation
|
||||
|
||||
For this example, assume you have added a new 1GB disk named `/dev/vdc` to your system.
|
||||
|
||||
Create the primary partition using fdisk or parted:
|
||||
|
||||
|
||||
```
|
||||
sudo fdisk /dev/vdc
|
||||
```
|
||||
|
||||
Complete the following steps to install the client.
|
||||
|
||||
|
||||
```
|
||||
Welcome to fdisk (util-linux 2.23.2).
|
||||
|
||||
Changes will remain in memory only, until you decide to write them.
|
||||
Be careful before using the write command.
|
||||
|
||||
Device does not contain a recognized partition table
|
||||
Building a new DOS disklabel with disk identifier 0x4a6812d4.
|
||||
|
||||
Command (m for help):
|
||||
```
|
||||
|
||||
Enter **n** to create the new partition:
|
||||
|
||||
|
||||
```
|
||||
Partition type:
|
||||
p primary (0 primary, 0 extended, 4 free)
|
||||
e extended
|
||||
Select (default p):
|
||||
```
|
||||
|
||||
Hit the **Enter** key to select the primary partition:
|
||||
|
||||
|
||||
```
|
||||
Using default response p
|
||||
Partition number (1-4, default 1):
|
||||
```
|
||||
|
||||
Hit the **Enter** key to select the default partition number:
|
||||
|
||||
|
||||
```
|
||||
First sector (2048-2097151, default 2048):
|
||||
Using default value 2048
|
||||
Last sector, +sectors or +size{K,M,G} (2048-2097151, default 2097151):
|
||||
```
|
||||
|
||||
Hit the **Enter** key to select the last sector:
|
||||
|
||||
|
||||
```
|
||||
Using default value 2097151
|
||||
Partition 1 of type Linux and of size 1023 MiB is set
|
||||
|
||||
Command (m for help): wq
|
||||
```
|
||||
|
||||
Type **wq** to save the changes and exit fdisk:
|
||||
|
||||
|
||||
```
|
||||
The partition table has been altered!
|
||||
|
||||
Calling ioctl() to re-read partition table.
|
||||
Syncing disks.
|
||||
```
|
||||
|
||||
Run `partprobe` to inform the system of the partition table changes:
|
||||
|
||||
|
||||
```
|
||||
`sudo partprobe`
|
||||
```
|
||||
|
||||
Install the cryptsetup package using sudo:
|
||||
|
||||
|
||||
```
|
||||
`sudo yum install cryptsetup -y`
|
||||
```
|
||||
|
||||
Use the `cryptsetup luksFormat` command to encrypt the disk. You will need to type **YES** when prompted and also choose and enter a passphrase to encrypt the disk:
|
||||
|
||||
|
||||
```
|
||||
sudo cryptsetup luksFormat /dev/vdc1
|
||||
WARNING!
|
||||
========
|
||||
This will overwrite data on /dev/vdc1 irrevocably.
|
||||
|
||||
Are you sure? (Type uppercase yes):
|
||||
|
||||
Enter passphrase for /dev/vdc1:
|
||||
Verify passphrase:
|
||||
```
|
||||
|
||||
Use the `cryptsetup luksOpen` command to map the encrypted partition to a logical device. For example, use `encryptedvdc1` as the name. You will also need to enter the passphrase again:
|
||||
|
||||
|
||||
```
|
||||
sudo cryptsetup luksOpen /dev/vdc1 encryptedvdc1
|
||||
Enter passphrase for /dev/vdc1:
|
||||
```
|
||||
|
||||
The encrypted partition is now available at `/dev/mapper/encryptedvdc1`.
|
||||
|
||||
Create an XFS filesystem on the encrypted partition:
|
||||
|
||||
|
||||
```
|
||||
`sudo mkfs.xfs /dev/mapper/encryptedvdc1`
|
||||
```
|
||||
|
||||
Create a directory for mounting the encrypted partition:
|
||||
|
||||
|
||||
```
|
||||
`sudo mkdir /encrypted`
|
||||
```
|
||||
|
||||
Use the `cryptsetup luksClose` command to lock the partition:
|
||||
|
||||
|
||||
```
|
||||
`cryptsetup luksClose encryptedvdc1`
|
||||
```
|
||||
|
||||
Install the Clevis packages using sudo:
|
||||
|
||||
|
||||
```
|
||||
`sudo yum install clevis clevis-luks clevis-dracut -y`
|
||||
```
|
||||
|
||||
Modify /etc/crypttab to open the encrypted volume at boot time:
|
||||
|
||||
|
||||
```
|
||||
`sudo vim /etc/crypttab`
|
||||
```
|
||||
|
||||
Add the following line:
|
||||
|
||||
|
||||
```
|
||||
`encryptedvdc1 /dev/vdc1 none _netdev`
|
||||
```
|
||||
|
||||
Modify /etc/fstab to automatically mount the encrypted volume during a reboot or at boot time:
|
||||
|
||||
|
||||
```
|
||||
`sudo vim /etc/fstab`
|
||||
```
|
||||
|
||||
Add the following line:
|
||||
|
||||
|
||||
```
|
||||
`/dev/mapper/encryptedvdc1 /encrypted xfs _netdev 1 2`
|
||||
```
|
||||
|
||||
For this example, assume the Tang server's IP address is `192.168.1.20`. You can also use the hostname or domain if you prefer.
|
||||
|
||||
Run the following `clevis` command:
|
||||
|
||||
|
||||
```
|
||||
sudo clevis bind luks -d /dev/vdc1 tang '{"url":"<http://192.168.1.20"}>'
|
||||
The advertisement contains the following signing keys:
|
||||
|
||||
rwA2BAITfYLuyNiIeYUMBzkhk7M
|
||||
|
||||
Do you wish to trust these keys? [ynYN] Y
|
||||
Enter existing LUKS password:
|
||||
```
|
||||
|
||||
Type **Y** to accept the keys for the Tang server and provide the existing LUKS password for the initial setup.
|
||||
|
||||
Enable clevis-luks-askpass.path via systemctl in order to prevent being prompted for the passphrase for non-root partitions.
|
||||
|
||||
|
||||
```
|
||||
`sudo systemctl enable clevis-luks-askpass.path`
|
||||
```
|
||||
|
||||
The client is installed. Now, whenever you reboot the server, the encrypted disk should automatically be decrypted and mounted by retrieving the keys from the Tang server.
|
||||
|
||||
If the Tang server is unavailable for any reason, you'll need to provide the passphrase manually in order to decrypt and mount the partition.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/11/nbde-linux
|
||||
|
||||
作者:[Curt Warfield][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/rcurtiswarfield
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security-lock-password.jpg?itok=KJMdkKum (Lock)
|
||||
[2]: https://en.wikipedia.org/wiki/Linux_Unified_Key_Setup
|
||||
[3]: https://gitlab.com/cryptsetup/cryptsetup
|
||||
[4]: https://github.com/latchset/clevis
|
||||
[5]: https://github.com/latchset/tang
|
@ -0,0 +1,127 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Install Google Chrome on Fedora [Beginner’s Tutorial])
|
||||
[#]: via: (https://itsfoss.com/install-google-chrome-fedora/)
|
||||
[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/)
|
||||
|
||||
如何在 Fedora 上安装 Google Chrome 浏览器(入门教程)
|
||||
======
|
||||
|
||||
Fedora 的默认网页浏览器是 Firefox。尽管它是一个优秀的网络浏览器,你可能更喜欢流行的 Google Chrome 浏览器。
|
||||
|
||||
如果你想知道如何在 Fedora 上安装 Google Chrome 浏览器,让我告诉你两种安装 Google Chrome 浏览器的方法:图形化法和命令行法。
|
||||
|
||||
* [图形化方法 1:通过启用 Fedora 第三方仓库从软件中心安装 Chrom e浏览器][1] 。
|
||||
* [图形化方法 2:从谷歌浏览器网站下载 RPM 文件][2]
|
||||
* [命令行方法:从 Fedora 第三方仓库安装 Chrome,一切使用命令(与 GUI 方法 1 相同)][3]。
|
||||
|
||||
|
||||
|
||||
这全取决于你喜欢哪种方法。你在 [Fedora][4] 上的 Google Chrome 浏览器都将通过这三种方法的系统更新获取定期更新。
|
||||
|
||||
### 方法 1:在 Fedora 中从软件中心安装 Google Chrome
|
||||
|
||||
Fedora 提供了一个第三方仓库,其中包含了一些流行的专有软件、图形驱动程序。Google Chrome 就是其中之一。
|
||||
|
||||
第一步,确保在 Fedora 中启用第三方仓库。你应该在软件中心中看到这个选项。
|
||||
|
||||
![Step1: Fedora Third Party Repositories][5]
|
||||
|
||||
启用后,只需在软件中心搜索 Chrome:
|
||||
|
||||
![Step 2: Search for Chrome In Fedora Software Center][6]
|
||||
|
||||
并从那里安装它:
|
||||
|
||||
![Step 3: Install Chrome Fedora][7]
|
||||
|
||||
Can it be any easier than this? I don’t think either :)
|
||||
还有比这更简单的吗?我不这么认为 :)
|
||||
|
||||
### 方法 2:在 Fedora 上从 Chrome 网站安装 Google Chrome
|
||||
|
||||
如果你不想启用第三方仓库,也没关系。你不必这样做。你可以从 Chrome 的网站上下载 RPM 文件,双击并安装它。
|
||||
|
||||
访问 Google Chrome 的网站,点击下载按钮。
|
||||
|
||||
[Get Google Chrome][8]
|
||||
|
||||
![][9]
|
||||
|
||||
然后选择 .rpm 包,点击“接受并安装”。
|
||||
|
||||
![][10]
|
||||
|
||||
下载结束后,双击文件,在包管理器提示时点击安装。输入密码,等待安装完成。
|
||||
|
||||
![][11]
|
||||
|
||||
这是超级简单的,对吧?让我们来看看有点复杂的方法(如果你不是一个终端爱好者)。
|
||||
|
||||
### 方法 3:使用命令行在 Fedora 上安装 Chrome
|
||||
|
||||
首先,你需要添加额外的 Fedora 仓库(你在方法 1 中看到的):
|
||||
|
||||
```
|
||||
sudo dnf install fedora-workstation-repositories
|
||||
```
|
||||
|
||||
然后启用 Google Chrome 仓库。
|
||||
|
||||
```
|
||||
sudo dnf config-manager --set-enabled google-chrome
|
||||
```
|
||||
|
||||
![][12]
|
||||
|
||||
要安装 Google Chrome 稳定版,请在终端运行以下命令。
|
||||
|
||||
```
|
||||
sudo dnf install google-chrome-stable
|
||||
```
|
||||
|
||||
你会看到一个导入 GPG 密钥的警告,输入 y 继续。
|
||||
|
||||
![][13]
|
||||
|
||||
你正在添加 Google Chrome 仓库。这个软件包来自这个仓库,它直接来自 Google。
|
||||
|
||||
#### 总结
|
||||
|
||||
即使你使用命令行,在 Fedora 上安装 Google chrome 也相当简单。除了第三方仓库的部分,这和[在 Ubuntu 上安装 Chrome][14] 差不多。
|
||||
|
||||
现在你已经安装好了,你可能会想[查看我们的 Google Chrome 键盘快捷键列表][15]来更快地使用浏览器。
|
||||
|
||||
不要忘记订阅,获取关于 Fedora 的最新消息和教程,如果你有任何问题,请在下方留言。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-google-chrome-fedora/
|
||||
|
||||
作者:[Dimitrios Savvopoulos][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://itsfoss.com/author/dimitrios/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: tmp.VFVwBw56ac#gui-method-1
|
||||
[2]: tmp.VFVwBw56ac#gui-method-2
|
||||
[3]: tmp.VFVwBw56ac#cli-method
|
||||
[4]: https://getfedora.org/
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/fedora-third-party-repositories.jpg?resize=800%2C400&ssl=1
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/chrome-in-fedora.png?resize=800%2C400&ssl=1
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/installing-chrome-fedora.png?resize=800%2C400&ssl=1
|
||||
[8]: https://www.google.com/chrome/
|
||||
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/install-google-chrome-ubuntu-1.jpeg?resize=800%2C374&ssl=1
|
||||
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/3.-download-rpm-chrome.png?resize=800%2C600&ssl=1
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/4.-install-chrome-fedora.png?resize=800%2C550&ssl=1
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/1.-Fedora-extra-repos.png?resize=800%2C550&ssl=1
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/2.-Fedora-GPG-key.png?resize=800%2C550&ssl=1
|
||||
[14]: https://itsfoss.com/install-chrome-ubuntu/
|
||||
[15]: https://itsfoss.com/google-chrome-shortcuts/
|
Loading…
Reference in New Issue
Block a user